From: Eunchul Kim Subject: [RFC] added hdcp driver in hdmi Date: Fri, 21 Dec 2012 18:47:56 +0900 Message-ID: <1356083277-11676-1-git-send-email-chulspro.kim@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B2F3E60CF for ; Fri, 21 Dec 2012 01:47:38 -0800 (PST) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MFD00L14KCOPL40@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 21 Dec 2012 18:47:36 +0900 (KST) Received: from localhost.localdomain ([10.90.54.32]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MFD002QCKJ97360@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 21 Dec 2012 18:47:36 +0900 (KST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Cc: jy0.jeon@samsung.com, sw0312.kim@samsung.com, jaejoon.seo@samsung.com, kyungmin.park@samsung.com, jmock.shin@samsung.com, lsmin.lee@samsung.com, th908.kim@samsung.com List-Id: dri-devel@lists.freedesktop.org Hi All. This patch supports HDCP feature in Exynos DRM HDMI. We enhaced feature of HDCP for content protection. please check my commit and If you have any opinion of this patch. please give comment to me. HDCP stands for High-bandwidth Digital Content Protection. contains an integrated HDCP encryption engine for video/audio content protection. supports version HDCP v1.1. Exynos supports embedded HDCP key system. The HDCP key value is fused during fabrication, based on customer's request. First part authentication protocol. The HDCP transmitter(Device A) can initiate authentication at any time. Authentication is initiated by the HDCP transmitter by sending an An, Aksv. An(64-bit psedo-random value), Aksv(Transmitter Key Selection Vector). The HDCP Receiver(Device B) generates Rj. The HDCP Receiver responds by sending a response message Bksv. Bksv(Receiver Key Selection Vector). If authentication was successfull, then Ri will be equal to Rj. Second part authentication protocol. The second part of the authentication protocol is required if the HDCP receiver is an HDCP repeater. The HDCP transmitter executes the second part of the protocol only when the REPEATER bit is set, indicating that the attached HDCP receiver is an HDCP repeater. This part of the protocol assembles a list of all downstream KSVs attached to the HDCP repeater through a permitted connection tree, enabling revocation support upstream. Third part authentication protocol. The third part of the authentication protocol occurs during the vertical blanking interval preceding the frame for which it applies. Each of the two HDCP devices calculates new cipher initialization values, Ki and Mi, and a third value Ri. and asynchronous polling every 2 seconds. Exynos scenario. 1. start encryption. 2. receive Bcaps, Bksv from peer device. 3. check repeater caps from Bcaps. 4. send An, Aksv to peer device. 5. receive Rj from peer device. 6. compare Ri, Rj. If same and not repeater, then start encryption. 7. If not same, retry. If repeater, then start second authentication. 8. stop encryption. Thank's BR Eunchul Kim Eunchul Kim (1): drm/exynos: added hdcp driver for contents protection. drivers/gpu/drm/exynos/Kconfig | 6 + drivers/gpu/drm/exynos/Makefile | 1 + drivers/gpu/drm/exynos/exynos_drm_drv.c | 12 + drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + drivers/gpu/drm/exynos/exynos_hdcp.c | 1164 +++++++++++++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_hdcp.h | 47 ++ drivers/gpu/drm/exynos/exynos_hdmi.c | 11 + drivers/gpu/drm/exynos/exynos_hdmi.h | 7 + drivers/gpu/drm/exynos/regs-hdmi.h | 177 +++++ 9 files changed, 1426 insertions(+), 0 deletions(-) create mode 100644 drivers/gpu/drm/exynos/exynos_hdcp.c create mode 100644 drivers/gpu/drm/exynos/exynos_hdcp.h