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

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

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/dispnv50/cursc37a.c
Extension
.c
Size
2133 bytes
Lines
63
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 "atom.h"

#include <nvhw/class/clc37a.h>

static int
cursc37a_update(struct nv50_wndw *wndw, u32 *interlock)
{
	struct nvif_object *user = &wndw->wimm.base.user;
	int ret = nvif_chan_wait(&wndw->wimm, 1);
	if (ret == 0)
		NVIF_WR32(user, NVC37A, UPDATE, 0x00000001);
	return ret;
}

static int
cursc37a_point(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
	struct nvif_object *user = &wndw->wimm.base.user;
	int ret = nvif_chan_wait(&wndw->wimm, 1);
	if (ret == 0) {
		NVIF_WR32(user, NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT(0),
			  NVVAL(NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT, X, asyw->point.x) |
			  NVVAL(NVC37A, SET_CURSOR_HOT_SPOT_POINT_OUT, Y, asyw->point.y));
	}
	return ret;
}

static const struct nv50_wimm_func
cursc37a = {
	.point = cursc37a_point,
	.update = cursc37a_update,
};

int
cursc37a_new(struct nouveau_drm *drm, int head, s32 oclass,
	     struct nv50_wndw **pwndw)
{
	return curs507a_new_(&cursc37a, drm, head, oclass,
			     0x00000001 << head, pwndw);
}

Annotation

Implementation Notes