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 <zhengyang@rock-chips.com>
(cherry picked from commit c2cac5c2cff8464ab4ba2c2638a84d997aa0365e)
This commit is contained in:
Zheng Yang
2016-07-08 10:29:54 +08:00
parent 388e671007
commit 23d2f03cea

View 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,