Re: [PATCH v8 12/35] drm/i915: Implement the HDCP2.2 support for DP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 27, 2018 at 04:54:15PM +0000, Bloomfield, Jon wrote:
> I'm not formally reviewing this series, but while glancing at it, I noticed....
> 
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of
> > Ramalingam C
> > Sent: Tuesday, November 27, 2018 2:43 AM
> > To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; dri-devel@xxxxxxxxxxxxxxxxxxxxx;
> > daniel.vetter@xxxxxxxx; Winkler, Tomas <tomas.winkler@xxxxxxxxx>
> > Subject:  [PATCH v8 12/35] drm/i915: Implement the HDCP2.2
> > support for DP
> > 
> > Implements the DP adaptation specific HDCP2.2 functions.
> > 
> > These functions perform the DPCD read and write for communicating the
> > HDCP2.2 auth message back and forth.
> > 
> > v2:
> >   wait for cp_irq is merged with this patch. Rebased.
> > v3:
> >   wait_queue is used for wait for cp_irq [Chris Wilson]
> > v4:
> >   Style fixed.
> >   %s/PARING/PAIRING
> >   Few style fixes [Uma]
> > v5:
> >   Lookup table for DP HDCP2.2 msg details [Daniel].
> >   Extra lines are removed.
> > v6:
> >   Rebased.
> > v7:
> >   Fixed some regression introduced at v5. [Ankit]
> >   Macro HDCP_2_2_RX_CAPS_VERSION_VAL is reused [Uma]
> >   Converted a function to inline [Uma]
> >   %s/uintxx_t/uxx
> > v8:
> >   Error due to the sinks are reported as DEBUG logs.
> >   Adjust to the new mei interface.
> > 
> > Signed-off-by: Ramalingam C <ramalingam.c@xxxxxxxxx>
> > Signed-off-by: Ankit K Nautiyal <ankit.k.nautiyal@xxxxxxxxx>
> > Reviewed-by: Uma Shankar <uma.shankar@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/intel_dp.c   | 338
> > ++++++++++++++++++++++++++++++++++++++
> >  drivers/gpu/drm/i915/intel_drv.h  |   7 +
> >  drivers/gpu/drm/i915/intel_hdcp.c |   6 +
> >  3 files changed, 351 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c
> > b/drivers/gpu/drm/i915/intel_dp.c
> > index ecc4706db7dc..1cc82e490999 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -31,6 +31,7 @@
> >  #include <linux/types.h>
> >  #include <linux/notifier.h>
> >  #include <linux/reboot.h>
> > +#include <linux/mei_hdcp.h>
> >  #include <asm/byteorder.h>
> >  #include <drm/drmP.h>
> >  #include <drm/drm_atomic_helper.h>
> > @@ -5347,6 +5348,27 @@ void intel_dp_encoder_suspend(struct
> > intel_encoder *intel_encoder)
> >  	pps_unlock(intel_dp);
> >  }
> > 
> <SNIP>
> > +
> > +static struct hdcp2_dp_msg_data *get_hdcp2_dp_msg_data(u8 msg_id)
> > +{
> > +	int i;
> > +
> > +	for (i = 0; i < sizeof(hdcp2_msg_data); i++)
> 
> Should be
> 	sizeof(hdcp2_msg_data) / sizeof(*hdcp2_msg_data)
> or equivalent.

ARRAY_SIZE is probably what you want here.
-Daniel

> 
> Has the failure return been tested?
> 
> > +		if (hdcp2_msg_data[i].msg_id == msg_id)
> > +			return &hdcp2_msg_data[i];
> > +
> > +	return NULL;
> > +}
> > +
> <SNIP>
> > --
> > 2.7.4
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux