提交 693cfbf0 编写于 作者: C Chris Wilson

drm/i915/execlists: Record elsp offset during engine setup

Currently, we record the elsp register offset inside init-hw but we only
need to do it once during engine setup (after we know the mmio
iomapping).
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: NMichał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180102151235.3949-17-chris@chris-wilson.co.uk
上级 42232213
...@@ -1496,9 +1496,6 @@ static int gen8_init_common_ring(struct intel_engine_cs *engine) ...@@ -1496,9 +1496,6 @@ static int gen8_init_common_ring(struct intel_engine_cs *engine)
execlists->csb_head = -1; execlists->csb_head = -1;
execlists->active = 0; execlists->active = 0;
execlists->elsp =
dev_priv->regs + i915_mmio_reg_offset(RING_ELSP(engine));
/* After a GPU reset, we may have requests to replay */ /* After a GPU reset, we may have requests to replay */
if (execlists->first) if (execlists->first)
tasklet_schedule(&execlists->tasklet); tasklet_schedule(&execlists->tasklet);
...@@ -2007,6 +2004,9 @@ static int logical_ring_init(struct intel_engine_cs *engine) ...@@ -2007,6 +2004,9 @@ static int logical_ring_init(struct intel_engine_cs *engine)
if (ret) if (ret)
goto error; goto error;
engine->execlists.elsp =
engine->i915->regs + i915_mmio_reg_offset(RING_ELSP(engine));
return 0; return 0;
error: error:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部