Lines Matching defs:channel
11 #include "channel.h"
41 struct host1x *host = dev_get_drvdata(job->channel->dev->parent);
47 struct host1x_channel *host1x_channel_get(struct host1x_channel *channel)
49 kref_get(&channel->refcount);
51 return channel;
56 * host1x_channel_get_index() - Attempt to get channel reference by index
58 * @index: Index of channel
60 * If channel number @index is currently allocated, increase its refcount
74 void host1x_channel_stop(struct host1x_channel *channel)
76 struct host1x *host = dev_get_drvdata(channel->dev->parent);
78 host1x_hw_cdma_stop(host, &channel->cdma);
84 struct host1x_channel *channel =
86 struct host1x *host = dev_get_drvdata(channel->dev->parent);
89 host1x_hw_cdma_stop(host, &channel->cdma);
90 host1x_cdma_deinit(&channel->cdma);
92 clear_bit(channel->id, chlist->allocated_channels);
95 void host1x_channel_put(struct host1x_channel *channel)
97 kref_put(&channel->refcount, release_channel);
109 dev_err(host->dev, "failed to find free channel\n");
121 * host1x_channel_request() - Allocate a channel
122 * @client: Host1x client this channel will be used to send commands to
124 * Allocates a new host1x channel for @client. May return NULL if CDMA
131 struct host1x_channel *channel;
134 channel = acquire_unused_channel(host);
135 if (!channel)
138 kref_init(&channel->refcount);
139 mutex_init(&channel->submitlock);
140 channel->client = client;
141 channel->dev = client->dev;
143 err = host1x_hw_channel_init(host, channel, channel->id);
147 err = host1x_cdma_init(&channel->cdma);
151 return channel;
154 clear_bit(channel->id, chlist->allocated_channels);
156 dev_err(client->dev, "failed to initialize channel\n");