All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] redo
Date: Tue, 13 Feb 2018 20:44:03 +0000	[thread overview]
Message-ID: <151855464378.25823.18101397253499077904@mail.alporthouse.com> (raw)
In-Reply-To: <20180213192918.26331-2-chris@chris-wilson.co.uk>

Quoting Chris Wilson (2018-02-13 19:29:18)
> ---
>  sound/pci/hda/hda_codec.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> index e018ecbf78a8..afa5f5155220 100644
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -2711,12 +2711,15 @@ static unsigned int hda_sync_power_state(struct hda_codec *codec,
>  {
>         unsigned long end_time = jiffies + msecs_to_jiffies(500);
>         unsigned int state, actual_state;
> +       int count;
>  
> -       for (;;) {
> +       for (count = 0; count < 500; count++) {
>                 state = snd_hda_codec_read(codec, fg, 0,
>                                            AC_VERB_GET_POWER_STATE, 0);
> -               if (state & AC_PWRST_ERROR)
> +               if (state & AC_PWRST_ERROR) {
> +                       msleep(20);
>                         break;
> +               }

This was just to demonstrate that applying the obvious functional
changes from the common routine to hda_codec.c didn't break it.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-02-13 20:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 19:29 [PATCH 1/2] AWOOGA: Revert "ALSA: hda: Make use of core codec functions to sync power state" Chris Wilson
2018-02-13 19:29 ` [PATCH 2/2] redo Chris Wilson
2018-02-13 20:44   ` Chris Wilson [this message]
2018-02-14  4:06   ` [PATCH 1/3] Revert "ALSA: hda: Make use of core codec functions to sync power state" abhijeet.kumar
2018-02-14  4:06     ` [PATCH 2/3] redo abhijeet.kumar
2018-02-14  4:06     ` [PATCH 3/3] just some guess work to findout the culprit. If this breaks then we know what do abhijeet.kumar
2018-02-14  4:53       ` Kumar, Abhijeet
2018-02-14  8:47         ` Chris Wilson
2018-02-14  9:06           ` Kumar, Abhijeet
2018-02-14 11:18             ` Takashi Iwai
2018-02-14 13:11               ` Kumar, Abhijeet
2018-04-18 15:16                 ` Jani Nikula
2018-02-13 19:55 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] AWOOGA: Revert "ALSA: hda: Make use of core codec functions to sync power state" 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=151855464378.25823.18101397253499077904@mail.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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 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.