mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-21 01:13:38 +00:00
modesetting: Fix RandR output leasing while TearFree is enabled.
Since commita94dd9536("modesetting: add support for TearFree page flips"), whenever TearFree and PageFlip is simultaneously enabled (which is the default now), the driver does enable DRM universal plane support, just as when atomic modesetting is enabled. Leasing RandR / DRM outputs with universal planes enabled requires also adding the drm_plane object to the set of leased objects, otherwise the drmModeCreateLease() ioctl will fail. Adding a drm_plane object under this condition was omitted, so fix this omission, and thereby fix RandR output leasing. Fixes:a94dd9536("modesetting: add support for TearFree page flips") Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2332> (cherry picked from commitf37bd8de26)
This commit is contained in:
parent
9e3b288abf
commit
81e6f606a1
1 changed files with 6 additions and 2 deletions
|
|
@ -4074,11 +4074,15 @@ drmmode_create_lease(RRLeasePtr lease, int *fd)
|
|||
int lease_fd;
|
||||
uint32_t *objects;
|
||||
drmmode_lease_private_ptr lease_private;
|
||||
Bool universalplanes = FALSE;
|
||||
|
||||
nobjects = ncrtc + noutput;
|
||||
|
||||
if (ms->atomic_modeset)
|
||||
/* Atomic modesetting, or tearfree with pageflipping, enables universal planes */
|
||||
if (ms->atomic_modeset || (ms->drmmode.pageflip && ms->drmmode.tearfree_enable)) {
|
||||
universalplanes = TRUE;
|
||||
nobjects += ncrtc; /* account for planes as well */
|
||||
}
|
||||
|
||||
if (nobjects == 0)
|
||||
return BadValue;
|
||||
|
|
@ -4102,7 +4106,7 @@ drmmode_create_lease(RRLeasePtr lease, int *fd)
|
|||
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
|
||||
|
||||
objects[i++] = drmmode_crtc->mode_crtc->crtc_id;
|
||||
if (ms->atomic_modeset)
|
||||
if (universalplanes)
|
||||
objects[i++] = drmmode_crtc->plane_id;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue