All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Lee Shawn C <shawn.c.lee@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3] drm/i915: update rawclk also on resume
Date: Fri, 01 Nov 2019 16:24:27 +0200	[thread overview]
Message-ID: <877e4j8yjo.fsf@intel.com> (raw)
In-Reply-To: <20191101162938.23171-1-shawn.c.lee@intel.com>

On Sat, 02 Nov 2019, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> Since CNP it's possible for rawclk to have two different values, 19.2
> and 24 MHz. If the value indicated by SFUSE_STRAP register is different
> from the power on default for PCH_RAWCLK_FREQ, we'll end up having a
> mismatch between the rawclk hardware and software states after
> suspend/resume. On previous platforms this used to work by accident,
> because the power on defaults worked just fine.
>
> Update the rawclk also on resume. The natural place to do this is
> intel_modeset_init_hw(), however VLV/CHV need it done before
> intel_power_domains_init_hw(). Split the update accordingly, even if
> that's slighly ugly. This means moving the update later for non-VLV/CHV
> platforms in probe.
>
> v2: Do intel_update_rawclk() at intel_power_domains_init_hw(). Rawclk will
> be configured with proper setting and executed before intel_modeset_init_hw().
> v3: Update code base to latest to fix git merge failed.
>
> Reported-by: Shawn Lee <shawn.c.lee@intel.com>
> Cc: Shawn Lee <shawn.c.lee@intel.com>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>

Please don't change the authorship of patches when you make new versions
of them, especially so if the changes are neglible. 90% of the work in
the original was writing the commit message, and here the commit message
no longer matches the actual change.

My v2 of the patch is [1].

BR,
Jani.


[1] http://patchwork.freedesktop.org/patch/msgid/20191101142024.13877-1-jani.nikula@intel.com


> ---
>  drivers/gpu/drm/i915/display/intel_display_power.c | 6 ++++++
>  drivers/gpu/drm/i915/i915_drv.c                    | 3 ---
>  2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> index 707ac110e271..21a95d181a20 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -5015,6 +5015,12 @@ void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume)
>  
>  	power_domains->initializing = true;
>  
> +	/*
> +	 * Must happen before power domain init on VLV/CHV, the rest update
> +	 * rawclk can be done here as well.
> +	 */
> +	intel_update_rawclk(i915);
> +
>  	if (INTEL_GEN(i915) >= 11) {
>  		icl_display_core_init(i915, resume);
>  	} else if (IS_CANNONLAKE(i915)) {
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 480e2054f628..b26b4457339c 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -296,9 +296,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
>  	if (ret)
>  		goto cleanup_vga_client;
>  
> -	/* must happen before intel_power_domains_init_hw() on VLV/CHV */
> -	intel_update_rawclk(i915);
> -
>  	intel_power_domains_init_hw(i915, false);
>  
>  	intel_csr_ucode_init(i915);

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@intel.com>
To: Lee Shawn C <shawn.c.lee@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v3] drm/i915: update rawclk also on resume
Date: Fri, 01 Nov 2019 16:24:27 +0200	[thread overview]
Message-ID: <877e4j8yjo.fsf@intel.com> (raw)
Message-ID: <20191101142427.8fbMac_S_R5lF7_WpKeA-JPWyjIX449HseGyUwEH2FU@z> (raw)
In-Reply-To: <20191101162938.23171-1-shawn.c.lee@intel.com>

