From a5969cabbb4660eab42b6ef0412cbbd1200cf14d Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 12 Oct 2024 07:10:09 +0000
Subject: [PATCH] 修改led为gpio
---
kernel/drivers/gpu/arm/bifrost/ipa/backend/mali_kbase_ipa_counter_common_jm.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/kernel/drivers/gpu/arm/bifrost/ipa/backend/mali_kbase_ipa_counter_common_jm.c b/kernel/drivers/gpu/arm/bifrost/ipa/backend/mali_kbase_ipa_counter_common_jm.c
index 4737b0e..34515a9 100644
--- a/kernel/drivers/gpu/arm/bifrost/ipa/backend/mali_kbase_ipa_counter_common_jm.c
+++ b/kernel/drivers/gpu/arm/bifrost/ipa/backend/mali_kbase_ipa_counter_common_jm.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
/*
*
- * (C) COPYRIGHT 2017-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2017-2022 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
@@ -31,7 +31,7 @@
#define DEFAULT_MIN_SAMPLE_CYCLES 10000
/**
- * read_hwcnt() - read a counter value
+ * kbase_ipa_read_hwcnt() - read a counter value
* @model_data: pointer to model data
* @offset: offset, in bytes, into vinstr buffer
*
@@ -44,8 +44,9 @@
u32 offset)
{
u8 *p = (u8 *)model_data->dump_buf.dump_buf;
+ u64 val = *(u64 *)&p[offset];
- return *(u32 *)&p[offset];
+ return (val > U32_MAX) ? U32_MAX : (u32)val;
}
static inline s64 kbase_ipa_add_saturate(s64 a, s64 b)
--
Gitblit v1.6.2