Commit 7e37f889 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Rename struct intel_ringbuffer to struct intel_ring

The state stored in this struct is not only the information about the
buffer object, but the ring used to communicate with the hardware. Using
buffer here is overly specific and, for me at least, conflates with the
notion of buffer objects themselves.

s/struct intel_ringbuffer/struct intel_ring/
s/enum intel_ring_hangcheck/enum intel_engine_hangcheck/
s/describe_ctx_ringbuf()/describe_ctx_ring()/
s/intel_ring_get_active_head()/intel_engine_get_active_head()/
s/intel_ring_sync_index()/intel_engine_sync_index()/
s/intel_ring_init_seqno()/intel_engine_init_seqno()/
s/ring_stuck()/engine_stuck()/
s/intel_cleanup_engine()/intel_engine_cleanup()/
s/intel_stop_engine()/intel_engine_stop()/
s/intel_pin_and_map_ringbuffer_obj()/intel_pin_and_map_ring()/
s/intel_unpin_ringbuffer()/intel_unpin_ring()/
s/intel_engine_create_ringbuffer()/intel_engine_create_ring()/
s/intel_ring_flush_all_caches()/intel_engine_flush_all_caches()/
s/intel_ring_invalidate_all_caches()/intel_engine_invalidate_all_caches()/
s/intel_ringbuffer_free()/intel_ring_free()/
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-15-git-send-email-chris@chris-wilson.co.uk
Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-4-git-send-email-chris@chris-wilson.co.uk
parent dca33ecc
...@@ -1419,7 +1419,7 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused) ...@@ -1419,7 +1419,7 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
intel_runtime_pm_get(dev_priv); intel_runtime_pm_get(dev_priv);
for_each_engine_id(engine, dev_priv, id) { for_each_engine_id(engine, dev_priv, id) {
acthd[id] = intel_ring_get_active_head(engine); acthd[id] = intel_engine_get_active_head(engine);
seqno[id] = intel_engine_get_seqno(engine); seqno[id] = intel_engine_get_seqno(engine);
} }
...@@ -2036,12 +2036,11 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) ...@@ -2036,12 +2036,11 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
return 0; return 0;
} }
static void describe_ctx_ringbuf(struct seq_file *m, static void describe_ctx_ring(struct seq_file *m, struct intel_ring *ring)
struct intel_ringbuffer *ringbuf)
{ {
seq_printf(m, " (ringbuffer, space: %d, head: %u, tail: %u, last head: %d)", seq_printf(m, " (ringbuffer, space: %d, head: %u, tail: %u, last head: %d)",
ringbuf->space, ringbuf->head, ringbuf->tail, ring->space, ring->head, ring->tail,
ringbuf->last_retired_head); ring->last_retired_head);
} }
static int i915_context_status(struct seq_file *m, void *unused) static int i915_context_status(struct seq_file *m, void *unused)
...@@ -2086,7 +2085,7 @@ static int i915_context_status(struct seq_file *m, void *unused) ...@@ -2086,7 +2085,7 @@ static int i915_context_status(struct seq_file *m, void *unused)
if (ce->state) if (ce->state)
describe_obj(m, ce->state); describe_obj(m, ce->state);
if (ce->ring) if (ce->ring)
describe_ctx_ringbuf(m, ce->ring); describe_ctx_ring(m, ce->ring);
seq_putc(m, '\n'); seq_putc(m, '\n');
} }
......
...@@ -518,7 +518,7 @@ struct drm_i915_error_state { ...@@ -518,7 +518,7 @@ struct drm_i915_error_state {
bool waiting; bool waiting;
int num_waiters; int num_waiters;
int hangcheck_score; int hangcheck_score;
enum intel_ring_hangcheck_action hangcheck_action; enum intel_engine_hangcheck_action hangcheck_action;
int num_requests; int num_requests;
/* our own tracking of ring head and tail */ /* our own tracking of ring head and tail */
...@@ -894,7 +894,7 @@ struct i915_gem_context { ...@@ -894,7 +894,7 @@ struct i915_gem_context {
struct intel_context { struct intel_context {
struct drm_i915_gem_object *state; struct drm_i915_gem_object *state;
struct intel_ringbuffer *ring; struct intel_ring *ring;
struct i915_vma *lrc_vma; struct i915_vma *lrc_vma;
uint32_t *lrc_reg_state; uint32_t *lrc_reg_state;
u64 lrc_desc; u64 lrc_desc;
......
...@@ -2486,7 +2486,7 @@ static void i915_gem_reset_engine_status(struct intel_engine_cs *engine) ...@@ -2486,7 +2486,7 @@ static void i915_gem_reset_engine_status(struct intel_engine_cs *engine)
static void i915_gem_reset_engine_cleanup(struct intel_engine_cs *engine) static void i915_gem_reset_engine_cleanup(struct intel_engine_cs *engine)
{ {
struct intel_ringbuffer *buffer; struct intel_ring *ring;
while (!list_empty(&engine->active_list)) { while (!list_empty(&engine->active_list)) {
struct drm_i915_gem_object *obj; struct drm_i915_gem_object *obj;
...@@ -2502,7 +2502,7 @@ static void i915_gem_reset_engine_cleanup(struct intel_engine_cs *engine) ...@@ -2502,7 +2502,7 @@ static void i915_gem_reset_engine_cleanup(struct intel_engine_cs *engine)
* (lockless) lookup doesn't try and wait upon the request as we * (lockless) lookup doesn't try and wait upon the request as we
* reset it. * reset it.
*/ */
intel_ring_init_seqno(engine, engine->last_submitted_seqno); intel_engine_init_seqno(engine, engine->last_submitted_seqno);
/* /*
* Clear the execlists queue up before freeing the requests, as those * Clear the execlists queue up before freeing the requests, as those
...@@ -2541,9 +2541,9 @@ static void i915_gem_reset_engine_cleanup(struct intel_engine_cs *engine) ...@@ -2541,9 +2541,9 @@ static void i915_gem_reset_engine_cleanup(struct intel_engine_cs *engine)
* upon reset is less than when we start. Do one more pass over * upon reset is less than when we start. Do one more pass over
* all the ringbuffers to reset last_retired_head. * all the ringbuffers to reset last_retired_head.
*/ */
list_for_each_entry(buffer, &engine->buffers, link) { list_for_each_entry(ring, &engine->buffers, link) {
buffer->last_retired_head = buffer->tail; ring->last_retired_head = ring->tail;
intel_ring_update_space(buffer); intel_ring_update_space(ring);
} }
engine->i915->gt.active_engines &= ~intel_engine_flag(engine); engine->i915->gt.active_engines &= ~intel_engine_flag(engine);
...@@ -2870,7 +2870,7 @@ __i915_gem_object_sync(struct drm_i915_gem_object *obj, ...@@ -2870,7 +2870,7 @@ __i915_gem_object_sync(struct drm_i915_gem_object *obj,
i915_gem_object_retire_request(obj, from_req); i915_gem_object_retire_request(obj, from_req);
} else { } else {
int idx = intel_ring_sync_index(from, to); int idx = intel_engine_sync_index(from, to);
u32 seqno = i915_gem_request_get_seqno(from_req); u32 seqno = i915_gem_request_get_seqno(from_req);
WARN_ON(!to_req); WARN_ON(!to_req);
...@@ -4570,8 +4570,8 @@ int i915_gem_init(struct drm_device *dev) ...@@ -4570,8 +4570,8 @@ int i915_gem_init(struct drm_device *dev)
if (!i915.enable_execlists) { if (!i915.enable_execlists) {
dev_priv->gt.execbuf_submit = i915_gem_ringbuffer_submission; dev_priv->gt.execbuf_submit = i915_gem_ringbuffer_submission;
dev_priv->gt.cleanup_engine = intel_cleanup_engine; dev_priv->gt.cleanup_engine = intel_engine_cleanup;
dev_priv->gt.stop_engine = intel_stop_engine; dev_priv->gt.stop_engine = intel_engine_stop;
} else { } else {
dev_priv->gt.execbuf_submit = intel_execlists_submission; dev_priv->gt.execbuf_submit = intel_execlists_submission;
dev_priv->gt.cleanup_engine = intel_logical_ring_cleanup; dev_priv->gt.cleanup_engine = intel_logical_ring_cleanup;
......
...@@ -174,7 +174,7 @@ void i915_gem_context_free(struct kref *ctx_ref) ...@@ -174,7 +174,7 @@ void i915_gem_context_free(struct kref *ctx_ref)
WARN_ON(ce->pin_count); WARN_ON(ce->pin_count);
if (ce->ring) if (ce->ring)
intel_ringbuffer_free(ce->ring); intel_ring_free(ce->ring);
i915_gem_object_put(ce->state); i915_gem_object_put(ce->state);
} }
...@@ -552,7 +552,7 @@ static inline int ...@@ -552,7 +552,7 @@ static inline int
mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags)
{ {
struct drm_i915_private *dev_priv = req->i915; struct drm_i915_private *dev_priv = req->i915;
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct intel_engine_cs *engine = req->engine; struct intel_engine_cs *engine = req->engine;
u32 flags = hw_flags | MI_MM_SPACE_GTT; u32 flags = hw_flags | MI_MM_SPACE_GTT;
const int num_rings = const int num_rings =
...@@ -655,7 +655,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags) ...@@ -655,7 +655,7 @@ mi_set_context(struct drm_i915_gem_request *req, u32 hw_flags)
static int remap_l3(struct drm_i915_gem_request *req, int slice) static int remap_l3(struct drm_i915_gem_request *req, int slice)
{ {
u32 *remap_info = req->i915->l3_parity.remap_info[slice]; u32 *remap_info = req->i915->l3_parity.remap_info[slice];
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
int i, ret; int i, ret;
if (!remap_info) if (!remap_info)
......
...@@ -1001,7 +1001,7 @@ i915_gem_execbuffer_move_to_gpu(struct drm_i915_gem_request *req, ...@@ -1001,7 +1001,7 @@ i915_gem_execbuffer_move_to_gpu(struct drm_i915_gem_request *req,
/* Unconditionally invalidate gpu caches and ensure that we do flush /* Unconditionally invalidate gpu caches and ensure that we do flush
* any residual writes from the previous batch. * any residual writes from the previous batch.
*/ */
return intel_ring_invalidate_all_caches(req); return intel_engine_invalidate_all_caches(req);
} }
static bool static bool
...@@ -1173,7 +1173,7 @@ i915_gem_execbuffer_retire_commands(struct i915_execbuffer_params *params) ...@@ -1173,7 +1173,7 @@ i915_gem_execbuffer_retire_commands(struct i915_execbuffer_params *params)
static int static int
i915_reset_gen7_sol_offsets(struct drm_i915_gem_request *req) i915_reset_gen7_sol_offsets(struct drm_i915_gem_request *req)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
int ret, i; int ret, i;
if (!IS_GEN7(req->i915) || req->engine->id != RCS) { if (!IS_GEN7(req->i915) || req->engine->id != RCS) {
...@@ -1303,7 +1303,7 @@ i915_gem_ringbuffer_submission(struct i915_execbuffer_params *params, ...@@ -1303,7 +1303,7 @@ i915_gem_ringbuffer_submission(struct i915_execbuffer_params *params,
if (params->engine->id == RCS && if (params->engine->id == RCS &&
instp_mode != dev_priv->relative_constants_mode) { instp_mode != dev_priv->relative_constants_mode) {
struct intel_ringbuffer *ring = params->request->ring; struct intel_ring *ring = params->request->ring;
ret = intel_ring_begin(params->request, 4); ret = intel_ring_begin(params->request, 4);
if (ret) if (ret)
......
...@@ -669,7 +669,7 @@ static int gen8_write_pdp(struct drm_i915_gem_request *req, ...@@ -669,7 +669,7 @@ static int gen8_write_pdp(struct drm_i915_gem_request *req,
unsigned entry, unsigned entry,
dma_addr_t addr) dma_addr_t addr)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct intel_engine_cs *engine = req->engine; struct intel_engine_cs *engine = req->engine;
int ret; int ret;
...@@ -1661,7 +1661,7 @@ static uint32_t get_pd_offset(struct i915_hw_ppgtt *ppgtt) ...@@ -1661,7 +1661,7 @@ static uint32_t get_pd_offset(struct i915_hw_ppgtt *ppgtt)
static int hsw_mm_switch(struct i915_hw_ppgtt *ppgtt, static int hsw_mm_switch(struct i915_hw_ppgtt *ppgtt,
struct drm_i915_gem_request *req) struct drm_i915_gem_request *req)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct intel_engine_cs *engine = req->engine; struct intel_engine_cs *engine = req->engine;
int ret; int ret;
...@@ -1688,7 +1688,7 @@ static int hsw_mm_switch(struct i915_hw_ppgtt *ppgtt, ...@@ -1688,7 +1688,7 @@ static int hsw_mm_switch(struct i915_hw_ppgtt *ppgtt,
static int gen7_mm_switch(struct i915_hw_ppgtt *ppgtt, static int gen7_mm_switch(struct i915_hw_ppgtt *ppgtt,
struct drm_i915_gem_request *req) struct drm_i915_gem_request *req)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct intel_engine_cs *engine = req->engine; struct intel_engine_cs *engine = req->engine;
int ret; int ret;
......
...@@ -244,7 +244,7 @@ static int i915_gem_init_seqno(struct drm_i915_private *dev_priv, u32 seqno) ...@@ -244,7 +244,7 @@ static int i915_gem_init_seqno(struct drm_i915_private *dev_priv, u32 seqno)
/* Finally reset hw state */ /* Finally reset hw state */
for_each_engine(engine, dev_priv) for_each_engine(engine, dev_priv)
intel_ring_init_seqno(engine, seqno); intel_engine_init_seqno(engine, seqno);
return 0; return 0;
} }
...@@ -423,7 +423,7 @@ void __i915_add_request(struct drm_i915_gem_request *request, ...@@ -423,7 +423,7 @@ void __i915_add_request(struct drm_i915_gem_request *request,
bool flush_caches) bool flush_caches)
{ {
struct intel_engine_cs *engine; struct intel_engine_cs *engine;
struct intel_ringbuffer *ring; struct intel_ring *ring;
u32 request_start; u32 request_start;
u32 reserved_tail; u32 reserved_tail;
int ret; int ret;
...@@ -454,7 +454,7 @@ void __i915_add_request(struct drm_i915_gem_request *request, ...@@ -454,7 +454,7 @@ void __i915_add_request(struct drm_i915_gem_request *request,
if (i915.enable_execlists) if (i915.enable_execlists)
ret = logical_ring_flush_all_caches(request); ret = logical_ring_flush_all_caches(request);
else else
ret = intel_ring_flush_all_caches(request); ret = intel_engine_flush_all_caches(request);
/* Not allowed to fail! */ /* Not allowed to fail! */
WARN(ret, "*_ring_flush_all_caches failed: %d!\n", ret); WARN(ret, "*_ring_flush_all_caches failed: %d!\n", ret);
} }
......
...@@ -61,7 +61,7 @@ struct drm_i915_gem_request { ...@@ -61,7 +61,7 @@ struct drm_i915_gem_request {
*/ */
struct i915_gem_context *ctx; struct i915_gem_context *ctx;
struct intel_engine_cs *engine; struct intel_engine_cs *engine;
struct intel_ringbuffer *ring; struct intel_ring *ring;
struct intel_signal_node signaling; struct intel_signal_node signaling;
/** GEM sequence number associated with the previous request, /** GEM sequence number associated with the previous request,
......
...@@ -221,7 +221,7 @@ static void print_error_buffers(struct drm_i915_error_state_buf *m, ...@@ -221,7 +221,7 @@ static void print_error_buffers(struct drm_i915_error_state_buf *m,
} }
} }
static const char *hangcheck_action_to_str(enum intel_ring_hangcheck_action a) static const char *hangcheck_action_to_str(enum intel_engine_hangcheck_action a)
{ {
switch (a) { switch (a) {
case HANGCHECK_IDLE: case HANGCHECK_IDLE:
...@@ -879,7 +879,7 @@ static void gen8_record_semaphore_state(struct drm_i915_error_state *error, ...@@ -879,7 +879,7 @@ static void gen8_record_semaphore_state(struct drm_i915_error_state *error,
signal_offset = signal_offset =
(GEN8_SIGNAL_OFFSET(engine, id) & (PAGE_SIZE - 1)) / 4; (GEN8_SIGNAL_OFFSET(engine, id) & (PAGE_SIZE - 1)) / 4;
tmp = error->semaphore_obj->pages[0]; tmp = error->semaphore_obj->pages[0];
idx = intel_ring_sync_index(engine, to); idx = intel_engine_sync_index(engine, to);
ee->semaphore_mboxes[idx] = tmp[signal_offset]; ee->semaphore_mboxes[idx] = tmp[signal_offset];
ee->semaphore_seqno[idx] = engine->semaphore.sync_seqno[idx]; ee->semaphore_seqno[idx] = engine->semaphore.sync_seqno[idx];
...@@ -981,7 +981,7 @@ static void error_record_engine_registers(struct drm_i915_error_state *error, ...@@ -981,7 +981,7 @@ static void error_record_engine_registers(struct drm_i915_error_state *error,
ee->waiting = intel_engine_has_waiter(engine); ee->waiting = intel_engine_has_waiter(engine);
ee->instpm = I915_READ(RING_INSTPM(engine->mmio_base)); ee->instpm = I915_READ(RING_INSTPM(engine->mmio_base));
ee->acthd = intel_ring_get_active_head(engine); ee->acthd = intel_engine_get_active_head(engine);
ee->seqno = intel_engine_get_seqno(engine); ee->seqno = intel_engine_get_seqno(engine);
ee->last_seqno = engine->last_submitted_seqno; ee->last_seqno = engine->last_submitted_seqno;
ee->start = I915_READ_START(engine); ee->start = I915_READ_START(engine);
...@@ -1097,7 +1097,7 @@ static void i915_gem_record_rings(struct drm_i915_private *dev_priv, ...@@ -1097,7 +1097,7 @@ static void i915_gem_record_rings(struct drm_i915_private *dev_priv,
request = i915_gem_find_active_request(engine); request = i915_gem_find_active_request(engine);
if (request) { if (request) {
struct i915_address_space *vm; struct i915_address_space *vm;
struct intel_ringbuffer *ring; struct intel_ring *ring;
vm = request->ctx->ppgtt ? vm = request->ctx->ppgtt ?
&request->ctx->ppgtt->base : &ggtt->base; &request->ctx->ppgtt->base : &ggtt->base;
......
...@@ -2993,7 +2993,7 @@ static bool subunits_stuck(struct intel_engine_cs *engine) ...@@ -2993,7 +2993,7 @@ static bool subunits_stuck(struct intel_engine_cs *engine)
return stuck; return stuck;
} }
static enum intel_ring_hangcheck_action static enum intel_engine_hangcheck_action
head_stuck(struct intel_engine_cs *engine, u64 acthd) head_stuck(struct intel_engine_cs *engine, u64 acthd)
{ {
if (acthd != engine->hangcheck.acthd) { if (acthd != engine->hangcheck.acthd) {
...@@ -3011,11 +3011,11 @@ head_stuck(struct intel_engine_cs *engine, u64 acthd) ...@@ -3011,11 +3011,11 @@ head_stuck(struct intel_engine_cs *engine, u64 acthd)
return HANGCHECK_HUNG; return HANGCHECK_HUNG;
} }
static enum intel_ring_hangcheck_action static enum intel_engine_hangcheck_action
ring_stuck(struct intel_engine_cs *engine, u64 acthd) engine_stuck(struct intel_engine_cs *engine, u64 acthd)
{ {
struct drm_i915_private *dev_priv = engine->i915; struct drm_i915_private *dev_priv = engine->i915;
enum intel_ring_hangcheck_action ha; enum intel_engine_hangcheck_action ha;
u32 tmp; u32 tmp;
ha = head_stuck(engine, acthd); ha = head_stuck(engine, acthd);
...@@ -3124,7 +3124,7 @@ static void i915_hangcheck_elapsed(struct work_struct *work) ...@@ -3124,7 +3124,7 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
if (engine->irq_seqno_barrier) if (engine->irq_seqno_barrier)
engine->irq_seqno_barrier(engine); engine->irq_seqno_barrier(engine);
acthd = intel_ring_get_active_head(engine); acthd = intel_engine_get_active_head(engine);
seqno = intel_engine_get_seqno(engine); seqno = intel_engine_get_seqno(engine);
/* Reset stuck interrupts between batch advances */ /* Reset stuck interrupts between batch advances */
...@@ -3154,8 +3154,8 @@ static void i915_hangcheck_elapsed(struct work_struct *work) ...@@ -3154,8 +3154,8 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
* being repeatedly kicked and so responsible * being repeatedly kicked and so responsible
* for stalling the machine. * for stalling the machine.
*/ */
engine->hangcheck.action = ring_stuck(engine, engine->hangcheck.action =
acthd); engine_stuck(engine, acthd);
switch (engine->hangcheck.action) { switch (engine->hangcheck.action) {
case HANGCHECK_IDLE: case HANGCHECK_IDLE:
......
...@@ -11115,7 +11115,7 @@ static int intel_gen2_queue_flip(struct drm_device *dev, ...@@ -11115,7 +11115,7 @@ static int intel_gen2_queue_flip(struct drm_device *dev,
struct drm_i915_gem_request *req, struct drm_i915_gem_request *req,
uint32_t flags) uint32_t flags)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
u32 flip_mask; u32 flip_mask;
int ret; int ret;
...@@ -11149,7 +11149,7 @@ static int intel_gen3_queue_flip(struct drm_device *dev, ...@@ -11149,7 +11149,7 @@ static int intel_gen3_queue_flip(struct drm_device *dev,
struct drm_i915_gem_request *req, struct drm_i915_gem_request *req,
uint32_t flags) uint32_t flags)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
u32 flip_mask; u32 flip_mask;
int ret; int ret;
...@@ -11180,7 +11180,7 @@ static int intel_gen4_queue_flip(struct drm_device *dev, ...@@ -11180,7 +11180,7 @@ static int intel_gen4_queue_flip(struct drm_device *dev,
struct drm_i915_gem_request *req, struct drm_i915_gem_request *req,
uint32_t flags) uint32_t flags)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
uint32_t pf, pipesrc; uint32_t pf, pipesrc;
...@@ -11218,7 +11218,7 @@ static int intel_gen6_queue_flip(struct drm_device *dev, ...@@ -11218,7 +11218,7 @@ static int intel_gen6_queue_flip(struct drm_device *dev,
struct drm_i915_gem_request *req, struct drm_i915_gem_request *req,
uint32_t flags) uint32_t flags)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
uint32_t pf, pipesrc; uint32_t pf, pipesrc;
...@@ -11253,7 +11253,7 @@ static int intel_gen7_queue_flip(struct drm_device *dev, ...@@ -11253,7 +11253,7 @@ static int intel_gen7_queue_flip(struct drm_device *dev,
struct drm_i915_gem_request *req, struct drm_i915_gem_request *req,
uint32_t flags) uint32_t flags)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
uint32_t plane_bit = 0; uint32_t plane_bit = 0;
int len, ret; int len, ret;
......
...@@ -155,7 +155,7 @@ int intel_engines_init(struct drm_device *dev) ...@@ -155,7 +155,7 @@ int intel_engines_init(struct drm_device *dev)
if (i915.enable_execlists) if (i915.enable_execlists)
intel_logical_ring_cleanup(&dev_priv->engine[i]); intel_logical_ring_cleanup(&dev_priv->engine[i]);
else else
intel_cleanup_engine(&dev_priv->engine[i]); intel_engine_cleanup(&dev_priv->engine[i]);
} }
return ret; return ret;
......
...@@ -767,7 +767,7 @@ int intel_logical_ring_alloc_request_extras(struct drm_i915_gem_request *request ...@@ -767,7 +767,7 @@ int intel_logical_ring_alloc_request_extras(struct drm_i915_gem_request *request
static int static int
intel_logical_ring_advance_and_submit(struct drm_i915_gem_request *request) intel_logical_ring_advance_and_submit(struct drm_i915_gem_request *request)
{ {
struct intel_ringbuffer *ring = request->ring; struct intel_ring *ring = request->ring;
struct intel_engine_cs *engine = request->engine; struct intel_engine_cs *engine = request->engine;
intel_ring_advance(ring); intel_ring_advance(ring);
...@@ -818,7 +818,7 @@ int intel_execlists_submission(struct i915_execbuffer_params *params, ...@@ -818,7 +818,7 @@ int intel_execlists_submission(struct i915_execbuffer_params *params,
struct drm_device *dev = params->dev; struct drm_device *dev = params->dev;
struct intel_engine_cs *engine = params->engine; struct intel_engine_cs *engine = params->engine;
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_ringbuffer *ring = params->request->ring; struct intel_ring *ring = params->request->ring;
u64 exec_start; u64 exec_start;
int instp_mode; int instp_mode;
u32 instp_mask; u32 instp_mask;
...@@ -973,7 +973,7 @@ static int intel_lr_context_pin(struct i915_gem_context *ctx, ...@@ -973,7 +973,7 @@ static int intel_lr_context_pin(struct i915_gem_context *ctx,
lrc_reg_state = vaddr + LRC_STATE_PN * PAGE_SIZE; lrc_reg_state = vaddr + LRC_STATE_PN * PAGE_SIZE;
ret = intel_pin_and_map_ringbuffer_obj(dev_priv, ce->ring); ret = intel_pin_and_map_ring(dev_priv, ce->ring);
if (ret) if (ret)
goto unpin_map; goto unpin_map;
...@@ -1011,7 +1011,7 @@ void intel_lr_context_unpin(struct i915_gem_context *ctx, ...@@ -1011,7 +1011,7 @@ void intel_lr_context_unpin(struct i915_gem_context *ctx,
if (--ce->pin_count) if (--ce->pin_count)
return; return;
intel_unpin_ringbuffer_obj(ce->ring); intel_unpin_ring(ce->ring);
i915_gem_object_unpin_map(ce->state); i915_gem_object_unpin_map(ce->state);
i915_gem_object_ggtt_unpin(ce->state); i915_gem_object_ggtt_unpin(ce->state);
...@@ -1027,7 +1027,7 @@ static int intel_logical_ring_workarounds_emit(struct drm_i915_gem_request *req) ...@@ -1027,7 +1027,7 @@ static int intel_logical_ring_workarounds_emit(struct drm_i915_gem_request *req)
{ {
int ret, i; int ret, i;
struct intel_engine_cs *engine = req->engine; struct intel_engine_cs *engine = req->engine;
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct i915_workarounds *w = &req->i915->workarounds; struct i915_workarounds *w = &req->i915->workarounds;
if (w->count == 0) if (w->count == 0)
...@@ -1550,7 +1550,7 @@ static int gen9_init_render_ring(struct intel_engine_cs *engine) ...@@ -1550,7 +1550,7 @@ static int gen9_init_render_ring(struct intel_engine_cs *engine)
static int intel_logical_ring_emit_pdps(struct drm_i915_gem_request *req) static int intel_logical_ring_emit_pdps(struct drm_i915_gem_request *req)
{ {
struct i915_hw_ppgtt *ppgtt = req->ctx->ppgtt; struct i915_hw_ppgtt *ppgtt = req->ctx->ppgtt;
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
struct intel_engine_cs *engine = req->engine; struct intel_engine_cs *engine = req->engine;
const int num_lri_cmds = GEN8_LEGACY_PDPES * 2; const int num_lri_cmds = GEN8_LEGACY_PDPES * 2;
int i, ret; int i, ret;
...@@ -1578,7 +1578,7 @@ static int intel_logical_ring_emit_pdps(struct drm_i915_gem_request *req) ...@@ -1578,7 +1578,7 @@ static int intel_logical_ring_emit_pdps(struct drm_i915_gem_request *req)
static int gen8_emit_bb_start(struct drm_i915_gem_request *req, static int gen8_emit_bb_start(struct drm_i915_gem_request *req,
u64 offset, unsigned dispatch_flags) u64 offset, unsigned dispatch_flags)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
bool ppgtt = !(dispatch_flags & I915_DISPATCH_SECURE); bool ppgtt = !(dispatch_flags & I915_DISPATCH_SECURE);
int ret; int ret;
...@@ -1635,8 +1635,8 @@ static int gen8_emit_flush(struct drm_i915_gem_request *request, ...@@ -1635,8 +1635,8 @@ static int gen8_emit_flush(struct drm_i915_gem_request *request,
u32 invalidate_domains, u32 invalidate_domains,
u32 unused) u32 unused)
{ {
struct intel_ringbuffer *ring = request->ring; struct intel_ring *ring = request->ring;
uint32_t cmd; u32 cmd;
int ret; int ret;
ret = intel_ring_begin(request, 4); ret = intel_ring_begin(request, 4);
...@@ -1673,7 +1673,7 @@ static int gen8_emit_flush_render(struct drm_i915_gem_request *request, ...@@ -1673,7 +1673,7 @@ static int gen8_emit_flush_render(struct drm_i915_gem_request *request,
u32 invalidate_domains, u32 invalidate_domains,
u32 flush_domains) u32 flush_domains)
{ {
struct intel_ringbuffer *ring = request->ring; struct intel_ring *ring = request->ring;
struct intel_engine_cs *engine = request->engine; struct intel_engine_cs *engine = request->engine;
u32 scratch_addr = engine->scratch.gtt_offset + 2 * CACHELINE_BYTES; u32 scratch_addr = engine->scratch.gtt_offset + 2 * CACHELINE_BYTES;
bool vf_flush_wa = false, dc_flush_wa = false; bool vf_flush_wa = false, dc_flush_wa = false;
...@@ -1787,7 +1787,7 @@ static void bxt_a_seqno_barrier(struct intel_engine_cs *engine) ...@@ -1787,7 +1787,7 @@ static void bxt_a_seqno_barrier(struct intel_engine_cs *engine)
static int gen8_emit_request(struct drm_i915_gem_request *request) static int gen8_emit_request(struct drm_i915_gem_request *request)
{ {
struct intel_ringbuffer *ring = request->ring; struct intel_ring *ring = request->ring;
int ret; int ret;
ret = intel_ring_begin(request, 6 + WA_TAIL_DWORDS); ret = intel_ring_begin(request, 6 + WA_TAIL_DWORDS);
...@@ -1810,7 +1810,7 @@ static int gen8_emit_request(struct drm_i915_gem_request *request) ...@@ -1810,7 +1810,7 @@ static int gen8_emit_request(struct drm_i915_gem_request *request)
static int gen8_emit_request_render(struct drm_i915_gem_request *request) static int gen8_emit_request_render(struct drm_i915_gem_request *request)
{ {
struct intel_ringbuffer *ring = request->ring; struct intel_ring *ring = request->ring;
int ret; int ret;
ret = intel_ring_begin(request, 8 + WA_TAIL_DWORDS); ret = intel_ring_begin(request, 8 + WA_TAIL_DWORDS);
...@@ -2162,7 +2162,7 @@ static int ...@@ -2162,7 +2162,7 @@ static int
populate_lr_context(struct i915_gem_context *ctx, populate_lr_context(struct i915_gem_context *ctx,
struct drm_i915_gem_object *ctx_obj, struct drm_i915_gem_object *ctx_obj,
struct intel_engine_cs *engine, struct intel_engine_cs *engine,
struct intel_ringbuffer *ringbuf) struct intel_ring *ring)
{ {
struct drm_i915_private *dev_priv = ctx->i915; struct drm_i915_private *dev_priv = ctx->i915;
struct i915_hw_ppgtt *ppgtt = ctx->ppgtt; struct i915_hw_ppgtt *ppgtt = ctx->ppgtt;
...@@ -2215,7 +2215,7 @@ populate_lr_context(struct i915_gem_context *ctx, ...@@ -2215,7 +2215,7 @@ populate_lr_context(struct i915_gem_context *ctx,
RING_START(engine->mmio_base), 0); RING_START(engine->mmio_base), 0);
ASSIGN_CTX_REG(reg_state, CTX_RING_BUFFER_CONTROL, ASSIGN_CTX_REG(reg_state, CTX_RING_BUFFER_CONTROL,
RING_CTL(engine->mmio_base), RING_CTL(engine->mmio_base),
((ringbuf->size - PAGE_SIZE) & RING_NR_PAGES) | RING_VALID); ((ring->size - PAGE_SIZE) & RING_NR_PAGES) | RING_VALID);
ASSIGN_CTX_REG(reg_state, CTX_BB_HEAD_U, ASSIGN_CTX_REG(reg_state, CTX_BB_HEAD_U,
RING_BBADDR_UDW(engine->mmio_base), 0); RING_BBADDR_UDW(engine->mmio_base), 0);
ASSIGN_CTX_REG(reg_state, CTX_BB_HEAD_L, ASSIGN_CTX_REG(reg_state, CTX_BB_HEAD_L,
...@@ -2343,7 +2343,7 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx, ...@@ -2343,7 +2343,7 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx,
struct drm_i915_gem_object *ctx_obj; struct drm_i915_gem_object *ctx_obj;
struct intel_context *ce = &ctx->engine[engine->id]; struct intel_context *ce = &ctx->engine[engine->id];
uint32_t context_size; uint32_t context_size;
struct intel_ringbuffer *ring; struct intel_ring *ring;
int ret; int ret;
WARN_ON(ce->state); WARN_ON(ce->state);
...@@ -2359,7 +2359,7 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx, ...@@ -2359,7 +2359,7 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx,
return PTR_ERR(ctx_obj); return PTR_ERR(ctx_obj);
} }
ring = intel_engine_create_ringbuffer(engine, ctx->ring_size); ring = intel_engine_create_ring(engine, ctx->ring_size);
if (IS_ERR(ring)) { if (IS_ERR(ring)) {
ret = PTR_ERR(ring); ret = PTR_ERR(ring);
goto error_deref_obj; goto error_deref_obj;
...@@ -2378,7 +2378,7 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx, ...@@ -2378,7 +2378,7 @@ static int execlists_context_deferred_alloc(struct i915_gem_context *ctx,
return 0; return 0;
error_ring_free: error_ring_free:
intel_ringbuffer_free(ring); intel_ring_free(ring);
error_deref_obj: error_deref_obj:
i915_gem_object_put(ctx_obj); i915_gem_object_put(ctx_obj);
ce->ring = NULL; ce->ring = NULL;
......
...@@ -276,7 +276,7 @@ int intel_mocs_init_engine(struct intel_engine_cs *engine) ...@@ -276,7 +276,7 @@ int intel_mocs_init_engine(struct intel_engine_cs *engine)
static int emit_mocs_control_table(struct drm_i915_gem_request *req, static int emit_mocs_control_table(struct drm_i915_gem_request *req,
const struct drm_i915_mocs_table *table) const struct drm_i915_mocs_table *table)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
enum intel_engine_id engine = req->engine->id; enum intel_engine_id engine = req->engine->id;
unsigned int index; unsigned int index;
int ret; int ret;
...@@ -336,7 +336,7 @@ static inline u32 l3cc_combine(const struct drm_i915_mocs_table *table, ...@@ -336,7 +336,7 @@ static inline u32 l3cc_combine(const struct drm_i915_mocs_table *table,
static int emit_mocs_l3cc_table(struct drm_i915_gem_request *req, static int emit_mocs_l3cc_table(struct drm_i915_gem_request *req,
const struct drm_i915_mocs_table *table) const struct drm_i915_mocs_table *table)
{ {
struct intel_ringbuffer *ring = req->ring; struct intel_ring *ring = req->ring;
unsigned int i; unsigned int i;
int ret; int ret;
......
...@@ -235,7 +235,7 @@ static int intel_overlay_on(struct intel_overlay *overlay) ...@@ -235,7 +235,7 @@ static int intel_overlay_on(struct intel_overlay *overlay)
struct drm_i915_private *dev_priv = overlay->i915; struct drm_i915_private *dev_priv = overlay->i915;
struct intel_engine_cs *engine = &dev_priv->engine[RCS]; struct intel_engine_cs *engine = &dev_priv->engine[RCS];
struct drm_i915_gem_request *req; struct drm_i915_gem_request *req;
struct intel_ringbuffer *ring; struct intel_ring *ring;
int ret; int ret;
WARN_ON(overlay->active); WARN_ON(overlay->active);
...@@ -270,7 +270,7 @@ static int intel_overlay_continue(struct intel_overlay *overlay, ...@@ -270,7 +270,7 @@ static int intel_overlay_continue(struct intel_overlay *overlay,
struct drm_i915_private *dev_priv = overlay->i915; struct drm_i915_private *dev_priv = overlay->i915;
struct intel_engine_cs *engine = &dev_priv->engine[RCS]; struct intel_engine_cs *engine = &dev_priv->engine[RCS];
struct drm_i915_gem_request *req; struct drm_i915_gem_request *req;
struct intel_ringbuffer *ring; struct intel_ring *ring;
u32 flip_addr = overlay->flip_addr; u32 flip_addr = overlay->flip_addr;
u32 tmp; u32 tmp;
int ret; int ret;
...@@ -340,7 +340,7 @@ static int intel_overlay_off(struct intel_overlay *overlay) ...@@ -340,7 +340,7 @@ static int intel_overlay_off(struct intel_overlay *overlay)
struct drm_i915_private *dev_priv = overlay->i915; struct drm_i915_private *dev_priv = overlay->i915;
struct intel_engine_cs *engine = &dev_priv->engine[RCS]; struct intel_engine_cs *engine = &dev_priv->engine[RCS];
struct drm_i915_gem_request *req; struct drm_i915_gem_request *req;
struct intel_ringbuffer *ring; struct intel_ring *ring;
u32 flip_addr = overlay->flip_addr; u32 flip_addr = overlay->flip_addr;
int ret; int ret;
...@@ -426,7 +426,7 @@ static int intel_overlay_release_old_vid(struct intel_overlay *overlay) ...@@ -426,7 +426,7 @@ static int intel_overlay_release_old_vid(struct intel_overlay *overlay)
if (I915_READ(ISR) & I915_OVERLAY_PLANE_FLIP_PENDING_INTERRUPT) { if (I915_READ(ISR) & I915_OVERLAY_PLANE_FLIP_PENDING_INTERRUPT) {
/* synchronous slowpath */ /* synchronous slowpath */
struct drm_i915_gem_request *req; struct drm_i915_gem_request *req;
struct intel_ringbuffer *ring; struct intel_ring *ring;
req = i915_gem_request_alloc(engine, NULL); req = i915_gem_request_alloc(engine, NULL);
if (IS_ERR(req)) if (IS_ERR(req))
......
This diff is collapsed.
...@@ -62,7 +62,7 @@ struct intel_hw_status_page { ...@@ -62,7 +62,7 @@ struct intel_hw_status_page {
(i915_gem_obj_ggtt_offset(dev_priv->semaphore_obj) + \ (i915_gem_obj_ggtt_offset(dev_priv->semaphore_obj) + \
GEN8_SEMAPHORE_OFFSET(from, (__ring)->id)) GEN8_SEMAPHORE_OFFSET(from, (__ring)->id))
enum intel_ring_hangcheck_action { enum intel_engine_hangcheck_action {
HANGCHECK_IDLE = 0, HANGCHECK_IDLE = 0,
HANGCHECK_WAIT, HANGCHECK_WAIT,
HANGCHECK_ACTIVE, HANGCHECK_ACTIVE,
...@@ -72,17 +72,17 @@ enum intel_ring_hangcheck_action { ...@@ -72,17 +72,17 @@ enum intel_ring_hangcheck_action {
#define HANGCHECK_SCORE_RING_HUNG 31 #define HANGCHECK_SCORE_RING_HUNG 31
struct intel_ring_hangcheck { struct intel_engine_hangcheck {
u64 acthd; u64 acthd;
unsigned long user_interrupts; unsigned long user_interrupts;
u32 seqno; u32 seqno;
int score; int score;
enum intel_ring_hangcheck_action action; enum intel_engine_hangcheck_action action;
int deadlock; int deadlock;
u32 instdone[I915_NUM_INSTDONE_REG]; u32 instdone[I915_NUM_INSTDONE_REG];
}; };
struct intel_ringbuffer { struct intel_ring {
struct drm_i915_gem_object *obj; struct drm_i915_gem_object *obj;
void *vaddr; void *vaddr;
struct i915_vma *vma; struct i915_vma *vma;
...@@ -149,7 +149,7 @@ struct intel_engine_cs { ...@@ -149,7 +149,7 @@ struct intel_engine_cs {
u64 fence_context; u64 fence_context;
u32 mmio_base; u32 mmio_base;
unsigned int irq_shift; unsigned int irq_shift;
struct intel_ringbuffer *buffer; struct intel_ring *buffer;
struct list_head buffers; struct list_head buffers;
/* Rather than have every client wait upon all user interrupts, /* Rather than have every client wait upon all user interrupts,
...@@ -329,7 +329,7 @@ struct intel_engine_cs { ...@@ -329,7 +329,7 @@ struct intel_engine_cs {
struct i915_gem_context *last_context; struct i915_gem_context *last_context;
struct intel_ring_hangcheck hangcheck; struct intel_engine_hangcheck hangcheck;
struct { struct {
struct drm_i915_gem_object *obj; struct drm_i915_gem_object *obj;
...@@ -376,8 +376,8 @@ intel_engine_flag(const struct intel_engine_cs *engine) ...@@ -376,8 +376,8 @@ intel_engine_flag(const struct intel_engine_cs *engine)
} }
static inline u32 static inline u32
intel_ring_sync_index(struct intel_engine_cs *engine, intel_engine_sync_index(struct intel_engine_cs *engine,
struct intel_engine_cs *other) struct intel_engine_cs *other)
{ {
int idx; int idx;
...@@ -439,45 +439,44 @@ intel_write_status_page(struct intel_engine_cs *engine, ...@@ -439,45 +439,44 @@ intel_write_status_page(struct intel_engine_cs *engine,
#define I915_GEM_HWS_SCRATCH_INDEX 0x40 #define I915_GEM_HWS_SCRATCH_INDEX 0x40
#define I915_GEM_HWS_SCRATCH_ADDR (I915_GEM_HWS_SCRATCH_INDEX << MI_STORE_DWORD_INDEX_SHIFT) #define I915_GEM_HWS_SCRATCH_ADDR (I915_GEM_HWS_SCRATCH_INDEX << MI_STORE_DWORD_INDEX_SHIFT)
struct intel_ringbuffer * struct intel_ring *
intel_engine_create_ringbuffer(struct intel_engine_cs *engine, int size); intel_engine_create_ring(struct intel_engine_cs *engine, int size);
int intel_pin_and_map_ringbuffer_obj(struct drm_i915_private *dev_priv, int intel_pin_and_map_ring(struct drm_i915_private *dev_priv,
struct intel_ringbuffer *ringbuf); struct intel_ring *ring);
void intel_unpin_ringbuffer_obj(struct intel_ringbuffer *ringbuf); void intel_unpin_ring(struct intel_ring *ring);
void intel_ringbuffer_free(struct intel_ringbuffer *ring); void intel_ring_free(struct intel_ring *ring);
void intel_stop_engine(struct intel_engine_cs *engine); void intel_engine_stop(struct intel_engine_cs *engine);
void intel_cleanup_engine(struct intel_engine_cs *engine); void intel_engine_cleanup(struct intel_engine_cs *engine);
int intel_ring_alloc_request_extras(struct drm_i915_gem_request *request); int intel_ring_alloc_request_extras(struct drm_i915_gem_request *request);
int __must_check intel_ring_begin(struct drm_i915_gem_request *req, int n); int __must_check intel_ring_begin(struct drm_i915_gem_request *req, int n);
int __must_check intel_ring_cacheline_align(struct drm_i915_gem_request *req); int __must_check intel_ring_cacheline_align(struct drm_i915_gem_request *req);
static inline void intel_ring_emit(struct intel_ringbuffer *ring, u32 data) static inline void intel_ring_emit(struct intel_ring *ring, u32 data)
{ {
*(uint32_t *)(ring->vaddr + ring->tail) = data; *(uint32_t *)(ring->vaddr + ring->tail) = data;
ring->tail += 4; ring->tail += 4;
} }
static inline void intel_ring_emit_reg(struct intel_ringbuffer *ring, static inline void intel_ring_emit_reg(struct intel_ring *ring, i915_reg_t reg)
i915_reg_t reg)
{ {
intel_ring_emit(ring, i915_mmio_reg_offset(reg)); intel_ring_emit(ring, i915_mmio_reg_offset(reg));
} }
static inline void intel_ring_advance(struct intel_ringbuffer *ring) static inline void intel_ring_advance(struct intel_ring *ring)
{ {
ring->tail &= ring->size - 1; ring->tail &= ring->size - 1;
} }
int __intel_ring_space(int head, int tail, int size); int __intel_ring_space(int head, int tail, int size);
void intel_ring_update_space(struct intel_ringbuffer *ringbuf); void intel_ring_update_space(struct intel_ring *ringbuf);
int __must_check intel_engine_idle(struct intel_engine_cs *engine); int __must_check intel_engine_idle(struct intel_engine_cs *engine);
void intel_ring_init_seqno(struct intel_engine_cs *engine, u32 seqno); void intel_engine_init_seqno(struct intel_engine_cs *engine, u32 seqno);
int intel_ring_flush_all_caches(struct drm_i915_gem_request *req); int intel_engine_flush_all_caches(struct drm_i915_gem_request *req);
int intel_ring_invalidate_all_caches(struct drm_i915_gem_request *req); int intel_engine_invalidate_all_caches(struct drm_i915_gem_request *req);
int intel_init_pipe_control(struct intel_engine_cs *engine, int size); int intel_init_pipe_control(struct intel_engine_cs *engine, int size);
void intel_fini_pipe_control(struct intel_engine_cs *engine); void intel_fini_pipe_control(struct intel_engine_cs *engine);
...@@ -491,7 +490,7 @@ int intel_init_bsd2_ring_buffer(struct intel_engine_cs *engine); ...@@ -491,7 +490,7 @@ int intel_init_bsd2_ring_buffer(struct intel_engine_cs *engine);
int intel_init_blt_ring_buffer(struct intel_engine_cs *engine); int intel_init_blt_ring_buffer(struct intel_engine_cs *engine);
int intel_init_vebox_ring_buffer(struct intel_engine_cs *engine); int intel_init_vebox_ring_buffer(struct intel_engine_cs *engine);
u64 intel_ring_get_active_head(struct intel_engine_cs *engine); u64 intel_engine_get_active_head(struct intel_engine_cs *engine);
static inline u32 intel_engine_get_seqno(struct intel_engine_cs *engine) static inline u32 intel_engine_get_seqno(struct intel_engine_cs *engine)
{ {
return intel_read_status_page(engine, I915_GEM_HWS_INDEX); return intel_read_status_page(engine, I915_GEM_HWS_INDEX);
...@@ -499,7 +498,7 @@ static inline u32 intel_engine_get_seqno(struct intel_engine_cs *engine) ...@@ -499,7 +498,7 @@ static inline u32 intel_engine_get_seqno(struct intel_engine_cs *engine)
int init_workarounds_ring(struct intel_engine_cs *engine); int init_workarounds_ring(struct intel_engine_cs *engine);
static inline u32 intel_ring_get_tail(struct intel_ringbuffer *ringbuf) static inline u32 intel_ring_get_tail(struct intel_ring *ringbuf)
{ {
return ringbuf->tail; return ringbuf->tail;
} }
......
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