From: Ramalingam C <ramalingam.c@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: daniel.vetter@intel.com, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [RFC v1 01/20] drm/hdcp: HDCP bitmask property for connectors
Date: Wed, 12 Jul 2017 20:26:02 +0530 [thread overview]
Message-ID: <cf62bda2-72d7-bdbc-d1b1-709b3c6d0fa6@intel.com> (raw)
In-Reply-To: <20170712095444.7x6msswrmrfvkas6@phenom.ffwll.local>
[-- Attachment #1.1: Type: text/plain, Size: 9264 bytes --]
Daniel,
Thank you for reviewing the patch in short time. My views are below.
On Wednesday 12 July 2017 03:24 PM, Daniel Vetter wrote:
> On Wed, Jul 12, 2017 at 01:58:45PM +0530, Ramalingam C wrote:
>> DRM connector property is created as bitmask to receive
>> HDCP enable/disable request along with content type.
>>
>> And also there are Read only status bits for
>> 1. HDCP spec capability of the connector + panel
>> 2. HDCP encryption status of the connector
>>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> ---
>> drivers/gpu/drm/drm_connector.c | 30 +++++++++++++++++++++
>> include/drm/drm_hdcp.h | 58 +++++++++++++++++++++++++++++++++++++++++
>> include/drm/drm_mode_config.h | 5 ++++
>> 3 files changed, 93 insertions(+)
>> create mode 100644 include/drm/drm_hdcp.h
>>
>> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
>> index 8072e6e..04f8cf8 100644
>> --- a/drivers/gpu/drm/drm_connector.c
>> +++ b/drivers/gpu/drm/drm_connector.c
>> @@ -24,6 +24,7 @@
>> #include <drm/drm_connector.h>
>> #include <drm/drm_edid.h>
>> #include <drm/drm_encoder.h>
>> +#include <drm/drm_hdcp.h>
>>
>> #include "drm_crtc_internal.h"
>> #include "drm_internal.h"
>> @@ -617,6 +618,28 @@ static const struct drm_prop_enum_list drm_link_status_enum_list[] = {
>> };
>> DRM_ENUM_NAME_FN(drm_get_link_status_name, drm_link_status_enum_list)
>>
>> +static const struct drm_prop_enum_list drm_hdcp_enum_list[] = {
>> + { __builtin_ffs(DRM_HDCP_ENABLE) - 1,
>> + "Enable HDCP Encryption" },
>> + { __builtin_ffs(DRM_HDCP_TYPE_BIT0) - 1,
>> + "HDCP Content type bit0" },
>> + { __builtin_ffs(DRM_HDCP_TYPE_BIT1) - 1,
>> + "HDCP Content type bit1" },
>> + { __builtin_ffs(DRM_HDCP1_SUPPORTED) - 1,
>> + "HDCP1.x Supported" },
>> + { __builtin_ffs(DRM_HDCP2_SUPPORTED) - 1,
>> + "HDCP2.x Supported" },
>> + { __builtin_ffs(DRM_HDCP_WIP) - 1,
>> + "HDCP work in progress" },
>> + { __builtin_ffs(DRM_HDCP_AUTH_FAILED) - 1,
>> + "HDCP Authentication Failed" },
>> + { __builtin_ffs(DRM_HDCP_LINK_INTEGRITY_FAILED) - 1,
>> + "HDCP Link Integrity Failed" },
>> + { __builtin_ffs(DRM_HDCP_REAUTH_REQUESTED) - 1,
>> + "HDCP Reauthentication Requested" },
> Why all these intermediate steps and different failure modes? Either hdcp
> works, or it doesnt (and we can split up with the type 0 or type 1 if
> needed), but I don't know what userspace would do with all the other
> stuff?
enum values HDCP_ENABLE, HDCP_ENABLE_TYPE1 and HDCP_DISABLE along with
kobj-uevent
for HDCP state change, could do the bare minimal HDCP1.4 and HDCP2.2
configuration.
And without Type info it is not possible for HDCP2.2.
But to inform whether both HDCP source and Sink support HDCP1.4/2.2/None
I wanted to add
the capability bits. These capability flags could be avoided if the
presence of the drm_hdcp_property
on connector, assures the corresponding HDCP version support on both
HDCP src and sink.
But for that we need a way to detach/alter the DRM_property of connector
based on HDCP
sink's hdcp version capability. Need to explore on that direction if
that is allowed.
Once HDCP protection is enabled link protection might break for many
reasons including hot unplug. So Other Error
flags are just to give more information to UMD on that scenario. But we
can avoid them by setting the state
as HDCP_DISABLE and notifying the UMD through Kobj-uevent for HDCP state
change.
But one concern remains un-addressed that is compliance requirement will
force us to reauthenticate
in case of failures in authentication or on HDCP enabled link. In that
scenario UMD has to be in formed that
reauth is in progress. If UMD wants the port to be reenabled it has to
wait for the completion of reauth else
it has to place request for disabling the HDCP on port. We might want to
add a enum value as HDCP_DISABLE_REAUTH.
What is your opinion on this?
>
> This also doesn't seem to do the lockdown mode to force hdcp mode. And
> afair it also doesn't match what CrOS currently uses, which means we don't
> have userspace for this.
AFAIK, Either way we don't have userspace for HDCP2.2 at present, as
CrOS interface is designed for
HDCP1.4(Need to cross check this with sean). But I will check with
seanpaul if there is any plan for extending it for HDCP2.2 too.
If so we could enable CrOS as consumer for HDCP2.2 against planned open
source consumer from my side.
As discussed in cover letter I am starting on a UMD library
which will be open sourced as a HDCP1.4 and 2.2 service provider for
chromebox stack and Android.
>
> I think the best approach would be if we simply try to upstream _exactly_
> the property CrOS currently uses (not even bothering with type 0 vs type 1
> if that's not required), since that is the currently only open source
> userspace that asks for this.
At first stage, as we are developing the HDCP2.2 support at DRM at first
than HDCP1.4,
we need to extend CrOS property for HDCP2.2 and then upstream. That will
be the fruitful solution for us.
--Ram
> Going with a much more complicated or
> different interface just because only risks a massive discussion and
> subsequent long delays.
> -Daniel
>
>> +};
>> +DRM_ENUM_NAME_FN(drm_get_hdcp_name, drm_hdcp_enum_list)
>> +
>> /**
>> * drm_display_info_set_bus_formats - set the supported bus formats
>> * @info: display info to store bus formats in
>> @@ -789,6 +812,13 @@ int drm_connector_create_standard_properties(struct drm_device *dev)
>> return -ENOMEM;
>> dev->mode_config.link_status_property = prop;
>>
>> + prop = drm_property_create_bitmask(dev, 0, "hdcp", drm_hdcp_enum_list,
>> + ARRAY_SIZE(drm_hdcp_enum_list),
>> + DRM_HDCP_PROP_SUPPORTED_BITS);
>> + if (!prop)
>> + return -ENOMEM;
>> + dev->mode_config.hdcp_property = prop;
>> +
>> return 0;
>> }
>>
>> diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h
>> new file mode 100644
>> index 0000000..7cebf0f
>> --- /dev/null
>> +++ b/include/drm/drm_hdcp.h
>> @@ -0,0 +1,58 @@
>> +/*
>> + * Copyright (c) 2017 Intel Corporation
>> + *
>> + * Permission to use, copy, modify, distribute, and sell this software and its
>> + * documentation for any purpose is hereby granted without fee, provided that
>> + * the above copyright notice appear in all copies and that both that copyright
>> + * notice and this permission notice appear in supporting documentation, and
>> + * that the name of the copyright holders not be used in advertising or
>> + * publicity pertaining to distribution of the software without specific,
>> + * written prior permission. The copyright holders make no representations
>> + * about the suitability of this software for any purpose. It is provided "as
>> + * is" without express or implied warranty.
>> + *
>> + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
>> + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
>> + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
>> + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
>> + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
>> + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
>> + * OF THIS SOFTWARE.
>> + */
>> +
>> +/*
>> + * Header for HDCP specific data
>> + */
>> +
>> +#ifndef __DRM_HDCP_H__
>> +#define __DRM_HDCP_H__
>> +
>> +/**
>> + * HDCP property related information
>> + */
>> +/* RW: HDCP Encryption Requests and Status bits */
>> +#define DRM_HDCP_ENABLE BIT(0)
>> +#define DRM_HDCP_TYPE_BIT0 BIT(4)
>> +#define DRM_HDCP_TYPE_BIT1 BIT(5)
>> +
>> +/* RO: HDCP Version supported on Platform + panel */
>> +#define DRM_HDCP1_SUPPORTED BIT(12)
>> +#define DRM_HDCP2_SUPPORTED BIT(13)
>> +
>> +/* RO: Status of the requested operations */
>> +#define DRM_HDCP_WIP BIT(20)
>> +#define DRM_HDCP_AUTH_FAILED BIT(21)
>> +
>> +/* RO: Error Status From HDCP sink */
>> +#define DRM_HDCP_LINK_INTEGRITY_FAILED BIT(22)
>> +#define DRM_HDCP_REAUTH_REQUESTED BIT(23)
>> +
>> +#define DRM_HDCP_PROP_SUPPORTED_BITS (DRM_HDCP_ENABLE | DRM_HDCP_TYPE_BIT0 \
>> + | DRM_HDCP_TYPE_BIT1 | \
>> + DRM_HDCP1_SUPPORTED | \
>> + DRM_HDCP2_SUPPORTED | DRM_HDCP_WIP | \
>> + DRM_HDCP_AUTH_FAILED | \
>> + DRM_HDCP_LINK_INTEGRITY_FAILED | \
>> + DRM_HDCP_REAUTH_REQUESTED)
>> +
>> +#endif /* __DRM_HDCP_H__ */
>> diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
>> index 4298171..0c5bb90 100644
>> --- a/include/drm/drm_mode_config.h
>> +++ b/include/drm/drm_mode_config.h
>> @@ -538,6 +538,11 @@ struct drm_mode_config {
>> */
>> struct drm_property *link_status_property;
>> /**
>> + * @hdcp_property: Default connector property for HDCP
>> + * of a connector
>> + */
>> + struct drm_property *hdcp_property;
>> + /**
>> * @plane_type_property: Default plane property to differentiate
>> * CURSOR, PRIMARY and OVERLAY legacy uses of planes.
>> */
>> --
>> 2.7.4
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
[-- Attachment #1.2: Type: text/html, Size: 10523 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-07-12 14:56 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 8:28 [RFC v1 00/20] DRM Interfaces for HDCP support Ramalingam C
2017-07-12 8:28 ` [RFC v1 01/20] drm/hdcp: HDCP bitmask property for connectors Ramalingam C
2017-07-12 9:54 ` Daniel Vetter
2017-07-12 14:56 ` Ramalingam C [this message]
2017-07-12 19:10 ` [Intel-gfx] " Sean Paul
2017-07-13 6:09 ` Daniel Vetter
2017-07-13 6:54 ` Ramalingam C
2017-07-13 8:45 ` Daniel Vetter
2017-07-13 10:15 ` [Intel-gfx] " Ramalingam C
2017-07-13 10:36 ` Daniel Vetter
2017-07-13 12:59 ` Ramalingam C
2017-07-13 19:02 ` [Intel-gfx] " Daniel Vetter
2017-07-14 10:40 ` Ramalingam C
2017-07-14 11:21 ` [RFC v2] drm/hdcp: drm enum property for HDCP State Ramalingam C
2017-07-14 13:55 ` Sean Paul
2017-07-21 13:02 ` Ramalingam C
2017-07-24 13:23 ` Sean Paul
2017-07-24 13:34 ` Ramalingam C
2017-07-24 18:12 ` [RFC v3] drm/hdcp: drm enum property for CP State Ramalingam C
2017-07-25 12:34 ` Sean Paul
2017-07-26 9:54 ` Ramalingam C
2017-07-26 14:52 ` Sean Paul
2017-07-26 16:51 ` C, Ramalingam
2017-07-26 17:54 ` Sean Paul
2017-08-02 15:32 ` Ramalingam C
2017-08-02 15:53 ` [RFC v4] " Ramalingam C
2017-08-05 15:51 ` Ramalingam C
2017-08-07 5:32 ` Ramalingam C
2017-07-13 6:36 ` [Intel-gfx] [RFC v1 01/20] drm/hdcp: HDCP bitmask property for connectors Ramalingam C
2017-07-12 8:28 ` [RFC v1 02/20] drm/hdcp: HDCP SRM blob " Ramalingam C
2017-07-12 8:28 ` [RFC v1 03/20] drm/sysfs: Generate drm uevent with custom string Ramalingam C
2017-07-12 8:28 ` [RFC v1 04/20] drm/hdcp: Struct drm_hdcp for connector's hdcp state Ramalingam C
2017-07-12 8:28 ` [RFC v1 05/20] drm/hdcp: HDCP status code for DRM HDCP stack Ramalingam C
2017-07-12 8:28 ` [RFC v1 06/20] drm/hdcp: display driver callback funcs defined Ramalingam C
2017-07-12 8:28 ` [RFC v1 07/20] drm/hdcp: Initialization of DRM hdcp stack Ramalingam C
2017-07-12 8:28 ` [RFC v1 08/20] drm/hdcp: Add KBuild for DRM HDCP support Ramalingam C
2017-07-12 8:28 ` [RFC v1 09/20] drm/hdcp: Generic enable, disable and late_init Ramalingam C
2017-07-12 8:28 ` [RFC v1 10/20] drm/hdcp: Handler for connector state change Ramalingam C
2017-07-12 8:28 ` [RFC v1 11/20] drm/hdcp: Registering " Ramalingam C
2017-07-12 8:28 ` [RFC v1 12/20] drm/hdcp: Atomic set and get property for hdcp Ramalingam C
2017-07-12 8:28 ` [RFC v1 13/20] drm/hdcp: Updating DRM Property val with HDCP state Ramalingam C
2017-07-12 8:28 ` [RFC v1 14/20] drm/hdcp2.2: HDCP2.2 protocol msg definitions Ramalingam C
2017-07-12 8:28 ` [RFC v1 15/20] drm/hdcp2.2: Display driver service functions Ramalingam C
2017-07-12 8:29 ` [RFC v1 16/20] drm/hdcp2.2: HDCP2.2 Initialization Ramalingam C
2017-07-12 8:29 ` [RFC v1 17/20] drm/hdcp2.2: Definitions of HDMI HDCP2.2 registers Ramalingam C
2017-07-12 8:29 ` [RFC v1 18/20] drm/hdcp2.2: Late_init: Capability probing on panel Ramalingam C
2017-07-12 8:29 ` [RFC v1 19/20] drm/hdcp2.2: HDCP2.2 enable as a asynchronous work Ramalingam C
2017-07-12 8:29 ` [RFC v1 20/20] drm/hdcp2.2: HDCP2.2 disable " Ramalingam C
2017-07-12 8:35 ` ✗ Fi.CI.BAT: failure for DRM Interfaces for HDCP support Patchwork
2017-07-14 11:26 ` ✗ Fi.CI.BAT: failure for DRM Interfaces for HDCP support (rev2) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf62bda2-72d7-bdbc-d1b1-709b3c6d0fa6@intel.com \
--to=ramalingam.c@intel.com \
--cc=daniel.vetter@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox