Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29a323ea authored by Alan Cox's avatar Alan Cox Committed by Mauro Carvalho Chehab
Browse files

[media] atomisp: Unify lut free logic



ISP2401 introduced a helper for this which we can use just as well on the
ISP2400 and remove some more noise differences.

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent b1c056e0
Loading
Loading
Loading
Loading
+0 −7
Original line number Original line Diff line number Diff line
@@ -2533,15 +2533,8 @@ ia_css_pipe_destroy(struct ia_css_pipe *pipe)
		break;
		break;
	}
	}


#ifndef ISP2401
	if (pipe->scaler_pp_lut != mmgr_NULL) {
		hmm_free(pipe->scaler_pp_lut);
		pipe->scaler_pp_lut = mmgr_NULL;
	}
#else
	sh_css_params_free_gdc_lut(pipe->scaler_pp_lut);
	sh_css_params_free_gdc_lut(pipe->scaler_pp_lut);
	pipe->scaler_pp_lut = mmgr_NULL;
	pipe->scaler_pp_lut = mmgr_NULL;
#endif


	my_css.active_pipes[ia_css_pipe_get_pipe_num(pipe)] = NULL;
	my_css.active_pipes[ia_css_pipe_get_pipe_num(pipe)] = NULL;
	sh_css_pipe_free_shading_table(pipe);
	sh_css_pipe_free_shading_table(pipe);
+0 −14
Original line number Original line Diff line number Diff line
@@ -3356,15 +3356,8 @@ enum ia_css_err ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe,
	}
	}


	/* Free any existing tables. */
	/* Free any existing tables. */
#ifndef ISP2401
	if (pipe->scaler_pp_lut != mmgr_NULL) {
		hmm_free(pipe->scaler_pp_lut);
		pipe->scaler_pp_lut = mmgr_NULL;
	}
#else
	sh_css_params_free_gdc_lut(pipe->scaler_pp_lut);
	sh_css_params_free_gdc_lut(pipe->scaler_pp_lut);
	pipe->scaler_pp_lut = mmgr_NULL;
	pipe->scaler_pp_lut = mmgr_NULL;
#endif


#ifndef ISP2401
#ifndef ISP2401
	if (store) {
	if (store) {
@@ -3445,15 +3438,8 @@ void sh_css_params_free_default_gdc_lut(void)
{
{
	IA_CSS_ENTER_PRIVATE("void");
	IA_CSS_ENTER_PRIVATE("void");


#ifndef ISP2401
	if (default_gdc_lut != mmgr_NULL) {
		hmm_free(default_gdc_lut);
		default_gdc_lut = mmgr_NULL;
	}
#else
	sh_css_params_free_gdc_lut(default_gdc_lut);
	sh_css_params_free_gdc_lut(default_gdc_lut);
	default_gdc_lut = mmgr_NULL;
	default_gdc_lut = mmgr_NULL;
#endif


	IA_CSS_LEAVE_PRIVATE("void");
	IA_CSS_LEAVE_PRIVATE("void");