drivers/gpu/drm/i915/i915_vma.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_vma.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_vma.h- Extension
.h- Size
- 14231 bytes
- Lines
- 480
- 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
linux/io-mapping.hlinux/rbtree.hdrm/drm_mm.hgem/i915_gem_object.hgt/intel_ggtt_fencing.hi915_active.hi915_gem_gtt.hi915_ptr_util.hi915_request.hi915_vma_resource.hi915_vma_types.h
Detected Declarations
function i915_vma_is_activefunction i915_vma_move_to_activefunction i915_vma_is_ggttfunction i915_vma_is_dptfunction i915_vma_has_ggtt_writefunction i915_vma_set_ggtt_writefunction i915_vma_unset_ggtt_writefunction i915_vma_is_map_and_fenceablefunction i915_vma_set_userfaultfunction i915_vma_unset_userfaultfunction i915_vma_has_userfaultfunction i915_vma_is_closedfunction __i915_vma_sizefunction i915_vma_sizefunction __i915_vma_offsetfunction i915_vma_offsetfunction i915_ggtt_offsetfunction i915_ggtt_pin_biasfunction i915_vma_putfunction i915_vma_comparefunction i915_vma_lockfunction i915_vma_unlockfunction i915_vma_pin_countfunction i915_vma_is_pinnedfunction __i915_vma_pinfunction __i915_vma_unpinfunction i915_vma_unpinfunction i915_vma_is_boundfunction i915_node_color_differsfunction __i915_vma_unpin_fencefunction i915_vma_unpin_fencefunction i915_vma_is_scanoutfunction i915_vma_mark_scanoutfunction i915_vma_clear_scanoutfunction i915_vma_syncfunction i915_vma_get_current_resource
Annotated Snippet
#ifndef __I915_VMA_H__
#define __I915_VMA_H__
#include <linux/io-mapping.h>
#include <linux/rbtree.h>
#include <drm/drm_mm.h>
#include "gem/i915_gem_object.h"
#include "gt/intel_ggtt_fencing.h"
#include "i915_active.h"
#include "i915_gem_gtt.h"
#include "i915_ptr_util.h"
#include "i915_request.h"
#include "i915_vma_resource.h"
#include "i915_vma_types.h"
struct i915_vma *
i915_vma_instance(struct drm_i915_gem_object *obj,
struct i915_address_space *vm,
const struct i915_gtt_view *view);
void i915_vma_unpin_and_release(struct i915_vma **p_vma, unsigned int flags);
#define I915_VMA_RELEASE_MAP BIT(0)
static inline bool i915_vma_is_active(const struct i915_vma *vma)
{
return !i915_active_is_idle(&vma->active);
}
/* do not reserve memory to prevent deadlocks */
#define __EXEC_OBJECT_NO_RESERVE BIT(31)
#define __EXEC_OBJECT_NO_REQUEST_AWAIT BIT(30)
int __must_check _i915_vma_move_to_active(struct i915_vma *vma,
struct i915_request *rq,
struct dma_fence *fence,
unsigned int flags);
static inline int __must_check
i915_vma_move_to_active(struct i915_vma *vma, struct i915_request *rq,
unsigned int flags)
{
return _i915_vma_move_to_active(vma, rq, &rq->fence, flags);
}
#define __i915_vma_flags(v) ((unsigned long *)&(v)->flags.counter)
static inline bool i915_vma_is_ggtt(const struct i915_vma *vma)
{
return test_bit(I915_VMA_GGTT_BIT, __i915_vma_flags(vma));
}
static inline bool i915_vma_is_dpt(const struct i915_vma *vma)
{
return i915_is_dpt(vma->vm);
}
static inline bool i915_vma_has_ggtt_write(const struct i915_vma *vma)
{
return test_bit(I915_VMA_GGTT_WRITE_BIT, __i915_vma_flags(vma));
}
static inline void i915_vma_set_ggtt_write(struct i915_vma *vma)
{
GEM_BUG_ON(!i915_vma_is_ggtt(vma));
set_bit(I915_VMA_GGTT_WRITE_BIT, __i915_vma_flags(vma));
}
static inline bool i915_vma_unset_ggtt_write(struct i915_vma *vma)
{
return test_and_clear_bit(I915_VMA_GGTT_WRITE_BIT,
__i915_vma_flags(vma));
}
void i915_vma_flush_writes(struct i915_vma *vma);
static inline bool i915_vma_is_map_and_fenceable(const struct i915_vma *vma)
{
return test_bit(I915_VMA_CAN_FENCE_BIT, __i915_vma_flags(vma));
}
static inline bool i915_vma_set_userfault(struct i915_vma *vma)
{
GEM_BUG_ON(!i915_vma_is_map_and_fenceable(vma));
return test_and_set_bit(I915_VMA_USERFAULT_BIT, __i915_vma_flags(vma));
}
static inline void i915_vma_unset_userfault(struct i915_vma *vma)
{
Annotation
- Immediate include surface: `linux/io-mapping.h`, `linux/rbtree.h`, `drm/drm_mm.h`, `gem/i915_gem_object.h`, `gt/intel_ggtt_fencing.h`, `i915_active.h`, `i915_gem_gtt.h`, `i915_ptr_util.h`.
- Detected declarations: `function i915_vma_is_active`, `function i915_vma_move_to_active`, `function i915_vma_is_ggtt`, `function i915_vma_is_dpt`, `function i915_vma_has_ggtt_write`, `function i915_vma_set_ggtt_write`, `function i915_vma_unset_ggtt_write`, `function i915_vma_is_map_and_fenceable`, `function i915_vma_set_userfault`, `function i915_vma_unset_userfault`.
- 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.