[PATCH] Learn about rmfb && getplane timings

Arkadiusz Hiler arkadiusz.hiler at intel.com
Mon Aug 26 10:53:07 UTC 2019


Seems like 5 seconds of wait_on did not do the trick. Let's see whether
rmfb actually triggers before getplane.

https://bugs.freedesktop.org/show_bug.cgi?id=106008
Test-with: 20190823085614.28649-1-arkadiusz.hiler at intel.com
---
 drivers/gpu/drm/drm_framebuffer.c | 6 +++++-
 drivers/gpu/drm/drm_plane.c       | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 57564318ceea..005aa2fadbf2 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -937,12 +937,16 @@ static void legacy_remove_fb(struct drm_framebuffer *fb)
 			/* should turn off the crtc */
 			if (drm_crtc_force_disable(crtc))
 				DRM_ERROR("failed to reset crtc %p when fb was deleted\n", crtc);
+
+			DRM_INFO("fb was deleted, crtc's fb set to %p\n", crtc->primary->fb);
 		}
 	}
 
 	drm_for_each_plane(plane, dev) {
-		if (plane->fb == fb)
+		if (plane->fb == fb) {
 			drm_plane_force_disable(plane);
+			DRM_INFO("fb was deleted, plane's fb set to %p\n", plane->fb);
+		}
 	}
 	drm_modeset_unlock_all(dev);
 }
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index d6ad60ab0d38..cf74f74c910e 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -539,6 +539,8 @@ int drm_mode_getplane(struct drm_device *dev, void *data,
 		plane_resp->fb_id = 0;
 	drm_modeset_unlock(&plane->mutex);
 
+	DRM_INFO("drm_mode_getplane: plane %d, fb_id %d\n", plane_resp->plane_id, plane_resp->fb_id);
+
 	plane_resp->plane_id = plane->base.id;
 	plane_resp->possible_crtcs = drm_lease_filter_crtcs(file_priv,
 							    plane->possible_crtcs);
-- 
2.21.0



More information about the Intel-gfx-trybot mailing list