sync with OpenBSD -current
This commit is contained in:
parent
ee68147dcd
commit
1cefe29c7e
1651 changed files with 283292 additions and 68089 deletions
|
@ -88,11 +88,20 @@ typedef u64 gen8_pte_t;
|
|||
#define BYT_PTE_SNOOPED_BY_CPU_CACHES REG_BIT(2)
|
||||
#define BYT_PTE_WRITEABLE REG_BIT(1)
|
||||
|
||||
#define MTL_PPGTT_PTE_PAT3 BIT_ULL(62)
|
||||
#define GEN12_PPGTT_PTE_LM BIT_ULL(11)
|
||||
#define GEN12_PPGTT_PTE_PAT2 BIT_ULL(7)
|
||||
#define GEN12_PPGTT_PTE_PAT1 BIT_ULL(4)
|
||||
#define GEN12_PPGTT_PTE_PAT0 BIT_ULL(3)
|
||||
|
||||
#define GEN12_GGTT_PTE_LM BIT_ULL(1)
|
||||
#define GEN12_GGTT_PTE_LM BIT_ULL(1)
|
||||
#define MTL_GGTT_PTE_PAT0 BIT_ULL(52)
|
||||
#define MTL_GGTT_PTE_PAT1 BIT_ULL(53)
|
||||
#define GEN12_GGTT_PTE_ADDR_MASK GENMASK_ULL(45, 12)
|
||||
#define MTL_GGTT_PTE_PAT_MASK GENMASK_ULL(53, 52)
|
||||
|
||||
#define GEN12_PDE_64K BIT(6)
|
||||
#define GEN12_PTE_PS64 BIT(8)
|
||||
|
||||
/*
|
||||
* Cacheability Control is a 4-bit value. The low three bits are stored in bits
|
||||
|
@ -146,7 +155,13 @@ typedef u64 gen8_pte_t;
|
|||
#define GEN8_PDE_IPS_64K BIT(11)
|
||||
#define GEN8_PDE_PS_2M BIT(7)
|
||||
|
||||
enum i915_cache_level;
|
||||
#define MTL_PPAT_L4_CACHE_POLICY_MASK REG_GENMASK(3, 2)
|
||||
#define MTL_PAT_INDEX_COH_MODE_MASK REG_GENMASK(1, 0)
|
||||
#define MTL_PPAT_L4_3_UC REG_FIELD_PREP(MTL_PPAT_L4_CACHE_POLICY_MASK, 3)
|
||||
#define MTL_PPAT_L4_1_WT REG_FIELD_PREP(MTL_PPAT_L4_CACHE_POLICY_MASK, 1)
|
||||
#define MTL_PPAT_L4_0_WB REG_FIELD_PREP(MTL_PPAT_L4_CACHE_POLICY_MASK, 0)
|
||||
#define MTL_3_COH_2W REG_FIELD_PREP(MTL_PAT_INDEX_COH_MODE_MASK, 3)
|
||||
#define MTL_2_COH_1W REG_FIELD_PREP(MTL_PAT_INDEX_COH_MODE_MASK, 2)
|
||||
|
||||
struct drm_i915_gem_object;
|
||||
struct i915_fence_reg;
|
||||
|
@ -215,7 +230,7 @@ struct i915_vma_ops {
|
|||
void (*bind_vma)(struct i915_address_space *vm,
|
||||
struct i915_vm_pt_stash *stash,
|
||||
struct i915_vma_resource *vma_res,
|
||||
enum i915_cache_level cache_level,
|
||||
unsigned int pat_index,
|
||||
u32 flags);
|
||||
/*
|
||||
* Unmap an object from an address space. This usually consists of
|
||||
|
@ -287,7 +302,7 @@ struct i915_address_space {
|
|||
(*alloc_scratch_dma)(struct i915_address_space *vm, int sz);
|
||||
|
||||
u64 (*pte_encode)(dma_addr_t addr,
|
||||
enum i915_cache_level level,
|
||||
unsigned int pat_index,
|
||||
u32 flags); /* Create a valid PTE */
|
||||
#define PTE_READ_ONLY BIT(0)
|
||||
#define PTE_LM BIT(1)
|
||||
|
@ -297,23 +312,25 @@ struct i915_address_space {
|
|||
u64 start, u64 length);
|
||||
void (*clear_range)(struct i915_address_space *vm,
|
||||
u64 start, u64 length);
|
||||
void (*scratch_range)(struct i915_address_space *vm,
|
||||
u64 start, u64 length);
|
||||
void (*insert_page)(struct i915_address_space *vm,
|
||||
dma_addr_t addr,
|
||||
u64 offset,
|
||||
enum i915_cache_level cache_level,
|
||||
unsigned int pat_index,
|
||||
u32 flags);
|
||||
void (*insert_entries)(struct i915_address_space *vm,
|
||||
struct i915_vma_resource *vma_res,
|
||||
enum i915_cache_level cache_level,
|
||||
unsigned int pat_index,
|
||||
u32 flags);
|
||||
void (*raw_insert_page)(struct i915_address_space *vm,
|
||||
dma_addr_t addr,
|
||||
u64 offset,
|
||||
enum i915_cache_level cache_level,
|
||||
unsigned int pat_index,
|
||||
u32 flags);
|
||||
void (*raw_insert_entries)(struct i915_address_space *vm,
|
||||
struct i915_vma_resource *vma_res,
|
||||
enum i915_cache_level cache_level,
|
||||
unsigned int pat_index,
|
||||
u32 flags);
|
||||
void (*cleanup)(struct i915_address_space *vm);
|
||||
|
||||
|
@ -358,19 +375,6 @@ struct i915_ggtt {
|
|||
|
||||
bool do_idle_maps;
|
||||
|
||||
/**
|
||||
* @pte_lost: Are ptes lost on resume?
|
||||
*
|
||||
* Whether the system was recently restored from hibernate and
|
||||
* thus may have lost pte content.
|
||||
*/
|
||||
bool pte_lost;
|
||||
|
||||
/**
|
||||
* @probed_pte: Probed pte value on suspend. Re-checked on resume.
|
||||
*/
|
||||
u64 probed_pte;
|
||||
|
||||
int mtrr;
|
||||
|
||||
/** Bit 6 swizzling required for X tiling */
|
||||
|
@ -393,6 +397,9 @@ struct i915_ggtt {
|
|||
struct rwlock error_mutex;
|
||||
struct drm_mm_node error_capture;
|
||||
struct drm_mm_node uc_fw;
|
||||
|
||||
/** List of GTs mapping this GGTT */
|
||||
struct list_head gt_list;
|
||||
};
|
||||
|
||||
struct i915_ppgtt {
|
||||
|
@ -504,7 +511,7 @@ static inline void i915_vm_put(struct i915_address_space *vm)
|
|||
|
||||
/**
|
||||
* i915_vm_resv_put - Release a reference on the vm's reservation lock
|
||||
* @resv: Pointer to a reservation lock obtained from i915_vm_resv_get()
|
||||
* @vm: The vm whose reservation lock reference we want to release
|
||||
*/
|
||||
static inline void i915_vm_resv_put(struct i915_address_space *vm)
|
||||
{
|
||||
|
@ -574,7 +581,7 @@ void ppgtt_init(struct i915_ppgtt *ppgtt, struct intel_gt *gt,
|
|||
void intel_ggtt_bind_vma(struct i915_address_space *vm,
|
||||
struct i915_vm_pt_stash *stash,
|
||||
struct i915_vma_resource *vma_res,
|
||||
enum i915_cache_level cache_level,
|
||||
unsigned int pat_index,
|
||||
u32 flags);
|
||||
void intel_ggtt_unbind_vma(struct i915_address_space *vm,
|
||||
struct i915_vma_resource *vma_res);
|
||||
|
@ -582,11 +589,10 @@ void intel_ggtt_unbind_vma(struct i915_address_space *vm,
|
|||
int i915_ggtt_probe_hw(struct drm_i915_private *i915);
|
||||
int i915_ggtt_init_hw(struct drm_i915_private *i915);
|
||||
int i915_ggtt_enable_hw(struct drm_i915_private *i915);
|
||||
void i915_ggtt_enable_guc(struct i915_ggtt *ggtt);
|
||||
void i915_ggtt_disable_guc(struct i915_ggtt *ggtt);
|
||||
int i915_init_ggtt(struct drm_i915_private *i915);
|
||||
void i915_ggtt_driver_release(struct drm_i915_private *i915);
|
||||
void i915_ggtt_driver_late_release(struct drm_i915_private *i915);
|
||||
struct i915_ggtt *i915_ggtt_create(struct drm_i915_private *i915);
|
||||
|
||||
static inline bool i915_ggtt_has_aperture(const struct i915_ggtt *ggtt)
|
||||
{
|
||||
|
@ -603,17 +609,6 @@ bool i915_ggtt_resume_vm(struct i915_address_space *vm);
|
|||
void i915_ggtt_suspend(struct i915_ggtt *gtt);
|
||||
void i915_ggtt_resume(struct i915_ggtt *ggtt);
|
||||
|
||||
/**
|
||||
* i915_ggtt_mark_pte_lost - Mark ggtt ptes as lost or clear such a marking
|
||||
* @i915 The device private.
|
||||
* @val whether the ptes should be marked as lost.
|
||||
*
|
||||
* In some cases pte content is retained across suspend, but typically lost
|
||||
* across hibernate. Typically they should be marked as lost on
|
||||
* hibernation restore and such marking cleared on suspend.
|
||||
*/
|
||||
void i915_ggtt_mark_pte_lost(struct drm_i915_private *i915, bool val);
|
||||
|
||||
void
|
||||
fill_page_dma(struct drm_i915_gem_object *p, const u64 val, unsigned int count);
|
||||
|
||||
|
@ -664,14 +659,14 @@ void gen6_ggtt_invalidate(struct i915_ggtt *ggtt);
|
|||
void ppgtt_bind_vma(struct i915_address_space *vm,
|
||||
struct i915_vm_pt_stash *stash,
|
||||
struct i915_vma_resource *vma_res,
|
||||
enum i915_cache_level cache_level,
|
||||
unsigned int pat_index,
|
||||
u32 flags);
|
||||
void ppgtt_unbind_vma(struct i915_address_space *vm,
|
||||
struct i915_vma_resource *vma_res);
|
||||
|
||||
void gtt_write_workarounds(struct intel_gt *gt);
|
||||
|
||||
void setup_private_pat(struct intel_uncore *uncore);
|
||||
void setup_private_pat(struct intel_gt *gt);
|
||||
|
||||
int i915_vm_alloc_pt_stash(struct i915_address_space *vm,
|
||||
struct i915_vm_pt_stash *stash,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue