xserver: Branch 'master' - 2 commits
Adam Jackson
ajax at kemper.freedesktop.org
Tue Jul 3 17:09:55 UTC 2018
hw/xfree86/drivers/modesetting/driver.c | 3 +--
hw/xfree86/drivers/modesetting/drmmode_display.c | 7 ++++++-
2 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit d83efc47b7a524b4f8d4a993c27a3e402a98fa7c
Author: Keith Packard <keithp at keithp.com>
Date: Tue Jun 26 16:34:29 2018 -0700
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 at keithp.com>
Reviewed-by: Daniel Stone <daniels at collabora.com>
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 */
commit 4a11f66e4690f9e94dc61cb264f5ef78dbdb255a
Author: Keith Packard <keithp at keithp.com>
Date: Tue Jun 26 14:05:31 2018 -0700
xf86-video-modesetting: Don't enable UNIVERSAL_PLANES separately
We don't want universal_planes unless we're using atomic APIs for
modesetting, and the kernel already enables universal_planes
automatically when atomic is enabled.
If we enable universal_planes when we're not using atomic, then we
won't have selected a plane for each crtc, and this will break lease
creation which requires planes for each output when universal_planes
is enabled.
Signed-off-by: Keith Packard <keithp at keithp.com>
Reviewed-by: Daniel Stone <daniels at collabora.com>
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index 6f4637254..a4912a971 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -1034,8 +1034,7 @@ PreInit(ScrnInfoPtr pScrn, int flags)
#endif
}
- ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
- ret |= drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1);
+ ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1);
ms->atomic_modeset = (ret == 0);
ms->kms_has_modifiers = FALSE;
More information about the xorg-commit
mailing list