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

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

File Facts

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

#include "priv.h"

#include <rm/gpu.h>

static void
r535_vfn_dtor(struct nvkm_vfn *vfn)
{
	kfree(vfn->func);
}

int
r535_vfn_new(const struct nvkm_vfn_func *hw,
	     struct nvkm_device *device, enum nvkm_subdev_type type, int inst, u32 addr,
	     struct nvkm_vfn **pvfn)
{
	const struct nvkm_rm_gpu *gpu = device->gsp->rm->gpu;
	struct nvkm_vfn_func *rm;
	int ret;

	if (!(rm = kzalloc_obj(*rm)))
		return -ENOMEM;

	rm->dtor = r535_vfn_dtor;
	rm->intr = &tu102_vfn_intr;
	rm->user.addr = 0x030000;
	rm->user.size = 0x010000;
	rm->user.base.minver = -1;
	rm->user.base.maxver = -1;
	rm->user.base.oclass = gpu->usermode.class;

	ret = nvkm_vfn_new_(rm, device, type, inst, addr, pvfn);
	if (ret)
		kfree(rm);

	return ret;
}

Annotation

Implementation Notes