OSDN Git Service

drm/omap: gem: Fix mm_list locking
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 25 May 2018 16:39:24 +0000 (19:39 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 28 Jun 2018 10:41:05 +0000 (13:41 +0300)
commit5117bd898e8c0a31e8ab3a9b8523aecf0706e997
tree5003d035c44116983a819d10d3a93ffab46ad86e
parent3cbd0c587b129beaefb1405bbe43831e6bc9461e
drm/omap: gem: Fix mm_list locking

- None of the list walkings where protected.

- Switch to a mutex since the list walking at device resume time can
  sleep when pinning buffers through the tiler.

Only thing we need to be careful with here is that while we walk the
list we can't unreference any gem objects, since the final unref would
result in a recursive deadlock. But the only functions that walk the
list is the device resume and debugfs dumping, so all safe.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_debugfs.c
drivers/gpu/drm/omapdrm/omap_drv.c
drivers/gpu/drm/omapdrm/omap_drv.h
drivers/gpu/drm/omapdrm/omap_gem.c