diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4252-drm-amd-display-Proper-return-of-result-when-aux-eng.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4252-drm-amd-display-Proper-return-of-result-when-aux-eng.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4252-drm-amd-display-Proper-return-of-result-when-aux-eng.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4252-drm-amd-display-Proper-return-of-result-when-aux-eng.patch new file mode 100644 index 00000000..96a9998e --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4252-drm-amd-display-Proper-return-of-result-when-aux-eng.patch @@ -0,0 +1,77 @@ +From 028bb6e29c093f31f569f7e129229312f25b7e7d Mon Sep 17 00:00:00 2001 +From: Anthony Koo <Anthony.Koo@amd.com> +Date: Wed, 2 Oct 2019 12:22:29 -0400 +Subject: [PATCH 4252/4736] drm/amd/display: Proper return of result when aux + engine acquire fails + +[Why] +When aux engine acquire fails, we missed populating the operation_result +that describes the failure reason. + +[How] +Set operation_result to new type: +AUX_CHANNEL_OPERATION_FAILED_ENGINE_ACQUIRE +in the case aux engine acquire has failed. + +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/amdgpu_dm/amdgpu_dm_mst_types.c | 1 + + drivers/gpu/drm/amd/display/dc/dc_ddc_types.h | 3 ++- + drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 5 ++++- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +index 430155730c29..c765fcbd1386 100644 +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +@@ -113,6 +113,7 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux, + result = -EIO; + break; + case AUX_CHANNEL_OPERATION_FAILED_INVALID_REPLY: ++ case AUX_CHANNEL_OPERATION_FAILED_ENGINE_ACQUIRE: + result = -EBUSY; + break; + case AUX_CHANNEL_OPERATION_FAILED_TIMEOUT: +diff --git a/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h b/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h +index 4ef97f65e55d..4f8f576d5fcf 100644 +--- a/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h ++++ b/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h +@@ -49,7 +49,8 @@ enum aux_channel_operation_result { + AUX_CHANNEL_OPERATION_FAILED_REASON_UNKNOWN, + AUX_CHANNEL_OPERATION_FAILED_INVALID_REPLY, + AUX_CHANNEL_OPERATION_FAILED_TIMEOUT, +- AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON ++ AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON, ++ AUX_CHANNEL_OPERATION_FAILED_ENGINE_ACQUIRE + }; + + +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 a68edd0c2172..3c3830f7908f 100644 +--- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c ++++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c +@@ -535,8 +535,10 @@ int dce_aux_transfer_raw(struct ddc_service *ddc, + memset(&aux_rep, 0, sizeof(aux_rep)); + + aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]; +- if (!acquire(aux_engine, ddc_pin)) ++ if (!acquire(aux_engine, ddc_pin)) { ++ *operation_result = AUX_CHANNEL_OPERATION_FAILED_ENGINE_ACQUIRE; + return -1; ++ } + + if (payload->i2c_over_aux) + aux_req.type = AUX_TRANSACTION_TYPE_I2C; +@@ -660,6 +662,7 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc, + break; + + case AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON: ++ case AUX_CHANNEL_OPERATION_FAILED_ENGINE_ACQUIRE: + case AUX_CHANNEL_OPERATION_FAILED_REASON_UNKNOWN: + default: + goto fail; +-- +2.17.1 + |