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

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

drm/omap: dss: Merge two disconnection helpers



To simplify the pipeline disconnection handling merge the
omapdss_device_disconnect() and omapdss_output_unset_device() functions.
The device state check is now called for every device in the pipeline,
extending this sanity check coverage.

There is no need to return an error from omapdss_device_disconnect()
when the check fails, as omapdss_output_unset_device() used to do, given
that we can't prevent disconnection due to device unbinding (the return
value of omapdss_output_unset_device() is never checked in the current
code for that reason).

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 71316556
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -235,6 +235,8 @@ void omapdss_device_disconnect(struct omap_dss_device *src,
		src->dst = NULL;
	}

	WARN_ON(dst->state != OMAP_DSS_DISPLAY_DISABLED);

	if (dst->driver)
		dst->driver->disconnect(src, dst);
	else
+0 −1
Original line number Diff line number Diff line
@@ -633,7 +633,6 @@ static void dpi_disconnect(struct omap_dss_device *src,
			   struct omap_dss_device *dst)
{
	omapdss_device_disconnect(dst, dst->next);
	omapdss_output_unset_device(dst);

	dss_mgr_disconnect(dst);
}
+0 −1
Original line number Diff line number Diff line
@@ -4903,7 +4903,6 @@ static void dsi_disconnect(struct omap_dss_device *src,
			   struct omap_dss_device *dst)
{
	omapdss_device_disconnect(dst, dst->next);
	omapdss_output_unset_device(dst);

	dss_mgr_disconnect(dst);
}
+0 −1
Original line number Diff line number Diff line
@@ -450,7 +450,6 @@ static void hdmi_disconnect(struct omap_dss_device *src,
			    struct omap_dss_device *dst)
{
	omapdss_device_disconnect(dst, dst->next);
	omapdss_output_unset_device(dst);

	dss_mgr_disconnect(dst);
}
+0 −1
Original line number Diff line number Diff line
@@ -455,7 +455,6 @@ static void hdmi_disconnect(struct omap_dss_device *src,
			    struct omap_dss_device *dst)
{
	omapdss_device_disconnect(dst, dst->next);
	omapdss_output_unset_device(dst);

	dss_mgr_disconnect(dst);
}
Loading