dpi_init_pll(dpi);
- r = dss_mgr_connect(dst);
- if (r)
- return r;
-
r = omapdss_device_connect(dst->dss, dst, dst->next);
- if (r) {
- dss_mgr_disconnect(dst);
+ if (r)
return r;
- }
dst->dispc_channel_connected = true;
return 0;
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next);
-
- dss_mgr_disconnect(dst);
}
static const struct omap_dss_device_ops dpi_ops = {
{
int r;
- r = dss_mgr_connect(dst);
- if (r)
- return r;
-
r = omapdss_device_connect(dst->dss, dst, dst->next);
- if (r) {
- dss_mgr_disconnect(dst);
+ if (r)
return r;
- }
dst->dispc_channel_connected = true;
return 0;
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next);
-
- dss_mgr_disconnect(dst);
}
static const struct omap_dss_device_ops dsi_ops = {
{
int r;
- r = dss_mgr_connect(dst);
- if (r)
- return r;
-
r = omapdss_device_connect(dst->dss, dst, dst->next);
- if (r) {
- dss_mgr_disconnect(dst);
+ if (r)
return r;
- }
dst->dispc_channel_connected = true;
return 0;
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next);
-
- dss_mgr_disconnect(dst);
}
static int hdmi_read_edid(struct omap_dss_device *dssdev,
{
int r;
- r = dss_mgr_connect(dst);
- if (r)
- return r;
-
r = omapdss_device_connect(dst->dss, dst, dst->next);
- if (r) {
- dss_mgr_disconnect(dst);
+ if (r)
return r;
- }
dst->dispc_channel_connected = true;
return 0;
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next);
-
- dss_mgr_disconnect(dst);
}
static int hdmi_read_edid(struct omap_dss_device *dssdev,
};
struct dss_mgr_ops {
- int (*connect)(struct omap_drm_private *priv,
- enum omap_channel channel,
- struct omap_dss_device *dst);
- void (*disconnect)(struct omap_drm_private *priv,
- enum omap_channel channel,
- struct omap_dss_device *dst);
-
void (*start_update)(struct omap_drm_private *priv,
enum omap_channel channel);
int (*enable)(struct omap_drm_private *priv,
struct omap_drm_private *priv);
void dss_uninstall_mgr_ops(struct dss_device *dss);
-int dss_mgr_connect(struct omap_dss_device *dssdev);
-void dss_mgr_disconnect(struct omap_dss_device *dssdev);
void dss_mgr_set_timings(struct omap_dss_device *dssdev,
const struct videomode *vm);
void dss_mgr_set_lcd_config(struct omap_dss_device *dssdev,
}
EXPORT_SYMBOL(dss_uninstall_mgr_ops);
-int dss_mgr_connect(struct omap_dss_device *dssdev)
-{
- return dssdev->dss->mgr_ops->connect(dssdev->dss->mgr_ops_priv,
- dssdev->dispc_channel, dssdev);
-}
-EXPORT_SYMBOL(dss_mgr_connect);
-
-void dss_mgr_disconnect(struct omap_dss_device *dssdev)
-{
- dssdev->dss->mgr_ops->disconnect(dssdev->dss->mgr_ops_priv,
- dssdev->dispc_channel, dssdev);
-}
-EXPORT_SYMBOL(dss_mgr_disconnect);
-
void dss_mgr_set_timings(struct omap_dss_device *dssdev,
const struct videomode *vm)
{
{
int r;
- r = dss_mgr_connect(dst);
- if (r)
- return r;
-
r = omapdss_device_connect(dst->dss, dst, dst->next);
- if (r) {
- dss_mgr_disconnect(dst);
+ if (r)
return r;
- }
dst->dispc_channel_connected = true;
return 0;
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next);
-
- dss_mgr_disconnect(dst);
}
static const struct omap_dss_device_ops sdi_ops = {
{
int r;
- r = dss_mgr_connect(dst);
- if (r)
- return r;
-
r = omapdss_device_connect(dst->dss, dst, dst->next);
- if (r) {
- dss_mgr_disconnect(dst);
+ if (r)
return r;
- }
dst->dispc_channel_connected = true;
return 0;
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next);
-
- dss_mgr_disconnect(dst);
}
static const struct omap_dss_device_ops venc_ops = {
*/
/* we can probably ignore these until we support command-mode panels: */
-static int omap_crtc_dss_connect(struct omap_drm_private *priv,
- enum omap_channel channel,
- struct omap_dss_device *dst)
-{
- return 0;
-}
-
-static void omap_crtc_dss_disconnect(struct omap_drm_private *priv,
- enum omap_channel channel,
- struct omap_dss_device *dst)
-{
-}
-
static void omap_crtc_dss_start_update(struct omap_drm_private *priv,
enum omap_channel channel)
{
}
static const struct dss_mgr_ops mgr_ops = {
- .connect = omap_crtc_dss_connect,
- .disconnect = omap_crtc_dss_disconnect,
.start_update = omap_crtc_dss_start_update,
.enable = omap_crtc_dss_enable,
.disable = omap_crtc_dss_disable,