]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/kernel-video.git/commitdiff
OMAPDSS: HDMI: Add setmode support for android
authorDandawate Saket <dsaket@ti.com>
Sat, 27 Apr 2013 07:14:13 +0000 (00:14 -0700)
committerPraneeth Bajjuri <praneeth@ti.com>
Fri, 12 Jul 2013 23:58:14 +0000 (18:58 -0500)
Add support for set mode for android HWC adaptation

Change-Id: If21f6444df6f8b48c237088825eeb24944300199
Signed-off-by: Dandawate Saket <dsaket@ti.com>
Conflicts:
drivers/video/omap2/dss/dss.h

drivers/video/omap2/dss/dss.h [changed mode: 0644->0755]
drivers/video/omap2/dss/hdmi.c
drivers/video/omap2/dss/hdmi_panel.c [changed mode: 0644->0755]
drivers/video/omap2/dss/ti_hdmi.h

old mode 100644 (file)
new mode 100755 (executable)
index c5f1f19..3c3df51
@@ -500,6 +500,8 @@ int omapdss_hdmi_display_3d_enable(struct omap_dss_device *dssdev,
                                        struct s3d_disp_info *info, int code);
 void sel_i2c(void);
 void sel_hdmi(void);
+int omapdss_hdmi_display_set_mode(struct omap_dss_device *dssdev,
+                                       struct fb_videomode *mode);
 int hdmi_panel_init(void);
 void hdmi_panel_exit(void);
 #if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) || \
index a789eca08a193fb82382b1d3e508c622b6917292..e430175689a224b199c7b5a6280dbc501970ed5f 100755 (executable)
@@ -61,6 +61,9 @@ static struct {
        defined(CONFIG_OMAP5_DSS_HDMI_AUDIO)
        struct platform_device *audio_pdev;
 #endif
+       int code;
+       int mode;
+       bool custom_set;
 
        struct hdmi_ip_data ip_data;
        int hdmi_irq;
@@ -936,6 +939,22 @@ int omapdss_hdmi_display_check_timing(struct omap_dss_device *dssdev,
 
 }
 
+int omapdss_hdmi_display_set_mode(struct omap_dss_device *dssdev,
+                                 struct fb_videomode *vm)
+{
+       int r1, r2;
+       /* turn the hdmi off and on to get new timings to use */
+       hdmi.ip_data.set_mode = true;
+       dssdev->driver->disable(dssdev);
+       hdmi.ip_data.set_mode = false;
+       r1 = hdmi_set_timings(vm, false) ? 0 : -EINVAL;
+       hdmi.custom_set = true;
+       hdmi.code = hdmi.ip_data.cfg.cm.code;
+       hdmi.mode = hdmi.ip_data.cfg.cm.mode;
+       r2 = dssdev->driver->enable(dssdev);
+       return r1 ? : r2;
+}
+
 int omapdss_hdmi_display_3d_enable(struct omap_dss_device *dssdev,
                                        struct s3d_disp_info *info, int code)
 {
old mode 100644 (file)
new mode 100755 (executable)
index 95090f2..236bb61
@@ -505,6 +505,7 @@ static struct omap_dss_driver hdmi_driver = {
        .set_timings    = hdmi_set_timings,
        .check_timings  = hdmi_check_timings,
        .read_edid      = hdmi_read_edid,
+       .set_mode       = omapdss_hdmi_display_set_mode,
        .detect         = hdmi_detect,
        .audio_enable   = hdmi_panel_audio_enable,
        .audio_disable  = hdmi_panel_audio_disable,
index ee28928f08431996aac44d4c60ceb5cf42316921..4051e016b709af502ebf8c2007aac71468c11281 100755 (executable)
@@ -246,6 +246,7 @@ struct hdmi_ip_data {
        /* ti_hdmi_4xxx_ip private data. These should be in a separate struct */
        int hpd_gpio;
        struct mutex lock;
+       bool set_mode;
 };
 int ti_hdmi_4xxx_phy_enable(struct hdmi_ip_data *ip_data);
 void ti_hdmi_4xxx_phy_disable(struct hdmi_ip_data *ip_data);