From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Ben Skeggs <bskeggs@redhat.com>, Lyude Paul <lyude@redhat.com>,
Sasha Levin <sashal@kernel.org>,
kherbst@redhat.com, airlied@gmail.com, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org
Subject: [PATCH AUTOSEL 6.1 22/38] drm/nouveau/devinit/tu102-: wait for GFW_BOOT_PROGRESS == COMPLETED
Date: Thu, 9 Feb 2023 06:14:41 -0500 [thread overview]
Message-ID: <20230209111459.1891941-22-sashal@kernel.org> (raw)
In-Reply-To: <20230209111459.1891941-1-sashal@kernel.org>
From: Ben Skeggs <bskeggs@redhat.com>
[ Upstream commit d22915d22ded21fd5b24b60d174775789f173997 ]
Starting from Turing, the driver is no longer responsible for initiating
DEVINIT when required as the GPU started loading a FW image from ROM and
executing DEVINIT itself after power-on.
However - we apparently still need to wait for it to complete.
This should correct some issues with runpm on some systems, where we get
control of the HW before it's been fully reinitialised after resume from
suspend.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-1-bskeggs@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../drm/nouveau/nvkm/subdev/devinit/tu102.c | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c
index 634f64f88fc8b..81a1ad2c88a7e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c
@@ -65,10 +65,33 @@ tu102_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq)
return ret;
}
+static int
+tu102_devinit_wait(struct nvkm_device *device)
+{
+ unsigned timeout = 50 + 2000;
+
+ do {
+ if (nvkm_rd32(device, 0x118128) & 0x00000001) {
+ if ((nvkm_rd32(device, 0x118234) & 0x000000ff) == 0xff)
+ return 0;
+ }
+
+ usleep_range(1000, 2000);
+ } while (timeout--);
+
+ return -ETIMEDOUT;
+}
+
int
tu102_devinit_post(struct nvkm_devinit *base, bool post)
{
struct nv50_devinit *init = nv50_devinit(base);
+ int ret;
+
+ ret = tu102_devinit_wait(init->base.subdev.device);
+ if (ret)
+ return ret;
+
gm200_devinit_preos(init, post);
return 0;
}
--
2.39.0
next prev parent reply other threads:[~2023-02-09 11:19 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 11:14 [PATCH AUTOSEL 6.1 01/38] ASoC: amd: yc: Add DMI support for new acer/emdoor platforms Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 02/38] ASoC: SOF: sof-audio: start with the right widget type Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 03/38] ALSA: usb-audio: Add FIXED_RATE quirk for JBL Quantum610 Wireless Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 04/38] ASoC: Intel: sof_rt5682: always set dpcm_capture for amplifiers Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 05/38] ASoC: Intel: sof_cs42l42: " Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 06/38] ASoC: Intel: sof_nau8825: " Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 07/38] ASoC: Intel: sof_ssp_amp: " Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 08/38] selftests/bpf: Verify copy_register_state() preserves parent/live fields Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 09/38] ALSA: hda: Do not unset preset when cleaning up codec Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 10/38] ASoC: amd: yc: Add Xiaomi Redmi Book Pro 15 2022 into DMI table Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 11/38] bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 12/38] ASoC: cs42l56: fix DT probe Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 13/38] tools/virtio: fix the vringh test for virtio ring changes Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 14/38] vdpa: ifcvf: Do proper cleanup if IFCVF init fails Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 15/38] net/rose: Fix to not accept on connected socket Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 16/38] selftest: net: Improve IPV6_TCLASS/IPV6_HOPLIMIT tests apparmor compatibility Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 17/38] powerpc/85xx: Fix unannotated intra-function call warning Sasha Levin
2023-02-10 11:25 ` Sathvika Vasireddy
2023-02-14 0:06 ` Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 18/38] powerpc/kvm: " Sasha Levin
2023-02-10 11:26 ` Sathvika Vasireddy
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 19/38] net: stmmac: do not stop RX_CLK in Rx LPI state for qcs404 SoC Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 20/38] powerpc/64: Fix perf profiling asynchronous interrupt handlers Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 21/38] fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work() Sasha Levin
2023-02-09 11:14 ` Sasha Levin [this message]
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 23/38] net: ethernet: mtk_eth_soc: Avoid truncating allocation Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 24/38] net: sched: sch: Bounds check priority Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 25/38] s390/decompressor: specify __decompress() buf len to avoid overflow Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 26/38] nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 27/38] nvme: clear the request_queue pointers on failure in nvme_alloc_admin_tag_set Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 28/38] nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 29/38] drm/amd/display: Add missing brackets in calculation Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 30/38] drm/amd/display: Adjust downscaling limits for dcn314 Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 31/38] drm/amd/display: Unassign does_plane_fit_in_mall function from dcn3.2 Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 32/38] drm/amd/display: Reset DMUB mailbox SW state after HW reset Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 33/38] drm/amdgpu: enable HDP SD for gfx 11.0.3 Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 34/38] drm/amdgpu: Enable vclk dclk node for gc11.0.3 Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 35/38] drm/amd/display: Properly handle additional cases where DCN is not supported Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 36/38] platform/x86: touchscreen_dmi: Add Chuwi Vi8 (CWI501) DMI match Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 37/38] ceph: move mount state enum to super.h Sasha Levin
2023-02-09 11:14 ` [PATCH AUTOSEL 6.1 38/38] ceph: blocklist the kclient when receiving corrupted snap trace Sasha Levin
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=20230209111459.1891941-22-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=airlied@gmail.com \
--cc=bskeggs@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kherbst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=stable@vger.kernel.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