Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344575
b: refs/heads/master
c: 9253d2d
h: refs/heads/master
i:
  344573: 48a6bb3
  344571: 2d6289c
  344567: 83938d7
  344559: 1132e84
  344543: 2a21169
  344511: 7b0ecc2
  344447: a9e92ac
  344319: 06c8c6d
  344063: 542864c
v: v3
  • Loading branch information
Tomi Valkeinen committed Oct 18, 2012
1 parent 79b28de commit 578532e
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 183 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97fbd0fc9f36105c68cf235fd9bffb3e517d2e06
refs/heads/master: 9253d2d861129b2290ac6523ee59d460dbfc7928
22 changes: 16 additions & 6 deletions trunk/drivers/video/omap2/dss/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,26 @@ config OMAP2_VRAM_SIZE
You can also set this with "vram=<bytes>" kernel argument, or
in the board file.

config OMAP2_DSS_DEBUG_SUPPORT
bool "Debug support"
default y
config OMAP2_DSS_DEBUG
bool "Debug support"
default n
help
This enables printing of debug messages. Alternatively, debug messages
can also be enabled by setting CONFIG_DYNAMIC_DEBUG and then setting
appropriate flags in <debugfs>/dynamic_debug/control.

config OMAP2_DSS_DEBUGFS
bool "Debugfs filesystem support"
depends on DEBUG_FS
default n
help
This enables debug messages. You need to enable printing
with 'debug' module parameter.
This enables debugfs for OMAPDSS at <debugfs>/omapdss. This enables
querying about clock configuration and register configuration of dss,
dispc, dsi, hdmi and rfbi.

config OMAP2_DSS_COLLECT_IRQ_STATS
bool "Collect DSS IRQ statistics"
depends on OMAP2_DSS_DEBUG_SUPPORT
depends on OMAP2_DSS_DEBUGFS
default n
help
Collect DSS IRQ statistics, printable via debugfs.
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/video/omap2/dss/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) += -DDEBUG
8 changes: 4 additions & 4 deletions trunk/drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
13 changes: 4 additions & 9 deletions trunk/drivers/video/omap2/dss/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -122,7 +117,7 @@ void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask)
{
struct omap_dss_board_info *board_data = core.pdev->dev.platform_data;

if (!board_data->dsi_enable_pads)
if (!board_data->dsi_disable_pads)
return;

return board_data->dsi_disable_pads(dsi_id, lane_mask);
Expand All @@ -138,7 +133,7 @@ int dss_set_min_bus_tput(struct device *dev, unsigned long tput)
return 0;
}

#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT)
#if defined(CONFIG_OMAP2_DSS_DEBUGFS)
static int dss_debug_show(struct seq_file *s, void *unused)
{
void (*func)(struct seq_file *) = s->private;
Expand Down Expand Up @@ -193,7 +188,7 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *))

return 0;
}
#else /* CONFIG_DEBUG_FS && CONFIG_OMAP2_DSS_DEBUG_SUPPORT */
#else /* CONFIG_OMAP2_DSS_DEBUGFS */
static inline int dss_initialize_debugfs(void)
{
return 0;
Expand All @@ -205,7 +200,7 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *))
{
return 0;
}
#endif /* CONFIG_DEBUG_FS && CONFIG_OMAP2_DSS_DEBUG_SUPPORT */
#endif /* CONFIG_OMAP2_DSS_DEBUGFS */

/* PLATFORM DEVICE */
static int omap_dss_pm_notif(struct notifier_block *b, unsigned long v, void *d)
Expand Down
40 changes: 15 additions & 25 deletions trunk/drivers/video/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3670,34 +3670,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,
Expand Down Expand Up @@ -3730,10 +3722,8 @@ 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);
Expand Down
Loading

0 comments on commit 578532e

Please sign in to comment.