All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kumar, Abhijeet" <abhijeet.kumar@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Patchwork <patchwork@emeril.freedesktop.org>,
	intel-gfx@lists.freedesktop.org, "Saarinen,
	Jani" <jani.saarinen@intel.com>, Takashi Iwai <tiwai@suse.de>
Subject: Re: [PATCH v2] ALSA: hda: Remove finite loop from snd_hdac_sync_power_state()
Date: Tue, 13 Feb 2018 19:21:40 +0530	[thread overview]
Message-ID: <57b1c99c-f8f9-aaf8-8176-7471da75f872@intel.com> (raw)
In-Reply-To: <151852604516.8633.17154215938297591184@mail.alporthouse.com>



On 2/13/2018 6:17 PM, Chris Wilson wrote:
> Quoting Kumar, Abhijeet (2018-02-13 12:41:42)
>>
>> On 2/13/2018 3:54 PM, abhijeet.kumar@intel.com wrote:
>>
>>      From: Abhijeet Kumar <abhijeet.kumar@intel.com>
>>
>>      Finite loop and msleep was causing few igt@pm_rpm tests failure
>>      for HSW and BDW. Thus removing them.
>>
>>      Fixes: 3b5b899ca67d ("ALSA: hda: Make use of core codec functions to
>>                      sync power state")
>>      References: https://bugs.freedesktop.org/show_bug.cgi?id=105069
>>
>>      Signed-off-by: Abhijeet Kumar <abhijeet.kumar@intel.com>
>>      ---
>>      Changes in v2:
>>      1. Removed msleep as well.
>>      2. Modified commit message.
>>       sound/hda/hdac_device.c | 8 +++-----
>>       1 file changed, 3 insertions(+), 5 deletions(-)
>>
>>      diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
>>      index 7ba100bb1c3f..678ef8950d0c 100644
>>      --- a/sound/hda/hdac_device.c
>>      +++ b/sound/hda/hdac_device.c
>>      @@ -1079,15 +1079,13 @@ unsigned int snd_hdac_sync_power_state(struct hdac_device *codec,
>>                              hda_nid_t nid, unsigned int power_state)
>>       {
>>              unsigned long end_time = jiffies + msecs_to_jiffies(500);
>>      -       unsigned int state, actual_state, count;
>>      +       unsigned int state, actual_state;
>>
>>      -       for (count = 0; count < 500; count++) {
>>      +       for (; ;) {
>>                      state = snd_hdac_codec_read(codec, nid, 0,
>>                                      AC_VERB_GET_POWER_STATE, 0);
>>      -               if (state & AC_PWRST_ERROR) {
>>      -                       msleep(20);
>>      +               if (state & AC_PWRST_ERROR)
>>                              break;
>>      -               }
>>                      actual_state = (state >> 4) & 0x0f;
>>                      if (actual_state == power_state)
>>                              break;
>>
>> The above changes is as good as revert. But we can still repro the issue.
> What about the different between snd_hda_codec_read() and
> snd_hdac_codec_read() ?
>
> It used to pass &codec->core and now it's just using codec.
>   
>> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7993/all.html
>>
>> Are we sure that this is the only bad commit for regression ?
> Absolutely.
>
>> And by looking at the logs it seems like the reason for test failure is that
>> after disabling all the screen
>>
>> the device state has still not reached the suspended state. Thus timing out and
>> asserting.

One more thing to note in kernel log is that we don't see display 
power-well going off despite the fact we
had unset all crtcs. Does that mean (not all but some) screen are still 
enabled ?
> Correct.
> -Chris

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

  parent reply	other threads:[~2018-02-13 13:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13  9:09 [PATCH] ALSA: hda: Remove finite loop from snd_hdac_sync_power_state() abhijeet.kumar
2018-02-13  9:14 ` Takashi Iwai
2018-02-13  9:42 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-02-13  9:45   ` Chris Wilson
2018-02-13 10:12     ` Kumar, Abhijeet
2018-02-13 10:36   ` Saarinen, Jani
2018-02-13 10:24 ` [PATCH v2] " abhijeet.kumar
2018-02-13 12:41   ` Kumar, Abhijeet
2018-02-13 12:47     ` Chris Wilson
2018-02-13 13:11       ` Kumar, Abhijeet
2018-02-13 13:29       ` Takashi Iwai
2018-02-13 13:51       ` Kumar, Abhijeet [this message]
2018-02-13 12:50   ` Jani Nikula
2018-02-13 11:02 ` ✓ Fi.CI.BAT: success for ALSA: hda: Remove finite loop from snd_hdac_sync_power_state() (rev2) Patchwork
2018-02-13 14:14 ` ✗ Fi.CI.IGT: warning " Patchwork

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=57b1c99c-f8f9-aaf8-8176-7471da75f872@intel.com \
    --to=abhijeet.kumar@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.saarinen@intel.com \
    --cc=patchwork@emeril.freedesktop.org \
    --cc=tiwai@suse.de \
    /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.