Skip to content

feat: 讯飞机型内存配置频率按机型与CPU定制隐藏 - #960

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:develop/eaglefrom
Resurgamz:task-397823
Oct 29, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:develop/eaglefrom
Resurgamz:task-397823

Conversation

@Resurgamz

@Resurgamz Resurgamz commented Oct 29, 2026 •

Copy link
Copy Markdown

需求

讯飞 Arm(D3000) + 龙芯(3A6000) 台式机,设备管理器隐藏内存详情页“配置频率”。
Task: https://pms.uniontech.com/task-view-397823.html

改动

  • commonfunction.h:SpecialComputerType 新增 kSpecialType11(讯飞);SpecialCpuType 新增 kSpecialCpuType2(飞腾D3000)、kSpecialCpuType3(龙芯3A6000)。
  • commonfunction.cpp:checkBoardVendorFlag() 为 kSpecialType11 增加分支,boardVendorKey 置空,避免落到 default 被当成华为 PGUW(否则 aarch64 会误用 HWGenerator)。
  • DeviceMemory.cpp:分别判断两个值,当 specialComType==kSpecialType11 且 curCpuType 为 kSpecialCpuType2/kSpecialCpuType3 时不再显示“配置频率”。
  • assets/org.deepin.devicemanager.json:更新 specialComType/specialCpuType 描述。

说明

specialComType/specialCpuType 的值由 os-config 按机型下发:讯飞机型 specialComType=11;飞腾D3000 specialCpuType=2;龙芯3A6000 specialCpuType=3。

Summary by Sourcery

为讯飞机型适配特定 CPU 的内存信息展示和板卡厂商识别。

New Features:

  • 按讯飞机型及飞腾 D3000、龙芯 3A6000 CPU 配置隐藏内存详情中的“配置频率”。

Bug Fixes:

  • 避免讯飞机型被误识别为华为定制机型并套用错误的板卡厂商配置。

Enhancements:

  • 扩展机型和 CPU 类型识别信息,并同步更新相关配置描述。

讯飞机型(specialComType=11)且 CPU 为飞腾 D3000(kSpecialCpuType2)/龙芯 3A6000(kSpecialCpuType3)时,隐藏内存详情页“配置频率”。同时为 kSpecialType11 增加 checkBoardVendorFlag 分支,板卡厂商保持空,避免误用华为 HWGenerator。

Task: https://pms.uniontech.com/task-view-397823.html
@sourcery-ai

sourcery-ai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

该 PR 增加讯飞机型及飞腾 D3000、龙芯 3A6000 的识别能力,并通过机型与 CPU 的组合判断隐藏内存详情中的“配置频率”;同时将讯飞机型从默认华为板卡逻辑中排除并同步配置元数据。

Sequence diagram for hiding configured memory speed

sequenceDiagram
    participant DeviceMemory
    participant Common
    participant MemoryDetails

    DeviceMemory->>Common: read specialComType
    DeviceMemory->>Common: read curCpuType
    alt specialComType == kSpecialType11 and curCpuType == kSpecialCpuType2 or kSpecialCpuType3
        DeviceMemory->>MemoryDetails: omit Configured Speed
    else other machine or CPU combination
        DeviceMemory->>MemoryDetails: addOtherDeviceInfo Configured Speed
    end
Loading

Flow diagram for Xunfei board vendor handling

flowchart TD
    A[checkBoardVendorFlag] --> B{specialComType}
    B -->|kSpecialType11| C[boardVendorKey = empty]
    B -->|other values| D[default board vendor handling]
    C --> E[avoid Huawei PGUW fallback]
Loading

File-Level Changes

Change Details Files
为讯飞机型及其指定 CPU 增加专用识别枚举,并在内存详情构建时按组合条件隐藏“配置频率”。
  • 新增讯飞机型、飞腾 D3000 和龙芯 3A6000 的类型标识。
  • 仅当机型为讯飞且 CPU 为两种指定型号时跳过 Configured Speed 字段。
deepin-devicemanager/src/commonfunction.h
deepin-devicemanager/src/DeviceManager/DeviceMemory.cpp
修正讯飞机型的板卡厂商识别,避免被默认映射为华为机型。
  • 为讯飞机型设置空板卡厂商键,使其不再进入默认 PGUW/HWGenerator 路径。
deepin-devicemanager/src/commonfunction.cpp
同步特殊机型和 CPU 类型的配置说明。
  • 更新 specialComType 和 specialCpuType 的描述及取值说明。
deepin-devicemanager/assets/org.deepin.devicemanager.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: max-lvs, Resurgamz

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Resurgamz

Copy link
Copy Markdown
Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

This pr force merged! (status: unstable)

@deepin-bot
deepin-bot Bot merged commit 1c834d1 into linuxdeepin:develop/eagle Oct 29, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants