Age | Commit message (Collapse) | Author |
|
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>
|
|
The display engine didn't support it.
Fixes display corruption with options "TearFree" and "ShadowPrimary"
(and rotation or transforms with current xserver) on pre-R600.
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>
|
|
Deal with drm fd wakeup
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Fixes crash with Xinerama enabled, which disables RandR.
Fixes: https://bugs.debian.org/827984
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Now the HW cursor can be used with TearFree rotation.
This also allows always using the separate scanout pixmap mechanism for
rotation, so that should be much smoother even without TearFree enabled.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Subpixel text rendering is typically done with a solid src and
a pixmap mask. Traditionally, this cannot be accelerated in a single
pass and requires two passes [1]. However, we can cheat a little
with a constant blend color.
We can use:
const.A = src.A / src.A
const.R = src.R / src.A
const.G = src.G / src.A
const.B = src.B / src.A
dst.A = const.A * (src.A * mask.A) + (1 - (src.A * mask.A)) * dst.A
dst.R = const.R * (src.A * mask.R) + (1 - (src.A * mask.R)) * dst.R
dst.G = const.G * (src.A * mask.G) + (1 - (src.A * mask.G)) * dst.G
dst.B = const.B * (src.A * mask.B) + (1 - (src.A * mask.B)) * dst.B
This only needs a single source value. src.A is cancelled down in
the right places.
[1] http://anholt.livejournal.com/32058.html
r6xx still be used on some machine,
Ported from commit 4375a6e75e5d41139be7031a0dee58c057ecbd07.
Signed-off-by: Tan Hu <tan.hu@zte.com.cn>
Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>
|
|
Solid pixmaps are currently implemented with scratch pixmaps, which
is slow. This replaces the hack with a proper implementation. The
Composite shader can now either sample a src/mask or use a constant
value.
r6xx still be used on some machine,
Ported from commit 94d0d14914a025525a0766669b556eaa6681def7.
Signed-off-by: Tan Hu <tan.hu@zte.com.cn>
Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>
|
|
Basically a conversion from .dir-locals.el, but also correctly handles
files which predominantly use tabs for indentation.
Also, EditorConfig supports many more editors and IDEs.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The kernel driver returns 0 as the pitch of the fbcon BO via the
DRM_RADEON_GEM_GET_TILING ioctl, so we ended up using an incorrect
pitch in some cases.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94901
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Seems to work well enough in general now.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We need to scan both screens of the entity for existing connectors, and
enumerate DVI & HDMI connectors consistently regardless of which screen
they're assigned to.
Fixes crash when hot-(un)plugging connectors in Zaphod mode.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93415
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The xserver Present code only calls radeon_present_flip with
sync_flip=FALSE if radeon_present_screen_init sets
PresentCapabilityAsync, and the latter only sets it if the kernel driver
advertises support for async flips.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Will be used by the next change. No functional change here.
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>
|
|
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
|
|
|
|
It's now effective for rotation as well.
(Ported from amdgpu commit faf9d720b7d650f5f1ea657a874d08eac3972e60)
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>
|
|
Stop second guessing it in drmmode_crtc_scanout_create.
Fixes display corruption in some cases with TearFree enabled.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94751
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Fixes hangs when attempting to use DRI3 on display connections forwarded
via SSH.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261
v2: Don't do this for Xorg > 1.18.99.1 since the corresponding xserver
change has landed in Git master.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
|
|
This reverts commit cd94248ffa7d8fe0b57476f79e7e860dee66d1b0.
It broke VDPAU<->GL interop with DRI3 enabled, because the Gallium VDPAU
code doesn't support DRI3 yet. We can consider re-enabling this once
there is a Mesa release where the Gallium VDPAU code supports DRI3.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94675
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>
|
|
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>
|
|
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>
|
|
This enables tiling for scanout BOs used for TearFree / ShadowPrimary,
and simplifies the code a little.
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>
|
|
If it's available, Xorg calls it on each mode configuration change. It
does what xf86_reload_cursors does (and more), so we don't need to call
the latter anymore.
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>
|
|
And add a check for RandR 1.4 multihead.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The callers were using 0 for the tiling flags, causing surfaces to be
incorrectly treated as linear. This issue was causing corruption on Cayman
just after login with GNOME3. The kernel was rejecting the cs in
drmmode_copy_fb due to invalid texture pitch.
Signed-off-by: Ryan Kennedy <Ryan.Kennedy@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Sync-to-vblank works fine with rotation. We're still checking for
rotation in radeon_present_check_flip.
Returning NULL from here resulted in the xserver present code falling
back to the fake CRTC running at 1 fps.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Without this, drmmode_set_mode_major may just re-set the FB for the
last flipped BO, in which case the display will probably freeze.
Reproduction recipe: Enable rotation while a fullscreen client is
flipping.
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)
|
|
We were already relying on pScrn->pScreen being non-NULL in some cases,
which is supposedly always true ever since this function is no longer
getting called from ScreenInit.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We require xserver >= 1.8, which was already at version 3.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
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>
|
|
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>
|
|
No longer necessary now that radeon_drm_queue_handler can handle
e->handler == NULL.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Keep them around until the DRM event arrives, but then call the abort
functions instead of the handler functions.
This is a prerequisite for the following fix.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|