On Mon, 14 Sep 2020, Heikki Krogerus wrote: > Hi, > > On Fri, Sep 11, 2020 at 04:56:22PM +0300, Heikki Krogerus wrote: > > Looks like the firmware does not terminate the list of alternate modes > > at all. It's just returning the two supported modes over and over > > again, regardless of the requested mode offset... I need to think how > > that should be handled. > > Since we can't rely on the data that the firmware returns, we also > have to check that the mode index does not exceed MODE_DISCOVER_MAX. > Can you test if the attached patch fixes the issue for you? Sadly that's not entirely surprising :/ i tested your patch and i was able to plugin and unplug the USB-C dock with a working display multiple times. Thanks! Zwane