diff mbox series

[15/33] drm/panel-simple: Fix dotclock for EDT ET035012DM6

Message ID 20200302203452.17977-16-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/panel: Fix dotclocks | expand

Commit Message

Ville Syrjälä March 2, 2020, 8:34 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The currently listed dotclock disagrees with the currently
listed vrefresh rate. Change the dotclock to match the vrefresh.

Someone tell me which (if either) of the dotclock or vreresh is
correct?

Cc: Andreas Pretzsch <apr@cn-eng.de>
Cc: Marco Felsch <m.felsch@pengutronix.de>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marco Felsch March 3, 2020, 7:33 a.m. UTC | #1
Hi Ville,

On 20-03-02 22:34, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The currently listed dotclock disagrees with the currently
> listed vrefresh rate. Change the dotclock to match the vrefresh.
> 
> Someone tell me which (if either) of the dotclock or vreresh is
> correct?

Pls, check the datasheet which is linked within the comment. We hit the
vrefresh exactly if we are in SYNC MODE.

Regards,
  Marco

> Cc: Andreas Pretzsch <apr@cn-eng.de>
> Cc: Marco Felsch <m.felsch@pengutronix.de>
> Cc: Thierry Reding <treding@nvidia.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 93e5bc32fb59..35750229189f 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -1342,7 +1342,7 @@ static const struct panel_desc dlc_dlc1010gig = {
>  };
>  
>  static const struct drm_display_mode edt_et035012dm6_mode = {
> -	.clock = 6500,
> +	.clock = 6414,
>  	.hdisplay = 320,
>  	.hsync_start = 320 + 20,
>  	.hsync_end = 320 + 20 + 30,
> -- 
> 2.24.1
> 
>
Ville Syrjälä March 3, 2020, 2:52 p.m. UTC | #2
On Tue, Mar 03, 2020 at 08:33:20AM +0100, Marco Felsch wrote:
> Hi Ville,
> 
> On 20-03-02 22:34, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > The currently listed dotclock disagrees with the currently
> > listed vrefresh rate. Change the dotclock to match the vrefresh.
> > 
> > Someone tell me which (if either) of the dotclock or vreresh is
> > correct?
> 
> Pls, check the datasheet which is linked within the comment. We hit the
> vrefresh exactly if we are in SYNC MODE.

It's too much work to start hunting datasheets for all these
and figuring out what's going on in each case. Pls just
inform me which way is correct if you know the details.

> 
> Regards,
>   Marco
> 
> > Cc: Andreas Pretzsch <apr@cn-eng.de>
> > Cc: Marco Felsch <m.felsch@pengutronix.de>
> > Cc: Thierry Reding <treding@nvidia.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/panel/panel-simple.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> > index 93e5bc32fb59..35750229189f 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -1342,7 +1342,7 @@ static const struct panel_desc dlc_dlc1010gig = {
> >  };
> >  
> >  static const struct drm_display_mode edt_et035012dm6_mode = {
> > -	.clock = 6500,
> > +	.clock = 6414,
> >  	.hdisplay = 320,
> >  	.hsync_start = 320 + 20,
> >  	.hsync_end = 320 + 20 + 30,
> > -- 
> > 2.24.1
> > 
> > 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Marco Felsch March 6, 2020, 8:02 a.m. UTC | #3
On 20-03-03 16:52, Ville Syrjälä wrote:
> On Tue, Mar 03, 2020 at 08:33:20AM +0100, Marco Felsch wrote:
> > Hi Ville,
> > 
> > On 20-03-02 22:34, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > The currently listed dotclock disagrees with the currently
> > > listed vrefresh rate. Change the dotclock to match the vrefresh.
> > > 
> > > Someone tell me which (if either) of the dotclock or vreresh is
> > > correct?
> > 
> > Pls, check the datasheet which is linked within the comment. We hit the
> > vrefresh exactly if we are in SYNC MODE.
> 
> It's too much work to start hunting datasheets for all these
> and figuring out what's going on in each case. Pls just
> inform me which way is correct if you know the details.

How do you know that the clock is wrong if it is to much work? As I said
the clock is completely fine.

Regards,
  Marco

> > 
> > Regards,
> >   Marco
> > 
> > > Cc: Andreas Pretzsch <apr@cn-eng.de>
> > > Cc: Marco Felsch <m.felsch@pengutronix.de>
> > > Cc: Thierry Reding <treding@nvidia.com>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/panel/panel-simple.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> > > index 93e5bc32fb59..35750229189f 100644
> > > --- a/drivers/gpu/drm/panel/panel-simple.c
> > > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > > @@ -1342,7 +1342,7 @@ static const struct panel_desc dlc_dlc1010gig = {
> > >  };
> > >  
> > >  static const struct drm_display_mode edt_et035012dm6_mode = {
> > > -	.clock = 6500,
> > > +	.clock = 6414,
> > >  	.hdisplay = 320,
> > >  	.hsync_start = 320 + 20,
> > >  	.hsync_end = 320 + 20 + 30,
> > > -- 
> > > 2.24.1
> > > 
> > > 
> > 
> > -- 
> > Pengutronix e.K.                           |                             |
> > Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> > 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> > Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> -- 
> Ville Syrjälä
> Intel
>
Ville Syrjälä March 9, 2020, 1:18 p.m. UTC | #4
On Fri, Mar 06, 2020 at 09:02:57AM +0100, Marco Felsch wrote:
> On 20-03-03 16:52, Ville Syrjälä wrote:
> > On Tue, Mar 03, 2020 at 08:33:20AM +0100, Marco Felsch wrote:
> > > Hi Ville,
> > > 
> > > On 20-03-02 22:34, Ville Syrjala wrote:
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > 
> > > > The currently listed dotclock disagrees with the currently
> > > > listed vrefresh rate. Change the dotclock to match the vrefresh.
> > > > 
> > > > Someone tell me which (if either) of the dotclock or vreresh is
> > > > correct?
> > > 
> > > Pls, check the datasheet which is linked within the comment. We hit the
> > > vrefresh exactly if we are in SYNC MODE.
> > 
> > It's too much work to start hunting datasheets for all these
> > and figuring out what's going on in each case. Pls just
> > inform me which way is correct if you know the details.
> 
> How do you know that the clock is wrong if it is to much work? As I said
> the clock is completely fine.

htotal*vtotal*vrefresh != clock, so one or both are incorrect.
Marco Felsch March 10, 2020, 7:05 a.m. UTC | #5
On 20-03-09 15:18, Ville Syrjälä wrote:
> On Fri, Mar 06, 2020 at 09:02:57AM +0100, Marco Felsch wrote:
> > On 20-03-03 16:52, Ville Syrjälä wrote:
> > > On Tue, Mar 03, 2020 at 08:33:20AM +0100, Marco Felsch wrote:
> > > > Hi Ville,
> > > > 
> > > > On 20-03-02 22:34, Ville Syrjala wrote:
> > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > 
> > > > > The currently listed dotclock disagrees with the currently
> > > > > listed vrefresh rate. Change the dotclock to match the vrefresh.
> > > > > 
> > > > > Someone tell me which (if either) of the dotclock or vreresh is
> > > > > correct?
> > > > 
> > > > Pls, check the datasheet which is linked within the comment. We hit the
> > > > vrefresh exactly if we are in SYNC MODE.
> > > 
> > > It's too much work to start hunting datasheets for all these
> > > and figuring out what's going on in each case. Pls just
> > > inform me which way is correct if you know the details.
> > 
> > How do you know that the clock is wrong if it is to much work? As I said
> > the clock is completely fine.
> 
> htotal*vtotal*vrefresh != clock, so one or both are incorrect.

I checked the values using this equation:
clock / (htotal * vtotal) = vrefresh.

Regards,
  Marco
Ville Syrjälä March 10, 2020, 12:04 p.m. UTC | #6
On Tue, Mar 10, 2020 at 08:05:32AM +0100, Marco Felsch wrote:
> On 20-03-09 15:18, Ville Syrjälä wrote:
> > On Fri, Mar 06, 2020 at 09:02:57AM +0100, Marco Felsch wrote:
> > > On 20-03-03 16:52, Ville Syrjälä wrote:
> > > > On Tue, Mar 03, 2020 at 08:33:20AM +0100, Marco Felsch wrote:
> > > > > Hi Ville,
> > > > > 
> > > > > On 20-03-02 22:34, Ville Syrjala wrote:
> > > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > > 
> > > > > > The currently listed dotclock disagrees with the currently
> > > > > > listed vrefresh rate. Change the dotclock to match the vrefresh.
> > > > > > 
> > > > > > Someone tell me which (if either) of the dotclock or vreresh is
> > > > > > correct?
> > > > > 
> > > > > Pls, check the datasheet which is linked within the comment. We hit the
> > > > > vrefresh exactly if we are in SYNC MODE.
> > > > 
> > > > It's too much work to start hunting datasheets for all these
> > > > and figuring out what's going on in each case. Pls just
> > > > inform me which way is correct if you know the details.
> > > 
> > > How do you know that the clock is wrong if it is to much work? As I said
> > > the clock is completely fine.
> > 
> > htotal*vtotal*vrefresh != clock, so one or both are incorrect.
> 
> I checked the values using this equation:
> clock / (htotal * vtotal) = vrefresh.

I guess you truncated instead of rounding to nearest. With round to
nearest we get vrefresh=61. The actual number being 60.8...
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 93e5bc32fb59..35750229189f 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1342,7 +1342,7 @@  static const struct panel_desc dlc_dlc1010gig = {
 };
 
 static const struct drm_display_mode edt_et035012dm6_mode = {
-	.clock = 6500,
+	.clock = 6414,
 	.hdisplay = 320,
 	.hsync_start = 320 + 20,
 	.hsync_end = 320 + 20 + 30,