diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-01-10 22:50:33 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-02-06 06:38:54 -0500 |
commit | 4df04ac9b37f278c48bb696289aff8f81226af4b (patch) | |
tree | 87bb68dfd74705df58b651bd64b52cd5bd771329 | |
parent | b14e945bda8ae227d1bf2b1837c0c4a61721cd1a (diff) |
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: f3ed97f9ae7d ("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
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dsi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 00a9c2ab9e6c..277f9dd2ec8c 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c | |||
@@ -1406,7 +1406,7 @@ static void dsi_pll_disable(struct dss_pll *pll) | |||
1406 | 1406 | ||
1407 | static int dsi_dump_dsi_clocks(struct seq_file *s, void *p) | 1407 | static int dsi_dump_dsi_clocks(struct seq_file *s, void *p) |
1408 | { | 1408 | { |
1409 | struct dsi_data *dsi = p; | 1409 | struct dsi_data *dsi = s->private; |
1410 | struct dss_pll_clock_info *cinfo = &dsi->pll.cinfo; | 1410 | struct dss_pll_clock_info *cinfo = &dsi->pll.cinfo; |
1411 | enum dss_clk_source dispc_clk_src, dsi_clk_src; | 1411 | enum dss_clk_source dispc_clk_src, dsi_clk_src; |
1412 | int dsi_module = dsi->module_id; | 1412 | int dsi_module = dsi->module_id; |
@@ -1467,7 +1467,7 @@ static int dsi_dump_dsi_clocks(struct seq_file *s, void *p) | |||
1467 | #ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS | 1467 | #ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS |
1468 | static int dsi_dump_dsi_irqs(struct seq_file *s, void *p) | 1468 | static int dsi_dump_dsi_irqs(struct seq_file *s, void *p) |
1469 | { | 1469 | { |
1470 | struct dsi_data *dsi = p; | 1470 | struct dsi_data *dsi = s->private; |
1471 | unsigned long flags; | 1471 | unsigned long flags; |
1472 | struct dsi_irq_stats stats; | 1472 | struct dsi_irq_stats stats; |
1473 | 1473 | ||
@@ -1558,7 +1558,7 @@ static int dsi_dump_dsi_irqs(struct seq_file *s, void *p) | |||
1558 | 1558 | ||
1559 | static int dsi_dump_dsi_regs(struct seq_file *s, void *p) | 1559 | static int dsi_dump_dsi_regs(struct seq_file *s, void *p) |
1560 | { | 1560 | { |
1561 | struct dsi_data *dsi = p; | 1561 | struct dsi_data *dsi = s->private; |
1562 | 1562 | ||
1563 | if (dsi_runtime_get(dsi)) | 1563 | if (dsi_runtime_get(dsi)) |
1564 | return 0; | 1564 | return 0; |
@@ -5083,15 +5083,15 @@ static int dsi_bind(struct device *dev, struct device *master, void *data) | |||
5083 | 5083 | ||
5084 | snprintf(name, sizeof(name), "dsi%u_regs", dsi->module_id + 1); | 5084 | snprintf(name, sizeof(name), "dsi%u_regs", dsi->module_id + 1); |
5085 | dsi->debugfs.regs = dss_debugfs_create_file(dss, name, | 5085 | dsi->debugfs.regs = dss_debugfs_create_file(dss, name, |
5086 | dsi_dump_dsi_regs, &dsi); | 5086 | dsi_dump_dsi_regs, dsi); |
5087 | #ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS | 5087 | #ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS |
5088 | snprintf(name, sizeof(name), "dsi%u_irqs", dsi->module_id + 1); | 5088 | snprintf(name, sizeof(name), "dsi%u_irqs", dsi->module_id + 1); |
5089 | dsi->debugfs.irqs = dss_debugfs_create_file(dss, name, | 5089 | dsi->debugfs.irqs = dss_debugfs_create_file(dss, name, |
5090 | dsi_dump_dsi_irqs, &dsi); | 5090 | dsi_dump_dsi_irqs, dsi); |
5091 | #endif | 5091 | #endif |
5092 | snprintf(name, sizeof(name), "dsi%u_clks", dsi->module_id + 1); | 5092 | snprintf(name, sizeof(name), "dsi%u_clks", dsi->module_id + 1); |
5093 | dsi->debugfs.clks = dss_debugfs_create_file(dss, name, | 5093 | dsi->debugfs.clks = dss_debugfs_create_file(dss, name, |
5094 | dsi_dump_dsi_clocks, &dsi); | 5094 | dsi_dump_dsi_clocks, dsi); |
5095 | 5095 | ||
5096 | return 0; | 5096 | return 0; |
5097 | } | 5097 | } |