<div>The time between start of the pixel clock and backlight enable is a basic</div><div>panel timing constraint. If no VBIOS Table is found, and the Panel Power</div><div>On/Off registers are found to be 0, assume we are booting without VBIOS</div>
<div>initialization and set these registers to something reasonable.</div><div><br></div><div>TEST=Repeat the 'xset dpms force {off|on}' sequence.</div><div><br></div><div>Change-Id: Ibed6cc10d46bf52fd92e0beb25ae3525b5eef99d</div>
<div>Signed-off-by: Bryan Freed <<a href="mailto:bfreed@chromium.org">bfreed@chromium.org</a>></div><div>---</div><div> drivers/gpu/drm/i915/intel_bios.c | 21 +++++++++++++++++++++</div><div> 1 files changed, 21 insertions(+), 0 deletions(-)</div>
<div><br></div><div>diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c</div><div>index ad030ff..83d7371 100644</div><div>--- a/drivers/gpu/drm/i915/intel_bios.c</div><div>+++ b/drivers/gpu/drm/i915/intel_bios.c</div>
<div>@@ -508,6 +508,26 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)</div><div> }</div><div> </div><div> /**</div><div>+ * init_regs_no_vbt - Directly write registers that are usually set by VBIOS.</div><div>+ *</div>
<div>+ * This goes beyond the registers that this driver controls with settings found</div><div>+ * in the VBIOS Table. If there is no VBIOS table, and certain registers are</div><div>+ * uninitialized, set them here.</div>
<div>+ */</div><div>+static void</div><div>+init_regs_no_vbt(struct drm_i915_private *dev_priv)</div><div>+{</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Set the Panel Power On/Off timings if unitialized. */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>if ((I915_READ(PP_ON_DELAYS) == 0) && (I915_READ(PP_OFF_DELAYS) == 0)) {</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Set T2 to 40ms and T5 to 200ms */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>I915_WRITE(PP_ON_DELAYS, 0x019007d0);</div><div>+</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>/* Set T3 to 35ms and Tx to 200ms */</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>I915_WRITE(PP_OFF_DELAYS, 0x015e07d0);</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div>+}</div><div>+</div><div>+/**</div>
<div> * intel_init_bios - initialize VBIOS settings & find VBT</div><div> * @dev: DRM device</div><div> *</div><div>@@ -550,6 +570,7 @@ intel_init_bios(struct drm_device *dev)</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>if (!vbt) {</div>
<div> <span class="Apple-tab-span" style="white-space:pre"> </span>DRM_ERROR("VBT signature missing\n");</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>pci_unmap_rom(pdev, bios);</div>
<div>+<span class="Apple-tab-span" style="white-space:pre"> </span>init_regs_no_vbt(dev_priv);</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>return -1;</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>}</div>
<div> </div><div>-- </div><div>1.7.1</div><div><br></div>