Skip to contentSkip to conversation

drm/i915: Revert ea0000f0 "Roll out the helper nonblock tracking"

PATCH In review Jim Rees 3 participants 3 messages Nov 27, 2016 – Dec 21, 2016

Subsystems (2)
lore
Share & tools
lore

Jim Rees

author
#0 lore raw

PATCH 1/1 drm/i915: Revert ea0000f0 "Roll out the helper nonblock tracking"

Commit ea0000f0 has been causing multiple problems for i915 users. See for example:

https://bugs.freedesktop.org/show_bug.cgi?id=96781
https://bugs.freedesktop.org/show_bug.cgi?id=97529
https://bugzilla.redhat.com/show_bug.cgi?id=1385228
https://forums.opensuse.org/showthread.php/520969-drm-915-Resetting-chip-after-gpu-hang

Those last two are not confirmed but look like the same problem.

This has only been lightly tested and probably shouldn't go upstream yet.

---
 drivers/gpu/drm/i915/intel_display.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -10
index 81c1149..c31c9e4 100644
@@ -14346,8 +14346,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 		WARN_ON(ret);
 	}
 
-	drm_atomic_helper_wait_for_dependencies(state);
-
 	if (intel_state->modeset) {
 		memcpy(dev_priv->min_pixclk, intel_state->min_pixclk,
 		       sizeof(intel_state->min_pixclk));
@@ -14470,8 +14468,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 	if (intel_state->modeset && intel_can_enable_sagv(state))
 		intel_enable_sagv(dev_priv);
 
-	drm_atomic_helper_commit_hw_done(state);
-
 	if (intel_state->modeset)
 		intel_display_power_put(dev_priv, POWER_DOMAIN_MODESET);
 
@@ -14479,8 +14475,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 	drm_atomic_helper_cleanup_planes(dev, state);
 	mutex_unlock(&dev->struct_mutex);
 
-	drm_atomic_helper_commit_cleanup_done(state);
-
 	drm_atomic_state_free(state);
 
 	/* As one of the primary mmio accessors, KMS has a high likelihood
@@ -14546,10 +14540,6 @@ static int intel_atomic_commit(struct drm_device *dev,
 		return -EINVAL;
 	}
 
-	ret = drm_atomic_helper_setup_commit(state, nonblock);
-	if (ret)
-		return ret;
-
 	INIT_WORK(&state->commit_work, intel_atomic_commit_work);
 
 	ret = intel_atomic_prepare_commit(dev, state, nonblock);
Signature · 6 lines
2.10.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#1 lore raw
Quoted 8 lines · Jim Rees

Commit ea0000f0 has been causing multiple problems for i915 users. See for example:

https://bugs.freedesktop.org/show_bug.cgi?id=96781
https://bugs.freedesktop.org/show_bug.cgi?id=97529
https://bugzilla.redhat.com/show_bug.cgi?id=1385228
https://forums.opensuse.org/showthread.php/520969-drm-915-Resetting-chip-after-gpu-hang

Quoted 5 lines

Those last two are not confirmed but look like the same problem.

This has only been lightly tested and probably shouldn't go upstream yet.

Daniel, any comments on this one?

BR,
Jani.

Quoted 46 lines
---
 drivers/gpu/drm/i915/intel_display.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -10
index 81c1149..c31c9e4 100644
@@ -14346,8 +14346,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 		WARN_ON(ret);
 	}
 
-	drm_atomic_helper_wait_for_dependencies(state);
-
 	if (intel_state->modeset) {
 		memcpy(dev_priv->min_pixclk, intel_state->min_pixclk,
 		       sizeof(intel_state->min_pixclk));
@@ -14470,8 +14468,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 	if (intel_state->modeset && intel_can_enable_sagv(state))
 		intel_enable_sagv(dev_priv);
 
-	drm_atomic_helper_commit_hw_done(state);
-
 	if (intel_state->modeset)
 		intel_display_power_put(dev_priv, POWER_DOMAIN_MODESET);
 
@@ -14479,8 +14475,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 	drm_atomic_helper_cleanup_planes(dev, state);
 	mutex_unlock(&dev->struct_mutex);
 
-	drm_atomic_helper_commit_cleanup_done(state);
-
 	drm_atomic_state_free(state);
 
 	/* As one of the primary mmio accessors, KMS has a high likelihood
@@ -14546,10 +14540,6 @@ static int intel_atomic_commit(struct drm_device *dev,
 		return -EINVAL;
 	}
 
-	ret = drm_atomic_helper_setup_commit(state, nonblock);
-	if (ret)
-		return ret;
-
 	INIT_WORK(&state->commit_work, intel_atomic_commit_work);
 
 	ret = intel_atomic_prepare_commit(dev, state, nonblock);
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 9 lines · Jani Nikula
Quoted 8 lines · Jim Rees

Commit ea0000f0 has been causing multiple problems for i915 users. See for example:

https://bugs.freedesktop.org/show_bug.cgi?id=96781
https://bugs.freedesktop.org/show_bug.cgi?id=97529
https://bugzilla.redhat.com/show_bug.cgi?id=1385228
https://forums.opensuse.org/showthread.php/520969-drm-915-Resetting-chip-after-gpu-hang

Quoted 7 lines
Quoted 5 lines

Those last two are not confirmed but look like the same problem.

This has only been lightly tested and probably shouldn't go upstream yet.

Daniel, any comments on this one?

So root-cause is that vblank waits die, and from one of the bug reports it sounds like drm-tip has that fixed. For that we need a reverse bisect to find the bugfix so that we can backport it.

But vblank timeout shouldn't result in oopses, the helpers are meant to carry on in such a case (although with some horribly long timeouts). From the backtraces I think I know what's going on and how to paper over that, typing a patch right now.
-Daniel

Quoted 58 lines

BR,
Jani.

Quoted 46 lines
---
 drivers/gpu/drm/i915/intel_display.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -10
index 81c1149..c31c9e4 100644
@@ -14346,8 +14346,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 		WARN_ON(ret);
 	}
 
-	drm_atomic_helper_wait_for_dependencies(state);
-
 	if (intel_state->modeset) {
 		memcpy(dev_priv->min_pixclk, intel_state->min_pixclk,
 		       sizeof(intel_state->min_pixclk));
@@ -14470,8 +14468,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 	if (intel_state->modeset && intel_can_enable_sagv(state))
 		intel_enable_sagv(dev_priv);
 
-	drm_atomic_helper_commit_hw_done(state);
-
 	if (intel_state->modeset)
 		intel_display_power_put(dev_priv, POWER_DOMAIN_MODESET);
 
@@ -14479,8 +14475,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 	drm_atomic_helper_cleanup_planes(dev, state);
 	mutex_unlock(&dev->struct_mutex);
 
-	drm_atomic_helper_commit_cleanup_done(state);
-
 	drm_atomic_state_free(state);
 
 	/* As one of the primary mmio accessors, KMS has a high likelihood
@@ -14546,10 +14540,6 @@ static int intel_atomic_commit(struct drm_device *dev,
 		return -EINVAL;
 	}
 
-	ret = drm_atomic_helper_setup_commit(state, nonblock);
-	if (ret)
-		return ret;
-
 	INIT_WORK(&state->commit_work, intel_atomic_commit_work);
 
 	ret = intel_atomic_prepare_commit(dev, state, nonblock);
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx