<?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 [PATCH] Weston cannot propose mixed-mode state in i.MX Graphics</title>
    <link>https://community.nxp.com/t5/i-MX-Graphics/PATCH-Weston-cannot-propose-mixed-mode-state/m-p/1513894#M333</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to propose a patch for weston-imx to fix problem Weston backend-drm fails to propose mixed-mode state.&lt;/P&gt;&lt;H3&gt;Problem&lt;/H3&gt;&lt;P&gt;When play video with GStreamer in Weston with g2d renderer (on i.MX8QM), video view cannot be assigned to plane.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;gst-launch-1.0&lt;/SPAN&gt;&lt;SPAN class=""&gt; filesrc location=720p.mkv ! matroskademux \
               ! h264parse ! v4l2h264dec ! queue \
               ! waylandsink window-width=1280 window-height=720&lt;/SPAN&gt;&lt;/PRE&gt;&lt;H4&gt;Expected result:&lt;/H4&gt;&lt;P&gt;Video view can be assigned to overlay plane.&lt;/P&gt;&lt;H4&gt;Actual result:&lt;/H4&gt;&lt;P&gt;Weston "cannot propose mixed mode" and video view use renderer composition.&lt;/P&gt;&lt;PRE&gt;# weston-debug drm-backend&lt;BR /&gt;...&lt;BR /&gt;[repaint] could not build planes-only state, trying mixed                                                     
        [state] cannot propose mixed mode for output HDMI-A-1 (0): previous fb has different size&lt;BR /&gt;...&lt;BR /&gt;[repaint] Using render-only state composition&lt;BR /&gt;[repaint] view 0xaaab0effb720 using renderer composition&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;Reason&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;When &lt;A href="https://source.codeaurora.org/external/imx/weston-imx/tree/libweston/backend-drm/fb.c?h=rel_imx_5.4.70_2.3.0#n83" target="_blank" rel="noopener"&gt;drm_fb_addfb&lt;/A&gt;, fb width and height are not always aligned. However, when &lt;A href="https://source.codeaurora.org/external/imx/weston-imx/tree/libweston/backend-drm/state-propose.c?h=rel_imx_5.4.70_2.3.0#n808" target="_blank" rel="noopener"&gt;propose mixed-mode state&lt;/A&gt;, scanout fb is always compared to aligned output size with 'gbm_aligned' default to 64. In case modifier is not DRM_FORMAT_MOD_VIVANTE_SUPER_TILED, Weston will fail to try mixed-mode state, and no view can be assigned to plane.&lt;/LI&gt;&lt;LI&gt;Align for width and height are not always same. If modifier is DRM_FORMAT_MOD_AMPHION_TILED, fb width will be aligned to 8 while height will be aligned to 256. However, &lt;A href="https://source.codeaurora.org/external/imx/weston-imx/tree/libweston/backend-drm/fb.c?h=rel_imx_5.4.70_2.3.0#n234" target="_blank" rel="noopener"&gt;drm_fb_get_gbm_alignment&lt;/A&gt; only returns a single value for both width and height.&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Fix&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Change default value of 'gbm_aligned' to 1.&lt;/LI&gt;&lt;LI&gt;Change drm_fb_get_gbm_alignment's return value to a struct, which contains separate values for align width and height.&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Tue, 30 Aug 2022 11:44:10 GMT</pubDate>
    <dc:creator>dothanhtrung</dc:creator>
    <dc:date>2022-08-30T11:44:10Z</dc:date>
    <item>
      <title>[PATCH] Weston cannot propose mixed-mode state</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/PATCH-Weston-cannot-propose-mixed-mode-state/m-p/1513894#M333</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to propose a patch for weston-imx to fix problem Weston backend-drm fails to propose mixed-mode state.&lt;/P&gt;&lt;H3&gt;Problem&lt;/H3&gt;&lt;P&gt;When play video with GStreamer in Weston with g2d renderer (on i.MX8QM), video view cannot be assigned to plane.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;gst-launch-1.0&lt;/SPAN&gt;&lt;SPAN class=""&gt; filesrc location=720p.mkv ! matroskademux \
               ! h264parse ! v4l2h264dec ! queue \
               ! waylandsink window-width=1280 window-height=720&lt;/SPAN&gt;&lt;/PRE&gt;&lt;H4&gt;Expected result:&lt;/H4&gt;&lt;P&gt;Video view can be assigned to overlay plane.&lt;/P&gt;&lt;H4&gt;Actual result:&lt;/H4&gt;&lt;P&gt;Weston "cannot propose mixed mode" and video view use renderer composition.&lt;/P&gt;&lt;PRE&gt;# weston-debug drm-backend&lt;BR /&gt;...&lt;BR /&gt;[repaint] could not build planes-only state, trying mixed                                                     
        [state] cannot propose mixed mode for output HDMI-A-1 (0): previous fb has different size&lt;BR /&gt;...&lt;BR /&gt;[repaint] Using render-only state composition&lt;BR /&gt;[repaint] view 0xaaab0effb720 using renderer composition&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;Reason&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;When &lt;A href="https://source.codeaurora.org/external/imx/weston-imx/tree/libweston/backend-drm/fb.c?h=rel_imx_5.4.70_2.3.0#n83" target="_blank" rel="noopener"&gt;drm_fb_addfb&lt;/A&gt;, fb width and height are not always aligned. However, when &lt;A href="https://source.codeaurora.org/external/imx/weston-imx/tree/libweston/backend-drm/state-propose.c?h=rel_imx_5.4.70_2.3.0#n808" target="_blank" rel="noopener"&gt;propose mixed-mode state&lt;/A&gt;, scanout fb is always compared to aligned output size with 'gbm_aligned' default to 64. In case modifier is not DRM_FORMAT_MOD_VIVANTE_SUPER_TILED, Weston will fail to try mixed-mode state, and no view can be assigned to plane.&lt;/LI&gt;&lt;LI&gt;Align for width and height are not always same. If modifier is DRM_FORMAT_MOD_AMPHION_TILED, fb width will be aligned to 8 while height will be aligned to 256. However, &lt;A href="https://source.codeaurora.org/external/imx/weston-imx/tree/libweston/backend-drm/fb.c?h=rel_imx_5.4.70_2.3.0#n234" target="_blank" rel="noopener"&gt;drm_fb_get_gbm_alignment&lt;/A&gt; only returns a single value for both width and height.&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Fix&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Change default value of 'gbm_aligned' to 1.&lt;/LI&gt;&lt;LI&gt;Change drm_fb_get_gbm_alignment's return value to a struct, which contains separate values for align width and height.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 30 Aug 2022 11:44:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/PATCH-Weston-cannot-propose-mixed-mode-state/m-p/1513894#M333</guid>
      <dc:creator>dothanhtrung</dc:creator>
      <dc:date>2022-08-30T11:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: [PATCH] Weston cannot propose mixed-mode state</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/PATCH-Weston-cannot-propose-mixed-mode-state/m-p/1518871#M345</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/205410"&gt;@dothanhtrung&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for providing this valuable patch, we will evaluate this patch.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Zhiming&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 02:24:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/PATCH-Weston-cannot-propose-mixed-mode-state/m-p/1518871#M345</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2022-09-08T02:24:26Z</dc:date>
    </item>
  </channel>
</rss>

