[PATCH] Weston cannot propose mixed-mode state

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[PATCH] Weston cannot propose mixed-mode state

1,068 Views
dothanhtrung
Contributor II

Hi,

I would like to propose a patch for weston-imx to fix problem Weston backend-drm fails to propose mixed-mode state.

Problem

When play video with GStreamer in Weston with g2d renderer (on i.MX8QM), video view cannot be assigned to plane.

gst-launch-1.0 filesrc location=720p.mkv ! matroskademux \
               ! h264parse ! v4l2h264dec ! queue \
               ! waylandsink window-width=1280 window-height=720

Expected result:

Video view can be assigned to overlay plane.

Actual result:

Weston "cannot propose mixed mode" and video view use renderer composition.

# weston-debug drm-backend
...
[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
...
[repaint] Using render-only state composition
[repaint] view 0xaaab0effb720 using renderer composition

 

Reason

  1. When drm_fb_addfb, fb width and height are not always aligned. However, when propose mixed-mode state, 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.
  2. 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, drm_fb_get_gbm_alignment only returns a single value for both width and height.

Fix

  1. Change default value of 'gbm_aligned' to 1.
  2. Change drm_fb_get_gbm_alignment's return value to a struct, which contains separate values for align width and height.
Tags (1)
0 Kudos
Reply
1 Reply

1,031 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @dothanhtrung 

Thank you for providing this valuable patch, we will evaluate this patch.

Best Regards

Zhiming

0 Kudos
Reply