diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1227-drm-amd-display-add-way-to-determine-if-link-is-acti.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/1227-drm-amd-display-add-way-to-determine-if-link-is-acti.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1227-drm-amd-display-add-way-to-determine-if-link-is-acti.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1227-drm-amd-display-add-way-to-determine-if-link-is-acti.patch new file mode 100644 index 00000000..12a3f803 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1227-drm-amd-display-add-way-to-determine-if-link-is-acti.patch @@ -0,0 +1,78 @@ +From 91ee7cb06c5503ae43043453a6cb33c34138cacc Mon Sep 17 00:00:00 2001 +From: Anthony Koo <Anthony.Koo@amd.com> +Date: Sun, 20 Jan 2019 01:32:55 -0500 +Subject: [PATCH 1227/2940] drm/amd/display: add way to determine if link is + active + +[Why] +Need to understand whether link is active aside from stream state. +This could be used to check what links are enabled by GOP. + +[How] +Store link_active state in link status and initialize it by checking +if the DIG is enabled. +Keep it updated on every link enable and disable + +Change-Id: I6d985d0ec11404bbaba7e4a23d4ca50d519aa0ac +Signed-off-by: Anthony Koo <Anthony.Koo@amd.com> +Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> +Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> +--- + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++++ + drivers/gpu/drm/amd/display/dc/dc_link.h | 1 + + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 +++++ + 3 files changed, 10 insertions(+) + +diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c +index 2f9d9b1f45cf..6058436642e9 100644 +--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c +@@ -2612,6 +2612,8 @@ void core_link_enable_stream( + } + } + ++ stream->link->link_status.link_active = true; ++ + core_dc->hwss.enable_audio_stream(pipe_ctx); + + /* turn off otg test pattern if enable */ +@@ -2646,6 +2648,8 @@ void core_link_disable_stream(struct pipe_ctx *pipe_ctx, int option) + core_dc->hwss.disable_stream(pipe_ctx, option); + + disable_link(pipe_ctx->stream->link, pipe_ctx->stream->signal); ++ ++ pipe_ctx->stream->link->link_status.link_active = false; + } + + void core_link_set_avmute(struct pipe_ctx *pipe_ctx, bool enable) +diff --git a/drivers/gpu/drm/amd/display/dc/dc_link.h b/drivers/gpu/drm/amd/display/dc/dc_link.h +index d26bbda61ad2..8fc223defed4 100644 +--- a/drivers/gpu/drm/amd/display/dc/dc_link.h ++++ b/drivers/gpu/drm/amd/display/dc/dc_link.h +@@ -30,6 +30,7 @@ + #include "grph_object_defs.h" + + struct dc_link_status { ++ bool link_active; + struct dpcd_caps *dpcd_caps; + }; + +diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +index 2d7096bb0146..b32787ca5e25 100644 +--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c ++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +@@ -1027,6 +1027,11 @@ static void dcn10_init_hw(struct dc *dc) + dc->hwss.edp_power_control(link, true); + + link->link_enc->funcs->hw_init(link->link_enc); ++ ++ /* Check for enabled DIG to identify enabled display */ ++ if (link->link_enc->funcs->is_dig_enabled && ++ link->link_enc->funcs->is_dig_enabled(link->link_enc)) ++ link->link_status.link_active = true; + } + } + +-- +2.17.1 + |