HDMI Resolutions testing

I think these modifications can be apply to VIM2 as well as VIM.
But you said the VIM work well even it hasn’t apply these patch. :sweat:

--- a/drivers/amlogic/display/osd/osd_fb.c
+++ b/drivers/amlogic/display/osd/osd_fb.c
@@ -2581,12 +2581,10 @@ static int osd_probe(struct platform_device *pdev)
                        if (ret)
                                osd_log_info("not found display_size_default\n");
                        else {
-                               fb_def_var[index].xres = var_screeninfo[0];
-                               fb_def_var[index].yres = var_screeninfo[1];
-                               fb_def_var[index].xres_virtual =
-                                       var_screeninfo[2];
-                               fb_def_var[index].yres_virtual =
-                                       var_screeninfo[3];
+                               fb_def_var[index].xres = vinfo->width;
+                               fb_def_var[index].yres = vinfo->height;
+                               fb_def_var[index].xres_virtual = vinfo->width;
+                               fb_def_var[index].yres_virtual = vinfo->height*3;
                                fb_def_var[index].bits_per_pixel =
                                        var_screeninfo[4];
                                osd_log_info("init fbdev bpp is:%d\n",


diff --git a/drivers/amlogic/display/vout/vinfo.c b/drivers/amlogic/display/vout/vinfo.c
index d256e06..033aa378 100644
--- a/drivers/amlogic/display/vout/vinfo.c
+++ b/drivers/amlogic/display/vout/vinfo.c
@@ -132,7 +132,7 @@ enum vmode_e vmode_name_to_mode(const char *str)
        enum vmode_e vmode = VMODE_MAX;
 
        for (i = 0; i < ARRAY_SIZE(vmode_match_table); i++) {
-               if (strstr(str, vmode_match_table[i].name)) {
+               if (!strncmp(str, vmode_match_table[i].name,strlen(vmode_match_table[i].name))) {
                        vmode = vmode_match_table[i].mode;
                        break;
                }
(END)