nvhdcp: return v_prime in get_nvhdcp_state ioctl.
Marvin Zhang [Fri, 1 Mar 2013 18:30:38 +0000 (10:30 -0800)]
hdcp upstream library needs to get v_prime from kernel and pass
it to tsec to do v_prime verification.

Bug 1197884

Change-Id: I9a6783e115751426bcbb97feaba999812091aa90
Reviewed-on: http://git-master/r/205639
(cherry picked from commit 932c91861cb5f71a52cdc6a62cd22648c86653cc)
Signed-off-by: Marvin Zhang <mzhang@nvidia.com>
Reviewed-on: http://git-master/r/205632
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

drivers/video/tegra/dc/nvhdcp.c

index 08a17f6..fbdb089 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * drivers/video/tegra/dc/nvhdcp.c
  *
- * Copyright (c) 2010-2012, NVIDIA CORPORATION, All rights reserved.
+ * Copyright (c) 2010-2013, NVIDIA CORPORATION, All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -483,6 +483,8 @@ static int get_nvhdcp_state(struct tegra_nvhdcp *nvhdcp,
                pkt->num_bksv_list = nvhdcp->num_bksv_list;
                for (i = 0; i < pkt->num_bksv_list; i++)
                        pkt->bksv_list[i] = nvhdcp->bksv_list[i];
+               pkt->b_status = nvhdcp->b_status;
+               memcpy(pkt->v_prime, nvhdcp->v_prime, sizeof(nvhdcp->v_prime));
                pkt->packet_results = TEGRA_NVHDCP_RESULT_SUCCESS;
        }
        mutex_unlock(&nvhdcp->lock);