On Fri, 2012-03-02 at 16:55 +0530, K, Mythri P wrote: > Hi Tomi, > > >> Damage never happens with the cable connected for a long time.. Damage > >> happens only > >> when the cable is connected when the PHY is in TX ON state. Which > >> requires the following sequence to be followed. > >> 1. Wait for HPD connect > >> 2. Wait for the PHY connect ( TMDS lines are up) > >> 3. Enable PHY > >> We are currently missing step 2. > > > > Doesn't HPD already tell us that the cable is connected? > > > Yes HPD tells us that cable is connected but does not guarantee that > the line is ready for transmission of data, HPD just means the DDC > line is up. Okay, but above you say "damage happens only when the cable is connected when the PHY is in TX_ON". The HPD interrupt tells that the cable is physically connected, right? And we set TX_ON after HPD, i.e. after the cable is connected. And below you say that this depends on which input the user selected from the TV. So it sounds to me that this problem is not actually related to the cable connect at all, but it's about enabling the PHY on OMAP side before the TMDS lines are (somehow) in ready state? What happens if the HDMI output is enabled properly, but then later, while the output is still on, the user changes the input of the TV to, say, AV1? And then, later, back to HDMI? > >> > In the worst case the above causes a 7.5ms busy loop in an interrupt > >> > handler. That's not very good thing. Why is there a need for the loop? > >> I agree looping in interrupt context is bad.. That was the reason i > >> had a threaded irq handler and i case even here it is the threaded irq > >> handler i dont think it is happening in irq context. > > > > We should nevertheless avoid 7.5ms busyloop if at all possible. Is there > > an estimate of how long it takes for the PHY to connect? I think we > > could just start a delayed work from the interrupt, and do the check > > after a short delay. I don't think the user cares if the connect happens > > after 1ms or 10ms from the moment the cable is plugged in =). > > > Actually by using the PHY_CONNECT interrupt we can avoid the wait. > If the TV channel is the same as the HDMI port connected to then there > is hardly any delay between HPD and TMDS lines. Problem is when user > connects to HDMI but is running say AV1 /AV2 on TV. > In such case we will see that HPD is high but TMDS lines are low, So > there is no guarantee it will be done in certain period, as it is user > dependent. > So i am more inclined to have a interrupt based way, On receiving HPD > in the threaded irq handler we can wait_on_completion of PHY_CONNECT > which will put the thread in sleep until TMDS lines are high. > I shall make that patch test out and post it soon. Is there any reason to wait? Why not just enable the PHY_CONNECT interrupt in HPD interrupt, perhaps set a flag, and exit. Then at the PHY_CONNECT interrupt set TX_ON. Tomi
Attachment:
signature.asc
Description: This is a digitally signed message part