blob: d8aa4eb89339004053f9390cebcd8e2e51cb2769 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
From 832b763db235da8e62f7b6ab02bcb8ad6bcb7a01 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Date: Thu, 2 Apr 2009 16:48:41 +0300
Subject: [PATCH 14/69] DSS2: Add function to get DSS logic clock rate
---
drivers/video/omap2/dss/dispc.c | 15 +++++++++++++++
drivers/video/omap2/dss/dss.h | 1 +
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 2480a03..1bc23f7 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1850,6 +1850,21 @@ unsigned long dispc_fclk_rate(void)
return r;
}
+unsigned long dispc_lclk_rate(void)
+{
+ int lcd;
+ unsigned long r;
+ u32 l;
+
+ l = dispc_read_reg(DISPC_DIVISOR);
+
+ lcd = FLD_GET(l, 23, 16);
+
+ r = dispc_fclk_rate();
+
+ return r / lcd;
+}
+
unsigned long dispc_pclk_rate(void)
{
int lcd, pcd;
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index bac5ece..0be42b6 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -294,6 +294,7 @@ bool dispc_trans_key_enabled(enum omap_channel ch);
void dispc_set_lcd_timings(struct omap_video_timings *timings);
unsigned long dispc_fclk_rate(void);
+unsigned long dispc_lclk_rate(void);
unsigned long dispc_pclk_rate(void);
void dispc_set_pol_freq(struct omap_panel *panel);
void find_lck_pck_divs(bool is_tft, unsigned long req_pck, unsigned long fck,
--
1.6.2.4
|