mirror of https://gitee.com/openkylin/linux.git
drm/i915: Parametrize LRC registers
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
8bd864b81a
commit
83843d84fc
|
@ -2069,8 +2069,8 @@ static int i915_execlists(struct seq_file *m, void *data)
|
|||
|
||||
seq_printf(m, "%s\n", ring->name);
|
||||
|
||||
status = I915_READ(RING_EXECLIST_STATUS(ring));
|
||||
ctx_id = I915_READ(RING_EXECLIST_STATUS(ring) + 4);
|
||||
status = I915_READ(RING_EXECLIST_STATUS_LO(ring));
|
||||
ctx_id = I915_READ(RING_EXECLIST_STATUS_HI(ring));
|
||||
seq_printf(m, "\tExeclist status: 0x%08X, context: %u\n",
|
||||
status, ctx_id);
|
||||
|
||||
|
@ -2085,8 +2085,8 @@ static int i915_execlists(struct seq_file *m, void *data)
|
|||
read_pointer, write_pointer);
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
status = I915_READ(RING_CONTEXT_STATUS_BUF(ring) + 8*i);
|
||||
ctx_id = I915_READ(RING_CONTEXT_STATUS_BUF(ring) + 8*i + 4);
|
||||
status = I915_READ(RING_CONTEXT_STATUS_BUF_LO(ring, i));
|
||||
ctx_id = I915_READ(RING_CONTEXT_STATUS_BUF_HI(ring, i));
|
||||
|
||||
seq_printf(m, "\tStatus buffer %d: 0x%08X, context: %u\n",
|
||||
i, status, ctx_id);
|
||||
|
|
|
@ -349,7 +349,7 @@ static void execlists_elsp_write(struct drm_i915_gem_request *rq0,
|
|||
I915_WRITE_FW(RING_ELSP(ring), lower_32_bits(desc[0]));
|
||||
|
||||
/* ELSP is a wo register, use another nearby reg for posting */
|
||||
POSTING_READ_FW(RING_EXECLIST_STATUS(ring));
|
||||
POSTING_READ_FW(RING_EXECLIST_STATUS_LO(ring));
|
||||
intel_uncore_forcewake_put__locked(dev_priv, FORCEWAKE_ALL);
|
||||
spin_unlock(&dev_priv->uncore.lock);
|
||||
}
|
||||
|
@ -519,10 +519,8 @@ void intel_lrc_irq_handler(struct intel_engine_cs *ring)
|
|||
|
||||
while (read_pointer < write_pointer) {
|
||||
read_pointer++;
|
||||
status = I915_READ(RING_CONTEXT_STATUS_BUF(ring) +
|
||||
(read_pointer % 6) * 8);
|
||||
status_id = I915_READ(RING_CONTEXT_STATUS_BUF(ring) +
|
||||
(read_pointer % 6) * 8 + 4);
|
||||
status = I915_READ(RING_CONTEXT_STATUS_BUF_LO(ring, read_pointer % 6));
|
||||
status_id = I915_READ(RING_CONTEXT_STATUS_BUF_HI(ring, read_pointer % 6));
|
||||
|
||||
if (status & GEN8_CTX_STATUS_IDLE_ACTIVE)
|
||||
continue;
|
||||
|
|
|
@ -28,12 +28,14 @@
|
|||
|
||||
/* Execlists regs */
|
||||
#define RING_ELSP(ring) ((ring)->mmio_base+0x230)
|
||||
#define RING_EXECLIST_STATUS(ring) ((ring)->mmio_base+0x234)
|
||||
#define RING_EXECLIST_STATUS_LO(ring) ((ring)->mmio_base+0x234)
|
||||
#define RING_EXECLIST_STATUS_HI(ring) ((ring)->mmio_base+0x234 + 4)
|
||||
#define RING_CONTEXT_CONTROL(ring) ((ring)->mmio_base+0x244)
|
||||
#define CTX_CTRL_INHIBIT_SYN_CTX_SWITCH (1 << 3)
|
||||
#define CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT (1 << 0)
|
||||
#define CTX_CTRL_RS_CTX_ENABLE (1 << 1)
|
||||
#define RING_CONTEXT_STATUS_BUF(ring) ((ring)->mmio_base+0x370)
|
||||
#define RING_CONTEXT_STATUS_BUF_LO(ring, i) ((ring)->mmio_base+0x370 + (i) * 8)
|
||||
#define RING_CONTEXT_STATUS_BUF_HI(ring, i) ((ring)->mmio_base+0x370 + (i) * 8 + 4)
|
||||
#define RING_CONTEXT_STATUS_PTR(ring) ((ring)->mmio_base+0x3a0)
|
||||
|
||||
/* Logical Rings */
|
||||
|
|
Loading…
Reference in New Issue