diff options
author | Keith Packard <keithp@keithp.com> | 2018-06-26 16:34:29 -0700 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-07-03 13:07:38 -0400 |
commit | d83efc47b7a524b4f8d4a993c27a3e402a98fa7c (patch) | |
tree | 7ad39a435cf39c90c1b2341f38ba3a4f33b5c574 | |
parent | 4a11f66e4690f9e94dc61cb264f5ef78dbdb255a (diff) |
xf86-video-modesetting: Lease planes as well if using atomic
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@keithp.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
-rw-r--r-- | hw/xfree86/drivers/modesetting/drmmode_display.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 27b8d51a6..87814b9c8 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -3253,6 +3253,9 @@ drmmode_create_lease(RRLeasePtr lease, int *fd) nobjects = ncrtc + noutput; + if (ms->atomic_modeset) + nobjects += ncrtc; /* account for planes as well */ + if (nobjects == 0) return BadValue; @@ -3269,12 +3272,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 */ |