public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [RFC PATCH 1/3] drm/i915: move backlight enable later in vlv enable sequence
Date: Wed, 4 Sep 2013 21:30:48 +0300	[thread overview]
Message-ID: <20130904183047.GT11428@intel.com> (raw)
In-Reply-To: <4dc01095562b360832a9b33429862199dd4e73d3.1378208439.git.jani.nikula@intel.com>

On Tue, Sep 03, 2013 at 02:43:37PM +0300, Jani Nikula wrote:
> Follow-up to
> commit 5004945f1d6c0282c0288afa89ad85d7f2bea4d5
> Author: Jani Nikula <jani.nikula@intel.com>
> Date:   Tue Jul 30 12:20:32 2013 +0300
> 
>     drm/i915: move encoder->enable callback later in VLV crtc enable
> 
> Reference: http://mid.gmane.org/CAKMK7uFs9EMvMW8BnS24e5UNm1D7JrfVg3SD5SDFtVEamGfOOg@mail.gmail.com
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index c192dbb..adbe7bc 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1717,11 +1717,17 @@ static void intel_enable_dp(struct intel_encoder *encoder)
>  	ironlake_edp_panel_vdd_off(intel_dp, true);
>  	intel_dp_complete_link_train(intel_dp);
>  	intel_dp_stop_link_train(intel_dp);
> -	ironlake_edp_backlight_on(intel_dp);
> +
> +	/* this function is called from vlv_pre_enable_dp() */
> +	if (!IS_VALLEYVIEW(dev))
> +		ironlake_edp_backlight_on(intel_dp);
>  }
>  
>  static void vlv_enable_dp(struct intel_encoder *encoder)
>  {
> +	struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
> +
> +	ironlake_edp_backlight_on(intel_dp);
>  }

This feels a bit off to me since we've already started to use
separate functions for VLV vs. others. So how about something a bit
more in line with that design:

 	intel_enable_dp() {
 		...
-		ironlake_edp_backlight_on()
 	}
 
+	g4x_enable_dp() {
+		intel_enable_dp()
+		ironlake_edp_backlight_on()
+	}
 
 	vlv_enable_dp() {
+		ironlake_edp_backlight_on()
 	}
...
-		intel_encoder->enable = intel_enable_dp;
+		intel_encoder->enable = g4x_enable_dp;

And also perhaps s/intel_pre_enable_dp/g4x_pre_enable_dp/
and s/intel_dp_pre_pll_enable/vlv_dp_pre_pll_enable/
just to keep the naming somewhat predictable.

Also we could kill the !IS_VLV check from intel_dp_pre_pll_enable()
since we don't plug that guy in except on VLV.

>  
>  static void intel_pre_enable_dp(struct intel_encoder *encoder)
> -- 
> 1.7.9.5

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-09-04 18:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 11:43 [RFC PATCH 0/3] drm/i915: vlv backlight, per-pipe power sequencing fixes Jani Nikula
2013-09-03 11:43 ` [RFC PATCH 1/3] drm/i915: move backlight enable later in vlv enable sequence Jani Nikula
2013-09-04 18:30   ` Ville Syrjälä [this message]
2013-09-03 11:43 ` [RFC PATCH 2/3] drm/i915: clean up power sequencing register port select definitions Jani Nikula
2013-09-05 11:55   ` Ville Syrjälä
2013-09-03 11:43 ` [RFC PATCH 3/3] drm/i915: add support for per-pipe power sequencing on vlv Jani Nikula
2013-09-05 12:12   ` Ville Syrjälä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130904183047.GT11428@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox