Age | Commit message (Collapse) | Author |
|
Shorter and sweeter. :)
(Ported from amdgpu commit e8e688f3852fb06b0c34ed5bce47c9493bcd1613)
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Allows removing drmmode_clear_pending_flip and the pending_dpms_mode
field and cleaning up the code considerably.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
At least with older kernels, the flip may never complete otherwise,
which can result in us hanging in drmmode_set_mode_major.
Fixes: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/1577170
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
1.9.0 was released in August 2010.
We were already unintentionally relying on things not available in 1.8
for at least a year, and nobody has complained.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The allocation of the adapters should use the correct sizeof (even if
allocating an array of pointers).
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
(ported from amdgpu commit db3bb2061b9ac16b0922d9afae99874820356a04)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This patch folds the two for loops from radeon_pick_best_crtc() into
one to reduce the LOC and make the routine easier to read.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
(ported from amdgpu commit 3055724aef76a624718f26d5f0f9e9d567ffbcfb)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This mirrors the DRI3 implementation in xserver. Fixes VDPAU video
playback hanging when moving the window between CRTCs.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66384
(Ported from amdgpu commit 63948ea091a9b324327ade7ec4fc5d67ca7e6f6f)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Thomas DeRensis <tderensis@gmail.com>
|
|
This creates adaptors using glamor if possible.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This causes problems if glamor doesn't have Xv support
enabled. I just noticed that Dave has a better version,
so use that instead.
This reverts commit 4fc1fa920584ace2c84d75af82d06962d0c84ec8.
|
|
v2: guard new glamor Xv bits with USE_GLAMOR
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
This merges the removal of the UMS code and subsequent simplifications.
Hell yes.
* origin/kms-only: (24 commits)
radeon: fix radeonchipsets properly
radeon: fix RADEONChipsets
radeon: migrate remainder of radeon_driver.c to rest of driver
radeon: avoid including large static struct twice.
radeon: drop some more unused macros/inlines
radeon: drop another unused struct member.
radeon: more unused stuff
radeon: drop cardType shouldn't matter to userspace.
radeon: drop radeonGetPixmapOffset
radeon: move more functions into texture video
radeon: drop legacy memory, merge into radeon video
radeon: drop unused txoffset vars.
radeon: drop vb_mc_addr, not needed anymore
radeon: drop offset member of r600 accel object
radeon: move macros into radeon.h
radeon: drop more wrapper macros.
radeon: further macro cleanups.
radeon: make exa copy funcs static.
radeon: drop FUNC_NAME macro and ONCE_ONLY stuff
radeon: drop radeon_commonfuncs.
...
Conflicts:
configure.ac
|
|
just fallback to the old behaviour on older servers.
should fix: https://bugs.freedesktop.org/show_bug.cgi?id=51388
Review-over-irc: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.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>
|
|
Drop separate header file, there isn't many separate macros now.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
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: Michel Dänzer <michel.daenzer@amd.com>
|
|
We don't know what the CRTC state is.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=49761 .
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
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>
|
|
since the driver would call RRFirstOutput without checking if randr has
been enabled, and it would crash in privates code.
reported by vereteran on #radeon
Signed-off-by: Dave Airlie <airlied@redhat.com>
Acked-on-irc-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
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>
|
|
See https://bugs.freedesktop.org/show_bug.cgi?id=39696 .
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
|
|
Where's that brown paper bag? :}
|
|
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 .
|
|
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=15391
|
|
If the fbLocation was at an address >32 bits, we'd fail.
Change fbLocation to uint64_t and properly cast when needed.
|
|
Column order is wrong on big endian systems, primarly because of a
bits / bytes mix up with the bpp variable. Fix tested with r100 and
r300, screen depth 16 and 32 with YV12 and YUY2 (overlay, textured video),
RGBA and RGBT (overlay).
Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=29041
Signed-off-by: Heikki Lindholm <holin@iki.fi>
|
|
Fixes deprecation warnings with xserver master and should also work with older
xservers.
|
|
It's already exposed and used by exa and Xv and has
the same functionality. radeon_covering_crtc() can
be dropped eventually.
|
|
This patch is mostly a port over of Intel ddx code for
MSC support. It needs a radeon KMS module with version
2.4 which has the query for hw crtc id.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
It has no overlay or 3D engine.
fixes fdo bug 27528
|
|
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>
|
|
I think these can only really work in VRAM, though right now there's probably
nothing to prevent them from getting evicted...
|
|
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>
|
|
Use the Xv version as it takes into account the area
covered by the op rather than just picking the largest
crtc area.
|
|
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.
|
|
Requires at least xserver 1.7 to work properly.
Also make sure the front buffer is and stays tiled if colour tiling is enabled.
|
|
Upload the bicubic texture once during textured video init
rather than once per frame. Suggested by Michel Daenzer on
IRC.
|
|
|
|
- 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.
|