[RFC PATCH] modesetting: Check if crtc supports vblank during check_flip

Deepak Rawat drawat at vmware.com
Fri Jul 5 20:12:11 UTC 2019


Present extension doesn't work for CRTC's which do not support vblank.

Hi,

While testing modesetting driver with vmware platform I realized it's
not working because vmwgfx doesn't support vblank. So this patch to add
check for vblank during check_flip. Also I see that when flip is
disabled drmModeDirtyFB is called which updates the screen, should the
behavior be same in case of flip? What I observed is that the "flip"
callback is not called.

I would really appreciate any help.

Thanks,

Signed-off-by: Deepak Rawat <drawat at vmware.com>
---
 hw/xfree86/drivers/modesetting/present.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c
index dda7cc064..1d0af711b 100644
--- a/hw/xfree86/drivers/modesetting/present.c
+++ b/hw/xfree86/drivers/modesetting/present.c
@@ -221,6 +221,8 @@ ms_present_check_flip(RRCrtcPtr crtc,
     ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
     modesettingPtr ms = modesettingPTR(scrn);
     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
+    xf86CrtcPtr xf86_crtc = crtc->devPrivate;
+    CARD64 ust, msc;
     int num_crtcs_on = 0;
     int i;
     struct gbm_bo *gbm;
@@ -273,6 +275,9 @@ ms_present_check_flip(RRCrtcPtr crtc,
     }
 #endif
 
+    if (ms_get_crtc_ust_msc(xf86_crtc, &ust, &msc) == BadMatch)
+        return FALSE;
+
     /* Make sure there's a bo we can get to */
     /* XXX: actually do this.  also...is it sufficient?
      * if (!glamor_get_pixmap_private(pixmap))
-- 
2.17.1



More information about the xorg-devel mailing list