diff options
author | Sidath Senanayake <sidaths@google.com> | 2021-06-15 13:39:30 +0100 |
---|---|---|
committer | Sidath Senanayake <sidaths@google.com> | 2021-06-15 14:11:16 +0100 |
commit | fca8613cfcf585bf9113dca96a05daea9fd89794 (patch) | |
tree | f2baa14910f83edf00450bc30d3703eb255a0bba /mali_kbase/mali_kbase_gpuprops_types.h | |
parent | 8037b534570814775d79aeddd06b76e5ee941f59 (diff) | |
download | gpu-fca8613cfcf585bf9113dca96a05daea9fd89794.tar.gz |
Mali Valhall DDK r31p0 KMD
Provenance: 2ea0ef9bd (collaborate/EAC/v_r31p0)
VX504X08X-BU-00000-r31p0-01eac0 - Valhall Android DDK
VX504X08X-BU-60000-r31p0-01eac0 - Valhall Android Document Bundle
VX504X08X-DC-11001-r31p0-01eac0 - Valhall Android DDK Software Errata
VX504X08X-SW-99006-r31p0-01eac0 - Valhall Android Renderscript AOSP parts
Signed-off-by: Sidath Senanayake <sidaths@google.com>
Change-Id: Ide9d5fdc6d9c95fa66a3546b01f619b43c09496d
Diffstat (limited to 'mali_kbase/mali_kbase_gpuprops_types.h')
-rw-r--r-- | mali_kbase/mali_kbase_gpuprops_types.h | 75 |
1 files changed, 74 insertions, 1 deletions
diff --git a/mali_kbase/mali_kbase_gpuprops_types.h b/mali_kbase/mali_kbase_gpuprops_types.h index 8ecb54f..8b37b88 100644 --- a/mali_kbase/mali_kbase_gpuprops_types.h +++ b/mali_kbase/mali_kbase_gpuprops_types.h @@ -26,7 +26,7 @@ #ifndef _KBASE_GPUPROPS_TYPES_H_ #define _KBASE_GPUPROPS_TYPES_H_ -#include "mali_base_kernel.h" +#include <uapi/gpu/arm/midgard/mali_base_kernel.h> #define KBASE_GPU_SPEED_MHZ 123 #define KBASE_GPU_PC_SIZE_LOG2 24U @@ -34,6 +34,7 @@ struct kbase_gpuprops_regdump { u32 gpu_id; u32 l2_features; + u32 l2_config; u32 core_features; u32 tiler_features; u32 mem_features; @@ -60,6 +61,28 @@ struct kbase_gpuprops_regdump { u32 gpu_features_hi; }; +/** + * struct kbase_current_config_regdump - Register dump for current resources + * allocated to the GPU. + * @mem_features: Memory system features. Contains information about the + * features of the memory system. Used here to get the L2 slice + * count. + * @shader_present_lo: Shader core present bitmap. Low word. + * @shader_present_hi: Shader core present bitmap. High word. + * @l2_present_lo: L2 cache present bitmap. Low word. + * @l2_present_hi: L2 cache present bitmap. High word. + * + * Register dump structure used to store the resgisters data realated to the + * current resources allocated to the GPU. + */ +struct kbase_current_config_regdump { + u32 mem_features; + u32 shader_present_lo; + u32 shader_present_hi; + u32 l2_present_lo; + u32 l2_present_hi; +}; + struct kbase_gpu_cache_props { u8 associativity; u8 external_bus_width; @@ -74,6 +97,50 @@ struct kbase_gpu_mmu_props { u8 pa_bits; }; +/** + * struct max_config_props - Properties based on the maximum resources + * available. + * @l2_slices: Maximum number of L2 slices that can be assinged to the GPU + * during runtime. + * @padding: Padding to a multiple of 64 bits. + * @core_mask: Largest core mask bitmap that can be assigned to the GPU during + * runtime. + * + * Properties based on the maximum resources available (not necessarly + * allocated at that moment). Used to provide the maximum configuration to the + * userspace allowing the applications to allocate enough resources in case the + * real allocated resources change. + */ +struct max_config_props { + u8 l2_slices; + u8 padding[3]; + u32 core_mask; +}; + +/** + * struct curr_config_props - Properties based on the current resources + * allocated to the GPU. + * @l2_present: Current L2 present bitmap that is allocated to the GPU. + * @shader_present: Current shader present bitmap that is allocated to the GPU. + * @num_cores: Current number of shader cores allocated to the GPU. + * @l2_slices: Current number of L2 slices allocated to the GPU. + * @update_needed: Defines if it is necessary to re-read the registers to + * update the current allocated resources. + * @padding: Padding to a multiple of 64 bits. + * + * Properties based on the current resource available. Used for operations with + * hardware interactions to avoid using userspace data that can be based on + * the maximum resource available. + */ +struct curr_config_props { + u64 l2_present; + u64 shader_present; + u16 num_cores; + u8 l2_slices; + bool update_needed; + u8 padding[4]; +}; + struct kbase_gpu_props { /* kernel-only properties */ u8 num_cores; @@ -86,6 +153,12 @@ struct kbase_gpu_props { struct kbase_gpu_mem_props mem; struct kbase_gpu_mmu_props mmu; + /* Properties based on the current resource available */ + struct curr_config_props curr_config; + + /* Properties based on the maximum resource available */ + struct max_config_props max_config; + /* Properties shared with userspace */ struct base_gpu_props props; |