diff mbox

[i-g-t,1/3] igt_kms: Set atomic capability bit

Message ID 1456834171-16304-2-git-send-email-lionel.g.landwerlin@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lionel Landwerlin March 1, 2016, 12:09 p.m. UTC
From: Matt Roper <matthew.d.roper@intel.com>

Tell the kernel that we understand atomic and want to have access to
atomic-only properties.  If the kernel doesn't support atomic for i915
yet (and i915.nuclear_pageflip=1 isn't passed on the kernel command
line) this will silently fail, but won't cause any problems.

We wrap this in an #ifdef to allow compilation on pre-atomic libdrm
versions as well.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 lib/igt_kms.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 90c8da7..7521e42 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1038,6 +1038,9 @@  void igt_display_init(igt_display_t *display, int drm_fd)
 	display->n_pipes = resources->count_crtcs;
 
 	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
+#ifdef DRM_CLIENT_CAP_ATOMIC
+	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1);
+#endif
 	plane_resources = drmModeGetPlaneResources(display->drm_fd);
 	igt_assert(plane_resources);