diff mbox

drm/exynos: restore core HDMI settings

Message ID 1392363297-15486-1-git-send-email-s.shirish@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shirish S Feb. 14, 2014, 7:34 a.m. UTC
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.

Signed-off-by: Shirish S <s.shirish@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Inki Dae Feb. 19, 2014, 10:32 a.m. UTC | #1
2014-02-14 16:34 GMT+09:00 Shirish S <s.shirish@samsung.com>:
> 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.
>
> Signed-off-by: Shirish S <s.shirish@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index a0e10ae..a102076 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -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

>         /* disable bluescreen */
>         hdmi_reg_writemask(hdata, HDMI_CON_0, 0, HDMI_BLUE_SCR_EN);
>
> --
> 1.7.9.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Shirish S May 13, 2014, 4:44 a.m. UTC | #2
Hi,

On Wed, Feb 19, 2014 at 4:02 PM, Inki Dae <inki.dae@samsung.com> wrote:
> 2014-02-14 16:34 GMT+09:00 Shirish S <s.shirish@samsung.com>:
>> 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.
>>
>> Signed-off-by: Shirish S <s.shirish@samsung.com>
>> ---
>>  drivers/gpu/drm/exynos/exynos_hdmi.c |    2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> index a0e10ae..a102076 100644
>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> @@ -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?

> 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
>
>>         /* disable bluescreen */
>>         hdmi_reg_writemask(hdata, HDMI_CON_0, 0, HDMI_BLUE_SCR_EN);
>>
>> --
>> 1.7.9.5
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

Thanks & Regards,
Shirish S
Inki Dae May 16, 2014, 6:38 a.m. UTC | #3
On 2014? 05? 13? 13:44, Shirish S wrote:
> Hi,
> 
> On Wed, Feb 19, 2014 at 4:02 PM, Inki Dae <inki.dae@samsung.com> wrote:
>> 2014-02-14 16:34 GMT+09:00 Shirish S <s.shirish@samsung.com>:
>>> 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.
>>>
>>> Signed-off-by: Shirish S <s.shirish@samsung.com>
>>> ---
>>>  drivers/gpu/drm/exynos/exynos_hdmi.c |    2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
>>> index a0e10ae..a102076 100644
>>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>>> @@ -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?
> 

Thanks for the report. Applied.

Thanks,
Inki Dae


>> 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
>>
>>>         /* disable bluescreen */
>>>         hdmi_reg_writemask(hdata, HDMI_CON_0, 0, HDMI_BLUE_SCR_EN);
>>>
>>> --
>>> 1.7.9.5
>>>
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> Thanks & Regards,
> Shirish S
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index a0e10ae..a102076 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -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);