[Intel-gfx] [PATCH 3/3] drm/i915: Only grab correct forcewake for the engine with execlists
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Thu Apr 7 14:52:46 UTC 2016
On 07/04/16 15:35, Chris Wilson wrote:
> 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;
I actually considered this (or-ing together for all registers).. might
as well do it now.
> 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()
intel_uncore_forcewake_for_reg ?
Remaining open on what to do with gen7 and below.
Regards,
Tvrtko
More information about the Intel-gfx
mailing list