drm/i915/psr: Force PSR probe only after full initialization
Subsystems (3)
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 i915_driver_register() when everything is ready and driver is registering into the rest of the system.
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.
--- drivers/gpu/drm/i915/display/intel_psr.c | 18 ++++++++++++++++-- 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, 21 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_psr.c +16 -2
@@ -936,6 +936,8 @@ void intel_psr_enable(struct intel_dp *intel_dp, {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +intel_psr_force_mode_changed_set (intel_dp, false); +if (!crtc_state->has_psr)return ;
@@ -1096,6 +1098,8 @@ void intel_psr_update(struct intel_dp *intel_dp,struct i915_psr *psr = &dev_priv->psr;bool enable, psr2_enable; +intel_psr_force_mode_changed_set (intel_dp, false); +if (!CAN_PSR (dev_priv) ||READ_ONCE (psr->dp) != intel_dp)return ;
@@ -1629,7 +1633,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);
@@ -1640,5 +1644,15 @@ 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_force_mode_changed_set (struct intel_dp *intel_dp,bool set) +{ +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); + +if (!CAN_PSR (dev_priv) || !intel_dp_is_edp (intel_dp) || + intel_dp != dev_priv->psr.dp) +return ; + + dev_priv->psr.force_mode_changed = set; }
drivers/gpu/drm/i915/display/intel_psr.h +1 -0
@@ -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_force_mode_changed_set (struct intel_dp *intel_dp,bool set);#endif /* __INTEL_PSR_H__ */
drivers/gpu/drm/i915/i915_drv.c +3 -0
@@ -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"
@@ -1348,6 +1349,8 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)intel_audio_init (dev_priv); +intel_psr_force_mode_changed_set (dev_priv->psr.dp, true); +/* * Some ports require correctly set-up hpd registers for detection to * work properly (leading to ghost connected connector status), e.g. VGA
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -505,7 +505,7 @@ struct i915_psr {bool dc3co_enabled;u32 dc3co_exit_delay;struct delayed_work dc3co_work; -bool initially_probed; +bool force_mode_changed; };#define QUIRK_LVDS_SSC_DISABLE (1<<1)
Signature · 6 lines
2.25.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/psr: Force PSR probe only after full initialization
== Series Details ==
== Series Details ==
Series: drm/i915/psr: Force PSR probe only after full initialization
URL : https://patchwork.freedesktop.org/series/73436/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7935 -> Patchwork_16564
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_16564 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_16564, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_16564:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@i915_pm_rpm@module-reload:
- {fi-tgl-u}: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7935/fi-tgl-u/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/fi-tgl-u/igt@[email protected]
* igt@runner@aborted:
- {fi-tgl-u}: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/fi-tgl-u/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_16564 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_pm_rpm@module-reload:
- fi-skl-6600u: [PASS][4] -> [INCOMPLETE][5] ([i915#151])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7935/fi-skl-6600u/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/fi-skl-6600u/igt@[email protected]
- fi-cml-s: [PASS][6] -> [INCOMPLETE][7] ([i915#283])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7935/fi-cml-s/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/fi-cml-s/igt@[email protected]
- fi-icl-u3: [PASS][8] -> [INCOMPLETE][9] ([i915#189])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7935/fi-icl-u3/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/fi-icl-u3/igt@[email protected]
- fi-cml-u2: [PASS][10] -> [INCOMPLETE][11] ([i915#283])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7935/fi-cml-u2/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/fi-cml-u2/igt@[email protected]
- fi-icl-guc: [PASS][12] -> [INCOMPLETE][13] ([i915#189])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7935/fi-icl-guc/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/fi-icl-guc/igt@[email protected]
- fi-kbl-r: [PASS][14] -> [INCOMPLETE][15] ([i915#151])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7935/fi-kbl-r/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/fi-kbl-r/igt@[email protected]
- fi-icl-u2: [PASS][16] -> [INCOMPLETE][17] ([i915#189])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7935/fi-icl-u2/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/fi-icl-u2/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#151]: https://gitlab.freedesktop.org/drm/intel/issues/151
[i915#189]: https://gitlab.freedesktop.org/drm/intel/issues/189
[i915#283]: https://gitlab.freedesktop.org/drm/intel/issues/283
Participating hosts (52 -> 10)
------------------------------
ERROR: It appears as if the changes made in Patchwork_16564 prevented too many machines from booting.
Additional (1): fi-kbl-7560u
Missing (43): fi-skl-6770hq fi-bdw-gvtdvm fi-snb-2520m fi-apl-guc fi-pnv-d510 fi-icl-y fi-skl-lmem fi-blb-e6850 fi-icl-dsi fi-byt-n2820 fi-snb-2600 fi-hsw-4770r fi-bdw-5557u fi-bxt-dsi fi-bsw-n3050 fi-byt-j1900 fi-glk-dsi fi-bwr-2160 fi-ilk-650 fi-kbl-7500u fi-ctg-p8600 fi-hsw-4770 fi-gdg-551 fi-ivb-3770 fi-elk-e7500 fi-bsw-nick fi-skl-6700k2 fi-ilk-m540 fi-ehl-1 fi-tgl-dsi fi-skl-guc fi-cfl-8700k fi-hsw-4200u fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-cfl-guc fi-kbl-guc fi-kbl-x1275 fi-cfl-8109u fi-kbl-8809g fi-bsw-kefka fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7935 -> Patchwork_16564
CI-20190529: 20190529
CI_DRM_7935: 4bce2388b13d8b487dbfec353a2cb0131b6b9582 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5441: 534ca091fe4ffed916752165bc5becd7ff56cd84 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16564: b97c6cf59ec71026328d0f6306542a86a740fe12 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
b97c6cf59ec7 drm/i915/psr: Force PSR probe only after full initialization
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16564/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/i915/psr: Force PSR probe only after full initialization
In reply to José Roberto de SouzaCommit 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 i915_driver_register() when everything is ready and driver is registering into the rest of the system.
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()
--- drivers/gpu/drm/i915/display/intel_psr.c | 18 ++++++++++++++++-- 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, 21 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_psr.c +16 -2
@@ -936,6 +936,8 @@ void intel_psr_enable(struct intel_dp *intel_dp, {struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); +intel_psr_force_mode_changed_set (intel_dp, false); +if (!crtc_state->has_psr)return ;
@@ -1096,6 +1098,8 @@ void intel_psr_update(struct intel_dp *intel_dp,struct i915_psr *psr = &dev_priv->psr;bool enable, psr2_enable; +intel_psr_force_mode_changed_set (intel_dp, false); +if (!CAN_PSR (dev_priv) ||READ_ONCE (psr->dp) != intel_dp)return ;
@@ -1629,7 +1633,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);
@@ -1640,5 +1644,15 @@ 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_force_mode_changed_set (struct intel_dp *intel_dp,bool set) +{ +struct drm_i915_private *dev_priv =dp_to_i915 (intel_dp); + +if (!CAN_PSR (dev_priv) || !intel_dp || !intel_dp_is_edp (intel_dp) || + intel_dp != dev_priv->psr.dp) +return ; + + dev_priv->psr.force_mode_changed = set; }
drivers/gpu/drm/i915/display/intel_psr.h +1 -0
@@ -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_force_mode_changed_set (struct intel_dp *intel_dp,bool set);#endif /* __INTEL_PSR_H__ */
drivers/gpu/drm/i915/i915_drv.c +3 -0
@@ -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"
@@ -1348,6 +1349,8 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)intel_audio_init (dev_priv); +intel_psr_force_mode_changed_set (dev_priv->psr.dp, true); +/* * Some ports require correctly set-up hpd registers for detection to * work properly (leading to ghost connected connector status), e.g. VGA
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -505,7 +505,7 @@ struct i915_psr {bool dc3co_enabled;u32 dc3co_exit_delay;struct delayed_work dc3co_work; -bool initially_probed; +bool force_mode_changed; };#define QUIRK_LVDS_SSC_DISABLE (1<<1)
Signature · 6 lines
2.25.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 13 lines · José Roberto de Souza
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 toi915_driver_register()when everything is ready and driver is registering into the rest of the system.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()orintel_psr_update()will be called even if the current state do not allow PSR to be enabled.
Quoted 5 lines
v2: Check if
intel_dpis null inintel_psr_force_mode_changed_set()Fixes 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR")Reported-by Ross Zwisler <[email protected]>
Quoted 3 lines
Cc Gwan-gyeong Mun <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 13 lines · José Roberto de Souza
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 toi915_driver_register()when everything is ready and driver is registering into the rest of the system.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()orintel_psr_update()will be called even if the current state do not allow PSR to be enabled.
Quoted 3 lines
Fixes 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR")Reported-by Ross Zwisler <[email protected]>
Quoted 3 lines
Cc Gwan-gyeong Mun <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>
Note that when applying to the current upstream/master from Linus you have one small conflict:
$ cat drivers/gpu/drm/i915/i915_drv.h.rej
--- drivers/gpu/drm/i915/i915_drv.h
+++ drivers/gpu/drm/i915/i915_drv.h
@@ -505,7 +505,7 @@ struct i915_psr {
bool dc3co_enabled;
u32 dc3co_exit_delay;
struct delayed_work dc3co_work;
- bool initially_probed;
+ bool force_mode_changed;
};In Linus's tree the end of that structure looks like:
bool dc3co_enabled; u32 dc3co_exit_delay; struct delayed_work idle_work; bool initially_probed; };
Where the 'struct delayed_work' element is named differently.
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/psr: Force PSR probe only after full initialization (rev3)
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: drm/i915/psr: Force PSR probe only after full initialization (rev3)
URL : https://patchwork.freedesktop.org/series/73436/
State : failure
== Summary ==
Applying: drm/i915/psr: Force PSR probe only after full initialization
error: corrupt patch at line 11
error: could not build fake ancestor
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