Re: imx-drm: Add HDMI support

Alexander Shiyan shc_work at mail.ru
Thu Oct 17 15:52:15 EDT 2013


> > Little bit late to the party, but here is the patch for the latest  
> > version of the HDMI driver I was working on. Having had a quick flick  
> > through the mailing list I see Russell has noticed a few of the problems  
> > I had earlier on, which are resolved in my later work. Thought this  
> > might be useful to help you tidy things up.
...
> Now, I notice that the FSL 4.1.0 stuff appears to try and decide
> which of the two clock inputs to use for the DI module, something
> which isn't done in the driver in staging.  Also there's the commented
> out stuff:
> 
> #ifdef WTF_IS_THIS
>         /*
>          * Freescale has this in their Kernel. It is neither clear what
>          * it does nor why it does it
>          */
>         if (div & 0x10)
>                 div &= ~0x7;
>         else {
>                 /* Round up divider if it gets us closer to desired pix clk */
>                 if ((div & 0xC) == 0xC) {
>                         div += 0x10;
>                         div &= ~0xF;
>                 }
>         }
> #endif
> 
> Quite simply, the "div" value is as follows:
> 
> bits 11:4 - integer divider
> bits  3:0 - fractional part
> 
> So, what this is saying is that for any _odd_ integer divider, we want
> to either divide by the odd divider, or odd.5 - but no other fractional
> values.  Otherwise, if the divider is an even integer divider, and the
> fractional part is greater than .75, we want to round that up.  (It may
> also be that the final div & ~0xf should be outside that second if
> statement.)
> 
> It could be that the fractional divider is broken and doesn't work
> correctly with the values that this is trying to avoid.

This problem has been described by me, but solution hung in the air:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/176424.html

---


More information about the linux-arm-kernel mailing list