Age | Commit message (Collapse) | Author |
|
|
|
We continued using the stale cached handle, causing issues e.g. when
resizing the screen via RandR.
Reported-by: iive on IRC
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Shorter and sweeter. :)
(Ported from amdgpu commit e8e688f3852fb06b0c34ed5bce47c9493bcd1613)
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Inspired by amdgpu. This avoids various issues due to a GEM handle
lifetime conflict between us and Mesa with current glamor.
Bugzilla: https://bugs.freedesktop.org/105381
Tested-by: Konstantin Kharlamov <hi-angel@yandex.ru>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Inspired by amdgpu, preparation for the following change. For now, this
is mostly a wrapper around struct radeon_bo, no functional change
intended.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Only EXA needs them.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
radeon_scanout_extents_intersect could leave the scanout damage region
in an invalid state, triggering debugging checks in pixman:
*** BUG ***
In pixman_region_append_non_o: The expression r->x1 < r->x2 was false
Set a breakpoint on '_pixman_log_error' to debug
(Ported from amdgpu commit 8af989546907ad9fb491d940e1936d3bfc89276b)
|
|
We were clobbering entries in mi's global miSpritePointerFuncs struct,
which cannot work correctly with multiple primary screens. Instead,
assign a pointer to our own wrapper struct to PointPriv->spriteFuncs.
Fixes crashes with multiple primary screens.
Fixes: 1fe8ca75974c ("Keep track of how many SW cursors are visible on
each screen")
Reported-by: Mario Kleiner <mario.kleiner.de@gmail.com>
|
|
DRI clients can use depth 32 pixmaps while the screen is depth 24, in
which case page flipping would fail.
Reported-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-and-Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
|
|
This allows to en-/disable some functions depending on individual screen
settings.
Prep work for more efficient depth 30 support.
Suggested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@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
(Ported from amdgpu commit 69e20839bfeb3ee0b0a732d72de0a32d6c5435fc)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Allows tidying up radeon_dirty_src_equals and redisplay_dirty slightly.
(Cherry picked from amdgpu commit 1d65ac395971571094df21ca0408d5972c6b56ec)
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Non GLAMOR builds needs pRADEONEnt so move the USE_GLAMOR define
down to make pRADEONEnt defined in this case.
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Not doing so resulted in DRI2 page flips not actually changing the FB
being scanned out, showing intermittent flicker of the "back" buffer
rendering.
Bugzilla: https://bugs.freedesktop.org/102643
Fixes: 55e513b978b2 "Use reference counting for tracking KMS framebuffer
lifetimes"
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.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Preparatory, no functional change intended yet.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparatory, no functional change intended yet.
Also inline radeon_pixmap_create_fb into radeon_pixmap_get_fb, since
there's only one call-site anymore.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
All callers were already passing in a pixmap.
This allows simplifying the rotated scanout case slightly.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for following change, no functional change intended yet.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for following changes, no functional change intended yet.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Allows cleaning up the code considerably.
v2:
* Fix "drmWaiVBlank" typo, add blank line for readability (Slava Abramov)
* Rename in/out sequence parameters to "target_seq" and "result_seq",
hopefully that will be clearer.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> # v1
|
|
|
|
This brings us closer to amdgpu.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
References are held by the pixmaps corresponding to the FBs (so
the same KMS FB can be reused as long as the pixmap exists) and by the
CRTCs scanning out from them (so a KMS FB is only destroyed once it's
not being scanned out anymore, preventing intermittent black screens and
worse issues due to a CRTC turning off when it should be on).
v2:
* Only increase reference count in drmmode_fb_reference if it was sane
before
* Make drmmode_fb_reference's indentation match the rest of
drmmode_display.h
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: cc9d6b7db9c2 ("Move DPMS check from radeon_scanout_do_update to
radeon_scanout_flip")
(Ported from amdgpu commit 981bac185cfd74ae50dffc28f57cf34623a9595f)
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
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 RADEONUnblank ->
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 RADEONBlockHandler_oneshot repeatedly even after
we set pScreen->BlockHandler = RADEONBlockHandler_KMS.
v2:
* Drop spaces between XORG_VERSION_NUMERIC arguments
* Call radeon_bo_wait after radeon_cs_flush_indirect
Bugzilla: https://bugs.freedesktop.org/99457
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
|
|
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.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This commit replaces the inline assembler code (for x86 platforms) and
loop (for non-x86 platforms) in RADEONLog2 with a one-liner version
based on clz (count leading zeroes).
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Fixes various potential issues with TearFree enabled, e.g. outputs
freezing after display configuration changes.
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.
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>
|
|
Fixes memory leak when destroying pixmaps with priv->bo == NULL.
Reported-by: Qiang Yu <qiang.yu@amd.com>
(Ported from amdgpu commit 7f7f9825caf3983902491da27c16d14cd8bf9b7d)
|
|
(Ported from amdgpu commits c315c00e44afc91a7c8e2eab5af836d9643ebb88
and 0d42082108c264568e2aadd15ace70e72388bc65)
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
This allows for a minor simplification of the code.
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>
|
|
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>
|
|
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>
|
|
Fixes build failure in some environments:
CC radeon_sync.lo
In file included from radeon_sync.c:28:
/home/tinderbox/xorg-build/include/xorg/misync.h:31: error: redefinition of typedef 'SyncFence'
radeon.h:93: note: previous declaration of 'SyncFence' was here
make[2]: *** [radeon_sync.lo] Error 1
Reported-Tested-and-Acked-by: David Airlie <airlied@redhat.com>
|
|
Fixes garbage being intermittently visible during a screen resize.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27757#c7
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|