public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Keith Packard <keithp@keithp.com>
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 5/7] drm/i915: Make DP prepare/commit consistent with DP dpms
Date: Thu, 3 Nov 2011 13:00:11 -0700	[thread overview]
Message-ID: <20111103130011.7946090a@jbarnes-desktop> (raw)
In-Reply-To: <1320214830-12696-6-git-send-email-keithp@keithp.com>


[-- Attachment #1.1: Type: text/plain, Size: 2509 bytes --]

On Tue,  1 Nov 2011 23:20:28 -0700
Keith Packard <keithp@keithp.com> wrote:

> Make sure the sequence of operations in all three functions makes
> sense:
> 
>  1) The backlight must be off unless the screen is running
>  2) The link must be running to turn the eDP panel on/off
>  3) The CPU eDP PLL must be running until everything is off

A few comments on this one (also, is it strictly required to fix your
bug)?

> Signed-off-by: Keith Packard <keithp@keithp.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c |   22 +++++++++++++---------
>  1 files changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index d6c6608..6be6a04 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1234,17 +1234,18 @@ static void intel_dp_prepare(struct drm_encoder *encoder)
>  {
>  	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
>  
> +	ironlake_edp_backlight_off(intel_dp);
> +	ironlake_edp_panel_off(intel_dp);
> +
>  	/* Wake up the sink first */
>  	ironlake_edp_panel_vdd_on(intel_dp);
>  	intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
> +	intel_dp_link_down(intel_dp);
>  	ironlake_edp_panel_vdd_off(intel_dp, false);
>  
>  	/* Make sure the panel is off before trying to
>  	 * change the mode
>  	 */
> -	ironlake_edp_backlight_off(intel_dp);
> -	intel_dp_link_down(intel_dp);
> -	ironlake_edp_panel_off(intel_dp);
>  }

Ok so you're making sure the panel has power to down the link, I think
that's fine.

>  static void intel_dp_commit(struct drm_encoder *encoder)
> @@ -1276,16 +1277,20 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode)
>  	uint32_t dp_reg = I915_READ(intel_dp->output_reg);
>  
>  	if (mode != DRM_MODE_DPMS_ON) {
> +		ironlake_edp_backlight_off(intel_dp);
> +		ironlake_edp_panel_off(intel_dp);
> +
>  		ironlake_edp_panel_vdd_on(intel_dp);
> -		if (is_edp(intel_dp))
> -			ironlake_edp_backlight_off(intel_dp);
>  		intel_dp_sink_dpms(intel_dp, mode);
>  		intel_dp_link_down(intel_dp);
> -		ironlake_edp_panel_off(intel_dp);
> -		if (is_edp(intel_dp) && !is_pch_edp(intel_dp))
> -			ironlake_edp_pll_off(encoder);
>  		ironlake_edp_panel_vdd_off(intel_dp, false);
> +
> +		if (is_cpu_edp(intel_dp))
> +			ironlake_edp_pll_off(encoder);


But here it looks like you're shutting it off, then downing the link?
Should this be reordered?

-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2011-11-03 20:00 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02  6:20 [PATCH 0/7] drm/i915: Fix PCH eDP support for SNB Keith Packard
2011-11-02  6:20 ` [PATCH 1/7] drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control Keith Packard
2011-11-02 16:02   ` [Intel-gfx] " Jesse Barnes
2011-11-02 16:13     ` Keith Packard
2011-11-02  6:20 ` [PATCH 2/7] drm/i915: Remove link_status field from intel_dp structure Keith Packard
2011-11-02 16:13   ` [Intel-gfx] " Jesse Barnes
2011-11-02  6:20 ` [PATCH 3/7] drm/i915: Treat PCH eDP like DP in most places Keith Packard
2011-11-02 15:29   ` [Intel-gfx] " Adam Jackson
2011-11-02 16:55     ` Keith Packard
2011-11-02 17:35     ` Keith Packard
2011-11-02 16:20   ` Jesse Barnes
2011-11-02 17:10     ` Keith Packard
2011-11-02 17:13     ` Adam Jackson
2011-11-02 17:31       ` Keith Packard
2011-11-02 19:36         ` [Intel-gfx] " Adam Jackson
2011-11-02 20:05           ` Keith Packard
2011-11-02 20:35             ` Adam Jackson
2011-11-02 21:13               ` Keith Packard
2011-11-02 21:16                 ` Adam Jackson
2011-11-02 18:54   ` Keith Packard
2011-11-02 19:07     ` Alex Deucher
2011-11-02  6:20 ` [PATCH 4/7] drm/i915: Let panel power sequencing hardware do its job Keith Packard
2011-11-02  7:31   ` Keith Packard
2011-11-02 16:23     ` [Intel-gfx] " Jesse Barnes
2011-11-02 17:14       ` Keith Packard
2011-11-02 17:37       ` Keith Packard
2011-11-03 19:57   ` Jesse Barnes
2011-11-03 22:01     ` Keith Packard
2011-11-02  6:20 ` [PATCH 5/7] drm/i915: Make DP prepare/commit consistent with DP dpms Keith Packard
2011-11-03 20:00   ` Jesse Barnes [this message]
2011-11-03 22:30     ` [Intel-gfx] " Keith Packard
2011-11-03 22:41       ` Jesse Barnes
2011-11-03 22:59         ` Keith Packard
2011-11-02  6:20 ` [PATCH 6/7] drm/i915: Try harder during dp pattern 1 link training Keith Packard
2011-11-02  9:12   ` Chris Wilson
2011-11-02 17:20     ` Keith Packard
2011-11-02 17:38     ` Keith Packard
2011-11-03 20:03   ` [Intel-gfx] " Jesse Barnes
2011-11-03 22:32     ` Keith Packard
2011-11-02  6:20 ` [PATCH 7/7] drm/i915: Remove trailing white space Keith Packard
2011-11-03 20:03   ` [Intel-gfx] " Jesse Barnes
2011-11-03 22:36     ` Keith Packard
2011-11-03 22:48     ` Keith Packard

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=20111103130011.7946090a@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    /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