aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0585-drm-amd-dal-Clean-up-aux-access-layer-in-DM.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0585-drm-amd-dal-Clean-up-aux-access-layer-in-DM.patch')
-rw-r--r--common/recipes-kernel/linux/files/0585-drm-amd-dal-Clean-up-aux-access-layer-in-DM.patch135
1 files changed, 135 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0585-drm-amd-dal-Clean-up-aux-access-layer-in-DM.patch b/common/recipes-kernel/linux/files/0585-drm-amd-dal-Clean-up-aux-access-layer-in-DM.patch
new file mode 100644
index 00000000..8be6706a
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0585-drm-amd-dal-Clean-up-aux-access-layer-in-DM.patch
@@ -0,0 +1,135 @@
+From 028c8faa6f36780fa082a5eb2ded31b7ecde8dba Mon Sep 17 00:00:00 2001
+From: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
+Date: Tue, 8 Dec 2015 13:08:49 -0500
+Subject: [PATCH 0585/1110] drm/amd/dal: Clean up aux access layer in DM
+
+Signed-off-by: Harry Wentland <harry.wentland@amd.com>
+Acked-by: Harry Wentland <harry.wentland@amd.com>
+---
+ drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dc_helpers.c | 6 ++++--
+ drivers/gpu/drm/amd/dal/dc/core/dc.c | 3 +--
+ drivers/gpu/drm/amd/dal/dc/core/dc_link_hwss.c | 8 ++++++--
+ drivers/gpu/drm/amd/dal/dc/dc.h | 2 +-
+ drivers/gpu/drm/amd/dal/dc/dc_helpers.h | 8 ++++++++
+ 5 files changed, 20 insertions(+), 7 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 7d3b2d3..b388dee 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
+@@ -460,6 +460,7 @@ 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,
+@@ -481,6 +482,7 @@ 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,
+@@ -495,6 +497,6 @@ bool dc_helper_dp_write_dpcd(
+ return false;
+ }
+
+- return drm_dp_dpcd_write(&aconnector->dm_dp_aux.aux, address,
+- (uint8_t *)data, size) > 0;
++ return drm_dp_dpcd_write(&aconnector->dm_dp_aux.aux,
++ address, (uint8_t *)data, size) > 0;
+ }
+diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc.c b/drivers/gpu/drm/amd/dal/dc/core/dc.c
+index d8c0799..feda859 100644
+--- a/drivers/gpu/drm/amd/dal/dc/core/dc.c
++++ b/drivers/gpu/drm/amd/dal/dc/core/dc.c
+@@ -914,7 +914,6 @@ void dc_print_sync_report(
+ * data from Step 1). */
+ }
+
+-/*AG TODO Create callbacks for WIN DM */
+ bool dc_read_dpcd(
+ struct dc *dc,
+ uint32_t link_index,
+@@ -937,7 +936,7 @@ bool dc_write_dpcd(
+ struct dc *dc,
+ uint32_t link_index,
+ uint32_t address,
+- uint8_t *data,
++ const uint8_t *data,
+ uint32_t size)
+ {
+ struct core_link *link =
+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 3a80a10..91aec82 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,9 @@ enum dc_status core_link_read_dpcd(
+ uint32_t size)
+ {
+ if (!dc_helper_dp_read_dpcd(link->ctx,
+- &link->public, address, data, size))
++ link->link_index,
++ &link->public,
++ address, data, size))
+ return DC_ERROR_UNEXPECTED;
+
+ return DC_OK;
+@@ -34,7 +36,9 @@ enum dc_status core_link_write_dpcd(
+ uint32_t size)
+ {
+ if (!dc_helper_dp_write_dpcd(link->ctx,
+- &link->public, address, data, size))
++ link->link_index,
++ &link->public,
++ address, data, size))
+ return DC_ERROR_UNEXPECTED;
+
+ return DC_OK;
+diff --git a/drivers/gpu/drm/amd/dal/dc/dc.h b/drivers/gpu/drm/amd/dal/dc/dc.h
+index df76992..fa2712c 100644
+--- a/drivers/gpu/drm/amd/dal/dc/dc.h
++++ b/drivers/gpu/drm/amd/dal/dc/dc.h
+@@ -436,7 +436,7 @@ bool dc_write_dpcd(
+ struct dc *dc,
+ uint32_t link_index,
+ uint32_t address,
+- uint8_t *data,
++ const uint8_t *data,
+ uint32_t size);
+
+ #endif /* DC_INTERFACE_H_ */
+diff --git a/drivers/gpu/drm/amd/dal/dc/dc_helpers.h b/drivers/gpu/drm/amd/dal/dc/dc_helpers.h
+index 66f4d2d..fe76833 100644
+--- a/drivers/gpu/drm/amd/dal/dc/dc_helpers.h
++++ b/drivers/gpu/drm/amd/dal/dc/dc_helpers.h
+@@ -72,15 +72,23 @@ void dc_helpers_dp_mst_stop_top_mgr(
+ struct dc_context *ctx,
+ const struct dc_link *link);
+
++/**
++ * OS specific aux read callback.
++ */
+ 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,
+ uint32_t size);
+
++/**
++ * OS specific aux write callback.
++ */
+ 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,
+--
+2.7.4
+