VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   35 Branches   59 Tags
author: keith.zhao <keith.zhao@starfivetech.com> 2023-09-20 10:25:16 +0800 committer: keith.zhao <keith.zhao@starfivetech.com> 2023-09-20 10:25:16 +0800 commit: 9a337cfa096dd37b25ded1aa99bf46eaf6e0246a parent: 0a6b3bee70066d2162e4f81975ac5210947f5a41
Commit Summary:
display : hdmi: fix hotplug hang
Diffstat:
1 file changed, 7 insertions, 1 deletion
diff --git a/drivers/gpu/drm/verisilicon/inno_hdmi.c b/drivers/gpu/drm/verisilicon/inno_hdmi.c
old mode 100755
new mode 100644
index 854c923bbb2c..051e751cfb9f
--- a/drivers/gpu/drm/verisilicon/inno_hdmi.c
+++ b/drivers/gpu/drm/verisilicon/inno_hdmi.c
@@ -722,7 +722,16 @@ static int
 inno_hdmi_probe_single_connector_modes(struct drm_connector *connector,
 				       uint32_t maxX, uint32_t maxY)
 {
-	return drm_helper_probe_single_connector_modes(connector, 3840, 2160);
+	struct inno_hdmi *hdmi = to_inno_hdmi(connector);
+
+	int ret = pm_runtime_get_sync(hdmi->dev);
+	if (ret < 0)
+	   return ret;
+
+	ret = drm_helper_probe_single_connector_modes(connector, 3840, 2160);
+
+	pm_runtime_put(hdmi->dev);
+	return ret;
 }
 
 static void inno_hdmi_connector_destroy(struct drm_connector *connector)