Linux Audio

Check our new training course

Loading...
v4.6
 
 1/*
 2 * Tegra host1x Channel
 3 *
 4 * 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/>.
17 */
18
19#ifndef __HOST1X_CHANNEL_H
20#define __HOST1X_CHANNEL_H
21
22#include <linux/io.h>
 
23
24#include "cdma.h"
25
26struct host1x;
 
27
28struct host1x_channel {
29	struct list_head list;
 
 
30
31	unsigned int refcount;
 
32	unsigned int id;
33	struct mutex reflock;
34	struct mutex submitlock;
35	void __iomem *regs;
 
36	struct device *dev;
37	struct host1x_cdma cdma;
38};
39
40/* channel list operations */
41int host1x_channel_list_init(struct host1x *host);
42
43#define host1x_for_each_channel(host, channel)				\
44	list_for_each_entry(channel, &host->chlist.list, list)
 
45
46#endif
v6.2
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 * Tegra host1x Channel
 4 *
 5 * Copyright (c) 2010-2013, NVIDIA Corporation.
 
 
 
 
 
 
 
 
 
 
 
 
 6 */
 7
 8#ifndef __HOST1X_CHANNEL_H
 9#define __HOST1X_CHANNEL_H
10
11#include <linux/io.h>
12#include <linux/kref.h>
13
14#include "cdma.h"
15
16struct host1x;
17struct host1x_channel;
18
19struct host1x_channel_list {
20	struct host1x_channel *channels;
21	unsigned long *allocated_channels;
22};
23
24struct host1x_channel {
25	struct kref refcount;
26	unsigned int id;
 
27	struct mutex submitlock;
28	void __iomem *regs;
29	struct host1x_client *client;
30	struct device *dev;
31	struct host1x_cdma cdma;
32};
33
34/* channel list operations */
35int host1x_channel_list_init(struct host1x_channel_list *chlist,
36			     unsigned int num_channels);
37void host1x_channel_list_free(struct host1x_channel_list *chlist);
38struct host1x_channel *host1x_channel_get_index(struct host1x *host,
39						unsigned int index);
40
41#endif