Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / gpu / host1x / context.h
blob3e03bc1d3bac324671a68961d3bdd82e679304f3
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Host1x context devices
5 * Copyright (c) 2020, NVIDIA Corporation.
6 */
8 #ifndef __HOST1X_CONTEXT_H
9 #define __HOST1X_CONTEXT_H
11 #include <linux/mutex.h>
12 #include <linux/refcount.h>
14 struct host1x;
16 extern struct bus_type host1x_context_device_bus_type;
18 struct host1x_memory_context_list {
19 struct mutex lock;
20 struct host1x_memory_context *devs;
21 unsigned int len;
24 #ifdef CONFIG_IOMMU_API
25 int host1x_memory_context_list_init(struct host1x *host1x);
26 void host1x_memory_context_list_free(struct host1x_memory_context_list *cdl);
27 #else
28 static inline int host1x_memory_context_list_init(struct host1x *host1x)
30 return 0;
33 static inline void host1x_memory_context_list_free(struct host1x_memory_context_list *cdl)
36 #endif
38 #endif