diff mbox series

[2/2] drm/edid: Add alternate clock for SMPTE 4K

Message ID 20191112075307.12574-2-Wayne.Lin@amd.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/edid: Add aspect ratios to HDMI 4K modes | expand

Commit Message

Lin, Wayne Nov. 12, 2019, 7:53 a.m. UTC
[Why]
In hdmi_mode_alternate_clock(), it adds an exception for VIC 4
mode (4096x2160@24) due to there is no alternate clock defined for
that mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode.

[How]
Remove the exception

Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
---
 drivers/gpu/drm/drm_edid.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Neil Armstrong Nov. 12, 2019, 9:36 a.m. UTC | #1
On 12/11/2019 08:53, Wayne Lin wrote:
> [Why]
> In hdmi_mode_alternate_clock(), it adds an exception for VIC 4
> mode (4096x2160@24) due to there is no alternate clock defined for
> that mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode.
> 
> [How]
> Remove the exception

Shouldn't it be only bypassed when the sink is HDMI2 ?

Neil

> 
> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
> ---
>  drivers/gpu/drm/drm_edid.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index fcd7ae29049d..ed2782c53a93 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -3126,9 +3126,6 @@ static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8 video_code)
>  static unsigned int
>  hdmi_mode_alternate_clock(const struct drm_display_mode *hdmi_mode)
>  {
> -	if (hdmi_mode->vdisplay == 4096 && hdmi_mode->hdisplay == 2160)
> -		return hdmi_mode->clock;
> -
>  	return cea_mode_alternate_clock(hdmi_mode);
>  }
>  
>
Ville Syrjala Nov. 15, 2019, 7:22 p.m. UTC | #2
On Tue, Nov 12, 2019 at 03:53:07PM +0800, Wayne Lin wrote:
> [Why]
> In hdmi_mode_alternate_clock(), it adds an exception for VIC 4
> mode (4096x2160@24) due to there is no alternate clock defined for
> that mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode.
> 
> [How]
> Remove the exception
> 
> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
> ---
>  drivers/gpu/drm/drm_edid.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index fcd7ae29049d..ed2782c53a93 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -3126,9 +3126,6 @@ static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8 video_code)

^ the comment above would no longer match the code. Pls fix it up.

>  static unsigned int
>  hdmi_mode_alternate_clock(const struct drm_display_mode *hdmi_mode)
>  {
> -	if (hdmi_mode->vdisplay == 4096 && hdmi_mode->hdisplay == 2160)
> -		return hdmi_mode->clock;
> -
>  	return cea_mode_alternate_clock(hdmi_mode);
>  }
>  
> -- 
> 2.17.1
Ville Syrjala Nov. 15, 2019, 7:23 p.m. UTC | #3
On Tue, Nov 12, 2019 at 10:36:54AM +0100, Neil Armstrong wrote:
> On 12/11/2019 08:53, Wayne Lin wrote:
> > [Why]
> > In hdmi_mode_alternate_clock(), it adds an exception for VIC 4
> > mode (4096x2160@24) due to there is no alternate clock defined for
> > that mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode.
> > 
> > [How]
> > Remove the exception
> 
> Shouldn't it be only bypassed when the sink is HDMI2 ?

IMO just nuke the check. Can't see much harm coming
from adding the 23.98Hz mode on HDMI 1.4 as well.

> 
> Neil
> 
> > 
> > Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
> > ---
> >  drivers/gpu/drm/drm_edid.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > index fcd7ae29049d..ed2782c53a93 100644
> > --- a/drivers/gpu/drm/drm_edid.c
> > +++ b/drivers/gpu/drm/drm_edid.c
> > @@ -3126,9 +3126,6 @@ static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8 video_code)
> >  static unsigned int
> >  hdmi_mode_alternate_clock(const struct drm_display_mode *hdmi_mode)
> >  {
> > -	if (hdmi_mode->vdisplay == 4096 && hdmi_mode->hdisplay == 2160)
> > -		return hdmi_mode->clock;
> > -
> >  	return cea_mode_alternate_clock(hdmi_mode);
> >  }
> >  
> > 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index fcd7ae29049d..ed2782c53a93 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3126,9 +3126,6 @@  static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8 video_code)
 static unsigned int
 hdmi_mode_alternate_clock(const struct drm_display_mode *hdmi_mode)
 {
-	if (hdmi_mode->vdisplay == 4096 && hdmi_mode->hdisplay == 2160)
-		return hdmi_mode->clock;
-
 	return cea_mode_alternate_clock(hdmi_mode);
 }