Skip to content

Commit 755d7a9

Browse files
committed
Merge tag 'exynos-drm-fixes-for-v5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
Three fixups - fix a kernel oops problem in case that driver is loaded as module. - fix a regulator warning issue when I2C DDC adapter cannot be gathered. - print out an error message only in error case excepting -EPROBE_DEFER. Signed-off-by: Dave Airlie <[email protected]> From: Inki Dae <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 98d54f8 + 3b6a9b1 commit 755d7a9

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

drivers/gpu/drm/exynos/exynos_drm_dsi.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,8 +1773,9 @@ static int exynos_dsi_probe(struct platform_device *pdev)
17731773
ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(dsi->supplies),
17741774
dsi->supplies);
17751775
if (ret) {
1776-
dev_info(dev, "failed to get regulators: %d\n", ret);
1777-
return -EPROBE_DEFER;
1776+
if (ret != -EPROBE_DEFER)
1777+
dev_info(dev, "failed to get regulators: %d\n", ret);
1778+
return ret;
17781779
}
17791780

17801781
dsi->clks = devm_kcalloc(dev,
@@ -1787,9 +1788,10 @@ static int exynos_dsi_probe(struct platform_device *pdev)
17871788
dsi->clks[i] = devm_clk_get(dev, clk_names[i]);
17881789
if (IS_ERR(dsi->clks[i])) {
17891790
if (strcmp(clk_names[i], "sclk_mipi") == 0) {
1790-
strcpy(clk_names[i], OLD_SCLK_MIPI_CLK_NAME);
1791-
i--;
1792-
continue;
1791+
dsi->clks[i] = devm_clk_get(dev,
1792+
OLD_SCLK_MIPI_CLK_NAME);
1793+
if (!IS_ERR(dsi->clks[i]))
1794+
continue;
17931795
}
17941796

17951797
dev_info(dev, "failed to get the clock: %s\n",

drivers/gpu/drm/exynos/exynos_hdmi.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,18 +1805,10 @@ static int hdmi_resources_init(struct hdmi_context *hdata)
18051805

18061806
hdata->reg_hdmi_en = devm_regulator_get_optional(dev, "hdmi-en");
18071807

1808-
if (PTR_ERR(hdata->reg_hdmi_en) != -ENODEV) {
1808+
if (PTR_ERR(hdata->reg_hdmi_en) != -ENODEV)
18091809
if (IS_ERR(hdata->reg_hdmi_en))
18101810
return PTR_ERR(hdata->reg_hdmi_en);
18111811

1812-
ret = regulator_enable(hdata->reg_hdmi_en);
1813-
if (ret) {
1814-
DRM_DEV_ERROR(dev,
1815-
"failed to enable hdmi-en regulator\n");
1816-
return ret;
1817-
}
1818-
}
1819-
18201812
return hdmi_bridge_init(hdata);
18211813
}
18221814

@@ -2023,6 +2015,15 @@ static int hdmi_probe(struct platform_device *pdev)
20232015
}
20242016
}
20252017

2018+
if (!IS_ERR(hdata->reg_hdmi_en)) {
2019+
ret = regulator_enable(hdata->reg_hdmi_en);
2020+
if (ret) {
2021+
DRM_DEV_ERROR(dev,
2022+
"failed to enable hdmi-en regulator\n");
2023+
goto err_hdmiphy;
2024+
}
2025+
}
2026+
20262027
pm_runtime_enable(dev);
20272028

20282029
audio_infoframe = &hdata->audio.infoframe;
@@ -2047,7 +2048,8 @@ static int hdmi_probe(struct platform_device *pdev)
20472048

20482049
err_rpm_disable:
20492050
pm_runtime_disable(dev);
2050-
2051+
if (!IS_ERR(hdata->reg_hdmi_en))
2052+
regulator_disable(hdata->reg_hdmi_en);
20512053
err_hdmiphy:
20522054
if (hdata->hdmiphy_port)
20532055
put_device(&hdata->hdmiphy_port->dev);

0 commit comments

Comments
 (0)