Use FrameBuffer with LCD video driver DRM Panel

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

merliness
Posts: 20
Joined: Mon Feb 06, 2012 2:57 pm

Use FrameBuffer with LCD video driver DRM Panel

Fri Nov 25, 2016 4:53 pm

Hello everyone,

I have a problem when using the LCD screen via framebuffer from user space. I added a screen 320 x 480 depth using the DRM panel on linux 3.18- at91 and i can test it with FBV application by display jpg images.

When I try to run a QT application example, I have a conversion error related to the pixel depth ( solidFill_setup(): Screen depth 24 not supported! )

I have the same problem when I try to play a video with mplayer
FATAL: Cannot initialize video driver.
Too many buffered pts
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[swscaler @ 0x6fd028]No accelerated colorspace conversion found from yuv420p to bgr24.
VO: [fbdev] 320x180 => 320x180 BGR 24-bit
Can't put VSCREENINFO: Invalid argument


Please, could someone tell me how to adjust the depth? Assuming that the problem is related.

Thank you in advance for your replies.
blue_z
Location: USA
Posts: 1505
Joined: Thu Apr 19, 2007 10:15 pm

Re: Use FrameBuffer with LCD video driver DRM Panel

Mon Nov 28, 2016 9:38 pm

merliness wrote:I added a screen 320 x 480 depth...
That's a spatial resolution specification, not "depth".
What are the pixel depth specs for that screen?
What specs did you configure your kernel with?

Regards
merliness
Posts: 20
Joined: Mon Feb 06, 2012 2:57 pm

Re: Use FrameBuffer with LCD video driver DRM Panel

Thu Dec 01, 2016 11:49 am

Hello,
Indeed, I forgot to specify the depth in my post. The depth is 18 bits (6bpp). Here is my DTB configuration and the screen added in the panel.

DRM /PANEL
static const struct drm_display_mode cfaf320480c4_035_mode = {
.clock = 8200,
.hdisplay = 320,
.hsync_start = 320 + 2,
.hsync_end = 320 + 2 + 2,
.htotal = 320 + 2 + 2 + 2,
.vdisplay = 480,
.vsync_start = 480 + 2,
.vsync_end = 480 + 2 + 2,
.vtotal = 480 + 2 + 2 + 2,
.vrefresh = 60,
.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
};

static const struct panel_desc cfaf320480c4_035 = {
.modes = &cfaf320480c4_035_mode,
.num_modes = 1,
.bpc = 6,
.size = {
.width = 49,
.height = 73,
},
.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
};


DTB

hlcdc: hlcdc@f8038000 {
hlcdc-display-controller {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666>;
port@0 {
hlcdc_panel_output: endpoint@0 {
reg = <0>;
remote-endpoint = <&panel_input>;
};
};
};
};

panel: panel {
compatible = "crystalfontz,cfaf320480c4-035", "simple-panel";
backlight = <&backlight>;
power-supply = <&panel_reg>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
port@0 {
#address-cells = <1>;
#size-cells = <0>;

panel_input: endpoint@0 {
reg = <0>;
remote-endpoint = <&hlcdc_panel_output>;
};
};


If you need further information to clarify my request, do not hesitate.

Best Regards,
blue_z
Location: USA
Posts: 1505
Joined: Thu Apr 19, 2007 10:15 pm

Re: Use FrameBuffer with LCD video driver DRM Panel

Fri Dec 02, 2016 2:15 am

merliness wrote:The depth is 18 bits (6bpp).
...
When I try to run a QT application example, I have a conversion error related to the pixel depth ( solidFill_setup(): Screen depth 24 not supported! )
So where is the 24-bit depth mentioned in the error messages coming from?

How is your QT graphical platform configured?
FYI the Atmel QT demo software uses fbdev emulation (i.e. linuxfb), and not directfb or eglfs or X11.
Your success with the fbv application obviously means that fbdev emulation has been enabled.

Regards
merliness
Posts: 20
Joined: Mon Feb 06, 2012 2:57 pm

Re: Use FrameBuffer with LCD video driver DRM Panel

Tue Dec 06, 2016 9:05 am

Hi,

Thanks for your reply.
Looking this document linux4sam/bin/view/Linux4SAM/UsingAtmelDRMDriver, in the section Choose supported modes It is recommended to change the fbdev emulation color mode because by default , the fbdev emulation on top of DRM driver is in 24 bits. So i change my CMDLINE but i have the same error.
I changed my command line but I still have the same error. Something wrong, there are the commands Line what i useed to do the tests. as a remembrer i use the LCD screen 320 (width )x 480 (hight) pixels in 18 bits depth.

Command Line to test 16 bits:
bootargs=console=ttyS0,115200 earlyprintk video=Unknown-1:320x480-16 mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,512k(spare),256k(env),256k(env_redundant),256k(dtb),1M(bitstream),4M(kernel),12M(bootfs),-(rootfs)

Command Line to test 18 bits:
bootargs=console=ttyS0,115200 earlyprintk video=Unknown-1:320x480-18 mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,512k(spare),256k(env),256k(env_redundant),256k(dtb),1M(bitstream),4M(kernel),12M(bootfs),-(rootfs)

Best regards,
blue_z
Location: USA
Posts: 1505
Joined: Thu Apr 19, 2007 10:15 pm

Re: Use FrameBuffer with LCD video driver DRM Panel

Wed Dec 07, 2016 1:55 am

merliness wrote:So i change my CMDLINE but i have the same error.
Maybe your QT application isn't using fbdev emulation.
One more time: How is your QT graphical platform configured?

Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: No registered users and 1 guest