Re: [PATCH] drm/i915: HDCP state handling in ddi_update_pipe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2/4/2019 10:34 PM, Maarten Lankhorst wrote:
Op 04-02-2019 om 17:51 schreef C, Ramalingam:

On 2/4/2019 10:13 PM, Maarten Lankhorst wrote:
Op 04-02-2019 om 16:44 schreef Ramalingam C:
The downgrade of the fullmodeset into fastset
intel_encoder->update_pipe, in possible scenario, skips the En/Dis-able
DDI. Hence breaks the HDCP state change handling.

We also don't have any hdcp tests in CI, because the shard runs don't
have hdcp capable outputs :-/

So this change fixs it by handling the HDCP state change request at
intel_encoder->update_pipe too along with enable and disable of the DDI.

Fixes: d19f958db23c ("drm/i915: Enable fastset for non-boot modesets.")

v2:
    Added commit id that broke the HDCP [Daniel]

Signed-off-by: Ramalingam C <ramalingam.c@xxxxxxxxx>
cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
cc: Hans de Goede <hdegoede@xxxxxxxxxx>
cc: Daniel Vetter <daniel.vetter@xxxxxxxxx>
---
   drivers/gpu/drm/i915/intel_ddi.c | 7 +++++++
   1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index ca705546a0ab..2323b7cb1d38 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -3568,6 +3568,13 @@ static void intel_ddi_update_pipe(struct intel_encoder *encoder,
   {
       if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
           intel_ddi_update_pipe_dp(encoder, crtc_state, conn_state);
+
+    if (conn_state->content_protection ==
+        DRM_MODE_CONTENT_PROTECTION_DESIRED)
+        intel_hdcp_enable(to_intel_connector(conn_state->connector));
+    else if (conn_state->content_protection ==
+         DRM_MODE_CONTENT_PROTECTION_UNDESIRED)
+        intel_hdcp_disable(to_intel_connector(conn_state->connector));
   }
     static void intel_ddi_set_fia_lane_count(struct intel_encoder *encoder,
Does anything bad happen if we enable HDCP when it's already enabled? Might want to have a test for that. :)
nothing will happen. intel_hdcp_atomic_check will prune the request. mode_changed is not set in such case.
There are other reasons than HDCP that could cause fastsets, so what happens if update_pipe is called and content protection stays the same?
If the HDCP is enabled we dont trigger the HDCP_enable from the fastset.
But if the HDCP is failed every fastset will be triggering the HDCP enable. But that is the expectation. If user dont want further attempt on hdcp auth, user will set it to undesired.

--Ram

~Maarten


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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux