Age | Commit message (Collapse) | Author | Files | Lines |
|
Remember the shared pixmap passed to drmmode_set_scanout_pixmap for each
CRTC, and just compare against that.
Fixes leaving stale entries in ScreenRec::pixmap_dirty_list under some
circumstances, which would usually result in use-after-free and a crash
down the line.
(Ported from radeon commit 7dc68e26755466f9056f8c72195ab8690660693d)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Can't work currently. Fixes crash when trying to run a DRI3 client when
glamor isn't enabled.
Bugzilla: https://bugs.freedesktop.org/100968
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The root window contents may be undefined before that, so we don't want
to show anything yet.
Fixes a crash on startup with rotation and virtual resolution set in
xorg.conf.
Bugzilla: https://bugs.freedesktop.org/100276
Fixes: ad53635af150 ("Move DPMS check from amdgpu_scanout_do_update to
amdgpu_scanout_flip")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
This is the only place we call drmmode_set_desired_modes for GPU screens
during server startup. Without this change, the display outputs of
secondary GPUs may stay on even while Xorg isn't using them.
(Ported from radeon commit 9a71445094b728f3d78db8f6808b4782ee19a453)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Xorg doesn't use the following functionality of GPU screens, so don't
bother initializing it:
* DRI page flipping
* DRI3 / Present / SYNC fences
* XVideo / XvMC
* Root window with background None
(Ported from radeon commit 67ae5e00a748ad52cf92738d401afff2947b1891)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for the following change.
Assign pAMDGPUEnt->fd = -1 instead of 0 when we're not using the file
descriptor anymore.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This was only necessary with older versions for driving the FBO cache
expiry mechanism.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Not used with older versions of Xorg. Fixes warning in that case:
../../src/amdgpu_kms.c:328:1: warning: ‘transform_region’ defined but not used [-Wunused-function]
transform_region(RegionPtr region, struct pict_f_transform *transform,
^~~~~~~~~~~~~~~~
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Looks like this snuck in accidentally.
Brings us back in line with the radeon driver, and fixes the build
against older versions of xserver which didn't have the is_gpu field
yet.
Fixes: 6bab8fabb37e ("Remove info->dri2.drm_fd and info->drmmode->fd")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
When amdgpu_scanout_do_update is called from
drmmode_crtc_scanout_update, drmmode_crtc->pending_dpms_mode may still
be != DPMSModeOn, e.g. during server startup.
Fixes intermittently showing garbage with TearFree enabled.
(Ported from radeon commit cc9d6b7db9c2078be1e530a64af6d517c6a42024)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This is the earliest opportunity where the root window contents are
guaranteed to be initialized, and prevents drmmode_set_mode_major from
getting called before drmmode_set_desired_modes via AMDGPUUnblank ->
drmmode_crtc_dpms. Also, in contrast to the BlockHandler hook, this is
called when running Xorg with -pogo.
Fixes intermittently showing garbage on server startup or after server
reset.
As a bonus, this avoids trouble due to higher layers (e.g. the tigervnc
Xorg module) calling AMDGPUBlockHandler_oneshot repeatedly even after
we set pScreen->BlockHandler = AMDGPUBlockHandler_KMS.
Bugzilla: https://bugs.freedesktop.org/99457
(Ported from radeon commits 0a12bf1085505017068dfdfd31d23133e51b45b9 and
f0e7948e1c0e984fc27f235f365639e9cf628291)
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>
|
|
Cleanup in preparation for the following change, no functional change
intended.
(Ported from radeon commit 649644a88347a6d03de68f8c41db03a82deeb23b)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes leaking the corresponding struct amdgpu_drm_queue list entry in
that case.
(Ported from radeon commit e2942449171fe628a7726e59bcaab65e27d88563)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The wrong order meant that the clipping region wasn't actually applied,
so it always copied the full contents from the other scanout pixmap.
(Ported from radeon commit 14c3f59f5157885ad8f941f0bad6c0c5e3db12f8)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes incorrect screen updates with TearFree enabled on PRIME slave
outputs which are not located at (0, 0).
(Ported from radeon commit a995f5830916a0fee5126263d1bfe48632be3a15)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes various potential issues with TearFree enabled, e.g. outputs
freezing after display configuration changes.
(Ported from radeon commit e543ef3a2fb304cbe3a965fb780632af2e4186f4)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This will hopefully decrease the chance of accidentally breaking the
build against xserver < 1.13 in the future.
(Ported from radeon commit f130b10e63f7526360b41aa0918b4940f63f662a)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Their purpose is to flush GPU rendering commands corresponding to damage
events, but there can be no damage events corresponding to GPU screen
rendering operations.
(Ported from radeon commits 13c6bc5e382765fe567091e1c616c0a26eec04ca and
487aa62a2a23b86e4ea4714fdfd465c9e513141f)
v2: Squash in radeon fix for build against xserver < 1.13
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
|
|
(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>
|
|
Use libdrm_amdgpu's amdgpu_get_marketing_name for the chipset name, or
"Unknown AMD Radeon GPU" as a fallback.
v2: Require libdrm_amdgpu >= 2.4.72 for amdgpu_get_marketing_name
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
|
|
Not useful anymore.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for the following change, no functional change intended.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes misbehaviour when hotplugging DisplayPort connectors on secondary
GPUs.
Fixes: 14606e127f4b ("Handle Zaphod mode correctly in amdgpu_mode_hotplug")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98626
(Ported from radeon commit 9760ef33cba5795eddeda4d5c2fcbe2dcce21689)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This means that all possible paths can be handled as intended, no matter
which Xorg version the driver happened to be compiled against.
(Ported from radeon commit 350a2645a1b127227ff294c0b62d20000d0fd48a)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
1.10.0 was released in February 2011.
We've been accidentally requiring 1.10 or newer since c7d27c94cb65 ("Keep
track of damage event related flushes per-client").
(Ported from radeon commit 5df36de39952c3a26cb2fbc125f298139a9dd5bc)
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)
(Ported from radeon commit 82d3c8f5500d2a6fb1495e217a0b79c396f1534c)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This allows deferring shared pixmap updates between different drivers.
(Ported from radeon commit 53be26b00e83f871f0afd39caa5a7a1d6ec4aea1)
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.
(Ported from radeon commit 38797a33117222dadbc89e5f21ed8cd5deef9bea)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
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.
(Ported from radeon commit eda1f3df6aaed683036369fe8820da4dac3c2ae2)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Will be needed higher up by the following changes. No functional change.
(Ported from radeon commit 2f6e5fb15f1a9ce523c85550e493f8bda9d0c00f)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
(Ported from radeon commit 5a57005178fc13b6f7e513458ca6dae72a3e5783)
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.
(Ported from radeon commit 99232f64db52812a843cd616d263d3a6b90eef3d)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This further reduces the PCIe bandwidth usage.
(Ported from radeon commit b0867063abb197b9134166706d99fcbe5f204bb5,
plus leak fix from 5a57005178fc13b6f7e513458ca6dae72a3e5783)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This reduces PCIe bandwidth usage and tearing.
(Ported from radeon commit ad0a0656dd0e74683e6d7789decba827aa29c221)
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.
(Ported from radeon commits 4cfa4615f79f64062e5e771cd45dd7048f48b4f6
and a92c27484703abc7c410b6ae0e4b8d1efbbb8e6f)
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
(Ported from radeon commits 9090309e057dc703d1a5bffd88e6cae14108cfc3,
e520ce0ec0adf91ddce5c932d4b3f9477fd49304,
a36fdaff40d5b4795a1400c348a80eee94892212 and
4bd2d01552f18153afa03a8947b22eebf3d67c6b)
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.
(Ported from radeon commit 121a6de72da5fcf9a32408eff36b2235f3dfbcfe)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We only need to flush for XDamageNotify events.
Significantly reduces compositing slowdown due to flushing overhead, in
particular with glamor.
(Ported from radeon commit 9a1afbf61fbb2827c86bd86d295fa0848980d60b)
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>
|
|
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
|
|
Fixes crash with Xinerama enabled, which disables RandR.
Fixes: https://bugs.debian.org/827984
(Ported from radeon commit 3be841d0ae7d505cef325993205b12d15e98dba9)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
There's no need to test that same damage again.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We can use the dimensions of the CRTC's mode instead.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This makes TearFree work with arbitrary transforms, and makes transforms
work better even without TearFree, with xserver >= 1.12.
v2: Preserve clamping of transformed damage extents to CRTC boundaries.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for the following fixes.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Seems to work well enough in general now.
(Ported from radeon commit 1181b9c582f10b6c523e4b2988e2ce87ecf3d367)
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>
|