drivers/gpu/drm/nouveau/include/nvif/log.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/include/nvif/log.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/include/nvif/log.h
Extension
.h
Size
1183 bytes
Lines
52
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 nvif_log {
	struct list_head entry;
	void (*shutdown)(struct nvif_log *log);
};

/**
 * nvif_logs - linked list of nvif_log objects
 */
struct nvif_logs {
	struct list_head head;
};

#define NVIF_LOGS_DECLARE(logs) \
	struct nvif_logs logs = { LIST_HEAD_INIT(logs.head) }

static inline void nvif_log_shutdown(struct nvif_logs *logs)
{
	if (!list_empty(&logs->head)) {
		struct nvif_log *log, *n;

		list_for_each_entry_safe(log, n, &logs->head, entry) {
			/* shutdown() should also delete the log entry */
			log->shutdown(log);
		}
	}
}

extern struct nvif_logs gsp_logs;

#endif

#endif

Annotation

Implementation Notes