diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2023-04-06 15:02:16 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2023-04-06 15:02:17 +0200 |
commit | 8904a1e20ba8ee82c1d24d6f8091ba464b878a54 (patch) | |
tree | bc13057b1c0d748fe7e32bd6f2308cb84b0417eb /drivers/gpu/drm/tegra/sor.c | |
parent | 52b113e968be66b57f792b2e2a9b8b77f382bd5f (diff) | |
parent | 2429b3c529da29d4277d519bd66d034842dcd70c (diff) | |
download | lwn-8904a1e20ba8ee82c1d24d6f8091ba464b878a54.tar.gz lwn-8904a1e20ba8ee82c1d24d6f8091ba464b878a54.zip |
Merge tag 'drm/tegra/for-6.4-rc1' of https://gitlab.freedesktop.org/drm/tegra into drm-next
drm/tegra: Changes for v6.4-rc1
The majority of this is minor cleanups and fixes. Other than those, this
contains Uwe's conversion to the new driver remove callback and Thomas'
fbdev DRM client conversion. The driver can now also be built on other
architectures to easy compile coverage.
Finally, this adds Mikko as a second maintainer for the driver. As a
next step we also want Tegra DRM to move into drm-misc to streamline the
maintenance process.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
From: Thierry Reding <thierry.reding@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230406121404.967704-1-thierry.reding@gmail.com
Diffstat (limited to 'drivers/gpu/drm/tegra/sor.c')
-rw-r--r-- | drivers/gpu/drm/tegra/sor.c | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 34af6724914f..fbb63d755496 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -1153,7 +1153,7 @@ static int tegra_sor_compute_config(struct tegra_sor *sor, struct drm_dp_link *link) { const u64 f = 100000, link_rate = link->rate * 1000; - const u64 pclk = mode->clock * 1000; + const u64 pclk = (u64)mode->clock * 1000; u64 input, output, watermark, num; struct tegra_sor_params params; u32 num_syms_per_line; @@ -2959,11 +2959,9 @@ static int tegra_sor_hdmi_probe(struct tegra_sor *sor) int err; sor->avdd_io_supply = devm_regulator_get(sor->dev, "avdd-io-hdmi-dp"); - if (IS_ERR(sor->avdd_io_supply)) { - dev_err(sor->dev, "cannot get AVDD I/O supply: %ld\n", - PTR_ERR(sor->avdd_io_supply)); - return PTR_ERR(sor->avdd_io_supply); - } + if (IS_ERR(sor->avdd_io_supply)) + return dev_err_probe(sor->dev, PTR_ERR(sor->avdd_io_supply), + "cannot get AVDD I/O supply\n"); err = tegra_sor_enable_regulator(sor, sor->avdd_io_supply); if (err < 0) { @@ -2973,11 +2971,9 @@ static int tegra_sor_hdmi_probe(struct tegra_sor *sor) } sor->vdd_pll_supply = devm_regulator_get(sor->dev, "vdd-hdmi-dp-pll"); - if (IS_ERR(sor->vdd_pll_supply)) { - dev_err(sor->dev, "cannot get VDD PLL supply: %ld\n", - PTR_ERR(sor->vdd_pll_supply)); - return PTR_ERR(sor->vdd_pll_supply); - } + if (IS_ERR(sor->vdd_pll_supply)) + return dev_err_probe(sor->dev, PTR_ERR(sor->vdd_pll_supply), + "cannot get VDD PLL supply\n"); err = tegra_sor_enable_regulator(sor, sor->vdd_pll_supply); if (err < 0) { @@ -2987,11 +2983,9 @@ static int tegra_sor_hdmi_probe(struct tegra_sor *sor) } sor->hdmi_supply = devm_regulator_get(sor->dev, "hdmi"); - if (IS_ERR(sor->hdmi_supply)) { - dev_err(sor->dev, "cannot get HDMI supply: %ld\n", - PTR_ERR(sor->hdmi_supply)); - return PTR_ERR(sor->hdmi_supply); - } + if (IS_ERR(sor->hdmi_supply)) + return dev_err_probe(sor->dev, PTR_ERR(sor->hdmi_supply), + "cannot get HDMI supply\n"); err = tegra_sor_enable_regulator(sor, sor->hdmi_supply); if (err < 0) { @@ -3794,10 +3788,8 @@ static int tegra_sor_probe(struct platform_device *pdev) } err = platform_get_irq(pdev, 0); - if (err < 0) { - dev_err(&pdev->dev, "failed to get IRQ: %d\n", err); + if (err < 0) goto remove; - } sor->irq = err; @@ -3973,17 +3965,11 @@ put_aux: return err; } -static int tegra_sor_remove(struct platform_device *pdev) +static void tegra_sor_remove(struct platform_device *pdev) { struct tegra_sor *sor = platform_get_drvdata(pdev); - int err; - err = host1x_client_unregister(&sor->client); - if (err < 0) { - dev_err(&pdev->dev, "failed to unregister host1x client: %d\n", - err); - return err; - } + host1x_client_unregister(&sor->client); pm_runtime_disable(&pdev->dev); @@ -3993,8 +3979,6 @@ static int tegra_sor_remove(struct platform_device *pdev) } tegra_output_remove(&sor->output); - - return 0; } static int __maybe_unused tegra_sor_suspend(struct device *dev) @@ -4054,5 +4038,5 @@ struct platform_driver tegra_sor_driver = { .pm = &tegra_sor_pm_ops, }, .probe = tegra_sor_probe, - .remove = tegra_sor_remove, + .remove_new = tegra_sor_remove, }; |