HDCP minor refactoring
Subsystems (3)
cover HDCP minor refactoring
No functional change.
Anshuman Gupta (2):
drm/i915/hdcp: Add update_pipe early return drm/i915/hdcp: No direct access to power_well desc
drivers/gpu/drm/i915/display/intel_hdcp.c | 24 ++++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-)
Signature · 6 lines
2.26.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 drm/i915/hdcp: Add update_pipe early return
Currently intel_hdcp_update_pipe() is also getting called for non-hdcp connectors and got though its conditional code flow, which is completely unnecessary for non-hdcp connectors, therefore it make sense to have an early return. No functional change.
--- drivers/gpu/drm/i915/display/intel_hdcp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_hdcp.c +6 -2
@@ -2079,11 +2079,15 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state,struct intel_connector *connector =to_intel_connector (conn_state->connector);struct intel_hdcp *hdcp = &connector->hdcp; -bool content_protection_type_changed = +bool content_protection_type_changed; + +if (!connector->hdcp.shim) +return ; + + content_protection_type_changed = (conn_state->hdcp_content_type != hdcp->content_type && conn_state->content_protection !=DRM_MODE_CONTENT_PROTECTION_UNDESIRED ); -/* * During the HDCP encryption session if Type change is requested, * disable the HDCP and reenable it with new TYPE value.
Signature · 6 lines
2.26.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Add update_pipe early return
Quoted 9 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Anshuman Gupta
Sent: Wednesday, May 13, 2020 5:49 PM
To: [email protected]
Subject: [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Addupdate_pipeearly return
Quoted 4 lines
Currently
intel_hdcp_update_pipe()is also getting called for non-hdcp connectors and got though its conditional code flow, which is completely unnecessary for non-hdcp connectors, therefore it make sense to have an early return. No functional change.
Looks Good to me.
Quoted 32 lines
Signed-off-by Anshuman Gupta <[email protected]>--- drivers/gpu/drm/i915/display/intel_hdcp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_hdcp.c +6
-2@@ -2079,11 +2079,15 @@ void intel_hdcp_update_pipe(structintel_atomic_state *state, struct intel_connector *connector =to_intel_connector (conn_state->connector);struct intel_hdcp *hdcp = &connector->hdcp; -bool content_protection_type_changed = +bool content_protection_type_changed; + +if (!connector->hdcp.shim) +return ; + + content_protection_type_changed = (conn_state->hdcp_content_type != hdcp->content_type && conn_state->content_protection !=DRM_MODE_CONTENT_PROTECTION_UNDESIRED ); -/* * During the HDCP encryption session if Type change is requested, * disable the HDCP and reenable it with new TYPE value.
--
2.26.0
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Gupta, Anshuman
Reviewed-by Uma ShankarRe: [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Add update_pipe early return
-----Original Message-----
From: Shankar, Uma <[email protected]>
Sent: Monday, May 18, 2020 3:45 PM
To: Gupta, Anshuman <[email protected]>; [email protected]
Subject: RE: [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Add update_pipe early return
Quoted 8 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Anshuman Gupta
Sent: Wednesday, May 13, 2020 5:49 PM
To: [email protected]
Subject: [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Addupdate_pipeearly return
Quoted 4 lines
Currently
intel_hdcp_update_pipe()is also getting called for non-hdcp connectors and got though its conditional code flow, which is completely unnecessary for non-hdcp connectors, therefore it make sense to have an early return. No functional change.
Looks Good to me.
Thanks Uma for review!
Quoted 32 lines
Signed-off-by Anshuman Gupta <[email protected]>--- drivers/gpu/drm/i915/display/intel_hdcp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_hdcp.c +6
-2@@ -2079,11 +2079,15 @@ void intel_hdcp_update_pipe(structintel_atomic_state *state, struct intel_connector *connector =to_intel_connector (conn_state->connector);struct intel_hdcp *hdcp = &connector->hdcp; -bool content_protection_type_changed = +bool content_protection_type_changed; + +if (!connector->hdcp.shim) +return ; + + content_protection_type_changed = (conn_state->hdcp_content_type != hdcp->content_type && conn_state->content_protection !=DRM_MODE_CONTENT_PROTECTION_UNDESIRED ); -/* * During the HDCP encryption session if Type change is requested, * disable the HDCP and reenable it with new TYPE value.
--
2.26.0
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915/hdcp: No direct access to power_well desc
In reply to Anshuman GuptaHDCP code doesn't require to access power_well internal stuff, instead it should use the intel_display_power_well_is_enabled() to get the status of desired power_well.
No functional change.
--- drivers/gpu/drm/i915/display/intel_hdcp.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/display/intel_hdcp.c +4 -12
@@ -148,9 +148,8 @@ static int intel_hdcp_poll_ksv_fifo(struct intel_digital_port *intel_dig_port,static bool hdcp_key_loadable (struct drm_i915_private *dev_priv) { -struct i915_power_domains *power_domains = &dev_priv->power_domains; -struct i915_power_well *power_well;enum i915_power_well_id id; +intel_wakeref_t wakeref;bool enabled = false;/*
@@ -162,17 +161,10 @@ static bool hdcp_key_loadable(struct drm_i915_private *dev_priv)else id =SKL_DISP_PW_1 ; -mutex_lock (&power_domains->lock); -/* PG1 (power well #1) needs to be enabled */ -for_each_power_well (dev_priv, power_well) { -if (power_well->desc->id == id) { - enabled = power_well->desc->ops->is_enabled (dev_priv, - power_well); -break ; - } - } -mutex_unlock (&power_domains->lock); + wakeref =intel_runtime_pm_get (&dev_priv->runtime_pm); + enabled =intel_display_power_well_is_enabled (dev_priv, id); +intel_runtime_pm_put (&dev_priv->runtime_pm, wakeref);/* * Another req for hdcp key loadability is enabled state of pll for
Signature · 6 lines
2.26.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: No direct access to power_well desc
Quoted 34 lines · Anshuman Gupta
HDCP code doesn't require to access
power_wellinternal stuff, instead it should use theintel_display_power_well_is_enabled()to get the status of desiredpower_well.
No functional change.Cc Jani Nikula <[email protected]>Signed-off-by Anshuman Gupta <[email protected]>--- drivers/gpu/drm/i915/display/intel_hdcp.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)drivers/gpu/drm/i915/display/intel_hdcp.c +1
-5@@ -148,9 +148,8 @@ static int intel_hdcp_poll_ksv_fifo(struct intel_digital_port *intel_dig_port,static bool hdcp_key_loadable (struct drm_i915_private *dev_priv) { -struct i915_power_domains *power_domains = &dev_priv->power_domains; -struct i915_power_well *power_well;enum i915_power_well_id id; +intel_wakeref_t wakeref;bool enabled = false;/* @@ -162,17 +161,10 @@ static bool hdcp_key_loadable(struct drm_i915_private *dev_priv)else id =SKL_DISP_PW_1 ; -mutex_lock (&power_domains->lock); -/* PG1 (power well #1) needs to be enabled */ -for_each_power_well (dev_priv, power_well) {
drivers/gpu/drm/i915/display/intel_hdcp.c static bool hdcp_key_loadable(struct drm_i915_private *dev_priv) · line 167
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_hdcp.c +3
-7-if (power_well->desc->id == id) { - enabled = power_well->desc->ops->is_enabled (dev_priv, - power_well); -break ; - } - } -mutex_unlock (&power_domains->lock); + wakeref =intel_runtime_pm_get (&dev_priv->runtime_pm); + enabled =intel_display_power_well_is_enabled (dev_priv, id); +intel_runtime_pm_put (&dev_priv->runtime_pm, wakeref);
with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref) enabled = intel_display_power_well_is_enabled(dev_priv, id);
Quoted 3 lines
drivers/gpu/drm/i915/display/intel_hdcp.c +0
-0/* * Another req for hdcp key loadability is enabled state of pll for
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for HDCP minor refactoring
In reply to Anshuman Gupta== Series Details ==
== Series Details ==
Series: HDCP minor refactoring
URL : https://patchwork.freedesktop.org/series/77224/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8474 -> Patchwork_17646
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/index.html
Known issues
------------
Here are the changes found in Patchwork_17646 that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@i915_selftest@live@execlists:
- fi-kbl-soraka: [DMESG-FAIL][1] ([i915#656]) -> [PASS][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/fi-kbl-soraka/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/fi-kbl-soraka/igt@i915_selftest@[email protected]
[i915#656]: https://gitlab.freedesktop.org/drm/intel/issues/656
Participating hosts (50 -> 44)
------------------------------
Missing (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7560u fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8474 -> Patchwork_17646
CI-20190529: 20190529
CI_DRM_8474: 2244df7018f329285893f900c738e7074e6ae1d5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5651: e54e2642f1967ca3c488db32264607df670d1dfb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17646: 0d54075397ea83098db4fb9ed01c9469a88cc409 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
0d54075397ea drm/i915/hdcp: No direct access to power_well desc 2838263c0b41 drm/i915/hdcp: Add update_pipe early return
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for HDCP minor refactoring
In reply to Anshuman Gupta== Series Details ==
== Series Details ==
Series: HDCP minor refactoring
URL : https://patchwork.freedesktop.org/series/77224/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8474_full -> Patchwork_17646_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_17646_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-kbl: [PASS][1] -> [DMESG-WARN][2] ([i915#180]) +1 similar issue
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-kbl6/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-kbl4/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-128x128-offscreen:
- shard-skl: [PASS][3] -> [FAIL][4] ([i915#54])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-skl2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-skl10/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-xtiled:
- shard-snb: [PASS][5] -> [SKIP][6] ([fdo#109271])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-snb5/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-snb1/igt@[email protected]
* igt@kms_fbcon_fbt@psr-suspend:
- shard-skl: [PASS][7] -> [INCOMPLETE][8] ([i915#69])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-skl6/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-skl1/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: [PASS][9] -> [DMESG-WARN][10] ([i915#180] / [i915#95])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-apl2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-apl1/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [PASS][11] -> [DMESG-WARN][12] ([i915#180]) +2 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-apl2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-apl1/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][13] -> [FAIL][14] ([fdo#108145] / [i915#265]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-skl5/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-skl5/igt@[email protected]
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][15] -> [SKIP][16] ([fdo#109642] / [fdo#111068])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-iclb2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-iclb8/igt@[email protected]
#### Possible fixes ####
* igt@i915_suspend@sysfs-reader:
- shard-kbl: [DMESG-WARN][17] ([i915#180]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-kbl4/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-kbl6/igt@[email protected]
* igt@kms_cursor_legacy@all-pipes-torture-move:
- shard-snb: [DMESG-WARN][19] ([i915#128]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-snb5/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-snb2/igt@[email protected]
* igt@kms_cursor_legacy@pipe-d-torture-bo:
- shard-tglb: [DMESG-WARN][21] ([i915#128]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-tglb1/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-tglb6/igt@[email protected]
* igt@kms_hdr@bpc-switch:
- shard-skl: [FAIL][23] ([i915#1188]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-skl4/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-skl9/igt@[email protected]
* igt@kms_psr@psr2_primary_blt:
- shard-iclb: [SKIP][25] ([fdo#109441]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-iclb8/igt@kms_psr@psr2_primary_blt.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-iclb2/igt@kms_psr@psr2_primary_blt.html
#### Warnings ####
* igt@i915_pm_dc@dc6-dpms:
- shard-tglb: [FAIL][27] ([i915#454]) -> [SKIP][28] ([i915#468])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-tglb3/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-tglb2/igt@[email protected]
* igt@i915_pm_rc6_residency@rc6-idle:
- shard-iclb: [WARN][29] ([i915#1515]) -> [FAIL][30] ([i915#1515])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-iclb6/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-iclb7/igt@[email protected]
* igt@kms_content_protection@atomic-dpms:
- shard-apl: [TIMEOUT][31] ([i915#1319]) -> [FAIL][32] ([fdo#110321] / [fdo#110336] / [i915#95]) +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-apl4/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-apl3/igt@[email protected]
* igt@runner@aborted:
- shard-tglb: [FAIL][33] ([i915#1602]) -> ([FAIL][34], [FAIL][35]) ([i915#1602] / [i915#1759])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8474/shard-tglb7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-tglb1/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17646/shard-tglb5/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#128]: https://gitlab.freedesktop.org/drm/intel/issues/128
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1515]: https://gitlab.freedesktop.org/drm/intel/issues/1515
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1602]: https://gitlab.freedesktop.org/drm/intel/issues/1602
[i915#1759]: https://gitlab.freedesktop.org/drm/intel/issues/1759
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1823]: https://gitlab.freedesktop.org/drm/intel/issues/1823
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (11 -> 11)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8474 -> Patchwork_17646
CI-20190529: 20190529
CI_DRM_8474: 2244df7018f329285893f900c738e7074e6ae1d5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5651: e54e2642f1967ca3c488db32264607df670d1dfb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17646: 0d54075397ea83098db4fb9ed01c9469a88cc409 @ 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_17646/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx