Skip to content

Commit

Permalink
video: sunxi: fix regression with RGB only monitor
Browse files Browse the repository at this point in the history
fixes #92, purple colors when using DVI monitor.

Regression is noticed when monitor doesn't support YCbCr colorspace.
This patch is workaround.
To fix this properly, Colorspace must be set according EDID information

Reviewed-by: Luc Verhaegen <libv@skynet.be>
  • Loading branch information
techn authored and amery committed Nov 1, 2012
1 parent 0294e5b commit c085c41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/video/sunxi/disp/disp_de.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ __s32 BSP_disp_set_output_csc(__u32 sel, __disp_output_type_t type)
__s32 value = 0;

out_color_range = DISP_COLOR_RANGE_16_255;
#ifdef YUV_COLORSPACE /* Fix me */
out_csc = DE_YUV_HDMI;
#endif

ret =
script_parser_fetch("disp_init", "screen0_out_color_range",
Expand Down
7 changes: 7 additions & 0 deletions drivers/video/sunxi/hdmi/hdmi_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,19 @@ __s32 video_config(__s32 vic)
HDMI_WUINT8(0x081, 0x02);
HDMI_WUINT8(0x082, 0x0d);
HDMI_WUINT8(0x083, 0x00);
#ifdef YUV_COLORSPACE /* Fix me */
/* 4:4:4 YCbCr */
HDMI_WUINT8(0x084, 0x50); /* Data Byte 1 */
if (video_timing[vic_tab].PCLK < 74250000) /* 4:3 601 */
HDMI_WUINT8(0x085, 0x58); /* Data Byte 2 */
else /* 16:9 709 */
HDMI_WUINT8(0x085, 0xa8); /* Data Byte 2 */
#else
/* RGB */
HDMI_WUINT8(0x084, 0x1E); /* Data Byte 1 */
/* 4:3 601 */
HDMI_WUINT8(0x085, 0x58); /* Data Byte 2 */
#endif

HDMI_WUINT8(0x086, 0x00);
HDMI_WUINT8(0x087, video_timing[vic_tab].VIC);
Expand Down

0 comments on commit c085c41

Please sign in to comment.