<?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 Re: [IMX8QXP MEK] How to rotate screen using U-BOOT in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-MEK-How-to-rotate-screen-using-U-BOOT/m-p/1376875#M183527</link>
    <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188051"&gt;@MahdiMG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you see these two links before?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/iMX-and-Vybrid-Support/i-MX8QM-QXP-hardware-display-buffer-rotation-using-DPRC/ta-p/1105627" target="_blank"&gt;https://community.nxp.com/t5/iMX-and-Vybrid-Support/i-MX8QM-QXP-hardware-display-buffer-rotation-using-DPRC/ta-p/1105627&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8QXP-DPU-image-Warp/ta-p/1182724" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8QXP-DPU-image-Warp/ta-p/1182724&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Nov 2021 08:32:21 GMT</pubDate>
    <dc:creator>Zhiming_Liu</dc:creator>
    <dc:date>2021-11-25T08:32:21Z</dc:date>
    <item>
      <title>[IMX8QXP MEK] How to rotate screen using U-BOOT</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-MEK-How-to-rotate-screen-using-U-BOOT/m-p/1375637#M183432</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I have an IMX8QXP MEK board to which I connected a panel via the LVDS0 interface. I added support for the panel in board/freescale/imx8qxp_mek/imx8qxp_mek.c as shown below:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;struct display_info_t const displays[] = {{
	.bus	= 0, /* LVDS0 */
	.addr	= 0, /* LVDS0 */
	.pixfmt	= IMXDPUV1_PIX_FMT_BGRA32,
	.detect	= NULL,
	.enable	= enable_lvds,
	.mode	= {
		.name           = "MYPANEL",
		.refresh        = 60,
		.xres           = 256,
		.yres           = 1920,
		.pixclock       = 13468, /* 74250000 */
		.left_margin    = 150,
		.right_margin   = 150,
		.upper_margin   = 20,
		.lower_margin   = 20,
		.hsync_len      = 72,
		.vsync_len      = 8,
		.sync           = FB_SYNC_EXT,
		.vmode          = FB_VMODE_NONINTERLACED
} }};&lt;/LI-CODE&gt;&lt;P&gt;In u-boot, I configured the display like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;=&amp;gt; setenv panel MYPANEL
=&amp;gt; saveenv&lt;/LI-CODE&gt;&lt;P&gt;Now I can see the NXP logo during u-boot like shown in the picture below:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_20211123_132724.jpg" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/162963i85B8D3187F622609/image-size/large?v=v2&amp;amp;px=999" role="button" title="IMG_20211123_132724.jpg" alt="IMG_20211123_132724.jpg" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;IMG_20211123_132724.jpg&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The issue here is that the logo is mirrored, so I need to flip it then rotate it (90°) clockwise.&lt;/P&gt;&lt;P&gt;So I edited video_hw_init(void) in arch/arm/mach-imx/imx8/video_common.c like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;	imxdpuv1_init_channel_buffer(imxdpuv1_id,
		channel.common.chan,
		gmode.hlen * imxdpuv1_bytes_per_pixel(IMXDPUV1_PIX_FMT_RGB32),
		IMXDPUV1_ROTATE_90_RIGHT_HFLIP, /* rotation mode */
		(dma_addr_t)fb,
		0,
		0);&lt;/LI-CODE&gt;&lt;P&gt;I found rotation modes are defined like this in include/imxdpuv1.h:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;/*!
 * Enumeration of IMXDPU rotation modes
 */
typedef enum {
	/* todo: these need to aligh to imxdpu scan direction */
	IMXDPUV1_ROTATE_NONE = 0,
	IMXDPUV1_ROTATE_VERT_FLIP = 1,
	IMXDPUV1_ROTATE_HORIZ_FLIP = 2,
	IMXDPUV1_ROTATE_180 = 3,
	IMXDPUV1_ROTATE_90_RIGHT = 4,
	IMXDPUV1_ROTATE_90_RIGHT_VFLIP = 5,
	IMXDPUV1_ROTATE_90_RIGHT_HFLIP = 6,
	IMXDPUV1_ROTATE_90_LEFT = 7,
} imxdpuv1_rotate_mode_t;&lt;/LI-CODE&gt;&lt;P&gt;I tried different rotation modes but none has worked, it seems that screen rotation is not implemented. So what's the best way to achieve this? I need pointers.&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;Have a nice day.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 12:51:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-MEK-How-to-rotate-screen-using-U-BOOT/m-p/1375637#M183432</guid>
      <dc:creator>MahdiMG</dc:creator>
      <dc:date>2021-11-23T12:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: [IMX8QXP MEK] How to rotate screen using U-BOOT</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-MEK-How-to-rotate-screen-using-U-BOOT/m-p/1376875#M183527</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188051"&gt;@MahdiMG&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you see these two links before?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/iMX-and-Vybrid-Support/i-MX8QM-QXP-hardware-display-buffer-rotation-using-DPRC/ta-p/1105627" target="_blank"&gt;https://community.nxp.com/t5/iMX-and-Vybrid-Support/i-MX8QM-QXP-hardware-display-buffer-rotation-using-DPRC/ta-p/1105627&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8QXP-DPU-image-Warp/ta-p/1182724" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX8QXP-DPU-image-Warp/ta-p/1182724&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 08:32:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-MEK-How-to-rotate-screen-using-U-BOOT/m-p/1376875#M183527</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2021-11-25T08:32:21Z</dc:date>
    </item>
  </channel>
</rss>

