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

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

> Am 29.08.2021 um 17:26 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> So Paul C's code assumes that there is a connector. While dw-hdmi
> assumes there is none.

Just a rough idea:

we could define our own connector driver compatible to
"dw-hdmi-display-connector" and wrapping dw_hdmi_connector_create()
or doing almost the same in its probe function.

Unfortunately that code is declared static, i.e. not available for a second

Or is it possible to have two functionally different drivers in one?
I.e. add compatble = "dw-hdmi-display-connector" to ingenic_dw_hdmi_dt_ids
and decode that in the proble function? But we still have the problem
that most dw_hdmi_connector_create() internals are not exported.

But refactoring dw-hdmi.c does not seem to be our turf at all...

So I think the right way would be to ask Paul C to modify his patches
so that a bridge without explicit connector can still be handled.


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);
        drm_for_each_encoder(encoder, drm) {

More information about the Letux-kernel mailing list