[Intel-gfx] [PATCH v2 04/42] misc/mei/hdcp: Client driver for HDCP application

Ramalingam C ramalingam.c at intel.com
Mon Mar 12 10:58:13 UTC 2018


Thanks for review Tomas.


On Thursday 08 March 2018 06:37 PM, Winkler, Tomas wrote:
>> Subject: [PATCH v2 04/42] misc/mei/hdcp: Client driver for HDCP application
> I prefer this will be squashed together with [PATCH v2 05/42] misc/mei/hdcp: Add KBuild for mei hdcp driver
> so it can be compiled.
Ok, I will squash.
>
>> ME FW is contributes a vital role in HDCP2.2 authentication.
>> HDCP2.2 driver needs to communicate to ME FW for each step of the
>> HDCP2.2 authentication.
>>
>> ME FW prepare and HDCP2.2 authentication  parameters and encrypt them
>> as per spec. With such parameter Driver prepares HDCP2.2 auth messages
>> and communicate with HDCP2.2 sink.
>>
>> Similarly HDCP2. sink's response is shared with ME FW for decrypt and
>> verification.
>>
>> Once All the steps of HDCP2.2 authentications are complete on driver's
>> request ME FW will configure the port as authenticated and supply the HDCP
>> keys to the Gen HW for encryption.
>>
>> Only after this stage HDCP2.2 driver can start the HDCP2.2 encryption for a
>> port.
>>
>> ME FW is interfaced to kernel through MEI Bus Driver. To obtain the
>> HDCP2.2 services from the ME FW through MEI Bus driver MEI Client Driver is
>> developed.
>>
>> v2:
>>    hdcp files are moved to drivers/misc/mei/hdcp/ [Tomas]
>>
>> Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
>> Signed-off-by: Tomas Winkler <tomas.winkler at intel.com>
>> ---
>>   drivers/misc/mei/hdcp/mei_hdcp.c | 80
>> ++++++++++++++++++++++++++++++++++++++++
>>   drivers/misc/mei/hdcp/mei_hdcp.h | 32 ++++++++++++++++
>>   2 files changed, 112 insertions(+)
>>   create mode 100644 drivers/misc/mei/hdcp/mei_hdcp.c  create mode
>> 100644 drivers/misc/mei/hdcp/mei_hdcp.h
>>
>> diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c
>> b/drivers/misc/mei/hdcp/mei_hdcp.c
>> new file mode 100644
>> index 000000000000..aa211763e520
>> --- /dev/null
>> +++ b/drivers/misc/mei/hdcp/mei_hdcp.c
>> @@ -0,0 +1,80 @@
>> +/*
>> + * Copyright © 2017 Intel Corporation
> Please use SPDX notation, for HECI devices we force dual license
>
> /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
> /*
>   * Copyright © 2017-2018 Intel Corporation
>   */
>
Sure
>> + *
>> + * Mei_hdcp.c: client driver for mei bus driver
>> + *
>> + * Permission is hereby granted, free of charge, to any person
>> +obtaining a
>> + * copy of this software and associated documentation files (the
>> +"Software"),
>> + * to deal in the Software without restriction, including without
>> +limitation
>> + * the rights to use, copy, modify, merge, publish, distribute,
>> +sublicense,
>> + * and/or sell copies of the Software, and to permit persons to whom
>> +the
>> + * Software is furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice (including the
>> +next
>> + * paragraph) shall be included in all copies or substantial portions
>> +of the
>> + * Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> +EXPRESS OR
>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
>> +MERCHANTABILITY,
>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO
>> EVENT
>> +SHALL
>> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
>> DAMAGES OR
>> +OTHER
>> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
>> +ARISING
>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> OTHER
>> + * DEALINGS IN THE SOFTWARE.
>> + *
>> + * Authors:
>> + *	Ramalingam C <ramalingam.c at intel.com>
>> + */
>> +
>> +#include <linux/module.h>
>> +#include <linux/slab.h>
>> +#include <linux/uuid.h>
>> +
>> +#include "mei_hdcp.h"
>> +
>> +struct mei_hdcp mei_hdcp;
>> +
>> +static int mei_hdcp_probe(struct mei_cl_device *cldev,
>> +			  const struct mei_cl_device_id *id) {
>> +	int ret;
>> +
>> +	mei_hdcp.cldev = cldev;
>> +	mei_cldev_set_drvdata(cldev, &mei_hdcp);
>> +
>> +	ret = mei_cldev_enable(cldev);
>> +	if (ret < 0)
>> +		dev_err(&cldev->dev, "mei_cldev_enable Failed. %d\n", ret);
>> +
>> +	return ret;
>> +}
>> +
>> +static int mei_hdcp_remove(struct mei_cl_device *cldev) {
> mei_cldev_set_drvdata(cldev, NULL);
ok
>
>> +	mei_cldev_disable(cldev);
> return mei_cldev_disable(cldev);
>
>> +	return 0;
>> +}
>> +
>> +#define WIDI_HECI_CLIENT_GUID	UUID_LE(0xB638AB7E, 0x94E2,
>> 0x4EA2, 0xA5, \
>> +					0x52, 0xD1, 0xC5, 0x4B, \
>> +					0x62, 0x7F, 0x04)
>> +#define MEI_HDCP2_2_UUID	WIDI_HECI_CLIENT_GUID
>
> Please use the same string as defined in whitelist patch
>
>> +
>> +static struct mei_cl_device_id mei_hdcp_tbl[] = {
>> +	{ .uuid = MEI_HDCP2_2_UUID, .version = MEI_CL_VERSION_ANY },
>> +	{ }
>> +};
>> +MODULE_DEVICE_TABLE(mei, mei_hdcp_tbl);
>> +
>> +static struct mei_cl_driver mei_hdcp_driver = {
>> +	.id_table	= mei_hdcp_tbl,
>> +	.name		= KBUILD_MODNAME,
>> +	.probe		= mei_hdcp_probe,
>> +	.remove		= mei_hdcp_remove,
>> +};
>> +
>> +module_mei_cl_driver(mei_hdcp_driver);
>> +
>> +MODULE_AUTHOR("Intel Corporation");
>> +MODULE_LICENSE("GPL");
>
> Dual License

