Skip to content

Commit d3b0385

Browse files
Alex Hungalexdeucher
authored andcommitted
drm/amd/display: Check return of shaper curve to HW format
[Why & How] Check return of cm3_helper_translate_curve_to_hw_format. This is reported as a CHECKED_RETURN error by Coverity. Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Ray Wu <ray.wu@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent b6a6500 commit d3b0385

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ bool dcn32_set_mcm_luts(
486486
struct dpp *dpp_base = pipe_ctx->plane_res.dpp;
487487
int mpcc_id = pipe_ctx->plane_res.hubp->inst;
488488
struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
489-
bool result = true;
489+
bool rval, result;
490490
const struct pwl_params *lut_params = NULL;
491491

492492
// 1D LUT
@@ -509,10 +509,10 @@ bool dcn32_set_mcm_luts(
509509
lut_params = &plane_state->in_shaper_func.pwl;
510510
else if (plane_state->in_shaper_func.type == TF_TYPE_DISTRIBUTED_POINTS) {
511511
// TODO: dpp_base replace
512-
cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
512+
rval = cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
513513
&plane_state->in_shaper_func,
514514
&dpp_base->shaper_params, true);
515-
lut_params = &dpp_base->shaper_params;
515+
lut_params = rval ? &dpp_base->shaper_params : NULL;
516516
}
517517

518518
mpc->funcs->program_shaper(mpc, lut_params, mpcc_id);

0 commit comments

Comments
 (0)