From 23d2f03ceae709e9a6975a77d426b7593dd2db63 Mon Sep 17 00:00:00 2001 From: Zheng Yang Date: Fri, 8 Jul 2016 10:29:54 +0800 Subject: [PATCH] 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) --- drivers/video/rockchip/hdmi/rockchip-hdmi-sysfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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, -- 2.34.1