drm/omap: dss: Move display type validation to initialization time
The display type is validated when the display is connected to the DSS output. We already have all the information we need for validation when initializing the outputs. Move validation to output initialization to simplify pipeline connection handling. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:

committed by
Tomi Valkeinen

parent
79ddb2f0c3
commit
713165561b
@@ -437,24 +437,13 @@ static int hdmi_connect(struct omap_dss_device *src,
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
r = omapdss_output_set_device(dst, dst->next);
|
||||
r = omapdss_device_connect(dst->dss, dst, dst->next);
|
||||
if (r) {
|
||||
DSSERR("failed to connect output to new device: %s\n",
|
||||
dst->name);
|
||||
goto err_mgr_disconnect;
|
||||
dss_mgr_disconnect(dst);
|
||||
return r;
|
||||
}
|
||||
|
||||
r = omapdss_device_connect(dst->dss, dst, dst->next);
|
||||
if (r)
|
||||
goto err_output_unset;
|
||||
|
||||
return 0;
|
||||
|
||||
err_output_unset:
|
||||
omapdss_output_unset_device(dst);
|
||||
err_mgr_disconnect:
|
||||
dss_mgr_disconnect(dst);
|
||||
return r;
|
||||
}
|
||||
|
||||
static void hdmi_disconnect(struct omap_dss_device *src,
|
||||
@@ -717,6 +706,7 @@ static const struct component_ops hdmi4_component_ops = {
|
||||
static int hdmi4_init_output(struct omap_hdmi *hdmi)
|
||||
{
|
||||
struct omap_dss_device *out = &hdmi->output;
|
||||
int r;
|
||||
|
||||
out->dev = &hdmi->pdev->dev;
|
||||
out->id = OMAP_DSS_OUTPUT_HDMI;
|
||||
@@ -734,6 +724,13 @@ static int hdmi4_init_output(struct omap_hdmi *hdmi)
|
||||
return PTR_ERR(out->next);
|
||||
}
|
||||
|
||||
r = omapdss_output_validate(out);
|
||||
if (r) {
|
||||
omapdss_device_put(out->next);
|
||||
out->next = NULL;
|
||||
return r;
|
||||
}
|
||||
|
||||
omapdss_device_register(out);
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user