Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
make more thing static.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This merges these two functions into textured video code.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This is always 0 now.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
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>
|
|
|
|
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
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 .
|
|
|
|
Use the Xv version as it takes into account the area
covered by the op rather than just picking the largest
crtc area.
|
|
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.
|
|
Upload the bicubic texture once during textured video init
rather than once per frame. Suggested by Michel Daenzer on
IRC.
|
|
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
|
|
- 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.
|
|
no longer needed as bicubic is the only thing that uses
the old csc code.
|
|
- brightness, contrast, hue, etc.
- TODO: implement gamma
|
|
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.
|
|
|
|
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).
|
|
|
|
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.
|
|
automatically turns the filter on and off as appropriate.
|
|
|
|
|
|
video, including bicubic filtering.
|
|
|
|
work yet...
|
|
|
|
As has been done with xf86-video-intel, replace all CARD* datatypes with
uint*_t datatypes available from stdint.h.
|
|
|
|
|
|
Based on the kdrive ati video code by Eric Anholt.
R3xx/R4xx still have some clipping issues in certain situations
|
|
- 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
|
|
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.
|
|
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.
|
|
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.
|
|
coresponding theatre module
|
|
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
|
|
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)
|
|
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.
|
|
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.
|