[PATCH v2 3/3] drm/panthor: Actually suspend IRQs in the unplug path
Boris Brezillon
boris.brezillon at collabora.com
Mon Mar 25 18:05:54 UTC 2024
On Mon, 25 Mar 2024 17:24:17 +0000
Liviu Dudau <liviu.dudau at arm.com> wrote:
> On Mon, Mar 25, 2024 at 02:57:05PM +0100, Boris Brezillon wrote:
> > panthor_xxx_irq_suspend() doesn't mask the interrupts if drm_dev_unplug()
> > has been called, which is always the case when our panthor_xxx_unplug()
> > helpers are called. Fix that by introducing a panthor_xxx_unplug() helper
> > that does what panthor_xxx_irq_suspend() except it does it
> > unconditionally.
>
> I understand that drm_dev_unplug() messes up with the cleanup, but I'm a bit
> reluctant to see a function that completely ignores if the device has been
> unplugged or not. Like mentioned on the review of 2/3, can we move the masking
> of the interrupts outside the critical section and not add drm_dev_unplug() ?
Nope, because the whole point of this drm_dev_enter/exit() section was
to prevent accesses to registers when the associated iomem range has
been returned to the system after the device has been removed. If you
move this gpu_write() outside of the drm_dev_enter/exit() you're better
off dropping this check entirely...
More information about the dri-devel
mailing list