39 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*3 * Host1x context devices4 *5 * Copyright (c) 2020, NVIDIA Corporation.6 */7 8#ifndef __HOST1X_CONTEXT_H9#define __HOST1X_CONTEXT_H10 11#include <linux/mutex.h>12#include <linux/refcount.h>13 14struct host1x;15 16extern struct bus_type host1x_context_device_bus_type;17 18struct host1x_memory_context_list {19 struct mutex lock;20 struct host1x_memory_context *devs;21 unsigned int len;22};23 24#ifdef CONFIG_IOMMU_API25int host1x_memory_context_list_init(struct host1x *host1x);26void host1x_memory_context_list_free(struct host1x_memory_context_list *cdl);27#else28static inline int host1x_memory_context_list_init(struct host1x *host1x)29{30 return 0;31}32 33static inline void host1x_memory_context_list_free(struct host1x_memory_context_list *cdl)34{35}36#endif37 38#endif39