mbox series

[SRU,J:linux-hwe-6.8,v2,0/2] Fix i915 HDMI shutdown panic

Message ID 20260826014906.1472193-1-an.wu@canonical.com
Headers show
Series Fix i915 HDMI shutdown panic | expand

Message

An Wu Aug. 26, 2026, 1:49 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2164507

Changes since v1:
- Corrected Subject tag from [SRU][J:linux] to [SRU][J:linux-hwe-6.8] to
  match the target kernel.
- Restored the full upstream trailers (Bspec, Cc, Reviewed-by, Link,
  original Signed-off-by lines) that were dropped on backport.
- Rewrapped commit-message bodies to 80 columns.

SRU Justification:

[ Impact ]
On affected Intel i915 systems, shutting down with an HDMI display connected
can trigger a kernel NULL pointer dereference in intel_tc_port_in_dp_alt_mode()
from the fbcon restore modeset path. The panic prevents a clean shutdown.

[ Fix ]
Backport the i915 VBT dedicated_external support and make i915 avoid Type-C
port/DPLL handling when the digital port has no Type-C state.

Patches:
- 203c7904f2d8 ("drm/i915/vbt: Add fields dedicated_external and
  dyn_port_over_tc")
- df5dd52a6de4 ("drm/i915/display: Handle dedicated external ports in
  intel_encoder_is_tc()")

The second patch includes Jammy 6.8-specific context adjustments for the
observed panic path where intel_phy_is_tc() is true but dig_port->tc is NULL.

[ Test Plan ]
1. Boot the patched Jammy 6.8 kernel on the affected system.
2. Connect an HDMI display.
3. Shut down system
4. Verify no kernel panic/oops is reported and the system powers off or reboots
   cleanly.

[ Where problems could occur ]
The changes are limited to i915 display Type-C/HDMI port detection and DPLL
selection. Regressions could affect display detection or modeset behavior on
Intel platforms with Type-C capable display PHYs, especially HDMI/DP ports
sharing TC-related PHY definitions.

[ Other Info ]
The fix was validated on the affected machine by rebuilding i915.ko for
6.8.0-139-generic and confirming the HDMI-connected shutdown issue no longer
reproduces.

ChunAn Wu (2):
  drm/i915/vbt: Add fields dedicated_external and dyn_port_over_tc
  drm/i915/display: Handle dedicated external ports in
    intel_encoder_is_tc()

 drivers/gpu/drm/i915/display/intel_bios.c     | 71 +++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_bios.h     |  2 +
 drivers/gpu/drm/i915/display/intel_ddi.c      | 11 +++
 drivers/gpu/drm/i915/display/intel_display.c  |  4 ++
 .../drm/i915/display/intel_display_types.h    |  1 +
 drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 15 +++-
 drivers/gpu/drm/i915/display/intel_tc.c       |  2 +-
 drivers/gpu/drm/i915/display/intel_vbt_defs.h |  3 +-
 8 files changed, 105 insertions(+), 4 deletions(-)

Comments

Rickey Castillo Aug. 26, 2026, 9:34 p.m. UTC | #1
On 8/25/26 19:49, ChunAn Wu via kernel-team wrote:
> BugLink: https://bugs.launchpad.net/bugs/2164507
>
> Changes since v1:
> - Corrected Subject tag from [SRU][J:linux] to [SRU][J:linux-hwe-6.8] to
>    match the target kernel.
> - Restored the full upstream trailers (Bspec, Cc, Reviewed-by, Link,
>    original Signed-off-by lines) that were dropped on backport.
> - Rewrapped commit-message bodies to 80 columns.
>
> SRU Justification:
>
> [ Impact ]
> On affected Intel i915 systems, shutting down with an HDMI display connected
> can trigger a kernel NULL pointer dereference in intel_tc_port_in_dp_alt_mode()
> from the fbcon restore modeset path. The panic prevents a clean shutdown.
>
> [ Fix ]
> Backport the i915 VBT dedicated_external support and make i915 avoid Type-C
> port/DPLL handling when the digital port has no Type-C state.
>
> Patches:
> - 203c7904f2d8 ("drm/i915/vbt: Add fields dedicated_external and
>    dyn_port_over_tc")
> - df5dd52a6de4 ("drm/i915/display: Handle dedicated external ports in
>    intel_encoder_is_tc()")
>
> The second patch includes Jammy 6.8-specific context adjustments for the
> observed panic path where intel_phy_is_tc() is true but dig_port->tc is NULL.
>
> [ Test Plan ]
> 1. Boot the patched Jammy 6.8 kernel on the affected system.
> 2. Connect an HDMI display.
> 3. Shut down system
> 4. Verify no kernel panic/oops is reported and the system powers off or reboots
>     cleanly.
>
> [ Where problems could occur ]
> The changes are limited to i915 display Type-C/HDMI port detection and DPLL
> selection. Regressions could affect display detection or modeset behavior on
> Intel platforms with Type-C capable display PHYs, especially HDMI/DP ports
> sharing TC-related PHY definitions.
>
> [ Other Info ]
> The fix was validated on the affected machine by rebuilding i915.ko for
> 6.8.0-139-generic and confirming the HDMI-connected shutdown issue no longer
> reproduces.
>
> ChunAn Wu (2):
>    drm/i915/vbt: Add fields dedicated_external and dyn_port_over_tc
>    drm/i915/display: Handle dedicated external ports in
>      intel_encoder_is_tc()
>
>   drivers/gpu/drm/i915/display/intel_bios.c     | 71 +++++++++++++++++++
>   drivers/gpu/drm/i915/display/intel_bios.h     |  2 +
>   drivers/gpu/drm/i915/display/intel_ddi.c      | 11 +++
>   drivers/gpu/drm/i915/display/intel_display.c  |  4 ++
>   .../drm/i915/display/intel_display_types.h    |  1 +
>   drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 15 +++-
>   drivers/gpu/drm/i915/display/intel_tc.c       |  2 +-
>   drivers/gpu/drm/i915/display/intel_vbt_defs.h |  3 +-
>   8 files changed, 105 insertions(+), 4 deletions(-)
>
Please update the LP bug description to add more info about the fix.

Acked-by: Rickey Castillo <rickey.castillo.valenzuela@canonical.com>
Edoardo Canepa Aug. 28, 2026, 12:56 p.m. UTC | #2
Rejected for the following reasons:

There's another submission on the mailing list for N:linux.
J:linux-hwe-6.8 will pick up that instead.

On 8/26/26 04:49, ChunAn Wu via kernel-team wrote:
> BugLink: https://bugs.launchpad.net/bugs/2164507
>
> Changes since v1:
> - Corrected Subject tag from [SRU][J:linux] to [SRU][J:linux-hwe-6.8] to
>    match the target kernel.
> - Restored the full upstream trailers (Bspec, Cc, Reviewed-by, Link,
>    original Signed-off-by lines) that were dropped on backport.
> - Rewrapped commit-message bodies to 80 columns.
>
> SRU Justification:
>
> [ Impact ]
> On affected Intel i915 systems, shutting down with an HDMI display connected
> can trigger a kernel NULL pointer dereference in intel_tc_port_in_dp_alt_mode()
> from the fbcon restore modeset path. The panic prevents a clean shutdown.
>
> [ Fix ]
> Backport the i915 VBT dedicated_external support and make i915 avoid Type-C
> port/DPLL handling when the digital port has no Type-C state.
>
> Patches:
> - 203c7904f2d8 ("drm/i915/vbt: Add fields dedicated_external and
>    dyn_port_over_tc")
> - df5dd52a6de4 ("drm/i915/display: Handle dedicated external ports in
>    intel_encoder_is_tc()")
>
> The second patch includes Jammy 6.8-specific context adjustments for the
> observed panic path where intel_phy_is_tc() is true but dig_port->tc is NULL.
>
> [ Test Plan ]
> 1. Boot the patched Jammy 6.8 kernel on the affected system.
> 2. Connect an HDMI display.
> 3. Shut down system
> 4. Verify no kernel panic/oops is reported and the system powers off or reboots
>     cleanly.
>
> [ Where problems could occur ]
> The changes are limited to i915 display Type-C/HDMI port detection and DPLL
> selection. Regressions could affect display detection or modeset behavior on
> Intel platforms with Type-C capable display PHYs, especially HDMI/DP ports
> sharing TC-related PHY definitions.
>
> [ Other Info ]
> The fix was validated on the affected machine by rebuilding i915.ko for
> 6.8.0-139-generic and confirming the HDMI-connected shutdown issue no longer
> reproduces.
>
> ChunAn Wu (2):
>    drm/i915/vbt: Add fields dedicated_external and dyn_port_over_tc
>    drm/i915/display: Handle dedicated external ports in
>      intel_encoder_is_tc()
>
>   drivers/gpu/drm/i915/display/intel_bios.c     | 71 +++++++++++++++++++
>   drivers/gpu/drm/i915/display/intel_bios.h     |  2 +
>   drivers/gpu/drm/i915/display/intel_ddi.c      | 11 +++
>   drivers/gpu/drm/i915/display/intel_display.c  |  4 ++
>   .../drm/i915/display/intel_display_types.h    |  1 +
>   drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 15 +++-
>   drivers/gpu/drm/i915/display/intel_tc.c       |  2 +-
>   drivers/gpu/drm/i915/display/intel_vbt_defs.h |  3 +-
>   8 files changed, 105 insertions(+), 4 deletions(-)
>