Skip to content

Commit

Permalink
Merge tag 'exynos-drm-fixes-for-v5.6-rc5' of git://git.kernel.org/pub…
Browse files Browse the repository at this point in the history
…/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 <airlied@redhat.com>

From: Inki Dae <inki.dae@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1583126752-30477-1-git-send-email-inki.dae@samsung.com
  • Loading branch information
Dave Airlie committed Mar 5, 2020
2 parents 98d54f8 + 3b6a9b1 commit 755d7a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
12 changes: 7 additions & 5 deletions drivers/gpu/drm/exynos/exynos_drm_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1773,8 +1773,9 @@ static int exynos_dsi_probe(struct platform_device *pdev)
ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(dsi->supplies),
dsi->supplies);
if (ret) {
dev_info(dev, "failed to get regulators: %d\n", ret);
return -EPROBE_DEFER;
if (ret != -EPROBE_DEFER)
dev_info(dev, "failed to get regulators: %d\n", ret);
return ret;
}

dsi->clks = devm_kcalloc(dev,
Expand All @@ -1787,9 +1788,10 @@ static int exynos_dsi_probe(struct platform_device *pdev)
dsi->clks[i] = devm_clk_get(dev, clk_names[i]);
if (IS_ERR(dsi->clks[i])) {
if (strcmp(clk_names[i], "sclk_mipi") == 0) {
strcpy(clk_names[i], OLD_SCLK_MIPI_CLK_NAME);
i--;
continue;
dsi->clks[i] = devm_clk_get(dev,
OLD_SCLK_MIPI_CLK_NAME);
if (!IS_ERR(dsi->clks[i]))
continue;
}

dev_info(dev, "failed to get the clock: %s\n",
Expand Down
22 changes: 12 additions & 10 deletions drivers/gpu/drm/exynos/exynos_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1805,18 +1805,10 @@ static int hdmi_resources_init(struct hdmi_context *hdata)

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

if (PTR_ERR(hdata->reg_hdmi_en) != -ENODEV) {
if (PTR_ERR(hdata->reg_hdmi_en) != -ENODEV)
if (IS_ERR(hdata->reg_hdmi_en))
return PTR_ERR(hdata->reg_hdmi_en);

ret = regulator_enable(hdata->reg_hdmi_en);
if (ret) {
DRM_DEV_ERROR(dev,
"failed to enable hdmi-en regulator\n");
return ret;
}
}

return hdmi_bridge_init(hdata);
}

Expand Down Expand Up @@ -2023,6 +2015,15 @@ static int hdmi_probe(struct platform_device *pdev)
}
}

if (!IS_ERR(hdata->reg_hdmi_en)) {
ret = regulator_enable(hdata->reg_hdmi_en);
if (ret) {
DRM_DEV_ERROR(dev,
"failed to enable hdmi-en regulator\n");
goto err_hdmiphy;
}
}

pm_runtime_enable(dev);

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

err_rpm_disable:
pm_runtime_disable(dev);

if (!IS_ERR(hdata->reg_hdmi_en))
regulator_disable(hdata->reg_hdmi_en);
err_hdmiphy:
if (hdata->hdmiphy_port)
put_device(&hdata->hdmiphy_port->dev);
Expand Down

0 comments on commit 755d7a9

Please sign in to comment.