drm/amd/display: refine code for dmcub inbox1 ring buffer debug
authorFudongwang <fudong.wang@amd.com>
Wed, 17 Jan 2024 11:13:46 +0000 (19:13 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Jan 2024 20:42:43 +0000 (15:42 -0500)
[Why]
1. To watch dmcub inbox1 ring buffer cmd type without tools
2. dmub_cmd_PLAT_54186_wa 66 bytes

[How]
Added dmcub cmd type enum: unsigned char for debug use only,
also fixed 66 bytes issue by using unsigned int in bit
define instead of unsigned char.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Fudongwang <fudong.wang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dmub/dmub_srv.h
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h

index 4104206..0684a0b 100644 (file)
@@ -78,10 +78,6 @@ struct dmub_srv_dcn31_regs;
 
 struct dmcub_trace_buf_entry;
 
-struct dmcub_inbox1_buf {
-       union dmub_rb_cmd cmd[DMUB_RB_MAX_ENTRY];
-};
-
 /* enum dmub_window_memory_type - memory location type specification for windows */
 enum dmub_window_memory_type {
        DMUB_WINDOW_MEMORY_TYPE_FB = 0,
index 8971707..49bc1e4 100644 (file)
@@ -1265,11 +1265,11 @@ struct dmub_cmd_PLAT_54186_wa {
        uint32_t DCSURF_PRIMARY_SURFACE_ADDRESS_HIGH_C; /**< reg value */
        uint32_t DCSURF_PRIMARY_SURFACE_ADDRESS_C; /**< reg value */
        struct {
-               uint8_t hubp_inst : 4; /**< HUBP instance */
-               uint8_t tmz_surface : 1; /**< TMZ enable or disable */
-               uint8_t immediate :1; /**< Immediate flip */
-               uint8_t vmid : 4; /**< VMID */
-               uint8_t grph_stereo : 1; /**< 1 if stereo */
+               uint32_t hubp_inst : 4; /**< HUBP instance */
+               uint32_t tmz_surface : 1; /**< TMZ enable or disable */
+               uint32_t immediate :1; /**< Immediate flip */
+               uint32_t vmid : 4; /**< VMID */
+               uint32_t grph_stereo : 1; /**< 1 if stereo */
                uint32_t reserved : 21; /**< Reserved */
        } flip_params; /**< Pageflip parameters */
        uint32_t reserved[9]; /**< Reserved bits */