drm: disconnect plane from fb/crtc when disabled
authorRob Clark <rob@ti.com>
Wed, 14 Dec 2011 02:19:35 +0000 (20:19 -0600)
committerDave Airlie <airlied@redhat.com>
Thu, 5 Jan 2012 09:24:39 +0000 (09:24 +0000)
Since plane->fb and plane->crtc are set in drm_mode_setplane()
after update_plane(), They should be cleared after disable().

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c

index f259a256320427acce898aa81efd3ad8270e89ef..7710bcb4bd8d7d5403ed80bb5124901ea0100759 100644 (file)
@@ -348,6 +348,9 @@ void drm_framebuffer_cleanup(struct drm_framebuffer *fb)
                        ret = plane->funcs->disable_plane(plane);
                        if (ret)
                                DRM_ERROR("failed to disable plane with busy fb\n");
+                       /* disconnect the plane from the fb and crtc: */
+                       plane->fb = NULL;
+                       plane->crtc = NULL;
                }
        }