|
@@ -85,9 +85,17 @@ static void i915_gem_unmap_dma_buf(struct dma_buf_attachment *attachment,
|
|
|
struct sg_table *sg,
|
|
|
enum dma_data_direction dir)
|
|
|
{
|
|
|
+ struct drm_i915_gem_object *obj = attachment->dmabuf->priv;
|
|
|
+
|
|
|
+ mutex_lock(&obj->base.dev->struct_mutex);
|
|
|
+
|
|
|
dma_unmap_sg(attachment->dev, sg->sgl, sg->nents, dir);
|
|
|
sg_free_table(sg);
|
|
|
kfree(sg);
|
|
|
+
|
|
|
+ i915_gem_object_unpin_pages(obj);
|
|
|
+
|
|
|
+ mutex_unlock(&obj->base.dev->struct_mutex);
|
|
|
}
|
|
|
|
|
|
static void i915_gem_dmabuf_release(struct dma_buf *dma_buf)
|