<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 16, 2014 at 10:51 AM, Daniel Vetter <span dir="ltr"><<a href="mailto:daniel.vetter@ffwll.ch" target="_blank">daniel.vetter@ffwll.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Due to runtime pm and system s/r we need to restore hw state every<br>
time we enable a pipe again. Hence trying to avoid that is just<br>
pointless book-keeping which Rodrigo then tried to work around by<br>
manually adding psr_setup calls to our resume code.<br>
<br>
Much simpler to just remove code instead.<br>
<br>
Cc: Rodrigo Vivi <<a href="mailto:rodrigo.vivi@intel.com">rodrigo.vivi@intel.com</a>><br>
Signed-off-by: Daniel Vetter <<a href="mailto:daniel.vetter@ffwll.ch">daniel.vetter@ffwll.ch</a>><br>
---<br>
drivers/gpu/drm/i915/i915_drv.h | 1 -<br>
drivers/gpu/drm/i915/intel_dp.c | 8 --------<br>
2 files changed, 9 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h<br>
index 64d520f7e8d9..f5db29428406 100644<br>
--- a/drivers/gpu/drm/i915/i915_drv.h<br>
+++ b/drivers/gpu/drm/i915/i915_drv.h<br>
@@ -636,7 +636,6 @@ struct i915_drrs {<br>
struct i915_psr {<br>
bool sink_support;<br>
bool source_ok;<br>
- bool setup_done;<br>
bool enabled;<br>
bool active;<br>
struct delayed_work work;<br>
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c<br>
index 8717d3b9667c..4ab4757fb53d 100644<br>
--- a/drivers/gpu/drm/i915/intel_dp.c<br>
+++ b/drivers/gpu/drm/i915/intel_dp.c<br>
@@ -1663,9 +1663,6 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)<br>
struct drm_i915_private *dev_priv = dev->dev_private;<br>
struct edp_vsc_psr psr_vsc;<br>
<br>
- if (dev_priv->psr.setup_done)<br>
- return;<br>
-<br>
/* Prepare VSC packet as per EDP 1.3 spec, Table 3.10 */<br>
memset(&psr_vsc, 0, sizeof(psr_vsc));<br>
psr_vsc.sdp_header.HB0 = 0;<br>
@@ -1677,8 +1674,6 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)<br>
/* Avoid continuous PSR exit by masking memup and hpd */<br>
I915_WRITE(EDP_PSR_DEBUG_CTL(dev), EDP_PSR_DEBUG_MASK_MEMUP |<br>
EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP);<br>
-<br>
- dev_priv->psr.setup_done = true;<br>
}<br>
<br>
static void intel_edp_psr_enable_sink(struct intel_dp *intel_dp)<br>
@@ -1911,9 +1906,6 @@ void intel_edp_psr_exit(struct drm_device *dev, bool schedule_back)<br>
if (!HAS_PSR(dev))<br>
return;<br>
<br>
- if (!dev_priv->psr.setup_done)<br>
- return; </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
-<br></blockquote><div><br></div><div>I'd add here:</div><div>+ if (!dev_priv->psr.enabled)</div><div>+ return; </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
cancel_delayed_work_sync(&dev_priv->psr.work);<br>
<br>
if (dev_priv->psr.active)<br>
<span class=""><font color="#888888">--<br>
2.0.0<br>
<br>
_______________________________________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-g</a></font></span></blockquote><div><br></div><div>with or without it: </div></div><div>
Reviewed-by: Rodrigo Vivi <<a href="mailto:rodrigo.vivi@intel.com">rodrigo.vivi@intel.com</a>><br></div><div><br></div>-- <br><div>Rodrigo Vivi</div><div>Blog: <a href="http://blog.vivi.eng.br" target="_blank">http://blog.vivi.eng.br</a></div>
<div> </div>
</div></div>