Commit 6ea48430 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen
Browse files

drm/omap: Don't call .set_timings() operation recursively



Instead of calling the .set_timings() operation recursively from the
display device backwards, iterate over the devices manually in the DRM
encoder code. This moves the complexity to a single central location and
simplifies the logic in omap_dss_device drivers.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent d8dbe791
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -73,22 +73,12 @@ static void tvc_disable(struct omap_dss_device *dssdev)
	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}

static void tvc_set_timings(struct omap_dss_device *dssdev,
			    const struct videomode *vm)
{
	struct omap_dss_device *src = dssdev->src;

	src->ops->set_timings(src, vm);
}

static const struct omap_dss_device_ops tvc_ops = {
	.connect		= tvc_connect,
	.disconnect		= tvc_disconnect,

	.enable			= tvc_enable,
	.disable		= tvc_disable,

	.set_timings		= tvc_set_timings,
};

static int tvc_probe(struct platform_device *pdev)
+0 −10
Original line number Diff line number Diff line
@@ -78,14 +78,6 @@ static void dvic_disable(struct omap_dss_device *dssdev)
	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}

static void dvic_set_timings(struct omap_dss_device *dssdev,
			     const struct videomode *vm)
{
	struct omap_dss_device *src = dssdev->src;

	src->ops->set_timings(src, vm);
}

static int dvic_ddc_read(struct i2c_adapter *adapter,
		unsigned char *buf, u16 count, u8 offset)
{
@@ -192,8 +184,6 @@ static const struct omap_dss_device_ops dvic_ops = {
	.enable		= dvic_enable,
	.disable	= dvic_disable,

	.set_timings	= dvic_set_timings,

	.read_edid	= dvic_read_edid,
	.detect		= dvic_detect,

+0 −10
Original line number Diff line number Diff line
@@ -79,14 +79,6 @@ static void hdmic_disable(struct omap_dss_device *dssdev)
	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}

static void hdmic_set_timings(struct omap_dss_device *dssdev,
			      const struct videomode *vm)
{
	struct omap_dss_device *src = dssdev->src;

	src->ops->set_timings(src, vm);
}

static bool hdmic_detect(struct omap_dss_device *dssdev)
{
	struct panel_drv_data *ddata = to_panel_data(dssdev);
@@ -124,8 +116,6 @@ static const struct omap_dss_device_ops hdmic_ops = {
	.enable			= hdmic_enable,
	.disable		= hdmic_disable,

	.set_timings		= hdmic_set_timings,

	.detect			= hdmic_detect,
	.register_hpd_cb	= hdmic_register_hpd_cb,
	.unregister_hpd_cb	= hdmic_unregister_hpd_cb,
+0 −11
Original line number Diff line number Diff line
@@ -85,22 +85,11 @@ static void opa362_disable(struct omap_dss_device *dssdev)
	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}

static void opa362_set_timings(struct omap_dss_device *dssdev,
			       const struct videomode *vm)
{
	struct omap_dss_device *src = dssdev->src;

	dev_dbg(dssdev->dev, "set_timings\n");

	src->ops->set_timings(src, vm);
}

static const struct omap_dss_device_ops opa362_ops = {
	.connect	= opa362_connect,
	.disconnect	= opa362_disconnect,
	.enable		= opa362_enable,
	.disable	= opa362_disable,
	.set_timings	= opa362_set_timings,
};

static int opa362_probe(struct platform_device *pdev)
+0 −9
Original line number Diff line number Diff line
@@ -76,20 +76,11 @@ static void tfp410_disable(struct omap_dss_device *dssdev)
	dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}

static void tfp410_set_timings(struct omap_dss_device *dssdev,
			       const struct videomode *vm)
{
	struct omap_dss_device *src = dssdev->src;

	src->ops->set_timings(src, vm);
}

static const struct omap_dss_device_ops tfp410_ops = {
	.connect	= tfp410_connect,
	.disconnect	= tfp410_disconnect,
	.enable		= tfp410_enable,
	.disable	= tfp410_disable,
	.set_timings	= tfp410_set_timings,
};

static int tfp410_probe(struct platform_device *pdev)
Loading