|
From: Antonino D. <ad...@po...> - 2002-09-11 19:49:13
|
On Wed, 2002-09-11 at 14:38, Geert Uytterhoeven wrote: > > > turnable display I rather see this feature implemented. I even may help but can > > > spend much time. How difficult would it be? > > > > > It should not be too difficult to add per-driver support once the > > Can't this be moved up to generic code, so we don't have to modify all drivers? > I have thought about that, but since the patch was preliminary, I chose not to disrupt the framework yet. The tricky part in making the support generic is display panning. Here is my train of thought. Moving support into fbgen might involve a few assumptions. Firstly, info->var is assumed to be device specific (ie, it does not care about the orientation). Secondly, the display->var as well as those received from other sources (such as in an ioctl call) are partly device independent. When a structure var is passed to the driver, it will undergo conversion so the structure is sane from the driver's perspective. The same is done vice-versa. I've introduced two (exportable) functions, convert_var_to_physical(), and convert_var_to_logical() that should do that. All fbops functions should be passed with device-specific var except for fb_set_var since I'm not too sure where to look for specific entry points for fb_set_var. I guess fb_check_var and fb_pan_display are the most critical ones, since the other fbops functions do not look at the framelengths, nor the offsets. With the changes, drivers that support fbcon_accel and gen_* functions should have support for console rotation automatically. For those that support fbcon_accel, but not gen_* functions, the driver should not look at display->var anymore, but look instead into info->var. If possible, use the convert_to_var functions when passing/getting information to/from structure display. For those, that don't support fbcon_accel, behaviour should remain as usual. I'm not too sure if this is the correct way of doing this, but it's the best I can think of at the moment without causing very intrusive changes. Attached is a patch (fb_rotate2.diff). Please apply the patches I have sent previously before applying this patch. Tony |