SAMA5D3 atmel_hlcdc DRM driver: use overlay plane for fbdev

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

Moderator: nferre

guille.rodriguez
Posts: 11
Joined: Tue Jul 14, 2015 5:18 pm

SAMA5D3 atmel_hlcdc DRM driver: use overlay plane for fbdev

Wed Aug 12, 2015 12:00 pm

Hello all,

The atmel_hlcdc DRM driver in the current kernel (3.18-at91 and mainline 4.1) supports fbdev emulation and provides access to the base plane of the SAMA5D3x LCD controller through /dev/fb0.

I would like to use one of the overlay planes for this instead of the base plane, so that I can do hardware rotation (not supported for the base plane). I don't actually need to have multiple /dev/fbX devices (I would be using the overlay plane only, as this would fill the whole display area).

So my plan was to take the atmel_hlcdc driver, find the code where the base plane is "exported" as /dev/fb0, and modify it to use the overlay1 plane instead. However after studying the source code for a while, I have not been able to figure out where/how this is done.

Can anyone help here? Any pointers would be more than welcome.

Thanks,

Guillermo
blue_z
Location: USA
Posts: 1547
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAMA5D3 atmel_hlcdc DRM driver: use overlay plane for fb

Thu Aug 13, 2015 1:28 am

guille.rodriguez wrote:So my plan was to take the atmel_hlcdc driver, find the code where the base plane is "exported" as /dev/fb0, and modify it to use the overlay1 plane instead. However after studying the source code for a while, I have not been able to figure out where/how this is done.
Seems like you're asking about a rather basic construct of how device nodes in /dev are related to the device(s) supported in a device driver. You need to study up on major and minor device numbers.
guille.rodriguez wrote:Can anyone help here? Any pointers would be more than welcome.
Your approach seems to be based on trying to reuse the (older) atmel_hlcdfb driver constructs (i.e. a minor number and device for each layer), and IMO is misguided. If you want that framework, then use Linux 3.10-at91.
Otherwise you should learn how to access the overlay plane within the given DRM framework/API, instead of trying to hack it.
Try starting with this: http://events.linuxfoundation.org/sites ... rm-kms.pdf
and
https://dvdhrm.wordpress.com/2012/09/13 ... tting-api/

Regards

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 3 guests