diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-09-03 15:25:57 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-03-24 07:33:25 -0400 |
commit | f7c5f5d9e25dc524f1cdc6cf821400ac29dae486 (patch) | |
tree | 6b9f6b01511f65f80c51f80db07648cb58301283 | |
parent | f36eb5a899d3ea57e3d167427260848e116e27a0 (diff) |
drm/omap: add a comment why locking is missing
unpin_worker() calls omap_framebuffer_unpin() without any locks, which
looks very suspicious. However, both pin and unpin are always called via
the driver's private workqueue, so the access is synchronized that way.
Add a comment to make this clear.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_plane.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index e03512c86bf8..6eedca107376 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c | |||
@@ -71,6 +71,10 @@ static void omap_plane_unpin_worker(struct drm_flip_work *work, void *val) | |||
71 | container_of(work, struct omap_plane, unpin_work); | 71 | container_of(work, struct omap_plane, unpin_work); |
72 | struct drm_device *dev = omap_plane->base.dev; | 72 | struct drm_device *dev = omap_plane->base.dev; |
73 | 73 | ||
74 | /* | ||
75 | * omap_framebuffer_pin/unpin are always called from priv->wq, | ||
76 | * so there's no need for locking here. | ||
77 | */ | ||
74 | omap_framebuffer_unpin(val); | 78 | omap_framebuffer_unpin(val); |
75 | mutex_lock(&dev->mode_config.mutex); | 79 | mutex_lock(&dev->mode_config.mutex); |
76 | drm_framebuffer_unreference(val); | 80 | drm_framebuffer_unreference(val); |