Learn about rmfb && getplane timings

Submitted by Arkadiusz Hiler on Aug. 26, 2019, 10:53 a.m.

Details

Message ID 20190826105307.13830-1-arkadiusz.hiler@intel.com
State New
Headers show
Series "Learn about rmfb && getplane timings" ( rev: 1 ) in Intel GFX - Try Bot

Browsing this patch as part of:
"Learn about rmfb && getplane timings" rev 1 in Intel GFX - Try Bot
<< prev patch [1/1] next patch >>

Commit Message

Arkadiusz Hiler Aug. 26, 2019, 10:53 a.m.
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@intel.com
---
 drivers/gpu/drm/drm_framebuffer.c | 6 +++++-
 drivers/gpu/drm/drm_plane.c       | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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);