All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Ajay Gupta <ajayg@nvidia.com>
Cc: Ajay Gupta <ajaykuee@gmail.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v5] usb: typec: ucsi: add support for separate DP altmode devices
Date: Thu, 19 Sep 2019 15:23:03 +0300	[thread overview]
Message-ID: <20190919122303.GC16243@kuha.fi.intel.com> (raw)
In-Reply-To: <BYAPR12MB27272A58997E4D9BC030C9C3DC8F0@BYAPR12MB2727.namprd12.prod.outlook.com>

On Tue, Sep 17, 2019 at 09:41:49PM +0000, Ajay Gupta wrote:
> Hi Heikki,
> 
> > -----Original Message-----
> > From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > Sent: Friday, September 13, 2019 8:20 AM
> > To: Ajay Gupta <ajaykuee@gmail.com>
> > Cc: linux-usb@vger.kernel.org; Ajay Gupta <ajayg@nvidia.com>
> > Subject: Re: [PATCH v5] usb: typec: ucsi: add support for separate DP altmode
> > devices
> > 
> > Hi Ajay,
> > 
> > On Fri, Sep 06, 2019 at 09:55:16AM -0700, Ajay Gupta wrote:
> > > From: Ajay Gupta <ajayg@nvidia.com>
> > >
> > > CCGx controller used on NVIDIA GPU card has two separate display
> > > altmode for two DP pin assignments. UCSI specification doesn't
> > > prohibits using separate display altmode.
> > >
> > > Current UCSI Type-C framework expects only one display altmode for all
> > > DP pin assignment. This patch squashes two separate display altmode
> > > into single altmode to support controllers with separate display
> > > altmode. We first read all the alternate modes of connector and then
> > > run through it to know if there are separate display altmodes. If so,
> > > it prepares a new port altmode set after squashing two or more
> > > separate altmodes into one.
> > 
> > I'm going to go over this one more time during the merge window. I have an
> > idea how to improve this. Please bear with me. I have to make sure all options
> > were considered.
> > 
> > I'm really sorry to block this for so long, but I'm just really really afraid of
> > mixing special case solutions like this into otherwise generic code.
> 
> I can update the patch to make sure generic code flow remains as-is and special
> case is executed only for UCSI controllers which needs squashing of duplicate
> DP altmodes.
> We can use the new function pointer update_altmode() added in "struct ucsi_ppm" in v5
> of my patch for this purpose.
> 
> if (recipient == UCSI_RECIPIENT_CON && ucsi->ppm && ucsi->ppm->update_altmodes)
> 	Get all the altmodes first, pass it to update_altmodes() for squashing if needed,
> 	and then register each altmodes.
> else
> 	Use the current method where we get and register one altmode at a time.
> 
> Please let me know if this looks fine to you.

No. Please wait. I'm refactoring ucsi.c. I'm going to redo the I/O
completely, and also do some long waited cleanups. Those changes
should make handling this case also much easier.

thanks,

-- 
heikki

      reply	other threads:[~2019-09-19 12:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 16:55 [PATCH v5] usb: typec: ucsi: add support for separate DP altmode devices Ajay Gupta
2019-09-13 15:20 ` Heikki Krogerus
2019-09-17 21:41   ` Ajay Gupta
2019-09-19 12:23     ` Heikki Krogerus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190919122303.GC16243@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=ajayg@nvidia.com \
    --cc=ajaykuee@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.