summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorMagnus Smith <qsmimag@steludxu2757.(none)>2011-11-08 09:02:50 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:04:19 +0200
commit7f9720fc26e42a82df0f76d9a6ab884ce3f9a78a (patch)
treec16b9038c086e1bb1d372b3be56dcf602cde85c9 /drivers/video
parent946ecd53509f204129ebb1fead7cdc7ceb57b141 (diff)
mcde: Read mcde_clk_rate, used in dsi_delay0
Read the mcde_clk_rate in HZ, to use for calculation of dsi_delay0. ST-Ericsson ID: 368861 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ice950a0b30d5cb92c7b0d31aebd65d3b1981ed63 Signed-off-by: Magnus Smith <qsmimag@steludxu2757.(none)> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36795 Reviewed-by: QABUILD Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Magnus SMITH <magnus.xm.smith@stericsson.com> Tested-by: Magnus SMITH <magnus.xm.smith@stericsson.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mcde/mcde_hw.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/video/mcde/mcde_hw.c b/drivers/video/mcde/mcde_hw.c
index efec33c1a8f..6263ceeca78 100644
--- a/drivers/video/mcde/mcde_hw.c
+++ b/drivers/video/mcde/mcde_hw.c
@@ -27,6 +27,8 @@
#include <linux/jiffies.h>
#include <linux/workqueue.h>
+#include <linux/mfd/dbx500-prcmu.h>
+
#include <video/mcde.h>
#include "dsilink_regs.h"
#include "mcde_regs.h"
@@ -117,6 +119,7 @@ static u8 mcde_is_enabled;
static struct delayed_work hw_timeout_work;
static u8 dsi_pll_is_enabled;
static u8 dsi_ifc_is_supported;
+static u32 mcde_clk_rate; /* In Hz */
static struct mutex mcde_hw_lock;
static inline void mcde_lock(const char *func, int line)
@@ -1953,10 +1956,10 @@ void update_channel_registers(enum mcde_chnl chnl_id, struct chnl_regs *regs,
/* pkt_delay_progressive = pixelclock * htot /
* (1E12 / 160E6) / pkt_div */
- dsi_delay0 = (video_mode->pixclock + 1) *
+ dsi_delay0 = (video_mode->pixclock) *
(video_mode->xres + video_mode->hbp +
video_mode->hfp) /
- (1000000 / MCDE_CLK_FREQ_MHZ) / pkt_div;
+ (100000000 / ((mcde_clk_rate / 10000))) / pkt_div;
if ((screen_ppl == SCREEN_PPL_CEA2) &&
(screen_lpf == SCREEN_LPF_CEA2))
@@ -3377,6 +3380,11 @@ static int probe_hw(struct platform_device *pdev)
if (channels[i].ovly1)
mcde_debugfs_overlay_create(i, 1);
}
+ (void) prcmu_qos_add_requirement(PRCMU_QOS_APE_OPP, "mcde", 100);
+ mcde_clk_rate = clk_get_rate(clock_mcde);
+ dev_info(&mcde_dev->dev, "MCDE_CLK is %d MHz\n", mcde_clk_rate);
+ prcmu_qos_remove_requirement(PRCMU_QOS_APE_OPP, "mcde");
+
return 0;
failed_map_dsi_io: