diff options
Diffstat (limited to 'drivers/gpu/drm/udl/udl_dmabuf.c')
| -rw-r--r-- | drivers/gpu/drm/udl/udl_dmabuf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/udl/udl_dmabuf.c b/drivers/gpu/drm/udl/udl_dmabuf.c index 2867ed155ff6..0a20695eb120 100644 --- a/drivers/gpu/drm/udl/udl_dmabuf.c +++ b/drivers/gpu/drm/udl/udl_dmabuf.c | |||
| @@ -76,6 +76,7 @@ static struct sg_table *udl_map_dma_buf(struct dma_buf_attachment *attach, | |||
| 76 | struct udl_drm_dmabuf_attachment *udl_attach = attach->priv; | 76 | struct udl_drm_dmabuf_attachment *udl_attach = attach->priv; |
| 77 | struct udl_gem_object *obj = to_udl_bo(attach->dmabuf->priv); | 77 | struct udl_gem_object *obj = to_udl_bo(attach->dmabuf->priv); |
| 78 | struct drm_device *dev = obj->base.dev; | 78 | struct drm_device *dev = obj->base.dev; |
| 79 | struct udl_device *udl = dev->dev_private; | ||
| 79 | struct scatterlist *rd, *wr; | 80 | struct scatterlist *rd, *wr; |
| 80 | struct sg_table *sgt = NULL; | 81 | struct sg_table *sgt = NULL; |
| 81 | unsigned int i; | 82 | unsigned int i; |
| @@ -112,7 +113,7 @@ static struct sg_table *udl_map_dma_buf(struct dma_buf_attachment *attach, | |||
| 112 | return ERR_PTR(-ENOMEM); | 113 | return ERR_PTR(-ENOMEM); |
| 113 | } | 114 | } |
| 114 | 115 | ||
| 115 | mutex_lock(&dev->struct_mutex); | 116 | mutex_lock(&udl->gem_lock); |
| 116 | 117 | ||
| 117 | rd = obj->sg->sgl; | 118 | rd = obj->sg->sgl; |
| 118 | wr = sgt->sgl; | 119 | wr = sgt->sgl; |
| @@ -137,7 +138,7 @@ static struct sg_table *udl_map_dma_buf(struct dma_buf_attachment *attach, | |||
| 137 | attach->priv = udl_attach; | 138 | attach->priv = udl_attach; |
| 138 | 139 | ||
| 139 | err_unlock: | 140 | err_unlock: |
| 140 | mutex_unlock(&dev->struct_mutex); | 141 | mutex_unlock(&udl->gem_lock); |
| 141 | return sgt; | 142 | return sgt; |
| 142 | } | 143 | } |
| 143 | 144 | ||
