* Mirrored Display? @ 2002-12-13 18:33 Michael Kaufmann 2002-12-15 0:29 ` Antonino Daplas 2002-12-20 19:49 ` James Simmons 0 siblings, 2 replies; 9+ messages in thread From: Michael Kaufmann @ 2002-12-13 18:33 UTC (permalink / raw) To: Linux-fbdev-devel Hello, i would like to use a mono LCD with a framebuffer driver. I've modified existing drivers, and after a lot of work i now have a clear picture on my display. Unfortunately, the complete picture is mirrored. The Bootlogo is top/right instead of top/left and the ascii output starts from right to left. Where is the right place to modify this behaviour? I'm also looking for a possibility to rotate the picture. Because my videocontroller can emulate 15 grayscales, i'm useing 4bpp. It would be very nice, if someone can guide me in the right direction. Thanks in advance! Michael ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Mirrored Display? 2002-12-13 18:33 Mirrored Display? Michael Kaufmann @ 2002-12-15 0:29 ` Antonino Daplas 2002-12-15 17:03 ` Michael Kaufmann 2002-12-20 19:49 ` James Simmons 1 sibling, 1 reply; 9+ messages in thread From: Antonino Daplas @ 2002-12-15 0:29 UTC (permalink / raw) To: Michael Kaufmann; +Cc: Linux Fbdev development list On Fri, 2002-12-13 at 23:33, Michael Kaufmann wrote: > Hello, > > i would like to use a mono LCD with a framebuffer driver. > > I've modified existing drivers, and after a lot of work i now have a clear > picture on my display. Unfortunately, the complete picture is mirrored. > The Bootlogo is top/right instead of top/left and the ascii output starts from > right to left. > > Where is the right place to modify this behaviour? > I'm also looking for a possibility to rotate the picture. > Because my videocontroller can emulate 15 grayscales, i'm useing 4bpp. > > It would be very nice, if someone can guide me in the right direction. > Are you using fbcon-cfb4.c to draw the characters? Is the whole display mirrored, including individual characters? If you run an fb-based app (like fbtest for instance), is the display also mirrored? If it's the whole display, maybe your hardware supports mirroring (some hardware with video overlay need this to support YUV formats that are either vertically or horizontally mirrored). Maybe it has something like that. Otherwise, it will be difficult to correct this without rewriting practically everything. Tony ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Mirrored Display? 2002-12-15 0:29 ` Antonino Daplas @ 2002-12-15 17:03 ` Michael Kaufmann 2002-12-15 20:57 ` Antonino Daplas 0 siblings, 1 reply; 9+ messages in thread From: Michael Kaufmann @ 2002-12-15 17:03 UTC (permalink / raw) To: linux-fbdev-devel [-- Attachment #1: Type: text/plain, Size: 2957 bytes --] On Saturday 14 December 2002 23:29, you wrote: > On Fri, 2002-12-13 at 23:33, Michael Kaufmann wrote: > > Hello, > > > > i would like to use a mono LCD with a framebuffer driver. > > > > I've modified existing drivers, and after a lot of work i now have a > > clear picture on my display. Unfortunately, the complete picture is > > mirrored. The Bootlogo is top/right instead of top/left and the ascii > > output starts from right to left. > > > > Where is the right place to modify this behaviour? > > I'm also looking for a possibility to rotate the picture. > > Because my videocontroller can emulate 15 grayscales, i'm useing 4bpp. > > > > It would be very nice, if someone can guide me in the right direction. > > Are you using fbcon-cfb4.c to draw the characters? Is the whole display > mirrored, including individual characters? If you run an fb-based app > (like fbtest for instance), is the display also mirrored? Yes, i'm using fbon-cfb4.c. The console is on my display, i see the boot logo and the kernel messages in the display mirrored. I never used fbtest. By the way, where can i find fbtest? But i already startet nanox/microwindows on top of the fb, and the picture is also mirrored. > If it's the whole display, maybe your hardware supports mirroring (some > hardware with video overlay need this to support YUV formats that are > either vertically or horizontally mirrored). Maybe it has something > like that. Otherwise, it will be difficult to correct this without > rewriting practically everything. No, i don't think so. It is a simple video controller. Nevertheless, i have just looked in the datasheet, and do not found such a feature. I don't think that this is a bug or something like this in the framebuffer. Because everthing works like i exect it, but i have to mirror the picture. I have also measured with a scope all signals to the display, and the generated output looks like i expect it. The datastream starts with the first pixel (in the picture top/left) and continues with the second pixel (on the right of the first pixel) and so on. But my display is mapping this datastream from the right to the left. Please take a look on the attached picture, i think it explains the behaviour. I can reproduce it without Linux with a simple monitor programm At the moment i have two explanations: 1) I have a display witch must be accessed unusual, and the LINUX FB doesn't support this kind of access (not yet). 2) There is a hardware problem with the signals to the display (changed signals like frame-pulse, and line-pulse, or something like this. I don't think that it is a hardware problem, but i will check the connection again. Is there really no way in the framebuffer to mirror and/or rotate the picture data? When i have to fix it in software, what kind of code do i have to rewrite? And, thank's for your reply! Bye Michael [-- Attachment #2: FB_with_cfb4.png --] [-- Type: image/png, Size: 32931 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Mirrored Display? 2002-12-15 17:03 ` Michael Kaufmann @ 2002-12-15 20:57 ` Antonino Daplas 2002-12-16 0:40 ` Michel Dänzer 0 siblings, 1 reply; 9+ messages in thread From: Antonino Daplas @ 2002-12-15 20:57 UTC (permalink / raw) To: Michael Kaufmann; +Cc: Linux Fbdev development list On Sun, 2002-12-15 at 22:03, Michael Kaufmann wrote: > On Saturday 14 December 2002 23:29, you wrote: > > On Fri, 2002-12-13 at 23:33, Michael Kaufmann wrote: > > > Hello, > > > > > > i would like to use a mono LCD with a framebuffer driver. > > > > > > I've modified existing drivers, and after a lot of work i now have a > > > clear picture on my display. Unfortunately, the complete picture is > > > mirrored. The Bootlogo is top/right instead of top/left and the ascii > > > output starts from right to left. > > > > > > Where is the right place to modify this behaviour? > > > I'm also looking for a possibility to rotate the picture. > > > Because my videocontroller can emulate 15 grayscales, i'm useing 4bpp. > > > > > > It would be very nice, if someone can guide me in the right direction. > > > > Are you using fbcon-cfb4.c to draw the characters? Is the whole display > > mirrored, including individual characters? If you run an fb-based app > > (like fbtest for instance), is the display also mirrored? > > Yes, i'm using fbon-cfb4.c. The console is on my display, i see the boot logo > and the kernel messages in the display mirrored. I never used fbtest. By the > way, where can i find fbtest? But i already startet nanox/microwindows on top Check one of the links in www.linux-fbdev.org. > of the fb, and the picture is also mirrored. > Ouch, your user apps are also mirrored :-( > > If it's the whole display, maybe your hardware supports mirroring (some > > hardware with video overlay need this to support YUV formats that are > > either vertically or horizontally mirrored). Maybe it has something > > like that. Otherwise, it will be difficult to correct this without > > rewriting practically everything. > > No, i don't think so. It is a simple video controller. Nevertheless, i have > just looked in the datasheet, and do not found such a feature. > > I don't think that this is a bug or something like this in the framebuffer. > Because everthing works like i exect it, but i have to mirror the picture. No, I never said this was a bug. Mirroring is a hardware feature occasionally useful such as for mirrored mpegs. > I have also measured with a scope all signals to the display, and the > generated output looks like i expect it. The datastream starts with the first > pixel (in the picture top/left) and continues with the second pixel (on the > right of the first pixel) and so on. > But my display is mapping this datastream from the right to the left. This is the problem. You are writing each byte in the correct location in the framebuffer, but somehow it gets shown in the "mirrored" location of your display. > Please take a look on the attached picture, i think it explains the behaviour. > I can reproduce it without Linux with a simple monitor programm > > At the moment i have two explanations: > 1) I have a display witch must be accessed unusual, and the LINUX FB doesn't > support this kind of access (not yet). > 2) There is a hardware problem with the signals to the display (changed > signals like frame-pulse, and line-pulse, or something like this. > > I don't think that it is a hardware problem, but i will check the connection > again. Is there really no way in the framebuffer to mirror and/or rotate the > picture data? > When i have to fix it in software, what kind of code do i have to rewrite? Fixing the console is feasible enough though it entails a lot of work. You have to rewrite all the functions in fbcon-cfb4.c so you go "right->left" instead of "left->right". Do the same thing to fbcon_show_logo() in fbcon.c, and fb_read/fb_write in fbmem.c. Fixing user apps, that's the tough part. The framebuffer API is not something like XAA which has specific hooks for filling, copying, expanding, etc an area of pixels to the framebuffer. All the framebuffer API provides are two ways to access the graphics memory (similar to a watered-down version of X's DGA): 1. The standard file read/file write which will be intercepted by fb_read and fb_write; and 2. mmap Of the 2, mmap is usually chosen by user apps because it's simple and fast. The disadvantage is that your driver has no control on what will get displayed, and there is no feasible solution to this, except to disable mmap by setting fb_fix_screeninfo.smem_len to zero. Hopefully, if mmap is not possible, they will fall back to using file read and file write. User apps will always assume that the first pixel written to the framebuffer will appear as the first pixel of the first scanline of your display. Meaning, for apps that will always use mmap, you have to rewrite them so they raster "right->left" instead of "left->right". If you think about it, a hardware solution seems to be more feasible. Tony ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Mirrored Display? 2002-12-15 20:57 ` Antonino Daplas @ 2002-12-16 0:40 ` Michel Dänzer 0 siblings, 0 replies; 9+ messages in thread From: Michel Dänzer @ 2002-12-16 0:40 UTC (permalink / raw) To: Antonino Daplas; +Cc: Michael Kaufmann, Linux Fbdev development list On Son, 2002-12-15 at 21:57, Antonino Daplas wrote: > > User apps will always assume that the first pixel written to the > framebuffer will appear as the first pixel of the first scanline of your > display. Meaning, for apps that will always use mmap, you have to > rewrite them so they raster "right->left" instead of "left->right". > > If you think about it, a hardware solution seems to be more feasible. This may be true in general, but at least for X it wouldn't be hard to add an option for mirroring via a shadow framebuffer. -- Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer XFree86 and DRI project member / CS student, Free Software enthusiast ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Mirrored Display? 2002-12-13 18:33 Mirrored Display? Michael Kaufmann 2002-12-15 0:29 ` Antonino Daplas @ 2002-12-20 19:49 ` James Simmons 2002-12-23 13:04 ` Michael Kaufmann 1 sibling, 1 reply; 9+ messages in thread From: James Simmons @ 2002-12-20 19:49 UTC (permalink / raw) To: Michael Kaufmann; +Cc: Linux-fbdev-devel > I've modified existing drivers, and after a lot of work i now have a clear > picture on my display. Unfortunately, the complete picture is mirrored. > The Bootlogo is top/right instead of top/left and the ascii output starts from > right to left. Some hardware supports mirroring. Sounds like you turned it on by mistake. > Where is the right place to modify this behaviour? > I'm also looking for a possibility to rotate the picture. > Because my videocontroller can emulate 15 grayscales, i'm useing 4bpp. The latest 2.5.X kernels have hardware hooks for rotation. I haven't added it yet to the software accel functions. I plan to a soon as I get time. Thank you. ------------------------------------------------------- This SF.NET email is sponsored by: The Best Geek Holiday Gifts! Time is running out! Thinkgeek.com has the coolest gifts for your favorite geek. Let your fingers do the typing. Visit Now. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Mirrored Display? 2002-12-20 19:49 ` James Simmons @ 2002-12-23 13:04 ` Michael Kaufmann 2002-12-29 15:59 ` Antonino Daplas 0 siblings, 1 reply; 9+ messages in thread From: Michael Kaufmann @ 2002-12-23 13:04 UTC (permalink / raw) To: Linux-fbdev-devel Dear James, thanks for your reply. On Friday 20 December 2002 18:49, you wrote: > > I've modified existing drivers, and after a lot of work i now have a > > clear picture on my display. Unfortunately, the complete picture is > > mirrored. The Bootlogo is top/right instead of top/left and the ascii > > output starts from right to left. > > Some hardware supports mirroring. Sounds like you turned it on by mistake. No, there is nothing i could turn on/off in my hardware. I have checked the hardware and the datasheets again, and i'm now sure. The display i'm using is a LCD monochrom display. And this type of display writes the picture date from right to left (mirrored). There is nothing i can do against it. My videocontroller has no feature to output every line mirrored. The videocontroller start sending the picture datastream to the display from videobuffer address 0. The first pixel from the picture datastream will be displayed on the right/top edge on my LCD and the second pixel left to the first and so on. First i thought that this behaviour of my display is extremly unusal. After looking to other display datasheets i now know, that it is unusal but far not sooo unusual i thought the first time. > > Where is the right place to modify this behaviour? > > I'm also looking for a possibility to rotate the picture. > > Because my videocontroller can emulate 15 grayscales, i'm useing 4bpp. > > The latest 2.5.X kernels have hardware hooks for rotation. I haven't added > it yet to the software accel functions. I plan to a soon as I get time. > Thank you. Antonino has also answered to my question. And he said that there is nothing i can do, because user apps will directly acces the framebuffer via read/write or nmap. I can only patch the console and the show _logo to write the data mirrored to the videobuffer (a lot of work). So my user apps (like nanoX or directfb/GTK+) must know about the mirrored display and should write the picturedata mirrored in the framebuffer. I'm know a litte bit amazed about a rotation feature in next versions. Does this mean, that the buffer where user apps (or also the console) are writing there picture data is not directly the videobuffer anymore? Or how does this rotation feature works? I think it would be a good feature to have 'something' between the framebuffer and the physical videobuffer to be able to manipulate the picture data (like rotation, mirroring, etc.). But i don't know how this peace of software should detect, changed data in the 'framebuffer' to e.g. mirror in the videobuffer? Writing the whole buffers from time to time whould be a very bad solution (performance). At the moment i plan to do the manipulation in the directfb layer on top of the framebuffer device. I 'only' need to run some GTK+ applications. I need to mirror the picture, and i also want to rotate the picture from landcape to portrait. Bye Michael ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Mirrored Display? 2002-12-23 13:04 ` Michael Kaufmann @ 2002-12-29 15:59 ` Antonino Daplas 2003-01-07 21:18 ` James Simmons 0 siblings, 1 reply; 9+ messages in thread From: Antonino Daplas @ 2002-12-29 15:59 UTC (permalink / raw) To: Michael Kaufmann; +Cc: Linux-fbdev-devel On Mon, 2002-12-23 at 21:04, Michael Kaufmann wrote: > Antonino has also answered to my question. And he said that there is nothing > i can do, because user apps will directly acces the framebuffer via read/write > or nmap. I can only patch the console and the show _logo to write the data > mirrored to the videobuffer (a lot of work). > So my user apps (like nanoX or directfb/GTK+) must know about the mirrored > display and should write the picturedata mirrored in the framebuffer. > > I'm know a litte bit amazed about a rotation feature in next versions. Does > this mean, that the buffer where user apps (or also the console) are writing > there picture data is not directly the videobuffer anymore? Or how does this > rotation feature works? I think the rotation hooks are console specific. > > I think it would be a good feature to have 'something' between the framebuffer > and the physical videobuffer to be able to manipulate the picture data (like That is the job of fb libraries. You can use X (which already has support for rotation, so mirroring should be easy to add), or modify DirectFB. > rotation, mirroring, etc.). But i don't know how this peace of software > should detect, changed data in the 'framebuffer' to e.g. mirror in the > videobuffer? Writing the whole buffers from time to time whould be a very > bad solution (performance). You can probably implement something similar to a shadow framebuffer. You expose this instead of the actual framebuffer (fix->smem_start, and info->screen_base), then just refresh the contents of the actual framebuffer, say during vsync. You will have to set up a vsync irq_handler or something similar. Tony ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Mirrored Display? 2002-12-29 15:59 ` Antonino Daplas @ 2003-01-07 21:18 ` James Simmons 0 siblings, 0 replies; 9+ messages in thread From: James Simmons @ 2003-01-07 21:18 UTC (permalink / raw) To: Antonino Daplas; +Cc: Michael Kaufmann, Linux-fbdev-devel > > I'm know a litte bit amazed about a rotation feature in next versions. Does > > this mean, that the buffer where user apps (or also the console) are writing > > there picture data is not directly the videobuffer anymore? Or how does this > > rotation feature works? > I think the rotation hooks are console specific. Actually the low level drivers can use the hooks. ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-01-07 21:18 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-12-13 18:33 Mirrored Display? Michael Kaufmann 2002-12-15 0:29 ` Antonino Daplas 2002-12-15 17:03 ` Michael Kaufmann 2002-12-15 20:57 ` Antonino Daplas 2002-12-16 0:40 ` Michel Dänzer 2002-12-20 19:49 ` James Simmons 2002-12-23 13:04 ` Michael Kaufmann 2002-12-29 15:59 ` Antonino Daplas 2003-01-07 21:18 ` James Simmons
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).