]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.
authorYunhao Tian <t123yh@outlook.com>
Wed, 13 Nov 2019 13:27:25 +0000 (13:27 +0000)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 13 Nov 2019 14:20:33 +0000 (15:20 +0100)
commit27a5fcefad9fe559109f87d99a9b1676185a1d58
tree0705b728f8f1b7fb8b9604f98d55f7a918fea2b9
parent9a243d0e5c37aca0debd128df7f81b702ed349ae
drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.

The datasheet of V3s (and various other chips) wrote
that TCON0_DCLK_DIV can be >= 1 if only dclk is used,
and must >= 6 if dclk1 or dclk2 is used. As currently
neither dclk1 nor dclk2 is used (no writes to these
bits), let's set minimal division to 1.

If this minimal division is 6, some common dot clock
frequencies can't be produced (e.g. 30MHz will not be
possible and will fallback to 25MHz), which is
obviously not an expected behaviour.

Signed-off-by: Yunhao Tian <t123yh@outlook.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/linux-arm-kernel/MN2PR08MB57905AD8A00C08DA219377C989760@MN2PR08MB5790.namprd08.prod.outlook.com/
drivers/gpu/drm/sun4i/sun4i_tcon.c