Age | Commit message (Collapse) | Author |
|
drawable.
This is commit is removing obsolete switch done in
xf86-video-ati at sha 61d0aec40e2521488c2fe43e7a6823e5c87d94d7: video: add option to include disabled CRTCs in best CRTC search
This is not required anymore as with commit done in
xorg-server at sha 5c5c1b77982a9af7279a90bc3c2be48adaa9c778: present: Add Present extension
That in case of lack of crtc is using fake_crtc with render 1Hz frequency
When consider_disabled is removed then amdgpu_pick_best_crtc is doing the same what rr_crtc_covering_box is doing
so it can be reimplemented to reuse that function.
Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
Signed-off-by: Shashank Sharma <contactshashanksharma@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
All callers were passing TRUE.
Reviewed-and-tested-by: Flora Cui <flora.cui@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.
Reviewed-and-tested-by: Flora Cui <flora.cui@amd.com>
|
|
otherwise client would wait for reply forever and desktop appears hang.
Signed-off-by: Flora Cui <flora.cui@amd.com>
Acked-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@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: 739181c8d3334 "Add amdgpu_drm_handle_event wrapper for
drmHandleEvent"
Reviewed-by: Aaron Liu <aaron.liu@amd.com>
Tested-by: Aaron Liu <aaron.liu@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
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
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.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
And make amdgpu_drm_queue_handler not directly accessible outside of
amdgpu_drm_queue.c.
Acked-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
(Ported from radeon commit 3dcfce8d0f495d09d7836caf98ef30d625b78a13)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Shorter and sweeter. :)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
[ Michel Dänzer:
* Require Xorg >= 1.19.99.1 for depth 30, otherwise it can't work with glamor
* Update manpage, per radeon commit
574bfab4bf1fcd95163a8f33cea2889189429d30 ]
Reviewed-by: Alex Deucher <alexander.deucher@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
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.
(Ported from radeon commit 5cdd334b3402c2431deb3a87a8d04ef590da53ee)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Even if TearFree is enabled for the CRTC we're synchronizing to.
(Ported from radeon commit d314cbfb228bb4b8762714f98d0c114a8ee3f061)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Allows cleaning up the code considerably.
(Ported from radeon commit 99f1d7a474af3683fe1a66f50c0bb8935478ff0a)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Simplifies the code slightly.
(Ported from radeon commit 49cc61ab970ee28d4509b4e2dd0a57165136889f)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
As long as the CRTC we're synchronizing to doesn't.
(Ported from radeon commit 5309bde0c4e28adf2b167191c6d7011a19e31eed)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
To reduce code duplication between DRI2 and Present. No functional
change intended yet.
(Ported from radeon commit 9bc3eef74452d924f9101c024f66ad9b14c404c8)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for following change, no functional change intended.
(Ported from radeon commit aff267ee36cc6a703a532f91f82adc1ba1425ff3)
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.
(Ported from radeon commit 58cd1600057e41aade0106d4acf78e23eac6e44f)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
(Ported from radeon commit 481394e3c9f9f7d88bb66fe9ae8834c87952a8ab)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
And drop compatibility code for older versions.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
(Ported from radeon commits 1106b2f773ad0611c729b27f4c192a26b43ef1e7
and 5fea5ef2f07eee4a0f94baab427010b936f1d4b4)
v2:
* Squash in radeon fix for TearFree regression
* Remove preprocessor guards for compatibility with libdrm < 2.4.72
(Emil Velikov)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Should make the amdgpu_drm_queue_alloc error handling clearer, and gets
rid of a compile warning about it returning NULL.
(Ported from radeon commit a37af701768b12d86868a831a79f1e02ee4968cf)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
We need that in amdgpu_dri2_drawable_crtc as well for priv->vblank_delta
to work as intended.
amdgpu_dri2_get_msc was already doing this.
Fixes hangs in some cases when using VDPAU via DRI2 and moving the
window between CRTCs.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes issues when mixing rotation and page flipping with current xserver
Git master.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
So it can be used outside of the DRI2 code.
v2: Keep pixmap refcnt increment in amdgpu_dri2_create_buffer2 (Qiang Yu)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Qiang Yu <qiang.yu@amd.com> (v1)
|
|
There were two static helpers for the same purpose. Consolidate them
into a single inline helper which can be used anywhere.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Qiang Yu <qiang.yu@amd.com>
|
|
Will be used by the next change. No functional change here.
(Ported from radeon commit 90a915c62d012e99193833aecc93974e68880c60)
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.
(Ported from radeon commit 4693b1bd5b5c381e8b7b68a6f7f0c6696d6a68df)
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.
(Ported from radeon commit e592f32f8b5f5873fcc18b10a69dd5e4ccf11073)
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.
(Ported from radeon commit 7f3d0780ca65a90117c2a61362dbc0899bd9c0b0)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This allows for a minor simplification of the code.
(Ported from radeon commit f5d968cbba3c9b7ec202161f2157d8d64778c817)
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.
(Ported from radeon commit e87365117acbd80b7d80fbb5eb30890ef7153291)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Now we can share pixmaps with no struct amdgpu_buffer via DRI2.
Fixes VDPAU video playback freezing when using an OpenGL compositor with
DRI3 enabled and mpv VAAPI hardware decoding with OpenGL output.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89755
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93804
(ported from radeon commit f8b0f23e9f4af9f9097ee5e72d53b45173163c41)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We can't create our own struct amdgpu_buffer representation in this case
because destroying that would make the GEM handle inaccessible to glamor
as well. So just get the handle directly via dma-buf.
(ported from radeon commit 391900a670addec39515f924265bfa9f8bfa9ec0,
extended to cache BO handles in the private for non-DRI3 pixmaps as
well)
v2: Swap whole pixmap privates instead of just BOs in
amdgpu_dri2_exchange_buffers to avoid invalidating cached BO handles
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
(inspired by radeon commit 7b4fc4a677d252d01c2bf80d162bc35814059eaa)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77810
(ported from radeon commit c84230d686c078aac1dc98d82153f8b02521b2e1)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Use pAMDGPUEnt->fd everywhere instead.
Reviewed-by: Jammy Zhou <Jammy.Zhou@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>
|
|
Based on radeon commit 49f5b0bc301414df049e00d226034e3d6e56421b
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.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Based on radeon commit 32b003cb7657e07d5af6338ad44d768eda87fd33
> This is step one towards MST connector hotplug support,
> it stop caching the mode resources structure, and
> just passes a pointer to it around.
With a few tweaks to match the state of the AMDGPU tree.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@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>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> (minor fixups)
|
|
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
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.
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
|
|
Its value was always the same as that of the PixmapRec devKind member.
(Cherry picked from radeon commit ed401f5b4f07375db17ff05e294907ec95fc946d)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
When this option is enabled, most pixmaps (including the screen pixmap)
are allocated in system RAM and mostly accessed by the CPU. Changed areas
of the screen pixmap are copied to dedicated per-CRTC scanout pixmaps
regularly, triggered by the vblank interrupt.
(Cherry picked from radeon commits ae92d1765fa370a8d94c2856ad6c45d273ec3c69
and 1af044d7eee211fd4b248c236280274a68334da5)
[ Michel Dänzer: Additional adjustements for the amdgpu driver ]
Signed-off-by: Darren Powell <darren.powell@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
(Cherry picked from radeon commits 76c2923ac5c7230a8b2f9f8329c308d28b44d9c0
and d7c82731a8bf3d381bc571b94d80d9bb2dd6e40d)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This is mostly in preparation for Present support, but it also simplifies
the DRI2 specific code a little.
(Cherry picked from radeon commit 6c3a721cde9317233072b573f9502348dcd21b16)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|