drm/amdgpu: add DMUB outbox event IRQ source define/complete/debug flag
Subsystems (2)
PATCH 1/1 drm/amdgpu: add DMUB outbox event IRQ source define/complete/debug flag
[Why & How]
We use outbox interrupt that allows us to do the AUX via DMUB Therefore, we need to add some irq source related definition in the header files;
Also, I added debug flag that allows us to turn it on/off for testing purpose.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/include/amd_shared.h | 3 ++- drivers/gpu/drm/amd/include/ivsrcid/dcn/irqsrcs_dcn_1_0.h | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +2 -0
@@ -923,6 +923,7 @@ struct amdgpu_device {struct amdgpu_irq_src pageflip_irq;struct amdgpu_irq_src hpd_irq;struct amdgpu_irq_src dmub_trace_irq; +struct amdgpu_irq_src outbox_irq;/* rings */ u64 fence_context;
@@ -1077,6 +1078,7 @@ struct amdgpu_device {bool in_pci_err_recovery;struct pci_saved_state *pci_state; +struct completion dmub_aux_transfer_done; };static inline struct amdgpu_device *drm_to_adev (struct drm_device *ddev)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
@@ -159,7 +159,7 @@ int amdgpu_smu_pptable_id = -1;* PSR (bit 3) disabled by default */ uint amdgpu_dc_feature_mask =2 ; -uint amdgpu_dc_debug_mask; +uint amdgpu_dc_debug_mask =0x10 ;int amdgpu_async_gfx_ring =1 ;int amdgpu_mcbp;int amdgpu_discovery =-1 ;
drivers/gpu/drm/amd/include/amd_shared.h +2 -1
@@ -227,7 +227,8 @@ enum DC_DEBUG_MASK {DC_DISABLE_PIPE_SPLIT =0x1 ,DC_DISABLE_STUTTER =0x2 ,DC_DISABLE_DSC =0x4 , - DC_DISABLE_CLOCK_GATING = 0x8 +DC_DISABLE_CLOCK_GATING =0x8 , + DC_ENABLE_DMUB_AUX = 0x10, };enum amd_dpm_forced_level ;
drivers/gpu/drm/amd/include/ivsrcid/dcn/irqsrcs_dcn_1_0.h +2 -0
@@ -1132,5 +1132,7 @@#define DCN_1_0__SRCID__DMCUB_OUTBOX_HIGH_PRIORITY_READY_INT 0x68#define DCN_1_0__CTXID__DMCUB_OUTBOX_HIGH_PRIORITY_READY_INT 6 +#define DCN_1_0__SRCID__DMCUB_OUTBOX_LOW_PRIORITY_READY_INT 0x68 // DMCUB_IHC_outbox1_ready_int IHC_DMCUB_outbox1_ready_int_ack DMCUB_OUTBOX_LOW_PRIORITY_READY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE24 Level/Pulse +#define DCN_1_0__CTXID__DMCUB_OUTBOX_LOW_PRIORITY_READY_INT 8#endif // __IRQSRCS_DCN_1_0_H__
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 6 lines · Jude Shih
[Why & How]
We use outbox interrupt that allows us to do the AUX via DMUB Therefore, we need to add some irq source related definition in the header files;
Also, I added debug flag that allows us to turn it on/off for testing purpose.
Missing your signed-off-by here, please recommit with
git commit --amend --sign
Quoted 32 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/amd/include/amd_shared.h | 3 ++- drivers/gpu/drm/amd/include/ivsrcid/dcn/irqsrcs_dcn_1_0.h | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +2
-0@@ -923,6 +923,7 @@ struct amdgpu_device {struct amdgpu_irq_src pageflip_irq;struct amdgpu_irq_src hpd_irq;struct amdgpu_irq_src dmub_trace_irq; +struct amdgpu_irq_src outbox_irq;/* rings */ u64 fence_context;@@ -1077,6 +1078,7 @@ struct amdgpu_device {bool in_pci_err_recovery;struct pci_saved_state *pci_state; +struct completion dmub_aux_transfer_done; };static inline struct amdgpu_device *drm_to_adev (struct drm_device *ddev)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c int amdgpu_smu_pptable_id = -1; · line 162
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1
-1@@ -159,7 +159,7 @@ int amdgpu_smu_pptable_id = -1;* PSR (bit 3) disabled by default */ uint amdgpu_dc_feature_mask =2 ; -uint amdgpu_dc_debug_mask; +uint amdgpu_dc_debug_mask =0x10 ;
If this is intended to be enabled by default then it shouldn't be a debug flag. Please either leave the default alone or fully switch over to DMCUB AUX support for ASIC that support it.
If you don't already have a check from driver to DMCUB firmware to ensure that the firmware itself supports it you'd need that as well - users can be running older firmware (like the firmware that originally released with DCN2.1/DCN3.0 support) and that wouldn't support this feature.
My recommendation:
- Add a command to check for DMUB AUX capability or add bits to the metadata to indicate that the firmware does support it
- Assume that the DMUB AUX implementation is solid and a complete replacement for existing AUX support on firmware that does support it
- Add a debug flag like DC_DISABLE_DMUB_AUX for optionally debugging issues if they arise
Quoted 22 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0int amdgpu_async_gfx_ring =1 ;int amdgpu_mcbp;int amdgpu_discovery =-1 ;drivers/gpu/drm/amd/include/amd_shared.h +2
-1@@ -227,7 +227,8 @@ enum DC_DEBUG_MASK {DC_DISABLE_PIPE_SPLIT =0x1 ,DC_DISABLE_STUTTER =0x2 ,DC_DISABLE_DSC =0x4 , - DC_DISABLE_CLOCK_GATING = 0x8 +DC_DISABLE_CLOCK_GATING =0x8 , + DC_ENABLE_DMUB_AUX = 0x10, };enum amd_dpm_forced_level ;drivers/gpu/drm/amd/include/ivsrcid/dcn/irqsrcs_dcn_1_0.h +0
-0
drivers/gpu/drm/amd/include/ivsrcid/dcn/irqsrcs_dcn_1_0.h line 1136
Quoted 5 lines
drivers/gpu/drm/amd/include/ivsrcid/dcn/irqsrcs_dcn_1_0.h +2
-0@@ -1132,5 +1132,7 @@#define DCN_1_0__SRCID__DMCUB_OUTBOX_HIGH_PRIORITY_READY_INT 0x68#define DCN_1_0__CTXID__DMCUB_OUTBOX_HIGH_PRIORITY_READY_INT 6 +#define DCN_1_0__SRCID__DMCUB_OUTBOX_LOW_PRIORITY_READY_INT 0x68 // DMCUB_IHC_outbox1_ready_int IHC_DMCUB_outbox1_ready_int_ack DMCUB_OUTBOX_LOW_PRIORITY_READY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE24 Level/Pulse +#define DCN_1_0__CTXID__DMCUB_OUTBOX_LOW_PRIORITY_READY_INT 8
This technically isn't on DCN_1_0 but I guess we've been using this file for all the DCNs.
I do wish this was labeled DCN_2_1 instead to make it more explicit but I guess this is fine for now.
Regards,
Nicholas Kazlauskas
drivers/gpu/drm/amd/include/ivsrcid/dcn/irqsrcs_dcn_1_0.h line 1138
Quoted 3 lines
drivers/gpu/drm/amd/include/ivsrcid/dcn/irqsrcs_dcn_1_0.h +0
-0#endif // __IRQSRCS_DCN_1_0_H__
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx