<?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: android Q System Rotation problem in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/android-Q-System-Rotation-problem/m-p/1189762#M165592</link>
    <description>&lt;P&gt;Hello aber,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the patch does not work for you?, sorry this will be add it to the next android, however You can try to modify "info.orientation = 0;" to other value, which shown below code:&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;for (const auto&amp;amp; hwConfig : getHwComposer().getConfigs(type)) {
        DisplayInfo info = DisplayInfo();

        float xdpi = hwConfig-&amp;gt;getDpiX();
        float ydpi = hwConfig-&amp;gt;getDpiY();

        if (type == DisplayDevice::DISPLAY_PRIMARY) {
            // The density of the device is provided by a build property
            float density = Density::getBuildDensity() / 160.0f;
            if (density == 0) {
                // the build doesn't provide a density -- this is wrong!
                // use xdpi instead
                ALOGE("ro.sf.lcd_density must be defined as a build property");
                density = xdpi / 160.0f;
            }
            if (Density::getEmuDensity()) {
                // if "qemu.sf.lcd_density" is specified, it overrides everything
                xdpi = ydpi = density = Density::getEmuDensity();
                density /= 160.0f;
            }
            info.density = density;

            // TODO: this needs to go away (currently needed only by webkit)
            sp&amp;lt;const DisplayDevice&amp;gt; hw(getDefaultDisplayDeviceLocked());
            info.orientation = hw ? hw-&amp;gt;getOrientation() : 0;
        } else {
            // TODO: where should this value come from?
            static const int TV_DENSITY = 213;
            info.density = TV_DENSITY / 160.0f;
            info.orientation = 0;
        }
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Nov 2020 13:57:07 GMT</pubDate>
    <dc:creator>Bio_TICFSL</dc:creator>
    <dc:date>2020-11-26T13:57:07Z</dc:date>
    <item>
      <title>android Q System Rotation problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/android-Q-System-Rotation-problem/m-p/1187912#M165409</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;We need to rotate 180° the system on android10. For reference &lt;A href="https://community.nxp.com/t5/i-MX-Processors/Android-10-i-MX8MMini-g2d-rotation-issue/m-p/1187205#M165344" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/Android-10-i-MX8MMini-g2d-rotation-issue/m-p/1187205#M165344&lt;/A&gt; , the system can rotate normally but the playing video cannot be rotated.&amp;nbsp;Is there a good solution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tks!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 06:36:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/android-Q-System-Rotation-problem/m-p/1187912#M165409</guid>
      <dc:creator>aber</dc:creator>
      <dc:date>2020-11-24T06:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: android Q System Rotation problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/android-Q-System-Rotation-problem/m-p/1189762#M165592</link>
      <description>&lt;P&gt;Hello aber,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the patch does not work for you?, sorry this will be add it to the next android, however You can try to modify "info.orientation = 0;" to other value, which shown below code:&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;for (const auto&amp;amp; hwConfig : getHwComposer().getConfigs(type)) {
        DisplayInfo info = DisplayInfo();

        float xdpi = hwConfig-&amp;gt;getDpiX();
        float ydpi = hwConfig-&amp;gt;getDpiY();

        if (type == DisplayDevice::DISPLAY_PRIMARY) {
            // The density of the device is provided by a build property
            float density = Density::getBuildDensity() / 160.0f;
            if (density == 0) {
                // the build doesn't provide a density -- this is wrong!
                // use xdpi instead
                ALOGE("ro.sf.lcd_density must be defined as a build property");
                density = xdpi / 160.0f;
            }
            if (Density::getEmuDensity()) {
                // if "qemu.sf.lcd_density" is specified, it overrides everything
                xdpi = ydpi = density = Density::getEmuDensity();
                density /= 160.0f;
            }
            info.density = density;

            // TODO: this needs to go away (currently needed only by webkit)
            sp&amp;lt;const DisplayDevice&amp;gt; hw(getDefaultDisplayDeviceLocked());
            info.orientation = hw ? hw-&amp;gt;getOrientation() : 0;
        } else {
            // TODO: where should this value come from?
            static const int TV_DENSITY = 213;
            info.density = TV_DENSITY / 160.0f;
            info.orientation = 0;
        }
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 13:57:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/android-Q-System-Rotation-problem/m-p/1189762#M165592</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2020-11-26T13:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: android Q System Rotation problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/android-Q-System-Rotation-problem/m-p/1189982#M165619</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;Bio_TICFSL&lt;/P&gt;&lt;P&gt;Thank you for replying in your busy schedule. According to your prompt, I modified it and it didn't work. The video playback interface is the other way around.&lt;/P&gt;&lt;P&gt;info.orientation I am forced to modify it to 2 。The source code is based on&amp;nbsp;&lt;SPAN&gt;Q10.0.0_2.5.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp&lt;BR /&gt;index 535e5029e..32e609e57 100644&lt;BR /&gt;--- a/services/surfaceflinger/SurfaceFlinger.cpp&lt;BR /&gt;+++ b/services/surfaceflinger/SurfaceFlinger.cpp&lt;BR /&gt;@@ -840,6 +840,7 @@ status_t SurfaceFlinger::getDisplayConfigs(const sp&amp;lt;IBinder&amp;gt;&amp;amp; displayToken,&lt;BR /&gt;info.density = TV_DENSITY / 160.0f;&lt;BR /&gt;info.orientation = 0;&lt;BR /&gt;}&lt;BR /&gt;+ info.orientation = 2;&lt;BR /&gt;&lt;BR /&gt;info.xdpi = xdpi;&lt;BR /&gt;info.ydpi = ydpi;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 02:39:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/android-Q-System-Rotation-problem/m-p/1189982#M165619</guid>
      <dc:creator>aber</dc:creator>
      <dc:date>2020-11-27T02:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: android Q System Rotation problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/android-Q-System-Rotation-problem/m-p/1236458#M170012</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello&amp;nbsp; Bio_TICFSL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; My problem is still unresolved, and I found that the problem is similar to the one I encountered after searching the forum. Our default mipi resolution is 800x1280, which may be the cause of the problem。&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/How-To-Rotate-90-Degree-Video-For-Display-In-I-MX8X/m-p/1029668" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors/How-To-Rotate-90-Degree-Video-For-Display-In-I-MX8X/m-p/1029668&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 08:30:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/android-Q-System-Rotation-problem/m-p/1236458#M170012</guid>
      <dc:creator>aber</dc:creator>
      <dc:date>2021-02-25T08:30:03Z</dc:date>
    </item>
  </channel>
</rss>

