Age | Commit message (Collapse) | Author |
|
Fixes compiler warning with glamor disabled:
radeon_dri2.c: In function 'radeon_dri2_exchange_buffers':
radeon_dri2.c:732:19: error: unused variable 'info' [-Werror=unused-variable]
RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(screen));
^~~~
|
|
All callers were passing TRUE.
(Ported from amdgpu commit ea19a5207054bb159fc7fb6d88e0ceb10c3da010)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This way, the MSC will continue ticking at the rate of (the last mode
which was enabled for) that CRTC, instead of the client running
unthrottled.
(Ported from amdgpu commit 3109f088fdbd89c2ee8078625d4f073852492656)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
otherwise client would wait for reply forever and desktop appears hang.
Signed-off-by: Flora Cui <flora.cui@amd.com>
(Ported from amdgpu commit fb06fb814700a47464abd756e1111dcc76d0d776)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
drm_queue_handler just puts the event on the signalled list; without
calling drm_queue_handle_deferred, actual processing of the event may be
delayed indefinitely, e.g. until another event arrives from the kernel.
This could result in DRI2 clients hanging during DPMS off.
Fixes: ba83a866af5a "Add radeon_drm_handle_event wrapper for
drmHandleEvent"
(Ported from amdgpu commit 09be74a3d1dd9604336d9a27f98d132b262dcbaf)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
To make sure the client can't use the shared pixmap storage for direct
rendering first, which could produce garbage.
Bugzilla: https://bugs.freedesktop.org/109235
(Ported from amdgpu commit ebd32b1c07208f8dbe853e089f5e4b7c6a7a658a)
|
|
When an async flip is performed, and TearFree is enabled on the CRTC
used for timing, we schedule a vblank event for completing the page
flip. The DRM event queuing code treated this event like a vblank event,
but it needs to be treated like a page flip event.
(Ported from amdgpu commit e2c7369cae65069aa93eed1c0b678f975ce5c274)
|
|
And make radeon_drm_queue_handler not directly accessible outside of
radeon_drm_queue.c.
(Ported from amdgpu commit 0148283984c77f7a6e97026edc3093497547e0a4)
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Shorter and sweeter. :)
(Ported from amdgpu commit e8e688f3852fb06b0c34ed5bce47c9493bcd1613)
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Instead of only the BOs.
This matches what amdgpu does, and fixes issues with DRI2 page flipping.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Inspired by amdgpu. This avoids various issues due to a GEM handle
lifetime conflict between us and Mesa with current glamor.
Bugzilla: https://bugs.freedesktop.org/105381
Tested-by: Konstantin Kharlamov <hi-angel@yandex.ru>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Inspired by amdgpu, preparation for the following change. For now, this
is mostly a wrapper around struct radeon_bo, no functional change
intended.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Throttling should be handled by the client-side drivers.
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
(Ported from amdgpu commit 8a34a8149860ac15e83ccdbd8d9a527d8d3e5997)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We would store the NULL pointer and continue, which would lead to a
crash down the road.
Bugzilla: https://bugs.freedesktop.org/106293
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Missing this apparently didn't cause any ill side effects, only a bit of
confusion when looking at xtrace's of DRI2 clients.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
And use this to determine when we cannot use page flipping for DRI
clients. We previously did this based on whether the HW cursor cannot
be used on at least one CRTC, which had at least two issues:
* Even while the HW cursor cannot be used, no SW cursor may actually be
visible (e.g. because all cursors are disabled), in which case we can
use page flipping for DRI clients anyway
* Even while the HW cursor can be used, there may be SW cursors visible
from non-core pointer devices, in which case we cannot use page
flipping for DRI clients anyway
(Ported from amdgpu commit 69e20839bfeb3ee0b0a732d72de0a32d6c5435fc)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
xserver 1.13.0 was released on September 6th, 2012, almost 5 years ago.
This allows cleaning up a bunch of backwards compatibility code.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Even if TearFree is enabled for the CRTC we're synchronizing to.
v2:
* Move manpage hunk here from previous change.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> # v1
|
|
Allows cleaning up the code considerably.
v2:
* Fix "drmWaiVBlank" typo, add blank line for readability (Slava Abramov)
* Rename in/out sequence parameters to "target_seq" and "result_seq",
hopefully that will be clearer.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> # v1
|
|
Simplifies the code slightly.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
As long as the CRTC we're synchronizing to doesn't.
v2:
* Remove redundant checks from can_exchange which still prevented DRI2
page flipping
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
To reduce code duplication between DRI2 and Present. No functional
change intended yet.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for following change, no functional change intended.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This brings us closer to amdgpu.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This brings us in line with amdgpu and prepares for the following
change, no functional change intended.
(Ported from amdgpu commit e463b849f3e9d7b69e64a65619a22e00e78d297b)
v2:
* Be more consistent with the amdgpu code, which should make porting
the following change to amdgpu easier
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Option "TearFree" now sets the default value of the output property.
See the manpage update for details.
TearFree is now enabled by default for outputs using rotation or other
RandR transforms, and for RandR 1.4 slave outputs.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes warning about misleading indentation from recent versions of gcc:
../../src/radeon_dri2.c: In function ‘radeon_dri2_create_buffer2’:
../../src/radeon_dri2.c:224:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (flags & RADEON_CREATE_PIXMAP_TILING_MACRO)
^~
../../src/radeon_dri2.c:227:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
if (aligned_width == front_width)
^~
No functional change intended.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes issues when mixing rotation and page flipping with current xserver
Git master.
(Ported from amdgpu commit decabd574f90d3df397c80ec931b3fde8a4afb49)
|
|
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
(Ported from amdgpu commit 73c8dc000ad6b2b53ba3aa7155f5e8f6b55623b7)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We need that in radeon_dri2_drawable_crtc as well for priv->vblank_delta
to work as intended.
radeon_dri2_get_msc was already doing this.
Fixes hangs in some cases when using VDPAU via DRI2 and moving the
window between CRTCs.
(Ported from amdgpu commit abd1a7901c95e4bc78415cf1b7923623b9177152)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
So it can be used outside of the DRI2 code.
(Ported from amdgpu commit 5518bf5d793439b5bab369e5fc18de9a4a3b9dd6)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
There were two static helpers for the same purpose. Consolidate them
into a single inline helper which can be used anywhere.
(Ported from amdgpu commit 641f4647b7f51dfd2da330376cd10fa9702b6423)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Should make the radeon_drm_queue_alloc error handling clearer, and gets
rid of a compile warning about it returning NULL.
Reviewed-by: Alexandre Demers <alexandre.f.demers@gmail.com>
|
|
Will be used by the next change. No functional change here.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
If the memory for an entry was allocated at the same address as that for
a previously cancelled entry, the handler could theoretically be called
prematurely, triggered by the DRM event which was submitted for the
cancelled entry.
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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 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>
|
|
Fixes corrupted display and hangs when switching between DRI2 and DRI3
fullscreen apps, e.g. a compositor using DRI3 and a fullscreen app using
DRI2 or vice versa.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes regression introduced in commit
76c2923ac5c7230a8b2f9f8329c308d28b44d9c0 ("DRI2: Split out helper for
getting UST and MSC of a specific CRTC").
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
It doesn't point to the memory of the newly allocated BO. Fixes crash
running piglit with Option "ShadowPrimary" enabled.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Its value was always the same as that of the PixmapRec devKind member.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Now we can share pixmaps with no struct radeon_bo via DRI2.
Fixes VDPAU video playback freezing when using an OpenGL compositor with
DRI3 enabled.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89755
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Nick Sarnie <commendsarnex@gmail.com>
|