Commit ab53497b authored by Chris Wilson's avatar Chris Wilson

drm/i915: Rename i915_hw_ppgtt to i915_ppgtt

Keeping the _hw_ in there does not help to distinguish it from its
only brethren i915_ggtt, so drop it.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190611091238.15808-2-chris@chris-wilson.co.uk
parent e568ac38
......@@ -513,7 +513,7 @@ i915_gem_create_context(struct drm_i915_private *dev_priv, unsigned int flags)
return ctx;
if (HAS_FULL_PPGTT(dev_priv)) {
struct i915_hw_ppgtt *ppgtt;
struct i915_ppgtt *ppgtt;
ppgtt = i915_ppgtt_create(dev_priv);
if (IS_ERR(ppgtt)) {
......@@ -818,7 +818,7 @@ int i915_gem_vm_create_ioctl(struct drm_device *dev, void *data,
struct drm_i915_private *i915 = to_i915(dev);
struct drm_i915_gem_vm_control *args = data;
struct drm_i915_file_private *file_priv = file->driver_priv;
struct i915_hw_ppgtt *ppgtt;
struct i915_ppgtt *ppgtt;
int err;
if (!HAS_FULL_PPGTT(i915))
......@@ -1037,7 +1037,7 @@ static int emit_ppgtt_update(struct i915_request *rq, void *data)
int i;
if (i915_vm_is_4lvl(vm)) {
struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
struct i915_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
const dma_addr_t pd_daddr = px_dma(&ppgtt->pml4);
cs = intel_ring_begin(rq, 6);
......@@ -1054,7 +1054,7 @@ static int emit_ppgtt_update(struct i915_request *rq, void *data)
*cs++ = MI_NOOP;
intel_ring_advance(rq, cs);
} else if (HAS_LOGICAL_RING_CONTEXTS(engine->i915)) {
struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
struct i915_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
cs = intel_ring_begin(rq, 4 * GEN8_3LVL_PDPES + 2);
if (IS_ERR(cs))
......
......@@ -368,7 +368,7 @@ static int igt_check_page_sizes(struct i915_vma *vma)
static int igt_mock_exhaust_device_supported_pages(void *arg)
{
struct i915_hw_ppgtt *ppgtt = arg;
struct i915_ppgtt *ppgtt = arg;
struct drm_i915_private *i915 = ppgtt->vm.i915;
unsigned int saved_mask = INTEL_INFO(i915)->page_sizes;
struct drm_i915_gem_object *obj;
......@@ -447,7 +447,7 @@ static int igt_mock_exhaust_device_supported_pages(void *arg)
static int igt_mock_ppgtt_misaligned_dma(void *arg)
{
struct i915_hw_ppgtt *ppgtt = arg;
struct i915_ppgtt *ppgtt = arg;
struct drm_i915_private *i915 = ppgtt->vm.i915;
unsigned long supported = INTEL_INFO(i915)->page_sizes;
struct drm_i915_gem_object *obj;
......@@ -575,7 +575,7 @@ static int igt_mock_ppgtt_misaligned_dma(void *arg)
}
static void close_object_list(struct list_head *objects,
struct i915_hw_ppgtt *ppgtt)
struct i915_ppgtt *ppgtt)
{
struct drm_i915_gem_object *obj, *on;
......@@ -595,7 +595,7 @@ static void close_object_list(struct list_head *objects,
static int igt_mock_ppgtt_huge_fill(void *arg)
{
struct i915_hw_ppgtt *ppgtt = arg;
struct i915_ppgtt *ppgtt = arg;
struct drm_i915_private *i915 = ppgtt->vm.i915;
unsigned long max_pages = ppgtt->vm.total >> PAGE_SHIFT;
unsigned long page_num;
......@@ -716,7 +716,7 @@ static int igt_mock_ppgtt_huge_fill(void *arg)
static int igt_mock_ppgtt_64K(void *arg)
{
struct i915_hw_ppgtt *ppgtt = arg;
struct i915_ppgtt *ppgtt = arg;
struct drm_i915_private *i915 = ppgtt->vm.i915;
struct drm_i915_gem_object *obj;
const struct object_info {
......@@ -1683,7 +1683,7 @@ int i915_gem_huge_page_mock_selftests(void)
SUBTEST(igt_mock_ppgtt_64K),
};
struct drm_i915_private *dev_priv;
struct i915_hw_ppgtt *ppgtt;
struct i915_ppgtt *ppgtt;
int err;
dev_priv = mock_gem_device();
......
......@@ -38,7 +38,7 @@ mock_context(struct drm_i915_private *i915,
goto err_engines;
if (name) {
struct i915_hw_ppgtt *ppgtt;
struct i915_ppgtt *ppgtt;
ctx->name = kstrdup(name, GFP_KERNEL);
if (!ctx->name)
......
......@@ -1621,7 +1621,7 @@ static int gen8_emit_init_breadcrumb(struct i915_request *rq)
static int emit_pdps(struct i915_request *rq)
{
const struct intel_engine_cs * const engine = rq->engine;
struct i915_hw_ppgtt * const ppgtt =
struct i915_ppgtt * const ppgtt =
i915_vm_to_ppgtt(rq->gem_context->vm);
int err, i;
u32 *cs;
......@@ -2825,7 +2825,7 @@ static void execlists_init_reg_state(u32 *regs,
struct intel_engine_cs *engine,
struct intel_ring *ring)
{
struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(ce->gem_context->vm);
struct i915_ppgtt *ppgtt = i915_vm_to_ppgtt(ce->gem_context->vm);
bool rcs = engine->class == RENDER_CLASS;
u32 base = engine->mmio_base;
......
......@@ -1508,8 +1508,7 @@ static const struct intel_context_ops ring_context_ops = {
.destroy = ring_context_destroy,
};
static int load_pd_dir(struct i915_request *rq,
const struct i915_hw_ppgtt *ppgtt)
static int load_pd_dir(struct i915_request *rq, const struct i915_ppgtt *ppgtt)
{
const struct intel_engine_cs * const engine = rq->engine;
u32 *cs;
......@@ -1713,7 +1712,7 @@ static int switch_context(struct i915_request *rq)
GEM_BUG_ON(HAS_EXECLISTS(rq->i915));
if (vm) {
struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
struct i915_ppgtt *ppgtt = i915_vm_to_ppgtt(vm);
int loops;
/*
......
......@@ -368,7 +368,7 @@ static int set_context_ppgtt_from_shadow(struct intel_vgpu_workload *workload,
struct i915_gem_context *ctx)
{
struct intel_vgpu_mm *mm = workload->shadow_mm;
struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(ctx->vm);
struct i915_ppgtt *ppgtt = i915_vm_to_ppgtt(ctx->vm);
int i = 0;
if (mm->type != INTEL_GVT_MM_PPGTT || !mm->ppgtt_mm.shadowed)
......@@ -1102,7 +1102,7 @@ int intel_gvt_init_workload_scheduler(struct intel_gvt *gvt)
static void
i915_context_ppgtt_root_restore(struct intel_vgpu_submission *s,
struct i915_hw_ppgtt *ppgtt)
struct i915_ppgtt *ppgtt)
{
int i;
......@@ -1160,7 +1160,7 @@ void intel_vgpu_reset_submission(struct intel_vgpu *vgpu,
static void
i915_context_ppgtt_root_save(struct intel_vgpu_submission *s,
struct i915_hw_ppgtt *ppgtt)
struct i915_ppgtt *ppgtt)
{
int i;
......
......@@ -792,7 +792,7 @@ struct i915_gem_mm {
struct vfsmount *gemfs;
/** PPGTT used for aliasing the PPGTT with the GTT */
struct i915_hw_ppgtt *aliasing_ppgtt;
struct i915_ppgtt *aliasing_ppgtt;
struct notifier_block oom_notifier;
struct notifier_block vmap_notifier;
......
This diff is collapsed.
......@@ -412,7 +412,7 @@ struct i915_ggtt {
struct drm_mm_node uc_fw;
};
struct i915_hw_ppgtt {
struct i915_ppgtt {
struct i915_address_space vm;
intel_engine_mask_t pd_dirty_engines;
......@@ -423,8 +423,8 @@ struct i915_hw_ppgtt {
};
};
struct gen6_hw_ppgtt {
struct i915_hw_ppgtt base;
struct gen6_ppgtt {
struct i915_ppgtt base;
struct i915_vma *vma;
gen6_pte_t __iomem *pd_addr;
......@@ -435,11 +435,11 @@ struct gen6_hw_ppgtt {
struct gen6_ppgtt_cleanup_work *work;
};
#define __to_gen6_ppgtt(base) container_of(base, struct gen6_hw_ppgtt, base)
#define __to_gen6_ppgtt(base) container_of(base, struct gen6_ppgtt, base)
static inline struct gen6_hw_ppgtt *to_gen6_ppgtt(struct i915_hw_ppgtt *base)
static inline struct gen6_ppgtt *to_gen6_ppgtt(struct i915_ppgtt *base)
{
BUILD_BUG_ON(offsetof(struct gen6_hw_ppgtt, base));
BUILD_BUG_ON(offsetof(struct gen6_ppgtt, base));
return __to_gen6_ppgtt(base);
}
......@@ -575,7 +575,7 @@ static inline u64 gen8_pte_count(u64 address, u64 length)
}
static inline dma_addr_t
i915_page_dir_dma_addr(const struct i915_hw_ppgtt *ppgtt, const unsigned n)
i915_page_dir_dma_addr(const struct i915_ppgtt *ppgtt, const unsigned int n)
{
return px_dma(ppgtt->pdp.page_directory[n]);
}
......@@ -588,12 +588,12 @@ i915_vm_to_ggtt(struct i915_address_space *vm)
return container_of(vm, struct i915_ggtt, vm);
}
static inline struct i915_hw_ppgtt *
static inline struct i915_ppgtt *
i915_vm_to_ppgtt(struct i915_address_space *vm)
{
BUILD_BUG_ON(offsetof(struct i915_hw_ppgtt, vm));
BUILD_BUG_ON(offsetof(struct i915_ppgtt, vm));
GEM_BUG_ON(i915_is_ggtt(vm));
return container_of(vm, struct i915_hw_ppgtt, vm);
return container_of(vm, struct i915_ppgtt, vm);
}
#define INTEL_MAX_PPAT_ENTRIES 8
......@@ -637,7 +637,7 @@ void i915_ggtt_cleanup_hw(struct drm_i915_private *dev_priv);
int i915_ppgtt_init_hw(struct drm_i915_private *dev_priv);
struct i915_hw_ppgtt *i915_ppgtt_create(struct drm_i915_private *dev_priv);
struct i915_ppgtt *i915_ppgtt_create(struct drm_i915_private *dev_priv);
static inline struct i915_address_space *
i915_vm_get(struct i915_address_space *vm)
......@@ -653,9 +653,9 @@ static inline void i915_vm_put(struct i915_address_space *vm)
kref_put(&vm->ref, i915_vm_release);
}
int gen6_ppgtt_pin(struct i915_hw_ppgtt *base);
void gen6_ppgtt_unpin(struct i915_hw_ppgtt *base);
void gen6_ppgtt_unpin_all(struct i915_hw_ppgtt *base);
int gen6_ppgtt_pin(struct i915_ppgtt *base);
void gen6_ppgtt_unpin(struct i915_ppgtt *base);
void gen6_ppgtt_unpin_all(struct i915_ppgtt *base);
void i915_gem_suspend_gtt_mappings(struct drm_i915_private *dev_priv);
void i915_gem_restore_gtt_mappings(struct drm_i915_private *dev_priv);
......
......@@ -148,7 +148,7 @@ fake_dma_object(struct drm_i915_private *i915, u64 size)
static int igt_ppgtt_alloc(void *arg)
{
struct drm_i915_private *dev_priv = arg;
struct i915_hw_ppgtt *ppgtt;
struct i915_ppgtt *ppgtt;
u64 size, last, limit;
int err = 0;
......@@ -157,7 +157,7 @@ static int igt_ppgtt_alloc(void *arg)
if (!HAS_PPGTT(dev_priv))
return 0;
ppgtt = __hw_ppgtt_create(dev_priv);
ppgtt = __ppgtt_create(dev_priv);
if (IS_ERR(ppgtt))
return PTR_ERR(ppgtt);
......@@ -999,7 +999,7 @@ static int exercise_ppgtt(struct drm_i915_private *dev_priv,
unsigned long end_time))
{
struct drm_file *file;
struct i915_hw_ppgtt *ppgtt;
struct i915_ppgtt *ppgtt;
IGT_TIMEOUT(end_time);
int err;
......
......@@ -55,11 +55,9 @@ static void mock_cleanup(struct i915_address_space *vm)
{
}
struct i915_hw_ppgtt *
mock_ppgtt(struct drm_i915_private *i915,
const char *name)
struct i915_ppgtt *mock_ppgtt(struct drm_i915_private *i915, const char *name)
{
struct i915_hw_ppgtt *ppgtt;
struct i915_ppgtt *ppgtt;
ppgtt = kzalloc(sizeof(*ppgtt), GFP_KERNEL);
if (!ppgtt)
......
......@@ -28,8 +28,6 @@
void mock_init_ggtt(struct drm_i915_private *i915, struct i915_ggtt *ggtt);
void mock_fini_ggtt(struct i915_ggtt *ggtt);
struct i915_hw_ppgtt *
mock_ppgtt(struct drm_i915_private *i915,
const char *name);
struct i915_ppgtt *mock_ppgtt(struct drm_i915_private *i915, const char *name);
#endif /* !__MOCK_GTT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment