summaryrefslogtreecommitdiff
path: root/src/radeon_video.h
AgeCommit message (Collapse)Author
2013-05-29DRI2: adjust MSC by the number of interpolated vblanksIlija Hadzic
Normally, MSC value equals the vblank count of the CRTC on which the drawable resides. However, we are now interpolating vblanks through DPMS-off state, so if the CRTC is turned off at some point, the vlbank count does not change, but MSC does change by the amount that equals the cumulative number of interpolated vblanks. So each time we interact with the CRTC's vblank facility, we have to adjust the vblank counter: in the request, we have to subtract the number of interpolated vblanks from MSC and in the reply we have to add the number of interpolated vblanks to the MSC. This patch only makes the MSC correct when CRTC is on. The subsequent patch will construct the MSC when CRTC is not running. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-01-03DRI2: limit the swap rate when CRTC is in DPMS-off stateIlija Hadzic
If drawable is displayed on a CRTC and relevant CRTC is in DPMS off state, defer the swap by a fixed (hard-coded) time. This patch fixes a bug that caused an application to render at uncontrolled rate when CRTC goes into DPMS "off" state, thus thrashing the GPU and CPU and likely offsetting the power savings achieved by shutting off the display. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.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: 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>
2011-07-14Register XvMC video decoding accelerationChristian König
2011-02-11Xv: fix textured video alignment harderAlex 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-04-16Xv: track vtx_count, is_planar in port privAlex Deucher
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-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-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-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: 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-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-17R6xx/R7xx: implement Xv attributesAlex Deucher
- brightness, contrast, hue, etc. - TODO: implement gamma
2009-04-17r200/r300: implement brightness/contrast/hue/saturation/gamma controls for ↵Roland Scheidegger
textured video This implements contrast/brightness/hue/saturation controls for r200/r300 plus gamma (same gamma value for all channels used though separate values would be trivial) control for r300. Some issues left: - only r200/r300 - still can't be combined with bicubic - controls will silently cease to work if the format used is packed and not planar (except for rv250) - gamma range is from 100 to 10000 corresponding to 0.1 and 10.0 like used in overlay. However, usable range is far smaller. Over 2.0 picture gets dark pretty quickly, and below 0.6 or so black seems to turn into purple (I've verified that even with gamma 1.0 black actually often seems to be RGB 1/0/1 so this explains this since that gets amplified by low gamma values - not sure if this is a rounding problem somewhere, bogus reference values or is somehow expected). - gamma adds a bit too many instructions for my taste (7) though the alternative (3 texture lookups + some swizzling instructions) doesn't seem any better.
2009-04-07radeon: fix Xv vsync for multi-headAlex Deucher
2009-03-24don't convert planar yuv to packed for r300Roland Scheidegger
uses 3 textures for planar yuv and does yuv->rgb conversion in the shader. small performance advantage, but manual texture cache setting is necessary otherwise it may be measurably slower (but probably not relevant) in some cases. Unlike some other drivers, using MADs instead of DP3s, since this requires less instructions due to no MOVs are required, the end result is the same though the constants need to be different. Use of this is user settable for now (XV_HWPLANAR attrib).
2008-12-05Make VSync for EXA and Xv configurableAlex Deucher
2008-12-04First pass at tear-free accelAlex Deucher
if the dest pixmap is the front buffer, stall the pipe until the vline is outside the active area. For EXA, pick crtc based on the larger mode area; ideally we'd have one pixmap per crtc. For Xv, use dst window area to determine crtc.
2008-12-03Change the XV_BICUBIC attribute to a tristate, where the third statePierre Ossman
automatically turns the filter on and off as appropriate.
2008-08-25Convert randr, Xv to a common allocatorAlex Deucher
2008-08-25Additional cleanups and re-arragement following bicubic mergeAlex Deucher
2008-08-25Merge upstream changes to vertices, and also add Xv attributes for textured ↵Corbin Simpson
video, including bicubic filtering.
2008-08-25Fix constants.Corbin Simpson
2008-08-25Upload pixel shader to card for r5xx. This was ridiculous. Also it doesn't ↵Corbin Simpson
work yet...
2008-08-25Allocate memory for the bicubic filter texture.Corbin Simpson
2008-05-12Replace CARD{8,16,32} with uint{8,16,32}_tMatt Turner
As has been done with xf86-video-intel, replace all CARD* datatypes with uint*_t datatypes available from stdint.h.
2008-02-27RADEON: fix clipping for textured videoAlex Deucher
2008-02-26RADEON: Convert textured video to use pipelined uploadsAlex Deucher
2008-02-23RADEON: add textured video support for r1xx-r4xx radeonsAlex Deucher
Based on the kdrive ati video code by Eric Anholt. R3xx/R4xx still have some clipping issues in certain situations
2007-08-16RADEON: fix Xv clipping and overlay sourcingAlex Deucher
- Basically just copied from the intel driver. I'm planning to push this to the server soon, but add it now to get things working and to provide compat for older servers. - Overlay crtc source control attribute now called XV_CRTC The old attribute XV_SWITCHCRT has been removed. If anyone cares, we can add it back as an alias to XV_CRTC XV_CRTC: -1 auto, 0 crtc0, 1 crtc1
2006-12-08radeon: avoid unnecessary OUTPLL/INPLL calls when displaying videoRoland Scheidegger
It is not necessary to always emit a OUTPLL/INPLL pair when we display a video frame. On some chips there are erratas for which the workarounds cause a 10ms delay by those calls. This is related to #5876 though those affected may suffer from other slowness issues too.
2006-11-29radeon: bug #1462, predownscale to make HD video work.Roland Scheidegger
Use the overlay scaler's predownscale capability to make videos with large horizontal resolution work if it exceeds the scaler buffer width. Make the scaler buffer width user-configurable since we don't know it for all chips, and using predownscaling may otherwise reduce quality even if it wouldn't be needed. This should fix bug #1462.
2005-09-11Add support for EXA to the radeon driver. Building EXA and XAA support isEric Anholt
controlled at compile time, plus the runtime option of Option "AccelMethod" "EXA" or "XAA". The XAA support appears to remain as before, while the EXA pieces need just a little more polishing. Notable features: - Render acceleration working on Radeon 100 and 200-series with DRI on. - DRI works with EXA Notable issues: - DGA disabled in the EXA case. - Backbuffer moves disabled in the EXA case. - No textured XVideo. - MMIO render acceleration is close but still has some issues. - Memory pressure while using Composite is really troublesome with DRI on. This patch is based on an initial patch by Zack Rusin, with significant work by Benjamin Herrenschmidt and myself.
2005-04-17Use the theatre_detect to determine the chip ID and then load theBogdan Diaconescu
coresponding theatre module
2004-10-03Modified:Vladimir Dergachev
xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.[c,h] xc/programs/Xserver/hw/xfree86/drivers/ati/theatre.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h Port the rest of GATOS Radeon-specific code. Remove "checkpoint" noise from logs. Test with AIW Radeon 7500
2004-10-03Modified:Vladimir Dergachev
xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.[c,h] xc/programs/Xserver/hw/xfree86/drivers/ati/theatre.c Detect and initialize Rage Theatre (RT100)
2004-10-02Modified:Vladimir Dergachev
xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.[c,h] xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_vip.c Add VIP bus access code, hook it into initialization system.
2004-10-02Modified:Vladimir Dergachev
xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_mm_i2c.c Add code to access and initialize multimedia i2c bus. Hook it up.