Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panfrost: Add Mali-G57 "Natt" support

Add the features, issues, and GPU ID for Mali-G57, a first-generation
Valhall GPU. Other first- and second-generation Valhall GPUs should be
similar.

v2: Split out issue list for r0p0 from newer Natt GPUs, as TTRX_3485 was
fixed in r0p1. Unfortunately, MT8192 has a r0p0, so we do need to handle
TTRX_3485.

Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220525145754.25866-9-alyssa.rosenzweig@collabora.com

+22
+12
drivers/gpu/drm/panfrost/panfrost_features.h
··· 106 106 BIT_ULL(HW_FEATURE_TLS_HASHING) | \ 107 107 BIT_ULL(HW_FEATURE_3BIT_EXT_RW_L2_MMU_CONFIG)) 108 108 109 + #define hw_features_g57 (\ 110 + BIT_ULL(HW_FEATURE_JOBCHAIN_DISAMBIGUATION) | \ 111 + BIT_ULL(HW_FEATURE_PWRON_DURING_PWROFF_TRANS) | \ 112 + BIT_ULL(HW_FEATURE_XAFFINITY) | \ 113 + BIT_ULL(HW_FEATURE_FLUSH_REDUCTION) | \ 114 + BIT_ULL(HW_FEATURE_PROTECTED_MODE) | \ 115 + BIT_ULL(HW_FEATURE_PROTECTED_DEBUG_MODE) | \ 116 + BIT_ULL(HW_FEATURE_COHERENCY_REG) | \ 117 + BIT_ULL(HW_FEATURE_AARCH64_MMU) | \ 118 + BIT_ULL(HW_FEATURE_IDVS_GROUP_SIZE) | \ 119 + BIT_ULL(HW_FEATURE_CLEAN_ONLY_SAFE)) 120 + 109 121 static inline bool panfrost_has_hw_feature(struct panfrost_device *pfdev, 110 122 enum panfrost_hw_feature feat) 111 123 {
+3
drivers/gpu/drm/panfrost/panfrost_gpu.c
··· 201 201 GPU_MODEL(g52, 0x7002), 202 202 GPU_MODEL(g31, 0x7003, 203 203 GPU_REV(g31, 1, 0)), 204 + 205 + GPU_MODEL(g57, 0x9001, 206 + GPU_REV(g57, 0, 0)), 204 207 }; 205 208 206 209 static void panfrost_gpu_init_features(struct panfrost_device *pfdev)
+7
drivers/gpu/drm/panfrost/panfrost_issues.h
··· 258 258 259 259 #define hw_issues_g76 0 260 260 261 + #define hw_issues_g57 (\ 262 + BIT_ULL(HW_ISSUE_TTRX_2968_TTRX_3162) | \ 263 + BIT_ULL(HW_ISSUE_TTRX_3076)) 264 + 265 + #define hw_issues_g57_r0p0 (\ 266 + BIT_ULL(HW_ISSUE_TTRX_3485)) 267 + 261 268 static inline bool panfrost_has_hw_issue(const struct panfrost_device *pfdev, 262 269 enum panfrost_hw_issue issue) 263 270 {