i.MX6 Framebuffer scale/resize

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6 Framebuffer scale/resize

4,310 Views
friederschrempf
Contributor IV

Hi,

is it somehow possible to configure the framebuffer for a certain resolution but use a display with a higher resolution and stretch/scale the fb content to the display?

I see that the IPU has scaling capabilities, but is it possible to use them in the fb kernel driver to achieve this?

Thanks for any hints and suggestions!

Regards

Frieder

Labels (1)
9 Replies

2,652 Views
vishnukumark
Contributor I

hi friederschrempf,

   can you share the code of how you implemented the resizing using ipu in kernel ?

0 Kudos

2,652 Views
friederschrempf
Contributor IV

Hello Vishnu,

I replaced my own rudimentary implementation with the one from Carsten Behling at "Garz & Fricke".

They have a driver in their BSP that provides a secondary framebuffer used for scaling (see attachment).

The whole BSP can be downloaded here: http://support.garz-fricke.com/products/Santaro/Linux-Yocto/Releases/Yocto-jethro-10.0-r7885-0/GUF-Y... .

The driver module is located at "sources/meta-guf/meta/recipes-guf/mxc-ipuv3-scalefb/mxc-ipuv3-scalefb/" inside the archive.

Best Regards

Frieder

2,652 Views
matthewmckay-da
Contributor II

Hi Frieder,

Just adding an updated link to your post.

SANTARO core - Single Board Computer | Garz & Fricke 

The software downloads are on the right... I've just checked the "Linux Yocto Rocko - Source" tar.bz2 and it includes the driver you mention.

This looks like a good starting point for what I'm trying to do.

Thanks!

0 Kudos

2,652 Views
rob_mclean
Contributor IV

Hi friederschrempf,

I'm trying to clone an LVDS display to an HDMI.  Meaning I need to have the same content displayed on both LVDS and HDMI when HDMI is connected.  The LVDS and HDMI don't use the same resolutions so I thought the scalefb driver you attached above could be an inspiration to me for how to use the IPU to scale the LVDS image buffer in HW to create an image with the proper resolution for the HDMI.

I was hoping that driver would "just work" with my 4.9 kernel, but it did not.  I'm wondering what kernel version it came from.  My suspicion is the driver came from a late 3.x branch of the kernel, and there may be changes to the way the IPU driver works which I might have to account for.

BTW the Jethro Yocto link mentioned above is no longer valid, so I can't rummage through the Yocto meta-layers to figure it out on my own.

Thanks for any help.

Robert

0 Kudos

2,652 Views
friederschrempf
Contributor IV

Hi Robert,

I think the driver was for something like linux-imx 3.10 or 3.14. But I have no idea how to do something like this on 4.9.

Later kernel versions use DRM instead of FB as a driver framework so I would rather look for a DRM-based solution.

Regards,

Frieder

0 Kudos

2,652 Views
rob_mclean
Contributor IV

Frieder,

For what it is worth…

The 4.9 kernel I’m working with uses a mxc_ipuv3_fb driver which is nearly identical to the one that is in the 4.1 kernel. That said, I think there may be changes to the other drivers which the fb driver that might be causing that driver issues. I’m glad you posted the source for that driver because I haven’t found anything like it anywhere else.

BTW…

I haven’t done too much research into it, but from what I can tell, it looks like i.MX8 got introductory support for DRM in the SDK with the 4.14 kernel. I’m not sure when NXP started supporting DRM for the i.MX6.

Thank you very much for your help.

0 Kudos

2,652 Views
igorpadykov
NXP Employee
NXP Employee

Hi Frieder

one can look at resize examples in

https://community.freescale.com/docs/DOC-94961

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,652 Views
friederschrempf
Contributor IV

Hello igor,

thanks, I've seen the examples, but I wonder if it is possible to implement this inside the kernel fb driver to scale frames between framebuffer and display automatically?

There are input and output channels implemented in mxc_ipuv3_fb.c and maybe someone can give me a hint if it is possible to change their configuration to achieve scaling between input and output?

The example itself is for userspace applications and does the conversion manually.

Regards

Frieder

0 Kudos

2,652 Views
friederschrempf
Contributor IV

I found a way to implement scaling in the framebuffer driver. I used the rotation patch and modified it to do scaling with IC instead of rotation with IRT.

This works fine for display resolutions below 1024x1024 pixel, but I run into the IC output limit for my specific use-case (1280x800).

Can someone help me implementing the splitting of frames before conversion?

I can see how ipu_device.c does the splitting, but I have no idea on how to use that in mxc_ipuv3_fb.c.

Thanks and regards

Frieder

0 Kudos