Looks like drmModeDirtyFB() stopped working at some point and we now call it with fb_id of zero for rotated displays. This will stop displays relying on DRM_IOCTL_MODE_DIRTYFB ioctl to display anything.
This regression probably with commit 3dcd591fa9b7 ("modesetting: Add support for using RandR shadow buffers") that inroduced rotate_fb_id. Let's fix this issue by going through all the displays. Cc: Hans De Goede <hdego...@redhat.com> Cc: Jason Ekstrand <jason.ekstr...@intel.com> Cc: Keith Packard <kei...@keithp.com> Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Cc: Lyude Paul <ly...@redhat.com> Cc: Sebastian Reichel <sebastian.reic...@collabora.co.uk> Cc: Tomi Valkeinen <tomi.valkei...@ti.com> Signed-off-by: Tony Lindgren <t...@atomide.com> --- Here's this one resent with proper patch description, sorry for the delays sending it out. --- hw/xfree86/drivers/modesetting/driver.c | 41 +++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -531,12 +531,11 @@ dispatch_dirty_region(ScrnInfoPtr scrn, } static void -dispatch_dirty(ScreenPtr pScreen) +dispatch_dirty_fb_id(ScreenPtr pScreen, int fb_id) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(scrn); PixmapPtr pixmap = pScreen->GetScreenPixmap(pScreen); - int fb_id = ms->drmmode.fb_id; int ret; ret = dispatch_dirty_region(scrn, pixmap, ms->damage, fb_id); @@ -547,7 +546,43 @@ dispatch_dirty(ScreenPtr pScreen) ms->damage = NULL; xf86DrvMsg(scrn->scrnIndex, X_INFO, "Disabling kernel dirty updates, not required.\n"); - return; + } +} + +static void +dispatch_dirty(ScreenPtr pScreen) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + modesettingPtr ms = modesettingPTR(scrn); + modesettingEntPtr ms_ent = ms_ent_priv(scrn); + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); + xf86CrtcPtr crtc; + drmmode_crtc_private_ptr drmmode_crtc; + unsigned int mask; + + mask = ms_ent->assigned_crtcs; + + while (mask) { + int i, fb_id = 0; + + i = ffs(mask) - 1; + + crtc = xf86_config->crtc[i]; + if (!ms_crtc_on(crtc)) + goto skip; + + drmmode_crtc = crtc->driver_private; + + if (drmmode_crtc->rotate_fb_id) + fb_id = drmmode_crtc->rotate_fb_id; + else + fb_id = ms->drmmode.fb_id; + + if (fb_id) + dispatch_dirty_fb_id(pScreen, fb_id); + + skip: + mask &= ~(1 << i); } } -- 2.17.1 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel