Lines Matching defs:channel
11 #include "channel.h"
45 struct host1x *host = dev_get_drvdata(job->channel->dev->parent);
51 struct host1x_channel *host1x_channel_get(struct host1x_channel *channel)
53 kref_get(&channel->refcount);
55 return channel;
60 * host1x_channel_get_index() - Attempt to get channel reference by index
62 * @index: Index of channel
64 * If channel number @index is currently allocated, increase its refcount
80 struct host1x_channel *channel =
82 struct host1x *host = dev_get_drvdata(channel->dev->parent);
85 host1x_hw_cdma_stop(host, &channel->cdma);
86 host1x_cdma_deinit(&channel->cdma);
88 clear_bit(channel->id, chlist->allocated_channels);
91 void host1x_channel_put(struct host1x_channel *channel)
93 kref_put(&channel->refcount, release_channel);
105 dev_err(host->dev, "failed to find free channel\n");
117 * host1x_channel_request() - Allocate a channel
118 * @client: Host1x client this channel will be used to send commands to
120 * Allocates a new host1x channel for @client. May return NULL if CDMA
127 struct host1x_channel *channel;
130 channel = acquire_unused_channel(host);
131 if (!channel)
134 kref_init(&channel->refcount);
135 mutex_init(&channel->submitlock);
136 channel->client = client;
137 channel->dev = client->dev;
139 err = host1x_hw_channel_init(host, channel, channel->id);
143 err = host1x_cdma_init(&channel->cdma);
147 return channel;
150 clear_bit(channel->id, chlist->allocated_channels);
152 dev_err(client->dev, "failed to initialize channel\n");