ipu_enable_channel(mxc_fbi->ipu, mxc_fbi->ipu_ch);
+ if (mxc_fbi->dispdrv && mxc_fbi->dispdrv->drv->enable) {
+ retval = mxc_fbi->dispdrv->drv->enable(mxc_fbi->dispdrv);
+ if (retval < 0) {
+ dev_err(fbi->device, "enable error, dispdrv:%s.\n",
+ mxc_fbi->dispdrv->drv->name);
+ return -EINVAL;
+ }
+ }
+
return retval;
}
struct i2c_client *hdmi_i2c;
+static bool hdmi_inited;
+
extern const struct fb_videomode mxc_cea_mode[64];
#ifdef DEBUG
dev_dbg(&hdmi->pdev->dev, "%s exit\n", __func__);
}
+static int mxc_hdmi_power_on(struct mxc_dispdrv_handle *disp)
+{
+ struct mxc_hdmi *hdmi = mxc_dispdrv_getdata(disp);
+ mxc_hdmi_phy_init(hdmi);
+ return 0;
+}
+
+static void mxc_hdmi_power_off(struct mxc_dispdrv_handle *disp)
+{
+ struct mxc_hdmi *hdmi = mxc_dispdrv_getdata(disp);
+ mxc_hdmi_phy_disable(hdmi);
+}
+
static void mxc_hdmi_cable_disconnected(struct mxc_hdmi *hdmi)
{
dev_dbg(&hdmi->pdev->dev, "%s\n", __func__);
dev_dbg(&hdmi->pdev->dev, "%s\n", __func__);
+ /* Check hdmi disp init once */
+ if (hdmi_inited) {
+ dev_err(&hdmi->pdev->dev,
+ "Error only one HDMI output support now!\n");
+ return -1;
+ }
+
if (!plat || irq < 0)
return -ENODEV;
dev_dbg(&hdmi->pdev->dev, "%s exit\n", __func__);
+ hdmi_inited = true;
+
return ret;
efbclient:
platform_device_unregister(hdmi->pdev);
+ hdmi_inited = false;
+
kfree(hdmi);
}
.name = DISPDRV_HDMI,
.init = mxc_hdmi_disp_init,
.deinit = mxc_hdmi_disp_deinit,
+ .enable = mxc_hdmi_power_on,
+ .disable = mxc_hdmi_power_off,
};
static int __devinit mxc_hdmi_probe(struct platform_device *pdev)
goto ecore;
}
+ hdmi_inited = false;
+
hdmi->disp_mxc_hdmi = mxc_dispdrv_register(&mxc_hdmi_drv);
if (IS_ERR(hdmi->disp_mxc_hdmi)) {
dev_err(&pdev->dev, "Failed to register dispdrv - 0x%x\n",