summaryrefslogtreecommitdiff
path: root/kmscube.c
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2019-07-20 09:41:23 -0300
committerEzequiel Garcia <ezequiel@collabora.com>2019-07-30 11:07:03 -0300
commitf632b23a528ed6b4e1fddd774db005c30ab65568 (patch)
tree226882275b78abe3552ba0b4702b53ad16cc1abb /kmscube.c
parente888ea1d233b2639b87a68e099d18d4e919905df (diff)
downloadkmscube-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmscube.c b/kmscube.c
index 81803be..90de638 100644
--- a/kmscube.c
+++ b/kmscube.c
@@ -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;