drivers/gpu/drm/i915/i915_drm_client.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_drm_client.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_drm_client.h- Extension
.h- Size
- 2165 bytes
- Lines
- 93
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kref.hlinux/list.hlinux/spinlock.huapi/drm/i915_drm.hi915_file_private.hgem/i915_gem_object_types.hgt/intel_context_types.h
Detected Declarations
struct drm_filestruct drm_printerstruct i915_drm_clientfunction i915_drm_client_getfunction i915_drm_client_putfunction i915_drm_client_add_object
Annotated Snippet
struct i915_drm_client {
struct kref kref;
spinlock_t ctx_lock; /* For add/remove from ctx_list. */
struct list_head ctx_list; /* List of contexts belonging to client. */
#ifdef CONFIG_PROC_FS
/**
* @objects_lock: lock protecting @objects_list
*/
spinlock_t objects_lock;
/**
* @objects_list: list of objects created by this client
*
* Protected by @objects_lock.
*/
struct list_head objects_list;
#endif
/**
* @past_runtime: Accumulation of pphwsp runtimes from closed contexts.
*/
atomic64_t past_runtime[I915_LAST_UABI_ENGINE_CLASS + 1];
};
static inline struct i915_drm_client *
i915_drm_client_get(struct i915_drm_client *client)
{
kref_get(&client->kref);
return client;
}
void __i915_drm_client_free(struct kref *kref);
static inline void i915_drm_client_put(struct i915_drm_client *client)
{
kref_put(&client->kref, __i915_drm_client_free);
}
struct i915_drm_client *i915_drm_client_alloc(void);
void i915_drm_client_fdinfo(struct drm_printer *p, struct drm_file *file);
#ifdef CONFIG_PROC_FS
void i915_drm_client_add_object(struct i915_drm_client *client,
struct drm_i915_gem_object *obj);
void i915_drm_client_remove_object(struct drm_i915_gem_object *obj);
void i915_drm_client_add_context_objects(struct i915_drm_client *client,
struct intel_context *ce);
#else
static inline void i915_drm_client_add_object(struct i915_drm_client *client,
struct drm_i915_gem_object *obj)
{
}
static inline void
i915_drm_client_remove_object(struct drm_i915_gem_object *obj)
{
}
static inline void
i915_drm_client_add_context_objects(struct i915_drm_client *client,
struct intel_context *ce)
{
}
#endif
#endif /* !__I915_DRM_CLIENT_H__ */
Annotation
- Immediate include surface: `linux/kref.h`, `linux/list.h`, `linux/spinlock.h`, `uapi/drm/i915_drm.h`, `i915_file_private.h`, `gem/i915_gem_object_types.h`, `gt/intel_context_types.h`.
- Detected declarations: `struct drm_file`, `struct drm_printer`, `struct i915_drm_client`, `function i915_drm_client_get`, `function i915_drm_client_put`, `function i915_drm_client_add_object`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source 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.