Configuring a Display connected via LVDS

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

Configuring a Display connected via LVDS

Jump to solution
1,297 Views
mdomondon
Contributor I

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.
0 Kudos
1 Solution
972 Views
igorpadykov
NXP Employee
NXP Employee

Hi Mike

what processor and android release used in the case. 1024x600 example

can be found on

How to change SABRE-SD screen resolution in LOLLIPOP(5.0.0? 

For i.MX6Q one can check LVDS MUX control with IOMUXC_GPR3.

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

View solution in original post

0 Kudos
2 Replies
973 Views
igorpadykov
NXP Employee
NXP Employee

Hi Mike

what processor and android release used in the case. 1024x600 example

can be found on

How to change SABRE-SD screen resolution in LOLLIPOP(5.0.0? 

For i.MX6Q one can check LVDS MUX control with IOMUXC_GPR3.

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

0 Kudos
972 Views
mdomondon
Contributor I

Hi Igor, 

Solved my issue. I was actually already doing the same thing as the link you provided:

How to change SABRE-SD screen resolution in LOLLIPOP(5.0.0? 

My problem was elsewhere. Apparently, the script (/device/fsl/common/tools/fsl-sdcard-partition.sh) for flashing the built images to an SD card was not working for me. It was only flashing the bootloader correctly, the kernel and the rest of the images were left over from images I flashed previously using the MFGTool in Windows. 

When I used the MFGTool to flash the images I built, my display was now working as expected.

(Now I just have to figure out how to get the script working so I don't have to keep switching between Ubuntu and Windows... )

Thanks,

Mike

 

0 Kudos