summaryrefslogtreecommitdiff
path: root/src/radeon_exa_funcs.c
AgeCommit message (Collapse)Author
2018-07-12Replace 'foo == NULL' with '!foo'Michel Dänzer
Shorter and sweeter. :) (Ported from amdgpu commit e8e688f3852fb06b0c34ed5bce47c9493bcd1613) Acked-by: Alex Deucher <alexander.deucher@amd.com>
2018-07-09Add struct radeon_bufferMichel Dänzer
Inspired by amdgpu, preparation for the following change. For now, this is mostly a wrapper around struct radeon_bo, no functional change intended. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2018-07-09EXA: Remove old RADEONEXACreatePixmap hookMichel Dänzer
Not used by any supported version of xserver. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-08-30Require xserver >= 1.13Michel Dänzer
xserver 1.13.0 was released on September 6th, 2012, almost 5 years ago. This allows cleaning up a bunch of backwards compatibility code. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-01-07radeon/exa: Always use a scratch surface for UTS to vramAlex Deucher
If we don't, we may hit a buffer that crosses the visible vram boundary resulting in a sigbus when the CPU accesses the buffer beyond the PCI aperture. This will introduce an extra copy in certain cases. This is based on Michel's patch from bug 44099 updated for all asic families. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44099 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-06-03radeon: use direct mapping for fast fb access.Samuel Li
Signed-off-by: Samuel Li <samuel.li@amd.com>
2013-01-10Drop support for X servers older than 1.7.Michel Dänzer
The main purpose is to drop DRI2 compatibility code paths which are getting awkward to deal with and at this point are probably only tested lightly if at all. xserver 1.7 was released more than 3 years ago, and 1.6.2 was already required before. Mostly mechanical, there's probably potential for more cleanups. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-03video: add option to include disabled CRTCs in best CRTC searchIlija Hadzic
This patch adds an option called consider_disabled to radeon_pick_best_crtc function. If this option is set and searching for best-fit CRTC yields nothing, the search will be widened to include CRTCs in DPMS "off" state. The new option is not used yet; it will be in the patches to follow. v2: Do not look at the CRTC mode, we only care about its box. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-09-03radeon: add pixmap sharing hooks.Dave Airlie
This hooks into EXA and the dirty tracking to add sharing and output offload support. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-03radeon: add shared support to pixmaps.Dave Airlie
this just adds the interface and shared support to the pixmap. Signed-off-by: Dave Airlie <airlied@redhat.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: drop more wrapper macros.Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-15radeon: further macro cleanups.Dave Airlie
drop some more of the wrapper macros. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-15radeon: make exa copy funcs static.Dave Airlie
These are no longer used outside this area. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-15radeon: drop FUNC_NAME macro and ONCE_ONLY stuffDave Airlie
Drop all the CP vs MMIO macros that name functions. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-15drop RING_LOCALS/ACCEL_PREAMBLEDave Airlie
these were unused now. 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-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>
2011-10-27EXA < R6xx: Make sure 2D state is re-emitted after running out of CS space.Michel Dänzer
Otherwise it's basically luck what the 2D state ends up being at the beginning of the next CS. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-08-10Change my e-mail address to something that still works, and always will, I hope.Michel Dänzer
2011-04-05EXA: Cache BO tiling flags.Michel Dänzer
Calling into the kernel every time is quite expensive, and nobody else should ever change the tiling flags. There's still more to do along the same lines for >= R6xx.
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>
2010-09-20radeon: complete UTS and DFS even when a scratch BO is not necessaryKarl Tomlinson
Turns on the big-endian paths even for little-endian systems, and adds similar paths to the r6xx/r7xx functions. This makes UTS and DFS reliable, which will let PrepareAccess (with mixed pixmaps) choose to fail based on whether the pixmap is in VRAM (to avoid CPU reads).
2010-09-20radeon: complete big endian UTS and DFS even when scratch allocation fails.Karl Tomlinson
On big endian systems, PrepareAccess will fail when byte-swapping is required so UploadToScreen and DownloadFromScreen cannot rely on fallback to PrepareAccess. When scratch BO space allocation fails, this patch merely adds simple fallback to direct CPU access without any GPU blit. This sometimes requires a CS flush even in UploadToScreen. (No allocation retry after a flush is added here.)
2010-09-20RADEONDownloadFromScreenCS: flush CS writes before mapping BO for readKarl Tomlinson
If unflushed CS operations write to the pixmap BO, then these need to be flushed before mapping the BO for read. This currently only affects big endian systems and only when the operation writes to the GTT domain.
2010-09-20DownloadFromScreenCS: download via a scratch BO if pixmap domain is unknownKarl Tomlinson
radeon_bo_is_busy() may return without setting the domain out-parameter. If this happens, then download via a scratch GTT BO to avoid CPU VRAM read.
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-02-26Use RADEON_ALIGN instead of open coding it.Matt Turner
Also fix some RADEON_ALIGN(x, 63), which would return incorrect results for odd x. Though this shouldn't happen, it's still not right. You wouldn't ever write (x + 62) & ~62 which is clearly wrong (and what it expands to). CC: Jerome Glisse <jglisse@redhat.com> CC: Alex Deucher <alexdeucher@gmail.com> CC: Dave Airlie <airlied@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-02-26Use/define RADEON_GPU_PAGE_SIZE instead of sprinkling 4096 everywhere.Matt Turner
Also, define RADEON_BUFFER_ALIGN in terms of it, and replace some RADEON_ALIGN(x, RADEON_BUFFER_ALIGN) with RADEON_ALIGN(x, RADEON_GPU_PAGE_SIZE) since this is really what was intended. CC: Jerome Glisse <jglisse@redhat.com> CC: Alex Deucher <alexdeucher@gmail.com> CC: Dave Airlie <airlied@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-02-15EXA: Fix order of coordinates passed to radeon_pick_best_crtc().Michel Dänzer
The wrong order prevented tearing avoidance from working with EXA/DRI2.
2010-02-12radeon: consolidate crtc selector for vline waitAlex Deucher
Use the Xv version as it takes into account the area covered by the op rather than just picking the largest crtc area.
2009-12-21radeon: use new libdrm apiDave Airlie
2009-11-05radeon: properly fix unused label warningsAlex Deucher
2009-11-05Revert "Fix warning about unused defined labels in radeon_exa_funcs.c."Alex Deucher
This reverts commit b6ac42cce2156880ac18b32e15acbff40b2f53e9. This patch is very broken.
2009-11-05Fix warning about unused defined labels in radeon_exa_funcs.c.Tomáš Chvátal
Signed-off-by: Tomáš Chvátal <scarabeus@gentoo.org>
2009-10-03Fix KMS on big endian machines.Michel Dänzer
Requires at least xserver 1.7 to work properly. Also make sure the front buffer is and stays tiled if colour tiling is enabled.
2009-10-03EXA: Bail earlier from PrepareCopy hook on trivially unsupportable conditions.Michel Dänzer
2009-08-27KMS: Remove explicit radeon_bo_wait calls before radeon_bo_map.Michel Dänzer
libdrm_radeon always takes care of this implicitly now.
2009-08-27KMS: Don't use a blit for UploadToScreen if the pixmap BO will be idle anyway.Michel Dänzer
Direct CPU writes should be at least as fast in that case.
2009-08-27KMS: DownloadFromScreen improvements.Michel Dänzer
* Drop superfluous RADEONDownloadFromScreenGTT function, EXA does the same thing when we return FALSE. * Take unflushed operations into account for determining which GEM domain the pixmap BO will end up in. * Only use a blit if it ends up in VRAM.
2009-08-22exa/cs: add DFS from GTT optimisationDave Airlie
This uses the new libdrm busy interface, once I had this in place I added a error if this happened and it does on my desktop here, so may as well add the optimisation that used to be in my old KMS tree. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-08-19radeon/kms: add initial colortiling support (disabled by default).Dave Airlie
This requires an X server from git with createpixmap2 support fixed up in it. On 1.6 and previous it won't do any tiling, if you are running git server please upgrade to latest git. Option "AllowColorTiling" "true" to enable and do some testing
2009-08-07Properly let radeon_cs_flush_indirect() re-emit 2D state if necessary.Michel Dänzer
Also remove a superfluous assignment.
2009-08-07Add support for EXA_MIXED_PIXMAPS in xserver master.Michel Dänzer
2009-08-07Minor fixes for KMS EXA DownloadFromScreen hook.Michel Dänzer
Check we can handle the bpp, and remove superfluous flush.
2009-08-07Add KMS EXA UploadToScreen hook.Alex Deucher
Fixups by Michel Dänzer: Doesn't seem to be a win in terms of raw numbers, but should allow more pipelining and avoiding BO memory waste for small glyph pixmaps.
2009-08-04radeon: fix compile with !kmsAlex Deucher
2009-08-04radeon/kms: add simple DownloadFromScreen implementationJerome Glisse
What we want to do is add userspace object support to radeon kernel modesetting. Also this DFS is dumb and might endup doing blit from GTT to GTT.
2009-07-08Further non-KMS fixes / cleanups.Michel Dänzer
Only compile tested.
2009-07-08Fix the build for the !XF86DRM_MODE caseAlex Deucher
compile tested only.