[Deepin-Kernel-SIG] [linux 6.6-y] [Upstream] [Intel] drm/i915/display: correct dual pps handling for MTL_PCH+#843
Conversation
Reviewer's GuideIntroduces explicit handling for Meteor Lake (MTL) PCH and newer platforms to correctly report two panel power sequencers (PPS) and backlight controllers, while preserving single-PPS behavior for DG1/DG2 south blocks. Sequence diagram for i915 GetControllerCount logic with MTL PCH updatesequenceDiagram
participant DS as Display System
participant I915 as i915 Driver
participant PCH as PCH Hardware
DS->>I915: GetControllerCount()
activate I915
I915->>PCH: GetPCHType()
activate PCH
PCH-->>I915: PCH_Info (e.g., MTL, DG1, other)
deactivate PCH
alt PCH_TYPE is MTL or newer
I915-->>DS: Returns 2 controllers
else PCH_TYPE is DG1 (and not MTL+)
I915-->>DS: Returns 1 controller
else Other PCH types
I915-->>DS: Returns count based on prior logic
end
deactivate I915
Class diagram for modified functions in i915 display driverclassDiagram
class `intel_backlight.c` {
+cnp_num_backlight_controllers(struct drm_i915_private *i915) int
}
class `intel_pps.c` {
+intel_num_pps(struct drm_i915_private *i915) int
}
`intel_backlight.c` : contains modified cnp_num_backlight_controllers
`intel_pps.c` : contains modified intel_num_pps
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
why cherry-picked 2 times with different commit id... |
|
please add "commit xxx upstream." or "[ Upstream commit xxx ]" in commit msg. |
There was a problem hiding this comment.
Hey @opsiff - I've reviewed your changes - here's some feedback:
- Consider refactoring the PCH >= MTL dual-controller logic into a shared helper to avoid duplicating it in both intel_backlight and intel_pps.
- Add a code comment near the PCH type comparisons to clarify why the >= PCH_MTL check precedes the >= PCH_DG1 check and ensures DG1/DG2 are excluded.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
mainline inclusion commit 1b85bdb from mainline v6.11-rc3 category: bugfix [ Upstream commit 1b85bdb ] On the PCH side the second PPS was introduced in ICP+.Add condition On MTL_PCH and greater platform also having the second PPS. Note that DG1/2 south block only has the single PPS, so need to exclude the fake DG1/2 PCHs Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11488 Fixes: 93cbc1a ("drm/i915/mtl: Add fake PCH for Meteor Lake") Cc: <stable@vger.kernel.org> # v6.9+ Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240801111141.574854-1-dnyaneshwar.bhadane@intel.com (cherry picked from commit da1878b) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> (cherry picked from commit 1b85bdb) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
619dc38 to
07dd516
Compare
deepin pr auto review代码审查意见:
综上所述,建议对代码进行重构,提取公共函数,调整条件判断的顺序,添加注释,并统一代码风格。 |
07dd516 to
255f934
Compare
up
OK |
it contains in v6.12-rc1 and cherry-pick to v6.11-rc3 |
3b19bf6
into
deepin-community:linux-6.6.y
On the PCH side the second PPS was introduced in ICP+.Add condition On MTL_PCH and greater platform also having the second PPS.
Note that DG1/2 south block only has the single PPS, so need to exclude the fake DG1/2 PCHs
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11488
Fixes: 93cbc1a ("drm/i915/mtl: Add fake PCH for Meteor Lake")
Cc: stable@vger.kernel.org # v6.9+
Reviewed-by: Jani Nikula jani.nikula@intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20240801111141.574854-1-dnyaneshwar.bhadane@intel.com (cherry picked from commit da1878b)
(cherry picked from commit 1b85bdb)
Summary by Sourcery
Bug Fixes: