Yocto Dora 3.10.17 BT656 Support

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

Yocto Dora 3.10.17 BT656 Support

Jump to solution
2,460 Views
matthewreynolds
Contributor III

Greeting All,

 

I am developing with a custom board based on the SaberSD and I am using the Yocto Dora 3.17.17 distribution.  Our board will only use a BT656 out of DISP0_DAT7-DISP0_DAT0, which I am testing with a Intersil decoder that drives the video to a LCD.  I ported the LTIB patch "0001-Support-BT656-and-BT1120-output-for-iMX6-ipuv3.patch", (Patch to Support BT656 and BT1120 Output For i.MX6 BSP) and the bt656 driver appears to be functional, however I am having a few problems with it and could use some help trouble shooting.

 

The issues I see are

- X server is crashing. The penguins and the Yocto spash display during boot, but  X server crashes with a segmentation fault.  After the Yocto splash a command line console is displayed instead of the desktop.  It appears VIVANTE is not happy with any of the new interlaced modes (see the /var/log/Xorg.0.log excerpt below or attachment for full log).

- When fbpix=UYVY16, the screen colours are not correct.  Black is green, etc.  To me it looks like the IPU is not performing the RGB to YUV color space conversions.  When fbpix=RGB565 colours are correct.

- The vertical alignment is off and not filling the bottom of the screen.

 

Below I have tried listing any relevant information regarding the video.  I have also attached my dmesg and Xorg.log.0.

 

ipu_disp.c was modified BT656_IF_DI_MSB as noted

 

Kernel command line: console=ttymxc2,115200 video=mxcfb0:dev=bt656,BT656-NTSC,if=BT656,fbpix=UYVY16 root=/dev/mmcblk0p2 rootwait rw

 

/var/log/Xorg.0.log

--------------------------------------------

...

[1630468.041]   ABI class: X.Org Video Driver, version 14.1

[1630468.051] (II) VIVANTE(0): printing discovered frame buffer 'fb0' supported

[1630468.051] (II) VIVANTE(0): Modeline "D:720x576i-25"x0.0   13.50  720 722 870

[1630468.052] (II) VIVANTE(0): Modeline "D:720x4bt65680i-30"x0.0   13.50  720 723 865

[1630468.052] (II) VIVANTE(0): Modeline "D:720x576i-50"x0.0   27.00  720 722 101

[1630468.052] (II) VIVANTE(0): Modeline "D:720x480i-60"x0.0   27.00  720 723 999

[1630468.070] (II) VIVANTE(0): Output DISP3 BG has no monitor section

