Skip to contentSkip to conversation

drm/exynos: restore core HDMI settings

PATCH In review Shirish S 3 participants 4 messages Feb 14, 2014 – May 16, 2014

Subsystems (3)
lore
Share & tools
lore

Shirish S

author
#0 lore raw

PATCH 1/1 drm/exynos: restore core HDMI settings

In DVI mode the video preamble and Guard band should be disabled whereas it should be applied in HDMI mode, the re-applying of preamble and guard band was missing, which resulted in display failures when switched to HDMI mode from DVI mode.
This patch ensures the setting is applied in HDMI mode.

---
 drivers/gpu/drm/exynos/exynos_hdmi.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/exynos/exynos_hdmi.c +2 -0
index a0e10ae..a102076 100644
@@ -994,6 +994,8 @@ static void hdmi_conf_init(struct hdmi_context *hdata)
 	/* choose HDMI mode */
 	hdmi_reg_writemask(hdata, HDMI_MODE_SEL,
 		HDMI_MODE_HDMI_EN, HDMI_MODE_MASK);
+	/* Apply Video preable and Guard band in HDMI mode only */
+	hdmi_reg_writeb(hdata, HDMI_CON_2, 0);
 	/* disable bluescreen */
 	hdmi_reg_writemask(hdata, HDMI_CON_0, 0, HDMI_BLUE_SCR_EN);
 
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw

2014-02-14 16:34 GMT+09:00 Shirish S <[email protected]>:

Quoted 17 lines

In DVI mode the video preamble and Guard band should be disabled whereas it should be applied in HDMI mode, the re-applying of preamble and guard band was missing, which resulted in display failures when switched to HDMI mode from DVI mode.
This patch ensures the setting is applied in HDMI mode.

---
 drivers/gpu/drm/exynos/exynos_hdmi.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/exynos/exynos_hdmi.c +0 -0
index a0e10ae..a102076 100644

drivers/gpu/drm/exynos/exynos_hdmi.c static void hdmi_conf_init(struct hdmi_context *hdata) · line 998

Quoted 5 lines
drivers/gpu/drm/exynos/exynos_hdmi.c +2 -0
@@ -994,6 +994,8 @@ static void hdmi_conf_init(struct hdmi_context *hdata)
        /* choose HDMI mode */
        hdmi_reg_writemask(hdata, HDMI_MODE_SEL,
                HDMI_MODE_HDMI_EN, HDMI_MODE_MASK);
+       /* Apply Video preable and Guard band in HDMI mode only */
+       hdmi_reg_writeb(hdata, HDMI_CON_2, 0);

Isn't hdmi_conf_init function always called after hdmi core is reset? And HDMI_CON_2 would have 0 as reset value. It seems that your code isn't meaningful.

If you want to set HDMI_CON_2 to HDMI mode in there then it would better to use meaningful macro, HDMI_VID_PREAMBLE_DIS and HDMI_GUARD_BAND_DIS.

Thanks,
Inki Dae

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_hdmi.c +0 -1
        /* disable bluescreen */
        hdmi_reg_writemask(hdata, HDMI_CON_0, 0, HDMI_BLUE_SCR_EN);
 
--

1.7.9.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

Hi,

Quoted 13 lines · Inki Dae

2014-02-14 16:34 GMT+09:00 Shirish S <[email protected]>:

Quoted 12 lines

In DVI mode the video preamble and Guard band should be disabled whereas it should be applied in HDMI mode, the re-applying of preamble and guard band was missing, which resulted in display failures when switched to HDMI mode from DVI mode.
This patch ensures the setting is applied in HDMI mode.

---
 drivers/gpu/drm/exynos/exynos_hdmi.c |    2 ++
 1 file changed, 2 insertions(+)
Quoted 15 lines

drivers/gpu/drm/exynos/exynos_hdmi.c static void hdmi_conf_init(struct hdmi_context *hdata) · line 998

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_hdmi.c +2 -0
index a0e10ae..a102076 100644
@@ -994,6 +994,8 @@ static void hdmi_conf_init(struct hdmi_context *hdata)
        /* choose HDMI mode */
        hdmi_reg_writemask(hdata, HDMI_MODE_SEL,
                HDMI_MODE_HDMI_EN, HDMI_MODE_MASK);