On Sat, 02 Nov 2019, Lee Shawn C <shawn.c.lee@intel.com> wrote:
> Since CNP it's possible for rawclk to have two different values, 19.2
> and 24 MHz. If the value indicated by SFUSE_STRAP register is different
> from the power on default for PCH_RAWCLK_FREQ, we'll end up having a
> mismatch between the rawclk hardware and software states after
> suspend/resume. On previous platforms this used to work by accident,
> because the power on defaults worked just fine.
>
> Update the rawclk also on resume. The natural place to do this is
> intel_modeset_init_hw(), however VLV/CHV need it done before
> intel_power_domains_init_hw(). Split the update accordingly, even if
> that's slighly ugly. This means moving the update later for non-VLV/CHV
> platforms in probe.
>
> v2: Do intel_update_rawclk() at intel_power_domains_init_hw(). Rawclk will
> be configured with proper setting and executed before intel_modeset_init_hw().
> v3: Update code base to latest to fix git merge failed.
>
> Reported-by: Shawn Lee <shawn.c.lee@intel.com>
> Cc: Shawn Lee <shawn.c.lee@intel.com>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>

Please don't change the authorship of patches when you make new versions
of them, especially so if the changes are neglible. 90% of the work in
the original was writing the commit message, and here the commit message
no longer matches the actual change.

My v2 of the patch is [1].

BR,
Jani.


[1] http://patchwork.freedesktop.org/patch/msgid/20191101142024.13877-1-jani.nikula@intel.com


> ---
>  drivers/gpu/drm/i915/display/intel_display_power.c | 6 ++++++
>  drivers/gpu/drm/i915/i915_drv.c                    | 3 ---
>  2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> index 707ac110e271..21a95d181a20 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> @@ -5015,6 +5015,12 @@ void intel_power_domains_init_hw(struct drm_i915_private *i915, bool resume)
>  
>  	power_domains->initializing = true;
>  
> +	/*
> +	 * Must happen before power domain init on VLV/CHV, the rest update
> +	 * rawclk can be done here as well.
> +	 */
> +	intel_update_rawclk(i915);
> +
>  	if (INTEL_GEN(i915) >= 11) {
>  		icl_display_core_init(i915, resume);
>  	} else if (IS_CANNONLAKE(i915)) {
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 480e2054f628..b26b4457339c 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -296,9 +296,6 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
>  	if (ret)
>  		goto cleanup_vga_client;
>  
> -	/* must happen before intel_power_domains_init_hw() on VLV/CHV */
> -	intel_update_rawclk(i915);
> -
>  	intel_power_domains_init_hw(i915, false);
>  
>  	intel_csr_ucode_init(i915);

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-11-01 14:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31 11:14 [PATCH] drm/i915: update rawclk also on resume Jani Nikula
2019-10-31 11:14 ` [Intel-gfx] " Jani Nikula
2019-10-31 13:53 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-10-31 13:53   ` [Intel-gfx] " Patchwork
2019-10-31 13:56 ` [PATCH] " Ville Syrjälä
2019-10-31 13:56   ` [Intel-gfx] " Ville Syrjälä
2019-11-01  3:17   ` Lee, Shawn C
2019-11-01  3:17     ` [Intel-gfx] " Lee, Shawn C
2019-11-01  6:56 ` ✗ Fi.CI.BUILD: failure for drm/i915: update rawclk also on resume (rev2) Patchwork
2019-11-01  6:56   ` [Intel-gfx] " Patchwork
2019-11-01  9:03 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: update rawclk also on resume (rev3) Patchwork
2019-11-01  9:03   ` [Intel-gfx] " Patchwork
2019-11-01  9:33 ` ✓ Fi.CI.BAT: success " Patchwork
2019-11-01  9:33   ` [Intel-gfx] " Patchwork
2019-11-01 13:18 ` ✓ Fi.CI.IGT: success for drm/i915: update rawclk also on resume Patchwork
2019-11-01 13:18   ` [Intel-gfx] " Patchwork
2019-11-01 14:45 ` [PATCH v2] " Lee Shawn C
2019-11-01 14:45   ` [Intel-gfx] " Lee Shawn C
2019-11-01 16:29 ` [PATCH v3] " Lee Shawn C
2019-11-01 16:29   ` [Intel-gfx] " Lee Shawn C
2019-11-01 14:24   ` Jani Nikula [this message]
2019-11-01 14:24     ` Jani Nikula

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=877e4j8yjo.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=shawn.c.lee@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.