Linux Audio

Check our new training course

Loading...
v6.13.7
 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#include <linux/mutex.h>
14
15#include "cdma.h"
16
17struct host1x;
18struct host1x_channel;
19
20struct host1x_channel_list {
21	struct host1x_channel *channels;
22
23	struct mutex lock;
24	unsigned long *allocated_channels;
25};
26
27struct host1x_channel {
28	struct kref refcount;
29	unsigned int id;
30	struct mutex submitlock;
31	void __iomem *regs;
32	struct host1x_client *client;
33	struct device *dev;
34	struct host1x_cdma cdma;
35};
36
37/* channel list operations */
38int host1x_channel_list_init(struct host1x_channel_list *chlist,
39			     unsigned int num_channels);
40void host1x_channel_list_free(struct host1x_channel_list *chlist);
41struct host1x_channel *host1x_channel_get_index(struct host1x *host,
42						unsigned int index);
43void host1x_channel_stop_all(struct host1x *host);
44
45#endif
v5.4
 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 device *dev;
30	struct host1x_cdma cdma;
31};
32
33/* channel list operations */
34int host1x_channel_list_init(struct host1x_channel_list *chlist,
35			     unsigned int num_channels);
36void host1x_channel_list_free(struct host1x_channel_list *chlist);
37struct host1x_channel *host1x_channel_get_index(struct host1x *host,
38						unsigned int index);
 
39
40#endif