diff mbox

[v4] drm: Fix downstream dev count read

Message ID 1522866462-11672-1-git-send-email-ramalingam.c@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ramalingam C April 4, 2018, 6:27 p.m. UTC
In both HDMI and DP, device count is represented by 6:0 bits of a
register(BInfo/Bstatus)

So macro for bitmasking the device_count is fixed(0x3F->0x7F).

v3:
  Retained the Rb-ed.
v4:
  %s/drm\/i915/drm [rodrigo]

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
cc: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
 include/drm/drm_hdcp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rodrigo Vivi April 4, 2018, 7:07 p.m. UTC | #1
On Wed, Apr 04, 2018 at 11:57:42PM +0530, Ramalingam C wrote:
> In both HDMI and DP, device count is represented by 6:0 bits of a
> register(BInfo/Bstatus)
> 
> So macro for bitmasking the device_count is fixed(0x3F->0x7F).
> 
> v3:
>   Retained the Rb-ed.
> v4:
>   %s/drm\/i915/drm [rodrigo]
> 

Shouldn't this patch have a "Fixes:" ?
cc: stable?

I pushed first 3 patches on the series to dinq.
I believe this one here could be there with Dave's ack or
maybe on drm-misc-fixes?

> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> cc: Sean Paul <seanpaul@chromium.org>
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
> ---
>  include/drm/drm_hdcp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h
> index 562fa7df2637..98e63d870139 100644
> --- a/include/drm/drm_hdcp.h
> +++ b/include/drm/drm_hdcp.h
> @@ -19,7 +19,7 @@
>  #define DRM_HDCP_RI_LEN				2
>  #define DRM_HDCP_V_PRIME_PART_LEN		4
>  #define DRM_HDCP_V_PRIME_NUM_PARTS		5
> -#define DRM_HDCP_NUM_DOWNSTREAM(x)		(x & 0x3f)
> +#define DRM_HDCP_NUM_DOWNSTREAM(x)		(x & 0x7f)
>  #define DRM_HDCP_MAX_CASCADE_EXCEEDED(x)	(x & BIT(3))
>  #define DRM_HDCP_MAX_DEVICE_EXCEEDED(x)		(x & BIT(7))
>  
> -- 
> 2.7.4
>
Sean Paul April 4, 2018, 7:23 p.m. UTC | #2
On Wed, Apr 04, 2018 at 12:07:41PM -0700, Rodrigo Vivi wrote:
> On Wed, Apr 04, 2018 at 11:57:42PM +0530, Ramalingam C wrote:
> > In both HDMI and DP, device count is represented by 6:0 bits of a
> > register(BInfo/Bstatus)
> > 
> > So macro for bitmasking the device_count is fixed(0x3F->0x7F).
> > 
> > v3:
> >   Retained the Rb-ed.
> > v4:
> >   %s/drm\/i915/drm [rodrigo]
> > 
> 
> Shouldn't this patch have a "Fixes:" ?

Yes, I think that'd be good.

> cc: stable?

It couldn't hurt.

> 
> I pushed first 3 patches on the series to dinq.
> I believe this one here could be there with Dave's ack or
> maybe on drm-misc-fixes?

Meh. The severity of this isn't too big, given that I doubt people care _too_
much about plugging in more than 64 HDCP-enabled devices. If you want to drop it
in -misc-next-fixes, I can send it out next week.

While we're asking for a respin, could we add HDCP somewhere in the subject?

Sean

> 
> > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > cc: Sean Paul <seanpaul@chromium.org>
> > Reviewed-by: Sean Paul <seanpaul@chromium.org>
> > ---
> >  include/drm/drm_hdcp.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h
> > index 562fa7df2637..98e63d870139 100644
> > --- a/include/drm/drm_hdcp.h
> > +++ b/include/drm/drm_hdcp.h
> > @@ -19,7 +19,7 @@
> >  #define DRM_HDCP_RI_LEN				2
> >  #define DRM_HDCP_V_PRIME_PART_LEN		4
> >  #define DRM_HDCP_V_PRIME_NUM_PARTS		5
> > -#define DRM_HDCP_NUM_DOWNSTREAM(x)		(x & 0x3f)
> > +#define DRM_HDCP_NUM_DOWNSTREAM(x)		(x & 0x7f)
> >  #define DRM_HDCP_MAX_CASCADE_EXCEEDED(x)	(x & BIT(3))
> >  #define DRM_HDCP_MAX_DEVICE_EXCEEDED(x)		(x & BIT(7))
> >  
> > -- 
> > 2.7.4
> >
Ramalingam C April 4, 2018, 10:34 p.m. UTC | #3
On Thursday 05 April 2018 12:53 AM, Sean Paul wrote:
> On Wed, Apr 04, 2018 at 12:07:41PM -0700, Rodrigo Vivi wrote:
>> On Wed, Apr 04, 2018 at 11:57:42PM +0530, Ramalingam C wrote:
>>> In both HDMI and DP, device count is represented by 6:0 bits of a
>>> register(BInfo/Bstatus)
>>>
>>> So macro for bitmasking the device_count is fixed(0x3F->0x7F).
>>>
>>> v3:
>>>    Retained the Rb-ed.
>>> v4:
>>>    %s/drm\/i915/drm [rodrigo]
>>>
>> Shouldn't this patch have a "Fixes:" ?
> Yes, I think that'd be good.
Will add
Fixes: 495eb7f877ab drm: Add some HDCP related #defines
>
>> cc: stable?
> It couldn't hurt.
Sorry what is needed here?
>
>> I pushed first 3 patches on the series to dinq.
>> I believe this one here could be there with Dave's ack or
>> maybe on drm-misc-fixes?
> Meh. The severity of this isn't too big, given that I doubt people care _too_
> much about plugging in more than 64 HDCP-enabled devices. If you want to drop it
> in -misc-next-fixes, I can send it out next week.
>
> While we're asking for a respin, could we add HDCP somewhere in the subject?
will change the sub to
drm: Fix HDCP downstream dev count read

--Ram
>
> Sean
>
>>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>>> cc: Sean Paul <seanpaul@chromium.org>
>>> Reviewed-by: Sean Paul <seanpaul@chromium.org>
>>> ---
>>>   include/drm/drm_hdcp.h | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h
>>> index 562fa7df2637..98e63d870139 100644
>>> --- a/include/drm/drm_hdcp.h
>>> +++ b/include/drm/drm_hdcp.h
>>> @@ -19,7 +19,7 @@
>>>   #define DRM_HDCP_RI_LEN				2
>>>   #define DRM_HDCP_V_PRIME_PART_LEN		4
>>>   #define DRM_HDCP_V_PRIME_NUM_PARTS		5
>>> -#define DRM_HDCP_NUM_DOWNSTREAM(x)		(x & 0x3f)
>>> +#define DRM_HDCP_NUM_DOWNSTREAM(x)		(x & 0x7f)
>>>   #define DRM_HDCP_MAX_CASCADE_EXCEEDED(x)	(x & BIT(3))
>>>   #define DRM_HDCP_MAX_DEVICE_EXCEEDED(x)		(x & BIT(7))
>>>   
>>> -- 
>>> 2.7.4
>>>
Rodrigo Vivi April 5, 2018, 11:56 p.m. UTC | #4
On Thu, Apr 05, 2018 at 04:04:14AM +0530, Ramalingam C wrote:
> 
> 
> On Thursday 05 April 2018 12:53 AM, Sean Paul wrote:
> > On Wed, Apr 04, 2018 at 12:07:41PM -0700, Rodrigo Vivi wrote:
> > > On Wed, Apr 04, 2018 at 11:57:42PM +0530, Ramalingam C wrote:
> > > > In both HDMI and DP, device count is represented by 6:0 bits of a
> > > > register(BInfo/Bstatus)
> > > > 
> > > > So macro for bitmasking the device_count is fixed(0x3F->0x7F).
> > > > 
> > > > v3:
> > > >    Retained the Rb-ed.
> > > > v4:
> > > >    %s/drm\/i915/drm [rodrigo]
> > > > 
> > > Shouldn't this patch have a "Fixes:" ?
> > Yes, I think that'd be good.
> Will add
> Fixes: 495eb7f877ab drm: Add some HDCP related #defines
> > 
> > > cc: stable?
> > It couldn't hurt.
> Sorry what is needed here?

nothing actually...

$ dim fixes 495eb7f877ab3
Fixes: 495eb7f877ab ("drm: Add some HDCP related #defines")
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Ramalingam C <ramalingm.c@intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org

CC: Stable wasn't returned here so it is not needed.

> > 
> > > I pushed first 3 patches on the series to dinq.
> > > I believe this one here could be there with Dave's ack or
> > > maybe on drm-misc-fixes?
> > Meh. The severity of this isn't too big, given that I doubt people care _too_
> > much about plugging in more than 64 HDCP-enabled devices. If you want to drop it
> > in -misc-next-fixes, I can send it out next week.
> > 
> > While we're asking for a respin, could we add HDCP somewhere in the subject?
> will change the sub to
> drm: Fix HDCP downstream dev count read
> 
> --Ram
> > 
> > Sean
> > 
> > > > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > > > cc: Sean Paul <seanpaul@chromium.org>
> > > > Reviewed-by: Sean Paul <seanpaul@chromium.org>
> > > > ---
> > > >   include/drm/drm_hdcp.h | 2 +-
> > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h
> > > > index 562fa7df2637..98e63d870139 100644
> > > > --- a/include/drm/drm_hdcp.h
> > > > +++ b/include/drm/drm_hdcp.h
> > > > @@ -19,7 +19,7 @@
> > > >   #define DRM_HDCP_RI_LEN				2
> > > >   #define DRM_HDCP_V_PRIME_PART_LEN		4
> > > >   #define DRM_HDCP_V_PRIME_NUM_PARTS		5
> > > > -#define DRM_HDCP_NUM_DOWNSTREAM(x)		(x & 0x3f)
> > > > +#define DRM_HDCP_NUM_DOWNSTREAM(x)		(x & 0x7f)
> > > >   #define DRM_HDCP_MAX_CASCADE_EXCEEDED(x)	(x & BIT(3))
> > > >   #define DRM_HDCP_MAX_DEVICE_EXCEEDED(x)		(x & BIT(7))
> > > > -- 
> > > > 2.7.4
> > > > 
>
diff mbox

Patch

diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h
index 562fa7df2637..98e63d870139 100644
--- a/include/drm/drm_hdcp.h
+++ b/include/drm/drm_hdcp.h
@@ -19,7 +19,7 @@ 
 #define DRM_HDCP_RI_LEN				2
 #define DRM_HDCP_V_PRIME_PART_LEN		4
 #define DRM_HDCP_V_PRIME_NUM_PARTS		5
-#define DRM_HDCP_NUM_DOWNSTREAM(x)		(x & 0x3f)
+#define DRM_HDCP_NUM_DOWNSTREAM(x)		(x & 0x7f)
 #define DRM_HDCP_MAX_CASCADE_EXCEEDED(x)	(x & BIT(3))
 #define DRM_HDCP_MAX_DEVICE_EXCEEDED(x)		(x & BIT(7))