Skip to contentSkip to conversation

drm/i915/psr: Remove PSR2 FIXME

PATCH Superseded José Roberto de Souza 2 participants 8 messages Jan 26, 2019

Subsystems (2)

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 drm/i915/psr: Remove PSR2 FIXME

Now we are only checking sink capabilities when probing PSR DPCD register and then dynamically checking in intel_psr2_config_valid() to make sure the current modeset and features enables are compatible with PSR2. So this FIXME can be dropped.

---
 drivers/gpu/drm/i915/intel_psr.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/i915/intel_psr.c +0 -5
index 84a0fb981561..cd4ffbb46e2d 100644
@@ -530,11 +530,6 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
 	int crtc_vdisplay = crtc_state->base.adjusted_mode.crtc_vdisplay;
 	int psr_max_h = 0, psr_max_v = 0;
 
-	/*
-	 * FIXME psr2_support is messed up. It's both computed
-	 * dynamically during PSR enable, and extracted from sink
-	 * caps during eDP detection.
-	 */
 	if (!dev_priv->psr.sink_psr2_support)
 		return false;
 
Signature · 6 lines
2.20.1

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

PATCH 2/4 drm/i915/psr: Initialize PSR mutex even when sink is not reliable

Even when driver is reload and hits this scenario the PSR mutex should be initialized, otherwise reading PSR debugfs status will execute mutex_lock() over a mutex that was not initialized.

---
 drivers/gpu/drm/i915/intel_psr.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/intel_psr.c +0 -1
index cd4ffbb46e2d..74be4bf88ea7 100644
@@ -1171,7 +1171,6 @@ void intel_psr_init(struct drm_i915_private *dev_priv)
 	if (val) {
 		DRM_DEBUG_KMS("PSR interruption error set\n");
 		dev_priv->psr.sink_not_reliable = true;
-		return;
 	}
 
 	/* Set link_standby x link_off defaults */
Signature · 6 lines
2.20.1

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

PATCH 3/4 drm/psr: Do not enable PSR when a interlaced mode set for all gens

In reply to José Roberto de Souza

This interlaced restriction applies to all gens, not only to Haswell.

Cc Dhinakaran Pandiyan <[email protected]>
Cc Rodrigo Vivi <[email protected]>
---
 drivers/gpu/drm/i915/intel_psr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_psr.c +1 -2
index 74be4bf88ea7..2c267c6501fc 100644
@@ -605,8 +605,7 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
 		return;
 	}
 
-	if (IS_HASWELL(dev_priv) &&
-	    adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
+	if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
 		DRM_DEBUG_KMS("PSR condition failed: Interlaced is Enabled\n");
 		return;
 	}
Signature · 6 lines
2.20.1

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

PATCH 4/4 drm/i915/psr: Print why PSR or PSR2 was not enabled in debugfs

In reply to José Roberto de Souza

PSR needs to do some checks against the current/future CRTC state to confirm if PSR hardware can support PSR in given configuration. So lets add this information to debugfs this way we can make IGT test smarter and skip tests when a valid a know reason caused PSR to not be enabled.

It will print PSR2 reason even if PSR1 is enabled as PSR2 have some additional requirements.

Cc Dhinakaran Pandiyan <[email protected]>
Cc Rodrigo Vivi <[email protected]>
---
 drivers/gpu/drm/i915/i915_debugfs.c |  2 ++
 drivers/gpu/drm/i915/i915_drv.h     |  1 +
 drivers/gpu/drm/i915/intel_psr.c    | 13 ++++++++++++-
 3 files changed, 15 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_debugfs.c +2 -0
index 3b995f9fdc06..9ea99e9fb402 100644
@@ -2571,6 +2571,8 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)
 	else
 		status = "disabled";
 	seq_printf(m, "PSR mode: %s\n", status);
+	if (psr->disabled_reason)
+		seq_printf(m, "Disabled reason: %s\n", psr->disabled_reason);
 
 	if (!psr->enabled)
 		goto unlock;
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 0133d1da3d3c..2bedb523922d 100644
@@ -512,6 +512,7 @@ struct i915_psr {
 	bool sink_not_reliable;
 	bool irq_aux_error;
 	u16 su_x_granularity;
+	const char *disabled_reason;
 };
 
 enum intel_pch {
drivers/gpu/drm/i915/intel_psr.c +12 -1
index 2c267c6501fc..a4214c133218 100644
@@ -530,8 +530,10 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
 	int crtc_vdisplay = crtc_state->base.adjusted_mode.crtc_vdisplay;
 	int psr_max_h = 0, psr_max_v = 0;
 
-	if (!dev_priv->psr.sink_psr2_support)
+	if (!dev_priv->psr.sink_psr2_support) {
+		dev_priv->psr.disabled_reason = "PSR2 not supported by sink";
 		return false;
+	}
 
 	/*
 	 * DSC and PSR2 cannot be enabled simultaneously. If a requested
@@ -540,6 +542,7 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
 	 */
 	if (crtc_state->dsc_params.compression_enable) {
 		DRM_DEBUG_KMS("PSR2 cannot be enabled since DSC is enabled\n");
+		dev_priv->psr.disabled_reason = "PSR2 cannot be enabled with DSC";
 		return false;
 	}
 
@@ -555,6 +558,7 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
 		DRM_DEBUG_KMS("PSR2 not enabled, resolution %dx%d > max supported %dx%d\n",
 			      crtc_hdisplay, crtc_vdisplay,
 			      psr_max_h, psr_max_v);
+		dev_priv->psr.disabled_reason = "PSR2 cannot be enabled because resolution is to big";
 		return false;
 	}
 
