Skip to contentSkip to conversation

drm/tilcdc: Fix irq free on unload

PATCH In review Tomi Valkeinen 2 participants 2 messages Sep 19, 2023 – Oct 31, 2023

Subsystems (3)
lore
Share & tools
lore

Tomi Valkeinen

author maintainer
#0 lore raw

PATCH 1/1 drm/tilcdc: Fix irq free on unload

The driver only frees the reserved irq if priv->irq_enabled is set to true. However, the driver mistakenly sets priv->irq_enabled to false, instead of true, in tilcdc_irq_install(), and thus the driver never frees the irq, causing issues on loading the driver a second time.

Fixes b6366814fa77 ("drm/tilcdc: Convert to Linux IRQ interfaces")
Cc Thomas Zimmermann <[email protected]>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/tilcdc_drv.c +1 -1
index fe56beea3e93..83233bdc0526 100644
@@ -138,7 +138,7 @@ static int tilcdc_irq_install(struct drm_device *dev, unsigned int irq)
 	if (ret)
 		return ret;
 
-	priv->irq_enabled = false;
+	priv->irq_enabled = true;
 
 	return 0;
 }

---
base-commit: 0663e1da5ba8e6459e3555ac12c62741668c0d30
change-id: 20230919-lcdc-9e09e94f4e93

Best regards,

Signature · 1 line
Tomi Valkeinen <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Tomi Valkeinen

The driver only frees the reserved irq if priv->irq_enabled is set to true. However, the driver mistakenly sets priv->irq_enabled to false, instead of true, in tilcdc_irq_install(), and thus the driver never frees the irq, causing issues on loading the driver a second time.

Fixes b6366814fa77 ("drm/tilcdc: Convert to Linux IRQ interfaces")
Cc Thomas Zimmermann <[email protected]>

---

Regards
Aradhya

Quoted 22 lines
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/tilcdc_drv.c +1 -2
index fe56beea3e93..83233bdc0526 100644
@@ -138,7 +138,7 @@ static int tilcdc_irq_install(struct drm_device *dev, unsigned int irq)
 	if (ret)
 		return ret;
 
-	priv->irq_enabled = false;
+	priv->irq_enabled = true;
 
 	return 0;
 }
 
---

base-commit: 0663e1da5ba8e6459e3555ac12c62741668c0d30
change-id: 20230919-lcdc-9e09e94f4e93

Best regards,