video: rockchip: hdmi: fix compile warning
authorZheng Yang <zhengyang@rock-chips.com>
Tue, 10 May 2016 03:09:35 +0000 (11:09 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Tue, 10 May 2016 10:27:08 +0000 (18:27 +0800)
Change-Id: I3573f4d42074b656420cc5567d73e660232f2b84
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
drivers/video/rockchip/hdmi/rockchip-hdmi-edid.c
drivers/video/rockchip/hdmi/rockchip-hdmi-lcdc.c
drivers/video/rockchip/hdmi/rockchip-hdmiv1/rockchip_hdmiv1_hw.c
drivers/video/rockchip/hdmi/rockchip-hdmiv2/rockchip_hdmiv2_hw.c
drivers/video/rockchip/hdmi/rockchip-hdmiv2/rockchip_hdmiv2_hw.h

index 6ce7171bf45a700d7d2a873693768b568d50400f..33b007148d86c1f9c74a5e8c1e8c8feb1c1d0dcb 100644 (file)
@@ -339,7 +339,7 @@ static void hdmi_edid_parse_yuv420cmdb(unsigned char *buf, int count,
 {
        struct list_head *pos;
        struct display_modelist *modelist;
-       int i, j, yuv420_mask, vic;
+       int i, j, yuv420_mask = 0, vic;
 
        for (i = 0; i < count - 1; i++) {
                EDBG("vic which support yuv420 mode is %x\n", buf[i]);
index 3fb7d689d66a48e004e397eb27fd53d86269f323..db6d0a4b6f31daf871b4fd9ecc886a5b425fe637 100644 (file)
@@ -882,7 +882,7 @@ static int hdmi_set_info(struct rk_screen *screen, struct hdmi *hdmi)
 int hdmi_find_best_mode(struct hdmi *hdmi, int vic)
 {
        struct list_head *pos, *head = &hdmi->edid.modelist;
-       struct display_modelist *modelist;
+       struct display_modelist *modelist = NULL;
        int found = 0;
 
        if (vic) {
index ac87b3c9ff56bbff6e8eff6958a897bc021bbd24..714f2789ba6537368822afc32a8970d1e3ec946b 100644 (file)
@@ -514,7 +514,8 @@ static void rockchip_hdmiv1_config_avi(struct hdmi *hdmi_drv,
                avi_color_mode = AVI_COLOR_MODE_YCBCR444;
        else if (output_color == HDMI_COLOR_YCBCR422)
                avi_color_mode = AVI_COLOR_MODE_YCBCR422;
-
+       else
+               avi_color_mode = HDMI_COLOR_RGB_0_255;
        info[4] = (avi_color_mode << 5);
        info[5] =
            (AVI_COLORIMETRY_NO_DATA << 6) |
index 3fdf25e53df4829d5b5ea98620a8e3cb25a7e301..ac77022baf8326cb069f8d9f2ea08f53e94c3ddd 100755 (executable)
@@ -159,7 +159,7 @@ static void rockchip_hdmiv2_i2cm_read_request(struct hdmi_dev *hdmi_dev,
 static void rockchip_hdmiv2_i2cm_write_data(struct hdmi_dev *hdmi_dev,
                                            u8 data, u8 offset)
 {
-       u8 interrupt;
+       u8 interrupt = 0;
        int trytime = 2;
        int i = 20;
 
@@ -192,7 +192,7 @@ static void rockchip_hdmiv2_i2cm_write_data(struct hdmi_dev *hdmi_dev,
 
 static int rockchip_hdmiv2_i2cm_read_data(struct hdmi_dev *hdmi_dev, u8 offset)
 {
-       u8 interrupt, val;
+       u8 interrupt = 0, val;
        int trytime = 2;
        int i = 20;
 
@@ -1215,6 +1215,11 @@ static const char coeff_csc[][24] = {
                 *   B1    |    B2     |    B3     |    B4    |
                 *   C1    |    C2     |    C3     |    C4    |
                 */
+       {       /* CSC_BYPASS */
+               0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+               0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+               0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
+       },
        {       /* CSC_RGB_0_255_TO_RGB_16_235_8BIT */
                0x36, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,         /*G*/
                0x00, 0x00, 0x36, 0xf7, 0x00, 0x00, 0x00, 0x40,         /*R*/
@@ -1261,7 +1266,7 @@ static const char coeff_csc[][24] = {
 static int rockchip_hdmiv2_video_csc(struct hdmi_dev *hdmi_dev,
                                     struct hdmi_video *vpara)
 {
-       int i, mode, interpolation, decimation, csc_scale;
+       int i, mode, interpolation, decimation, csc_scale = 0;
        const char *coeff = NULL;
        unsigned char color_depth = 0;
 
@@ -1287,6 +1292,9 @@ static int rockchip_hdmiv2_video_csc(struct hdmi_dev *hdmi_dev,
                             m_CSC_DECIMODE, v_CSC_DECIMODE(decimation));
        }
 
+       mode = CSC_BYPASS;
+       csc_scale = 0;
+
        switch (vpara->vic) {
        case HDMI_720X480I_60HZ_4_3:
        case HDMI_720X576I_50HZ_4_3:
@@ -1455,7 +1463,7 @@ exit:
 static void hdmi_dev_config_avi(struct hdmi_dev *hdmi_dev,
                                struct hdmi_video *vpara)
 {
-       unsigned char colorimetry, ext_colorimetry, aspect_ratio, y1y0;
+       unsigned char colorimetry, ext_colorimetry = 0, aspect_ratio, y1y0;
        unsigned char rgb_quan_range = AVI_QUANTIZATION_RANGE_DEFAULT;
 
        hdmi_msk_reg(hdmi_dev, FC_DATAUTO3, m_AVI_AUTO, v_AVI_AUTO(0));
@@ -1505,7 +1513,6 @@ static void hdmi_dev_config_avi(struct hdmi_dev *hdmi_dev,
        } else if (vpara->color_output == HDMI_COLOR_RGB_16_235 ||
                 vpara->color_output == HDMI_COLOR_RGB_0_255) {
                colorimetry = AVI_COLORIMETRY_NO_DATA;
-               ext_colorimetry = 0;
        } else if (vpara->colorimetry != HDMI_COLORIMETRY_NO_DATA) {
                colorimetry = vpara->colorimetry;
        }
index af3b834215f1e15660641ea028f7e0c277edadc1..37a015b851c873c11e6c4a83d9a44d625e8ab24a 100644 (file)
@@ -17,6 +17,7 @@ enum {
 
 /* Color Space Conversion Mode */
 enum {
+       CSC_BYPASS,
        CSC_RGB_0_255_TO_RGB_16_235_8BIT,       /* RGB 0-255 input to RGB
                                                 * 16-235 output that is 8bit
                                                 * clolor depth