summaryrefslogtreecommitdiff
path: root/drm-legacy.c
diff options
context:
space:
mode:
authorAntonio Borneo <antonio.borneo@st.com>2019-02-20 17:48:22 +0100
committerAntonio Borneo <borneo.antonio@gmail.com>2019-07-23 15:11:17 +0200
commita0a4c0238026b24ac7ace5919132921160673ce2 (patch)
tree6cadb13be7617d0628797c7769cdb0fae46441d8 /drm-legacy.c
parenta09d38f94e27dcc5fe52adf99404c821028e3e9d (diff)
downloadkmscube-a0a4c0238026b24ac7ace5919132921160673ce2.tar.gz
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 <antonio.borneo@st.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'drm-legacy.c')
-rw-r--r--drm-legacy.c4
1 files changed, 2 insertions, 2 deletions
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;