mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
This is a straightforward port of a patch with the same name "modesetting: Add option for non-vsynced flips for "secondary" outputs." from X-Server master / X-Server 21.1. See server MR 742. The description below is therefore identical to that X-Server commit: Whenever an unredirected fullscreen window uses pageflipping for a DRI3/Present PresentPixmap() operation and the X-Screen has more than one active output, multiple crtc's need to execute pageflips. Only after the last flip has completed can the PresentPixmap operation as a whole complete. If a sync_flip is requested for the present, then the current implementation will synchronize each pageflip to the vblank of its associated crtc. This provides tear-free image presentation across all outputs, but introduces a different artifact, if not all outputs run at the same refresh rate with perfect synchrony: The slowest output throttles the presentation rate, and present completion is delayed to flip completion of the "latest" output to complete. This means degraded performance, e.g., a dual-display setup with a 144 Hz monitor and a 60 Hz monitor will always be throttled to at most 60 fps. It also means non-constant present rate if refresh cycles drift against each other, creating complex "beat patterns", tremors, stutters and periodic slowdowns - quite irritating! Such a scenario will be especially annoying if one uses multiple outputs in "mirror mode" aka "clone mode". One output will usually be the "production output" with the highest quality and fastest display attached, whereas a secondary mirror output just has a cheaper display for monitoring attached. Users care about perfect and perfectly timed tear-free presentation on the "production output", but cares less about quality on the secondary "mirror output". They are willing to trade quality on secondary outputs away in exchange for better presentation timing on the "production output". One example use case for such production + monitoring displays are neuroscience / medical science applications where one high quality display device is used to present visual animations to test subjects or patients in a fMRI scanner room (production display), whereas an operator monitors the same visual animations from a control room on a lower quality display. Presentation timing needs to be perfect, and animations high-speed and tear-free for the production display, whereas quality and timing don't matter for the monitoring display. This commit gives users the option to choose such a trade-off as opt-in: It adds a new boolean option "AsyncFlipSecondaries" to the device section of xorg.conf. If this option is specified as true, then DRI3 pageflip behaviour changes as follows: 1. The "reference crtc" for a windows PresentPixmap operation does a vblank synced flip, or a DRM_MODE_PAGE_FLIP_ASYNC non-synchronized flip, as requested by the caller, just as in the past. Typically flips will be requested to be vblank synchronized for tear-free presentation. The "reference crtc" is the one chosen by the caller to drive presentation timing (as specified by PresentPixmap()'s "target_msc", "divisor", "remainder" parameters and implemented by vblank events) and to deliver Present completion timestamps (msc and ust) extracted from its pageflip completion event. 2. All other crtc's, which also page-flip in a multi-display configuration, will try to flip with DRM_MODE_PAGE_FLIP_ASYNC, ie. immediately and not synchronized to vblank. This allows the PresentPixmap operation to complete with little delay compared to a single-display present, especially if the different crtc's run at different video refresh rates or their refresh cycles are not perfectly synchronized, but drift against each other. The downside is potential tearing artifacts on all outputs apart from the one of the "reference crtc". Successfully tested on a AMD gpu with single-display and dual-display setups, and with single-X-Screen as well as dual-X-Screen "ZaphodHeads" configurations. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
171 lines
5.1 KiB
Groff
171 lines
5.1 KiB
Groff
.ds q \N'34'
|
|
.TH AMDGPU __drivermansuffix__ __vendorversion__
|
|
.SH NAME
|
|
amdgpu \- AMD RADEON GPU video driver
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.B "Section \*qDevice\*q"
|
|
.BI " Identifier \*q" devname \*q
|
|
.B " Driver \*qamdgpu\*q"
|
|
\ \ ...
|
|
.B EndSection
|
|
.fi
|
|
.SH DESCRIPTION
|
|
.B amdgpu
|
|
is an __xservername__ driver for AMD RADEON-based video cards with the
|
|
following features:
|
|
.PP
|
|
.PD 0
|
|
.TP 2
|
|
\(bu
|
|
Support for 8-, 15-, 16-, 24- and 30-bit pixel depths;
|
|
.TP
|
|
\(bu
|
|
RandR support up to version 1.4;
|
|
.TP
|
|
\(bu
|
|
3D acceleration;
|
|
.PD
|
|
.SH SUPPORTED HARDWARE
|
|
The
|
|
.B amdgpu
|
|
driver supports SI and newer families' video cards.
|
|
.PD
|
|
.SH CONFIGURATION DETAILS
|
|
Please refer to __xconfigfile__(__filemansuffix__) for general configuration
|
|
details. This section only covers configuration details specific to this
|
|
driver.
|
|
.PP
|
|
The following driver
|
|
.B Options
|
|
are supported:
|
|
.TP
|
|
.BI "Option \*qSWcursor\*q \*q" boolean \*q
|
|
Selects software cursor. The default is
|
|
.B off.
|
|
.TP
|
|
.BI "Option \*qAccel\*q \*q" boolean \*q
|
|
Enables or disables all hardware acceleration.
|
|
.br
|
|
The default is
|
|
.B on.
|
|
|
|
.TP
|
|
.BI "Option \*qZaphodHeads\*q \*q" string \*q
|
|
Specify the RandR output(s) to use with zaphod mode for a particular driver
|
|
instance. If you use this option you must use this option for all instances
|
|
of the driver.
|
|
.br
|
|
For example:
|
|
.B
|
|
Option \*qZaphodHeads\*q \*qLVDS,VGA-0\*q
|
|
will assign xrandr outputs LVDS and VGA-0 to this instance of the driver.
|
|
.TP
|
|
.BI "Option \*qDRI\*q \*q" integer \*q
|
|
Define the maximum level of DRI to enable. Valid values are 2 for DRI2 or 3 for DRI3.
|
|
The default is
|
|
.B 3 for DRI3
|
|
if the Xorg version is >= 1.18.3, otherwise
|
|
.B 2 for DRI2.
|
|
.TP
|
|
.BI "Option \*qEnablePageFlip\*q \*q" boolean \*q
|
|
Enable DRI2 page flipping. The default is
|
|
.B on.
|
|
.TP
|
|
.BI "Option \*qTearFree\*q \*q" boolean \*q
|
|
Set the default value of the per-output 'TearFree' property, which controls
|
|
tearing prevention using the hardware page flipping mechanism. TearFree is
|
|
on for any CRTC associated with one or more outputs with TearFree on. Two
|
|
separate scanout buffers need to be allocated for each CRTC with TearFree
|
|
on. If this option is set, the default value of the property is 'on' or 'off'
|
|
accordingly. If this option isn't set, the default value of the property is
|
|
.B auto,
|
|
which means that TearFree is on for rotated outputs, outputs with RandR
|
|
transforms applied and for RandR 1.4 secondary outputs, otherwise off.
|
|
.TP
|
|
.BI "Option \*qVariableRefresh\*q \*q" boolean \*q
|
|
Enables support for enabling variable refresh on the Screen's CRTCs
|
|
when an suitable application is flipping via the Present extension.
|
|
.br
|
|
The default is
|
|
.B off.
|
|
.TP
|
|
.BI "Option \*qAsyncFlipSecondaries\*q \*q" boolean \*q
|
|
Use async flips for secondary video outputs on multi-display setups. If a screen
|
|
has multiple displays attached and DRI3 page flipping is used, then only one of
|
|
the displays will have its page flip synchronized to vblank for tear-free
|
|
presentation. This is the display that is used for presentation timing and
|
|
timestamping, usually the one covering the biggest pixel area of the screen.
|
|
All other displays ("Secondaries") will not synchronize their flips. This may
|
|
cause some tearing on these displays, but it prevents a permanent or periodic
|
|
slowdown or irritating judder of animations if not all video outputs are running
|
|
synchronized with each other and with the same refresh rate. There is no perfect
|
|
solution apart from perfectly synchronized outputs, but this option may give
|
|
preferrable results if the displays in a multi-display setup mirror or clone
|
|
each other. The default is
|
|
.B off.
|
|
.TP
|
|
.BI "Option \*qAccelMethod\*q \*q" string \*q
|
|
Setting this option to
|
|
.B none
|
|
disables use of the glamor acceleration architecture. In that case, all 2D
|
|
rendering is done by the CPU, but 3D and video hardware acceleration can still
|
|
work. This is mainly useful for OpenGL driver bring-up.
|
|
.br
|
|
The default is to use glamor.
|
|
|
|
.PP
|
|
The following driver
|
|
.B Option
|
|
is supported for
|
|
.B glamor
|
|
:
|
|
.TP
|
|
.BI "Option \*qShadowPrimary\*q \*q" boolean \*q
|
|
This option enables a so-called "shadow primary" buffer for fast CPU access to
|
|
pixel data, and separate scanout buffers for each display controller (CRTC).
|
|
This may improve performance for some 2D workloads, potentially at the expense
|
|
of other (e.g. 3D, video) workloads.
|
|
Note in particular that enabling this option currently disables page flipping.
|
|
The default is
|
|
.B off.
|
|
|
|
.SH SEE ALSO
|
|
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
|
|
.IP " 1." 4
|
|
Wiki page:
|
|
.RS 4
|
|
https://www.x.org/wiki/radeon
|
|
.RE
|
|
.IP " 2." 4
|
|
Overview about amdgpu development code:
|
|
.RS 4
|
|
https://cgit.freedesktop.org/xorg/driver/xf86-video-amdgpu/
|
|
.RE
|
|
.IP " 3." 4
|
|
Mailing list:
|
|
.RS 4
|
|
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
|
|
.RE
|
|
.IP " 4." 4
|
|
IRC channel:
|
|
.RS 4
|
|
#radeon on irc.freenode.net
|
|
.RE
|
|
.IP " 5." 4
|
|
Query the bugtracker for amdgpu bugs:
|
|
.RS 4
|
|
https://bugs.freedesktop.org/query.cgi?product=xorg&component=Driver/AMDgpu
|
|
.RE
|
|
.IP " 6." 4
|
|
Submit bugs & patches:
|
|
.RS 4
|
|
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/AMDgpu
|
|
.RE
|
|
|
|
.SH AUTHORS
|
|
.nf
|
|
Authors include:
|
|
Michel D\(:anzer \fImichel@daenzer.net\fP
|
|
Alex Deucher \fIalexdeucher@gmail.com\fP
|