mbox series

[v2,0/2] usb: typec: ucsi: Support for DP alt mode

Message ID 20190320114445.22462-1-heikki.krogerus@linux.intel.com (mailing list archive)
Headers show
Series usb: typec: ucsi: Support for DP alt mode | expand

Message

Heikki Krogerus March 20, 2019, 11:44 a.m. UTC
Hi,

This is the second version of my proposal to add alt mode handling to
ucsi driver. The problem in the first version was that I was not
using the port alt mode that was associated with the partner alt mode
(and vise versa), but I was instead searching the alt mode objects
in every case separately.

So in this version I'm now always using the already associated
alternate mode partner in every case, and as far as the UCSI driver
(or any other USB Type-C driver) is concerned, that is all that it
needs to do. The problem of actually associating the correct alt mode
partner object belongs to the Type-C subsystem core code, and any
improvements to that code are out side of the scope of this series.

I've prepared a patch that allows the alt mode drivers to find the
correct port alt mode for the partner alt modes. That should cover
SVIDs that define multiple modes (note, DisplayPort Alt mode is not
one of those). But as I mentioned above, that is not related to this
series.

You can check the v1 from here:
https://www.spinics.net/lists/linux-usb/msg176703.html

thanks,

Heikki Krogerus (2):
  usb: typec: ucsi: Preliminary support for alternate modes
  usb: typec: ucsi: Support for DisplayPort alt mode

 drivers/usb/typec/ucsi/Makefile      |  15 +-
 drivers/usb/typec/ucsi/displayport.c | 297 ++++++++++++++++++++++
 drivers/usb/typec/ucsi/trace.c       |  12 +
 drivers/usb/typec/ucsi/trace.h       |  26 ++
 drivers/usb/typec/ucsi/ucsi.c        | 366 ++++++++++++++++++++++-----
 drivers/usb/typec/ucsi/ucsi.h        |  93 +++++++
 6 files changed, 738 insertions(+), 71 deletions(-)
 create mode 100644 drivers/usb/typec/ucsi/displayport.c

Comments

Ajay Gupta March 25, 2019, 10:16 p.m. UTC | #1
Hi Heikki,

> -----Original Message-----
> From: linux-usb-owner@vger.kernel.org <linux-usb-owner@vger.kernel.org> On
> Behalf Of Heikki Krogerus
> Sent: Wednesday, March 20, 2019 4:45 AM
> To: Ajay Gupta <ajayg@nvidia.com>; Michael Hsu <mhsu@nvidia.com>
> Cc: linux-usb@vger.kernel.org
> Subject: [PATCH v2 0/2] usb: typec: ucsi: Support for DP alt mode
> 
> Hi,
> 
> This is the second version of my proposal to add alt mode handling to ucsi driver.
> The problem in the first version was that I was not using the port alt mode that
> was associated with the partner alt mode (and vise versa), but I was instead
> searching the alt mode objects in every case separately.
> 
> So in this version I'm now always using the already associated alternate mode
> partner in every case, and as far as the UCSI driver (or any other USB Type-C
> driver) is concerned, that is all that it needs to do. The problem of actually
> associating the correct alt mode partner object belongs to the Type-C subsystem
> core code, and any improvements to that code are out side of the scope of this
> series.
> 
> I've prepared a patch that allows the alt mode drivers to find the correct port alt
> mode for the partner alt modes. That should cover SVIDs that define multiple
> modes (note, DisplayPort Alt mode is not one of those). But as I mentioned
> above, that is not related to this series.
Thanks for the new set. It looks good to me.
I tested it with UCSI CCG on NVIDIA GPU and it works.

Tested-By: Ajay Gupta <ajayg@nvidia.com>

Thanks
Ajay
>  nvpublic
> You can check the v1 from here:
> https://www.spinics.net/lists/linux-usb/msg176703.html
> 
> thanks,
> 
> Heikki Krogerus (2):
>   usb: typec: ucsi: Preliminary support for alternate modes
>   usb: typec: ucsi: Support for DisplayPort alt mode
> 
>  drivers/usb/typec/ucsi/Makefile      |  15 +-
>  drivers/usb/typec/ucsi/displayport.c | 297 ++++++++++++++++++++++
>  drivers/usb/typec/ucsi/trace.c       |  12 +
>  drivers/usb/typec/ucsi/trace.h       |  26 ++
>  drivers/usb/typec/ucsi/ucsi.c        | 366 ++++++++++++++++++++++-----
>  drivers/usb/typec/ucsi/ucsi.h        |  93 +++++++
>  6 files changed, 738 insertions(+), 71 deletions(-)  create mode 100644
> drivers/usb/typec/ucsi/displayport.c
> 
> --
> 2.20.1
Heikki Krogerus March 26, 2019, 8:58 a.m. UTC | #2
On Mon, Mar 25, 2019 at 10:16:36PM +0000, Ajay Gupta wrote:
> Hi Heikki,
> 
> > -----Original Message-----
> > From: linux-usb-owner@vger.kernel.org <linux-usb-owner@vger.kernel.org> On
> > Behalf Of Heikki Krogerus
> > Sent: Wednesday, March 20, 2019 4:45 AM
> > To: Ajay Gupta <ajayg@nvidia.com>; Michael Hsu <mhsu@nvidia.com>
> > Cc: linux-usb@vger.kernel.org
> > Subject: [PATCH v2 0/2] usb: typec: ucsi: Support for DP alt mode
> > 
> > Hi,
> > 
> > This is the second version of my proposal to add alt mode handling to ucsi driver.
> > The problem in the first version was that I was not using the port alt mode that
> > was associated with the partner alt mode (and vise versa), but I was instead
> > searching the alt mode objects in every case separately.
> > 
> > So in this version I'm now always using the already associated alternate mode
> > partner in every case, and as far as the UCSI driver (or any other USB Type-C
> > driver) is concerned, that is all that it needs to do. The problem of actually
> > associating the correct alt mode partner object belongs to the Type-C subsystem
> > core code, and any improvements to that code are out side of the scope of this
> > series.
> > 
> > I've prepared a patch that allows the alt mode drivers to find the correct port alt
> > mode for the partner alt modes. That should cover SVIDs that define multiple
> > modes (note, DisplayPort Alt mode is not one of those). But as I mentioned
> > above, that is not related to this series.
> Thanks for the new set. It looks good to me.
> I tested it with UCSI CCG on NVIDIA GPU and it works.
> 
> Tested-By: Ajay Gupta <ajayg@nvidia.com>

Thank you!

Br,