diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2360-drm-amd-display-dce110-fix-plane-validation.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2360-drm-amd-display-dce110-fix-plane-validation.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2360-drm-amd-display-dce110-fix-plane-validation.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2360-drm-amd-display-dce110-fix-plane-validation.patch new file mode 100644 index 00000000..ffea0d50 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2360-drm-amd-display-dce110-fix-plane-validation.patch @@ -0,0 +1,55 @@ +From 7659fece5968ae8999107c97d8c2ff064bc9b741 Mon Sep 17 00:00:00 2001 +From: Shirish S <shirish.s@amd.com> +Date: Mon, 21 Aug 2017 14:02:17 +0530 +Subject: [PATCH 2360/4131] 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: Shirish S <shirish.s@amd.com> +Reviewed-by: Harry Wentland <Harry.Wentland@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + .../gpu/drm/amd/display/dc/dce110/dce110_resource.c | 19 ++++++------------- + 1 file changed, 6 insertions(+), 13 deletions(-) + +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 41bfddf..25eda52 100644 +--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c ++++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +@@ -891,21 +891,14 @@ static bool dce110_validate_surface_sets( + if (context->stream_status[i].plane_count > 2) + return false; + +- if (context->stream_status[i].plane_states[0]->format +- >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN) ++ if ((context->stream_status[i].plane_states[i]->format >= 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; + +- if (context->stream_status[i].plane_count == 2) { +- if (context->stream_status[i].plane_states[1]->format +- < SURFACE_PIXEL_FORMAT_VIDEO_BEGIN) +- 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; +- } ++ /* irrespective of plane format, stream should be RGB encoded */ ++ if (context->streams[i]->timing.pixel_encoding != PIXEL_ENCODING_RGB) ++ return false; + } + + return true; +-- +2.7.4 + |