Re: [PATCH v2 06/42] misc/mei/hdcp: Verify mei client device status

2018-03-12 Thread Ramalingam C



On Thursday 08 March 2018 06:38 PM, Winkler, Tomas wrote:

v2:
   Rebased.

Signed-off-by: Ramalingam C 
---
  drivers/misc/mei/hdcp/mei_hdcp.c | 12 
  1 file changed, 12 insertions(+)

diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c
b/drivers/misc/mei/hdcp/mei_hdcp.c
index aa211763e520..25df7034cfb4 100644
--- a/drivers/misc/mei/hdcp/mei_hdcp.c
+++ b/drivers/misc/mei/hdcp/mei_hdcp.c
@@ -34,6 +34,18 @@

  struct mei_hdcp mei_hdcp;

+/**
+ * mei_cldev_active_and_enabled:
+ * Return: true if me client for HDCP is initialized and connected
+ */
+static inline bool mei_cldev_active_and_enabled(struct mei_cl_device
+*cldev) {
+   if (!cldev)
+   return false;
+
+   return mei_cldev_enabled(cldev);
+}


I think this is a useless wrapper, if you needed it there is something wrong 
with your code.

Please drop this patch, if needed open code it.
Ok. Was validating the handle and device status before forwarding any 
request from the I915 to MEI Bus.
As never hit this scenario till now, will drop this at present if needed 
will bring it back as open code. Thanks.


--Ram


Tomas




___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


RE: [PATCH v2 06/42] misc/mei/hdcp: Verify mei client device status

2018-03-08 Thread Winkler, Tomas
> 
> v2:
>   Rebased.
> 
> Signed-off-by: Ramalingam C 
> ---
>  drivers/misc/mei/hdcp/mei_hdcp.c | 12 
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c
> b/drivers/misc/mei/hdcp/mei_hdcp.c
> index aa211763e520..25df7034cfb4 100644
> --- a/drivers/misc/mei/hdcp/mei_hdcp.c
> +++ b/drivers/misc/mei/hdcp/mei_hdcp.c
> @@ -34,6 +34,18 @@
> 
>  struct mei_hdcp mei_hdcp;
> 
> +/**
> + * mei_cldev_active_and_enabled:
> + *   Return: true if me client for HDCP is initialized and connected
> + */
> +static inline bool mei_cldev_active_and_enabled(struct mei_cl_device
> +*cldev) {
> + if (!cldev)
> + return false;
> +
> + return mei_cldev_enabled(cldev);
> +}
>
I think this is a useless wrapper, if you needed it there is something wrong 
with your code.

Please drop this patch, if needed open code it.

Tomas


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 06/42] misc/mei/hdcp: Verify mei client device status

2018-03-08 Thread Ramalingam C
Checks whether mei client device for hdcp2.2 is enabled?

v2:
  Rebased.

Signed-off-by: Ramalingam C 
---
 drivers/misc/mei/hdcp/mei_hdcp.c | 12 
 1 file changed, 12 insertions(+)

diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c
index aa211763e520..25df7034cfb4 100644
--- a/drivers/misc/mei/hdcp/mei_hdcp.c
+++ b/drivers/misc/mei/hdcp/mei_hdcp.c
@@ -34,6 +34,18 @@
 
 struct mei_hdcp mei_hdcp;
 
+/**
+ * mei_cldev_active_and_enabled:
+ * Return: true if me client for HDCP is initialized and connected
+ */
+static inline bool mei_cldev_active_and_enabled(struct mei_cl_device *cldev)
+{
+   if (!cldev)
+   return false;
+
+   return mei_cldev_enabled(cldev);
+}
+
 static int mei_hdcp_probe(struct mei_cl_device *cldev,
  const struct mei_cl_device_id *id)
 {
-- 
2.7.4

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel