summaryrefslogtreecommitdiff
path: root/drivers/gpu/imx
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>2018-07-19 14:07:14 +0300
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit3fd243d252b1f8ea750e78d6d37c7850b075b3a7 (patch)
tree454dd54a9de781a5a51461bf877c6a119b6a2c6d /drivers/gpu/imx
parentc2731f858614bfba872c09a39b9e6771afa87d11 (diff)
MLK-18826: drm: imx: dcss: fix hang when dumping registers
If DCSS is suspended, the clocks are disabled. Dumping the registers, with the following command: cat /sys/kernel/debug/imx-dcss/dump_registers will hang the system, because of DTG. This patch makes sure clocks are enabled before dumping the registers and will immediately release them afterwards. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Diffstat (limited to 'drivers/gpu/imx')
-rw-r--r--drivers/gpu/imx/dcss/dcss-common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/imx/dcss/dcss-common.c b/drivers/gpu/imx/dcss/dcss-common.c
index 6aeb99340b4e..528ef258f513 100644
--- a/drivers/gpu/imx/dcss/dcss-common.c
+++ b/drivers/gpu/imx/dcss/dcss-common.c
@@ -447,6 +447,10 @@ static int dcss_trace_dump_open(struct inode *inode, struct file *file)
static int dcss_dump_regs_show(struct seq_file *s, void *data)
{
+ struct dcss_soc *dcss = s->private;
+
+ pm_runtime_get_sync(dcss->dev);
+
dcss_blkctl_dump_regs(s, s->private);
dcss_dtrc_dump_regs(s, s->private);
dcss_dpr_dump_regs(s, s->private);
@@ -458,6 +462,8 @@ static int dcss_dump_regs_show(struct seq_file *s, void *data)
dcss_hdr10_dump_regs(s, s->private);
dcss_ctxld_dump_regs(s, s->private);
+ pm_runtime_put_sync(dcss->dev);
+
return 0;
}