Skip to contentSkip to conversation

pm: allow zeroed signals to enable sources

PATCH New Samuel Pitoiset 1 participant 4 messages Aug 4, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 pm: allow zeroed signals to enable sources

Hardware signals index 0x00 are defined for some domains and they have to be allowed to enable sources like the others.

---
 drm/nouveau/nvkm/engine/pm/base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drm/nouveau/nvkm/engine/pm/base.c +2 -2
index 94991d6..48c1ce6 100644
@@ -134,7 +134,7 @@ nvkm_perfsrc_enable(struct nvkm_pm *ppm, struct nvkm_perfctr *ctr)
 	u32 mask, value;
 	int i, j;
 
-	for (i = 0; i < 4 && ctr->signal[i]; i++) {
+	for (i = 0; i < 4; i++) {
 		for (j = 0; j < 8 && ctr->source[i][j]; j++) {
 			sig = nvkm_perfsig_find(ppm, ctr->domain,
 						ctr->signal[i], &dom);
@@ -170,7 +170,7 @@ nvkm_perfsrc_disable(struct nvkm_pm *ppm, struct nvkm_perfctr *ctr)
 	u32 mask;
 	int i, j;
 
-	for (i = 0; i < 4 && ctr->signal[i]; i++) {
+	for (i = 0; i < 4; i++) {
 		for (j = 0; j < 8 && ctr->source[i][j]; j++) {
 			sig = nvkm_perfsig_find(ppm, ctr->domain,
 						ctr->signal[i], &dom);
Signature · 6 lines
2.4.6

_______________________________________________
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): 1438725495-12790-1-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH 2/4 pm/gf100: remove undefined TEX.PM_UNKC8 mux

This mux only exists on GF108+ (except for GF110 one), but since it is not used by the userspace we can drop it for now.

---
 drm/nouveau/nvkm/engine/pm/gf100.c | 4 ----
 1 file changed, 4 deletions(-)
drm/nouveau/nvkm/engine/pm/gf100.c +0 -4
index b40c218..37b1636 100644
@@ -62,10 +62,6 @@ gf100_tex_sources[] = {
 			{ 0x7, 8, "sel1", true },
 			{}
 		}, "pgraph_gpc0_tpc0_tex_pm_mux_c_d" },
-	{ 0x5042c8, (const struct nvkm_specmux[]) {
-			{ 0x1f, 0, "sel", true },
-			{}
-		}, "pgraph_gpc0_tpc0_tex_pm_unkc8" },
 	{}
 };
 
Signature · 6 lines
2.4.6

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

PATCH 3/4 pm/gf100: remove multiple definitions of GPC_DOM signal 0x0e

In reply to a message not in the archive
---
 drm/nouveau/nvkm/engine/pm/gf100.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drm/nouveau/nvkm/engine/pm/gf100.c +4 -5
index 37b1636..ab46389 100644
@@ -93,11 +93,10 @@ gf100_pm_gpc[] = {
 			{ 0x0c, "gpc00_tex_02", gf100_tex_sources },
 			{ 0x0d, "gpc00_tex_03", gf100_tex_sources },
 			{ 0x0e, "gpc00_tex_04", gf100_tex_sources },
-			{ 0x0e, "gpc00_tex_05", gf100_tex_sources },
-			{ 0x0f, "gpc00_tex_06", gf100_tex_sources },
-			{ 0x10, "gpc00_tex_07", gf100_tex_sources },
-			{ 0x11, "gpc00_tex_08", gf100_tex_sources },
-			{ 0x12, "gpc00_tex_09", gf100_tex_sources },
+			{ 0x0f, "gpc00_tex_05", gf100_tex_sources },
+			{ 0x10, "gpc00_tex_06", gf100_tex_sources },
+			{ 0x11, "gpc00_tex_07", gf100_tex_sources },
+			{ 0x12, "gpc00_tex_08", gf100_tex_sources },
 			{ 0x26, "gpc00_unk400_00", gf100_unk400_sources },
 			{}
 		}, &gf100_perfctr_func },
Signature · 6 lines
2.4.6

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

PATCH 4/4 pm/gf100: only use PBFB_BROADCAST.PM_UNK100 for PBFB signals

In reply to a message not in the archive

High level hardware events related to PBFB will monitor all partitions. While we are at it, fix bitfield for this mux.

---
 drm/nouveau/nvkm/engine/pm/gf100.c | 21 ++++++++++-----------
 drm/nouveau/nvkm/engine/pm/gf100.h |  2 +-
 drm/nouveau/nvkm/engine/pm/gf108.c | 25 ++++---------------------
 drm/nouveau/nvkm/engine/pm/gf117.c | 21 ++-------------------
 drm/nouveau/nvkm/engine/pm/gk104.c |  4 ++--
 5 files changed, 19 insertions(+), 54 deletions(-)
drm/nouveau/nvkm/engine/pm/gf100.c +10 -11
index ab46389..887d2df 100644
@@ -24,6 +24,16 @@
 #include "gf100.h"
 
 const struct nvkm_specsrc
+gf100_pbfb_sources[] = {
+	{ 0x10f100, (const struct nvkm_specmux[]) {
+			{ 0x1, 0, "unk0" },
+			{ 0x3f, 4, "unk4" },
+			{}
+		}, "pbfb_broadcast_pm_unk100" },
+	{}
+};
+
+const struct nvkm_specsrc
 gf100_pmfb_sources[] = {
 	{ 0x140028, (const struct nvkm_specmux[]) {
 			{ 0x3fff, 0, "unk0" },
@@ -45,17 +55,6 @@ gf100_l1_sources[] = {
 };
 
 static const struct nvkm_specsrc
-gf100_pbfb_sources[] = {
-	{ 0x10f100, (const struct nvkm_specmux[]) {
-			{ 0x1, 0, "unk0" },
-			{ 0xf, 4, "unk4" },
-			{ 0x3, 8, "unk8" },
-			{}
-		}, "pbfb_broadcast_pm_unk100" },
-	{}
-};
-
-static const struct nvkm_specsrc
 gf100_tex_sources[] = {
 	{ 0x5042c0, (const struct nvkm_specmux[]) {
 			{ 0xf, 0, "sel0", true },
drm/nouveau/nvkm/engine/pm/gf100.h +1 -1
index d73f0ca..3a3a901 100644
@@ -26,7 +26,7 @@ int gf100_pm_fini(struct nvkm_object *, bool);
 
 extern const struct nvkm_specdom gf100_pm_gpc[];
 
+extern const struct nvkm_specsrc gf100_pbfb_sources[];
 extern const struct nvkm_specsrc gf100_pmfb_sources[];
-extern const struct nvkm_specsrc gf117_pbfb_sources[];
 
 #endif
drm/nouveau/nvkm/engine/pm/gf108.c +4 -21
index a74c685..a4d86d1 100644
@@ -23,23 +23,6 @@
  */
 #include "gf100.h"
 
-static const struct nvkm_specsrc
-gf108_pbfb_sources[] = {
-	{ 0x110100, (const struct nvkm_specmux[]) {
-			{ 0x1, 0, "unk0" },
-			{ 0xf, 4, "unk4" },
-			{ 0x3, 8, "unk8" },
-			{}
-		}, "pbfb0_pm_unk100" },
-	{ 0x111100, (const struct nvkm_specmux[]) {
-			{ 0x1, 0, "unk0" },
-			{ 0xf, 4, "unk4" },
-			{ 0x3, 8, "unk8" },
-			{}
-		}, "pbfb1_pm_unk100" },
-	{}
-};
-
 static const struct nvkm_specdom
 gf108_pm_hub[] = {
 	{}
@@ -48,10 +31,10 @@ gf108_pm_hub[] = {
 static const struct nvkm_specdom
 gf108_pm_part[] = {
 	{ 0xe0, (const struct nvkm_specsig[]) {
-			{ 0x14, "part00_pbfb_00", gf108_pbfb_sources },
-			{ 0x15, "part00_pbfb_01", gf108_pbfb_sources },
-			{ 0x20, "part00_pbfb_02", gf108_pbfb_sources },
-			{ 0x21, "part00_pbfb_03", gf108_pbfb_sources },
+			{ 0x14, "part00_pbfb_00", gf100_pbfb_sources },
+			{ 0x15, "part00_pbfb_01", gf100_pbfb_sources },
+			{ 0x20, "part00_pbfb_02", gf100_pbfb_sources },
+			{ 0x21, "part00_pbfb_03", gf100_pbfb_sources },
 			{ 0x01, "part00_pmfb_00", gf100_pmfb_sources },
 			{ 0x04, "part00_pmfb_01", gf100_pmfb_sources },
 			{ 0x05, "part00_pmfb_02", gf100_pmfb_sources},
drm/nouveau/nvkm/engine/pm/gf117.c +2 -19
index 01d3a48..a76c928 100644
@@ -39,23 +39,6 @@ gf117_pmfb_sources[] = {
 	{}
 };
 
-const struct nvkm_specsrc
-gf117_pbfb_sources[] = {
-	{ 0x110100, (const struct nvkm_specmux[]) {
-			{ 0x1, 0, "unk0" },
-			{ 0xf, 4, "unk4" },
-			{ 0x3, 8, "unk8" },
-			{}
-		}, "pbfb0_pm_unk100" },
-        { 0x10f100, (const struct nvkm_specmux[]) {
-			{ 0x1, 0, "unk0" },
-			{ 0xf, 4, "unk4" },
-			{ 0x3, 8, "unk8" },
-			{}
-		}, "pbfb_broadcast_pm_unk100" },
-	{}
-};
-
 static const struct nvkm_specdom
 gf117_pm_hub[] = {
 	{}
@@ -64,8 +47,8 @@ gf117_pm_hub[] = {
 static const struct nvkm_specdom
 gf117_pm_part[] = {
 	{ 0xe0, (const struct nvkm_specsig[]) {
-			{ 0x00, "part00_pbfb_00", gf117_pbfb_sources },
-			{ 0x01, "part00_pbfb_01", gf117_pbfb_sources },
+			{ 0x00, "part00_pbfb_00", gf100_pbfb_sources },
+			{ 0x01, "part00_pbfb_01", gf100_pbfb_sources },
 			{ 0x12, "part00_pmfb_00", gf117_pmfb_sources },
 			{ 0x15, "part00_pmfb_01", gf117_pmfb_sources },
 			{ 0x16, "part00_pmfb_02", gf117_pmfb_sources },
drm/nouveau/nvkm/engine/pm/gk104.c +2 -2
index 5067f72..a236db9 100644
@@ -145,8 +145,8 @@ gk104_pm_gpc[] = {
 static const struct nvkm_specdom
 gk104_pm_part[] = {
 	{ 0x60, (const struct nvkm_specsig[]) {
-			{ 0x00, "part00_pbfb_00", gf117_pbfb_sources },
-			{ 0x01, "part00_pbfb_01", gf117_pbfb_sources },
+			{ 0x00, "part00_pbfb_00", gf100_pbfb_sources },
+			{ 0x01, "part00_pbfb_01", gf100_pbfb_sources },
 			{ 0x0c, "part00_pmfb_00", gk104_pmfb_sources },
 			{ 0x0d, "part00_pmfb_01", gk104_pmfb_sources },
 			{ 0x0e, "part00_pmfb_02", gk104_pmfb_sources },
Signature · 6 lines
2.4.6

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