video: rockchip: hdmi: fix current color mode and depth info
authorZheng Yang <zhengyang@rock-chips.com>
Fri, 8 Jul 2016 02:29:54 +0000 (10:29 +0800)
committerZheng Yang <zhengyang@rock-chips.com>
Wed, 13 Jul 2016 06:33:53 +0000 (14:33 +0800)
If current color mode and depth is auto, information in sysfs
node is equal to zero, is not responsed to actual mode and
depth, now fix it.

Change-Id: Ifd2888b2af5522a026be92071d98d6bc081d02db
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit c2cac5c2cff8464ab4ba2c2638a84d997aa0365e)

drivers/video/rockchip/hdmi/rockchip-hdmi-sysfs.c

index 94812c17c51ab9639048d7c3f28597ef0410b958..5b4831332f39e04dd75309d44fdb0a644d47ccd5 100644 (file)
@@ -196,7 +196,7 @@ static int hdmi_get_color(struct rk_display_device *device, char *buf)
        i = snprintf(buf, PAGE_SIZE,
                     "Supported Color Mode: %d\n", mode);
        i += snprintf(buf + i, PAGE_SIZE - i,
-                     "Current Color Mode: %d\n", hdmi->colormode);
+                     "Current Color Mode: %d\n", hdmi->video.color_output);
 
        mode = (1 << 1); /* 24 bit*/
        if (hdmi->edid.deepcolor & HDMI_DEEP_COLOR_30BITS &&
@@ -211,7 +211,8 @@ static int hdmi_get_color(struct rk_display_device *device, char *buf)
        i += snprintf(buf + i, PAGE_SIZE - i,
                      "Supported Color Depth: %d\n", mode);
        i += snprintf(buf + i, PAGE_SIZE - i,
-                     "Current Color Depth: %d\n", hdmi->colordepth);
+                     "Current Color Depth: %d\n",
+                     hdmi->video.color_output_depth);
        i += snprintf(buf + i, PAGE_SIZE - i,
                      "Supported Colorimetry: %d\n", hdmi->edid.colorimetry);
        i += snprintf(buf + i, PAGE_SIZE - i,