aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0459-drm-amd-display-Use-proper-enums-in-process_channel_.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0459-drm-amd-display-Use-proper-enums-in-process_channel_.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0459-drm-amd-display-Use-proper-enums-in-process_channel_.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0459-drm-amd-display-Use-proper-enums-in-process_channel_.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0459-drm-amd-display-Use-proper-enums-in-process_channel_.patch
new file mode 100644
index 00000000..a3d0d570
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0459-drm-amd-display-Use-proper-enums-in-process_channel_.patch
@@ -0,0 +1,63 @@
+From 01cb89acdd2b81e5ec077cbdc55a4a5d0efbb22b Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <natechancellor@gmail.com>
+Date: Thu, 27 Sep 2018 11:06:33 -0700
+Subject: [PATCH 0459/2940] drm/amd/display: Use proper enums in
+ process_channel_reply
+
+Clang warns when one enumerated type is implicitly converted to another.
+
+drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:315:19: warning:
+implicit conversion from enumeration type 'enum
+aux_channel_operation_result' to different enumeration type 'enum
+aux_transaction_reply' [-Wenum-conversion]
+ reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON;
+ ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+drivers/gpu/drm/amd/amdgpu/../display/dc/i2caux/dce110/aux_engine_dce110.c:349:19:
+warning: implicit conversion from enumeration type 'enum
+aux_channel_operation_result' to different enumeration type 'enum
+aux_transaction_reply' [-Wenum-conversion]
+ reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON;
+ ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The current enum is incorrect, it should be from aux_transaction_reply,
+so use AUX_TRANSACTION_REPLY_HPD_DISCON.
+
+Reported-by: Nick Desaulniers <ndesaulniers@google.com>
+Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 2 +-
+ .../gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
+index 3f5b2e6f7553..aaeb7faac0c4 100644
+--- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
++++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
+@@ -312,7 +312,7 @@ static void process_channel_reply(
+
+ /* in case HPD is LOW, exit AUX transaction */
+ if ((sw_status & AUX_SW_STATUS__AUX_SW_HPD_DISCON_MASK)) {
+- reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON;
++ reply->status = AUX_TRANSACTION_REPLY_HPD_DISCON;
+ return;
+ }
+
+diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c b/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c
+index 8eee8ace1259..59c3ed43d609 100644
+--- a/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c
++++ b/drivers/gpu/drm/amd/display/dc/i2caux/dce110/aux_engine_dce110.c
+@@ -346,7 +346,7 @@ static void process_channel_reply(
+
+ /* in case HPD is LOW, exit AUX transaction */
+ if ((sw_status & AUX_SW_STATUS__AUX_SW_HPD_DISCON_MASK)) {
+- reply->status = AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON;
++ reply->status = AUX_TRANSACTION_REPLY_HPD_DISCON;
+ return;
+ }
+
+--
+2.17.1
+