diff mbox

OMAPDSS: DPI: add dependency to DSI

Message ID 516FBB19.4090609@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomi Valkeinen April 18, 2013, 9:21 a.m. UTC
On 2013-04-18 12:09, Tomi Valkeinen wrote:
> On 2013-04-18 11:37, Christoph Fritz wrote:

>> With linux-next this patch breaks compiling here because DPI now depends
>> on DSI - but my omap3 board here doesn't use DSI at all:
>>
>> drivers/video/omap2/dss/dpi.c: In function ‘dpi_calc_pll_cb’:
>> drivers/video/omap2/dss/dpi.c:181: error: implicit declaration of function ‘dsi_hsdiv_calc’
>> drivers/video/omap2/dss/dpi.c: In function ‘dpi_dsi_clk_calc’:
>> drivers/video/omap2/dss/dpi.c:201: error: implicit declaration of function ‘dsi_get_pll_clkin’
>> drivers/video/omap2/dss/dpi.c:212: error: implicit declaration of function ‘dsi_pll_calc’
>>
>> Enabling OMAP2_DSS_DSI fixes this. This is my proposed patch. You may be want to merge it?
> 
> Thanks for reporting this. We shouldn't make DPI depend on DSI. We
> should make dummy functions for the above when DSI is not enabled so
> that DPI compiles. I'll make a fix.

Patch below. Can you try it out? It works for me on Panda.

 Tomi

From d91bf4127056c68e423109e7c9b46bd0f0b1673a Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 18 Apr 2013 12:16:39 +0300
Subject: [PATCH] OMAPDSS: DPI: fix compilation if DSI not compiled in

Commit 100c826235793345efe06b3558cc9d36166b1e26 (OMAPDSS: DPI: use new
clock calculation code) breaks dpi.c compilation if DSI is not enabled
in the kernel configuration.

Fix compilation by adding dummy inline functions for the ones that dpi.c
references. The functions will never be called, as dpi.c knows that
there is no DSI device available.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/dss.h |   31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

Comments

Christoph Fritz April 18, 2013, 10:13 a.m. UTC | #1
On Thu, 2013-04-18 at 12:21 +0300, Tomi Valkeinen wrote:
> On 2013-04-18 12:09, Tomi Valkeinen wrote:
> > On 2013-04-18 11:37, Christoph Fritz wrote:
> 
> >> With linux-next this patch breaks compiling here because DPI now depends
> >> on DSI - but my omap3 board here doesn't use DSI at all:
> >>
> >> drivers/video/omap2/dss/dpi.c: In function ‘dpi_calc_pll_cb’:
> >> drivers/video/omap2/dss/dpi.c:181: error: implicit declaration of function ‘dsi_hsdiv_calc’
> >> drivers/video/omap2/dss/dpi.c: In function ‘dpi_dsi_clk_calc’:
> >> drivers/video/omap2/dss/dpi.c:201: error: implicit declaration of function ‘dsi_get_pll_clkin’
> >> drivers/video/omap2/dss/dpi.c:212: error: implicit declaration of function ‘dsi_pll_calc’
> >>
> >> Enabling OMAP2_DSS_DSI fixes this. This is my proposed patch. You may be want to merge it?
> > 
> > Thanks for reporting this. We shouldn't make DPI depend on DSI. We
> > should make dummy functions for the above when DSI is not enabled so
> > that DPI compiles. I'll make a fix.
> 
> Patch below. Can you try it out? It works for me on Panda.

Thanks, it compiles here fine too.

and while booting I'm now getting as with 3.9-rc:
[    0.409729] OMAP DSS rev 2.0
[    0.410980] omapdss DPI error: can't get VDDS_DSI regulator
[    0.410980] omapdss DPI error: device ips-056t init failed: -517

