Re: [PATCH] drm/i915/gem: Early rejection of no-aperture map_ggtt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 05/11/2019 16.53, Chris Wilson wrote:
> If the device does not have an aperture through which we can indirectly
> access and detile the buffers, simply reject the ioctl. Later we can
> extend the ioctl to support different modes, but as an extension the
> user must opt in and explicitly control the mmap type (viz
> MMAP_OFFSET_IOCTL).

Reviewed-by: Abdiel Janulgue <abdiel.janulgue@xxxxxxxxxxxxxxx>

> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Abdiel Janulgue <abdiel.janulgue@xxxxxxxxxxxxxxx>
> Cc: Matthew Auld <matthew.auld@xxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_mman.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index e3002849844b..d60973603cc1 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -450,6 +450,9 @@ i915_gem_mmap_gtt(struct drm_file *file,
>  	struct drm_i915_gem_object *obj;
>  	int ret;
>  
> +	if (!i915_ggtt_has_aperture(&to_i915(dev)->ggtt))
> +		return -ENODEV;
> +
>  	obj = i915_gem_object_lookup(file, handle);
>  	if (!obj)
>  		return -ENOENT;
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux