Commit 4451a255 authored by Shirish S's avatar Shirish S Committed by Alex Deucher

drm/amd/display: dce110: fix plane validation

For MPO to work with per surface rendering and flipping,
the previous logic of restricting plane[1] only as underlay
needs to be removed.
validate_surface_sets() now checks only the width and height
bounds in case of underlay rather than checking format.

Without this patch one cannot set underlay only.
Signed-off-by: default avatarShirish S <shirish.s@amd.com>
Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1bb47154
...@@ -891,21 +891,14 @@ static bool dce110_validate_surface_sets( ...@@ -891,21 +891,14 @@ static bool dce110_validate_surface_sets(
if (context->stream_status[i].plane_count > 2) if (context->stream_status[i].plane_count > 2)
return false; return false;
if (context->stream_status[i].plane_states[0]->format if ((context->stream_status[i].plane_states[i]->format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN) &&
>= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN) (context->stream_status[i].plane_states[i]->src_rect.width > 1920 ||
context->stream_status[i].plane_states[i]->src_rect.height > 1080))
return false; return false;
if (context->stream_status[i].plane_count == 2) { /* irrespective of plane format, stream should be RGB encoded */
if (context->stream_status[i].plane_states[1]->format if (context->streams[i]->timing.pixel_encoding != PIXEL_ENCODING_RGB)
< SURFACE_PIXEL_FORMAT_VIDEO_BEGIN) return false;
return false;
if (context->stream_status[i].plane_states[1]->src_rect.width > 1920
|| context->stream_status[i].plane_states[1]->src_rect.height > 1080)
return false;
if (context->streams[i]->timing.pixel_encoding != PIXEL_ENCODING_RGB)
return false;
}
} }
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment