aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2564-drm-amd-display-Set-addressable-region-as-active-bor.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2564-drm-amd-display-Set-addressable-region-as-active-bor.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2564-drm-amd-display-Set-addressable-region-as-active-bor.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2564-drm-amd-display-Set-addressable-region-as-active-bor.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2564-drm-amd-display-Set-addressable-region-as-active-bor.patch
new file mode 100644
index 00000000..f271a8ff
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2564-drm-amd-display-Set-addressable-region-as-active-bor.patch
@@ -0,0 +1,44 @@
+From e50a7868d7fe1d5cfe690dc6a47f467d591e77b5 Mon Sep 17 00:00:00 2001
+From: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
+Date: Thu, 5 Oct 2017 19:15:25 -0400
+Subject: [PATCH 2564/4131] drm/amd/display: Set addressable region as active +
+ border
+
+This ensures that we do not draw the blank region onscreen, and that we
+do underscan instead.
+
+Signed-off-by: Andrew Jiang <Andrew.Jiang@amd.com>
+Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
+Acked-by: Harry Wentland <Harry.Wentland@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+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 303d7ec..454a521 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+@@ -850,6 +850,20 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)
+ */
+ pipe_ctx->plane_res.scl_data.lb_params.depth = LB_PIXEL_DEPTH_30BPP;
+
++ /**
++ * KMD sends us h and v_addressable without the borders, which causes us sometimes to draw
++ * the blank region on-screen. Correct for this by adding the borders back to their
++ * respective addressable values, and by shifting recout.
++ */
++ timing->h_addressable += timing->h_border_left + timing->h_border_right;
++ timing->v_addressable += timing->v_border_top + timing->v_border_bottom;
++ pipe_ctx->plane_res.scl_data.recout.y += timing->v_border_top;
++ pipe_ctx->plane_res.scl_data.recout.x += timing->h_border_left;
++ timing->v_border_top = 0;
++ timing->v_border_bottom = 0;
++ timing->h_border_left = 0;
++ timing->h_border_right = 0;
++
+ pipe_ctx->plane_res.scl_data.h_active = timing->h_addressable;
+ pipe_ctx->plane_res.scl_data.v_active = timing->v_addressable;
+
+--
+2.7.4
+