Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions deepin-devicemanager/src/DeviceManager/DeviceCpu.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -118,10 +118,14 @@ void DeviceCpu::setCpuInfo(const QMap<QString, QString> &mapLscpu, const QMap<QS

if (Common::specialComType == Common::kSpecialType5 ||
Common::specialComType == Common::kSpecialType6 ||
Common::specialComType == Common::kSpecialType7 ||
Common::specialComType == Common::kSpecialType9) {
m_Frequency = m_Frequency.replace("2.189", "2.188");
m_MaxFrequency = m_MaxFrequency.replace("2189", "2188");
Common::specialComType == Common::kSpecialType7) {
m_Frequency = m_Frequency.replace(CPU_FREQ_TYPE5_7_OLD, CPU_FREQ_TYPE5_7_NEW);
m_MaxFrequency = m_MaxFrequency.replace(CPU_MAXFREQ_TYPE5_7_OLD, CPU_MAXFREQ_TYPE5_7_NEW);
}

if (Common::specialComType == Common::kSpecialType9) {
m_Frequency = m_Frequency.replace(CPU_FREQ_TYPE9_OLD, CPU_FREQ_TYPE9_NEW);
m_MaxFrequency = m_MaxFrequency.replace(CPU_MAXFREQ_TYPE9_OLD, CPU_MAXFREQ_TYPE9_NEW);
}

// 获取逻辑数和core数
Expand Down
15 changes: 14 additions & 1 deletion deepin-devicemanager/src/DeviceManager/DeviceCpu.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd.
// Copyright (C) 2019 - 2026 Uniontech Software Technology Co.,Ltd.
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
Expand All @@ -6,7 +6,20 @@
#ifndef DEVICECPU_H
#define DEVICECPU_H
#include "DeviceInfo.h"
#include "commonfunction.h"

Check warning on line 9 in deepin-devicemanager/src/DeviceManager/DeviceCpu.h

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: "commonfunction.h" not found.

Check warning on line 9 in deepin-devicemanager/src/DeviceManager/DeviceCpu.h

View workflow job for this annotation

GitHub Actions / static-check / static-check

Include file: "commonfunction.h" not found.

// kSpecialType5/6/7
#define CPU_FREQ_TYPE5_7_OLD "2.189"
#define CPU_FREQ_TYPE5_7_NEW "2.188"
#define CPU_MAXFREQ_TYPE5_7_OLD "2189"
#define CPU_MAXFREQ_TYPE5_7_NEW "2188"

// kSpecialType9
#define CPU_FREQ_TYPE9_OLD "2.695"
#define CPU_FREQ_TYPE9_NEW "2.7"
#define CPU_MAXFREQ_TYPE9_OLD "2695"
#define CPU_MAXFREQ_TYPE9_NEW "2700"
Comment thread
add-uos marked this conversation as resolved.

/**
* @brief The DeviceCpu class
* 用来描述CPU的类
Expand Down
Loading