\hypertarget{dwc__hdmi_8c_source}{}\doxysection{dwc\+\_\+hdmi.\+c}
\label{dwc__hdmi_8c_source}\index{dev/hdmi/dwc\_hdmi.c@{dev/hdmi/dwc\_hdmi.c}}
\mbox{\hyperlink{dwc__hdmi_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2015 Oleksandr Tymoshenko <gonzo@freebsd.org>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00003}00003 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00004}00004 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00005}00005 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00006}00006 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00007}00007 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00008}00008 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00009}00009 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00010}00010 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00012}00012 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00013}00013 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00014}00014 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00015}00015 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00016}00016 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00017}00017 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00018}00018 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00019}00019 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00020}00020 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00021}00021 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00022}00022 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00023}00023 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00024}00024 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00025}00025 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00026}00026 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00027}00027 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00028}\mbox{\hyperlink{dwc__hdmi_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00028}} \mbox{\hyperlink{dwc__hdmi_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00030}00030 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00031}00031 \textcolor{comment}{ * HDMI core module}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00032}00032 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/eventhandler.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/rman.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <dev/videomode/videomode.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <dev/videomode/edidvar.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <dev/iicbus/iicbus.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <dev/iicbus/iiconf.h>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{dwc__hdmi_8h}{dev/hdmi/dwc\_hdmi.h}}>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{dwc__hdmireg_8h}{dev/hdmi/dwc\_hdmireg.h}}>}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00054}00054 \textcolor{preprocessor}{\#include "{}hdmi\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00056}\mbox{\hyperlink{dwc__hdmi_8c_a37a27586f9c709ed8518c23827fcfe3a}{00056}} \textcolor{preprocessor}{\#define I2C\_DDC\_ADDR    (0x50 << 1)}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00057}\mbox{\hyperlink{dwc__hdmi_8c_a243f5065f5e7e6b66cd34c8b520dc3ca}{00057}} \textcolor{preprocessor}{\#define I2C\_DDC\_SEGADDR (0x30 << 1)}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00058}\mbox{\hyperlink{dwc__hdmi_8c_ad3ea5ce090faa453530141b62e56a2f4}{00058}} \textcolor{preprocessor}{\#define EDID\_LENGTH     0x80}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00060}\mbox{\hyperlink{dwc__hdmi_8c_a640790cf00a790253a3c0ad1b761828b}{00060}} \textcolor{preprocessor}{\#define EXT\_TAG                 0x00}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00061}\mbox{\hyperlink{dwc__hdmi_8c_ad5e623969e8707a9f861b5f2495fa4ae}{00061}} \textcolor{preprocessor}{\#define CEA\_TAG\_ID              0x02}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00062}\mbox{\hyperlink{dwc__hdmi_8c_a5b35361b539a95734e3db8b55b0b6c33}{00062}} \textcolor{preprocessor}{\#define CEA\_DTD                 0x03}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00063}\mbox{\hyperlink{dwc__hdmi_8c_abc064738e7c0e39b7f22e6aa2df190cf}{00063}} \textcolor{preprocessor}{\#define DTD\_BASIC\_AUDIO         (1 << 6)}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00064}\mbox{\hyperlink{dwc__hdmi_8c_a8552f99cc7377bd21ff81ebe5e3d124b}{00064}} \textcolor{preprocessor}{\#define CEA\_REV                 0x02}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00065}\mbox{\hyperlink{dwc__hdmi_8c_a02d72ecd345e21b16d4ceb407d9357e6}{00065}} \textcolor{preprocessor}{\#define CEA\_DATA\_OFF            0x03}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00066}\mbox{\hyperlink{dwc__hdmi_8c_a4bea95da96d2719313670575b940ad48}{00066}} \textcolor{preprocessor}{\#define CEA\_DATA\_START          4}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00067}\mbox{\hyperlink{dwc__hdmi_8c_afecc662888701f6d26273cc6f3d32544}{00067}} \textcolor{preprocessor}{\#define BLOCK\_TAG(x)            (((x) >> 5) \& 0x7)}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00068}\mbox{\hyperlink{dwc__hdmi_8c_ad8b0534c6079d8f3ee2ee58d91963985}{00068}} \textcolor{preprocessor}{\#define BLOCK\_TAG\_VSDB          3}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00069}\mbox{\hyperlink{dwc__hdmi_8c_a5249794b0b5534b4fe716386c1a0b714}{00069}} \textcolor{preprocessor}{\#define BLOCK\_LEN(x)            ((x) \& 0x1f)}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00070}\mbox{\hyperlink{dwc__hdmi_8c_ae51311e855c7d4362d5a6e8be92ef8a4}{00070}} \textcolor{preprocessor}{\#define HDMI\_VSDB\_MINLEN        5}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00071}\mbox{\hyperlink{dwc__hdmi_8c_a2ce1530bbe1b9f5a76abe4d27d0c706f}{00071}} \textcolor{preprocessor}{\#define HDMI\_OUI                "{}\(\backslash\)x03\(\backslash\)x0c\(\backslash\)x00"{}}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00072}\mbox{\hyperlink{dwc__hdmi_8c_a2f97c12b152107a1bec95987ceed8446}{00072}} \textcolor{preprocessor}{\#define HDMI\_OUI\_LEN            3}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00074}00074 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00075}\mbox{\hyperlink{dwc__hdmi_8c_ab9a7d9b0e49183642f4c657b017d3abb}{00075}} \mbox{\hyperlink{dwc__hdmi_8c_ab9a7d9b0e49183642f4c657b017d3abb}{dwc\_hdmi\_phy\_wait\_i2c\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc, \textcolor{keywordtype}{int} msec)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00076}00076 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00077}00077         uint8\_t val;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00079}00079         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ab5eb4f164a77f83d09eb45102ad4a7ef}{HDMI\_IH\_I2CMPHY\_STAT0}}) \&}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00080}00080             (\mbox{\hyperlink{dwc__hdmireg_8h_a3a4729b95631c726064ee7855ae1fc06}{HDMI\_IH\_I2CMPHY\_STAT0\_DONE}} | \mbox{\hyperlink{dwc__hdmireg_8h_af356aa95dae20ed4a927de218f2aa0e0}{HDMI\_IH\_I2CMPHY\_STAT0\_ERROR}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00081}00081         \textcolor{keywordflow}{while} (val == 0) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00082}00082                 pause(\textcolor{stringliteral}{"{}HDMI\_PHY"{}}, hz/100);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00083}00083                 msec -\/= 10;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00084}00084                 \textcolor{keywordflow}{if} (msec <= 0)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00085}00085                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00086}00086                 val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ab5eb4f164a77f83d09eb45102ad4a7ef}{HDMI\_IH\_I2CMPHY\_STAT0}}) \&}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00087}00087                     (\mbox{\hyperlink{dwc__hdmireg_8h_a3a4729b95631c726064ee7855ae1fc06}{HDMI\_IH\_I2CMPHY\_STAT0\_DONE}} | \mbox{\hyperlink{dwc__hdmireg_8h_af356aa95dae20ed4a927de218f2aa0e0}{HDMI\_IH\_I2CMPHY\_STAT0\_ERROR}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00088}00088         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00089}00089 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00091}00091 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00092}\mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{00092}} \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} data,}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00093}00093     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} addr)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00094}00094 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00096}00096         \textcolor{comment}{/* clear DONE and ERROR flags */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00097}00097         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ab5eb4f164a77f83d09eb45102ad4a7ef}{HDMI\_IH\_I2CMPHY\_STAT0}},}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00098}00098             \mbox{\hyperlink{dwc__hdmireg_8h_a3a4729b95631c726064ee7855ae1fc06}{HDMI\_IH\_I2CMPHY\_STAT0\_DONE}} | \mbox{\hyperlink{dwc__hdmireg_8h_af356aa95dae20ed4a927de218f2aa0e0}{HDMI\_IH\_I2CMPHY\_STAT0\_ERROR}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00099}00099         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a1ecf55faf9f79efe53f2fafb75dd8239}{HDMI\_PHY\_I2CM\_ADDRESS\_ADDR}}, addr);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00100}00100         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a29b8b114cc3b8189c9eafad6d5cadb26}{HDMI\_PHY\_I2CM\_DATAO\_1\_ADDR}}, ((data >> 8) \& 0xff));}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00101}00101         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_afac2eed615a72555e3abf52fa894ad08}{HDMI\_PHY\_I2CM\_DATAO\_0\_ADDR}}, ((data >> 0) \& 0xff));}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00102}00102         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a326af37bcd56d4eca3848f144b8f29f5}{HDMI\_PHY\_I2CM\_OPERATION\_ADDR}}, \mbox{\hyperlink{dwc__hdmireg_8h_a613a5e93ec3c3babf73556a5bfadca3f}{HDMI\_PHY\_I2CM\_OPERATION\_ADDR\_WRITE}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00103}00103         \mbox{\hyperlink{dwc__hdmi_8c_ab9a7d9b0e49183642f4c657b017d3abb}{dwc\_hdmi\_phy\_wait\_i2c\_done}}(sc, 1000);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00104}00104 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00106}00106 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00107}\mbox{\hyperlink{dwc__hdmi_8c_a311d465ea631a915dacf9c24840ac3f9}{00107}} \mbox{\hyperlink{dwc__hdmi_8c_a311d465ea631a915dacf9c24840ac3f9}{dwc\_hdmi\_disable\_overflow\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00108}00108 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00109}00109         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a5749065c9a0ec2f558508b0bfad55e22}{HDMI\_IH\_MUTE\_FC\_STAT2}}, \mbox{\hyperlink{dwc__hdmireg_8h_a391c7c03b20476170e7e8b4b24c0953d}{HDMI\_IH\_MUTE\_FC\_STAT2\_OVERFLOW\_MASK}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00110}00110         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a3cf4b8242ffa66e073636e203374ee63}{HDMI\_FC\_MASK2}},}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00111}00111             \mbox{\hyperlink{dwc__hdmireg_8h_a21eb225d7f6f6ab882c3659356b38760}{HDMI\_FC\_MASK2\_LOW\_PRI}} | \mbox{\hyperlink{dwc__hdmireg_8h_ae96e91366ec3758c3fba23bb529e9a5f}{HDMI\_FC\_MASK2\_HIGH\_PRI}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00112}00112 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00114}00114 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00115}\mbox{\hyperlink{dwc__hdmi_8c_a059d8b8f2962b92a04ccc4d4b8a06013}{00115}} \mbox{\hyperlink{dwc__hdmi_8c_a059d8b8f2962b92a04ccc4d4b8a06013}{dwc\_hdmi\_av\_composer}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00116}00116 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00117}00117         uint8\_t inv\_val;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00118}00118         \textcolor{keywordtype}{int} is\_dvi;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00119}00119         \textcolor{keywordtype}{int} hblank, vblank, hsync\_len, hfp, vfp;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00121}00121         \textcolor{comment}{/* Set up HDMI\_FC\_INVIDCONF */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00122}00122         inv\_val = ((sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.flags \& VID\_PVSYNC) ?}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00123}00123                 \mbox{\hyperlink{dwc__hdmireg_8h_a16863e1f2ed1a6c58107b5c8ec61db5c}{HDMI\_FC\_INVIDCONF\_VSYNC\_IN\_POLARITY\_ACTIVE\_HIGH}} :}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00124}00124                 \mbox{\hyperlink{dwc__hdmireg_8h_a177d131332f96954471ffdcbc76e06f7}{HDMI\_FC\_INVIDCONF\_VSYNC\_IN\_POLARITY\_ACTIVE\_LOW}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00126}00126         inv\_val |= ((sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.flags \& VID\_PHSYNC) ?}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00127}00127                 \mbox{\hyperlink{dwc__hdmireg_8h_a2815fe3221439eb018297947e7026146}{HDMI\_FC\_INVIDCONF\_HSYNC\_IN\_POLARITY\_ACTIVE\_HIGH}} :}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00128}00128                 \mbox{\hyperlink{dwc__hdmireg_8h_ad0a4139db93822eb4900421b4787fec6}{HDMI\_FC\_INVIDCONF\_HSYNC\_IN\_POLARITY\_ACTIVE\_LOW}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00129}00129 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00130}00130         inv\_val |= \mbox{\hyperlink{dwc__hdmireg_8h_a444f3c225baabeece70cdd258049e097}{HDMI\_FC\_INVIDCONF\_DE\_IN\_POLARITY\_ACTIVE\_HIGH}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00131}00131 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00132}00132         inv\_val |= ((sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.flags \& VID\_INTERLACE) ?}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00133}00133                         \mbox{\hyperlink{dwc__hdmireg_8h_a87ed72fa47b5b9cc0949f17f217a293b}{HDMI\_FC\_INVIDCONF\_R\_V\_BLANK\_IN\_OSC\_ACTIVE\_HIGH}} :}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00134}00134                         \mbox{\hyperlink{dwc__hdmireg_8h_aa6e14ba8c1a0e115af32493ca08dc775}{HDMI\_FC\_INVIDCONF\_R\_V\_BLANK\_IN\_OSC\_ACTIVE\_LOW}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00136}00136         inv\_val |= ((sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.flags \& VID\_INTERLACE) ?}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00137}00137                 \mbox{\hyperlink{dwc__hdmireg_8h_a95be88494e02e94a5531e2b0e4e487eb}{HDMI\_FC\_INVIDCONF\_IN\_I\_P\_INTERLACED}} :}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00138}00138                 \mbox{\hyperlink{dwc__hdmireg_8h_ae04afb67bd485ef0fac67ad586e5f84f}{HDMI\_FC\_INVIDCONF\_IN\_I\_P\_PROGRESSIVE}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00140}00140         \textcolor{comment}{/* TODO: implement HDMI part */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00141}00141         is\_dvi = sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_acf790c8b610a3002bf92398fb5430387}{sc\_has\_audio}} == 0;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00142}00142         inv\_val |= (is\_dvi ?}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00143}00143                 \mbox{\hyperlink{dwc__hdmireg_8h_ae26bf6a0439c158202cf5eb68d7d1080}{HDMI\_FC\_INVIDCONF\_DVI\_MODEZ\_DVI\_MODE}} :}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00144}00144                 \mbox{\hyperlink{dwc__hdmireg_8h_a561e1903674370a3e76e162c98ccd7db}{HDMI\_FC\_INVIDCONF\_DVI\_MODEZ\_HDMI\_MODE}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00146}00146         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ab84987e712609b532ba3eb602163cb53}{HDMI\_FC\_INVIDCONF}}, inv\_val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00148}00148         \textcolor{comment}{/* Set up horizontal active pixel region width */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00149}00149         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_aabf5e711b2eedead1a34d080943b5ca1}{HDMI\_FC\_INHACTV1}}, sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.hdisplay >> 8);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00150}00150         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a1d2d384fdf9a77c025b156ea38a01ad4}{HDMI\_FC\_INHACTV0}}, sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.hdisplay);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00151}00151 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00152}00152         \textcolor{comment}{/* Set up vertical blanking pixel region width */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00153}00153         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac9b3502a650378c1b6aacb631e35dbf1}{HDMI\_FC\_INVACTV1}}, sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.vdisplay >> 8);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00154}00154         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a7aa8f9143fd074234fae81760499e926}{HDMI\_FC\_INVACTV0}}, sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.vdisplay);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00156}00156         \textcolor{comment}{/* Set up horizontal blanking pixel region width */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00157}00157         hblank = sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.htotal -\/ sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.hdisplay;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00158}00158         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a2fbaa7f8ae18eda0e6e18493988123fb}{HDMI\_FC\_INHBLANK1}}, hblank >> 8);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00159}00159         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ab49360223105523c3d6da2296b6ac1c8}{HDMI\_FC\_INHBLANK0}}, hblank);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00160}00160 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00161}00161         \textcolor{comment}{/* Set up vertical blanking pixel region width */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00162}00162         vblank = sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.vtotal -\/ sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.vdisplay;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00163}00163         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac3177f545ce4b0c658b13bb3dc60a977}{HDMI\_FC\_INVBLANK}}, vblank);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00165}00165         \textcolor{comment}{/* Set up HSYNC active edge delay width (in pixel clks) */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00166}00166         hfp = sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.hsync\_start -\/ sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.hdisplay;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00167}00167         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a140dca8054c98b59714972c85b026461}{HDMI\_FC\_HSYNCINDELAY1}}, hfp >> 8);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00168}00168         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a6f5868c4b844bd904870c20f6b23cdea}{HDMI\_FC\_HSYNCINDELAY0}}, hfp);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00169}00169 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00170}00170         \textcolor{comment}{/* Set up VSYNC active edge delay (in pixel clks) */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00171}00171         vfp = sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.vsync\_start -\/ sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.vdisplay;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00172}00172         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a4fbce3a9a5a951df821994e8533ce3d4}{HDMI\_FC\_VSYNCINDELAY}}, vfp);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00173}00173 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00174}00174         hsync\_len = (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.hsync\_end -\/ sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.hsync\_start);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00175}00175         \textcolor{comment}{/* Set up HSYNC active pulse width (in pixel clks) */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00176}00176         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a995d3812d80c7fbcb65b22dc4a3a0ad8}{HDMI\_FC\_HSYNCINWIDTH1}}, hsync\_len >> 8);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00177}00177         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a42e20d7c26dad28b691de2c4128dae8c}{HDMI\_FC\_HSYNCINWIDTH0}}, hsync\_len);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00178}00178 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00179}00179         \textcolor{comment}{/* Set up VSYNC active edge delay (in pixel clks) */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00180}00180         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a531fc89eb165965aac483f4edc7c11e6}{HDMI\_FC\_VSYNCINWIDTH}}, (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.vsync\_end -\/ sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.vsync\_start));}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00181}00181 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00182}00182 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00183}00183 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00184}\mbox{\hyperlink{dwc__hdmi_8c_acc1c2f9de1f1e1d0291f299e719540ce}{00184}} \mbox{\hyperlink{dwc__hdmi_8c_acc1c2f9de1f1e1d0291f299e719540ce}{dwc\_hdmi\_phy\_enable\_power}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc, uint8\_t \mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}})}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00185}00185 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00186}00186         uint8\_t reg;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00188}00188         reg = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00189}00189         reg \&= \string~HDMI\_PHY\_CONF0\_PDZ\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00190}00190         reg |= (\mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}} << \mbox{\hyperlink{dwc__hdmireg_8h_abb1f42b9712daba74e951c3106f53f22}{HDMI\_PHY\_CONF0\_PDZ\_OFFSET}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00191}00191         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}}, reg);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00192}00192 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00194}00194 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00195}\mbox{\hyperlink{dwc__hdmi_8c_a28f92d58d6695548b6a1b21c36d3f4fe}{00195}} \mbox{\hyperlink{dwc__hdmi_8c_a28f92d58d6695548b6a1b21c36d3f4fe}{dwc\_hdmi\_phy\_enable\_tmds}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc, uint8\_t \mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}})}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00196}00196 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00197}00197         uint8\_t reg;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00198}00198 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00199}00199         reg = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00200}00200         reg \&= \string~HDMI\_PHY\_CONF0\_ENTMDS\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00201}00201         reg |= (\mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}} << \mbox{\hyperlink{dwc__hdmireg_8h_a59d6fd03fe1c96d1d2bb5701d86d74e9}{HDMI\_PHY\_CONF0\_ENTMDS\_OFFSET}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00202}00202         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}}, reg);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00203}00203 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00205}00205 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00206}\mbox{\hyperlink{dwc__hdmi_8c_adc469ca9ffe4a138e0858a20eeff4dc9}{00206}} \mbox{\hyperlink{dwc__hdmi_8c_adc469ca9ffe4a138e0858a20eeff4dc9}{dwc\_hdmi\_phy\_gen2\_pddq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc, uint8\_t \mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}})}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00207}00207 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00208}00208         uint8\_t reg;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00209}00209 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00210}00210         reg = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00211}00211         reg \&= \string~HDMI\_PHY\_CONF0\_GEN2\_PDDQ\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00212}00212         reg |= (\mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}} << \mbox{\hyperlink{dwc__hdmireg_8h_aee75492dcd4d66c849eb22b8b65f54c9}{HDMI\_PHY\_CONF0\_GEN2\_PDDQ\_OFFSET}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00213}00213         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}}, reg);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00214}00214 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00215}00215 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00216}00216 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00217}\mbox{\hyperlink{dwc__hdmi_8c_a9a6463889196ce2113f68e0186923570}{00217}} \mbox{\hyperlink{dwc__hdmi_8c_a9a6463889196ce2113f68e0186923570}{dwc\_hdmi\_phy\_gen2\_txpwron}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc, uint8\_t \mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}})}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00218}00218 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00219}00219         uint8\_t reg;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00220}00220 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00221}00221         reg = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00222}00222         reg \&= \string~HDMI\_PHY\_CONF0\_GEN2\_TXPWRON\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00223}00223         reg |= (\mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}} << \mbox{\hyperlink{dwc__hdmireg_8h_a5c9397db082e7b0e78e4661c5dd42911}{HDMI\_PHY\_CONF0\_GEN2\_TXPWRON\_OFFSET}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00224}00224         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}}, reg);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00225}00225 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00227}00227 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00228}\mbox{\hyperlink{dwc__hdmi_8c_a2a2eacab195b0e97862261831fb0a60e}{00228}} \mbox{\hyperlink{dwc__hdmi_8c_a2a2eacab195b0e97862261831fb0a60e}{dwc\_hdmi\_phy\_sel\_data\_en\_pol}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc, uint8\_t \mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}})}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00229}00229 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00230}00230         uint8\_t reg;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00232}00232         reg = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00233}00233         reg \&= \string~HDMI\_PHY\_CONF0\_SELDATAENPOL\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00234}00234         reg |= (\mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}} << \mbox{\hyperlink{dwc__hdmireg_8h_ac2899ba16874b9e3f6d521218cbff4a7}{HDMI\_PHY\_CONF0\_SELDATAENPOL\_OFFSET}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00235}00235         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}}, reg);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00236}00236 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00237}00237 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00238}00238 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00239}\mbox{\hyperlink{dwc__hdmi_8c_ab72100e69f36f056bf4b883f11f31fd2}{00239}} \mbox{\hyperlink{dwc__hdmi_8c_ab72100e69f36f056bf4b883f11f31fd2}{dwc\_hdmi\_phy\_sel\_interface\_control}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc, uint8\_t \mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}})}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00240}00240 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00241}00241         uint8\_t reg;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00243}00243         reg = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00244}00244         reg \&= \string~HDMI\_PHY\_CONF0\_SELDIPIF\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00245}00245         reg |= (\mbox{\hyperlink{hdmi__if_8m_a276be3302af2567cc38aa8c5b1c797df}{enable}} << \mbox{\hyperlink{dwc__hdmireg_8h_a02389455061804214248e58bb215429d}{HDMI\_PHY\_CONF0\_SELDIPIF\_OFFSET}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00246}00246         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af7a71870a423dab6ce6e00aabad666f8}{HDMI\_PHY\_CONF0}}, reg);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00247}00247 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00248}00248 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00249}00249 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00250}\mbox{\hyperlink{dwc__hdmi_8c_a1027940aab435b42f586e7829dac5a8f}{00250}} \mbox{\hyperlink{dwc__hdmi_8c_a1027940aab435b42f586e7829dac5a8f}{dwc\_hdmi\_phy\_test\_clear}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} bit)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00251}00251 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00252}00252         uint8\_t val;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00254}00254         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ab109afe334e66cb8b0c32bc90936f4ec}{HDMI\_PHY\_TST0}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00255}00255         val \&= \string~HDMI\_PHY\_TST0\_TSTCLR\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00256}00256         val |= (bit << \mbox{\hyperlink{dwc__hdmireg_8h_a965241bab5f2ecc61860e05c8e5e159e}{HDMI\_PHY\_TST0\_TSTCLR\_OFFSET}}) \&}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00257}00257                 \mbox{\hyperlink{dwc__hdmireg_8h_aeb9cbae9d750d518003035e6c8041327}{HDMI\_PHY\_TST0\_TSTCLR\_MASK}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00258}00258         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ab109afe334e66cb8b0c32bc90936f4ec}{HDMI\_PHY\_TST0}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00259}00259 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00260}00260 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00261}00261 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00262}\mbox{\hyperlink{dwc__hdmi_8c_a3b15453eb1486489e39d265fd0d40c2a}{00262}} \mbox{\hyperlink{dwc__hdmi_8c_a3b15453eb1486489e39d265fd0d40c2a}{dwc\_hdmi\_clear\_overflow}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00263}00263 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00264}00264         \textcolor{keywordtype}{int} count;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00265}00265         uint8\_t val;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00267}00267         \textcolor{comment}{/* TMDS software reset */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00268}00268         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ace5bc642a68fc6dc44da89d74c43c213}{HDMI\_MC\_SWRSTZ}}, (uint8\_t)\string~\mbox{\hyperlink{dwc__hdmireg_8h_ae59d4a57135ee9d211923a556c9a02e8}{HDMI\_MC\_SWRSTZ\_TMDSSWRST\_REQ}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00269}00269 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00270}00270         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ab84987e712609b532ba3eb602163cb53}{HDMI\_FC\_INVIDCONF}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00271}00271 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00272}00272         \textcolor{keywordflow}{for} (count = 0 ; count < 4 ; count++)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00273}00273                 \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ab84987e712609b532ba3eb602163cb53}{HDMI\_FC\_INVIDCONF}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00274}00274 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00276}00276 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00277}\mbox{\hyperlink{dwc__hdmi_8c_acd09ffbe01cebec9aab702b75acc7903}{00277}} \mbox{\hyperlink{dwc__hdmi_8c_acd09ffbe01cebec9aab702b75acc7903}{dwc\_hdmi\_phy\_configure}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00278}00278 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00279}00279         uint8\_t val;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00280}00280         uint8\_t msec;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00281}00281 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00282}00282         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a022621e26332093f11602d95b1c8dea8}{HDMI\_MC\_FLOWCTRL}}, \mbox{\hyperlink{dwc__hdmireg_8h_a4533045423fa53eeb165f42fc9cab379}{HDMI\_MC\_FLOWCTRL\_FEED\_THROUGH\_OFF\_CSC\_BYPASS}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00283}00283 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00284}00284         \textcolor{comment}{/* gen2 tx power off */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00285}00285         \mbox{\hyperlink{dwc__hdmi_8c_a9a6463889196ce2113f68e0186923570}{dwc\_hdmi\_phy\_gen2\_txpwron}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00286}00286 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00287}00287         \textcolor{comment}{/* gen2 pddq */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00288}00288         \mbox{\hyperlink{dwc__hdmi_8c_adc469ca9ffe4a138e0858a20eeff4dc9}{dwc\_hdmi\_phy\_gen2\_pddq}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00290}00290         \textcolor{comment}{/* PHY reset */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00291}00291         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a0daeca5ffb8113ab9934af3685ebc3c7}{HDMI\_MC\_PHYRSTZ}}, \mbox{\hyperlink{dwc__hdmireg_8h_a2f9e3810a60800e832dc7409a7786829}{HDMI\_MC\_PHYRSTZ\_DEASSERT}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00292}00292         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a0daeca5ffb8113ab9934af3685ebc3c7}{HDMI\_MC\_PHYRSTZ}}, \mbox{\hyperlink{dwc__hdmireg_8h_af6c62b6f3f97889b9e8a9abb30624f96}{HDMI\_MC\_PHYRSTZ\_ASSERT}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00293}00293 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00294}00294         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_aa06b714bbd8bc27099b78591c561cb88}{HDMI\_MC\_HEACPHY\_RST}}, \mbox{\hyperlink{dwc__hdmireg_8h_ace36a2e3ae1fc2b949fe3c857c49b536}{HDMI\_MC\_HEACPHY\_RST\_ASSERT}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00295}00295 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00296}00296         \mbox{\hyperlink{dwc__hdmi_8c_a1027940aab435b42f586e7829dac5a8f}{dwc\_hdmi\_phy\_test\_clear}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00297}00297         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a919549353b78f2a9138e6fe07845fdea}{HDMI\_PHY\_I2CM\_SLAVE\_ADDR}}, \mbox{\hyperlink{dwc__hdmireg_8h_a1090f952e35512a46fea5d23adbb8479}{HDMI\_PHY\_I2CM\_SLAVE\_ADDR\_PHY\_GEN2}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00298}00298         \mbox{\hyperlink{dwc__hdmi_8c_a1027940aab435b42f586e7829dac5a8f}{dwc\_hdmi\_phy\_test\_clear}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00300}00300         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00301}00301 \textcolor{comment}{         * Following initialization are for 8bit per color case}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00302}00302 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00303}00303 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00304}00304         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00305}00305 \textcolor{comment}{         * PLL/MPLL config, see section 24.7.22 in TRM}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00306}00306 \textcolor{comment}{         *  config, see section 24.7.22}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00307}00307 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00308}00308         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock*1000 <= 45250000) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00309}00309                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a7696cddaeccfac007e27c4eda8f40dbc}{CPCE\_CTRL\_45\_25}}, \mbox{\hyperlink{dwc__hdmireg_8h_a2e49c7224a24eac7c3bc45b9c8b10111}{HDMI\_PHY\_I2C\_CPCE\_CTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00310}00310                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af9ee7ff94fb8f0186fbf21a838cdc6ab}{GMPCTRL\_45\_25}}, \mbox{\hyperlink{dwc__hdmireg_8h_a2b15be0564a5bd7e8399e2947adc681a}{HDMI\_PHY\_I2C\_GMPCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00311}00311         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock*1000 <= 92500000) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00312}00312                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a5e0d750ed171ac2853583614b55958ee}{CPCE\_CTRL\_92\_50}}, \mbox{\hyperlink{dwc__hdmireg_8h_a2e49c7224a24eac7c3bc45b9c8b10111}{HDMI\_PHY\_I2C\_CPCE\_CTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00313}00313                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a1a9dc44fc0fa40d2faec5cdf77cf5bb3}{GMPCTRL\_92\_50}}, \mbox{\hyperlink{dwc__hdmireg_8h_a2b15be0564a5bd7e8399e2947adc681a}{HDMI\_PHY\_I2C\_GMPCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00314}00314         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock*1000 <= 185000000) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00315}00315                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a85e7ff41fbc97523c63cef042a3b3f90}{CPCE\_CTRL\_185}}, \mbox{\hyperlink{dwc__hdmireg_8h_a2e49c7224a24eac7c3bc45b9c8b10111}{HDMI\_PHY\_I2C\_CPCE\_CTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00316}00316                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a24537432237a4c9c1acc540aba581845}{GMPCTRL\_185}}, \mbox{\hyperlink{dwc__hdmireg_8h_a2b15be0564a5bd7e8399e2947adc681a}{HDMI\_PHY\_I2C\_GMPCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00317}00317         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00318}00318                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a233cc231dec650f17b661681b0663080}{CPCE\_CTRL\_370}}, \mbox{\hyperlink{dwc__hdmireg_8h_a2e49c7224a24eac7c3bc45b9c8b10111}{HDMI\_PHY\_I2C\_CPCE\_CTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00319}00319                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a494a5543e76db36b728acd3ea5b043d5}{GMPCTRL\_370}}, \mbox{\hyperlink{dwc__hdmireg_8h_a2b15be0564a5bd7e8399e2947adc681a}{HDMI\_PHY\_I2C\_GMPCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00320}00320         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00321}00321 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00322}00322         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00323}00323 \textcolor{comment}{         * Values described in TRM section 34.9.2 PLL/MPLL Generic}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00324}00324 \textcolor{comment}{         *    Configuration Settings. Table 34-\/23.}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00325}00325 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00326}00326         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock*1000 <= 54000000) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00327}00327                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, 0x091c, \mbox{\hyperlink{dwc__hdmireg_8h_ad74306cce761580feb005f82ac0302c8}{HDMI\_PHY\_I2C\_CURRCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00328}00328         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock*1000 <= 58400000) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00329}00329                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, 0x091c, \mbox{\hyperlink{dwc__hdmireg_8h_ad74306cce761580feb005f82ac0302c8}{HDMI\_PHY\_I2C\_CURRCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00330}00330         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock*1000 <= 72000000) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00331}00331                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, 0x06dc, \mbox{\hyperlink{dwc__hdmireg_8h_ad74306cce761580feb005f82ac0302c8}{HDMI\_PHY\_I2C\_CURRCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00332}00332         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock*1000 <= 74250000) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00333}00333                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, 0x06dc, \mbox{\hyperlink{dwc__hdmireg_8h_ad74306cce761580feb005f82ac0302c8}{HDMI\_PHY\_I2C\_CURRCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00334}00334         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock*1000 <= 118800000) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00335}00335                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, 0x091c, \mbox{\hyperlink{dwc__hdmireg_8h_ad74306cce761580feb005f82ac0302c8}{HDMI\_PHY\_I2C\_CURRCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00336}00336         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock*1000 <= 216000000) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00337}00337                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, 0x06dc, \mbox{\hyperlink{dwc__hdmireg_8h_ad74306cce761580feb005f82ac0302c8}{HDMI\_PHY\_I2C\_CURRCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00338}00338         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00339}00339                 panic(\textcolor{stringliteral}{"{}Unsupported mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00340}00340         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00341}00341 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00342}00342         \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, 0x0000, \mbox{\hyperlink{dwc__hdmireg_8h_a6478747a6930cd706a17260562838c95}{HDMI\_PHY\_I2C\_PLLPHBYCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00343}00343         \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_aba90a4ce72db3f09d14b84906d0f822e}{MSM\_CTRL\_FB\_CLK}}, \mbox{\hyperlink{dwc__hdmireg_8h_aeeecff55d5d3496a3047b926fa8aba48}{HDMI\_PHY\_I2C\_MSM\_CTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00344}00344         \textcolor{comment}{/* RESISTANCE TERM 133 Ohm */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00345}00345         \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a1417760cd8a60aa5f9a7a1d5a269f9de}{TXTERM\_133}}, \mbox{\hyperlink{dwc__hdmireg_8h_abcd16cdb46ab485e5df3391f5d76f201}{HDMI\_PHY\_I2C\_TXTERM}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00347}00347         \textcolor{comment}{/* REMOVE CLK TERM */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00348}00348         \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_aff34417b95f0f8963037f184fd70f0ee}{CKCALCTRL\_OVERRIDE}}, \mbox{\hyperlink{dwc__hdmireg_8h_a7089f7ca70092826bac48b79cd729220}{HDMI\_PHY\_I2C\_CKCALCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00349}00349 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00350}00350         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock*1000 > 148500000) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00351}00351                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc,\mbox{\hyperlink{dwc__hdmireg_8h_a7ba4f6cce0cdb129be4c01bb4255271a}{CKSYMTXCTRL\_OVERRIDE}} | \mbox{\hyperlink{dwc__hdmireg_8h_a98eee4856eb3bedaab345f1f12e117db}{CKSYMTXCTRL\_TX\_SYMON}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00352}00352                     \mbox{\hyperlink{dwc__hdmireg_8h_a367577a7b349faeb41d9d35e7ca9c573}{CKSYMTXCTRL\_TX\_TRBON}} | \mbox{\hyperlink{dwc__hdmireg_8h_ad6c6b9c0179f38da7333c0e72e7dc19c}{CKSYMTXCTRL\_TX\_CK\_SYMON}}, \mbox{\hyperlink{dwc__hdmireg_8h_a72427dc49df8553dc35d323d94cc8b82}{HDMI\_PHY\_I2C\_CKSYMTXCTRL}}); }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00353}00353                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_afcdb58871a4dc0f3909bc7d84cee8815}{VLEVCTRL\_TX\_LVL}}(9) | \mbox{\hyperlink{dwc__hdmireg_8h_a7adc5b2ea8e065f998e7ec1428466a8e}{VLEVCTRL\_CK\_LVL}}(9),}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00354}00354                     \mbox{\hyperlink{dwc__hdmireg_8h_ad3391c1b3c619c5fb56237810b71696b}{HDMI\_PHY\_I2C\_VLEVCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00355}00355         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00356}00356                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc,\mbox{\hyperlink{dwc__hdmireg_8h_a7ba4f6cce0cdb129be4c01bb4255271a}{CKSYMTXCTRL\_OVERRIDE}} | \mbox{\hyperlink{dwc__hdmireg_8h_a98eee4856eb3bedaab345f1f12e117db}{CKSYMTXCTRL\_TX\_SYMON}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00357}00357                     \mbox{\hyperlink{dwc__hdmireg_8h_a38640271512230a65f1510d51f08a2ff}{CKSYMTXCTRL\_TX\_TRAON}} | \mbox{\hyperlink{dwc__hdmireg_8h_ad6c6b9c0179f38da7333c0e72e7dc19c}{CKSYMTXCTRL\_TX\_CK\_SYMON}}, \mbox{\hyperlink{dwc__hdmireg_8h_a72427dc49df8553dc35d323d94cc8b82}{HDMI\_PHY\_I2C\_CKSYMTXCTRL}}); }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00358}00358                 \mbox{\hyperlink{dwc__hdmi_8c_a719c6c9697b46b68127e1c8145622a19}{dwc\_hdmi\_phy\_i2c\_write}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_afcdb58871a4dc0f3909bc7d84cee8815}{VLEVCTRL\_TX\_LVL}}(13) | \mbox{\hyperlink{dwc__hdmireg_8h_a7adc5b2ea8e065f998e7ec1428466a8e}{VLEVCTRL\_CK\_LVL}}(13),}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00359}00359                     \mbox{\hyperlink{dwc__hdmireg_8h_ad3391c1b3c619c5fb56237810b71696b}{HDMI\_PHY\_I2C\_VLEVCTRL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00360}00360         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00361}00361 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00362}00362         \mbox{\hyperlink{dwc__hdmi_8c_acc1c2f9de1f1e1d0291f299e719540ce}{dwc\_hdmi\_phy\_enable\_power}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00363}00363 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00364}00364         \textcolor{comment}{/* toggle TMDS enable */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00365}00365         \mbox{\hyperlink{dwc__hdmi_8c_a28f92d58d6695548b6a1b21c36d3f4fe}{dwc\_hdmi\_phy\_enable\_tmds}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00366}00366         \mbox{\hyperlink{dwc__hdmi_8c_a28f92d58d6695548b6a1b21c36d3f4fe}{dwc\_hdmi\_phy\_enable\_tmds}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00368}00368         \textcolor{comment}{/* gen2 tx power on */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00369}00369         \mbox{\hyperlink{dwc__hdmi_8c_a9a6463889196ce2113f68e0186923570}{dwc\_hdmi\_phy\_gen2\_txpwron}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00370}00370         \mbox{\hyperlink{dwc__hdmi_8c_adc469ca9ffe4a138e0858a20eeff4dc9}{dwc\_hdmi\_phy\_gen2\_pddq}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00371}00371 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00372}00372         \textcolor{comment}{/*Wait for PHY PLL lock */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00373}00373         msec = 4;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00374}00374         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ae7d63b689a6765f236ea6f960536ee3b}{HDMI\_PHY\_STAT0}}) \& \mbox{\hyperlink{dwc__hdmireg_8h_a3f7ac2bddbfb4f198611f5b1b526c724}{HDMI\_PHY\_TX\_PHY\_LOCK}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00375}00375         \textcolor{keywordflow}{while} (val == 0) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00376}00376                 DELAY(1000);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00377}00377                 \textcolor{keywordflow}{if} (msec-\/-\/ == 0) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00378}00378                         device\_printf(sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}}, \textcolor{stringliteral}{"{}PHY PLL not locked\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00379}00379                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00380}00380                 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00381}00381                 val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ae7d63b689a6765f236ea6f960536ee3b}{HDMI\_PHY\_STAT0}}) \& \mbox{\hyperlink{dwc__hdmireg_8h_a3f7ac2bddbfb4f198611f5b1b526c724}{HDMI\_PHY\_TX\_PHY\_LOCK}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00382}00382         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00383}00383 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00384}00384         \textcolor{keywordflow}{return} \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00385}00385 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00386}00386 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00387}00387 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00388}\mbox{\hyperlink{dwc__hdmi_8c_a15b699c29c9548197a695fa95e911764}{00388}} \mbox{\hyperlink{dwc__hdmi_8c_a15b699c29c9548197a695fa95e911764}{dwc\_hdmi\_phy\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00389}00389 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00390}00390         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00391}00391 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00392}00392         \textcolor{comment}{/* HDMI Phy spec says to do the phy initialization sequence twice */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00393}00393         \textcolor{keywordflow}{for} (i = 0 ; i < 2 ; i++) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00394}00394                 \mbox{\hyperlink{dwc__hdmi_8c_a2a2eacab195b0e97862261831fb0a60e}{dwc\_hdmi\_phy\_sel\_data\_en\_pol}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00395}00395                 \mbox{\hyperlink{dwc__hdmi_8c_ab72100e69f36f056bf4b883f11f31fd2}{dwc\_hdmi\_phy\_sel\_interface\_control}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00396}00396                 \mbox{\hyperlink{dwc__hdmi_8c_a28f92d58d6695548b6a1b21c36d3f4fe}{dwc\_hdmi\_phy\_enable\_tmds}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00397}00397                 \mbox{\hyperlink{dwc__hdmi_8c_acc1c2f9de1f1e1d0291f299e719540ce}{dwc\_hdmi\_phy\_enable\_power}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00398}00398 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00399}00399                 \textcolor{comment}{/* Enable CSC */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00400}00400                 \mbox{\hyperlink{dwc__hdmi_8c_acd09ffbe01cebec9aab702b75acc7903}{dwc\_hdmi\_phy\_configure}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00401}00401         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00402}00402 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00403}00403 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00404}00404 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00405}\mbox{\hyperlink{dwc__hdmi_8c_a98b086714bdc023f147f2a04da2a4ffa}{00405}} \mbox{\hyperlink{dwc__hdmi_8c_a98b086714bdc023f147f2a04da2a4ffa}{dwc\_hdmi\_enable\_video\_path}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00406}00406 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00407}00407         uint8\_t clkdis;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00408}00408 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00409}00409         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00410}00410 \textcolor{comment}{         * Control period timing}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00411}00411 \textcolor{comment}{         * Values are minimal according to HDMI spec 1.4a}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00412}00412 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00413}00413         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a5d4b254d1154421b065a0920c701fa17}{HDMI\_FC\_CTRLDUR}}, 12);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00414}00414         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ad12653d15bbde50519e62c6874e213b7}{HDMI\_FC\_EXCTRLDUR}}, 32);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00415}00415         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a755a59f225efa7cff05e85d3c3b616b7}{HDMI\_FC\_EXCTRLSPAC}}, 1);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00417}00417         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00418}00418 \textcolor{comment}{         * Bits to fill data lines not used to transmit preamble}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00419}00419 \textcolor{comment}{         * for channels 0, 1, and 2 respectively}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00420}00420 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00421}00421         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a9ea6a727caeff2633eda0a7f26c911e5}{HDMI\_FC\_CH0PREAM}}, 0x0B);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00422}00422         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a4157b315b3681891dd41e1a71831ea08}{HDMI\_FC\_CH1PREAM}}, 0x16);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00423}00423         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_afff78fec9687143a7f1fcb6fc4093c6c}{HDMI\_FC\_CH2PREAM}}, 0x21);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00424}00424 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00425}00425         \textcolor{comment}{/* Save CEC clock */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00426}00426         clkdis = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ad793a5904158af0cd2fd7544659dc4cc}{HDMI\_MC\_CLKDIS}}) \& \mbox{\hyperlink{dwc__hdmireg_8h_a9076206387ee2c41c9de3096d9cb6645}{HDMI\_MC\_CLKDIS\_CECCLK\_DISABLE}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00427}00427         clkdis |= \string~HDMI\_MC\_CLKDIS\_CECCLK\_DISABLE;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00428}00428 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00429}00429         \textcolor{comment}{/* Enable pixel clock and tmds data path */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00430}00430         clkdis \&= \string~HDMI\_MC\_CLKDIS\_PIXELCLK\_DISABLE;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00431}00431         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ad793a5904158af0cd2fd7544659dc4cc}{HDMI\_MC\_CLKDIS}}, clkdis);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00432}00432 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00433}00433         clkdis \&= \string~HDMI\_MC\_CLKDIS\_TMDSCLK\_DISABLE;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00434}00434         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ad793a5904158af0cd2fd7544659dc4cc}{HDMI\_MC\_CLKDIS}}, clkdis);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00435}00435 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00436}00436 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00437}00437 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00438}\mbox{\hyperlink{dwc__hdmi_8c_a01218fb60f6c910e76b5c6457d564a3f}{00438}} \mbox{\hyperlink{dwc__hdmi_8c_a01218fb60f6c910e76b5c6457d564a3f}{dwc\_hdmi\_configure\_audio}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00439}00439 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00440}00440         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} n;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00441}00441         uint8\_t val;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00443}00443         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_acf790c8b610a3002bf92398fb5430387}{sc\_has\_audio}} == 0)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00444}00444                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00445}00445 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00446}00446         \textcolor{comment}{/* The following values are for 48 kHz */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00447}00447         \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}.dot\_clock) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00448}00448         \textcolor{keywordflow}{case} 25170:}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00449}00449                 n = 6864;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00450}00450                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00451}00451         \textcolor{keywordflow}{case} 27020:}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00452}00452                 n = 6144;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00453}00453                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00454}00454         \textcolor{keywordflow}{case} 74170:}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00455}00455                 n = 11648;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00456}00456                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00457}00457         \textcolor{keywordflow}{case} 148350:}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00458}00458                 n = 5824;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00459}00459                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00460}00460         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00461}00461                 n = 6144;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00462}00462                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00463}00463         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00464}00464 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00465}00465         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a88281655a637c6cef196b4d291d9c7a1}{HDMI\_AUD\_N1}}, (n >> 0) \& 0xff);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00466}00466         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a735094da2059f97d67ff18a55c58aac2}{HDMI\_AUD\_N2}}, (n >> 8) \& 0xff);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00467}00467         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac4011f9095ed126f307ed31500ab7f7a}{HDMI\_AUD\_N3}}, (n >> 16) \& 0xff);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00469}00469         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a32e9fa5b3d6216e6f45adffd7902072e}{HDMI\_AUD\_CTS3}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00470}00470         val \&= \string~(\mbox{\hyperlink{dwc__hdmireg_8h_a885ff783c30b985a5003b59fd6bb63c5}{HDMI\_AUD\_CTS3\_N\_SHIFT\_MASK}} | \mbox{\hyperlink{dwc__hdmireg_8h_af7a81e2631974d3750009b6d380ea997}{HDMI\_AUD\_CTS3\_CTS\_MANUAL}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00471}00471         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a32e9fa5b3d6216e6f45adffd7902072e}{HDMI\_AUD\_CTS3}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00472}00472 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00473}00473         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_afc478b50c6e6d409f99c8f26495790b4}{HDMI\_AUD\_CONF0}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00474}00474         val \&= \string~HDMI\_AUD\_CONF0\_INTERFACE\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00475}00475         val |= \mbox{\hyperlink{dwc__hdmireg_8h_a013879704863ad9e84d6e1b89453948d}{HDMI\_AUD\_CONF0\_INTERFACE\_IIS}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00476}00476         val \&= \string~HDMI\_AUD\_CONF0\_I2SINEN\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00477}00477         val |= \mbox{\hyperlink{dwc__hdmireg_8h_a07fadc1515312468a26c8a10aa8f722c}{HDMI\_AUD\_CONF0\_I2SINEN\_CH2}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00478}00478         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_afc478b50c6e6d409f99c8f26495790b4}{HDMI\_AUD\_CONF0}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00479}00479 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00480}00480         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a253c2144f122789a23bc723c23541b6d}{HDMI\_AUD\_CONF1}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00481}00481         val \&= \string~HDMI\_AUD\_CONF1\_DATAMODE\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00482}00482         val |= \mbox{\hyperlink{dwc__hdmireg_8h_aed19450a39ba657e283588b1f0d1771e}{HDMI\_AUD\_CONF1\_DATAMODE\_IIS}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00483}00483         val \&= \string~HDMI\_AUD\_CONF1\_DATWIDTH\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00484}00484         val |= \mbox{\hyperlink{dwc__hdmireg_8h_ab910199bb0cfe06e82a4f942d1475b0c}{HDMI\_AUD\_CONF1\_DATWIDTH\_16BIT}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00485}00485         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a253c2144f122789a23bc723c23541b6d}{HDMI\_AUD\_CONF1}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00486}00486 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00487}00487         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ab58371184bd7b19a03f24c4e638d9566}{HDMI\_AUD\_INPUTCLKFS}}, \mbox{\hyperlink{dwc__hdmireg_8h_a8e54b020788947c6d3ab5b090e1ae606}{HDMI\_AUD\_INPUTCLKFS\_64}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00488}00488 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00489}00489         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_aa2dcd02135ff2ea4e718a7bffd868603}{HDMI\_FC\_AUDICONF0}}, 1 << 4); \textcolor{comment}{/* CC=1 */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00490}00490         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a60018dddf4fe2090a18014335c9da28c}{HDMI\_FC\_AUDICONF1}}, 0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00491}00491         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a555dace2b8ade84409d82f66dd313933}{HDMI\_FC\_AUDICONF2}}, 0);              \textcolor{comment}{/* CA=0 */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00492}00492         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a66c0ae02a803b0cdae8c23b2c20f091c}{HDMI\_FC\_AUDICONF3}}, 0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00493}00493         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a871865f21ac9e24103b6ddfa562e5eae}{HDMI\_FC\_AUDSV}}, 0xee);           \textcolor{comment}{/* channels valid */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00494}00494 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00495}00495         \textcolor{comment}{/* Enable audio clock */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00496}00496         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ad793a5904158af0cd2fd7544659dc4cc}{HDMI\_MC\_CLKDIS}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00497}00497         val \&= \string~HDMI\_MC\_CLKDIS\_AUDCLK\_DISABLE;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00498}00498         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ad793a5904158af0cd2fd7544659dc4cc}{HDMI\_MC\_CLKDIS}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00499}00499 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00500}00500 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00501}00501 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00502}\mbox{\hyperlink{dwc__hdmi_8c_a927cbafcdf7b1aefd39a38a4ad00b1a0}{00502}} \mbox{\hyperlink{dwc__hdmi_8c_a927cbafcdf7b1aefd39a38a4ad00b1a0}{dwc\_hdmi\_video\_packetize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00503}00503 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00504}00504         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} color\_depth = 0;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00505}00505         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} remap\_size = \mbox{\hyperlink{dwc__hdmireg_8h_a206a213d21ddb9ab4022432040ccd9d3}{HDMI\_VP\_REMAP\_YCC422\_16BIT}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00506}00506         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} output\_select = \mbox{\hyperlink{dwc__hdmireg_8h_a923f7da81ee4bcfc2a7bef1bde0ef4dc}{HDMI\_VP\_CONF\_OUTPUT\_SELECTOR\_PP}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00507}00507         uint8\_t val;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00508}00508 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00509}00509         output\_select = \mbox{\hyperlink{dwc__hdmireg_8h_a21ba6f238d1cd511da08c4fe5f9ed40d}{HDMI\_VP\_CONF\_OUTPUT\_SELECTOR\_BYPASS}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00510}00510         color\_depth = 4;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00511}00511 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00512}00512         \textcolor{comment}{/* set the packetizer registers */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00513}00513         val = ((color\_depth << \mbox{\hyperlink{dwc__hdmireg_8h_a7db6370d6e53219e26b1638b83f08233}{HDMI\_VP\_PR\_CD\_COLOR\_DEPTH\_OFFSET}}) \&}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00514}00514                 \mbox{\hyperlink{dwc__hdmireg_8h_aebabdc9297112ed3ab94fa21a77c8180}{HDMI\_VP\_PR\_CD\_COLOR\_DEPTH\_MASK}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00515}00515         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac5b61f56cb4d0a1add777d6a772fc3a8}{HDMI\_VP\_PR\_CD}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00516}00516 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00517}00517         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a63a858d80494b7d176e384b28538901f}{HDMI\_VP\_STUFF}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00518}00518         val \&= \string~HDMI\_VP\_STUFF\_PR\_STUFFING\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00519}00519         val |= \mbox{\hyperlink{dwc__hdmireg_8h_a7bdd72cda6c9d8e2a935c54271b316c2}{HDMI\_VP\_STUFF\_PR\_STUFFING\_STUFFING\_MODE}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00520}00520         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a63a858d80494b7d176e384b28538901f}{HDMI\_VP\_STUFF}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00521}00521 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00522}00522         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac664de1b8bdb1e1f5df85a1d745823bc}{HDMI\_VP\_CONF}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00523}00523         val \&= \string~(\mbox{\hyperlink{dwc__hdmireg_8h_a3966cc5e23abc2072950db21a99cc349}{HDMI\_VP\_CONF\_PR\_EN\_MASK}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00524}00524                 \mbox{\hyperlink{dwc__hdmireg_8h_a44ed7ef93e7824a908020b01cbaa83c1}{HDMI\_VP\_CONF\_BYPASS\_SELECT\_MASK}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00525}00525         val |= \mbox{\hyperlink{dwc__hdmireg_8h_a84a7b6d10bed07c839d209be370385cd}{HDMI\_VP\_CONF\_PR\_EN\_DISABLE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00526}00526                 \mbox{\hyperlink{dwc__hdmireg_8h_a09db2703c4853535878b06d959ddb50f}{HDMI\_VP\_CONF\_BYPASS\_SELECT\_VID\_PACKETIZER}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00527}00527         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac664de1b8bdb1e1f5df85a1d745823bc}{HDMI\_VP\_CONF}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00528}00528 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00529}00529         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a63a858d80494b7d176e384b28538901f}{HDMI\_VP\_STUFF}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00530}00530         val \&= \string~HDMI\_VP\_STUFF\_IDEFAULT\_PHASE\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00531}00531         val |= 1 << \mbox{\hyperlink{dwc__hdmireg_8h_a56ff3b090e2527f7c700608e1057528b}{HDMI\_VP\_STUFF\_IDEFAULT\_PHASE\_OFFSET}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00532}00532         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a63a858d80494b7d176e384b28538901f}{HDMI\_VP\_STUFF}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00533}00533 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00534}00534         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ae93dc627487190ec30b5b22e8c86056b}{HDMI\_VP\_REMAP}}, remap\_size);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00535}00535 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00536}00536         \textcolor{keywordflow}{if} (output\_select == \mbox{\hyperlink{dwc__hdmireg_8h_a923f7da81ee4bcfc2a7bef1bde0ef4dc}{HDMI\_VP\_CONF\_OUTPUT\_SELECTOR\_PP}}) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00537}00537                 val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac664de1b8bdb1e1f5df85a1d745823bc}{HDMI\_VP\_CONF}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00538}00538                 val \&= \string~(\mbox{\hyperlink{dwc__hdmireg_8h_aa18de5db19f35c892e8e16b234ed3300}{HDMI\_VP\_CONF\_BYPASS\_EN\_MASK}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00539}00539                         \mbox{\hyperlink{dwc__hdmireg_8h_ae16174b729cad22f1e15d5a4ff385dff}{HDMI\_VP\_CONF\_PP\_EN\_ENMASK}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00540}00540                         \mbox{\hyperlink{dwc__hdmireg_8h_aa684510ed1082e520becb8800599f179}{HDMI\_VP\_CONF\_YCC422\_EN\_MASK}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00541}00541                 val |= \mbox{\hyperlink{dwc__hdmireg_8h_a31f57d0fbc54b9dc161da65eaa19b37a}{HDMI\_VP\_CONF\_BYPASS\_EN\_DISABLE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00542}00542                         \mbox{\hyperlink{dwc__hdmireg_8h_a4a701e3f3ab3131fb2f57d601bd92c35}{HDMI\_VP\_CONF\_PP\_EN\_ENABLE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00543}00543                         \mbox{\hyperlink{dwc__hdmireg_8h_a2e0bc7def949184675acab496eefd014}{HDMI\_VP\_CONF\_YCC422\_EN\_DISABLE}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00544}00544                 \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac664de1b8bdb1e1f5df85a1d745823bc}{HDMI\_VP\_CONF}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00545}00545         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (output\_select == \mbox{\hyperlink{dwc__hdmireg_8h_ad78e6a572b2cab7c154f8f02e31a16d0}{HDMI\_VP\_CONF\_OUTPUT\_SELECTOR\_YCC422}}) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00546}00546                 val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac664de1b8bdb1e1f5df85a1d745823bc}{HDMI\_VP\_CONF}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00547}00547                 val \&= \string~(\mbox{\hyperlink{dwc__hdmireg_8h_aa18de5db19f35c892e8e16b234ed3300}{HDMI\_VP\_CONF\_BYPASS\_EN\_MASK}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00548}00548                         \mbox{\hyperlink{dwc__hdmireg_8h_ae16174b729cad22f1e15d5a4ff385dff}{HDMI\_VP\_CONF\_PP\_EN\_ENMASK}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00549}00549                         \mbox{\hyperlink{dwc__hdmireg_8h_aa684510ed1082e520becb8800599f179}{HDMI\_VP\_CONF\_YCC422\_EN\_MASK}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00550}00550                 val |= \mbox{\hyperlink{dwc__hdmireg_8h_a31f57d0fbc54b9dc161da65eaa19b37a}{HDMI\_VP\_CONF\_BYPASS\_EN\_DISABLE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00551}00551                         \mbox{\hyperlink{dwc__hdmireg_8h_a292afd6782c1cfe00f323b5ac4c7490d}{HDMI\_VP\_CONF\_PP\_EN\_DISABLE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00552}00552                         \mbox{\hyperlink{dwc__hdmireg_8h_a9bb64c91e56824ec039c1c31350c3756}{HDMI\_VP\_CONF\_YCC422\_EN\_ENABLE}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00553}00553                 \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac664de1b8bdb1e1f5df85a1d745823bc}{HDMI\_VP\_CONF}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00554}00554         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (output\_select == \mbox{\hyperlink{dwc__hdmireg_8h_a21ba6f238d1cd511da08c4fe5f9ed40d}{HDMI\_VP\_CONF\_OUTPUT\_SELECTOR\_BYPASS}}) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00555}00555                 val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac664de1b8bdb1e1f5df85a1d745823bc}{HDMI\_VP\_CONF}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00556}00556                 val \&= \string~(\mbox{\hyperlink{dwc__hdmireg_8h_aa18de5db19f35c892e8e16b234ed3300}{HDMI\_VP\_CONF\_BYPASS\_EN\_MASK}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00557}00557                         \mbox{\hyperlink{dwc__hdmireg_8h_ae16174b729cad22f1e15d5a4ff385dff}{HDMI\_VP\_CONF\_PP\_EN\_ENMASK}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00558}00558                         \mbox{\hyperlink{dwc__hdmireg_8h_aa684510ed1082e520becb8800599f179}{HDMI\_VP\_CONF\_YCC422\_EN\_MASK}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00559}00559                 val |= \mbox{\hyperlink{dwc__hdmireg_8h_a63e01ef8c2d31a6e4404cd500bea6d76}{HDMI\_VP\_CONF\_BYPASS\_EN\_ENABLE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00560}00560                         \mbox{\hyperlink{dwc__hdmireg_8h_a292afd6782c1cfe00f323b5ac4c7490d}{HDMI\_VP\_CONF\_PP\_EN\_DISABLE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00561}00561                         \mbox{\hyperlink{dwc__hdmireg_8h_a2e0bc7def949184675acab496eefd014}{HDMI\_VP\_CONF\_YCC422\_EN\_DISABLE}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00562}00562                 \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac664de1b8bdb1e1f5df85a1d745823bc}{HDMI\_VP\_CONF}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00563}00563         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00564}00564                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00565}00565         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00566}00566 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00567}00567         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a63a858d80494b7d176e384b28538901f}{HDMI\_VP\_STUFF}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00568}00568         val \&= \string~(\mbox{\hyperlink{dwc__hdmireg_8h_af597228061607de2f46b8bc1aa419118}{HDMI\_VP\_STUFF\_PP\_STUFFING\_MASK}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00569}00569                 \mbox{\hyperlink{dwc__hdmireg_8h_a9ddc52236474e3d34cdffcc92bb627ee}{HDMI\_VP\_STUFF\_YCC422\_STUFFING\_MASK}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00570}00570         val |= \mbox{\hyperlink{dwc__hdmireg_8h_aa43e4231aa8ea38837cd486c1bd77af2}{HDMI\_VP\_STUFF\_PP\_STUFFING\_STUFFING\_MODE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00571}00571                 \mbox{\hyperlink{dwc__hdmireg_8h_a8102e957bd06df13978608ec567c5a03}{HDMI\_VP\_STUFF\_YCC422\_STUFFING\_STUFFING\_MODE}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00572}00572         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a63a858d80494b7d176e384b28538901f}{HDMI\_VP\_STUFF}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00573}00573 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00574}00574         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac664de1b8bdb1e1f5df85a1d745823bc}{HDMI\_VP\_CONF}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00575}00575         val \&= \string~HDMI\_VP\_CONF\_OUTPUT\_SELECTOR\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00576}00576         val |= output\_select;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00577}00577         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac664de1b8bdb1e1f5df85a1d745823bc}{HDMI\_VP\_CONF}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00578}00578 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00579}00579 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00580}00580 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00581}\mbox{\hyperlink{dwc__hdmi_8c_a84886d3db3a4d7d8fee66f92e4e30a91}{00581}} \mbox{\hyperlink{dwc__hdmi_8c_a84886d3db3a4d7d8fee66f92e4e30a91}{dwc\_hdmi\_video\_sample}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00582}00582 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00583}00583         \textcolor{keywordtype}{int} color\_format;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00584}00584         uint8\_t val;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00585}00585 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00586}00586         color\_format = 0x01;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00587}00587         val = \mbox{\hyperlink{dwc__hdmireg_8h_a9163f2504c8b2eecf4d7f2731cc55acf}{HDMI\_TX\_INVID0\_INTERNAL\_DE\_GENERATOR\_DISABLE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00588}00588                 ((color\_format << \mbox{\hyperlink{dwc__hdmireg_8h_a97f3fcfdd2c0cffc7a2e0b959c07563f}{HDMI\_TX\_INVID0\_VIDEO\_MAPPING\_OFFSET}}) \&}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00589}00589                 \mbox{\hyperlink{dwc__hdmireg_8h_a9f24bad6de48962d1212514e2ae3ac42}{HDMI\_TX\_INVID0\_VIDEO\_MAPPING\_MASK}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00590}00590         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a4dc37c31274f80b9091983cc2387a139}{HDMI\_TX\_INVID0}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00591}00591 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00592}00592         \textcolor{comment}{/* Enable TX stuffing: When DE is inactive, fix the output data to 0 */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00593}00593         val = \mbox{\hyperlink{dwc__hdmireg_8h_a40dbbb81f7080def02b1c7b7aa1df0d6}{HDMI\_TX\_INSTUFFING\_BDBDATA\_STUFFING\_ENABLE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00594}00594                 \mbox{\hyperlink{dwc__hdmireg_8h_a8e7f5b8308aed50f362792abcd3966fa}{HDMI\_TX\_INSTUFFING\_RCRDATA\_STUFFING\_ENABLE}} |}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00595}00595                 \mbox{\hyperlink{dwc__hdmireg_8h_a6609994205479c60611ca60a42cf609c}{HDMI\_TX\_INSTUFFING\_GYDATA\_STUFFING\_ENABLE}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00596}00596         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a64680716a4b39be88ebab3c25e32a3d6}{HDMI\_TX\_INSTUFFING}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00597}00597         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a51366e51f9b049839649675d6dd28716}{HDMI\_TX\_GYDATA0}}, 0x0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00598}00598         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a58fcb1df9c2227b65f94e6872be6c12b}{HDMI\_TX\_GYDATA1}}, 0x0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00599}00599         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a8fc54163f8042e4a560ab4f62c1fc9f8}{HDMI\_TX\_RCRDATA0}}, 0x0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00600}00600         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_afd3d19ddc13541a75de91037c7170e00}{HDMI\_TX\_RCRDATA1}}, 0x0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00601}00601         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_af740215dec90a691cd396da829ab819a}{HDMI\_TX\_BCBDATA0}}, 0x0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00602}00602         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a76d34b0a495f177ba0498f4516ae1901}{HDMI\_TX\_BCBDATA1}}, 0x0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00603}00603 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00604}00604 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00605}00605 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00606}\mbox{\hyperlink{dwc__hdmi_8c_a68538f1a088ce0904b9b2961d7f0055a}{00606}} \mbox{\hyperlink{dwc__hdmi_8c_a68538f1a088ce0904b9b2961d7f0055a}{dwc\_hdmi\_tx\_hdcp\_config}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00607}00607 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00608}00608         uint8\_t de, val;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00609}00609 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00610}00610         de = \mbox{\hyperlink{dwc__hdmireg_8h_a0ef12fe033bd6d4ebc9bb8d3d8bc39c1}{HDMI\_A\_VIDPOLCFG\_DATAENPOL\_ACTIVE\_HIGH}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00611}00611 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00612}00612         \textcolor{comment}{/* Disable RX detect */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00613}00613         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a5aa451a656d4d5624e5d62653368fb05}{HDMI\_A\_HDCPCFG0}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00614}00614         val \&= \string~HDMI\_A\_HDCPCFG0\_RXDETECT\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00615}00615         val |= \mbox{\hyperlink{dwc__hdmireg_8h_ab187f68c3952fd8a9e988fdeb668f2b8}{HDMI\_A\_HDCPCFG0\_RXDETECT\_DISABLE}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00616}00616         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a5aa451a656d4d5624e5d62653368fb05}{HDMI\_A\_HDCPCFG0}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00617}00617 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00618}00618         \textcolor{comment}{/* Set polarity */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00619}00619         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a107ff3e3142d00d5b6a104dfe00642a6}{HDMI\_A\_VIDPOLCFG}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00620}00620         val \&= \string~HDMI\_A\_VIDPOLCFG\_DATAENPOL\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00621}00621         val |= de;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00622}00622         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a107ff3e3142d00d5b6a104dfe00642a6}{HDMI\_A\_VIDPOLCFG}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00623}00623 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00624}00624         \textcolor{comment}{/* Disable encryption */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00625}00625         val = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a71ef56213907fd307ca7902d33947615}{HDMI\_A\_HDCPCFG1}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00626}00626         val \&= \string~HDMI\_A\_HDCPCFG1\_ENCRYPTIONDISABLE\_MASK;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00627}00627         val |= \mbox{\hyperlink{dwc__hdmireg_8h_a24218baee23f43b0e1af8c373c43c56e}{HDMI\_A\_HDCPCFG1\_ENCRYPTIONDISABLE\_DISABLE}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00628}00628         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a71ef56213907fd307ca7902d33947615}{HDMI\_A\_HDCPCFG1}}, val);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00629}00629 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00630}00630 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00631}00631 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00632}\mbox{\hyperlink{dwc__hdmi_8c_adc1a56362d54ad84f9eb912e736b3795}{00632}} \mbox{\hyperlink{dwc__hdmi_8c_adc1a56362d54ad84f9eb912e736b3795}{dwc\_hdmi\_set\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00633}00633 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00634}00634 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00635}00635         \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00636}00636         sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_acf790c8b610a3002bf92398fb5430387}{sc\_has\_audio}} = 1;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00637}00637 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00638}00638         \mbox{\hyperlink{dwc__hdmi_8c_a311d465ea631a915dacf9c24840ac3f9}{dwc\_hdmi\_disable\_overflow\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00639}00639         \mbox{\hyperlink{dwc__hdmi_8c_a059d8b8f2962b92a04ccc4d4b8a06013}{dwc\_hdmi\_av\_composer}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00640}00640         \mbox{\hyperlink{dwc__hdmi_8c_a15b699c29c9548197a695fa95e911764}{dwc\_hdmi\_phy\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00641}00641         \mbox{\hyperlink{dwc__hdmi_8c_a98b086714bdc023f147f2a04da2a4ffa}{dwc\_hdmi\_enable\_video\_path}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00642}00642         \mbox{\hyperlink{dwc__hdmi_8c_a01218fb60f6c910e76b5c6457d564a3f}{dwc\_hdmi\_configure\_audio}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00643}00643         \textcolor{comment}{/* TODO:  dwc\_hdmi\_config\_avi(sc); */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00644}00644         \mbox{\hyperlink{dwc__hdmi_8c_a927cbafcdf7b1aefd39a38a4ad00b1a0}{dwc\_hdmi\_video\_packetize}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00645}00645         \textcolor{comment}{/* TODO:  dwc\_hdmi\_video\_csc(sc); */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00646}00646         \mbox{\hyperlink{dwc__hdmi_8c_a84886d3db3a4d7d8fee66f92e4e30a91}{dwc\_hdmi\_video\_sample}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00647}00647         \mbox{\hyperlink{dwc__hdmi_8c_a68538f1a088ce0904b9b2961d7f0055a}{dwc\_hdmi\_tx\_hdcp\_config}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00648}00648         \mbox{\hyperlink{dwc__hdmi_8c_a3b15453eb1486489e39d265fd0d40c2a}{dwc\_hdmi\_clear\_overflow}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00649}00649 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00650}00650         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00651}00651 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00652}00652 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00653}00653 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00654}\mbox{\hyperlink{dwc__hdmi_8c_a5389dc518576f46cd303f6cf70034230}{00654}} \mbox{\hyperlink{dwc__hdmi_8c_a5389dc518576f46cd303f6cf70034230}{hdmi\_edid\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc, \textcolor{keywordtype}{int} block, uint8\_t **\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}},}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00655}00655     uint32\_t *edid\_len)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00656}00656 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00657}00657         device\_t i2c\_dev;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00658}00658         \textcolor{keywordtype}{int} result;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00659}00659         uint8\_t addr = block \& 1 ? \mbox{\hyperlink{dwc__hdmi_8c_ad3ea5ce090faa453530141b62e56a2f4}{EDID\_LENGTH}} : 0;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00660}00660         uint8\_t segment = block >> 1;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00661}00661         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00662}00662 \textcolor{comment}{         * Some devices do not support E-\/DDC so attempt}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00663}00663 \textcolor{comment}{         * writing segment address only if it's neccessary}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00664}00664 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00665}00665         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} xfers = segment ? 3 : 2;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00666}00666         \textcolor{keyword}{struct }iic\_msg msg[] = \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00667}00667                 \{ \mbox{\hyperlink{dwc__hdmi_8c_a243f5065f5e7e6b66cd34c8b520dc3ca}{I2C\_DDC\_SEGADDR}}, IIC\_M\_WR, 1, \&segment \},}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00668}00668                 \{ \mbox{\hyperlink{dwc__hdmi_8c_a37a27586f9c709ed8518c23827fcfe3a}{I2C\_DDC\_ADDR}}, IIC\_M\_WR, 1, \&addr \},}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00669}00669                 \{ \mbox{\hyperlink{dwc__hdmi_8c_a37a27586f9c709ed8518c23827fcfe3a}{I2C\_DDC\_ADDR}}, IIC\_M\_RD, \mbox{\hyperlink{dwc__hdmi_8c_ad3ea5ce090faa453530141b62e56a2f4}{EDID\_LENGTH}}, sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_adfc014e30fff71abf22b7c3e3ef34767}{sc\_edid}} \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00670}00670         \};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00671}00671 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00672}00672         *\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}} = NULL;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00673}00673         *edid\_len = 0;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00674}00674         i2c\_dev = NULL;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00675}00675 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00676}00676         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a75e8881a39ec1df7bdb6fd36b84145f9}{sc\_get\_i2c\_dev}} != NULL)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00677}00677                 i2c\_dev = sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a75e8881a39ec1df7bdb6fd36b84145f9}{sc\_get\_i2c\_dev}}(sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00678}00678         \textcolor{keywordflow}{if} (!i2c\_dev) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00679}00679                 device\_printf(sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}}, \textcolor{stringliteral}{"{}no DDC device found\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00680}00680                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00681}00681         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00682}00682 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00683}00683         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00684}00684                 device\_printf(sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00685}00685                     \textcolor{stringliteral}{"{}reading EDID from \%s, block \%d, addr \%02x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00686}00686                     device\_get\_nameunit(i2c\_dev), block, \mbox{\hyperlink{dwc__hdmi_8c_a37a27586f9c709ed8518c23827fcfe3a}{I2C\_DDC\_ADDR}}/2);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00687}00687 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00688}00688         result = iicbus\_request\_bus(i2c\_dev, sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}}, IIC\_INTRWAIT);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00689}00689 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00690}00690         \textcolor{keywordflow}{if} (result) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00691}00691                 device\_printf(sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}}, \textcolor{stringliteral}{"{}failed to request i2c bus: \%d\(\backslash\)n"{}}, result);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00692}00692                 \textcolor{keywordflow}{return} (result);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00693}00693         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00694}00694 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00695}00695         result = iicbus\_transfer(i2c\_dev, \&msg[3 -\/ xfers], xfers);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00696}00696         iicbus\_release\_bus(i2c\_dev, sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00697}00697 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00698}00698         \textcolor{keywordflow}{if} (result) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00699}00699                 device\_printf(sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}}, \textcolor{stringliteral}{"{}i2c transfer failed: \%d\(\backslash\)n"{}}, result);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00700}00700                 \textcolor{keywordflow}{return} (result);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00701}00701         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00702}00702                 *edid\_len = sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a49db1f3616bd0e8df7dadba0b8c8188f}{sc\_edid\_len}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00703}00703                 *\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}} = sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_adfc014e30fff71abf22b7c3e3ef34767}{sc\_edid}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00704}00704         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00705}00705 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00706}00706         \textcolor{keywordflow}{return} (result);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00707}00707 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00708}00708 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00709}00709 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00710}\mbox{\hyperlink{dwc__hdmi_8c_a6261879bb0a147979e01aa3c6ce94959}{00710}} \mbox{\hyperlink{dwc__hdmi_8c_a6261879bb0a147979e01aa3c6ce94959}{dwc\_hdmi\_detect\_cable}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00711}00711 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00712}00712         \textcolor{keyword}{struct }\mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00713}00713         uint32\_t stat;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00714}00714 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00715}00715         sc = arg;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00716}00716 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00717}00717         stat = \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac003acbcc8d9de4db68c57170cedba33}{HDMI\_IH\_PHY\_STAT0}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00718}00718         \textcolor{keywordflow}{if} ((stat \& \mbox{\hyperlink{dwc__hdmireg_8h_aa06041e5fcb35fd2701a87d562e9a808}{HDMI\_IH\_PHY\_STAT0\_HPD}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00719}00719                 EVENTHANDLER\_INVOKE(hdmi\_event, sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00720}00720                     \mbox{\hyperlink{hdmi__if_8m_a9976860b853e3de41fbb388f7db555b1}{HDMI\_EVENT\_CONNECTED}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00721}00721         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00722}00722 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00723}00723         \textcolor{comment}{/* Finished with the interrupt hook */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00724}00724         config\_intrhook\_disestablish(\&sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a72439a3d181429f1c533c54c4a1a2101}{sc\_mode\_hook}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00725}00725 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00726}00726 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00727}00727 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00728}\mbox{\hyperlink{dwc__hdmi_8c_a71d86a0cf1edc9f7fed9ef2c5185597d}{00728}} \mbox{\hyperlink{dwc__hdmi_8c_a71d86a0cf1edc9f7fed9ef2c5185597d}{dwc\_hdmi\_init}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00729}00729 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00730}00730         \textcolor{keyword}{struct }\mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00731}00731         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00732}00732 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00733}00733         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00734}00734         err = 0;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00735}00735 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00736}00736         sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_adfc014e30fff71abf22b7c3e3ef34767}{sc\_edid}} = malloc(\mbox{\hyperlink{dwc__hdmi_8c_ad3ea5ce090faa453530141b62e56a2f4}{EDID\_LENGTH}}, M\_DEVBUF, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00737}00737         sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a49db1f3616bd0e8df7dadba0b8c8188f}{sc\_edid\_len}} = \mbox{\hyperlink{dwc__hdmi_8c_ad3ea5ce090faa453530141b62e56a2f4}{EDID\_LENGTH}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00738}00738 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00739}00739         device\_printf(sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}}, \textcolor{stringliteral}{"{}HDMI controller \%02x:\%02x:\%02x:\%02x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00740}00740             \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_aa7c6851b71b45a8ea7c61425e3d648f5}{HDMI\_DESIGN\_ID}}), \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a7bbe188c66136df526a9c00424d57fb8}{HDMI\_REVISION\_ID}}),}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00741}00741             \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a79012a3b20599a011baaed7a2d2daeb6}{HDMI\_PRODUCT\_ID0}}), \mbox{\hyperlink{dwc__hdmi_8h_a0e573436ea5f643a519d165e55b91ced}{RD1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_a47d7b9db56e11074a152fc535a687c52}{HDMI\_PRODUCT\_ID1}}));}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00742}00742 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00743}00743         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ad724df61055e3f27900407cba9ba5ddb}{HDMI\_PHY\_POL0}}, \mbox{\hyperlink{dwc__hdmireg_8h_a5c6e807d12bd8c5818e9a9d223b4b6d0}{HDMI\_PHY\_POL0\_HPD}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00744}00744         \mbox{\hyperlink{dwc__hdmi_8h_a4fd1f56db6ecf2db5341f14a4117a4db}{WR1}}(sc, \mbox{\hyperlink{dwc__hdmireg_8h_ac003acbcc8d9de4db68c57170cedba33}{HDMI\_IH\_PHY\_STAT0}}, \mbox{\hyperlink{dwc__hdmireg_8h_aa06041e5fcb35fd2701a87d562e9a808}{HDMI\_IH\_PHY\_STAT0\_HPD}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00745}00745 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00746}00746         sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a72439a3d181429f1c533c54c4a1a2101}{sc\_mode\_hook}}.ich\_func = \mbox{\hyperlink{dwc__hdmi_8c_a6261879bb0a147979e01aa3c6ce94959}{dwc\_hdmi\_detect\_cable}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00747}00747         sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a72439a3d181429f1c533c54c4a1a2101}{sc\_mode\_hook}}.ich\_arg = sc;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00748}00748         \textcolor{keywordflow}{if} (config\_intrhook\_establish(\&sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a72439a3d181429f1c533c54c4a1a2101}{sc\_mode\_hook}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00749}00749                 err = ENOMEM;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00750}00750                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00751}00751         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00752}00752 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00753}00753 out:}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00754}00754 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00755}00755         \textcolor{keywordflow}{if} (err != 0) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00756}00756                 free(sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_adfc014e30fff71abf22b7c3e3ef34767}{sc\_edid}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00757}00757                 sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_adfc014e30fff71abf22b7c3e3ef34767}{sc\_edid}} = NULL;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00758}00758         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00759}00759 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00760}00760         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00761}00761 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00762}00762 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00763}00763 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00764}\mbox{\hyperlink{dwc__hdmi_8c_acc1732b4a11c1693d66f616fa4b52ed9}{00764}} \mbox{\hyperlink{dwc__hdmi_8c_acc1732b4a11c1693d66f616fa4b52ed9}{dwc\_hdmi\_detect\_hdmi\_vsdb}}(uint8\_t *\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}})}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00765}00765 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00766}00766         \textcolor{keywordtype}{int} off, p, btag, blen;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00767}00767 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00768}00768         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}[\mbox{\hyperlink{dwc__hdmi_8c_a640790cf00a790253a3c0ad1b761828b}{EXT\_TAG}}] != \mbox{\hyperlink{dwc__hdmi_8c_ad5e623969e8707a9f861b5f2495fa4ae}{CEA\_TAG\_ID}})}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00769}00769                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00770}00770 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00771}00771         off = \mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}[\mbox{\hyperlink{dwc__hdmi_8c_a02d72ecd345e21b16d4ceb407d9357e6}{CEA\_DATA\_OFF}}];}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00772}00772 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00773}00773         \textcolor{comment}{/* CEA data block collection starts at byte 4 */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00774}00774         \textcolor{keywordflow}{if} (off <= \mbox{\hyperlink{dwc__hdmi_8c_a4bea95da96d2719313670575b940ad48}{CEA\_DATA\_START}})}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00775}00775                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00776}00776 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00777}00777         \textcolor{comment}{/* Parse the CEA data blocks */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00778}00778         \textcolor{keywordflow}{for} (p = \mbox{\hyperlink{dwc__hdmi_8c_a4bea95da96d2719313670575b940ad48}{CEA\_DATA\_START}}; p < off;) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00779}00779                 btag = \mbox{\hyperlink{dwc__hdmi_8c_afecc662888701f6d26273cc6f3d32544}{BLOCK\_TAG}}(\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}[p]);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00780}00780                 blen = \mbox{\hyperlink{dwc__hdmi_8c_a5249794b0b5534b4fe716386c1a0b714}{BLOCK\_LEN}}(\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}[p]);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00781}00781 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00782}00782                 \textcolor{comment}{/* Make sure the length is sane */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00783}00783                 \textcolor{keywordflow}{if} (p + blen + 1 > off)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00784}00784                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00785}00785 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00786}00786                 \textcolor{comment}{/* Look for a VSDB with the HDMI 24-\/bit IEEE registration ID */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00787}00787                 \textcolor{keywordflow}{if} (btag == \mbox{\hyperlink{dwc__hdmi_8c_ad8b0534c6079d8f3ee2ee58d91963985}{BLOCK\_TAG\_VSDB}} \&\& blen >= \mbox{\hyperlink{dwc__hdmi_8c_ae51311e855c7d4362d5a6e8be92ef8a4}{HDMI\_VSDB\_MINLEN}} \&\&}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00788}00788                     memcmp(\&\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}[p + 1], \mbox{\hyperlink{dwc__hdmi_8c_a2ce1530bbe1b9f5a76abe4d27d0c706f}{HDMI\_OUI}}, \mbox{\hyperlink{dwc__hdmi_8c_a2f97c12b152107a1bec95987ceed8446}{HDMI\_OUI\_LEN}}) == 0)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00789}00789                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00790}00790 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00791}00791                 \textcolor{comment}{/* Next data block */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00792}00792                 p += (1 + blen);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00793}00793         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00794}00794 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00795}00795         \textcolor{comment}{/* Not found */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00796}00796         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00797}00797 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00798}00798 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00799}00799 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00800}\mbox{\hyperlink{dwc__hdmi_8c_addd725ed3f25854c7c0b18066d35834c}{00800}} \mbox{\hyperlink{dwc__hdmi_8c_addd725ed3f25854c7c0b18066d35834c}{dwc\_hdmi\_detect\_hdmi}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00801}00801 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00802}00802         uint8\_t *\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00803}00803         uint32\_t edid\_len;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00804}00804         \textcolor{keywordtype}{int} block;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00805}00805 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00806}00806         sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_acf790c8b610a3002bf92398fb5430387}{sc\_has\_audio}} = 0;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00807}00807 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00808}00808         \textcolor{comment}{/* Scan through extension blocks, looking for a CEA-\/861 block */}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00809}00809         \textcolor{keywordflow}{for} (block = 1; block <= sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a08a08f0e68cd8f941ab62ef1e3623b2e}{sc\_edid\_info}}.edid\_ext\_block\_count;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00810}00810             block++) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00811}00811                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{dwc__hdmi_8c_a5389dc518576f46cd303f6cf70034230}{hdmi\_edid\_read}}(sc, block, \&\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}, \&edid\_len) != 0)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00812}00812                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00813}00813                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{dwc__hdmi_8c_acc1732b4a11c1693d66f616fa4b52ed9}{dwc\_hdmi\_detect\_hdmi\_vsdb}}(\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00814}00814                         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00815}00815                                 device\_printf(sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a288bd95d1ccd3c18015fe0e0d164b421}{sc\_dev}},}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00816}00816                                     \textcolor{stringliteral}{"{}enabling audio support\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00817}00817                         sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_acf790c8b610a3002bf92398fb5430387}{sc\_has\_audio}} =}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00818}00818                             (\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}[\mbox{\hyperlink{dwc__hdmi_8c_a5b35361b539a95734e3db8b55b0b6c33}{CEA\_DTD}}] \& \mbox{\hyperlink{dwc__hdmi_8c_abc064738e7c0e39b7f22e6aa2df190cf}{DTD\_BASIC\_AUDIO}}) != 0;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00819}00819                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00820}00820                 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00821}00821         \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00822}00822 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00823}00823 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00824}00824 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00825}\mbox{\hyperlink{dwc__hdmi_8c_a0cf34086745ab424755e13b3fa6987ed}{00825}} \mbox{\hyperlink{dwc__hdmi_8c_a0cf34086745ab424755e13b3fa6987ed}{dwc\_hdmi\_get\_edid}}(device\_t dev, uint8\_t **\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}, uint32\_t *edid\_len)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00826}00826 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00827}00827         \textcolor{keyword}{struct }\mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00828}00828         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00829}00829 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00830}00830         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00831}00831 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00832}00832         memset(\&sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a08a08f0e68cd8f941ab62ef1e3623b2e}{sc\_edid\_info}}, 0, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a08a08f0e68cd8f941ab62ef1e3623b2e}{sc\_edid\_info}}));}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00833}00833 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00834}00834         error = \mbox{\hyperlink{dwc__hdmi_8c_a5389dc518576f46cd303f6cf70034230}{hdmi\_edid\_read}}(sc, 0, \mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}, edid\_len);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00835}00835         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00836}00836                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00837}00837 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00838}00838         edid\_parse(*\mbox{\hyperlink{hdmi__if_8m_a0bbc86101eb2d9556c19fabaede1dbb8}{edid}}, \&sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a08a08f0e68cd8f941ab62ef1e3623b2e}{sc\_edid\_info}});}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00839}00839 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00840}00840         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00841}00841 \}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00842}00842 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00843}00843 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00844}\mbox{\hyperlink{dwc__hdmi_8c_a576c93a92003f3697612ac6b76cf8b54}{00844}} \mbox{\hyperlink{dwc__hdmi_8c_a576c93a92003f3697612ac6b76cf8b54}{dwc\_hdmi\_set\_videomode}}(device\_t dev, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{hdmi__if_8m_a9ef7c39904c852efd8463752a6e6576e}{videomode}} *mode)}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00845}00845 \{}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00846}00846         \textcolor{keyword}{struct }\mbox{\hyperlink{structdwc__hdmi__softc}{dwc\_hdmi\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00847}00847 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00848}00848         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00849}00849         memcpy(\&sc-\/>\mbox{\hyperlink{structdwc__hdmi__softc_a67544c56d1db419edb792208e2540490}{sc\_mode}}, mode, \textcolor{keyword}{sizeof}(*mode));}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00850}00850 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00851}00851         \mbox{\hyperlink{dwc__hdmi_8c_addd725ed3f25854c7c0b18066d35834c}{dwc\_hdmi\_detect\_hdmi}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00852}00852 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00853}00853         \mbox{\hyperlink{dwc__hdmi_8c_adc1a56362d54ad84f9eb912e736b3795}{dwc\_hdmi\_set\_mode}}(sc);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00854}00854 }
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00855}00855         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{dwc__hdmi_8c_source_l00856}00856 \}}

\end{DoxyCode}
