Screen rotation with 3.18 kernel (SAMA5D3)

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

romainht
Posts: 10
Joined: Mon Feb 23, 2015 5:49 pm

Screen rotation with 3.18 kernel (SAMA5D3)

Wed May 20, 2015 12:15 pm

Hello,
I'm using atmel-hlcdc driver to control a LCD panel and an application uses the /dev/fb0 framebuffer created by the driver. The display works fine except that the panel's standard orientation is portrait mode (120x320) and I need to use it in landscape mode( 320x120).
The driver seems to allow 90° planes rotation (atmel_hlcdc_plane.c) but I don't find how I can configure it to have a 320x120 framebuffer with 90° hardware rotation. I tried to dive into drm/kms source code and manuals but I must admit that it's quiet complicared for a Linux beginner...

Any help is welcome. Thanks !
blue_z
Location: USA
Posts: 1547
Joined: Thu Apr 19, 2007 10:15 pm

Re: Screen rotation with 3.18 kernel (SAMA5D3)

Fri May 22, 2015 4:04 am

The datasheet mentions that the rotation engine is only for the overlays, and not the baselayer (i.e. background). The 3.18 driver seems to only have only one framebuffer device node, unlike the three nodes of the 3.10 driver.
So you need to figure out how to access the overlays as well performing a rotation.

Try searching for "rotation" in the kernel Documentation directory (e.g. fb/api.txt, fb/fbcon.txt and DocBook/drm.tmpl).

Regards
romainht
Posts: 10
Joined: Mon Feb 23, 2015 5:49 pm

Re: Screen rotation with 3.18 kernel (SAMA5D3)

Fri May 22, 2015 9:19 am

Thanks,
I also came to the conclusion that I had to use overlay planes. I managed to check rotation using modetest :

Code: Select all

modetest -M atmel-hlcdc -w 10:rotation:2
modetest -M atmel-hlcdc -P 14:320x120+0+0
modetest -M atmel-hlcdc -w 10:rotation:8
modetest -M atmel-hlcdc -P 14:320x120+0+0
I must now find how to create /dev/fb1 for the first overlay so that my application can use it...
nferre
Site Admin
Posts: 166
Joined: Wed Feb 14, 2007 11:17 am

Re: Screen rotation with 3.18 kernel (SAMA5D3)

Fri May 22, 2015 4:17 pm

romainht wrote: I must now find how to create /dev/fb1 for the first overlay so that my application can use it...
I'm not sure it's doable...
You'd better use DRM & libdrm infrastructure directly, I think (never tried myself though).
romainht
Posts: 10
Joined: Mon Feb 23, 2015 5:49 pm

Re: Screen rotation with 3.18 kernel (SAMA5D3)

Mon May 25, 2015 5:54 pm

Ok, I have started reading some examples about libdrm.
Thanks !

Return to “Linux”

Who is online

Users browsing this forum: Google [Bot] and 2 guests