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 8c9d45e5b13b8399984cf35c7b22e486d74d4552..d72acbb049b1ba33bd0a3bbdd2d37c4dff12ea52 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 e4f96b6fd79d0189896d50f94ab5eb70297db7dc..19e5b3be92757ce8a59bfb951341d3b3e607c699 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 32279c5db72483f24106a5b282622903baaaa6ac..6904e95113c12ab243fa878e941e6a1d7c033e4a 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 07baa10a86473d64ed06efbb5d0b3ecf92af8aa2..c4af406146b7731fd2dda0a2c395ba5f2792d369 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 1042cf1a3ab04b9fb5d8e4cbe0283c4a06148a44..879f1494c4cd9d04ea400c6f9bea0104174d7b98 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 3ed19197a75583cb636ead09425ef2a352f5042c..8b82092b91cd9d42d8d7edeca4ce100d8a1c256e 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 bb750c3d17f8d092a1b732fee55aa41501ecae4f..96ea283bd16904d955ea55cf4e4992bc1a41b4c5 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 0684a0b9363722cbe27ac4e48e53ae72b8bab1ff..ae30fe2b6d0d90a6bcbb5bcea0d1f71d1aa8517a 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 aaa211c828ede969ab27a5b68b224a5e05911d54..59b96136871e5a97f0eefe16ef3f6e66d99e4fa4 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 2daa1e0c806165a382717705cf08c3ad99d5e8ba..305463b8f110be1742476528bf2ee64439c02a58 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