summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
AgeCommit message (Collapse)Author
2012-09-03radeon: add capability and provider supportDave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-10Initial glamor support.Michel Dänzer
Enable at build time with --enable-glamor and runtime with Option "AccelMethod" "glamor" The most notable lack of functionality is XVideo. Use something like VDPAU for now. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-06-16radeon: migrate remainder of radeon_driver.c to rest of driverDave Airlie
This helps make a few more things static and the driver generally smaller. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-15radeon: more unused stuffDave Airlie
Remove all CurrentLayout stuff. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-15radeon: drop all UMS/DRI1/XAA/overlay support.Dave Airlie
This overhauls the radeon driver and removes all the old UMS-only code, it drops all the UMS, DRI1, XAA, overlay Xv, video capture, tv tuners There are probably a lot more cleanups that will fall out of this afterwards. So far this is compile/build tested. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-06Don't wait on a CRTC which has been disabled via DPMS (bug #49761).Michel Dänzer
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=49761 . Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-06-02radeon: improve smooth startup fallbacks.Dave Airlie
If we can't handover the framebuffer, memset it to black. mostly ported from nouveau. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-02radeon: fix smooth startup with tiling enabled.Dave Airlie
We need to use the surface we worked out when we allocated the front bo, not work out a new surface from scratch. This fixes smooth handover from plymouth to gdm on F17. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-01drmmode: drop flags arg to adjust frame.Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-23ati: convert to new screen conversion APIsDave Airlie
The compat header takes care of the old server vs new server. this commit was autogenerated from util/modular/x-driver-screen-scrn-conv.sh Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-06Re-register DRM FD wakeup handler for each server generation.Michel Dänzer
Fixes hang when trying to use DRI2 swap scheduling after a server reset. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Tested-by: Christian König <Christian.koenig@amd.com>
2012-02-13radeon: r6xx-eg use linear general when using scratch boJerome Glisse
In path where we need to use scratch bo as temporary area, consider it as linear buffer. Not linear aligned. Fix some case such as in bugs: https://bugs.freedesktop.org/show_bug.cgi?id=45827 Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-10radeon: fix crash in drmmode_create_bo_pixmap()Alex Deucher
Only init surface on r6xx+. Return NULL rather than FALSE. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45829 Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2012-02-06r600-evergreen: use common surface allocator for tiling v11Jerome Glisse
Use libdrm common surface code so mesa,ddx have same idea about tiling surface and what their pitch should be and the alignment constraint. v2 fix remaining issue add new option to conditionaly enable v3 fix fbcon copy and r600 exa copy path v4 fix non tiled path 2D tiling on GPU >= R600, set it to false as default v5 adapt to pixel/element size split of libdrm/radeon v6 update to properly handle falling back to 1d tiled v6 final fix to tile split value on evergreen and newer v7 fix default array mode on r6xx, fix height alignment issue on evergreen v8 fix tile split value v9 add stencil tile split support, simplify dri2 for stencil with evergreen v10 Try to fix xv path regarding tiling. Adapt to libdrm API change. Try to fix case where there is no surface which means non tiled bo. v11 check for proper libdrm Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2011-11-11ati: enable bg none when fbcon succeeds and we are built against ABI after 10.Dave Airlie
One less patch to keep carrying in Fedora. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-04DRI/DRI2: remove hard-coded limitation to 6 crtcsIlija Hadzic
DRM's hard limit to the number of CRTCs is 32. ATI DDX unnecessarily clips this limit to 6 by hard coding initial assumption for output->possible_crtcs mask to 0x7f (before it gets trimmed down to what's really possible for a given output) and by allocating only 6 entries for for cursor_bo[] array in RADEONInfoRec. Fix this and thus allow the ATI DDX to deal with as many CRTCs as the DRM allows (32), so it is ready if anything with >6 CRTCs comes out. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
2011-08-01kms: fix possible leak in pageflip codeAlex Deucher
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-01kms: Move flip_count and co. to a per swap structureVille Syrjala
If multiple drawables are doing page flipping, the global drmmode structure can't be used to keep per swap information. For example flip_count can increase prematurely due to another swap request, and then the previous swap request never gets completed, leading to a stuck client. Move the relevant pieces of data to a strucuture that gets allocated once per swap request and shared by all involved CRTCs. Signed-off-by: Ville Syrjala <syrjala@sci.fi>
2011-05-13KMS: Fix output properties logic error.Michel Dänzer
Pointed out by clang: ../../src/drmmode_display.c:1023:30: error: use of logical && with constant operand; switch to bitwise & or remove constant [-Werror,-Wconstant-logical-operand] if (props && (props->flags && DRM_MODE_PROP_ENUM)) { ^ ~~~~~~~~~~~~~~~~~~ Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-28kms: don't rotate if acceleration is not enabledAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-12kms: use worst case base/pitch align if we don't have drm tiling infoAlex Deucher
To avoid CS rejection. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-12kms: fix rotate pitch alignAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-11kms/6xx+: endian swap cursor uploadsCédric Cano
agd5f: remove kms surface for cursor since we now do the swap in the cursor load to avoid breaking pre-6xx cards with BE. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-106xx+: switch to linear aligned rather than linear generalAlex Deucher
linear aligned is supposedly more performant, but more importantly, linear general only works on the CB without slices. The texture blocks technically don't support linear general although, I think linear general gets upgraded to linear aligned in the hw which is why it currently works. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-01kms/pre-6xx: fix pageflipping with tilingAlex Deucher
Use UTS/DFS to tile/untile as appropriate for sw access on pre-6xx. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33738 Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-01-11kms: fix pitch aligment for scanoutAlex Deucher
Display has slightly stricter pitch alignment requirements than other blocks. Factor that in when aligning pitch. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=32997
2011-01-11radeon: fix yet another pitch alignAlex Deucher
2011-01-11radeon: fix pitch align in pageflip codeAlex Deucher
2010-12-01ddx/ati: Fix reporting of pageflip completion events on multi-head.Mario Kleiner
When a drawable is page-flipped on multiple crtc's (fullscreen drawable on mirror-mode or multi-head x-screen), only one pageflip event is finally delivered, after the last participating crtc signals flip completion, this to avoid visual corruption. Old code returned vblank count and timestamps of flip completion of this last crtc, instead of the values of the "master crtc", the one that was used for initially scheduling/triggering the pagflip via vblank events. (master = radeon_dri2_drawable_crtc(drawable)) This patch makes sure that the pageflip completion values of the "master" crtc are returned, otherwise client applications will get confused by the random (msc, ust) values returned by whichever crtc was the last to complete its flip. Without this, the returned values change randomly and jump forward and backward in time and count. The patch also implements a consistency check on returned vblank count values of pageflip completion. Impossible values are detected, a x-warning is logged and returned (msc,ust) values are marked invalid, so clients could perform error handling. Such a warning would indicate bugs in the pageflip completion routine of future kms drivers or the ddx to aid driver debugging. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-12-01radeon/kms: add pageflip supportAlex Deucher
requires radeon drm 2.8.0 or higher Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-01radeon/kms: allow tiled front buffer on 6xx/7xxAlex Deucher
Use UTS/DFS to tile/untile as appropriate for sw access. Also enables pageflipping with tiling enabled.
2010-11-24radeon/kms: fix output enumerationAlex Deucher
If a system has a mix of DVI-I, and DVI-D connectors, or a mix of HDMI-A and HDMI-B connectors, the enumeration was per connector type, but the naming was the same for multiple connectors (DVI-[0-n] for DVI-I, -D, -A, and HDMI-[0-n] for HDMI-A, and -B), you'd end up with multiple connectors with the same name. Fix this by tracking the number of connectors across similar connector types.
2010-11-17radeon/kms: fix buffer base alignment for tilingAlex Deucher
On r6xx+, 2D tiling can require larger than 4k base alignment.
2010-10-29radeon/kms: more alignment fixesAlex Deucher
2010-10-28radeon: only register block handler once per fd.Dave Airlie
should fix https://bugs.freedesktop.org/show_bug.cgi?id=29726 the problem is of course the second head instance tries to access the fd and fails, however I think this might break syncing on the second head but not sure, but its better than just hanging up the X server
2010-10-27drm/radeon: unify fb bo alignment harderAlex Deucher
More duplicated paths discoved...
2010-10-27kms/radeon: unify fb bo alignment handlingAlex Deucher
Previously there were 3 different paths with what should have had duplicated code: - EXACreatePixmap2 - Initial front buffer creation - Randr resize This patch attempts to unify the alignment across all 3. This may fix tiling issues in some cases and should make buffer pitches match for pageflipping.
2010-10-27Re-use result of GetScreenPixmap call.Michel Dänzer
Fixes compile warning due to local variable ppix being unused when building against current xserver Git.
2010-10-19radeon: fix compilation on xserver >= 1.10Alex Deucher
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30451 Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-10-18kms: Let the server know if we got more than 1 EDID blockAdam Jackson
Otherwise things like xf86MonitorIsHDMI() won't work right. Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-07radeon: set interlaced and doublescan enabled for randr outputsAlex Deucher
interlaced used to work without setting these parameters. Changes in the xserver seem to require them now. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=29591
2010-08-05r6xx/r7xx: add support for tiling with kms (v3)Alex Deucher
Requires radeon drm 2.6.0 and updated mesa. v2: - fix lockup due to not emiting DB_DEPTH_INFO https://bugs.freedesktop.org/show_bug.cgi?id=28342 - fix drm minor version to deal with evergreen accel v3: rebase on current ddx git Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-07-15kms: don't call cursor helper if using software cursorJerome Glisse
Fix : https://bugzilla.redhat.com/show_bug.cgi?id=601713 https://bugzilla.redhat.com/show_bug.cgi?id=598358 Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-06-21Convert x(c)alloc/xfree to m/calloc/free.Michel Dänzer
Fixes deprecation warnings with xserver master and should also work with older xservers.
2010-06-11drmmode: fix big endian issue with properties.Dave Airlie
On a power machine with an rn50, this was causing load detection to be turned off after the first X run, subsequent X runs would find nothing connected. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-05-10kms: add support for the MSC swap & sync APIJerome Glisse
This patch is mostly a port over of Intel ddx code for MSC support. It needs a radeon KMS module with version 2.4 which has the query for hw crtc id. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-04-16radeon/kms: fix possible crtc mask for evergreenAlex Deucher
2010-04-16kms: add uevent support.Dave Airlie
When we get a hotplug event from the kernel we should notify the client side to reconfigure displays. based on work by ajax in intel driver. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-18radeon: avoid using DRI1 init path on DRI2 driver.Dave Airlie
I was playing with multi-seat and found this code, fixed it up to be sane and more DRI2 like. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-16kms: fix ums naming compat for DisplayPortAlex Deucher