[RFC PATCH] modesetting: Check if crtc supports vblank during check_flip
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.
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.
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
@@ -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;
struct gbm_bo *gbm;
@@ -273,6 +275,9 @@ ms_present_check_flip(RRCrtcPtr crtc,
+ 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))
More information about the xorg-devel