Skip to contentSkip to conversation

Revert atomic hw readout.

PATCH In review Maarten Lankhorst 3 participants 5 messages Jun 10, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Revert atomic hw readout.

Seems this is causing too many issues, revert temporarily until the issues are fixed.

This might break some of the changes I made using atomic state:
Can someone test on haswell with multiple crtcs,
to see if the haswell plane workaround change still works? "drm/i915: Calculate haswell plane workaround, v5."

And i830 with DVO? For DVO_2X_MODE.
"drm/i915: Use atomic state for calculating DVO_2X_MODE on i830."

Maarten Lankhorst (2):
Revert "drm/i915: Make intel_display_suspend atomic, v2." Revert "drm/i915: Read hw state into an atomic state struct, v2."

 drivers/gpu/drm/i915/i915_drv.c      |   3 -
 drivers/gpu/drm/i915/intel_atomic.c  |   2 +-
 drivers/gpu/drm/i915/intel_display.c | 434 ++++++++++++-----------------------
 drivers/gpu/drm/i915/intel_drv.h     |  16 +-
 4 files changed, 165 insertions(+), 290 deletions(-)
Signature · 5 lines
2.1.0
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/2 Revert "drm/i915: Make intel_display_suspend atomic, v2."

This reverts commit 490f400db5d886fc28566af69b02f6497f31be4b.

We're not ready yet to make it atomic, we calculate some state in advance, but without atomic plane support atomic the hw readout will fail.

It's required to revert this commit to revert the atomic hw state readout patch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90868
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90861

---
 drivers/gpu/drm/i915/i915_drv.c      |  3 --
 drivers/gpu/drm/i915/intel_display.c | 55 ++++++++----------------------------
 drivers/gpu/drm/i915/intel_drv.h     |  2 +-
 3 files changed, 13 insertions(+), 47 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +0 -3
index d3632c56fdf7..78ef0bb53c36 100644
@@ -634,9 +634,6 @@ static int i915_drm_suspend(struct drm_device *dev)
 	intel_display_suspend(dev);
 	drm_modeset_unlock_all(dev);
 
-	/* suspending displays will unsets init power */
-	intel_display_set_init_power(dev_priv, true);
-
 	intel_dp_mst_suspend(dev);
 
 	intel_runtime_pm_disable_interrupts(dev_priv);
drivers/gpu/drm/i915/intel_display.c +12 -43

70 lines not on this page · raw message

drivers/gpu/drm/i915/intel_drv.h +1 -1
index cb3a30c1e7cc..58bd0edba2a4 100644
@@ -992,7 +992,7 @@ int intel_pch_rawclk(struct drm_device *dev);
 void intel_mark_busy(struct drm_device *dev);
 void intel_mark_idle(struct drm_device *dev);
 void intel_crtc_restore_mode(struct drm_crtc *crtc);
-int intel_display_suspend(struct drm_device *dev);
+void intel_display_suspend(struct drm_device *dev);
 int intel_crtc_control(struct drm_crtc *crtc, bool enable);
 void intel_crtc_update_dpms(struct drm_crtc *crtc);
 void intel_encoder_destroy(struct drm_encoder *encoder);
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH 2/2 Revert "drm/i915: Read hw state into an atomic state struct, v2."

In reply to Maarten Lankhorst

This reverts commit 3bae26eb2991c00670df377cf6c3bc2b0577e82a.

Seems it introduces regressions for 3 different reasons, oh boy..

In bug #90868 as I can see the atomic state will be restored on resume without the planes being set up properly. Because plane setup here requires the atomic state, we'll have to settle for committing atomic planes first.

In bug #90861 the failure appears to affect mostly DP devices, and happens because reading out the atomic state prevents a modeset on boot, which would require better hw state readout.

In bug #90874 it's shown that cdclk should be part of the atomic state, so only performing a single modeset during resume excarbated the issue.

It's better to fix those issues first, and then commit this patch, so do that temporarily.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90868
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90861
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90874

---
 drivers/gpu/drm/i915/intel_atomic.c  |   2 +-
 drivers/gpu/drm/i915/intel_display.c | 379 +++++++++++++----------------------
 drivers/gpu/drm/i915/intel_drv.h     |  14 +-
 3 files changed, 152 insertions(+), 243 deletions(-)
drivers/gpu/drm/i915/intel_atomic.c +1 -1
index e47e00e5b130..4df6d2d7a9c8 100644
@@ -395,7 +395,7 @@ int intel_atomic_setup_scalers(struct drm_device *dev,
 	return 0;
 }
 
-void
+static void
 intel_atomic_duplicate_dpll_state(struct drm_i915_private *dev_priv,
 				  struct intel_shared_dpll_config *shared_dpll)
 {
drivers/gpu/drm/i915/intel_display.c +139 -240

565 lines not on this page · raw message

drivers/gpu/drm/i915/intel_drv.h +12 -2
index 58bd0edba2a4..d87b85f16127 100644
@@ -130,6 +130,11 @@ struct intel_fbdev {
 
 struct intel_encoder {
 	struct drm_encoder base;
+	/*
+	 * The new crtc this encoder will be driven from. Only differs from
+	 * base->crtc while a modeset is in progress.
+	 */
+	struct intel_crtc *new_crtc;
 
 	enum intel_output_type type;
 	unsigned int cloneable;
@@ -190,6 +195,12 @@ struct intel_connector {
 	 */
 	struct intel_encoder *encoder;
 
+	/*
+	 * The new encoder this connector will be driven. Only differs from
+	 * encoder while a modeset is in progress.
+	 */
+	struct intel_encoder *new_encoder;
+
 	/* Reads out the current hw, returning true if the connector is enabled
 	 * and active (i.e. dpms ON state). */
 	bool (*get_hw_state)(struct intel_connector *);
@@ -527,6 +538,7 @@ struct intel_crtc {
 
 	struct intel_initial_plane_config plane_config;
 	struct intel_crtc_state *config;
+	bool new_enabled;
 
 	/* reset counter value when the last flip was submitted */
 	unsigned int reset_counter;
@@ -1408,8 +1420,6 @@ struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
 void intel_atomic_state_clear(struct drm_atomic_state *);
 struct intel_shared_dpll_config *
 intel_atomic_get_shared_dpll_state(struct drm_atomic_state *s);
-void intel_atomic_duplicate_dpll_state(struct drm_i915_private *,
-				       struct intel_shared_dpll_config *);
 
 static inline struct intel_crtc_state *
 intel_atomic_get_crtc_state(struct drm_atomic_state *state,
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Acked-by on the v1 series
#3 lore raw
In reply to Maarten Lankhorst

For both patches,

Quoted 14 lines · Maarten Lankhorst

Seems this is causing too many issues, revert temporarily until the issues are fixed.

This might break some of the changes I made using atomic state:
Can someone test on haswell with multiple crtcs,
to see if the haswell plane workaround change still works? "drm/i915: Calculate haswell plane workaround, v5."

And i830 with DVO? For DVO_2X_MODE.
"drm/i915: Use atomic state for calculating DVO_2X_MODE on i830."

Maarten Lankhorst (2):
Revert "drm/i915: Make intel_display_suspend atomic, v2." Revert "drm/i915: Read hw state into an atomic state struct, v2."

Quoted 6 lines
 drivers/gpu/drm/i915/i915_drv.c      |   3 -
 drivers/gpu/drm/i915/intel_atomic.c  |   2 +-
 drivers/gpu/drm/i915/intel_display.c | 434 ++++++++++++-----------------------
 drivers/gpu/drm/i915/intel_drv.h     |  16 +-
 4 files changed, 165 insertions(+), 290 deletions(-)

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#4 lore raw
Quoted 3 lines · Ander Conselvan De Oliveira

For both patches,

And both pushed to drm-intel-next-queued, thanks for the patches and ack.

BR,
Jani.

Quoted 28 lines · Maarten Lankhorst
Quoted 14 lines

Seems this is causing too many issues, revert temporarily until the issues are fixed.

This might break some of the changes I made using atomic state:
Can someone test on haswell with multiple crtcs,
to see if the haswell plane workaround change still works? "drm/i915: Calculate haswell plane workaround, v5."

And i830 with DVO? For DVO_2X_MODE.
"drm/i915: Use atomic state for calculating DVO_2X_MODE on i830."

Maarten Lankhorst (2):
Revert "drm/i915: Make intel_display_suspend atomic, v2." Revert "drm/i915: Read hw state into an atomic state struct, v2."

Quoted 6 lines
 drivers/gpu/drm/i915/i915_drv.c      |   3 -
 drivers/gpu/drm/i915/intel_atomic.c  |   2 +-
 drivers/gpu/drm/i915/intel_display.c | 434 ++++++++++++-----------------------
 drivers/gpu/drm/i915/intel_drv.h     |  16 +-
 4 files changed, 165 insertions(+), 290 deletions(-)

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx