Skip to contentSkip to conversation

drm/i915: Do not enable DRRS when PSR is enabled

PATCH Applied Radhakrishna Sripada 4 participants 5 messages Sep 14, 2017 – Sep 18, 2017

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

PATCH v3 1/1 drm/i915: Do not enable DRRS when PSR is enabled

Some platforms do not support PSR and DRRS simultaneously. Visual artifacts and flickering were reported on BDW HP Spectre x360 Convertible. Deferring to PSR when both PSR and DRRS are supported by the panel.

V2: Minor code-style changes suggested by Rodrigo
V3: Add a WARN_ON during PSR init suggested by Dhinakaran
Correct debug message,title suggested by Jani

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

Cc Nicholas Stommel <[email protected]>
Cc Dhinakaran Pandiyan <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Clinton Taylor <[email protected]>
Cc Rodrigo Vivi <[email protected]>
---
 drivers/gpu/drm/i915/intel_dp.c  | 10 +++++-----
 drivers/gpu/drm/i915/intel_psr.c |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +5 -5
index 887953c0f495..8db6b11f103f 100644
@@ -5467,11 +5467,6 @@ static void intel_dp_set_drrs_state(struct drm_i915_private *dev_priv,
 		return;
 	}
 
-	/*
-	 * FIXME: This needs proper synchronization with psr state for some
-	 * platforms that cannot have PSR and DRRS enabled at the same time.
-	 */
-
 	dig_port = dp_to_dig_port(intel_dp);
 	encoder = &dig_port->base;
 	intel_crtc = to_intel_crtc(encoder->base.crtc);
@@ -5555,6 +5550,11 @@ void intel_edp_drrs_enable(struct intel_dp *intel_dp,
 		return;
 	}
 
+	if (dev_priv->psr.enabled) {
+		DRM_DEBUG_KMS("PSR enabled. Not enabling DRRS.\n");
+		return;
+	}
+
 	mutex_lock(&dev_priv->drrs.mutex);
 	if (WARN_ON(dev_priv->drrs.dp)) {
 		DRM_ERROR("DRRS already enabled\n");
drivers/gpu/drm/i915/intel_psr.c +1 -0
index 55b4002bbe53..acb50945bfa8 100644
@@ -530,6 +530,7 @@ void intel_psr_enable(struct intel_dp *intel_dp,
 		return;
 	}
 
+	WARN_ON(dev_priv->drrs.dp);
 	mutex_lock(&dev_priv->psr.lock);
 	if (dev_priv->psr.enabled) {
 		DRM_DEBUG_KMS("PSR already in use\n");
Signature · 6 lines
2.9.3

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

✓ Fi.CI.BAT: success for drm/i915: Do not enable DRRS when PSR is enabled

== Series Details ==

== Series Details ==

Series: drm/i915: Do not enable DRRS when PSR is enabled
URL : https://patchwork.freedesktop.org/series/30380/
State : success

== Summary ==

Series 30380v1 drm/i915: Do not enable DRRS when PSR is enabled
https://patchwork.freedesktop.org/api/1.0/series/30380/revisions/1/mbox/

Test kms_cursor_legacy:

        Subgroup basic-busy-flip-before-cursor-atomic:
                pass       -> FAIL       (fi-snb-2600) fdo#100215
Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                skip       -> PASS       (fi-skl-x1585l)

fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:443s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:453s
fi-blb-e6850     total:289  pass:224  dwarn:1   dfail:0   fail:0   skip:64  time:385s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:533s
fi-bwr-2160      total:289  pass:184  dwarn:0   dfail:0   fail:0   skip:105 time:268s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:506s
fi-byt-j1900     total:289  pass:254  dwarn:1   dfail:0   fail:0   skip:34  time:506s
fi-byt-n2820     total:289  pass:250  dwarn:1   dfail:0   fail:0   skip:38  time:499s
fi-cfl-s         total:289  pass:223  dwarn:34  dfail:0   fail:0   skip:32  time:544s
fi-elk-e7500     total:289  pass:230  dwarn:0   dfail:0   fail:0   skip:59  time:454s
fi-glk-2a        total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:590s
fi-hsw-4770      total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:430s
fi-hsw-4770r     total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:408s
fi-ilk-650       total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:432s
fi-ivb-3520m     total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:488s
fi-ivb-3770      total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:468s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:489s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:581s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:587s
fi-pnv-d510      total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:555s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:462s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:519s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:501s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:460s
fi-skl-x1585l    total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:470s
fi-snb-2520m     total:289  pass:251  dwarn:0   dfail:0   fail:0   skip:38  time:569s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:1   skip:39  time:430s

46e05d756fe32271bca4ac3ef1b3f1f6006fcc0c drm-tip: 2017y-09m-14d-14h-46m-01s UTC integration manifest d0bdc440b5e5 drm/i915: Do not enable DRRS when PSR is enabled

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5708/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✗ Fi.CI.IGT: warning for drm/i915: Do not enable DRRS when PSR is enabled

In reply to Radhakrishna Sripada
== Series Details ==

== Series Details ==

Series: drm/i915: Do not enable DRRS when PSR is enabled
URL : https://patchwork.freedesktop.org/series/30380/
State : warning

== Summary ==

Test perf:

        Subgroup polling:
                pass       -> FAIL       (shard-hsw) fdo#102252 +1
Test kms_plane:
        Subgroup plane-panning-bottom-right-suspend-pipe-C-planes:
                skip       -> PASS       (shard-hsw)
Test kms_rmfb:
        Subgroup close-fd:
                skip       -> PASS       (shard-hsw)
Test kms_universal_plane:
        Subgroup universal-plane-pipe-B-functional:
                skip       -> PASS       (shard-hsw)
Test kms_cursor_crc:
        Subgroup cursor-256x256-dpms:
                skip       -> PASS       (shard-hsw)
Test gem_flink_race:
        Subgroup flink_close:
                pass       -> FAIL       (shard-hsw) fdo#102655
Test kms_plane_multiple:
        Subgroup legacy-pipe-B-tiling-x:
                pass       -> SKIP       (shard-hsw)

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102655 https://bugs.freedesktop.org/show_bug.cgi?id=102655

shard-hsw total:2313 pass:1242 dwarn:0 dfail:0 fail:15 skip:1056 time:9392s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5708/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer Reviewed-by on v3 1/1
#3 lore raw
In reply to Radhakrishna Sripada
Quoted 9 lines · Radhakrishna Sripada

Some platforms do not support PSR and DRRS simultaneously. Visual artifacts and flickering were reported on BDW HP Spectre x360 Convertible. Deferring to PSR when both PSR and DRRS are supported by the panel.

V2: Minor code-style changes suggested by Rodrigo
V3: Add a WARN_ON during PSR init suggested by Dhinakaran
Correct debug message,title suggested by Jani

Quoted 7 lines

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

Cc Nicholas Stommel <[email protected]>
Cc Dhinakaran Pandiyan <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Clinton Taylor <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Quoted 52 lines
---
 drivers/gpu/drm/i915/intel_dp.c  | 10 +++++-----
 drivers/gpu/drm/i915/intel_psr.c |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +5 -5
index 887953c0f495..8db6b11f103f 100644
@@ -5467,11 +5467,6 @@ static void intel_dp_set_drrs_state(struct drm_i915_private *dev_priv,
 		return;
 	}
 
-	/*
-	 * FIXME: This needs proper synchronization with psr state for some
-	 * platforms that cannot have PSR and DRRS enabled at the same time.
-	 */
-
 	dig_port = dp_to_dig_port(intel_dp);
 	encoder = &dig_port->base;
 	intel_crtc = to_intel_crtc(encoder->base.crtc);
@@ -5555,6 +5550,11 @@ void intel_edp_drrs_enable(struct intel_dp *intel_dp,
 		return;
 	}
 
+	if (dev_priv->psr.enabled) {
+		DRM_DEBUG_KMS("PSR enabled. Not enabling DRRS.\n");
+		return;
+	}
+
 	mutex_lock(&dev_priv->drrs.mutex);
 	if (WARN_ON(dev_priv->drrs.dp)) {
 		DRM_ERROR("DRRS already enabled\n");
drivers/gpu/drm/i915/intel_psr.c +1 -0
index 55b4002bbe53..acb50945bfa8 100644
@@ -530,6 +530,7 @@ void intel_psr_enable(struct intel_dp *intel_dp,
 		return;
 	}
 
+	WARN_ON(dev_priv->drrs.dp);
 	mutex_lock(&dev_priv->psr.lock);
 	if (dev_priv->psr.enabled) {
 		DRM_DEBUG_KMS("PSR already in use\n");
Signature · 6 lines
2.9.3

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

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

Applied
#4 lore raw
Quoted 18 lines · Rodrigo Vivi
Quoted 9 lines · Radhakrishna Sripada

Some platforms do not support PSR and DRRS simultaneously. Visual artifacts and flickering were reported on BDW HP Spectre x360 Convertible. Deferring to PSR when both PSR and DRRS are supported by the panel.

V2: Minor code-style changes suggested by Rodrigo
V3: Add a WARN_ON during PSR init suggested by Dhinakaran
Correct debug message,title suggested by Jani

Quoted 7 lines

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

Cc Nicholas Stommel <[email protected]>
Cc Dhinakaran Pandiyan <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Clinton Taylor <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Quoted 1 line

merged to dinq. thanks for the patch.

Quoted 57 lines
Quoted 49 lines
---
 drivers/gpu/drm/i915/intel_dp.c  | 10 +++++-----
 drivers/gpu/drm/i915/intel_psr.c |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +5 -5
index 887953c0f495..8db6b11f103f 100644
@@ -5467,11 +5467,6 @@ static void intel_dp_set_drrs_state(struct drm_i915_private *dev_priv,
              return;
      }
 
-     /*
-      * FIXME: This needs proper synchronization with psr state for some
-      * platforms that cannot have PSR and DRRS enabled at the same time.
-      */
-
      dig_port = dp_to_dig_port(intel_dp);
      encoder = &dig_port->base;
      intel_crtc = to_intel_crtc(encoder->base.crtc);
@@ -5555,6 +5550,11 @@ void intel_edp_drrs_enable(struct intel_dp *intel_dp,
              return;
      }
 
+     if (dev_priv->psr.enabled) {
+             DRM_DEBUG_KMS("PSR enabled. Not enabling DRRS.\n");
+             return;
+     }
+
      mutex_lock(&dev_priv->drrs.mutex);
      if (WARN_ON(dev_priv->drrs.dp)) {
              DRM_ERROR("DRRS already enabled\n");
drivers/gpu/drm/i915/intel_psr.c +1 -1
index 55b4002bbe53..acb50945bfa8 100644
@@ -530,6 +530,7 @@ void intel_psr_enable(struct intel_dp *intel_dp,
              return;
      }
 
+     WARN_ON(dev_priv->drrs.dp);
      mutex_lock(&dev_priv->psr.lock);
      if (dev_priv->psr.enabled) {
              DRM_DEBUG_KMS("PSR already in use\n");
--

2.9.3

Quoted 4 lines

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

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

Signature · 6 lines
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx