aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1971-drm-amd-display-Use-DCN-functions-instead-of-DCE.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1971-drm-amd-display-Use-DCN-functions-instead-of-DCE.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1971-drm-amd-display-Use-DCN-functions-instead-of-DCE.patch91
1 files changed, 91 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1971-drm-amd-display-Use-DCN-functions-instead-of-DCE.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1971-drm-amd-display-Use-DCN-functions-instead-of-DCE.patch
new file mode 100644
index 00000000..3f811ead
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1971-drm-amd-display-Use-DCN-functions-instead-of-DCE.patch
@@ -0,0 +1,91 @@
+From 421bc3a9def7a4d89f83987620badadb3c76bcd2 Mon Sep 17 00:00:00 2001
+From: Wesley Chalmers <Wesley.Chalmers@amd.com>
+Date: Wed, 24 Apr 2019 15:29:06 -0400
+Subject: [PATCH 1971/2940] drm/amd/display: Use DCN functions instead of DCE
+
+[WHY]
+DCN code should make as few references to DCE as possible
+
+[HOW]
+Copy DCE110 implementation of find_first_free_match_stream_enc_for_link
+into DCN10
+
+Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
+Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
+Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
+---
+ .../drm/amd/display/dc/dcn10/dcn10_resource.c | 34 ++++++++++++++++++-
+ .../drm/amd/display/dc/dcn10/dcn10_resource.h | 5 +++
+ 2 files changed, 38 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
+index 97fb0a6ddf95..df30d9169c2c 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
+@@ -1235,6 +1235,38 @@ static enum dc_status dcn10_get_default_swizzle_mode(struct dc_plane_state *plan
+ return result;
+ }
+
++struct stream_encoder *dcn10_find_first_free_match_stream_enc_for_link(
++ struct resource_context *res_ctx,
++ const struct resource_pool *pool,
++ struct dc_stream_state *stream)
++{
++ int i;
++ int j = -1;
++ struct dc_link *link = stream->link;
++
++ for (i = 0; i < pool->stream_enc_count; i++) {
++ if (!res_ctx->is_stream_enc_acquired[i] &&
++ pool->stream_enc[i]) {
++ /* Store first available for MST second display
++ * in daisy chain use case
++ */
++ j = i;
++ if (pool->stream_enc[i]->id ==
++ link->link_enc->preferred_engine)
++ return pool->stream_enc[i];
++ }
++ }
++
++ /*
++ * For CZ and later, we can allow DIG FE and BE to differ for all display types
++ */
++
++ if (j >= 0)
++ return pool->stream_enc[j];
++
++ return NULL;
++}
++
+ static const struct dc_cap_funcs cap_funcs = {
+ .get_dcc_compression_cap = dcn10_get_dcc_compression_cap
+ };
+@@ -1248,7 +1280,7 @@ static const struct resource_funcs dcn10_res_pool_funcs = {
+ .validate_global = dcn10_validate_global,
+ .add_stream_to_ctx = dcn10_add_stream_to_ctx,
+ .get_default_swizzle_mode = dcn10_get_default_swizzle_mode,
+- .find_first_free_match_stream_enc_for_link = dce110_find_first_free_match_stream_enc_for_link
++ .find_first_free_match_stream_enc_for_link = dcn10_find_first_free_match_stream_enc_for_link
+ };
+
+ static uint32_t read_pipe_fuses(struct dc_context *ctx)
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.h
+index 999c684a0b36..633025ccb870 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.h
++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.h
+@@ -42,6 +42,11 @@ struct resource_pool *dcn10_create_resource_pool(
+ const struct dc_init_data *init_data,
+ struct dc *dc);
+
++struct stream_encoder *dcn10_find_first_free_match_stream_enc_for_link(
++ struct resource_context *res_ctx,
++ const struct resource_pool *pool,
++ struct dc_stream_state *stream);
++
+
+ #endif /* __DC_RESOURCE_DCN10_H__ */
+
+--
+2.17.1
+