From: Zheng Yang Date: Fri, 8 Jul 2016 02:29:54 +0000 (+0800) Subject: video: rockchip: hdmi: fix current color mode and depth info X-Git-Tag: firefly_0821_release~2169 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=23d2f03ceae709e9a6975a77d426b7593dd2db63;p=firefly-linux-kernel-4.4.55.git video: rockchip: hdmi: fix current color mode and depth info 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 (cherry picked from commit c2cac5c2cff8464ab4ba2c2638a84d997aa0365e) --- diff --git a/drivers/video/rockchip/hdmi/rockchip-hdmi-sysfs.c b/drivers/video/rockchip/hdmi/rockchip-hdmi-sysfs.c index 94812c17c51a..5b4831332f39 100644 --- a/drivers/video/rockchip/hdmi/rockchip-hdmi-sysfs.c +++ b/drivers/video/rockchip/hdmi/rockchip-hdmi-sysfs.c @@ -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,