From 1a502fcd898db197c89d38f99528333bd805e23e Mon Sep 17 00:00:00 2001 From: David Rosca Date: Tue, 15 Apr 2025 12:28:51 +0200 Subject: [PATCH] radeonsi/vpe: Fix process_frame return value VPE_STATUS_OK is 1, but the function should return 0 on success. Fixes: 4fe586f71ef ("radeonsi/vpe: support geometric scaling") Reviewed-by: Peyton Lee Part-of: --- src/gallium/drivers/radeonsi/si_vpe.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_vpe.c b/src/gallium/drivers/radeonsi/si_vpe.c index 8cce0244d34..328b86d068f 100644 --- a/src/gallium/drivers/radeonsi/si_vpe.c +++ b/src/gallium/drivers/radeonsi/si_vpe.c @@ -1270,8 +1270,10 @@ si_vpe_processor_process_frame(struct pipe_video_codec *codec, scaling_ratio[1] = (float)src_rect_height / dst_rect_height; /* Perform general processing */ - if ((scaling_ratio[0] <= VPE_MAX_GEOMETRIC_DOWNSCALE) && (scaling_ratio[1] <= VPE_MAX_GEOMETRIC_DOWNSCALE)) - return si_vpe_construct_blt(vpeproc, process_properties, vpeproc->src_surfaces, vpeproc->dst_surfaces); + if ((scaling_ratio[0] <= VPE_MAX_GEOMETRIC_DOWNSCALE) && (scaling_ratio[1] <= VPE_MAX_GEOMETRIC_DOWNSCALE)) { + result = si_vpe_construct_blt(vpeproc, process_properties, vpeproc->src_surfaces, vpeproc->dst_surfaces); + return result == VPE_STATUS_OK ? 0 : 1; + } /* If fast scaling is required, the geometric scaling should not be performed */ if (process_properties->filter_flags & PIPE_VIDEO_VPP_FILTER_FLAG_SCALING_FAST) @@ -1454,7 +1456,7 @@ si_vpe_processor_process_frame(struct pipe_video_codec *codec, } } - return result; + return result == VPE_STATUS_OK ? 0 : 1; } static int