From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH 1/2] hw/audio/intel-hda: don't reset codecs twice
Date: Mon, 17 Oct 2022 23:05:16 +0200 [thread overview]
Message-ID: <b093ee20-7f66-cc51-ae3c-ff785eb955ca@linaro.org> (raw)
In-Reply-To: <20221014142632.2092404-2-peter.maydell@linaro.org>
On 14/10/22 16:26, Peter Maydell wrote:
> Currently the intel-hda device has a reset method which manually
> resets all the codecs by calling device_legacy_reset() on them. This
> means they get reset twice, once because child devices on a qbus get
> reset before the parent device's reset method is called, and then
> again because we're manually resetting them.
>
> Drop the manual reset call, and ensure that codecs are still reset
> when the guest does a reset via ICH6_GCTL_RESET by using
> device_cold_reset() (which resets all the devices on the qbus as well
> as the device itself) instead of a direct call to the reset function.
>
> This is a slight ordering change because the (only) codec reset now
> happens before the controller registers etc are reset, rather than
> once before and then once after, but the codec reset function
> hda_audio_reset() doesn't care.
>
> This lets us drop a use of device_legacy_reset(), which is
> deprecated.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> hw/audio/intel-hda.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2022-10-17 21:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 14:26 [PATCH 0/2] hw/audio/intel-hda: Don't use device_legacy_reset() Peter Maydell
2022-10-14 14:26 ` [PATCH 1/2] hw/audio/intel-hda: don't reset codecs twice Peter Maydell
2022-10-17 21:05 ` Philippe Mathieu-Daudé [this message]
2022-10-14 14:26 ` [PATCH 2/2] hw/audio/intel-hda: Drop unnecessary prototype Peter Maydell
2022-10-17 21:05 ` Philippe Mathieu-Daudé
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=b093ee20-7f66-cc51-ae3c-ff785eb955ca@linaro.org \
--to=philmd@linaro.org \
--cc=kraxel@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 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).