@@ -567,9 +571,11 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
 	if (crtc_hdisplay % dev_priv->psr.su_x_granularity) {
 		DRM_DEBUG_KMS("PSR2 not enabled, hdisplay(%d) not multiple of %d\n",
 			      crtc_hdisplay, dev_priv->psr.su_x_granularity);
+		dev_priv->psr.disabled_reason = "PSR2 SU granularity requirements not met";
 		return false;
 	}
 
+	dev_priv->psr.disabled_reason = NULL;
 	return true;
 }
 
@@ -597,16 +603,19 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
 	 */
 	if (dig_port->base.port != PORT_A) {
 		DRM_DEBUG_KMS("PSR condition failed: Port not supported\n");
+		dev_priv->psr.disabled_reason = "PSR not supported in port";
 		return;
 	}
 
 	if (dev_priv->psr.sink_not_reliable) {
 		DRM_DEBUG_KMS("PSR sink implementation is not reliable\n");
+		dev_priv->psr.disabled_reason = "PSR sink implementation is not reliable";
 		return;
 	}
 
 	if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
 		DRM_DEBUG_KMS("PSR condition failed: Interlaced is Enabled\n");
+		dev_priv->psr.disabled_reason = "PSR HW do not support interlaced mode";
 		return;
 	}
 
@@ -614,6 +623,7 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
 	if (psr_setup_time < 0) {
 		DRM_DEBUG_KMS("PSR condition failed: Invalid PSR setup time (0x%02x)\n",
 			      intel_dp->psr_dpcd[1]);
+		dev_priv->psr.disabled_reason = "PSR setup time is invalid";
 		return;
 	}
 
@@ -621,6 +631,7 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
 	    adjusted_mode->crtc_vtotal - adjusted_mode->crtc_vdisplay - 1) {
 		DRM_DEBUG_KMS("PSR condition failed: PSR setup time (%d us) too long\n",
 			      psr_setup_time);
+		dev_priv->psr.disabled_reason = "PSR setup time is longer than vblank";
 		return;
 	}
 
Signature · 6 lines
2.20.1

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

✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915/psr: Remove PSR2 FIXME

In reply to José Roberto de Souza
== Series Details ==

== Series Details ==

Series: series starting with [1/4] drm/i915/psr: Remove PSR2 FIXME
URL : https://patchwork.freedesktop.org/series/55762/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
c3c5516bfe56 drm/i915/psr: Remove PSR2 FIXME
134873148487 drm/i915/psr: Initialize PSR mutex even when sink is not reliable
004d4cfe5a00 drm/psr: Do not enable PSR when a interlaced mode set for all gens
a0ca8072bf48 drm/i915/psr: Print why PSR or PSR2 was not enabled in debugfs
-:76: WARNING:LONG_LINE: line over 100 characters
#76: FILE: drivers/gpu/drm/i915/intel_psr.c:561:
+		dev_priv->psr.disabled_reason = "PSR2 cannot be enabled because resolution is to big";

total: 0 errors, 1 warnings, 0 checks, 84 lines checked

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

#5 lore raw

✗ Fi.CI.SPARSE: warning for series starting with [1/4] drm/i915/psr: Remove PSR2 FIXME

In reply to José Roberto de Souza
== Series Details ==

== Series Details ==

Series: series starting with [1/4] drm/i915/psr: Remove PSR2 FIXME
URL : https://patchwork.freedesktop.org/series/55762/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915/psr: Remove PSR2 FIXME
Okay!

Commit: drm/i915/psr: Initialize PSR mutex even when sink is not reliable Okay!

Commit: drm/psr: Do not enable PSR when a interlaced mode set for all gens Okay!

Commit: drm/i915/psr: Print why PSR or PSR2 was not enabled in debugfs -drivers/gpu/drm/i915/selftests/../i915_drv.h:3541:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3542:16: warning: expression using sizeof(void)

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

#6 lore raw

✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915/psr: Remove PSR2 FIXME

In reply to José Roberto de Souza
== Series Details ==

== Series Details ==

