drivers/gpu/drm/nouveau/nvif/head.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvif/head.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/nvif/head.c
Extension
.c
Size
2037 bytes
Lines
59
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 <nvif/head.h>
#include <nvif/disp.h>
#include <nvif/printf.h>

#include <nvif/class.h>
#include <nvif/if0013.h>

int
nvif_head_vblank_event_ctor(struct nvif_head *head, const char *name, nvif_event_func func,
			    bool wait, struct nvif_event *event)
{
	int ret = nvif_event_ctor(&head->object, name ?: "nvifHeadVBlank", nvif_head_id(head),
				  func, wait, NULL, 0, event);
	NVIF_ERRON(ret, &head->object, "[NEW EVENT:VBLANK]");
	return ret;
}

void
nvif_head_dtor(struct nvif_head *head)
{
	nvif_object_dtor(&head->object);
}

int
nvif_head_ctor(struct nvif_disp *disp, const char *name, int id, struct nvif_head *head)
{
	struct nvif_head_v0 args;
	int ret;

	args.version = 0;
	args.id = id;

	ret = nvif_object_ctor(&disp->object, name ? name : "nvifHead", id, NVIF_CLASS_HEAD,
			       &args, sizeof(args), &head->object);
	NVIF_ERRON(ret, &disp->object, "[NEW head id:%d]", args.id);
	return ret;
}

Annotation

Implementation Notes