AnsweredAssumed Answered

Configuring a Display connected via LVDS

Question asked by Mike Domondon on Jan 31, 2018
Latest reply on Feb 1, 2018 by Mike Domondon

Hi,

 

I'm new to android development and I was wondering if anyone can help me. I have an i.MX6Q Sabre SD board connected to a 1024x600 Panel via LVDS that is not displaying correctly. 

 

I followed the Android User's Guide (pdf) I downloaded from NXP and was able to obtain the android source, patch it and build successfully. I was able load the image files that I built to an MMC and boot. When the board booted up, the lcd panel was not displaying correctly. Part of the display is cut out. Upon investigation, the resolution trying to be displayed is 1200x768 (which makes the lower part of what is supposed to be displayed cut out).

 

I was able to make the display output correctly during the bootloader part by changing this file:

/bootable/bootloader/uboot-imx/board/freescale/mx6sabresd/mx6sabresd.c line 691

 

struct display_info_t const displays[] = {{
.bus = -1,
.addr = 0,
.pixfmt = IPU_PIX_FMT_RGB666,
.detect = NULL,
.enable = enable_lvds,
.mode = {
.name           = "Test-XGA",
.refresh        = 60,
.xres           = 1024,
.yres           = 600,
.pixclock       = 19531,
.left_margin    = 160,
.right_margin   = 24,
.upper_margin   = 26,
.lower_margin   = 3,
.hsync_len      = 136,
.vsync_len      = 6,
.sync           = FB_SYNC_EXT,
.vmode          = FB_VMODE_NONINTERLACED
} },
I modified the parameters (changed 1024x768 to 1024x600, I also replaced the timings based on the data sheet of the display)
Once, android is loaded though, the display output is not correct again. Reading through the existing questions in this community, it seems I need to modify a device configuration file in the kernel. I am not sure which dts file I need to change though. I tried adding display-timings to kernel_imx/arch/arm/boot/dts/imx6q-sabresd.dts, b ut the display output did not change. Below is what I added:
&ldb {
lvds-channel@0 {
crtc = "ipu2-di0";

fsl,data-mapping = "spwg";
fsl,data-width = <18>;
status = "okay";

 

display-timings {
native-mode = <&timing0>;
timing0: hsd100pxn1 {
clock-frequency = <51200000>;
hactive = <1024>;
vactive = <600>;
hback-porch = <160>;
hfront-porch = <24>;
vback-porch = <26>;
vfront-porch = <3>;
hsync-len = <136>;
vsync-len = <6>;
};
};
};

 

lvds-channel@1 {
crtc = "ipu2-di1";

fsl,data-mapping = "spwg";
fsl,data-width = <18>;
primary;
status = "okay";

 

display-timings {
native-mode = <&timing1>;
timing1: hsd100pxn1 {
clock-frequency = <51200000>;
hactive = <1024>;
vactive = <600>;
hback-porch = <160>;
hfront-porch = <24>;
vback-porch = <26>;
vfront-porch = <3>;
hsync-len = <136>;
vsync-len = <6>;
};
};
};
};
Can anyone point me in the right direction?
Thanks.

Outcomes