gpu: host1x: keep device powered on during submit

Get pm_runtime reference on device to keep device
powered on during submit

Bug 1704301

Change-Id: I71d4b4dc6317445bc3d1832ffd3bd4c7afadc654
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1029500
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
This commit is contained in:
Deepak Nibade
2016-03-10 14:46:29 +05:30
committed by Laxman Dewangan
parent 1859542c94
commit 6bd4b830bf

View File

@@ -19,6 +19,7 @@
#include <linux/host1x.h>
#include <linux/slab.h>
#include <linux/iommu.h>
#include <linux/pm_runtime.h>
#include <trace/events/host1x.h>
@@ -194,6 +195,10 @@ static int channel_submit(struct host1x_job *job)
syncpt = host1x_syncpt_get(host, job->syncpts[0].id);
prev_max = host1x_syncpt_read_max(syncpt);
/* keep device powered on */
for (i = 0; i < job->num_syncpts; ++i)
pm_runtime_get_sync(ch->dev);
/* get submit lock */
err = mutex_lock_interruptible(&ch->submitlock);
if (err)