From 0e9a126e95748e8283488818d98ae5bcb7b84515 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 23 May 2012 16:45:09 +0300 Subject: OMAPDSS: fix build when DEBUG_FS or DSS_DEBUG_SUPPORT disabled If CONFIG_DEBUG_FS or CONFIG_OMAP2_DSS_DEBUG_SUPPORT is disabled, the build fails: drivers/video/omap2/dss/core.c:197:50: error: static declaration of 'dss_debugfs_create_file' follows non-static declaration drivers/video/omap2/dss/dss.h:166:5: note: previous declaration of 'dss_debugfs_create_file' was here This patch fixes the dummy dss_debugfs_create_file() so that the driver builds. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 72ded9cd2cb0..5066eee10ccf 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -194,8 +194,7 @@ static inline int dss_initialize_debugfs(void) static inline void dss_uninitialize_debugfs(void) { } -static inline int dss_debugfs_create_file(const char *name, - void (*write)(struct seq_file *)) +int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *)) { return 0; } -- cgit v1.2.3-59-g8ed1b From d1700f9258552294300083eb62f83262f21ae1db Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 23 May 2012 16:56:09 +0300 Subject: OMAPDSS: Taal: fix compilation warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes a warning: drivers/video/omap2/displays/panel-taal.c: In function ‘taal_num_errors_show’: drivers/video/omap2/displays/panel-taal.c:529: warning: ‘errors’ may be used uninitialized in this function Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/displays/panel-taal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index 2ce9992f403b..901576eb5a84 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -526,7 +526,7 @@ static ssize_t taal_num_errors_show(struct device *dev, { struct omap_dss_device *dssdev = to_dss_device(dev); struct taal_data *td = dev_get_drvdata(&dssdev->dev); - u8 errors; + u8 errors = 0; int r; mutex_lock(&td->lock); -- cgit v1.2.3-59-g8ed1b From 5025ce070e2dff80bcf015a34a82edcf78229287 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 23 May 2012 17:02:26 +0300 Subject: OMAPDSS: fix bogus WARN_ON in dss_runtime_put() pm_runtime_put_sync() in dss_runtime_put() returns -EBUSY when any child of dss is still enabled. This happens, for example, when a display output is enabled and one dumps the clocks via debugfs. This causes dss_runtime_get & put to be called. While I couldn't find anything about this in the documentation and it wasn't immediately clear from runtime_pm code, it looks to me that pm_runtime_put_sync() returns -EBUSY to inform that things went fine, but the device could not be turned off as there are still child devices that are enabled. This is not a problem. This patch skips the WARN_ON if pm_runtime_put_sync() returns -EBUSY. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/dss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 6ea1ff149f6f..770632359a17 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -731,7 +731,7 @@ static void dss_runtime_put(void) DSSDBG("dss_runtime_put\n"); r = pm_runtime_put_sync(&dss.pdev->dev); - WARN_ON(r < 0); + WARN_ON(r < 0 && r != -EBUSY); } /* DEBUGFS */ -- cgit v1.2.3-59-g8ed1b From 2e063c305a3da896ec3db99e66891411d0e38820 Mon Sep 17 00:00:00 2001 From: Archit Taneja Date: Mon, 4 Jun 2012 13:36:34 +0530 Subject: OMAPDSS: DSI: Fix bug when calculating LP command interleaving parameters In function dsi_compute_interleave_lp(), the escape clock/LP clock time period is calculated incorrectly. The escape clock/LP clock is calculated as: LP Clock(Hz) = DSI_FCLK(Hz) / lp_clk_div Since we are calculating the time period of LP clock, the LP clock divider should be multiplied with the time period of DSI_FCLK. Calculating incorrect value of txclkesc results in incorrect calculation of LP interleaving parameters, it also creates a possibility of a divide by zero error. Reported-by: Sureshkumar Manimuthu Signed-off-by: Archit Taneja Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index ec363d8390ed..ca8382d346e9 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -3724,7 +3724,7 @@ static int dsi_compute_interleave_lp(int blank, int enter_hs, int exit_hs, /* CLKIN4DDR = 16 * TXBYTECLKHS */ tlp_avail = thsbyte_clk * (blank - trans_lp); - ttxclkesc = tdsi_fclk / lp_clk_div; + ttxclkesc = tdsi_fclk * lp_clk_div; lp_inter = ((tlp_avail - 8 * thsbyte_clk - 5 * tdsi_fclk) / ttxclkesc - 26) / 16; -- cgit v1.2.3-59-g8ed1b