MODULE_LICENSE("GPL-2.0+ OR BSD-3-Clause");

Will this work?

>
>> +MODULE_DESCRIPTION("HDCP");
>> diff --git a/drivers/misc/mei/hdcp/mei_hdcp.h
>> b/drivers/misc/mei/hdcp/mei_hdcp.h
>> new file mode 100644
>> index 000000000000..c06c0d767c4f
>> --- /dev/null
>> +++ b/drivers/misc/mei/hdcp/mei_hdcp.h
>> @@ -0,0 +1,32 @@
>> +/*
>> + * Copyright (c) 2017 Intel Corporation
> Please use SPDX notation, for HECI devices we force dual license
>
> /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
> /*
>   * Copyright © 2017-2018 Intel Corporation
>
>> + * Permission is hereby granted, free of charge, to any person
>> +obtaining a
>> + * copy of this software and associated documentation files (the
>> +"Software"),
>> + * to deal in the Software without restriction, including without
>> +limitation
>> + * the rights to use, copy, modify, merge, publish, distribute,
>> +sublicense,
>> + * and/or sell copies of the Software, and to permit persons to whom
>> +the
>> + * Software is furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice (including the
>> +next
>> + * paragraph) shall be included in all copies or substantial portions
>> +of the
>> + * Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> +EXPRESS OR
>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
>> +MERCHANTABILITY,
>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO
>> EVENT
>> +SHALL
>> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
>> DAMAGES OR
>> +OTHER
>> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
>> +ARISING
>> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> OTHER
>> +DEALINGS
>> + * IN THE SOFTWARE.
>> + */
>> +#ifndef __MEI_HDCP_H__
>> +#define __MEI_HDCP_H__
>> +
>> +#include <linux/mei_cl_bus.h>
>> +
>> +struct mei_hdcp {
>
> mei_hdcp_device  - this structure represent a device
will rename it.

--Ram
>
>> +	struct mei_cl_device *cldev;
>> +};
>> +
>> +#endif /* __MEI_HDCP_H__ */
>> --
>> 2.7.4



More information about the Intel-gfx mailing list