diff options
author | jilai wang <jilaiw@codeaurora.org> | 2015-04-10 16:15:59 -0400 |
---|---|---|
committer | Kumar Gala <galak@codeaurora.org> | 2015-05-28 10:47:45 -0500 |
commit | 9626b6993b2e6faf047d2d96958e8474edc9c7a5 (patch) | |
tree | 1d6522df22f58a37088f1942460b8779cebe2d2e /drivers/firmware/qcom_scm.c | |
parent | b6a1dfbc7d57409accf213e78db7b059c206be9e (diff) | |
download | linux-stable-9626b6993b2e6faf047d2d96958e8474edc9c7a5.tar.gz linux-stable-9626b6993b2e6faf047d2d96958e8474edc9c7a5.tar.bz2 linux-stable-9626b6993b2e6faf047d2d96958e8474edc9c7a5.zip |
firmware: qcom: scm: Add HDCP Support
HDCP driver needs to check if secure environment supports HDCP. If it's
supported, then it requires to program some registers through SCM.
Add qcom_scm_hdcp_available and qcom_scm_hdcp_req to support these
requirements.
Signed-off-by: Jilai Wang <jilaiw@codeaurora.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
Diffstat (limited to 'drivers/firmware/qcom_scm.c')
-rw-r--r-- | drivers/firmware/qcom_scm.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index 99892415299b..45c008d68891 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, Code Aurora Forum. All rights reserved. +/* Copyright (c) 2010,2015, The Linux Foundation. All rights reserved. * Copyright (C) 2015 Linaro Ltd. * * This program is free software; you can redistribute it and/or modify @@ -64,3 +64,33 @@ void qcom_scm_cpu_power_down(u32 flags) __qcom_scm_cpu_power_down(flags); } EXPORT_SYMBOL(qcom_scm_cpu_power_down); + +/** + * qcom_scm_hdcp_available() - Check if secure environment supports HDCP. + * + * Return true if HDCP is supported, false if not. + */ +bool qcom_scm_hdcp_available(void) +{ + int ret; + + ret = __qcom_scm_is_call_available(QCOM_SCM_SVC_HDCP, + QCOM_SCM_CMD_HDCP); + + return (ret > 0) ? true : false; +} +EXPORT_SYMBOL(qcom_scm_hdcp_available); + +/** + * qcom_scm_hdcp_req() - Send HDCP request. + * @req: HDCP request array + * @req_cnt: HDCP request array count + * @resp: response buffer passed to SCM + * + * Write HDCP register(s) through SCM. + */ +int qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt, u32 *resp) +{ + return __qcom_scm_hdcp_req(req, req_cnt, resp); +} +EXPORT_SYMBOL(qcom_scm_hdcp_req); |