* [PATCH] drm/xe: Failed getting VMA cause display stuck
@ 2024-03-18 4:12 wangxiaoming321
2024-03-18 4:43 ` Matthew Brost
0 siblings, 1 reply; 3+ messages in thread
From: wangxiaoming321 @ 2024-03-18 4:12 UTC (permalink / raw
To: lucas.demarchi, ogabbay, thomas.hellstrom, maarten.lankhorst,
mripard, tzimmermann, airlied, daniel, intel-xe, dri-devel,
linux-kernel
Cc: wangxiaoming321
The failure of binding VMA is duing to interrupt,
So it needs to retry while return fail.
Signed-off-by: wangxiaoming321 <xiaoming.wang@intel.com>
---
drivers/gpu/drm/xe/xe_vm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 99aa5ffb0ef1..d33476b631e1 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -2621,6 +2621,9 @@ static int __xe_vma_op_execute(struct xe_vm *vm, struct xe_vma *vma,
}
drm_exec_fini(&exec);
+ if (err == -ERESTARTSYS)
+ goto retry_userptr;
+
if (err == -EAGAIN) {
lockdep_assert_held_write(&vm->lock);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/xe: Failed getting VMA cause display stuck
2024-03-18 4:12 [PATCH] drm/xe: Failed getting VMA cause display stuck wangxiaoming321
@ 2024-03-18 4:43 ` Matthew Brost
2024-03-18 5:23 ` Matthew Brost
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Brost @ 2024-03-18 4:43 UTC (permalink / raw
To: wangxiaoming321
Cc: lucas.demarchi, ogabbay, thomas.hellstrom, maarten.lankhorst,
mripard, tzimmermann, airlied, daniel, intel-xe, dri-devel,
linux-kernel
On Mon, Mar 18, 2024 at 12:12:44PM +0800, wangxiaoming321 wrote:
> The failure of binding VMA is duing to interrupt,
> So it needs to retry while return fail.
>
> Signed-off-by: wangxiaoming321 <xiaoming.wang@intel.com>
> ---
> drivers/gpu/drm/xe/xe_vm.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 99aa5ffb0ef1..d33476b631e1 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -2621,6 +2621,9 @@ static int __xe_vma_op_execute(struct xe_vm *vm, struct xe_vma *vma,
> }
> drm_exec_fini(&exec);
>
> + if (err == -ERESTARTSYS)
> + goto retry_userptr;
This doesn't look right. If the user presses ctrl-c we'd restart?
Matt
> +
> if (err == -EAGAIN) {
> lockdep_assert_held_write(&vm->lock);
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/xe: Failed getting VMA cause display stuck
2024-03-18 4:43 ` Matthew Brost
@ 2024-03-18 5:23 ` Matthew Brost
0 siblings, 0 replies; 3+ messages in thread
From: Matthew Brost @ 2024-03-18 5:23 UTC (permalink / raw
To: wangxiaoming321
Cc: lucas.demarchi, ogabbay, thomas.hellstrom, maarten.lankhorst,
mripard, tzimmermann, airlied, daniel, intel-xe, dri-devel,
linux-kernel
On Mon, Mar 18, 2024 at 04:43:12AM +0000, Matthew Brost wrote:
> On Mon, Mar 18, 2024 at 12:12:44PM +0800, wangxiaoming321 wrote:
> > The failure of binding VMA is duing to interrupt,
> > So it needs to retry while return fail.
> >
> > Signed-off-by: wangxiaoming321 <xiaoming.wang@intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_vm.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> > index 99aa5ffb0ef1..d33476b631e1 100644
> > --- a/drivers/gpu/drm/xe/xe_vm.c
> > +++ b/drivers/gpu/drm/xe/xe_vm.c
> > @@ -2621,6 +2621,9 @@ static int __xe_vma_op_execute(struct xe_vm *vm, struct xe_vma *vma,
> > }
> > drm_exec_fini(&exec);
> >
> > + if (err == -ERESTARTSYS)
> > + goto retry_userptr;
>
> This doesn't look right. If the user presses ctrl-c we'd restart?
Typo above. s/restart/retry.
To be clear this patch seems incorrect. This is traced to
dma_fence_wait_timeout, if it is interupted, that function return
-ERESTARTSYS which would should returned to user space via the IOCTL
failing. That is what the exisiting code should be doing.
Matt
>
> Matt
>
> > +
> > if (err == -EAGAIN) {
> > lockdep_assert_held_write(&vm->lock);
> >
> > --
> > 2.25.1
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-18 5:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 4:12 [PATCH] drm/xe: Failed getting VMA cause display stuck wangxiaoming321
2024-03-18 4:43 ` Matthew Brost
2024-03-18 5:23 ` Matthew Brost
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 read-only IMAP folder(s) and NNTP newsgroup(s).