Re: [PATCH v2 19/60] drm/omap: dss: Move common device operations to common structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, May 26, 2018 at 08:24:37PM +0300, Laurent Pinchart wrote:
> The various types of omapdss_*_ops structures define multiple operations
> that are not specific to a bus type. To simplify the code and remove
> dependencies on specific bus types move those operations to a common
> structure. Operations that are specific to a bus type are kept in the
> specialized ops structures.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxxxx>

-- Sebastian

>  .../gpu/drm/omapdrm/displays/connector-analog-tv.c |  14 +--
>  drivers/gpu/drm/omapdrm/displays/connector-dvi.c   |  14 +--
>  drivers/gpu/drm/omapdrm/displays/connector-hdmi.c  |  42 ++++----
>  drivers/gpu/drm/omapdrm/displays/encoder-opa362.c  |  20 ++--
>  drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c  |  20 ++--
>  .../gpu/drm/omapdrm/displays/encoder-tpd12s015.c   |  48 ++++-----
>  drivers/gpu/drm/omapdrm/displays/panel-dpi.c       |  16 +--
>  drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c    | 120 ++++++++++-----------
>  .../omapdrm/displays/panel-lgphilips-lb035q02.c    |  14 +--
>  .../drm/omapdrm/displays/panel-nec-nl8048hl11.c    |  14 +--
>  .../drm/omapdrm/displays/panel-sharp-ls037v7dw01.c |  14 +--
>  .../drm/omapdrm/displays/panel-sony-acx565akm.c    |  14 +--
>  .../drm/omapdrm/displays/panel-tpo-td028ttec1.c    |  14 +--
>  .../drm/omapdrm/displays/panel-tpo-td043mtea1.c    |  16 +--
>  drivers/gpu/drm/omapdrm/dss/dpi.c                  |   4 +-
>  drivers/gpu/drm/omapdrm/dss/dsi.c                  |  50 ++++-----
>  drivers/gpu/drm/omapdrm/dss/hdmi4.c                |  14 +--
>  drivers/gpu/drm/omapdrm/dss/hdmi5.c                |  12 ++-
>  drivers/gpu/drm/omapdrm/dss/omapdss.h              | 109 ++++---------------
>  drivers/gpu/drm/omapdrm/dss/sdi.c                  |   4 +-
>  drivers/gpu/drm/omapdrm/dss/venc.c                 |   4 +-
>  21 files changed, 256 insertions(+), 321 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c
> index 6b640ede6614..a94868d9398b 100644
> --- a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c
> +++ b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c
> @@ -59,7 +59,7 @@ static int tvc_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.atv->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -79,7 +79,7 @@ static void tvc_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.atv->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -99,9 +99,9 @@ static int tvc_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.atv->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.atv->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
> @@ -120,7 +120,7 @@ static void tvc_disable(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_enabled(dssdev))
>  		return;
>  
> -	in->ops.atv->disable(in);
> +	in->ops->disable(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  }
> @@ -133,7 +133,7 @@ static void tvc_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.atv->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static void tvc_get_timings(struct omap_dss_device *dssdev,
> @@ -150,7 +150,7 @@ static int tvc_check_timings(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.atv->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
>  static const struct omap_dss_driver tvc_driver = {
> diff --git a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
> index 84598ea12a9b..021e3b651c89 100644
> --- a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
> +++ b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
> @@ -72,7 +72,7 @@ static int dvic_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.dvi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -90,7 +90,7 @@ static void dvic_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.dvi->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -108,9 +108,9 @@ static int dvic_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.dvi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.dvi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
> @@ -127,7 +127,7 @@ static void dvic_disable(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_enabled(dssdev))
>  		return;
>  
> -	in->ops.dvi->disable(in);
> +	in->ops->disable(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  }
> @@ -140,7 +140,7 @@ static void dvic_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.dvi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static void dvic_get_timings(struct omap_dss_device *dssdev,
> @@ -157,7 +157,7 @@ static int dvic_check_timings(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.dvi->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
>  static int dvic_ddc_read(struct i2c_adapter *adapter,
> diff --git a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
> index e031280468fb..b528bd51ada3 100644
> --- a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
> +++ b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
> @@ -69,7 +69,7 @@ static int hdmic_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.hdmi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -89,7 +89,7 @@ static void hdmic_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.hdmi->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -109,9 +109,9 @@ static int hdmic_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.hdmi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.hdmi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
> @@ -130,7 +130,7 @@ static void hdmic_disable(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_enabled(dssdev))
>  		return;
>  
> -	in->ops.hdmi->disable(in);
> +	in->ops->disable(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  }
> @@ -143,7 +143,7 @@ static void hdmic_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.hdmi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static void hdmic_get_timings(struct omap_dss_device *dssdev,
> @@ -160,7 +160,7 @@ static int hdmic_check_timings(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.hdmi->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
>  static int hdmic_read_edid(struct omap_dss_device *dssdev,
> @@ -169,7 +169,7 @@ static int hdmic_read_edid(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.hdmi->read_edid(in, edid, len);
> +	return in->ops->hdmi.read_edid(in, edid, len);
>  }
>  
>  static bool hdmic_detect(struct omap_dss_device *dssdev)
> @@ -181,9 +181,9 @@ static bool hdmic_detect(struct omap_dss_device *dssdev)
>  	if (gpio_is_valid(ddata->hpd_gpio))
>  		connected = gpio_get_value_cansleep(ddata->hpd_gpio);
>  	else
> -		connected = in->ops.hdmi->detect(in);
> -	if (!connected && in->ops.hdmi->lost_hotplug)
> -		in->ops.hdmi->lost_hotplug(in);
> +		connected = in->ops->hdmi.detect(in);
> +	if (!connected && in->ops->hdmi.lost_hotplug)
> +		in->ops->hdmi.lost_hotplug(in);
>  	return connected;
>  }
>  
> @@ -201,8 +201,8 @@ static int hdmic_register_hpd_cb(struct omap_dss_device *dssdev,
>  		ddata->hpd_cb_data = cb_data;
>  		mutex_unlock(&ddata->hpd_lock);
>  		return 0;
> -	} else if (in->ops.hdmi->register_hpd_cb) {
> -		return in->ops.hdmi->register_hpd_cb(in, cb, cb_data);
> +	} else if (in->ops->hdmi.register_hpd_cb) {
> +		return in->ops->hdmi.register_hpd_cb(in, cb, cb_data);
>  	}
>  
>  	return -ENOTSUPP;
> @@ -218,8 +218,8 @@ static void hdmic_unregister_hpd_cb(struct omap_dss_device *dssdev)
>  		ddata->hpd_cb = NULL;
>  		ddata->hpd_cb_data = NULL;
>  		mutex_unlock(&ddata->hpd_lock);
> -	} else if (in->ops.hdmi->unregister_hpd_cb) {
> -		in->ops.hdmi->unregister_hpd_cb(in);
> +	} else if (in->ops->hdmi.unregister_hpd_cb) {
> +		in->ops->hdmi.unregister_hpd_cb(in);
>  	}
>  }
>  
> @@ -232,8 +232,8 @@ static void hdmic_enable_hpd(struct omap_dss_device *dssdev)
>  		mutex_lock(&ddata->hpd_lock);
>  		ddata->hpd_enabled = true;
>  		mutex_unlock(&ddata->hpd_lock);
> -	} else if (in->ops.hdmi->enable_hpd) {
> -		in->ops.hdmi->enable_hpd(in);
> +	} else if (in->ops->hdmi.enable_hpd) {
> +		in->ops->hdmi.enable_hpd(in);
>  	}
>  }
>  
> @@ -246,8 +246,8 @@ static void hdmic_disable_hpd(struct omap_dss_device *dssdev)
>  		mutex_lock(&ddata->hpd_lock);
>  		ddata->hpd_enabled = false;
>  		mutex_unlock(&ddata->hpd_lock);
> -	} else if (in->ops.hdmi->disable_hpd) {
> -		in->ops.hdmi->disable_hpd(in);
> +	} else if (in->ops->hdmi.disable_hpd) {
> +		in->ops->hdmi.disable_hpd(in);
>  	}
>  }
>  
> @@ -256,7 +256,7 @@ static int hdmic_set_hdmi_mode(struct omap_dss_device *dssdev, bool hdmi_mode)
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.hdmi->set_hdmi_mode(in, hdmi_mode);
> +	return in->ops->hdmi.set_hdmi_mode(in, hdmi_mode);
>  }
>  
>  static int hdmic_set_infoframe(struct omap_dss_device *dssdev,
> @@ -265,7 +265,7 @@ static int hdmic_set_infoframe(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.hdmi->set_infoframe(in, avi);
> +	return in->ops->hdmi.set_infoframe(in, avi);
>  }
>  
>  static const struct omap_dss_driver hdmic_driver = {
> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> index 0e3f4a20e531..37982ffe0ad4 100644
> --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
> @@ -50,7 +50,7 @@ static int opa362_connect(struct omap_dss_device *dssdev,
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.atv->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -82,7 +82,7 @@ static void opa362_disconnect(struct omap_dss_device *dssdev,
>  	dst->src = NULL;
>  	dssdev->dst = NULL;
>  
> -	in->ops.atv->disconnect(in, &ddata->dssdev);
> +	in->ops->disconnect(in, &ddata->dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -102,9 +102,9 @@ static int opa362_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.atv->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.atv->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
> @@ -129,7 +129,7 @@ static void opa362_disable(struct omap_dss_device *dssdev)
>  	if (ddata->enable_gpio)
>  		gpiod_set_value_cansleep(ddata->enable_gpio, 0);
>  
> -	in->ops.atv->disable(in);
> +	in->ops->disable(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  }
> @@ -144,7 +144,7 @@ static void opa362_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.atv->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static int opa362_check_timings(struct omap_dss_device *dssdev,
> @@ -155,16 +155,14 @@ static int opa362_check_timings(struct omap_dss_device *dssdev,
>  
>  	dev_dbg(dssdev->dev, "check_timings\n");
>  
> -	return in->ops.atv->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
> -static const struct omapdss_atv_ops opa362_atv_ops = {
> +static const struct omap_dss_device_ops opa362_ops = {
>  	.connect	= opa362_connect,
>  	.disconnect	= opa362_disconnect,
> -
>  	.enable		= opa362_enable,
>  	.disable	= opa362_disable,
> -
>  	.check_timings	= opa362_check_timings,
>  	.set_timings	= opa362_set_timings,
>  };
> @@ -191,7 +189,7 @@ static int opa362_probe(struct platform_device *pdev)
>  	ddata->enable_gpio = gpio;
>  
>  	dssdev = &ddata->dssdev;
> -	dssdev->ops.atv = &opa362_atv_ops;
> +	dssdev->ops = &opa362_ops;
>  	dssdev->dev = &pdev->dev;
>  	dssdev->type = OMAP_DISPLAY_TYPE_VENC;
>  	dssdev->output_type = OMAP_DISPLAY_TYPE_VENC;
> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
> index 08e63e39d0b7..1fbc5559e54f 100644
> --- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
> @@ -44,7 +44,7 @@ static int tfp410_connect(struct omap_dss_device *dssdev,
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.dpi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -74,7 +74,7 @@ static void tfp410_disconnect(struct omap_dss_device *dssdev,
>  	dst->src = NULL;
>  	dssdev->dst = NULL;
>  
> -	in->ops.dpi->disconnect(in, &ddata->dssdev);
> +	in->ops->disconnect(in, &ddata->dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -92,9 +92,9 @@ static int tfp410_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.dpi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.dpi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
> @@ -117,7 +117,7 @@ static void tfp410_disable(struct omap_dss_device *dssdev)
>  	if (gpio_is_valid(ddata->pd_gpio))
>  		gpio_set_value_cansleep(ddata->pd_gpio, 0);
>  
> -	in->ops.dpi->disable(in);
> +	in->ops->disable(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  }
> @@ -138,7 +138,7 @@ static void tfp410_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.dpi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static int tfp410_check_timings(struct omap_dss_device *dssdev,
> @@ -149,16 +149,14 @@ static int tfp410_check_timings(struct omap_dss_device *dssdev,
>  
>  	tfp410_fix_timings(vm);
>  
> -	return in->ops.dpi->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
> -static const struct omapdss_dvi_ops tfp410_dvi_ops = {
> +static const struct omap_dss_device_ops tfp410_ops = {
>  	.connect	= tfp410_connect,
>  	.disconnect	= tfp410_disconnect,
> -
>  	.enable		= tfp410_enable,
>  	.disable	= tfp410_disable,
> -
>  	.check_timings	= tfp410_check_timings,
>  	.set_timings	= tfp410_set_timings,
>  };
> @@ -209,7 +207,7 @@ static int tfp410_probe(struct platform_device *pdev)
>  	}
>  
>  	dssdev = &ddata->dssdev;
> -	dssdev->ops.dvi = &tfp410_dvi_ops;
> +	dssdev->ops = &tfp410_ops;
>  	dssdev->dev = &pdev->dev;
>  	dssdev->type = OMAP_DISPLAY_TYPE_DPI;
>  	dssdev->output_type = OMAP_DISPLAY_TYPE_DVI;
> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
> index f35e2afa3e9c..21a4a2fd42bf 100644
> --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
> @@ -49,7 +49,7 @@ static int tpd_connect(struct omap_dss_device *dssdev,
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.hdmi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -85,7 +85,7 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
>  	dst->src = NULL;
>  	dssdev->dst = NULL;
>  
> -	in->ops.hdmi->disconnect(in, &ddata->dssdev);
> +	in->ops->disconnect(in, &ddata->dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -100,9 +100,9 @@ static int tpd_enable(struct omap_dss_device *dssdev)
>  	if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
>  		return 0;
>  
> -	in->ops.hdmi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.hdmi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
> @@ -119,7 +119,7 @@ static void tpd_disable(struct omap_dss_device *dssdev)
>  	if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
>  		return;
>  
> -	in->ops.hdmi->disable(in);
> +	in->ops->disable(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  }
> @@ -132,7 +132,7 @@ static void tpd_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.hdmi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static int tpd_check_timings(struct omap_dss_device *dssdev,
> @@ -142,7 +142,7 @@ static int tpd_check_timings(struct omap_dss_device *dssdev,
>  	struct omap_dss_device *in = ddata->in;
>  	int r;
>  
> -	r = in->ops.hdmi->check_timings(in, vm);
> +	r = in->ops->check_timings(in, vm);
>  
>  	return r;
>  }
> @@ -156,7 +156,7 @@ static int tpd_read_edid(struct omap_dss_device *dssdev,
>  	if (!gpiod_get_value_cansleep(ddata->hpd_gpio))
>  		return -ENODEV;
>  
> -	return in->ops.hdmi->read_edid(in, edid, len);
> +	return in->ops->hdmi.read_edid(in, edid, len);
>  }
>  
>  static bool tpd_detect(struct omap_dss_device *dssdev)
> @@ -165,8 +165,8 @@ static bool tpd_detect(struct omap_dss_device *dssdev)
>  	struct omap_dss_device *in = ddata->in;
>  	bool connected = gpiod_get_value_cansleep(ddata->hpd_gpio);
>  
> -	if (!connected && in->ops.hdmi->lost_hotplug)
> -		in->ops.hdmi->lost_hotplug(in);
> +	if (!connected && in->ops->hdmi.lost_hotplug)
> +		in->ops->hdmi.lost_hotplug(in);
>  	return connected;
>  }
>  
> @@ -219,7 +219,7 @@ static int tpd_set_infoframe(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.hdmi->set_infoframe(in, avi);
> +	return in->ops->hdmi.set_infoframe(in, avi);
>  }
>  
>  static int tpd_set_hdmi_mode(struct omap_dss_device *dssdev,
> @@ -228,27 +228,27 @@ static int tpd_set_hdmi_mode(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.hdmi->set_hdmi_mode(in, hdmi_mode);
> +	return in->ops->hdmi.set_hdmi_mode(in, hdmi_mode);
>  }
>  
> -static const struct omapdss_hdmi_ops tpd_hdmi_ops = {
> +static const struct omap_dss_device_ops tpd_ops = {
>  	.connect		= tpd_connect,
>  	.disconnect		= tpd_disconnect,
> -
>  	.enable			= tpd_enable,
>  	.disable		= tpd_disable,
> -
>  	.check_timings		= tpd_check_timings,
>  	.set_timings		= tpd_set_timings,
>  
> -	.read_edid		= tpd_read_edid,
> -	.detect			= tpd_detect,
> -	.register_hpd_cb	= tpd_register_hpd_cb,
> -	.unregister_hpd_cb	= tpd_unregister_hpd_cb,
> -	.enable_hpd		= tpd_enable_hpd,
> -	.disable_hpd		= tpd_disable_hpd,
> -	.set_infoframe		= tpd_set_infoframe,
> -	.set_hdmi_mode		= tpd_set_hdmi_mode,
> +	.hdmi = {
> +		.read_edid		= tpd_read_edid,
> +		.detect			= tpd_detect,
> +		.register_hpd_cb	= tpd_register_hpd_cb,
> +		.unregister_hpd_cb	= tpd_unregister_hpd_cb,
> +		.enable_hpd		= tpd_enable_hpd,
> +		.disable_hpd		= tpd_disable_hpd,
> +		.set_infoframe		= tpd_set_infoframe,
> +		.set_hdmi_mode		= tpd_set_hdmi_mode,
> +	},
>  };
>  
>  static irqreturn_t tpd_hpd_isr(int irq, void *data)
> @@ -315,7 +315,7 @@ static int tpd_probe(struct platform_device *pdev)
>  		return r;
>  
>  	dssdev = &ddata->dssdev;
> -	dssdev->ops.hdmi = &tpd_hdmi_ops;
> +	dssdev->ops = &tpd_ops;
>  	dssdev->dev = &pdev->dev;
>  	dssdev->type = OMAP_DISPLAY_TYPE_HDMI;
>  	dssdev->output_type = OMAP_DISPLAY_TYPE_HDMI;
> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
> index bbd630ead3c1..15042351ace3 100644
> --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
> +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
> @@ -50,7 +50,7 @@ static int panel_dpi_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.dpi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -68,7 +68,7 @@ static void panel_dpi_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.dpi->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -86,15 +86,15 @@ static int panel_dpi_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.dpi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.dpi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
>  	r = regulator_enable(ddata->vcc_supply);
>  	if (r) {
> -		in->ops.dpi->disable(in);
> +		in->ops->disable(in);
>  		return r;
>  	}
>  
> @@ -119,7 +119,7 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev)
>  	gpiod_set_value_cansleep(ddata->enable_gpio, 0);
>  	regulator_disable(ddata->vcc_supply);
>  
> -	in->ops.dpi->disable(in);
> +	in->ops->disable(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  }
> @@ -132,7 +132,7 @@ static void panel_dpi_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.dpi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static void panel_dpi_get_timings(struct omap_dss_device *dssdev,
> @@ -149,7 +149,7 @@ static int panel_dpi_check_timings(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.dpi->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
>  static const struct omap_dss_driver panel_dpi_ops = {
> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
> index 8d98cd628e11..4296f4ca39fe 100644
> --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
> +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
> @@ -146,7 +146,7 @@ static int dsicm_dcs_read_1(struct panel_drv_data *ddata, u8 dcs_cmd, u8 *data)
>  	int r;
>  	u8 buf[1];
>  
> -	r = in->ops.dsi->dcs_read(in, ddata->channel, dcs_cmd, buf, 1);
> +	r = in->ops->dsi.dcs_read(in, ddata->channel, dcs_cmd, buf, 1);
>  
>  	if (r < 0)
>  		return r;
> @@ -159,7 +159,7 @@ static int dsicm_dcs_read_1(struct panel_drv_data *ddata, u8 dcs_cmd, u8 *data)
>  static int dsicm_dcs_write_0(struct panel_drv_data *ddata, u8 dcs_cmd)
>  {
>  	struct omap_dss_device *in = ddata->in;
> -	return in->ops.dsi->dcs_write(in, ddata->channel, &dcs_cmd, 1);
> +	return in->ops->dsi.dcs_write(in, ddata->channel, &dcs_cmd, 1);
>  }
>  
>  static int dsicm_dcs_write_1(struct panel_drv_data *ddata, u8 dcs_cmd, u8 param)
> @@ -167,7 +167,7 @@ static int dsicm_dcs_write_1(struct panel_drv_data *ddata, u8 dcs_cmd, u8 param)
>  	struct omap_dss_device *in = ddata->in;
>  	u8 buf[2] = { dcs_cmd, param };
>  
> -	return in->ops.dsi->dcs_write(in, ddata->channel, buf, 2);
> +	return in->ops->dsi.dcs_write(in, ddata->channel, buf, 2);
>  }
>  
>  static int dsicm_sleep_in(struct panel_drv_data *ddata)
> @@ -180,7 +180,7 @@ static int dsicm_sleep_in(struct panel_drv_data *ddata)
>  	hw_guard_wait(ddata);
>  
>  	cmd = MIPI_DCS_ENTER_SLEEP_MODE;
> -	r = in->ops.dsi->dcs_write_nosync(in, ddata->channel, &cmd, 1);
> +	r = in->ops->dsi.dcs_write_nosync(in, ddata->channel, &cmd, 1);
>  	if (r)
>  		return r;
>  
> @@ -242,7 +242,7 @@ static int dsicm_set_update_window(struct panel_drv_data *ddata,
>  	buf[3] = (x2 >> 8) & 0xff;
>  	buf[4] = (x2 >> 0) & 0xff;
>  
> -	r = in->ops.dsi->dcs_write_nosync(in, ddata->channel, buf, sizeof(buf));
> +	r = in->ops->dsi.dcs_write_nosync(in, ddata->channel, buf, sizeof(buf));
>  	if (r)
>  		return r;
>  
> @@ -252,11 +252,11 @@ static int dsicm_set_update_window(struct panel_drv_data *ddata,
>  	buf[3] = (y2 >> 8) & 0xff;
>  	buf[4] = (y2 >> 0) & 0xff;
>  
> -	r = in->ops.dsi->dcs_write_nosync(in, ddata->channel, buf, sizeof(buf));
> +	r = in->ops->dsi.dcs_write_nosync(in, ddata->channel, buf, sizeof(buf));
>  	if (r)
>  		return r;
>  
> -	in->ops.dsi->bta_sync(in, ddata->channel);
> +	in->ops->dsi.bta_sync(in, ddata->channel);
>  
>  	return r;
>  }
> @@ -290,7 +290,7 @@ static int dsicm_enter_ulps(struct panel_drv_data *ddata)
>  	if (ddata->ext_te_gpio)
>  		disable_irq(gpiod_to_irq(ddata->ext_te_gpio));
>  
> -	in->ops.dsi->disable(in, false, true);
> +	in->ops->dsi.disable(in, false, true);
>  
>  	ddata->ulps_enabled = true;
>  
> @@ -315,13 +315,13 @@ static int dsicm_exit_ulps(struct panel_drv_data *ddata)
>  	if (!ddata->ulps_enabled)
>  		return 0;
>  
> -	r = in->ops.dsi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r) {
>  		dev_err(&ddata->pdev->dev, "failed to enable DSI\n");
>  		goto err1;
>  	}
>  
> -	in->ops.dsi->enable_hs(in, ddata->channel, true);
> +	in->ops->dsi.enable_hs(in, ddata->channel, true);
>  
>  	r = _dsicm_enable_te(ddata, true);
>  	if (r) {
> @@ -381,13 +381,13 @@ static int dsicm_bl_update_status(struct backlight_device *dev)
>  	mutex_lock(&ddata->lock);
>  
>  	if (ddata->enabled) {
> -		in->ops.dsi->bus_lock(in);
> +		in->ops->dsi.bus_lock(in);
>  
>  		r = dsicm_wake_up(ddata);
>  		if (!r)
>  			r = dsicm_dcs_write_1(ddata, DCS_BRIGHTNESS, level);
>  
> -		in->ops.dsi->bus_unlock(in);
> +		in->ops->dsi.bus_unlock(in);
>  	}
>  
>  	mutex_unlock(&ddata->lock);
> @@ -421,14 +421,14 @@ static ssize_t dsicm_num_errors_show(struct device *dev,
>  	mutex_lock(&ddata->lock);
>  
>  	if (ddata->enabled) {
> -		in->ops.dsi->bus_lock(in);
> +		in->ops->dsi.bus_lock(in);
>  
>  		r = dsicm_wake_up(ddata);
>  		if (!r)
>  			r = dsicm_dcs_read_1(ddata, DCS_READ_NUM_ERRORS,
>  					&errors);
>  
> -		in->ops.dsi->bus_unlock(in);
> +		in->ops->dsi.bus_unlock(in);
>  	} else {
>  		r = -ENODEV;
>  	}
> @@ -453,13 +453,13 @@ static ssize_t dsicm_hw_revision_show(struct device *dev,
>  	mutex_lock(&ddata->lock);
>  
>  	if (ddata->enabled) {
> -		in->ops.dsi->bus_lock(in);
> +		in->ops->dsi.bus_lock(in);
>  
>  		r = dsicm_wake_up(ddata);
>  		if (!r)
>  			r = dsicm_get_id(ddata, &id1, &id2, &id3);
>  
> -		in->ops.dsi->bus_unlock(in);
> +		in->ops->dsi.bus_unlock(in);
>  	} else {
>  		r = -ENODEV;
>  	}
> @@ -489,14 +489,14 @@ static ssize_t dsicm_store_ulps(struct device *dev,
>  	mutex_lock(&ddata->lock);
>  
>  	if (ddata->enabled) {
> -		in->ops.dsi->bus_lock(in);
> +		in->ops->dsi.bus_lock(in);
>  
>  		if (t)
>  			r = dsicm_enter_ulps(ddata);
>  		else
>  			r = dsicm_wake_up(ddata);
>  
> -		in->ops.dsi->bus_unlock(in);
> +		in->ops->dsi.bus_unlock(in);
>  	}
>  
>  	mutex_unlock(&ddata->lock);
> @@ -541,9 +541,9 @@ static ssize_t dsicm_store_ulps_timeout(struct device *dev,
>  
>  	if (ddata->enabled) {
>  		/* dsicm_wake_up will restart the timer */
> -		in->ops.dsi->bus_lock(in);
> +		in->ops->dsi.bus_lock(in);
>  		r = dsicm_wake_up(ddata);
> -		in->ops.dsi->bus_unlock(in);
> +		in->ops->dsi.bus_unlock(in);
>  	}
>  
>  	mutex_unlock(&ddata->lock);
> @@ -635,7 +635,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
>  	}
>  
>  	if (ddata->pin_config.num_pins > 0) {
> -		r = in->ops.dsi->configure_pins(in, &ddata->pin_config);
> +		r = in->ops->dsi.configure_pins(in, &ddata->pin_config);
>  		if (r) {
>  			dev_err(&ddata->pdev->dev,
>  				"failed to configure DSI pins\n");
> @@ -643,13 +643,13 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
>  		}
>  	}
>  
> -	r = in->ops.dsi->set_config(in, &dsi_config);
> +	r = in->ops->dsi.set_config(in, &dsi_config);
>  	if (r) {
>  		dev_err(&ddata->pdev->dev, "failed to configure DSI\n");
>  		goto err_vddi;
>  	}
>  
> -	r = in->ops.dsi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r) {
>  		dev_err(&ddata->pdev->dev, "failed to enable DSI\n");
>  		goto err_vddi;
> @@ -657,7 +657,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
>  
>  	dsicm_hw_reset(ddata);
>  
> -	in->ops.dsi->enable_hs(in, ddata->channel, false);
> +	in->ops->dsi.enable_hs(in, ddata->channel, false);
>  
>  	r = dsicm_sleep_out(ddata);
>  	if (r)
> @@ -689,7 +689,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
>  	if (r)
>  		goto err;
>  
> -	r = in->ops.dsi->enable_video_output(in, ddata->channel);
> +	r = in->ops->dsi.enable_video_output(in, ddata->channel);
>  	if (r)
>  		goto err;
>  
> @@ -701,7 +701,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
>  		ddata->intro_printed = true;
>  	}
>  
> -	in->ops.dsi->enable_hs(in, ddata->channel, true);
> +	in->ops->dsi.enable_hs(in, ddata->channel, true);
>  
>  	return 0;
>  err:
> @@ -709,7 +709,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
>  
>  	dsicm_hw_reset(ddata);
>  
> -	in->ops.dsi->disable(in, true, false);
> +	in->ops->dsi.disable(in, true, false);
>  err_vddi:
>  	if (ddata->vddi)
>  		regulator_disable(ddata->vddi);
> @@ -725,7 +725,7 @@ static void dsicm_power_off(struct panel_drv_data *ddata)
>  	struct omap_dss_device *in = ddata->in;
>  	int r;
>  
> -	in->ops.dsi->disable_video_output(in, ddata->channel);
> +	in->ops->dsi.disable_video_output(in, ddata->channel);
>  
>  	r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_DISPLAY_OFF);
>  	if (!r)
> @@ -737,7 +737,7 @@ static void dsicm_power_off(struct panel_drv_data *ddata)
>  		dsicm_hw_reset(ddata);
>  	}
>  
> -	in->ops.dsi->disable(in, true, false);
> +	in->ops->dsi.disable(in, true, false);
>  
>  	if (ddata->vddi)
>  		regulator_disable(ddata->vddi);
> @@ -772,19 +772,19 @@ static int dsicm_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.dsi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		dev_err(dev, "Failed to connect to video source\n");
>  		goto err_connect;
>  	}
>  
> -	r = in->ops.dsi->request_vc(in, &ddata->channel);
> +	r = in->ops->dsi.request_vc(in, &ddata->channel);
>  	if (r) {
>  		dev_err(dev, "failed to get virtual channel\n");
>  		goto err_req_vc;
>  	}
>  
> -	r = in->ops.dsi->set_vc_id(in, ddata->channel, TCH);
> +	r = in->ops->dsi.set_vc_id(in, ddata->channel, TCH);
>  	if (r) {
>  		dev_err(dev, "failed to set VC_ID\n");
>  		goto err_vc_id;
> @@ -794,9 +794,9 @@ static int dsicm_connect(struct omap_dss_device *dssdev)
>  	return 0;
>  
>  err_vc_id:
> -	in->ops.dsi->release_vc(in, ddata->channel);
> +	in->ops->dsi.release_vc(in, ddata->channel);
>  err_req_vc:
> -	in->ops.dsi->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  err_connect:
>  	omap_dss_put_device(in);
>  	return r;
> @@ -810,8 +810,8 @@ static void dsicm_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.dsi->release_vc(in, ddata->channel);
> -	in->ops.dsi->disconnect(in, dssdev);
> +	in->ops->dsi.release_vc(in, ddata->channel);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -837,11 +837,11 @@ static int dsicm_enable(struct omap_dss_device *dssdev)
>  		goto err;
>  	}
>  
> -	in->ops.dsi->bus_lock(in);
> +	in->ops->dsi.bus_lock(in);
>  
>  	r = dsicm_power_on(ddata);
>  
> -	in->ops.dsi->bus_unlock(in);
> +	in->ops->dsi.bus_unlock(in);
>  
>  	if (r)
>  		goto err;
> @@ -873,7 +873,7 @@ static void dsicm_disable(struct omap_dss_device *dssdev)
>  
>  	dsicm_cancel_ulps_work(ddata);
>  
> -	in->ops.dsi->bus_lock(in);
> +	in->ops->dsi.bus_lock(in);
>  
>  	if (omapdss_device_is_enabled(dssdev)) {
>  		r = dsicm_wake_up(ddata);
> @@ -881,7 +881,7 @@ static void dsicm_disable(struct omap_dss_device *dssdev)
>  			dsicm_power_off(ddata);
>  	}
>  
> -	in->ops.dsi->bus_unlock(in);
> +	in->ops->dsi.bus_unlock(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  
> @@ -894,7 +894,7 @@ static void dsicm_framedone_cb(int err, void *data)
>  	struct omap_dss_device *in = ddata->in;
>  
>  	dev_dbg(&ddata->pdev->dev, "framedone, err %d\n", err);
> -	in->ops.dsi->bus_unlock(ddata->in);
> +	in->ops->dsi.bus_unlock(ddata->in);
>  }
>  
>  static irqreturn_t dsicm_te_isr(int irq, void *data)
> @@ -909,7 +909,7 @@ static irqreturn_t dsicm_te_isr(int irq, void *data)
>  	if (old) {
>  		cancel_delayed_work(&ddata->te_timeout_work);
>  
> -		r = in->ops.dsi->update(in, ddata->channel, dsicm_framedone_cb,
> +		r = in->ops->dsi.update(in, ddata->channel, dsicm_framedone_cb,
>  				ddata);
>  		if (r)
>  			goto err;
> @@ -918,7 +918,7 @@ static irqreturn_t dsicm_te_isr(int irq, void *data)
>  	return IRQ_HANDLED;
>  err:
>  	dev_err(&ddata->pdev->dev, "start update failed\n");
> -	in->ops.dsi->bus_unlock(in);
> +	in->ops->dsi.bus_unlock(in);
>  	return IRQ_HANDLED;
>  }
>  
> @@ -931,7 +931,7 @@ static void dsicm_te_timeout_work_callback(struct work_struct *work)
>  	dev_err(&ddata->pdev->dev, "TE not received for 250ms!\n");
>  
>  	atomic_set(&ddata->do_update, 0);
> -	in->ops.dsi->bus_unlock(in);
> +	in->ops->dsi.bus_unlock(in);
>  }
>  
>  static int dsicm_update(struct omap_dss_device *dssdev,
> @@ -944,7 +944,7 @@ static int dsicm_update(struct omap_dss_device *dssdev,
>  	dev_dbg(&ddata->pdev->dev, "update %d, %d, %d x %d\n", x, y, w, h);
>  
>  	mutex_lock(&ddata->lock);
> -	in->ops.dsi->bus_lock(in);
> +	in->ops->dsi.bus_lock(in);
>  
>  	r = dsicm_wake_up(ddata);
>  	if (r)
> @@ -966,7 +966,7 @@ static int dsicm_update(struct omap_dss_device *dssdev,
>  				msecs_to_jiffies(250));
>  		atomic_set(&ddata->do_update, 1);
>  	} else {
> -		r = in->ops.dsi->update(in, ddata->channel, dsicm_framedone_cb,
> +		r = in->ops->dsi.update(in, ddata->channel, dsicm_framedone_cb,
>  				ddata);
>  		if (r)
>  			goto err;
> @@ -976,7 +976,7 @@ static int dsicm_update(struct omap_dss_device *dssdev,
>  	mutex_unlock(&ddata->lock);
>  	return 0;
>  err:
> -	in->ops.dsi->bus_unlock(in);
> +	in->ops->dsi.bus_unlock(in);
>  	mutex_unlock(&ddata->lock);
>  	return r;
>  }
> @@ -989,8 +989,8 @@ static int dsicm_sync(struct omap_dss_device *dssdev)
>  	dev_dbg(&ddata->pdev->dev, "sync\n");
>  
>  	mutex_lock(&ddata->lock);
> -	in->ops.dsi->bus_lock(in);
> -	in->ops.dsi->bus_unlock(in);
> +	in->ops->dsi.bus_lock(in);
> +	in->ops->dsi.bus_unlock(in);
>  	mutex_unlock(&ddata->lock);
>  
>  	dev_dbg(&ddata->pdev->dev, "sync done\n");
> @@ -1009,7 +1009,7 @@ static int _dsicm_enable_te(struct panel_drv_data *ddata, bool enable)
>  		r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_TEAR_OFF);
>  
>  	if (!ddata->ext_te_gpio)
> -		in->ops.dsi->enable_te(in, enable);
> +		in->ops->dsi.enable_te(in, enable);
>  
>  	/* possible panel bug */
>  	msleep(100);
> @@ -1028,7 +1028,7 @@ static int dsicm_enable_te(struct omap_dss_device *dssdev, bool enable)
>  	if (ddata->te_enabled == enable)
>  		goto end;
>  
> -	in->ops.dsi->bus_lock(in);
> +	in->ops->dsi.bus_lock(in);
>  
>  	if (ddata->enabled) {
>  		r = dsicm_wake_up(ddata);
> @@ -1042,13 +1042,13 @@ static int dsicm_enable_te(struct omap_dss_device *dssdev, bool enable)
>  
>  	ddata->te_enabled = enable;
>  
> -	in->ops.dsi->bus_unlock(in);
> +	in->ops->dsi.bus_unlock(in);
>  end:
>  	mutex_unlock(&ddata->lock);
>  
>  	return 0;
>  err:
> -	in->ops.dsi->bus_unlock(in);
> +	in->ops->dsi.bus_unlock(in);
>  	mutex_unlock(&ddata->lock);
>  
>  	return r;
> @@ -1090,7 +1090,7 @@ static int dsicm_memory_read(struct omap_dss_device *dssdev,
>  	size = min((u32)w * h * 3,
>  		   ddata->vm.hactive * ddata->vm.vactive * 3);
>  
> -	in->ops.dsi->bus_lock(in);
> +	in->ops->dsi.bus_lock(in);
>  
>  	r = dsicm_wake_up(ddata);
>  	if (r)
> @@ -1106,7 +1106,7 @@ static int dsicm_memory_read(struct omap_dss_device *dssdev,
>  
>  	dsicm_set_update_window(ddata, x, y, w, h);
>  
> -	r = in->ops.dsi->set_max_rx_packet_size(in, ddata->channel, plen);
> +	r = in->ops->dsi.set_max_rx_packet_size(in, ddata->channel, plen);
>  	if (r)
>  		goto err2;
>  
> @@ -1114,7 +1114,7 @@ static int dsicm_memory_read(struct omap_dss_device *dssdev,
>  		u8 dcs_cmd = first ? 0x2e : 0x3e;
>  		first = 0;
>  
> -		r = in->ops.dsi->dcs_read(in, ddata->channel, dcs_cmd,
> +		r = in->ops->dsi.dcs_read(in, ddata->channel, dcs_cmd,
>  				buf + buf_used, size - buf_used);
>  
>  		if (r < 0) {
> @@ -1140,9 +1140,9 @@ static int dsicm_memory_read(struct omap_dss_device *dssdev,
>  	r = buf_used;
>  
>  err3:
> -	in->ops.dsi->set_max_rx_packet_size(in, ddata->channel, 1);
> +	in->ops->dsi.set_max_rx_packet_size(in, ddata->channel, 1);
>  err2:
> -	in->ops.dsi->bus_unlock(in);
> +	in->ops->dsi.bus_unlock(in);
>  err1:
>  	mutex_unlock(&ddata->lock);
>  	return r;
> @@ -1162,11 +1162,11 @@ static void dsicm_ulps_work(struct work_struct *work)
>  		return;
>  	}
>  
> -	in->ops.dsi->bus_lock(in);
> +	in->ops->dsi.bus_lock(in);
>  
>  	dsicm_enter_ulps(ddata);
>  
> -	in->ops.dsi->bus_unlock(in);
> +	in->ops->dsi.bus_unlock(in);
>  	mutex_unlock(&ddata->lock);
>  }
>  
> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
> index 0a6ab6470253..8e293708261c 100644
> --- a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
> +++ b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
> @@ -131,7 +131,7 @@ static int lb035q02_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.dpi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -151,7 +151,7 @@ static void lb035q02_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.dpi->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -169,9 +169,9 @@ static int lb035q02_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.dpi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.dpi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
> @@ -194,7 +194,7 @@ static void lb035q02_disable(struct omap_dss_device *dssdev)
>  	if (ddata->enable_gpio)
>  		gpiod_set_value_cansleep(ddata->enable_gpio, 0);
>  
> -	in->ops.dpi->disable(in);
> +	in->ops->disable(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  }
> @@ -207,7 +207,7 @@ static void lb035q02_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.dpi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static void lb035q02_get_timings(struct omap_dss_device *dssdev,
> @@ -224,7 +224,7 @@ static int lb035q02_check_timings(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.dpi->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
>  static const struct omap_dss_driver lb035q02_ops = {
> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
> index 9816e661c97d..7296c794326c 100644
> --- a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
> +++ b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
> @@ -127,7 +127,7 @@ static int nec_8048_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.dpi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -145,7 +145,7 @@ static void nec_8048_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.dpi->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -163,9 +163,9 @@ static int nec_8048_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.dpi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.dpi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
> @@ -188,7 +188,7 @@ static void nec_8048_disable(struct omap_dss_device *dssdev)
>  	if (gpio_is_valid(ddata->res_gpio))
>  		gpio_set_value_cansleep(ddata->res_gpio, 0);
>  
> -	in->ops.dpi->disable(in);
> +	in->ops->disable(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  }
> @@ -201,7 +201,7 @@ static void nec_8048_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.dpi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static void nec_8048_get_timings(struct omap_dss_device *dssdev,
> @@ -218,7 +218,7 @@ static int nec_8048_check_timings(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.dpi->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
>  static const struct omap_dss_driver nec_8048_ops = {
> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
> index e259240f96fa..00291b9ecfde 100644
> --- a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
> +++ b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
> @@ -73,7 +73,7 @@ static int sharp_ls_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.dpi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -91,7 +91,7 @@ static void sharp_ls_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.dpi->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -109,7 +109,7 @@ static int sharp_ls_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.dpi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
>  	if (ddata->vcc) {
>  		r = regulator_enable(ddata->vcc);
> @@ -117,7 +117,7 @@ static int sharp_ls_enable(struct omap_dss_device *dssdev)
>  			return r;
>  	}
>  
> -	r = in->ops.dpi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r) {
>  		regulator_disable(ddata->vcc);
>  		return r;
> @@ -155,7 +155,7 @@ static void sharp_ls_disable(struct omap_dss_device *dssdev)
>  
>  	msleep(100);
>  
> -	in->ops.dpi->disable(in);
> +	in->ops->disable(in);
>  
>  	if (ddata->vcc)
>  		regulator_disable(ddata->vcc);
> @@ -171,7 +171,7 @@ static void sharp_ls_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.dpi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static void sharp_ls_get_timings(struct omap_dss_device *dssdev,
> @@ -188,7 +188,7 @@ static int sharp_ls_check_timings(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.dpi->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
>  static const struct omap_dss_driver sharp_ls_ops = {
> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
> index b4917d12d913..03fb297581fd 100644
> --- a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
> +++ b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
> @@ -522,7 +522,7 @@ static int acx565akm_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.sdi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -540,7 +540,7 @@ static void acx565akm_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.sdi->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -554,9 +554,9 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev)
>  
>  	dev_dbg(&ddata->spi->dev, "%s\n", __func__);
>  
> -	in->ops.sdi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.sdi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r) {
>  		pr_err("%s sdi enable failed\n", __func__);
>  		return r;
> @@ -621,7 +621,7 @@ static void acx565akm_panel_power_off(struct omap_dss_device *dssdev)
>  	/* FIXME need to tweak this delay */
>  	msleep(100);
>  
> -	in->ops.sdi->disable(in);
> +	in->ops->disable(in);
>  }
>  
>  static int acx565akm_enable(struct omap_dss_device *dssdev)
> @@ -672,7 +672,7 @@ static void acx565akm_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.sdi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static void acx565akm_get_timings(struct omap_dss_device *dssdev,
> @@ -689,7 +689,7 @@ static int acx565akm_check_timings(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.sdi->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
>  static const struct omap_dss_driver acx565akm_ops = {
> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
> index 5faaf760e81b..abdbbaf02674 100644
> --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
> +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
> @@ -181,7 +181,7 @@ static int td028ttec1_panel_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.dpi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -199,7 +199,7 @@ static void td028ttec1_panel_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.dpi->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -217,9 +217,9 @@ static int td028ttec1_panel_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.dpi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.dpi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
> @@ -328,7 +328,7 @@ static void td028ttec1_panel_disable(struct omap_dss_device *dssdev)
>  	jbt_ret_write_0(ddata, JBT_REG_SLEEP_IN);
>  	jbt_reg_write_1(ddata, JBT_REG_POWER_ON_OFF, 0x00);
>  
> -	in->ops.dpi->disable(in);
> +	in->ops->disable(in);
>  
>  	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
>  }
> @@ -341,7 +341,7 @@ static void td028ttec1_panel_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.dpi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev,
> @@ -358,7 +358,7 @@ static int td028ttec1_panel_check_timings(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.dpi->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
>  static const struct omap_dss_driver td028ttec1_ops = {
> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
> index 8e98232ee9d9..de1140314a7a 100644
> --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
> +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
> @@ -352,7 +352,7 @@ static int tpo_td043_connect(struct omap_dss_device *dssdev)
>  		return PTR_ERR(in);
>  	}
>  
> -	r = in->ops.dpi->connect(in, dssdev);
> +	r = in->ops->connect(in, dssdev);
>  	if (r) {
>  		omap_dss_put_device(in);
>  		return r;
> @@ -370,7 +370,7 @@ static void tpo_td043_disconnect(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_connected(dssdev))
>  		return;
>  
> -	in->ops.dpi->disconnect(in, dssdev);
> +	in->ops->disconnect(in, dssdev);
>  
>  	omap_dss_put_device(in);
>  	ddata->in = NULL;
> @@ -388,9 +388,9 @@ static int tpo_td043_enable(struct omap_dss_device *dssdev)
>  	if (omapdss_device_is_enabled(dssdev))
>  		return 0;
>  
> -	in->ops.dpi->set_timings(in, &ddata->vm);
> +	in->ops->set_timings(in, &ddata->vm);
>  
> -	r = in->ops.dpi->enable(in);
> +	r = in->ops->enable(in);
>  	if (r)
>  		return r;
>  
> @@ -401,7 +401,7 @@ static int tpo_td043_enable(struct omap_dss_device *dssdev)
>  	if (!ddata->spi_suspended) {
>  		r = tpo_td043_power_on(ddata);
>  		if (r) {
> -			in->ops.dpi->disable(in);
> +			in->ops->disable(in);
>  			return r;
>  		}
>  	}
> @@ -419,7 +419,7 @@ static void tpo_td043_disable(struct omap_dss_device *dssdev)
>  	if (!omapdss_device_is_enabled(dssdev))
>  		return;
>  
> -	in->ops.dpi->disable(in);
> +	in->ops->disable(in);
>  
>  	if (!ddata->spi_suspended)
>  		tpo_td043_power_off(ddata);
> @@ -435,7 +435,7 @@ static void tpo_td043_set_timings(struct omap_dss_device *dssdev,
>  
>  	ddata->vm = *vm;
>  
> -	in->ops.dpi->set_timings(in, vm);
> +	in->ops->set_timings(in, vm);
>  }
>  
>  static void tpo_td043_get_timings(struct omap_dss_device *dssdev,
> @@ -452,7 +452,7 @@ static int tpo_td043_check_timings(struct omap_dss_device *dssdev,
>  	struct panel_drv_data *ddata = to_panel_data(dssdev);
>  	struct omap_dss_device *in = ddata->in;
>  
> -	return in->ops.dpi->check_timings(in, vm);
> +	return in->ops->check_timings(in, vm);
>  }
>  
>  static const struct omap_dss_driver tpo_td043_ops = {
> diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c
> index af002c57a41d..4516086e85fa 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dpi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c
> @@ -681,7 +681,7 @@ static void dpi_disconnect(struct omap_dss_device *dssdev,
>  	dss_mgr_disconnect(&dpi->output, dssdev);
>  }
>  
> -static const struct omapdss_dpi_ops dpi_ops = {
> +static const struct omap_dss_device_ops dpi_ops = {
>  	.connect = dpi_connect,
>  	.disconnect = dpi_disconnect,
>  
> @@ -720,7 +720,7 @@ static void dpi_init_output_port(struct dpi_data *dpi, struct device_node *port)
>  	out->output_type = OMAP_DISPLAY_TYPE_DPI;
>  	out->dispc_channel = dpi_get_channel(dpi, port_num);
>  	out->port_num = port_num;
> -	out->ops.dpi = &dpi_ops;
> +	out->ops = &dpi_ops;
>  	out->owner = THIS_MODULE;
>  
>  	omapdss_register_output(out);
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index d4a680629825..e4f496382617 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -5000,43 +5000,45 @@ static void dsi_disconnect(struct omap_dss_device *dssdev,
>  	dss_mgr_disconnect(&dsi->output, dssdev);
>  }
>  
> -static const struct omapdss_dsi_ops dsi_ops = {
> +static const struct omap_dss_device_ops dsi_ops = {
>  	.connect = dsi_connect,
>  	.disconnect = dsi_disconnect,
> +	.enable = dsi_display_enable,
>  
> -	.bus_lock = dsi_bus_lock,
> -	.bus_unlock = dsi_bus_unlock,
> +	.dsi = {
> +		.bus_lock = dsi_bus_lock,
> +		.bus_unlock = dsi_bus_unlock,
>  
> -	.enable = dsi_display_enable,
> -	.disable = dsi_display_disable,
> +		.disable = dsi_display_disable,
>  
> -	.enable_hs = dsi_vc_enable_hs,
> +		.enable_hs = dsi_vc_enable_hs,
>  
> -	.configure_pins = dsi_configure_pins,
> -	.set_config = dsi_set_config,
> +		.configure_pins = dsi_configure_pins,
> +		.set_config = dsi_set_config,
>  
> -	.enable_video_output = dsi_enable_video_output,
> -	.disable_video_output = dsi_disable_video_output,
> +		.enable_video_output = dsi_enable_video_output,
> +		.disable_video_output = dsi_disable_video_output,
>  
> -	.update = dsi_update,
> +		.update = dsi_update,
>  
> -	.enable_te = dsi_enable_te,
> +		.enable_te = dsi_enable_te,
>  
> -	.request_vc = dsi_request_vc,
> -	.set_vc_id = dsi_set_vc_id,
> -	.release_vc = dsi_release_vc,
> +		.request_vc = dsi_request_vc,
> +		.set_vc_id = dsi_set_vc_id,
> +		.release_vc = dsi_release_vc,
>  
> -	.dcs_write = dsi_vc_dcs_write,
> -	.dcs_write_nosync = dsi_vc_dcs_write_nosync,
> -	.dcs_read = dsi_vc_dcs_read,
> +		.dcs_write = dsi_vc_dcs_write,
> +		.dcs_write_nosync = dsi_vc_dcs_write_nosync,
> +		.dcs_read = dsi_vc_dcs_read,
>  
> -	.gen_write = dsi_vc_generic_write,
> -	.gen_write_nosync = dsi_vc_generic_write_nosync,
> -	.gen_read = dsi_vc_generic_read,
> +		.gen_write = dsi_vc_generic_write,
> +		.gen_write_nosync = dsi_vc_generic_write_nosync,
> +		.gen_read = dsi_vc_generic_read,
>  
> -	.bta_sync = dsi_vc_send_bta_sync,
> +		.bta_sync = dsi_vc_send_bta_sync,
>  
> -	.set_max_rx_packet_size = dsi_vc_set_max_rx_packet_size,
> +		.set_max_rx_packet_size = dsi_vc_set_max_rx_packet_size,
> +	},
>  };
>  
>  static void dsi_init_output(struct dsi_data *dsi)
> @@ -5050,7 +5052,7 @@ static void dsi_init_output(struct dsi_data *dsi)
>  	out->output_type = OMAP_DISPLAY_TYPE_DSI;
>  	out->name = dsi->module_id == 0 ? "dsi.0" : "dsi.1";
>  	out->dispc_channel = dsi_get_channel(dsi);
> -	out->ops.dsi = &dsi_ops;
> +	out->ops = &dsi_ops;
>  	out->owner = THIS_MODULE;
>  
>  	omapdss_register_output(out);
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> index b3d7865347a3..e0406f2a90e7 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> @@ -540,7 +540,7 @@ static int hdmi_set_hdmi_mode(struct omap_dss_device *dssdev,
>  	return 0;
>  }
>  
> -static const struct omapdss_hdmi_ops hdmi_ops = {
> +static const struct omap_dss_device_ops hdmi_ops = {
>  	.connect		= hdmi_connect,
>  	.disconnect		= hdmi_disconnect,
>  
> @@ -550,10 +550,12 @@ static const struct omapdss_hdmi_ops hdmi_ops = {
>  	.check_timings		= hdmi_display_check_timing,
>  	.set_timings		= hdmi_display_set_timing,
>  
> -	.read_edid		= hdmi_read_edid,
> -	.lost_hotplug		= hdmi_lost_hotplug,
> -	.set_infoframe		= hdmi_set_infoframe,
> -	.set_hdmi_mode		= hdmi_set_hdmi_mode,
> +	.hdmi = {
> +		.read_edid		= hdmi_read_edid,
> +		.lost_hotplug		= hdmi_lost_hotplug,
> +		.set_infoframe		= hdmi_set_infoframe,
> +		.set_hdmi_mode		= hdmi_set_hdmi_mode,
> +	},
>  };
>  
>  static void hdmi_init_output(struct omap_hdmi *hdmi)
> @@ -565,7 +567,7 @@ static void hdmi_init_output(struct omap_hdmi *hdmi)
>  	out->output_type = OMAP_DISPLAY_TYPE_HDMI;
>  	out->name = "hdmi.0";
>  	out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
> -	out->ops.hdmi = &hdmi_ops;
> +	out->ops = &hdmi_ops;
>  	out->owner = THIS_MODULE;
>  
>  	omapdss_register_output(out);
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> index 8e9b3a24b2ab..45d2eacedb2a 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> @@ -532,7 +532,7 @@ static int hdmi_set_hdmi_mode(struct omap_dss_device *dssdev,
>  	return 0;
>  }
>  
> -static const struct omapdss_hdmi_ops hdmi_ops = {
> +static const struct omap_dss_device_ops hdmi_ops = {
>  	.connect		= hdmi_connect,
>  	.disconnect		= hdmi_disconnect,
>  
> @@ -542,9 +542,11 @@ static const struct omapdss_hdmi_ops hdmi_ops = {
>  	.check_timings		= hdmi_display_check_timing,
>  	.set_timings		= hdmi_display_set_timing,
>  
> -	.read_edid		= hdmi_read_edid,
> -	.set_infoframe		= hdmi_set_infoframe,
> -	.set_hdmi_mode		= hdmi_set_hdmi_mode,
> +	.hdmi = {
> +		.read_edid		= hdmi_read_edid,
> +		.set_infoframe		= hdmi_set_infoframe,
> +		.set_hdmi_mode		= hdmi_set_hdmi_mode,
> +	},
>  };
>  
>  static void hdmi_init_output(struct omap_hdmi *hdmi)
> @@ -556,7 +558,7 @@ static void hdmi_init_output(struct omap_hdmi *hdmi)
>  	out->output_type = OMAP_DISPLAY_TYPE_HDMI;
>  	out->name = "hdmi.0";
>  	out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
> -	out->ops.hdmi = &hdmi_ops;
> +	out->ops = &hdmi_ops;
>  	out->owner = THIS_MODULE;
>  
>  	omapdss_register_output(out);
> diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> index 2ec74206bcff..fb6c9d522013 100644
> --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
> +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> @@ -296,80 +296,7 @@ struct omap_dss_writeback_info {
>  	u8 pre_mult_alpha;
>  };
>  
> -struct omapdss_dpi_ops {
> -	int (*connect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -	void (*disconnect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -
> -	int (*enable)(struct omap_dss_device *dssdev);
> -	void (*disable)(struct omap_dss_device *dssdev);
> -
> -	int (*check_timings)(struct omap_dss_device *dssdev,
> -			     struct videomode *vm);
> -	void (*set_timings)(struct omap_dss_device *dssdev,
> -			    struct videomode *vm);
> -};
> -
> -struct omapdss_sdi_ops {
> -	int (*connect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -	void (*disconnect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -
> -	int (*enable)(struct omap_dss_device *dssdev);
> -	void (*disable)(struct omap_dss_device *dssdev);
> -
> -	int (*check_timings)(struct omap_dss_device *dssdev,
> -			     struct videomode *vm);
> -	void (*set_timings)(struct omap_dss_device *dssdev,
> -			    struct videomode *vm);
> -};
> -
> -struct omapdss_dvi_ops {
> -	int (*connect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -	void (*disconnect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -
> -	int (*enable)(struct omap_dss_device *dssdev);
> -	void (*disable)(struct omap_dss_device *dssdev);
> -
> -	int (*check_timings)(struct omap_dss_device *dssdev,
> -			     struct videomode *vm);
> -	void (*set_timings)(struct omap_dss_device *dssdev,
> -			    struct videomode *vm);
> -};
> -
> -struct omapdss_atv_ops {
> -	int (*connect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -	void (*disconnect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -
> -	int (*enable)(struct omap_dss_device *dssdev);
> -	void (*disable)(struct omap_dss_device *dssdev);
> -
> -	int (*check_timings)(struct omap_dss_device *dssdev,
> -			     struct videomode *vm);
> -	void (*set_timings)(struct omap_dss_device *dssdev,
> -			    struct videomode *vm);
> -};
> -
>  struct omapdss_hdmi_ops {
> -	int (*connect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -	void (*disconnect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -
> -	int (*enable)(struct omap_dss_device *dssdev);
> -	void (*disable)(struct omap_dss_device *dssdev);
> -
> -	int (*check_timings)(struct omap_dss_device *dssdev,
> -			     struct videomode *vm);
> -	void (*set_timings)(struct omap_dss_device *dssdev,
> -			    struct videomode *vm);
> -
>  	int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len);
>  	void (*lost_hotplug)(struct omap_dss_device *dssdev);
>  	bool (*detect)(struct omap_dss_device *dssdev);
> @@ -388,12 +315,6 @@ struct omapdss_hdmi_ops {
>  };
>  
>  struct omapdss_dsi_ops {
> -	int (*connect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -	void (*disconnect)(struct omap_dss_device *dssdev,
> -			struct omap_dss_device *dst);
> -
> -	int (*enable)(struct omap_dss_device *dssdev);
>  	void (*disable)(struct omap_dss_device *dssdev, bool disconnect_lanes,
>  			bool enter_ulps);
>  
> @@ -444,6 +365,26 @@ struct omapdss_dsi_ops {
>  			int channel, u16 plen);
>  };
>  
> +struct omap_dss_device_ops {
> +	int (*connect)(struct omap_dss_device *dssdev,
> +			struct omap_dss_device *dst);
> +	void (*disconnect)(struct omap_dss_device *dssdev,
> +			struct omap_dss_device *dst);
> +
> +	int (*enable)(struct omap_dss_device *dssdev);
> +	void (*disable)(struct omap_dss_device *dssdev);
> +
> +	int (*check_timings)(struct omap_dss_device *dssdev,
> +			     struct videomode *vm);
> +	void (*set_timings)(struct omap_dss_device *dssdev,
> +			    struct videomode *vm);
> +
> +	union {
> +		const struct omapdss_hdmi_ops hdmi;
> +		const struct omapdss_dsi_ops dsi;
> +	};
> +};
> +
>  struct omap_dss_device {
>  	struct kobject kobj;
>  	struct device *dev;
> @@ -461,15 +402,7 @@ struct omap_dss_device {
>  	const char *name;
>  
>  	const struct omap_dss_driver *driver;
> -
> -	union {
> -		const struct omapdss_dpi_ops *dpi;
> -		const struct omapdss_sdi_ops *sdi;
> -		const struct omapdss_dvi_ops *dvi;
> -		const struct omapdss_hdmi_ops *hdmi;
> -		const struct omapdss_atv_ops *atv;
> -		const struct omapdss_dsi_ops *dsi;
> -	} ops;
> +	const struct omap_dss_device_ops *ops;
>  
>  	/* helper variable for driver suspend/resume */
>  	bool activate_after_resume;
> diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c
> index 2a61409cfaf6..49499a2aae46 100644
> --- a/drivers/gpu/drm/omapdrm/dss/sdi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c
> @@ -308,7 +308,7 @@ static void sdi_disconnect(struct omap_dss_device *dssdev,
>  	dss_mgr_disconnect(&sdi->output, dssdev);
>  }
>  
> -static const struct omapdss_sdi_ops sdi_ops = {
> +static const struct omap_dss_device_ops sdi_ops = {
>  	.connect = sdi_connect,
>  	.disconnect = sdi_disconnect,
>  
> @@ -330,7 +330,7 @@ static void sdi_init_output(struct sdi_device *sdi)
>  	out->dispc_channel = OMAP_DSS_CHANNEL_LCD;
>  	/* We have SDI only on OMAP3, where it's on port 1 */
>  	out->port_num = 1;
> -	out->ops.sdi = &sdi_ops;
> +	out->ops = &sdi_ops;
>  	out->owner = THIS_MODULE;
>  
>  	omapdss_register_output(out);
> diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c
> index a9225bd2df6d..c2ea182f1074 100644
> --- a/drivers/gpu/drm/omapdrm/dss/venc.c
> +++ b/drivers/gpu/drm/omapdrm/dss/venc.c
> @@ -750,7 +750,7 @@ static void venc_disconnect(struct omap_dss_device *dssdev,
>  	dss_mgr_disconnect(&venc->output, dssdev);
>  }
>  
> -static const struct omapdss_atv_ops venc_ops = {
> +static const struct omap_dss_device_ops venc_ops = {
>  	.connect = venc_connect,
>  	.disconnect = venc_disconnect,
>  
> @@ -770,7 +770,7 @@ static void venc_init_output(struct venc_device *venc)
>  	out->output_type = OMAP_DISPLAY_TYPE_VENC;
>  	out->name = "venc.0";
>  	out->dispc_channel = OMAP_DSS_CHANNEL_DIGIT;
> -	out->ops.atv = &venc_ops;
> +	out->ops = &venc_ops;
>  	out->owner = THIS_MODULE;
>  
>  	omapdss_register_output(out);
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux