Skip to contentSkip to conversation

Fixes that failed to apply to v5.6-rc3

Intel-gfx New Jani Nikula 3 participants 5 messages Feb 27, 2020 – Mar 16, 2020

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

Hi all -

The following commits have been marked as Cc: stable or fixing something in v5.6-rc3 or earlier, but failed to cherry-pick to drm-intel-fixes. Please see if they are worth backporting, and please do so if they are.

Failed to cherry-pick:
837b63e60878 ("drm/i915: Program MBUS with rmw during initialization") 87e04f75928b ("drm/i915/tgl: Add Wa_22010178259:tgl") df1a5bfc16f3 ("drm/i915/psr: Force PSR probe only after full initialization")

This one was fine to cherry-pick, but caused problematic (for me!) conflicts in drm-tip rebuild:
42fb60de3129 ("drm/i915/gem: Don't leak non-persistent requests on changing engines")

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/1 drm/i915/psr: Force PSR probe only after full initialization

Commit 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR") was forcing the state compute too earlier causing errors because not everything was initialized, so here moving to the end of i915_driver_modeset_probe() when the display is all initialized.

Also fixing the place where it disarm the force probe as during the atomic check phase errors could happen like the ones due locking and it would cause PSR to never be enabled if that happens. Leaving the disarm to the atomic commit phase, intel_psr_enable() or intel_psr_update() will be called even if the current state do not allow PSR to be enabled.

v2: Check if intel_dp is null in intel_psr_force_mode_changed_set()
v3: Check intel_dp before get dev_priv
v4:
- renamed intel_psr_force_mode_changed_set() to intel_psr_set_force_mode_changed()
- removed the set parameter from intel_psr_set_force_mode_changed()
- not calling intel_psr_set_force_mode_changed() from intel_psr_enable/update(), directly setting it after the same checks that intel_psr_set_force_mode_changed() does
- moved intel_psr_set_force_mode_changed() arm call to i915_driver_modeset_probe() as it is a better for a PSR call, all the functions calls happening between the old and the new function call will cause issue

[backported to v5.6-rc3]

---
 drivers/gpu/drm/i915/display/intel_psr.c | 25 ++++++++++++++++++++----
 drivers/gpu/drm/i915/display/intel_psr.h |  1 +
 drivers/gpu/drm/i915/i915_drv.c          |  3 +++
 drivers/gpu/drm/i915/i915_drv.h          |  2 +-
 4 files changed, 26 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_psr.c +21 -4
index 89c9cf5f38d2..83025052c965 100644
@@ -852,10 +852,12 @@ void intel_psr_enable(struct intel_dp *intel_dp,
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 
-	if (!crtc_state->has_psr)
+	if (!CAN_PSR(dev_priv) || dev_priv->psr.dp != intel_dp)
 		return;
 
-	if (WARN_ON(!CAN_PSR(dev_priv)))
+	dev_priv->psr.force_mode_changed = false;
+
+	if (!crtc_state->has_psr)
 		return;
 
 	WARN_ON(dev_priv->drrs.dp);
@@ -1009,6 +1011,8 @@ void intel_psr_update(struct intel_dp *intel_dp,
 	if (!CAN_PSR(dev_priv) || READ_ONCE(psr->dp) != intel_dp)
 		return;
 
+	dev_priv->psr.force_mode_changed = false;
+
 	mutex_lock(&dev_priv->psr.lock);
 
 	enable = crtc_state->has_psr && psr_global_enabled(psr->debug);
@@ -1534,7 +1538,7 @@ void intel_psr_atomic_check(struct drm_connector *connector,
 	struct drm_crtc_state *crtc_state;
 
 	if (!CAN_PSR(dev_priv) || !new_state->crtc ||
-	    dev_priv->psr.initially_probed)
+	    !dev_priv->psr.force_mode_changed)
 		return;
 
 	intel_connector = to_intel_connector(connector);
@@ -1545,5 +1549,18 @@ void intel_psr_atomic_check(struct drm_connector *connector,
 	crtc_state = drm_atomic_get_new_crtc_state(new_state->state,
 						   new_state->crtc);
 	crtc_state->mode_changed = true;
-	dev_priv->psr.initially_probed = true;
+}
+
+void intel_psr_set_force_mode_changed(struct intel_dp *intel_dp)
+{
+	struct drm_i915_private *dev_priv;
+
+	if (!intel_dp)
+		return;
+
+	dev_priv = dp_to_i915(intel_dp);
+	if (!CAN_PSR(dev_priv) || intel_dp != dev_priv->psr.dp)
+		return;
+
+	dev_priv->psr.force_mode_changed = true;
 }
drivers/gpu/drm/i915/display/intel_psr.h +1 -0
index c58a1d438808..274fc6bb6221 100644
@@ -40,5 +40,6 @@ bool intel_psr_enabled(struct intel_dp *intel_dp);
 void intel_psr_atomic_check(struct drm_connector *connector,
 			    struct drm_connector_state *old_state,
 			    struct drm_connector_state *new_state);
+void intel_psr_set_force_mode_changed(struct intel_dp *intel_dp);
 
 #endif /* __INTEL_PSR_H__ */
drivers/gpu/drm/i915/i915_drv.c +3 -0
index f7385abdd74b..8410330ce4f0 100644
@@ -56,6 +56,7 @@
 #include "display/intel_hotplug.h"
 #include "display/intel_overlay.h"
 #include "display/intel_pipe_crc.h"
+#include "display/intel_psr.h"
 #include "display/intel_sprite.h"
 #include "display/intel_vga.h"
 
@@ -330,6 +331,8 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
 
 	intel_init_ipc(i915);
 
+	intel_psr_set_force_mode_changed(i915->psr.dp);
+
 	return 0;
 
 cleanup_gem:
drivers/gpu/drm/i915/i915_drv.h +1 -1
index 077af22b8340..810e3ccd56ec 100644
@@ -505,7 +505,7 @@ struct i915_psr {
 	bool dc3co_enabled;
 	u32 dc3co_exit_delay;
 	struct delayed_work idle_work;
-	bool initially_probed;
+	bool force_mode_changed;
 };
 
 #define QUIRK_LVDS_SSC_DISABLE (1<<1)
Signature · 6 lines
2.25.1

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

[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/psr: Force PSR probe only after full initialization (rev8)

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915/psr: Force PSR probe only after full initialization (rev8)
URL : https://patchwork.freedesktop.org/series/73436/
State : failure

== Summary ==

Applying: drm/i915/psr: Force PSR probe only after full initialization Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_psr.c
M drivers/gpu/drm/i915/display/intel_psr.h
M drivers/gpu/drm/i915/i915_drv.c
M drivers/gpu/drm/i915/i915_drv.h
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/i915_drv.h
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/i915_drv.h Auto-merging drivers/gpu/drm/i915/i915_drv.c
Auto-merging drivers/gpu/drm/i915/display/intel_psr.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0001 drm/i915/psr: Force PSR probe only after full initialization When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

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

#3 lore raw
In reply to Jani Nikula
Quoted 11 lines · Jani Nikula

Hi all -

The following commits have been marked as Cc: stable or fixing something in v5.6-rc3 or earlier, but failed to cherry-pick to drm-intel-fixes. Please see if they are worth backporting, and please do so if they are.

Failed to cherry-pick:
837b63e60878 ("drm/i915: Program MBUS with rmw during initialization") 87e04f75928b ("drm/i915/tgl: Add Wa_22010178259:tgl") df1a5bfc16f3 ("drm/i915/psr: Force PSR probe only after full initialization")

Thanks for the backports of these, pushed to drm-intel-fixes.

BR,
Jani.

Quoted 7 lines

This one was fine to cherry-pick, but caused problematic (for me!) conflicts in drm-tip rebuild:
42fb60de3129 ("drm/i915/gem: Don't leak non-persistent requests on changing engines")

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
In reply to Jani Nikula
Quoted 6 lines · Jani Nikula

Hi all -

The following commits have been marked as Cc: stable or fixing something in v5.6-rc3 or earlier, but failed to cherry-pick to drm-intel-fixes. Please see if they are worth backporting, and please do so if they are.

New ones for -rc6:

003d8b9143a6 ("drm/i915/gem: Only call eb_lookup_vma once during execbuf ioctl") 520f8350364d ("drm/i915: properly sanity check batch_start_offset") 07bcfd1291de ("drm/i915/gen12: Disable preemption timeout") fb899dd8ea9c ("drm/i915: Apply Wa_1406680159:icl,ehl as an engine workaround")

BR,
Jani.

Quoted 6 lines

This one was fine to cherry-pick, but caused problematic (for me!) conflicts in drm-tip rebuild:
42fb60de3129 ("drm/i915/gem: Don't leak non-persistent requests on changing engines")

BR,
Jani.

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