public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Assign hwmode after encoder state readout
@ 2015-08-13 17:31 ville.syrjala
  2015-08-13 17:31 ` [PATCH 2/2] drm/i915: Fix clock readout when pipes are enabld w/o ports ville.syrjala
  0 siblings, 1 reply; 7+ messages in thread
From: ville.syrjala @ 2015-08-13 17:31 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The dotclock is often calculated in encoder .get_config(), so we
shouldn't copy the adjusted_mode to hwmode until we have read out the
dotclock.

Gets rid of some warnings like these:
[drm:drm_calc_timestamping_constants [drm]] *ERROR* crtc 21: Can't calculate constants, dotclock = 0!
[drm:i915_get_vblank_timestamp] crtc 0 is disabled

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 21aa745..b4229ce 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15119,7 +15119,6 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
 			crtc->base.state->mode.private_flags = I915_MODE_FLAG_INHERITED;
 		}
 
-		crtc->base.hwmode = crtc->config->base.adjusted_mode;
 		readout_plane_state(crtc, to_intel_crtc_state(crtc->base.state));
 
 		DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n",
@@ -15179,6 +15178,10 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
 			      connector->base.name,
 			      connector->base.encoder ? "enabled" : "disabled");
 	}
+
+	for_each_intel_crtc(dev, crtc) {
+		crtc->base.hwmode = crtc->config->base.adjusted_mode;
+	}
 }
 
 /* Scan out the current hw modeset state,
-- 
2.4.6

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

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

end of thread, other threads:[~2015-09-01 10:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-13 17:31 [PATCH 1/2] drm/i915: Assign hwmode after encoder state readout ville.syrjala
2015-08-13 17:31 ` [PATCH 2/2] drm/i915: Fix clock readout when pipes are enabld w/o ports ville.syrjala
2015-08-26 16:39   ` [PATCH v2 2/2] drm/i915: Fix clock readout when pipes are enabled " ville.syrjala
2015-08-26 16:39     ` [PATCH 3/2] drm/i915: Factor out intel_crtc_has_encoders() ville.syrjala
2015-08-27  7:29       ` Jani Nikula
2015-09-01 10:03         ` Daniel Vetter
2015-08-27 13:11     ` [PATCH v2 2/2] drm/i915: Fix clock readout when pipes are enabled w/o ports Maarten Lankhorst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox