--- xorg-server-1.20.3/hw/xfree86/drivers/modesetting/driver.c
+++ xorg-server-1.20.3/hw/xfree86/drivers/modesetting/driver.c
@@ -1528,6 +1528,10 @@
     if (ms->fd_passed)
         return TRUE;

+    ret = drmIsMaster(ms->fd);
+    if (ret)
+      return TRUE;
+
     ret = drmSetMaster(ms->fd);
     if (ret)
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "drmSetMaster failed: %s\n",

