Fix compilation warnings in OTM HDMI driver.
authorGandhimathi Anand <gandhimathi.anand@intel.com>
Tue, 14 Feb 2012 22:06:37 +0000 (14:06 -0800)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:09 +0000 (12:30 +0300)
Fixes multiple compilation warnings/sparse warnings in OTM HDMI driver.

OTM_HDMI: r2964

Signed-off-by: Arun Kannan <arun.kannan@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/drv/otm_hdmi/ipil/common/ipil_internal.h
drivers/staging/mrst/drv/otm_hdmi/ipil/include/hdmi_hal.h
drivers/staging/mrst/drv/otm_hdmi/os/android/android_hdmi.c
drivers/staging/mrst/drv/otm_hdmi/os/android/include/android_hdmi.h
drivers/staging/mrst/drv/otm_hdmi/pil/common/mode_info.c
drivers/staging/mrst/drv/otm_hdmi/pil/common/otm_hdmi.c
drivers/staging/mrst/drv/otm_hdmi/pil/include/otm_hdmi.h

index ad79512..90dfe01 100644 (file)
 #define IPIL_PFIT_SCALING_PILLARBOX    (1 << 27)
 #define IPIL_PFIT_SCALING_LETTERBOX    (3 << 26)
 
-#define IPIL_DPLL_VCO_ENABLE   (1 << 31)
 #define IPIL_PWR_GATE_EN       (1 << 30)
 #define IPIL_PIPECONF_PLL_LOCK (1<<29)
 #define IPIL_DSP_PLANE_PIPE_POS        24
index a753907..88541ba 100644 (file)
@@ -167,9 +167,6 @@ typedef struct {
                        unsigned int offset, /* Register offset */
                        unsigned int value); /* Value */
 
-       /* Pointer to delay routine */
-        /* Number of usec to sleep */
-       void (*usleep) (unsigned long usec);
 
        /* Pointer to the data that will be
         * passed to both io_read and io_write */
index 5dc4eff..a97b195 100644 (file)
@@ -289,6 +289,7 @@ gdl_ret_t android_hdmi_audio_control(void *context, bool flag)
 }
 #endif
 
