Re: [PATCH] drm/vgem: Pin our pages for dmabuf exports

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

 



Quoting Chris Wilson (2017-06-22 14:30:08)
>  static void *vgem_prime_vmap(struct drm_gem_object *obj)
>  {
> +       struct drm_vgem_gem_object *bo = to_vgem_bo(obj);
>         long n_pages = obj->size >> PAGE_SHIFT;
>         struct page **pages;
>         void *addr;
>  
> -       pages = drm_gem_get_pages(obj);
> +       pages = vgem_pin_pages(bo);
>         if (IS_ERR(pages))
>                 return NULL;
>  
>         addr = vmap(pages, n_pages, 0, pgprot_writecombine(PAGE_KERNEL));
> -       drm_gem_put_pages(obj, pages, false, false);
> +
> +       vgem_unpin_pages(bo);

Ho hum, memory says vmap() itself doesn't pin the pages, so we need to
drop the pin on prime_vunamp.
-Chris
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux