Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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



The .check_timings() operation is called recursively from the display
device back to the output device. Most components just forward the
operation to the previous component in the chain, resulting in lots of
duplicated pass-through functions. To avoid that, iterate over the
components manually.

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 b4935e3a
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -109,14 +109,6 @@ static void tvc_get_timings(struct omap_dss_device *dssdev,
	*vm = ddata->vm;
}

static int tvc_check_timings(struct omap_dss_device *dssdev,
			     struct videomode *vm)
{
	struct omap_dss_device *src = dssdev->src;

	return src->ops->check_timings(src, vm);
}

static const struct omap_dss_device_ops tvc_ops = {
	.connect		= tvc_connect,
	.disconnect		= tvc_disconnect,
@@ -126,7 +118,6 @@ static const struct omap_dss_device_ops tvc_ops = {

	.set_timings		= tvc_set_timings,
	.get_timings		= tvc_get_timings,
	.check_timings		= tvc_check_timings,
};

static int tvc_probe(struct platform_device *pdev)
+0 −9
Original line number Diff line number Diff line
@@ -116,14 +116,6 @@ static void dvic_get_timings(struct omap_dss_device *dssdev,
	*vm = ddata->vm;
}

static int dvic_check_timings(struct omap_dss_device *dssdev,
			      struct videomode *vm)
{
	struct omap_dss_device *src = dssdev->src;

	return src->ops->check_timings(src, vm);
}

static int dvic_ddc_read(struct i2c_adapter *adapter,
		unsigned char *buf, u16 count, u8 offset)
{
@@ -232,7 +224,6 @@ static const struct omap_dss_device_ops dvic_ops = {

	.set_timings	= dvic_set_timings,
	.get_timings	= dvic_get_timings,
	.check_timings	= dvic_check_timings,

	.read_edid	= dvic_read_edid,
	.detect		= dvic_detect,
+0 −9
Original line number Diff line number Diff line
@@ -114,14 +114,6 @@ static void hdmic_get_timings(struct omap_dss_device *dssdev,
	*vm = ddata->vm;
}

static int hdmic_check_timings(struct omap_dss_device *dssdev,
			       struct videomode *vm)
{
	struct omap_dss_device *src = dssdev->src;

	return src->ops->check_timings(src, vm);
}

static bool hdmic_detect(struct omap_dss_device *dssdev)
{
	struct panel_drv_data *ddata = to_panel_data(dssdev);
@@ -161,7 +153,6 @@ static const struct omap_dss_device_ops hdmic_ops = {

	.set_timings		= hdmic_set_timings,
	.get_timings		= hdmic_get_timings,
	.check_timings		= hdmic_check_timings,

	.detect			= hdmic_detect,
	.register_hpd_cb	= hdmic_register_hpd_cb,
+0 −11
Original line number Diff line number Diff line
@@ -95,22 +95,11 @@ static void opa362_set_timings(struct omap_dss_device *dssdev,
	src->ops->set_timings(src, vm);
}

static int opa362_check_timings(struct omap_dss_device *dssdev,
				struct videomode *vm)
{
	struct omap_dss_device *src = dssdev->src;

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

	return src->ops->check_timings(src, vm);
}

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,
};

+0 −9
Original line number Diff line number Diff line
@@ -84,20 +84,11 @@ static void tfp410_set_timings(struct omap_dss_device *dssdev,
	src->ops->set_timings(src, vm);
}

static int tfp410_check_timings(struct omap_dss_device *dssdev,
				struct videomode *vm)
{
	struct omap_dss_device *src = dssdev->src;

	return src->ops->check_timings(src, vm);
}

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,
};

Loading