But here with linux-next (in contrast to 3.9-rc) removing all regulator
dependencies from drivers/video/omap2/dss/dpi.c does not make the trick.
The display stays dark :-( ...

 Thanks
  -- Christoph
Tomi Valkeinen April 18, 2013, 2:37 p.m. UTC | #2
On 2013-04-18 13:13, Christoph Fritz wrote:
> On Thu, 2013-04-18 at 12:21 +0300, Tomi Valkeinen wrote:
>> On 2013-04-18 12:09, Tomi Valkeinen wrote:
>>> On 2013-04-18 11:37, Christoph Fritz wrote:
>>
>>>> With linux-next this patch breaks compiling here because DPI now depends
>>>> on DSI - but my omap3 board here doesn't use DSI at all:
>>>>
>>>> drivers/video/omap2/dss/dpi.c: In function ‘dpi_calc_pll_cb’:
>>>> drivers/video/omap2/dss/dpi.c:181: error: implicit declaration of function ‘dsi_hsdiv_calc’
>>>> drivers/video/omap2/dss/dpi.c: In function ‘dpi_dsi_clk_calc’:
>>>> drivers/video/omap2/dss/dpi.c:201: error: implicit declaration of function ‘dsi_get_pll_clkin’
>>>> drivers/video/omap2/dss/dpi.c:212: error: implicit declaration of function ‘dsi_pll_calc’
>>>>
>>>> Enabling OMAP2_DSS_DSI fixes this. This is my proposed patch. You may be want to merge it?
>>>
>>> Thanks for reporting this. We shouldn't make DPI depend on DSI. We
>>> should make dummy functions for the above when DSI is not enabled so
>>> that DPI compiles. I'll make a fix.
>>
>> Patch below. Can you try it out? It works for me on Panda.
> 
> Thanks, it compiles here fine too.
> 
> and while booting I'm now getting as with 3.9-rc:
> [    0.409729] OMAP DSS rev 2.0
> [    0.410980] omapdss DPI error: can't get VDDS_DSI regulator
> [    0.410980] omapdss DPI error: device ips-056t init failed: -517
> 
> But here with linux-next (in contrast to 3.9-rc) removing all regulator
> dependencies from drivers/video/omap2/dss/dpi.c does not make the trick.
> The display stays dark :-( ...

That's with your DT hacked kernel, right? Not the official supported one.

I don't think anything changed related to regulators in omapdss.

 Tomi
Christoph Fritz April 18, 2013, 5:26 p.m. UTC | #3
On Thu, 2013-04-18 at 17:37 +0300, Tomi Valkeinen wrote:
> > But here with linux-next (in contrast to 3.9-rc) removing all regulator
> > dependencies from drivers/video/omap2/dss/dpi.c does not make the trick.
> > The display stays dark :-( ...
> 
> That's with your DT hacked kernel, right? Not the official supported one.

yeah - it's fixed and working right now again.

 Thanks
   -- Christoph
diff mbox

Patch

diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index faaf358..8475893 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -277,6 +277,12 @@  int sdi_init_platform_driver(void) __init;
 void sdi_uninit_platform_driver(void) __exit;
 
 /* DSI */
+
+typedef bool (*dsi_pll_calc_func)(int regn, int regm, unsigned long fint,
+		unsigned long pll, void *data);
+typedef bool (*dsi_hsdiv_calc_func)(int regm_dispc, unsigned long dispc,
+		void *data);
+
 #ifdef CONFIG_OMAP2_DSS_DSI
 
 struct dentry;
@@ -295,10 +301,6 @@  u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt);
 
 unsigned long dsi_get_pll_clkin(struct platform_device *dsidev);
 
-typedef bool (*dsi_pll_calc_func)(int regn, int regm, unsigned long fint,
-		unsigned long pll, void *data);
-typedef bool (*dsi_hsdiv_calc_func)(int regm_dispc, unsigned long dispc,
-		void *data);
 bool dsi_hsdiv_calc(struct platform_device *dsidev, unsigned long pll,
 		unsigned long out_min, dsi_hsdiv_calc_func func, void *data);
 bool dsi_pll_calc(struct platform_device *dsidev, unsigned long clkin,
@@ -358,6 +360,27 @@  static inline struct platform_device *dsi_get_dsidev_from_id(int module)
 {
 	return NULL;
 }
+
+static inline unsigned long dsi_get_pll_clkin(struct platform_device *dsidev)
+{
+	return 0;
+}
+
+static inline bool dsi_hsdiv_calc(struct platform_device *dsidev,
+		unsigned long pll, unsigned long out_min,
+		dsi_hsdiv_calc_func func, void *data)
+{
+	return false;
+}
+
+static inline bool dsi_pll_calc(struct platform_device *dsidev,
+		unsigned long clkin,
+		unsigned long pll_min, unsigned long pll_max,
+		dsi_pll_calc_func func, void *data)
+{
+	return false;
+}
+
 #endif
 
 /* DPI */