compositor-drm: fix drm_output_prepare_overlay_view for non-matching format

Add missing drm_plane_state_put_back in case the view's pixel format
does not match any of the tested plane's supported formats.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
dev
Philipp Zabel 6 years ago committed by Daniel Stone
parent 1ca025cc5d
commit 619958e382
  1. 5
      libweston/compositor-drm.c

@ -3234,8 +3234,11 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state,
if (j != p->formats[i].count_modifiers)
break;
}
if (i == p->count_formats)
if (i == p->count_formats) {
drm_plane_state_put_back(state);
state = NULL;
continue;
}
if (availability == NO_PLANES_WITH_FORMAT)
availability = NO_PLANES_ACCEPTED;

Loading…
Cancel
Save