dev_dbg(dssdev->dev, "enable\n");
- if (!omapdss_device_is_connected(dssdev))
- return -ENODEV;
-
if (omapdss_device_is_enabled(dssdev))
return 0;
if (omapdss_device_is_enabled(dssdev))
opa362_disable(dssdev);
- WARN_ON(omapdss_device_is_connected(dssdev));
- if (omapdss_device_is_connected(dssdev))
- omapdss_device_disconnect(NULL, dssdev);
-
return 0;
}
struct omap_dss_device *src = dssdev->src;
int r;
- if (!omapdss_device_is_connected(dssdev))
- return -ENODEV;
-
if (omapdss_device_is_enabled(dssdev))
return 0;
if (omapdss_device_is_enabled(dssdev))
tfp410_disable(dssdev);
- WARN_ON(omapdss_device_is_connected(dssdev));
- if (omapdss_device_is_connected(dssdev))
- omapdss_device_disconnect(NULL, dssdev);
-
return 0;
}
if (omapdss_device_is_enabled(dssdev))
tpd_disable(dssdev);
- WARN_ON(omapdss_device_is_connected(dssdev));
- if (omapdss_device_is_connected(dssdev))
- omapdss_device_disconnect(NULL, dssdev);
-
return 0;
}
}
EXPORT_SYMBOL(omapdss_device_get_next);
+static bool omapdss_device_is_connected(struct omap_dss_device *dssdev)
+{
+ return dssdev->src;
+}
+
int omapdss_device_connect(struct dss_device *dss,
struct omap_dss_device *src,
struct omap_dss_device *dst)
int omapdss_compat_init(void);
void omapdss_compat_uninit(void);
-static inline bool omapdss_device_is_connected(struct omap_dss_device *dssdev)
-{
- return dssdev->src;
-}
-
static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev)
{
return dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
dev_dbg(dev->dev, "enable(%s)\n", dssdev->name);
- if (!omapdss_device_is_connected(dssdev)) {
- r = -ENODEV;
- goto error;
- }
-
if (omapdss_device_is_enabled(dssdev))
return;
r = dssdev->ops->enable(dssdev);
- if (r)
- goto error;
+ if (r) {
+ dev_err(dev->dev, "Failed to enable display '%s': %d\n",
+ dssdev->name, r);
+ return;
+ }
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
- return;
-
-error:
- dev_err(dev->dev, "Failed to enable display '%s': %d\n",
- dssdev->name, r);
}
static int omap_encoder_atomic_check(struct drm_encoder *encoder,