Re: [PATCH v5] usb: typec: ucsi: add support for separate DP altmode devices

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

 



Hi Ajay,

On Fri, Sep 06, 2019 at 09:55:16AM -0700, Ajay Gupta wrote:
> From: Ajay Gupta <ajayg@xxxxxxxxxx>
> 
> 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. They always make it difficult to modify the code later,
and unfortunately we have them all over the kernel. Look at the serial
driver 8250_core/port/*.cas an example. Ideally we should be able to
"modularize" the whole alternate mode handling in the ucsi driver
since there are now two different ways the PPMs can handle them
instead of simply mixing the support for the new method straight into
the existing structures.

thanks,

-- 
heikki



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux