Skip to content

Commit a55c2a5

Browse files
alessiob-imgMTCoster
authored andcommitted
drm/imagination: Fix deadlock in soft reset sequence
The soft reset sequence is currently executed from the threaded IRQ handler, hence it cannot call disable_irq() which internally waits for IRQ handlers, i.e. itself, to complete. Use disable_irq_nosync() during a soft reset instead. Fixes: cc1aeed ("drm/imagination: Implement firmware infrastructure and META FW support") Cc: [email protected] Signed-off-by: Alessio Belle <[email protected]> Reviewed-by: Matt Coster <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Matt Coster <[email protected]>
1 parent c6cb77c commit a55c2a5

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

drivers/gpu/drm/imagination/pvr_power.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,16 @@ pvr_power_reset(struct pvr_device *pvr_dev, bool hard_reset)
510510
}
511511

512512
/* Disable IRQs for the duration of the reset. */
513-
disable_irq(pvr_dev->irq);
513+
if (hard_reset) {
514+
disable_irq(pvr_dev->irq);
515+
} else {
516+
/*
517+
* Soft reset is triggered as a response to a FW command to the Host and is
518+
* processed from the threaded IRQ handler. This code cannot (nor needs to)
519+
* wait for any IRQ processing to complete.
520+
*/
521+
disable_irq_nosync(pvr_dev->irq);
522+
}
514523

515524
do {
516525
if (hard_reset) {

0 commit comments

Comments
 (0)