[V2,11/11] drm/amdgpu: do not reset gpu for virtualization

Submitted by Yu, Xiangliang on Jan. 10, 2017, 10 a.m.

Details

Message ID 1484042450-22987-12-git-send-email-Xiangliang.Yu@amd.com
State New
Headers show
Series "Add support AMD GPU virtualization soultion" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Yu, Xiangliang Jan. 10, 2017, 10 a.m.
Current job timeout setting is not fit for virtualization, so it
will cause job timeout sometimes. Add workaround for this when
timeout happen.

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index a6d828c..5705fbd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2324,6 +2324,9 @@  int amdgpu_gpu_reset(struct amdgpu_device *adev)
 	int resched;
 	bool need_full_reset;
 
+	if (amdgpu_sriov_vf(adev))
+		return 0;
+
 	if (!amdgpu_check_soft_reset(adev)) {
 		DRM_INFO("No hardware hang detected. Did some blocks stall?\n");
 		return 0;

Comments

Am 10.01.2017 um 11:00 schrieb Xiangliang Yu:
> Current job timeout setting is not fit for virtualization, so it
> will cause job timeout sometimes. Add workaround for this when
> timeout happen.
>
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index a6d828c..5705fbd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2324,6 +2324,9 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
>   	int resched;
>   	bool need_full_reset;
>   
> +	if (amdgpu_sriov_vf(adev))

At bare minimum we should print a warning here and increase or 
completely disable the job timeout when virtualization is enabled.

Christian.

> +		return 0;
> +
>   	if (!amdgpu_check_soft_reset(adev)) {
>   		DRM_INFO("No hardware hang detected. Did some blocks stall?\n");
>   		return 0;
> -----Original Message-----

> From: Christian König [mailto:deathsimple@vodafone.de]

> Sent: Tuesday, January 10, 2017 9:19 PM

> To: Yu, Xiangliang <Xiangliang.Yu@amd.com>; amd-

> gfx@lists.freedesktop.org

> Cc: Liu, Monk <Monk.Liu@amd.com>

> Subject: Re: [V2 11/11] drm/amdgpu: do not reset gpu for virtualization

> 

> Am 10.01.2017 um 11:00 schrieb Xiangliang Yu:

> > Current job timeout setting is not fit for virtualization, so it will

> > cause job timeout sometimes. Add workaround for this when timeout

> > happen.

> >

> > Signed-off-by: Monk Liu <Monk.Liu@amd.com>

> > Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>

> > ---

> >   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++

> >   1 file changed, 3 insertions(+)

> >

> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

> > index a6d828c..5705fbd 100644

> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

> > @@ -2324,6 +2324,9 @@ int amdgpu_gpu_reset(struct amdgpu_device

> *adev)

> >   	int resched;

> >   	bool need_full_reset;

> >

> > +	if (amdgpu_sriov_vf(adev))

> 

> At bare minimum we should print a warning here and increase or completely

> disable the job timeout when virtualization is enabled.


The timeout function has the warning message, I think don't need more.
The patch is just a workaround, later need to enhance the whole gpu reset process.
> -----Original Message-----

> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf

> Of Yu, Xiangliang

> Sent: Tuesday, January 10, 2017 8:36 AM

> To: Christian König; amd-gfx@lists.freedesktop.org

> Cc: Liu, Monk

> Subject: RE: [V2 11/11] drm/amdgpu: do not reset gpu for virtualization

> 

> > -----Original Message-----

> > From: Christian König [mailto:deathsimple@vodafone.de]

> > Sent: Tuesday, January 10, 2017 9:19 PM

> > To: Yu, Xiangliang <Xiangliang.Yu@amd.com>; amd-

> > gfx@lists.freedesktop.org

> > Cc: Liu, Monk <Monk.Liu@amd.com>

> > Subject: Re: [V2 11/11] drm/amdgpu: do not reset gpu for virtualization

> >

> > Am 10.01.2017 um 11:00 schrieb Xiangliang Yu:

> > > Current job timeout setting is not fit for virtualization, so it will

> > > cause job timeout sometimes. Add workaround for this when timeout

> > > happen.

> > >

> > > Signed-off-by: Monk Liu <Monk.Liu@amd.com>

> > > Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>

> > > ---

> > >   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++

> > >   1 file changed, 3 insertions(+)

> > >

> > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

> > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

> > > index a6d828c..5705fbd 100644

> > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

> > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

> > > @@ -2324,6 +2324,9 @@ int amdgpu_gpu_reset(struct amdgpu_device

> > *adev)

> > >   	int resched;

> > >   	bool need_full_reset;

> > >

> > > +	if (amdgpu_sriov_vf(adev))

> >

> > At bare minimum we should print a warning here and increase or

> completely

> > disable the job timeout when virtualization is enabled.

> 

> The timeout function has the warning message, I think don't need more.

> The patch is just a workaround, later need to enhance the whole gpu reset

> process.


Please add a comment that explains that this is a temporary workaround, with that:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>