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/msm/a6xx: Update HFI definitions

Update the HFI definitions to support additional GMU based power
features.

Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/714671/
Message-ID: <20260327-a8xx-gpu-batch2-v2-10-2b53c38d2101@oss.qualcomm.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>

authored by

Akhil P Oommen and committed by
Rob Clark
742b4e88 29c1d7e5

+111 -5
-3
drivers/gpu/drm/msm/adreno/a6xx_hfi.c
··· 851 851 return a6xx_hfi_send_msg(gmu, HFI_H2F_FEATURE_CTRL, &msg, sizeof(msg), NULL, 0); 852 852 } 853 853 854 - #define HFI_FEATURE_IFPC 9 855 854 #define IFPC_LONG_HYST 0x1680 856 855 857 856 static int a6xx_hfi_enable_ifpc(struct a6xx_gmu *gmu) ··· 860 861 861 862 return a6xx_hfi_feature_ctrl_msg(gmu, HFI_FEATURE_IFPC, 1, IFPC_LONG_HYST); 862 863 } 863 - 864 - #define HFI_FEATURE_ACD 12 865 864 866 865 static int a6xx_hfi_enable_acd(struct a6xx_gmu *gmu) 867 866 {
+111 -2
drivers/gpu/drm/msm/adreno/a6xx_hfi.h
··· 165 165 u32 data[16 * MAX_ACD_STRIDE]; 166 166 } __packed; 167 167 168 + #define CLX_DATA(irated, num_phases, clx_path, extd_intf) \ 169 + ((extd_intf << 29) | \ 170 + (clx_path << 28) | \ 171 + (num_phases << 22) | \ 172 + (irated << 16)) 173 + 174 + struct a6xx_hfi_clx_domain_v2 { 175 + /** 176 + * @data: BITS[0:15] Migration time 177 + * BITS[16:21] Current rating 178 + * BITS[22:27] Phases for domain 179 + * BITS[28:28] Path notification 180 + * BITS[29:31] Extra features 181 + */ 182 + u32 data; 183 + /** @clxt: CLX time in microseconds */ 184 + u32 clxt; 185 + /** @clxh: CLH time in microseconds */ 186 + u32 clxh; 187 + /** @urg_mode: Urgent HW throttle mode of operation */ 188 + u32 urg_mode; 189 + /** @lkg_en: Enable leakage current estimate */ 190 + u32 lkg_en; 191 + /** curr_budget: Current Budget */ 192 + u32 curr_budget; 193 + } __packed; 194 + 195 + #define HFI_H2F_MSG_CLX_TBL 8 196 + 197 + #define MAX_CLX_DOMAINS 2 198 + struct a6xx_hfi_clx_table_v2_cmd { 199 + u32 hdr; 200 + u32 version; 201 + struct a6xx_hfi_clx_domain_v2 domain[MAX_CLX_DOMAINS]; 202 + } __packed; 203 + 168 204 #define HFI_H2F_MSG_START 10 169 205 170 206 struct a6xx_hfi_msg_start { ··· 212 176 struct a6xx_hfi_msg_feature_ctrl { 213 177 u32 header; 214 178 u32 feature; 179 + #define HFI_FEATURE_DCVS 0 180 + #define HFI_FEATURE_HWSCHED 1 181 + #define HFI_FEATURE_PREEMPTION 2 182 + #define HFI_FEATURE_CLOCKS_ON 3 183 + #define HFI_FEATURE_BUS_ON 4 184 + #define HFI_FEATURE_RAIL_ON 5 185 + #define HFI_FEATURE_HWCG 6 186 + #define HFI_FEATURE_LM 7 187 + #define HFI_FEATURE_THROTTLE 8 188 + #define HFI_FEATURE_IFPC 9 189 + #define HFI_FEATURE_NAP 10 190 + #define HFI_FEATURE_BCL 11 191 + #define HFI_FEATURE_ACD 12 192 + #define HFI_FEATURE_DIDT 13 193 + #define HFI_FEATURE_DEPRECATED 14 194 + #define HFI_FEATURE_CB 15 195 + #define HFI_FEATURE_KPROF 16 196 + #define HFI_FEATURE_BAIL_OUT_TIMER 17 197 + #define HFI_FEATURE_GMU_STATS 18 198 + #define HFI_FEATURE_DBQ 19 199 + #define HFI_FEATURE_MINBW 20 200 + #define HFI_FEATURE_CLX 21 201 + #define HFI_FEATURE_LSR 23 202 + #define HFI_FEATURE_LPAC 24 203 + #define HFI_FEATURE_HW_FENCE 25 204 + #define HFI_FEATURE_PERF_NORETAIN 26 205 + #define HFI_FEATURE_DMS 27 206 + #define HFI_FEATURE_THERMAL 28 207 + #define HFI_FEATURE_AQE 29 208 + #define HFI_FEATURE_TDCVS 30 209 + #define HFI_FEATURE_DCE 31 210 + #define HFI_FEATURE_IFF_PCLX 32 211 + #define HFI_FEATURE_SOFT_RESET 0x10000001 212 + #define HFI_FEATURE_DCVS_PROFILE 0x10000002 213 + #define HFI_FEATURE_FAST_CTX_DESTROY 0x10000003 215 214 u32 enable; 216 215 u32 data; 217 216 } __packed; ··· 270 199 u32 header; 271 200 u32 version; 272 201 u32 type; 273 - #define HFI_TABLE_BW_VOTE 0 274 - #define HFI_TABLE_GPU_PERF 1 202 + #define HFI_TABLE_BW_VOTE 0 203 + #define HFI_TABLE_GPU_PERF 1 204 + #define HFI_TABLE_DIDT 2 205 + #define HFI_TABLE_ACD 3 206 + #define HFI_TABLE_CLX_V1 4 /* Unused */ 207 + #define HFI_TABLE_CLX_V2 5 208 + #define HFI_TABLE_THERM 6 209 + #define HFI_TABLE_DCVS 7 210 + #define HFI_TABLE_SYS_TIME 8 211 + #define HFI_TABLE_GMU_DCVS 9 212 + #define HFI_TABLE_LIMITS_MIT 10 275 213 struct a6xx_hfi_table_entry entry[]; 276 214 } __packed; 277 215 ··· 304 224 u32 header; 305 225 u32 bw; 306 226 u32 freq; 227 + } __packed; 228 + 229 + struct a6xx_hfi_limits_cfg { 230 + u32 enable; 231 + u32 msg_path; 232 + u32 lkg_en; 233 + /* 234 + * BIT[0]: 0 = (static) throttle to fixed sid level 235 + * 1 = (dynamic) throttle to sid level calculated by HW 236 + * BIT[1]: 0 = Mx 237 + * 1 = Bx 238 + */ 239 + u32 mode; 240 + u32 sid; 241 + /* Mitigation time in microseconds */ 242 + u32 mit_time; 243 + /* Max current in mA during mitigation */ 244 + u32 curr_limit; 245 + } __packed; 246 + 247 + struct a6xx_hfi_limits_tbl { 248 + u8 feature_id; 249 + #define GMU_MIT_IFF 0 250 + #define GMU_MIT_PCLX 1 251 + u8 domain; 252 + #define GMU_GX_DOMAIN 0 253 + #define GMU_MX_DOMAIN 1 254 + u16 feature_rev; 255 + struct a6xx_hfi_limits_cfg cfg; 307 256 } __packed; 308 257 309 258 #endif