Display bpp definition on device-tree

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

Display bpp definition on device-tree

2,767 Views
NunoVilaca
Contributor II

Hi.

We are building a board using Variscite's Var-som-mx6 module, and we are having trouble to set the lvds's bpp to 24 on the device-tree files.

Display are working well, we got timings correct, data-with to 24, etc but the default bpp remains at 16 (we can check it visually by send images to the FB that use colour gradients, but also confirm it by making a cat to /sys/class/grafics/fbX/bits_per_pixel. )

I managed to set it using u-boot's kernel parameters (video=mxcfb0:dev=ldb,800x600M@59,if=RGB24,bpp=24), but i really would really like to achieve the same using the device-tree files. Is it possible?

i already tried adding diferent properties to the framebuffer:
mxcfb2: fb@1 {
compatible = "fsl,mxc_sdc_fb";
disp_dev = "ldb";
interface_pix_fmt = "RGB24";
default_bpp = <24>;
bpp = <24>;
int_clk = <0>;
late_init = <0>;
status = "disabled";
};

and even trying to set them together with the display timmings:

display-timings {
native-mode = <&timing1>;
timing1: hsd100pxn1 {
clock-frequency = <40000000>;
hactive = <800>;
vactive = <600>;
hback-porch = <88>;
hfront-porch = <40>;
vback-porch = <23>;
vfront-porch = <39>;
hsync-len = <128>;
vsync-len = <4>;
bpp = <24>;
};
};

We use 2 identical lvds displays, using both channels, so i set the device on channel 0 using u-boot, and am trying to acieve the same on channel 1 using dtb only.

Using kernel 3.10.31

Labels (2)
Tags (1)
0 Kudos
Reply
2 Replies

1,541 Views
joanxie
NXP TechSupport
NXP TechSupport

try to set the bpp int he ipu framebuffer, I'm not sure the path in the yocto, in the ltib, the path is drivers/video/mxc, the file name like mxc_ipu_fb.c, you can try to find it in the yocto.

0 Kudos
Reply

1,541 Views
NunoVilaca
Contributor II

I apreciate the answer, but i wanted to avoid altering the kernel, as it would force me to have diferent kernels for machines using diferent displays, thus defeating the purpose of the device-trees.

I used the bootargs on the u-boot, but now i'm configuring a diferent machine, and wanted to get back to this issue... I've been looking around the device-tree documentation, and i believe i should be able to use the mxc_sdc_fb to define this:

mxcfb1: fb@0 {
compatible = "fsl,mxc_sdc_fb";
disp_dev = "ldb";
interface_pix_fmt = "RGB24";
default_bpp = <24>;
int_clk = <0>;
late_init = <0>;
status = "enabled";
};

i boot the device , it's set to 16 bits:

root@localhost:/sys/class/graphics/fb0# cat bits_per_pixel

16

A quick test with an image confirms that it is at 16 bpp. If i echo 24 > bits_per_pixel  it get to 24 bpp correctly.

0 Kudos
Reply