drm/bridge: synopsys: dw-hdmi: Fix yuv422 display err

When switching from another color to yuv422, neither
encoder input color nor encoder output color is rgb.
CSC coeff will be incorrectly selected as
csc_coeff_full_to_limited, which causes the display
turn to green. To solve this problem, choose
csc_coeff_full_to_limited only if the input and output
colors are both RGB.

Change-Id: I080e18eb8fcca975cd0e6c46d2ed9e7513a26609
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao
2019-07-09 09:10:04 +08:00
committed by Tao Huang
parent 40a0602d52
commit 1992cb6966

View File

@@ -1088,7 +1088,7 @@ static void dw_hdmi_update_csc_coeffs(struct dw_hdmi *hdmi)
enc_in_rgb = hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_in_bus_format);
if (is_color_space_conversion(hdmi)) {
if (enc_out_rgb == enc_in_rgb) {
if (enc_out_rgb && enc_in_rgb) {
csc_coeff = &csc_coeff_full_to_limited;
csc_scale = 0;
} else if (enc_out_rgb) {