drm/i915: Fix PM refcounting w/o DMC firmware
Subsystems (2)
PATCH 1/1 drm/i915: Fix PM refcounting w/o DMC firmware
The case where the firmware isn't specified for a platform (although runtime PM works only with DMC on this platform) is the same case where the firmware is specified but can't be loaded for some reason. Hence we need to get a display init power domain ref in the first case too to keep the refcount bookkeeping in balance.
Also convert the related log message to be a debug one, since it's a valid scenario for a new platform, where we need to have dev_info->has_csr=1 set, but add support for actually loading the firmware only later.
References: https://bugs.freedesktop.org/show_bug.cgi?id=107382
--- drivers/gpu/drm/i915/intel_csr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_csr.c +6 -6
@@ -468,12 +468,6 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv) csr->fw_path =I915_CSR_SKL ; else if (IS_BROXTON(dev_priv)) csr->fw_path = I915_CSR_BXT; - else { -DRM_ERROR ("Unexpected: no known CSR firmware for platform\n" ); -return ; - } - -DRM_DEBUG_KMS ("Loading %s\n" , csr->fw_path);/* * Obtain a runtime pm reference, until CSR is loaded,
@@ -481,6 +475,12 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)*/ intel_display_power_get (dev_priv,POWER_DOMAIN_INIT ); +if (csr->fw_path ==NULL ) { +DRM_DEBUG_KMS ("No known CSR firmware for platform, disabling runtime PM\n" ); +return ; + } + +DRM_DEBUG_KMS ("Loading %s\n" , csr->fw_path);schedule_work (&dev_priv->csr.work); }
Signature · 6 lines
2.13.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Imre Deak (2018-08-15 12:30:16)
Quoted 37 lines
The case where the firmware isn't specified for a platform (although runtime PM works only with DMC on this platform) is the same case where the firmware is specified but can't be loaded for some reason. Hence we need to get a display init power domain ref in the first case too to keep the refcount bookkeeping in balance.
Also convert the related log message to be a debug one, since it's a valid scenario for a new platform, where we need to have dev_info->has_csr=1 set, but add support for actually loading the firmware only later.
References: https://bugs.freedesktop.org/show_bug.cgi?id=107382
Cc Chris Wilson <[email protected]>Cc Anusha Srivatsa <[email protected]>Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/intel_csr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/intel_csr.c +0
-6@@ -468,12 +468,6 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv) csr->fw_path =I915_CSR_SKL ; else if (IS_BROXTON(dev_priv)) csr->fw_path = I915_CSR_BXT; - else { -DRM_ERROR ("Unexpected: no known CSR firmware for platform\n" ); -return ; - } - -DRM_DEBUG_KMS ("Loading %s\n" , csr->fw_path);/* * Obtain a runtime pm reference, until CSR is loaded,
drivers/gpu/drm/i915/intel_csr.c void intel_csr_ucode_init(struct drm_i915_private *dev_priv) · line 479
Quoted 5 lines
drivers/gpu/drm/i915/intel_csr.c +2
-0@@ -481,6 +475,12 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)*/ intel_display_power_get (dev_priv,POWER_DOMAIN_INIT ); +if (csr->fw_path ==NULL ) { +DRM_DEBUG_KMS ("No known CSR firmware for platform, disabling runtime PM\n" );
WARN_ON(!INTEL_INFO(dev_priv)->is_alpha_support) ? -Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson
Reviewed-byQuoting Chris Wilson (2018-08-15 12:35:29)
Quoted 41 lines
Quoting Imre Deak (2018-08-15 12:30:16)
Quoted 40 lines
The case where the firmware isn't specified for a platform (although runtime PM works only with DMC on this platform) is the same case where the firmware is specified but can't be loaded for some reason. Hence we need to get a display init power domain ref in the first case too to keep the refcount bookkeeping in balance.
Also convert the related log message to be a debug one, since it's a valid scenario for a new platform, where we need to have dev_info->has_csr=1 set, but add support for actually loading the firmware only later.
References: https://bugs.freedesktop.org/show_bug.cgi?id=107382
Cc Chris Wilson <[email protected]>Cc Anusha Srivatsa <[email protected]>Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/intel_csr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/intel_csr.c +0
-6@@ -468,12 +468,6 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv) csr->fw_path =I915_CSR_SKL ; else if (IS_BROXTON(dev_priv)) csr->fw_path = I915_CSR_BXT; - else { -DRM_ERROR ("Unexpected: no known CSR firmware for platform\n" ); -return ; - } - -DRM_DEBUG_KMS ("Loading %s\n" , csr->fw_path);/* * Obtain a runtime pm reference, until CSR is loaded, @@ -481,6 +475,12 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)*/ intel_display_power_get (dev_priv,POWER_DOMAIN_INIT );
Quoted 4 lines
drivers/gpu/drm/i915/intel_csr.c void intel_csr_ucode_init(struct drm_i915_private *dev_priv) · line 479
Quoted 2 lines
drivers/gpu/drm/i915/intel_csr.c +2
-0+if (csr->fw_path ==NULL ) { +DRM_DEBUG_KMS ("No known CSR firmware for platform, disabling runtime PM\n" );WARN_ON(!INTEL_INFO(dev_priv)->is_alpha_support) ?
I think it's a sensible reminder in case we forget before attempting to clear the alpha support flag, nevertheless
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 42 lines · Chris Wilson
Quoting Chris Wilson (2018-08-15 12:35:29)
Quoted 41 lines
Quoting Imre Deak (2018-08-15 12:30:16)
Quoted 40 lines
The case where the firmware isn't specified for a platform (although runtime PM works only with DMC on this platform) is the same case where the firmware is specified but can't be loaded for some reason. Hence we need to get a display init power domain ref in the first case too to keep the refcount bookkeeping in balance.
Also convert the related log message to be a debug one, since it's a valid scenario for a new platform, where we need to have dev_info->has_csr=1 set, but add support for actually loading the firmware only later.
References: https://bugs.freedesktop.org/show_bug.cgi?id=107382
Cc Chris Wilson <[email protected]>Cc Anusha Srivatsa <[email protected]>Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/intel_csr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/intel_csr.c +0
-6@@ -468,12 +468,6 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv) csr->fw_path =I915_CSR_SKL ; else if (IS_BROXTON(dev_priv)) csr->fw_path = I915_CSR_BXT; - else { -DRM_ERROR ("Unexpected: no known CSR firmware for platform\n" ); -return ; - } - -DRM_DEBUG_KMS ("Loading %s\n" , csr->fw_path);/* * Obtain a runtime pm reference, until CSR is loaded, @@ -481,6 +475,12 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)*/ intel_display_power_get (dev_priv,POWER_DOMAIN_INIT );
Quoted 7 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_csr.c void intel_csr_ucode_init(struct drm_i915_private *dev_priv) · line 479
Quoted 2 lines
drivers/gpu/drm/i915/intel_csr.c +2
-0+if (csr->fw_path ==NULL ) { +DRM_DEBUG_KMS ("No known CSR firmware for platform, disabling runtime PM\n" );WARN_ON(!INTEL_INFO(dev_priv)->is_alpha_support) ?
I think it's a sensible reminder in case we forget before attempting to clear the alpha support flag,
Yep, makes sense, will add that.
Quoted 4 lines
nevertheless
Reviewed-by Chris Wilson <[email protected]>-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix PM refcounting w/o DMC firmware
In reply to Imre Deak== Series Details ==
== Series Details ==
Series: drm/i915: Fix PM refcounting w/o DMC firmware
URL : https://patchwork.freedesktop.org/series/48252/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
1e467be0103c drm/i915: Fix PM refcounting w/o DMC firmware
-:44: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!csr->fw_path"
#44: FILE: drivers/gpu/drm/i915/intel_csr.c:478:
+ if (csr->fw_path == NULL) {total: 0 errors, 0 warnings, 1 checks, 24 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Fix PM refcounting w/o DMC firmware
In reply to Imre Deak== Series Details ==
== Series Details ==
Series: drm/i915: Fix PM refcounting w/o DMC firmware
URL : https://patchwork.freedesktop.org/series/48252/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4671 -> Patchwork_9950 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48252/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9950 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@debugfs_test@read_all_entries:
fi-snb-2520m: PASS -> INCOMPLETE (fdo#103713)
igt@drv_selftest@live_hangcheck:
fi-skl-guc: PASS -> DMESG-FAIL (fdo#107174)
igt@kms_frontbuffer_tracking@basic:
{fi-byt-clapper}: PASS -> FAIL (fdo#103167)
==== Possible fixes ====
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-FAIL (fdo#102614) -> PASS
==== Warnings ====
{igt@kms_psr@primary_page_flip}:
fi-cnl-psr: DMESG-WARN (fdo#107372) -> DMESG-FAIL (fdo#107372) {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#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372
== Participating hosts (53 -> 48) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4671 -> Patchwork_9950
CI_DRM_4671: 77a98fa3e9b6eb29d513b1666ecddfdcfc424e86 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4598: 9c0f04355107a8693650b16756b6343a78501138 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9950: 1e467be0103c86450849414ae08a3b1aed3264a2 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
1e467be0103c drm/i915: Fix PM refcounting w/o DMC firmware
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9950/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/i915: Fix PM refcounting w/o DMC firmware
In reply to Imre DeakThe case where the firmware isn't specified for a platform (although runtime PM works only with DMC on this platform) is the same case where the firmware is specified but can't be loaded for some reason. Hence we need to get a display init power domain ref in the first case too to keep the refcount bookkeeping in balance.
Also convert the related log message to be a debug one, since it's a valid scenario for a new platform, where we need to have dev_info->has_csr=1 set, but add support for actually loading the firmware only later.
v2:
- In addition to the debug log, WARN on non-alpha support platforms, since then the first case isn't valid scenario. (Chris)
References: https://bugs.freedesktop.org/show_bug.cgi?id=107382
--- drivers/gpu/drm/i915/intel_csr.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_csr.c +8 -6
@@ -468,12 +468,6 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv) csr->fw_path =I915_CSR_SKL ; else if (IS_BROXTON(dev_priv)) csr->fw_path = I915_CSR_BXT; - else { -DRM_ERROR ("Unexpected: no known CSR firmware for platform\n" ); -return ; - } - -DRM_DEBUG_KMS ("Loading %s\n" , csr->fw_path);/* * Obtain a runtime pm reference, until CSR is loaded,
@@ -481,6 +475,14 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)*/ intel_display_power_get (dev_priv,POWER_DOMAIN_INIT ); +if (csr->fw_path ==NULL ) { +DRM_DEBUG_KMS ("No known CSR firmware for platform, disabling runtime PM\n" ); +WARN_ON (!IS_ALPHA_SUPPORT (INTEL_INFO (dev_priv))); + +return ; + } + +DRM_DEBUG_KMS ("Loading %s\n" , csr->fw_path);schedule_work (&dev_priv->csr.work); }
Signature · 6 lines
2.13.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix PM refcounting w/o DMC firmware (rev2)
In reply to Imre Deak== Series Details ==
== Series Details ==
Series: drm/i915: Fix PM refcounting w/o DMC firmware (rev2)
URL : https://patchwork.freedesktop.org/series/48252/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
a4a5d48f719b drm/i915: Fix PM refcounting w/o DMC firmware
-:48: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "!csr->fw_path"
#48: FILE: drivers/gpu/drm/i915/intel_csr.c:478:
+ if (csr->fw_path == NULL) {total: 0 errors, 0 warnings, 1 checks, 26 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Fix PM refcounting w/o DMC firmware (rev2)
In reply to Imre Deak== Series Details ==
== Series Details ==
Series: drm/i915: Fix PM refcounting w/o DMC firmware (rev2)
URL : https://patchwork.freedesktop.org/series/48252/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4671 -> Patchwork_9953 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48252/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9953:
=== IGT changes ===
==== Possible regressions ====
{igt@pm_rpm@module-reload}:
fi-bxt-j4205: SKIP -> DMESG-FAIL== Known issues ==
Here are the changes found in Patchwork_9953 that come from known issues:
=== IGT changes ===
==== Issues hit ====
{igt@amdgpu/amd_prime@i915-to-amd}:
fi-bxt-j4205: SKIP -> INCOMPLETE (fdo#103927)
==== Possible fixes ====
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-FAIL (fdo#102614) -> PASS {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#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
== Participating hosts (53 -> 47) ==
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-gdg-551
== Build changes ==
* Linux: CI_DRM_4671 -> Patchwork_9953
CI_DRM_4671: 77a98fa3e9b6eb29d513b1666ecddfdcfc424e86 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4598: 9c0f04355107a8693650b16756b6343a78501138 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9953: a4a5d48f719b9e1c2f3fa9d91ee3204b3768bfe4 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
a4a5d48f719b drm/i915: Fix PM refcounting w/o DMC firmware
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9953/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Imre Deak
AppliedRe: ✓ Fi.CI.BAT: success for drm/i915: Fix PM refcounting w/o DMC firmware (rev2)
Quoted 5 lines · Patchwork
== Series Details ==
Series: drm/i915: Fix PM refcounting w/o DMC firmware (rev2)
URL : https://patchwork.freedesktop.org/series/48252/
State : success
Pushed to -dinq, thanks for the review.
Quoted 62 lines
== Summary ==
= CI Bug Log - changes from
CI_DRM_4671->Patchwork_9953=== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48252/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in
Patchwork_9953:=== IGT changes ===
==== Possible regressions ==== {igt@pm_rpm@module-reload}: fi-bxt-j4205: SKIP -> DMESG-FAIL== Known issues ==
Here are the changes found in
Patchwork_9953that come from known issues:=== IGT changes ===
==== Issues hit ==== {igt@amdgpu/amd_prime@i915-to-amd}: fi-bxt-j4205: SKIP -> INCOMPLETE (fdo#103927) ==== Possible fixes ==== igt@kms_frontbuffer_tracking@basic: fi-hsw-peppy: DMESG-FAIL (fdo#102614) -> PASS{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#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927== Participating hosts (53 -> 47) ==
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-gdg-551
== Build changes ==
* Linux:
CI_DRM_4671->Patchwork_9953
CI_DRM_4671:77a98fa3e9b6eb29d513b1666ecddfdcfc424e86@git://anongit.freedesktop.org/gfx-ci/linux
IGT_4598:9c0f04355107a8693650b16756b6343a78501138@git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9953:a4a5d48f719b9e1c2f3fa9d91ee3204b3768bfe4@git://anongit.freedesktop.org/gfx-ci/linux
Quoted 7 lines
== Linux commits ==
a4a5d48f719bdrm/i915: Fix PM refcounting w/o DMC firmware== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9953/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915: Fix PM refcounting w/o DMC firmware (rev2)
In reply to Imre Deak== Series Details ==
== Series Details ==
Series: drm/i915: Fix PM refcounting w/o DMC firmware (rev2)
URL : https://patchwork.freedesktop.org/series/48252/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4671_full -> Patchwork_9953_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9953_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9953_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9953_full:
=== IGT changes ===
==== Warnings ====
igt@perf_pmu@rc6:
shard-kbl: PASS -> SKIP== Known issues ==
Here are the changes found in Patchwork_9953_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@gem_wait@await-default:
shard-snb: INCOMPLETE (fdo#105411) -> PASS
igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
shard-glk: FAIL (fdo#105363) -> PASS fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4671 -> Patchwork_9953
CI_DRM_4671: 77a98fa3e9b6eb29d513b1666ecddfdcfc424e86 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4598: 9c0f04355107a8693650b16756b6343a78501138 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9953: a4a5d48f719b9e1c2f3fa9d91ee3204b3768bfe4 @ 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_9953/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx