From 17b27478ccdb5b6883032031b83f5cd2ce5f8cf9 Mon Sep 17 00:00:00 2001 From: Tomasz Stanislawski Date: Thu, 25 Aug 2011 12:45:22 -0300 Subject: [PATCH] [media] s5p-tv: hdmi: use DVI mode Current version of the driver does not support HDMI features not present in DVI standard. Therefore DVI mode is used to keep compatibility with DVI devices. Signed-off-by: Tomasz Stanislawski Signed-off-by: Kyungmin Park Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/s5p-tv/hdmi_drv.c | 11 ++++------- drivers/media/video/s5p-tv/regs-hdmi.h | 4 ++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/media/video/s5p-tv/hdmi_drv.c b/drivers/media/video/s5p-tv/hdmi_drv.c index 06d6663f4594..e1b29b488f6c 100644 --- a/drivers/media/video/s5p-tv/hdmi_drv.c +++ b/drivers/media/video/s5p-tv/hdmi_drv.c @@ -210,20 +210,17 @@ static void hdmi_reg_init(struct hdmi_device *hdev) /* enable HPD interrupts */ hdmi_write_mask(hdev, HDMI_INTC_CON, ~0, HDMI_INTC_EN_GLOBAL | HDMI_INTC_EN_HPD_PLUG | HDMI_INTC_EN_HPD_UNPLUG); - /* choose HDMI mode */ + /* choose DVI mode */ hdmi_write_mask(hdev, HDMI_MODE_SEL, - HDMI_MODE_HDMI_EN, HDMI_MODE_MASK); + HDMI_MODE_DVI_EN, HDMI_MODE_MASK); + hdmi_write_mask(hdev, HDMI_CON_2, ~0, + HDMI_DVI_PERAMBLE_EN | HDMI_DVI_BAND_EN); /* disable bluescreen */ hdmi_write_mask(hdev, HDMI_CON_0, 0, HDMI_BLUE_SCR_EN); /* choose bluescreen (fecal) color */ hdmi_writeb(hdev, HDMI_BLUE_SCREEN_0, 0x12); hdmi_writeb(hdev, HDMI_BLUE_SCREEN_1, 0x34); hdmi_writeb(hdev, HDMI_BLUE_SCREEN_2, 0x56); - /* enable AVI packet every vsync, fixes purple line problem */ - hdmi_writeb(hdev, HDMI_AVI_CON, 0x02); - /* force YUV444, look to CEA-861-D, table 7 for more detail */ - hdmi_writeb(hdev, HDMI_AVI_BYTE(0), 2 << 5); - hdmi_write_mask(hdev, HDMI_CON_1, 2, 3 << 5); } static void hdmi_timing_apply(struct hdmi_device *hdev, diff --git a/drivers/media/video/s5p-tv/regs-hdmi.h b/drivers/media/video/s5p-tv/regs-hdmi.h index ac93ad6f2bc3..33247d13e4c0 100644 --- a/drivers/media/video/s5p-tv/regs-hdmi.h +++ b/drivers/media/video/s5p-tv/regs-hdmi.h @@ -127,6 +127,10 @@ #define HDMI_BLUE_SCR_EN (1 << 5) #define HDMI_EN (1 << 0) +/* HDMI_CON_2 */ +#define HDMI_DVI_PERAMBLE_EN (1 << 5) +#define HDMI_DVI_BAND_EN (1 << 1) + /* HDMI_PHY_STATUS */ #define HDMI_PHY_STATUS_READY (1 << 0) -- 2.30.2