hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/gpu/host1x/channel.c
....@@ -1,19 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Tegra host1x Channel
34 *
45 * Copyright (c) 2010-2013, NVIDIA Corporation.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
176 */
187
198 #include <linux/slab.h>
....@@ -126,14 +115,14 @@
126115
127116 /**
128117 * host1x_channel_request() - Allocate a channel
129
- * @device: Host1x unit this channel will be used to send commands to
118
+ * @client: Host1x client this channel will be used to send commands to
130119 *
131
- * Allocates a new host1x channel for @device. May return NULL if CDMA
120
+ * Allocates a new host1x channel for @client. May return NULL if CDMA
132121 * initialization fails.
133122 */
134
-struct host1x_channel *host1x_channel_request(struct device *dev)
123
+struct host1x_channel *host1x_channel_request(struct host1x_client *client)
135124 {
136
- struct host1x *host = dev_get_drvdata(dev->parent);
125
+ struct host1x *host = dev_get_drvdata(client->dev->parent);
137126 struct host1x_channel_list *chlist = &host->channel_list;
138127 struct host1x_channel *channel;
139128 int err;
....@@ -144,7 +133,8 @@
144133
145134 kref_init(&channel->refcount);
146135 mutex_init(&channel->submitlock);
147
- channel->dev = dev;
136
+ channel->client = client;
137
+ channel->dev = client->dev;
148138
149139 err = host1x_hw_channel_init(host, channel, channel->id);
150140 if (err < 0)
....@@ -159,7 +149,7 @@
159149 fail:
160150 clear_bit(channel->id, chlist->allocated_channels);
161151
162
- dev_err(dev, "failed to initialize channel\n");
152
+ dev_err(client->dev, "failed to initialize channel\n");
163153
164154 return NULL;
165155 }