Skip to content

Drm: phytium: update phytium drm controller driver support to 6.6.0.4 - #2255

Merged
opsiff merged 2 commits into
deepin-community:linux-6.6.yfrom
wangchenlu2236:drm-6.6.y
Nov 6, 2026
Merged

opsiff merged 2 commits into
deepin-community:linux-6.6.yfrom
wangchenlu2236:drm-6.6.y

Conversation

@wangchenlu2236

@wangchenlu2236 wangchenlu2236 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

This patches updates the support for phytium drm controller driver.
1.drm/phytium: Read EDID in BMC mode
2.drm/phytium: Bugfix lane count parameter can't be set problem

Summary by Sourcery

Improve Phytium DRM controller support by enabling BMC-mode display detection and correcting DisplayPort lane-count handling.

New Features:

  • Add EDID detection for Phytium DisplayPort connectors operating in BMC mode.

Bug Fixes:

  • Fix configurable source lane counts so non-default values are honored.

For BMC mode, due to OpenBMC KVM need to read edid in
phytium_connector_get_modes() function, other application
scenarios, read edid in phytium_connector_detect() function.

Mainline: NA
Signed-off-by: Wang Hao <wanghao1851@phytium.com.cn>
Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn>
Signed-off-by: Wang Chenlu <wangchenlu2236@phytium.com.cn>
Fix the issue where the source_max_lane_count parameter
cannot be customized during driver installation.

Mainline: NA
Signed-off-by: WangHao <wanghao1851@phytium.com.cn>
Signed-off-by: Wang Yinfeng <wangyinfeng@phytium.com.cn>
Signed-off-by: Wang Chenlu <wangchenlu2236@phytium.com.cn>
@sourcery-ai

sourcery-ai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Updates the Phytium DRM DP controller for the 6.6.0.4 support level by adding mode-aware EDID handling and lifecycle management for BMC and normal DP paths, and by fixing source lane-count configuration so non-default values are honored.

Sequence diagram for Phytium DP EDID handling

sequenceDiagram
    participant HPD as DP_HPD
    participant Connector as DRM_Connector
    participant DP as Phytium_DP
    participant AUX as DP_AUX_DDC
    participant DRM as DRM_EDID

    HPD->>Connector: phytium_dp_long_pulse()
    Connector->>DP: phytium_dp_set_edid()
    DP->>DP: phytium_dp_unset_edid()
    DP->>AUX: drm_get_edid()
    AUX-->>DP: detect_edid
    DP->>DRM: drm_detect_monitor_audio()
    DRM-->>DP: has_audio
    Connector->>Connector: phytium_connector_get_modes()
    Connector->>DRM: drm_edid_is_valid()
    Connector->>DRM: drm_add_edid_modes()
Loading

File-Level Changes

Change Details Files
Add BMC-mode EDID acquisition while retaining cached EDID for normal DP operation.
  • Read EDID through the DP AUX DDC channel in BMC mode and update connector modes/audio state.
  • Introduce cached detected-EDID ownership and cleanup helpers.
  • Refresh cached EDID after non-BMC hotplug/link training and report disconnection when no EDID is found.
  • Avoid freeing persistent eDP or non-BMC cached EDID from the mode-query path.
drivers/gpu/drm/phytium/phytium_dp.c
drivers/gpu/drm/phytium/phytium_dp.h
Make the DP source lane-count override effective when configured below the default four lanes.
  • Return the configured maximum lane count whenever it is not four; otherwise retain the per-port lane-count table behavior.
drivers/gpu/drm/phytium/px210_dp.c

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

@deepin-ci-robot

Copy link
Copy Markdown

[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 dongert for approval. For more information see the Code Review Process.

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

@deepin-ci-robot

Copy link
Copy Markdown

Hi @wangchenlu2236. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@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 ✨

Copilot AI 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.

🟡 Changes recommended

Unresolved critical defects overstate a one-lane port’s capacity and prematurely free persistent eDP EDID, risking link-training failures, use-after-free, and double-free.

6 open issues
What changed in this PR

Updates the Phytium DRM controller driver toward 6.6.0.4, adjusting EDID handling for BMC and non-BMC displays and honoring configurable DisplayPort lane counts.

Changes:

  • Cache non-BMC DisplayPort EDID during hotplug detection while retaining mode-time reads for BMC displays.
  • Adjust EDID ownership and audio-capability detection.
  • Apply non-default source lane-count settings on PX210.
File Description
drivers/​gpu/​drm/​phytium/​px210_dp.c Applies the source lane-count override.
drivers/​gpu/​drm/​phytium/​phytium_dp.h Adds storage for cached detection EDID.
drivers/​gpu/​drm/​phytium/​phytium_dp.c Updates EDID caching, mode probing, and audio detection.

Review effort: Balanced

Comment on lines +341 to 342
if (priv->info.bmc_mode)
kfree(edid);
Comment on lines +899 to +900
if (source_max_lane_count != 4)
return source_max_lane_count;
} else if (priv->info.bmc_mode) {
edid = drm_get_edid(connector, &phytium_dp->aux.ddc);
} else {
edid = phytium_dp->detect_edid;
Comment on lines +331 to +332
if (priv->info.bmc_mode)
phytium_dp->has_audio = drm_detect_monitor_audio(edid);
struct phytium_dp_device *phytium_dp = connector_to_dp_device(connector);

phytium_dp_unset_edid(connector);
phytium_dp->detect_edid = drm_get_edid(connector, &phytium_dp->aux.ddc);
Comment on lines +1794 to +1798
if (!priv->info.bmc_mode) {
status = phytium_dp_set_edid(connector);
if (status == connector_status_disconnected)
goto out;
}
@opsiff
opsiff merged commit 376acd4 into deepin-community:linux-6.6.y Nov 6, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants