From: Lee Jones <lee.jones@linaro.org>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: [PATCH 07/30] drm/radeon/kv_dpm: Strip out unused functions and their tables
Date: Tue, 10 Nov 2020 19:30:49 +0000 [thread overview]
Message-ID: <20201110193112.988999-8-lee.jones@linaro.org> (raw)
In-Reply-To: <20201110193112.988999-1-lee.jones@linaro.org>
These haven't been used since the driver was upstreamed in 2013.
Fixes the following W=1 kernel build warning(s):
drivers/gpu/drm/radeon/kv_dpm.c:161:40: warning: ‘cpl_cac_config_reg’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:156:40: warning: ‘mc3_cac_config_reg’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:151:40: warning: ‘mc2_cac_config_reg’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:146:40: warning: ‘mc1_cac_config_reg’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:141:40: warning: ‘mc0_cac_config_reg’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:136:40: warning: ‘sx0_cac_config_reg’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:104:43: warning: ‘cpl_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:98:43: warning: ‘mc3_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:92:43: warning: ‘mc2_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:86:43: warning: ‘mc1_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:80:43: warning: ‘mc0_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=]
drivers/gpu/drm/radeon/kv_dpm.c:67:43: warning: ‘sx_local_cac_cfg_kv’ defined but not used [-Wunused-const-variable=]
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/radeon/kv_dpm.c | 205 +-------------------------------
1 file changed, 1 insertion(+), 204 deletions(-)
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c
index 5e6086eb18073..f7735da07feb9 100644
--- a/drivers/gpu/drm/radeon/kv_dpm.c
+++ b/drivers/gpu/drm/radeon/kv_dpm.c
@@ -64,105 +64,6 @@ extern void cik_exit_rlc_safe_mode(struct radeon_device *rdev);
extern void cik_update_cg(struct radeon_device *rdev,
u32 block, bool enable);
-static const struct kv_lcac_config_values sx_local_cac_cfg_kv[] =
-{
- { 0, 4, 1 },
- { 1, 4, 1 },
- { 2, 5, 1 },
- { 3, 4, 2 },
- { 4, 1, 1 },
- { 5, 5, 2 },
- { 6, 6, 1 },
- { 7, 9, 2 },
- { 0xffffffff }
-};
-
-static const struct kv_lcac_config_values mc0_local_cac_cfg_kv[] =
-{
- { 0, 4, 1 },
- { 0xffffffff }
-};
-
-static const struct kv_lcac_config_values mc1_local_cac_cfg_kv[] =
-{
- { 0, 4, 1 },
- { 0xffffffff }
-};
-
-static const struct kv_lcac_config_values mc2_local_cac_cfg_kv[] =
-{
- { 0, 4, 1 },
- { 0xffffffff }
-};
-
-static const struct kv_lcac_config_values mc3_local_cac_cfg_kv[] =
-{
- { 0, 4, 1 },
- { 0xffffffff }
-};
-
-static const struct kv_lcac_config_values cpl_local_cac_cfg_kv[] =
-{
- { 0, 4, 1 },
- { 1, 4, 1 },
- { 2, 5, 1 },
- { 3, 4, 1 },
- { 4, 1, 1 },
- { 5, 5, 1 },
- { 6, 6, 1 },
- { 7, 9, 1 },
- { 8, 4, 1 },
- { 9, 2, 1 },
- { 10, 3, 1 },
- { 11, 6, 1 },
- { 12, 8, 2 },
- { 13, 1, 1 },
- { 14, 2, 1 },
- { 15, 3, 1 },
- { 16, 1, 1 },
- { 17, 4, 1 },
- { 18, 3, 1 },
- { 19, 1, 1 },
- { 20, 8, 1 },
- { 21, 5, 1 },
- { 22, 1, 1 },
- { 23, 1, 1 },
- { 24, 4, 1 },
- { 27, 6, 1 },
- { 28, 1, 1 },
- { 0xffffffff }
-};
-
-static const struct kv_lcac_config_reg sx0_cac_config_reg[] =
-{
- { 0xc0400d00, 0x003e0000, 17, 0x3fc00000, 22, 0x0001fffe, 1, 0x00000001, 0 }
-};
-
-static const struct kv_lcac_config_reg mc0_cac_config_reg[] =
-{
- { 0xc0400d30, 0x003e0000, 17, 0x3fc00000, 22, 0x0001fffe, 1, 0x00000001, 0 }
-};
-
-static const struct kv_lcac_config_reg mc1_cac_config_reg[] =
-{
- { 0xc0400d3c, 0x003e0000, 17, 0x3fc00000, 22, 0x0001fffe, 1, 0x00000001, 0 }
-};
-
-static const struct kv_lcac_config_reg mc2_cac_config_reg[] =
-{
- { 0xc0400d48, 0x003e0000, 17, 0x3fc00000, 22, 0x0001fffe, 1, 0x00000001, 0 }
-};
-
-static const struct kv_lcac_config_reg mc3_cac_config_reg[] =
-{
- { 0xc0400d54, 0x003e0000, 17, 0x3fc00000, 22, 0x0001fffe, 1, 0x00000001, 0 }
-};
-
-static const struct kv_lcac_config_reg cpl_cac_config_reg[] =
-{
- { 0xc0400d80, 0x003e0000, 17, 0x3fc00000, 22, 0x0001fffe, 1, 0x00000001, 0 }
-};
-
static const struct kv_pt_config_reg didt_config_kv[] =
{
{ 0x10, 0x000000ff, 0, 0x0, KV_CONFIGREG_DIDT_IND },
@@ -254,32 +155,6 @@ static struct kv_power_info *kv_get_pi(struct radeon_device *rdev)
return pi;
}
-#if 0
-static void kv_program_local_cac_table(struct radeon_device *rdev,
- const struct kv_lcac_config_values *local_cac_table,
- const struct kv_lcac_config_reg *local_cac_reg)
-{
- u32 i, count, data;
- const struct kv_lcac_config_values *values = local_cac_table;
-
- while (values->block_id != 0xffffffff) {
- count = values->signal_id;
- for (i = 0; i < count; i++) {
- data = ((values->block_id << local_cac_reg->block_shift) &
- local_cac_reg->block_mask);
- data |= ((i << local_cac_reg->signal_shift) &
- local_cac_reg->signal_mask);
- data |= ((values->t << local_cac_reg->t_shift) &
- local_cac_reg->t_mask);
- data |= ((1 << local_cac_reg->enable_shift) &
- local_cac_reg->enable_mask);
- WREG32_SMC(local_cac_reg->cntl, data);
- }
- values++;
- }
-}
-#endif
-
static int kv_program_pt_config_registers(struct radeon_device *rdev,
const struct kv_pt_config_reg *cac_config_regs)
{
@@ -398,39 +273,6 @@ static int kv_enable_didt(struct radeon_device *rdev, bool enable)
return 0;
}
-#if 0
-static void kv_initialize_hardware_cac_manager(struct radeon_device *rdev)
-{
- struct kv_power_info *pi = kv_get_pi(rdev);
-
- if (pi->caps_cac) {
- WREG32_SMC(LCAC_SX0_OVR_SEL, 0);
- WREG32_SMC(LCAC_SX0_OVR_VAL, 0);
- kv_program_local_cac_table(rdev, sx_local_cac_cfg_kv, sx0_cac_config_reg);
-
- WREG32_SMC(LCAC_MC0_OVR_SEL, 0);
- WREG32_SMC(LCAC_MC0_OVR_VAL, 0);
- kv_program_local_cac_table(rdev, mc0_local_cac_cfg_kv, mc0_cac_config_reg);
-
- WREG32_SMC(LCAC_MC1_OVR_SEL, 0);
- WREG32_SMC(LCAC_MC1_OVR_VAL, 0);
- kv_program_local_cac_table(rdev, mc1_local_cac_cfg_kv, mc1_cac_config_reg);
-
- WREG32_SMC(LCAC_MC2_OVR_SEL, 0);
- WREG32_SMC(LCAC_MC2_OVR_VAL, 0);
- kv_program_local_cac_table(rdev, mc2_local_cac_cfg_kv, mc2_cac_config_reg);
-
- WREG32_SMC(LCAC_MC3_OVR_SEL, 0);
- WREG32_SMC(LCAC_MC3_OVR_VAL, 0);
- kv_program_local_cac_table(rdev, mc3_local_cac_cfg_kv, mc3_cac_config_reg);
-
- WREG32_SMC(LCAC_CPL_OVR_SEL, 0);
- WREG32_SMC(LCAC_CPL_OVR_VAL, 0);
- kv_program_local_cac_table(rdev, cpl_local_cac_cfg_kv, cpl_cac_config_reg);
- }
-}
-#endif
-
static int kv_enable_smc_cac(struct radeon_device *rdev, bool enable)
{
struct kv_power_info *pi = kv_get_pi(rdev);
@@ -1227,9 +1069,7 @@ int kv_dpm_enable(struct radeon_device *rdev)
return ret;
}
kv_program_vc(rdev);
-#if 0
- kv_initialize_hardware_cac_manager(rdev);
-#endif
+
kv_start_am(rdev);
if (pi->enable_auto_thermal_throttling) {
ret = kv_enable_auto_thermal_throttling(rdev);
@@ -1330,26 +1170,6 @@ void kv_dpm_disable(struct radeon_device *rdev)
kv_update_current_ps(rdev, rdev->pm.dpm.boot_ps);
}
-#if 0
-static int kv_write_smc_soft_register(struct radeon_device *rdev,
- u16 reg_offset, u32 value)
-{
- struct kv_power_info *pi = kv_get_pi(rdev);
-
- return kv_copy_bytes_to_smc(rdev, pi->soft_regs_start + reg_offset,
- (u8 *)&value, sizeof(u16), pi->sram_end);
-}
-
-static int kv_read_smc_soft_register(struct radeon_device *rdev,
- u16 reg_offset, u32 *value)
-{
- struct kv_power_info *pi = kv_get_pi(rdev);
-
- return kv_read_smc_sram_dword(rdev, pi->soft_regs_start + reg_offset,
- value, pi->sram_end);
-}
-#endif
-
static void kv_init_sclk_t(struct radeon_device *rdev)
{
struct kv_power_info *pi = kv_get_pi(rdev);
@@ -1939,29 +1759,6 @@ void kv_dpm_setup_asic(struct radeon_device *rdev)
kv_init_sclk_t(rdev);
}
-#if 0
-void kv_dpm_reset_asic(struct radeon_device *rdev)
-{
- struct kv_power_info *pi = kv_get_pi(rdev);
-
- if (rdev->family == CHIP_KABINI || rdev->family == CHIP_MULLINS) {
- kv_force_lowest_valid(rdev);
- kv_init_graphics_levels(rdev);
- kv_program_bootup_state(rdev);
- kv_upload_dpm_settings(rdev);
- kv_force_lowest_valid(rdev);
- kv_unforce_levels(rdev);
- } else {
- kv_init_graphics_levels(rdev);
- kv_program_bootup_state(rdev);
- kv_freeze_sclk_dpm(rdev, true);
- kv_upload_dpm_settings(rdev);
- kv_freeze_sclk_dpm(rdev, false);
- kv_set_enabled_level(rdev, pi->graphics_boot_level);
- }
-}
-#endif
-
//XXX use sumo_dpm_display_configuration_changed
static void kv_construct_max_power_limits_table(struct radeon_device *rdev,
--
2.25.1
next prev parent reply other threads:[~2020-11-10 19:34 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 19:30 [PATCH 00/30] [Set 4] Rid W=1 warnings from GPU Lee Jones
2020-11-10 19:30 ` [PATCH 01/30] drm/radeon/evergreen: Add comment for 'evergreen_page_flip()'s 'async' param Lee Jones
2020-11-10 22:52 ` Alex Deucher
2020-11-11 7:16 ` Lee Jones
2020-11-10 19:30 ` [PATCH 02/30] drm/radeon/evergreen: Remove set but unused variable 'mc_shared_chmap' Lee Jones
2020-11-10 22:50 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 03/30] drm/radeon/ni: Demote vague attempt at function header doc Lee Jones
2020-11-10 23:32 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 04/30] drm/radeon/si: Remove set but unused variable 'mc_shared_chmap' Lee Jones
2020-11-10 22:53 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 05/30] drm/radeon/cik: " Lee Jones
2020-11-10 23:33 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 06/30] drm/radeon/trinity_dpm: Remove some defined but never used arrays Lee Jones
2020-11-10 23:38 ` Alex Deucher
2020-11-10 19:30 ` Lee Jones [this message]
2020-11-10 23:37 ` [PATCH 07/30] drm/radeon/kv_dpm: Strip out unused functions and their tables Alex Deucher
2020-11-10 19:30 ` [PATCH 08/30] drm/radeon/ci_dpm: Remove set but unused variable 'dpm_event_src' Lee Jones
2020-11-10 23:42 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 09/30] drm/radeon/radeon_vm: Fix some function parameter documentation Lee Jones
2020-11-10 23:36 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 10/30] drm/radeon/radeon_sync: Add description for function param 'rdev' Lee Jones
2020-11-10 23:40 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 11/30] drm/radeon/radeon_ib: Supply description for 'radeon_ib_get's get param Lee Jones
2020-11-10 23:41 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 12/30] drm/radeon/radeon_dp_mst: Remove unused variable 'ret' from radeon_mst_encoder_dpms() Lee Jones
2020-11-10 23:39 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 13/30] drm/radeon/radeon_mn: Supply description for 'cur_seq' even if it is unused Lee Jones
2020-11-10 23:52 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 14/30] drm/radeon/evergreen_dma: Fix doc-rot of function parameter 'resv' Lee Jones
2020-11-10 23:57 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 15/30] drm/radeon/cik_sdma: Demote vague attempt at kernel-doc Lee Jones
2020-11-10 23:56 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 16/30] drm/radeon/r100: Fix some kernel-doc formatting, misnaming and missing issues Lee Jones
2020-11-10 23:54 ` Alex Deucher
2020-11-10 19:30 ` [PATCH 17/30] drm/radeon/r600_cs: Fix some doc-rot and supply missing function param docs Lee Jones
2020-11-10 23:55 ` Alex Deucher
2020-11-10 19:31 ` [PATCH 18/30] drm/radeon/evergreen_cs: Fix misnaming issues surrounding 'p' param Lee Jones
2020-11-10 23:57 ` Alex Deucher
2020-11-10 19:31 ` [PATCH 19/30] drm/radeon/radeon_drv: Move 'radeon_mmap()'s prototype to shared header Lee Jones
2020-11-10 19:31 ` [PATCH 20/30] drm/radeon/radeon_drv: Move 'radeon_driver_irq_handler_kms's prototype into " Lee Jones
2020-11-10 19:31 ` [PATCH 21/30] drm/radeon/atom: Move 'radeon_atom_hw_i2c_*()'s prototypes " Lee Jones
2020-11-10 19:31 ` [PATCH 22/30] drm/radeon/radeon_gem: Move 'radeon_gem_prime_*()'s prototypes to " Lee Jones
2020-11-10 19:31 ` [PATCH 23/30] drm/radeon/evergreen_hdmi: Move 'evergreen_*()' and 'dce4_*()' HDMI " Lee Jones
2020-11-10 19:31 ` [PATCH 24/30] drm/radeon/rv770: Move 'rv770_get_*()'s " Lee Jones
2020-11-10 19:31 ` [PATCH 25/30] drm/radeon/sumo_dpm: Move 'sumo_get_pi()'s prototype into " Lee Jones
2020-11-11 0:05 ` Alex Deucher
2020-11-10 19:31 ` [PATCH 26/30] drm/radeon/ni_dpm: Move 'ni_get_{pi,ps}()'s " Lee Jones
2020-11-10 19:31 ` [PATCH 27/30] drm/radeon/ni: Remove set but unused variable 'mc_shared_chmap' Lee Jones
2020-11-11 0:03 ` Alex Deucher
2020-11-10 19:31 ` [PATCH 28/30] drm/radeon/evergreen: Move 'cayman_*()'s prototypes to shared header Lee Jones
2020-11-10 19:31 ` [PATCH 29/30] drm/radeon/r600_dma: Move 'r600_gpu_check_soft_reset()'s prototype to shared location Lee Jones
2020-11-10 19:31 ` [PATCH 30/30] drm/radeon/cik: Move 'r600_ih_ring_{alloc,fini}()'s prototypes to shared header Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201110193112.988999-8-lee.jones@linaro.org \
--to=lee.jones@linaro.org \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).