[PATCHv2 21/22] drm/bridge: tc358767: add IRQ and HPD support
Tomi Valkeinen
tomi.valkeinen at ti.com
Mon Apr 15 10:59:46 UTC 2019
On 15/04/2019 13:42, Andrzej Hajda wrote:
> Ok we have here 4 combinations:
>
> 1. noHPD + eDP.
>
> 2. noHPD + DP.
>
> 3. HPD + eDP.
>
> 4. HPD + DP.
>
>
> Which ones do you want to support, disallow. It is not clear to me.
They all should work.
If there is HPD, we use it to return connected/disconnected.
If we don't have HPD:
- If there's a panel (i.e. eDP), we presume that it is always there, as
by definition it can't be disconnected.
- If there's no panel (i.e. DP), we can't know if the cable is connected
or not, so we return unknown. I think this could be improved by trying
to "ping" the monitor with an AUX transaction, but I didn't look at that.
> Moreover what connector_status_unknown should mean here for users?
The the driver does not know if there's a monitor or not.
>> + if (tc->hpd_num >= 0 && tc->bridge.dev) {
>> + bool h = val & INT_GPIO_H(tc->hpd_num);
>> + bool lc = val & INT_GPIO_LC(tc->hpd_num);
>> +
>> + dev_dbg(tc->dev, "GPIO%d: %s %s\n", tc->hpd_num,
>> + h ? "H" : "", lc ? "LC" : "");
>
>
> What does "h" and "lc" mean?
These are from the func spec. H means high, LC means low-counter. H is
triggered immediately when the HPD line goes high, LC is triggered when
the line has been low for the counter-specified time (the counter is
configured at probe time).
These could be used to implement a more elaborate DP HPD & interrupt
handling, but for the time being the driver just takes them as "HPD may
have changed".
Tomi
--
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