Series: series starting with [1/4] drm/i915/psr: Remove PSR2 FIXME
URL : https://patchwork.freedesktop.org/series/55762/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5488 -> Patchwork_12048
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/55762/revisions/1/mbox/

Known issues
------------

Here are the changes found in Patchwork_12048 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718]

* igt@i915_selftest@live_hangcheck:
- fi-skl-iommu: PASS -> INCOMPLETE [fdo#108602] / [fdo#108744]

#### Possible fixes ####

* igt@kms_chamelium@dp-edid-read:
- fi-kbl-7500u: WARN -> PASS

* igt@kms_pipe_crc_basic@read-crc-pipe-a:
- fi-byt-clapper: FAIL [fdo#107362] -> PASS

* igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS +1

* igt@pm_rpm@module-reload:
- fi-skl-6770hq: FAIL [fdo#108511] -> PASS

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
[fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744
[fdo#108915]: https://bugs.freedesktop.org/show_bug.cgi?id=108915

Participating hosts (44 -> 41)
------------------------------

Additional (1): fi-icl-y
Missing (4): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan

Build changes
-------------

* Linux: CI_DRM_5488 -> Patchwork_12048

CI_DRM_5488: f13eede6ea3e780d900c5220bf09d764a80a3a8f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4790: dcdf4b04e16312f8f52ad389388d834f9d74b8f0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12048: a0ca8072bf48e1fb3c71b03d271a2b4afe7e4417 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

a0ca8072bf48 drm/i915/psr: Print why PSR or PSR2 was not enabled in debugfs 004d4cfe5a00 drm/psr: Do not enable PSR when a interlaced mode set for all gens 134873148487 drm/i915/psr: Initialize PSR mutex even when sink is not reliable c3c5516bfe56 drm/i915/psr: Remove PSR2 FIXME

== Logs ==

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

#7 lore raw

✓ Fi.CI.IGT: success for series starting with [1/4] drm/i915/psr: Remove PSR2 FIXME

In reply to José Roberto de Souza
== Series Details ==

== Series Details ==

Series: series starting with [1/4] drm/i915/psr: Remove PSR2 FIXME
URL : https://patchwork.freedesktop.org/series/55762/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5488_full -> Patchwork_12048_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_12048_full:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* {igt@runner@aborted}:
- shard-kbl: ( 5 FAIL ) -> ( 4 FAIL )

Known issues
------------

Here are the changes found in Patchwork_12048_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_isolation@bcs0-s3:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]

* igt@i915_selftest@live_hangcheck:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]

* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-snb: NOTRUN -> DMESG-WARN [fdo#107956]

* igt@kms_color@pipe-a-degamma:
- shard-apl: PASS -> FAIL [fdo#104782] / [fdo#108145]

* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-apl: PASS -> FAIL [fdo#103191] / [fdo#103232]

* igt@kms_cursor_crc@cursor-64x64-dpms:
- shard-apl: PASS -> FAIL [fdo#103232] +3

* igt@kms_flip@2x-flip-vs-dpms:
- shard-hsw: PASS -> DMESG-WARN [fdo#102614] +1

* igt@kms_plane@plane-position-covered-pipe-c-planes:
- shard-glk: PASS -> FAIL [fdo#103166]

* igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
- shard-glk: PASS -> FAIL [fdo#108145]

* igt@kms_plane_alpha_blend@pipe-b-alpha-transparant-fb:
- shard-kbl: NOTRUN -> FAIL [fdo#108145]

* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-apl: PASS -> FAIL [fdo#103166] +2

* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: NOTRUN -> DMESG-FAIL [fdo#105763]

#### Possible fixes ####

* igt@kms_color@pipe-c-degamma:
- shard-apl: FAIL [fdo#104782] -> PASS

* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- shard-glk: FAIL [fdo#103166] -> PASS +2

* igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
- shard-apl: FAIL [fdo#103166] -> PASS +1

* igt@perf_pmu@rc6-runtime-pm-long:
- shard-kbl: FAIL [fdo#105010] -> PASS

#### Warnings ####

* igt@i915_suspend@shrink:
- shard-snb: INCOMPLETE [fdo#105411] / [fdo#106886] -> DMESG-WARN [fdo#109244]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#106886]: https://bugs.freedesktop.org/show_bug.cgi?id=106886
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109244]: https://bugs.freedesktop.org/show_bug.cgi?id=109244
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278

Participating hosts (7 -> 5)
------------------------------

Missing (2): shard-skl shard-iclb

Build changes
-------------

* Linux: CI_DRM_5488 -> Patchwork_12048

CI_DRM_5488: f13eede6ea3e780d900c5220bf09d764a80a3a8f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4790: dcdf4b04e16312f8f52ad389388d834f9d74b8f0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12048: a0ca8072bf48e1fb3c71b03d271a2b4afe7e4417 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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