Use following command:
echo mode=<value> > /sys/class/display/HDMI/mode
<value> is decimal digits, lower 8bit is color mode, upper 8bit is depth.
For example:
value = 131 = 0x83 means YCbCr444 8bit output
value = 164 = 0xa4 means YCbCr422 10bit output
value = 0 means restore auto mode(8bit, priority YCbCr444)
Change-Id: I256906d91f7075defb4d785cfc15926ca5627093
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit
c3620a88e55c3ade4a823adea08b0bb2acc4737e)
}
if ((hdmi->property->feature & SUPPORT_DEEP_10BIT) &&
(deepcolor & HDMI_DEEP_COLOR_30BITS) &&
}
if ((hdmi->property->feature & SUPPORT_DEEP_10BIT) &&
(deepcolor & HDMI_DEEP_COLOR_30BITS) &&
- (hdmi->colordepth == HDMI_DEPP_COLOR_AUTO ||
- hdmi->colordepth == 10))
+ hdmi->colordepth == 10)
video->color_output_depth = 10;
}
pr_info("hdmi output corlor mode is %d\n", video->color_output);
video->color_output_depth = 10;
}
pr_info("hdmi output corlor mode is %d\n", video->color_output);
if (!strncmp(buf, "mode", 4)) {
if (sscanf(buf, "mode=%d", &value) == -1)
return -1;
if (!strncmp(buf, "mode", 4)) {
if (sscanf(buf, "mode=%d", &value) == -1)
return -1;
- pr_debug("current mode is %d input mode is %d\n",
+ pr_debug("current mode is %d input mode is %x\n",
- if (hdmi->colormode != value)
- hdmi->colormode = value;
+ if (hdmi->colormode != (value & 0xff))
+ hdmi->colormode = value & 0xff;
+ if (hdmi->colordepth != ((value >> 8) & 0xff)) {
+ pr_debug("current depth is %d input mode is %d\n",
+ hdmi->colordepth, ((value >> 8) & 0xff));
+ hdmi->colordepth = ((value >> 8) & 0xff);
+ }
} else if (!strncmp(buf, "depth", 5)) {
if (sscanf(buf, "depth=%d", &value) == -1)
return -1;
} else if (!strncmp(buf, "depth", 5)) {
if (sscanf(buf, "depth=%d", &value) == -1)
return -1;