All of lore.kernel.org
 help / color / mirror / Atom feed
* Error while rotating LCD fb - detected fb_set_par error, error code: -22
@ 2011-05-27 10:10 Mohamed Thalib H
  2011-05-27 14:30 ` Mohamed Thalib H
  0 siblings, 1 reply; 3+ messages in thread
From: Mohamed Thalib H @ 2011-05-27 10:10 UTC (permalink / raw)
  To: linux-omap

Hi,

I am using a omap3530 
<http://focus-webapps.ti.com/general/docs/sitesearch/searchdevice.tsp?partNumber=omap3530> 
based board. I am trying to rotate the LCD 
using*/sys/class/graphics/fb0/rotate*. The rotation works only for 0 
degree and 270 degrees.

When trying to rotate for 90 or 180 degree it give error message 
*detected fb_set_par error, error code: -22 *and does not rotate.

The log output is below.*
*

/ # cat /proc/cmdline
omapdss.def_disp=lcd30 console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw 
rootfstype=ext3
  rootwait lpj=1949696 omapfb.rotate=1 omapfb.rotate_type=1 
omap_vout.vid1_static_vrf
b_alloc=y omapfb.vrfb=y
/ # echo "0" > /sys/class/graphics/fb0/rotate
detected fb_set_par error, error code: -22
/ # echo "1" > /sys/class/graphics/fb0/rotate
/ # echo "2" > /sys/class/graphics/fb0/rotate
detected fb_set_par error, error code: -22
/ # echo "3" > /sys/class/graphics/fb0/rotate
/ # echo "1" > /sys/class/graphics/fb0/rotate

Can some one help me in solving this issue.

Regards,
HM Thalib


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Error while rotating LCD fb - detected fb_set_par error, error code: -22
  2011-05-27 10:10 Error while rotating LCD fb - detected fb_set_par error, error code: -22 Mohamed Thalib H
@ 2011-05-27 14:30 ` Mohamed Thalib H
  2011-05-30  6:49   ` Tomi Valkeinen
  0 siblings, 1 reply; 3+ messages in thread
From: Mohamed Thalib H @ 2011-05-27 14:30 UTC (permalink / raw)
  To: linux-omap

On Friday 27 May 2011 03:40 PM, Mohamed Thalib H wrote:
> Hi,
>
> I am using a omap3530 
> <http://focus-webapps.ti.com/general/docs/sitesearch/searchdevice.tsp?partNumber=omap3530> 
> based board. I am trying to rotate the LCD 
> using*/sys/class/graphics/fb0/rotate*. The rotation works only for 0 
> degree and 270 degrees.
>
> When trying to rotate for 90 or 180 degree it give error message 
> *detected fb_set_par error, error code: -22 *and does not rotate.
>
> The log output is below.*
> *
>
> / # cat /proc/cmdline
> omapdss.def_disp=lcd30 console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw 
> rootfstype=ext3
>  rootwait lpj=1949696 omapfb.rotate=1 omapfb.rotate_type=1 
> omap_vout.vid1_static_vrf
> b_alloc=y omapfb.vrfb=y
> / # echo "0" > /sys/class/graphics/fb0/rotate
> detected fb_set_par error, error code: -22
> / # echo "1" > /sys/class/graphics/fb0/rotate
> / # echo "2" > /sys/class/graphics/fb0/rotate
> detected fb_set_par error, error code: -22
> / # echo "3" > /sys/class/graphics/fb0/rotate
> / # echo "1" > /sys/class/graphics/fb0/rotate
>
> Can some one help me in solving this issue.
>
> Regards,
> HM Thalib
>

For you info I am using 2.6.34 kernel. LCD size is 240x480

While tracing though the source code I have found out that in file 
*drivers/video/omap2/dss/overlay.c *function *dss_check_overlay() *it is 
checking if *dw < info->pos_x + outw *which is *(240 < 0 + 400)*

that is if my overlay width is smaller than screen size, if so return 
error.

Have any one faced the same scenario.  If I am doing something wrong, 
Please let me know the correct steps to rotate the screen.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Error while rotating LCD fb - detected fb_set_par error, error code: -22
  2011-05-27 14:30 ` Mohamed Thalib H
@ 2011-05-30  6:49   ` Tomi Valkeinen
  0 siblings, 0 replies; 3+ messages in thread
From: Tomi Valkeinen @ 2011-05-30  6:49 UTC (permalink / raw)
  To: Mohamed Thalib H; +Cc: linux-omap

On Fri, 2011-05-27 at 20:00 +0530, Mohamed Thalib H wrote:
> On Friday 27 May 2011 03:40 PM, Mohamed Thalib H wrote:
> > Hi,
> >
> > I am using a omap3530 
> > <http://focus-webapps.ti.com/general/docs/sitesearch/searchdevice.tsp?partNumber=omap3530> 
> > based board. I am trying to rotate the LCD 
> > using*/sys/class/graphics/fb0/rotate*. The rotation works only for 0 
> > degree and 270 degrees.
> >
> > When trying to rotate for 90 or 180 degree it give error message 
> > *detected fb_set_par error, error code: -22 *and does not rotate.
> >
> > The log output is below.*
> > *
> >
> > / # cat /proc/cmdline
> > omapdss.def_disp=lcd30 console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw 
> > rootfstype=ext3
> >  rootwait lpj=1949696 omapfb.rotate=1 omapfb.rotate_type=1 
> > omap_vout.vid1_static_vrf
> > b_alloc=y omapfb.vrfb=y
> > / # echo "0" > /sys/class/graphics/fb0/rotate
> > detected fb_set_par error, error code: -22
> > / # echo "1" > /sys/class/graphics/fb0/rotate
> > / # echo "2" > /sys/class/graphics/fb0/rotate
> > detected fb_set_par error, error code: -22
> > / # echo "3" > /sys/class/graphics/fb0/rotate
> > / # echo "1" > /sys/class/graphics/fb0/rotate
> >
> > Can some one help me in solving this issue.
> >
> > Regards,
> > HM Thalib
> >
> 
> For you info I am using 2.6.34 kernel. LCD size is 240x480
> 
> While tracing though the source code I have found out that in file 
> *drivers/video/omap2/dss/overlay.c *function *dss_check_overlay() *it is 
> checking if *dw < info->pos_x + outw *which is *(240 < 0 + 400)*
> 
> that is if my overlay width is smaller than screen size, if so return 
> error.
> 
> Have any one faced the same scenario.  If I am doing something wrong, 
> Please let me know the correct steps to rotate the screen.

The driver does not resize the framebuffer for you. You need to resize
and redraw it.

It's been a while since I used rotation, but something like this should
work:

- disable the overlay
- resize the framebuffer
- resize the overlay (could be done automatically in the previous step)
- set rotation
- enable overlay

For testing purposes you may also want to try a square framebuffer
(240x240), in which case you can rotate it freely as it always fits in
the screen.

Also, you're using quite an old kernel. I suggest using newer, if
possible. 

 Tomi



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-30  6:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27 10:10 Error while rotating LCD fb - detected fb_set_par error, error code: -22 Mohamed Thalib H
2011-05-27 14:30 ` Mohamed Thalib H
2011-05-30  6:49   ` Tomi Valkeinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.