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 <hdegoede@redhat.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
diff --git a/drivers/video/videomodes.h b/drivers/video/videomodes.h
index 579c685..02419cd 100644
--- a/drivers/video/videomodes.h
+++ b/drivers/video/videomodes.h
@@ -79,3 +79,8 @@
 
 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);