Skip to contentSkip to conversation

nouveau reclocking on nv40 not working since 77145f1cbdf8d28b46ff8070ca749bad821e0774

PATCH In review Pali Rohár 3 participants 10 messages Aug 13, 2013 – Sep 9, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nouveau reclocking on nv40 not working since 77145f1cbdf8d28b46ff8070ca749bad821e0774

Hello,

in commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that on my Nvidia 6600GT card reclocking not working anymore. There is missing assigment of return value from pll_calc to ret.

After this patch reclocking on my card working fine again. Above broken commit was introduced in kernel 3.7, so consider backporting this patch to older kernels too.

drivers/gpu/drm/nouveau/nv40_pm.c +1 -1
index 3af5bcd..625f80d 100644
@@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev, u32 reg, struct nvbios_pll *pll,
 	if (clk < pll->vco1.max_freq)
 		pll->vco2.max_freq = 0;
 
-	pclk->pll_calc(pclk, pll, clk, &coef);
+	ret = pclk->pll_calc(pclk, pll, clk, &coef);
 	if (ret == 0)
 		return -ERANGE;
 
Signature · 2 lines
Pali Rohár
[email protected]
#1 lore raw
Quoted 19 lines · On Tuesday 13 August 2013 11:28:01 Pali Rohár wrote:

Hello,

in commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that on my Nvidia 6600GT card reclocking not working anymore. There is missing assigment of return value from pll_calc to ret.

After this patch reclocking on my card working fine again. Above broken commit was introduced in kernel 3.7, so consider backporting this patch to older kernels too.

(quoted diff) +0 -0

b/drivers/gpu/drm/nouveau/nv40_pm.c index 3af5bcd..625f80d 100644

