Linux V2.6 Display setting Colibri VF61

After upgrade to linux 2.6 the display isn’t working after boot.

A read that since linux 2.6 version, the display drivers has changed to DRM. Following the example from page Display Output, Resolution and Timings (Linux), I set the env as show bellow, but the display still blank after the boot. Is there some necessary modifications in the boot or in the device tree to set? What am I missing?

Colibri VFxx # setenv fdt_fixup ‘fdt addr ${fdt_addr_r} && fdt set /panel compatible “tpk,f07a-0102”’

Did the PWM backlight is configured accordingly as mentioned here for Fusion 7" display ?

Yes, Using oscilloscope I confirmed that PWM and BL_ON are operating correctly. And, I confirmed that the LVDS signals works only in the beginning of boot. When the kernel start, LVDS signals stopped.

May i know which exact display you are interfacing and on what display interface ?

we are using is 7" inch display with 18bits LVDS interface, PN:ATM0700L6J-CT from AZ-Display. (http://www.azdisplays.com/PDF/ATM0700L6J-CT.pdf)

VF61 module is installed in a proprietary card, that convert the 18bits RGB interface to LVDS.

This configuration (display + proprietary card) works fine til version 2.5, using the same configuration of 7" inch Fusion.

Ideally one need to add/use the display timings specific to LCD as mentioned in the LCDs reference manual. Re-check the dispay timings of your LCD and add them to panel-simple.c, as we did for Fusion 7" and 10" displays here. Atleast from the display timings pointof view we didn’t change much for Fusion displays.

May i know which Linux Image version is flashed on module?

We are using a compiled version with QT support - Colibri_VF_LinuxImage-qteV2.6.

Seems modesetting packge is missing in qt demo image, can you try adding the package to the qte demo image build.
Append the following in oe-core/build/conf/local.conf

IMAGE_INSTALL_append = "xf86-video-modesetting"

or append the package here

I don’t think that this is necessary as qte should use the framebuffer directly as far as I know.

thanks! @stefan.tx for correcting me, i was wrong… modesetting is not necessary when X is not used.

We could not reproduce the issue, here, it seems to work fine with the qte image and the 7" display. Does the kernel log shows an error?

Hello Stefan,

kernel log showed the error below, can it be correlated with the problem?

display-manager.service: Cannot add dependency job, ignoring: Unit display-manager.service failed to load: No such file or directory

That seems more like a systemd error message… Can you upload the full kernel log? E.g. using dmesg > logfile.txt and then copy that to your host & attach.

File from dmesg attached. link text

till now, I tried some things, like inserted the parameters values to the AZ Display ATM0700L6J (see code below) in the panel-simple.c and reconfigure device tree to point to the new entry, but have no success with it. Display still blank.

With the same setup, I rollback to 2.4 and display works fine. The only thing I have to do is to set environment with : setenv vidargs ‘video=dcufb:pixclockpol:0,800x480-16@60’ to get the correct resolution.

I’ve tried to set the environment with the alternatives below, one at a time (reconfiguring the boot per time to guarantee that both are not used at same time), but without success.

setenv vidargs 'video=LVDS-1:pixclockpol:0,800x480-16@60’

setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt set /panel compatible “azdisplay,atm0700l6j”'

Like I wrote before, at the boot, Toradex splash screen is showed, but when image starts, display becomes blank (this is a process, because the driver stops to refresh the display, so it will become blank after some seconds).

panel-simple.c

static const struct drm_display_mode azdisplay_atm0700l6j_mode = {
	.clock = 33300,
	.hdisplay = 800,
	.hsync_start = 800 + 210,
	.hsync_end = 800 + 210 + 1,
	.htotal = 800 + 210 + 1 + 45,
	.vdisplay = 480,
	.vsync_start = 480 + 22,
	.vsync_end = 480 + 22 + 1,
	.vtotal = 480 + 23 + 1 + 22,
	.vrefresh = 60,
	
};

static const struct panel_desc azdisplay_atm0700l6j = {
	.modes = &azdisplay_atm0700l6j_mode,
	.num_modes = 1,
	.size = {
		.width = 154,
		.height = 86,
	},
	.bus_flags = DRM_BUS_FLAG_PIXDATA_POSEDGE,
};
...

}, {
		.compatible = "azdisplay,atm0700l6j",
		.data = &azdisplay_atm0700l6j,
	}, {

device tree

panel: panel {
		compatible = "azdisplay,atm0700l6j";
		backlight = <&bl>;
		power-supply =  <&reg_3v3>;
	};

If you your previous compatible string was smaller, you need to resize the device tree, e.g.:

setenv fdt_fixup 'fdt addr ${fdt_addr_r} && fdt resize && fdt set /panel compatible "azdisplay,atm0700l6j"'

However, since you also made the change in the device tree itself, I guess that is not the issue.

Can you check what the driver is doing after boot up? E.g. get the resolution of the fbdev emulation using fbset or check sysfs:

root@vybridvf61-v12:~# cat /sys/class/drm/card0-LVDS-1/modes 
640x480
root@vybridvf61-v12:~# cat /sys/class/drm/card0-LVDS-1/status
connected

Also, do you get a signal before the LVDS converter (is the RGB signal looking good, e.g. reasonable pixelclock/vsync/hsync)?

Hello Stefan,

How can I change the HSYNC and VSYNC polarity in the DRM driver?

Comparing the signals from the one CPU with kernel 2.4 and another one with 2.6, the difference from the them is the HSYNC and VSYNC polatiy, in the 2.4 Version, these signals are positive with negative pulses, and in the 2.6 these signals are negative with positive signals (see images attached). [upload|N4dIsIKMSodNDvkO0GshNcrY1d0=] [upload|L/lgPgDRB/wlSeV3xaEKQL+gfJM=].

You can add flags to your struct drm_display_mode. I would expect that the following flags should reproduce the same behavior as on V2.4:

.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 

Otherwise try replacing N with P (e.g. …PHSYNC).

I just see that we don’t specify any flags in tpk_f07a_0102_mode, hence I guess this will fall back to a driver default. It seems that our Fusion display can work with either polarity while yours is a bit more picky…

On the latest BSP BL_ON is assigned to the backlight driver as enable-gpio: vf-colibri.dtsi « dts « boot « arm « arch - linux-toradex.git - Linux kernel for Apalis and Colibri modules

The pwm-backlight driver disables that GPIO if the lowest brightness is selected, hence something like this should toggle BL_ON:

echo 0 >  /sys/class/backlight/backlight/brightness
echo 1 >  /sys/class/backlight/backlight/brightness

What you also might do is disabling video output in Vybrid by clearing the video-mode environment variable:

setenv video-mode
saveenv