[PATCH v2 1/3] imx-drm: Add mx6 hdmi transmitter support
Russell King - ARM Linux
linux at arm.linux.org.uk
Wed Oct 16 18:27:12 EDT 2013
On Wed, Oct 16, 2013 at 02:03:17PM -0700, Troy Kisky wrote:
> Freescale's kernel(imx_3.0.35_4.1.0) has this code
>
> video/mxc_hdmi.c-/* Workaround to clear the overflow condition */
> video/mxc_hdmi.c-static void mxc_hdmi_clear_overflow(void)
> video/mxc_hdmi.c-{
> video/mxc_hdmi.c- int count;
> video/mxc_hdmi.c- u8 val;
> video/mxc_hdmi.c-
> video/mxc_hdmi.c- /* TMDS software reset */
> video/mxc_hdmi.c: hdmi_writeb((u8)~HDMI_MC_SWRSTZ_TMDSSWRST_REQ,
> HDMI_MC_SWRSTZ);
> video/mxc_hdmi.c-
> video/mxc_hdmi.c- val = hdmi_readb(HDMI_FC_INVIDCONF);
> video/mxc_hdmi.c-
> video/mxc_hdmi.c- if (cpu_is_mx6dl()) {
> video/mxc_hdmi.c- hdmi_writeb(val, HDMI_FC_INVIDCONF);
> video/mxc_hdmi.c- return;
> video/mxc_hdmi.c- }
> video/mxc_hdmi.c-
> video/mxc_hdmi.c- for (count = 0 ; count < 5 ; count++)
> video/mxc_hdmi.c- hdmi_writeb(val, HDMI_FC_INVIDCONF);
> video/mxc_hdmi.c-}
>
> So, perhaps you need to move the software reset first.
Just tried that - and yes, it does work (I'm on i.MX 6Solo for which
cpu_is_mx6dl() would return true.) Well done!
Indeed yes, the workaround in the code Fabio has differs from the
procedure given in the errata.
Note that this gives a new problem: we shouldn't use cpu_is_mx6dl()
in drivers - differences like this should be specified via DT properties.
I think we need this to recognise both fsl,imx6q-hdmi and fsl,imx6dl-hdmi
so that this workaround can detect when its running on a Solo/DL SoC.
Well, I now have quite a pile of patches for the hdmi code. :(
More information about the linux-arm-kernel
mailing list