All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/psr: disable psr2 for resolution greater than 32X20
@ 2017-01-10  7:02 vathsala nagaraju
  2017-01-10  7:53 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-01-10 20:48 ` [PATCH] " Vivi, Rodrigo
  0 siblings, 2 replies; 15+ messages in thread
From: vathsala nagaraju @ 2017-01-10  7:02 UTC (permalink / raw)
  To: dri-devel, intel-gfx; +Cc: Rodrigo Vivi

PSR2 is restricted to work with panel resolutions upto 3200x2000,
move the check to intel_psr_match_conditions and fully block psr.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Jim Bride <jim.bride@linux.intel.com>
Suggested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
---
 drivers/gpu/drm/i915/intel_psr.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 6aca8ff..f2ca2a9 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -387,6 +387,13 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)
 		return false;
 	}
 
+	/* PSR2 is restricted to work with panel resolutions upto 3200x2000 */
+	if (intel_crtc->config->pipe_src_w > 3200 ||
+				intel_crtc->config->pipe_src_h > 2000) {
+		dev_priv->psr.psr2_support = false;
+		return false;
+	}
+
 	dev_priv->psr.source_ok = true;
 	return true;
 }
@@ -425,7 +432,6 @@ void intel_psr_enable(struct intel_dp *intel_dp)
 	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
 	struct drm_device *dev = intel_dig_port->base.base.dev;
 	struct drm_i915_private *dev_priv = to_i915(dev);
-	struct intel_crtc *crtc = to_intel_crtc(intel_dig_port->base.base.crtc);
 
 	if (!HAS_PSR(dev_priv)) {
 		DRM_DEBUG_KMS("PSR not supported on this platform\n");
@@ -452,12 +458,7 @@ void intel_psr_enable(struct intel_dp *intel_dp)
 		hsw_psr_setup_vsc(intel_dp);
 
 		if (dev_priv->psr.psr2_support) {
-			/* PSR2 is restricted to work with panel resolutions upto 3200x2000 */
-			if (crtc->config->pipe_src_w > 3200 ||
-				crtc->config->pipe_src_h > 2000)
-				dev_priv->psr.psr2_support = false;
-			else
-				skl_psr_setup_su_vsc(intel_dp);
+			skl_psr_setup_su_vsc(intel_dp);
 		}
 
 		/*
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915/psr: disable psr2 for resolution greater than 32X20
@ 2017-05-22 23:28 Yaroslav Shabalin
  2017-05-23 10:01 ` Nagaraju, Vathsala
  0 siblings, 1 reply; 15+ messages in thread
From: Yaroslav Shabalin @ 2017-05-22 23:28 UTC (permalink / raw)
  To: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 1332 bytes --]

Hi!

I'm not sure if this is suitable way to report bugs but seems that this
change breaks PSR support on my laptop.
I have Dell XPS 15 9550 with Skylake i7-6700HQ CPU, 4K screen resolution
(3840x2160) and Arch Linux installed. Having i915.enable_psr=1 boot
parameter on kernels <= 4.10 I get the following:

-> cat /sys/kernel/debug/dri/0/i915_edp_psr_status
Sink_Support: yes
Source_OK: yes
Enabled: yes
Active: yes
Busy frontbuffer bits: 0x000
Re-enable work scheduled: no
Main link in standby mode: no
HW Enabled & Active bit: yes

However on kernel 4.11 (which I believe has this commit merged) PSR is not
enabled with native screen resolution.

-> cat /sys/kernel/debug/dri/0/i915_edp_psr_status
Sink_Support: yes
Source_OK: no
Enabled: no
Active: no
Busy frontbuffer bits: 0x000
Re-enable work scheduled: no
Main link in standby mode: no
HW Enabled & Active bit: no

If I change resolution to lower value (i.e. 3200x1800) PSR gets enabled as
on <= 4.10 kernel.

That is very sad because without PSR CPU never goes deeper than PC7
increasing idle power consumption by ~1W. I would really appreciate if
someone investigate this issue. Is this resolution restriction really
needed and should block PSR fully? Seems that on older kernels it wasn't a
problem. Please let me know if you need any additional diagnostic
information.

