This is a note to let you know that I've just added the patch titled Revert "drm/i915/pps: Split pps_init_delays() into distinct parts" 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-pps-split-pps_init_delays-into-distinct-parts.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:17:54 +0200 Subject: Revert "drm/i915/pps: Split pps_init_delays() into distinct parts" From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> This reverts commit ad719d5cc7cb5fce0cee9d38ce4913339cb7e1dc which is commit 75bd0d5e4eadb9ce3e9b6fb71971b6e87c38799e 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/intel_pps.c | 66 ++++++++----------------------- 1 file changed, 18 insertions(+), 48 deletions(-) --- a/drivers/gpu/drm/i915/display/intel_pps.c +++ b/drivers/gpu/drm/i915/display/intel_pps.c @@ -1159,83 +1159,53 @@ intel_pps_verify_state(struct intel_dp * } } -static void pps_init_delays_cur(struct intel_dp *intel_dp, - struct edp_power_seq *cur) +static void pps_init_delays(struct intel_dp *intel_dp) { struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); + struct edp_power_seq cur, vbt, spec, + *final = &intel_dp->pps.pps_delays; lockdep_assert_held(&dev_priv->pps_mutex); - intel_pps_readout_hw_state(intel_dp, cur); - - intel_pps_dump_state(intel_dp, "cur", cur); -} + /* already initialized? */ + if (final->t11_t12 != 0) + return; -static void pps_init_delays_vbt(struct intel_dp *intel_dp, - struct edp_power_seq *vbt) -{ - struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); + intel_pps_readout_hw_state(intel_dp, &cur); - *vbt = dev_priv->vbt.edp.pps; + intel_pps_dump_state(intel_dp, "cur", &cur); + vbt = dev_priv->vbt.edp.pps; /* On Toshiba Satellite P50-C-18C system the VBT T12 delay * of 500ms appears to be too short. Ocassionally the panel * just fails to power back on. Increasing the delay to 800ms * seems sufficient to avoid this problem. */ if (dev_priv->quirks & QUIRK_INCREASE_T12_DELAY) { - vbt->t11_t12 = max_t(u16, vbt->t11_t12, 1300 * 10); + vbt.t11_t12 = max_t(u16, vbt.t11_t12, 1300 * 10); drm_dbg_kms(&dev_priv->drm, "Increasing T12 panel delay as per the quirk to %d\n", - vbt->t11_t12); + vbt.t11_t12); } - /* T11_T12 delay is special and actually in units of 100ms, but zero * based in the hw (so we need to add 100 ms). But the sw vbt * table multiplies it with 1000 to make it in units of 100usec, * too. */ - vbt->t11_t12 += 100 * 10; - - intel_pps_dump_state(intel_dp, "vbt", vbt); -} - -static void pps_init_delays_spec(struct intel_dp *intel_dp, - struct edp_power_seq *spec) -{ - struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); - - lockdep_assert_held(&dev_priv->pps_mutex); + vbt.t11_t12 += 100 * 10; /* Upper limits from eDP 1.3 spec. Note that we use the clunky units of * our hw here, which are all in 100usec. */ - spec->t1_t3 = 210 * 10; - spec->t8 = 50 * 10; /* no limit for t8, use t7 instead */ - spec->t9 = 50 * 10; /* no limit for t9, make it symmetric with t8 */ - spec->t10 = 500 * 10; + spec.t1_t3 = 210 * 10; + spec.t8 = 50 * 10; /* no limit for t8, use t7 instead */ + spec.t9 = 50 * 10; /* no limit for t9, make it symmetric with t8 */ + spec.t10 = 500 * 10; /* This one is special and actually in units of 100ms, but zero * based in the hw (so we need to add 100 ms). But the sw vbt * table multiplies it with 1000 to make it in units of 100usec, * too. */ - spec->t11_t12 = (510 + 100) * 10; - - intel_pps_dump_state(intel_dp, "spec", spec); -} - -static void pps_init_delays(struct intel_dp *intel_dp) -{ - struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); - struct edp_power_seq cur, vbt, spec, - *final = &intel_dp->pps.pps_delays; - - lockdep_assert_held(&dev_priv->pps_mutex); - - /* already initialized? */ - if (final->t11_t12 != 0) - return; + spec.t11_t12 = (510 + 100) * 10; - pps_init_delays_cur(intel_dp, &cur); - pps_init_delays_vbt(intel_dp, &vbt); - pps_init_delays_spec(intel_dp, &spec); + intel_pps_dump_state(intel_dp, "vbt", &vbt); /* Use the max of the register settings and vbt. If both are * unset, fall back to the spec limits. */ 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