|
From: Antonino D. <ad...@po...> - 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 |