summaryrefslogtreecommitdiff
path: root/src/radeon_textured_video.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-01-25Make XvMC extension initialize at depth 30.Mario Kleiner
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-06-15radeon: move more functions into texture videoDave Airlie
make more thing static. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-15radeon: drop legacy memory, merge into radeon videoDave Airlie
This merges these two functions into textured video code. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-15radeon: drop offset member of r600 accel objectDave Airlie
This is always 0 now. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-15radeon: move macros into radeon.hDave Airlie
Drop separate header file, there isn't many separate macros now. 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: 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-12-05Xv: Evergreen+ asics support 16k surfacesAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-08-11video: Don't round up bottom/right edge for clipping source width/height.Michel Dänzer
It's not necessary: If the top/left edge was rounded down, this will be compensated by the subtraction. Worse, if the original source width/height is odd, rounding up may result in reading past the end of the source data. Fixes http://bugs.debian.org/637258 . Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-03-21bug fix for r6xx/r7xx UMSmatthew green
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-28xv: fix height alignments for U/V planesDave Airlie
The kernel CS checks showed we were incorrectly aligning the U/V allocations for when we used them as texture sources. This should fix https://bugs.freedesktop.org/show_bug.cgi?id=34567 Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-23Xv: use aligned height to calculate Xv buffer sizeAlex Deucher
Make sure it's large enough for the tiling mode so the CS checker doesn't complain. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=34567 Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-15fix Xv on pre-r6xx asicsAlex Deucher
broken by: a9c1358099:"Xv: fix textured video alignment" Reported by: Artur Skawina <art.08.09@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-11Xv: fix textured video alignment harderAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-11Xv: fix textured video alignmentAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-01-18Fix KMS textured video leaks (bug #33193).Michel Dänzer
v2: Fix radeon_legacy_free_memory() argument type error pointed out by Marton Balint, refactor video memory freeing logic into helper function. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=33193 .
2010-10-13evergreen: increase XV_CRTC Xv attribute rangeAlex Deucher
Cover all 6 possible crtcs.
2010-10-07fix the non-kms buildAlex Deucher
Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=30685
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-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-16r3xx-r5xx Xv: disable bicubic filtering by defaultAlex Deucher
- makes Xv more consistent with r1xx/r2xx/r6xx/r7xx - Xv attributes like brightness, contrast, hue, etc. only work when bicubic is disabled. - avoids performance issues on some systems when sampling from textures in GART with kms. - It can be re-enabled with using xvattr Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
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-15Allocate Xv buffers to GTT.Pauli Nieminen
KMS doesn't have acceleration for upload to vram. memcpy/memmove to VRAM directly is very slow (40M/s in benchmark) which causes visible problems to video. Allocating video buffer in GTT will give good performance (350-450M/s) for memmove operation. This is nice performance boost for Xv under KMS. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2010-01-22Remove unnecessary checks.Kusanagi Kouichi
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
2009-12-02radeon: Lift hardcoded limit from RADEONQueryImageAttributesKusanagi Kouichi
The dimension of an XvImage is limited to 2048 x 2048 even if an adaptor supports larger image. XvCreateImage and XvShmCreateImage lower the width or height of an image. XvPutImage and XvShmPutImage return BadValue. The cause is that 2048 is hardcoded in RADEONQueryImageAttributes.
2009-11-23radeon: avoid using hw pixmaps when we have little VRAM.Dave Airlie
This patch returns NULL for pixmap creation when we are using mixed pixmaps and the pixmap has a size. The size check is necessary for the front buffer. We add a flag to force pixmap creation for certain pixmaps that need to be hw, like the DRI2 and Xv ones. Idea from Michel and workarounds from Ben Skeggs. v2: add Option "EXALowVRAM" to allow configuring this, value in MBs. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-13radeon: add XV_CRTC attribute for textured videoAlex Deucher
This attribute allows the user to override which crtc is synced with when XV_VSYNC is enabled. This is useful for clone modes where the user can might want to override the default.
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-03KMS: Double-buffer textured video source image upload.Michel Dänzer
In order to avoid stalling on previous frame. OTOH without KMS we can't do this but have to wait for the previous frame to finish rendering.
2009-09-25r600: fix bo accounting for XvAlex Deucher
fixes Xv after changes in: 8f80e37eed3ec028718b4e71bbb9b598847fd94e Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
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-01radeon: reload bicubic Xv texture on VT switchAlex Deucher
fixed bicubic filtering after VT switch or suspend/resume
2009-07-23R6xx/R7xx: clip rendering to destination surface dimensionsAlex Deucher
2009-07-14R3/4/5xx: only upload the bicubic texture onceAlex Deucher
Upload the bicubic texture once during textured video init rather than once per frame. Suggested by Michel Daenzer on IRC.
2009-07-14R3/4/5xx: fix bicubic Xv filtering with KMS changesAlex Deucher
fixes bug 22730
2009-07-06radeon: port to new space checking in libdrm interfaceDave Airlie
This uses a new libdrm interface which shares code with mesa. It also fixes the bo to flush when full instead of never flushing. It survives gtkperf -a here which the driver didn't before now
2009-07-02radeon/kms: add textured video BO size checksDave Airlie
2009-06-30radeon: initial preparation for kms patch.Dave Airlie
This patch contains most of the changes to the EXA and texture video accel code. It adds a few bits of pixmap support but doesn't actually do anything useful KMS yet. Testing this should not have any regressions over what we have already, biggest worries are r6xx, I've fixed a textured video one, but no idea what other might lurk It won't build against libdrm radeon yet either
2009-04-21Tex vid: fix top clippingAlex Deucher
2009-04-21Tex vid: rework part 2Alex Deucher
- use pPriv->w/h directly for tex coords - take src x/y offset into account when calculating tex coords - when copying data, only optimize for y clipping. In order to deal with the x clipping optimization, the copy routines or tex coords would need to be fixed. This should fix clipping problems with the current code.
2009-04-20Tex vid: cleanup and unify common codeAlex Deucher
2009-04-17R3xx/R5xx: only apply Xv attributes if bicubic is disabledAlex Deucher
Provides consistent output
2009-04-17Tex vid: remove remnants of XV_HWPLANARAlex Deucher
no longer needed as bicubic is the only thing that uses the old csc code.
2009-04-17R5xx: add shader-based cscAlex Deucher
- native planar support - Xv attributes
2009-04-17tex vid: fix attribute setup typo for XV_COLORSPACEAlex Deucher
2009-04-17R6xx/R7xx: implement Xv attributesAlex Deucher
- brightness, contrast, hue, etc. - TODO: implement gamma