From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jani Nikula Subject: Re: [PATCH 6/6] drm/i915: set the backlight panel delays registers to 1 Date: Tue, 28 Jan 2014 09:57:57 +0200 Message-ID: <87txco4jy2.fsf@intel.com> References: <1387470584-1662-1-git-send-email-przanoni@gmail.com> <1387470584-1662-7-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id D0FF140C4 for ; Mon, 27 Jan 2014 23:54:31 -0800 (PST) In-Reply-To: <1387470584-1662-7-git-send-email-przanoni@gmail.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: Paulo Zanoni , intel-gfx@lists.freedesktop.org Cc: Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Thu, 19 Dec 2013, Paulo Zanoni wrote: > From: Paulo Zanoni > > Because we already do the wait in software: see > ironlake_wait_backlight_on and ironlake_edp_wait_backlight_off. > > For the "backlight on" delay, even BSpec says we need to program 0x1 > to PP_ON_DELAYS 12:0. > > For the "backlight off" delay, if we don't do the same thing, when we > call ironlake_wait_panel_off we'll end up waiting for the it again. > > On my machine the off delay is 200ms, so we save this amount of time > whenever we disable the panel (e.g, suspend). Whoa. This appears to fix an eDP black screen with 24->18 bpp dithering: https://bugs.freedesktop.org/show_bug.cgi?id=73567#c21 Jani. > > Signed-off-by: Paulo Zanoni > --- > drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > index 69d8f1c..90ff059 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -3535,10 +3535,17 @@ intel_dp_init_panel_power_sequencer_registers(struct drm_device *dev, > pp_div_reg = VLV_PIPE_PP_DIVISOR(pipe); > } > > - /* And finally store the new values in the power sequencer. */ > + /* > + * And finally store the new values in the power sequencer. The > + * backlight delays are set to 1 because we do manual waits on them. For > + * T8, even BSpec recommends doing it. For T9, if we don't do this, > + * we'll end up waiting for the backlight off delay twice: once when we > + * do the manual sleep, and once when we disable the panel and wait for > + * the PP_STATUS bit to become zero. > + */ > pp_on = (seq->t1_t3 << PANEL_POWER_UP_DELAY_SHIFT) | > - (seq->t8 << PANEL_LIGHT_ON_DELAY_SHIFT); > - pp_off = (seq->t9 << PANEL_LIGHT_OFF_DELAY_SHIFT) | > + (1 << PANEL_LIGHT_ON_DELAY_SHIFT); > + pp_off = (1 << PANEL_LIGHT_OFF_DELAY_SHIFT) | > (seq->t10 << PANEL_POWER_DOWN_DELAY_SHIFT); > /* Compute the divisor for the pp clock, simply match the Bspec > * formula. */ > -- > 1.8.3.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Jani Nikula, Intel Open Source Technology Center