Console Rotation

From: Antonino Daplas <hidden>
Date: 2002-09-09 14:20:10

Hi, 

Since Xfbdev is able to rotate the display, I guess it's also reasonable
for the console to have the ability to rotate the display too. 

I have added 3 new flags to var->vmode: 

FB_VMODE_ROTATE_CW  0x010000 /*  90 degree rotation */ 
FB_VMODE_ROTATE_CCW 0x020000 /* 270 degree rotation */ 
FB_VMODE_ROTATE_UD  0x040000 /* 180 degree rotation */ 
FB_ROTATE_MASK      0xFF0000 

Rotating the display is done using console wrappers similar to
fbcon-accel.  Depending on the rotation flag, dispsw is pointed to the
appropriate wrapper in gen_set_disp. 

As for driver support, the minimum requirement is for the driver to
recognize these flags, and set the var->xres, var->yres,
var->xres_virtual, and var->yres_virtual fields to the appropriate
logical values.  Ie, if display is rotated CW or CCW, then logical xres
is physical yres, etc. 

For drivers that support panning, the viewport and direction of the
panning must be appropriate for the orientation.  Ie, if display is
rotated 180 degrees, the viewport must be flushed to the 'right' and
'bottom' edge of the framebuffer when xoffset and yoffset are zero. Then
logical pan_down is physical pan_up, etc. 

The option is configurable under 'Advanced Low Level Driver Options',
and is dependent on CONFIG_FB_ACCEL being set since the wrapper depends
on xxximageblit, xxxfillrect and xxxcopyarea. 

As a testbed, I modified vesafb to support console rotation. 

The following patches will follow (against linux-2.5.33): 

a. fb_rotate.diff 
b. fb_drawing.diff 
c. vesafb_rotate.diff 
d. fbset_rotate.diff 

If the patches are mangled, please get them at: 

http://i810fb.sourceforge.net/fb_rotate.tar.gz

Tony 

   




-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help