search for: nvkm_msec

Displaying 20 results from an estimated 36 matches for "nvkm_msec".

Did you mean: nvkm_mc
2015 Nov 14
2
[PATCH v2] pmu: use nvkm_msec instead of do while
.../subdev/pmu/base.c index 81a5583..eb248fd 100644 --- a/drm/nouveau/nvkm/subdev/pmu/base.c +++ b/drm/nouveau/nvkm/subdev/pmu/base.c @@ -100,9 +100,16 @@ nvkm_pmu_send(struct nvkm_pmu *pmu, u32 reply[2], } /* acquire data segment access */ - do { + nvkm_wr32(device, 0x10a580, 0x00000001); + if (nvkm_msec(device, 2000, + if (nvkm_rd32(device, 0x10a580) == 0x00000001) + break; nvkm_wr32(device, 0x10a580, 0x00000001); - } while (nvkm_rd32(device, 0x10a580) != 0x00000001); + ) < 0) { + if (reply) + mutex_unlock(&subdev->mutex); + return -EBUSY; + } /* write the packet */ nvkm_...
2015 Nov 14
0
[PATCH] pmu: use nvkm_msec instead of do while
.../subdev/pmu/base.c index fafbe2a..398b6a8 100644 --- a/drm/nouveau/nvkm/subdev/pmu/base.c +++ b/drm/nouveau/nvkm/subdev/pmu/base.c @@ -106,9 +106,15 @@ nvkm_pmu_send(struct nvkm_pmu *pmu, u32 reply[2], } /* acquire data segment access */ - do { + nvkm_wr32(device, 0x10a580, 0x00000001); + if (nvkm_msec(device, 2000, + if (nvkm_rd32(device, 0x10a580) == 0x00000001) + break; nvkm_wr32(device, 0x10a580, 0x00000001); - } while (nvkm_rd32(device, 0x10a580) != 0x00000001); + ) < 0) { + mutex_unlock(&subdev->mutex); + return -EBUSY; + } /* write the packet */ nvkm_wr32(device, 0x...
2015 Nov 15
0
[PATCH v2] pmu: use nvkm_msec instead of do while
...bdev/pmu/base.c > > +++ b/drm/nouveau/nvkm/subdev/pmu/base.c > > @@ -100,9 +100,16 @@ nvkm_pmu_send(struct nvkm_pmu *pmu, u32 reply[2], > > } > > > > /* acquire data segment access */ > > - do { > > + nvkm_wr32(device, 0x10a580, 0x00000001); > > + if (nvkm_msec(device, 2000, > > + if (nvkm_rd32(device, 0x10a580) == 0x00000001) > > + break; > > nvkm_wr32(device, 0x10a580, 0x00000001); > > - } while (nvkm_rd32(device, 0x10a580) != 0x00000001); > > + ) < 0) { > > + if (reply) > > + mutex_unlock(&amp;subdev-&gt...
2016 Jun 04
0
[PATCH 1/3] nvkm/clk/gf100+: Clean up PLL locking test
...drm/nouveau/nvkm/subdev/clk/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gf100.c @@ -366,11 +366,20 @@ gf100_clk_prog_2(struct gf100_clk *clk, int idx) if (info->coef) { nvkm_wr32(device, addr + 0x04, info->coef); nvkm_mask(device, addr + 0x00, 0x00000001, 0x00000001); - nvkm_msec(device, 2000, + + /* Test PLL lock */ + nvkm_mask(device, addr + 0x00, 0x00000010, 0x00000000); + if (nvkm_msec(device, 2000, if (nvkm_rd32(device, addr + 0x00) & 0x00020000) break; - ); - nvkm_mask(device, addr + 0x00, 0x00020004, 0x00000004); + ) < 0) { + nvkm_war...
2016 Jun 04
3
PM + Init work
Following a series of three patches, two of which have been sitting in my tree for a while, the third is the result of some inspection of an NV134 BIOS that seems to use the 0xaf upcode to upload training patterns. Please test! Roy Ps. Sorry they come from yet another e-mail address. My previous provider, eclipso, actively blocks users of git send-email. Inquiries fall on deaf ears, hence I
2016 Jun 17
1
[PATCH v2 1/2] nvkm/clk/gf100+: Clean up PLL locking test
Corresponds with GT215. Don't rely on the lock test logic being unconditionally enabled, and disable test logic when done (presumably to save power). v2: Remove warning, nvkm_msec already warns on time-out Signed-off-by: Roy Spliet <nouveau at spliet.org> --- drivers/gpu/drm/nouveau/nvkm/subdev/clk/gf100.c | 8 +++++++- drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk104.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau...
2019 Sep 06
1
[PATCH v3] clk: Restore BYPASS_PLL_CHECK from PLLs
...00000000); @@ -376,12 +377,14 @@ gf100_clk_prog_2(struct gf100_clk *clk, int idx) nvkm_mask(device, addr + 0x00, 0x00000001, 0x00000001); /* Test PLL lock */ + bypass_state = nvkm_rd32(device, addr + 0x00) & 0x00000010; nvkm_mask(device, addr + 0x00, 0x00000010, 0x00000000); nvkm_msec(device, 2000, if (nvkm_rd32(device, addr + 0x00) & 0x00020000) break; ); - nvkm_mask(device, addr + 0x00, 0x00000010, 0x00000010); + if (bypass_state) + nvkm_mask(device, addr + 0x00, 0x00000010, 0x00000010); /* Enable sync mode */ nvkm_mask(device, addr + 0x00,...
2015 Sep 03
2
[PATCH 2/3] ltc/gf100: add flush/invalidate functions
...c_intr(struct nvkm_ltc *ltc) > } > } > > +void > +gf100_ltc_invalidate(struct nvkm_ltc *ltc) > +{ > + struct nvkm_device *device = ltc->subdev.device; > + s64 taken; > + > + nvkm_wr32(device, 0x70004, 0x00000001); > + if ((taken = nvkm_msec(device, 2000, I don't suppose you have access to information on more realistic timeouts? I'd like to improve all the potential 2s timeout values across the driver in general, to avoid things hanging for a long time when the GPU craps itself :) > + if ((nvkm_rd32(device, 0...
2019 Sep 04
0
[RFC PATCH] clk: Remove BYPASS_PLL_CHECK from PLLs
...veau/nvkm/subdev/clk/gf100.c @@ -375,14 +375,6 @@ gf100_clk_prog_2(struct gf100_clk *clk, int idx) nvkm_wr32(device, addr + 0x04, info->coef); nvkm_mask(device, addr + 0x00, 0x00000001, 0x00000001); - /* Test PLL lock */ - nvkm_mask(device, addr + 0x00, 0x00000010, 0x00000000); - nvkm_msec(device, 2000, - if (nvkm_rd32(device, addr + 0x00) & 0x00020000) - break; - ); - nvkm_mask(device, addr + 0x00, 0x00000010, 0x00000010); - /* Enable sync mode */ nvkm_mask(device, addr + 0x00, 0x00000004, 0x00000004); } diff --git a/drm/nouveau/nvkm/subdev/clk/gk104.c b/dr...
2019 Sep 12
1
[PATCH 3/3] pci/gk104: wait for ltssm idle before changing the link
...er.h> > + > static int > gk104_pcie_version_supported(struct nvkm_pci *pci) > { > @@ -142,6 +144,11 @@ gk104_pcie_set_link_speed(struct nvkm_pci *pci, enum nvkm_pcie_speed speed) > break; > } > > + /* wait for ltssm idle */ > + nvkm_msec(device, 200, > + if ((nvkm_rd32(device, 0x8c040) & 0x1f) == 0) > + break; > + ); What if it doesn't idle? Should you still do the below things? > nvkm_mask(device, 0x8c040, 0xc0000, mask_value); > nvkm_mask(device, 0...
2015 Sep 03
3
[PATCH 0/3] New instmem implementation for Tegra
Due to the lack of implicit synchronization between CPU and GPU on Tegra systems (like what PCI provides for dGPUs), the instmem implementation of GK20A/GM20B relied on the slow, legacy PRAMIN so that CPU accesses used the same path as GPU, making sure we see the same data on both ends. The recent Nouveau refactoring introduced acquire/release functions on instmem that help us understand the
2019 Sep 09
0
[PATCH v4] clk: Restore BYPASS_PLL_CHECK from PLLs
...77,13 @@ gf100_clk_prog_2(struct gf100_clk *clk, int idx) nvkm_mask(device, addr + 0x00, 0x00000001, 0x00000001); /* Test PLL lock */ - nvkm_mask(device, addr + 0x00, 0x00000010, 0x00000000); + bypass_state = nvkm_mask(device, addr + 0x00, 0x00000010, 0x00000000) & 0x00000010; nvkm_msec(device, 2000, if (nvkm_rd32(device, addr + 0x00) & 0x00020000) break; ); - nvkm_mask(device, addr + 0x00, 0x00000010, 0x00000010); + if (bypass_state) + nvkm_mask(device, addr + 0x00, 0x00000010, 0x00000010); /* Enable sync mode */ nvkm_mask(device, addr + 0x00,...
2023 Feb 20
1
linux-6.2-rc4+ hangs on poweroff/reboot: Bisected
...bump into this obscenity: > >>> > >>> int > >>> gm200_flcn_reset_wait_mem_scrubbing(struct nvkm_falcon *falcon) > >>> { > >>> nvkm_falcon_mask(falcon, 0x040, 0x00000000, 0x00000000); > >>> > >>> if (nvkm_msec(falcon->owner->device, 10, > >>> if (!(nvkm_falcon_rd32(falcon, 0x10c) & 0x00000006)) > >>> break; > >>> ) < 0) > >>> return -ETIMEDOUT; > >>> > >>>...
2016 Dec 06
9
[PATCH 0/8] Falcon library
This was the first step of the secure boot refactoring - as Ben asked for some fixes, I now submit it as its own series to make it easier to review (and also because rebasing secure boot on top of this takes time and I don't want to do it until this is validated!). This series attempts to factorize the duplicate falcon-related code into a single library, using the existing nvkm_falcon
2015 Sep 03
2
[PATCH 2/3] ltc/gf100: add flush/invalidate functions
...;> +void >>> +gf100_ltc_invalidate(struct nvkm_ltc *ltc) >>> +{ >>> + struct nvkm_device *device = ltc->subdev.device; >>> + s64 taken; >>> + >>> + nvkm_wr32(device, 0x70004, 0x00000001); >>> + if ((taken = nvkm_msec(device, 2000, >> I don't suppose you have access to information on more realistic >> timeouts? I'd like to improve all the potential 2s timeout values >> across the driver in general, to avoid things hanging for a long time >> when the GPU craps itself :) > >...
2023 Mar 10
1
linux-6.2-rc4+ hangs on poweroff/reboot: Bisected
...t; int > >>>>>> gm200_flcn_reset_wait_mem_scrubbing(struct nvkm_falcon *falcon) > >>>>>> { > >>>>>> nvkm_falcon_mask(falcon, 0x040, 0x00000000, 0x00000000); > >>>>>> > >>>>>> if (nvkm_msec(falcon->owner->device, 10, > >>>>>> if (!(nvkm_falcon_rd32(falcon, 0x10c) & 0x00000006)) > >>>>>> break; > >>>>>> ) < 0) > >>>>>> return -...
2016 Dec 13
15
[PATCH v2 0/15] Falcon library
This was the first step of the secure boot refactoring - as Ben asked for some fixes, I now submit it as its own series to make it easier to review (and also because rebasing secure boot on top of this takes time and I don't want to do it until this is validated!). This series attempts to factorize the duplicate falcon-related code into a single library, using the existing nvkm_falcon
2023 Feb 20
2
linux-6.2-rc4+ hangs on poweroff/reboot: Bisected
...39;d love to but a quick glance at the code caused me to bump into this obscenity: > > > > int > > gm200_flcn_reset_wait_mem_scrubbing(struct nvkm_falcon *falcon) > > { > > nvkm_falcon_mask(falcon, 0x040, 0x00000000, 0x00000000); > > > > if (nvkm_msec(falcon->owner->device, 10, > > if (!(nvkm_falcon_rd32(falcon, 0x10c) & 0x00000006)) > > break; > > ) < 0) > > return -ETIMEDOUT; > > > > return 0; > > } > > > >...
2015 Sep 02
1
Fix reclocking regression in drm-next
Attached patch fixes an issue reported by Pierre Moreau, that prevents reclocking of GT21x and MCP7x from working after "the big rewrite". Please review and push forward for kernel 4.3. Thanks! Roy
2016 Jan 15
0
[PATCH] ltc/gm107: wait on relevant bit in gm107_ltc_cbc_wait
...44 --- a/drm/nouveau/nvkm/subdev/ltc/gm107.c +++ b/drm/nouveau/nvkm/subdev/ltc/gm107.c @@ -43,10 +43,8 @@ gm107_ltc_cbc_wait(struct nvkm_ltc *ltc) for (c = 0; c < ltc->ltc_nr; c++) { for (s = 0; s < ltc->lts_nr; s++) { const u32 addr = 0x14046c + (c * 0x2000) + (s * 0x200); - nvkm_msec(device, 2000, - if (!nvkm_rd32(device, addr)) - break; - ); + nvkm_wait_msec(device, 2000, addr, + 0x00000004, 0x00000000); } } } -- 2.7.0