]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Remove double checks for `debug.enable_mem_low_power.bits.cm`
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 4 Dec 2024 20:27:42 +0000 (14:27 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Apr 2025 22:01:07 +0000 (18:01 -0400)
[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: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c

index abf439e743f233f038e3ce7db9dbb306c0e3ddd8..2d70586cef4027d0bc21b2eba595248f29dae9af 100644 (file)
@@ -790,8 +790,7 @@ 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);
+               dpp3_power_on_blnd_lut(dpp_base, false);
                return false;
        }
 
@@ -1204,8 +1203,7 @@ 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);
+               dpp3_power_on_shaper(dpp_base, false);
                return false;
        }
 
@@ -1399,8 +1397,7 @@ 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);
+               dpp3_power_on_hdr3dlut(dpp_base, false);
                return false;
        }