summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h
diff options
context:
space:
mode:
authorSathishkumar S <sathishkumar.sundararaju@amd.com>2025-01-28 23:57:03 +0530
committerAlex Deucher <alexander.deucher@amd.com>2025-02-12 21:03:01 -0500
commitdf996b5effda7d3b4525c78cd3fe375a224e734c (patch)
tree47dc08f1489cc360f9b7960a98d73ff8a21aab8c /drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h
parentb3dd2903b09c6ea1803af33fd9b90212fb89e4f4 (diff)
downloadlinux-df996b5effda7d3b4525c78cd3fe375a224e734c.tar.gz
linux-df996b5effda7d3b4525c78cd3fe375a224e734c.tar.bz2
linux-df996b5effda7d3b4525c78cd3fe375a224e734c.zip
drm/amdgpu: Add helper funcs for jpeg devcoredump
Add devcoredump helper functions that can be reused for all jpeg versions. V2: (Lijo) - add amdgpu_jpeg_reg_dump_init() and amdgpu_jpeg_reg_dump_fini() - use reg_list and reg_count from init() to dump and print registers - memory allocation and freeing is moved to the init() and fini() V3: (Lijo) - move amdgpu_jpeg_reg_dump_fini() to sw_fini() Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Acked-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h
index eb2096dcf1a6..4f0775e39b54 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h
@@ -92,6 +92,8 @@
*adev->jpeg.inst[inst_idx].dpg_sram_curr_addr++ = value; \
} while (0)
+struct amdgpu_hwip_reg_entry;
+
enum amdgpu_jpeg_caps {
AMDGPU_JPEG_RRMT_ENABLED,
};
@@ -137,6 +139,9 @@ struct amdgpu_jpeg {
bool indirect_sram;
uint32_t supported_reset;
uint32_t caps;
+ u32 *ip_dump;
+ u32 reg_count;
+ const struct amdgpu_hwip_reg_entry *reg_list;
};
int amdgpu_jpeg_sw_init(struct amdgpu_device *adev);
@@ -161,5 +166,9 @@ int amdgpu_jpeg_psp_update_sram(struct amdgpu_device *adev, int inst_idx,
void amdgpu_debugfs_jpeg_sched_mask_init(struct amdgpu_device *adev);
int amdgpu_jpeg_sysfs_reset_mask_init(struct amdgpu_device *adev);
void amdgpu_jpeg_sysfs_reset_mask_fini(struct amdgpu_device *adev);
+int amdgpu_jpeg_reg_dump_init(struct amdgpu_device *adev,
+ const struct amdgpu_hwip_reg_entry *reg, u32 count);
+void amdgpu_jpeg_dump_ip_state(struct amdgpu_ip_block *ip_block);
+void amdgpu_jpeg_print_ip_state(struct amdgpu_ip_block *ip_block, struct drm_printer *p);
#endif /*__AMDGPU_JPEG_H__*/