mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/amdkfd: Update interrupt handling for GFX 9.4.3
For GFX 9.4.3, interrupt handling needs to be updated for: - Interrupt cookie will have a NodeId field. Each KFD node needs to check the NodeId before processing the interrupt. - For CPX mode, there are additional checks of client ID needed to process the interrupt. - Add NodeId to the process drain interrupt. Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
570b295248
commit
d4300362a6
@@ -2142,6 +2142,7 @@ void kfd_flush_tlb(struct kfd_process_device *pdd, enum TLB_FLUSH_TYPE type)
|
||||
int kfd_process_drain_interrupts(struct kfd_process_device *pdd)
|
||||
{
|
||||
uint32_t irq_drain_fence[8];
|
||||
uint8_t node_id = 0;
|
||||
int r = 0;
|
||||
|
||||
if (!KFD_IS_SOC15(pdd->dev))
|
||||
@@ -2154,6 +2155,14 @@ int kfd_process_drain_interrupts(struct kfd_process_device *pdd)
|
||||
KFD_IRQ_FENCE_CLIENTID;
|
||||
irq_drain_fence[3] = pdd->process->pasid;
|
||||
|
||||
/*
|
||||
* For GFX 9.4.3, send the NodeId also in IH cookie DW[3]
|
||||
*/
|
||||
if (KFD_GC_VERSION(pdd->dev->kfd) == IP_VERSION(9, 4, 3)) {
|
||||
node_id = ffs(pdd->dev->interrupt_bitmap) - 1;
|
||||
irq_drain_fence[3] |= node_id << 16;
|
||||
}
|
||||
|
||||
/* ensure stale irqs scheduled KFD interrupts and send drain fence. */
|
||||
if (amdgpu_amdkfd_send_close_event_drain_irq(pdd->dev->adev,
|
||||
irq_drain_fence)) {
|
||||
|
||||
Reference in New Issue
Block a user