iMX6Q HDMI overflow issue during reboot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6Q HDMI overflow issue during reboot

1,356 Views
jameszt
Contributor II

Dear Sir,

     On a few of our customized iMX6Q boards, when Yocto1.6 system reboot, there will be continous HDMI  overflow interrupt gennerated and reported by the code below, which can't be cleared. the interrupts will block the board to boot into yocto

          mxc_hdmi.c::

static irqreturn_t mxc_hdmi_hotplug(int irq, void *data)
{
struct mxc_hdmi *hdmi = data;
u8 val, intr_stat;
unsigned long flags;

spin_lock_irqsave(&hdmi->irq_lock, flags);

/* Check and clean packet overflow interrupt.*/
if (hdmi_readb(HDMI_IH_FC_STAT2) &
   HDMI_IH_FC_STAT2_OVERFLOW_MASK) {
  mxc_hdmi_clear_overflow(hdmi);

  dev_dbg(&hdmi->pdev->dev, "Overflow interrupt received\n");
  /* clear irq status */
  hdmi_writeb(HDMI_IH_FC_STAT2_OVERFLOW_MASK,
       HDMI_IH_FC_STAT2);
}

I guess the HDMI PHY is now in a messed FSM state. We didn't modify any FSL HDMI driver code and I find the latest Yocto2.0 HDMI driver code is almost same except "Yocto2.0  doesn't initialize MIPI Core clock"

   We must disable the overflow interrupt to make boards reboot sucessfully, so my question is,

1. why overflow interrupt is continously generated during reboot?

2. Is it safe to disable overflow interrupt, any side effect?

3. why the overflow interrupt handle routine is only a workaround? (see code below)

/* Workaround to clear the overflow condition */
static void mxc_hdmi_clear_overflow(struct mxc_hdmi *hdmi)
{
int count;
u8 val;

/* TMDS software reset */
hdmi_writeb((u8)~HDMI_MC_SWRSTZ_TMDSSWRST_REQ, HDMI_MC_SWRSTZ);

val = hdmi_readb(HDMI_FC_INVIDCONF);

if (cpu_is_imx6dl(hdmi)) {
   hdmi_writeb(val, HDMI_FC_INVIDCONF);
   return;
}

for (count = 0 ; count < 5 ; count++)
  hdmi_writeb(val, HDMI_FC_INVIDCONF);
}

Thanks a lot!

James

Labels (1)
0 Kudos
2 Replies

733 Views
igorpadykov
NXP Employee
NXP Employee

Hi James

could you try with BSP from official product page:

Board Support Packages (35)

L4.1.15_1.0.0_MX6QDLSOLO (REV L4.1.15_1.0.0)

http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-process...

is hdmi is enabled in uboot ? If yes then one can also consider

https://www.yoctoproject.org/bug/bug-6703-kernel-hangs-boot-when-hdmi-cable-plugged

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

733 Views
jameszt
Contributor II

there is a comment in mxc_hdmi_phy_init, may be HDMI PHY  is in such messed up state after reboot though we don't do phy init.

===========================

static void mxc_hdmi_phy_init(struct mxc_hdmi *hdmi)
{
int i;
bool cscon = false;

dev_dbg(&hdmi->pdev->dev, "%s\n", __func__);

/* Never do phy init if pixel clock is gated.
  * Otherwise HDMI PHY will get messed up and generate an overflow
  * interrupt that can't be cleared or detected by accessing the
  * status register. */
if (!hdmi->fb_reg || !hdmi->cable_plugin
  || (hdmi->blank != FB_BLANK_UNBLANK))
  return;

0 Kudos