intel_dsi_pll.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. /*
  2. * Copyright © 2013 Intel Corporation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice (including the next
  12. * paragraph) shall be included in all copies or substantial portions of the
  13. * Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  18. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  20. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. * DEALINGS IN THE SOFTWARE.
  22. *
  23. * Authors:
  24. * Shobhit Kumar <shobhit.kumar@intel.com>
  25. * Yogesh Mohan Marimuthu <yogesh.mohan.marimuthu@intel.com>
  26. */
  27. #include <linux/kernel.h>
  28. #include "intel_drv.h"
  29. #include "i915_drv.h"
  30. #include "intel_dsi.h"
  31. int dsi_pixel_format_bpp(int pixel_format)
  32. {
  33. int bpp;
  34. switch (pixel_format) {
  35. default:
  36. case VID_MODE_FORMAT_RGB888:
  37. case VID_MODE_FORMAT_RGB666_LOOSE:
  38. bpp = 24;
  39. break;
  40. case VID_MODE_FORMAT_RGB666:
  41. bpp = 18;
  42. break;
  43. case VID_MODE_FORMAT_RGB565:
  44. bpp = 16;
  45. break;
  46. }
  47. return bpp;
  48. }
  49. struct dsi_mnp {
  50. u32 dsi_pll_ctrl;
  51. u32 dsi_pll_div;
  52. };
  53. static const u32 lfsr_converts[] = {
  54. 426, 469, 234, 373, 442, 221, 110, 311, 411, /* 62 - 70 */
  55. 461, 486, 243, 377, 188, 350, 175, 343, 427, 213, /* 71 - 80 */
  56. 106, 53, 282, 397, 454, 227, 113, 56, 284, 142, /* 81 - 90 */
  57. 71, 35, 273, 136, 324, 418, 465, 488, 500, 506 /* 91 - 100 */
  58. };
  59. /* Get DSI clock from pixel clock */
  60. static u32 dsi_clk_from_pclk(u32 pclk, int pixel_format, int lane_count)
  61. {
  62. u32 dsi_clk_khz;
  63. u32 bpp = dsi_pixel_format_bpp(pixel_format);
  64. /* DSI data rate = pixel clock * bits per pixel / lane count
  65. pixel clock is converted from KHz to Hz */
  66. dsi_clk_khz = DIV_ROUND_CLOSEST(pclk * bpp, lane_count);
  67. return dsi_clk_khz;
  68. }
  69. static int dsi_calc_mnp(struct drm_i915_private *dev_priv,
  70. struct dsi_mnp *dsi_mnp, int target_dsi_clk)
  71. {
  72. unsigned int calc_m = 0, calc_p = 0;
  73. unsigned int m_min, m_max, p_min = 2, p_max = 6;
  74. unsigned int m, n, p;
  75. int ref_clk;
  76. int delta = target_dsi_clk;
  77. u32 m_seed;
  78. /* target_dsi_clk is expected in kHz */
  79. if (target_dsi_clk < 300000 || target_dsi_clk > 1150000) {
  80. DRM_ERROR("DSI CLK Out of Range\n");
  81. return -ECHRNG;
  82. }
  83. if (IS_CHERRYVIEW(dev_priv)) {
  84. ref_clk = 100000;
  85. n = 4;
  86. m_min = 70;
  87. m_max = 96;
  88. } else {
  89. ref_clk = 25000;
  90. n = 1;
  91. m_min = 62;
  92. m_max = 92;
  93. }
  94. for (m = m_min; m <= m_max && delta; m++) {
  95. for (p = p_min; p <= p_max && delta; p++) {
  96. /*
  97. * Find the optimal m and p divisors with minimal delta
  98. * +/- the required clock
  99. */
  100. int calc_dsi_clk = (m * ref_clk) / (p * n);
  101. int d = abs(target_dsi_clk - calc_dsi_clk);
  102. if (d < delta) {
  103. delta = d;
  104. calc_m = m;
  105. calc_p = p;
  106. }
  107. }
  108. }
  109. /* register has log2(N1), this works fine for powers of two */
  110. n = ffs(n) - 1;
  111. m_seed = lfsr_converts[calc_m - 62];
  112. dsi_mnp->dsi_pll_ctrl = 1 << (DSI_PLL_P1_POST_DIV_SHIFT + calc_p - 2);
  113. dsi_mnp->dsi_pll_div = n << DSI_PLL_N1_DIV_SHIFT |
  114. m_seed << DSI_PLL_M1_DIV_SHIFT;
  115. return 0;
  116. }
  117. /*
  118. * XXX: The muxing and gating is hard coded for now. Need to add support for
  119. * sharing PLLs with two DSI outputs.
  120. */
  121. static void vlv_configure_dsi_pll(struct intel_encoder *encoder)
  122. {
  123. struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
  124. struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
  125. int ret;
  126. struct dsi_mnp dsi_mnp;
  127. u32 dsi_clk;
  128. dsi_clk = dsi_clk_from_pclk(intel_dsi->pclk, intel_dsi->pixel_format,
  129. intel_dsi->lane_count);
  130. ret = dsi_calc_mnp(dev_priv, &dsi_mnp, dsi_clk);
  131. if (ret) {
  132. DRM_DEBUG_KMS("dsi_calc_mnp failed\n");
  133. return;
  134. }
  135. if (intel_dsi->ports & (1 << PORT_A))
  136. dsi_mnp.dsi_pll_ctrl |= DSI_PLL_CLK_GATE_DSI0_DSIPLL;
  137. if (intel_dsi->ports & (1 << PORT_C))
  138. dsi_mnp.dsi_pll_ctrl |= DSI_PLL_CLK_GATE_DSI1_DSIPLL;
  139. DRM_DEBUG_KMS("dsi pll div %08x, ctrl %08x\n",
  140. dsi_mnp.dsi_pll_div, dsi_mnp.dsi_pll_ctrl);
  141. vlv_cck_write(dev_priv, CCK_REG_DSI_PLL_CONTROL, 0);
  142. vlv_cck_write(dev_priv, CCK_REG_DSI_PLL_DIVIDER, dsi_mnp.dsi_pll_div);
  143. vlv_cck_write(dev_priv, CCK_REG_DSI_PLL_CONTROL, dsi_mnp.dsi_pll_ctrl);
  144. }
  145. static void vlv_enable_dsi_pll(struct intel_encoder *encoder)
  146. {
  147. struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
  148. u32 tmp;
  149. DRM_DEBUG_KMS("\n");
  150. mutex_lock(&dev_priv->sb_lock);
  151. vlv_configure_dsi_pll(encoder);
  152. /* wait at least 0.5 us after ungating before enabling VCO */
  153. usleep_range(1, 10);
  154. tmp = vlv_cck_read(dev_priv, CCK_REG_DSI_PLL_CONTROL);
  155. tmp |= DSI_PLL_VCO_EN;
  156. vlv_cck_write(dev_priv, CCK_REG_DSI_PLL_CONTROL, tmp);
  157. if (wait_for(vlv_cck_read(dev_priv, CCK_REG_DSI_PLL_CONTROL) &
  158. DSI_PLL_LOCK, 20)) {
  159. mutex_unlock(&dev_priv->sb_lock);
  160. DRM_ERROR("DSI PLL lock failed\n");
  161. return;
  162. }
  163. mutex_unlock(&dev_priv->sb_lock);
  164. DRM_DEBUG_KMS("DSI PLL locked\n");
  165. }
  166. static void vlv_disable_dsi_pll(struct intel_encoder *encoder)
  167. {
  168. struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
  169. u32 tmp;
  170. DRM_DEBUG_KMS("\n");
  171. mutex_lock(&dev_priv->sb_lock);
  172. tmp = vlv_cck_read(dev_priv, CCK_REG_DSI_PLL_CONTROL);
  173. tmp &= ~DSI_PLL_VCO_EN;
  174. tmp |= DSI_PLL_LDO_GATE;
  175. vlv_cck_write(dev_priv, CCK_REG_DSI_PLL_CONTROL, tmp);
  176. mutex_unlock(&dev_priv->sb_lock);
  177. }
  178. static void bxt_disable_dsi_pll(struct intel_encoder *encoder)
  179. {
  180. struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
  181. u32 val;
  182. DRM_DEBUG_KMS("\n");
  183. val = I915_READ(BXT_DSI_PLL_ENABLE);
  184. val &= ~BXT_DSI_PLL_DO_ENABLE;
  185. I915_WRITE(BXT_DSI_PLL_ENABLE, val);
  186. /*
  187. * PLL lock should deassert within 200us.
  188. * Wait up to 1ms before timing out.
  189. */
  190. if (wait_for((I915_READ(BXT_DSI_PLL_ENABLE)
  191. & BXT_DSI_PLL_LOCKED) == 0, 1))
  192. DRM_ERROR("Timeout waiting for PLL lock deassertion\n");
  193. }
  194. static void assert_bpp_mismatch(int pixel_format, int pipe_bpp)
  195. {
  196. int bpp = dsi_pixel_format_bpp(pixel_format);
  197. WARN(bpp != pipe_bpp,
  198. "bpp match assertion failure (expected %d, current %d)\n",
  199. bpp, pipe_bpp);
  200. }
  201. static u32 vlv_dsi_get_pclk(struct intel_encoder *encoder, int pipe_bpp)
  202. {
  203. struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
  204. struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
  205. u32 dsi_clock, pclk;
  206. u32 pll_ctl, pll_div;
  207. u32 m = 0, p = 0, n;
  208. int refclk = 25000;
  209. int i;
  210. DRM_DEBUG_KMS("\n");
  211. mutex_lock(&dev_priv->sb_lock);
  212. pll_ctl = vlv_cck_read(dev_priv, CCK_REG_DSI_PLL_CONTROL);
  213. pll_div = vlv_cck_read(dev_priv, CCK_REG_DSI_PLL_DIVIDER);
  214. mutex_unlock(&dev_priv->sb_lock);
  215. /* mask out other bits and extract the P1 divisor */
  216. pll_ctl &= DSI_PLL_P1_POST_DIV_MASK;
  217. pll_ctl = pll_ctl >> (DSI_PLL_P1_POST_DIV_SHIFT - 2);
  218. /* N1 divisor */
  219. n = (pll_div & DSI_PLL_N1_DIV_MASK) >> DSI_PLL_N1_DIV_SHIFT;
  220. n = 1 << n; /* register has log2(N1) */
  221. /* mask out the other bits and extract the M1 divisor */
  222. pll_div &= DSI_PLL_M1_DIV_MASK;
  223. pll_div = pll_div >> DSI_PLL_M1_DIV_SHIFT;
  224. while (pll_ctl) {
  225. pll_ctl = pll_ctl >> 1;
  226. p++;
  227. }
  228. p--;
  229. if (!p) {
  230. DRM_ERROR("wrong P1 divisor\n");
  231. return 0;
  232. }
  233. for (i = 0; i < ARRAY_SIZE(lfsr_converts); i++) {
  234. if (lfsr_converts[i] == pll_div)
  235. break;
  236. }
  237. if (i == ARRAY_SIZE(lfsr_converts)) {
  238. DRM_ERROR("wrong m_seed programmed\n");
  239. return 0;
  240. }
  241. m = i + 62;
  242. dsi_clock = (m * refclk) / (p * n);
  243. /* pixel_format and pipe_bpp should agree */
  244. assert_bpp_mismatch(intel_dsi->pixel_format, pipe_bpp);
  245. pclk = DIV_ROUND_CLOSEST(dsi_clock * intel_dsi->lane_count, pipe_bpp);
  246. return pclk;
  247. }
  248. static u32 bxt_dsi_get_pclk(struct intel_encoder *encoder, int pipe_bpp)
  249. {
  250. u32 pclk;
  251. u32 dsi_clk;
  252. u32 dsi_ratio;
  253. struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
  254. struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
  255. /* Divide by zero */
  256. if (!pipe_bpp) {
  257. DRM_ERROR("Invalid BPP(0)\n");
  258. return 0;
  259. }
  260. dsi_ratio = I915_READ(BXT_DSI_PLL_CTL) &
  261. BXT_DSI_PLL_RATIO_MASK;
  262. /* Invalid DSI ratio ? */
  263. if (dsi_ratio < BXT_DSI_PLL_RATIO_MIN ||
  264. dsi_ratio > BXT_DSI_PLL_RATIO_MAX) {
  265. DRM_ERROR("Invalid DSI pll ratio(%u) programmed\n", dsi_ratio);
  266. return 0;
  267. }
  268. dsi_clk = (dsi_ratio * BXT_REF_CLOCK_KHZ) / 2;
  269. /* pixel_format and pipe_bpp should agree */
  270. assert_bpp_mismatch(intel_dsi->pixel_format, pipe_bpp);
  271. pclk = DIV_ROUND_CLOSEST(dsi_clk * intel_dsi->lane_count, pipe_bpp);
  272. DRM_DEBUG_DRIVER("Calculated pclk=%u\n", pclk);
  273. return pclk;
  274. }
  275. u32 intel_dsi_get_pclk(struct intel_encoder *encoder, int pipe_bpp)
  276. {
  277. if (IS_BROXTON(encoder->base.dev))
  278. return bxt_dsi_get_pclk(encoder, pipe_bpp);
  279. else
  280. return vlv_dsi_get_pclk(encoder, pipe_bpp);
  281. }
  282. static void vlv_dsi_reset_clocks(struct intel_encoder *encoder, enum port port)
  283. {
  284. u32 temp;
  285. struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
  286. struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
  287. temp = I915_READ(MIPI_CTRL(port));
  288. temp &= ~ESCAPE_CLOCK_DIVIDER_MASK;
  289. I915_WRITE(MIPI_CTRL(port), temp |
  290. intel_dsi->escape_clk_div <<
  291. ESCAPE_CLOCK_DIVIDER_SHIFT);
  292. }
  293. /* Program BXT Mipi clocks and dividers */
  294. static void bxt_dsi_program_clocks(struct drm_device *dev, enum port port)
  295. {
  296. u32 tmp;
  297. u32 divider;
  298. u32 dsi_rate;
  299. u32 pll_ratio;
  300. struct drm_i915_private *dev_priv = dev->dev_private;
  301. /* Clear old configurations */
  302. tmp = I915_READ(BXT_MIPI_CLOCK_CTL);
  303. tmp &= ~(BXT_MIPI_TX_ESCLK_FIXDIV_MASK(port));
  304. tmp &= ~(BXT_MIPI_RX_ESCLK_FIXDIV_MASK(port));
  305. tmp &= ~(BXT_MIPI_ESCLK_VAR_DIV_MASK(port));
  306. tmp &= ~(BXT_MIPI_DPHY_DIVIDER_MASK(port));
  307. /* Get the current DSI rate(actual) */
  308. pll_ratio = I915_READ(BXT_DSI_PLL_CTL) &
  309. BXT_DSI_PLL_RATIO_MASK;
  310. dsi_rate = (BXT_REF_CLOCK_KHZ * pll_ratio) / 2;
  311. /* Max possible output of clock is 39.5 MHz, program value -1 */
  312. divider = (dsi_rate / BXT_MAX_VAR_OUTPUT_KHZ) - 1;
  313. tmp |= BXT_MIPI_ESCLK_VAR_DIV(port, divider);
  314. /*
  315. * Tx escape clock must be as close to 20MHz possible, but should
  316. * not exceed it. Hence select divide by 2
  317. */
  318. tmp |= BXT_MIPI_TX_ESCLK_8XDIV_BY2(port);
  319. tmp |= BXT_MIPI_RX_ESCLK_8X_BY3(port);
  320. I915_WRITE(BXT_MIPI_CLOCK_CTL, tmp);
  321. }
  322. static bool bxt_configure_dsi_pll(struct intel_encoder *encoder)
  323. {
  324. struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
  325. struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
  326. u8 dsi_ratio;
  327. u32 dsi_clk;
  328. u32 val;
  329. dsi_clk = dsi_clk_from_pclk(intel_dsi->pclk, intel_dsi->pixel_format,
  330. intel_dsi->lane_count);
  331. /*
  332. * From clock diagram, to get PLL ratio divider, divide double of DSI
  333. * link rate (i.e., 2*8x=16x frequency value) by ref clock. Make sure to
  334. * round 'up' the result
  335. */
  336. dsi_ratio = DIV_ROUND_UP(dsi_clk * 2, BXT_REF_CLOCK_KHZ);
  337. if (dsi_ratio < BXT_DSI_PLL_RATIO_MIN ||
  338. dsi_ratio > BXT_DSI_PLL_RATIO_MAX) {
  339. DRM_ERROR("Cant get a suitable ratio from DSI PLL ratios\n");
  340. return false;
  341. }
  342. /*
  343. * Program DSI ratio and Select MIPIC and MIPIA PLL output as 8x
  344. * Spec says both have to be programmed, even if one is not getting
  345. * used. Configure MIPI_CLOCK_CTL dividers in modeset
  346. */
  347. val = I915_READ(BXT_DSI_PLL_CTL);
  348. val &= ~BXT_DSI_PLL_PVD_RATIO_MASK;
  349. val &= ~BXT_DSI_FREQ_SEL_MASK;
  350. val &= ~BXT_DSI_PLL_RATIO_MASK;
  351. val |= (dsi_ratio | BXT_DSIA_16X_BY2 | BXT_DSIC_16X_BY2);
  352. /* As per recommendation from hardware team,
  353. * Prog PVD ratio =1 if dsi ratio <= 50
  354. */
  355. if (dsi_ratio <= 50) {
  356. val &= ~BXT_DSI_PLL_PVD_RATIO_MASK;
  357. val |= BXT_DSI_PLL_PVD_RATIO_1;
  358. }
  359. I915_WRITE(BXT_DSI_PLL_CTL, val);
  360. POSTING_READ(BXT_DSI_PLL_CTL);
  361. return true;
  362. }
  363. static void bxt_enable_dsi_pll(struct intel_encoder *encoder)
  364. {
  365. struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
  366. struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
  367. enum port port;
  368. u32 val;
  369. DRM_DEBUG_KMS("\n");
  370. val = I915_READ(BXT_DSI_PLL_ENABLE);
  371. if (val & BXT_DSI_PLL_DO_ENABLE) {
  372. WARN(1, "DSI PLL already enabled. Disabling it.\n");
  373. val &= ~BXT_DSI_PLL_DO_ENABLE;
  374. I915_WRITE(BXT_DSI_PLL_ENABLE, val);
  375. }
  376. /* Configure PLL vales */
  377. if (!bxt_configure_dsi_pll(encoder)) {
  378. DRM_ERROR("Configure DSI PLL failed, abort PLL enable\n");
  379. return;
  380. }
  381. /* Program TX, RX, Dphy clocks */
  382. for_each_dsi_port(port, intel_dsi->ports)
  383. bxt_dsi_program_clocks(encoder->base.dev, port);
  384. /* Enable DSI PLL */
  385. val = I915_READ(BXT_DSI_PLL_ENABLE);
  386. val |= BXT_DSI_PLL_DO_ENABLE;
  387. I915_WRITE(BXT_DSI_PLL_ENABLE, val);
  388. /* Timeout and fail if PLL not locked */
  389. if (wait_for(I915_READ(BXT_DSI_PLL_ENABLE) & BXT_DSI_PLL_LOCKED, 1)) {
  390. DRM_ERROR("Timed out waiting for DSI PLL to lock\n");
  391. return;
  392. }
  393. DRM_DEBUG_KMS("DSI PLL locked\n");
  394. }
  395. void intel_enable_dsi_pll(struct intel_encoder *encoder)
  396. {
  397. struct drm_device *dev = encoder->base.dev;
  398. if (IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev))
  399. vlv_enable_dsi_pll(encoder);
  400. else if (IS_BROXTON(dev))
  401. bxt_enable_dsi_pll(encoder);
  402. }
  403. void intel_disable_dsi_pll(struct intel_encoder *encoder)
  404. {
  405. struct drm_device *dev = encoder->base.dev;
  406. if (IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev))
  407. vlv_disable_dsi_pll(encoder);
  408. else if (IS_BROXTON(dev))
  409. bxt_disable_dsi_pll(encoder);
  410. }
  411. static void bxt_dsi_reset_clocks(struct intel_encoder *encoder, enum port port)
  412. {
  413. u32 tmp;
  414. struct drm_device *dev = encoder->base.dev;
  415. struct drm_i915_private *dev_priv = dev->dev_private;
  416. /* Clear old configurations */
  417. tmp = I915_READ(BXT_MIPI_CLOCK_CTL);
  418. tmp &= ~(BXT_MIPI_TX_ESCLK_FIXDIV_MASK(port));
  419. tmp &= ~(BXT_MIPI_RX_ESCLK_FIXDIV_MASK(port));
  420. tmp &= ~(BXT_MIPI_ESCLK_VAR_DIV_MASK(port));
  421. tmp &= ~(BXT_MIPI_DPHY_DIVIDER_MASK(port));
  422. I915_WRITE(BXT_MIPI_CLOCK_CTL, tmp);
  423. I915_WRITE(MIPI_EOT_DISABLE(port), CLOCKSTOP);
  424. }
  425. void intel_dsi_reset_clocks(struct intel_encoder *encoder, enum port port)
  426. {
  427. struct drm_device *dev = encoder->base.dev;
  428. if (IS_BROXTON(dev))
  429. bxt_dsi_reset_clocks(encoder, port);
  430. else if (IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev))
  431. vlv_dsi_reset_clocks(encoder, port);
  432. }