|
From: Antonino D. <ad...@po...> - 2003-03-10 02:09:13
|
On Sun, 2003-03-09 at 17:37, irene7 wrote: > > HI~ > > i am an newbie. and i have a trouble : > my LCD driver is working fine , but the only problem is the LCD image is rotate 90. > what should i modified the driver to rotate it back? Hmm, a lot of LCD hardware have this sort of problem. If you do not have a hardware option to change how the data is to be displayed (such as rotate 90 degrees the other way), you can do at least two things: 1. have your own fbcon-cfb*.c functions that draws, clears and moves pixels from top->bottom, right->left (90 degrees CW) or bottom->top, left->right (90 degrees CCW). You may also want to pre-rotate display->fontdata in your xxxfb_setup routine, so you don't degrade performance. You also need to modify the fbcon_show_logo in fbcon.c to do the same thing. The advantage of this method is you're going to have a fairly efficient framebuffer console, the disadvantage is user applications will not work. 2. The second method is to allocate a virtual framebuffer. Then on a periodic basis, you transfer the data in the virtual framebuffer to the actual framebuffer, doing the rotating on the fly. The advantage of this method is user applications should work, the disadvantage is it is not the most efficient method. You can look at: ftp://ssv-embedded.de/ssv/products/trm916/sample/x86/linux/fbdev (authored by Henry) for a template on how to implement #2. You still have to implement the rotation yourself. If you have questions rotating the data, let me know. Tony |