summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_gpuprops.h
diff options
context:
space:
mode:
authorSidath Senanayake <sidaths@google.com>2020-06-18 09:26:13 +0200
committerSidath Senanayake <sidaths@google.com>2020-06-18 09:26:13 +0200
commitbc3c01e61c8ce9783a8ab091053905effcae12de (patch)
tree43f9f48736f7259d8cc996b11eed003dc80d5bef /mali_kbase/mali_kbase_gpuprops.h
parentb64f568f943e567534694cc993270adca96dcd06 (diff)
downloadgpu-bc3c01e61c8ce9783a8ab091053905effcae12de.tar.gz
Mali Valhall DDK r25p0 KMD
Provenance: 395644cb0 (collaborate/EAC/v_r25p0) VX504X08X-BU-00000-r25p0-01eac0 - Android DDK VX504X08X-BU-60000-r25p0-01eac0 - Android Document Bundle Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I2cffddb42a554696d45b7f65c7bae8827a71341f
Diffstat (limited to 'mali_kbase/mali_kbase_gpuprops.h')
-rw-r--r--mali_kbase/mali_kbase_gpuprops.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/mali_kbase/mali_kbase_gpuprops.h b/mali_kbase/mali_kbase_gpuprops.h
index eeba92f..5eee794 100644
--- a/mali_kbase/mali_kbase_gpuprops.h
+++ b/mali_kbase/mali_kbase_gpuprops.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2011-2015, 2017, 2019-2020 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -18,6 +18,20 @@
*
* SPDX-License-Identifier: GPL-2.0
*
+ *//* SPDX-License-Identifier: GPL-2.0 */
+/*
+ *
+ * (C) COPYRIGHT 2011-2015, 2017, 2019-2020 ARM Limited. All rights reserved.
+ *
+ * This program is free software and is provided to you under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation, and any use by you of this program is subject to the terms
+ * of such GNU licence.
+ *
+ * A copy of the licence is included with the program, and can also be obtained
+ * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
*/
@@ -36,6 +50,20 @@
struct kbase_device;
/**
+ * KBASE_UBFX32 - Extracts bits from a 32-bit bitfield.
+ * @value: The value from which to extract bits.
+ * @offset: The first bit to extract (0 being the LSB).
+ * @size: The number of bits to extract.
+ *
+ * Context: @offset + @size <= 32.
+ *
+ * Return: Bits [@offset, @offset + @size) from @value.
+ */
+/* from mali_cdsb.h */
+#define KBASE_UBFX32(value, offset, size) \
+ (((u32)(value) >> (u32)(offset)) & (u32)((1ULL << (u32)(size)) - 1))
+
+/**
* @brief Set up Kbase GPU properties.
*
* Set up Kbase GPU properties with information from the GPU registers
@@ -51,16 +79,20 @@ void kbase_gpuprops_set(struct kbase_device *kbdev);
* This function sets up GPU properties that are dependent on the hardware
* features bitmask. This function must be preceeded by a call to
* kbase_hw_set_features_mask().
+ *
+ * Return: Zero on success, Linux error code on failure
*/
-void kbase_gpuprops_set_features(struct kbase_device *kbdev);
+int kbase_gpuprops_set_features(struct kbase_device *kbdev);
/**
* kbase_gpuprops_update_l2_features - Update GPU property of L2_FEATURES
* @kbdev: Device pointer
*
* This function updates l2_features and the log2 cache size.
+ *
+ * Return: Zero on success, Linux error code for failure
*/
-void kbase_gpuprops_update_l2_features(struct kbase_device *kbdev);
+int kbase_gpuprops_update_l2_features(struct kbase_device *kbdev);
/**
* kbase_gpuprops_populate_user_buffer - Populate the GPU properties buffer