diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/0270-drm-amd-display-fix-incorrect-vp-adjustment.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/0270-drm-amd-display-fix-incorrect-vp-adjustment.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/0270-drm-amd-display-fix-incorrect-vp-adjustment.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/0270-drm-amd-display-fix-incorrect-vp-adjustment.patch new file mode 100644 index 00000000..56c73d81 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/0270-drm-amd-display-fix-incorrect-vp-adjustment.patch @@ -0,0 +1,57 @@ +From 6689757d0eb37840070e64b868b0b98559db4890 Mon Sep 17 00:00:00 2001 +From: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> +Date: Wed, 8 Mar 2017 13:45:33 -0500 +Subject: [PATCH 0270/4131] drm/amd/display: fix incorrect vp adjustment + +Viewport would be incorrectly adjusted when surface was used +for multiple displays + +Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> +Acked-by: Harry Wentland <Harry.Wentland@amd.com> +Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 20 ++++++++++++++++---- + 1 file changed, 16 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +index 01f1505..6119973 100644 +--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +@@ -494,6 +494,7 @@ static void calculate_recout(struct pipe_ctx *pipe_ctx, struct view *recout_skip + const struct dc_surface *surface = &pipe_ctx->surface->public; + struct core_stream *stream = pipe_ctx->stream; + struct rect clip = surface->clip_rect; ++ int recout_full_x, recout_full_y; + + pipe_ctx->scl_data.recout.x = stream->public.dst.x; + if (stream->public.src.x < clip.x) +@@ -533,10 +534,21 @@ static void calculate_recout(struct pipe_ctx *pipe_ctx, struct view *recout_skip + pipe_ctx->scl_data.recout.width /= 2; + } + +- recout_skip->width = pipe_ctx->scl_data.recout.x - stream->public.dst.x - +- surface->dst_rect.x * stream->public.dst.width / stream->public.src.width; +- recout_skip->height = pipe_ctx->scl_data.recout.y - stream->public.dst.y - +- surface->dst_rect.y * stream->public.dst.height / stream->public.src.height; ++ /* Unclipped recout offset = stream dst offset + ((surf dst offset - stream src offset) ++ * * 1/ stream scaling ratio) - (surf src offset * 1/ full scl ++ * ratio) ++ */ ++ recout_full_x = stream->public.dst.x + (surface->dst_rect.x - stream->public.src.x) ++ * stream->public.dst.width / stream->public.src.width - ++ surface->src_rect.x * surface->dst_rect.width / surface->src_rect.width ++ * stream->public.dst.width / stream->public.src.width; ++ recout_full_y = stream->public.dst.y + (surface->dst_rect.y - stream->public.src.y) ++ * stream->public.dst.height / stream->public.src.height - ++ surface->src_rect.y * surface->dst_rect.height / surface->src_rect.height ++ * stream->public.dst.height / stream->public.src.height; ++ ++ recout_skip->width = pipe_ctx->scl_data.recout.x - recout_full_x; ++ recout_skip->height = pipe_ctx->scl_data.recout.y - recout_full_y; + } + + static void calculate_scaling_ratios(struct pipe_ctx *pipe_ctx) +-- +2.7.4 + |