search for: nvkm_mc_enabled

Displaying 9 results from an estimated 9 matches for "nvkm_mc_enabled".

2016 Dec 13
0
[PATCH v2 2/15] mc: add nvkm_mc_enabled() function
...ev/mc.h index 27d25b18d85c..e68ba636741b 100644 --- a/drm/nouveau/include/nvkm/subdev/mc.h +++ b/drm/nouveau/include/nvkm/subdev/mc.h @@ -9,6 +9,7 @@ struct nvkm_mc { void nvkm_mc_enable(struct nvkm_device *, enum nvkm_devidx); void nvkm_mc_disable(struct nvkm_device *, enum nvkm_devidx); +bool nvkm_mc_enabled(struct nvkm_device *, enum nvkm_devidx); void nvkm_mc_reset(struct nvkm_device *, enum nvkm_devidx); void nvkm_mc_intr(struct nvkm_device *, bool *handled); void nvkm_mc_intr_unarm(struct nvkm_device *); diff --git a/drm/nouveau/nvkm/subdev/mc/base.c b/drm/nouveau/nvkm/subdev/mc/base.c index 6b2...
2016 Dec 06
9
[PATCH 0/8] Falcon library
...ad and execure code, and not care about implementation details. This series also updates gr and secboot use the falcon library as an example. Converting other engines is trivial and should make our use of falcons generally safer. Alexandre Courbot (8): core: constify nv*_printk macros mc: add nvkm_mc_enabled() function core: add falcon library functions secboot: use falcon library definitions secboot: use falcon library gr/gf100: split gf100_gr_init_ctxctl() gr/gf100: use falcon library secboot: remove nvkm_secboot_start() drm/nouveau/include/nvkm/core/client.h | 4 +- drm/nouveau/in...
2018 Dec 14
1
[PATCH] drm/nouveau/falcon: avoid touching registers if engine is off
...+#include <subdev/mc.h> #include <subdev/timer.h> #include <engine/fifo.h> @@ -107,8 +108,10 @@ nvkm_falcon_fini(struct nvkm_engine *engine, bool suspend) } } - nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); - nvkm_wr32(device, base + 0x014, 0xffffffff); + if (nvkm_mc_enabled(device, engine->subdev.index)) { + nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); + nvkm_wr32(device, base + 0x014, 0xffffffff); + } return 0; } -- 2.18.1
2019 Feb 09
0
[PATCH AUTOSEL 4.20 37/42] drm/nouveau/falcon: avoid touching registers if engine is off
...+#include <subdev/mc.h> #include <subdev/timer.h> #include <engine/fifo.h> @@ -107,8 +108,10 @@ nvkm_falcon_fini(struct nvkm_engine *engine, bool suspend) } } - nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); - nvkm_wr32(device, base + 0x014, 0xffffffff); + if (nvkm_mc_enabled(device, engine->subdev.index)) { + nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); + nvkm_wr32(device, base + 0x014, 0xffffffff); + } return 0; } -- 2.19.1
2019 Feb 09
0
[PATCH AUTOSEL 4.19 26/28] drm/nouveau/falcon: avoid touching registers if engine is off
...+#include <subdev/mc.h> #include <subdev/timer.h> #include <engine/fifo.h> @@ -107,8 +108,10 @@ nvkm_falcon_fini(struct nvkm_engine *engine, bool suspend) } } - nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); - nvkm_wr32(device, base + 0x014, 0xffffffff); + if (nvkm_mc_enabled(device, engine->subdev.index)) { + nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); + nvkm_wr32(device, base + 0x014, 0xffffffff); + } return 0; } -- 2.19.1
2019 Feb 09
0
[PATCH AUTOSEL 4.14 15/16] drm/nouveau/falcon: avoid touching registers if engine is off
...+#include <subdev/mc.h> #include <subdev/timer.h> #include <engine/fifo.h> @@ -107,8 +108,10 @@ nvkm_falcon_fini(struct nvkm_engine *engine, bool suspend) } } - nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); - nvkm_wr32(device, base + 0x014, 0xffffffff); + if (nvkm_mc_enabled(device, engine->subdev.index)) { + nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000); + nvkm_wr32(device, base + 0x014, 0xffffffff); + } return 0; } -- 2.19.1
2016 Dec 13
15
[PATCH v2 0/15] Falcon library
...d IMEM to 0x40 words otherwise some FW will not work properly * make IMEM/DMEM writing functions more robust * move falcons instances into their owning subdev * rework gk20a's PMU implementation and add dummy gm20b PMU driver Alexandre Courbot (15): core: constify nv*_printk macros mc: add nvkm_mc_enabled() function core: add falcon library functions pmu: instanciate the falcon in PMU device pmu: add nvkm_pmu_ctor() function pmu/gk20a: use nvkm_pmu_ctor() pmu/gk20a: simplify code a bit pmu/gk20a: use falcon library functions gm20b: add dummy PMU device secboot: fix functions definiti...
2016 Dec 06
0
[PATCH 3/8] core: add falcon library functions
...nable(falcon); + if (ret) { + nvkm_mc_disable(device, falcon->devidx); + return ret; + } + + return 0; +} + +void +nvkm_falcon_disable(struct nvkm_falcon *falcon) +{ + struct nvkm_device *device = falcon->subdev->device; + + /* already disabled, return or wait_idle will timeout */ + if (!nvkm_mc_enabled(device, falcon->devidx)) + return; + + falcon->func->disable(falcon); + + nvkm_mc_disable(device, falcon->devidx); +} + +int +nvkm_falcon_reset(struct nvkm_falcon *falcon) +{ + nvkm_falcon_disable(falcon); + return nvkm_falcon_enable(falcon); +} + +int +nvkm_falcon_wait_for_halt(struct...
2019 Sep 23
8
[PATCH 0/8] Add workaround for fixing runpm
Changes since last sent: * add a patch to set the device into DRM_SWITCH_POWER_CHANGING state (can be dropped actually, I thought I was needing it, came up with a different approach and forgot to delete it, doesn't hurt though) * expose information about runtime suspending to nvkm so that we can run the pcie workaround only on runtime suspend Karol Herbst (8): pci: disable ASPM