Skip to content

drm_hwcomposer: Tweak mode selection to pick the first DRM_MODE_TYPE_PREFERRED mode

With commit 1b1e35eb ("drm_hwcomposer: Chose preferred mode with type DRM_MODE_TYPE_PREFERRED"), we now pick a preferred mode rather then just the first mode to use.

However, on some systems there may be multiple modes marked as DRM_MODE_TYPE_PREFERRED. In this case, the logic added in that commit ends up selecting the last preferred mode.

This seems less likely to be the desired choice.

So this patch alters the selection logic to break out when we find a DRM_MODE_TYPE_PREFERRED mode, resulting in the first preferred mode to be selected.

Change-Id: Ieb3e5d946b96099f14c1c5a287ca8113360a39d1 Signed-off-by: John Stultz john.stultz@linaro.org

Merge request reports