diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4694-drm-amd-display-Return-a-correct-error-value.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4694-drm-amd-display-Return-a-correct-error-value.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4694-drm-amd-display-Return-a-correct-error-value.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4694-drm-amd-display-Return-a-correct-error-value.patch new file mode 100644 index 00000000..e024377a --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4694-drm-amd-display-Return-a-correct-error-value.patch @@ -0,0 +1,47 @@ +From 1fecf0d6ffc9c8935672cacb6f2ccbdbbea1afaa Mon Sep 17 00:00:00 2001 +From: Mikita Lipski <mikita.lipski@amd.com> +Date: Tue, 12 Nov 2019 13:58:32 -0500 +Subject: [PATCH 4694/4736] drm/amd/display: Return a correct error value + +[why] +The function is expected to return instance of the timing generator +therefore we shouldn't be returning boolean in integer function, +and we shouldn't be returning zero so changing it to -1. + +Signed-off-by: Mikita Lipski <mikita.lipski@amd.com> +Reviewed-by: Martin Leung <Martin.Leung@amd.com> +Acked-by: Anthony Koo <Anthony.Koo@amd.com> +Acked-by: Leo Li <sunpeng.li@amd.com> +--- + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +index fd9358c11222..d4273527a371 100644 +--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +@@ -1870,7 +1870,7 @@ static int acquire_resource_from_hw_enabled_state( + inst = link->link_enc->funcs->get_dig_frontend(link->link_enc); + + if (inst == ENGINE_ID_UNKNOWN) +- return false; ++ return -1; + + for (i = 0; i < pool->stream_enc_count; i++) { + if (pool->stream_enc[i]->id == inst) { +@@ -1882,10 +1882,10 @@ static int acquire_resource_from_hw_enabled_state( + + // tg_inst not found + if (i == pool->stream_enc_count) +- return false; ++ return -1; + + if (tg_inst >= pool->timing_generator_count) +- return false; ++ return -1; + + if (!res_ctx->pipe_ctx[tg_inst].stream) { + struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[tg_inst]; +-- +2.17.1 + |