drm/amdgpu/gfx11: don't read registers in mqd init
Subsystems (2)
Alex Deucher
maintainerPATCH 1/2 drm/amdgpu/gfx11: don't read registers in mqd init
Just use the default values. There's not need to get the value from hardware and it could cause problems if we do that at runtime and gfxoff is active.
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 47 ++++++++++++++++++-------- 1 file changed, 32 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +32 -15
@@ -64,6 +64,23 @@#define regPC_CONFIG_CNTL_1 0x194d#define regPC_CONFIG_CNTL_1_BASE_IDX 1 +#define regCP_GFX_MQD_CONTROL_DEFAULT 0x00000100 +#define regCP_GFX_HQD_VMID_DEFAULT 0x00000000 +#define regCP_GFX_HQD_QUEUE_PRIORITY_DEFAULT 0x00000000 +#define regCP_GFX_HQD_QUANTUM_DEFAULT 0x00000a01 +#define regCP_GFX_HQD_CNTL_DEFAULT 0x00a00000 +#define regCP_RB_DOORBELL_CONTROL_DEFAULT 0x00000000 +#define regCP_GFX_HQD_RPTR_DEFAULT 0x00000000 + +#define regCP_HQD_EOP_CONTROL_DEFAULT 0x00000006 +#define regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT 0x00000000 +#define regCP_MQD_CONTROL_DEFAULT 0x00000100 +#define regCP_HQD_PQ_CONTROL_DEFAULT 0x00308509 +#define regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT 0x00000000 +#define regCP_HQD_PQ_RPTR_DEFAULT 0x00000000 +#define regCP_HQD_PERSISTENT_STATE_DEFAULT 0x0be05501 +#define regCP_HQD_IB_CONTROL_DEFAULT 0x00300000 +MODULE_FIRMWARE ("amdgpu/gc_11_0_0_pfp.bin" );MODULE_FIRMWARE ("amdgpu/gc_11_0_0_me.bin" );MODULE_FIRMWARE ("amdgpu/gc_11_0_0_mec.bin" );
@@ -3996,7 +4013,7 @@ static void gfx_v11_0_gfx_mqd_set_priority(struct amdgpu_device *adev,if (prop->hqd_pipe_priority ==AMDGPU_GFX_PIPE_PRIO_HIGH ) priority =1 ; - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_QUEUE_PRIORITY); + tmp = regCP_GFX_HQD_QUEUE_PRIORITY_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_QUEUE_PRIORITY ,PRIORITY_LEVEL , priority); mqd->cp_gfx_hqd_queue_priority = tmp; }
@@ -4018,14 +4035,14 @@ static int gfx_v11_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_mqd_base_addr_hi =upper_32_bits (prop->mqd_gpu_addr);/* set up mqd control */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_MQD_CONTROL); + tmp = regCP_GFX_MQD_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,VMID ,0 ); tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,PRIV_STATE ,1 ); tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,CACHE_POLICY ,0 ); mqd->cp_gfx_mqd_control = tmp;/* set up gfx_hqd_vimd with 0x0 to indicate the ring buffer's vmid */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_VMID); + tmp = regCP_GFX_HQD_VMID_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_VMID ,VMID ,0 ); mqd->cp_gfx_hqd_vmid =0 ;
@@ -4033,7 +4050,7 @@ static int gfx_v11_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,gfx_v11_0_gfx_mqd_set_priority (adev, mqd, prop);/* set up time quantum */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_QUANTUM); + tmp = regCP_GFX_HQD_QUANTUM_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_QUANTUM ,QUANTUM_EN ,1 ); mqd->cp_gfx_hqd_quantum = tmp;
@@ -4055,7 +4072,7 @@ static int gfx_v11_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,/* set up the gfx_hqd_control, similar as CP_RB0_CNTL */ rb_bufsz =order_base_2 (prop->queue_size /4 ) -1 ; - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_CNTL); + tmp = regCP_GFX_HQD_CNTL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BUFSZ , rb_bufsz); tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BLKSZ , rb_bufsz -2 );#ifdef __BIG_ENDIAN
@@ -4064,7 +4081,7 @@ static int gfx_v11_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_gfx_hqd_cntl = tmp;/* set up cp_doorbell_control */ - tmp =RREG32_SOC15 (GC ,0 , regCP_RB_DOORBELL_CONTROL); + tmp = regCP_RB_DOORBELL_CONTROL_DEFAULT;if (prop->use_doorbell) { tmp =REG_SET_FIELD (tmp,CP_RB_DOORBELL_CONTROL ,DOORBELL_OFFSET , prop->doorbell_index);
@@ -4076,7 +4093,7 @@ static int gfx_v11_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_rb_doorbell_control = tmp;/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */ - mqd->cp_gfx_hqd_rptr =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_RPTR); + mqd->cp_gfx_hqd_rptr = regCP_GFX_HQD_RPTR_DEFAULT;/* active the queue */ mqd->cp_gfx_hqd_active =1 ;
@@ -4172,14 +4189,14 @@ static int gfx_v11_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_eop_base_addr_hi =upper_32_bits (eop_base_addr);/* set the EOP size, register value is 2^(EOP_SIZE+1) dwords */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_EOP_CONTROL); + tmp = regCP_HQD_EOP_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_EOP_CONTROL ,EOP_SIZE , (order_base_2 (GFX11_MEC_HPD_SIZE /4 ) -1 )); mqd->cp_hqd_eop_control = tmp;/* enable doorbell? */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_DOORBELL_CONTROL); + tmp = regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT;if (prop->use_doorbell) { tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
@@ -4208,7 +4225,7 @@ static int gfx_v11_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_mqd_base_addr_hi =upper_32_bits (prop->mqd_gpu_addr);/* set MQD vmid to 0 */ - tmp =RREG32_SOC15 (GC ,0 , regCP_MQD_CONTROL); + tmp = regCP_MQD_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_MQD_CONTROL ,VMID ,0 ); mqd->cp_mqd_control = tmp;
@@ -4218,7 +4235,7 @@ static int gfx_v11_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_pq_base_hi =upper_32_bits (hqd_gpu_addr);/* set up the HQD, this is similar to CP_RB0_CNTL */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_CONTROL); + tmp = regCP_HQD_PQ_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PQ_CONTROL ,QUEUE_SIZE , (order_base_2 (prop->queue_size /4 ) -1 )); tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, RPTR_BLOCK_SIZE,
@@ -4244,7 +4261,7 @@ static int gfx_v11_0_compute_mqd_init(struct amdgpu_device *adev, void *m, tmp =0 ;/* enable the doorbell if requested */ if (prop->use_doorbell) { - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_DOORBELL_CONTROL); + tmp = regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PQ_DOORBELL_CONTROL ,DOORBELL_OFFSET , prop->doorbell_index);
@@ -4259,17 +4276,17 @@ static int gfx_v11_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_pq_doorbell_control = tmp;/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */ - mqd->cp_hqd_pq_rptr =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_RPTR); + mqd->cp_hqd_pq_rptr = regCP_HQD_PQ_RPTR_DEFAULT;/* set the vmid for the queue */ mqd->cp_hqd_vmid =0 ; - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PERSISTENT_STATE); + tmp = regCP_HQD_PERSISTENT_STATE_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PERSISTENT_STATE ,PRELOAD_SIZE ,0x55 ); mqd->cp_hqd_persistent_state = tmp;/* set MIN_IB_AVAIL_SIZE */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_IB_CONTROL); + tmp = regCP_HQD_IB_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_IB_CONTROL ,MIN_IB_AVAIL_SIZE ,3 ); mqd->cp_hqd_ib_control = tmp;
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 2/2 drm/amdgpu/gfx12: don't read registers in mqd init
Just use the default values. There's not need to get the value from hardware and it could cause problems if we do that at runtime and gfxoff is active.
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 48 ++++++++++++++++++-------- 1 file changed, 33 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +33 -15
@@ -52,6 +52,24 @@#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L +#define regCP_GFX_MQD_CONTROL_DEFAULT 0x00000100 +#define regCP_GFX_HQD_VMID_DEFAULT 0x00000000 +#define regCP_GFX_HQD_QUEUE_PRIORITY_DEFAULT 0x00000000 +#define regCP_GFX_HQD_QUANTUM_DEFAULT 0x00000a01 +#define regCP_GFX_HQD_CNTL_DEFAULT 0x00f00000 +#define regCP_RB_DOORBELL_CONTROL_DEFAULT 0x00000000 +#define regCP_GFX_HQD_RPTR_DEFAULT 0x00000000 + +#define regCP_HQD_EOP_CONTROL_DEFAULT 0x00000006 +#define regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT 0x00000000 +#define regCP_MQD_CONTROL_DEFAULT 0x00000100 +#define regCP_HQD_PQ_CONTROL_DEFAULT 0x00308509 +#define regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT 0x00000000 +#define regCP_HQD_PQ_RPTR_DEFAULT 0x00000000 +#define regCP_HQD_PERSISTENT_STATE_DEFAULT 0x0be05501 +#define regCP_HQD_IB_CONTROL_DEFAULT 0x00300000 + +MODULE_FIRMWARE ("amdgpu/gc_12_0_0_pfp.bin" );MODULE_FIRMWARE ("amdgpu/gc_12_0_0_me.bin" );MODULE_FIRMWARE ("amdgpu/gc_12_0_0_mec.bin" );
@@ -2933,25 +2951,25 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_mqd_base_addr_hi =upper_32_bits (prop->mqd_gpu_addr);/* set up mqd control */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_MQD_CONTROL); + tmp = regCP_GFX_MQD_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,VMID ,0 ); tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,PRIV_STATE ,1 ); tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,CACHE_POLICY ,0 ); mqd->cp_gfx_mqd_control = tmp;/* set up gfx_hqd_vimd with 0x0 to indicate the ring buffer's vmid */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_VMID); + tmp = regCP_GFX_HQD_VMID_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_VMID ,VMID ,0 ); mqd->cp_gfx_hqd_vmid =0 ;/* set up default queue priority level * 0x0 = low priority, 0x1 = high priority */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_QUEUE_PRIORITY); + tmp = regCP_GFX_HQD_QUEUE_PRIORITY_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_QUEUE_PRIORITY ,PRIORITY_LEVEL ,0 ); mqd->cp_gfx_hqd_queue_priority = tmp;/* set up time quantum */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_QUANTUM); + tmp = regCP_GFX_HQD_QUANTUM_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_QUANTUM ,QUANTUM_EN ,1 ); mqd->cp_gfx_hqd_quantum = tmp;
@@ -2973,7 +2991,7 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,/* set up the gfx_hqd_control, similar as CP_RB0_CNTL */ rb_bufsz =order_base_2 (prop->queue_size /4 ) -1 ; - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_CNTL); + tmp = regCP_GFX_HQD_CNTL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BUFSZ , rb_bufsz); tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BLKSZ , rb_bufsz -2 );#ifdef __BIG_ENDIAN
@@ -2982,7 +3000,7 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_gfx_hqd_cntl = tmp;/* set up cp_doorbell_control */ - tmp =RREG32_SOC15 (GC ,0 , regCP_RB_DOORBELL_CONTROL); + tmp = regCP_RB_DOORBELL_CONTROL_DEFAULT;if (prop->use_doorbell) { tmp =REG_SET_FIELD (tmp,CP_RB_DOORBELL_CONTROL ,DOORBELL_OFFSET , prop->doorbell_index);
@@ -2994,7 +3012,7 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_rb_doorbell_control = tmp;/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */ - mqd->cp_gfx_hqd_rptr =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_RPTR); + mqd->cp_gfx_hqd_rptr = regCP_GFX_HQD_RPTR_DEFAULT;/* active the queue */ mqd->cp_gfx_hqd_active =1 ;
@@ -3097,14 +3115,14 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_eop_base_addr_hi =upper_32_bits (eop_base_addr);/* set the EOP size, register value is 2^(EOP_SIZE+1) dwords */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_EOP_CONTROL); + tmp = regCP_HQD_EOP_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_EOP_CONTROL ,EOP_SIZE , (order_base_2 (GFX12_MEC_HPD_SIZE /4 ) -1 )); mqd->cp_hqd_eop_control = tmp;/* enable doorbell? */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_DOORBELL_CONTROL); + tmp = regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT;if (prop->use_doorbell) { tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
@@ -3133,7 +3151,7 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_mqd_base_addr_hi =upper_32_bits (prop->mqd_gpu_addr);/* set MQD vmid to 0 */ - tmp =RREG32_SOC15 (GC ,0 , regCP_MQD_CONTROL); + tmp = regCP_MQD_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_MQD_CONTROL ,VMID ,0 ); mqd->cp_mqd_control = tmp;
@@ -3143,7 +3161,7 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_pq_base_hi =upper_32_bits (hqd_gpu_addr);/* set up the HQD, this is similar to CP_RB0_CNTL */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_CONTROL); + tmp = regCP_HQD_PQ_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PQ_CONTROL ,QUEUE_SIZE , (order_base_2 (prop->queue_size /4 ) -1 )); tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, RPTR_BLOCK_SIZE,
@@ -3168,7 +3186,7 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m, tmp =0 ;/* enable the doorbell if requested */ if (prop->use_doorbell) { - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_DOORBELL_CONTROL); + tmp = regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PQ_DOORBELL_CONTROL ,DOORBELL_OFFSET , prop->doorbell_index);
@@ -3183,17 +3201,17 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_pq_doorbell_control = tmp;/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */ - mqd->cp_hqd_pq_rptr =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_RPTR); + mqd->cp_hqd_pq_rptr = regCP_HQD_PQ_RPTR_DEFAULT;/* set the vmid for the queue */ mqd->cp_hqd_vmid =0 ; - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PERSISTENT_STATE); + tmp = regCP_HQD_PERSISTENT_STATE_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PERSISTENT_STATE ,PRELOAD_SIZE ,0x55 ); mqd->cp_hqd_persistent_state = tmp;/* set MIN_IB_AVAIL_SIZE */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_IB_CONTROL); + tmp = regCP_HQD_IB_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_IB_CONTROL ,MIN_IB_AVAIL_SIZE ,3 ); mqd->cp_hqd_ib_control = tmp;
Signature · 1 line
2.48.1
Re: [PATCH 2/2] drm/amdgpu/gfx12: don't read registers in mqd init
Ping on this series?
Thanks,
Alex
Quoted 164 lines · Alex Deucher
Just use the default values. There's not need to get the value from hardware and it could cause problems if we do that at runtime and gfxoff is active.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 48 ++++++++++++++++++-------- 1 file changed, 33 insertions(+), 15 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +33
-16@@ -52,6 +52,24 @@#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L +#define regCP_GFX_MQD_CONTROL_DEFAULT 0x00000100 +#define regCP_GFX_HQD_VMID_DEFAULT 0x00000000 +#define regCP_GFX_HQD_QUEUE_PRIORITY_DEFAULT 0x00000000 +#define regCP_GFX_HQD_QUANTUM_DEFAULT 0x00000a01 +#define regCP_GFX_HQD_CNTL_DEFAULT 0x00f00000 +#define regCP_RB_DOORBELL_CONTROL_DEFAULT 0x00000000 +#define regCP_GFX_HQD_RPTR_DEFAULT 0x00000000 + +#define regCP_HQD_EOP_CONTROL_DEFAULT 0x00000006 +#define regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT 0x00000000 +#define regCP_MQD_CONTROL_DEFAULT 0x00000100 +#define regCP_HQD_PQ_CONTROL_DEFAULT 0x00308509 +#define regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT 0x00000000 +#define regCP_HQD_PQ_RPTR_DEFAULT 0x00000000 +#define regCP_HQD_PERSISTENT_STATE_DEFAULT 0x0be05501 +#define regCP_HQD_IB_CONTROL_DEFAULT 0x00300000 + +MODULE_FIRMWARE ("amdgpu/gc_12_0_0_pfp.bin" );MODULE_FIRMWARE ("amdgpu/gc_12_0_0_me.bin" );MODULE_FIRMWARE ("amdgpu/gc_12_0_0_mec.bin" );@@ -2933,25 +2951,25 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_mqd_base_addr_hi =upper_32_bits (prop->mqd_gpu_addr);/* set up mqd control */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_MQD_CONTROL); + tmp = regCP_GFX_MQD_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,VMID ,0 ); tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,PRIV_STATE ,1 ); tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,CACHE_POLICY ,0 ); mqd->cp_gfx_mqd_control = tmp;/* set up gfx_hqd_vimd with 0x0 to indicate the ring buffer's vmid */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_VMID); + tmp = regCP_GFX_HQD_VMID_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_VMID ,VMID ,0 ); mqd->cp_gfx_hqd_vmid =0 ;/* set up default queue priority level * 0x0 = low priority, 0x1 = high priority */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_QUEUE_PRIORITY); + tmp = regCP_GFX_HQD_QUEUE_PRIORITY_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_QUEUE_PRIORITY ,PRIORITY_LEVEL ,0 ); mqd->cp_gfx_hqd_queue_priority = tmp;/* set up time quantum */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_QUANTUM); + tmp = regCP_GFX_HQD_QUANTUM_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_QUANTUM ,QUANTUM_EN ,1 ); mqd->cp_gfx_hqd_quantum = tmp;@@ -2973,7 +2991,7 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,/* set up the gfx_hqd_control, similar as CP_RB0_CNTL */ rb_bufsz =order_base_2 (prop->queue_size /4 ) -1 ; - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_CNTL); + tmp = regCP_GFX_HQD_CNTL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BUFSZ , rb_bufsz); tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BLKSZ , rb_bufsz -2 );#ifdef __BIG_ENDIAN@@ -2982,7 +3000,7 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_gfx_hqd_cntl = tmp;/* set up cp_doorbell_control */ - tmp =RREG32_SOC15 (GC ,0 , regCP_RB_DOORBELL_CONTROL); + tmp = regCP_RB_DOORBELL_CONTROL_DEFAULT;if (prop->use_doorbell) { tmp =REG_SET_FIELD (tmp,CP_RB_DOORBELL_CONTROL ,DOORBELL_OFFSET , prop->doorbell_index);@@ -2994,7 +3012,7 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_rb_doorbell_control = tmp;/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */ - mqd->cp_gfx_hqd_rptr =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_RPTR); + mqd->cp_gfx_hqd_rptr = regCP_GFX_HQD_RPTR_DEFAULT;/* active the queue */ mqd->cp_gfx_hqd_active =1 ;@@ -3097,14 +3115,14 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_eop_base_addr_hi =upper_32_bits (eop_base_addr);/* set the EOP size, register value is 2^(EOP_SIZE+1) dwords */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_EOP_CONTROL); + tmp = regCP_HQD_EOP_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_EOP_CONTROL ,EOP_SIZE , (order_base_2 (GFX12_MEC_HPD_SIZE /4 ) -1 )); mqd->cp_hqd_eop_control = tmp;/* enable doorbell? */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_DOORBELL_CONTROL); + tmp = regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT;if (prop->use_doorbell) { tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,@@ -3133,7 +3151,7 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_mqd_base_addr_hi =upper_32_bits (prop->mqd_gpu_addr);/* set MQD vmid to 0 */ - tmp =RREG32_SOC15 (GC ,0 , regCP_MQD_CONTROL); + tmp = regCP_MQD_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_MQD_CONTROL ,VMID ,0 ); mqd->cp_mqd_control = tmp;@@ -3143,7 +3161,7 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_pq_base_hi =upper_32_bits (hqd_gpu_addr);/* set up the HQD, this is similar to CP_RB0_CNTL */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_CONTROL); + tmp = regCP_HQD_PQ_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PQ_CONTROL ,QUEUE_SIZE , (order_base_2 (prop->queue_size /4 ) -1 )); tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, RPTR_BLOCK_SIZE,@@ -3168,7 +3186,7 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m, tmp =0 ;/* enable the doorbell if requested */ if (prop->use_doorbell) { - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_DOORBELL_CONTROL); + tmp = regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PQ_DOORBELL_CONTROL ,DOORBELL_OFFSET , prop->doorbell_index);@@ -3183,17 +3201,17 @@ static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m, mqd->cp_hqd_pq_doorbell_control = tmp;/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */ - mqd->cp_hqd_pq_rptr =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_RPTR); + mqd->cp_hqd_pq_rptr = regCP_HQD_PQ_RPTR_DEFAULT;/* set the vmid for the queue */ mqd->cp_hqd_vmid =0 ; - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PERSISTENT_STATE); + tmp = regCP_HQD_PERSISTENT_STATE_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PERSISTENT_STATE ,PRELOAD_SIZE ,0x55 ); mqd->cp_hqd_persistent_state = tmp;/* set MIN_IB_AVAIL_SIZE */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_IB_CONTROL); + tmp = regCP_HQD_IB_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_IB_CONTROL ,MIN_IB_AVAIL_SIZE ,3 ); mqd->cp_hqd_ib_control = tmp; --2.48.1
Joshi, Mukul
Reviewed-byRE: [PATCH 2/2] drm/amdgpu/gfx12: don't read registers in mqd init
[Public]
Series is:
Quoted 213 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, March 11, 2025 4:06 PM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 2/2] drm/amdgpu/gfx12: don't read registers in mqd initPing on this series?
Thanks,
Alex
Quoted 17 lines · Alex Deucher
Just use the default values. There's not need to get the value from hardware and it could cause problems if we do that at runtime and gfxoff is active.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 48 ++++++++++++++++++-------- 1 file changed, 33 insertions(+), 15 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +0
-0drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 55
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0@@ -52,6 +52,24 @@#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L +#define regCP_GFX_MQD_CONTROL_DEFAULT
0x00000100drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 56
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_GFX_HQD_VMID_DEFAULT
0x00000000drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 57
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_GFX_HQD_QUEUE_PRIORITY_DEFAULT
0x00000000drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 58
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_GFX_HQD_QUANTUM_DEFAULT
0x00000a01drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 59
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_GFX_HQD_CNTL_DEFAULT
0x00f00000drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 60
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_RB_DOORBELL_CONTROL_DEFAULT
0x00000000drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 61
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_GFX_HQD_RPTR_DEFAULT
0x00000000drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 63
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +2
-0+ +#define regCP_HQD_EOP_CONTROL_DEFAULT
0x00000006drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 64
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT
0x00000000drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 65
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_MQD_CONTROL_DEFAULT
0x00000100drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 66
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_HQD_PQ_CONTROL_DEFAULT
0x00308509drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 67
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT
0x00000000drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 68
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_HQD_PQ_RPTR_DEFAULT
0x00000000drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 69
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_HQD_PERSISTENT_STATE_DEFAULT
0x0be05501drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c line 70
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+#define regCP_HQD_IB_CONTROL_DEFAULT
0x00300000drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_gfx_mqd_init(struct
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +2
-0+ +MODULE_FIRMWARE ("amdgpu/gc_12_0_0_pfp.bin" );MODULE_FIRMWARE ("amdgpu/gc_12_0_0_me.bin" );MODULE_FIRMWARE ("amdgpu/gc_12_0_0_mec.bin" );@@ -2933,25 +2951,25 @@ static int gfx_v12_0_gfx_mqd_init(struct
amdgpu_device*adev, void *m,drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-1mqd->cp_mqd_base_addr_hi =upper_32_bits (prop->mqd_gpu_addr);/* set up mqd control */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_MQD_CONTROL); + tmp = regCP_GFX_MQD_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,VMID ,0 ); tmp =REG_SET_FIELD (tmp,CP_GFX_MQD_CONTROL ,PRIV_STATE ,1 ); tmp = REG_SET_FIELD(tmp, CP_GFX_MQD_CONTROL, CACHE_POLICY,0);
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +2
-2mqd->cp_gfx_mqd_control = tmp;/* set up gfx_hqd_vimd with 0x0 to indicate the ring buffer's vmid */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_VMID); + tmp = regCP_GFX_HQD_VMID_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_VMID ,VMID ,0 ); mqd->cp_gfx_hqd_vmid =0 ;/* set up default queue priority level * 0x0 = low priority, 0x1 = high priority */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_QUEUE_PRIORITY); + tmp = regCP_GFX_HQD_QUEUE_PRIORITY_DEFAULT; tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_QUEUE_PRIORITY,
PRIORITY_LEVEL, 0);drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-1mqd->cp_gfx_hqd_queue_priority = tmp;/* set up time quantum */ - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_QUANTUM); + tmp = regCP_GFX_HQD_QUANTUM_DEFAULT; tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_QUANTUM, QUANTUM_EN,1);
Quoted 21 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-1mqd->cp_gfx_hqd_quantum = tmp;@@ -2973,7 +2991,7 @@ static int gfx_v12_0_gfx_mqd_init(struct amdgpu_device *adev, void *m,/* set up the gfx_hqd_control, similar as CP_RB0_CNTL */ rb_bufsz =order_base_2 (prop->queue_size /4 ) -1 ; - tmp =RREG32_SOC15 (GC ,0 , regCP_GFX_HQD_CNTL); + tmp = regCP_GFX_HQD_CNTL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_GFX_HQD_CNTL ,RB_BUFSZ , rb_bufsz); tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_CNTL, RB_BLKSZ, rb_bufsz -2); #ifdef
__BIG_ENDIAN@@ -2982,7 +3000,7 @@ static int gfx_v12_0_gfx_mqd_init(structamdgpu_device*adev, void *m,mqd->cp_gfx_hqd_cntl = tmp; /* set up cp_doorbell_control */drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-1- tmp =RREG32_SOC15 (GC ,0 , regCP_RB_DOORBELL_CONTROL); + tmp = regCP_RB_DOORBELL_CONTROL_DEFAULT;if (prop->use_doorbell) { tmp = REG_SET_FIELD(tmp, CP_RB_DOORBELL_CONTROL, DOORBELL_OFFSET,Quoted 1 line
prop->doorbell_index); @@ -2994,7 +3012,7 @@ static intgfx_v12_0_gfx_mqd_init(struct
amdgpu_device*adev, void *m,Quoted 4 lines
mqd->cp_rb_doorbell_control = tmp; /* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */-
mqd->cp_gfx_hqd_rptr= RREG32_SOC15(GC, 0,
regCP_GFX_HQD_RPTR);drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_compute_mqd_init(struct
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+ mqd->cp_gfx_hqd_rptr = regCP_GFX_HQD_RPTR_DEFAULT;/* active the queue */ mqd->cp_gfx_hqd_active =1 ;@@ -3097,14 +3115,14 @@ static int gfx_v12_0_compute_mqd_init(struct
amdgpu_device*adev, void *m,drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_compute_mqd_init(struct
Quoted 17 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +2
-2mqd->cp_hqd_eop_base_addr_hi =upper_32_bits (eop_base_addr);/* set the EOP size, register value is 2^(EOP_SIZE+1) dwords */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_EOP_CONTROL); + tmp = regCP_HQD_EOP_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_EOP_CONTROL ,EOP_SIZE , (order_base_2 (GFX12_MEC_HPD_SIZE /4 ) -1 )); mqd->cp_hqd_eop_control = tmp;/* enable doorbell? */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_DOORBELL_CONTROL); + tmp = regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT;if (prop->use_doorbell) { tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,@@ -3133,7 +3151,7 @@ static int gfx_v12_0_compute_mqd_init(struct
amdgpu_device*adev, void *m,drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_compute_mqd_init(struct
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-1mqd->cp_mqd_base_addr_hi =upper_32_bits (prop->mqd_gpu_addr);/* set MQD vmid to 0 */ - tmp =RREG32_SOC15 (GC ,0 , regCP_MQD_CONTROL); + tmp = regCP_MQD_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_MQD_CONTROL ,VMID ,0 ); mqd->cp_mqd_control = tmp;@@ -3143,7 +3161,7 @@ static int gfx_v12_0_compute_mqd_init(struct
amdgpu_device*adev, void *m,drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_compute_mqd_init(struct
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-1mqd->cp_hqd_pq_base_hi =upper_32_bits (hqd_gpu_addr);/* set up the HQD, this is similar to CP_RB0_CNTL */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_CONTROL); + tmp = regCP_HQD_PQ_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PQ_CONTROL ,QUEUE_SIZE , (order_base_2 (prop->queue_size /4 ) -1 )); tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, RPTR_BLOCK_SIZE,@@ -3168,7 +3186,7 @@ static int gfx_v12_0_compute_mqd_init(struct
amdgpu_device*adev, void *m,drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m,
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +0
-1tmp =0 ;/* enable the doorbell if requested */ if (prop->use_doorbell) { - tmp = RREG32_SOC15(GC, 0,
regCP_HQD_PQ_DOORBELL_CONTROL);drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_compute_mqd_init(struct
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-0+ tmp = regCP_HQD_PQ_DOORBELL_CONTROL_DEFAULT; tmp =REG_SET_FIELD (tmp,CP_HQD_PQ_DOORBELL_CONTROL ,DOORBELL_OFFSET , prop->doorbell_index);@@ -3183,17 +3201,17 @@ static int gfx_v12_0_compute_mqd_init(struct
amdgpu_device*adev, void *m,drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m,
Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +2
-2mqd->cp_hqd_pq_doorbell_control = tmp;/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */ - mqd->cp_hqd_pq_rptr =RREG32_SOC15 (GC ,0 , regCP_HQD_PQ_RPTR); + mqd->cp_hqd_pq_rptr = regCP_HQD_PQ_RPTR_DEFAULT;/* set the vmid for the queue */ mqd->cp_hqd_vmid =0 ; - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_PERSISTENT_STATE); + tmp = regCP_HQD_PERSISTENT_STATE_DEFAULT; tmp = REG_SET_FIELD(tmp, CP_HQD_PERSISTENT_STATE,
PRELOAD_SIZE,0x55);drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c static int gfx_v12_0_compute_mqd_init(struct amdgpu_device *adev, void *m,
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1
-1mqd->cp_hqd_persistent_state = tmp;/* set MIN_IB_AVAIL_SIZE */ - tmp =RREG32_SOC15 (GC ,0 , regCP_HQD_IB_CONTROL); + tmp = regCP_HQD_IB_CONTROL_DEFAULT; tmp = REG_SET_FIELD(tmp, CP_HQD_IB_CONTROL, MIN_IB_AVAIL_SIZE,3);
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +0
-1mqd->cp_hqd_ib_control = tmp; --2.48.1