From 6bd4b830bf69d5af7fe6fa57dbae7303bbf0203c Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 10 Mar 2016 14:46:29 +0530 Subject: [PATCH] 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 Reviewed-on: http://git-master/r/1029500 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal --- drivers/gpu/host1x/hw/channel_hw_t186.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/host1x/hw/channel_hw_t186.c b/drivers/gpu/host1x/hw/channel_hw_t186.c index 2b90ba63..256368f2 100644 --- a/drivers/gpu/host1x/hw/channel_hw_t186.c +++ b/drivers/gpu/host1x/hw/channel_hw_t186.c @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -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)