#include <drm/drm_cache.h>
#include "gem/i915_gem_internal.h"
#include "gen2_engine_cs.h"
#include "gen6_engine_cs.h"
#include "gen6_ppgtt.h"
#include "gen7_renderclear.h"
#include "i915_drv.h"
#include "i915_irq.h"
#include "i915_mitigations.h"
#include "i915_reg.h"
#include "intel_breadcrumbs.h"
#include "intel_context.h"
#include "intel_engine_regs.h"
#include "intel_gt.h"
#include "intel_gt_irq.h"
#include "intel_gt_regs.h"
#include "intel_reset.h"
#include "intel_ring.h"
#include "shmem_utils.h"
#include "intel_engine_heartbeat.h"
#include "intel_engine_pm.h"
#define LEGACY_REQUEST_SIZE …
static void set_hwstam(struct intel_engine_cs *engine, u32 mask)
{ … }
static void set_hws_pga(struct intel_engine_cs *engine, phys_addr_t phys)
{ … }
static struct page *status_page(struct intel_engine_cs *engine)
{ … }
static void ring_setup_phys_status_page(struct intel_engine_cs *engine)
{ … }
static void set_hwsp(struct intel_engine_cs *engine, u32 offset)
{ … }
static void flush_cs_tlb(struct intel_engine_cs *engine)
{ … }
static void ring_setup_status_page(struct intel_engine_cs *engine)
{ … }
static struct i915_address_space *vm_alias(struct i915_address_space *vm)
{ … }
static u32 pp_dir(struct i915_address_space *vm)
{ … }
static void set_pp_dir(struct intel_engine_cs *engine)
{ … }
static bool stop_ring(struct intel_engine_cs *engine)
{ … }
static int xcs_resume(struct intel_engine_cs *engine)
{ … }
static void sanitize_hwsp(struct intel_engine_cs *engine)
{ … }
static void xcs_sanitize(struct intel_engine_cs *engine)
{ … }
static void reset_prepare(struct intel_engine_cs *engine)
{ … }
static void reset_rewind(struct intel_engine_cs *engine, bool stalled)
{ … }
static void reset_finish(struct intel_engine_cs *engine)
{ … }
static void reset_cancel(struct intel_engine_cs *engine)
{ … }
static void i9xx_submit_request(struct i915_request *request)
{ … }
static void __ring_context_fini(struct intel_context *ce)
{ … }
static void ring_context_destroy(struct kref *ref)
{ … }
static int ring_context_init_default_state(struct intel_context *ce,
struct i915_gem_ww_ctx *ww)
{ … }
static int ring_context_pre_pin(struct intel_context *ce,
struct i915_gem_ww_ctx *ww,
void **unused)
{ … }
static void __context_unpin_ppgtt(struct intel_context *ce)
{ … }
static void ring_context_unpin(struct intel_context *ce)
{ … }
static void ring_context_post_unpin(struct intel_context *ce)
{ … }
static struct i915_vma *
alloc_context_vma(struct intel_engine_cs *engine)
{ … }
static int ring_context_alloc(struct intel_context *ce)
{ … }
static int ring_context_pin(struct intel_context *ce, void *unused)
{ … }
static void ring_context_reset(struct intel_context *ce)
{ … }
static void ring_context_revoke(struct intel_context *ce,
struct i915_request *rq,
unsigned int preempt_timeout_ms)
{ … }
static void ring_context_cancel_request(struct intel_context *ce,
struct i915_request *rq)
{ … }
static const struct intel_context_ops ring_context_ops = …;
static int load_pd_dir(struct i915_request *rq,
struct i915_address_space *vm,
u32 valid)
{ … }
static int mi_set_context(struct i915_request *rq,
struct intel_context *ce,
u32 flags)
{ … }
static int remap_l3_slice(struct i915_request *rq, int slice)
{ … }
static int remap_l3(struct i915_request *rq)
{ … }
static int switch_mm(struct i915_request *rq, struct i915_address_space *vm)
{ … }
static int clear_residuals(struct i915_request *rq)
{ … }
static int switch_context(struct i915_request *rq)
{ … }
static int ring_request_alloc(struct i915_request *request)
{ … }
static void gen6_bsd_submit_request(struct i915_request *request)
{ … }
static void i9xx_set_default_submission(struct intel_engine_cs *engine)
{ … }
static void gen6_bsd_set_default_submission(struct intel_engine_cs *engine)
{ … }
static void ring_release(struct intel_engine_cs *engine)
{ … }
static void irq_handler(struct intel_engine_cs *engine, u16 iir)
{ … }
static void setup_irq(struct intel_engine_cs *engine)
{ … }
static void add_to_engine(struct i915_request *rq)
{ … }
static void remove_from_engine(struct i915_request *rq)
{ … }
static void setup_common(struct intel_engine_cs *engine)
{ … }
static void setup_rcs(struct intel_engine_cs *engine)
{ … }
static void setup_vcs(struct intel_engine_cs *engine)
{ … }
static void setup_bcs(struct intel_engine_cs *engine)
{ … }
static void setup_vecs(struct intel_engine_cs *engine)
{ … }
static int gen7_ctx_switch_bb_setup(struct intel_engine_cs * const engine,
struct i915_vma * const vma)
{ … }
static int gen7_ctx_switch_bb_init(struct intel_engine_cs *engine,
struct i915_gem_ww_ctx *ww,
struct i915_vma *vma)
{ … }
static struct i915_vma *gen7_ctx_vma(struct intel_engine_cs *engine)
{ … }
int intel_ring_submission_setup(struct intel_engine_cs *engine)
{ … }
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "selftest_ring_submission.c"
#endif