pipe-loader: fallback to zink instead of kmsro for render nodes
In the case that a Wayland compositor is ran with kmsro, the render driver node will be passed to the client instead of the display node. With Zink being able to use with KMSRO, now we cannot expect the render driver node to from be a known driver name. Fallback render nodes with unknown driver names to Zink instead of KMSRO, because KMSRO on non-KMS FD is meaningless. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Reviewed-By: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38810>
This commit is contained in:
parent
2c62256ca9
commit
adf18abb40
1 changed files with 6 additions and 2 deletions
|
|
@ -172,10 +172,14 @@ pipe_loader_drm_probe_fd_nodup(struct pipe_loader_device **dev, int fd, bool zin
|
|||
if (strcmp(ddev->base.driver_name, "vgem") == 0)
|
||||
goto fail;
|
||||
|
||||
/* kmsro supports lots of drivers, try as a fallback */
|
||||
if (!ddev->dd && !zink)
|
||||
/* kmsro supports lots of drivers, try as a fallback for primary nodes */
|
||||
if (!ddev->dd && !zink && drmGetNodeTypeFromFd(fd) == DRM_NODE_PRIMARY)
|
||||
ddev->dd = get_driver_descriptor("kmsro");
|
||||
|
||||
/* Try zink for unknown render nodes */
|
||||
if (!ddev->dd && drmGetNodeTypeFromFd(fd) == DRM_NODE_RENDER)
|
||||
ddev->dd = get_driver_descriptor("zink");
|
||||
|
||||
if (!ddev->dd)
|
||||
goto fail;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue