drivers/gpu/drm/imagination/pvr_rogue_fwif_sf.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/imagination/pvr_rogue_fwif_sf.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/imagination/pvr_rogue_fwif_sf.h
Extension
.h
Size
93323 bytes
Lines
1649
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

struct rogue_fw_stid_fmt {
	u32 id;
	char name[PVR_SF_STRING_MAX_SIZE];
};

/*
 *  The symbolic names found in the table above are assigned an u32 value of
 *  the following format:
 *  31 30 28 27       20   19  16    15  12      11            0   bits
 *  -   ---   ---- ----     ----      ----        ---- ---- ----
 *     0-11: id number
 *    12-15: group id number
 *    16-19: number of parameters
 *    20-27: unused
 *    28-30: active: identify SF packet, otherwise regular int32
 *       31: reserved for signed/unsigned compatibility
 *
 *   The following macro assigns those values to the enum generated SF ids list.
 */
#define ROGUE_FW_LOG_IDMARKER (0x70000000U)
#define ROGUE_FW_LOG_CREATESFID(a, b, e) ((u32)(a) | ((u32)(b) << 12) | ((u32)(e) << 16) | \
					  ROGUE_FW_LOG_IDMARKER)

#define ROGUE_FW_LOG_IDMASK (0xFFF00000)
#define ROGUE_FW_LOG_VALIDID(I) (((I) & ROGUE_FW_LOG_IDMASK) == ROGUE_FW_LOG_IDMARKER)

/* Return the group id that the given (enum generated) id belongs to */
#define ROGUE_FW_SF_GID(x) (((u32)(x) >> 12) & 0xfU)
/* Returns how many arguments the SF(string format) for the given (enum generated) id requires */
#define ROGUE_FW_SF_PARAMNUM(x) (((u32)(x) >> 16) & 0xfU)

/* pair of string format id and string formats */
struct rogue_km_stid_fmt {
	u32 id;
	const char *name;
};

static const struct rogue_km_stid_fmt stid_fmts[] = {
	{ ROGUE_FW_LOG_CREATESFID(0, ROGUE_FW_GROUP_NULL, 0),
	  "You should not use this string" },

	{ ROGUE_FW_LOG_CREATESFID(1, ROGUE_FW_GROUP_MAIN, 6),
	  "Kick 3D: FWCtx 0x%08.8x @ %d, RTD 0x%08x. Partial render:%d, CSW resume:%d, prio:%d" },
	{ ROGUE_FW_LOG_CREATESFID(2, ROGUE_FW_GROUP_MAIN, 2),
	  "3D finished, HWRTData0State=%x, HWRTData1State=%x" },
	{ ROGUE_FW_LOG_CREATESFID(3, ROGUE_FW_GROUP_MAIN, 4),
	  "Kick 3D TQ: FWCtx 0x%08.8x @ %d, CSW resume:%d, prio: %d" },
	{ ROGUE_FW_LOG_CREATESFID(4, ROGUE_FW_GROUP_MAIN, 0),
	  "3D Transfer finished" },
	{ ROGUE_FW_LOG_CREATESFID(5, ROGUE_FW_GROUP_MAIN, 3),
	  "Kick Compute: FWCtx 0x%08.8x @ %d, prio: %d" },
	{ ROGUE_FW_LOG_CREATESFID(6, ROGUE_FW_GROUP_MAIN, 0),
	  "Compute finished" },
	{ ROGUE_FW_LOG_CREATESFID(7, ROGUE_FW_GROUP_MAIN, 7),
	  "Kick TA: FWCtx 0x%08.8x @ %d, RTD 0x%08x. First kick:%d, Last kick:%d, CSW resume:%d, prio:%d" },
	{ ROGUE_FW_LOG_CREATESFID(8, ROGUE_FW_GROUP_MAIN, 0),
	  "TA finished" },
	{ ROGUE_FW_LOG_CREATESFID(9, ROGUE_FW_GROUP_MAIN, 0),
	  "Restart TA after partial render" },
	{ ROGUE_FW_LOG_CREATESFID(10, ROGUE_FW_GROUP_MAIN, 0),
	  "Resume TA without partial render" },
	{ ROGUE_FW_LOG_CREATESFID(11, ROGUE_FW_GROUP_MAIN, 2),
	  "Out of memory! Context 0x%08x, HWRTData 0x%x" },
	{ ROGUE_FW_LOG_CREATESFID(12, ROGUE_FW_GROUP_MAIN, 3),
	  "Kick TLA: FWCtx 0x%08.8x @ %d, prio:%d" },
	{ ROGUE_FW_LOG_CREATESFID(13, ROGUE_FW_GROUP_MAIN, 0),
	  "TLA finished" },
	{ ROGUE_FW_LOG_CREATESFID(14, ROGUE_FW_GROUP_MAIN, 3),
	  "cCCB Woff update = %d, DM = %d, FWCtx = 0x%08.8x" },
	{ ROGUE_FW_LOG_CREATESFID(16, ROGUE_FW_GROUP_MAIN, 2),
	  "UFO Checks for FWCtx 0x%08.8x @ %d" },
	{ ROGUE_FW_LOG_CREATESFID(17, ROGUE_FW_GROUP_MAIN, 3),
	  "UFO Check: [0x%08.8x] is 0x%08.8x requires 0x%08.8x" },
	{ ROGUE_FW_LOG_CREATESFID(18, ROGUE_FW_GROUP_MAIN, 0),
	  "UFO Checks succeeded" },
	{ ROGUE_FW_LOG_CREATESFID(19, ROGUE_FW_GROUP_MAIN, 3),
	  "UFO PR-Check: [0x%08.8x] is 0x%08.8x requires >= 0x%08.8x" },
	{ ROGUE_FW_LOG_CREATESFID(20, ROGUE_FW_GROUP_MAIN, 1),
	  "UFO SPM PR-Checks for FWCtx 0x%08.8x" },
	{ ROGUE_FW_LOG_CREATESFID(21, ROGUE_FW_GROUP_MAIN, 4),
	  "UFO SPM special PR-Check: [0x%08.8x] is 0x%08.8x requires >= ????????, [0x%08.8x] is ???????? requires 0x%08.8x" },
	{ ROGUE_FW_LOG_CREATESFID(22, ROGUE_FW_GROUP_MAIN, 2),
	  "UFO Updates for FWCtx 0x%08.8x @ %d" },
	{ ROGUE_FW_LOG_CREATESFID(23, ROGUE_FW_GROUP_MAIN, 2),
	  "UFO Update: [0x%08.8x] = 0x%08.8x" },
	{ ROGUE_FW_LOG_CREATESFID(24, ROGUE_FW_GROUP_MAIN, 1),
	  "ASSERT Failed: line %d of:" },
	{ ROGUE_FW_LOG_CREATESFID(25, ROGUE_FW_GROUP_MAIN, 2),
	  "HWR: Lockup detected on DM%d, FWCtx: 0x%08.8x" },
	{ ROGUE_FW_LOG_CREATESFID(26, ROGUE_FW_GROUP_MAIN, 3),

Annotation

Implementation Notes