All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Stash desired logical vco in a reliable place.
@ 2018-05-02  0:26 Rodrigo Vivi
  2018-05-02  1:04 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Rodrigo Vivi @ 2018-05-02  0:26 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rodrigo Vivi

On intel_dp_compute_config() we calculate the needed vco
for eDP on gen9 and we stash it in
intel_atomic_state.cdclk.logical.vco

However few moments later on intel_modeset_checks() we fully
replace entire intel_atomic_state.cdclk.logical with
dev_priv->cdclk.logical fully overwriting the logical desired
vco.

So, with wrong VCO value we end up with wrong desired cdclk, but
also it will raise a lot of WARNs: On gen9, when we read
CDCLK_CTL to verify if we configured properly the desired
frequency the CD Frequency Select bits [27:26] == 10b can mean
337.5 or 308.57 MHz depending on the VCO. So if we have wrong
VCO value stashed we will believe the frequency selection didn't
stick and start to raise WARNs of cdclk mismatch.

[   42.857519] [drm:intel_dump_cdclk_state [i915]] Changing CDCLK to 308571 kHz, VCO 8640000 kHz, ref 24000 kHz, bypass 24000 kHz, voltage level 0
[   42.897269] cdclk state doesn't match!
[   42.901052] WARNING: CPU: 5 PID: 1116 at drivers/gpu/drm/i915/intel_cdclk.c:2084 intel_set_cdclk+0x5d/0x110 [i915]
[   42.938004] RIP: 0010:intel_set_cdclk+0x5d/0x110 [i915]
[   43.155253] WARNING: CPU: 5 PID: 1116 at drivers/gpu/drm/i915/intel_cdclk.c:2084 intel_set_cdclk+0x5d/0x110 [i915]
[   43.170277] [drm:intel_dump_cdclk_state [i915]] [hw state] 337500 kHz, VCO 8100000 kHz, ref 24000 kHz, bypass 24000 kHz, voltage level 0
[   43.182566] [drm:intel_dump_cdclk_state [i915]] [sw state] 308571 kHz, VCO 8640000 kHz, ref 24000 kHz, bypass 24000 kHz, voltage level 0

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 83da50b13d81..be066afaefa7 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1946,7 +1946,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 			break;
 		}
 
-		to_intel_atomic_state(pipe_config->base.state)->cdclk.logical.vco = vco;
+		dev_priv->cdclk.logical.vco = vco;
 	}
 
 	if (!HAS_DDI(dev_priv))
-- 
2.13.6

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

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

end of thread, other threads:[~2018-05-03 13:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-02  0:26 [PATCH] drm/i915: Stash desired logical vco in a reliable place Rodrigo Vivi
2018-05-02  1:04 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-05-02 13:24 ` Patchwork
2018-05-02 14:03 ` [PATCH] " Ville Syrjälä
2018-05-02 17:52   ` [PATCH] drm/i915: Adjust eDP's " Rodrigo Vivi
2018-05-02 19:12     ` Ville Syrjälä
2018-05-03 13:07       ` Rodrigo Vivi
2018-05-03 13:17         ` Ville Syrjälä
2018-05-03 13:41           ` Rodrigo Vivi
2018-05-02 14:55 ` ✗ Fi.CI.BAT: failure for drm/i915: Stash desired " Patchwork
2018-05-02 18:29 ` ✓ Fi.CI.BAT: success for drm/i915: Stash desired logical vco in a reliable place. (rev2) Patchwork
2018-05-03  0:56 ` ✓ 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.