[-- Attachment #1.2: Type: text/html, Size: 1713 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH] drm/i915/psr: disable psr2 for resolution greater than 32X20
@ 2017-05-23  9:14 Yaroslav Shabalin
  2017-05-23  9:24 ` Nagaraju, Vathsala
  0 siblings, 1 reply; 15+ messages in thread
From: Yaroslav Shabalin @ 2017-05-23  9:14 UTC (permalink / raw)
  To: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 1413 bytes --]

Hi!

I'm not sure if this is suitable way to report bugs but seems that this
change (
https://github.com/torvalds/linux/commit/acf45d11050abd751dcec986ab121cb2367dcbba)
breaks PSR support on my laptop.
I have Dell XPS 15 9550 with Skylake i7-6700HQ CPU, 4K screen resolution
(3840x2160) and Arch Linux installed. Adding i915.enable_psr=1 boot
parameter on kernels <= 4.10 I get the following:

-> cat /sys/kernel/debug/dri/0/i915_edp_psr_status
Sink_Support: yes
Source_OK: yes
Enabled: yes
Active: yes
Busy frontbuffer bits: 0x000
Re-enable work scheduled: no
Main link in standby mode: no
HW Enabled & Active bit: yes

However on kernel 4.11 (which I believe has this commit merged) PSR is not
enabled with native screen resolution.

-> cat /sys/kernel/debug/dri/0/i915_edp_psr_status
Sink_Support: yes
Source_OK: no
Enabled: no
Active: no
Busy frontbuffer bits: 0x000
Re-enable work scheduled: no
Main link in standby mode: no
HW Enabled & Active bit: no

If I change resolution to lower value (i.e. 3200x1800) PSR gets enabled as
on <= 4.10 kernel.

That is very sad because without PSR CPU never goes deeper than PC7 adding
~1W to idle power consumption. I would really appreciate if someone
investigate this issue. Is this resolution restriction really needed and
should block PSR fully? Seems that on older kernels it wasn't a problem.
Please let me know if you need any additional diagnostic information.

[-- Attachment #1.2: Type: text/html, Size: 1900 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH] drm/i915/psr: disable psr2 for resolution greater than 32X20
@ 2017-05-23 16:57 vathsala nagaraju
  2017-05-23 18:17 ` Vivi, Rodrigo
  2017-05-25 16:43 ` vathsala nagaraju
  0 siblings, 2 replies; 15+ messages in thread
From: vathsala nagaraju @ 2017-05-23 16:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: Yaroslav Shabalin, Rodrigo Vivi

psr1 is also disabled for panel resolution  greater than 32X20.
Added psr2 check to disable only for psr2 panels having resolution
greater than 32X20.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Jim Bride <jim.bride@linux.intel.com>
Cc: Yaroslav Shabalin <yaroslav.shabalin@gmail.com>
Signed-off-by: vathsala nagaraju <vathsala.nagaraju@intel.com>
---
 drivers/gpu/drm/i915/intel_psr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index c3780d0..559f1ab 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -435,8 +435,9 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)
 	}
 
 	/* PSR2 is restricted to work with panel resolutions upto 3200x2000 */
-	if (intel_crtc->config->pipe_src_w > 3200 ||
-				intel_crtc->config->pipe_src_h > 2000) {
+	if (dev_priv->psr.psr2_support &&
+	    (intel_crtc->config->pipe_src_w > 3200 ||
+	     intel_crtc->config->pipe_src_h > 2000)) {
 		dev_priv->psr.psr2_support = false;
 		return false;
 	}
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-05-30 17:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-10  7:02 [PATCH] drm/i915/psr: disable psr2 for resolution greater than 32X20 vathsala nagaraju
2017-01-10  7:53 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-01-10 20:48 ` [PATCH] " Vivi, Rodrigo
2017-01-10 23:44   ` Rodrigo Vivi
2017-05-22 23:28 Yaroslav Shabalin
2017-05-23 10:01 ` Nagaraju, Vathsala
2017-05-23  9:14 Yaroslav Shabalin
2017-05-23  9:24 ` Nagaraju, Vathsala
2017-05-23 16:57 vathsala nagaraju
2017-05-23 18:17 ` Vivi, Rodrigo
2017-05-24 11:54   ` Jani Nikula
2017-05-25 16:43 ` vathsala nagaraju
2017-05-26 19:10   ` Rodrigo Vivi
2017-05-29  8:24     ` Jani Nikula
2017-05-30 17:45       ` Rodrigo Vivi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.