drm/amd/display: Drop legacy code
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Thu, 11 Jan 2024 21:24:26 +0000 (14:24 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Feb 2024 17:26:23 +0000 (12:26 -0500)
Display code keeps getting improvements, and because of that, some
legacy code is left behind. This commit drops some of those unused
codes.

Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dmub/dmub_srv.h
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c

index 8c9d45e..d72acbb 100644 (file)
@@ -185,10 +185,6 @@ int rn_vbios_smu_set_hard_min_dcfclk(struct clk_mgr_internal *clk_mgr, int reque
                        VBIOSSMC_MSG_SetHardMinDcfclkByFreq,
                        khz_to_mhz_ceil(requested_dcfclk_khz));
 
-#ifdef DBG
-       smu_print("actual_dcfclk_set_mhz %d is set to : %d\n", actual_dcfclk_set_mhz, actual_dcfclk_set_mhz * 1000);
-#endif
-
        return actual_dcfclk_set_mhz * 1000;
 }
 
index e4f96b6..19e5b3b 100644 (file)
@@ -180,10 +180,6 @@ int dcn301_smu_set_hard_min_dcfclk(struct clk_mgr_internal *clk_mgr, int request
                        VBIOSSMC_MSG_SetHardMinDcfclkByFreq,
                        khz_to_mhz_ceil(requested_dcfclk_khz));
 
-#ifdef DBG
-       smu_print("actual_dcfclk_set_mhz %d is set to : %d\n", actual_dcfclk_set_mhz, actual_dcfclk_set_mhz * 1000);
-#endif
-
        return actual_dcfclk_set_mhz * 1000;
 }
 
index 32279c5..6904e95 100644 (file)
@@ -202,10 +202,6 @@ int dcn31_smu_set_hard_min_dcfclk(struct clk_mgr_internal *clk_mgr, int requeste
                        VBIOSSMC_MSG_SetHardMinDcfclkByFreq,
                        khz_to_mhz_ceil(requested_dcfclk_khz));
 
-#ifdef DBG
-       smu_print("actual_dcfclk_set_mhz %d is set to : %d\n", actual_dcfclk_set_mhz, actual_dcfclk_set_mhz * 1000);
-#endif
-
        return actual_dcfclk_set_mhz * 1000;
 }
 
index 07baa10..c4af406 100644 (file)
@@ -220,12 +220,6 @@ int dcn314_smu_set_hard_min_dcfclk(struct clk_mgr_internal *clk_mgr, int request
                        VBIOSSMC_MSG_SetHardMinDcfclkByFreq,
                        khz_to_mhz_ceil(requested_dcfclk_khz));
 
-#ifdef DBG
-       smu_print("actual_dcfclk_set_mhz %d is set to : %d\n",
-                       actual_dcfclk_set_mhz,
-                       actual_dcfclk_set_mhz * 1000);
-#endif
-
        return actual_dcfclk_set_mhz * 1000;
 }
 
index 1042cf1..879f149 100644 (file)
@@ -215,10 +215,6 @@ int dcn315_smu_set_hard_min_dcfclk(struct clk_mgr_internal *clk_mgr, int request
                        VBIOSSMC_MSG_SetHardMinDcfclkByFreq,
                        khz_to_mhz_ceil(requested_dcfclk_khz));
 
-#ifdef DBG
-       smu_print("actual_dcfclk_set_mhz %d is set to : %d\n", actual_dcfclk_set_mhz, actual_dcfclk_set_mhz * 1000);
-#endif
-
        return actual_dcfclk_set_mhz * 1000;
 }
 
index 3ed1919..8b82092 100644 (file)
@@ -189,10 +189,6 @@ int dcn316_smu_set_hard_min_dcfclk(struct clk_mgr_internal *clk_mgr, int request
                        VBIOSSMC_MSG_SetHardMinDcfclkByFreq,
                        khz_to_mhz_ceil(requested_dcfclk_khz));
 
-#ifdef DBG
-       smu_print("actual_dcfclk_set_mhz %d is set to : %d\n", actual_dcfclk_set_mhz, actual_dcfclk_set_mhz * 1000);
-#endif
-
        return actual_dcfclk_set_mhz * 1000;
 }
 
index bb750c3..96ea283 100644 (file)
@@ -1871,23 +1871,6 @@ int resource_find_any_free_pipe(struct resource_context *new_res_ctx,
 
 bool resource_is_pipe_type(const struct pipe_ctx *pipe_ctx, enum pipe_type type)
 {
-#ifdef DBG
-       if (pipe_ctx->stream == NULL) {
-               /* a free pipe with dangling states */
-               ASSERT(!pipe_ctx->plane_state);
-               ASSERT(!pipe_ctx->prev_odm_pipe);
-               ASSERT(!pipe_ctx->next_odm_pipe);
-               ASSERT(!pipe_ctx->top_pipe);
-               ASSERT(!pipe_ctx->bottom_pipe);
-       } else if (pipe_ctx->top_pipe) {
-               /* a secondary DPP pipe must be signed to a plane */
-               ASSERT(pipe_ctx->plane_state)
-       }
-       /* Add more checks here to prevent corrupted pipe ctx. It is very hard
-        * to debug this issue afterwards because we can't pinpoint the code
-        * location causing inconsistent pipe context states.
-        */
-#endif
        switch (type) {
        case OTG_MASTER:
                return !pipe_ctx->prev_odm_pipe &&
index 0684a0b..ae30fe2 100644 (file)
@@ -450,7 +450,6 @@ struct dmub_srv_create_params {
        struct dmub_srv_base_funcs funcs;
        struct dmub_srv_hw_funcs *hw_funcs;
        void *user_ctx;
-       struct dc_context *dc_ctx;
        enum dmub_asic asic;
        uint32_t fw_version;
        bool is_virtual;
index aaa211c..59b9613 100644 (file)
 #ifndef DMUB_CMD_H
 #define DMUB_CMD_H
 
-#if defined(_TEST_HARNESS) || defined(FPGA_USB4)
-#include "dmub_fw_types.h"
-#include "include_legacy/atomfirmware.h"
-
-#if defined(_TEST_HARNESS)
-#include <string.h>
-#endif
-#else
-
 #include <asm/byteorder.h>
 #include <linux/types.h>
 #include <linux/string.h>
@@ -42,8 +33,6 @@
 
 #include "atomfirmware.h"
 
-#endif // defined(_TEST_HARNESS) || defined(FPGA_USB4)
-
 //<DMUB_TYPES>==================================================================
 /* Basic type definitions. */
 
index 2daa1e0..305463b 100644 (file)
@@ -32,8 +32,6 @@
 #include "dcn/dcn_3_2_0_offset.h"
 #include "dcn/dcn_3_2_0_sh_mask.h"
 
-#define DCN_BASE__INST0_SEG2                       0x000034C0
-
 #define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
 #define CTX dmub
 #define REGS dmub->regs_dcn32