mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
drm/amdgpu: update the handle ptr in dump_ip_state
Update the ptr handle to amdgpu_ip_block ptr in all the functions. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
94daae9744
commit
fa73462dc0
@@ -5358,7 +5358,7 @@ int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev,
|
||||
for (i = 0; i < tmp_adev->num_ip_blocks; i++)
|
||||
if (tmp_adev->ip_blocks[i].version->funcs->dump_ip_state)
|
||||
tmp_adev->ip_blocks[i].version->funcs
|
||||
->dump_ip_state((void *)tmp_adev);
|
||||
->dump_ip_state((void *)&tmp_adev->ip_blocks[i]);
|
||||
dev_info(tmp_adev->dev, "Dumping IP State Completed\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ static void amdgpu_job_do_core_dump(struct amdgpu_device *adev,
|
||||
for (i = 0; i < adev->num_ip_blocks; i++)
|
||||
if (adev->ip_blocks[i].version->funcs->dump_ip_state)
|
||||
adev->ip_blocks[i].version->funcs
|
||||
->dump_ip_state((void *)adev);
|
||||
->dump_ip_state((void *)&adev->ip_blocks[i]);
|
||||
dev_info(adev->dev, "Dumping IP State Completed\n");
|
||||
|
||||
amdgpu_coredump(adev, true, false, job);
|
||||
|
||||
@@ -9632,9 +9632,9 @@ static void gfx_v10_ip_print(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_v10_ip_dump(void *handle)
|
||||
static void gfx_v10_ip_dump(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
uint32_t i, j, k, reg, index = 0;
|
||||
uint32_t reg_count = ARRAY_SIZE(gc_reg_list_10_1);
|
||||
|
||||
|
||||
@@ -6705,9 +6705,9 @@ static void gfx_v11_ip_print(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_v11_ip_dump(void *handle)
|
||||
static void gfx_v11_ip_dump(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
uint32_t i, j, k, reg, index = 0;
|
||||
uint32_t reg_count = ARRAY_SIZE(gc_reg_list_11_0);
|
||||
|
||||
|
||||
@@ -5102,9 +5102,9 @@ static void gfx_v12_ip_print(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_v12_ip_dump(void *handle)
|
||||
static void gfx_v12_ip_dump(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
uint32_t i, j, k, reg, index = 0;
|
||||
uint32_t reg_count = ARRAY_SIZE(gc_reg_list_12_0);
|
||||
|
||||
|
||||
@@ -7377,9 +7377,9 @@ static void gfx_v9_ip_print(void *handle, struct drm_printer *p)
|
||||
|
||||
}
|
||||
|
||||
static void gfx_v9_ip_dump(void *handle)
|
||||
static void gfx_v9_ip_dump(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
uint32_t i, j, k, reg, index = 0;
|
||||
uint32_t reg_count = ARRAY_SIZE(gc_reg_list_9);
|
||||
|
||||
|
||||
@@ -4645,9 +4645,9 @@ static void gfx_v9_4_3_ip_print(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_v9_4_3_ip_dump(void *handle)
|
||||
static void gfx_v9_4_3_ip_dump(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
uint32_t i, j, k;
|
||||
uint32_t num_xcc, reg, num_inst;
|
||||
uint32_t xcc_id, xcc_offset, inst_offset;
|
||||
|
||||
@@ -2371,9 +2371,9 @@ static void sdma_v4_0_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void sdma_v4_0_dump_ip_state(void *handle)
|
||||
static void sdma_v4_0_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
uint32_t instance_offset;
|
||||
uint32_t reg_count = ARRAY_SIZE(sdma_reg_list_4_0);
|
||||
|
||||
@@ -1878,9 +1878,9 @@ static void sdma_v4_4_2_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void sdma_v4_4_2_dump_ip_state(void *handle)
|
||||
static void sdma_v4_4_2_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
uint32_t instance_offset;
|
||||
uint32_t reg_count = ARRAY_SIZE(sdma_reg_list_4_4_2);
|
||||
|
||||
@@ -1822,9 +1822,9 @@ static void sdma_v5_0_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void sdma_v5_0_dump_ip_state(void *handle)
|
||||
static void sdma_v5_0_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
uint32_t instance_offset;
|
||||
uint32_t reg_count = ARRAY_SIZE(sdma_reg_list_5_0);
|
||||
|
||||
@@ -1757,9 +1757,9 @@ static void sdma_v5_2_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void sdma_v5_2_dump_ip_state(void *handle)
|
||||
static void sdma_v5_2_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
uint32_t instance_offset;
|
||||
uint32_t reg_count = ARRAY_SIZE(sdma_reg_list_5_2);
|
||||
|
||||
@@ -1624,9 +1624,9 @@ static void sdma_v6_0_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void sdma_v6_0_dump_ip_state(void *handle)
|
||||
static void sdma_v6_0_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
uint32_t instance_offset;
|
||||
uint32_t reg_count = ARRAY_SIZE(sdma_reg_list_6_0);
|
||||
|
||||
@@ -1559,9 +1559,9 @@ static void sdma_v7_0_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void sdma_v7_0_dump_ip_state(void *handle)
|
||||
static void sdma_v7_0_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
uint32_t instance_offset;
|
||||
uint32_t reg_count = ARRAY_SIZE(sdma_reg_list_7_0);
|
||||
|
||||
@@ -1957,9 +1957,9 @@ static void vcn_v1_0_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void vcn_v1_0_dump_ip_state(void *handle)
|
||||
static void vcn_v1_0_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
bool is_powered;
|
||||
uint32_t inst_off;
|
||||
|
||||
@@ -2066,9 +2066,9 @@ static void vcn_v2_0_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void vcn_v2_0_dump_ip_state(void *handle)
|
||||
static void vcn_v2_0_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
bool is_powered;
|
||||
uint32_t inst_off;
|
||||
|
||||
@@ -1958,9 +1958,9 @@ static void vcn_v2_5_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void vcn_v2_5_dump_ip_state(void *handle)
|
||||
static void vcn_v2_5_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
bool is_powered;
|
||||
uint32_t inst_off;
|
||||
|
||||
@@ -2284,9 +2284,9 @@ static void vcn_v3_0_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void vcn_v3_0_dump_ip_state(void *handle)
|
||||
static void vcn_v3_0_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
bool is_powered;
|
||||
uint32_t inst_off;
|
||||
|
||||
@@ -2190,9 +2190,9 @@ static void vcn_v4_0_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void vcn_v4_0_dump_ip_state(void *handle)
|
||||
static void vcn_v4_0_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
bool is_powered;
|
||||
uint32_t inst_off;
|
||||
|
||||
@@ -1765,9 +1765,9 @@ static void vcn_v4_0_3_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void vcn_v4_0_3_dump_ip_state(void *handle)
|
||||
static void vcn_v4_0_3_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
bool is_powered;
|
||||
uint32_t inst_off, inst_id;
|
||||
|
||||
@@ -1648,9 +1648,9 @@ static void vcn_v4_0_5_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void vcn_v4_0_5_dump_ip_state(void *handle)
|
||||
static void vcn_v4_0_5_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
bool is_powered;
|
||||
uint32_t inst_off;
|
||||
|
||||
@@ -1375,9 +1375,9 @@ static void vcn_v5_0_print_ip_state(void *handle, struct drm_printer *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void vcn_v5_0_dump_ip_state(void *handle)
|
||||
static void vcn_v5_0_dump_ip_state(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
int i, j;
|
||||
bool is_powered;
|
||||
uint32_t inst_off;
|
||||
|
||||
@@ -375,6 +375,8 @@ enum amd_dpm_forced_level;
|
||||
* making calls to hooks from each IP block. This list is ordered to ensure
|
||||
* that the driver initializes the IP blocks in a safe sequence.
|
||||
*/
|
||||
struct amdgpu_ip_block;
|
||||
|
||||
struct amd_ip_funcs {
|
||||
char *name;
|
||||
int (*early_init)(void *handle);
|
||||
@@ -399,7 +401,7 @@ struct amd_ip_funcs {
|
||||
int (*set_powergating_state)(void *handle,
|
||||
enum amd_powergating_state state);
|
||||
void (*get_clockgating_state)(void *handle, u64 *flags);
|
||||
void (*dump_ip_state)(void *handle);
|
||||
void (*dump_ip_state)(struct amdgpu_ip_block *ip_block);
|
||||
void (*print_ip_state)(void *handle, struct drm_printer *p);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user