Lines Matching refs:channel

11 #include "channel.h"
43 struct host1x *host = dev_get_drvdata(job->channel->dev->parent);
49 struct host1x_channel *host1x_channel_get(struct host1x_channel *channel)
51 kref_get(&channel->refcount);
53 return channel;
58 * host1x_channel_get_index() - Attempt to get channel reference by index
60 * @index: Index of channel
62 * If channel number @index is currently allocated, increase its refcount
76 void host1x_channel_stop(struct host1x_channel *channel)
78 struct host1x *host = dev_get_drvdata(channel->dev->parent);
80 host1x_hw_cdma_stop(host, &channel->cdma);
105 struct host1x_channel *channel =
107 struct host1x *host = dev_get_drvdata(channel->dev->parent);
110 host1x_hw_cdma_stop(host, &channel->cdma);
111 host1x_cdma_deinit(&channel->cdma);
113 clear_bit(channel->id, chlist->allocated_channels);
116 void host1x_channel_put(struct host1x_channel *channel)
118 kref_put(&channel->refcount, release_channel);
133 dev_err(host->dev, "failed to find free channel\n");
147 * host1x_channel_request() - Allocate a channel
148 * @client: Host1x client this channel will be used to send commands to
150 * Allocates a new host1x channel for @client. May return NULL if CDMA
157 struct host1x_channel *channel;
160 channel = acquire_unused_channel(host);
161 if (!channel)
164 kref_init(&channel->refcount);
165 mutex_init(&channel->submitlock);
166 channel->client = client;
167 channel->dev = client->dev;
169 err = host1x_hw_channel_init(host, channel, channel->id);
173 err = host1x_cdma_init(&channel->cdma);
177 return channel;
180 clear_bit(channel->id, chlist->allocated_channels);
182 dev_err(client->dev, "failed to initialize channel\n");