From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Gupta, Anshuman" <anshuman.gupta@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Cc: "Auld, Matthew" <matthew.auld@intel.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [RFC 1/1] drm/i915/dgfx: Handling of pin_map against rpm
Date: Fri, 16 Sep 2022 11:48:37 +0100 [thread overview]
Message-ID: <f6b322d7-7950-8aae-b26e-041d92e189e1@linux.intel.com> (raw)
In-Reply-To: <CY5PR11MB621113F5EEE9FC6AB9ECA22A95489@CY5PR11MB6211.namprd11.prod.outlook.com>
On 16/09/2022 11:30, Gupta, Anshuman wrote:
>> -----Original Message-----
>> From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>> Sent: Thursday, September 15, 2022 10:37 PM
>> To: Gupta, Anshuman <anshuman.gupta@intel.com>; intel-
>> gfx@lists.freedesktop.org
>> Cc: Auld, Matthew <matthew.auld@intel.com>; Vivi, Rodrigo
>> <rodrigo.vivi@intel.com>
>> Subject: Re: [Intel-gfx] [RFC 1/1] drm/i915/dgfx: Handling of pin_map against
>> rpm
>>
>>
>> On 15/09/2022 11:33, Anshuman Gupta wrote:
>>> If i915 gem obj lies in lmem, then i915_gem_object_pin_map need to
>>> grab a rpm wakeref to make sure gfx PCIe endpoint function stays in D0
>>> state during any access to mapping returned by
>>> i915_gem_object_pin_map().
>>> Subsequently i915_gem_object_upin_map will put the wakref as well.
>>
>> Another thing to check are perma pinned contexts. Follow the flow from
>> intel_engine_create_pinned_context to intel_engine_destroy_pinned_context.
>> If you find out that kernel (&co) contexts are pinned for the duration of i915
>> load/bind and that they use lmem objects, that would mean wakeref is held for
>> the duration of i915 loaded state. Defeating the point and making the solution
>> effectively equal to just disabling RPM.
> That’s correct intel_ring_pin can pin_map the lmem object.
> if (i915_vma_is_map_and_fenceable(vma)) {
> addr = (void __force *)i915_vma_pin_iomap(vma);
> } else {
> int type = i915_coherent_map_type(vma->vm->i915, vma->obj, false);
>
> addr = i915_gem_object_pin_map(vma->obj, type);
> }
>
> If that is the case this RFC proposal will not work and in that case
Right, or LRC state for perma pinned contexts is probably even more
clear cut.
every caller of i915_gem_object_pin_map need to grab the wakreref before
> accessing the retuned address by pin_map. Any inputs from you side for any other approach.
I didn't quite get what you meant here.
My point was that if my thinking that perma pinned contexts would hold
the wakeref permanently is correct, that would prevent the approach from
this patch to have a different effect from just disabling RPM. Would
unpinning the perma pinned contexts on GT park be feasible? It's not a 5
minute question and unfortunately I don't have enough time to go deep
into this problem space. Like Hopefully someone else can jump in.
Regards,
Tvrtko
next prev parent reply other threads:[~2022-09-16 10:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 10:33 [Intel-gfx] [RFC 0/1] DGFX pin_map with rpm Anshuman Gupta
2022-09-15 10:33 ` [Intel-gfx] [RFC 1/1] drm/i915/dgfx: Handling of pin_map against rpm Anshuman Gupta
2022-09-15 14:17 ` Tvrtko Ursulin
2022-09-15 16:49 ` Gupta, Anshuman
2022-09-15 14:32 ` Tvrtko Ursulin
2022-09-15 16:41 ` Gupta, Anshuman
2022-09-15 17:07 ` Tvrtko Ursulin
2022-09-16 10:30 ` Gupta, Anshuman
2022-09-16 10:48 ` Tvrtko Ursulin [this message]
2022-09-15 11:06 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for DGFX pin_map with rpm 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=f6b322d7-7950-8aae-b26e-041d92e189e1@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=anshuman.gupta@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=rodrigo.vivi@intel.com \
/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