aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/4732-drm-amd-display-Write-TEST_EDID_CHECKSUM_WRITE-for-E.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4732-drm-amd-display-Write-TEST_EDID_CHECKSUM_WRITE-for-E.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/4732-drm-amd-display-Write-TEST_EDID_CHECKSUM_WRITE-for-E.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4732-drm-amd-display-Write-TEST_EDID_CHECKSUM_WRITE-for-E.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4732-drm-amd-display-Write-TEST_EDID_CHECKSUM_WRITE-for-E.patch
new file mode 100644
index 00000000..346d3558
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4732-drm-amd-display-Write-TEST_EDID_CHECKSUM_WRITE-for-E.patch
@@ -0,0 +1,86 @@
+From 9c86b692e86bc47641c63bbc62b24142aaba2df3 Mon Sep 17 00:00:00 2001
+From: Mikita Lipski <mikita.lipski@amd.com>
+Date: Thu, 17 May 2018 15:44:20 -0400
+Subject: [PATCH 4732/5725] drm/amd/display: Write TEST_EDID_CHECKSUM_WRITE for
+ EDID tests
+
+Extract edid's checksum and send it back for verification if EDID_TEST
+is requested.
+
+Also added a flag for EDID checksum write in TEST_RESPONSE structure,
+and simple spelling fix.
+
+Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
+Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
+Acked-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 28 ++++++++++++++++++++++
+ drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 5 ++--
+ 2 files changed, 31 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+index bd44935..dea49dc 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+@@ -497,6 +497,34 @@ enum dc_edid_status dm_helpers_read_local_edid(
+ DRM_ERROR("EDID err: %d, on connector: %s",
+ edid_status,
+ aconnector->base.name);
++ if (link->aux_mode) {
++ union test_request test_request = {0};
++ union test_response test_response = {0};
++
++ dm_helpers_dp_read_dpcd(ctx,
++ link,
++ DP_TEST_REQUEST,
++ &test_request.raw,
++ sizeof(union test_request));
++
++ if (!test_request.bits.EDID_READ)
++ return edid_status;
++
++ test_response.bits.EDID_CHECKSUM_WRITE = 1;
++
++ dm_helpers_dp_write_dpcd(ctx,
++ link,
++ DP_TEST_EDID_CHECKSUM,
++ &sink->dc_edid.raw_edid[sink->dc_edid.length-1],
++ 1);
++
++ dm_helpers_dp_write_dpcd(ctx,
++ link,
++ DP_TEST_RESPONSE,
++ &test_response.raw,
++ sizeof(test_response));
++
++ }
+
+ return edid_status;
+ }
+diff --git a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h
+index 90bccd5..da93ab4 100644
+--- a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h
++++ b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h
+@@ -430,7 +430,7 @@ union test_request {
+ struct {
+ uint8_t LINK_TRAINING :1;
+ uint8_t LINK_TEST_PATTRN :1;
+- uint8_t EDID_REAT :1;
++ uint8_t EDID_READ :1;
+ uint8_t PHY_TEST_PATTERN :1;
+ uint8_t AUDIO_TEST_PATTERN :1;
+ uint8_t RESERVED :1;
+@@ -443,7 +443,8 @@ union test_response {
+ struct {
+ uint8_t ACK :1;
+ uint8_t NO_ACK :1;
+- uint8_t RESERVED :6;
++ uint8_t EDID_CHECKSUM_WRITE:1;
++ uint8_t RESERVED :5;
+ } bits;
+ uint8_t raw;
+ };
+--
+2.7.4
+