Skip to content

Commit 9ca790f

Browse files
digetxthierryreding
authored andcommitted
gpu: host1x: Add host1x_channel_stop()
Add host1x_channel_stop() which waits till channel becomes idle and then stops the channel hardware. This is needed for supporting suspend/resume by host1x drivers since the hardware state is lost after power-gating, thus the channel needs to be stopped before client enters into suspend. Tested-by: Peter Geis <[email protected]> # Ouya T30 Tested-by: Paul Fertser <[email protected]> # PAZ00 T20 Tested-by: Nicolas Chauvet <[email protected]> # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar <[email protected]> # Ouya T30 Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 6b6776e commit 9ca790f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

drivers/gpu/host1x/channel.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ struct host1x_channel *host1x_channel_get_index(struct host1x *host,
7575
return ch;
7676
}
7777

78+
void host1x_channel_stop(struct host1x_channel *channel)
79+
{
80+
struct host1x *host = dev_get_drvdata(channel->dev->parent);
81+
82+
host1x_hw_cdma_stop(host, &channel->cdma);
83+
}
84+
EXPORT_SYMBOL(host1x_channel_stop);
85+
7886
static void release_channel(struct kref *kref)
7987
{
8088
struct host1x_channel *channel =

include/linux/host1x.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ struct host1x_job;
226226

227227
struct host1x_channel *host1x_channel_request(struct host1x_client *client);
228228
struct host1x_channel *host1x_channel_get(struct host1x_channel *channel);
229+
void host1x_channel_stop(struct host1x_channel *channel);
229230
void host1x_channel_put(struct host1x_channel *channel);
230231
int host1x_job_submit(struct host1x_job *job);
231232

0 commit comments

Comments
 (0)