From patchwork Wed Jul 12 08:28:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramalingam C X-Patchwork-Id: 9836241 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2947F60363 for ; Wed, 12 Jul 2017 08:29:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18D7B1FF2D for ; Wed, 12 Jul 2017 08:29:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B18E284FF; Wed, 12 Jul 2017 08:29:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BEEF51FF2D for ; Wed, 12 Jul 2017 08:29:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE7776E39A; Wed, 12 Jul 2017 08:29:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 02B186E394; Wed, 12 Jul 2017 08:29:29 +0000 (UTC) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2017 01:29:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,349,1496127600"; d="scan'208";a="126135009" Received: from mint-dev.iind.intel.com ([10.223.25.164]) by fmsmga006.fm.intel.com with ESMTP; 12 Jul 2017 01:29:27 -0700 From: Ramalingam C To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, daniel.vetter@intel.com Subject: [RFC v1 04/20] drm/hdcp: Struct drm_hdcp for connector's hdcp state Date: Wed, 12 Jul 2017 13:58:48 +0530 Message-Id: <1499848144-8456-5-git-send-email-ramalingam.c@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499848144-8456-1-git-send-email-ramalingam.c@intel.com> References: <1499848144-8456-1-git-send-email-ramalingam.c@intel.com> Cc: Ramalingam C , uma.shankar@intel.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Structure drm_hdcp is defined to represent the HDCP state of the connector. drm_connector will have a pointer to an instance of this structure. This will be used to hold all specification related information along with state machine parameters. Signed-off-by: Ramalingam C --- include/drm/drm_connector.h | 5 +++++ include/drm/drm_hdcp.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index ae5b7dc..45911db 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -867,6 +868,10 @@ struct drm_connector { */ struct drm_connector_state *state; + /* HDCP representation on the connector */ + struct drm_hdcp *hdcp; + uint64_t hdcp_state; + /* DisplayID bits */ bool has_tile; struct drm_tile_group *tile_group; diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h index 7cebf0f..92fd933 100644 --- a/include/drm/drm_hdcp.h +++ b/include/drm/drm_hdcp.h @@ -27,6 +27,45 @@ #ifndef __DRM_HDCP_H__ #define __DRM_HDCP_H__ +struct drm_connector; + +/** + * HDCP Software stack specific + */ +/* Bit mask for HDCP spec ver support */ +#define HDCP_1_4_SUPPORT (1<<0) +#define HDCP_2_2_SUPPORT (1<<1) + +/** + * wired_protocol: Supported integrated wired HDCP protocol. + * Based on this value, Minor differenceneeded between wired specifications + * are handled. + */ +enum wired_protocol { + WIRED_PROTOCOL_INVALID, + WIRED_PROTOCOL_HDMI, + WIRED_PROTOCOL_DP +}; + +/** + * Struct drm_hdcp - central drm hdcp control structure + */ +struct drm_hdcp { + struct drm_connector *connector; + + /* HDCP Specifications support flag */ + uint32_t ver_support_on_plat; + uint32_t ver_support_on_panel; + + /* HDCP requested state and also the current state */ + uint64_t req_state; + + /* HDMI/DP Protocol */ + enum wired_protocol protocol; + + struct mutex mutex; +}; + /** * HDCP property related information */