This pipeline builds the driver against the latest Xserver stable
release as well as current master.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.
Signed-off-by: b-aaz <b-aazbsd.proton.me>
Add the following forms for issue creation:
* Bug report
* Feature request
* Code change
* Documentation update
* Organizational task
* add issue type selection page on "New Issue" call
* mention Github Discussions and the mailing list where appropriate
Part-of: X11Libre/misc#156
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
More closely follow common style as described on
https://man7.org/linux/man-pages/man7/man-pages.7.html
and fix warnings raised by `mandoc -T lint` and `groff -rCHECKSTYLE=10`
Also hardcode man page section numbers now that all supported OS'es
use the same set of numbers.
Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
jungle, so use the proper dix function instead - except when calling down the
chain where we had wrapped ourselves - and protecting those against NULL, so
we can move subsys-provided functions out of that chain.
See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This GBM flag is useful as it allows the driver to be aware
of the intended use of the buffer and act accordingly (typically
disable DCC to avoid artifacts from out of sync DCC).
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xnfalloc is just an alias for XNFalloc() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The obsolete pict_f_transform macro (aliasing to pixman_f_transform) had been
removed in Xorg headers. Thus, we should use pixman_f_transform directly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
As the color management properties are optional, this commit
handles these properties individually
Reviewed-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Uday Kiran Pichika <udaykiran.pichika@amd.com>
As of kernel commit 1ca67aba8d11 ("drm/amd/display: only accept async
flips for fast updates"), we reject async flips that used to be silently
degraded to vsync. However, this causes issues for VRR if TearFree isn't
enabled, in particular we have seen that VRR fails to engage on a
handful of tested applications and in one case we even observed an
application soft hang. So, if TearFree is set to auto we should enable
it if VariableRefresh is enabled and we should warn users if they try to
enable VariableRefresh while TearFree is disabled.
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
`drmmode_set_mode` can segfault if a USB-C dock with external monitors
is disconnected during suspend. It appears that some data structures are
not updated, but the associated `drmModeConnectorPtr` associated with
those structures is NULL. Dereferencing that pointer results in Xorg
crashing.
Backtrace:
(crtc=crtc@entry=0x55a0c7610390, fb=fb@entry=0x55a0c86d7410, mode=mode@entry=0x55a0c76103a8, x=x@entry=0, y=y@entry=0) at drmmode_display.c:1267
(crtc=0x55a0c7610390, mode=0x55a0c76103a8, rotation=<optimized out>, x=<optimized out>, y=<optimized out>) at drmmode_display.c:1371
(main=main@entry=0x55a0c63f4b40, argc=argc@entry=10, argv=argv@entry=0x7fffb7cefbf8)
at ../sysdeps/nptl/libc_start_call_main.h:58
(main=0x55a0c63f4b40, argc=10, argv=0x7fffb7cefbf8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffb7cefbe8) at ../csu/libc-start.c:381
Fix this by checking the pointer before dereferencing it.
Fixes: https://gitlab.freedesktop.org/drm/amd/-/issues/2375
Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
This patch adds the PCI-hotplug handler driver name in the
DDX config file with respect to Xorg commit:82bf391c
Cc: Alexander Deucher <alexander.deucher@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Commit e39a3ee07c
tries to reintroduce the RandR primary output as a tie breaker
in amdgpu_crtc_covering_box(), but that function wrongly
assigns a void* devPrivate, which is actually a xf86CrtcPtr,
to the RRCrtcPtr primary_crtc, a pointer target type mismatch!
This causes a later pointer comparison of primary_crtc with
RRCrtcPtr crtc to always fail, so that the user selected
primary output can not ever successfully act as a tie-breaker
when multiple candidate crtcs cover the same box area,
defeating the whole purpose of that commit! Not sure how
this failure could have ever evaded any basic testing.
Fix this trivially by assigning the right variable.
Successfully tested on a multi-display setup, verifying
that the primary output now works as tie breaker as
intended.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Fixes: e39a3ee07c ("Prefer crtc of primary output for synchronization when screen has to crtcs with the same coverage")
[why]
On RHEL9+, xorg-server.pc shows that the Xorg no longer depends on dri,
and dri.pc provides "/opt/amdgpu/include" path for pkg-config, this
cause pkg-config no longer output "-I/opt/amdgpu/include", consequently
the configure can't find gbm.h and HAVE_GBM_BO_USE_LINEAR is not
declared, that cause the corruption.
[how]
Since the gbm.pc also provides the "/opt/amdgpu/include" path, in module
dependence checking, GBM_CFLAGS get this path, so just explicitly add
GBM_CFLAGS into CPPFLAGS can fix this issue.
Signed-off-by: tiancyin <tianci.yin@amd.com>
Some laptops have the external outputs routed to dGPU, when the external
output over dGPU is the only display in reverse prime mode, we need
present extension so fake CRTC won't be used.
This is commit is removing obsolete switch done in
xf86-video-ati at sha 61d0aec40e2521488c2fe43e7a6823e5c87d94d7: video: add option to include disabled CRTCs in best CRTC search
This is not required anymore as with commit done in
xorg-server at sha 5c5c1b77982a9af7279a90bc3c2be48adaa9c778: present: Add Present extension
That in case of lack of crtc is using fake_crtc with render 1Hz frequency
When consider_disabled is removed then amdgpu_pick_best_crtc is doing the same what rr_crtc_covering_box is doing
so it can be reimplemented to reuse that function.
Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
Signed-off-by: Shashank Sharma <contactshashanksharma@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
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>
If crtc scanout create successfully, the function of
drmmode_crtc_scanout_create should return TURE.
This will fix the regression caused by commit: "Make
drmmode_crtc_scanout_create/destroy static" (442efe73), as it will
result to some function (such as drmmode_set_scanout_pixmap) go to wrong
code path and result to NULL pointer.
Fixes: 442efe73 ("Make drmmode_crtc_scanout_create/destroy static")
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>