diff options
Diffstat (limited to 'common/recipes-kernel/linux/files/0642-drm-amd-dal-DP-MST-Detection.patch')
-rw-r--r-- | common/recipes-kernel/linux/files/0642-drm-amd-dal-DP-MST-Detection.patch | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0642-drm-amd-dal-DP-MST-Detection.patch b/common/recipes-kernel/linux/files/0642-drm-amd-dal-DP-MST-Detection.patch new file mode 100644 index 00000000..ccc717d3 --- /dev/null +++ b/common/recipes-kernel/linux/files/0642-drm-amd-dal-DP-MST-Detection.patch @@ -0,0 +1,171 @@ +From a3148a748fde1246f26b494675147e2793b890f1 Mon Sep 17 00:00:00 2001 +From: Chris Park <Chris.Park@amd.com> +Date: Fri, 18 Dec 2015 11:52:24 -0500 +Subject: [PATCH 0642/1110] drm/amd/dal: DP MST Detection + +MSTManager allows DP MST to be detected. + +Signed-off-by: Chris Park <Chris.Park@amd.com> +Acked-by: Jordan Lazare <Jordan.Lazare@amd.com> +--- + drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dc_helpers.c | 2 -- + drivers/gpu/drm/amd/dal/dc/core/dc.c | 2 +- + drivers/gpu/drm/amd/dal/dc/core/dc_link.c | 12 ++++-------- + drivers/gpu/drm/amd/dal/dc/core/dc_link_hwss.c | 2 -- + drivers/gpu/drm/amd/dal/dc/core/dc_target.c | 2 +- + drivers/gpu/drm/amd/dal/dc/dc.h | 1 + + drivers/gpu/drm/amd/dal/dc/dc_helpers.h | 2 -- + drivers/gpu/drm/amd/dal/dc/inc/core_types.h | 2 -- + 8 files changed, 7 insertions(+), 18 deletions(-) + +diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dc_helpers.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dc_helpers.c +index ddc40c9..0a05774 100644 +--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dc_helpers.c ++++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dc_helpers.c +@@ -499,7 +499,6 @@ void dc_helpers_dp_mst_stop_top_mgr( + + bool dc_helper_dp_read_dpcd( + struct dc_context *ctx, +- uint8_t link_index, + const struct dc_link *link, + uint32_t address, + uint8_t *data, +@@ -521,7 +520,6 @@ bool dc_helper_dp_read_dpcd( + + bool dc_helper_dp_write_dpcd( + struct dc_context *ctx, +- uint8_t link_index, + const struct dc_link *link, + uint32_t address, + const uint8_t *data, +diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc.c b/drivers/gpu/drm/amd/dal/dc/core/dc.c +index 941d167..2c9a404 100644 +--- a/drivers/gpu/drm/amd/dal/dc/core/dc.c ++++ b/drivers/gpu/drm/amd/dal/dc/core/dc.c +@@ -365,7 +365,6 @@ static void destruct(struct dc *dc) + dc_service_free(dc->ctx, dc->links); + dc->hwss.destruct_resource_pool(&dc->res_pool); + dal_logger_destroy(&dc->ctx->logger); +- dc_service_free(dc->ctx, dc->ctx); + } + + /******************************************************************************* +@@ -403,6 +402,7 @@ void dc_destroy(struct dc **dc) + { + destruct(*dc); + dc_service_free((*dc)->ctx, *dc); ++ dc_service_free((*dc)->ctx, (*dc)->ctx); + *dc = NULL; + } + +diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c +index d4b1085..5516ec7 100644 +--- a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c ++++ b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c +@@ -647,13 +647,9 @@ void dc_link_detect(const struct dc_link *dc_link) + link_disconnect_all_sinks(link); + } + +- if (signal == SIGNAL_TYPE_NONE) { +- LINK_INFO("link=%d is now Disconnected.\n", +- link->link_index); +- } else { +- LINK_INFO("link=%d is now Connected. Sink ptr=%p Signal=%d\n", +- link->link_index, &sink->public, signal); +- } ++ LINK_INFO("link=%d, dc_sink_in=%p is now %s\n", ++ link->public.link_index, &sink->public, ++ (signal == SIGNAL_TYPE_NONE ? "Disconnected":"Connected")); + + return; + } +@@ -675,7 +671,7 @@ static bool construct( + link->adapter_srv = as; + link->connector_index = init_params->connector_index; + link->ctx = dc_ctx; +- link->link_index = init_params->link_index; ++ link->public.link_index = init_params->link_index; + + link->link_id = dal_adapter_service_get_connector_obj_id( + as, +diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_link_hwss.c b/drivers/gpu/drm/amd/dal/dc/core/dc_link_hwss.c +index 91aec82..727c812 100644 +--- a/drivers/gpu/drm/amd/dal/dc/core/dc_link_hwss.c ++++ b/drivers/gpu/drm/amd/dal/dc/core/dc_link_hwss.c +@@ -21,7 +21,6 @@ enum dc_status core_link_read_dpcd( + uint32_t size) + { + if (!dc_helper_dp_read_dpcd(link->ctx, +- link->link_index, + &link->public, + address, data, size)) + return DC_ERROR_UNEXPECTED; +@@ -36,7 +35,6 @@ enum dc_status core_link_write_dpcd( + uint32_t size) + { + if (!dc_helper_dp_write_dpcd(link->ctx, +- link->link_index, + &link->public, + address, data, size)) + return DC_ERROR_UNEXPECTED; +diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_target.c b/drivers/gpu/drm/amd/dal/dc/core/dc_target.c +index 82cdae1..3a1f605 100644 +--- a/drivers/gpu/drm/amd/dal/dc/core/dc_target.c ++++ b/drivers/gpu/drm/amd/dal/dc/core/dc_target.c +@@ -400,7 +400,7 @@ uint8_t dc_target_get_link_index(const struct dc_target *dc_target) + const struct core_sink *sink = + DC_SINK_TO_CORE(target->public.streams[0]->sink); + +- return sink->link->link_index; ++ return sink->link->public.link_index; + } + + uint32_t dc_target_get_vblank_counter(const struct dc_target *dc_target) +diff --git a/drivers/gpu/drm/amd/dal/dc/dc.h b/drivers/gpu/drm/amd/dal/dc/dc.h +index c9cdd9c..007fdc4 100644 +--- a/drivers/gpu/drm/amd/dal/dc/dc.h ++++ b/drivers/gpu/drm/amd/dal/dc/dc.h +@@ -273,6 +273,7 @@ void dc_update_stream(const struct dc_stream *dc_stream, + struct dc_link { + const struct dc_sink *sink[MAX_SINKS_PER_LINK]; + unsigned int sink_count; ++ unsigned int link_index; + enum dc_connection_type type; + enum signal_type connector_signal; + enum dc_irq_source irq_source_hpd; +diff --git a/drivers/gpu/drm/amd/dal/dc/dc_helpers.h b/drivers/gpu/drm/amd/dal/dc/dc_helpers.h +index fe76833..d96e907 100644 +--- a/drivers/gpu/drm/amd/dal/dc/dc_helpers.h ++++ b/drivers/gpu/drm/amd/dal/dc/dc_helpers.h +@@ -77,7 +77,6 @@ void dc_helpers_dp_mst_stop_top_mgr( + */ + bool dc_helper_dp_read_dpcd( + struct dc_context *ctx, +- uint8_t link_index, + const struct dc_link *link, + uint32_t address, + uint8_t *data, +@@ -88,7 +87,6 @@ bool dc_helper_dp_read_dpcd( + */ + bool dc_helper_dp_write_dpcd( + struct dc_context *ctx, +- uint8_t link_index, + const struct dc_link *link, + uint32_t address, + const uint8_t *data, +diff --git a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h +index b35ec1a..194b3e0 100644 +--- a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h ++++ b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h +@@ -203,8 +203,6 @@ struct core_link { + struct dc_context *ctx; /* TODO: AUTO remove 'dal' when DC is complete*/ + + uint8_t connector_index; /* this will be mapped to the HPD pins */ +- uint8_t link_index; /* this is mapped to DAL display_index +- TODO: #flip remove it as soon as possible. */ + + struct adapter_service *adapter_srv; + struct connector *connector; +-- +2.7.4 + |