diff --git a/src/imagination/common/device_info/apple-a8x.h b/src/imagination/common/device_info/apple-a8x.h new file mode 100644 index 00000000000..3fe6b0042f7 --- /dev/null +++ b/src/imagination/common/device_info/apple-a8x.h @@ -0,0 +1,114 @@ +/* + * SPDX-License-Identifier: MIT + */ + +/* + * Apple A8X GPU (T7001, iPad Air 2, J81): a PowerVR Rogue 6XT core (GXA6850, eight clusters) run by Apple's own firmware (AGXG4X, the 19H394 + * firmware), a copy of the A8 entry (apple-a8.h) with the A8X's identity. BVNC 7.5.8.3 as the kernel decodes the legacy CORE_REVISION (0x00070500) + * and CORE_ID (0x011b0803) registers measured on an iPad Air 2 under Linux with the A8X series of the powervr driver: the same rule that gives 3.10.4.5 + * for the A8 (N = 4 clusters, here N = 8). Everything but num_clusters and the identity is the A8's (and through it the A9's placeholders): not verified for + * this GPU. The A8X takes the A8's paths of the driver (has_apple_g5p and has_apple_g4p). + */ + +#ifndef APPLE_A8X_H +#define APPLE_A8X_H + +#include + +#include "pvr_device_info.h" + +#define PVR_DEVICE_IDENT_7_V_8_3 \ + .device_id = 0x7001, .series_name = "Apple", \ + .public_name = "A8X", .arch = PVR_DEVICE_ARCH_ROGUE + +static const struct pvr_device_features pvr_device_features_7_V_8_3 = { + .has_apple_g5p = true, + .has_apple_g4p = true, + .has_apple_compute_dispatch = true, + /* A8: AGXMetalA8 (iOS 12.4) ComputeProgramVariant constructor + * (0x1a13eb034) -> +0x790, what -[AGXA8ComputePipeline + * maxTotalThreadsPerThreadgroup] (0x1a13c5028) returns: + * min(32 * floor((3585 - a) / a), 262144 / b), a = (4t + 28) & ~31, + * b = (64f + 448) & ~511, at most 512 and a multiple of 32; the A9's + * routine is the same with 3329 and 393216. threadExecutionWidth is 32 + * (0x1a13c5020). The shared formula's bank-1 term keeps one task in + * reserve (pvr_compute_limits.h), below Apple's for both chips. + */ + .apple_compute_dispatch = { + .bank0_budget = 3585U, + .bank1_budget = 262144U, + .register_granularity = 8U, + .bank0_scale = 4U, + .bank0_rounding_bias = 28U, + .bank0_granularity = 32U, + .bank1_scale = 64U, + .bank1_rounding_bias = 448U, + .bank1_granularity = 512U, + .task_size = 32U, + .max_workgroup_size = 512U, + }, + .has_num_clusters = true, /* A8X */ + + /* A9 placeholders (apple-a9.h) */ + .has_tile_size_x = true, + .has_tile_size_y = true, + .has_cluster_grouping = true, + .has_common_store_size_in_dwords = true, + .has_isp_max_tiles_in_flight = true, + .has_isp_samples_per_pixel = true, + .has_max_instances_per_pds_task = true, + .has_max_multisample = true, + .has_max_partitions = true, + .has_max_usc_tasks = true, + .has_num_raster_pipes = true, + .has_slc_cache_line_size_bits = true, + .has_slc_mcu_cache_controls = true, + .has_unified_store_depth = true, + .has_usc_min_output_registers_per_pix = true, + .has_usc_slots = true, + .has_uvs_banks = true, + .has_uvs_pba_entries = true, + .has_uvs_vtx_entries = true, + .has_vdm_cam_size = true, + .has_xt_top_infrastructure = true, + + .num_clusters = 8U, /* A8X: CORE_ID N = 8 */ + + .tile_size_x = 32U, /* Rogue 6XT (gx6250.h); A8 unverified */ + .tile_size_y = 32U, + .common_store_size_in_dwords = 1280U * 4U * 4U, + .isp_max_tiles_in_flight = 8U, + .isp_samples_per_pixel = 2U, + .max_instances_per_pds_task = 32U, + .max_multisample = 8U, + .max_partitions = 8U, + .max_usc_tasks = 56U, + .num_raster_pipes = 2U, + .slc_cache_line_size_bits = 512U, + .unified_store_depth = 256U, + .usc_min_output_registers_per_pix = 2U, + .usc_slots = 32U, + .uvs_banks = 8U, + .uvs_pba_entries = 320U, + .uvs_vtx_entries = 288U, + .vdm_cam_size = 256U, +}; + +static const struct pvr_device_enhancements pvr_device_enhancements_7_5_8_3 = { 0 }; + +static const struct pvr_device_quirks pvr_device_quirks_7_5_8_3 = { 0 }; + +static const struct pvr_device_info pvr_device_info_7_5_8_3 = { + .ident = { + PVR_DEVICE_IDENT_7_V_8_3, + .b = 7, + .v = 5, + .n = 8, + .c = 3, + }, + .features = pvr_device_features_7_V_8_3, + .enhancements = pvr_device_enhancements_7_5_8_3, + .quirks = pvr_device_quirks_7_5_8_3, +}; + +#endif /* APPLE_A8X_H */ diff --git a/src/imagination/common/pvr_device_info.c b/src/imagination/common/pvr_device_info.c index f0c7a43deb0..ac079e02c54 100644 --- a/src/imagination/common/pvr_device_info.c +++ b/src/imagination/common/pvr_device_info.c @@ -44,6 +44,7 @@ #include "device_info/apple-a10.h" #include "device_info/apple-a9.h" #include "device_info/apple-a8.h" +#include "device_info/apple-a8x.h" #include "device_info/apple-a7.h" #include "util/u_string.h" @@ -92,6 +93,7 @@ int pvr_device_info_init(struct pvr_device_info *info, uint64_t bvnc) CASE_PACKED_BVNC_DEVICE_INFO(4, 45, 2, 58); CASE_PACKED_BVNC_DEVICE_INFO(4, 46, 6, 62); CASE_PACKED_BVNC_DEVICE_INFO(5, 9, 1, 46); + CASE_PACKED_BVNC_DEVICE_INFO(7, 5, 8, 3); CASE_PACKED_BVNC_DEVICE_INFO(9, 15, 6, 2); CASE_PACKED_BVNC_DEVICE_INFO(13, 10, 6, 2); CASE_PACKED_BVNC_DEVICE_INFO(15, 5, 1, 64);