From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/gpu/arm/bifrost/mali_kbase_hw.c | 94 ++++++++++++++++++++++++++++++-----------------
1 files changed, 60 insertions(+), 34 deletions(-)
diff --git a/kernel/drivers/gpu/arm/bifrost/mali_kbase_hw.c b/kernel/drivers/gpu/arm/bifrost/mali_kbase_hw.c
index 7ad583c..b07327a 100644
--- a/kernel/drivers/gpu/arm/bifrost/mali_kbase_hw.c
+++ b/kernel/drivers/gpu/arm/bifrost/mali_kbase_hw.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
/*
*
- * (C) COPYRIGHT 2012-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2012-2023 ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -68,9 +68,6 @@
case GPU_ID2_PRODUCT_TBAX:
features = base_hw_features_tBAx;
break;
- case GPU_ID2_PRODUCT_TDUX:
- features = base_hw_features_tDUx;
- break;
case GPU_ID2_PRODUCT_TODX:
case GPU_ID2_PRODUCT_LODX:
features = base_hw_features_tODx;
@@ -80,6 +77,14 @@
break;
case GPU_ID2_PRODUCT_TVAX:
features = base_hw_features_tVAx;
+ break;
+ case GPU_ID2_PRODUCT_TTUX:
+ case GPU_ID2_PRODUCT_LTUX:
+ features = base_hw_features_tTUx;
+ break;
+ case GPU_ID2_PRODUCT_TTIX:
+ case GPU_ID2_PRODUCT_LTIX:
+ features = base_hw_features_tTIx;
break;
default:
features = base_hw_features_generic;
@@ -133,8 +138,7 @@
static const struct base_hw_product base_hw_products[] = {
{ GPU_ID2_PRODUCT_TMIX,
- { { GPU_ID2_VERSION_MAKE(0, 0, 1),
- base_hw_issues_tMIx_r0p0_05dev0 },
+ { { GPU_ID2_VERSION_MAKE(0, 0, 1), base_hw_issues_tMIx_r0p0_05dev0 },
{ GPU_ID2_VERSION_MAKE(0, 0, 2), base_hw_issues_tMIx_r0p0 },
{ GPU_ID2_VERSION_MAKE(0, 1, 0), base_hw_issues_tMIx_r0p1 },
{ U32_MAX /* sentinel value */, NULL } } },
@@ -204,10 +208,6 @@
{ GPU_ID2_VERSION_MAKE(0, 0, 2), base_hw_issues_tBAx_r0p0 },
{ U32_MAX, NULL } } },
- { GPU_ID2_PRODUCT_TDUX,
- { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tDUx_r0p0 },
- { U32_MAX, NULL } } },
-
{ GPU_ID2_PRODUCT_TODX,
{ { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tODx_r0p0 },
{ GPU_ID2_VERSION_MAKE(0, 0, 4), base_hw_issues_tODx_r0p0 },
@@ -225,6 +225,32 @@
{ GPU_ID2_PRODUCT_TVAX,
{ { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tVAx_r0p0 },
{ U32_MAX, NULL } } },
+
+ { GPU_ID2_PRODUCT_TTUX,
+ { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tTUx_r0p0 },
+ { GPU_ID2_VERSION_MAKE(0, 1, 0), base_hw_issues_tTUx_r0p1 },
+ { GPU_ID2_VERSION_MAKE(1, 0, 0), base_hw_issues_tTUx_r1p0 },
+ { GPU_ID2_VERSION_MAKE(1, 1, 0), base_hw_issues_tTUx_r1p1 },
+ { GPU_ID2_VERSION_MAKE(1, 2, 0), base_hw_issues_tTUx_r1p2 },
+ { GPU_ID2_VERSION_MAKE(1, 3, 0), base_hw_issues_tTUx_r1p3 },
+ { U32_MAX, NULL } } },
+
+ { GPU_ID2_PRODUCT_LTUX,
+ { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tTUx_r0p0 },
+ { GPU_ID2_VERSION_MAKE(1, 0, 0), base_hw_issues_tTUx_r1p0 },
+ { GPU_ID2_VERSION_MAKE(1, 1, 0), base_hw_issues_tTUx_r1p1 },
+ { GPU_ID2_VERSION_MAKE(1, 2, 0), base_hw_issues_tTUx_r1p2 },
+ { GPU_ID2_VERSION_MAKE(1, 3, 0), base_hw_issues_tTUx_r1p3 },
+ { U32_MAX, NULL } } },
+
+ { GPU_ID2_PRODUCT_TTIX,
+ { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tTIx_r0p0 },
+ { U32_MAX, NULL } } },
+
+ { GPU_ID2_PRODUCT_LTIX,
+ { { GPU_ID2_VERSION_MAKE(0, 0, 0), base_hw_issues_tTIx_r0p0 },
+ { U32_MAX, NULL } } },
+
};
u32 gpu_id = kbdev->gpu_props.props.raw_props.gpu_id;
@@ -279,25 +305,20 @@
*/
issues = fallback_issues;
-#if MALI_CUSTOMER_RELEASE
- dev_warn(kbdev->dev,
- "GPU hardware issue table may need updating:\n"
-#else
- dev_info(kbdev->dev,
-#endif
- "r%dp%d status %d is unknown; treating as r%dp%d status %d",
- (gpu_id & GPU_ID2_VERSION_MAJOR) >>
- GPU_ID2_VERSION_MAJOR_SHIFT,
- (gpu_id & GPU_ID2_VERSION_MINOR) >>
- GPU_ID2_VERSION_MINOR_SHIFT,
- (gpu_id & GPU_ID2_VERSION_STATUS) >>
- GPU_ID2_VERSION_STATUS_SHIFT,
- (fallback_version & GPU_ID2_VERSION_MAJOR) >>
- GPU_ID2_VERSION_MAJOR_SHIFT,
- (fallback_version & GPU_ID2_VERSION_MINOR) >>
- GPU_ID2_VERSION_MINOR_SHIFT,
- (fallback_version & GPU_ID2_VERSION_STATUS) >>
- GPU_ID2_VERSION_STATUS_SHIFT);
+ dev_notice(kbdev->dev, "r%dp%d status %d not found in HW issues table;\n",
+ (gpu_id & GPU_ID2_VERSION_MAJOR) >> GPU_ID2_VERSION_MAJOR_SHIFT,
+ (gpu_id & GPU_ID2_VERSION_MINOR) >> GPU_ID2_VERSION_MINOR_SHIFT,
+ (gpu_id & GPU_ID2_VERSION_STATUS) >>
+ GPU_ID2_VERSION_STATUS_SHIFT);
+ dev_notice(kbdev->dev, "falling back to closest match: r%dp%d status %d\n",
+ (fallback_version & GPU_ID2_VERSION_MAJOR) >>
+ GPU_ID2_VERSION_MAJOR_SHIFT,
+ (fallback_version & GPU_ID2_VERSION_MINOR) >>
+ GPU_ID2_VERSION_MINOR_SHIFT,
+ (fallback_version & GPU_ID2_VERSION_STATUS) >>
+ GPU_ID2_VERSION_STATUS_SHIFT);
+ dev_notice(kbdev->dev,
+ "Execution proceeding normally with fallback match\n");
gpu_id &= ~GPU_ID2_VERSION;
gpu_id |= fallback_version;
@@ -323,7 +344,7 @@
issues = kbase_hw_get_issues_for_new_id(kbdev);
if (issues == NULL) {
dev_err(kbdev->dev,
- "Unknown GPU ID %x", gpu_id);
+ "HW product - Unknown GPU ID %x", gpu_id);
return -EINVAL;
}
@@ -367,9 +388,6 @@
case GPU_ID2_PRODUCT_TBAX:
issues = base_hw_issues_model_tBAx;
break;
- case GPU_ID2_PRODUCT_TDUX:
- issues = base_hw_issues_model_tDUx;
- break;
case GPU_ID2_PRODUCT_TODX:
case GPU_ID2_PRODUCT_LODX:
issues = base_hw_issues_model_tODx;
@@ -380,9 +398,17 @@
case GPU_ID2_PRODUCT_TVAX:
issues = base_hw_issues_model_tVAx;
break;
+ case GPU_ID2_PRODUCT_TTUX:
+ case GPU_ID2_PRODUCT_LTUX:
+ issues = base_hw_issues_model_tTUx;
+ break;
+ case GPU_ID2_PRODUCT_TTIX:
+ case GPU_ID2_PRODUCT_LTIX:
+ issues = base_hw_issues_model_tTIx;
+ break;
default:
dev_err(kbdev->dev,
- "Unknown GPU ID %x", gpu_id);
+ "HW issues - Unknown GPU ID %x", gpu_id);
return -EINVAL;
}
}
--
Gitblit v1.6.2