Skip to content
Snippets Groups Projects
Commit 54adda6a authored by Tomeu Vizoso's avatar Tomeu Vizoso
Browse files

st/dri: Allow kms_swrast to work without a device FD


A KMS device isn't strictly needed for the kms_swrast to work, so stop
failing to init if the FD is -1. Also don't call DRM_IOCTL_GET_CAP in
that case.

This allows the driver to be used in machines where no KMS device at all
is present.

Signed-off-by: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
parent 2f63b3dd
No related branches found
No related tags found
No related merge requests found
Loading
  • With these in place one ends up (most or less) with drisw_init_screen().

    Major difference is that the latter uses the DRISW winsys. Maybe we'd want something like null_swrast_dri.so - or although it would be much better of explicitly request the winsys we'd want to use without making one extra module for each possible winsys.

    As-is things look very hacky. kms_swrast was introduced because you need an actual KMS device for its dumb buffers.

    Edit: Thinking about "explicitly request the winsys" suggestion, the following came to mind:

    Introduce createNewScreen3/selectWinsysType or other entry point to the __DRI_SWRAST extension that allows one to say "I want null/kms/dri/wrapper winsys". Then frontends like EGL/surfaceless can explicitly request the null one.

    Edited by Emil Velikov
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment