intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915: Clear shared dpll based on old state.
Date: Tue, 9 Feb 2016 15:25:42 +0200	[thread overview]
Message-ID: <20160209132542.GM23290@intel.com> (raw)
In-Reply-To: <1455022343-15222-1-git-send-email-maarten.lankhorst@linux.intel.com>

On Tue, Feb 09, 2016 at 01:52:21PM +0100, Maarten Lankhorst wrote:
> Atomic resume was preserving the dpll state because it was required
> for clearing pll state correctly. If we look at the old_crtc_state
> for pll to clear this is not needed and the hack can be removed.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 19 +++++++------------
>  1 file changed, 7 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3b6bd6e9f7ae..e496c130364d 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13093,8 +13093,6 @@ static void intel_modeset_clear_plls(struct drm_atomic_state *state)
>  	struct drm_device *dev = state->dev;
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  	struct intel_shared_dpll_config *shared_dpll = NULL;
> -	struct intel_crtc *intel_crtc;
> -	struct intel_crtc_state *intel_crtc_state;
>  	struct drm_crtc *crtc;
>  	struct drm_crtc_state *crtc_state;
>  	int i;
> @@ -13103,16 +13101,16 @@ static void intel_modeset_clear_plls(struct drm_atomic_state *state)
>  		return;
>  
>  	for_each_crtc_in_state(state, crtc, crtc_state, i) {
> -		int dpll;
> -
> -		intel_crtc = to_intel_crtc(crtc);
> -		intel_crtc_state = to_intel_crtc_state(crtc_state);
> -		dpll = intel_crtc_state->shared_dpll;
> +		struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> +		int dpll = to_intel_crtc_state(crtc->state)->shared_dpll;
>  
> -		if (!needs_modeset(crtc_state) || dpll == DPLL_ID_PRIVATE)
> +		if (!needs_modeset(crtc_state))
>  			continue;
>  
> -		intel_crtc_state->shared_dpll = DPLL_ID_PRIVATE;
> +		to_intel_crtc_state(crtc_state)->shared_dpll = DPLL_ID_PRIVATE;
> +
> +		if (dpll == DPLL_ID_PRIVATE)
> +			continue;

Maybe this should be called old_dpll or something for a bit of extra
clarity? Anyway this makes sense to me so
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  
>  		if (!shared_dpll)
>  			shared_dpll = intel_atomic_get_shared_dpll_state(state);
> @@ -15922,9 +15920,6 @@ void intel_display_resume(struct drm_device *dev)
>  
>  	state->acquire_ctx = dev->mode_config.acquire_ctx;
>  
> -	/* preserve complete old state, including dpll */
> -	intel_atomic_get_shared_dpll_state(state);
> -
>  	for_each_crtc(dev, crtc) {
>  		struct drm_crtc_state *crtc_state =
>  			drm_atomic_get_crtc_state(state, crtc);
> -- 
> 2.1.0

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-02-09 13:25 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 13:43 [PATCH 0/6] Use more atomic state in i915 Maarten Lankhorst
2016-02-01 13:43 ` [PATCH 1/6] drm/i915: Use atomic state to obtain load detection crtc Maarten Lankhorst
2016-02-01 16:08   ` Ville Syrjälä
2016-02-02 10:41     ` Maarten Lankhorst
2016-02-01 17:09   ` Ville Syrjälä
2016-02-02 12:46     ` Maarten Lankhorst
2016-02-02 12:48   ` [PATCH v2 1/6] drm/i915: Use atomic state to obtain load detection crtc, v2 Maarten Lankhorst
2016-02-02 17:32     ` Ville Syrjälä
2016-02-03  8:57       ` Maarten Lankhorst
2016-02-03 16:34         ` Ville Syrjälä
2016-02-09  8:57           ` Maarten Lankhorst
2016-02-09 12:52           ` [PATCH 1/3] drm/i915: Clear shared dpll based on old state Maarten Lankhorst
2016-02-09 12:52             ` [PATCH 2/3] drm/i915: Use atomic helpers for suspend Maarten Lankhorst
2016-02-09 13:37               ` Ville Syrjälä
2016-02-09 14:05                 ` Maarten Lankhorst
2016-02-09 14:58                   ` Ville Syrjälä
2016-02-15 12:34                     ` Maarten Lankhorst
2016-02-16  9:06                     ` [PATCH v2 2/3] drm/i915: Use atomic helpers for suspend, v2 Maarten Lankhorst
2016-02-16  9:55                       ` Ville Syrjälä
2016-02-09 12:52             ` [PATCH 3/3] drm/i915: Use atomic state to obtain load detection crtc, v3 Maarten Lankhorst
2016-02-16 11:13               ` Ville Syrjälä
2016-02-09 13:25             ` Ville Syrjälä [this message]
2016-02-11  8:56   ` [PATCH 1/6] drm/i915: Use atomic state to obtain load detection crtc Daniel Vetter
2016-02-01 13:43 ` [PATCH 2/6] drm/i915: Use atomic state in crt load detection Maarten Lankhorst
2016-02-01 13:43 ` [PATCH 3/6] drm/i915: Use atomic state in tv " Maarten Lankhorst
2016-02-01 13:44 ` [PATCH 4/6] drm/i915: Use correct dpms for intel_enable_crt Maarten Lankhorst
2016-02-01 13:44 ` [IGT PATCH 5/6] kms_force_connector_basic: Add force-load-detect test Maarten Lankhorst
2016-02-11  8:59   ` Daniel Vetter
2016-02-11 11:50     ` Maarten Lankhorst
2016-02-01 13:44 ` [PATCH 6/6] drm/i915: Use atomic state in intel_fb_initial_config Maarten Lankhorst
2016-02-11 14:38   ` 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=20160209132542.GM23290@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.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;
as well as URLs for NNTP newsgroup(s).