Age | Commit message (Collapse) | Author |
|
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>
|
|
Also slightly clean up the error handling in radeon_scanout_do_update.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94614
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This enables tiling for scanout BOs used for TearFree / ShadowPrimary,
and simplifies the code a little.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94214
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
If it's available, Xorg calls it on each mode configuration change. It
does what xf86_reload_cursors does (and more), so we don't need to call
the latter anymore.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Flipping doesn't interact correctly with SW cursor: A flip makes the SW
cursor disappear. It will only appear again when the cursor is moved,
but it will be surrounded by corruption, because the SW cursor code
will restore stale screen contents at the old cursor location before
drawing the cursor at the new location.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
And add a check for RandR 1.4 multihead.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The callers were using 0 for the tiling flags, causing surfaces to be
incorrectly treated as linear. This issue was causing corruption on Cayman
just after login with GNOME3. The kernel was rejecting the cs in
drmmode_copy_fb due to invalid texture pitch.
Signed-off-by: Ryan Kennedy <Ryan.Kennedy@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Sync-to-vblank works fine with rotation. We're still checking for
rotation in radeon_present_check_flip.
Returning NULL from here resulted in the xserver present code falling
back to the fake CRTC running at 1 fps.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Without this, drmmode_set_mode_major may just re-set the FB for the
last flipped BO, in which case the display will probably freeze.
Reproduction recipe: Enable rotation while a fullscreen client is
flipping.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Support varies by xserver version:
< 1.12: No support for the driver handling rotation/reflection
1.12-1.15: Support for driver handling rotation/reflection, but there's
a bug preventing the HW cursor from being visible everywhere
it should be on rotated outputs, so we can only support
TearFree for reflection.
>= 1.16: While the bug above is still there (fixes pending review),
the driver can force SW cursor for rotated outputs, so we
can support TearFree for rotation as well.
v2: Don't set crtc->driverIsPerformingTransform after xf86CrtcRotate if
it wasn't set before. Fixes breaking rotation with TearFree disabled.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
|
|
We were already relying on pScrn->pScreen being non-NULL in some cases,
which is supposedly always true ever since this function is no longer
getting called from ScreenInit.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We require xserver >= 1.8, which was already at version 3.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
If we set a mode while a flip is pending, the kernel driver may program
the flip to the hardware after the modeset. If that happens, the hardware
will display the BO from the flip, whereas we will assume it displays the
BO from the modeset. In other words, the display will most likely freeze,
at least until another modeset.
Prevent this condition by waiting for a pending flip to finish before
setting a mode.
Fixes display freezing when setting rotation or a transform with
TearFree enabled.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This allows for a minor simplification of the code.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes the following problem:
With DRI3 enabled, run glxgears with LIBGL_DRI3_DISABLE=1, make it
fullscreen and press Escape while it's still fullscreen. This could
result in dri2_flipping not getting cleared, spuriously preventing apps
using DRI3 from flipping.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
No longer necessary now that radeon_drm_queue_handler can handle
e->handler == NULL.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Keep them around until the DRM event arrives, but then call the abort
functions instead of the handler functions.
This is a prerequisite for the following fix.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
If we were asked to create a shareable pixmap, it doesn't make sense
to return a pixmap which isn't shareable. Doing so caused trouble down
the line such as a crash with older versions of glamor when trying to
use GLX pixmaps of bpp < 32 via DRI2.
Signed-off-by: JimQu <jim.qu@amd.com>
(ported from amdgpu commit 2fcb7dadd3c71cd405cbbaafc777697538ca9c29)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The next commit will call the former from the latter. No functional
change.
Signed-off-by: JimQu <jim.qu@amd.com>
(ported from amdgpu commit 5269a2228bff6023c1a7f3e8534027e1d7addc25)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The pci_dev parameter can never be NULL since we only support KMS.
Reported-by: Tom St Denis <tom.stdenis@amd.com>
(ported from amdgpu commit 6e42c58375a4c3229da93c27bbd104af145c6163)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This disables query of disabled pipes for drmWaitVBlank on X start
Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com>
(ported from amdgpu commit 4eb9cedca080b30c57ded349a397620ee7d0cd46)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
It may be disabled in the Xorg build, either explicitly or because the
xshmfence library isn't available.
(ported from amdgpu commit 1d0b0c1794e65e581a48aa9fb19679d928d82a5d)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
(ported from amdgpu commit ea558e645786b08d75307716036045170e97b43e)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Failing to do this was resulting in the kernel driver unnecessarily
leaving open the possibility of CPU access to those BOs.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Currently, Xorg will only transform the cursor as of the first time the
cursor image changes after a transform is set.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80678
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes xrandr (XRRGetOutputPrimary) not reporting any output as primary
after startup.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Instead of just "radeon", it's now e.g. "KAVERI @ pci:0000:00:01.0".
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes unresolved symbols on some systems.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93105
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Acceleration is required even for display offloading. Trying to enable
display offloading without acceleration resulted in a crash.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
When it's not available, it's safe to call down to the glamor
DestroyPixmap hook instead.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes double-free regression introduced by commit 875ad48e ("Simplify
drmmode_set_mode_major() and avoid leaking memory.").
|
|
Remove the depth_pixmap variable from the function and clear
out any dead/odd behaviour that results.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
(ported from amdgpu commit 6000aef4e2f0a121b94023484406fb6f04688f74)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We were printing an error message, but not propagating the failure. That
would probably lead to trouble down the road.
(ported from amdgpu commit 21e72fb2418b5cc7fc849a9cf951186e209036b0)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
drmmode_crtc_scanout_create just needs to call
drmmode_crtc_scanout_allocate when scanout->bo is NULL.
This makes it clearer to the reader / compiler that
drmmode_crtc_scanout_create doesn't dereference scanout->bo when it's
NULL.
(ported from amdgpu commit 8da1d0c870e1081d77925807d6e3bbc61a23f54f)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Rotation currently doesn't work without acceleration (doesn't actually
rotate with Option "NoAccel", crashes with Option "AccelMethod" "none"
or when glamor fails to initialize) and would probably be too slow
anyway.
v2: Also remove now dead code checking for ShadowFB from
drmmode_crtc_scanout_allocate().
(ported from amdgpu commit dc40582d5ff94d812cbc08f95cf14b80cd0f410d)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The function would leak the memory allocated for output_ids. This
patch addresses that as well as simplifies the logic somewhat.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
(ported from amdgpu commit 460560502a1bdf26d06f3c30df46fa9f28ffb9e5)
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>
|
|
If the get_msc() call fails for any reason we should avoid updating the
vblank counter delta with undefined data.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> (minor fixups)
(ported from amdgpu commit 8823c3d4c6db70cff7699b31088f2d92db8faaf4)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This fixes a bug where running the card out of PPLL's when hotplugging
another monitor would result in all of the displays going blank and
failing to work properly until X was restarted or the user switched to
another VT.
[Michel Dänzer: Pass errno instead of -ret to strerror()]
Signed-off-by: Stephen Chandler Paul <cpaul@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Fixes various problems when rotation is specified in xorg.conf.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92475
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
When using glamor acceleration, the pixmap's header has to have a height
that matches exactly what the actual height is minus the GPU memory
alignment. Otherwise CRTCs scanning out from the main scanout buffer
(e.g. every CRTC that isn't rotated or transformed in some way) won't
always work. This results in a bug where rotating one monitor in a
multi-monitor setup won't always work properly. Easiest way to reproduce
this:
- Have two monitors (I've gotten this working with a 1920x1080 and
1280x1024, along with two 1920x1080s)
- Rotate one of them from 0° to 90°, then rotate the same monitor from
90° to 180°. The monitor that hasn't been rotated won't properly
update, and will stay on a blank screen
This doesn't seem to make any difference when using EXA for
acceleration.
Compared to Stephen Chandler's patch, this drops the height alignment
in most places and only keeps it where it's really necessary.
Reported-and-Tested-by: Stephen Chandler Paul <cpaul@redhat.com>
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>
|
|
Waiting for vblank interrupts works fine with rotated CRTCs. The only
case we can't handle with rotation is page flipping, which is handled
in can_exchange().
This fixes gnome-shell hanging on rotation, probably because
amdgpu_dri2_get_msc returned MSC/UST 0 for rotated CRTCs.
(Ported from amdgpu commit 7b3212e33cd36fb6f122774df27b56ec4e1a22b8)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Add Option "DRI" to allow selection of maximum DRI level.
This allows the user to select the maximum level of DRI
implementation to use, DRI2 or DRI3. It replaces the old
option "DRI3" which had exactly the same purpose, but
differs from the method used in both intel ddx and nouveau ddx.
Make this consistent before a new stable driver is released.
v2: Retain handling of old Option "DRI3" for backwards
compatibility, but Option "DRI" will take precedence
over "DRI3" if both are provided.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|