On Fri, 29 Nov 2024 13:14:58 +0000
Adrián Larumbe <[email protected]> wrote:

> Reviewed-by: Adrian Larumbe <[email protected]>
> 
> On 28.11.2024 12:02, Boris Brezillon wrote:
> > The runtime PM resume operation is not guaranteed to succeed, but if it
> > fails, the device should be in a suspended state. Make sure we're robust
> > to resume failures in the unplug path.
> > 
> > v2:
> > - Move the bit that belonged in the next commit
> > - Drop the panthor_device_unplug() changes
> > 
> > Signed-off-by: Boris Brezillon <[email protected]>
> > ---
> >  drivers/gpu/drm/panthor/panthor_fw.c  | 14 +++++++++-----
> >  drivers/gpu/drm/panthor/panthor_gpu.c |  3 ++-
> >  drivers/gpu/drm/panthor/panthor_mmu.c |  3 ++-
> >  3 files changed, 13 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/panthor/panthor_fw.c 
> > b/drivers/gpu/drm/panthor/panthor_fw.c
> > index ebf8980ca9a3..f3d3d8fbe13d 100644
> > --- a/drivers/gpu/drm/panthor/panthor_fw.c
> > +++ b/drivers/gpu/drm/panthor/panthor_fw.c
> > @@ -12,6 +12,7 @@
> >  #include <linux/iosys-map.h>
> >  #include <linux/mutex.h>
> >  #include <linux/platform_device.h>
> > +#include <linux/pm_runtime.h>
> >  
> >  #include <drm/drm_drv.h>
> >  #include <drm/drm_managed.h>
> > @@ -1190,11 +1191,13 @@ void panthor_fw_unplug(struct panthor_device *ptdev)
> >  
> >     cancel_delayed_work_sync(&ptdev->fw->watchdog.ping_work);
> >  
> > -   /* Make sure the IRQ handler can be called after that point. */
> > -   if (ptdev->fw->irq.irq)
> > -           panthor_job_irq_suspend(&ptdev->fw->irq);
> > +   if (!IS_ENABLED(CONFIG_PM) || pm_runtime_active(ptdev->base.dev)) {
> > +           /* Make sure the IRQ handler can be called after that point. */ 
> >  
> 
> Did you mean 'cannot be called' ?

Oops, indeed I meant 'cannot'.

Reply via email to