summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/hdmi.c
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2022-02-08 00:29:23 +0300
committerThierry Reding <treding@nvidia.com>2022-02-24 17:03:08 +0100
commitf07f04a51d92165e0ad711f1be1cc5bbbfcb4766 (patch)
tree834a60db44169e4b6674e09d3f525b5310dae1cc /drivers/gpu/drm/tegra/hdmi.c
parent8913e1aea4b32a866343b14e565c62cec54f3f78 (diff)
downloadlinux-f07f04a51d92165e0ad711f1be1cc5bbbfcb4766.tar.bz2
drm/tegra: Use dev_err_probe()
Replace dev_printk() with a generic dev_err_probe() helper which silences noisy error messages about deferred probe and makes easy to debug failing deferred probe by printing notification about the failure to KMSG in the end of kernel booting process and by adding failing device and the reason of deferred probe to devices_deferred of debugfs. This was proven to be useful in the case of eDP driver regression by immediately showing why display driver was failing when user asked for help, otherwise it would've been much more difficult to debug such problems on a third party device that doesn't have developer setup. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/hdmi.c')
-rw-r--r--drivers/gpu/drm/tegra/hdmi.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index 8845af5d325f..bf240767dad9 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -1775,7 +1775,6 @@ static irqreturn_t tegra_hdmi_irq(int irq, void *data)
static int tegra_hdmi_probe(struct platform_device *pdev)
{
- const char *level = KERN_ERR;
struct tegra_hdmi *hdmi;
struct resource *regs;
int err;
@@ -1817,36 +1816,21 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
hdmi->hdmi = devm_regulator_get(&pdev->dev, "hdmi");
err = PTR_ERR_OR_ZERO(hdmi->hdmi);
- if (err) {
- if (err == -EPROBE_DEFER)
- level = KERN_DEBUG;
-
- dev_printk(level, &pdev->dev,
- "failed to get HDMI regulator: %d\n", err);
- return err;
- }
+ if (err)
+ return dev_err_probe(&pdev->dev, err,
+ "failed to get HDMI regulator\n");
hdmi->pll = devm_regulator_get(&pdev->dev, "pll");
err = PTR_ERR_OR_ZERO(hdmi->pll);
- if (err) {
- if (err == -EPROBE_DEFER)
- level = KERN_DEBUG;
-
- dev_printk(level, &pdev->dev,
- "failed to get PLL regulator: %d\n", err);
- return err;
- }
+ if (err)
+ return dev_err_probe(&pdev->dev, err,
+ "failed to get PLL regulator\n");
hdmi->vdd = devm_regulator_get(&pdev->dev, "vdd");
err = PTR_ERR_OR_ZERO(hdmi->vdd);
- if (err) {
- if (err == -EPROBE_DEFER)
- level = KERN_DEBUG;
-
- dev_printk(level, &pdev->dev,
- "failed to get VDD regulator: %d\n", err);
- return err;
- }
+ if (err)
+ return dev_err_probe(&pdev->dev, err,
+ "failed to get VDD regulator\n");
hdmi->output.dev = &pdev->dev;