[PATCH 2/2] drm/i915: no interruptible locking for dma_buf->map

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

 



It's unclear whether ->map is allowed to fail with -EINTR, but
looking at current callers it's pretty clear that they don't
expect this to happen. So use a blocking mutex_lock call. Since
we don't wait for the gpu in our ->map callback the lack of the
gpu hang checks doesn't matter.

Furthermore the goal is to eventually have per dma-buf locking done
by callers with ww mutexes, so this will then be removed.

Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
---
 drivers/gpu/drm/i915/i915_gem_dmabuf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
index f7e1682..63c0818 100644
--- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
@@ -35,9 +35,7 @@ static struct sg_table *i915_gem_map_dma_buf(struct dma_buf_attachment *attachme
 	struct scatterlist *src, *dst;
 	int ret, i;
 
-	ret = i915_mutex_lock_interruptible(obj->base.dev);
-	if (ret)
-		return ERR_PTR(ret);
+	mutex_lock(&obj->base.dev->struct_mutex);
 
 	ret = i915_gem_object_get_pages(obj);
 	if (ret) {
-- 
1.8.3.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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