[1630468.070] (II) VIVANTE(0): Not using mode "D:720x576i-25" (interlace mode no

[1630468.070] (II) VIVANTE(0): Not using mode "D:720x480i-30" (interlace mode no

[1630468.070] (II) VIVANTE(0): Not using mode "D:720x576i-50" (interlace mode no

[1630468.071] (II) VIVANTE(0): Not using mode "D:720x480i-60" (interlace mode no

[1630468.071] (II) VIVANTE(0): No remaining probed modes for output DISP3 BG

[1630468.071] (II) VIVANTE(0): Output DISP3 BG connected

[1630468.071] (WW) VIVANTE(0): Unable to find initial modes

[1630468.071] (EE) VIVANTE(0): Output DISP3 BG enabled but has no modes

[1630468.071] (EE) VIVANTE(0): xf86InitialConfiguration failed

[1630468.071] (II) VIVANTE(0): FBDevPreInit: adjust display width 0

[1630468.071] (**) VIVANTE(0): PreInit done

[1630468.071] (EE)

[1630468.071] (EE) Backtrace:

[1630468.071] (EE)

[1630468.072] (EE) Segmentation fault at address 0x18

 

Frame Buffer 0 info

--------------------------------------------

cat /sys/class/graphics/name

DISP3 BG

cat /sys/class/graphics/mode

D:720x480i-60

cat /sys/class/graphics/modes

D:720x576i-25
D:720x480i-30
D:720x576i-50
D:720x480i-60

cat /sys/class/graphics/fsl_disp_property

2-layer-fb-bg

cat /sys/class/graphics/fsl_disp_dev_property       

bt656

 

As part of the port it was necessary to integrate the driver with the FDT.  I am a bit of a novice with this so it may be incorrect.  I replaced  the lcd entry with this bt656 entry in the imx6qdl-sabersd.dtsi file.

--------------------------------------------

bt656@0 {

        compatible = "fsl,bt656";

        ipu_id = <0>;

        disp_id = <0>;

        default_ifmt = "BT656";

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ipu1_1>;

        status = "okay";

    };

 

Does fb0 need to be a progressive video mode for X Server to work?  Furthermore, does the display need to be RGB565?  I had disabled some modules like the LCD, HDMI, etc in our defconfig and am trying to determine if that is the issue.

 

I should also note that I did not port "0002-Support-adv739x-TV-encoder-for-BT656-output.patch" or "0003-Enhance-dual-display-support-for-BT656-output.patch".  I did not think they were necessary since I am not using that ADV device or plan on supportng dual outputs.  Are there any issues using the 0001-Support-BT656-and-BT1120-output-for-iMX6-ipuv3.patch by itself?

 

Any help is greatly appreciated.

 

Best Regards,
Matthew

 

Edit:

The issue about the video not filling the screen was a setting issue with the Techwell decoder and not the IMX6.

Original Attachment has been moved to: bt656_xorg_crash.log.zip

Original Attachment has been moved to: bt656_dmesg.zip

Tags (4)
0 Kudos
1 Solution
938 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

"(II) VIVANTE(0): Not using mode "D:720x480i-60" (interlace mode no"

The log shows Vivante server lib can't support interlace mode display, maybe you can modify the code in that lib to skip the interlace display check.

For your case, I think it is OK to just use the 0001-Support-BT656-and-BT1120-output-for-iMX6-ipuv3.patch only. By the way, the frame buffer format should be RGB format, for example fbpix=RGB565 or fbpix=RGB24, if you set fbpix=UYVY16, the means application should draw YUV data into frame buffer to get the correct color, Xserver can't support it.

View solution in original post

0 Kudos
5 Replies
939 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

"(II) VIVANTE(0): Not using mode "D:720x480i-60" (interlace mode no"

The log shows Vivante server lib can't support interlace mode display, maybe you can modify the code in that lib to skip the interlace display check.

For your case, I think it is OK to just use the 0001-Support-BT656-and-BT1120-output-for-iMX6-ipuv3.patch only. By the way, the frame buffer format should be RGB format, for example fbpix=RGB565 or fbpix=RGB24, if you set fbpix=UYVY16, the means application should draw YUV data into frame buffer to get the correct color, Xserver can't support it.

0 Kudos
938 Views
matthewreynolds
Contributor III

Qiang,

Thank you very much.  Your suggestion to disable the interface display check worked.  If anyone else is looking to do the same thing, the that file that I modified was "xserver-xorg/2_1.14.0-r8.1/xorg-server-1.14.0/hw/xfree86/modes/xf86modes.c".

/**

  * Marks as bad any modes with unsupported flags.

  *

@@ -406,8 +407,8 @@ xf86ValidateModesFlags(ScrnInfoPtr pScrn

         return;

     for (mode = modeList; mode != NULL; mode = mode->next) {

-        if (mode->Flags & V_INTERLACE && !(flags & V_INTERLACE))

-            mode->status = MODE_NO_INTERLACE;

+        //if (mode->Flags & V_INTERLACE && !(flags & V_INTERLACE)) //mpr test

+        //    mode->status = MODE_NO_INTERLACE;

         if (mode->Flags & V_DBLSCAN && !(flags & V_DBLSCAN))

             mode->status = MODE_NO_DBLESCAN;

     }

Alternatively, I think is is possible to add a interlaced support flag to Xorg.conf,   It is my guess that the V_INTERLACE bit in the flags parameter passed in this function will get set and that will prevent the MODE_NO_INTERLACE status.

Thank you again,

Matthew

0 Kudos
938 Views
yandeqian
Contributor I

     I also have this problems using Yocto source(fsl-x11-image) with BT656 Patch, But I can't find xserver-xorg source, where I can find the source, and how to build?

0 Kudos
938 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

If you are using the L3.10.17_GA1.0.0 BSP, the code is in " xserver-xorg-video-imx-viv-3.10.17-1.0.0/EXA/src/vivante_fbdev/imx_display.c".

ModeStatus
imxDisplayValidMode(VALID_MODE_DECL)
{
#ifndef XF86_SCRN_INTERFACE
        ScrnInfoPtr pScrn = xf86Screens[arg];
#else
        ScrnInfoPtr pScrn = arg;
#endif

        if (mode->Flags & V_INTERLACE) {
                if (verbose) {
                        xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
                                   "Removing interlaced mode \"%s\"\n",
                                   mode->name);
                }
                return MODE_BAD;
        }
        return MODE_OK;
}

0 Kudos
938 Views
yandeqian
Contributor I

We are using L3.10.17_GA1.0.0 BSP too, but we can't find any file about "xserver-xorg-video-imx-viv-3.10.17-1.0.0", please give us the absolute path, here is our path about xserver, we build the project using fsl-image-x11. why we lose the xserver-xorg-video-imx-viv-3.10.17-1.0.0 files?

root@adas-virtual-machine:/work/fsl-release-bsp/build-ai-x11/tmp# find ./ -name xserver-xorg*

./buildstats/fsl-image-x11-imx6qsabreauto/201411260927/xserver-xorg-2_1.14.0-r8.1

./buildstats/fsl-image-x11-imx6qsabreauto/201411261542/xserver-xorg-2_1.14.0-r8.1

./buildstats/fsl-image-x11-imx6qsabreauto/201411261542/xserver-xorg-extension-viv-hdmi-3.10.17-1.0.0-r0

./stamps/imx6qsabreauto-poky-linux-gnueabi/xserver-xorg-extension-viv-hdmi

./stamps/cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/xserver-xorg

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-multimedia-modules-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-dev-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-utils-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-xvfb-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-dbg-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-module-exa-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-module-libint10-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-extension-glx-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-module-libwfb-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/cortexa9hf_vfp_neon_mx6/xserver-xorg-doc-1.14.0-r8.1.cortexa9hf_vfp_neon_mx6.rpm

./deploy/rpm/imx6qsabreauto/xserver-xorg-extension-viv-hdmi-dbg-3.10.17+1.0.0-r0.imx6qsabreauto.rpm

./deploy/rpm/imx6qsabreauto/xserver-xorg-extension-viv-hdmi-3.10.17+1.0.0-r0.imx6qsabreauto.rpm

./deploy/rpm/imx6qsabreauto/xserver-xorg-extension-viv-hdmi-dev-3.10.17+1.0.0-r0.imx6qsabreauto.rpm

./deploy/licenses/xserver-xorg-extension-viv-hdmi

./deploy/licenses/xserver-xorg

0 Kudos