|
From: Antonino D. <ad...@po...> - 2003-03-07 17:42:04
|
On Sat, 2003-03-08 at 01:00, Thomas Winischhofer wrote: > >>Why you used info->var.yres_virtual (and not the adapted > >>var.yres_virtual) in fbcon_resize() is beyond me, BTW. > > > > Because info->var will _always_ contain the correct var, so we trust > > that above all. > > Then I must have misunderstood the code. You submit var (and not > info->var) to fb_set_var, so it is that var that will be treated by > check_var and used for set_par. Since check_var() may (and does) change > the yres_virtual according to the desired resolution/depth and so on, I > thought it might be more correct to use it instead of info->var... > Note that fbcon_resize made a copy of info->var, then modified it according to the requested width and height. Then it goes through a test if it needs an fb_set_var or not. So info->var and the modified var can be different if fb_set_var() wasn't called at all. If it indeed went through fb_set_var(), the var returned from check_var() will be placed automatically to info->var before calling set_par(). So, yes, in this case, info->var and the adjusted var will be the same. Of course, in this particular code it is not important whichever var is used because we're only interested in yres_virtual. But using info->var instead of the adjusted var is safer because it is guaranteed to be always correct. BTW: I'll check the patch against vesafb and let you know. Tony |