From 0b0a62b3c1fa631d2dd9213a9e508b0ce58611cd Mon Sep 17 00:00:00 2001 From: Moeta Yuko Date: Sat, 10 Aug 2024 18:21:35 +0800 Subject: [PATCH] drm/i915: fix build for 6.8.12-1-pve and newer --- backport-include/backport/backport_macro.h | 8 ++++++++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/backport-include/backport/backport_macro.h b/backport-include/backport/backport_macro.h index f90cc1ae..a8688226 100644 --- a/backport-include/backport/backport_macro.h +++ b/backport-include/backport/backport_macro.h @@ -1284,6 +1284,14 @@ */ #define BPM_DGLUT_24BIT_MTL_NOT_SUPPORTED +#if LINUX_VERSION_IN_RANGE(6,8,12, 6,8,99) && PVE_RELEASE_VERSION_IS_GEQ(1) +/* + * 5a507b7d2be15f + * drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2 + */ +#define BPM_DRM_DP_ADD_PAYLOAD_PART2_STATE_ARG_NOT_PRESENT +#endif + #if LINUX_VERSION_IS_LESS(6,8,0) && \ !(LINUX_VERSION_IN_RANGE(6,5,13, 6,5,99) && PVE_RELEASE_VERSION_IS_GEQ(4)) /* diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index 43dc663f..76dd8517 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -798,8 +798,13 @@ static void intel_mst_enable_dp(struct intel_atomic_state *state, wait_for_act_sent(encoder, pipe_config); +#ifdef BPM_DRM_DP_ADD_PAYLOAD_PART2_STATE_ARG_NOT_PRESENT + drm_dp_add_payload_part2(&intel_dp->mst_mgr, + drm_atomic_get_mst_payload_state(mst_state, connector->port)); +#else drm_dp_add_payload_part2(&intel_dp->mst_mgr, &state->base, drm_atomic_get_mst_payload_state(mst_state, connector->port)); +#endif if (DISPLAY_VER(dev_priv) >= 14 && pipe_config->fec_enable) intel_de_rmw(dev_priv, MTL_CHICKEN_TRANS(trans), 0,