Re: [PATCH] UPSTREAM: drm/amd/display: Fix Apple dongle cannot be successfully detected

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

 



On Wed, Oct 23, 2019 at 02:19:56PM +0800, S, Shirish wrote:
> The UPSTREAM tag in the commit message needs to be removed.
> 

OK. Will remove it.

> On 10/21/2019 1:24 PM, Louis Li wrote:
> > [Why]
> > External monitor cannot be displayed consistently, if connecting
> > via this Apple dongle (A1621, USB Type-C to HDMI).
> > By experiments, it is confirmed that the dongle needs 200ms at least
> > to be ready for communication, after it sets HPD signal high.
> >
> > [How]
> > When receiving HPD IRQ, delay 500ms at the beginning of handle_hpd_irq().
> 
> Am not sure how this delay shall impact on dongles that don't need it,
> 
> ideally it should be added as quirk, at least restrict it to these 
> specific vendors.
> 
> Instead of delay, can you find any parameter to wait for for the 
> communication to be ready,
> 
> in that way it shall be failsafe.
> 

For such devices (monitors/dongles), there will be no chance to
get information before the defer, because it is not ready to
commmunicate right after HPD interrup. All other available
dongles were verified with the patch applied, and work well
still. As replied earlier, this is caused by dongle/monitor,
and the solution is to have the driver better compatibility.

Louis Li

> > Then run the original procedure.
> > With this patch applied, the problem cannot be reproduced.
> > With other dongles, test results are PASS.
> > Test result is PASS after system resumes from suspend.
> >
> > Signed-off-by: Louis Li <Ching-shih.Li@xxxxxxx>
> > ---
> >   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++
> >   1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > index 0aef92b7c037..043ddac73862 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -1025,6 +1025,11 @@ static void handle_hpd_irq(void *param)
> >   	struct drm_device *dev = connector->dev;
> >   	enum dc_connection_type new_connection_type = dc_connection_none;
> >   
> > +    /* Some monitors/dongles need around 200ms to be ready for communication
> > +     * after they drive HPD signal high.
> > +     */
> > +    mdelay(500);
> > +
> >   	/* In case of failure or MST no need to update connector status or notify the OS
> >   	 * since (for MST case) MST does this in it's own context.
> >   	 */
> 
> -- 
> Regards,
> Shirish S
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux