diff mbox series

[01/33] drm/panel-novatek-nt35510: Fix dotclock

Message ID 20200302203452.17977-2-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: Linus Walleij <linus.walleij@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/panel/panel-novatek-nt35510.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij March 7, 2020, 2:29 p.m. UTC | #1
Hi Ville,

On Mon, Mar 2, 2020 at 9:34 PM Ville Syrjala
<ville.syrjala@linux.intel.com> wrote:

>         .mode = {
>                 /* The internal pixel clock of the NT35510 is 20 MHz */
> -               .clock = 20000000,
> +               .clock = 23581,

I double checked this with the datasheet NT35510 Application Note V0.07 HYDIS
and all documentation is in line with the comment: the internal clock
frequency of
the dotclock is 20 MHz so this should be set to 20000 (kHz) sorry for putting
the three orders of magnitude too big number there :P

This clock isn't used by any drivers because this is a command mode DSI
panel with a DSI link clocked from the host. (hs_rate or lp_rate).

The internal formula shows how the actual vrefresh can be calculated for
the display in respone to setting of the internal registers, see page 34:
https://dflund.se/~triad/NT35510-appnote.pdf

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
index b4c014126781..94e294b66a6a 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
@@ -1019,7 +1019,7 @@  static const struct nt35510_config nt35510_hydis_hva40wv1 = {
 	 */
 	.mode = {
 		/* The internal pixel clock of the NT35510 is 20 MHz */
-		.clock = 20000000,
+		.clock = 23581,
 		.hdisplay = 480,
 		.hsync_start = 480 + 2, /* HFP = 2 */
 		.hsync_end = 480 + 2 + 0, /* HSync = 0 */