aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/2495-drm-amd-display-fix-can-not-turn-on-two-displays-due.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/2495-drm-amd-display-fix-can-not-turn-on-two-displays-due.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/2495-drm-amd-display-fix-can-not-turn-on-two-displays-due.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/2495-drm-amd-display-fix-can-not-turn-on-two-displays-due.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/2495-drm-amd-display-fix-can-not-turn-on-two-displays-due.patch
new file mode 100644
index 00000000..37a3151e
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/2495-drm-amd-display-fix-can-not-turn-on-two-displays-due.patch
@@ -0,0 +1,41 @@
+From 7f859c5e6090250d7a057cc840b34de9f80db554 Mon Sep 17 00:00:00 2001
+From: Charlene Liu <charlene.liu@amd.com>
+Date: Fri, 29 Mar 2019 19:40:58 -0400
+Subject: [PATCH 2495/2940] drm/amd/display: fix can not turn on two displays
+ due to DSC_RESOURCE failed.
+
+[Why]
+Can not turn on two displays at the same time with the asic having only one DSC.
+DC_DSC_RESOURCE allocation failed.
+
+[Solution]
+Only add_dsc if the timing is dsc capable based on diag_dc and num_dsc
+
+Signed-off-by: Charlene Liu <charlene.liu@amd.com>
+Reviewed-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
+Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+index dc3aa7debad5..e3cd3e3db2c4 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+@@ -1284,6 +1284,12 @@ enum dc_status dcn20_add_stream_to_ctx(struct dc *dc, struct dc_state *new_ctx,
+ if (pipe_ctx->stream != dc_stream)
+ continue;
+
++ if (IS_DIAG_DC(dc->ctx->dce_environment) ||
++ dc->res_pool->res_cap->num_dsc == 1) {
++ // Diags build can also run on platforms that have fewer DSCs than pipes.
++ // In that case, add DSC only if needed by timing.
++ is_add_dsc = (dc_stream->timing.flags.DSC == 1);
++ }
+ if (is_add_dsc) {
+ pipe_ctx->stream_res.dsc = acquire_dsc(&new_ctx->res_ctx, pool);
+
+--
+2.17.1
+