From e976b868f2f77eddf7f61d52dfe2a23075ae272d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 19 Dec 2014 13:22:47 +0100 Subject: videomodes: Add video_get_ctfb_res_modes helper function Add a video_get_ctfb_res_modes() helper function, which uses video_get_video_mode() to parse the 'video-mode' environment variable and then looks up the matching mode in res_mode_init and returns the matching mode. Signed-off-by: Hans de Goede Acked-by: Anatolij Gustschin --- drivers/video/videomodes.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/video/videomodes.h') diff --git a/drivers/video/videomodes.h b/drivers/video/videomodes.h index 579c6850f7..02419cdeac 100644 --- a/drivers/video/videomodes.h +++ b/drivers/video/videomodes.h @@ -79,3 +79,8 @@ int video_get_params (struct ctfb_res_modes *pPar, char *penv); int video_get_video_mode(unsigned int *xres, unsigned int *yres, unsigned int *depth, unsigned int *freq, const char **options); + +void video_get_ctfb_res_modes(int default_mode, unsigned int default_depth, + const struct ctfb_res_modes **mode_ret, + unsigned int *depth_ret, + const char **options); -- cgit