Commit f9491b67 authored by Samson Tam's avatar Samson Tam Committed by Alex Deucher
Browse files

drm/amd/display: Add debug option to override EASF scaler taps



[Why & How]
Add new option override_easf to use in_taps instead of internal
 taps policy for debugging

Reviewed-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Signed-off-by: default avatarSamson Tam <Samson.Tam@amd.com>
Signed-off-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9dddfac9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -147,6 +147,8 @@ void translate_SPL_in_params_from_pipe_ctx(struct pipe_ctx *pipe_ctx, struct spl
		spl_in->prefer_easf = false;
	else if (pipe_ctx->stream->ctx->dc->debug.force_easf == 2)
		spl_in->disable_easf = true;
	else if (pipe_ctx->stream->ctx->dc->debug.force_easf == 3)
		spl_in->override_easf = true;
	/* Translate adaptive sharpening preference */
	unsigned int sharpness_setting = pipe_ctx->stream->ctx->dc->debug.force_sharpness;
	unsigned int force_sharpness_level = pipe_ctx->stream->ctx->dc->debug.force_sharpness_level;
+15 −0
Original line number Diff line number Diff line
@@ -1018,6 +1018,21 @@ static bool spl_get_optimal_number_of_taps(
			spl_scratch->scl_data.taps.h_taps_c = 6;
			spl_scratch->scl_data.taps.v_taps_c = 6;
		}

		/* Override mode: keep EASF enabled but use input taps if valid */
		if (spl_in->override_easf) {
			spl_scratch->scl_data.taps.h_taps = (in_taps->h_taps != 0) ? in_taps->h_taps : spl_scratch->scl_data.taps.h_taps;
			spl_scratch->scl_data.taps.v_taps = (in_taps->v_taps != 0) ? in_taps->v_taps : spl_scratch->scl_data.taps.v_taps;
			spl_scratch->scl_data.taps.h_taps_c = (in_taps->h_taps_c != 0) ? in_taps->h_taps_c : spl_scratch->scl_data.taps.h_taps_c;
			spl_scratch->scl_data.taps.v_taps_c = (in_taps->v_taps_c != 0) ? in_taps->v_taps_c : spl_scratch->scl_data.taps.v_taps_c;

			if ((spl_scratch->scl_data.taps.h_taps > 6) || (spl_scratch->scl_data.taps.v_taps > 6))
				skip_easf = true;
			if ((spl_scratch->scl_data.taps.h_taps > 1) && (spl_scratch->scl_data.taps.h_taps % 2))
				spl_scratch->scl_data.taps.h_taps--;
			if ((spl_scratch->scl_data.taps.h_taps_c > 1) && (spl_scratch->scl_data.taps.h_taps_c % 2))
				spl_scratch->scl_data.taps.h_taps_c--;
		}
	}

	/*Ensure we can support the requested number of vtaps*/
+1 −0
Original line number Diff line number Diff line
@@ -545,6 +545,7 @@ struct spl_in {
	enum linear_light_scaling lls_pref;	//	Linear Light Scaling
	bool prefer_easf;
	bool disable_easf;
	bool override_easf; /* If true, keep EASF enabled but use provided in_taps */
	struct spl_debug debug;
	bool is_fullscreen;
	bool is_hdr_on;