<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: IMX6D LVDS not working</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX6D-LVDS-not-working/m-p/1985669#M230342</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/34846"&gt;@Bio_TICFSL&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thank you for the reply. I have a couple of questions.&lt;BR /&gt;First, what linux kernel version would you recommend to use (branch or tag would be even better).&lt;BR /&gt;Second, if I understood you correctly I should try and set ldb_clk (ldb_di1_clk in my case, because only channel 1 is used) to the desired clock after acquiring it, so that then ipu clk would be set to the right value. So I created the following patch:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c
index 33ff22ca860f..be0149c6402f 100644
--- a/drivers/mxc/ipu3/ipu_disp.c
+++ b/drivers/mxc/ipu3/ipu_disp.c
@@ -1109,6 +1109,19 @@ int32_t ipu_init_sync_panel(struct ipu_soc *ipu, int disp, uint32_t pixel_clk,
 		dev_err(ipu-&amp;gt;dev, "clk_get di1 failed");
 		return PTR_ERR(ldb_di1_clk);
 	}
+	// Attempt to set ldb_di1_clk rate close to pixel_clk
+	ret = clk_set_rate(ldb_di1_clk, pixel_clk);
+	if (ret) {
+		dev_err(ipu-&amp;gt;dev, "Failed to set ldb_di1_clk rate: %d\n", ret);
+		return ret;
+	}
+
+	// Set ldb_di1_clk as the parent of pixel_clk to ensure synchronization
+	ret = clk_set_parent(ipu-&amp;gt;pixel_clk_sel[disp], ldb_di1_clk);
+	if (ret) {
+		dev_err(ipu-&amp;gt;dev, "Failed to set pixel_clk parent to ldb_di1_clk: %d\n", ret);
+		return ret;
+	}
 	if (!strcmp(__clk_get_name(di_parent), __clk_get_name(ldb_di0_clk)) ||
 		!strcmp(__clk_get_name(di_parent), __clk_get_name(ldb_di1_clk))) {
 		/* if di clk parent is tve/ldb, then keep it;*/
-- 
2.34.1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but in response to the changes I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;imx-ipuv3 2800000.ipu: Failed to set pixel_clk parent to ldb_di1_clk: -22&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, let me know if I understood you correctly.&lt;BR /&gt;Thirdly, a question off topic. I am also trying to enable dev_dbg messages to see them in dmesg by enabling dynamic debug and adding this to the kernel command line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dyndbg="file ipu_disp.c +p"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but in the kernel boot logs I get the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dyndbg: ipu_disp.c="(null)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it mean that it cannot find ipu_disp.c file? Am I configuring this wrong?&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2024 15:37:36 GMT</pubDate>
    <dc:creator>lyashmik</dc:creator>
    <dc:date>2024-10-31T15:37:36Z</dc:date>
    <item>
      <title>IMX6D LVDS not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6D-LVDS-not-working/m-p/1978263#M229922</link>
      <description>&lt;P&gt;I am trying to setup LVDS display on IMX6D which is working only through LVDS1 channel. The display is LG lb070wv8-sl02 (datasheet attached). I have changed imx6qdl-sabresd.dtsi like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;mxcfb1: fb@0 {
		compatible = "fsl,mxc_sdc_fb";
		disp_dev = "ldb";
		interface_pix_fmt = "RGB24";
		default_bpp = &amp;lt;24&amp;gt;;
		int_clk = &amp;lt;0&amp;gt;;
		late_init = &amp;lt;0&amp;gt;;
		status = "okay";
	};
&amp;amp;ldb {
	status = "okay";
	#address-cells = &amp;lt;1&amp;gt;;
	#size-cells = &amp;lt;0&amp;gt;;
    compatible = "fsl,imx6q-ldb";
	gpr = &amp;lt;&amp;amp;gpr&amp;gt;;
	primary;

	lvds-channel@0 {
		fsl,data-mapping = "spwg";
		fsl,data-width = &amp;lt;18&amp;gt;;
		status = "disabled";

		display-timings {
			native-mode = &amp;lt;&amp;amp;timing0&amp;gt;;
			timing0: hsd100pxn1 {
				clock-frequency = &amp;lt;65000000&amp;gt;;
				hactive = &amp;lt;1024&amp;gt;;
				vactive = &amp;lt;768&amp;gt;;
				hback-porch = &amp;lt;220&amp;gt;;
				hfront-porch = &amp;lt;40&amp;gt;;
				vback-porch = &amp;lt;21&amp;gt;;
				vfront-porch = &amp;lt;7&amp;gt;;
				hsync-len = &amp;lt;60&amp;gt;;
				vsync-len = &amp;lt;10&amp;gt;;
			};
		};
	};

	lvds-channel@1 {
		fsl,data-mapping = "spwg";
		fsl,data-width = &amp;lt;24&amp;gt;;
		primary;
		status = "okay";

		display-timings {
			native-mode = &amp;lt;&amp;amp;timing1&amp;gt;;
			timing1: LB070WV8_SL02_800X480 {
				clock-frequency = &amp;lt;34000000&amp;gt;;
				hactive = &amp;lt;800&amp;gt;;
				vactive = &amp;lt;480&amp;gt;;
				hback-porch = &amp;lt;160&amp;gt;;
				hfront-porch = &amp;lt;80&amp;gt;;
				vback-porch = &amp;lt;25&amp;gt;;
				vfront-porch = &amp;lt;15&amp;gt;;
				hsync-len = &amp;lt;256&amp;gt;;
				vsync-len = &amp;lt;45&amp;gt;;
 			};
		};
	};
};&lt;/LI-CODE&gt;&lt;P&gt;And I've also changed bootargs in uboot like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk2p2 rootwait rw video=mxcfb0:dev=ldb,if=RGB24 ldb=sin1 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off&lt;/LI-CODE&gt;&lt;P&gt;Looking into fbset it seems that it shows the right values, if I understand correctly:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;# fbset

mode "800x480-46"
        # &lt;LI-EMOJI id="lia_anguished-face" title=":anguished_face:"&gt;&lt;/LI-EMOJI&gt; 34.001 MHz, H: 26.235 kHz, V: 46.434 Hz
        geometry 800 480 800 480 24
        timings 29411 160 80 25 15 256 45
        accel false
        rgba 8/16,8/8,8/0,0/0
endmode&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Here is the dmesg logs concerning fb:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk2p2 rootwait rw video=mxcfb0:dev=ldb,if=RGB24 ldb=sin1 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off
[    1.118132] mxc_sdc_fb fb@0: registered mxc display driver ldb
[    1.118496] mxc_sdc_fb fb@1: Can't get fb option for mxcfb1!
[    1.118840] mxc_sdc_fb fb@2: Can't get fb option for mxcfb2!
[    1.119178] mxc_sdc_fb fb@3: Can't get fb option for mxcfb3!
[    3.856214] mxc_sdc_fb fb@0: registered mxc display driver ldb
[    4.497348] mxc_sdc_fb fb@0: timeout when waiting for flip irq&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The only thing concerning me here is "&lt;EM&gt;timeout when waiting for flip irq"&lt;/EM&gt; message, but I don't know if this could cause the display to not initialize correctly and what stands behind this.&lt;BR /&gt;&lt;BR /&gt;Could you please help me at least with the steps to identify the issue causing the display to not work, because I don't know where else to look. Thanks.&lt;BR /&gt;&lt;BR /&gt;I am using uboot-imx&amp;nbsp;&lt;SPAN&gt;lf_v2023.04 and linux-imx&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;lf-6.1.1-1.0.1&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 12:54:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6D-LVDS-not-working/m-p/1978263#M229922</guid>
      <dc:creator>lyashmik</dc:creator>
      <dc:date>2024-10-21T12:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6D LVDS not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6D-LVDS-not-working/m-p/1979303#M229988</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;You better change the kernel since this version is not supported. now the I think the error is hapens on lvds clock rate&lt;/P&gt;
&lt;P&gt;clk_set_rate(g_pixel_clk[disp], rounded_pixel_clk);&lt;/P&gt;
&lt;P&gt;in ipu_disp.c&lt;/P&gt;
&lt;P&gt;Above will use g_pixel_clk set_rate function to set clock rate which approach panel pixel rate we defined in display structure. In set_rate function, it will use g_pixel_clk parent, which is g_ldb_clk as a divider to calculate. After calculate, it will set DI_BS_CLKGEN0 and DI_BS_CLKGEN1 register to let IPU pixel clock sync with LDB clock. But g_ldb_clock has been always set to 65MHz, that means a lot of clock rate cannot be divide, then IPU pixel clock will not sync with LDB clock, so display cannot output anything.&lt;/P&gt;
&lt;P&gt;As I know, g_pixel_clk which should use same clock parent as ldb clock. That is what kernel did.&lt;/P&gt;
&lt;P&gt;So for short term, just modify g_ldb_clock.rate to same as your ldb clock rate, then ipu_pixel_clk_set_rate can divide clock rate correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 14:07:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6D-LVDS-not-working/m-p/1979303#M229988</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2024-10-22T14:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6D LVDS not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6D-LVDS-not-working/m-p/1985669#M230342</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/34846"&gt;@Bio_TICFSL&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thank you for the reply. I have a couple of questions.&lt;BR /&gt;First, what linux kernel version would you recommend to use (branch or tag would be even better).&lt;BR /&gt;Second, if I understood you correctly I should try and set ldb_clk (ldb_di1_clk in my case, because only channel 1 is used) to the desired clock after acquiring it, so that then ipu clk would be set to the right value. So I created the following patch:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c
index 33ff22ca860f..be0149c6402f 100644
--- a/drivers/mxc/ipu3/ipu_disp.c
+++ b/drivers/mxc/ipu3/ipu_disp.c
@@ -1109,6 +1109,19 @@ int32_t ipu_init_sync_panel(struct ipu_soc *ipu, int disp, uint32_t pixel_clk,
 		dev_err(ipu-&amp;gt;dev, "clk_get di1 failed");
 		return PTR_ERR(ldb_di1_clk);
 	}
+	// Attempt to set ldb_di1_clk rate close to pixel_clk
+	ret = clk_set_rate(ldb_di1_clk, pixel_clk);
+	if (ret) {
+		dev_err(ipu-&amp;gt;dev, "Failed to set ldb_di1_clk rate: %d\n", ret);
+		return ret;
+	}
+
+	// Set ldb_di1_clk as the parent of pixel_clk to ensure synchronization
+	ret = clk_set_parent(ipu-&amp;gt;pixel_clk_sel[disp], ldb_di1_clk);
+	if (ret) {
+		dev_err(ipu-&amp;gt;dev, "Failed to set pixel_clk parent to ldb_di1_clk: %d\n", ret);
+		return ret;
+	}
 	if (!strcmp(__clk_get_name(di_parent), __clk_get_name(ldb_di0_clk)) ||
 		!strcmp(__clk_get_name(di_parent), __clk_get_name(ldb_di1_clk))) {
 		/* if di clk parent is tve/ldb, then keep it;*/
-- 
2.34.1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but in response to the changes I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;imx-ipuv3 2800000.ipu: Failed to set pixel_clk parent to ldb_di1_clk: -22&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, let me know if I understood you correctly.&lt;BR /&gt;Thirdly, a question off topic. I am also trying to enable dev_dbg messages to see them in dmesg by enabling dynamic debug and adding this to the kernel command line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dyndbg="file ipu_disp.c +p"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but in the kernel boot logs I get the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dyndbg: ipu_disp.c="(null)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it mean that it cannot find ipu_disp.c file? Am I configuring this wrong?&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 15:37:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6D-LVDS-not-working/m-p/1985669#M230342</guid>
      <dc:creator>lyashmik</dc:creator>
      <dc:date>2024-10-31T15:37:36Z</dc:date>
    </item>
  </channel>
</rss>

