This is a note to let you know that I've just added the patch titled Revert "drm/i915: Extract intel_edp_fixup_vbt_bpp()" to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: revert-drm-i915-extract-intel_edp_fixup_vbt_bpp.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Tue Oct 4 03:42:54 PM CEST 2022 From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Date: Tue, 4 Oct 2022 15:18:01 +0200 Subject: Revert "drm/i915: Extract intel_edp_fixup_vbt_bpp()" From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> This reverts commit a0f7cdd69ca3ba2c563d3d47f5c8f187feb36a75 which is commit 822e5ae701af2964c5808b6ade1d6f3b1eaec967 upstream. This is part of a series of i915 patches that were backported to 5.19.12 but found to be incomplete and caused problems on many systems so they are being reverted. Reported-by: Jerry Ling <jiling@xxxxxxx> Reported-by: Hans de Goede <hdegoede@xxxxxxxxxx> Cc: Thorsten Leemhuis <regressions@xxxxxxxxxxxxx> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Cc: Jani Nikula <jani.nikula@xxxxxxxxx> Cc: Sasha Levin <sashal@xxxxxxxxxx> Link: https://lore.kernel.org/all/55905860-adf9-312c-69cc-491ac8ce1a8b@xxxxxxx/ Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/display/g4x_dp.c | 22 ++++++++++++++++++++-- drivers/gpu/drm/i915/display/intel_ddi.c | 22 ++++++++++++++++++++-- drivers/gpu/drm/i915/display/intel_dp.c | 25 ------------------------- drivers/gpu/drm/i915/display/intel_dp.h | 1 - 4 files changed, 40 insertions(+), 30 deletions(-) --- a/drivers/gpu/drm/i915/display/g4x_dp.c +++ b/drivers/gpu/drm/i915/display/g4x_dp.c @@ -395,8 +395,26 @@ static void intel_dp_get_config(struct i intel_dotclock_calculate(pipe_config->port_clock, &pipe_config->dp_m_n); - if (intel_dp_is_edp(intel_dp)) - intel_edp_fixup_vbt_bpp(encoder, pipe_config->pipe_bpp); + if (intel_dp_is_edp(intel_dp) && dev_priv->vbt.edp.bpp && + pipe_config->pipe_bpp > dev_priv->vbt.edp.bpp) { + /* + * This is a big fat ugly hack. + * + * Some machines in UEFI boot mode provide us a VBT that has 18 + * bpp and 1.62 GHz link bandwidth for eDP, which for reasons + * unknown we fail to light up. Yet the same BIOS boots up with + * 24 bpp and 2.7 GHz link. Use the same bpp as the BIOS uses as + * max, not what it tells us to use. + * + * Note: This will still be broken if the eDP panel is not lit + * up by the BIOS, and thus we can't get the mode at module + * load. + */ + drm_dbg_kms(&dev_priv->drm, + "pipe has %d bpp for eDP panel, overriding BIOS-provided max %d bpp\n", + pipe_config->pipe_bpp, dev_priv->vbt.edp.bpp); + dev_priv->vbt.edp.bpp = pipe_config->pipe_bpp; + } } static void --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -3433,8 +3433,26 @@ static void intel_ddi_get_config(struct pipe_config->has_audio = intel_ddi_is_audio_enabled(dev_priv, cpu_transcoder); - if (encoder->type == INTEL_OUTPUT_EDP) - intel_edp_fixup_vbt_bpp(encoder, pipe_config->pipe_bpp); + if (encoder->type == INTEL_OUTPUT_EDP && dev_priv->vbt.edp.bpp && + pipe_config->pipe_bpp > dev_priv->vbt.edp.bpp) { + /* + * This is a big fat ugly hack. + * + * Some machines in UEFI boot mode provide us a VBT that has 18 + * bpp and 1.62 GHz link bandwidth for eDP, which for reasons + * unknown we fail to light up. Yet the same BIOS boots up with + * 24 bpp and 2.7 GHz link. Use the same bpp as the BIOS uses as + * max, not what it tells us to use. + * + * Note: This will still be broken if the eDP panel is not lit + * up by the BIOS, and thus we can't get the mode at module + * load. + */ + drm_dbg_kms(&dev_priv->drm, + "pipe has %d bpp for eDP panel, overriding BIOS-provided max %d bpp\n", + pipe_config->pipe_bpp, dev_priv->vbt.edp.bpp); + dev_priv->vbt.edp.bpp = pipe_config->pipe_bpp; + } ddi_dotclock_get(pipe_config); --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2737,31 +2737,6 @@ static void intel_edp_mso_mode_fixup(str DRM_MODE_ARG(mode)); } -void intel_edp_fixup_vbt_bpp(struct intel_encoder *encoder, int pipe_bpp) -{ - struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); - - if (dev_priv->vbt.edp.bpp && pipe_bpp > dev_priv->vbt.edp.bpp) { - /* - * This is a big fat ugly hack. - * - * Some machines in UEFI boot mode provide us a VBT that has 18 - * bpp and 1.62 GHz link bandwidth for eDP, which for reasons - * unknown we fail to light up. Yet the same BIOS boots up with - * 24 bpp and 2.7 GHz link. Use the same bpp as the BIOS uses as - * max, not what it tells us to use. - * - * Note: This will still be broken if the eDP panel is not lit - * up by the BIOS, and thus we can't get the mode at module - * load. - */ - drm_dbg_kms(&dev_priv->drm, - "pipe has %d bpp for eDP panel, overriding BIOS-provided max %d bpp\n", - pipe_bpp, dev_priv->vbt.edp.bpp); - dev_priv->vbt.edp.bpp = pipe_bpp; - } -} - static void intel_edp_mso_init(struct intel_dp *intel_dp) { struct drm_i915_private *i915 = dp_to_i915(intel_dp); --- a/drivers/gpu/drm/i915/display/intel_dp.h +++ b/drivers/gpu/drm/i915/display/intel_dp.h @@ -63,7 +63,6 @@ enum irqreturn intel_dp_hpd_pulse(struct void intel_edp_backlight_on(const struct intel_crtc_state *crtc_state, const struct drm_connector_state *conn_state); void intel_edp_backlight_off(const struct drm_connector_state *conn_state); -void intel_edp_fixup_vbt_bpp(struct intel_encoder *encoder, int pipe_bpp); void intel_dp_mst_suspend(struct drm_i915_private *dev_priv); void intel_dp_mst_resume(struct drm_i915_private *dev_priv); int intel_dp_max_link_rate(struct intel_dp *intel_dp); Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-5.19/revert-drm-i915-pps-split-pps_init_delays-into-distinct-parts.patch queue-5.19/revert-drm-i915-bios-split-vbt-data-into-per-panel-vs.-global-parts.patch queue-5.19/revert-drm-i915-extract-intel_edp_fixup_vbt_bpp.patch queue-5.19/revert-drm-i915-bios-split-vbt-parsing-to-global-vs.-panel-specific-parts.patch queue-5.19/revert-drm-i915-dsi-filter-invalid-backlight-and-cabc-ports.patch queue-5.19/revert-drm-i915-dsi-fix-dual-link-dsi-backlight-and-cabc-ports-for-display-11.patch queue-5.19/revert-drm-i915-display-fix-handling-of-enable_psr-parameter.patch queue-5.19/revert-drm-i915-bios-split-parse_driver_features-into-two-parts.patch