]> git.karo-electronics.de Git - linux-beck.git/commit
drm/sun4i: dotclock: Fix clock rate read back calcation
authorChen-Yu Tsai <wens@csie.org>
Thu, 15 Sep 2016 15:14:00 +0000 (23:14 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Sun, 18 Sep 2016 19:12:17 +0000 (21:12 +0200)
commite996e2089f25b84149ae82b5ddf37a263a7fcc71
tree3e3e78fd7ab63cefdd9cd3cbb6b0e77867b99447
parent9a8aa939ba33998f4c70c082dbd4d27a5ddcaaf6
drm/sun4i: dotclock: Fix clock rate read back calcation

When reading back the divider set in the register, we mask off the
bits that aren't part of the divider. Unfortunately the mask used
here was not converted from the field width.

Fix this by converting the field width to a proper bit mask.

Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/gpu/drm/sun4i/sun4i_dotclock.c