drivers/gpu/drm/i915/i915_scheduler.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_scheduler.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_scheduler.h- Extension
.h- Size
- 2904 bytes
- Lines
- 110
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitops.hlinux/list.hlinux/kernel.hi915_scheduler_types.hi915_tasklet.h
Detected Declarations
struct drm_printerfunction i915_priolist_freefunction i915_sched_engine_getfunction i915_sched_engine_putfunction i915_sched_engine_is_emptyfunction i915_sched_engine_reset_on_emptyfunction i915_sched_engine_active_lock_bhfunction i915_sched_engine_active_unlock_bhfunction i915_sched_engine_disabled
Annotated Snippet
#ifndef _I915_SCHEDULER_H_
#define _I915_SCHEDULER_H_
#include <linux/bitops.h>
#include <linux/list.h>
#include <linux/kernel.h>
#include "i915_scheduler_types.h"
#include "i915_tasklet.h"
struct drm_printer;
#define priolist_for_each_request(it, plist) \
list_for_each_entry(it, &(plist)->requests, sched.link)
#define priolist_for_each_request_consume(it, n, plist) \
list_for_each_entry_safe(it, n, &(plist)->requests, sched.link)
void i915_sched_node_init(struct i915_sched_node *node);
void i915_sched_node_reinit(struct i915_sched_node *node);
bool __i915_sched_node_add_dependency(struct i915_sched_node *node,
struct i915_sched_node *signal,
struct i915_dependency *dep,
unsigned long flags);
int i915_sched_node_add_dependency(struct i915_sched_node *node,
struct i915_sched_node *signal,
unsigned long flags);
void i915_sched_node_fini(struct i915_sched_node *node);
void i915_schedule(struct i915_request *request,
const struct i915_sched_attr *attr);
struct list_head *
i915_sched_lookup_priolist(struct i915_sched_engine *sched_engine, int prio);
void __i915_priolist_free(struct i915_priolist *p);
static inline void i915_priolist_free(struct i915_priolist *p)
{
if (p->priority != I915_PRIORITY_NORMAL)
__i915_priolist_free(p);
}
struct i915_sched_engine *
i915_sched_engine_create(unsigned int subclass);
static inline struct i915_sched_engine *
i915_sched_engine_get(struct i915_sched_engine *sched_engine)
{
kref_get(&sched_engine->ref);
return sched_engine;
}
static inline void
i915_sched_engine_put(struct i915_sched_engine *sched_engine)
{
kref_put(&sched_engine->ref, sched_engine->destroy);
}
static inline bool
i915_sched_engine_is_empty(struct i915_sched_engine *sched_engine)
{
return RB_EMPTY_ROOT(&sched_engine->queue.rb_root);
}
static inline void
i915_sched_engine_reset_on_empty(struct i915_sched_engine *sched_engine)
{
if (i915_sched_engine_is_empty(sched_engine))
sched_engine->no_priolist = false;
}
static inline void
i915_sched_engine_active_lock_bh(struct i915_sched_engine *sched_engine)
{
local_bh_disable(); /* prevent local softirq and lock recursion */
tasklet_lock(&sched_engine->tasklet);
}
static inline void
i915_sched_engine_active_unlock_bh(struct i915_sched_engine *sched_engine)
{
tasklet_unlock(&sched_engine->tasklet);
local_bh_enable(); /* restore softirq, and kick ksoftirqd! */
}
void i915_request_show_with_schedule(struct drm_printer *m,
const struct i915_request *rq,
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/list.h`, `linux/kernel.h`, `i915_scheduler_types.h`, `i915_tasklet.h`.
- Detected declarations: `struct drm_printer`, `function i915_priolist_free`, `function i915_sched_engine_get`, `function i915_sched_engine_put`, `function i915_sched_engine_is_empty`, `function i915_sched_engine_reset_on_empty`, `function i915_sched_engine_active_lock_bh`, `function i915_sched_engine_active_unlock_bh`, `function i915_sched_engine_disabled`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.