[Intel-gfx] [PATCH] uapi/drm/i915_drm.h: fix userspace compilation.

Ville Syrjälä ville.syrjala at linux.intel.com
Wed Sep 2 04:52:19 PDT 2015


On Wed, Sep 02, 2015 at 01:41:18PM +0200, Artem Savkov wrote:
> Patch "drm/i915: Use expcitly fixed type in compat32 structs" changed the type
> of param field in drm_i915_getparam from int to s32. This header is exported to
> userspace and needs to use userspace type __s32 instead.
> 
> This fixes userspace compilation errors like the following:
> include/drm/i915_drm.h:361:2: error: unknown type name 's32'
>   s32 param;
> 
> Signed-off-by: Artem Savkov <asavkov at redhat.com>
> ---
>  include/uapi/drm/i915_drm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index dbd16a2..fd5aa47 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -358,7 +358,7 @@ typedef struct drm_i915_irq_wait {
>  #define I915_PARAM_HAS_RESOURCE_STREAMER 36
>  
>  typedef struct drm_i915_getparam {
> -	s32 param;
> +	__s32 param;

Hmm. I don't understand why this one in particular got changed to s32
when there are other ioctl structs still using int.

>  	/*
>  	 * WARNING: Using pointers instead of fixed-size u64 means we need to write
>  	 * compat32 code. Don't repeat this mistake.
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list