@@ -287,8 +287,6 @@ struct hvfb_par {
287
287
288
288
static uint screen_width = HVFB_WIDTH ;
289
289
static uint screen_height = HVFB_HEIGHT ;
290
- static uint screen_width_max = HVFB_WIDTH ;
291
- static uint screen_height_max = HVFB_HEIGHT ;
292
290
static uint screen_depth ;
293
291
static uint screen_fb_size ;
294
292
static uint dio_fb_size ; /* FB size for deferred IO */
@@ -582,7 +580,6 @@ static int synthvid_get_supported_resolution(struct hv_device *hdev)
582
580
int ret = 0 ;
583
581
unsigned long t ;
584
582
u8 index ;
585
- int i ;
586
583
587
584
memset (msg , 0 , sizeof (struct synthvid_msg ));
588
585
msg -> vid_hdr .type = SYNTHVID_RESOLUTION_REQUEST ;
@@ -613,13 +610,6 @@ static int synthvid_get_supported_resolution(struct hv_device *hdev)
613
610
goto out ;
614
611
}
615
612
616
- for (i = 0 ; i < msg -> resolution_resp .resolution_count ; i ++ ) {
617
- screen_width_max = max_t (unsigned int , screen_width_max ,
618
- msg -> resolution_resp .supported_resolution [i ].width );
619
- screen_height_max = max_t (unsigned int , screen_height_max ,
620
- msg -> resolution_resp .supported_resolution [i ].height );
621
- }
622
-
623
613
screen_width =
624
614
msg -> resolution_resp .supported_resolution [index ].width ;
625
615
screen_height =
@@ -941,7 +931,7 @@ static void hvfb_get_option(struct fb_info *info)
941
931
942
932
if (x < HVFB_WIDTH_MIN || y < HVFB_HEIGHT_MIN ||
943
933
(synthvid_ver_ge (par -> synthvid_version , SYNTHVID_VERSION_WIN10 ) &&
944
- (x > screen_width_max || y > screen_height_max )) ||
934
+ (x * y * screen_depth / 8 > screen_fb_size )) ||
945
935
(par -> synthvid_version == SYNTHVID_VERSION_WIN8 &&
946
936
x * y * screen_depth / 8 > SYNTHVID_FB_SIZE_WIN8 ) ||
947
937
(par -> synthvid_version == SYNTHVID_VERSION_WIN7 &&
@@ -1194,8 +1184,8 @@ static int hvfb_probe(struct hv_device *hdev,
1194
1184
}
1195
1185
1196
1186
hvfb_get_option (info );
1197
- pr_info ("Screen resolution: %dx%d, Color depth: %d\n" ,
1198
- screen_width , screen_height , screen_depth );
1187
+ pr_info ("Screen resolution: %dx%d, Color depth: %d, Frame buffer size: %d \n" ,
1188
+ screen_width , screen_height , screen_depth , screen_fb_size );
1199
1189
1200
1190
ret = hvfb_getmem (hdev , info );
1201
1191
if (ret ) {
0 commit comments