Display-Port HPD handling, link status, and bandwidth checks

Jyri Sarha jsarha at ti.com
Sun Aug 25 11:12:09 UTC 2019


Hi,

I am working on a new DisplayPort bridge-driver and there is a couple of
things that I do not know how to handle.

1. When should the link training happen?
   a) In connector detect()?
      - This would enable us to do mode filtering (in mode_valid())
        based on the established link band-width (then again
        mode_valid() documentation suggests that modes should only
        be filtered based on "configuration-invariant hardware
        constraints").
   b) In check phase (this would currently mean mode_fixup)?
      - This is the last point where we can reject a mode that can not
        be sent over the DP-link
   c) In commit phase (e.g. bridge enable())
      - This is bad since we should not fail any more in the commit
        phase

2. DP-link sometimes drops after a succesful link training and DP-sink
   is supposed to send short HPD pulse about it. What are the
   recommended ways to handle the situation?

   a) Send hotplug event and let the DRM client deal with it?
      - This does not work too well because even if the client tries
        to restore the display by committing the same state again -
        like fbdev does - the bridge does not go trough disable-enable
        cycle, since display mode has not changed.
      - Despite it not working so well, this is what the most drivers
	appear to do.

   b) Driver internally re-trains the link but send a hotplug event
      always after it?
      - This is what i915 does, if I read the code right.
      - How to treat a training failure? Sending hotplug event does not
        really help (see above).

   c) Silently re-train the link if we were able to restore the link
      and the display mode, and send HPD only if something went wrong?

Best regards,
Jyri

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


More information about the dri-devel mailing list