All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/7] drm/i915: Move engine-related mmio init to engines_init_mmio
Date: Fri, 26 Jun 2020 07:46:53 -0700	[thread overview]
Message-ID: <f711551d-e5dd-0cbf-8bbf-db27425620b9@intel.com> (raw)
In-Reply-To: <159318233803.13600.604722317964699116@build.alporthouse.com>



On 6/26/20 7:38 AM, Chris Wilson wrote:
> Quoting Daniele Ceraolo Spurio (2020-06-26 00:42:08)
>> All the info we read in intel_device_info_init_mmio are engine-related
>> and since we already have an engine_init_mmio function we can just
>> perform the operations from there.
>>
>> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>> Cc: Andi Shyti <andi.shyti@intel.com>
>> ---
>>   drivers/gpu/drm/i915/gt/intel_engine_cs.c | 72 ++++++++++++++++++++++-
>>   drivers/gpu/drm/i915/i915_drv.c           |  4 --
>>   drivers/gpu/drm/i915/intel_device_info.c  | 66 ---------------------
>>   drivers/gpu/drm/i915/intel_device_info.h  |  2 -
>>   4 files changed, 71 insertions(+), 73 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
>> index be92d1ef9aa9..8497106eb3a6 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
>> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
>> @@ -450,6 +450,74 @@ void intel_engines_free(struct intel_gt *gt)
>>          }
>>   }
>>   
>> +/*
>> + * Determine which engines are fused off in our particular hardware. Since the
>> + * fuse register is in the blitter powerwell, we need forcewake to be ready at
>> + * this point (but later we need to prune the forcewake domains for engines that
>> + * are indeed fused off).
>> + */
>> +static intel_engine_mask_t init_engine_mask(struct intel_gt *gt)
>> +{
>> +       struct drm_i915_private *i915 = gt->i915;
>> +       struct intel_device_info *info = mkwrite_device_info(i915);
>> +       struct intel_uncore *uncore = gt->uncore;
>> +       unsigned int logical_vdbox = 0;
>> +       unsigned int i;
>> +       u32 media_fuse;
>> +       u16 vdbox_mask;
>> +       u16 vebox_mask;
> 
> assert_forcewakes_active(uncore, FORCEWAKE_BLITTER) ?
> 
> Since it's called out in the comment, might as well reinforce that with
> an assert.

We don't expect it to be active, just to be initialized/usable.
This comment is there to remind us of the catch-22 issue we have where 
we need forcewake to be initialized to read the fuses, but we need the 
fuses values to know which engines are available and therefore which fw 
domains are there (and that's why we prune the domains later).

Daniele

> -Chris
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-06-26 14:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 23:42 [Intel-gfx] [PATCH 0/7] Move some device capabilities under intel_gt Daniele Ceraolo Spurio
2020-06-25 23:42 ` [Intel-gfx] [PATCH 1/7] drm/i915: Convert device_info to uncore/de_read Daniele Ceraolo Spurio
2020-06-26 14:18   ` Tvrtko Ursulin
2020-06-25 23:42 ` [Intel-gfx] [PATCH 2/7] drm/i915: Use the gt in HAS_ENGINE Daniele Ceraolo Spurio
2020-06-26 14:20   ` Tvrtko Ursulin
2020-06-26 14:35   ` Chris Wilson
2020-06-26 17:45     ` Daniele Ceraolo Spurio
2020-06-26 18:03       ` Chris Wilson
2020-06-25 23:42 ` [Intel-gfx] [PATCH 3/7] drm/i915: Move engine-related mmio init to engines_init_mmio Daniele Ceraolo Spurio
2020-06-26 14:38   ` Tvrtko Ursulin
2020-06-26 14:38   ` Chris Wilson
2020-06-26 14:46     ` Daniele Ceraolo Spurio [this message]
2020-06-26 14:51       ` Chris Wilson
2020-06-25 23:42 ` [Intel-gfx] [PATCH 4/7] drm/i915: Move the engine mask to intel_gt_info Daniele Ceraolo Spurio
2020-06-26 14:45   ` Tvrtko Ursulin
2020-06-26 16:44     ` Daniele Ceraolo Spurio
2020-06-26 16:50       ` Chris Wilson
2020-06-25 23:42 ` [Intel-gfx] [PATCH 5/7] drm/i915: Introduce gt_init_mmio Daniele Ceraolo Spurio
2020-06-26 14:46   ` Tvrtko Ursulin
2020-06-25 23:42 ` [Intel-gfx] [PATCH 6/7] drm/i915/sseu: Move sseu detection and dump to intel_sseu Daniele Ceraolo Spurio
2020-06-26 15:00   ` Tvrtko Ursulin
2020-06-25 23:42 ` [Intel-gfx] [PATCH 7/7] drm/i915/sseu: Move sseu_info under gt_info Daniele Ceraolo Spurio
2020-06-26 15:22   ` Tvrtko Ursulin
2020-06-26 16:49     ` Daniele Ceraolo Spurio
2020-06-27  8:13 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Move some device capabilities under intel_gt Patchwork
2020-06-27  8:38 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f711551d-e5dd-0cbf-8bbf-db27425620b9@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.