Commit 33056a97 authored by Mario Limonciello's avatar Mario Limonciello Committed by Alex Deucher
Browse files

drm/amd/display: Remove double checks for `debug.enable_mem_low_power.bits.cm`



[Why]
A variety of the 3DLUT handling functions check
`debug.enable_mem_low_power.bits.cm` both in the caller and function.
This is unnecessary overhead.

[How]
For each of them reduce to just checking just in caller or function.

Reviewed-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarRoman Li <roman.li@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4321742c
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -790,7 +790,6 @@ static bool dpp3_program_blnd_lut(struct dpp *dpp_base,

	if (params == NULL) {
		REG_SET(CM_BLNDGAM_CONTROL, 0, CM_BLNDGAM_MODE, 0);
		if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm)
		dpp3_power_on_blnd_lut(dpp_base, false);
		return false;
	}
@@ -1204,7 +1203,6 @@ static bool dpp3_program_shaper(struct dpp *dpp_base,

	if (params == NULL) {
		REG_SET(CM_SHAPER_CONTROL, 0, CM_SHAPER_LUT_MODE, 0);
		if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm)
		dpp3_power_on_shaper(dpp_base, false);
		return false;
	}
@@ -1399,7 +1397,6 @@ static bool dpp3_program_3dlut(struct dpp *dpp_base,

	if (params == NULL) {
		dpp3_set_3dlut_mode(dpp_base, LUT_BYPASS, false, false);
		if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm)
		dpp3_power_on_hdr3dlut(dpp_base, false);
		return false;
	}