Skip to content

drm/amd/display: dont subst v without RISCV_ISA_V #969

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

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

YukariChiba
Copy link
Member

@YukariChiba YukariChiba commented Jul 24, 2025

Prevent v in rv64 to be removed by subst.

Summary by Sourcery

Bug Fixes:

  • Prevent unconditional removal of the ‘v’ extension from the march string in rv64 builds

Prevent v in rv64 to be removed by subst.

Signed-off-by: Yukari Chiba <i@0x7f.cc>
Copy link

sourcery-ai bot commented Jul 24, 2025

Reviewer's Guide

The PR updates the Makefile for the AMD display DC DML driver to only strip the RISC-V “v” extension from the -march flag when CONFIG_RISCV_ISA_V is enabled, preserving the original ISA string otherwise.

File-Level Changes

Change Details Files
Conditionalize removal of the RISC-V “v” ISA extension on CONFIG_RISCV_ISA_V
  • Added an ifdef CONFIG_RISCV_ISA_V guard around the subst-v removal
  • Moved dml_ccflags assignment for removing “v” inside the guarded block
  • Added an else branch that assigns dml_ccflags without stripping “v”
  • Closed the conditional with an endif
drivers/gpu/drm/amd/display/dc/dml/Makefile

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

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the AMD display driver's DML Makefile that was incorrectly removing the 'v' character from RISC-V architecture flags without checking if the V extension was actually configured.

  • Adds conditional check for CONFIG_RISCV_ISA_V before applying the substitution that removes 'v' from the march flag
  • Preserves the original riscv-march-y value when V extension is not configured

@@ -45,8 +45,12 @@ endif

ifdef CONFIG_RISCV
include $(srctree)/arch/riscv/Makefile.isa
ifdef CONFIG_RISCV_ISA_V
# Remove V from the ISA string, like in arch/riscv/Makefile, but keep F and D.
Copy link
Preview

Copilot AI Jul 24, 2025

Choose a reason for hiding this comment

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

The comment should be updated to clarify that V is only removed when CONFIG_RISCV_ISA_V is enabled, as the behavior has changed with the conditional logic.

Suggested change
# Remove V from the ISA string, like in arch/riscv/Makefile, but keep F and D.
# When CONFIG_RISCV_ISA_V is enabled, remove V from the ISA string (like in arch/riscv/Makefile), but keep F and D.

Copilot uses AI. Check for mistakes.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: opsiff

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

The pull request process is described 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

@opsiff opsiff merged commit b0f5ef9 into deepin-community:linux-6.6.y Jul 24, 2025
9 of 11 checks passed
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

3 participants