Age | Commit message (Collapse) | Author |
|
Fixes misbehaviour when hotplugging DisplayPort connectors on secondary
GPUs.
Fixes: c801f9f10a5d ("Handle Zaphod mode correctly in radeon_mode_hotplug")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98626
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.
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 121a6de72da5 ("Keep
track of damage event related flushes per-client v2").
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>
|
|
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)
|
|
(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>
|
|
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>
|
|
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>
|
|
We only need to flush for XDamageNotify events.
Significantly reduces compositing slowdown due to flushing overhead, in
particular with glamor.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
It doesn't work correctly in all cases, see e.g.
https://bugs.freedesktop.org/show_bug.cgi?id=95475 . I'm not sure this
is fixable, given EXA's architecture.
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>
|
|
Fixes crash with Xinerama enabled, which disables RandR.
Fixes: https://bugs.debian.org/827984
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Seems to work well enough in general now.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
(Ported from amdgpu commit a0bbb373f902e0ffc14570c85faec7e44134f62e)
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>
|
|
Doing it the other way around meant that there was still a possibility
for the front buffer contents to be uninitialized when they start being
scanned out.
(Ported from amdgpu commit 4a60b4b1851a3cbc2d8ad9048d68eeb6947cf132)
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>
|
|
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>
|
|
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>
|
|
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)
|
|
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>
|
|
No longer necessary now that radeon_drm_queue_handler can handle
e->handler == NULL.
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>
|
|
Fixes xrandr (XRRGetOutputPrimary) not reporting any output as primary
after startup.
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>
|
|
Reviewed-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>
|
|
It doesn't make sense to copy the screen contents from console when VT
switching back to Xorg or when Xorg resets.
Fixes intermittent artifacts when VT switching back from console to the
gdm login screen.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Some of these were set, some of them were
always opposites, so clean things up.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
The vblank / page flip ioctls don't work as expected for a disabled CRTC.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
On pre-Evergreen hw, libdrm's r6_surface_best() helper
for the surface managers radeon_surface_best() routine
is a no-op and therefore doesn't assign any tile_split
settings to created surfaces, so it leaves
surface.tile_split on its "undefined" value of 0.
Mesa's DRI3/Present backend creates DRI3 Pixmaps via
the DRIImage extension and the radeon gallium driver
implementation of that extension uses the libdrm
surface manager for backing bo creation and treats
an undefined surface.tile_split==0, as returned by
the surface manager for pre-evergreen, as a signal
to not assign any tile_split flags to the DRI3 Pixmaps
bo.
The ddx also uses libdrm surface manager to create the
x-screen pixmap, but so far treated the returned undefined
surface.tile_split==0 by mapping it to eg_tile_split()'s
default tile_split flags, which are different from Mesa's
tiling flags for DRI3 pixmaps. Under DRI3/Present this
causes a mismatch of src pixmap and destination root
pixmaps tiling flags and thereby prevents page flipping
for pixmap presents.
Change the ddx code to treat surface.tile_split==0 the
same way as the radeon gallium driver to avoid mismatched
tiling flags and thereby allow DRI3/Present page-flip to
work on pre-Evergreen hw.
Tested on RV730 and Evergreen "Juniper".
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
|
|
Defining multiple ZaphodHead outputs per x-screen in a
multiple x-screen's per gpu configuration caused all
outputs except one per x-screen to go dark, because
there was a fixed mapping x-screen number -> crtc number,
limiting the number of crtc's per x-screen to one.
On a ZaphodHead's setup, be more clever and assign
as many crtc's to a given x-screen as there are
ZaphodHeads defined for that screen, assuming
there are enough unused crtc's available.
Tested on a triple display setup with different combos
of one, two or three ZaphodHeads per one, two or three
x-screens.
This is a port of similar code from xf86-video-nouveau.
v2: Implement suggestions by Michel Dänzer: Less verbose
debug output, more clear warning message on crtc allocation
failure. Move clearing of per gpu assigned_crtc mask to
CloseScreen, indeed testing shows no need for the more
complex new server generation check from v1.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
(v1) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|