On Wed, Jul 12, 2017 at 12:56 PM, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote: > Quoting Rodrigo Vivi (2017-07-12 20:20:31) >> Let's start the clean-up and re-org of VLV PSR functions by >> removing an useless one. >> >> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx> >> Cc: Jim Bride <jim.bride@xxxxxxxxxxxxxxx> >> Cc: Vathsala NAgaraju <vathsala.nagaraju@xxxxxxxxx> >> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> >> --- >> drivers/gpu/drm/i915/intel_psr.c | 16 ++++------------ >> 1 file changed, 4 insertions(+), 12 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c >> index 559f1ab42bfc..1af4438a6095 100644 >> --- a/drivers/gpu/drm/i915/intel_psr.c >> +++ b/drivers/gpu/drm/i915/intel_psr.c >> @@ -61,17 +61,6 @@ static bool is_edp_psr(struct intel_dp *intel_dp) >> return intel_dp->psr_dpcd[0] & DP_PSR_IS_SUPPORTED; >> } >> >> -static bool vlv_is_psr_active_on_pipe(struct drm_device *dev, int pipe) >> -{ >> - struct drm_i915_private *dev_priv = to_i915(dev); >> - uint32_t val; >> - >> - val = I915_READ(VLV_PSRSTAT(pipe)) & >> - VLV_EDP_PSR_CURR_STATE_MASK; >> - return (val == VLV_EDP_PSR_ACTIVE_NORFB_UP) || >> - (val == VLV_EDP_PSR_ACTIVE_SF_UPDATE); >> -} >> - >> static void intel_psr_write_vsc(struct intel_dp *intel_dp, >> const struct edp_vsc_psr *vsc_psr) >> { >> @@ -610,7 +599,10 @@ static void vlv_psr_disable(struct intel_dp *intel_dp) >> >> dev_priv->psr.active = false; >> } else { >> - WARN_ON(vlv_is_psr_active_on_pipe(dev, intel_crtc->pipe)); >> + val = I915_READ(VLV_PSRSTAT(intel_crtc->pipe)) & >> + VLV_EDP_PSR_CURR_STATE_MASK; >> + WARN_ON(val == VLV_EDP_PSR_ACTIVE_NORFB_UP || >> + val == VLV_EDP_PSR_ACTIVE_SF_UPDATE); > > The value here is in the warning message if it ever fails. Which is > clearer > > WARNING vlv_is_psr_active_on_pipe(dev, intel_crtc->pipe) > > or > > WARNING val == VLV_EDP_PSR_ACTIVE_NORFB_UP || vall == VLV_EDP_ACTIVE_SF_UPDATE > > followed by the stacktrace starting with vlv_psr_disable()? (And the > former is smaller .data!) good points... so let's just discard this patch. Thanks > -Chris > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Rodrigo Vivi Blog: http://blog.vivi.eng.br _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx