linux/drivers/gpu/drm/i915/gt/gen6_ppgtt.h

/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2020 Intel Corporation
 */

#ifndef __GEN6_PPGTT_H__
#define __GEN6_PPGTT_H__

#include "intel_gtt.h"

struct i915_gem_ww_ctx;

struct gen6_ppgtt {};

static inline u32 gen6_pte_index(u32 addr)
{}

static inline u32 gen6_pte_count(u32 addr, u32 length)
{}

static inline u32 gen6_pde_index(u32 addr)
{}

#define __to_gen6_ppgtt(base)

static inline struct gen6_ppgtt *to_gen6_ppgtt(struct i915_ppgtt *base)
{}

/*
 * gen6_for_each_pde() iterates over every pde from start until start+length.
 * If start and start+length are not perfectly divisible, the macro will round
 * down and up as needed. Start=0 and length=2G effectively iterates over
 * every PDE in the system. The macro modifies ALL its parameters except 'pd',
 * so each of the other parameters should preferably be a simple variable, or
 * at most an lvalue with no side-effects!
 */
#define gen6_for_each_pde(pt, pd, start, length, iter)

#define gen6_for_all_pdes(pt, pd, iter)

int gen6_ppgtt_pin(struct i915_ppgtt *base, struct i915_gem_ww_ctx *ww);
void gen6_ppgtt_unpin(struct i915_ppgtt *base);
void gen6_ppgtt_enable(struct intel_gt *gt);
void gen7_ppgtt_enable(struct intel_gt *gt);
struct i915_ppgtt *gen6_ppgtt_create(struct intel_gt *gt);

#endif