* rotation.
@ 2003-01-07 22:44 James Simmons
2003-01-08 10:24 ` rotation Geert Uytterhoeven
2003-01-08 16:56 ` rotation Antonino Daplas
0 siblings, 2 replies; 13+ messages in thread
From: James Simmons @ 2003-01-07 22:44 UTC (permalink / raw)
To: Linux Fbdev development list
Cc: Linux Kernel Mailing List, Geert Uytterhoeven
I'm about to implement rotation which is needed for devices like the ipaq.
The question is do we flip the xres and yres values depending on the
rotation or do we just alter the data that will be drawn to make the
screen appear to rotate. How does hardware rotate view the x and y axis?
Are they rotated or does just the data get rotated?
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rotation.
2003-01-07 22:44 rotation James Simmons
@ 2003-01-08 10:24 ` Geert Uytterhoeven
2003-01-08 10:48 ` rotation Sven Luther
2003-01-09 19:44 ` rotation James Simmons
2003-01-08 16:56 ` rotation Antonino Daplas
1 sibling, 2 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2003-01-08 10:24 UTC (permalink / raw)
To: James Simmons; +Cc: Linux Fbdev development list, Linux Kernel Mailing List
On Tue, 7 Jan 2003, James Simmons wrote:
> I'm about to implement rotation which is needed for devices like the ipaq.
> The question is do we flip the xres and yres values depending on the
> rotation or do we just alter the data that will be drawn to make the
> screen appear to rotate. How does hardware rotate view the x and y axis?
> Are they rotated or does just the data get rotated?
Where are you going to implement the rotation? At the fbcon or fbdev level?
Fbcon has the advantage that it'll work for all frame buffer devices.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: rotation.
2003-01-08 10:24 ` rotation Geert Uytterhoeven
@ 2003-01-08 10:48 ` Sven Luther
2003-01-08 11:25 ` [Linux-fbdev-devel] " Måns Rullgård
2003-01-09 19:45 ` [Linux-fbdev-devel] " James Simmons
2003-01-09 19:44 ` rotation James Simmons
1 sibling, 2 replies; 13+ messages in thread
From: Sven Luther @ 2003-01-08 10:48 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: James Simmons, Linux Fbdev development list,
Linux Kernel Mailing List
On Wed, Jan 08, 2003 at 11:24:22AM +0100, Geert Uytterhoeven wrote:
> On Tue, 7 Jan 2003, James Simmons wrote:
> > I'm about to implement rotation which is needed for devices like the ipaq.
> > The question is do we flip the xres and yres values depending on the
> > rotation or do we just alter the data that will be drawn to make the
> > screen appear to rotate. How does hardware rotate view the x and y axis?
> > Are they rotated or does just the data get rotated?
>
> Where are you going to implement the rotation? At the fbcon or fbdev level?
>
> Fbcon has the advantage that it'll work for all frame buffer devices.
But you could also provide driver hooks for the chips which have such a
rotation feature included (don't know if such exist, but i suppose they
do, or may in the future).
So, we also support fbcon for not left to righ locales ?
Friendly,
Sven Luther
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Linux-fbdev-devel] Re: rotation.
2003-01-08 10:48 ` rotation Sven Luther
@ 2003-01-08 11:25 ` Måns Rullgård
2003-01-08 12:05 ` John Bradford
2003-01-09 19:45 ` [Linux-fbdev-devel] " James Simmons
1 sibling, 1 reply; 13+ messages in thread
From: Måns Rullgård @ 2003-01-08 11:25 UTC (permalink / raw)
To: Sven Luther
Cc: Geert Uytterhoeven, James Simmons, Linux Fbdev development list,
Linux Kernel Mailing List
Sven Luther <luther@dpt-info.u-strasbg.fr> writes:
> > > I'm about to implement rotation which is needed for devices like the ipaq.
> > > The question is do we flip the xres and yres values depending on the
> > > rotation or do we just alter the data that will be drawn to make the
> > > screen appear to rotate. How does hardware rotate view the x and y axis?
> > > Are they rotated or does just the data get rotated?
> >
> > Where are you going to implement the rotation? At the fbcon or fbdev level?
> >
> > Fbcon has the advantage that it'll work for all frame buffer devices.
>
> But you could also provide driver hooks for the chips which have such a
> rotation feature included (don't know if such exist, but i suppose they
> do, or may in the future).
I heard of someone have problems with the display getting rotated in
Windows. I don't know what chip it was.
--
Måns Rullgård
mru@users.sf.net
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: rotation.
2003-01-08 11:25 ` [Linux-fbdev-devel] " Måns Rullgård
@ 2003-01-08 12:05 ` John Bradford
2003-01-08 12:55 ` Sven Luther
0 siblings, 1 reply; 13+ messages in thread
From: John Bradford @ 2003-01-08 12:05 UTC (permalink / raw)
To: Måns Rullgård
Cc: luther, geert, jsimmons, linux-fbdev-devel, linux-kernel
> > > > I'm about to implement rotation which is needed for devices
> > > > like the ipaq.
> > > > The question is do we flip the xres and yres values depending
> > > > on the rotation or do we just alter the data that will be
> > > > drawn to make the screen appear to rotate. How does hardware
> > > > rotate view the x and y axis? Are they rotated or does just
> > > > the data get rotated?
> > >
> > > Where are you going to implement the rotation? At the fbcon or
> > > fbdev level?
> > >
> > > Fbcon has the advantage that it'll work for all frame buffer
> > > devices.
> >
> > But you could also provide driver hooks for the chips which have
> > such a rotation feature included (don't know if such exist, but i
> > suppose they do, or may in the future).
It would be nice to have an option to be able to do the rotation
entirely in software - some desktop users might prefer to have a
portait-orientated display, when their graphics card doesn't have any
hardware rotation facilities at all.
John.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: rotation.
2003-01-08 12:05 ` John Bradford
@ 2003-01-08 12:55 ` Sven Luther
0 siblings, 0 replies; 13+ messages in thread
From: Sven Luther @ 2003-01-08 12:55 UTC (permalink / raw)
To: John Bradford
Cc: Måns Rullgård, luther, geert, jsimmons,
linux-fbdev-devel, linux-kernel
On Wed, Jan 08, 2003 at 12:05:48PM +0000, John Bradford wrote:
> > > > > I'm about to implement rotation which is needed for devices
> > > > > like the ipaq.
> > > > > The question is do we flip the xres and yres values depending
> > > > > on the rotation or do we just alter the data that will be
> > > > > drawn to make the screen appear to rotate. How does hardware
> > > > > rotate view the x and y axis? Are they rotated or does just
> > > > > the data get rotated?
> > > >
> > > > Where are you going to implement the rotation? At the fbcon or
> > > > fbdev level?
> > > >
> > > > Fbcon has the advantage that it'll work for all frame buffer
> > > > devices.
> > >
> > > But you could also provide driver hooks for the chips which have
> > > such a rotation feature included (don't know if such exist, but i
> > > suppose they do, or may in the future).
>
> It would be nice to have an option to be able to do the rotation
> entirely in software - some desktop users might prefer to have a
> portait-orientated display, when their graphics card doesn't have any
> hardware rotation facilities at all.
Well, that is James plan. I suppose that for hardware that can do
hardware rotation, it will be faster to do it instead of having the
software do it though, and thus it would be nice to have a driver hook
or something.
This way, if rotation is asked, then if the driver supports hardware
rotation, do it, and if not, do it in software.
At first, no driver will support hardware rotation anyway, so it would
be done in software.
And then, you reuse the same stuff to drive a chinese console or
something such.
Friendly,
Sven Luther
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rotation.
2003-01-07 22:44 rotation James Simmons
2003-01-08 10:24 ` rotation Geert Uytterhoeven
@ 2003-01-08 16:56 ` Antonino Daplas
2003-01-09 19:54 ` [Linux-fbdev-devel] rotation James Simmons
1 sibling, 1 reply; 13+ messages in thread
From: Antonino Daplas @ 2003-01-08 16:56 UTC (permalink / raw)
To: James Simmons
Cc: Linux Fbdev development list, Linux Kernel Mailing List,
Geert Uytterhoeven
On Wed, 2003-01-08 at 06:44, James Simmons wrote:
>
> I'm about to implement rotation which is needed for devices like the ipaq.
> The question is do we flip the xres and yres values depending on the
> rotation or do we just alter the data that will be drawn to make the
> screen appear to rotate. How does hardware rotate view the x and y axis?
> Are they rotated or does just the data get rotated?
>
If the graphics card has hardware support for rotation, then there is
nothing to be done. It's the job of the driver if it wants to rotate
the display or not. This is similar to video overlay mirroring. What
the user app sees is the framebuffer in "normal" orientation, but what
gets displayed is mirrored.
However, as Geert mentioned, if you want to support rotation
generically, then you have to do it in the fbcon level. The driver need
not know if the display is rotated or not. All it needs to do is fill a
region with color, color expand a bitmap and move blocks of data, and
optionally 'pan' the window. Fbcon will pass the correct (ie, oriented)
information for the driver.
This will not be too processor intensive as long as some data is
prepared beforehand, like a rotated fontdata.
The main difficulty with this approach is how do you tell the console to
rotate the display? We cannot use fbset because the changes will not be
visible to fbcon.
I submitted a patch before (see fbdev archives for "Console Rotation"
thread) that rotates the console this way. I had vga16fb, vesafb, and
i810fb rotate the display without any driver code change. Display
panning was also supported.
However, because we use mmap to expose the framebuffer memory, we will
not be able to completely support rotation for user applications. They
have to do it on their own.
Tony
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rotation.
2003-01-08 10:24 ` rotation Geert Uytterhoeven
2003-01-08 10:48 ` rotation Sven Luther
@ 2003-01-09 19:44 ` James Simmons
1 sibling, 0 replies; 13+ messages in thread
From: James Simmons @ 2003-01-09 19:44 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linux Fbdev development list, Linux Kernel Mailing List
> Where are you going to implement the rotation? At the fbcon or fbdev level?
We already have a hook for hardware acceleration in struct fb_ops.
> Fbcon has the advantage that it'll work for all frame buffer devices.
The fbdev level will have the functionalty but fbcon is the one that needs
it.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Linux-fbdev-devel] Re: rotation.
2003-01-08 10:48 ` rotation Sven Luther
2003-01-08 11:25 ` [Linux-fbdev-devel] " Måns Rullgård
@ 2003-01-09 19:45 ` James Simmons
1 sibling, 0 replies; 13+ messages in thread
From: James Simmons @ 2003-01-09 19:45 UTC (permalink / raw)
To: Sven Luther
Cc: Geert Uytterhoeven, Linux Fbdev development list,
Linux Kernel Mailing List
> > Fbcon has the advantage that it'll work for all frame buffer devices.
>
> But you could also provide driver hooks for the chips which have such a
> rotation feature included (don't know if such exist, but i suppose they
> do, or may in the future).
Hooks already exist in struct fb_ops.
> So, we also support fbcon for not left to righ locales ?
That will happen in the core console code.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Linux-fbdev-devel] rotation.
2003-01-08 16:56 ` rotation Antonino Daplas
@ 2003-01-09 19:54 ` James Simmons
2003-01-10 10:26 ` Antonino Daplas
0 siblings, 1 reply; 13+ messages in thread
From: James Simmons @ 2003-01-09 19:54 UTC (permalink / raw)
To: Antonino Daplas
Cc: Linux Fbdev development list, Linux Kernel Mailing List,
Geert Uytterhoeven
> However, as Geert mentioned, if you want to support rotation
> generically, then you have to do it in the fbcon level. The driver need
> not know if the display is rotated or not. All it needs to do is fill a
> region with color, color expand a bitmap and move blocks of data, and
> optionally 'pan' the window. Fbcon will pass the correct (ie, oriented)
> information for the driver.
Yes. Hardware rotation shouldn't also not effect the way accel
operatations are done.
> This will not be too processor intensive as long as some data is
> prepared beforehand, like a rotated fontdata.
Yeap!! The only thing is we could end up with 4 times the amount of data.
> The main difficulty with this approach is how do you tell the console to
> rotate the display? We cannot use fbset because the changes will not be
> visible to fbcon.
I think it should video fbcon=rotate:90 command line for example.
> I submitted a patch before (see fbdev archives for "Console Rotation"
> thread) that rotates the console this way. I had vga16fb, vesafb, and
I seen it and even have it still.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Linux-fbdev-devel] rotation.
2003-01-09 19:54 ` [Linux-fbdev-devel] rotation James Simmons
@ 2003-01-10 10:26 ` Antonino Daplas
2003-01-10 19:42 ` rotation James Simmons
0 siblings, 1 reply; 13+ messages in thread
From: Antonino Daplas @ 2003-01-10 10:26 UTC (permalink / raw)
To: James Simmons
Cc: Linux Fbdev development list, Linux Kernel Mailing List,
Geert Uytterhoeven
On Fri, 2003-01-10 at 03:54, James Simmons wrote:
>
> > However, as Geert mentioned, if you want to support rotation
> > generically, then you have to do it in the fbcon level. The driver need
> > not know if the display is rotated or not. All it needs to do is fill a
> > region with color, color expand a bitmap and move blocks of data, and
> > optionally 'pan' the window. Fbcon will pass the correct (ie, oriented)
> > information for the driver.
>
> Yes. Hardware rotation shouldn't also not effect the way accel
> operatations are done.
The main difference is if the hardware supports rotation, fbcon will
present it with "normal" data. With the generic implementation, fbcon
will present the driver with rotated data.
So we need a driver capabilities field either in fb_info or
fb_fix_screeninfo.
>
> > This will not be too processor intensive as long as some data is
> > prepared beforehand, like a rotated fontdata.
>
> Yeap!! The only thing is we could end up with 4 times the amount of data.
>
Not really. We can dynamically rotate the fontdata using the default
display->fontdata into another buffer. I believe I have functions that
do that in the patch I submitted. (Sorry, I lost it when one of my
drives crashed :-(.
Tony
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rotation.
2003-01-10 10:26 ` Antonino Daplas
@ 2003-01-10 19:42 ` James Simmons
2003-01-11 5:13 ` rotation Antonino Daplas
0 siblings, 1 reply; 13+ messages in thread
From: James Simmons @ 2003-01-10 19:42 UTC (permalink / raw)
To: Antonino Daplas
Cc: Linux Fbdev development list, Linux Kernel Mailing List,
Geert Uytterhoeven
> > Yes. Hardware rotation shouldn't also not effect the way accel
> > operatations are done.
>
> The main difference is if the hardware supports rotation, fbcon will
> present it with "normal" data. With the generic implementation, fbcon
> will present the driver with rotated data.
>
> So we need a driver capabilities field either in fb_info or
> fb_fix_screeninfo.
We can just test if the rotation hook exist for the fbdev driver. No hook
then use generic code in fbcon. Also we have a angle field in var so we
can see if the user wants the data rotated.
> Not really. We can dynamically rotate the fontdata using the default
> display->fontdata into another buffer. I believe I have functions that
> do that in the patch I submitted. (Sorry, I lost it when one of my
> drives crashed :-(.
I have that patch. It just has to be updated to the latest changes.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: rotation.
2003-01-10 19:42 ` rotation James Simmons
@ 2003-01-11 5:13 ` Antonino Daplas
0 siblings, 0 replies; 13+ messages in thread
From: Antonino Daplas @ 2003-01-11 5:13 UTC (permalink / raw)
To: James Simmons
Cc: Linux Fbdev development list, Linux Kernel Mailing List,
Geert Uytterhoeven
On Sat, 2003-01-11 at 03:42, James Simmons wrote:
>
> > > Yes. Hardware rotation shouldn't also not effect the way accel
> > > operatations are done.
> >
> > The main difference is if the hardware supports rotation, fbcon will
> > present it with "normal" data. With the generic implementation, fbcon
> > will present the driver with rotated data.
> >
> > So we need a driver capabilities field either in fb_info or
> > fb_fix_screeninfo.
>
> We can just test if the rotation hook exist for the fbdev driver. No hook
Okay. What will the hook do, BTW? Just turn hardware rotation to
the appropriate orientation? Something like...
int fb_rotate(struct fb_info *info, int rotate);
Then we can do something like:
if (info->fbops->fb_rotate) {
info->fbops->fb_rotate(info, FB_ROTATE_CCW);
"pass 'normally' oriented data"
else
"pass data rotated CCW"
}
Also, you may want to place the rotate field in fb_fix_screeninfo
instead. You mentioned that rotation is to be activated at the console
layer, so the rotate field is for informational purposes only.
> then use generic code in fbcon. Also we have a angle field in var so we
> can see if the user wants the data rotated.
>
> > Not really. We can dynamically rotate the fontdata using the default
> > display->fontdata into another buffer. I believe I have functions that
> > do that in the patch I submitted. (Sorry, I lost it when one of my
> > drives crashed :-(.
>
> I have that patch. It just has to be updated to the latest changes.
>
>
Yeap. Geert forwarded them to me. Thanks Geert :-)
Tony
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2003-01-11 5:23 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-07 22:44 rotation James Simmons
2003-01-08 10:24 ` rotation Geert Uytterhoeven
2003-01-08 10:48 ` rotation Sven Luther
2003-01-08 11:25 ` [Linux-fbdev-devel] " Måns Rullgård
2003-01-08 12:05 ` John Bradford
2003-01-08 12:55 ` Sven Luther
2003-01-09 19:45 ` [Linux-fbdev-devel] " James Simmons
2003-01-09 19:44 ` rotation James Simmons
2003-01-08 16:56 ` rotation Antonino Daplas
2003-01-09 19:54 ` [Linux-fbdev-devel] rotation James Simmons
2003-01-10 10:26 ` Antonino Daplas
2003-01-10 19:42 ` rotation James Simmons
2003-01-11 5:13 ` rotation Antonino Daplas
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).