drivers/gpu/drm/i915/gem/i915_gem_context.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/gem/i915_gem_context.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/gem/i915_gem_context.h- Extension
.h- Size
- 6663 bytes
- Lines
- 248
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
i915_gem_context_types.hgt/intel_context.hi915_drv.hi915_gem.hi915_scheduler.hintel_device_info.h
Detected Declarations
struct drm_devicestruct drm_filefunction i915_gem_context_is_closedfunction i915_gem_context_set_closedfunction i915_gem_context_no_error_capturefunction i915_gem_context_set_no_error_capturefunction i915_gem_context_clear_no_error_capturefunction i915_gem_context_is_bannablefunction i915_gem_context_set_bannablefunction i915_gem_context_clear_bannablefunction i915_gem_context_is_recoverablefunction i915_gem_context_set_recoverablefunction i915_gem_context_clear_recoverablefunction i915_gem_context_is_persistentfunction i915_gem_context_set_persistencefunction i915_gem_context_clear_persistencefunction i915_gem_context_user_enginesfunction i915_gem_context_set_user_enginesfunction i915_gem_context_clear_user_enginesfunction i915_gem_context_uses_protected_contentfunction i915_gem_context_getfunction i915_gem_context_putfunction i915_gem_context_vmfunction i915_gem_context_has_full_ppgttfunction i915_gem_context_get_eb_vmfunction i915_gem_context_enginesfunction i915_gem_context_lock_enginesfunction i915_gem_context_unlock_enginesfunction i915_gem_context_get_enginefunction i915_gem_engines_iter_init
Annotated Snippet
#ifndef __I915_GEM_CONTEXT_H__
#define __I915_GEM_CONTEXT_H__
#include "i915_gem_context_types.h"
#include "gt/intel_context.h"
#include "i915_drv.h"
#include "i915_gem.h"
#include "i915_scheduler.h"
#include "intel_device_info.h"
struct drm_device;
struct drm_file;
static inline bool i915_gem_context_is_closed(const struct i915_gem_context *ctx)
{
return test_bit(CONTEXT_CLOSED, &ctx->flags);
}
static inline void i915_gem_context_set_closed(struct i915_gem_context *ctx)
{
GEM_BUG_ON(i915_gem_context_is_closed(ctx));
set_bit(CONTEXT_CLOSED, &ctx->flags);
}
static inline bool i915_gem_context_no_error_capture(const struct i915_gem_context *ctx)
{
return test_bit(UCONTEXT_NO_ERROR_CAPTURE, &ctx->user_flags);
}
static inline void i915_gem_context_set_no_error_capture(struct i915_gem_context *ctx)
{
set_bit(UCONTEXT_NO_ERROR_CAPTURE, &ctx->user_flags);
}
static inline void i915_gem_context_clear_no_error_capture(struct i915_gem_context *ctx)
{
clear_bit(UCONTEXT_NO_ERROR_CAPTURE, &ctx->user_flags);
}
static inline bool i915_gem_context_is_bannable(const struct i915_gem_context *ctx)
{
return test_bit(UCONTEXT_BANNABLE, &ctx->user_flags);
}
static inline void i915_gem_context_set_bannable(struct i915_gem_context *ctx)
{
set_bit(UCONTEXT_BANNABLE, &ctx->user_flags);
}
static inline void i915_gem_context_clear_bannable(struct i915_gem_context *ctx)
{
clear_bit(UCONTEXT_BANNABLE, &ctx->user_flags);
}
static inline bool i915_gem_context_is_recoverable(const struct i915_gem_context *ctx)
{
return test_bit(UCONTEXT_RECOVERABLE, &ctx->user_flags);
}
static inline void i915_gem_context_set_recoverable(struct i915_gem_context *ctx)
{
set_bit(UCONTEXT_RECOVERABLE, &ctx->user_flags);
}
static inline void i915_gem_context_clear_recoverable(struct i915_gem_context *ctx)
{
clear_bit(UCONTEXT_RECOVERABLE, &ctx->user_flags);
}
static inline bool i915_gem_context_is_persistent(const struct i915_gem_context *ctx)
{
return test_bit(UCONTEXT_PERSISTENCE, &ctx->user_flags);
}
static inline void i915_gem_context_set_persistence(struct i915_gem_context *ctx)
{
set_bit(UCONTEXT_PERSISTENCE, &ctx->user_flags);
}
static inline void i915_gem_context_clear_persistence(struct i915_gem_context *ctx)
{
clear_bit(UCONTEXT_PERSISTENCE, &ctx->user_flags);
}
static inline bool
i915_gem_context_user_engines(const struct i915_gem_context *ctx)
{
return test_bit(CONTEXT_USER_ENGINES, &ctx->flags);
Annotation
- Immediate include surface: `i915_gem_context_types.h`, `gt/intel_context.h`, `i915_drv.h`, `i915_gem.h`, `i915_scheduler.h`, `intel_device_info.h`.
- Detected declarations: `struct drm_device`, `struct drm_file`, `function i915_gem_context_is_closed`, `function i915_gem_context_set_closed`, `function i915_gem_context_no_error_capture`, `function i915_gem_context_set_no_error_capture`, `function i915_gem_context_clear_no_error_capture`, `function i915_gem_context_is_bannable`, `function i915_gem_context_set_bannable`, `function i915_gem_context_clear_bannable`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.