Age | Commit message (Collapse) | Author |
|
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>
|
|
This should avoid intermittent artifacts which could sometimes be visible
when setting a new scanout pixmap, e.g. on server startup or when
changing resolutions.
Reviewed-by: Alex Deucher <alexander.deucher@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>
|
|
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
|
../../src/radeon_probe.c: In function 'radeon_get_scrninfo':
../../src/radeon_probe.c:157:22: warning: variable 'pRADEONEnt' set but not used [-Wunused-but-set-variable]
RADEONEntPtr pRADEONEnt;
^
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
|
There is already a radeon_pixmap forward decl here, the #else
block is missing one.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.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>
|
|
It's only used/needed by ati_drv.so
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
The DRM_IOCTL_WAIT_VBLANK ioctl may return an error during DPMS off,
which would trigger an error message in drmmode_crtc_get_ust_msc.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Inspired by modesetting driver change by Kenneth Graunke.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
It's not always possible to use the page flip ioctl for this, e.g.
during DPMS off. We were previously just skipping the unflip in that
case, which could result in hangs when setting DPMS off while a
fullscreen Present app is running, e.g. at the GNOME3 lock screen.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91227
Signed-off-by: Piotr Redlewski <predlewski@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
eg_tile_split() maps the default: switch-case to tile split
flag 6, like for a tile split size of 4096 Bytes. All other
instances of tile split mappings or reverse mappings in both
the ddx and in Mesa's radeon gallium drivers assign the default:
case to tile split flag 4, consistent with a default of 1024
Bytes.
Make this one outlier consistent with other instances of
mappings in the code to avoid surprises.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
|
|
When turning the outputs off (DPMSModeOff), CRTCs stayed enabled. This led
to higher gpu temperatures than with fglrx driver.
v2: when entering DPMS also disable active CRTCs
v3: use drmmode_set_mode_major() for enabling CRTCs when leaving DPMS
Signed-off-by: Piotr Redlewski <predlewski@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.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>
|
|
Fixes corrupted display and hangs when switching between DRI2 and DRI3
fullscreen apps, e.g. a compositor using DRI3 and a fullscreen app using
DRI2 or vice versa.
Reviewed-by: Alex Deucher <alexander.deucher@amd.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>
|
|
Fixes regression introduced in commit
76c2923ac5c7230a8b2f9f8329c308d28b44d9c0 ("DRI2: Split out helper for
getting UST and MSC of a specific CRTC").
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We don't need to wait for GPU reads to finish before reading with the
CPU.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
It was getting the drmmode_crtc_private_ptr in a roundabout way.
Reviewed-by: Alex Deucher <alexander.deucher@amd.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>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Invalid (msc,ust)=(0,0) were returned to the server
because a wrong crtc_id was used to specify which
crtc should deliver pageflip completion data. Fix
it in accordance with the dri2 implementation.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
|
|
Check for and reject currently unsupported async_flip
inside radeon_present_check_flip() instead of inside
radeon_present_flip().
This way the server can detect early that async flips
aren't supported by the ddx and can deal with this
correctly by using its non-vsync'ed CopyRegion fallback.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
|
|
Not skipping a disabled CRTC results in a crash.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90187
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
It only works when using glamor.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90169
Reviewed-by: Alex Deucher <alexander.deucher@amd.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>
|
|
Needed for Xorg -background none.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This ensures the scanout pixmaps used for Option "TearFree" and Option
"ShadowPrimary" have been initialized when their initial mode is set.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This ensures that the screen pixmap contents have been initialized when
the initial modes are set.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27757
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
That's late enough for acceleration to be fully initialized, but still
early enough to set pScreen->canDoBGNoneRoot.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Otherwise, the X server will initialize the screen pixmap contents
anyway.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
It doesn't point to the memory of the newly allocated BO. Fixes crash
running piglit with Option "ShadowPrimary" enabled.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Avoids tearing by flipping between two scanout BOs per (non-rotated) CRTC
v2:
* Fix condition for TearFree log message (Richard Wilbur)
* Log warning message about DRI page flipping being enabled because of
TearFree (or ShadowPrimary) also when building without glamor support
v3:
* Only override fb_id/x/y if all scanout pixmaps have been successfully
allocated
v4:
* Make log warning clearer if drmModePageFlip returns an error
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
|
|
Its value was always the same as that of the PixmapRec devKind member.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
When this option is enabled, most pixmaps (including the screen pixmap)
are allocated in system RAM and mostly accessed by the CPU. Changed areas
of the screen pixmap are copied to dedicated per-CRTC scanout pixmaps
regularly, triggered by the vblank interrupt.
v2:
* Set region data pointer to NULL for keeping only the extents
* Move pRegion and pBox local variable declarations closer to their uses
in drmmode_set_mode_major()
|
|
They can choose between using the GPU or CPU for the operation.
|
|
|
|
|
|
It means that the pixmap is used for scanout exclusively.
|
|
Will be used for other kinds of dedicated scanout buffers as well.
|
|
To avoid confusion with upcoming changes.
|
|
The kernel driver doesn't handle that correctly yet.
Fixes or at least avoids issues with OpenGL fullscreen apps with DRI3
enabled and using PRIME or with (2D) tiling disabled.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89720
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This avoids some trouble with the Gallium nine state tracker, which uses
the Present extension even when DRI3 is disabled.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89772
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Now we can share pixmaps with no struct radeon_bo via DRI2.
Fixes VDPAU video playback freezing when using an OpenGL compositor with
DRI3 enabled.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89755
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Nick Sarnie <commendsarnex@gmail.com>
|
|
No functional change.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Nick Sarnie <commendsarnex@gmail.com>
|