Re: [PATCH v2 3/7] drm/i915/lmem: support kernel mapping

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

 



Quoting Matthew Auld (2019-10-21 20:27:43)
> @@ -244,6 +247,13 @@ static void *i915_gem_object_map(const struct drm_i915_gem_object *obj,
>         pgprot_t pgprot;
>         void *addr;
>  
> +       if (i915_gem_object_is_lmem(obj)) {
> +               if (type != I915_MAP_WC)
> +                       return NULL;

return ERR_PTR(-EINVAL) or ERR_PTR(-ENODEV);

> +
> +               return i915_gem_object_lmem_io_map(obj, 0, obj->base.size);
> +       }
> +
>         /* A single page can always be kmapped */
>         if (n_pages == 1 && type == I915_MAP_WB)
>                 return kmap(sg_page(sgt->sgl));
_______________________________________________
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