<?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>topic mxcfb late_init in i.MX Graphics</title>
    <link>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-late-init/m-p/2138399#M863</link>
    <description>&lt;P&gt;I was looking into how could I make linux not to redraw the framebuffer right after it takes over from u-boot, because I need the image to stay until psplash is started. I've found out through looking into the linux's source code (mxc_ipuv3_fb.c), that &lt;STRONG&gt;late_init&lt;/STRONG&gt; could help, so I've found it in the device tree and set to 1:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;	mxcfb1: fb@0 {
		compatible = "fsl,mxc_sdc_fb";
		disp_dev = "ldb";
		interface_pix_fmt = "RGB666";
		default_bpp = &amp;lt;16&amp;gt;;
		int_clk = &amp;lt;0&amp;gt;;
		late_init = &amp;lt;1&amp;gt;;
		status = "okay";
	};&lt;/LI-CODE&gt;&lt;DIV&gt;And it indeed helped, the image stayed, when the linux started, but now the new problem arose, which is that psplash was not working anymore, further more it seemed that the framebuffer was locked, because I could not output anything on the screen.&lt;BR /&gt;&lt;BR /&gt;So my question is, what is the right sequence of steps here to give control of framebuffer back to linux?&lt;/DIV&gt;</description>
    <pubDate>Tue, 22 Jul 2025 12:34:10 GMT</pubDate>
    <dc:creator>lyashmik</dc:creator>
    <dc:date>2025-07-22T12:34:10Z</dc:date>
    <item>
      <title>mxcfb late_init</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-late-init/m-p/2138399#M863</link>
      <description>&lt;P&gt;I was looking into how could I make linux not to redraw the framebuffer right after it takes over from u-boot, because I need the image to stay until psplash is started. I've found out through looking into the linux's source code (mxc_ipuv3_fb.c), that &lt;STRONG&gt;late_init&lt;/STRONG&gt; could help, so I've found it in the device tree and set to 1:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;	mxcfb1: fb@0 {
		compatible = "fsl,mxc_sdc_fb";
		disp_dev = "ldb";
		interface_pix_fmt = "RGB666";
		default_bpp = &amp;lt;16&amp;gt;;
		int_clk = &amp;lt;0&amp;gt;;
		late_init = &amp;lt;1&amp;gt;;
		status = "okay";
	};&lt;/LI-CODE&gt;&lt;DIV&gt;And it indeed helped, the image stayed, when the linux started, but now the new problem arose, which is that psplash was not working anymore, further more it seemed that the framebuffer was locked, because I could not output anything on the screen.&lt;BR /&gt;&lt;BR /&gt;So my question is, what is the right sequence of steps here to give control of framebuffer back to linux?&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Jul 2025 12:34:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-late-init/m-p/2138399#M863</guid>
      <dc:creator>lyashmik</dc:creator>
      <dc:date>2025-07-22T12:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: mxcfb late_init</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-late-init/m-p/2138485#M864</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I don't see anything wrong with the device tree, but frame buffer need to IPU driver before is up maybe that's the case.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 14:27:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-late-init/m-p/2138485#M864</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2025-07-22T14:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: mxcfb late_init</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-late-init/m-p/2138617#M865</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/34846"&gt;@Bio_TICFSL&lt;/a&gt;&amp;nbsp;do you mean, that when late_init is enabled, ipu is not getting the framebuffer address from u-boot? In either case IPU should be running and when late_init is set to 0, the display blinks and after a while psplash image is seen.&lt;BR /&gt;In &lt;STRONG&gt;mxc_ipuv3_fb.c&lt;/STRONG&gt; I've identified, that the crusial piece of code involving &lt;STRONG&gt;late_init&amp;nbsp;&lt;/STRONG&gt;is mxcfb_register function:&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if (!mxcfbi-&amp;gt;late_init) {
		fbi-&amp;gt;var.activate |= FB_ACTIVATE_FORCE;
		console_lock();
		ret = fb_set_var(fbi, &amp;amp;fbi-&amp;gt;var);
		if (!ret)
			fbcon_update_vcs(fbi, fbi-&amp;gt;var.activate &amp;amp; FB_ACTIVATE_ALL);
		console_unlock();
		if (ret &amp;lt; 0) {
			dev_err(fbi-&amp;gt;device, "Error fb_set_var ret:%d\n", ret);
			goto err3;
		}

		if (mxcfbi-&amp;gt;next_blank == FB_BLANK_UNBLANK) {
			console_lock();
			ret = fb_blank(fbi, FB_BLANK_UNBLANK);
			console_unlock();
			if (ret &amp;lt; 0) {
				dev_err(fbi-&amp;gt;device,
					"Error fb_blank ret:%d\n", ret);
				goto err4;
			}
		}
	} else {
		/*
		 * Setup the channel again though bootloader
		 * has done this, then set_par() can stop the
		 * channel neatly and re-initialize it .
		 */
		if (mxcfbi-&amp;gt;next_blank == FB_BLANK_UNBLANK) {
			console_lock();
			_setup_disp_channel1(fbi);
			ipu_enable_channel(mxcfbi-&amp;gt;ipu, mxcfbi-&amp;gt;ipu_ch);
			console_unlock();
		}
	}&lt;/LI-CODE&gt;&lt;P&gt;So I've create a function in &lt;STRONG&gt;mxc_ipuv3_fb.c&amp;nbsp;&lt;/STRONG&gt;base on that if part of the statement, which is not getting called when late_init is 1:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;int mxcfb_reinit(struct fb_info *fbi)
{
	struct mxcfb_info *mxcfbi = (struct mxcfb_info *)fbi-&amp;gt;par;
	int ret = 0;
	
	if (!fbi || !mxcfbi)
		return -EINVAL;

	fbi-&amp;gt;var.activate |= FB_ACTIVATE_FORCE;

	// console_lock();
	ret = fb_set_var(fbi, &amp;amp;fbi-&amp;gt;var);
	if (!ret)
		fbcon_update_vcs(fbi, fbi-&amp;gt;var.activate &amp;amp; FB_ACTIVATE_ALL);
	// console_unlock();

	if (ret &amp;lt; 0)
		return ret;

	// console_lock();
	ret = fb_blank(fbi, FB_BLANK_UNBLANK);
	//console_unlock();

	return 0;
}
EXPORT_SYMBOL(mxcfb_reinit);&lt;/LI-CODE&gt;&lt;P&gt;And I've added it to mxcfb_ioctl, so I could call it from user space, but the problem is that I get a lot of warnings about deadlock, when the function is called and sometimes the deadlock really happens, which is of consern, but at least the display is refreshed and if I call psplash explicitly, then display is updated with the psplash image, but the progress bar is not working, but it could be another problem. This could be a solution, but I would really appreceate a more cleaner one.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2025 17:47:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-late-init/m-p/2138617#M865</guid>
      <dc:creator>lyashmik</dc:creator>
      <dc:date>2025-07-22T17:47:02Z</dc:date>
    </item>
  </channel>
</rss>

