diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2019-07-20 09:41:23 -0300 |
---|---|---|
committer | Ezequiel Garcia <ezequiel@collabora.com> | 2019-07-30 11:07:03 -0300 |
commit | f632b23a528ed6b4e1fddd774db005c30ab65568 (patch) | |
tree | 226882275b78abe3552ba0b4702b53ad16cc1abb /kmscube.c | |
parent | e888ea1d233b2639b87a68e099d18d4e919905df (diff) | |
download | kmscube-f632b23a528ed6b4e1fddd774db005c30ab65568.tar.gz |
drm: Find a proper modeset device, is none is provided
Instead of having a fixed /dev/dri/card0 default, iterate
over primary devices until one with modeset capabilities
is found.
This is quite useful when a render-only driver
(such as lima or panfrost) was registered before the modeset
driver, taking over /dev/dri/card0.
While here, add a warning for devices explicitly set via -D,
by checking if they look like a modeset device.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'kmscube.c')
-rw-r--r-- | kmscube.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -76,7 +76,7 @@ static void usage(const char *name) int main(int argc, char *argv[]) { - const char *device = "/dev/dri/card0"; + const char *device = NULL; const char *video = NULL; char mode_str[DRM_DISPLAY_MODE_LEN] = ""; char *p; |