Skip to contentSkip to conversation

drm/i915/psr: Introduce HAS_VLV_PSR

PATCH In review Rodrigo Vivi 4 participants 5 messages Jul 12, 2017

Subsystems (2)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/2 drm/i915/psr: Introduce HAS_VLV_PSR

This old PSR implementation died on gen8LP and had many limitations such:
- no functional HW tracking
- required link standby with single frame updates

So, let's group them in a easier way to filter it now on.

Cc Dhinakaran Pandiyan <[email protected]>
Cc Jim Bride <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.h  | 5 ++++-
 drivers/gpu/drm/i915/i915_pci.c  | 4 ++--
 drivers/gpu/drm/i915/intel_dp.c  | 2 +-
 drivers/gpu/drm/i915/intel_psr.c | 7 +++----
 4 files changed, 10 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +4 -1
index 81cd21ecfa7d..d0a49307c6fb 100644
@@ -769,6 +769,7 @@ struct intel_csr {
 	func(has_pipe_cxsr); \
 	func(has_pooled_eu); \
 	func(has_psr); \
+	func(has_vlv_psr); \
 	func(has_rc6); \
 	func(has_rc6p); \
 	func(has_resource_streamer); \
@@ -2983,7 +2984,9 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define HAS_DDI(dev_priv)		 ((dev_priv)->info.has_ddi)
 #define HAS_FPGA_DBG_UNCLAIMED(dev_priv) ((dev_priv)->info.has_fpga_dbg)
-#define HAS_PSR(dev_priv)		 ((dev_priv)->info.has_psr)
+#define HAS_PSR(dev_priv)		 ((dev_priv)->info.has_psr || \
+					  (dev_priv)->info.has_vlv_psr)
+#define HAS_VLV_PSR(dev_priv)		 ((dev_priv)->info.has_vlv_psr)
 #define HAS_RC6(dev_priv)		 ((dev_priv)->info.has_rc6)
 #define HAS_RC6p(dev_priv)		 ((dev_priv)->info.has_rc6p)
 
