* How to implement rotation for framebuffer?
@ 2008-04-04 9:02 arun c
2008-04-04 10:34 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: arun c @ 2008-04-04 9:02 UTC (permalink / raw)
To: linux-fbdev-devel
Hi all,
I am working on 2430SDP. SDP has omap2430 as the processor and it's
display controller supports rotation of framebuffer in hardware.
I will explain the hardware rotation in brief.
1) One Physical framebuffer is allocated in memory
2) This physical address ( as well as width and height) is programmed in the
VRFB Module (the hardware rotation engine, it stands for virtual rotated
frame buffer)
3)Then VRFB gives you 4 addresses ( virtual addresses which are
transparent to applications)
VBA0 --> Address for 0 degree rotation
VBA90 --> Address for 90 degree rotation
VBA180 --> Address for 180 degree rotation
VBA270 --> Address for 270 degree rotation
Rotation is achieved like this
Assume you want 90 degree rotation
Processor writes all picture data to VBA90 space and lcd reads all
data from VBA0 space
For this kind of implementation i need to change fb_fix_screeninfo
members (smem_start ,smem_len) and fb_info member( screen_base)
dynamically according to degree of rotation.
Please anybody suggest me good ways to implement this kind of
rotation in my driver or point me to some code so that i can refer and
implement the same.
Regards,
Arun C
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to implement rotation for framebuffer?
2008-04-04 9:02 How to implement rotation for framebuffer? arun c
@ 2008-04-04 10:34 ` Geert Uytterhoeven
2008-04-08 5:03 ` arun c
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2008-04-04 10:34 UTC (permalink / raw)
To: arun c; +Cc: linux-fbdev-devel
On Fri, 4 Apr 2008, arun c wrote:
> I am working on 2430SDP. SDP has omap2430 as the processor and it's
> display controller supports rotation of framebuffer in hardware.
>
> I will explain the hardware rotation in brief.
>
> 1) One Physical framebuffer is allocated in memory
> 2) This physical address ( as well as width and height) is programmed in the
> VRFB Module (the hardware rotation engine, it stands for virtual rotated
> frame buffer)
> 3)Then VRFB gives you 4 addresses ( virtual addresses which are
> transparent to applications)
> VBA0 --> Address for 0 degree rotation
> VBA90 --> Address for 90 degree rotation
> VBA180 --> Address for 180 degree rotation
> VBA270 --> Address for 270 degree rotation
>
> Rotation is achieved like this
> Assume you want 90 degree rotation
>
> Processor writes all picture data to VBA90 space and lcd reads all
> data from VBA0 space
>
> For this kind of implementation i need to change fb_fix_screeninfo
> members (smem_start ,smem_len) and fb_info member( screen_base)
> dynamically according to degree of rotation.
Yep, that's correct.
> Please anybody suggest me good ways to implement this kind of
> rotation in my driver or point me to some code so that i can refer and
> implement the same.
Very simple: any change of struct fb_var_screeninfo may cause a change
of fb_fix_screeninfo.
Hence if an application requests to change the rotation angle by
changing fb_var_screeninfo.rotate and issuing an FBIOPUT_VSCREENINFO
ioctl, you update your fb_fix_screeninfo and fb_info.screen_base.
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
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to implement rotation for framebuffer?
2008-04-04 10:34 ` Geert Uytterhoeven
@ 2008-04-08 5:03 ` arun c
0 siblings, 0 replies; 3+ messages in thread
From: arun c @ 2008-04-08 5:03 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: Geert Uytterhoeven
On Fri, Apr 4, 2008 at 4:04 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Fri, 4 Apr 2008, arun c wrote:
> > I am working on 2430SDP. SDP has omap2430 as the processor and it's
> > display controller supports rotation of framebuffer in hardware.
> >
> > I will explain the hardware rotation in brief.
> >
> > 1) One Physical framebuffer is allocated in memory
> > 2) This physical address ( as well as width and height) is programmed in the
> > VRFB Module (the hardware rotation engine, it stands for virtual rotated
> > frame buffer)
> > 3)Then VRFB gives you 4 addresses ( virtual addresses which are
> > transparent to applications)
> > VBA0 --> Address for 0 degree rotation
> > VBA90 --> Address for 90 degree rotation
> > VBA180 --> Address for 180 degree rotation
> > VBA270 --> Address for 270 degree rotation
> >
> > Rotation is achieved like this
> > Assume you want 90 degree rotation
> >
> > Processor writes all picture data to VBA90 space and lcd reads all
> > data from VBA0 space
> >
> > For this kind of implementation i need to change fb_fix_screeninfo
> > members (smem_start ,smem_len) and fb_info member( screen_base)
> > dynamically according to degree of rotation.
>
> Yep, that's correct.
>
>
> > Please anybody suggest me good ways to implement this kind of
> > rotation in my driver or point me to some code so that i can refer and
> > implement the same.
>
> Very simple: any change of struct fb_var_screeninfo may cause a change
> of fb_fix_screeninfo.
>
> Hence if an application requests to change the rotation angle by
> changing fb_var_screeninfo.rotate and issuing an FBIOPUT_VSCREENINFO
> ioctl, you update your fb_fix_screeninfo and fb_info.screen_base.
I was thinking this kind of implementation is not permissible ( I am
very much ignorant about fbdev applications), because i thought
dynamically changing these structure members make applications to
brake.
Could anybody please suggest me some example code to refer?
Regards,
Arun C
>
> Gr{oetje,eeting}s,
>
> Geert
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-08 5:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-04 9:02 How to implement rotation for framebuffer? arun c
2008-04-04 10:34 ` Geert Uytterhoeven
2008-04-08 5:03 ` arun c
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).