[v2] drm/panel: Fix ARM Versatile panel clocks

Message ID 20180211103840.18764-1-linus.walleij@linaro.org
State Accepted
Commit fd9b503dec9b533afa49ac105ce65f87419b5528
Headers show
Series
  • [v2] drm/panel: Fix ARM Versatile panel clocks
Related show

Commit Message

Linus Walleij Feb. 11, 2018, 10:38 a.m.
These clocks are in kHz not in Hz, oops. Fix it so my
new bandwidth calculations patch starts working with these
panels.

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- The Epson clock was still wrong, off by one order of
  magnitude. It is now fixed. The only source of the actual
  frequency to use is the old fbdev driver, as there is no
  datasheet for this Epson panel that I can find, and it is
  set to 62500 kHz.
---
 drivers/gpu/drm/panel/panel-arm-versatile.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Eric Anholt Feb. 21, 2018, 10:48 p.m. | #1
Linus Walleij <linus.walleij@linaro.org> writes:

> These clocks are in kHz not in Hz, oops. Fix it so my

> new bandwidth calculations patch starts working with these

> panels.

>

> Cc: Eric Anholt <eric@anholt.net>

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

> ChangeLog v1->v2:

> - The Epson clock was still wrong, off by one order of

>   magnitude. It is now fixed. The only source of the actual

>   frequency to use is the old fbdev driver, as there is no

>   datasheet for this Epson panel that I can find, and it is

>   set to 62500 kHz.


Reviewed-by: Eric Anholt <eric@anholt.net>

Patch

diff --git a/drivers/gpu/drm/panel/panel-arm-versatile.c b/drivers/gpu/drm/panel/panel-arm-versatile.c
index 3930b4925b15..b428c4678106 100644
--- a/drivers/gpu/drm/panel/panel-arm-versatile.c
+++ b/drivers/gpu/drm/panel/panel-arm-versatile.c
@@ -132,7 +132,7 @@  static const struct versatile_panel_type versatile_panels[] = {
 		.width_mm = 79,
 		.height_mm = 54,
 		.mode = {
-			.clock = 10000000,
+			.clock = 10000,
 			.hdisplay = 320,
 			.hsync_start = 320 + 6,
 			.hsync_end = 320 + 6 + 6,
@@ -156,7 +156,7 @@  static const struct versatile_panel_type versatile_panels[] = {
 		.width_mm = 171,
 		.height_mm = 130,
 		.mode = {
-			.clock = 25000000,
+			.clock = 25000,
 			.hdisplay = 640,
 			.hsync_start = 640 + 24,
 			.hsync_end = 640 + 24 + 96,
@@ -179,7 +179,7 @@  static const struct versatile_panel_type versatile_panels[] = {
 		.width_mm = 34,
 		.height_mm = 45,
 		.mode = {
-			.clock = 625000000,
+			.clock = 62500,
 			.hdisplay = 176,
 			.hsync_start = 176 + 2,
 			.hsync_end = 176 + 2 + 3,
@@ -203,7 +203,7 @@  static const struct versatile_panel_type versatile_panels[] = {
 		.width_mm = 37,
 		.height_mm = 50,
 		.mode = {
-			.clock = 5400000,
+			.clock = 5400,
 			.hdisplay = 240,
 			.hsync_start = 240 + 10,
 			.hsync_end = 240 + 10 + 10,