Skip to content

Commit 4df04ac

Browse files
committed
drm/omap: dsi: Fix crash in DSI debug dumps
Reading any of the DSI debugfs files results in a crash, as wrong pointer is passed to the dump functions, and the dump functions use a wrong pointer. This patch fixes DSI debug dumps. Fixes: f3ed97f ("drm/omap: dsi: Simplify debugfs implementation") Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190111035120.20668-3-laurent.pinchart@ideasonboard.com
1 parent b14e945 commit 4df04ac

File tree

1 file changed

+6
-6
lines changed
  • drivers/gpu/drm/omapdrm/dss

1 file changed

+6
-6
lines changed

drivers/gpu/drm/omapdrm/dss/dsi.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ static void dsi_pll_disable(struct dss_pll *pll)
14061406

14071407
static int dsi_dump_dsi_clocks(struct seq_file *s, void *p)
14081408
{
1409-
struct dsi_data *dsi = p;
1409+
struct dsi_data *dsi = s->private;
14101410
struct dss_pll_clock_info *cinfo = &dsi->pll.cinfo;
14111411
enum dss_clk_source dispc_clk_src, dsi_clk_src;
14121412
int dsi_module = dsi->module_id;
@@ -1467,7 +1467,7 @@ static int dsi_dump_dsi_clocks(struct seq_file *s, void *p)
14671467
#ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS
14681468
static int dsi_dump_dsi_irqs(struct seq_file *s, void *p)
14691469
{
1470-
struct dsi_data *dsi = p;
1470+
struct dsi_data *dsi = s->private;
14711471
unsigned long flags;
14721472
struct dsi_irq_stats stats;
14731473

@@ -1558,7 +1558,7 @@ static int dsi_dump_dsi_irqs(struct seq_file *s, void *p)
15581558

15591559
static int dsi_dump_dsi_regs(struct seq_file *s, void *p)
15601560
{
1561-
struct dsi_data *dsi = p;
1561+
struct dsi_data *dsi = s->private;
15621562

15631563
if (dsi_runtime_get(dsi))
15641564
return 0;
@@ -5083,15 +5083,15 @@ static int dsi_bind(struct device *dev, struct device *master, void *data)
50835083

50845084
snprintf(name, sizeof(name), "dsi%u_regs", dsi->module_id + 1);
50855085
dsi->debugfs.regs = dss_debugfs_create_file(dss, name,
5086-
dsi_dump_dsi_regs, &dsi);
5086+
dsi_dump_dsi_regs, dsi);
50875087
#ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS
50885088
snprintf(name, sizeof(name), "dsi%u_irqs", dsi->module_id + 1);
50895089
dsi->debugfs.irqs = dss_debugfs_create_file(dss, name,
5090-
dsi_dump_dsi_irqs, &dsi);
5090+
dsi_dump_dsi_irqs, dsi);
50915091
#endif
50925092
snprintf(name, sizeof(name), "dsi%u_clks", dsi->module_id + 1);
50935093
dsi->debugfs.clks = dss_debugfs_create_file(dss, name,
5094-
dsi_dump_dsi_clocks, &dsi);
5094+
dsi_dump_dsi_clocks, dsi);
50955095

50965096
return 0;
50975097
}

0 commit comments

Comments
 (0)