Hi,
On Sat, May 26, 2018 at 08:25:18PM +0300, Laurent Pinchart wrote:
> The dss_mgr .connect() and .disconnect() are implemented as no-op in
> omapdrm. The operations are unneeded, remove them.
>
> Signed-off-by: Laurent Pinchart
> ---
Reviewed-by: Sebastian Reichel
-- Sebastian
> drivers/gpu/drm/omapdrm/dss/dpi.c | 10 +-
> drivers/gpu/drm/omapdrm/dss/dsi.c | 10 +-
> drivers/gpu/drm/omapdrm/dss/hdmi4.c | 10 +-
> drivers/gpu/drm/omapdrm/dss/hdmi5.c | 10 +-
> drivers/gpu/drm/omapdrm/dss/omapdss.h | 9 -
> drivers/gpu/drm/omapdrm/dss/output.c | 14 --
> drivers/gpu/drm/omapdrm/dss/sdi.c | 10 +-
> drivers/gpu/drm/omapdrm/dss/venc.c| 10 +-
> drivers/gpu/drm/omapdrm/omap_crtc.c | 15 ---
> 9 files changed, 6 insertions(+), 92 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c
> b/drivers/gpu/drm/omapdrm/dss/dpi.c
> index 72d873c2abcc..764ffc4bad32 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dpi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c
> @@ -616,15 +616,9 @@ static int dpi_connect(struct omap_dss_device *src,
>
> dpi_init_pll(dpi);
>
> - r = dss_mgr_connect(dst);
> - if (r)
> - return r;
> -
> r = omapdss_device_connect(dst->dss, dst, dst->next);
> - if (r) {
> - dss_mgr_disconnect(dst);
> + if (r)
> return r;
> - }
>
> dst->dispc_channel_connected = true;
> return 0;
> @@ -636,8 +630,6 @@ static void dpi_disconnect(struct omap_dss_device *src,
> dst->dispc_channel_connected = false;
>
> omapdss_device_disconnect(dst, dst->next);
> -
> - dss_mgr_disconnect(dst);
> }
>
> static const struct omap_dss_device_ops dpi_ops = {
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c
> b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index bd5e463558be..6fe9e2b78144 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -4886,15 +4886,9 @@ static int dsi_connect(struct omap_dss_device *src,
> {
> int r;
>
> - r = dss_mgr_connect(dst);
> - if (r)
> - return r;
> -
> r = omapdss_device_connect(dst->dss, dst, dst->next);
> - if (r) {
> - dss_mgr_disconnect(dst);
> + if (r)
> return r;
> - }
>
> dst->dispc_channel_connected = true;
> return 0;
> @@ -4906,8 +4900,6 @@ static void dsi_disconnect(struct omap_dss_device *src,
> dst->dispc_channel_connected = false;
>
> omapdss_device_disconnect(dst, dst->next);
> -
> - dss_mgr_disconnect(dst);
> }
>
> static const struct omap_dss_device_ops dsi_ops = {
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> index 1e025a8b99c9..c4fcdc9ed62d 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> @@ -433,15 +433,9 @@ static int hdmi_connect(struct omap_dss_device *src,
> {
> int r;
>
> - r = dss_mgr_connect(dst);
> - if (r)
> - return r;
> -
> r = omapdss_device_connect(dst->dss, dst, dst->next);
> - if (r) {
> - dss_mgr_disconnect(dst);
> + if (r)
> return r;
> - }
>
> dst->dispc_channel_connected = true;
> return 0;
> @@ -453,8 +447,6 @@ static void hdmi_disconnect(struct omap_dss_device *src,
> dst->dispc_channel_connected = false;
>
> omapdss_device_disconnect(dst, dst->next);
> -
> - dss_mgr_disconnect(dst);
> }
>
> static int hdmi_read_edid(struct omap_dss_device *dssdev,
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> index d5860438ddd9..889c31745492 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> @@ -438,15 +438,9 @@ static int hdmi_connect(struct omap_dss_device *src,
> {
> int r;
>
> - r = dss_mgr_connect(dst);
> - if (r)
> - return r;
> -
> r = omapdss_device_connect(dst->dss, dst, dst->next);
> - if (r) {
> - dss_mgr_disconnect(dst);
> + if (r)
> return r;
> - }
>
> dst->dispc_channel_connected = true;
> return 0;
> @@ -458,8 +452,6 @@ static void hdmi_disconnect(struct omap_dss_device *src,
> dst->dispc_channel_connected = false;
>
> omapdss_device_disconnect(dst, dst->next);
> -
> - dss_mgr_disconnect(dst);
> }
>
> static int hdmi_read_edid(struct omap_dss_device *dssdev,
> diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h
> b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> index bb340a08c44a..882a2f8f7ac5 100644
> --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
> +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> @@ -550,13 +550,6 @@ enum dss_writeback_channel {
> };
>
> struct dss_mgr_ops {
> - int (*connect)(struct omap_drm_private *priv,
> -enum omap_channel channel,
> -