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

Configure Feed

Select the types of activity you want to include in your feed.

drm/panthor: Add support for Mali-G1 GPUs

Add support for Mali-G1 GPUs (CSF architecture v14), introducing a new
panthor_hw_arch_v14 entry with reset and L2 power management operations
via the PWR_CONTROL block.

Mali-G1 introduces a dedicated PWR_CONTROL block for managing resets and
power domains. panthor_gpu_info_init() is updated to use this block for
L2, tiler, and shader domain present register reads.

Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Karunika Choo <karunika.choo@arm.com>
Link: https://patch.msgid.link/20251125125548.3282320-9-karunika.choo@arm.com
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>

authored by

Karunika Choo and committed by
Boris Brezillon
ab349049 2008f49a

+32 -4
+1
drivers/gpu/drm/panthor/panthor_fw.c
··· 1503 1503 MODULE_FIRMWARE("arm/mali/arch11.8/mali_csffw.bin"); 1504 1504 MODULE_FIRMWARE("arm/mali/arch12.8/mali_csffw.bin"); 1505 1505 MODULE_FIRMWARE("arm/mali/arch13.8/mali_csffw.bin"); 1506 + MODULE_FIRMWARE("arm/mali/arch14.8/mali_csffw.bin");
+31 -4
drivers/gpu/drm/panthor/panthor_hw.c
··· 6 6 #include "panthor_device.h" 7 7 #include "panthor_gpu.h" 8 8 #include "panthor_hw.h" 9 + #include "panthor_pwr.h" 9 10 #include "panthor_regs.h" 10 11 11 12 #define GPU_PROD_ID_MAKE(arch_major, prod_major) \ ··· 32 31 }, 33 32 }; 34 33 34 + static struct panthor_hw panthor_hw_arch_v14 = { 35 + .ops = { 36 + .soft_reset = panthor_pwr_reset_soft, 37 + .l2_power_off = panthor_pwr_l2_power_off, 38 + .l2_power_on = panthor_pwr_l2_power_on, 39 + }, 40 + }; 41 + 35 42 static struct panthor_hw_entry panthor_hw_match[] = { 36 43 { 37 44 .arch_min = 10, 38 45 .arch_max = 13, 39 46 .hwdev = &panthor_hw_arch_v10, 47 + }, 48 + { 49 + .arch_min = 14, 50 + .arch_max = 14, 51 + .hwdev = &panthor_hw_arch_v14, 40 52 }, 41 53 }; 42 54 ··· 98 84 fallthrough; 99 85 case GPU_PROD_ID_MAKE(13, 1): 100 86 return "Mali-G625"; 87 + case GPU_PROD_ID_MAKE(14, 0): 88 + return "Mali-G1-Ultra"; 89 + case GPU_PROD_ID_MAKE(14, 1): 90 + return "Mali-G1-Premium"; 91 + case GPU_PROD_ID_MAKE(14, 3): 92 + return "Mali-G1-Pro"; 101 93 } 102 94 103 95 return "(Unknown Mali GPU)"; ··· 130 110 131 111 ptdev->gpu_info.as_present = gpu_read(ptdev, GPU_AS_PRESENT); 132 112 133 - ptdev->gpu_info.shader_present = gpu_read64(ptdev, GPU_SHADER_PRESENT); 134 - ptdev->gpu_info.tiler_present = gpu_read64(ptdev, GPU_TILER_PRESENT); 135 - ptdev->gpu_info.l2_present = gpu_read64(ptdev, GPU_L2_PRESENT); 136 - 137 113 /* Introduced in arch 11.x */ 138 114 ptdev->gpu_info.gpu_features = gpu_read64(ptdev, GPU_FEATURES); 115 + 116 + if (panthor_hw_has_pwr_ctrl(ptdev)) { 117 + /* Introduced in arch 14.x */ 118 + ptdev->gpu_info.l2_present = gpu_read64(ptdev, PWR_L2_PRESENT); 119 + ptdev->gpu_info.tiler_present = gpu_read64(ptdev, PWR_TILER_PRESENT); 120 + ptdev->gpu_info.shader_present = gpu_read64(ptdev, PWR_SHADER_PRESENT); 121 + } else { 122 + ptdev->gpu_info.shader_present = gpu_read64(ptdev, GPU_SHADER_PRESENT); 123 + ptdev->gpu_info.tiler_present = gpu_read64(ptdev, GPU_TILER_PRESENT); 124 + ptdev->gpu_info.l2_present = gpu_read64(ptdev, GPU_L2_PRESENT); 125 + } 139 126 } 140 127 141 128 static void panthor_hw_info_init(struct panthor_device *ptdev)