drm: Change order to turn off the crtc and plane with fb cleanup
Subsystems (2)
PATCH 1/1 drm: Change order to turn off the crtc and plane with fb cleanup
Ths plane is enabled after the crtc is setted first, so first turn off the plane than the crtc. If not, it can occur some side effects because it may have to use any information of crtc when turns off the plane.
Signed-off-by Joonyoung Shim <[email protected]>
Signed-off-by Kyungmin Park <[email protected]>
--- drivers/gpu/drm/drm_crtc.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
drivers/gpu/drm/drm_crtc.c +9 -9
@@ -329,6 +329,15 @@ void drm_framebuffer_cleanup(struct drm_framebuffer *fb)struct drm_mode_set set;int ret; +list_for_each_entry (plane, &dev->mode_config.plane_list, head) { +if (plane->fb == fb) { +/* should turn off the plane */ + ret = plane->funcs->disable_plane (plane); +if (ret) +DRM_ERROR ("failed to disable plane with busy fb\n" ); + } + } +/* remove from any CRTC */ list_for_each_entry (crtc, &dev->mode_config.crtc_list, head) {if (crtc->fb == fb) {
@@ -342,15 +351,6 @@ void drm_framebuffer_cleanup(struct drm_framebuffer *fb) } } -list_for_each_entry (plane, &dev->mode_config.plane_list, head) { -if (plane->fb == fb) { -/* should turn off the crtc */ - ret = plane->funcs->disable_plane (plane); -if (ret) -DRM_ERROR ("failed to disable plane with busy fb\n" ); - } - } -drm_mode_object_put (dev, &fb->base);list_del (&fb->head); dev->mode_config.num_fb--;
Signature · 1 line
1.7.5.4