[Mesa-dev] [Intel-gfx] [PATCH] drm/i915: Add I915_PARAM_MMAP_GTT_VERSION to advertise unlimited mmaps

Daniel Vetter daniel at ffwll.ch
Thu Aug 25 07:02:06 UTC 2016


On Wed, Aug 24, 2016 at 08:42:43PM +0100, Chris Wilson wrote:
> Now that we have working partial VMA and faulting support for all
> objects, including fence support, advertise to userspace that it can
> take advantage of unlimited GGTT mmaps.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 8 ++++++++
>  include/uapi/drm/i915_drm.h     | 1 +
>  2 files changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index fc9273215286..5b2c56777b75 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -355,6 +355,14 @@ static int i915_getparam(struct drm_device *dev, void *data,
>  	case I915_PARAM_MIN_EU_IN_POOL:
>  		value = INTEL_INFO(dev)->min_eu_in_pool;
>  		break;
> +	case I915_PARAM_MMAP_GTT_VERSION:
> +		/* 0 - Objects have to be smaller than aperture,
> +		 *     all simultaneous users have to fit within the
> +		 *     available space within the aperture.
> +		 * 1 - Objects can any size, and X,Y or untiled

can _have_

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> +		 */
> +		value = 1;
> +		break;
>  	default:
>  		DRM_DEBUG("Unknown parameter %d\n", param->param);
>  		return -EINVAL;
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 5501fe83ed92..03725fe89859 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -387,6 +387,7 @@ typedef struct drm_i915_irq_wait {
>  #define I915_PARAM_HAS_EXEC_SOFTPIN	 37
>  #define I915_PARAM_HAS_POOLED_EU	 38
>  #define I915_PARAM_MIN_EU_IN_POOL	 39
> +#define I915_PARAM_MMAP_GTT_VERSION	 40
>  
>  typedef struct drm_i915_getparam {
>  	__s32 param;
> -- 
> 2.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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


More information about the mesa-dev mailing list