mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
drm/amdgpu: expand cg_flags from u32 to u64
With this, we can support more CG flags. Signed-off-by: Evan Quan <evan.quan@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
49aa98ca30
commit
25faeddcf3
53 changed files with 95 additions and 92 deletions
|
@ -179,7 +179,7 @@ extern int amdgpu_sched_jobs;
|
|||
extern int amdgpu_sched_hw_submission;
|
||||
extern uint amdgpu_pcie_gen_cap;
|
||||
extern uint amdgpu_pcie_lane_cap;
|
||||
extern uint amdgpu_cg_mask;
|
||||
extern u64 amdgpu_cg_mask;
|
||||
extern uint amdgpu_pg_mask;
|
||||
extern uint amdgpu_sdma_phase_quantum;
|
||||
extern char *amdgpu_disable_cu;
|
||||
|
@ -322,7 +322,7 @@ int amdgpu_device_ip_set_powergating_state(void *dev,
|
|||
enum amd_ip_block_type block_type,
|
||||
enum amd_powergating_state state);
|
||||
void amdgpu_device_ip_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags);
|
||||
u64 *flags);
|
||||
int amdgpu_device_ip_wait_for_idle(struct amdgpu_device *adev,
|
||||
enum amd_ip_block_type block_type);
|
||||
bool amdgpu_device_ip_is_idle(struct amdgpu_device *adev,
|
||||
|
@ -860,7 +860,7 @@ struct amdgpu_device {
|
|||
/* powerplay */
|
||||
struct amd_powerplay powerplay;
|
||||
struct amdgpu_pm pm;
|
||||
u32 cg_flags;
|
||||
u64 cg_flags;
|
||||
u32 pg_flags;
|
||||
|
||||
/* nbio */
|
||||
|
|
|
@ -758,7 +758,7 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
|
|||
/* rev==1 */
|
||||
config[no_regs++] = adev->rev_id;
|
||||
config[no_regs++] = adev->pg_flags;
|
||||
config[no_regs++] = adev->cg_flags;
|
||||
config[no_regs++] = lower_32_bits(adev->cg_flags);
|
||||
|
||||
/* rev==2 */
|
||||
config[no_regs++] = adev->family;
|
||||
|
@ -773,6 +773,9 @@ static ssize_t amdgpu_debugfs_gca_config_read(struct file *f, char __user *buf,
|
|||
/* rev==4 APU flag */
|
||||
config[no_regs++] = adev->flags & AMD_IS_APU ? 1 : 0;
|
||||
|
||||
/* rev==5 CG flag upper 32bit */
|
||||
config[no_regs++] = upper_32_bits(adev->cg_flags);
|
||||
|
||||
while (size && (*pos < no_regs * 4)) {
|
||||
uint32_t value;
|
||||
|
||||
|
|
|
@ -1703,7 +1703,7 @@ int amdgpu_device_ip_set_powergating_state(void *dev,
|
|||
* clockgating is enabled.
|
||||
*/
|
||||
void amdgpu_device_ip_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags)
|
||||
u64 *flags)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ struct amdgpu_df_funcs {
|
|||
void (*update_medium_grain_clock_gating)(struct amdgpu_device *adev,
|
||||
bool enable);
|
||||
void (*get_clockgating_state)(struct amdgpu_device *adev,
|
||||
u32 *flags);
|
||||
u64 *flags);
|
||||
void (*enable_ecc_force_par_wr_rmw)(struct amdgpu_device *adev,
|
||||
bool enable);
|
||||
int (*pmc_start)(struct amdgpu_device *adev, uint64_t config,
|
||||
|
|
|
@ -136,7 +136,7 @@ int amdgpu_sched_jobs = 32;
|
|||
int amdgpu_sched_hw_submission = 2;
|
||||
uint amdgpu_pcie_gen_cap;
|
||||
uint amdgpu_pcie_lane_cap;
|
||||
uint amdgpu_cg_mask = 0xffffffff;
|
||||
u64 amdgpu_cg_mask = 0xffffffffffffffff;
|
||||
uint amdgpu_pg_mask = 0xffffffff;
|
||||
uint amdgpu_sdma_phase_quantum = 32;
|
||||
char *amdgpu_disable_cu = NULL;
|
||||
|
@ -454,12 +454,12 @@ MODULE_PARM_DESC(pcie_lane_cap, "PCIE Lane Caps (0: autodetect (default))");
|
|||
module_param_named(pcie_lane_cap, amdgpu_pcie_lane_cap, uint, 0444);
|
||||
|
||||
/**
|
||||
* DOC: cg_mask (uint)
|
||||
* DOC: cg_mask (ullong)
|
||||
* Override Clockgating features enabled on GPU (0 = disable clock gating). See the AMD_CG_SUPPORT flags in
|
||||
* drivers/gpu/drm/amd/include/amd_shared.h. The default is 0xffffffff (all enabled).
|
||||
* drivers/gpu/drm/amd/include/amd_shared.h. The default is 0xffffffffffffffff (all enabled).
|
||||
*/
|
||||
MODULE_PARM_DESC(cg_mask, "Clockgating flags mask (0 = disable clock gating)");
|
||||
module_param_named(cg_mask, amdgpu_cg_mask, uint, 0444);
|
||||
module_param_named(cg_mask, amdgpu_cg_mask, ullong, 0444);
|
||||
|
||||
/**
|
||||
* DOC: pg_mask (uint)
|
||||
|
|
|
@ -33,7 +33,7 @@ struct amdgpu_hdp_funcs {
|
|||
void (*invalidate_hdp)(struct amdgpu_device *adev,
|
||||
struct amdgpu_ring *ring);
|
||||
void (*update_clock_gating)(struct amdgpu_device *adev, bool enable);
|
||||
void (*get_clock_gating_state)(struct amdgpu_device *adev, u32 *flags);
|
||||
void (*get_clock_gating_state)(struct amdgpu_device *adev, u64 *flags);
|
||||
void (*init_registers)(struct amdgpu_device *adev);
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ struct amdgpu_mmhub_funcs {
|
|||
void (*gart_disable)(struct amdgpu_device *adev);
|
||||
int (*set_clockgating)(struct amdgpu_device *adev,
|
||||
enum amd_clockgating_state state);
|
||||
void (*get_clockgating)(struct amdgpu_device *adev, u32 *flags);
|
||||
void (*get_clockgating)(struct amdgpu_device *adev, u64 *flags);
|
||||
void (*setup_vm_pt_regs)(struct amdgpu_device *adev, uint32_t vmid,
|
||||
uint64_t page_table_base);
|
||||
void (*update_power_gating)(struct amdgpu_device *adev,
|
||||
|
|
|
@ -83,7 +83,7 @@ struct amdgpu_nbio_funcs {
|
|||
void (*update_medium_grain_light_sleep)(struct amdgpu_device *adev,
|
||||
bool enable);
|
||||
void (*get_clockgating_state)(struct amdgpu_device *adev,
|
||||
u32 *flags);
|
||||
u64 *flags);
|
||||
void (*ih_control)(struct amdgpu_device *adev);
|
||||
void (*init_registers)(struct amdgpu_device *adev);
|
||||
void (*remap_hdp_registers)(struct amdgpu_device *adev);
|
||||
|
|
|
@ -27,7 +27,7 @@ struct amdgpu_smuio_funcs {
|
|||
u32 (*get_rom_index_offset)(struct amdgpu_device *adev);
|
||||
u32 (*get_rom_data_offset)(struct amdgpu_device *adev);
|
||||
void (*update_rom_clock_gating)(struct amdgpu_device *adev, bool enable);
|
||||
void (*get_clock_gating_state)(struct amdgpu_device *adev, u32 *flags);
|
||||
void (*get_clock_gating_state)(struct amdgpu_device *adev, u64 *flags);
|
||||
u32 (*get_die_id)(struct amdgpu_device *adev);
|
||||
u32 (*get_socket_id)(struct amdgpu_device *adev);
|
||||
bool (*is_host_gpu_xgmi_supported)(struct amdgpu_device *adev);
|
||||
|
|
|
@ -87,7 +87,7 @@ int athub_v1_0_set_clockgating(struct amdgpu_device *adev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void athub_v1_0_get_clockgating(struct amdgpu_device *adev, u32 *flags)
|
||||
void athub_v1_0_get_clockgating(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
int data;
|
||||
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
|
||||
int athub_v1_0_set_clockgating(struct amdgpu_device *adev,
|
||||
enum amd_clockgating_state state);
|
||||
void athub_v1_0_get_clockgating(struct amdgpu_device *adev, u32 *flags);
|
||||
void athub_v1_0_get_clockgating(struct amdgpu_device *adev, u64 *flags);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -93,7 +93,7 @@ int athub_v2_0_set_clockgating(struct amdgpu_device *adev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void athub_v2_0_get_clockgating(struct amdgpu_device *adev, u32 *flags)
|
||||
void athub_v2_0_get_clockgating(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
int data;
|
||||
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
|
||||
int athub_v2_0_set_clockgating(struct amdgpu_device *adev,
|
||||
enum amd_clockgating_state state);
|
||||
void athub_v2_0_get_clockgating(struct amdgpu_device *adev, u32 *flags);
|
||||
void athub_v2_0_get_clockgating(struct amdgpu_device *adev, u64 *flags);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -85,7 +85,7 @@ int athub_v2_1_set_clockgating(struct amdgpu_device *adev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void athub_v2_1_get_clockgating(struct amdgpu_device *adev, u32 *flags)
|
||||
void athub_v2_1_get_clockgating(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
int data;
|
||||
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
|
||||
int athub_v2_1_set_clockgating(struct amdgpu_device *adev,
|
||||
enum amd_clockgating_state state);
|
||||
void athub_v2_1_get_clockgating(struct amdgpu_device *adev, u32 *flags);
|
||||
void athub_v2_1_get_clockgating(struct amdgpu_device *adev, u64 *flags);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -99,7 +99,7 @@ static void df_v1_7_update_medium_grain_clock_gating(struct amdgpu_device *adev,
|
|||
}
|
||||
|
||||
static void df_v1_7_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags)
|
||||
u64 *flags)
|
||||
{
|
||||
u32 tmp;
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@ static void df_v3_6_update_medium_grain_clock_gating(struct amdgpu_device *adev,
|
|||
}
|
||||
|
||||
static void df_v3_6_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags)
|
||||
u64 *flags)
|
||||
{
|
||||
u32 tmp;
|
||||
|
||||
|
|
|
@ -8451,7 +8451,7 @@ static int gfx_v10_0_set_clockgating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void gfx_v10_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void gfx_v10_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -5475,7 +5475,7 @@ static int gfx_v8_0_set_powergating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void gfx_v8_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void gfx_v8_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -5233,7 +5233,7 @@ static int gfx_v9_0_set_clockgating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void gfx_v9_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void gfx_v9_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -1161,7 +1161,7 @@ static int gmc_v10_0_set_clockgating_state(void *handle,
|
|||
return athub_v2_0_set_clockgating(adev, state);
|
||||
}
|
||||
|
||||
static void gmc_v10_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void gmc_v10_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
|
||||
|
|
|
@ -1690,7 +1690,7 @@ static int gmc_v8_0_set_powergating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void gmc_v8_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void gmc_v8_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -1948,7 +1948,7 @@ static int gmc_v9_0_set_clockgating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void gmc_v9_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void gmc_v9_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ static void hdp_v4_0_update_clock_gating(struct amdgpu_device *adev,
|
|||
}
|
||||
|
||||
static void hdp_v4_0_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags)
|
||||
u64 *flags)
|
||||
{
|
||||
int data;
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ static void hdp_v5_0_update_clock_gating(struct amdgpu_device *adev,
|
|||
}
|
||||
|
||||
static void hdp_v5_0_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags)
|
||||
u64 *flags)
|
||||
{
|
||||
uint32_t tmp;
|
||||
|
||||
|
|
|
@ -546,7 +546,7 @@ static int mmhub_v1_0_set_clockgating(struct amdgpu_device *adev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void mmhub_v1_0_get_clockgating(struct amdgpu_device *adev, u32 *flags)
|
||||
static void mmhub_v1_0_get_clockgating(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
int data, data1;
|
||||
|
||||
|
|
|
@ -542,7 +542,7 @@ static int mmhub_v1_7_set_clockgating(struct amdgpu_device *adev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void mmhub_v1_7_get_clockgating(struct amdgpu_device *adev, u32 *flags)
|
||||
static void mmhub_v1_7_get_clockgating(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
int data, data1;
|
||||
|
||||
|
|
|
@ -682,7 +682,7 @@ static int mmhub_v2_0_set_clockgating(struct amdgpu_device *adev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void mmhub_v2_0_get_clockgating(struct amdgpu_device *adev, u32 *flags)
|
||||
static void mmhub_v2_0_get_clockgating(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
int data, data1;
|
||||
|
||||
|
|
|
@ -577,7 +577,7 @@ static int mmhub_v2_3_set_clockgating(struct amdgpu_device *adev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void mmhub_v2_3_get_clockgating(struct amdgpu_device *adev, u32 *flags)
|
||||
static void mmhub_v2_3_get_clockgating(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
int data, data1, data2, data3;
|
||||
|
||||
|
|
|
@ -647,7 +647,7 @@ static int mmhub_v9_4_set_clockgating(struct amdgpu_device *adev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void mmhub_v9_4_get_clockgating(struct amdgpu_device *adev, u32 *flags)
|
||||
static void mmhub_v9_4_get_clockgating(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
int data, data1;
|
||||
|
||||
|
|
|
@ -685,7 +685,7 @@ static int navi10_ih_set_powergating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void navi10_ih_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void navi10_ih_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ static void nbio_v2_3_update_medium_grain_light_sleep(struct amdgpu_device *adev
|
|||
}
|
||||
|
||||
static void nbio_v2_3_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags)
|
||||
u64 *flags)
|
||||
{
|
||||
int data;
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ static void nbio_v6_1_update_medium_grain_light_sleep(struct amdgpu_device *adev
|
|||
}
|
||||
|
||||
static void nbio_v6_1_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags)
|
||||
u64 *flags)
|
||||
{
|
||||
int data;
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ static void nbio_v7_0_update_medium_grain_light_sleep(struct amdgpu_device *adev
|
|||
}
|
||||
|
||||
static void nbio_v7_0_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags)
|
||||
u64 *flags)
|
||||
{
|
||||
int data;
|
||||
|
||||
|
|
|
@ -306,7 +306,7 @@ static void nbio_v7_2_update_medium_grain_light_sleep(struct amdgpu_device *adev
|
|||
}
|
||||
|
||||
static void nbio_v7_2_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags)
|
||||
u64 *flags)
|
||||
{
|
||||
int data;
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ static void nbio_v7_4_update_medium_grain_light_sleep(struct amdgpu_device *adev
|
|||
}
|
||||
|
||||
static void nbio_v7_4_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u32 *flags)
|
||||
u64 *flags)
|
||||
{
|
||||
int data;
|
||||
|
||||
|
|
|
@ -1115,7 +1115,7 @@ static int nv_common_set_powergating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void nv_common_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void nv_common_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
|
||||
|
|
|
@ -1535,7 +1535,7 @@ static int sdma_v3_0_set_powergating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void sdma_v3_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void sdma_v3_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -2372,7 +2372,7 @@ static int sdma_v4_0_set_powergating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void sdma_v4_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void sdma_v4_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -1648,7 +1648,7 @@ static int sdma_v5_0_set_powergating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void sdma_v5_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void sdma_v5_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -1645,7 +1645,7 @@ static int sdma_v5_2_set_powergating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void sdma_v5_2_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void sdma_v5_2_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -59,7 +59,7 @@ static void smuio_v11_0_update_rom_clock_gating(struct amdgpu_device *adev, bool
|
|||
WREG32_SOC15(SMUIO, 0, mmCGTT_ROM_CLK_CTRL0, data);
|
||||
}
|
||||
|
||||
static void smuio_v11_0_get_clock_gating_state(struct amdgpu_device *adev, u32 *flags)
|
||||
static void smuio_v11_0_get_clock_gating_state(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
u32 data;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ static void smuio_v11_0_6_update_rom_clock_gating(struct amdgpu_device *adev, bo
|
|||
WREG32_SOC15(SMUIO, 0, mmCGTT_ROM_CLK_CTRL0, data);
|
||||
}
|
||||
|
||||
static void smuio_v11_0_6_get_clock_gating_state(struct amdgpu_device *adev, u32 *flags)
|
||||
static void smuio_v11_0_6_get_clock_gating_state(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
u32 data;
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ static void smuio_v13_0_update_rom_clock_gating(struct amdgpu_device *adev, bool
|
|||
WREG32_SOC15(SMUIO, 0, regCGTT_ROM_CLK_CTRL0, data);
|
||||
}
|
||||
|
||||
static void smuio_v13_0_get_clock_gating_state(struct amdgpu_device *adev, u32 *flags)
|
||||
static void smuio_v13_0_get_clock_gating_state(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
u32 data;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ static void smuio_v9_0_update_rom_clock_gating(struct amdgpu_device *adev, bool
|
|||
WREG32_SOC15(SMUIO, 0, mmCGTT_ROM_CLK_CTRL0, data);
|
||||
}
|
||||
|
||||
static void smuio_v9_0_get_clock_gating_state(struct amdgpu_device *adev, u32 *flags)
|
||||
static void smuio_v9_0_get_clock_gating_state(struct amdgpu_device *adev, u64 *flags)
|
||||
{
|
||||
u32 data;
|
||||
|
||||
|
|
|
@ -1419,7 +1419,7 @@ static int soc15_common_set_clockgating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void soc15_common_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void soc15_common_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -833,7 +833,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void uvd_v5_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void uvd_v5_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -1494,7 +1494,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void uvd_v6_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void uvd_v6_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -831,7 +831,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void vce_v3_0_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void vce_v3_0_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -2033,7 +2033,7 @@ static int vi_common_set_powergating_state(void *handle,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void vi_common_get_clockgating_state(void *handle, u32 *flags)
|
||||
static void vi_common_get_clockgating_state(void *handle, u64 *flags)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
int data;
|
||||
|
|
|
@ -116,38 +116,38 @@ enum amd_powergating_state {
|
|||
|
||||
|
||||
/* CG flags */
|
||||
#define AMD_CG_SUPPORT_GFX_MGCG (1 << 0)
|
||||
#define AMD_CG_SUPPORT_GFX_MGLS (1 << 1)
|
||||
#define AMD_CG_SUPPORT_GFX_CGCG (1 << 2)
|
||||
#define AMD_CG_SUPPORT_GFX_CGLS (1 << 3)
|
||||
#define AMD_CG_SUPPORT_GFX_CGTS (1 << 4)
|
||||
#define AMD_CG_SUPPORT_GFX_CGTS_LS (1 << 5)
|
||||
#define AMD_CG_SUPPORT_GFX_CP_LS (1 << 6)
|
||||
#define AMD_CG_SUPPORT_GFX_RLC_LS (1 << 7)
|
||||
#define AMD_CG_SUPPORT_MC_LS (1 << 8)
|
||||
#define AMD_CG_SUPPORT_MC_MGCG (1 << 9)
|
||||
#define AMD_CG_SUPPORT_SDMA_LS (1 << 10)
|
||||
#define AMD_CG_SUPPORT_SDMA_MGCG (1 << 11)
|
||||
#define AMD_CG_SUPPORT_BIF_LS (1 << 12)
|
||||
#define AMD_CG_SUPPORT_UVD_MGCG (1 << 13)
|
||||
#define AMD_CG_SUPPORT_VCE_MGCG (1 << 14)
|
||||
#define AMD_CG_SUPPORT_HDP_LS (1 << 15)
|
||||
#define AMD_CG_SUPPORT_HDP_MGCG (1 << 16)
|
||||
#define AMD_CG_SUPPORT_ROM_MGCG (1 << 17)
|
||||
#define AMD_CG_SUPPORT_DRM_LS (1 << 18)
|
||||
#define AMD_CG_SUPPORT_BIF_MGCG (1 << 19)
|
||||
#define AMD_CG_SUPPORT_GFX_3D_CGCG (1 << 20)
|
||||
#define AMD_CG_SUPPORT_GFX_3D_CGLS (1 << 21)
|
||||
#define AMD_CG_SUPPORT_DRM_MGCG (1 << 22)
|
||||
#define AMD_CG_SUPPORT_DF_MGCG (1 << 23)
|
||||
#define AMD_CG_SUPPORT_VCN_MGCG (1 << 24)
|
||||
#define AMD_CG_SUPPORT_HDP_DS (1 << 25)
|
||||
#define AMD_CG_SUPPORT_HDP_SD (1 << 26)
|
||||
#define AMD_CG_SUPPORT_IH_CG (1 << 27)
|
||||
#define AMD_CG_SUPPORT_ATHUB_LS (1 << 28)
|
||||
#define AMD_CG_SUPPORT_ATHUB_MGCG (1 << 29)
|
||||
#define AMD_CG_SUPPORT_JPEG_MGCG (1 << 30)
|
||||
#define AMD_CG_SUPPORT_GFX_FGCG (1 << 31)
|
||||
#define AMD_CG_SUPPORT_GFX_MGCG (1ULL << 0)
|
||||
#define AMD_CG_SUPPORT_GFX_MGLS (1ULL << 1)
|
||||
#define AMD_CG_SUPPORT_GFX_CGCG (1ULL << 2)
|
||||
#define AMD_CG_SUPPORT_GFX_CGLS (1ULL << 3)
|
||||
#define AMD_CG_SUPPORT_GFX_CGTS (1ULL << 4)
|
||||
#define AMD_CG_SUPPORT_GFX_CGTS_LS (1ULL << 5)
|
||||
#define AMD_CG_SUPPORT_GFX_CP_LS (1ULL << 6)
|
||||
#define AMD_CG_SUPPORT_GFX_RLC_LS (1ULL << 7)
|
||||
#define AMD_CG_SUPPORT_MC_LS (1ULL << 8)
|
||||
#define AMD_CG_SUPPORT_MC_MGCG (1ULL << 9)
|
||||
#define AMD_CG_SUPPORT_SDMA_LS (1ULL << 10)
|
||||
#define AMD_CG_SUPPORT_SDMA_MGCG (1ULL << 11)
|
||||
#define AMD_CG_SUPPORT_BIF_LS (1ULL << 12)
|
||||
#define AMD_CG_SUPPORT_UVD_MGCG (1ULL << 13)
|
||||
#define AMD_CG_SUPPORT_VCE_MGCG (1ULL << 14)
|
||||
#define AMD_CG_SUPPORT_HDP_LS (1ULL << 15)
|
||||
#define AMD_CG_SUPPORT_HDP_MGCG (1ULL << 16)
|
||||
#define AMD_CG_SUPPORT_ROM_MGCG (1ULL << 17)
|
||||
#define AMD_CG_SUPPORT_DRM_LS (1ULL << 18)
|
||||
#define AMD_CG_SUPPORT_BIF_MGCG (1ULL << 19)
|
||||
#define AMD_CG_SUPPORT_GFX_3D_CGCG (1ULL << 20)
|
||||
#define AMD_CG_SUPPORT_GFX_3D_CGLS (1ULL << 21)
|
||||
#define AMD_CG_SUPPORT_DRM_MGCG (1ULL << 22)
|
||||
#define AMD_CG_SUPPORT_DF_MGCG (1ULL << 23)
|
||||
#define AMD_CG_SUPPORT_VCN_MGCG (1ULL << 24)
|
||||
#define AMD_CG_SUPPORT_HDP_DS (1ULL << 25)
|
||||
#define AMD_CG_SUPPORT_HDP_SD (1ULL << 26)
|
||||
#define AMD_CG_SUPPORT_IH_CG (1ULL << 27)
|
||||
#define AMD_CG_SUPPORT_ATHUB_LS (1ULL << 28)
|
||||
#define AMD_CG_SUPPORT_ATHUB_MGCG (1ULL << 29)
|
||||
#define AMD_CG_SUPPORT_JPEG_MGCG (1ULL << 30)
|
||||
#define AMD_CG_SUPPORT_GFX_FGCG (1ULL << 31)
|
||||
/* PG flags */
|
||||
#define AMD_PG_SUPPORT_GFX_PG (1 << 0)
|
||||
#define AMD_PG_SUPPORT_GFX_SMG (1 << 1)
|
||||
|
@ -298,7 +298,7 @@ struct amd_ip_funcs {
|
|||
enum amd_clockgating_state state);
|
||||
int (*set_powergating_state)(void *handle,
|
||||
enum amd_powergating_state state);
|
||||
void (*get_clockgating_state)(void *handle, u32 *flags);
|
||||
void (*get_clockgating_state)(void *handle, u64 *flags);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -3526,7 +3526,7 @@ static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *a
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void amdgpu_parse_cg_state(struct seq_file *m, u32 flags)
|
||||
static void amdgpu_parse_cg_state(struct seq_file *m, u64 flags)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -3539,7 +3539,7 @@ static int amdgpu_debugfs_pm_info_show(struct seq_file *m, void *unused)
|
|||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)m->private;
|
||||
struct drm_device *dev = adev_to_drm(adev);
|
||||
u32 flags = 0;
|
||||
u64 flags = 0;
|
||||
int r;
|
||||
|
||||
if (amdgpu_in_reset(adev))
|
||||
|
@ -3561,7 +3561,7 @@ static int amdgpu_debugfs_pm_info_show(struct seq_file *m, void *unused)
|
|||
|
||||
amdgpu_device_ip_get_clockgating_state(adev, &flags);
|
||||
|
||||
seq_printf(m, "Clock Gating Flags Mask: 0x%x\n", flags);
|
||||
seq_printf(m, "Clock Gating Flags Mask: 0x%llx\n", flags);
|
||||
amdgpu_parse_cg_state(m, flags);
|
||||
seq_printf(m, "\n");
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
struct cg_flag_name
|
||||
{
|
||||
u32 flag;
|
||||
u64 flag;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue