提交 98b49c2f 编写于 作者: R Roman Li 提交者: Alex Deucher

drm/amd/display: fix multi-display on CZ

- fixed wrong index in dce110_validate_surface_sets()
- formatted for better readability
Signed-off-by: NRoman Li <Roman.Li@amd.com>
Reviewed-by: NHarry Wentland <Harry.Wentland@amd.com>
igned-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 024f0607
...@@ -849,7 +849,7 @@ static bool dce110_validate_bandwidth( ...@@ -849,7 +849,7 @@ static bool dce110_validate_bandwidth(
static bool dce110_validate_surface_sets( static bool dce110_validate_surface_sets(
struct dc_state *context) struct dc_state *context)
{ {
int i; int i, j;
for (i = 0; i < context->stream_count; i++) { for (i = 0; i < context->stream_count; i++) {
if (context->stream_status[i].plane_count == 0) if (context->stream_status[i].plane_count == 0)
...@@ -858,14 +858,27 @@ static bool dce110_validate_surface_sets( ...@@ -858,14 +858,27 @@ 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[i]->format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN) && for (j = 0; j < context->stream_status[i].plane_count; j++) {
(context->stream_status[i].plane_states[i]->src_rect.width > 1920 || struct dc_plane_state *plane =
context->stream_status[i].plane_states[i]->src_rect.height > 1080)) context->stream_status[i].plane_states[j];
return false;
/* irrespective of plane format, stream should be RGB encoded */ /* underlay validation */
if (context->streams[i]->timing.pixel_encoding != PIXEL_ENCODING_RGB) if (plane->format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN) {
return false;
if ((plane->src_rect.width > 1920 ||
plane->src_rect.height > 1080))
return false;
/* irrespective of plane format,
* stream should be RGB encoded
*/
if (context->streams[i]->timing.pixel_encoding
!= PIXEL_ENCODING_RGB)
return false;
}
}
} }
return true; return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册