From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Matthew Auld <matthew.auld@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/9] drm/xe: Convert xe_gem_fault to use direct xe_pm_runtime calls
Date: Tue, 5 Mar 2024 17:29:42 -0500 [thread overview]
Message-ID: <Zeec1opYgnXMuJEr@intel.com> (raw)
In-Reply-To: <d5af5b39-75a1-47e2-b41a-23d6c23b62ea@intel.com>
On Tue, Mar 05, 2024 at 11:29:22AM +0000, Matthew Auld wrote:
> On 04/03/2024 18:21, Rodrigo Vivi wrote:
> > The gem page fault is one of the outer bound protections where
> > we want to ensure that the hardware is in D0 before proceeding
> > with memory access. Let's convert it towards the xe_pm_runtime
> > functions directly so we can then convert the mem_access to be
> > inner protection only and then Kill it for good.
> >
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Not strictly related to this, but FYI there is:
>
> https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1100
> https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1300
>
> Which is on the GPU fault path. Looks like VM is maybe nuked before the
> worker can process the fault from the GuC? In that case there no RPM ref.
not related indeed, but a true issue. Part of that is the guc_ct
refactor that we need to to... on the g2h processing.
one idea that is crossing my mind is the to perhaps queue the interrupt
job in a same ordered queue, right after the get_resume one... with this
we could have this g2h and perhaps even enable more irq cases and allow
display hotplug for instance. thoughts?
also, for this patch itself, are you okay with this if the lockdep is okay?
>
> > ---
> > drivers/gpu/drm/xe/xe_bo.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
> > index 6603a0ea79c5..def68528cd40 100644
> > --- a/drivers/gpu/drm/xe/xe_bo.c
> > +++ b/drivers/gpu/drm/xe/xe_bo.c
> > @@ -22,6 +22,7 @@
> > #include "xe_gt.h"
> > #include "xe_map.h"
> > #include "xe_migrate.h"
> > +#include "xe_pm.h"
> > #include "xe_preempt_fence.h"
> > #include "xe_res_cursor.h"
> > #include "xe_trace.h"
> > @@ -1144,7 +1145,7 @@ static vm_fault_t xe_gem_fault(struct vm_fault *vmf)
> > int idx, r = 0;
> > if (needs_rpm)
> > - xe_device_mem_access_get(xe);
> > + xe_pm_runtime_get(xe);
> > ret = ttm_bo_vm_reserve(tbo, vmf);
> > if (ret)
> > @@ -1184,7 +1185,7 @@ static vm_fault_t xe_gem_fault(struct vm_fault *vmf)
> > dma_resv_unlock(tbo->base.resv);
> > out:
> > if (needs_rpm)
> > - xe_device_mem_access_put(xe);
> > + xe_pm_runtime_put(xe);
> > return ret;
> > }
next prev parent reply other threads:[~2024-03-05 22:30 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 18:21 [PATCH 1/9] drm/xe: Remove useless mem_access during probe Rodrigo Vivi
2024-03-04 18:21 ` [PATCH 2/9] drm/xe: Convert xe_gem_fault to use direct xe_pm_runtime calls Rodrigo Vivi
2024-03-05 10:18 ` Matthew Auld
2024-03-05 11:29 ` Matthew Auld
2024-03-05 22:29 ` Rodrigo Vivi [this message]
2024-03-04 18:21 ` [PATCH 3/9] drm/xe: Move lockdep protection from mem_access to xe_pm_runtime Rodrigo Vivi
2024-03-05 10:20 ` Matthew Auld
2024-03-04 18:21 ` [PATCH 4/9] drm/xe: Move xe_irq runtime suspend and resume out of lockdep Rodrigo Vivi
2024-03-05 11:07 ` Matthew Auld
2024-03-05 22:45 ` Rodrigo Vivi
2024-03-06 16:04 ` Matthew Auld
2024-03-06 17:49 ` Rodrigo Vivi
2024-03-06 18:56 ` Matthew Auld
2024-03-06 20:04 ` Rodrigo Vivi
2024-03-04 18:21 ` [PATCH 5/9] drm/xe: Removing useless mem_access protection from runtime pm Rodrigo Vivi
2024-03-05 10:22 ` Matthew Auld
2024-03-04 18:21 ` [PATCH 6/9] drm/xe: Introduce xe_pm_runtime_get_noresume for inner callers Rodrigo Vivi
2024-03-05 10:29 ` Matthew Auld
2024-03-04 18:21 ` [PATCH 7/9] drm/xe: Convert mem_access_if_ongoing to direct xe_pm_runtime_get_if_active Rodrigo Vivi
2024-03-05 10:24 ` Matthew Auld
2024-03-04 18:21 ` [PATCH 8/9] drm/xe: Ensure all the inner access are using the _noresume variant Rodrigo Vivi
2024-03-05 11:14 ` Matthew Auld
2024-03-04 18:21 ` [PATCH 9/9] drm/xe: Kill xe_device_mem_access_{get*,put} Rodrigo Vivi
2024-03-05 11:18 ` Matthew Auld
2024-03-04 18:27 ` ✓ CI.Patch_applied: success for series starting with [1/9] drm/xe: Remove useless mem_access during probe Patchwork
2024-03-04 18:28 ` ✗ CI.checkpatch: warning " Patchwork
2024-03-04 18:28 ` ✓ CI.KUnit: success " Patchwork
2024-03-04 18:42 ` ✓ CI.Build: " Patchwork
2024-03-04 18:42 ` ✓ CI.Hooks: " Patchwork
2024-03-04 18:44 ` ✓ CI.checksparse: " Patchwork
2024-03-04 19:14 ` ✗ CI.BAT: failure " Patchwork
2024-03-05 10:17 ` [PATCH 1/9] " Matthew Auld
2024-03-06 20:15 ` ✗ CI.Patch_applied: failure for series starting with [1/9] drm/xe: Remove useless mem_access during probe (rev2) 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=Zeec1opYgnXMuJEr@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@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;
as well as URLs for NNTP newsgroup(s).