All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: update rawclk also on resume
Date: Tue, 05 Nov 2019 09:31:25 +0200	[thread overview]
Message-ID: <8736f2ye2a.fsf@intel.com> (raw)
In-Reply-To: <20191104153128.GK1208@intel.com>

On Mon, 04 Nov 2019, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Fri, Nov 01, 2019 at 04:20:24PM +0200, Jani Nikula 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 would be
>> intel_modeset_init_hw(), however VLV/CHV need it done before
>> intel_power_domains_init_hw(). Thus put it there even if it feels
>> slightly out of place.
>> 
>> v2: Call intel_update_rawclck() in intel_power_domains_init_hw() for all
>>     platforms (Ville).
>> 
>> 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>
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Thanks for the testing and review, pushed to dinq.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/display/intel_display_power.c | 3 +++
>>  drivers/gpu/drm/i915/i915_drv.c                    | 3 ---
>>  2 files changed, 3 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..ce1b64f4dd44 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
>> @@ -5015,6 +5015,9 @@ 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 */
>> +	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 3340485c12e3..71944399dcfc 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);
>> -- 
>> 2.20.1

-- 
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: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915: update rawclk also on resume
Date: Tue, 05 Nov 2019 09:31:25 +0200	[thread overview]
Message-ID: <8736f2ye2a.fsf@intel.com> (raw)
Message-ID: <20191105073125.4frtxCgxEO1iLl-5uATtGaWexYvtY8wxuDmoPlVBy2s@z> (raw)
In-Reply-To: <20191104153128.GK1208@intel.com>

On Mon, 04 Nov 2019, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Fri, Nov 01, 2019 at 04:20:24PM +0200, Jani Nikula 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 would be
>> intel_modeset_init_hw(), however VLV/CHV need it done before
>> intel_power_domains_init_hw(). Thus put it there even if it feels
>> slightly out of place.
>> 
>> v2: Call intel_update_rawclck() in intel_power_domains_init_hw() for all
>>     platforms (Ville).
>> 
>> 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>
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Thanks for the testing and review, pushed to dinq.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/display/intel_display_power.c | 3 +++
>>  drivers/gpu/drm/i915/i915_drv.c                    | 3 ---
>>  2 files changed, 3 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..ce1b64f4dd44 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
>> @@ -5015,6 +5015,9 @@ 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 */
>> +	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 3340485c12e3..71944399dcfc 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);
>> -- 
>> 2.20.1

-- 
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-05  7:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01 14:20 [PATCH v2] drm/i915: update rawclk also on resume Jani Nikula
2019-11-01 14:20 ` [Intel-gfx] " Jani Nikula
2019-11-01 17:58 ` ✓ Fi.CI.BAT: success for drm/i915: update rawclk also on resume (rev4) Patchwork
2019-11-01 17:58   ` [Intel-gfx] " Patchwork
2019-11-03  3:44 ` ✓ Fi.CI.IGT: " Patchwork
2019-11-03  3:44   ` [Intel-gfx] " Patchwork
2019-11-04 15:31 ` [PATCH v2] drm/i915: update rawclk also on resume Ville Syrjälä
2019-11-04 15:31   ` [Intel-gfx] " Ville Syrjälä
2019-11-05  7:31   ` Jani Nikula [this message]
2019-11-05  7:31     ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2019-10-31 11:14 [PATCH] " Jani Nikula
2019-11-01 14:45 ` [PATCH v2] " Lee Shawn C

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=8736f2ye2a.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@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 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.