[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1470046870.3025.36.camel@pengutronix.de>
Date: Mon, 01 Aug 2016 12:21:10 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Peter Senna Tschudin <peter.senna@...labora.com>
Cc: robh+dt@...nel.org, mark.rutland@....com, shawnguo@...nel.org,
kernel@...gutronix.de, fabio.estevam@....com,
linux@...linux.org.uk, airlied@...ux.ie, davem@...emloft.net,
geert@...ux-m68k.org, gregkh@...uxfoundation.org,
akpm@...ux-foundation.org, mchehab@...nel.org, linux@...ck-us.net,
treding@...dia.com, architt@...eaurora.org, ykk@...k-chips.com,
andrey.gusakov@...entembedded.com,
boris.brezillon@...e-electrons.com, enric.balletbo@...labora.com,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
dri-devel@...ts.freedesktop.org, Rob Herring <robh@...nel.org>,
Thierry Reding <thierry.reding@...il.com>
Subject: Re: [PATCH V3 1/5] drm/imx-ldb: Add support to drm-bridge
Am Sonntag, den 31.07.2016, 21:55 +0200 schrieb Peter Senna Tschudin:
> Add support to attach a drm_bridge to imx-ldb in addition to
> existing support to attach a LVDS panel.
>
> This patch does a simple code refactoring by moving code
> from for_each_child_of_node iterator to a new function named
> imx_ldb_panel_ddc(). This was necessary to allow the panel ddc
> code to run only when the imx_ldb is not attached to a bridge.
>
> Cc: Enric Balletbo i Serra <enric.balletbo@...labora.com>
> Cc: Philipp Zabel <p.zabel@...gutronix.de>
> Cc: Rob Herring <robh@...nel.org>
> Cc: Fabio Estevam <fabio.estevam@....com>
> Cc: David Airlie <airlied@...ux.ie>
> Cc: Thierry Reding <treding@...dia.com>
> Cc: Thierry Reding <thierry.reding@...il.com>
> Signed-off-by: Peter Senna Tschudin <peter.senna@...labora.com>
> ---
> Changes from V2:
> - Updated to be aplied on top of Liu Ying changes that made imx-ldb atomic.
> - Tested on next-20160729.
[...]
> @@ -469,19 +473,28 @@ static int imx_ldb_register(struct drm_device *drm,
> drm_encoder_init(drm, encoder, &imx_ldb_encoder_funcs,
> DRM_MODE_ENCODER_LVDS, NULL);
>
> - drm_connector_helper_add(&imx_ldb_ch->connector,
> - &imx_ldb_connector_helper_funcs);
> - drm_connector_init(drm, &imx_ldb_ch->connector,
> - &imx_ldb_connector_funcs, DRM_MODE_CONNECTOR_LVDS);
> -
> if (imx_ldb_ch->panel) {
> + drm_connector_helper_add(&imx_ldb_ch->connector,
> + &imx_ldb_connector_helper_funcs);
> + drm_connector_init(drm, &imx_ldb_ch->connector,
> + &imx_ldb_connector_funcs,
> + DRM_MODE_CONNECTOR_LVDS);
This is still not right. We want to add the connector whenever there is
no bridge that brings its own, not only when there is a panel. For
historical reasons, the ldb driver can also work without a panel.
> ret = drm_panel_attach(imx_ldb_ch->panel,
> - &imx_ldb_ch->connector);
> + &imx_ldb_ch->connector);
What is the purpose of this change?
> if (ret)
> return ret;
> }
>
> - drm_mode_connector_attach_encoder(&imx_ldb_ch->connector, encoder);
Where is this gone?
> + if (imx_ldb_ch->bridge) {
> + imx_ldb_ch->bridge->encoder = encoder;
> +
> + imx_ldb_ch->encoder.bridge = imx_ldb_ch->bridge;
> + ret = drm_bridge_attach(drm, imx_ldb_ch->bridge);
> + if (ret) {
> + DRM_ERROR("Failed to initialize bridge with drm\n");
> + return ret;
> + }
> + }
>
> return 0;
> }
regards
Philipp
Powered by blists - more mailing lists