drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
Extension
.c
Size
16335 bytes
Lines
419
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

KFD_DBG_EC_TYPE_IS_PACKET(KFD_CTXID0_CP_BAD_OP_ECODE(context_id0))) {
			u32 doorbell_id = KFD_CTXID0_DOORBELL_ID(context_id0);

			kfd_set_dbg_ev_from_interrupt(dev, pasid, doorbell_id,
				KFD_EC_MASK(KFD_CTXID0_CP_BAD_OP_ECODE(context_id0)),
				NULL, 0);
			kfd_dqm_suspend_bad_queue_mes(dev, pasid, doorbell_id);
		}

		/* SDMA */
		else if (source_id == SOC21_INTSRC_SDMA_TRAP)
			kfd_signal_event_interrupt(pasid, context_id0 & 0xfffffff, 28, true);
		else if (source_id == SOC21_INTSRC_SDMA_ECC) {
			event_interrupt_poison_consumption_v11(dev, pasid, source_id);
			return;
		}

		/* SQ */
		else if (source_id == SOC15_INTSRC_SQ_INTERRUPT_MSG) {
			sq_int_enc = REG_GET_FIELD(context_id1,
					SQ_INTERRUPT_WORD_WAVE_CTXID1, ENCODING);
			switch (sq_int_enc) {
			case SQ_INTERRUPT_WORD_ENCODING_AUTO:
				print_sq_intr_info_auto(dev, context_id0, context_id1);
				break;
			case SQ_INTERRUPT_WORD_ENCODING_INST:
				print_sq_intr_info_inst(dev, context_id0, context_id1);
				sq_int_priv = REG_GET_FIELD(context_id0,
						SQ_INTERRUPT_WORD_WAVE_CTXID0, PRIV);
				if (sq_int_priv && (kfd_set_dbg_ev_from_interrupt(dev, pasid,
						KFD_CTXID0_DOORBELL_ID(context_id0),
						KFD_CTXID0_TRAP_CODE(context_id0),
						NULL, 0)))
					return;
				break;
			case SQ_INTERRUPT_WORD_ENCODING_ERROR:
				print_sq_intr_info_error(dev, context_id0, context_id1);
				sq_int_errtype = REG_GET_FIELD(context_id0,
						SQ_INTERRUPT_WORD_ERROR_CTXID0, TYPE);
				if (sq_int_errtype != SQ_INTERRUPT_ERROR_TYPE_ILLEGAL_INST &&
				    sq_int_errtype != SQ_INTERRUPT_ERROR_TYPE_MEMVIOL) {
					event_interrupt_poison_consumption_v11(
							dev, pasid, source_id);
					return;
				}
				break;
			default:
				break;
			}
			kfd_signal_event_interrupt(pasid, context_id0 & 0xffffff, 24, true);
		}

	} else if (KFD_IRQ_IS_FENCE(client_id, source_id)) {
		kfd_process_close_interrupt_drain(pasid);
	}
}

const struct kfd_event_interrupt_class event_interrupt_class_v11 = {
	.interrupt_isr = event_interrupt_isr_v11,
	.interrupt_wq = event_interrupt_wq_v11,
};

Annotation

Implementation Notes