+       /* Apply Video preable and Guard band in HDMI mode only */
+       hdmi_reg_writeb(hdata, HDMI_CON_2, 0);

Isn't hdmi_conf_init function always called after hdmi core is reset? And HDMI_CON_2 would have 0 as reset value. It seems that your code isn't meaningful.

Now that rahul's patch of "drm/exynos: replace hdmi reset with hdmi disable" which removes hdmi core reset is merged in your tree,
my patch is required since if the user
connects HDMI monitor via DVI connector,
unplugs and then connects to HDMI TV via HDMI cable, it wont work as the settings of DVI are still on and not reset-ted.
Can you kindly apply this patch?

Quoted 13 lines

If you want to set HDMI_CON_2 to HDMI mode in there then it would better to use meaningful macro, HDMI_VID_PREAMBLE_DIS and HDMI_GUARD_BAND_DIS.

Thanks,
Inki Dae

Quoted 6 lines
drivers/gpu/drm/exynos/exynos_hdmi.c +0 -1
        /* disable bluescreen */
        hdmi_reg_writemask(hdata, HDMI_CON_0, 0, HDMI_BLUE_SCR_EN);
 
--

1.7.9.5

Quoted 8 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Thanks & Regards,
Shirish S

maintainer
#3 lore raw
Quoted 31 lines · Shirish S

Hi,

Quoted 13 lines · Inki Dae

2014-02-14 16:34 GMT+09:00 Shirish S <[email protected]>:

Quoted 12 lines

In DVI mode the video preamble and Guard band should be disabled whereas it should be applied in HDMI mode, the re-applying of preamble and guard band was missing, which resulted in display failures when switched to HDMI mode from DVI mode.
This patch ensures the setting is applied in HDMI mode.

---
 drivers/gpu/drm/exynos/exynos_hdmi.c |    2 ++
 1 file changed, 2 insertions(+)
Quoted 15 lines

drivers/gpu/drm/exynos/exynos_hdmi.c static void hdmi_conf_init(struct hdmi_context *hdata) · line 998

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_hdmi.c +2 -0
index a0e10ae..a102076 100644
@@ -994,6 +994,8 @@ static void hdmi_conf_init(struct hdmi_context *hdata)
        /* choose HDMI mode */
        hdmi_reg_writemask(hdata, HDMI_MODE_SEL,
                HDMI_MODE_HDMI_EN, HDMI_MODE_MASK);
+       /* Apply Video preable and Guard band in HDMI mode only */
+       hdmi_reg_writeb(hdata, HDMI_CON_2, 0);

Isn't hdmi_conf_init function always called after hdmi core is reset? And HDMI_CON_2 would have 0 as reset value. It seems that your code isn't meaningful.

Quoted 8 lines

Now that rahul's patch of "drm/exynos: replace hdmi reset with hdmi disable" which removes hdmi core reset is merged in your tree,
my patch is required since if the user
connects HDMI monitor via DVI connector,
unplugs and then connects to HDMI TV via HDMI cable, it wont work as the settings of DVI are still on and not reset-ted.
Can you kindly apply this patch?

Thanks for the report. Applied.

Thanks,
Inki Dae

Quoted 17 lines
Quoted 17 lines

If you want to set HDMI_CON_2 to HDMI mode in there then it would better to use meaningful macro, HDMI_VID_PREAMBLE_DIS and HDMI_GUARD_BAND_DIS.

Thanks,
Inki Dae

Quoted 10 lines
drivers/gpu/drm/exynos/exynos_hdmi.c +0 -1
        /* disable bluescreen */
        hdmi_reg_writemask(hdata, HDMI_CON_0, 0, HDMI_BLUE_SCR_EN);
 
--

1.7.9.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Quoted 8 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Thanks & Regards,
Shirish S

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel