]> git.baikalelectronics.ru Git - kernel.git/commit
drm/panel-simple: Fix dotclock for Ortustech COM37H3M
authorH. Nikolaus Schaller <hns@goldelico.com>
Tue, 10 Mar 2020 07:43:19 +0000 (08:43 +0100)
committerSam Ravnborg <sam@ravnborg.org>
Tue, 10 Mar 2020 17:42:17 +0000 (18:42 +0100)
commitd5f53c623e08321e579a510f02b1a3b42345ca1f
treed9af4720978a493edf73b96c4cd8b09516bc12a6
parent615a3a04b2b4e70674a6d8ae845742a6f327ad6d
drm/panel-simple: Fix dotclock for Ortustech COM37H3M

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

There are two variants of the COM37H3M panel.
The older one's COM37H3M05DTC data sheet specifies:

                         MIN      TYP     MAX
CLK frequency    fCLK     --       22.4    26.3 MHz (in VGA mode)
VSYNC Frequency  fVSYNC   54       60      66   Hz
VSYNC cycle time tv       --      650      --   H
HSYNC frequency  fHSYNC   --       39.3    --   kHz
HSYNC cycle time th       --      570      --   CLK

The newer one's COM37H3M99DTC data sheet says:

                         MIN      TYP     MAX
CLK frequency    fCLK     18       19.8    27   MHz
VSYNC Frequency  fVSYNC   54       60      66   Hz
VSYNC cycle time tv      646      650     700   H
HSYNC frequency  fHSYNC  --        39.0    50.0 kHz
HSYNC cycle time th      504      508     630   CLK

So we choose a parameter set that lies within the specs
of both variants. We start at .vrefresh = 60,
choose .htotal = 570 and .vtotal = 650 and end up
in a clock of 22.230 MHz.

Reported-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/e63a0533ad5b5142373437ef758aedbdb716152d.1583826198.git.hns@goldelico.com
drivers/gpu/drm/panel/panel-simple.c