diff options
Diffstat (limited to 'drivers/gpu/host1x/debug.c')
| -rw-r--r-- | drivers/gpu/host1x/debug.c | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/drivers/gpu/host1x/debug.c b/drivers/gpu/host1x/debug.c index 8a14880c61bb..18d9c8d206e3 100644 --- a/drivers/gpu/host1x/debug.c +++ b/drivers/gpu/host1x/debug.c @@ -7,6 +7,7 @@   */  #include <linux/debugfs.h> +#include <linux/pm_runtime.h>  #include <linux/seq_file.h>  #include <linux/uaccess.h> @@ -52,6 +53,11 @@ static int show_channel(struct host1x_channel *ch, void *data, bool show_fifo)  {  	struct host1x *m = dev_get_drvdata(ch->dev->parent);  	struct output *o = data; +	int err; + +	err = pm_runtime_resume_and_get(m->dev); +	if (err < 0) +		return err;  	mutex_lock(&ch->cdma.lock);  	mutex_lock(&debug_lock); @@ -64,6 +70,8 @@ static int show_channel(struct host1x_channel *ch, void *data, bool show_fifo)  	mutex_unlock(&debug_lock);  	mutex_unlock(&ch->cdma.lock); +	pm_runtime_put(m->dev); +  	return 0;  } @@ -71,9 +79,14 @@ static void show_syncpts(struct host1x *m, struct output *o)  {  	struct list_head *pos;  	unsigned int i; +	int err;  	host1x_debug_output(o, "---- syncpts ----\n"); +	err = pm_runtime_resume_and_get(m->dev); +	if (err < 0) +		return; +  	for (i = 0; i < host1x_syncpt_nb_pts(m); i++) {  		u32 max = host1x_syncpt_read_max(m->syncpt + i);  		u32 min = host1x_syncpt_load(m->syncpt + i); @@ -101,6 +114,8 @@ static void show_syncpts(struct host1x *m, struct output *o)  					    base_val);  	} +	pm_runtime_put(m->dev); +  	host1x_debug_output(o, "\n");  } |