From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Redoing the PSR setup on resume Date: Sat, 25 Jan 2014 21:10:36 +0100 Message-ID: <20140125201036.GJ9772@phenom.ffwll.local> References: <1390504821-15243-1-git-send-email-ramalingam.c@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f177.google.com (mail-ea0-f177.google.com [209.85.215.177]) by gabe.freedesktop.org (Postfix) with ESMTP id DBFDCFA4A7 for ; Sat, 25 Jan 2014 12:10:40 -0800 (PST) Received: by mail-ea0-f177.google.com with SMTP id n15so1581209ead.22 for ; Sat, 25 Jan 2014 12:10:40 -0800 (PST) Content-Disposition: inline In-Reply-To: <1390504821-15243-1-git-send-email-ramalingam.c@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Ramalingam C Cc: Intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Jan 24, 2014 at 12:50:17AM +0530, Ramalingam C wrote: > Due to switch between console and graphics modes multiple psr_enable > call will be made. On such occasions, to avoid repeated psr_setup, > a flag called psr_setup_done is used. > > On suspend-resume, panel goes for a power cycle. Hence PSR setup > should be redone to enable the PSR after suspend-resume. > So this patch resets the corresponding flag, if it is set during the > panel powerup process. > > Signed-off-by: Ramalingam C > --- > drivers/gpu/drm/i915/intel_ddi.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c > index 74749c6..686f8f6 100644 > --- a/drivers/gpu/drm/i915/intel_ddi.c > +++ b/drivers/gpu/drm/i915/intel_ddi.c > @@ -1201,6 +1201,11 @@ static void intel_ddi_pre_enable(struct intel_encoder *intel_encoder) > if (type == INTEL_OUTPUT_EDP) { > struct intel_dp *intel_dp = enc_to_intel_dp(encoder); > ironlake_edp_panel_on(intel_dp); > + > + /* Resetting the flag, to redo the PSR setup after > + * panel powercycle */ > + if (intel_dp->psr_setup_done) > + intel_dp->psr_setup_done = false; Imo it's better to add this as an encoder->reset callback. That one is only called on resume (at least in -nightly), so fits exactly. Resetting this flag in every pre_enable is a bit much imo. Also it sounds like we need to extend Rodrigo's psr testcase with a suspend/resume subtest. -Daniel > } > > WARN_ON(intel_crtc->ddi_pll_sel == PORT_CLK_SEL_NONE); > -- > 1.7.9.5 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch