diff mbox series

[v2,14/16] drm/mcde: Keep up with refcounting

Message ID 20250619-b4-of_drm_find_panel_part1-v2-14-0df94aecc43d@redhat.com
State New
Headers show
Series Use drm_panel_get/put() in of_drm_find_panel() and its callers | expand

Commit Message

Anusha Srivatsa June 19, 2025, 7:16 p.m. UTC
Put the panel reference returned by of_drm_find_panel()
back when driver is no longer using it.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
---
 drivers/gpu/drm/mcde/mcde_dsi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c
index a3423459dd7ac8395b77d0479a02ebb3a9ba259c..af9b149345adfd91ffdd620c016a1b6ea86cf209 100644
--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -1154,8 +1154,11 @@  static void mcde_dsi_unbind(struct device *dev, struct device *master,
 {
 	struct mcde_dsi *d = dev_get_drvdata(dev);
 
-	if (d->panel)
+	if (d->panel) {
 		drm_panel_bridge_remove(d->bridge_out);
+		drm_panel_put(d->panel);
+	}
+
 	regmap_update_bits(d->prcmu, PRCM_DSI_SW_RESET,
 			   PRCM_DSI_SW_RESET_DSI0_SW_RESETN, 0);
 }