drivers/gpu/drm/nouveau/nv40_pm.c nv40_calc_pll(struct drm_device *dev, u32 · line 136

Quoted 7 lines
drivers/gpu/drm/nouveau/nv40_pm.c +1 -1
@@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev, u32
 reg, struct nvbios_pll *pll, if (clk < pll->vco1.max_freq)
 		pll->vco2.max_freq = 0;
 
-	pclk->pll_calc(pclk, pll, clk, &coef);
+	ret = pclk->pll_calc(pclk, pll, clk, &coef);
 	if (ret == 0)
 		return -ERANGE;

Martin, can you look at another problem with my graphics card?

Signature · 2 lines
Pali Rohár
[email protected]
#2 lore raw
Quoted 23 lines · Pali Rohár
Quoted 22 lines · On Tuesday 13 August 2013 11:28:01 Pali Rohár wrote:

Hello,

in commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that on my Nvidia 6600GT card reclocking not working anymore. There is missing assigment of return value from pll_calc to ret.

After this patch reclocking on my card working fine again. Above broken commit was introduced in kernel 3.7, so consider backporting this patch to older kernels too.

(quoted diff) +0 -0

b/drivers/gpu/drm/nouveau/nv40_pm.c index 3af5bcd..625f80d 100644

drivers/gpu/drm/nouveau/nv40_pm.c +0 -0
@@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev, u32
 reg, struct nvbios_pll *pll, if (clk < pll->vco1.max_freq)
  		pll->vco2.max_freq = 0;
 
Quoted 5 lines

drivers/gpu/drm/nouveau/nv40_pm.c nv40_calc_pll(struct drm_device *dev, u32 reg, struct nvbios_pll *pll, · line 136

Quoted 4 lines
drivers/gpu/drm/nouveau/nv40_pm.c +1 -1
-	pclk->pll_calc(pclk, pll, clk, &coef);
+	ret = pclk->pll_calc(pclk, pll, clk, &coef);
  	if (ret == 0)
  		return -ERANGE;

Martin, can you look at another problem with my graphics card?

As I told you before, I'm away from my computers, so I cannot test the patch. However, this one seems quite obvious and should be pushed. Thanks.

#3 lore raw
Quoted 30 lines · On Thursday 15 August 2013 18:23:06 Martin Peres wrote:
Quoted 29 lines · Pali Rohár
Quoted 28 lines · On Tuesday 13 August 2013 11:28:01 Pali Rohár wrote:

Hello,

in commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that on my Nvidia 6600GT card reclocking not working anymore. There is missing assigment of return value from pll_calc to ret.

After this patch reclocking on my card working fine again. Above broken commit was introduced in kernel 3.7, so consider backporting this patch to older kernels too.

(quoted diff) +0 -0

b/drivers/gpu/drm/nouveau/nv40_pm.c index 3af5bcd..625f80d 100644

drivers/gpu/drm/nouveau/nv40_pm.c +1 -1
@@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev, u32
 reg, struct nvbios_pll *pll, if (clk < pll->vco1.max_freq)
 
  		pll->vco2.max_freq = 0;
 
-	pclk->pll_calc(pclk, pll, clk, &coef);
+	ret = pclk->pll_calc(pclk, pll, clk, &coef);
 
  	if (ret == 0)
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

return -ERANGE;

Martin, can you look at another problem with my graphics card?

As I told you before, I'm away from my computers, so I cannot test the patch. However,
this one seems quite obvious and should be pushed. Thanks.

Yes, look at that diff of that problematic commit and you will see that ret here is missing. It is possible to push this patch to 3.11?

Signature · 2 lines
Pali Rohár
[email protected]
#4 lore raw
Quoted 31 lines · Pali Rohár
Quoted 30 lines · On Thursday 15 August 2013 18:23:06 Martin Peres wrote:
Quoted 29 lines · Pali Rohár
Quoted 28 lines · On Tuesday 13 August 2013 11:28:01 Pali Rohár wrote:

Hello,

in commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that on my Nvidia 6600GT card reclocking not working anymore. There is missing assigment of return value from pll_calc to ret.

After this patch reclocking on my card working fine again. Above broken commit was introduced in kernel 3.7, so consider backporting this patch to older kernels too.

(quoted diff) +0 -0

b/drivers/gpu/drm/nouveau/nv40_pm.c index 3af5bcd..625f80d 100644

drivers/gpu/drm/nouveau/nv40_pm.c +1 -1
@@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev, u32
 reg, struct nvbios_pll *pll, if (clk < pll->vco1.max_freq)
 
   		pll->vco2.max_freq = 0;
 
-	pclk->pll_calc(pclk, pll, clk, &coef);
+	ret = pclk->pll_calc(pclk, pll, clk, &coef);
 
   	if (ret == 0)
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
   		return -ERANGE;

Martin, can you look at another problem with my graphics card?

As I told you before, I'm away from my computers, so I cannot test the patch. However,
this one seems quite obvious and should be pushed. Thanks.

Yes, look at that diff of that problematic commit and you will see that ret here is missing. It is possible to push this patch to 3.11?

Please make a proper patch (generated by git format-patch or git send-email) and Ben will push it.

You add my Signed-off-by: Martin Peres <[email protected]>

Cheers

#5 lore raw

PATCH 1/1 nouveau: fix reclocking on nv40

In commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that reclocking on nv40 not working anymore. There is missing assigment of return value from pll_calc to ret.

---
 drivers/gpu/drm/nouveau/nv40_pm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nv40_pm.c +1 -1
index 3af5bcd..625f80d 100644
@@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev, u32 reg, struct nvbios_pll *pll,
 	if (clk < pll->vco1.max_freq)
 		pll->vco2.max_freq = 0;
 
-	pclk->pll_calc(pclk, pll, clk, &coef);
+	ret = pclk->pll_calc(pclk, pll, clk, &coef);
 	if (ret == 0)
 		return -ERANGE;
 
Signature · 1 line
1.7.10.4
#6 lore raw

Re: [PATCH] nouveau: fix reclocking on nv40

Quoted 17 lines · On Friday 16 August 2013 14:57:07 Pali Rohár wrote:

In commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that reclocking on nv40 not working anymore. There is missing assigment of return value from pll_calc to ret.

---
 drivers/gpu/drm/nouveau/nv40_pm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/nouveau/nv40_pm.c index 3af5bcd..625f80d 100644

drivers/gpu/drm/nouveau/nv40_pm.c nv40_calc_pll(struct drm_device *dev, u32 · line 136

Quoted 7 lines
drivers/gpu/drm/nouveau/nv40_pm.c +1 -1
@@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev, u32
 reg, struct nvbios_pll *pll, if (clk < pll->vco1.max_freq)
 		pll->vco2.max_freq = 0;
 
-	pclk->pll_calc(pclk, pll, clk, &coef);
+	ret = pclk->pll_calc(pclk, pll, clk, &coef);
 	if (ret == 0)
 		return -ERANGE;

Hello, it is possible to include this patch in 3.11? Or it is too late now and need to wait for 3.12?

Signature · 2 lines
Pali Rohár
[email protected]
#7 lore raw

Re: [PATCH] nouveau: fix reclocking on nv40

Quoted 21 lines · Pali Rohár
Quoted 20 lines · On Friday 16 August 2013 14:57:07 Pali Rohár wrote:

In commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that reclocking on nv40 not working anymore. There is missing assigment of return value from pll_calc to ret.

---
 drivers/gpu/drm/nouveau/nv40_pm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/nouveau/nv40_pm.c index 3af5bcd..625f80d 100644

drivers/gpu/drm/nouveau/nv40_pm.c +0 -0
@@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev, u32
 reg, struct nvbios_pll *pll, if (clk < pll->vco1.max_freq)
              pll->vco2.max_freq = 0;
 
Quoted 7 lines

drivers/gpu/drm/nouveau/nv40_pm.c nv40_calc_pll(struct drm_device *dev, u32 reg, struct nvbios_pll *pll, · line 136

Quoted 4 lines
drivers/gpu/drm/nouveau/nv40_pm.c +1 -1
-     pclk->pll_calc(pclk, pll, clk, &coef);
+     ret = pclk->pll_calc(pclk, pll, clk, &coef);
      if (ret == 0)
              return -ERANGE;

Hello, it is possible to include this patch in 3.11? Or it is too late now and need to wait for 3.12?

I've picked up the patch and will submit it in my next 3.11-fixes pull request.

Thanks,
Ben.

Quoted 10 lines

--
Pali Rohár
[email protected]

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

Re: [PATCH] nouveau: fix reclocking on nv40

Quoted 1 line · On Wednesday 21 August 2013 02:24:01 Ben Skeggs wrote:

On Mon, Aug 19, 2013 at 4:59 PM, Pali Rohár

Quoted 34 lines · <[email protected]> wrote:
Quoted 27 lines · On Friday 16 August 2013 14:57:07 Pali Rohár wrote:
Quoted 26 lines

In commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that reclocking on nv40 not working anymore. There is missing assigment of return value from pll_calc to ret.

---

 drivers/gpu/drm/nouveau/nv40_pm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/nouveau/nv40_pm.c index 3af5bcd..625f80d 100644

drivers/gpu/drm/nouveau/nv40_pm.c +0 -0
@@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev,

u32 reg, struct nvbios_pll *pll, if (clk <
pll->vco1.max_freq)

              pll->vco2.max_freq = 0;
drivers/gpu/drm/nouveau/nv40_pm.c +1 -1
-     pclk->pll_calc(pclk, pll, clk, &coef);
+     ret = pclk->pll_calc(pclk, pll, clk, &coef);
Quoted 6 lines
Quoted 3 lines
      if (ret == 0)
      
              return -ERANGE;

Hello, it is possible to include this patch in 3.11? Or it is too late now and need to wait for 3.12?

Quoted 6 lines

I've picked up the patch and will submit it in my next 3.11-fixes pull request.

Thanks,
Ben.

Hello, now I see that patch is in 3.11, thanks! Ben, what do you think, can be this patch backported to older kernels?

Signature · 2 lines
Pali Rohár
[email protected]
#9 lore raw

Re: [PATCH] nouveau: fix reclocking on nv40

Quoted 40 lines · Pali Rohár
Quoted 1 line · On Wednesday 21 August 2013 02:24:01 Ben Skeggs wrote:

On Mon, Aug 19, 2013 at 4:59 PM, Pali Rohár

Quoted 37 lines · <[email protected]> wrote:
Quoted 27 lines · On Friday 16 August 2013 14:57:07 Pali Rohár wrote:
Quoted 26 lines

In commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that reclocking on nv40 not working anymore. There is missing assigment of return value from pll_calc to ret.

---

 drivers/gpu/drm/nouveau/nv40_pm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/nouveau/nv40_pm.c index 3af5bcd..625f80d 100644

drivers/gpu/drm/nouveau/nv40_pm.c +0 -0
@@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev,

u32 reg, struct nvbios_pll *pll, if (clk <
pll->vco1.max_freq)

              pll->vco2.max_freq = 0;
drivers/gpu/drm/nouveau/nv40_pm.c +1 -1
-     pclk->pll_calc(pclk, pll, clk, &coef);
+     ret = pclk->pll_calc(pclk, pll, clk, &coef);
Quoted 6 lines
Quoted 3 lines
      if (ret == 0)

              return -ERANGE;

Hello, it is possible to include this patch in 3.11? Or it is too late now and need to wait for 3.12?

I've picked up the patch and will submit it in my next 3.11-fixes pull request.

Quoted 6 lines
Quoted 3 lines

Thanks,
Ben.

Hello, now I see that patch is in 3.11, thanks! Ben, what do you think, can be this patch backported to older kernels?

Personally, I don't care at all. The current PM code is a dead end, and completely not "supported" (hence why it's hidden behind a magic parameter). If I had my way it'd have been completely ripped out already.

If someone wants to backport and test it on earlier kernels though, by all means, go ahead :)

Thanks,
Ben.

Quoted 4 lines

--
Pali Rohár
[email protected]