* [PATCH] drm/amdgpu: Always call kfd post reset after reset @ 2018-04-11 19:47 Shaoyun Liu [not found] ` <1523476037-25006-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Shaoyun Liu @ 2018-04-11 19:47 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Shaoyun Liu Even reset failed, kfd post reset need to be called to make lock balance on kfd side Change-Id: I8b6ef29d7527915611be0b96a9cd039bc75bb0a9 Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 78b7d39..90a37ed 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3231,12 +3231,11 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, /* bad news, how to tell it to userspace ? */ dev_info(adev->dev, "GPU reset(%d) failed\n", atomic_read(&adev->gpu_reset_counter)); amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r); - } else { + } else dev_info(adev->dev, "GPU reset(%d) successed!\n",atomic_read(&adev->gpu_reset_counter)); - /*unlock kfd after a successfully recovery*/ - amdgpu_amdkfd_post_reset(adev); - } + /*unlock kfd */ + amdgpu_amdkfd_post_reset(adev); amdgpu_vf_error_trans_all(adev); adev->in_gpu_reset = 0; mutex_unlock(&adev->lock_reset); -- 1.9.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <1523476037-25006-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: Always call kfd post reset after reset [not found] ` <1523476037-25006-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org> @ 2018-04-11 19:51 ` Alex Deucher 2018-04-11 20:19 ` Felix Kuehling 1 sibling, 0 replies; 5+ messages in thread From: Alex Deucher @ 2018-04-11 19:51 UTC (permalink / raw) To: Shaoyun Liu; +Cc: amd-gfx list On Wed, Apr 11, 2018 at 3:47 PM, Shaoyun Liu <Shaoyun.Liu@amd.com> wrote: > Even reset failed, kfd post reset need to be called to make lock balance on > kfd side > > Change-Id: I8b6ef29d7527915611be0b96a9cd039bc75bb0a9 > Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index 78b7d39..90a37ed 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -3231,12 +3231,11 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, > /* bad news, how to tell it to userspace ? */ > dev_info(adev->dev, "GPU reset(%d) failed\n", atomic_read(&adev->gpu_reset_counter)); > amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r); > - } else { > + } else > dev_info(adev->dev, "GPU reset(%d) successed!\n",atomic_read(&adev->gpu_reset_counter)); > - /*unlock kfd after a successfully recovery*/ > - amdgpu_amdkfd_post_reset(adev); > - } > > + /*unlock kfd */ > + amdgpu_amdkfd_post_reset(adev); > amdgpu_vf_error_trans_all(adev); > adev->in_gpu_reset = 0; > mutex_unlock(&adev->lock_reset); > -- > 1.9.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amdgpu: Always call kfd post reset after reset [not found] ` <1523476037-25006-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org> 2018-04-11 19:51 ` Alex Deucher @ 2018-04-11 20:19 ` Felix Kuehling [not found] ` <f720599f-a34e-2214-a01c-c905af498dda-5C7GfCeVMHo@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: Felix Kuehling @ 2018-04-11 20:19 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW On 2018-04-11 03:47 PM, Shaoyun Liu wrote: > Even reset failed, kfd post reset need to be called to make lock balance on > kfd side > > Change-Id: I8b6ef29d7527915611be0b96a9cd039bc75bb0a9 > Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index 78b7d39..90a37ed 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -3231,12 +3231,11 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, > /* bad news, how to tell it to userspace ? */ > dev_info(adev->dev, "GPU reset(%d) failed\n", atomic_read(&adev->gpu_reset_counter)); > amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r); > - } else { > + } else > dev_info(adev->dev, "GPU reset(%d) successed!\n",atomic_read(&adev->gpu_reset_counter)); > - /*unlock kfd after a successfully recovery*/ > - amdgpu_amdkfd_post_reset(adev); > - } Please leave the braces {...}. It's better style to make all branches of the same if-else-if-...-else use the same braces (or no-braces). With that fixed, this change is Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> > > + /*unlock kfd */ > + amdgpu_amdkfd_post_reset(adev); > amdgpu_vf_error_trans_all(adev); > adev->in_gpu_reset = 0; > mutex_unlock(&adev->lock_reset); _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <f720599f-a34e-2214-a01c-c905af498dda-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: Always call kfd post reset after reset [not found] ` <f720599f-a34e-2214-a01c-c905af498dda-5C7GfCeVMHo@public.gmane.org> @ 2018-04-24 9:48 ` Oded Gabbay [not found] ` <CAFCwf10kR=0vfqp5C6d6eEHz8GWXK+mT_G784dW0Se_2s+dG9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Oded Gabbay @ 2018-04-24 9:48 UTC (permalink / raw) To: Felix Kuehling; +Cc: amd-gfx list On Wed, Apr 11, 2018 at 11:19 PM, Felix Kuehling <felix.kuehling@amd.com> wrote: > On 2018-04-11 03:47 PM, Shaoyun Liu wrote: >> Even reset failed, kfd post reset need to be called to make lock balance on >> kfd side >> >> Change-Id: I8b6ef29d7527915611be0b96a9cd039bc75bb0a9 >> Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com> >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++---- >> 1 file changed, 3 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >> index 78b7d39..90a37ed 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >> @@ -3231,12 +3231,11 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, >> /* bad news, how to tell it to userspace ? */ >> dev_info(adev->dev, "GPU reset(%d) failed\n", atomic_read(&adev->gpu_reset_counter)); >> amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r); >> - } else { >> + } else >> dev_info(adev->dev, "GPU reset(%d) successed!\n",atomic_read(&adev->gpu_reset_counter)); >> - /*unlock kfd after a successfully recovery*/ >> - amdgpu_amdkfd_post_reset(adev); >> - } > > Please leave the braces {...}. It's better style to make all branches of > the same if-else-if-...-else use the same braces (or no-braces). With > that fixed, this change is Reviewed-by: Felix Kuehling > <Felix.Kuehling@amd.com> > >> >> + /*unlock kfd */ >> + amdgpu_amdkfd_post_reset(adev); >> amdgpu_vf_error_trans_all(adev); >> adev->in_gpu_reset = 0; >> mutex_unlock(&adev->lock_reset); > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx I didn't find a function called "amdgpu_amdkfd_post_reset" anywhere in the code. Maybe this patch for something internal, or is it for the Vega code that I haven't yet taken ? Oded _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAFCwf10kR=0vfqp5C6d6eEHz8GWXK+mT_G784dW0Se_2s+dG9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: Always call kfd post reset after reset [not found] ` <CAFCwf10kR=0vfqp5C6d6eEHz8GWXK+mT_G784dW0Se_2s+dG9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2018-04-24 18:23 ` Felix Kuehling 0 siblings, 0 replies; 5+ messages in thread From: Felix Kuehling @ 2018-04-24 18:23 UTC (permalink / raw) To: Oded Gabbay; +Cc: amd-gfx list On 2018-04-24 05:48 AM, Oded Gabbay wrote: > On Wed, Apr 11, 2018 at 11:19 PM, Felix Kuehling <felix.kuehling@amd.com> wrote: >> On 2018-04-11 03:47 PM, Shaoyun Liu wrote: >>> Even reset failed, kfd post reset need to be called to make lock balance on >>> kfd side >>> >>> Change-Id: I8b6ef29d7527915611be0b96a9cd039bc75bb0a9 >>> Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com> >>> --- >>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++---- >>> 1 file changed, 3 insertions(+), 4 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >>> index 78b7d39..90a37ed 100644 >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >>> @@ -3231,12 +3231,11 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, >>> /* bad news, how to tell it to userspace ? */ >>> dev_info(adev->dev, "GPU reset(%d) failed\n", atomic_read(&adev->gpu_reset_counter)); >>> amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r); >>> - } else { >>> + } else >>> dev_info(adev->dev, "GPU reset(%d) successed!\n",atomic_read(&adev->gpu_reset_counter)); >>> - /*unlock kfd after a successfully recovery*/ >>> - amdgpu_amdkfd_post_reset(adev); >>> - } >> Please leave the braces {...}. It's better style to make all branches of >> the same if-else-if-...-else use the same braces (or no-braces). With >> that fixed, this change is Reviewed-by: Felix Kuehling >> <Felix.Kuehling@amd.com> >> >>> + /*unlock kfd */ >>> + amdgpu_amdkfd_post_reset(adev); >>> amdgpu_vf_error_trans_all(adev); >>> adev->in_gpu_reset = 0; >>> mutex_unlock(&adev->lock_reset); >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx > I didn't find a function called "amdgpu_amdkfd_post_reset" anywhere in > the code. > Maybe this patch for something internal, or is it for the Vega code > that I haven't yet taken ? Yeah, this is related to some on-going work to support GPU hang-detection and reset. As more of our driver goes upstream, more changes will be reviewed here. Right now it's still hit and miss and people aren't sure what changes to review where. Regards, Felix > > Oded _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-04-24 18:23 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-04-11 19:47 [PATCH] drm/amdgpu: Always call kfd post reset after reset Shaoyun Liu [not found] ` <1523476037-25006-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org> 2018-04-11 19:51 ` Alex Deucher 2018-04-11 20:19 ` Felix Kuehling [not found] ` <f720599f-a34e-2214-a01c-c905af498dda-5C7GfCeVMHo@public.gmane.org> 2018-04-24 9:48 ` Oded Gabbay [not found] ` <CAFCwf10kR=0vfqp5C6d6eEHz8GWXK+mT_G784dW0Se_2s+dG9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2018-04-24 18:23 ` Felix Kuehling
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.