mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/tegra: fix locking of SET_TILING ioctl
@ 2015-11-12  7:09 Alexandre Courbot
  2015-11-17 10:02 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Courbot @ 2015-11-12  7:09 UTC (permalink / raw)
  To: Thierry Reding, Terje Bergstrom
  Cc: dri-devel, linux-tegra, linux-kernel, gnurou, Alexandre Courbot

drm_gem_object_unreference() now expects obj->dev->struct_mutex to be
held. Use the newly-introduced drm_gem_object_unreference_unlocked()
which handles locking for us.

If we don't do this drm_gem_object_unreference() will get noisy about
struct_mutex not being held every time we call the SET_TILING ioctl.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 drivers/gpu/drm/tegra/drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index cc48334ef164..c0ae89865958 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -683,7 +683,7 @@ static int tegra_gem_set_tiling(struct drm_device *drm, void *data,
 	bo->tiling.mode = mode;
 	bo->tiling.value = value;
 
-	drm_gem_object_unreference(gem);
+	drm_gem_object_unreference_unlocked(gem);
 
 	return 0;
 }
-- 
2.6.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-19  4:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12  7:09 [PATCH] drm/tegra: fix locking of SET_TILING ioctl Alexandre Courbot
2015-11-17 10:02 ` Daniel Vetter
2015-11-19  4:52   ` Alexandre Courbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®