drivers/gpu/drm/nouveau/nvkm/subdev/vfn/tu102.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/subdev/vfn/tu102.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/nvkm/subdev/vfn/tu102.c
Extension
.c
Size
3448 bytes
Lines
114
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

if (intr_top & BIT(leaf / 2)) {
			intr->stat[leaf] = nvkm_rd32(device, vfn->addr.priv + 0x1000 + (leaf * 4));
			if (intr->stat[leaf])
				pending++;
		} else {
			intr->stat[leaf] = 0;
		}
	}

	return pending != 0;
}

const struct nvkm_intr_func
tu102_vfn_intr = {
	.pending = tu102_vfn_intr_pending,
	.unarm = tu102_vfn_intr_unarm,
	.rearm = tu102_vfn_intr_rearm,
	.block = tu102_vfn_intr_block,
	.allow = tu102_vfn_intr_allow,
	.reset = tu102_vfn_intr_reset,
};

static const struct nvkm_vfn_func
tu102_vfn = {
	.intr = &tu102_vfn_intr,
	.user = { 0x030000, 0x010000, { -1, -1, TURING_USERMODE_A } },
};

int
tu102_vfn_new(struct nvkm_device *device,
	      enum nvkm_subdev_type type, int inst, struct nvkm_vfn **pvfn)
{
	if (nvkm_gsp_rm(device->gsp))
		return r535_vfn_new(&tu102_vfn, device, type, inst, 0xb80000, pvfn);

	return nvkm_vfn_new_(&tu102_vfn, device, type, inst, 0xb80000, pvfn);
}

Annotation

Implementation Notes