From patchwork Mon Apr 22 11:51:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 2475421 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id BCE17DF2E5 for ; Tue, 23 Apr 2013 05:34:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F94CE6136 for ; Mon, 22 Apr 2013 22:34:05 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F121E5C33 for ; Mon, 22 Apr 2013 04:52:02 -0700 (PDT) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r3MBpxwH011611; Mon, 22 Apr 2013 06:51:59 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r3MBpxGv015711; Mon, 22 Apr 2013 06:51:59 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Mon, 22 Apr 2013 06:51:59 -0500 Received: from [172.24.68.5] (h68-5.vpn.ti.com [172.24.68.5]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r3MBpw9l000756; Mon, 22 Apr 2013 06:51:58 -0500 Message-ID: <5175245D.4010403@ti.com> Date: Mon, 22 Apr 2013 14:51:57 +0300 From: Tomi Valkeinen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Dave Airlie Subject: Re: [PATCH] OMAPDSS: DPI: add dependency to DSI References: <516BDD35.4000807@ti.com> <1366274225.4085.44.camel@mars> <516FB845.3070505@ti.com> <516FBB19.4090609@ti.com> In-Reply-To: <516FBB19.4090609@ti.com> X-Enigmail-Version: 1.4.6 X-Mailman-Approved-At: Mon, 22 Apr 2013 22:32:55 -0700 Cc: Christoph Fritz , linux-omap , "dri-devel@lists.freedesktop.org" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Hi Dave, On 2013-04-18 12:21, 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. Dave, can you queue the patch below (also attached) to the 3.10 drm changes? It fixes a compilation issue with the omapdss pull request I sent earlier. Tomi > > Tomi > > From d91bf4127056c68e423109e7c9b46bd0f0b1673a Mon Sep 17 00:00:00 2001 > From: Tomi Valkeinen > 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 > --- > drivers/video/omap2/dss/dss.h | 31 +++++++++++++++++++++++++++---- > 1 file changed, 27 insertions(+), 4 deletions(-) > > 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 */ > From d91bf4127056c68e423109e7c9b46bd0f0b1673a Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen 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 --- drivers/video/omap2/dss/dss.h | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) 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 */ -- 1.7.10.4