drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc
Extension
.fuc
Size
13459 bytes
Lines
493
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: drivers/gpu
Status
atlas-only

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

#ifdef INCLUDE_DATA
gpc_mmio_list_head:	.b32 #mmio_list_base
gpc_mmio_list_tail:
tpc_mmio_list_head:	.b32 #mmio_list_base
tpc_mmio_list_tail:
unk_mmio_list_head:	.b32 #mmio_list_base
unk_mmio_list_tail:	.b32 #mmio_list_base

gpc_id:			.b32 0

tpc_count:		.b32 0
tpc_mask:		.b32 0

#if NV_PGRAPH_GPCX_UNK__SIZE > 0
unk_count:		.b32 0
unk_mask:		.b32 0
#endif

cmd_queue:		queue_init

mmio_list_base:
#endif

#ifdef INCLUDE_CODE
#define gpc_addr(reg,addr)                                                    /*
*/	imm32(reg,addr)                                                       /*
*/	or reg NV_PGRAPH_GPCX_GPCCS_MMIO_CTRL_BASE_ENABLE
#define gpc_wr32(addr,reg)                                                    /*
*/	gpc_addr($r14,addr)                                                   /*
*/	mov b32 $r15 reg                                                      /*
*/	call(nv_wr32)

// reports an exception to the host
//
// In: $r15 error code (see os.h)
//
error:
	push $r14
	nv_wr32(NV_PGRAPH_FECS_CC_SCRATCH_VAL(5), $r15)
	mov $r15 1
	nv_wr32(NV_PGRAPH_FECS_INTR_UP_SET, $r15)
	pop $r14
	ret

#if CHIPSET >= GM107
tpc_strand_wait:
	push $r9
	trace_set(T_STRTPC)
	tpc_strand_busy:
		nv_iord($r9, NV_PGRAPH_GPCX_GPCCS_TPC_STATUS, 0)
		bra b32 $r9 0x0 ne #tpc_strand_busy
	trace_clr(T_STRTPC)
	pop $r9
	ret

#define tpc_strand_wait() call(tpc_strand_wait)
#define tpc_strand_enable()                                                   /*
*/	mov $r15 NV_PGRAPH_GPC0_TPCX_STRAND_CMD_ENABLE                        /*
*/	gpc_wr32(NV_PGRAPH_GPC0_TPCX_STRAND_CMD, $r15)                        /*
*/	tpc_strand_wait()
#define tpc_strand_disable()                                                  /*
*/	mov $r15 NV_PGRAPH_GPC0_TPCX_STRAND_CMD_DISABLE                       /*
*/	gpc_wr32(NV_PGRAPH_GPC0_TPCX_STRAND_CMD, $r15)                        /*
*/	tpc_strand_wait()
#define tpc_strand_seek(p)                                                    /*
*/	mov $r15 NV_PGRAPH_GPC0_TPCX_STRAND_INDEX_ALL                         /*
*/	gpc_wr32(NV_PGRAPH_GPC0_TPCX_STRAND_INDEX, $r15)                      /*
*/	mov $r15 p                                                            /*
*/	gpc_wr32(NV_PGRAPH_GPC0_TPCX_STRAND_SELECT, $r15)                     /*
*/	mov $r15 NV_PGRAPH_GPC0_TPCX_STRAND_CMD_SEEK                          /*

Annotation

Implementation Notes