[RFC 12/34] drm/xe: Ensure device is awake before removing it

Rodrigo Vivi rodrigo.vivi at intel.com
Wed Feb 14 18:51:23 UTC 2024


On Mon, Feb 05, 2024 at 11:05:54AM +0000, Matthew Auld wrote:
> On 26/01/2024 20:30, Rodrigo Vivi wrote:
> > If device is suspended, the module unload might face challenges.
> > So, let's ensure that the very first thing of the "unprobe" (remove)
> > is to wake the device.
> 
> Core kernel already ensures device is called with pm_runtime_get_sync()
> before calling probe/remove. Do we still need this?

hmmm indeed. let me try to remove this.
I believe the issue that I was facing is another display related issue
that I'm facing once in a while even without any of my patches.

> 
> > 
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> > ---
> >   drivers/gpu/drm/xe/xe_pci.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> > index df6b3b31f419..0f296df729c4 100644
> > --- a/drivers/gpu/drm/xe/xe_pci.c
> > +++ b/drivers/gpu/drm/xe/xe_pci.c
> > @@ -686,8 +686,8 @@ static void xe_pci_remove(struct pci_dev *pdev)
> >   	if (!xe) /* driver load aborted, nothing to cleanup */
> >   		return;
> > -	xe_device_remove(xe);
> >   	xe_pm_runtime_fini(xe);
> > +	xe_device_remove(xe);
> >   	pci_set_drvdata(pdev, NULL);
> >   }


More information about the Intel-xe mailing list