hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/arm/bifrost/context/mali_kbase_context.h
....@@ -1,7 +1,7 @@
11 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22 /*
33 *
4
- * (C) COPYRIGHT 2011-2017, 2019-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2011-2023 ARM Limited. All rights reserved.
55 *
66 * This program is free software and is provided to you under the terms of the
77 * GNU General Public License version 2 as published by the Free Software
....@@ -93,6 +93,19 @@
9393 }
9494
9595 /**
96
+ * kbase_ctx_compat_mode - Indicate whether a kbase context needs to operate
97
+ * in compatibility mode for 32-bit userspace.
98
+ * @kctx: kbase context
99
+ *
100
+ * Return: True if needs to maintain compatibility, False otherwise.
101
+ */
102
+static inline bool kbase_ctx_compat_mode(struct kbase_context *kctx)
103
+{
104
+ return !IS_ENABLED(CONFIG_64BIT) ||
105
+ (IS_ENABLED(CONFIG_64BIT) && kbase_ctx_flag(kctx, KCTX_COMPAT));
106
+}
107
+
108
+/**
96109 * kbase_ctx_flag_clear - Clear @flag on @kctx
97110 * @kctx: Pointer to kbase context
98111 * @flag: Flag to clear