drivers/gpu/drm/nouveau/nouveau_exec.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nouveau_exec.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/nouveau_exec.h
Extension
.h
Size
1260 bytes
Lines
61
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 nouveau_exec_job_args {
	struct drm_file *file_priv;
	struct nouveau_sched *sched;
	struct nouveau_channel *chan;

	struct {
		struct drm_nouveau_sync *s;
		u32 count;
	} in_sync;

	struct {
		struct drm_nouveau_sync *s;
		u32 count;
	} out_sync;

	struct {
		struct drm_nouveau_exec_push *s;
		u32 count;
	} push;
};

struct nouveau_exec_job {
	struct nouveau_job base;
	struct nouveau_fence *fence;
	struct nouveau_channel *chan;

	struct {
		struct drm_nouveau_exec_push *s;
		u32 count;
	} push;
};

#define to_nouveau_exec_job(job)		\
		container_of((job), struct nouveau_exec_job, base)

int nouveau_exec_job_init(struct nouveau_exec_job **job,
			  struct nouveau_exec_job_args *args);

int nouveau_exec_ioctl_exec(struct drm_device *dev, void *data,
			    struct drm_file *file_priv);

static inline unsigned int
nouveau_exec_push_max_from_ib_max(int ib_max)
{
	/* Limit the number of IBs per job to half the size of the ring in order
	 * to avoid the ring running dry between submissions and preserve one
	 * more slot for the job's HW fence.
	 */
	return ib_max > 1 ? ib_max / 2 - 1 : 0;
}

#endif

Annotation

Implementation Notes