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

2017-06-23 Thread Chris Wilson
Quoting Daniel Vetter (2017-06-23 12:02:53) > On Thu, Jun 22, 2017 at 02:46:17PM +0100, Chris Wilson wrote: > > + /* Flush the object from the CPU cache so that importers can rely > > + * on coherent indirect access via the exported dma-address. > > + */ > > drm_clflush_pages(pa

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

2017-06-23 Thread Daniel Vetter
On Fri, Jun 23, 2017 at 01:02:53PM +0200, Daniel Vetter wrote: > Anyway looks all good, will push to drm-misc-fixes. Correction, pushed to -misc-next because it conflicts with the dma-buf import stuff from Laura and other bits. If you want it in -fixes I need a backport. I left the cc: stable in j

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

2017-06-23 Thread Daniel Vetter
On Thu, Jun 22, 2017 at 02:46:17PM +0100, Chris Wilson wrote: > When the caller maps their dmabuf and we return an sg_table, the caller > doesn't expect the pages beneath that sg_table to vanish on a whim (i.e. > under mempressure). The contract is that the pages are pinned for the > duration of th

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

2017-06-22 Thread Chris Wilson
When the caller maps their dmabuf and we return an sg_table, the caller doesn't expect the pages beneath that sg_table to vanish on a whim (i.e. under mempressure). The contract is that the pages are pinned for the duration of the mapping (from dma_buf_map_attachment() to dma_buf_unmap_attachment).