From: Shirish S Date: Wed, 7 Mar 2018 07:06:11 +0000 (+0530) Subject: drm/amd/display: validate plane format on primary plane X-Git-Tag: v4.19~1462^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a53d9045ec31f3f97719c2e41cc8b2e7151a1fe;p=platform%2Fkernel%2Flinux-rpi3.git drm/amd/display: validate plane format on primary plane In dce110, the plane configuration is such that plane 0 or the primary plane should be rendered with only RGB data. This patch adds the validation to ensure that no video data is rendered on plane 0. Signed-off-by: Shirish S Reviewed-by: Tony Cheng Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c index d5f851d..00f18c4 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c @@ -879,6 +879,13 @@ static bool dce110_validate_surface_sets( plane->src_rect.height > 1080)) return false; + /* we don't have the logic to support underlay + * only yet so block the use case where we get + * NV12 plane as top layer + */ + if (j == 0) + return false; + /* irrespective of plane format, * stream should be RGB encoded */