-
Notifications
You must be signed in to change notification settings - Fork 81
Hdcp 2.2 #471
base: master
Are you sure you want to change the base?
Hdcp 2.2 #471
Conversation
571cddc
to
36d1556
Compare
@harishkrupo Your series failed Travis CI due to 'check_patch.py' -- basically failing the clang format check. Please run it locally, fix any errors, and resubmit for review. This |
I ran clang-format-diff-6.0 before submitting. I am not sure why it fails here. maybe a difference in the version used in travis? |
clang-format-diff-3.9 is what I am using. |
@harishkrupo I am also submiiting PR for HDCP for Beta release. |
Okay will downgrade my tool and will try.
Sure, will rebase once you merge it :) |
Travis-Ci uses clang-format 3.8 I think. |
hmm, there is a discrepancy between clang-format-diff 6.0 and 3.9. I have pushed the above patches checked with 3.9 as that is the version we use in travis. |
Yeah, you are right, it does use 3.9. The system that Travis is on runs Xenial 16.04, which uses 3.9. That is currently the recommend OS version for Celadon systems -- so we should stick with that version imo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me -- with merge conflicts resolved of course :)
@js0701 @stripes416 Patches rebased. Requires another review. |
@harishkrupo HDCP daemon should also be on Linux. Let's sync with VPG/IOTG before merge this. |
@js0701 Are you referring to HDCP Daemon?
I am not against using the daemon. One upside of using it would be that we could completely remove the HDCP bits in IAHWC (SRM, protection, etc) and directly use that as they provide support for these. The downside would be that it will add another dependency to IAHWC. |
@harishkrupo |
@js0701 Sure. |
Jira: None Test: ./testlayers -f 120 -j jsonconfigs/kmscube1layer.json &> log.txt Check log.txt to see if HDCP 1.4/2.2 was successfully enabled. Signed-off-by: Harish Krupo <[email protected]>
@js0701 I observed that the HDCP daemon runs a thread to continually monitor the HDCP status. However, they don't wait for ~15 seconds before ensuring that the connection is authenticated. I have pushed a patch removing all the thread related code and just simply set the connector property and wait for the said amount of time before declaring failure or success. |
With HDCP 2.2 a new connector property is added for marking the content type. This property controls the type of authentication that the kernel needs to perform. The content type property takes 2 values, 0 (TYPE0) and 1 (TYPE1). When the client marks the content as TYPE0, the kernel can choose whether to go for HDCP 1.4 or HDCP 2.2 authentication but when the client marks the content as TYPE1, the kernel is only allowed to attempt HDCP 2.2 authentication. Failing which, HDCP fails to enable. The spec states that the source needs to wait at least 5 seconds before declaring success/failure in authentication. Along with this wait, the kernel re-tries 3 times, thus the compositor needs to wait for ~15 seconds. Jira: None Test: Test introduced in jsonlayerstest.cpp in the previous patch Test it by running ./testlayers -f 120 -j jsonconfigs/kmscube1layer.json Change-Id: I5ee780157f074d295701c4f1aff9fc0f6a6d37a8 Signed-off-by: Harish Krupo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harishkrupo This looks good to me -- Good Job! Once you rebase onto current master and it passes Travis, it should be good to merge.
Wait for @js0701 to merge (note to self!) |
@harishkrupo |
@js0701 I agree that it is working correctly. It works for me too without any waits. But we shouldn't assume about the type of the connector/sink. We must wait for the mandated time. If not here then it should be done at the daemon. |
} | ||
|
||
if ((current_protection_support_ && val == HWCContentProtection::kEnabled) || | ||
(!current_protection_support_ && val == HWCContentProtection::kDesired)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when and how the status will change from kDesired to kEnabled? Is it possible in the sleep time frame it is already changed to kEnabled, you can not get the kDesired state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, could you please explain more about the sleep time frame?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean in the SetHDCPState() there is 'usleep(100 * 1000);' for every iteration. is it possible in this time frame, the state changes from kUnDisired->kDesired->kEnabled? for such case, your logic in Check state will not return true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a question regarding this changes. Although spec mentioned that it needs 5.1 sec for the aunthencation process, have this changes been validated against HDCP Compliance test?
I would rather have the KMD able to pass the compliance test before we could have hwcomposer changes in.
@kromli |
} | ||
|
||
drmModeConnectorSetProperty(gpu_fd_, connector_, hdcp_id_prop_, value); | ||
ETRACE("Ignored Content type. \n"); | ||
/* Wait for Enable should be 5.1 Sec * 3(kernel reattempt cnt) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possible to wait up to 15s blocking hwc service such long time seems not acceptable. I would suggest not blocking in hwc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, agreed. This should be done by the hdcp daemon. I had previously raised it as a concern.
Once the daemon does it, We can remove this here.
No description provided.