drivers/gpu/drm/i915/i915_pci.c +2 -2
index a1e6b696bcfa..e0e972210090 100644
@@ -274,7 +274,7 @@ static const struct intel_device_info intel_valleyview_info = {
 	.gen = 7,
 	.is_lp = 1,
 	.num_pipes = 2,
-	.has_psr = 1,
+	.has_vlv_psr = 1,
 	.has_runtime_pm = 1,
 	.has_rc6 = 1,
 	.has_gmbus_irq = 1,
@@ -334,7 +334,7 @@ static const struct intel_device_info intel_cherryview_info = {
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
 	.platform = INTEL_CHERRYVIEW,
 	.has_64bit_reloc = 1,
-	.has_psr = 1,
+	.has_vlv_psr = 1,
 	.has_runtime_pm = 1,
 	.has_resource_streamer = 1,
 	.has_rc6 = 1,
drivers/gpu/drm/i915/intel_dp.c +1 -1
index 2d42d09428c9..3f2191edc2c9 100644
@@ -2653,7 +2653,7 @@ static void intel_disable_dp(struct intel_encoder *encoder,
 	if (old_crtc_state->has_audio)
 		intel_audio_codec_disable(encoder);
 
-	if (HAS_PSR(dev_priv) && !HAS_DDI(dev_priv))
+	if (HAS_VLV_PSR(dev_priv))
 		intel_psr_disable(intel_dp);
 
 	/* Make sure the panel is off before trying to change the mode. But also
drivers/gpu/drm/i915/intel_psr.c +3 -4
index 559f1ab42bfc..461c7e4f6ecc 100644
@@ -401,8 +401,7 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)
 		return false;
 	}
 
-	if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
-	    !dev_priv->psr.link_standby) {
+	if (HAS_VLV_PSR(dev_priv) && !dev_priv->psr.link_standby) {
 		DRM_ERROR("PSR condition failed: Link off requested but not supported on this platform\n");
 		return false;
 	}
@@ -827,7 +826,7 @@ void intel_psr_single_frame_update(struct drm_i915_private *dev_priv,
 	 * Single frame update is already supported on BDW+ but it requires
 	 * many W/A and it isn't really needed.
 	 */
-	if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
+	if (!HAS_VLV_PSR(dev_priv))
 		return;
 
 	mutex_lock(&dev_priv->psr.lock);
@@ -949,7 +948,7 @@ void intel_psr_init(struct drm_i915_private *dev_priv)
 	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
 		/* HSW and BDW require workarounds that we don't implement. */
 		dev_priv->psr.link_standby = false;
-	else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+	else if (HAS_VLV_PSR(dev_priv))
 		/* On VLV and CHV only standby mode is supported. */
 		dev_priv->psr.link_standby = true;
 	else
Signature · 6 lines
2.13.2

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

PATCH 2/2 drm/i915/psr: Use more PSR HW tracking.

So far we are using frontbuffer tracking for everything and ignoring that PSR has a HW capable HW tracking for many modern usages of GPU on Core platforms and newer Atom ones.

One reason for that is that we were trying to keep same infrastructure in place for VLV/CHV than the rest of platforms. But also because when this infrastructure was created the front-buffer-tracking origin wasn't that good and stable how it is today after Paulo reworked it to attend FBC cases.

However this PSR implementation without HW tracking died on gen8LP. And newer platforms are starting to demand more HW tracking specially with PSR2 cases in mind.

By disabling and re-enabling PSR totally every time we believe someone is going to change the front buffer content we don't allow PSR HW tracking to do this job and specially compromising the whole idea of PSR2 case where the HW tracking detect only the damaged area and do a partial screen update.

So, from now on, on the platforms that has hw_tracking let's rely more on HW tracking.

This also is the case in used by other drivers and more validated by SV teams. So I hope that this will lead us to less misterious bugs.

Cc Dhinakaran Pandiyan <[email protected]>
Cc Jim Bride <[email protected]>
Cc Vathsala NAgaraju <[email protected]>
---
 drivers/gpu/drm/i915/intel_drv.h         | 3 ++-
 drivers/gpu/drm/i915/intel_frontbuffer.c | 2 +-
 drivers/gpu/drm/i915/intel_psr.c         | 9 ++++++++-
 3 files changed, 11 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_drv.h +2 -1
index d17a32437f07..0ff5b1741b98 100644
@@ -1738,7 +1738,8 @@ static inline void intel_backlight_device_unregister(struct intel_connector *con
 void intel_psr_enable(struct intel_dp *intel_dp);
 void intel_psr_disable(struct intel_dp *intel_dp);
 void intel_psr_invalidate(struct drm_i915_private *dev_priv,
-			  unsigned frontbuffer_bits);
+			  unsigned frontbuffer_bits,
+			  enum fb_op_origin origin);
 void intel_psr_flush(struct drm_i915_private *dev_priv,
 		     unsigned frontbuffer_bits,
 		     enum fb_op_origin origin);
drivers/gpu/drm/i915/intel_frontbuffer.c +1 -1
index fcfc217e754e..efda1af9a5b3 100644
@@ -79,7 +79,7 @@ void __intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
 		spin_unlock(&dev_priv->fb_tracking.lock);
 	}
 
-	intel_psr_invalidate(dev_priv, frontbuffer_bits);
+	intel_psr_invalidate(dev_priv, frontbuffer_bits, origin);
 	intel_edp_drrs_invalidate(dev_priv, frontbuffer_bits);
 	intel_fbc_invalidate(dev_priv, frontbuffer_bits, origin);
 }
drivers/gpu/drm/i915/intel_psr.c +8 -1
index 461c7e4f6ecc..ff8034b4feb2 100644
@@ -854,6 +854,7 @@ void intel_psr_single_frame_update(struct drm_i915_private *dev_priv,
  * intel_psr_invalidate - Invalidade PSR
  * @dev_priv: i915 device
  * @frontbuffer_bits: frontbuffer plane tracking bits
+ * @origin: which operation caused the invalidate
  *
  * Since the hardware frontbuffer tracking has gaps we need to integrate
  * with the software frontbuffer tracking. This function gets called every
@@ -863,11 +864,14 @@ void intel_psr_single_frame_update(struct drm_i915_private *dev_priv,
  * Dirty frontbuffers relevant to PSR are tracked in busy_frontbuffer_bits."
  */
 void intel_psr_invalidate(struct drm_i915_private *dev_priv,
-			  unsigned frontbuffer_bits)
+			  unsigned frontbuffer_bits, enum fb_op_origin origin)
 {
 	struct drm_crtc *crtc;
 	enum pipe pipe;
 
+	if (origin == ORIGIN_FLIP || origin == ORIGIN_CS)
+		return;
+
 	mutex_lock(&dev_priv->psr.lock);
 	if (!dev_priv->psr.enabled) {
 		mutex_unlock(&dev_priv->psr.lock);
@@ -905,6 +909,9 @@ void intel_psr_flush(struct drm_i915_private *dev_priv,
 	struct drm_crtc *crtc;
 	enum pipe pipe;
 
+	if (origin == ORIGIN_FLIP || origin == ORIGIN_CS)
+		return;
+
 	mutex_lock(&dev_priv->psr.lock);
 	if (!dev_priv->psr.enabled) {
 		mutex_unlock(&dev_priv->psr.lock);
Signature · 6 lines
2.13.2

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

✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/psr: Introduce HAS_VLV_PSR

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/i915/psr: Introduce HAS_VLV_PSR
URL : https://patchwork.freedesktop.org/series/27143/
State : success

== Summary ==

Series 27143v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/27143/revisions/1/mbox/

Test gem_exec_suspend:

        Subgroup basic-s4-devices:
                pass       -> DMESG-WARN (fi-snb-2600) fdo#100125 +1
Test kms_busy:
        Subgroup basic-flip-default-a:
                pass       -> DMESG-WARN (fi-skl-6700hq) fdo#101144
Test kms_pipe_crc_basic:
        Subgroup hang-read-crc-pipe-a:
                pass       -> DMESG-WARN (fi-pnv-d510) fdo#101597
        Subgroup suspend-read-crc-pipe-b:
                dmesg-warn -> PASS       (fi-byt-j1900) fdo#101705 +1

fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144
fdo#101597 https://bugs.freedesktop.org/show_bug.cgi?id=101597
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705

fi-bdw-5557u     total:279  pass:268  dwarn:0   dfail:0   fail:0   skip:11  time:448s
fi-bdw-gvtdvm    total:279  pass:265  dwarn:0   dfail:0   fail:0   skip:14  time:427s
fi-blb-e6850     total:279  pass:224  dwarn:1   dfail:0   fail:0   skip:54  time:356s
fi-bsw-n3050     total:279  pass:243  dwarn:0   dfail:0   fail:0   skip:36  time:524s
fi-bxt-j4205     total:279  pass:260  dwarn:0   dfail:0   fail:0   skip:19  time:504s
fi-byt-j1900     total:279  pass:255  dwarn:0   dfail:0   fail:0   skip:24  time:498s
fi-byt-n2820     total:279  pass:251  dwarn:0   dfail:0   fail:0   skip:28  time:486s
fi-glk-2a        total:279  pass:260  dwarn:0   dfail:0   fail:0   skip:19  time:600s
fi-hsw-4770      total:279  pass:263  dwarn:0   dfail:0   fail:0   skip:16  time:436s
fi-hsw-4770r     total:279  pass:263  dwarn:0   dfail:0   fail:0   skip:16  time:422s
fi-ilk-650       total:279  pass:229  dwarn:0   dfail:0   fail:0   skip:50  time:423s
fi-ivb-3520m     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:503s
fi-ivb-3770      total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:467s
fi-kbl-7500u     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:466s
fi-kbl-7560u     total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:573s
fi-kbl-r         total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:580s
fi-pnv-d510      total:279  pass:221  dwarn:3   dfail:0   fail:0   skip:55  time:566s
fi-skl-6260u     total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:460s
fi-skl-6700hq    total:279  pass:261  dwarn:1   dfail:0   fail:0   skip:17  time:588s
fi-skl-6700k     total:279  pass:257  dwarn:4   dfail:0   fail:0   skip:18  time:468s
fi-skl-6770hq    total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:480s
fi-skl-gvtdvm    total:279  pass:266  dwarn:0   dfail:0   fail:0   skip:13  time:436s
fi-skl-x1585l    total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:490s
fi-snb-2520m     total:279  pass:251  dwarn:0   dfail:0   fail:0   skip:28  time:542s
fi-snb-2600      total:279  pass:249  dwarn:1   dfail:0   fail:0   skip:29  time:410s

8ad9e19aafea47c272163c2cbf554e06ff7f9857 drm-tip: 2017y-07m-11d-19h-08m-20s UTC integration manifest 581c47e drm/i915/psr: Use more PSR HW tracking.
db2e253 drm/i915/psr: Introduce HAS_VLV_PSR

== Logs ==

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

maintainer
#3 lore raw
In reply to Rodrigo Vivi
Quoted 30 lines · Rodrigo Vivi

This old PSR implementation died on gen8LP and had many limitations such:
- no functional HW tracking
- required link standby with single frame updates

So, let's group them in a easier way to filter it now on.

Cc Dhinakaran Pandiyan <[email protected]>
Cc Jim Bride <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.h  | 5 ++++-
 drivers/gpu/drm/i915/i915_pci.c  | 4 ++--
 drivers/gpu/drm/i915/intel_dp.c  | 2 +-
 drivers/gpu/drm/i915/intel_psr.c | 7 +++----
 4 files changed, 10 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 81cd21ecfa7d..d0a49307c6fb 100644
@@ -769,6 +769,7 @@ struct intel_csr {
 	func(has_pipe_cxsr); \
 	func(has_pooled_eu); \
 	func(has_psr); \
+	func(has_vlv_psr); \
 	func(has_rc6); \
 	func(has_rc6p); \
 	func(has_resource_streamer); \

drivers/gpu/drm/i915/i915_drv.h intel_info(const struct drm_i915_private *dev_priv) · line 2989

Quoted 7 lines
drivers/gpu/drm/i915/i915_drv.h +3 -1
@@ -2983,7 +2984,9 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define HAS_DDI(dev_priv)		 ((dev_priv)->info.has_ddi)
 #define HAS_FPGA_DBG_UNCLAIMED(dev_priv) ((dev_priv)->info.has_fpga_dbg)
-#define HAS_PSR(dev_priv)		 ((dev_priv)->info.has_psr)
+#define HAS_PSR(dev_priv)		 ((dev_priv)->info.has_psr || \
+					  (dev_priv)->info.has_vlv_psr)
+#define HAS_VLV_PSR(dev_priv)		 ((dev_priv)->info.has_vlv_psr)

I'm not convinced adding a intel info field for this is warranted. How about just:

#define HAS_VLV_PSR(dev_priv) (HAS_PSR(dev_priv) && \
	(IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)))

Though I'm not convinced about the HS_VLV_PSR name either!

BR,
Jani.

Quoted 70 lines
drivers/gpu/drm/i915/i915_drv.h +0 -0
 #define HAS_RC6(dev_priv)		 ((dev_priv)->info.has_rc6)
 #define HAS_RC6p(dev_priv)		 ((dev_priv)->info.has_rc6p)
 
drivers/gpu/drm/i915/i915_pci.c +2 -2
index a1e6b696bcfa..e0e972210090 100644
@@ -274,7 +274,7 @@ static const struct intel_device_info intel_valleyview_info = {
 	.gen = 7,
 	.is_lp = 1,
 	.num_pipes = 2,
-	.has_psr = 1,
+	.has_vlv_psr = 1,
 	.has_runtime_pm = 1,
 	.has_rc6 = 1,
 	.has_gmbus_irq = 1,
@@ -334,7 +334,7 @@ static const struct intel_device_info intel_cherryview_info = {
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
 	.platform = INTEL_CHERRYVIEW,
 	.has_64bit_reloc = 1,
-	.has_psr = 1,
+	.has_vlv_psr = 1,
 	.has_runtime_pm = 1,
 	.has_resource_streamer = 1,
 	.has_rc6 = 1,
drivers/gpu/drm/i915/intel_dp.c +1 -1
index 2d42d09428c9..3f2191edc2c9 100644
@@ -2653,7 +2653,7 @@ static void intel_disable_dp(struct intel_encoder *encoder,
 	if (old_crtc_state->has_audio)
 		intel_audio_codec_disable(encoder);
 
-	if (HAS_PSR(dev_priv) && !HAS_DDI(dev_priv))
+	if (HAS_VLV_PSR(dev_priv))
 		intel_psr_disable(intel_dp);
 
 	/* Make sure the panel is off before trying to change the mode. But also
drivers/gpu/drm/i915/intel_psr.c +3 -4
index 559f1ab42bfc..461c7e4f6ecc 100644
@@ -401,8 +401,7 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)
 		return false;
 	}
 
-	if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
-	    !dev_priv->psr.link_standby) {
+	if (HAS_VLV_PSR(dev_priv) && !dev_priv->psr.link_standby) {
 		DRM_ERROR("PSR condition failed: Link off requested but not supported on this platform\n");
 		return false;
 	}
@@ -827,7 +826,7 @@ void intel_psr_single_frame_update(struct drm_i915_private *dev_priv,
 	 * Single frame update is already supported on BDW+ but it requires
 	 * many W/A and it isn't really needed.
 	 */
-	if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
+	if (!HAS_VLV_PSR(dev_priv))
 		return;
 
 	mutex_lock(&dev_priv->psr.lock);
@@ -949,7 +948,7 @@ void intel_psr_init(struct drm_i915_private *dev_priv)
 	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
 		/* HSW and BDW require workarounds that we don't implement. */
 		dev_priv->psr.link_standby = false;
-	else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+	else if (HAS_VLV_PSR(dev_priv))
 		/* On VLV and CHV only standby mode is supported. */
 		dev_priv->psr.link_standby = true;
 	else
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 42 lines · Jani Nikula
Quoted 30 lines · Rodrigo Vivi

This old PSR implementation died on gen8LP and had many limitations such:
- no functional HW tracking
- required link standby with single frame updates

So, let's group them in a easier way to filter it now on.

Cc Dhinakaran Pandiyan <[email protected]>
Cc Jim Bride <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.h  | 5 ++++-
 drivers/gpu/drm/i915/i915_pci.c  | 4 ++--
 drivers/gpu/drm/i915/intel_dp.c  | 2 +-
 drivers/gpu/drm/i915/intel_psr.c | 7 +++----
 4 files changed, 10 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 81cd21ecfa7d..d0a49307c6fb 100644
@@ -769,6 +769,7 @@ struct intel_csr {
 	func(has_pipe_cxsr); \
 	func(has_pooled_eu); \
 	func(has_psr); \
+	func(has_vlv_psr); \
 	func(has_rc6); \
 	func(has_rc6p); \
 	func(has_resource_streamer); \

drivers/gpu/drm/i915/i915_drv.h intel_info(const struct drm_i915_private *dev_priv) · line 2989

Quoted 7 lines
drivers/gpu/drm/i915/i915_drv.h +3 -1
@@ -2983,7 +2984,9 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define HAS_DDI(dev_priv)		 ((dev_priv)->info.has_ddi)
 #define HAS_FPGA_DBG_UNCLAIMED(dev_priv) ((dev_priv)->info.has_fpga_dbg)
-#define HAS_PSR(dev_priv)		 ((dev_priv)->info.has_psr)
+#define HAS_PSR(dev_priv)		 ((dev_priv)->info.has_psr || \
+					  (dev_priv)->info.has_vlv_psr)
+#define HAS_VLV_PSR(dev_priv)		 ((dev_priv)->info.has_vlv_psr)

I'm not convinced adding a intel info field for this is warranted. How about just:

Quoted 4 lines
#define HAS_VLV_PSR(dev_priv) (HAS_PSR(dev_priv) && \
	(IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)))

Though I'm not convinced about the HS_VLV_PSR name either!

Yeah, for platform-specific stuff like this I'd say make sure you have vfuncs to split out the difference in behaviour if they're big enough to warrant an entire macro of its own. And I'd say vlv vs big-core PSR is different enough to justify having entirely different functions. -Daniel

Quoted 82 lines

BR,
Jani.

Quoted 70 lines
drivers/gpu/drm/i915/i915_drv.h +0 -0
 #define HAS_RC6(dev_priv)		 ((dev_priv)->info.has_rc6)
 #define HAS_RC6p(dev_priv)		 ((dev_priv)->info.has_rc6p)
 
drivers/gpu/drm/i915/i915_pci.c +2 -2
index a1e6b696bcfa..e0e972210090 100644
@@ -274,7 +274,7 @@ static const struct intel_device_info intel_valleyview_info = {
 	.gen = 7,
 	.is_lp = 1,
 	.num_pipes = 2,
-	.has_psr = 1,
+	.has_vlv_psr = 1,
 	.has_runtime_pm = 1,
 	.has_rc6 = 1,
 	.has_gmbus_irq = 1,
@@ -334,7 +334,7 @@ static const struct intel_device_info intel_cherryview_info = {
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING | VEBOX_RING,
 	.platform = INTEL_CHERRYVIEW,
 	.has_64bit_reloc = 1,
-	.has_psr = 1,
+	.has_vlv_psr = 1,
 	.has_runtime_pm = 1,
 	.has_resource_streamer = 1,
 	.has_rc6 = 1,
drivers/gpu/drm/i915/intel_dp.c +1 -1
index 2d42d09428c9..3f2191edc2c9 100644
@@ -2653,7 +2653,7 @@ static void intel_disable_dp(struct intel_encoder *encoder,
 	if (old_crtc_state->has_audio)
 		intel_audio_codec_disable(encoder);
 
-	if (HAS_PSR(dev_priv) && !HAS_DDI(dev_priv))
+	if (HAS_VLV_PSR(dev_priv))
 		intel_psr_disable(intel_dp);
 
 	/* Make sure the panel is off before trying to change the mode. But also
drivers/gpu/drm/i915/intel_psr.c +3 -4
index 559f1ab42bfc..461c7e4f6ecc 100644
@@ -401,8 +401,7 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)
 		return false;
 	}
 
-	if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
-	    !dev_priv->psr.link_standby) {
+	if (HAS_VLV_PSR(dev_priv) && !dev_priv->psr.link_standby) {
 		DRM_ERROR("PSR condition failed: Link off requested but not supported on this platform\n");
 		return false;
 	}
@@ -827,7 +826,7 @@ void intel_psr_single_frame_update(struct drm_i915_private *dev_priv,
 	 * Single frame update is already supported on BDW+ but it requires
 	 * many W/A and it isn't really needed.
 	 */
-	if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
+	if (!HAS_VLV_PSR(dev_priv))
 		return;
 
 	mutex_lock(&dev_priv->psr.lock);
@@ -949,7 +948,7 @@ void intel_psr_init(struct drm_i915_private *dev_priv)
 	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
 		/* HSW and BDW require workarounds that we don't implement. */
 		dev_priv->psr.link_standby = false;
-	else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+	else if (HAS_VLV_PSR(dev_priv))
 		/* On VLV and CHV only standby mode is supported. */
 		dev_priv->psr.link_standby = true;
 	else
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