Commit 586294c3 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915/pps: Stash away original BIOS programmed PPS delays



In order to do the panel VBT parsing after the EDID read
(needed to determine panel_type from PNPID) we need to stash
away the original BIOS programmed PPS delays so that we
can consult them again when we reinit the PPS delays after
the VBT parsing has been done.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-7-ville.syrjala@linux.intel.com


Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 89fcdf43
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1496,6 +1496,7 @@ struct intel_pps {
	 */
	bool pps_reset;
	struct edp_power_seq pps_delays;
	struct edp_power_seq bios_pps_delays;
};

struct intel_psr {
+8 −5
Original line number Diff line number Diff line
@@ -1165,16 +1165,19 @@ static bool pps_delays_valid(struct edp_power_seq *delays)
		delays->t10 || delays->t11_t12;
}

static void pps_init_delays_cur(struct intel_dp *intel_dp,
				struct edp_power_seq *cur)
static void pps_init_delays_bios(struct intel_dp *intel_dp,
				 struct edp_power_seq *bios)
{
	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);

	lockdep_assert_held(&dev_priv->pps_mutex);

	intel_pps_readout_hw_state(intel_dp, cur);
	if (!pps_delays_valid(&intel_dp->pps.bios_pps_delays))
		intel_pps_readout_hw_state(intel_dp, &intel_dp->pps.bios_pps_delays);

	intel_pps_dump_state(intel_dp, "cur", cur);
	*bios = intel_dp->pps.bios_pps_delays;

	intel_pps_dump_state(intel_dp, "bios", bios);
}

static void pps_init_delays_vbt(struct intel_dp *intel_dp,
@@ -1242,7 +1245,7 @@ static void pps_init_delays(struct intel_dp *intel_dp)
	if (pps_delays_valid(final))
		return;

	pps_init_delays_cur(intel_dp, &cur);
	pps_init_delays_bios(intel_dp, &cur);
	pps_init_delays_vbt(intel_dp, &vbt);
	pps_init_delays_spec(intel_dp, &spec);