From: Daniel Vetter Subject: Re: [PATCH 3/3] drm/i915: move encoder->enable callback later in VLV crtc enable Date: Tue, 4 Jun 2013 13:49:41 +0200 Message-ID: <20130604114941.GX15743@phenom.ffwll.local> References: <1370341566-13203-1-git-send-email-jani.nikula@intel.com> <1370341566-13203-3-git-send-email-jani.nikula@intel.com> <87ehcif8vw.fsf@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f182.google.com (mail-ea0-f182.google.com [209.85.215.182]) by gabe.freedesktop.org (Postfix) with ESMTP id F1EB0E5F22 for ; Tue, 4 Jun 2013 04:49:45 -0700 (PDT) Received: by mail-ea0-f182.google.com with SMTP id r16so93446ead.41 for ; Tue, 04 Jun 2013 04:49:44 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87ehcif8vw.fsf@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jani Nikula Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Jun 04, 2013 at 01:49:39PM +0300, Jani Nikula wrote: > > Failed to mention that this should address Daniel's complaints about the > ->pre_enable and ->enable calls being in the same spot [1]. And while I > needed this for something else, it should be easy to do the eDP > backlight fix Daniel mentions on top. Hm, I've thought the edp backlight thing would naturally fall out of this, since it's the last function called currently in enable_dp (if you ignore the vlv port ready check). But I guess we could do that as a follow-up, same for giving intel_dp.c a hard look wrt refactoring ;-) -Daniel > > Cheers, > Jani. > > > [1] http://mid.gmane.org/CAKMK7uFs9EMvMW8BnS24e5UNm1D7JrfVg3SD5SDFtVEamGfOOg@mail.gmail.com > > On Tue, 04 Jun 2013, Jani Nikula wrote: > > Encoder ->pre_enable and ->enable callbacks were moved back to back in > > VLV crtc enable sequence, which is not very useful. Move ->enable call > > at the end of the sequence. > > > > With the previously rearranged VLV DP and HDMI ->pre_enable and ->enable > > callbacks in place, this should not cause any functional changes. > > > > Signed-off-by: Jani Nikula > > --- > > drivers/gpu/drm/i915/intel_display.c | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > > index c112466..4250beb 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -3607,10 +3607,6 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc) > > if (encoder->pre_enable) > > encoder->pre_enable(encoder); > > > > - /* VLV wants encoder enabling _before_ the pipe is up. */ > > - for_each_encoder_on_crtc(dev, crtc, encoder) > > - encoder->enable(encoder); > > - > > /* Enable panel fitting for eDP */ > > i9xx_pfit_enable(intel_crtc); > > > > @@ -3624,6 +3620,9 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc) > > intel_crtc_dpms_overlay(intel_crtc, true); > > intel_crtc_update_cursor(crtc, true); > > > > + for_each_encoder_on_crtc(dev, crtc, encoder) > > + encoder->enable(encoder); > > + > > mutex_unlock(&dev_priv->dpio_lock); > > } > > > > -- > > 1.7.9.5 > > > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > _______________________________________________ > 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