[PATCH v6 09/11] modesetting: Blacklist UDL from PRIME sync
Alex Goins
agoins at nvidia.com
Sat Jun 11 00:21:03 UTC 2016
UDL (USB 2.0 DisplayLink DRM driver) has strange semantics when it comes to
vblank events and damage tracking when page flipping.
When doing a page flip, it will instantly raise a vblank event without
waiting for vblank. However, it has no support for DRM_IOCTL_WAIT_VBLANK.
It also seems to have some issues with damage tracking when page flipping.
It's possible to get something semi-working by hacking around these issues,
but even then there isn't much value-add vs single buffered PRIME, and it
reduces maintainability and adds additional risks to the modesetting driver
when running with more well-behaved DRM drivers.
Work needs to be done on UDL in order to properly support synchronized
PRIME. For now, just blacklist it, causing RandR to fall back to
unsynchronized PRIME.
v1: N/A
v2: N/A
v3: Initial commit
v4: Move check to driver.c for consistency/visibility
v5: Refactor to accomodate earlier changes
v6: Rebase onto ToT
Signed-off-by: Alex Goins <agoins at nvidia.com>
---
hw/xfree86/drivers/modesetting/driver.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index ab3b028..f7abd1e 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -974,6 +974,7 @@ msEnableSharedPixmapFlipping(RRCrtcPtr crtc, PixmapPtr front, PixmapPtr back)
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
modesettingPtr ms = modesettingPTR(scrn);
xf86CrtcPtr xf86Crtc = crtc->devPrivate;
+ drmVersionPtr version;
if (!xf86Crtc)
return FALSE;
@@ -986,6 +987,12 @@ msEnableSharedPixmapFlipping(RRCrtcPtr crtc, PixmapPtr front, PixmapPtr back)
if (ms->drmmode.reverse_prime_offload_mode)
return FALSE;
+ version = drmGetVersion(ms->drmmode.fd);
+
+ /* UDL has several issues that prevent double buffering */
+ if (!strncmp("udl", version->name, version->name_len))
+ return FALSE;
+
return drmmode_EnableSharedPixmapFlipping(xf86Crtc, &ms->drmmode,
front, back);
}
--
1.9.1
More information about the xorg-devel
mailing list