drivers/gpu/drm/nouveau/dispnv50/curs.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/dispnv50/curs.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/dispnv50/curs.c
Extension
.c
Size
2016 bytes
Lines
56
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 "curs.h"

#include <nvif/class.h>

int
nv50_curs_new(struct nouveau_drm *drm, int head, struct nv50_wndw **pwndw)
{
	struct {
		s32 oclass;
		int version;
		int (*new)(struct nouveau_drm *, int, s32, struct nv50_wndw **);
	} curses[] = {
		{ GB202_DISP_CURSOR, 0, cursc37a_new },
		{ GA102_DISP_CURSOR, 0, cursc37a_new },
		{ TU102_DISP_CURSOR, 0, cursc37a_new },
		{ GV100_DISP_CURSOR, 0, cursc37a_new },
		{ GK104_DISP_CURSOR, 0, curs907a_new },
		{ GF110_DISP_CURSOR, 0, curs907a_new },
		{ GT214_DISP_CURSOR, 0, curs507a_new },
		{   G82_DISP_CURSOR, 0, curs507a_new },
		{  NV50_DISP_CURSOR, 0, curs507a_new },
		{}
	};
	struct nv50_disp *disp = nv50_disp(drm->dev);
	int cid;

	cid = nvif_mclass(&disp->disp->object, curses);
	if (cid < 0) {
		NV_ERROR(drm, "No supported cursor immediate class\n");
		return cid;
	}

	return curses[cid].new(drm, head, curses[cid].oclass, pwndw);
}

Annotation

Implementation Notes