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

Commit 23cdb2e2 authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

drm/msm/sde: reduce the arguments to setup_scaler3 function



Remove unnecessary arguments passed to setup_scaler3
function in planes as most of the arguments can be derived
from the sde_plane and sde_plane_state structures.

Change-Id: Ie112f5d95532eea564c159ae5aadfe5727c6c6f8
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent e2d25c18
Loading
Loading
Loading
Loading
+16 −18
Original line number Diff line number Diff line
@@ -1077,23 +1077,26 @@ static int _sde_plane_setup_scaler3_lut(struct sde_plane *psde,
}

static void _sde_plane_setup_scaler3(struct sde_plane *psde,
		struct sde_plane_state *pstate,
		uint32_t src_w, uint32_t src_h, uint32_t dst_w, uint32_t dst_h,
		struct sde_hw_scaler3_cfg *scale_cfg,
		const struct sde_format *fmt,
		struct sde_plane_state *pstate, const struct sde_format *fmt,
		uint32_t chroma_subsmpl_h, uint32_t chroma_subsmpl_v)
{
	uint32_t decimated, i;
	uint32_t decimated, i, src_w, src_h, dst_w, dst_h;
	struct sde_hw_scaler3_cfg *scale_cfg;

	if (!psde || !pstate || !scale_cfg || !fmt || !chroma_subsmpl_h ||
			!chroma_subsmpl_v) {
		SDE_ERROR(
			"psde %d pstate %d scale_cfg %d fmt %d smp_h %d smp_v %d\n",
			!!psde, !!pstate, !!scale_cfg, !!fmt, chroma_subsmpl_h,
	if (!psde || !pstate || !fmt ||
			!chroma_subsmpl_h || !chroma_subsmpl_v) {
		SDE_ERROR("psde %d pstate %d fmt %d smp_h %d smp_v %d\n",
				!!psde, !!pstate, !!fmt, chroma_subsmpl_h,
				chroma_subsmpl_v);
		return;
	}

	scale_cfg = &pstate->scaler3_cfg;
	src_w = psde->pipe_cfg.src_rect.w;
	src_h = psde->pipe_cfg.src_rect.h;
	dst_w = psde->pipe_cfg.dst_rect.w;
	dst_h = psde->pipe_cfg.dst_rect.h;

	memset(scale_cfg, 0, sizeof(*scale_cfg));
	memset(&pstate->pixel_ext, 0, sizeof(struct sde_hw_pixel_ext));

@@ -1501,12 +1504,7 @@ static void _sde_plane_setup_scaler(struct sde_plane *psde,
		if (rc || pstate->scaler_check_state !=
			SDE_PLANE_SCLCHECK_SCALER_V2) {
			/* calculate default config for QSEED3 */
			_sde_plane_setup_scaler3(psde, pstate,
					psde->pipe_cfg.src_rect.w,
					psde->pipe_cfg.src_rect.h,
					psde->pipe_cfg.dst_rect.w,
					psde->pipe_cfg.dst_rect.h,
					&pstate->scaler3_cfg, fmt,
			_sde_plane_setup_scaler3(psde, pstate, fmt,
					chroma_subsmpl_h, chroma_subsmpl_v);
		}
	} else if (pstate->scaler_check_state != SDE_PLANE_SCLCHECK_SCALER_V1 ||