[Letux-kernel] [PATCH 8/8] drm/ingenic: Attach bridge chain to encoders

H. Nikolaus Schaller hns at goldelico.com
Sun Aug 29 18:59:59 CEST 2021

Hi Paul,

> Am 29.08.2021 um 18:04 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> PS: this patch makes it also show a green screen without touching dw_hdmi code:
> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
> index 1465eab218e0..6dd90c9c70a7 100644
> --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
> +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
> @@ -1262,12 +1262,13 @@ static int ingenic_drm_bind(struct device *dev, bool has_components)
>                ib->next_bridge = bridge;
>                ret = drm_bridge_attach(encoder, &ib->bridge, NULL,
> -                                       DRM_BRIDGE_ATTACH_NO_CONNECTOR);
> +                                       0);
>                if (ret) {
>                        dev_err(dev, "Unable to attach bridge\n");
>                        return ret;
>                }
> +#if 0
>                connector = drm_bridge_connector_init(drm, encoder);
>                if (IS_ERR(connector)) {
>                        dev_err(dev, "Unable to init connector: err = %d\n", PTR_ERR(connector));
> @@ -1275,6 +1276,7 @@ static int ingenic_drm_bind(struct device *dev, bool has_components)
>                }
>                drm_connector_attach_encoder(connector, encoder);
> +#endif
>        }
>        drm_for_each_encoder(encoder, drm) {

I now have pushed it as upstream-jz4780-hdmi-v4 (incl. removal of the hdmi connector in device tree).

At least we have a solution at the root of the problem to make the green screen appear and the

	ingenic-drm 13050000.lcdc0: Unable to init connector
	ingenic-drm: probe of 13050000.lcdc0 failed with error -22

are gone. Unfortunately it does not solve the green screen and atomic timeout issues as
a side effect.

This patch would be good enough if we could make this variation conditional...

- it is ingenic-drm code which can be made jz4780 specific by jz4780_soc_info.
- we just do not know how to make it hdmi specfic...
- what if someone uses a jz4780 with two LCDs and DVI connector?

IAW: we have to find our what type the encoder or bridge is. What we can't do is
to check for a connector already registered because that is only triggered by


PS: we should try to find out if the latest ingenic-drm-drv.c changes harm the jz4730 lcd setup as well...
PPS: I will next try to patch the lcdc registers to see if we can get some good image

More information about the Letux-kernel mailing list