[Intel-gfx] [PATCH 3/3] drm/i915: Only grab correct forcewake for the engine with execlists

Chris Wilson chris at chris-wilson.co.uk
Thu Apr 7 14:35:36 UTC 2016


On Thu, Apr 07, 2016 at 03:05:40PM +0100, Tvrtko Ursulin wrote:
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index a1db6a02cf23..cac387f38cf6 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -418,6 +418,7 @@ static void execlists_submit_requests(struct drm_i915_gem_request *rq0,
>  				      struct drm_i915_gem_request *rq1)
>  {
>  	struct drm_i915_private *dev_priv = rq0->i915;
> +	unsigned int fw_domains = rq0->engine->fw_domains_elsp;

So with a slightly different layout of fw that nest the elsp fw within
the tasklet handler's fw I would have a preamble like:

fw_domains = 0;
for_each_reg({ELSP, WRITE},
	     {CONTEXT_STATUS_BUF, READ},
	     {CONTEXT_STATUS_PTR, READ | WRITE})
	fw_domains |= intel_reg_fw_domains(dev_priv, reg, direction);
engine->execlist_fw_domains = fw_domains;

Hmm, we have a name clash with i915_reg_t i915_mmio_reg and
intel_uncore_forcewake_get()

intel_uncore_forcewake_for_mmio()
i915_mmio_reg_fw_domains()
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list