opp110->base.inst = inst;
- opp110->base.regamma_params = dm_alloc(sizeof(struct pwl_params));
- if (opp110->base.regamma_params == NULL)
- return false;
-
opp110->regs = regs;
opp110->opp_shift = opp_shift;
opp110->opp_mask = opp_mask;
void dce110_opp_destroy(struct output_pixel_processor **opp)
{
- if (*opp) {
- if ((*opp)->regamma_params)
- dm_free((*opp)->regamma_params);
- (*opp)->regamma_params = NULL;
+ if (*opp)
dm_free(FROM_DCE11_OPP(*opp));
- }
*opp = NULL;
}
struct output_pixel_processor *opp = pipe_ctx->opp;
opp->funcs->opp_power_on_regamma_lut(opp, true);
- opp->regamma_params->hw_points_num = GAMMA_HW_POINTS_NUM;
+ opp->regamma_params.hw_points_num = GAMMA_HW_POINTS_NUM;
if (stream->public.out_transfer_func &&
stream->public.out_transfer_func->type ==
TRANSFER_FUNCTION_SRGB) {
opp->funcs->opp_set_regamma_mode(opp, OPP_REGAMMA_SRGB);
} else if (dce110_translate_regamma_to_hw_format(
- stream->public.out_transfer_func, opp->regamma_params)) {
- opp->funcs->opp_program_regamma_pwl(opp, opp->regamma_params);
+ stream->public.out_transfer_func, &opp->regamma_params)) {
+ opp->funcs->opp_program_regamma_pwl(opp, &opp->regamma_params);
opp->funcs->opp_set_regamma_mode(opp, OPP_REGAMMA_USER);
} else {
opp->funcs->opp_set_regamma_mode(opp, OPP_REGAMMA_BYPASS);