* Re: [PATCH V3 0/3] OMAPDSS: Enable dynamic debug printing
From: Tomi Valkeinen @ 2012-09-28 11:34 UTC (permalink / raw)
To: Chandrabhanu Mahapatra; +Cc: linux-omap, linux-fbdev
In-Reply-To: <cover.1348826106.git.cmahapatra@ti.com>
[-- Attachment #1: Type: text/plain, Size: 2217 bytes --]
On Fri, 2012-09-28 at 15:53 +0530, Chandrabhanu Mahapatra wrote:
> Hi everyone,
> this patch series aims at cleaning up of DSS of printk()'s enabled with
> dss_debug and replace them with generic dynamic debug printing.
>
> The 1st patch
> * moved DEBUG flag definition to Makefile
> The 2nd patch
> * replaces printk() in DSSDBG definition with pr_debug()
> * removes DSSDBGF definition and replaces its instances with DSSDBG()
> The 3rd patch
> * cleans up printk()'s in omap_dispc_unregister_isr() and
> _dsi_print_reset_status() with pr_debug()
> * removes dss_debug variable
>
> Changes from V1 to V2:
> * added debug messages to DSSDBG calls
> * added patch "OMAPDSS: Remove dss_debug variable"
>
> Changes from V2 to V3
> * added patch "OMAPDSS: Move definition of DEBUG flag to Makefile"
>
> All your comments and suggestions are welcome.
There's one thing that's not quite nice about omapdss's debug print
behavior after this series.
CONFIG_OMAP2_DSS_DEBUG_SUPPORT is marked "default y", and it's also been
safe to enable earlier as we had the dss_debug variable to prevent the
debug prints. But after this series, the debug prints are enabled, and
will spam the kernel log quite heavily.
And that happens with both dynamic debugging enabled and disabled.
How things should work:
For kernels with dynamic debugging disabled: by default the dss debugs
are not compiled, and the user needs to explicitly enable them in the
kernel config.
For kernels with dynamic debugging enabled: by default the dss debugs
are compiled in, but not enabled. A Kconfig option can be set to make
the debugs enabled by default.
In addition to those, we have the debugfs files. Those should be usable
regardless of the debug prints.
So I suggest the following:
- Remove CONFIG_OMAP2_DSS_DEBUG_SUPPORT. We can't re-use it, because it
may be enabled in user's kernel configs.
- Add new Kconfig option: CONFIG_OMAP2_DSS_DEBUG. This will set DEBUG in
the makefile. This is off by default.
- Add new Kconfig option: CONFIG_OMAP2_DSS_DEBUGFS. This will be use to
decide if debugfs functionality is compiled in or not. This is off by
default.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH V3 2/3] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function
From: Tomi Valkeinen @ 2012-09-28 11:22 UTC (permalink / raw)
To: Chandrabhanu Mahapatra; +Cc: linux-omap, linux-fbdev
In-Reply-To: <2fc91980de4af940ac59b26fd49da6498865db8b.1348826106.git.cmahapatra@ti.com>
[-- Attachment #1: Type: text/plain, Size: 3746 bytes --]
On Fri, 2012-09-28 at 15:53 +0530, Chandrabhanu Mahapatra wrote:
> The printk in DSSDBG function definition is replaced with dynamic debug enabled
> pr_debug(). The use of dynamic debugging provides more flexibility as each debug
> statement can be enabled or disabled dynamically on basis of source filename,
> line number, module name etc. by writing to a control file in debugfs
> filesystem. For better understanding please refer to
> Documentation/dynamic-debug-howto.txt.
>
> The DSSDBGF() differs from DSSDBG() by providing function name. However,
> function name, line number, module name and thread ID can be printed through
> dynamic debug by setting appropriate flags 'f','l','m' and 't' in the debugfs
> control file. So, DSSDBGF instances are replaced with DSSDBG.
>
> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
> ---
> drivers/video/omap2/dss/apply.c | 8 ++++----
> drivers/video/omap2/dss/dsi.c | 12 ++++++------
> drivers/video/omap2/dss/dss.h | 34 ++++++++--------------------------
> 3 files changed, 18 insertions(+), 36 deletions(-)
>
> - DSSDBGF("%d", channel);
> + DSSDBG("Initial Config of Virtual Channel %d", channel);
A Bit Too Much Capital Letters here for my taste =). Use just one at the
beginning of the print, or none at all.
>
> r = dsi_read_reg(dsidev, DSI_VC_CTRL(channel));
>
> @@ -2814,7 +2814,7 @@ static int dsi_vc_config_source(struct platform_device *dsidev, int channel,
> if (dsi->vc[channel].source == source)
> return 0;
>
> - DSSDBGF("%d", channel);
> + DSSDBG("Source Config of Virtual Channel %d", channel);
Here also.
>
> dsi_sync_vc(dsidev, channel);
>
> @@ -3572,7 +3572,7 @@ static int dsi_enter_ulps(struct platform_device *dsidev)
> int r, i;
> unsigned mask;
>
> - DSSDBGF();
> + DSSDBG("Entering ULPS");
>
> WARN_ON(!dsi_bus_is_locked(dsidev));
>
> @@ -4276,7 +4276,7 @@ int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev,
> unsigned long pck;
> int r;
>
> - DSSDBGF("ddr_clk %lu, lp_clk %lu", ddr_clk, lp_clk);
> + DSSDBG("Setting DSI clocks: ddr_clk %lu, lp_clk %lu", ddr_clk, lp_clk);
>
> mutex_lock(&dsi->lock);
>
> diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
> index ffbba7e..5ef4e17 100644
> --- a/drivers/video/omap2/dss/dss.h
> +++ b/drivers/video/omap2/dss/dss.h
> @@ -25,38 +25,20 @@
>
> #ifdef DEBUG
> extern bool dss_debug;
> -#ifdef DSS_SUBSYS_NAME
> -#define DSSDBG(format, ...) \
> - if (dss_debug) \
> - printk(KERN_DEBUG "omapdss " DSS_SUBSYS_NAME ": " format, \
> - ## __VA_ARGS__)
> -#else
> -#define DSSDBG(format, ...) \
> - if (dss_debug) \
> - printk(KERN_DEBUG "omapdss: " format, ## __VA_ARGS__)
> #endif
>
> -#ifdef DSS_SUBSYS_NAME
> -#define DSSDBGF(format, ...) \
> - if (dss_debug) \
> - printk(KERN_DEBUG "omapdss " DSS_SUBSYS_NAME \
> - ": %s(" format ")\n", \
> - __func__, \
> - ## __VA_ARGS__)
> -#else
> -#define DSSDBGF(format, ...) \
> - if (dss_debug) \
> - printk(KERN_DEBUG "omapdss: " \
> - ": %s(" format ")\n", \
> - __func__, \
> - ## __VA_ARGS__)
> +#ifdef pr_fmt
> +#undef pr_fmt
> #endif
>
> -#else /* DEBUG */
> -#define DSSDBG(format, ...)
> -#define DSSDBGF(format, ...)
> +#ifdef DSS_SUBSYS_NAME
> +#define pr_fmt(fmt) DSS_SUBSYS_NAME ": " fmt
> +#else
> +#define pr_fmt(fmt) fmt
> #endif
I think you could just do:
#ifdef DSS_SUBSYS_NAME
#ifdef pr_fmt
#undef pr_fmt
#endif
#define pr_fmt(fmt) DSS_SUBSYS_NAME ": " fmt
#endif
For the case where there's no DSS_SUBSYS_NAME, there's no need to undef
pr_fmt, only to redefine it again back to the original.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 1/6] OMAPDSS: add omapdss_version
From: Archit Taneja @ 2012-09-28 11:12 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: linux-omap, linux-fbdev, Chandrabhanu Mahapatra,
Raphaël Assénat, Tony Lindgren
In-Reply-To: <1348828527-13309-2-git-send-email-tomi.valkeinen@ti.com>
On Friday 28 September 2012 04:05 PM, Tomi Valkeinen wrote:
> Add new enum, omapdss_version, that is used to tell which DSS hardware
> version the SoC has. This enum is initialized during platform init, and
> passed in the platform data to omapdss driver.
>
> Note that the versions are not "continuous", that is, you cannot check
> if the version is less or greater than something, but you need to check
> for exact version match. In other words, this is invalid:
>
> /* test if DSS is 3630 or earlier */
> if (ver <= OMAPDSS_VER_OMAP3630)
> ...
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> arch/arm/mach-omap2/display.c | 38 ++++++++++++++++++++++++++++++++++++++
> include/video/omapdss.h | 14 ++++++++++++++
> 2 files changed, 52 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
> index ee40739..33555da 100644
> --- a/arch/arm/mach-omap2/display.c
> +++ b/arch/arm/mach-omap2/display.c
> @@ -284,6 +284,35 @@ err:
> return ERR_PTR(r);
> }
>
> +static enum omapdss_version omap_display_get_version(void)
We could add a __init for this function?
Archit
^ permalink raw reply
* Re: [PATCH 1/6] OMAPDSS: add omapdss_version
From: Tomi Valkeinen @ 2012-09-28 11:07 UTC (permalink / raw)
To: Archit Taneja
Cc: linux-omap, linux-fbdev, Chandrabhanu Mahapatra,
Raphaël Assénat, Tony Lindgren
In-Reply-To: <50658345.5050403@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1318 bytes --]
On Fri, 2012-09-28 at 16:30 +0530, Archit Taneja wrote:
> On Friday 28 September 2012 04:05 PM, Tomi Valkeinen wrote:
> > Add new enum, omapdss_version, that is used to tell which DSS hardware
> > version the SoC has. This enum is initialized during platform init, and
> > passed in the platform data to omapdss driver.
> >
> > Note that the versions are not "continuous", that is, you cannot check
> > if the version is less or greater than something, but you need to check
> > for exact version match. In other words, this is invalid:
> >
> > /* test if DSS is 3630 or earlier */
> > if (ver <= OMAPDSS_VER_OMAP3630)
> > ...
> >
> > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > ---
> > arch/arm/mach-omap2/display.c | 38 ++++++++++++++++++++++++++++++++++++++
> > include/video/omapdss.h | 14 ++++++++++++++
> > 2 files changed, 52 insertions(+)
> >
> > diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
> > index ee40739..33555da 100644
> > --- a/arch/arm/mach-omap2/display.c
> > +++ b/arch/arm/mach-omap2/display.c
> > @@ -284,6 +284,35 @@ err:
> > return ERR_PTR(r);
> > }
> >
> > +static enum omapdss_version omap_display_get_version(void)
>
> We could add a __init for this function?
Good point, thanks.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 1/6] OMAPDSS: add omapdss_version
From: Tomi Valkeinen @ 2012-09-28 10:44 UTC (permalink / raw)
To: linux-omap
Cc: linux-fbdev, Archit Taneja, Chandrabhanu Mahapatra,
Raphaël Assénat, Tony Lindgren
In-Reply-To: <1348828527-13309-2-git-send-email-tomi.valkeinen@ti.com>
[-- Attachment #1: Type: text/plain, Size: 2102 bytes --]
On Fri, 2012-09-28 at 13:35 +0300, Tomi Valkeinen wrote:
> Add new enum, omapdss_version, that is used to tell which DSS hardware
> version the SoC has. This enum is initialized during platform init, and
> passed in the platform data to omapdss driver.
>
> Note that the versions are not "continuous", that is, you cannot check
> if the version is less or greater than something, but you need to check
> for exact version match. In other words, this is invalid:
>
> /* test if DSS is 3630 or earlier */
> if (ver <= OMAPDSS_VER_OMAP3630)
> ...
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> arch/arm/mach-omap2/display.c | 38 ++++++++++++++++++++++++++++++++++++++
> include/video/omapdss.h | 14 ++++++++++++++
> 2 files changed, 52 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
> index ee40739..33555da 100644
> --- a/arch/arm/mach-omap2/display.c
> +++ b/arch/arm/mach-omap2/display.c
> @@ -284,6 +284,35 @@ err:
> return ERR_PTR(r);
> }
>
> +static enum omapdss_version omap_display_get_version(void)
> +{
> + if (cpu_is_omap24xx())
> + return OMAPDSS_VER_OMAP24xx;
> + else if (cpu_is_omap3630())
> + return OMAPDSS_VER_OMAP3630;
> + else if (cpu_is_omap34xx()) {
> + if (soc_is_am35xx()) {
> + return OMAPDSS_VER_AM35xx;
> + } else {
> + if (omap_rev() < OMAP3430_REV_ES3_0)
> + return OMAPDSS_VER_OMAP34xx_ES1;
> + else
> + return OMAPDSS_VER_OMAP34xx_ES3;
> + }
> + } else if (omap_rev() == OMAP4430_REV_ES1_0)
> + return OMAPDSS_VER_OMAP4430_ES1;
> + else if (omap_rev() == OMAP4430_REV_ES2_0 ||
> + omap_rev() == OMAP4430_REV_ES2_1 ||
> + omap_rev() == OMAP4430_REV_ES2_2)
> + return OMAPDSS_VER_OMAP4430_ES2;
> + else if (cpu_is_omap44xx())
> + return OMAPDSS_VER_OMAP4;
> + else if (soc_is_omap54xx())
> + return OMAPDSS_VER_OMAP5;
> + else
> + return OMAPDSS_VER_UNKNOWN
Sigh. I made a late minor change, and of course I broke the compilation
and didn't check it. So there's a ; missing in the above line.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* [PATCH V3 3/3] OMAPDSS: Remove dss_debug variable
From: Chandrabhanu Mahapatra @ 2012-09-28 10:35 UTC (permalink / raw)
To: tomi.valkeinen; +Cc: linux-omap, linux-fbdev, Chandrabhanu Mahapatra
In-Reply-To: <cover.1348826106.git.cmahapatra@ti.com>
The debug prints in omap_dispc_unregister_isr() and _dsi_print_reset_status()
are replaced with dynamic debug enabled pr_debug(). So, as the final dependency
on dss_debug variable is replaced with dyndbg, the dss_debug variable is
removed.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
---
drivers/video/omap2/dss/core.c | 5 -----
drivers/video/omap2/dss/dispc.c | 39 ++++++++++++++-------------------------
drivers/video/omap2/dss/dsi.c | 37 ++++++++++++++-----------------------
drivers/video/omap2/dss/dss.h | 4 ----
4 files changed, 28 insertions(+), 57 deletions(-)
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index b2af72d..e51bd84 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -53,11 +53,6 @@ static char *def_disp_name;
module_param_named(def_disp, def_disp_name, charp, 0);
MODULE_PARM_DESC(def_disp, "default display name");
-#ifdef DEBUG
-bool dss_debug;
-module_param_named(debug, dss_debug, bool, 0644);
-#endif
-
const char *dss_get_default_display_name(void)
{
return core.default_display_name;
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index a173a94..85d2128 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -3669,34 +3669,26 @@ int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask)
}
EXPORT_SYMBOL(omap_dispc_unregister_isr);
-#ifdef DEBUG
static void print_irq_status(u32 status)
{
if ((status & dispc.irq_error_mask) = 0)
return;
- printk(KERN_DEBUG "DISPC IRQ: 0x%x: ", status);
-
-#define PIS(x) \
- if (status & DISPC_IRQ_##x) \
- printk(#x " ");
- PIS(GFX_FIFO_UNDERFLOW);
- PIS(OCP_ERR);
- PIS(VID1_FIFO_UNDERFLOW);
- PIS(VID2_FIFO_UNDERFLOW);
- if (dss_feat_get_num_ovls() > 3)
- PIS(VID3_FIFO_UNDERFLOW);
- PIS(SYNC_LOST);
- PIS(SYNC_LOST_DIGIT);
- if (dss_has_feature(FEAT_MGR_LCD2))
- PIS(SYNC_LOST2);
- if (dss_has_feature(FEAT_MGR_LCD3))
- PIS(SYNC_LOST3);
+#define PIS(x) (status & DISPC_IRQ_##x) ? (#x " ") : ""
+
+ pr_debug("DISPC IRQ: 0x%x: %s%s%s%s%s%s%s%s%s\n",
+ status,
+ PIS(OCP_ERR),
+ PIS(GFX_FIFO_UNDERFLOW),
+ PIS(VID1_FIFO_UNDERFLOW),
+ PIS(VID2_FIFO_UNDERFLOW),
+ dss_feat_get_num_ovls() > 3 ? PIS(VID3_FIFO_UNDERFLOW) : "",
+ PIS(SYNC_LOST),
+ PIS(SYNC_LOST_DIGIT),
+ dss_has_feature(FEAT_MGR_LCD2) ? PIS(SYNC_LOST2) : "",
+ dss_has_feature(FEAT_MGR_LCD3) ? PIS(SYNC_LOST3) : "");
#undef PIS
-
- printk("\n");
}
-#endif
/* Called from dss.c. Note that we don't touch clocks here,
* but we presume they are on because we got an IRQ. However,
@@ -3729,10 +3721,7 @@ static irqreturn_t omap_dispc_irq_handler(int irq, void *arg)
spin_unlock(&dispc.irq_stats_lock);
#endif
-#ifdef DEBUG
- if (dss_debug)
- print_irq_status(irqstatus);
-#endif
+ print_irq_status(irqstatus);
/* Ack the interrupt. Do it here before clocks are possibly turned
* off */
dispc_write_reg(DISPC_IRQSTATUS, irqstatus);
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 3b524cd..70be86c 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1107,28 +1107,16 @@ static inline void dsi_enable_pll_clock(struct platform_device *dsidev,
}
}
-#ifdef DEBUG
static void _dsi_print_reset_status(struct platform_device *dsidev)
{
u32 l;
int b0, b1, b2;
- if (!dss_debug)
- return;
-
/* A dummy read using the SCP interface to any DSIPHY register is
* required after DSIPHY reset to complete the reset of the DSI complex
* I/O. */
l = dsi_read_reg(dsidev, DSI_DSIPHY_CFG5);
- printk(KERN_DEBUG "DSI resets: ");
-
- l = dsi_read_reg(dsidev, DSI_PLL_STATUS);
- printk("PLL (%d) ", FLD_GET(l, 0, 0));
-
- l = dsi_read_reg(dsidev, DSI_COMPLEXIO_CFG1);
- printk("CIO (%d) ", FLD_GET(l, 29, 29));
-
if (dss_has_feature(FEAT_DSI_REVERSE_TXCLKESC)) {
b0 = 28;
b1 = 27;
@@ -1139,18 +1127,21 @@ static void _dsi_print_reset_status(struct platform_device *dsidev)
b2 = 26;
}
- l = dsi_read_reg(dsidev, DSI_DSIPHY_CFG5);
- printk("PHY (%x%x%x, %d, %d, %d)\n",
- FLD_GET(l, b0, b0),
- FLD_GET(l, b1, b1),
- FLD_GET(l, b2, b2),
- FLD_GET(l, 29, 29),
- FLD_GET(l, 30, 30),
- FLD_GET(l, 31, 31));
+#define DSI_FLD_GET(fld, start, end)\
+ FLD_GET(dsi_read_reg(dsidev, DSI_##fld), start, end)
+
+ pr_debug("DSI resets: PLL (%d) CIO (%d) PHY (%x%x%x, %d, %d, %d)\n",
+ DSI_FLD_GET(PLL_STATUS, 0, 0),
+ DSI_FLD_GET(COMPLEXIO_CFG1, 29, 29),
+ DSI_FLD_GET(DSIPHY_CFG5, b0, b0),
+ DSI_FLD_GET(DSIPHY_CFG5, b1, b1),
+ DSI_FLD_GET(DSIPHY_CFG5, b2, b2),
+ DSI_FLD_GET(DSIPHY_CFG5, 29, 29),
+ DSI_FLD_GET(DSIPHY_CFG5, 30, 30),
+ DSI_FLD_GET(DSIPHY_CFG5, 31, 31));
+
+#undef DSI_FLD_GET
}
-#else
-#define _dsi_print_reset_status(x)
-#endif
static inline int dsi_if_enable(struct platform_device *dsidev, bool enable)
{
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 5ef4e17..1d0205c 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -23,10 +23,6 @@
#ifndef __OMAP2_DSS_H
#define __OMAP2_DSS_H
-#ifdef DEBUG
-extern bool dss_debug;
-#endif
-
#ifdef pr_fmt
#undef pr_fmt
#endif
--
1.7.10
^ permalink raw reply related
* [PATCH V3 2/3] OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function
From: Chandrabhanu Mahapatra @ 2012-09-28 10:35 UTC (permalink / raw)
To: tomi.valkeinen; +Cc: linux-omap, linux-fbdev, Chandrabhanu Mahapatra
In-Reply-To: <cover.1348826106.git.cmahapatra@ti.com>
The printk in DSSDBG function definition is replaced with dynamic debug enabled
pr_debug(). The use of dynamic debugging provides more flexibility as each debug
statement can be enabled or disabled dynamically on basis of source filename,
line number, module name etc. by writing to a control file in debugfs
filesystem. For better understanding please refer to
Documentation/dynamic-debug-howto.txt.
The DSSDBGF() differs from DSSDBG() by providing function name. However,
function name, line number, module name and thread ID can be printed through
dynamic debug by setting appropriate flags 'f','l','m' and 't' in the debugfs
control file. So, DSSDBGF instances are replaced with DSSDBG.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
---
drivers/video/omap2/dss/apply.c | 8 ++++----
drivers/video/omap2/dss/dsi.c | 12 ++++++------
drivers/video/omap2/dss/dss.h | 34 ++++++++--------------------------
3 files changed, 18 insertions(+), 36 deletions(-)
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index 19d66f4..e923d9f 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -573,7 +573,7 @@ static void dss_ovl_write_regs(struct omap_overlay *ovl)
struct mgr_priv_data *mp;
int r;
- DSSDBGF("%d", ovl->id);
+ DSSDBG("writing ovl %d regs", ovl->id);
if (!op->enabled || !op->info_dirty)
return;
@@ -608,7 +608,7 @@ static void dss_ovl_write_regs_extra(struct omap_overlay *ovl)
struct ovl_priv_data *op = get_ovl_priv(ovl);
struct mgr_priv_data *mp;
- DSSDBGF("%d", ovl->id);
+ DSSDBG("writing ovl %d regs extra", ovl->id);
if (!op->extra_info_dirty)
return;
@@ -632,7 +632,7 @@ static void dss_mgr_write_regs(struct omap_overlay_manager *mgr)
struct mgr_priv_data *mp = get_mgr_priv(mgr);
struct omap_overlay *ovl;
- DSSDBGF("%d", mgr->id);
+ DSSDBG("writing mgr %d regs", mgr->id);
if (!mp->enabled)
return;
@@ -658,7 +658,7 @@ static void dss_mgr_write_regs_extra(struct omap_overlay_manager *mgr)
{
struct mgr_priv_data *mp = get_mgr_priv(mgr);
- DSSDBGF("%d", mgr->id);
+ DSSDBG("writing mgr %d regs extra", mgr->id);
if (!mp->extra_info_dirty)
return;
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index e37e6d8..3b524cd 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1612,7 +1612,7 @@ int dsi_pll_set_clock_div(struct platform_device *dsidev,
u8 regn_start, regn_end, regm_start, regm_end;
u8 regm_dispc_start, regm_dispc_end, regm_dsi_start, regm_dsi_end;
- DSSDBGF();
+ DSSDBG("DSI PLL clock config starts");
dsi->current_cinfo.clkin = cinfo->clkin;
dsi->current_cinfo.fint = cinfo->fint;
@@ -2431,7 +2431,7 @@ static int dsi_cio_init(struct platform_device *dsidev)
int r;
u32 l;
- DSSDBGF();
+ DSSDBG("DSI CIO init starts");
r = dss_dsi_enable_pads(dsi->module_id, dsi_get_lane_mask(dsidev));
if (r)
@@ -2782,7 +2782,7 @@ static void dsi_vc_initial_config(struct platform_device *dsidev, int channel)
{
u32 r;
- DSSDBGF("%d", channel);
+ DSSDBG("Initial Config of Virtual Channel %d", channel);
r = dsi_read_reg(dsidev, DSI_VC_CTRL(channel));
@@ -2814,7 +2814,7 @@ static int dsi_vc_config_source(struct platform_device *dsidev, int channel,
if (dsi->vc[channel].source = source)
return 0;
- DSSDBGF("%d", channel);
+ DSSDBG("Source Config of Virtual Channel %d", channel);
dsi_sync_vc(dsidev, channel);
@@ -3572,7 +3572,7 @@ static int dsi_enter_ulps(struct platform_device *dsidev)
int r, i;
unsigned mask;
- DSSDBGF();
+ DSSDBG("Entering ULPS");
WARN_ON(!dsi_bus_is_locked(dsidev));
@@ -4276,7 +4276,7 @@ int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev,
unsigned long pck;
int r;
- DSSDBGF("ddr_clk %lu, lp_clk %lu", ddr_clk, lp_clk);
+ DSSDBG("Setting DSI clocks: ddr_clk %lu, lp_clk %lu", ddr_clk, lp_clk);
mutex_lock(&dsi->lock);
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index ffbba7e..5ef4e17 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -25,38 +25,20 @@
#ifdef DEBUG
extern bool dss_debug;
-#ifdef DSS_SUBSYS_NAME
-#define DSSDBG(format, ...) \
- if (dss_debug) \
- printk(KERN_DEBUG "omapdss " DSS_SUBSYS_NAME ": " format, \
- ## __VA_ARGS__)
-#else
-#define DSSDBG(format, ...) \
- if (dss_debug) \
- printk(KERN_DEBUG "omapdss: " format, ## __VA_ARGS__)
#endif
-#ifdef DSS_SUBSYS_NAME
-#define DSSDBGF(format, ...) \
- if (dss_debug) \
- printk(KERN_DEBUG "omapdss " DSS_SUBSYS_NAME \
- ": %s(" format ")\n", \
- __func__, \
- ## __VA_ARGS__)
-#else
-#define DSSDBGF(format, ...) \
- if (dss_debug) \
- printk(KERN_DEBUG "omapdss: " \
- ": %s(" format ")\n", \
- __func__, \
- ## __VA_ARGS__)
+#ifdef pr_fmt
+#undef pr_fmt
#endif
-#else /* DEBUG */
-#define DSSDBG(format, ...)
-#define DSSDBGF(format, ...)
+#ifdef DSS_SUBSYS_NAME
+#define pr_fmt(fmt) DSS_SUBSYS_NAME ": " fmt
+#else
+#define pr_fmt(fmt) fmt
#endif
+#define DSSDBG(format, ...) \
+ pr_debug(format, ## __VA_ARGS__)
#ifdef DSS_SUBSYS_NAME
#define DSSERR(format, ...) \
--
1.7.10
^ permalink raw reply related
* [PATCH 6/6] OMAPDSS: remove <plat/cpu.h> includes
From: Tomi Valkeinen @ 2012-09-28 10:35 UTC (permalink / raw)
To: linux-omap, linux-fbdev
Cc: Archit Taneja, Chandrabhanu Mahapatra, Raphaël Assénat,
Tony Lindgren, Tomi Valkeinen
In-Reply-To: <1348828527-13309-1-git-send-email-tomi.valkeinen@ti.com>
cpu_is_* calls are no longer used in omapdss, so the includes for
<plat/cpu.h> can be removed.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dss.c | 2 --
drivers/video/omap2/dss/dss_features.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 2e74eef..363852a 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -35,8 +35,6 @@
#include <video/omapdss.h>
-#include <plat/cpu.h>
-
#include "dss.h"
#include "dss_features.h"
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index e2c2e2b..3e8287c 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -23,7 +23,6 @@
#include <linux/slab.h>
#include <video/omapdss.h>
-#include <plat/cpu.h>
#include "dss.h"
#include "dss_features.h"
--
1.7.9.5
^ permalink raw reply related
* [PATCH 5/6] OMAPDSS: HDMI: use omapdss_version
From: Tomi Valkeinen @ 2012-09-28 10:35 UTC (permalink / raw)
To: linux-omap, linux-fbdev
Cc: Archit Taneja, Chandrabhanu Mahapatra, Raphaël Assénat,
Tony Lindgren, Tomi Valkeinen
In-Reply-To: <1348828527-13309-1-git-send-email-tomi.valkeinen@ti.com>
Use omapdss_version in hdmi.c to select the proper hdmi features.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dss_features.c | 14 ++++++++++++--
drivers/video/omap2/dss/dss_features.h | 3 ++-
drivers/video/omap2/dss/hdmi.c | 3 ++-
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index 5936ba7..e2c2e2b 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -825,10 +825,20 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = {
};
-void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data)
+void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data,
+ enum omapdss_version version)
{
- if (cpu_is_omap44xx())
+ switch (version) {
+ case OMAPDSS_VER_OMAP4430_ES1:
+ case OMAPDSS_VER_OMAP4430_ES2:
+ case OMAPDSS_VER_OMAP4:
ip_data->ops = &omap4_hdmi_functions;
+ break;
+ default:
+ ip_data->ops = NULL;
+ }
+
+ WARN_ON(ip_data->ops = NULL);
}
#endif
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h
index 14a412e..fc492ef 100644
--- a/drivers/video/omap2/dss/dss_features.h
+++ b/drivers/video/omap2/dss/dss_features.h
@@ -125,6 +125,7 @@ bool dss_has_feature(enum dss_feat_id id);
void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end);
void dss_features_init(enum omapdss_version version);
#if defined(CONFIG_OMAP4_DSS_HDMI)
-void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data);
+void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data,
+ enum omapdss_version version);
#endif
#endif
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index a48a7dd..adcc906 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -323,6 +323,7 @@ static void hdmi_runtime_put(void)
static int __init hdmi_init_display(struct omap_dss_device *dssdev)
{
+ struct omap_dss_board_info *pdata = hdmi.pdev->dev.platform_data;
int r;
struct gpio gpios[] = {
@@ -333,7 +334,7 @@ static int __init hdmi_init_display(struct omap_dss_device *dssdev)
DSSDBG("init_display\n");
- dss_init_hdmi_ip_ops(&hdmi.ip_data);
+ dss_init_hdmi_ip_ops(&hdmi.ip_data, pdata->version);
if (hdmi.vdda_hdmi_dac_reg = NULL) {
struct regulator *reg;
--
1.7.9.5
^ permalink raw reply related
* [PATCH 4/6] OMAPDSS: DSS: use omapdss_version
From: Tomi Valkeinen @ 2012-09-28 10:35 UTC (permalink / raw)
To: linux-omap, linux-fbdev
Cc: Archit Taneja, Chandrabhanu Mahapatra, Raphaël Assénat,
Tony Lindgren, Tomi Valkeinen
In-Reply-To: <1348828527-13309-1-git-send-email-tomi.valkeinen@ti.com>
Use omapdss_version in dss.c to select the proper dss features.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dss.c | 37 +++++++++++++++++++++++++++----------
1 file changed, 27 insertions(+), 10 deletions(-)
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 2ab1c3e..2e74eef 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -792,29 +792,46 @@ static const struct dss_features omap54xx_dss_feats __initconst = {
.dpi_select_source = &dss_dpi_select_source_omap5,
};
-static int __init dss_init_features(struct device *dev)
+static int __init dss_init_features(struct platform_device *pdev)
{
+ struct omap_dss_board_info *pdata = pdev->dev.platform_data;
const struct dss_features *src;
struct dss_features *dst;
- dst = devm_kzalloc(dev, sizeof(*dst), GFP_KERNEL);
+ dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
if (!dst) {
- dev_err(dev, "Failed to allocate local DSS Features\n");
+ dev_err(&pdev->dev, "Failed to allocate local DSS Features\n");
return -ENOMEM;
}
- if (cpu_is_omap24xx())
+ switch (pdata->version) {
+ case OMAPDSS_VER_OMAP24xx:
src = &omap24xx_dss_feats;
- else if (cpu_is_omap34xx())
+ break;
+
+ case OMAPDSS_VER_OMAP34xx_ES1:
+ case OMAPDSS_VER_OMAP34xx_ES3:
+ case OMAPDSS_VER_AM35xx:
src = &omap34xx_dss_feats;
- else if (cpu_is_omap3630())
+ break;
+
+ case OMAPDSS_VER_OMAP3630:
src = &omap3630_dss_feats;
- else if (cpu_is_omap44xx())
+ break;
+
+ case OMAPDSS_VER_OMAP4430_ES1:
+ case OMAPDSS_VER_OMAP4430_ES2:
+ case OMAPDSS_VER_OMAP4:
src = &omap44xx_dss_feats;
- else if (soc_is_omap54xx())
+ break;
+
+ case OMAPDSS_VER_OMAP5:
src = &omap54xx_dss_feats;
- else
+ break;
+
+ default:
return -ENODEV;
+ }
memcpy(dst, src, sizeof(*dst));
dss.feat = dst;
@@ -831,7 +848,7 @@ static int __init omap_dsshw_probe(struct platform_device *pdev)
dss.pdev = pdev;
- r = dss_init_features(&dss.pdev->dev);
+ r = dss_init_features(dss.pdev);
if (r)
return r;
--
1.7.9.5
^ permalink raw reply related
* [PATCH 3/6] OMAPDSS: DISPC: use omapdss_version
From: Tomi Valkeinen @ 2012-09-28 10:35 UTC (permalink / raw)
To: linux-omap, linux-fbdev
Cc: Archit Taneja, Chandrabhanu Mahapatra, Raphaël Assénat,
Tony Lindgren, Tomi Valkeinen
In-Reply-To: <1348828527-13309-1-git-send-email-tomi.valkeinen@ti.com>
Use omapdss_version in dispc.c to select the proper dispc features.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/dispc.c | 41 ++++++++++++++++++++++++++-------------
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index a173a94..a5ab354 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -4040,29 +4040,44 @@ static const struct dispc_features omap44xx_dispc_feats __initconst = {
.gfx_fifo_workaround = true,
};
-static int __init dispc_init_features(struct device *dev)
+static int __init dispc_init_features(struct platform_device *pdev)
{
+ struct omap_dss_board_info *pdata = pdev->dev.platform_data;
const struct dispc_features *src;
struct dispc_features *dst;
- dst = devm_kzalloc(dev, sizeof(*dst), GFP_KERNEL);
+ dst = devm_kzalloc(&pdev->dev, sizeof(*dst), GFP_KERNEL);
if (!dst) {
- dev_err(dev, "Failed to allocate DISPC Features\n");
+ dev_err(&pdev->dev, "Failed to allocate DISPC Features\n");
return -ENOMEM;
}
- if (cpu_is_omap24xx()) {
+ switch (pdata->version) {
+ case OMAPDSS_VER_OMAP24xx:
src = &omap24xx_dispc_feats;
- } else if (cpu_is_omap34xx()) {
- if (omap_rev() < OMAP3430_REV_ES3_0)
- src = &omap34xx_rev1_0_dispc_feats;
- else
- src = &omap34xx_rev3_0_dispc_feats;
- } else if (cpu_is_omap44xx()) {
+ break;
+
+ case OMAPDSS_VER_OMAP34xx_ES1:
+ src = &omap34xx_rev1_0_dispc_feats;
+ break;
+
+ case OMAPDSS_VER_OMAP34xx_ES3:
+ case OMAPDSS_VER_OMAP3630:
+ case OMAPDSS_VER_AM35xx:
+ src = &omap34xx_rev3_0_dispc_feats;
+ break;
+
+ case OMAPDSS_VER_OMAP4430_ES1:
+ case OMAPDSS_VER_OMAP4430_ES2:
+ case OMAPDSS_VER_OMAP4:
src = &omap44xx_dispc_feats;
- } else if (soc_is_omap54xx()) {
+ break;
+
+ case OMAPDSS_VER_OMAP5:
src = &omap44xx_dispc_feats;
- } else {
+ break;
+
+ default:
return -ENODEV;
}
@@ -4082,7 +4097,7 @@ static int __init omap_dispchw_probe(struct platform_device *pdev)
dispc.pdev = pdev;
- r = dispc_init_features(&dispc.pdev->dev);
+ r = dispc_init_features(dispc.pdev);
if (r)
return r;
--
1.7.9.5
^ permalink raw reply related
* [PATCH 2/6] OMAPDSS: use omapdss_version in dss_features.c
From: Tomi Valkeinen @ 2012-09-28 10:35 UTC (permalink / raw)
To: linux-omap, linux-fbdev
Cc: Archit Taneja, Chandrabhanu Mahapatra, Raphaël Assénat,
Tony Lindgren, Tomi Valkeinen
In-Reply-To: <1348828527-13309-1-git-send-email-tomi.valkeinen@ti.com>
Pass the omapdss_version to dss_features.c and use it to select the
proper dss features.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/core.c | 2 +-
drivers/video/omap2/dss/dss_features.c | 49 +++++++++++++++++++++-----------
drivers/video/omap2/dss/dss_features.h | 2 +-
3 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index b2af72d..d94ef9e 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -237,7 +237,7 @@ static int __init omap_dss_probe(struct platform_device *pdev)
core.pdev = pdev;
- dss_features_init();
+ dss_features_init(pdata->version);
dss_apply_init();
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index acbc1e1..5936ba7 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -929,29 +929,44 @@ bool dss_feat_rotation_type_supported(enum omap_dss_rotation_type rot_type)
return omap_current_dss_features->supported_rotation_types & rot_type;
}
-void dss_features_init(void)
+void dss_features_init(enum omapdss_version version)
{
- if (cpu_is_omap24xx())
+ switch (version) {
+ case OMAPDSS_VER_OMAP24xx:
omap_current_dss_features = &omap2_dss_features;
- else if (cpu_is_omap3630())
+ break;
+
+ case OMAPDSS_VER_OMAP34xx_ES1:
+ case OMAPDSS_VER_OMAP34xx_ES3:
+ omap_current_dss_features = &omap3430_dss_features;
+ break;
+
+ case OMAPDSS_VER_OMAP3630:
omap_current_dss_features = &omap3630_dss_features;
- else if (cpu_is_omap34xx()) {
- if (soc_is_am35xx()) {
- omap_current_dss_features = &am35xx_dss_features;
- } else {
- omap_current_dss_features = &omap3430_dss_features;
- }
- }
- else if (omap_rev() = OMAP4430_REV_ES1_0)
+ break;
+
+ case OMAPDSS_VER_OMAP4430_ES1:
omap_current_dss_features = &omap4430_es1_0_dss_features;
- else if (omap_rev() = OMAP4430_REV_ES2_0 ||
- omap_rev() = OMAP4430_REV_ES2_1 ||
- omap_rev() = OMAP4430_REV_ES2_2)
+ break;
+
+ case OMAPDSS_VER_OMAP4430_ES2:
omap_current_dss_features = &omap4430_es2_0_1_2_dss_features;
- else if (cpu_is_omap44xx())
+ break;
+
+ case OMAPDSS_VER_OMAP4:
omap_current_dss_features = &omap4_dss_features;
- else if (soc_is_omap54xx())
+ break;
+
+ case OMAPDSS_VER_OMAP5:
omap_current_dss_features = &omap5_dss_features;
- else
+ break;
+
+ case OMAPDSS_VER_AM35xx:
+ omap_current_dss_features = &am35xx_dss_features;
+ break;
+
+ default:
DSSWARN("Unsupported OMAP version");
+ break;
+ }
}
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h
index 9218113..14a412e 100644
--- a/drivers/video/omap2/dss/dss_features.h
+++ b/drivers/video/omap2/dss/dss_features.h
@@ -123,7 +123,7 @@ bool dss_feat_rotation_type_supported(enum omap_dss_rotation_type rot_type);
bool dss_has_feature(enum dss_feat_id id);
void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end);
-void dss_features_init(void);
+void dss_features_init(enum omapdss_version version);
#if defined(CONFIG_OMAP4_DSS_HDMI)
void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data);
#endif
--
1.7.9.5
^ permalink raw reply related
* [PATCH 1/6] OMAPDSS: add omapdss_version
From: Tomi Valkeinen @ 2012-09-28 10:35 UTC (permalink / raw)
To: linux-omap, linux-fbdev
Cc: Archit Taneja, Chandrabhanu Mahapatra, Raphaël Assénat,
Tony Lindgren, Tomi Valkeinen
In-Reply-To: <1348828527-13309-1-git-send-email-tomi.valkeinen@ti.com>
Add new enum, omapdss_version, that is used to tell which DSS hardware
version the SoC has. This enum is initialized during platform init, and
passed in the platform data to omapdss driver.
Note that the versions are not "continuous", that is, you cannot check
if the version is less or greater than something, but you need to check
for exact version match. In other words, this is invalid:
/* test if DSS is 3630 or earlier */
if (ver <= OMAPDSS_VER_OMAP3630)
...
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
arch/arm/mach-omap2/display.c | 38 ++++++++++++++++++++++++++++++++++++++
include/video/omapdss.h | 14 ++++++++++++++
2 files changed, 52 insertions(+)
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index ee40739..33555da 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -284,6 +284,35 @@ err:
return ERR_PTR(r);
}
+static enum omapdss_version omap_display_get_version(void)
+{
+ if (cpu_is_omap24xx())
+ return OMAPDSS_VER_OMAP24xx;
+ else if (cpu_is_omap3630())
+ return OMAPDSS_VER_OMAP3630;
+ else if (cpu_is_omap34xx()) {
+ if (soc_is_am35xx()) {
+ return OMAPDSS_VER_AM35xx;
+ } else {
+ if (omap_rev() < OMAP3430_REV_ES3_0)
+ return OMAPDSS_VER_OMAP34xx_ES1;
+ else
+ return OMAPDSS_VER_OMAP34xx_ES3;
+ }
+ } else if (omap_rev() = OMAP4430_REV_ES1_0)
+ return OMAPDSS_VER_OMAP4430_ES1;
+ else if (omap_rev() = OMAP4430_REV_ES2_0 ||
+ omap_rev() = OMAP4430_REV_ES2_1 ||
+ omap_rev() = OMAP4430_REV_ES2_2)
+ return OMAPDSS_VER_OMAP4430_ES2;
+ else if (cpu_is_omap44xx())
+ return OMAPDSS_VER_OMAP4;
+ else if (soc_is_omap54xx())
+ return OMAPDSS_VER_OMAP5;
+ else
+ return OMAPDSS_VER_UNKNOWN
+}
+
int __init omap_display_init(struct omap_dss_board_info *board_data)
{
int r = 0;
@@ -291,9 +320,18 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
int i, oh_count;
const struct omap_dss_hwmod_data *curr_dss_hwmod;
struct platform_device *dss_pdev;
+ enum omapdss_version ver;
/* create omapdss device */
+ ver = omap_display_get_version();
+
+ if (ver = OMAPDSS_VER_UNKNOWN) {
+ pr_err("DSS not supported on this SoC\n");
+ return -ENODEV;
+ }
+
+ board_data->version = ver;
board_data->dsi_enable_pads = omap_dsi_enable_pads;
board_data->dsi_disable_pads = omap_dsi_disable_pads;
board_data->get_context_loss_count = omap_pm_get_dev_context_loss_count;
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 3729173..88c8294 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -314,6 +314,19 @@ int dsi_vc_send_bta_sync(struct omap_dss_device *dssdev, int channel);
int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel);
void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel);
+enum omapdss_version {
+ OMAPDSS_VER_UNKNOWN = 0,
+ OMAPDSS_VER_OMAP24xx,
+ OMAPDSS_VER_OMAP34xx_ES1, /* OMAP3430 ES1.0, 2.0 */
+ OMAPDSS_VER_OMAP34xx_ES3, /* OMAP3430 ES3.0+ */
+ OMAPDSS_VER_OMAP3630,
+ OMAPDSS_VER_AM35xx,
+ OMAPDSS_VER_OMAP4430_ES1, /* OMAP4430 ES1.0 */
+ OMAPDSS_VER_OMAP4430_ES2, /* OMAP4430 ES2.0, 2.1, 2.2 */
+ OMAPDSS_VER_OMAP4, /* All other OMAP4s */
+ OMAPDSS_VER_OMAP5,
+};
+
/* Board specific data */
struct omap_dss_board_info {
int (*get_context_loss_count)(struct device *dev);
@@ -323,6 +336,7 @@ struct omap_dss_board_info {
int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask);
void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask);
int (*set_min_bus_tput)(struct device *dev, unsigned long r);
+ enum omapdss_version version;
};
/* Init with the board info */
--
1.7.9.5
^ permalink raw reply related
* [PATCH 0/6] OMAPDSS: remove cpu_is_* calls
From: Tomi Valkeinen @ 2012-09-28 10:35 UTC (permalink / raw)
To: linux-omap, linux-fbdev
Cc: Archit Taneja, Chandrabhanu Mahapatra, Raphaël Assénat,
Tony Lindgren, Tomi Valkeinen
Hi,
This series adds an omapdss_version enum that is passed via platform data to
omapdss driver. This version identifier is then used instead of cpu_is_*()
calls.
After these, omapdss no longer contains any plat/ or mach/ includes. omapfb,
vrfb and vram still do, though.
Tomi
Tomi Valkeinen (6):
OMAPDSS: add omapdss_version
OMAPDSS: use omapdss_version in dss_features.c
OMAPDSS: DISPC: use omapdss_version
OMAPDSS: DSS: use omapdss_version
OMAPDSS: HDMI: use omapdss_version
OMAPDSS: remove <plat/cpu.h> includes
arch/arm/mach-omap2/display.c | 38 +++++++++++++++++++
drivers/video/omap2/dss/core.c | 2 +-
drivers/video/omap2/dss/dispc.c | 41 +++++++++++++-------
drivers/video/omap2/dss/dss.c | 39 +++++++++++++------
drivers/video/omap2/dss/dss_features.c | 64 ++++++++++++++++++++++----------
drivers/video/omap2/dss/dss_features.h | 5 ++-
drivers/video/omap2/dss/hdmi.c | 3 +-
include/video/omapdss.h | 14 +++++++
8 files changed, 157 insertions(+), 49 deletions(-)
--
1.7.9.5
^ permalink raw reply
* [PATCH V3 1/3] OMAPDSS: Move definition of DEBUG flag to Makefile
From: Chandrabhanu Mahapatra @ 2012-09-28 10:35 UTC (permalink / raw)
To: tomi.valkeinen; +Cc: linux-omap, linux-fbdev, Chandrabhanu Mahapatra
In-Reply-To: <cover.1348826106.git.cmahapatra@ti.com>
In OMAPDSS the DEBUG flag is set only after the OMAPDSS module is called, for
which the debugging capabilities are available only after its proper
initialization. As a result of which tracking of bugs prior to or during initial
process becomes difficult. So, the definition of DEBUG is being moved to the
corresponding Makefile.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
---
drivers/video/omap2/dss/Makefile | 1 +
drivers/video/omap2/dss/dss.h | 4 ----
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile
index 4549869..86493e3 100644
--- a/drivers/video/omap2/dss/Makefile
+++ b/drivers/video/omap2/dss/Makefile
@@ -8,3 +8,4 @@ omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o
omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o
omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o \
hdmi_panel.o ti_hdmi_4xxx_ip.o
+ccflags-$(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) += -DDEBUG
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 6728892..ffbba7e 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -23,10 +23,6 @@
#ifndef __OMAP2_DSS_H
#define __OMAP2_DSS_H
-#ifdef CONFIG_OMAP2_DSS_DEBUG_SUPPORT
-#define DEBUG
-#endif
-
#ifdef DEBUG
extern bool dss_debug;
#ifdef DSS_SUBSYS_NAME
--
1.7.10
^ permalink raw reply related
* [PATCH V3 0/3] OMAPDSS: Enable dynamic debug printing
From: Chandrabhanu Mahapatra @ 2012-09-28 10:35 UTC (permalink / raw)
To: tomi.valkeinen; +Cc: linux-omap, linux-fbdev, Chandrabhanu Mahapatra
In-Reply-To: <cover.1348636132.git.cmahapatra@ti.com>
Hi everyone,
this patch series aims at cleaning up of DSS of printk()'s enabled with
dss_debug and replace them with generic dynamic debug printing.
The 1st patch
* moved DEBUG flag definition to Makefile
The 2nd patch
* replaces printk() in DSSDBG definition with pr_debug()
* removes DSSDBGF definition and replaces its instances with DSSDBG()
The 3rd patch
* cleans up printk()'s in omap_dispc_unregister_isr() and
_dsi_print_reset_status() with pr_debug()
* removes dss_debug variable
Changes from V1 to V2:
* added debug messages to DSSDBG calls
* added patch "OMAPDSS: Remove dss_debug variable"
Changes from V2 to V3
* added patch "OMAPDSS: Move definition of DEBUG flag to Makefile"
All your comments and suggestions are welcome.
Refenence Tree:
git://gitorious.org/linux-omap-dss2/chandrabhanus-linux.git dss_cleanup
Regards,
Chandrabhanu
Chandrabhanu Mahapatra (3):
OMAPDSS: Move definition of DEBUG flag to Makefile
OMAPDSS: Cleanup DSSDBG with dynamic pr_debug function
OMAPDSS: Remove dss_debug variable
drivers/video/omap2/dss/Makefile | 1 +
drivers/video/omap2/dss/apply.c | 8 +++----
drivers/video/omap2/dss/core.c | 5 ----
drivers/video/omap2/dss/dispc.c | 39 +++++++++++-------------------
drivers/video/omap2/dss/dsi.c | 49 ++++++++++++++++----------------------
drivers/video/omap2/dss/dss.h | 38 +++++------------------------
6 files changed, 45 insertions(+), 95 deletions(-)
--
1.7.10
^ permalink raw reply
* Re: [PATCH V3] video: exynos_dp: Add device tree support to DP driver
From: Sylwester Nawrocki @ 2012-09-28 8:25 UTC (permalink / raw)
To: Jingoo Han
Cc: Tomasz Figa, 'Ajay Kumar', linux-samsung-soc, linux-fbdev,
FlorianSchandinat, thomas.ab, 'devicetree-discuss'
In-Reply-To: <1511551.R6uMubmq1B@flatron>
On 09/28/2012 08:48 AM, Tomasz Figa wrote:
>>>> + display-port-controller {
>>>> + compatible = "samsung,exynos5-dp";
>>>> + reg =<0x145B0000 0x10000>;
>>>> + interrupts =<10 3>;
>>>> + interrupt-parent =<&combiner>;
>>>> + dp_phy =<&dptx_phy>;
>>>
>>> Shouldn't it be "samsung,dp_phy" ?
>>
>> Do you mean this ? It is not working.
>> + dp_phy = "samsung,dp_phy";
>
> I believe he meant:
>
> -+ dp_phy =<&dptx_phy>;
> ++ samsung,dp_phy =<&dptx_phy>;
>
> to mark that this is a Samsung-specific property.
Yes, that's what I meant. Sorry for imprecise wording.
Regards,
Sylwester
^ permalink raw reply
* Re: [PATCH V3] video: exynos_dp: Add device tree support to DP driver
From: Jingoo Han @ 2012-09-28 8:09 UTC (permalink / raw)
To: 'Tomasz Figa'
Cc: 'Sylwester Nawrocki', 'Ajay Kumar',
linux-samsung-soc, linux-fbdev, FlorianSchandinat, thomas.ab,
'devicetree-discuss', 'Jingoo Han'
In-Reply-To: <1511551.R6uMubmq1B@flatron>
On Friday, September 28, 2012 3:48 PM Tomasz Figa wrote
>
> Hi,
>
> On Friday 28 of September 2012 09:11:09 Jingoo Han wrote:
> > On Thursday, September 27, 2012 10:45 PM Sylwester Nawrocki wrote
> > > > +Example:
> > > > +
> > > > +SOC specific portion:
> > > > + dptx_phy: dptx_phy@0x10040720 {
> > > > + compatible = "samsung,dp-phy";
> > > > + samsung,dptx_phy_reg =<0x10040720>;
> > > > + samsung,enable_bit =<1>;
> > > > + };
> > > > +
> > > > + display-port-controller {
> > > > + compatible = "samsung,exynos5-dp";
> > > > + reg =<0x145B0000 0x10000>;
> > > > + interrupts =<10 3>;
> > > > + interrupt-parent =<&combiner>;
> > > > + dp_phy =<&dptx_phy>;
> > >
> > > Shouldn't it be "samsung,dp_phy" ?
> >
> > Do you mean this ? It is not working.
> > + dp_phy = "samsung,dp_phy";
>
> I believe he meant:
>
> -+ dp_phy =<&dptx_phy>;
> ++ samsung,dp_phy =<&dptx_phy>;
>
> to mark that this is a Samsung-specific property.
Oh, I see.
Yes, "samsung,dp_phy =<&dptx_phy>" is right.
As you mentioned, this is a Samsung-specific property.
Thank you.
Best regards,
Jingoo Han
>
> Best regards,
> Tomasz Figa
^ permalink raw reply
* Contact Email: dhldeliveryservice21@gmail.com
From: Fabbrica del Talento @ 2012-09-28 7:52 UTC (permalink / raw)
To: linux-fbdev
This is to re-notify you of the 21,870.56 us dollar cheque that was deposited here in the DHL office in your name. You should contact Dispatch Officer Collins Gianni you are therefore advice to contact the delivery officer
Contact Email: dhldeliveryservice21@gmail.com
Contact Person: Collins Gianni
Full Name:............ Address:.............
City:........Country:.......... Phone:.........
Regards,
Eric Morrow
United Nations donation coordinator
^ permalink raw reply
* Re: [PATCH V3] video: exynos_dp: Add device tree support to DP driver
From: Tomasz Figa @ 2012-09-28 6:48 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Sylwester Nawrocki', 'Ajay Kumar',
linux-samsung-soc, linux-fbdev, FlorianSchandinat, thomas.ab,
'devicetree-discuss'
In-Reply-To: <000601cd9d0d$c3296ca0$497c45e0$%han@samsung.com>
Hi,
On Friday 28 of September 2012 09:11:09 Jingoo Han wrote:
> On Thursday, September 27, 2012 10:45 PM Sylwester Nawrocki wrote
> > > +Example:
> > > +
> > > +SOC specific portion:
> > > + dptx_phy: dptx_phy@0x10040720 {
> > > + compatible = "samsung,dp-phy";
> > > + samsung,dptx_phy_reg =<0x10040720>;
> > > + samsung,enable_bit =<1>;
> > > + };
> > > +
> > > + display-port-controller {
> > > + compatible = "samsung,exynos5-dp";
> > > + reg =<0x145B0000 0x10000>;
> > > + interrupts =<10 3>;
> > > + interrupt-parent =<&combiner>;
> > > + dp_phy =<&dptx_phy>;
> >
> > Shouldn't it be "samsung,dp_phy" ?
>
> Do you mean this ? It is not working.
> + dp_phy = "samsung,dp_phy";
I believe he meant:
-+ dp_phy =<&dptx_phy>;
++ samsung,dp_phy =<&dptx_phy>;
to mark that this is a Samsung-specific property.
Best regards,
Tomasz Figa
^ permalink raw reply
* Re: [PATCH V3] video: exynos_dp: Add device tree support to DP driver
From: Jingoo Han @ 2012-09-28 0:11 UTC (permalink / raw)
To: 'Sylwester Nawrocki', 'Ajay Kumar'
Cc: linux-samsung-soc, linux-fbdev, FlorianSchandinat, thomas.ab,
'devicetree-discuss', 'Jingoo Han'
In-Reply-To: <50645848.6080102@gmail.com>
On Thursday, September 27, 2012 10:45 PM Sylwester Nawrocki wrote
>
> Hi,
>
> Cc: devicetree-discuss@lists.ozlabs.org
>
> On 09/24/2012 09:36 PM, Ajay Kumar wrote:
> > This patch enables device tree based discovery support for DP driver.
> > The driver is modified to handle platform data in both the cases:
> > with DT and non-DT.
> > Documentation is also added for the DT bindings.
> >
> > DP-PHY should be regarded as a seperate device node while
> > being passed from device tree list, and device node for
> > DP should contain DP-PHY as child node with property name "dp-phy"
> > associated with it.
> >
> > Signed-off-by: Ajay Kumar<ajaykumar.rs@samsung.com>
> > ---
> > .../devicetree/bindings/video/exynos_dp.txt | 83 ++++++++++
> > drivers/video/exynos/exynos_dp_core.c | 168 ++++++++++++++++++--
> > drivers/video/exynos/exynos_dp_core.h | 2 +
> > 3 files changed, 239 insertions(+), 14 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/video/exynos_dp.txt
> >
> > diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt
> b/Documentation/devicetree/bindings/video/exynos_dp.txt
> > new file mode 100644
> > index 0000000..c27f892
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt
> > @@ -0,0 +1,83 @@
> > +Exynos Displayport driver should configure the displayport interface
>
> Don't we need a whitespace between 'display' and 'port' ?
Either 'display port' or 'DisplayPort' is commonly used.
For clarity, display port would be better.
>
> > +based on the type of panel connected to it.
> > +
> > +We use two nodes:
> > + -dptx_phy node
> > + -display-port-controller node
> > +
> > +For the dp-phy initialization, we use a dptx_phy node.
> > +Required properties for dptx_phy:
> > + -compatible:
> > + Should be "samsung,dp-phy".
> > + -samsung,dptx_phy_reg:
> > + Base address of DP PHY register.
>
> Couldn't just 'reg' be used for this one ?
>
> > + -samsung,enable_bit:
> > + The bit used to enable/disable DP PHY.
>
> Is this the bit mask or the bit index ? In the code it's used as
> a bitmask. But from description it is not clear whether it is
> an index or a mask. Is it different across various SoCs ?
>
> Perhaps it's better to name it samsung,enable_mask (in case some
> SoC need more than one bit) ?
It's the bit mask.
It is different across various SoCs.
OK, enable_mask would be better.
>
> > +
> > +For the Panel initialization, we read data from display-port-controller node.
> > +Required properties for display-port-controller:
> > + -compatible:
> > + Should be "samsung,exynos5-dp".
> > + -reg:
> > + physical base address of the controller and length
> > + of memory mapped region.
> > + -interrupts:
> > + Internet combiner values.
>
> what? :)
Ajay: Please, fix it.
>
> > + -interrupt-parent:
> > + Address of Interrupt combiner node.
> > + -dp_phy:
> > + Address of dptx_phy node.
>
> "A phandle to dptx_phy node" ?
Yes, you're right.
Ajay: Please, replace 'Address of dptx_phy node'
with 'phandle of dptx_phy node'.
>
> > + -samsung,color_space:
> > + input video data format.
> > + COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2
>
> Can this be changed at run time ?
No, it is not changeable.
It's a default setting according to eDP panel.
>
> > + -samsung,dynamic_range:
> > + dynamic range for input video data.
> > + VESA = 0, CEA = 1
>
> Why is it in the device tree ? Shouldn't it be configurable at runtime ?
> My apologies if this an obvious question, I don't have much experience
> with DP.
Same above.
>
> > + -samsung,ycbcr_coeff:
> > + YCbCr co-efficients for input video.
> > + COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1
> > + -samsung,color_depth:
> > + Bit per color component.
>
> "Number of bits per colour component" ? Also same remark as above.
Same above.
>
> > + COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3
> > + -samsung,link_rate:
> > + link rates supportd by the panel.
>
> typo: supportd -> supported
Ajay: Please fix it.
>
> > + LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A
>
> Is this really a property of a panel ? Why it is in the PHY node ?
> Also I can see this is just a single property, so "link rates" is a bit
> misleading.
>
Yes, It's a property of LCD panel.
It is not in the 'PHY' node, but 'display-port-controller' node.
Ajay: Please replace 'link rates' with 'link rate'.
> > + -samsung,lane_count:
> > + number of lanes supported by the panel.
> > + LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4
>
> What do these symbolic names are needed for ? Is lane_count a number or a
> mask, is this really a _maximum_ number of lanes ? What are the valid values,
> 1, 2 and 4 ? Or maybe 0x3 is also valid which would indicate that we can
> use 1 or 2 data lanes ?
>
These symbolic names are defined in './include/video/exynos_dp.h'.
It seems that Ajay used these definitions.
'lane_count' is a number of used lanes of main link which transfer data
streams as video. The number of lanes of Main Link is 1, 2, or 4 lanes.
It is dependent on eDP panel.
> > + -samsung,interlaced:
> > + Interlace scan mode.
> > + Progressive if defined, Interlaced if not defined
>
> Why do we need this in the device tree ? Is this really a default scan mode ?
> Can it be the changed at runtime ?
No, it is not changeable.
It's a default setting according to eDP panel.
>
> > + -samsung,v_sync_polarity:
> > + VSYNC polarity configuration.
> > + High if defined, Low if not defined
> > + -samsung,h_sync_polarity:
> > + HSYNC polarity configuration.
> > + High if defined, Low if not defined
> > +
> > +Example:
> > +
> > +SOC specific portion:
> > + dptx_phy: dptx_phy@0x10040720 {
> > + compatible = "samsung,dp-phy";
> > + samsung,dptx_phy_reg =<0x10040720>;
> > + samsung,enable_bit =<1>;
> > + };
> > +
> > + display-port-controller {
> > + compatible = "samsung,exynos5-dp";
> > + reg =<0x145B0000 0x10000>;
> > + interrupts =<10 3>;
> > + interrupt-parent =<&combiner>;
> > + dp_phy =<&dptx_phy>;
>
> Shouldn't it be "samsung,dp_phy" ?
Do you mean this ? It is not working.
+ dp_phy = "samsung,dp_phy";
>
> > + };
> > +
> > +Board Specific portion:
> > + display-port-controller {
> > + samsung,color_space =<0>;
> > + samsung,dynamic_range =<0>;
> > + samsung,ycbcr_coeff =<0>;
> > + samsung,color_depth =<1>;
> > + samsung,link_rate =<0x0a>;
> > + samsung,lane_count =<2>;
> > + };
>
> --
>
> Regards,
> Sylwester
^ permalink raw reply
* Re: [PATCH V3] video: exynos_dp: Add device tree support to DP driver
From: Sylwester Nawrocki @ 2012-09-27 13:44 UTC (permalink / raw)
To: Ajay Kumar
Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
FlorianSchandinat-Mmb7MZpHnFY, devicetree-discuss,
jg1.han-Sze3O3UU22JBDgjK7y7TUQ, thomas.ab-Sze3O3UU22JBDgjK7y7TUQ
In-Reply-To: <1348515385-22332-1-git-send-email-ajaykumar.rs-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Hi,
Cc: devicetree-discuss@lists.ozlabs.org
On 09/24/2012 09:36 PM, Ajay Kumar wrote:
> This patch enables device tree based discovery support for DP driver.
> The driver is modified to handle platform data in both the cases:
> with DT and non-DT.
> Documentation is also added for the DT bindings.
>
> DP-PHY should be regarded as a seperate device node while
> being passed from device tree list, and device node for
> DP should contain DP-PHY as child node with property name "dp-phy"
> associated with it.
>
> Signed-off-by: Ajay Kumar<ajaykumar.rs@samsung.com>
> ---
> .../devicetree/bindings/video/exynos_dp.txt | 83 ++++++++++
> drivers/video/exynos/exynos_dp_core.c | 168 ++++++++++++++++++--
> drivers/video/exynos/exynos_dp_core.h | 2 +
> 3 files changed, 239 insertions(+), 14 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/video/exynos_dp.txt
>
> diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt
> new file mode 100644
> index 0000000..c27f892
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt
> @@ -0,0 +1,83 @@
> +Exynos Displayport driver should configure the displayport interface
Don't we need a whitespace between 'display' and 'port' ?
> +based on the type of panel connected to it.
> +
> +We use two nodes:
> + -dptx_phy node
> + -display-port-controller node
> +
> +For the dp-phy initialization, we use a dptx_phy node.
> +Required properties for dptx_phy:
> + -compatible:
> + Should be "samsung,dp-phy".
> + -samsung,dptx_phy_reg:
> + Base address of DP PHY register.
Couldn't just 'reg' be used for this one ?
> + -samsung,enable_bit:
> + The bit used to enable/disable DP PHY.
Is this the bit mask or the bit index ? In the code it's used as
a bitmask. But from description it is not clear whether it is
an index or a mask. Is it different across various SoCs ?
Perhaps it's better to name it samsung,enable_mask (in case some
SoC need more than one bit) ?
> +
> +For the Panel initialization, we read data from display-port-controller node.
> +Required properties for display-port-controller:
> + -compatible:
> + Should be "samsung,exynos5-dp".
> + -reg:
> + physical base address of the controller and length
> + of memory mapped region.
> + -interrupts:
> + Internet combiner values.
what? :)
> + -interrupt-parent:
> + Address of Interrupt combiner node.
> + -dp_phy:
> + Address of dptx_phy node.
"A phandle to dptx_phy node" ?
> + -samsung,color_space:
> + input video data format.
> + COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2
Can this be changed at run time ?
> + -samsung,dynamic_range:
> + dynamic range for input video data.
> + VESA = 0, CEA = 1
Why is it in the device tree ? Shouldn't it be configurable at runtime ?
My apologies if this an obvious question, I don't have much experience
with DP.
> + -samsung,ycbcr_coeff:
> + YCbCr co-efficients for input video.
> + COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1
> + -samsung,color_depth:
> + Bit per color component.
"Number of bits per colour component" ? Also same remark as above.
> + COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3
> + -samsung,link_rate:
> + link rates supportd by the panel.
typo: supportd -> supported
> + LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A
Is this really a property of a panel ? Why it is in the PHY node ?
Also I can see this is just a single property, so "link rates" is a bit
misleading.
> + -samsung,lane_count:
> + number of lanes supported by the panel.
> + LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4
What do these symbolic names are needed for ? Is lane_count a number or a
mask, is this really a _maximum_ number of lanes ? What are the valid values,
1, 2 and 4 ? Or maybe 0x3 is also valid which would indicate that we can
use 1 or 2 data lanes ?
> + -samsung,interlaced:
> + Interlace scan mode.
> + Progressive if defined, Interlaced if not defined
Why do we need this in the device tree ? Is this really a default scan mode ?
Can it be the changed at runtime ?
> + -samsung,v_sync_polarity:
> + VSYNC polarity configuration.
> + High if defined, Low if not defined
> + -samsung,h_sync_polarity:
> + HSYNC polarity configuration.
> + High if defined, Low if not defined
> +
> +Example:
> +
> +SOC specific portion:
> + dptx_phy: dptx_phy@0x10040720 {
> + compatible = "samsung,dp-phy";
> + samsung,dptx_phy_reg =<0x10040720>;
> + samsung,enable_bit =<1>;
> + };
> +
> + display-port-controller {
> + compatible = "samsung,exynos5-dp";
> + reg =<0x145B0000 0x10000>;
> + interrupts =<10 3>;
> + interrupt-parent =<&combiner>;
> + dp_phy =<&dptx_phy>;
Shouldn't it be "samsung,dp_phy" ?
> + };
> +
> +Board Specific portion:
> + display-port-controller {
> + samsung,color_space =<0>;
> + samsung,dynamic_range =<0>;
> + samsung,ycbcr_coeff =<0>;
> + samsung,color_depth =<1>;
> + samsung,link_rate =<0x0a>;
> + samsung,lane_count =<2>;
> + };
--
Regards,
Sylwester
^ permalink raw reply
* Re: [PATCH V2 0/2] OMAPDSS: Enable dynamic debug printing
From: Tomi Valkeinen @ 2012-09-27 11:01 UTC (permalink / raw)
To: Mahapatra, Chandrabhanu; +Cc: linux-omap, linux-fbdev
In-Reply-To: <CAF0AtAvT-NnsREJWpRtYAGpYCS06O32tzQwWTDoFp+xepHyX8w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2451 bytes --]
On Thu, 2012-09-27 at 16:20 +0530, Mahapatra, Chandrabhanu wrote:
> On Wed, Sep 26, 2012 at 7:59 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>
> > This doesn't work quite correctly. The problem is in dss.h, where we
> > define DEBUG if CONFIG_OMAP2_DSS_DEBUG_SUPPORT is set. The thing is,
> > DEBUG should be defined before including the kernel headers where the
> > pr_debug etc are defined.
> >
> > So if you try the patches without dynamic debugging enabled, you won't
> > get any debug outputs at all, even if CONFIG_OMAP2_DSS_DEBUG_SUPPORT is
> > set.
> >
> > And for dynamic debug, the Kconfig help says:
> >
> > If a source file is compiled with DEBUG flag set, any
> > pr_debug() calls in it are enabled by default, but can be
> > disabled at runtime as below. Note that DEBUG flag is
> > turned on by many CONFIG_*DEBUG* options.
> >
> > So if we have CONFIG_OMAP2_DSS_DEBUG_SUPPORT set, all the pr_debugs
> > should be enabled by default, which is not the case, again because DEBUG
> > is defined too late.
> >
> > I think setting DEBUG in dss.h should be removed, and instead DEBUG
> > should be set in the makefile if CONFIG_OMAP2_DSS_DEBUG_SUPPORT is set.
> >
> > Tomi
> >
>
> Well the documentation lags in describing about the DEBUG flag. I
> should have checked DYNAMIC_DEBUG in Kconfig and pr_debug definition
> in printk.h file.
>
> #if defined(CONFIG_DYNAMIC_DEBUG)
> /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
> #define pr_debug(fmt, ...) \
> dynamic_pr_debug(fmt, ##__VA_ARGS__)
> #elif defined(DEBUG)
> #define pr_debug(fmt, ...) \
> printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
> #else
> #define pr_debug(fmt, ...) \
> no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
> #endif
>
> As per the definition above pr_debug is dynamic with
> CONFIG_DYNAMIC_DEBUG set or else with DEBUG set it is just a normal
> kernel debug printk as you have mentioned.
> I still don't get how even if DEBUG is set before DSSDBG() is defined
> in dss.c pr_debug() fails to enable.
Because printk.h is included without DEBUG, thus pr_debug is defined as
no_printk.
> Well anyways, how to do the same in the Makefile? I tried adding
> ccflags-$(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) += -DEBUG
> to makefile in dss directory but of no use.
-D option for the compiler is used to set defines. So it should be
-DDEBUG
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH V2 0/2] OMAPDSS: Enable dynamic debug printing
From: Mahapatra, Chandrabhanu @ 2012-09-27 10:50 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1348669792.2376.51.camel@deskari>
On Wed, Sep 26, 2012 at 7:59 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> This doesn't work quite correctly. The problem is in dss.h, where we
> define DEBUG if CONFIG_OMAP2_DSS_DEBUG_SUPPORT is set. The thing is,
> DEBUG should be defined before including the kernel headers where the
> pr_debug etc are defined.
>
> So if you try the patches without dynamic debugging enabled, you won't
> get any debug outputs at all, even if CONFIG_OMAP2_DSS_DEBUG_SUPPORT is
> set.
>
> And for dynamic debug, the Kconfig help says:
>
> If a source file is compiled with DEBUG flag set, any
> pr_debug() calls in it are enabled by default, but can be
> disabled at runtime as below. Note that DEBUG flag is
> turned on by many CONFIG_*DEBUG* options.
>
> So if we have CONFIG_OMAP2_DSS_DEBUG_SUPPORT set, all the pr_debugs
> should be enabled by default, which is not the case, again because DEBUG
> is defined too late.
>
> I think setting DEBUG in dss.h should be removed, and instead DEBUG
> should be set in the makefile if CONFIG_OMAP2_DSS_DEBUG_SUPPORT is set.
>
> Tomi
>
Well the documentation lags in describing about the DEBUG flag. I
should have checked DYNAMIC_DEBUG in Kconfig and pr_debug definition
in printk.h file.
#if defined(CONFIG_DYNAMIC_DEBUG)
/* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
#define pr_debug(fmt, ...) \
dynamic_pr_debug(fmt, ##__VA_ARGS__)
#elif defined(DEBUG)
#define pr_debug(fmt, ...) \
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#else
#define pr_debug(fmt, ...) \
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#endif
As per the definition above pr_debug is dynamic with
CONFIG_DYNAMIC_DEBUG set or else with DEBUG set it is just a normal
kernel debug printk as you have mentioned.
I still don't get how even if DEBUG is set before DSSDBG() is defined
in dss.c pr_debug() fails to enable.
Well anyways, how to do the same in the Makefile? I tried adding
ccflags-$(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) += -DEBUG
to makefile in dss directory but of no use.
--
Chandrabhanu Mahapatra
Texas Instruments India Pvt. Ltd.
^ permalink raw reply
* [PATCH] video: s3c-fb: use FIMD_V8_VIDTCON0 for EXYNOS5 FIMD
From: Jingoo Han @ 2012-09-27 10:42 UTC (permalink / raw)
To: linux-fbdev
This patch uses FIMD_V8_VIDTCON0 as the address definition
of VIDTCON0 register, because the address offset of VIDTCONx
registers is changed from 0x0 to 0x20000 for EXYNOS5 FIMD.
So, FIMD_V8_VIDTCON0 should be used.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/video/s3c-fb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 52b744f..8e1555d 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1910,7 +1910,7 @@ static struct s3c_fb_driverdata s3c_fb_data_exynos4 = {
static struct s3c_fb_driverdata s3c_fb_data_exynos5 = {
.variant = {
.nr_windows = 5,
- .vidtcon = VIDTCON0,
+ .vidtcon = FIMD_V8_VIDTCON0,
.wincon = WINCON(0),
.winmap = WINxMAP(0),
.keycon = WKEYCON,
--
1.7.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox