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

drm/omap: Add infrastructure to support drm_bridge local to DSS outputs



In order to support drm_bridge-based pipeline, the internal HDMI
encoders will need to expose the EDID read operation through the
drm_bridge API, and thus to expose a drm_bridge instance corresponding
to the encoder. The HDMI encoders are however handled as omap_dss_device
instances, which conflicts with this requirement.

In order to move forward with the drm_bridge transition, add support for
creating drm_bridge instances local to DSS outputs. If a local bridge is
passed to the omapdss_device_init_output() function, it is used as the
first bridge in the chain, and the omap_dss_device.next_bridge field is
set to the next bridge for the use of the internal encoders' bridges.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Tested-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200226112514.12455-27-laurent.pinchart@ideasonboard.com
parent c83fefd7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -629,7 +629,7 @@ static int dpi_init_output_port(struct dpi_data *dpi, struct device_node *port)
	out->ops = &dpi_ops;
	out->owner = THIS_MODULE;

	r = omapdss_device_init_output(out);
	r = omapdss_device_init_output(out, NULL);
	if (r < 0)
		return r;

+1 −1
Original line number Diff line number Diff line
@@ -5121,7 +5121,7 @@ static int dsi_init_output(struct dsi_data *dsi)
		       | DRM_BUS_FLAG_DE_HIGH
		       | DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE;

	r = omapdss_device_init_output(out);
	r = omapdss_device_init_output(out, NULL);
	if (r < 0)
		return r;

+1 −1
Original line number Diff line number Diff line
@@ -676,7 +676,7 @@ static int hdmi4_init_output(struct omap_hdmi *hdmi)
	out->of_port = 0;
	out->ops_flags = OMAP_DSS_DEVICE_OP_EDID;

	r = omapdss_device_init_output(out);
	r = omapdss_device_init_output(out, NULL);
	if (r < 0)
		return r;

+1 −1
Original line number Diff line number Diff line
@@ -660,7 +660,7 @@ static int hdmi5_init_output(struct omap_hdmi *hdmi)
	out->of_port = 0;
	out->ops_flags = OMAP_DSS_DEVICE_OP_EDID;

	r = omapdss_device_init_output(out);
	r = omapdss_device_init_output(out, NULL);
	if (r < 0)
		return r;

+3 −1
Original line number Diff line number Diff line
@@ -400,6 +400,7 @@ struct omap_dss_device {
	struct dss_device *dss;
	struct omap_dss_device *next;
	struct drm_bridge *bridge;
	struct drm_bridge *next_bridge;
	struct drm_panel *panel;

	struct list_head list;
@@ -488,7 +489,8 @@ int omap_dss_get_num_overlays(void);
#define for_each_dss_output(d) \
	while ((d = omapdss_device_next_output(d)) != NULL)
struct omap_dss_device *omapdss_device_next_output(struct omap_dss_device *from);
int omapdss_device_init_output(struct omap_dss_device *out);
int omapdss_device_init_output(struct omap_dss_device *out,
			       struct drm_bridge *local_bridge);
void omapdss_device_cleanup_output(struct omap_dss_device *out);

typedef void (*omap_dispc_isr_t) (void *arg, u32 mask);
Loading