* [PATCH v1 1/3] drm/tegra: dc: Use devm_platform_ioremap_resource
@ 2020-03-08 22:38 Dmitry Osipenko
[not found] ` <20200308223809.23549-1-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Osipenko @ 2020-03-08 22:38 UTC (permalink / raw)
To: Thierry Reding
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
The devm_platform_ioremap_resource() helper replaces few lines of a
boilerplate code with a single line, making code to look cleaner a tad.
Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/gpu/drm/tegra/dc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 7c70fd31a4c2..257163dda301 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -2503,7 +2503,6 @@ static int tegra_dc_couple(struct tegra_dc *dc)
static int tegra_dc_probe(struct platform_device *pdev)
{
- struct resource *regs;
struct tegra_dc *dc;
int err;
@@ -2560,8 +2559,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
tegra_powergate_power_off(dc->powergate);
}
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dc->regs = devm_ioremap_resource(&pdev->dev, regs);
+ dc->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dc->regs))
return PTR_ERR(dc->regs);
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <20200308223809.23549-1-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* [PATCH v1 2/3] drm/tegra: dc: Release PM and RGB output when client's registration fails [not found] ` <20200308223809.23549-1-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2020-03-08 22:38 ` Dmitry Osipenko 2020-03-08 22:38 ` [PATCH v1 3/3] drm/tegra: dc: Silence RGB output deferred-probe error Dmitry Osipenko 1 sibling, 0 replies; 5+ messages in thread From: Dmitry Osipenko @ 2020-03-08 22:38 UTC (permalink / raw) To: Thierry Reding Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, linux-tegra-u79uwXL29TY76Z2rM5mHXA Runtime PM and RGB output need to be released when host1x client registration fails. The releasing is missed in the code, let's correct it. Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> --- drivers/gpu/drm/tegra/dc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 257163dda301..56d933e81797 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -2586,10 +2586,16 @@ static int tegra_dc_probe(struct platform_device *pdev) if (err < 0) { dev_err(&pdev->dev, "failed to register host1x client: %d\n", err); - return err; + goto disable_pm; } return 0; + +disable_pm: + pm_runtime_disable(&pdev->dev); + tegra_dc_rgb_remove(dc); + + return err; } static int tegra_dc_remove(struct platform_device *pdev) -- 2.25.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 3/3] drm/tegra: dc: Silence RGB output deferred-probe error [not found] ` <20200308223809.23549-1-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2020-03-08 22:38 ` [PATCH v1 2/3] drm/tegra: dc: Release PM and RGB output when client's registration fails Dmitry Osipenko @ 2020-03-08 22:38 ` Dmitry Osipenko [not found] ` <20200308223809.23549-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: Dmitry Osipenko @ 2020-03-08 22:38 UTC (permalink / raw) To: Thierry Reding Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, linux-tegra-u79uwXL29TY76Z2rM5mHXA Driver fails to probe with -EPROBE_DEFER if display output isn't ready yet. This produces a bit noisy error message in KMSG during kernel's boot up on Tegra20 and Tegra30 because RGB output tends to be probed earlier than a corresponding voltage regulator driver. Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> --- drivers/gpu/drm/tegra/dc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 56d933e81797..d7f2c4654b6b 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -2571,7 +2571,11 @@ static int tegra_dc_probe(struct platform_device *pdev) err = tegra_dc_rgb_probe(dc); if (err < 0 && err != -ENODEV) { - dev_err(&pdev->dev, "failed to probe RGB output: %d\n", err); + if (err == -EPROBE_DEFER) + dev_dbg(&pdev->dev, "RGB output probe deferred\n"); + else + dev_err(&pdev->dev, "failed to probe RGB output: %d\n", + err); return err; } -- 2.25.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <20200308223809.23549-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH v1 3/3] drm/tegra: dc: Silence RGB output deferred-probe error [not found] ` <20200308223809.23549-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2020-03-12 9:33 ` Thierry Reding 2020-03-12 14:03 ` Dmitry Osipenko 0 siblings, 1 reply; 5+ messages in thread From: Thierry Reding @ 2020-03-12 9:33 UTC (permalink / raw) To: Dmitry Osipenko Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, linux-tegra-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1570 bytes --] On Mon, Mar 09, 2020 at 01:38:09AM +0300, Dmitry Osipenko wrote: > Driver fails to probe with -EPROBE_DEFER if display output isn't ready > yet. This produces a bit noisy error message in KMSG during kernel's boot > up on Tegra20 and Tegra30 because RGB output tends to be probed earlier > than a corresponding voltage regulator driver. > > Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > --- > drivers/gpu/drm/tegra/dc.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c > index 56d933e81797..d7f2c4654b6b 100644 > --- a/drivers/gpu/drm/tegra/dc.c > +++ b/drivers/gpu/drm/tegra/dc.c > @@ -2571,7 +2571,11 @@ static int tegra_dc_probe(struct platform_device *pdev) > > err = tegra_dc_rgb_probe(dc); > if (err < 0 && err != -ENODEV) { > - dev_err(&pdev->dev, "failed to probe RGB output: %d\n", err); > + if (err == -EPROBE_DEFER) > + dev_dbg(&pdev->dev, "RGB output probe deferred\n"); > + else > + dev_err(&pdev->dev, "failed to probe RGB output: %d\n", > + err); > return err; > } I'd prefer if we had just a single message and only differentiate on the kernel message level, something more along these lines: if (err < 0 && err != -ENODEV) { const char *level = KERN_ERR; if (err == -EPROBE_DEFER) level = KERN_DEBUG; dev_printk(level, dc->dev, "failed to probe RGB output: %d\n", err); return err; } Do you mind if I squash that into your patch? Thierry [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 3/3] drm/tegra: dc: Silence RGB output deferred-probe error 2020-03-12 9:33 ` Thierry Reding @ 2020-03-12 14:03 ` Dmitry Osipenko 0 siblings, 0 replies; 5+ messages in thread From: Dmitry Osipenko @ 2020-03-12 14:03 UTC (permalink / raw) To: Thierry Reding Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, linux-tegra-u79uwXL29TY76Z2rM5mHXA 12.03.2020 12:33, Thierry Reding пишет: > On Mon, Mar 09, 2020 at 01:38:09AM +0300, Dmitry Osipenko wrote: >> Driver fails to probe with -EPROBE_DEFER if display output isn't ready >> yet. This produces a bit noisy error message in KMSG during kernel's boot >> up on Tegra20 and Tegra30 because RGB output tends to be probed earlier >> than a corresponding voltage regulator driver. >> >> Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> --- >> drivers/gpu/drm/tegra/dc.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c >> index 56d933e81797..d7f2c4654b6b 100644 >> --- a/drivers/gpu/drm/tegra/dc.c >> +++ b/drivers/gpu/drm/tegra/dc.c >> @@ -2571,7 +2571,11 @@ static int tegra_dc_probe(struct platform_device *pdev) >> >> err = tegra_dc_rgb_probe(dc); >> if (err < 0 && err != -ENODEV) { >> - dev_err(&pdev->dev, "failed to probe RGB output: %d\n", err); >> + if (err == -EPROBE_DEFER) >> + dev_dbg(&pdev->dev, "RGB output probe deferred\n"); >> + else >> + dev_err(&pdev->dev, "failed to probe RGB output: %d\n", >> + err); >> return err; >> } > > I'd prefer if we had just a single message and only differentiate on the > kernel message level, something more along these lines: > > if (err < 0 && err != -ENODEV) { > const char *level = KERN_ERR; > > if (err == -EPROBE_DEFER) > level = KERN_DEBUG; > > dev_printk(level, dc->dev, "failed to probe RGB output: %d\n", > err); > return err; > } > > Do you mind if I squash that into your patch? I don't mind, thanks :) ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-03-12 14:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-08 22:38 [PATCH v1 1/3] drm/tegra: dc: Use devm_platform_ioremap_resource Dmitry Osipenko
[not found] ` <20200308223809.23549-1-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-03-08 22:38 ` [PATCH v1 2/3] drm/tegra: dc: Release PM and RGB output when client's registration fails Dmitry Osipenko
2020-03-08 22:38 ` [PATCH v1 3/3] drm/tegra: dc: Silence RGB output deferred-probe error Dmitry Osipenko
[not found] ` <20200308223809.23549-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-03-12 9:33 ` Thierry Reding
2020-03-12 14:03 ` Dmitry Osipenko
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).