drm: omapdrm: Fix page flip race with CRTC disable
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 4 Mar 2015 16:24:18 +0000 (18:24 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 12 Jun 2015 19:52:46 +0000 (22:52 +0300)
commit0c19ac9d033eed734b0e38c9147a1c893c0e4b12
tree2c41ef6b8d01092a6468b69ed75d80629daf205f
parentc397cfd496f8b129a44962e84a9206afa0d7e431
drm: omapdrm: Fix page flip race with CRTC disable

We can't rely on crtc->primary->fb in the page flip worker, as a racing
CRTC disable (due for instance to an explicit framebuffer deletion from
userspace) would set that field to NULL before the worker gets a change
to run. Store the framebuffer queued for page flip in a new field of
omap_crtc instead, and hold a reference to it.

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