[Intel-gfx] [PATCH i-g-t 1/2] igt_kms: Set atomic capability bit

Daniel Vetter daniel at ffwll.ch
Fri Oct 23 01:05:59 PDT 2015


On Thu, Oct 22, 2015 at 05:27:00PM -0700, Matt Roper wrote:
> 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 at intel.com>
> ---
>  lib/igt_kms.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 51d735d..53bfc20 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -984,6 +984,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

Just bumb the libdrm requirement in configure.ac imo.
-Daniel

> +	drmSetClientCap(drm_fd, DRM_CLIENT_CAP_ATOMIC, 1);
> +#endif
>  	plane_resources = drmModeGetPlaneResources(display->drm_fd);
>  	igt_assert(plane_resources);
>  
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list