[PATCH 4/6] drm: rcar-du: Add quirk for H3 ES1 pclk WA
Geert Uytterhoeven
geert at linux-m68k.org
Tue Jan 17 16:11:10 UTC 2023
Hi Tomi,
On Tue, Jan 17, 2023 at 2:54 PM Tomi Valkeinen
<tomi.valkeinen+renesas at ideasonboard.com> wrote:
> rcar_du_crtc.c does a soc_device_match() in
> rcar_du_crtc_set_display_timing() to find out if the SoC is H3 ES1, and
> if so, apply a WA.
>
> We will need another H3 ES1 check in the following patch, so rather than
> adding more soc_device_match() calls, let's add a rcar_du_device_info
> entry for the ES1, and a quirk flag,
> RCAR_DU_QUIRK_H3_ES1_PCLK_STABILITY, for the WA.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas at ideasonboard.com>
Thanks for your patch!
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -681,7 +724,13 @@ static int rcar_du_probe(struct platform_device *pdev)
> return PTR_ERR(rcdu);
>
> rcdu->dev = &pdev->dev;
> - rcdu->info = of_device_get_match_data(rcdu->dev);
No need to remove this line...
> +
> + soc_attr = soc_device_match(rcar_du_soc_table);
> + if (soc_attr)
> + rcdu->info = soc_attr->data;
> +
> + if (!rcdu->info)
> + rcdu->info = of_device_get_match_data(rcdu->dev);
... and no need to add these two lines.
The idiom is to set rcdu->info based on of_device_get_match_data()
first, and override based on of_device_get_match_data() when needed.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
More information about the dri-devel
mailing list