+#ifdef OTM_HDMI_HDCP_ENABLE
 static int hdmi_ddc_read_write(bool read,
                        uint8_t i2c_addr,
                        uint8_t offset,
@@ -319,6 +320,7 @@ static int hdmi_ddc_read_write(bool read,
 
        return 0;
 }
+#endif
 
 #define android_hdmi_connector_funcs mdfld_hdmi_connector_funcs
 #define android_hdmi_connector_helper_funcs mdfld_hdmi_connector_helper_funcs
@@ -1122,15 +1124,17 @@ int android_hdmi_crtc_mode_set(struct drm_crtc *crtc,
        struct drm_framebuffer *fb;
        struct android_hdmi_priv *hdmi_priv;
        struct drm_mode_config *mode_config;
+#ifdef MFLD_HDMI_PR3
        struct psb_intel_output *psb_intel_output = NULL;
        struct drm_encoder *encoder;
        struct drm_connector *connector;
        uint64_t scalingType = DRM_MODE_SCALE_CENTER;
+#endif
        int pipe;
        otm_hdmi_timing_t otm_mode, otm_adjusted_mode;
        uint32_t clock_khz;
        int fb_width, fb_height;
-#ifndef MFLD_HDMI_PR3
+#if !defined(MFLD_HDMI_PR3) && !defined(MFLD_HDMI_DV1)
        u32 width_align, pipebstride;
 #endif
        pr_debug("%s E", __func__);
index 41d8479..61d9fb5 100644 (file)
@@ -446,4 +446,40 @@ static inline void android_hdmi_dpms(struct drm_encoder *encoder,
 
 #endif /* CONFIG_MDFD_HDMI */
 
+/*
+ * Description: hdmi helper function to parse cmdline option
+ *             from hdmicmd tool
+ *
+ * @cmdoption: cmdline option
+ *
+ * Returns:    error codes 0(success),-1(cmd option),-2(invalid input)
+ */
+int otm_cmdline_parse_option(char *cmdoption);
+
+/*
+ * Description: hdmi helper function to parse vic option
+ *             from hdmicmd tool
+ *
+ * @cmdoption: cmdline option
+ *
+ * Returns:    error codes 0(success),-1(error)
+ */
+int otm_cmdline_set_vic_option(int vic);
+
+/*
+ * Description: hdmi helper function to print cmdline options
+ *             from hdmicmd tool
+ *
+ * Returns:    none
+ */
+void otm_print_cmdline_option(void);
+
+/*
+ * Description: hdmi helper function to print edid information
+ *             from report_edid tool
+ *
+ * Returns:    none
+ */
+void test_otm_hdmi_report_edid_full(void);
+
 #endif /* __ANDROID_HDMI_H */
index fce6721..5674e3e 100644 (file)
@@ -60,7 +60,7 @@
 
 #include "hdmi_internal.h"
 #include "otm_hdmi_defs.h"
-
+#include "hdmi_timings.h"
 /*-----------------------------------------------------------------------------
                        480P TIMINGS
 -----------------------------------------------------------------------------*/
index cbdca02..cd6d0fb 100644 (file)
@@ -571,6 +571,7 @@ exit:
  *
  *     Returns - check otm_hdmi_ret_t
  */
+#ifdef OTM_HDMI_FIXME
 static otm_hdmi_ret_t __hdmi_phy_enable(void *context, bool status)
 {
        otm_hdmi_ret_t rc = OTM_HDMI_SUCCESS;
@@ -634,7 +635,6 @@ static otm_hdmi_ret_t __hdmi_enable(hdmi_context_t *ctx)
        rc = __hdmi_phy_enable(ctx, false);
        pr_debug("phy_enable returned with %d\n", rc);
 
-#ifdef OTM_HDMI_FIXME
        /* Setup and enable I2C subunit */
        rc = hdmi_i2c_reset_init_enable(ctx);
        if (rc != OTM_HDMI_SUCCESS)
@@ -649,7 +649,6 @@ static otm_hdmi_ret_t __hdmi_enable(hdmi_context_t *ctx)
        hdmi_general_audio_clock_enable(&ctx->dev);
        hdmi_general_hdcp_clock_enable(&ctx->dev);
        hdmi_general_5V_enable(&ctx->dev);
-#endif
 
 #ifdef SOC_HDCP_ENABLE
        hdmi_hdcp_disable(ctx);
@@ -658,6 +657,7 @@ static otm_hdmi_ret_t __hdmi_enable(hdmi_context_t *ctx)
 exit:
        return rc;
 }
+#endif /*OTM_HDMI_FIXME*/
 
 static void log_entry(void *uhandle, char *foo)
 {
@@ -719,7 +719,6 @@ static otm_hdmi_ret_t __hdmi_context_init(void *context, struct pci_dev *pdev)
                        (unsigned int)ctx->io_address);
 
        /* Initialize HAL; It's important that ALL entries are initialized!!! */
-       ctx->dev.usleep = 0;
        ctx->dev.log_entry = log_entry;
        ctx->dev.log_exit = log_exit;
        ctx->dev.poll_timer = &ctx->hal_timer;
index 406e018..1fbab29 100644 (file)
@@ -191,6 +191,9 @@ otm_hdmi_ret_t otm_hdmi_setup_irq(void *context, struct pci_dev *pdev,
 /* init hdmi device driver */
 otm_hdmi_ret_t otm_hdmi_device_init(void **context, struct pci_dev *pdev);
 
+/*deinit hdmi device driver */
+void otm_hdmi_deinit(void *context);
+
 /* read edid information */
 unsigned char *otm_hdmi_read_edid(void);
 
@@ -355,4 +358,13 @@ typedef enum {
 #define PD_SVBI               0x00000010 /* Software VBI supported timings    */
 #define PD_AR_16_BY_9         0x00000001 /* 16:9 aspect ratio                 */
 
+/*
+ * Description: report edid tool helper function
+ *
+ * Returns:    none
+ */
+#ifdef OTM_HDMI_UNIT_TEST
+void test_otm_hdmi_report_edid(void);
+#endif
+
 #endif /* _OTM_HDMI_H */