OMAP: DSS2: Create enum for DSI operation modes
authorArchit Taneja <archit@ti.com>
Fri, 22 Jul 2011 07:15:04 +0000 (12:45 +0530)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 30 Sep 2011 13:16:26 +0000 (16:16 +0300)
Create an enum for DSI operation modes, use this to set the capabilities of the
device in dsi_init_display().

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dsi.c
include/video/omapdss.h

index bdc2c9d25784be94ce36bc991b13716613a2d73a..d3bffe8b2a38bd1ecd9a419c894da676f6e2342b 100644 (file)
@@ -4123,9 +4123,10 @@ int dsi_init_display(struct omap_dss_device *dssdev)
 
        DSSDBG("DSI init\n");
 
-       /* XXX these should be figured out dynamically */
-       dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE |
-               OMAP_DSS_DISPLAY_CAP_TEAR_ELIM;
+       if (dssdev->panel.dsi_mode == OMAP_DSS_DSI_CMD_MODE) {
+               dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE |
+                       OMAP_DSS_DISPLAY_CAP_TEAR_ELIM;
+       }
 
        if (dsi->vdds_dsi_reg == NULL) {
                struct regulator *vdds_dsi;
index ddd5bd06b78565f5f074d95bb8ff87f901b2164c..aeadbc880e38848d46e78fa84dc374f6156d14a1 100644 (file)
@@ -129,6 +129,11 @@ enum omap_dss_venc_type {
        OMAP_DSS_VENC_TYPE_SVIDEO,
 };
 
+enum omap_dss_dsi_mode {
+       OMAP_DSS_DSI_CMD_MODE = 0,
+       OMAP_DSS_DSI_VIDEO_MODE,
+};
+
 enum omap_display_caps {
        OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE      = 1 << 0,
        OMAP_DSS_DISPLAY_CAP_TEAR_ELIM          = 1 << 1,
@@ -480,6 +485,8 @@ struct omap_dss_device {
                int acb;        /* ac-bias pin frequency */
 
                enum omap_panel_config config;
+
+               enum omap_dss_dsi_mode dsi_mode;
        } panel;
 
        struct {