From: Zheng Yang Date: Thu, 2 Mar 2017 08:20:00 +0000 (+0800) Subject: drm: bridge/dw_hdmi: fix avi colorspace and scan_mode X-Git-Tag: firefly_0821_release~490 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fb88e18a5260f4fe5cd3bcf40a4fc8ec42a2cb87;p=firefly-linux-kernel-4.4.55.git drm: bridge/dw_hdmi: fix avi colorspace and scan_mode According to the dw-hdmi spec, colorspace in bits 0,1,7, scan_mode in bits 4,5. Change-Id: I45233316ea7d5ce75d3844c183654f161cbf505e Signed-off-by: Zheng Yang --- diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c index 50001c6fba6f..183c2ab521a6 100644 --- a/drivers/gpu/drm/bridge/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/dw-hdmi.c @@ -1288,10 +1288,10 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode) */ /* - * AVI data byte 1 differences: Colorspace in bits 4,5 rather than 5,6, - * active aspect present in bit 6 rather than 4. + * AVI data byte 1 differences: Colorspace in bits 0,1,7 rather than + * 5,6,7, active aspect present in bit 6 rather than 4. */ - val = (frame.colorspace & 3) << 4 | (frame.scan_mode & 0x3); + val = (frame.scan_mode & 3) << 4 | (frame.colorspace & 0x3); if (frame.active_aspect & 15) val |= HDMI_FC_AVICONF0_ACTIVE_FMT_INFO_PRESENT; if (frame.top_bar || frame.bottom_bar)