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>
This commit is contained in:
Philipp Zabel
2019-01-22 11:28:46 +01:00
committed by Daniel Stone
parent 1ca025cc5d
commit 619958e382
+4 -1
View File
@@ -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;