diff mbox series

[10/33] drm/panel-simple: Fix dotclock for AUO G104SN02 V2

Message ID 20200302203452.17977-11-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: Christoph Fritz <chf.fritz@googlemail.com>
Cc: Stefan Riedmueller <s.riedmueller@phytec.de>
Cc: Rob Herring <robh@kernel.org>
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

Christoph Fritz March 3, 2020, 1:13 p.m. UTC | #1
On Mon, 2020-03-02 at 22:34 +0200, 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?

This display (a controller is included) has a wide tolerance range.

Adapting clock should be fine while keeping vrefresh rate at 60 Hz.

I guess an even better alternative would be to change this config to a
pixelclock describing one like the other auo panels.

But at the moment I'm not having a display here.
Stefan Riedmüller March 4, 2020, 12:19 p.m. UTC | #2
Hi Ville, hi Christoph,

On 03.03.20 14:13, Christoph Fritz wrote:
> On Mon, 2020-03-02 at 22:34 +0200, 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?

The 40 MHz clock comes from the datasheet which states this as the typical 
clock frequency. But the valid range reaches from 30 MHz to 50 MHz. The 
datasheet also states a 60 Hz frame rate so setting the clock to the 
corresponding frequency makes sense to me.

I gave it a little test here and both values work for me.

Regards,
Stefan

> 
> This display (a controller is included) has a wide tolerance range.
> 
> Adapting clock should be fine while keeping vrefresh rate at 60 Hz.
> 
> I guess an even better alternative would be to change this config to a
> pixelclock describing one like the other auo panels.
> 
> But at the moment I'm not having a display here.
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 9782a016a157..8643ba7e76a6 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -851,7 +851,7 @@  static const struct panel_desc auo_g101evn010 = {
 };
 
 static const struct drm_display_mode auo_g104sn02_mode = {
-	.clock = 40000,
+	.clock = 45963,
 	.hdisplay = 800,
 	.hsync_start = 800 + 40,
 	.hsync_end = 800 + 40 + 216,