[PATCH] drm/amdgpu/sriov: reject kms open if TDR not finished or failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michel,
     > This seems like a bad idea, as it would cause basically any userspace which
> wants to use the GPU to fail to start during a GPU reset.
[Emily] Yes, this is what the change want to do, when driver is doing gpu recover or hardware is doing reset,
it doesn't want to be interrupted, and during the reset any driver open kms is meaningless. This behavior could
let the gpu recover and hardware reset back more quickly. After finished the reset, we will set adev->in_gpu_reset=0
again, then could allow the application open the kms.

Best Wishes,
Emily Deng

> -----Original Message-----
> From: Michel Dänzer [mailto:michel at daenzer.net]
> Sent: Wednesday, April 25, 2018 3:48 PM
> To: Deng, Emily <Emily.Deng at amd.com>
> Cc: amd-gfx at lists.freedesktop.org; Liu, Monk <Monk.Liu at amd.com>
> Subject: Re: [PATCH] drm/amdgpu/sriov: reject kms open if TDR not finished
> or failed
> 
> On 2018-04-25 08:39 AM, Emily Deng wrote:
> > Signed-off-by: Monk Liu <Monk.Liu at amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > index 6d55cae..adeca71 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> > @@ -847,6 +847,9 @@ int amdgpu_driver_open_kms(struct drm_device
> *dev, struct drm_file *file_priv)
> >  	struct amdgpu_fpriv *fpriv;
> >  	int r, pasid;
> >
> > +	if (adev->in_gpu_reset)
> > +		return -ECANCELED;
> 
> This seems like a bad idea, as it would cause basically any userspace which
> wants to use the GPU to fail to start during a GPU reset.
> 
> 
> --
> Earthling Michel Dänzer               |               http://www.amd.com
> Libre software enthusiast             |             Mesa and X developer


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux