drm/panfrost: add Mali-G68 support
Subsystems (3)
PATCH 1/1 drm/panfrost: add Mali-G68 support
Add the features, issues, and ID for Mali-G68, a first-generation (v9) Valhall GPU.
Tested on Exynos8835: the GPU reports GPU_ID 0x9204 (G68 r1p1).
--- drivers/gpu/drm/panfrost/panfrost_features.h | 2 ++ drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 +++ drivers/gpu/drm/panfrost/panfrost_issues.h | 8 ++++++++ 3 files changed, 13 insertions(+)
drivers/gpu/drm/panfrost/panfrost_features.h +2 -0
@@ -121,6 +121,8 @@ enum panfrost_hw_feature { BIT_ULL(HW_FEATURE_IDVS_GROUP_SIZE) | \ BIT_ULL(HW_FEATURE_CLEAN_ONLY_SAFE)) +#define hw_features_g68 hw_features_g57 +static inline bool panfrost_has_hw_feature (struct panfrost_device *pfdev,enum panfrost_hw_feature feat) {
drivers/gpu/drm/panfrost/panfrost_gpu.c +3 -0
@@ -242,6 +242,9 @@ static const struct panfrost_model gpu_models[] = {/* MediaTek MT8188 Mali-G57 MC3 */ GPU_MODEL (g57,0x9093 ,GPU_REV (g57,0 ,0 )), + +GPU_MODEL (g68,0x9004 , +GPU_REV (g68,1 ,0 ),GPU_REV (g68,1 ,1 )), {0}, };
drivers/gpu/drm/panfrost/panfrost_issues.h +8 -0
@@ -265,6 +265,14 @@ enum panfrost_hw_issue {#define hw_issues_g57_r0p0 (\ BIT_ULL(HW_ISSUE_TTRX_3485)) +#define hw_issues_g68 (\ + BIT_ULL(HW_ISSUE_TTRX_2968_TTRX_3162)) + +#define hw_issues_g68_r1p0 (\ + BIT_ULL(HW_ISSUE_TTRX_3485)) + +#define hw_issues_g68_r1p1 0 +static inline bool panfrost_has_hw_issue (const struct panfrost_device *pfdev,enum panfrost_hw_issue issue) {
---
base-commit: 415606a7be939835db9b0d6b711887586646346d
change-id: 20260803-staging-mainline-ebe89543b632
Best regards,
Signature · 1 line
Markuss Broks <[email protected]>
Quoted 7 lines · On 03/08/2026 10:35, Markuss Broks via B4 Relay wrote:
From: Markuss Broks <[email protected]>
Add the features, issues, and ID for Mali-G68, a first-generation (v9) Valhall GPU.
Tested on Exynos8835: the GPU reportsGPU_ID0x9204(G68 r1p1).Signed-off-by Markuss Broks <[email protected]>
Quoted 62 lines
--- drivers/gpu/drm/panfrost/panfrost_features.h | 2 ++ drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 +++ drivers/gpu/drm/panfrost/panfrost_issues.h | 8 ++++++++ 3 files changed, 13 insertions(+)drivers/gpu/drm/panfrost/panfrost_features.h +2
-0@@ -121,6 +121,8 @@ enum panfrost_hw_feature { BIT_ULL(HW_FEATURE_IDVS_GROUP_SIZE) | \ BIT_ULL(HW_FEATURE_CLEAN_ONLY_SAFE)) +#define hw_features_g68 hw_features_g57 +static inline bool panfrost_has_hw_feature (struct panfrost_device *pfdev,enum panfrost_hw_feature feat) {drivers/gpu/drm/panfrost/panfrost_gpu.c +3
-0@@ -242,6 +242,9 @@ static const struct panfrost_model gpu_models[] = {/* MediaTek MT8188 Mali-G57 MC3 */ GPU_MODEL (g57,0x9093 ,GPU_REV (g57,0 ,0 )), + +GPU_MODEL (g68,0x9004 , +GPU_REV (g68,1 ,0 ),GPU_REV (g68,1 ,1 )), {0}, };drivers/gpu/drm/panfrost/panfrost_issues.h +8
-1@@ -265,6 +265,14 @@ enum panfrost_hw_issue {#define hw_issues_g57_r0p0 (\ BIT_ULL(HW_ISSUE_TTRX_3485)) +#define hw_issues_g68 (\ + BIT_ULL(HW_ISSUE_TTRX_2968_TTRX_3162)) + +#define hw_issues_g68_r1p0 (\ + BIT_ULL(HW_ISSUE_TTRX_3485)) + +#define hw_issues_g68_r1p1 0 +static inline bool panfrost_has_hw_issue (const struct panfrost_device *pfdev,enum panfrost_hw_issue issue) { ---base-commit:
415606a7be939835db9b0d6b711887586646346d
change-id: 20260803-staging-mainline-ebe89543b632Best regards,
Signature · 1 line
Markuss Broks <[email protected]>
Hi Markuss,
I've no means to test this on real hardware, but other than that:
Quoted 64 lines · On 03.08.2026 12:35, Markuss Broks via B4 Relay wrote:
From: Markuss Broks <[email protected]>
Add the features, issues, and ID for Mali-G68, a first-generation (v9) Valhall GPU.
Tested on Exynos8835: the GPU reportsGPU_ID0x9204(G68 r1p1).Signed-off-by Markuss Broks <[email protected]>--- drivers/gpu/drm/panfrost/panfrost_features.h | 2 ++ drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 +++ drivers/gpu/drm/panfrost/panfrost_issues.h | 8 ++++++++ 3 files changed, 13 insertions(+)drivers/gpu/drm/panfrost/panfrost_features.h +2
-0@@ -121,6 +121,8 @@ enum panfrost_hw_feature { BIT_ULL(HW_FEATURE_IDVS_GROUP_SIZE) | \ BIT_ULL(HW_FEATURE_CLEAN_ONLY_SAFE)) +#define hw_features_g68 hw_features_g57 +static inline bool panfrost_has_hw_feature (struct panfrost_device *pfdev,enum panfrost_hw_feature feat) {drivers/gpu/drm/panfrost/panfrost_gpu.c +3
-0@@ -242,6 +242,9 @@ static const struct panfrost_model gpu_models[] = {/* MediaTek MT8188 Mali-G57 MC3 */ GPU_MODEL (g57,0x9093 ,GPU_REV (g57,0 ,0 )), + +GPU_MODEL (g68,0x9004 , +GPU_REV (g68,1 ,0 ),GPU_REV (g68,1 ,1 )), {0}, };drivers/gpu/drm/panfrost/panfrost_issues.h +8
-1@@ -265,6 +265,14 @@ enum panfrost_hw_issue {#define hw_issues_g57_r0p0 (\ BIT_ULL(HW_ISSUE_TTRX_3485)) +#define hw_issues_g68 (\ + BIT_ULL(HW_ISSUE_TTRX_2968_TTRX_3162)) + +#define hw_issues_g68_r1p0 (\ + BIT_ULL(HW_ISSUE_TTRX_3485)) + +#define hw_issues_g68_r1p1 0 +static inline bool panfrost_has_hw_issue (const struct panfrost_device *pfdev,enum panfrost_hw_issue issue) { ---base-commit:
415606a7be939835db9b0d6b711887586646346d
change-id: 20260803-staging-mainline-ebe89543b632
Quoted 3 lines
Best regards,
Signature · 1 line
Markuss Broks <[email protected]>
Adrian Larumbe
Queued to drm-misc-next.
One thing though, I had to adjust the indentation of the GPU_REV() macro before merging. Not a big deal, but always make sure to run the following in your branch before submission:
./scripts/checkpatch.pl --strict --git first_commit~..HEAD
Also, I suppose you didn't have a chance to test it on a g68_r1p0. That would be of interest because of HW_ISSUE_TTRX_3485, which seems to mandate the submission of a dummy job before any real further work. It seems at the moment there's no such a workaround either in the UM Mesa driver or the Panfrost KMD.
Maybe Steven or Boris could elaborate on this?
Quoted 64 lines · On 03.08.2026 12:35, Markuss Broks via B4 Relay wrote:
From: Markuss Broks <[email protected]>
Add the features, issues, and ID for Mali-G68, a first-generation (v9) Valhall GPU.
Tested on Exynos8835: the GPU reportsGPU_ID0x9204(G68 r1p1).Signed-off-by Markuss Broks <[email protected]>--- drivers/gpu/drm/panfrost/panfrost_features.h | 2 ++ drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 +++ drivers/gpu/drm/panfrost/panfrost_issues.h | 8 ++++++++ 3 files changed, 13 insertions(+)drivers/gpu/drm/panfrost/panfrost_features.h +2
-0@@ -121,6 +121,8 @@ enum panfrost_hw_feature { BIT_ULL(HW_FEATURE_IDVS_GROUP_SIZE) | \ BIT_ULL(HW_FEATURE_CLEAN_ONLY_SAFE)) +#define hw_features_g68 hw_features_g57 +static inline bool panfrost_has_hw_feature (struct panfrost_device *pfdev,enum panfrost_hw_feature feat) {drivers/gpu/drm/panfrost/panfrost_gpu.c +3
-0@@ -242,6 +242,9 @@ static const struct panfrost_model gpu_models[] = {/* MediaTek MT8188 Mali-G57 MC3 */ GPU_MODEL (g57,0x9093 ,GPU_REV (g57,0 ,0 )), + +GPU_MODEL (g68,0x9004 , +GPU_REV (g68,1 ,0 ),GPU_REV (g68,1 ,1 )), {0}, };drivers/gpu/drm/panfrost/panfrost_issues.h +8
-1@@ -265,6 +265,14 @@ enum panfrost_hw_issue {#define hw_issues_g57_r0p0 (\ BIT_ULL(HW_ISSUE_TTRX_3485)) +#define hw_issues_g68 (\ + BIT_ULL(HW_ISSUE_TTRX_2968_TTRX_3162)) + +#define hw_issues_g68_r1p0 (\ + BIT_ULL(HW_ISSUE_TTRX_3485)) + +#define hw_issues_g68_r1p1 0 +static inline bool panfrost_has_hw_issue (const struct panfrost_device *pfdev,enum panfrost_hw_issue issue) { ---base-commit:
415606a7be939835db9b0d6b711887586646346d
change-id: 20260803-staging-mainline-ebe89543b632
Quoted 3 lines
Best regards,
Signature · 1 line
Markuss Broks <[email protected]>
Adrian Larumbe
Steven Price
maintainerQuoted 5 lines · Adrián Larumbe
Queued to drm-misc-next.
One thing though, I had to adjust the indentation of the
GPU_REV()macro before merging. Not a big deal, but always make sure to run the following in your branch before submission:
Quoted 8 lines
./scripts/checkpatch.pl--strict --git first_commit~..HEADAlso, I suppose you didn't have a chance to test it on a
g68_r1p0. That would be of interest because ofHW_ISSUE_TTRX_3485, which seems to mandate the submission of a dummy job before any real further work. It seems at the moment there's no such a workaround either in the UM Mesa driver or the Panfrost KMD.Maybe Steven or Boris could elaborate on this?
Yes, it's an unpleasant workaround. But it's also a rare issue. It requires that the kernel driver decides to stop a fragment job at the wrong moment when the fragment endpoint is first configured. The GPU can then end up hanging[1]. The hardware r1p1 fixed the issue. I believe the workaround is to submit a dummy fragment job after power up which ensures that the fragment endpoint is configured before any real work (which might need to be stopped) is submitted.
What I don't actually know is if anyone shipped a r1p0 implementation. There were internal test chips, but many if not all customers jumped to r1p1 where the fix is present.
If there are G68 r1p0s out in the wild then they will "mostly work". It's hard to hit the issue accidentally. So there's definitely still value in the support even without the workaround. But if anyone does have a Mali-G68 r1p0 (that they are trying to use Panfrost on) then it would be good to know.
Thanks,
Steve
[1] I believe the reset logic will then recover the GPU, but will lose any in-flight work. So you'll get rendering errors for that frame, but things should recover.
Quoted 72 lines · On 03.08.2026 12:35, Markuss Broks via B4 Relay wrote:
Quoted 64 lines
From: Markuss Broks <[email protected]>
Add the features, issues, and ID for Mali-G68, a first-generation (v9) Valhall GPU.
Tested on Exynos8835: the GPU reportsGPU_ID0x9204(G68 r1p1).Signed-off-by Markuss Broks <[email protected]>--- drivers/gpu/drm/panfrost/panfrost_features.h | 2 ++ drivers/gpu/drm/panfrost/panfrost_gpu.c | 3 +++ drivers/gpu/drm/panfrost/panfrost_issues.h | 8 ++++++++ 3 files changed, 13 insertions(+)drivers/gpu/drm/panfrost/panfrost_features.h +2
-0@@ -121,6 +121,8 @@ enum panfrost_hw_feature { BIT_ULL(HW_FEATURE_IDVS_GROUP_SIZE) | \ BIT_ULL(HW_FEATURE_CLEAN_ONLY_SAFE)) +#define hw_features_g68 hw_features_g57 +static inline bool panfrost_has_hw_feature (struct panfrost_device *pfdev,enum panfrost_hw_feature feat) {drivers/gpu/drm/panfrost/panfrost_gpu.c +3
-0@@ -242,6 +242,9 @@ static const struct panfrost_model gpu_models[] = {/* MediaTek MT8188 Mali-G57 MC3 */ GPU_MODEL (g57,0x9093 ,GPU_REV (g57,0 ,0 )), + +GPU_MODEL (g68,0x9004 , +GPU_REV (g68,1 ,0 ),GPU_REV (g68,1 ,1 )), {0}, };drivers/gpu/drm/panfrost/panfrost_issues.h +8
-1@@ -265,6 +265,14 @@ enum panfrost_hw_issue {#define hw_issues_g57_r0p0 (\ BIT_ULL(HW_ISSUE_TTRX_3485)) +#define hw_issues_g68 (\ + BIT_ULL(HW_ISSUE_TTRX_2968_TTRX_3162)) + +#define hw_issues_g68_r1p0 (\ + BIT_ULL(HW_ISSUE_TTRX_3485)) + +#define hw_issues_g68_r1p1 0 +static inline bool panfrost_has_hw_issue (const struct panfrost_device *pfdev,enum panfrost_hw_issue issue) { ---base-commit:
415606a7be939835db9b0d6b711887586646346d
change-id: 20260803-staging-mainline-ebe89543b632Quoted 3 lines
Best regards,
Signature · 1 line
Markuss Broks <[email protected]>Adrian Larumbe