aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1301-drm-amd-display-Fix-exception-from-AUX-acquire-failu.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1301-drm-amd-display-Fix-exception-from-AUX-acquire-failu.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/1301-drm-amd-display-Fix-exception-from-AUX-acquire-failu.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1301-drm-amd-display-Fix-exception-from-AUX-acquire-failu.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1301-drm-amd-display-Fix-exception-from-AUX-acquire-failu.patch
new file mode 100644
index 00000000..69a20446
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1301-drm-amd-display-Fix-exception-from-AUX-acquire-failu.patch
@@ -0,0 +1,50 @@
+From ccddd5d32048876bd1fbc79663238f7a712921b8 Mon Sep 17 00:00:00 2001
+From: Anthony Koo <Anthony.Koo@amd.com>
+Date: Wed, 6 Feb 2019 11:45:42 -0500
+Subject: [PATCH 1301/2940] drm/amd/display: Fix exception from AUX acquire
+ failure
+
+[Why]
+AUX arbitration occurs between SW and FW components.
+When AUX acquire fails, it causes engine->ddc to be NULL,
+which leads to an exception when we try to release the AUX
+engine.
+
+[How]
+When AUX engine acquire fails, it should return from the
+function without trying to continue the operation.
+The upper level will determine if it wants to retry.
+i.e. dce_aux_transfer_with_retries will be used and retry.
+
+Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
+Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
+Acked-by: Leo Li <sunpeng.li@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 4 ++--
+ 1 file 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 4febf4ef7240..2f50be33ab15 100644
+--- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
++++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
+@@ -374,7 +374,6 @@ static bool acquire(
+ struct dce_aux *engine,
+ struct ddc *ddc)
+ {
+-
+ enum gpio_result result;
+
+ if (!is_engine_available(engine))
+@@ -455,7 +454,8 @@ int dce_aux_transfer(struct ddc_service *ddc,
+ memset(&aux_rep, 0, sizeof(aux_rep));
+
+ aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
+- acquire(aux_engine, ddc_pin);
++ if (!acquire(aux_engine, ddc_pin))
++ return -1;
+
+ if (payload->i2c_over_aux)
+ aux_req.type = AUX_TRANSACTION_TYPE_I2C;
+--
+2.17.1
+