]> git.baikalelectronics.ru Git - kernel.git/commit
drm: omapdrm: add lock for fb pinning
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 4 Jun 2015 07:56:33 +0000 (10:56 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 12 Jun 2015 19:52:51 +0000 (22:52 +0300)
commit2eb2d2049b5ff17df33d839839099a00d20687b3
tree023c263bb84ca62c897de1d75875a5ca5ba36283
parent14ca3ef6cbe552c720da966f02f88e25caf866bb
drm: omapdrm: add lock for fb pinning

Before atomic modesetting omap_framebuffer_pin() and
omap_framebuffer_unpin() were always called with modesetting locks
taken. With atomic modesetting support this is no longer the case, and
we need locking to protect the pin_count and the paddr, as multiple
threads may pin the same fb concurrently.

This patch adds a mutex to struct omap_framebuffer, and uses it in
omap_framebuffer_pin() and omap_framebuffer_unpin().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/omapdrm/omap_fb.c