All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915/dp: deconflate PPS unlock from divisor register
@ 2019-03-05 13:52 Jani Nikula
  2019-03-05 13:52 ` [PATCH 2/2] drm/i915/dp: use single point of truth for PPS " Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Jani Nikula @ 2019-03-05 13:52 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

PPS locking is a thing on pre-DDI, up to and including CPT and PPT.

The PPS divisor register exists up to gen 9 BC, replaced by a field in
the control register starting from gen 9 LP, i.e. BXT, GLK, and CNP on.

Commit b0a08bec9631 ("drm/i915/bxt: eDP Panel Power sequencing") stopped
using the divisor register, but inadvertently conflated the PPS unlock
in the change. No longer doing the unlocking was the right thing to do,
however we should've stopped already at LPT (or DDI platforms).

Deconflate the two.

Arguably this could be moved away from here altogether, but this is the
minimally intrusive change for now.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e1a051c0fbfe..e0f421e76305 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -6425,15 +6425,16 @@ intel_pps_readout_hw_state(struct intel_dp *intel_dp, struct edp_power_seq *seq)
 
 	intel_pps_get_registers(intel_dp, &regs);
 
-	/* Workaround: Need to write PP_CONTROL with the unlock key as
-	 * the very first thing. */
 	pp_ctl = ironlake_get_pp_control(intel_dp);
 
+	/* Ensure PPS is unlocked */
+	if (!HAS_DDI(dev_priv))
+		I915_WRITE(regs.pp_ctrl, pp_ctl);
+
 	pp_on = I915_READ(regs.pp_on);
 	pp_off = I915_READ(regs.pp_off);
 	if (!IS_GEN9_LP(dev_priv) && !HAS_PCH_CNP(dev_priv) &&
 	    !HAS_PCH_ICP(dev_priv)) {
-		I915_WRITE(regs.pp_ctrl, pp_ctl);
 		pp_div = I915_READ(regs.pp_div);
 	}
 
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-03-08 11:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-05 13:52 [PATCH 1/2] drm/i915/dp: deconflate PPS unlock from divisor register Jani Nikula
2019-03-05 13:52 ` [PATCH 2/2] drm/i915/dp: use single point of truth for PPS " Jani Nikula
2019-03-05 20:17   ` Lucas De Marchi
2019-03-05 20:22   ` Rodrigo Vivi
2019-03-08 11:35     ` Jani Nikula
2019-03-05 14:31 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/dp: deconflate PPS unlock from " Patchwork
2019-03-05 16:28 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-03-05 20:19 ` [PATCH 1/2] " Rodrigo Vivi
2019-03-06  8:17 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/dp: deconflate PPS unlock from divisor register (rev2) Patchwork
2019-03-06 10:33 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/dp: deconflate PPS unlock from divisor register (rev3) Patchwork
2019-03-06 15:06 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.