Age | Commit message (Collapse) | Author |
|
We get multiple udev events for actions like docking a laptop into its
station or plugging a monitor to the station. By consuming as many
events as we can, we reduce the number of output re-evalutions.
It depends on the timing how many events can be consumed at once.
(Inspired by xserver commit 363f4273dd4aec3e26cc57ecb6c20f27e6c813d8)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
When a card has import capability it can be an offload _sink_, not a
source and vice versa for export capability.
This went unnoticed sofar because most gpus have both import and export
capability.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
(Ported from xserver commit 94a1c77259ce39ba59ad87615df39b570ffab435)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Otherwise, we may leak screen->pixmap_dirty_list entries if
drmmode_set_scanout_pixmap is called repatedly with ppix != NULL, which
can happen from RRReplaceScanoutPixmap.
(Inspired by xserver commit b773a9c8126222e5fed2904d012fbf917a9f22fd)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
RRReplaceScanoutPixmap may set randr_crtc->scanout_pixmap = NULL before
we get here.
(Inspired by xserver commit f4c37eeee7953df1fe0e3196eda452acf0078e61)
v2: Always return TRUE in the if (!ppix) block.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
|
|
If --enable-maintainer-mode got lost from config.status for any reason,
builds would fail in mysterious ways after changing between different
Git commits.
There are more reasons for dropping it in the automake manual:
https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html
I'm not aware of any reason why --disable-maintainer-mode would ever be
useful with this project.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This cleans up the list of unique chipsets a little further.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Instead of lexically. This makes it more likely for similar generations
to be close to each other in the list of unique chipsets.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Supported since Xorg 1.18.99.2, but buggy until 1.18.99.901.
(Ported from amdgpu commit 7cc04035c55788261cda89a915c433c2add6cad9)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
radeon_set_pixmap_bo sets the tiling flags, so it needs to be called
before radeon_get_pixmap_tiling_flags. Fixes a regression with EXA and
TearFree.
Fixes: 8523a733b6a5 ("Propagate failure from radeon_set_pixmap_bo")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98097
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We were always passing the hotspot position in the X screen coordinate
space, but drmModeSetCursor2 needs it in the CRTC coordinate space. The
wrong hotspot position would cause the kernel driver to adjust the
HW cursor position incorrectly when the hotspot position changed.
(Ported from amdgpu commit d42773eb45baff5933730e26878a0b45fcf07b65)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
(Ported from amdgpu commit 6a1ba044c2b71081e6060d0c096917d6238f2145)
|
|
There's no need to test that same damage again.
(Ported from amdgpu commit a576430526cbc404de64b30e1377a356644e8024)
|
|
We can use the dimensions of the CRTC's mode instead.
(Ported from amdgpu commit ede7f2bcae63be65e05e3029bfe7c742e5978932)
|
|
This makes TearFree work with arbitrary transforms, and makes transforms
work better even without TearFree, with xserver >= 1.12.
(Ported from amdgpu commit bf000ea7ef91f5ecb59fc3c1ab8ed9eddcc0841d)
|
|
Not used by any supported version of xserver.
(Ported from amdgpu commits 1091f28e1fa239ee1a973d84a8376fa4a95d7247
and 5a4d3267ac3823fe58b51b0b9075b82375d7180c)
|
|
All unflip checks apply to flips as well, but not vice versa.
(Ported from amdgpu commit 4d506c23c9a628204fa23607931557b07ada3e31)
|
|
Fixes issues when mixing rotation and page flipping with current xserver
Git master.
(Ported from amdgpu commit decabd574f90d3df397c80ec931b3fde8a4afb49)
|
|
Fixes issues when mixing rotation and page flipping with current xserver
Git master.
(Ported from amdgpu commit 3ed28ce7cd26f89969617ba901ff253091d0d469)
|
|
We failed to do this when going back to scanning out directly from the
screen pixmap.
As a bonus, since we now destroy drmmode_crtc->scanout[] after setting
the new scanout buffer, we may avoid the CRTC turning off intermittently
in this case.
(Ported from amdgpu commit 9c3324715fd395fd486ea341654d78f4f298b97f)
|
|
Initialize ret = FALSE and only set it to TRUE when we've succeeded.
(Ported from amdgpu commit 3bce0519a4008cf87c0e31a7a579e10f5dcdd2f3)
|
|
If we're doing reverse-prime; or doing rotation the main fb is not used,
and there is no reason to add it in this case.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
(Ported from xserver commit 4313122dea0df9affc280ee698e929489061ccc6)
(Ported from amdgpu commit a3ca1500703837cbb8d49c554199a25dea7d5e1e)
|
|
drmmode_set_mode_major() is the only user of drmmode->fb_id and will
create it if necessary.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
(Ported from xserver commit 877453212166fdc912e0d687cdecee11aba563b5)
(Ported from amdgpu commit 9ca1c24235ff5ab2e028333fc326e2eff008c574)
|
|
Fixes memory leak when destroying pixmaps with priv->bo == NULL.
Reported-by: Qiang Yu <qiang.yu@amd.com>
(Ported from amdgpu commit 7f7f9825caf3983902491da27c16d14cd8bf9b7d)
|
|
Reported-by: Qiang Yu <qiang.yu@amd.com>
(Ported from amdgpu commit 397aedafee437c125b8ac1feafb1c3b466842aeb)
|
|
(Ported from amdgpu commits c315c00e44afc91a7c8e2eab5af836d9643ebb88
and 0d42082108c264568e2aadd15ace70e72388bc65)
|
|
This allows deferring shared pixmap updates between different drivers.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We're not using it with older xserver.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
It was only added in xserver 1.15. Fixes build against older xserver.
Reported-by: Pali Rohár <pali.rohar@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
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>
|
|
On multi GPU platform, some screen is created by other GPU DDX.
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
(Ported from amdgpu commit 978242977e5dc905e1d5a46b1b0d34b356c7af26)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes leaking active scanout buffers across a server reset, which also
fixes server reset with glamor and active scanout buffers.
(Ported from amdgpu commit d96dabc71b1b32dc4b422a9633cdd4e0e95da052)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes corruption when using DRI2 PRIME render offloading with the master
screen using this driver.
(Ported from amdgpu commit 0007c2f018ba663303d91d847e7c085269a23062)
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>
|
|
Fixes crash when running a compositor and DRI_PRIME client via DRI2.
Reported-by: Qiang Yu <qiang.yu@amd.com>
(Ported from amdgpu commit b36c77695ba77b59a0ccd868454e3af4fc04d5ff)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
TearFree can now prevent tearing with any possible display
configuration.
Note that there may still be inter-GPU tearing if the primary GPU uses
a different driver.
v2:
* Also test dirty->slave_dst in radeon_prime_scanout_do_update
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> [v1]
|
|
Copy the damaged areas which are still valid in the other scanout pixmap
from there, then only copy the remaining damaged area from the screen
pixmap.
This is slightly more efficient (only needs one Damage record instead of
two, and only needs to copy each screen update across PCIe once with
ShadowPrimary and a discrete GPU), and will be significantly more
efficient for PRIME with the following change.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Will be needed higher up by the following changes. No functional change.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
While we're at it, fix leaking the memory allocated for xRectangles.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Only copy once for each time we update the corresponding scanout pixmap.
This can significantly reduce the bandwidth usage when there are
frequent updates to the screen pixmap.
This initial implementation only works when both the master and slave
screens use this driver.
v2:
* Reduce churn in radeon_prime_scanout_update_handler
* Clear the correct damage in radeon_dirty_update
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
pScreen->isGPU was only introduced in 1.13.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97490
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
If disabling a CRTC had to be deferred due to a pending flip in
drmmode_crtc_dpms, there may no longer be any outputs associated with
the CRTC when we get here. So we have to check for !crtc->enabled and
call drmmode_crtc_dpms in that case as well.
Fixes: 9090309e057d ("Wait for pending flips to complete before turning
off an output or CRTC")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
When overriding the crtc parameter value of the last pending CRTC,
drmmode_clear_pending_flip would work on the wrong CRTC, and the last
pending CRTC's flip_pending flag might never get cleared. This would
prevent that CRTC from properly turning off and back on again.
Fixes: 9090309e057d ("Wait for pending flips to complete before turning
off an output or CRTC")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97392
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Not doing so could break DPMS with TearFree.
Reported-and-Tested-by: furkan on IRC
Fixes: 9090309e057d ("Wait for pending flips to complete before turning
off an output or CRTC")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This further reduces the PCIe bandwidth usage.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This reduces PCIe bandwidth usage and tearing.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This should allow using multiple CRTCs via RandR 1.4 even with xserver
< 1.17. It also simplifies the code a little, and paves the way for
following changes.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This further reduces the compositing slowdown due to flushing overhead,
by only flushing when the X server actually sends XDamageNotify events
to a client, and there hasn't been a flush yet in the meantime.
v2: Use ScreenPrivateKey, fixes invalid memory access with GPU screens
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>
|