Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RISCV] feat: add kernel fpu to support rdna graphics card #400

Merged

Conversation

RevySR
Copy link
Contributor

@RevySR RevySR commented Sep 4, 2024

No description provided.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mingcongbai for approval. For more information see the Code Review Process.

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

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

This is needed to support recent hardware in the amdgpu DRM driver. The
FPU code in that driver is not performance-critical, so only provide the
minimal support.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Since it is not possible to incrementally add/remove extensions from the
compiler's ISA string by appending arguments, any code that wants to
modify the ISA string must recreate the whole thing. To support this,
factor out the logic for generating the -march argument so it can be
reused where needed.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
RISC-V uses kernel_fpu_begin()/kernel_fpu_end() like several other
architectures. Enabling hardware FP requires overriding the ISA string
for the relevant compilation units.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
@RevySR RevySR force-pushed the deepin/linux-6.6.y/riscv-rdna branch from f541c0c to c4e67c7 Compare September 13, 2024 11:09
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • arch/riscv/Makefile中,移除了# ISA string setting部分,可能需要确认这是否是有意为之。
  • arch/riscv/Makefile.isa被添加,这可能是为了定义RISC-V架构的特定配置。
  • arch/riscv/kernel/process.c中,新增了EXPORT_SYMBOL_GPL(__fstate_save);EXPORT_SYMBOL_GPL(__fstate_restore);,这可能是为了导出特定的函数,但需要确认这些函数的作用。
  • drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c中,修改了#if条件判断,增加了对RISCV架构的支持,这可能是为了确保在RISCV架构上正确地使用FPU。
  • drivers/gpu/drm/amd/display/dc/dml/Makefile中,添加了对RISC-V架构的支持,并修改了编译标志,这可能是为了确保在RISC-V架构上正确地编译DML代码。

是否建议立即修改:

  • 是,需要确认上述更改是否符合预期功能,并确保它们不会引入任何错误或兼容性问题。特别是移除arch/riscv/Makefile中的# ISA string setting部分可能会影响其他依赖这些设置的代码部分,需要特别注意。

@opsiff
Copy link
Member

opsiff commented Sep 13, 2024

/lgtm

@opsiff opsiff merged commit 15557da into deepin-community:linux-6.6.y Sep 13, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants