提交 f7c5f5d9 编写于 作者: T Tomi Valkeinen

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: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 f36eb5a8
...@@ -71,6 +71,10 @@ static void omap_plane_unpin_worker(struct drm_flip_work *work, void *val) ...@@ -71,6 +71,10 @@ static void omap_plane_unpin_worker(struct drm_flip_work *work, void *val)
container_of(work, struct omap_plane, unpin_work); container_of(work, struct omap_plane, unpin_work);
struct drm_device *dev = omap_plane->base.dev; struct drm_device *dev = omap_plane->base.dev;
/*
* omap_framebuffer_pin/unpin are always called from priv->wq,
* so there's no need for locking here.
*/
omap_framebuffer_unpin(val); omap_framebuffer_unpin(val);
mutex_lock(&dev->mode_config.mutex); mutex_lock(&dev->mode_config.mutex);
drm_framebuffer_unreference(val); drm_framebuffer_unreference(val);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册