From a0a4c0238026b24ac7ace5919132921160673ce2 Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Wed, 20 Feb 2019 17:48:22 +0100 Subject: kmscube: add command-line selection of video mode The mode of type "DRM_MODE_TYPE_PREFERED" can be miss-configured, making kmscube not working. Plus, user could need to test the other available video modes at the connector. Add a command line flag to specify the video mode. If the mode is not present, print an informative message and fall-back to the default behaviour (preferred mode or highest resolution mode). Signed-off-by: Antonio Borneo Reviewed-by: Emil Velikov --- drm-legacy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drm-legacy.c') diff --git a/drm-legacy.c b/drm-legacy.c index fd98a38..56a0fed 100644 --- a/drm-legacy.c +++ b/drm-legacy.c @@ -122,11 +122,11 @@ static int legacy_run(const struct gbm *gbm, const struct egl *egl) return 0; } -const struct drm * init_drm_legacy(const char *device) +const struct drm * init_drm_legacy(const char *device, const char *mode_str, unsigned int vrefresh) { int ret; - ret = init_drm(&drm, device); + ret = init_drm(&drm, device, mode_str, vrefresh); if (ret) return NULL; -- cgit v1.2.1