[PATCH xserver] xf86-video-modesetting: Lease planes as well if using atomic
Keith Packard
keithp at keithp.com
Tue Jun 26 23:34:29 UTC 2018
If we're using atomic modesetting, then we're also using universal
planes, and so the lease we create needs to include the plane.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 859a21a9d..dbb885e8e 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -3251,6 +3251,9 @@ drmmode_create_lease(RRLeasePtr lease, int *fd)
nobjects = ncrtc + noutput;
+ if (ms->atomic_modeset)
+ nobjects += ncrtc;
+
if (nobjects == 0)
return BadValue;
@@ -3267,12 +3270,14 @@ drmmode_create_lease(RRLeasePtr lease, int *fd)
i = 0;
- /* Add CRTC ids */
+ /* Add CRTC and plane ids */
for (c = 0; c < ncrtc; c++) {
xf86CrtcPtr crtc = lease->crtcs[c]->devPrivate;
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
objects[i++] = drmmode_crtc->mode_crtc->crtc_id;
+ if (ms->atomic_modeset)
+ objects[i++] = drmmode_crtc->plane_id;
}
/* Add connector ids */
--
2.17.1
More information about the xorg-devel
mailing list