From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915: Store engine mask in intel_gt
Date: Wed, 16 Oct 2019 14:31:45 +0100 [thread overview]
Message-ID: <fd9f9b65-e3ad-50e1-c440-af3be4407c53@linux.intel.com> (raw)
In-Reply-To: <157123101407.22469.10360475997002619905@skylake-alporthouse-com>
On 16/10/2019 14:03, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2019-10-16 13:28:42)
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Medium term goal is to eliminate the i915->engine[] array and to get there
>> we have recently introduced equivalent array in intel_gt. Now we need to
>> migrate the code further towards this state.
>>
>> To allow for_each_engine_masked call sites to pass in gt instead of i915
>> we need to have a copy of INTEL_INFO()->engine_mask in intel_gt.
>>
>> For this to work we also need to use engine->id as index when populating
>> the gt->engine[] array.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> ---
>> drivers/gpu/drm/i915/gt/intel_engine_user.c | 4 ++--
>> drivers/gpu/drm/i915/gt/intel_gt.c | 5 +++++
>> drivers/gpu/drm/i915/gt/intel_gt.h | 1 +
>> drivers/gpu/drm/i915/gt/intel_gt_types.h | 4 ++++
>> drivers/gpu/drm/i915/i915_drv.c | 2 ++
>> 5 files changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_user.c b/drivers/gpu/drm/i915/gt/intel_engine_user.c
>> index 77cd5de83930..099abae860ec 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_engine_user.c
>> +++ b/drivers/gpu/drm/i915/gt/intel_engine_user.c
>> @@ -183,8 +183,8 @@ static void add_legacy_ring(struct legacy_ring *ring,
>> if (unlikely(idx == -1))
>> return;
>>
>> - GEM_BUG_ON(idx >= ARRAY_SIZE(ring->gt->engine));
>> - ring->gt->engine[idx] = engine;
>
> This is used for the legacy uapi mapping. So we need to adjust the loop
> in i915_gem_context.c::default_engines() to use engine->legacy_idx
> instead of id. And all other users of engine->legacy_idx are now
> backwards.
Hmmm that's evil.. I mean so well hidden dependency and contrary to
years of decoupling efforts. But I gather some mess is expected in these
circumstances. I'll update.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-10-16 13:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 12:28 [PATCH 1/3] drm/i915: Make i915_gem_load_power_context take struct intel_gt Tvrtko Ursulin
2019-10-16 12:28 ` [PATCH 2/3] drm/i915: Store engine mask in intel_gt Tvrtko Ursulin
2019-10-16 13:03 ` Chris Wilson
2019-10-16 13:31 ` Tvrtko Ursulin [this message]
2019-10-16 13:41 ` Chris Wilson
2019-10-16 12:28 ` [PATCH 3/3] drm/i915: Pass in intel_gt at some for_each_engine sites Tvrtko Ursulin
2019-10-16 13:04 ` Chris Wilson
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=fd9f9b65-e3ad-50e1-c440-af3be4407c53@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox