summaryrefslogtreecommitdiff
path: root/src/radeon_kms.c
AgeCommit message (Collapse)Author
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-05-10Fail more gracefully when drm surface manager can't be initializedAnisse Astier
Should make bugs like https://bugs.freedesktop.org/show_bug.cgi?id=48138 easier to diagnose. [ Michel Dänzer: Appended newline to error message. ] Signed-off-by: Anisse Astier <anisse@astier.eu> Singed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-04-16Make radeon_setup_kernel_mem failures more graceful and verbose.Michel Dänzer
So that bugs like https://bugs.freedesktop.org/show_bug.cgi?id=48138 can be diagnosed more easily. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2012-03-20radeon/kms: add support for TN (trinity) APUsAlex Deucher
- KMS only - Includes full EXA/Xv support Signed-off-by: Alex Deucher <alexdeucher@gmail.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/kms: reusing fd message is not an errorAlex Deucher
It's standard behavior. 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-04Turn compile time check into runtime check.Michel Dänzer
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-11-04check for xserver 1.9.4.901 to enable tiling by defaultAlex Deucher
Previous xservers had a bug in the EXA code which caused display corruption in some cases. See: https://bugs.freedesktop.org/show_bug.cgi?id=33929 Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-09-20Only call radeon_dri2_close_screen() if DRI2 was enabled.Michel Dänzer
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-09-20Remove dead variable remain_size_bytes.Michel Dänzer
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-09-20KMS Color Tiling requires xserver which supports EXA_MIXED_PIXMAPS.Michel Dänzer
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-06-22evergreen: fix num_banks for 2D tiling configAlex Deucher
The field is encoded. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-13kms: enable ColorTiling by default on r6xx-cayman asicsAlex Deucher
Currently only 1D tiling as 2D tiling still has some corner cases to fix up. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-05-24kms/cayman: stub out exa supportAlex Deucher
Just fallbacks for now. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-05-04fusion: fix tiling enable logicAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-05-04fusion: enable tiling if DFS worksAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-05-04radeon: add add hw DFS support for fusionDave Airlie
Fusion had a bug setting up the VM on earlier kernels so we need to work around that and only enable accel on a new enough kernel. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-15APU: no tiling yetAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-03-02kms: no accel yet for caymanAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-03-01kms: Fix warning XNFprintf is deprecated (v2)Sedat Dilek
The first take of my patch missed the breakage against pre-1.10 xservers and now I know XNFasprintf() is not a 1:1 replacement for XNFprintf(). The idea for the fix seemed to be so obvious, but as usual "really" test the patch you are sending to any ML. I am awfully sorry for the overhasty bad hack. Thanks to Alan and Alex for the help to fix it correctly, now. Tested-By: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
2011-02-28kms: don't enable tiling if accel is offAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-26Revert "kms: Fix warning XNFprintf is deprecated"Michel Dänzer
This reverts commit cb4dc7ab66016d0c980800f8dbf71bbe993889d3. Looks like this caused https://bugs.freedesktop.org/attachment.cgi?id=43852 , but even if it didn't, the following needs to be addressed first: cc1: warnings being treated as errors ../../src/radeon_kms.c: In function ‘radeon_open_drm_master’: ../../src/radeon_kms.c:413: error: passing argument 1 of ‘XNFasprintf’ from incompatible pointer type /usr/local/include/xorg/Xprintf.h:57: note: expected ‘char **’ but argument is of type ‘char *’ ../../src/radeon_kms.c:413: error: passing argument 2 of ‘XNFasprintf’ makes pointer from integer without a cast /usr/local/include/xorg/Xprintf.h:57: note: expected ‘const char * restrict’ but argument is of type ‘uint16_t’ ../../src/radeon_kms.c:413: error: assignment makes pointer from integer without a cast make[2]: *** [radeon_kms.lo] Error 1
2011-02-25kms: Fix warning XNFprintf is deprecatedSedat Dilek
Noticed when building ati/radeon ddx against xserver 1.10-rc3. [ build.log ] ../../src/radeon_kms.c:412:5: warning: 'XNFprintf' is deprecated (declared at /usr/include/xorg/os.h:273) agd5f: don't break the build against pre-1.10 xservers. Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-16kms: add tiling support for evergreen/NIAlex Deucher
- requires 2.6.37 or newer - 1D only at the moment - disabled by default 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: always get the tiling info even if we aren't tilingAlex Deucher
We need the proper group size to calculate alignment so the ddx and drm agree. 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-11kms: remove RADEON_TILING_SURFACE flag on front boAlex Deucher
Should have been removed in: ef9bfb262db7004bef3704e5d914687e50d3fca4 Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-01-24vbo: always flush the cbuf bo in flush_indirect()Alex Deucher
Always flush the cbuf in case we end up with a cbuf mapped in Prepare*(), but never end up issuing a draw call since the cbuf may be in use by multiple ops. The CS check for the cbuf bo is no longer necessay because the cbuf bo is NULL at this point due to the radeon_vbo_put() just prior. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=32188
2011-01-17radeon: add back flush in block handler.Dave Airlie
this is also needed for certain things like stipple rendering. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-01ddx/ati: Add option "SwapbuffersWait" to control vsync of DRI2 swaps.Mario Kleiner
A new optional kms driver option "SwapbuffersWait" is defined for xorg.conf, which defaults to "on". If "on", DRI2 bufferswaps will be synchronized to vsync, otherwise not. This currently only affects copy-swaps, not pageflipped swaps. It also requires a swap_interval setting of zero by the OpenGL client. Ideally, we'd provide a way for dri2 to pass the current swap interval to the ddx so we could change this dynamically. 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-30evergreen: set default group_bytes to 256Alex Deucher
512 seems to cause issues on certain cards. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=31724
2010-11-22Add EXA/Xv acceleration support for Ontario Fusion APUsAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-11-22ontario: add UMS modesetting supportAlex Deucher
Accel not enabled yet. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-11-17radeon/kms: fix buffer base alignment for tilingAlex Deucher
On r6xx+, 2D tiling can require larger than 4k base alignment.
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-04Merge branch 'evergreen_accel' of ↵Alex Deucher
git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-ati
2010-08-25radeon: add correct flushing for direct renderedDave Airlie
this is a port of 69d65f9184006eac790efcff78a0e425160e95aa from the Intel driver. Submit batch buffers from flush callback chain There are a few cases where the server will flush client output buffers but our block handler only catches the most common (before going into select If the server flushes client buffers before we submit our batch buffer, the client may receive a damage event for rendering that hasn't happened yet Instead, we can hook into the flush callback chain, which the server will invoke just before flushing output. This lets us submit batch buffers before sending out events, preserving ordering. Fixes 28438: [bisected] incorrect character in gnome-terminal under compiz https://bugs.freedesktop.org/show_bug.cgi?id=28438 Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-23evergreen: use vbo pool for constant buffersAlex Deucher
2010-08-23radeon: move vbo data to a separate structAlex Deucher
this way we can share the vbo code with const buffers
2010-08-20Add initial EXA and Xv support for evergreenAlex Deucher
Based on the r6xx/r7xx code updated for evergreen. Still causes GPU hangs in some cases. We haven't tracked down why yet. Might be related to constant buffer persistence. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
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-08-01radeon/r600: restructure exa + vbo to provide more sharingDave Airlie
This is a precursor for r300/500 vbo support. Signed-off-by: Dave Airlie <airlied@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-21radeon: fix support for 1.9 server master.Dave Airlie
This moves pixmap and mode set into CSR where its allowed. Should work fine on old servers also. Signed-off-by: Dave Airlie <airlied@redhat.com>