| .. | .. |
|---|
| 1 | 1 | // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * |
|---|
| 4 | | - * (C) COPYRIGHT 2012-2021 ARM Limited. All rights reserved. |
|---|
| 4 | + * (C) COPYRIGHT 2012-2023 ARM Limited. All rights reserved. |
|---|
| 5 | 5 | * |
|---|
| 6 | 6 | * This program is free software and is provided to you under the terms of the |
|---|
| 7 | 7 | * GNU General Public License version 2 as published by the Free Software |
|---|
| .. | .. |
|---|
| 68 | 68 | case GPU_ID2_PRODUCT_TBAX: |
|---|
| 69 | 69 | features = base_hw_features_tBAx; |
|---|
| 70 | 70 | break; |
|---|
| 71 | | - case GPU_ID2_PRODUCT_TDUX: |
|---|
| 72 | | - features = base_hw_features_tDUx; |
|---|
| 73 | | - break; |
|---|
| 74 | 71 | case GPU_ID2_PRODUCT_TODX: |
|---|
| 75 | 72 | case GPU_ID2_PRODUCT_LODX: |
|---|
| 76 | 73 | features = base_hw_features_tODx; |
|---|
| .. | .. |
|---|
| 80 | 77 | break; |
|---|
| 81 | 78 | case GPU_ID2_PRODUCT_TVAX: |
|---|
| 82 | 79 | features = base_hw_features_tVAx; |
|---|
| 80 | + break; |
|---|
| 81 | + case GPU_ID2_PRODUCT_TTUX: |
|---|
| 82 | + case GPU_ID2_PRODUCT_LTUX: |
|---|
| 83 | + features = base_hw_features_tTUx; |
|---|
| 84 | + break; |
|---|
| 85 | + case GPU_ID2_PRODUCT_TTIX: |
|---|
| 86 | + case GPU_ID2_PRODUCT_LTIX: |
|---|
| 87 | + features = base_hw_features_tTIx; |
|---|
| 83 | 88 | break; |
|---|
| 84 | 89 | default: |
|---|
| 85 | 90 | features = base_hw_features_generic; |
|---|
| .. | .. |
|---|
| 133 | 138 | |
|---|
| 134 | 139 | static const struct base_hw_product base_hw_products[] = { |
|---|
| 135 | 140 | { GPU_ID2_PRODUCT_TMIX, |
|---|
| 136 | | - { { GPU_ID2_VERSION_MAKE(0, 0, 1), |
|---|
| 137 | | - base_hw_issues_tMIx_r0p0_05dev0 }, |
|---|
| 141 | + { { GPU_ID2_VERSION_MAKE(0, 0, 1), base_hw_issues_tMIx_r0p0_05dev0 }, |
|---|
| 138 | 142 | { GPU_ID2_VERSION_MAKE(0, 0, 2), base_hw_issues_tMIx_r0p0 }, |
|---|
| 139 | 143 | { GPU_ID2_VERSION_MAKE(0, 1, 0), base_hw_issues_tMIx_r0p1 }, |
|---|
| 140 | 144 | { U32_MAX /* sentinel value */, NULL } } }, |
|---|
| .. | .. |
|---|
| 204 | 208 | { GPU_ID2_VERSION_MAKE(0, 0, 2), base_hw_issues_tBAx_r0p0 }, |
|---|
| 205 | 209 | { U32_MAX, NULL } } }, |
|---|
| 206 | 210 | |
|---|
| 207 | | - { GPU_ID2_PRODUCT_TDUX, |
|---|
| 208 | | - { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tDUx_r0p0 }, |
|---|
| 209 | | - { U32_MAX, NULL } } }, |
|---|
| 210 | | - |
|---|
| 211 | 211 | { GPU_ID2_PRODUCT_TODX, |
|---|
| 212 | 212 | { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tODx_r0p0 }, |
|---|
| 213 | 213 | { GPU_ID2_VERSION_MAKE(0, 0, 4), base_hw_issues_tODx_r0p0 }, |
|---|
| .. | .. |
|---|
| 225 | 225 | { GPU_ID2_PRODUCT_TVAX, |
|---|
| 226 | 226 | { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tVAx_r0p0 }, |
|---|
| 227 | 227 | { U32_MAX, NULL } } }, |
|---|
| 228 | + |
|---|
| 229 | + { GPU_ID2_PRODUCT_TTUX, |
|---|
| 230 | + { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tTUx_r0p0 }, |
|---|
| 231 | + { GPU_ID2_VERSION_MAKE(0, 1, 0), base_hw_issues_tTUx_r0p1 }, |
|---|
| 232 | + { GPU_ID2_VERSION_MAKE(1, 0, 0), base_hw_issues_tTUx_r1p0 }, |
|---|
| 233 | + { GPU_ID2_VERSION_MAKE(1, 1, 0), base_hw_issues_tTUx_r1p1 }, |
|---|
| 234 | + { GPU_ID2_VERSION_MAKE(1, 2, 0), base_hw_issues_tTUx_r1p2 }, |
|---|
| 235 | + { GPU_ID2_VERSION_MAKE(1, 3, 0), base_hw_issues_tTUx_r1p3 }, |
|---|
| 236 | + { U32_MAX, NULL } } }, |
|---|
| 237 | + |
|---|
| 238 | + { GPU_ID2_PRODUCT_LTUX, |
|---|
| 239 | + { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tTUx_r0p0 }, |
|---|
| 240 | + { GPU_ID2_VERSION_MAKE(1, 0, 0), base_hw_issues_tTUx_r1p0 }, |
|---|
| 241 | + { GPU_ID2_VERSION_MAKE(1, 1, 0), base_hw_issues_tTUx_r1p1 }, |
|---|
| 242 | + { GPU_ID2_VERSION_MAKE(1, 2, 0), base_hw_issues_tTUx_r1p2 }, |
|---|
| 243 | + { GPU_ID2_VERSION_MAKE(1, 3, 0), base_hw_issues_tTUx_r1p3 }, |
|---|
| 244 | + { U32_MAX, NULL } } }, |
|---|
| 245 | + |
|---|
| 246 | + { GPU_ID2_PRODUCT_TTIX, |
|---|
| 247 | + { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tTIx_r0p0 }, |
|---|
| 248 | + { U32_MAX, NULL } } }, |
|---|
| 249 | + |
|---|
| 250 | + { GPU_ID2_PRODUCT_LTIX, |
|---|
| 251 | + { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tTIx_r0p0 }, |
|---|
| 252 | + { U32_MAX, NULL } } }, |
|---|
| 253 | + |
|---|
| 228 | 254 | }; |
|---|
| 229 | 255 | |
|---|
| 230 | 256 | u32 gpu_id = kbdev->gpu_props.props.raw_props.gpu_id; |
|---|
| .. | .. |
|---|
| 279 | 305 | */ |
|---|
| 280 | 306 | issues = fallback_issues; |
|---|
| 281 | 307 | |
|---|
| 282 | | -#if MALI_CUSTOMER_RELEASE |
|---|
| 283 | | - dev_warn(kbdev->dev, |
|---|
| 284 | | - "GPU hardware issue table may need updating:\n" |
|---|
| 285 | | -#else |
|---|
| 286 | | - dev_info(kbdev->dev, |
|---|
| 287 | | -#endif |
|---|
| 288 | | - "r%dp%d status %d is unknown; treating as r%dp%d status %d", |
|---|
| 289 | | - (gpu_id & GPU_ID2_VERSION_MAJOR) >> |
|---|
| 290 | | - GPU_ID2_VERSION_MAJOR_SHIFT, |
|---|
| 291 | | - (gpu_id & GPU_ID2_VERSION_MINOR) >> |
|---|
| 292 | | - GPU_ID2_VERSION_MINOR_SHIFT, |
|---|
| 293 | | - (gpu_id & GPU_ID2_VERSION_STATUS) >> |
|---|
| 294 | | - GPU_ID2_VERSION_STATUS_SHIFT, |
|---|
| 295 | | - (fallback_version & GPU_ID2_VERSION_MAJOR) >> |
|---|
| 296 | | - GPU_ID2_VERSION_MAJOR_SHIFT, |
|---|
| 297 | | - (fallback_version & GPU_ID2_VERSION_MINOR) >> |
|---|
| 298 | | - GPU_ID2_VERSION_MINOR_SHIFT, |
|---|
| 299 | | - (fallback_version & GPU_ID2_VERSION_STATUS) >> |
|---|
| 300 | | - GPU_ID2_VERSION_STATUS_SHIFT); |
|---|
| 308 | + dev_notice(kbdev->dev, "r%dp%d status %d not found in HW issues table;\n", |
|---|
| 309 | + (gpu_id & GPU_ID2_VERSION_MAJOR) >> GPU_ID2_VERSION_MAJOR_SHIFT, |
|---|
| 310 | + (gpu_id & GPU_ID2_VERSION_MINOR) >> GPU_ID2_VERSION_MINOR_SHIFT, |
|---|
| 311 | + (gpu_id & GPU_ID2_VERSION_STATUS) >> |
|---|
| 312 | + GPU_ID2_VERSION_STATUS_SHIFT); |
|---|
| 313 | + dev_notice(kbdev->dev, "falling back to closest match: r%dp%d status %d\n", |
|---|
| 314 | + (fallback_version & GPU_ID2_VERSION_MAJOR) >> |
|---|
| 315 | + GPU_ID2_VERSION_MAJOR_SHIFT, |
|---|
| 316 | + (fallback_version & GPU_ID2_VERSION_MINOR) >> |
|---|
| 317 | + GPU_ID2_VERSION_MINOR_SHIFT, |
|---|
| 318 | + (fallback_version & GPU_ID2_VERSION_STATUS) >> |
|---|
| 319 | + GPU_ID2_VERSION_STATUS_SHIFT); |
|---|
| 320 | + dev_notice(kbdev->dev, |
|---|
| 321 | + "Execution proceeding normally with fallback match\n"); |
|---|
| 301 | 322 | |
|---|
| 302 | 323 | gpu_id &= ~GPU_ID2_VERSION; |
|---|
| 303 | 324 | gpu_id |= fallback_version; |
|---|
| .. | .. |
|---|
| 323 | 344 | issues = kbase_hw_get_issues_for_new_id(kbdev); |
|---|
| 324 | 345 | if (issues == NULL) { |
|---|
| 325 | 346 | dev_err(kbdev->dev, |
|---|
| 326 | | - "Unknown GPU ID %x", gpu_id); |
|---|
| 347 | + "HW product - Unknown GPU ID %x", gpu_id); |
|---|
| 327 | 348 | return -EINVAL; |
|---|
| 328 | 349 | } |
|---|
| 329 | 350 | |
|---|
| .. | .. |
|---|
| 367 | 388 | case GPU_ID2_PRODUCT_TBAX: |
|---|
| 368 | 389 | issues = base_hw_issues_model_tBAx; |
|---|
| 369 | 390 | break; |
|---|
| 370 | | - case GPU_ID2_PRODUCT_TDUX: |
|---|
| 371 | | - issues = base_hw_issues_model_tDUx; |
|---|
| 372 | | - break; |
|---|
| 373 | 391 | case GPU_ID2_PRODUCT_TODX: |
|---|
| 374 | 392 | case GPU_ID2_PRODUCT_LODX: |
|---|
| 375 | 393 | issues = base_hw_issues_model_tODx; |
|---|
| .. | .. |
|---|
| 380 | 398 | case GPU_ID2_PRODUCT_TVAX: |
|---|
| 381 | 399 | issues = base_hw_issues_model_tVAx; |
|---|
| 382 | 400 | break; |
|---|
| 401 | + case GPU_ID2_PRODUCT_TTUX: |
|---|
| 402 | + case GPU_ID2_PRODUCT_LTUX: |
|---|
| 403 | + issues = base_hw_issues_model_tTUx; |
|---|
| 404 | + break; |
|---|
| 405 | + case GPU_ID2_PRODUCT_TTIX: |
|---|
| 406 | + case GPU_ID2_PRODUCT_LTIX: |
|---|
| 407 | + issues = base_hw_issues_model_tTIx; |
|---|
| 408 | + break; |
|---|
| 383 | 409 | default: |
|---|
| 384 | 410 | dev_err(kbdev->dev, |
|---|
| 385 | | - "Unknown GPU ID %x", gpu_id); |
|---|
| 411 | + "HW issues - Unknown GPU ID %x", gpu_id); |
|---|
| 386 | 412 | return -EINVAL; |
|---|
| 387 | 413 | } |
|---|
| 388 | 414 | } |
|---|