Skip to contentSkip to conversation

pm/gk104: re-use gf100_pm_ctor()

PATCH New Samuel Pitoiset 1 participant 2 messages Jun 19, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pm/gk104: re-use gf100_pm_ctor()

gk104_pm_ctor() is equal to gf100_pm_ctor().

---
 drm/nouveau/include/nvkm/engine/pm.h   |  2 +-
 drm/nouveau/nvkm/engine/device/gk104.c |  8 ++---
 drm/nouveau/nvkm/engine/pm/gk104.c     | 60 +++++-----------------------------
 3 files changed, 14 insertions(+), 56 deletions(-)
drm/nouveau/include/nvkm/engine/pm.h +1 -1
index ed36daf..c4c704b 100644
@@ -29,6 +29,6 @@ extern struct nvkm_oclass *gt215_pm_oclass;
 extern struct nvkm_oclass *gf100_pm_oclass;
 extern struct nvkm_oclass *gf108_pm_oclass;
 extern struct nvkm_oclass *gf117_pm_oclass;
-extern struct nvkm_oclass gk104_pm_oclass;
+extern struct nvkm_oclass *gk104_pm_oclass;
 extern struct nvkm_oclass gk110_pm_oclass;
 #endif
drm/nouveau/nvkm/engine/device/gk104.c +4 -4
index 6a9483f..2b1fce2 100644
@@ -91,7 +91,7 @@ gk104_identify(struct nvkm_device *device)
 		device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
 		device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
 		device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-		device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
+		device->oclass[NVDEV_ENGINE_PM     ] = gk104_pm_oclass;
 		break;
 	case 0xe7:
 		device->cname = "GK107";
@@ -125,7 +125,7 @@ gk104_identify(struct nvkm_device *device)
 		device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
 		device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
 		device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-		device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
+		device->oclass[NVDEV_ENGINE_PM     ] = gk104_pm_oclass;
 		break;
 	case 0xe6:
 		device->cname = "GK106";
@@ -159,7 +159,7 @@ gk104_identify(struct nvkm_device *device)
 		device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
 		device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
 		device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-		device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
+		device->oclass[NVDEV_ENGINE_PM     ] = gk104_pm_oclass;
 		break;
 	case 0xea:
 		device->cname = "GK20A";
@@ -179,7 +179,7 @@ gk104_identify(struct nvkm_device *device)
 		device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
 		device->oclass[NVDEV_ENGINE_GR     ] =  gk20a_gr_oclass;
 		device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
-		device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
+		device->oclass[NVDEV_ENGINE_PM     ] = gk104_pm_oclass;
 		device->oclass[NVDEV_SUBDEV_VOLT   ] = &gk20a_volt_oclass;
 		device->oclass[NVDEV_SUBDEV_PMU    ] =  gk20a_pmu_oclass;
 		break;
drm/nouveau/nvkm/engine/pm/gk104.c +9 -51

67 lines not on this page · raw message

Signature · 6 lines
2.4.3

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 1434728238-925-1-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH 2/2 pm/gk104: add compute signals/sources

These signals and sources have been reverse engineered from CUPTI (Linux). Graphics signals exposed by PerfKit (Windows only) will be added later. I need to reverse engineer them and it's a bit painful.

---
 drm/nouveau/nvkm/engine/pm/gf100.h |  1 +
 drm/nouveau/nvkm/engine/pm/gf117.c |  8 +++-
 drm/nouveau/nvkm/engine/pm/gk104.c | 85 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+), 1 deletion(-)
drm/nouveau/nvkm/engine/pm/gf100.h +1 -0
index 40ced89..d73f0ca 100644
@@ -27,5 +27,6 @@ int gf100_pm_fini(struct nvkm_object *, bool);
 extern const struct nvkm_specdom gf100_pm_gpc[];
 
 extern const struct nvkm_specsrc gf100_pmfb_sources[];
+extern const struct nvkm_specsrc gf117_pbfb_sources[];
 
 #endif
drm/nouveau/nvkm/engine/pm/gf117.c +7 -1
index 911ff3f..01d3a48 100644
@@ -39,7 +39,7 @@ gf117_pmfb_sources[] = {
 	{}
 };
 
-static const struct nvkm_specsrc
+const struct nvkm_specsrc
 gf117_pbfb_sources[] = {
 	{ 0x110100, (const struct nvkm_specmux[]) {
 			{ 0x1, 0, "unk0" },
@@ -47,6 +47,12 @@ gf117_pbfb_sources[] = {
 			{ 0x3, 8, "unk8" },
 			{}
 		}, "pbfb0_pm_unk100" },
+        { 0x10f100, (const struct nvkm_specmux[]) {
+			{ 0x1, 0, "unk0" },
+			{ 0xf, 4, "unk4" },
+			{ 0x3, 8, "unk8" },
+			{}
+		}, "pbfb_broadcast_pm_unk100" },
 	{}
 };
 
drm/nouveau/nvkm/engine/pm/gk104.c +85 -0

103 lines not on this page · raw message

Signature · 6 lines
2.4.3

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau