clk: Remove BYPASS_PLL_CHECK from PLLs
RFC PATCH v2 1/1 clk: Remove BYPASS_PLL_CHECK from PLLs
I have looked at problem with Fermi GPUs where changing to higher clock
led to really bad perfomance (with GpuTest 20x worse perfomance) and later also crashes of the nouveau. It seemed to be affected by Shader Clock in Voltage Entries in the video BIOS. DisablingBYPASS_PLL_CHECK in CLK0_CTRL seems to completely fix the issue. I have
tried to search this BYPASS_PLL_CHECK in Nvidia traces but seemed it
wasn't used nowhere for CLK settings.
Removing this works fine, but I don't know what it's really for. Actual bit setting this BYPASS_PLL_CHECK is on 0x10:
lookup -ac0 0x137000 0x10
PCLOCK.CLK0_CTRL => { BYPASS_PLL_CHECK | UNK12 = 0 }Also, disabling this bit on other CLKs doesn't seem to break anything.
v2: Add back PLL lock test
--- drm/nouveau/nvkm/subdev/clk/gf100.c | 1 - drm/nouveau/nvkm/subdev/clk/gk104.c | 1 - 2 files changed, 2 deletions(-)
drm/nouveau/nvkm/subdev/clk/gf100.c +0 -1
@@ -381,7 +381,6 @@ gf100_clk_prog_2(struct gf100_clk *clk, int idx)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 );
drm/nouveau/nvkm/subdev/clk/gk104.c +0 -1
@@ -400,7 +400,6 @@ gk104_clk_prog_2(struct gk104_clk *clk, int idx)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 );
Signature · 6 lines
2.21.0 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): 20190904142837.8768-1-mmenzyns-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Can you check to see if that bit was set prior to entering the code? I wonder if you can just restore it if it was there, and leave it if it's not?
Quoted 49 lines · Mark Menzynski
I have looked at problem with Fermi GPUs where changing to higher clock
led to really bad perfomance (with GpuTest 20x worse perfomance) and later also crashes of the nouveau. It seemed to be affected by Shader Clock in Voltage Entries in the video BIOS. DisablingBYPASS_PLL_CHECKinCLK0_CTRLseems to completely fix the issue. I have
tried to search thisBYPASS_PLL_CHECKin Nvidia traces but seemed it
wasn't used nowhere for CLK settings.Removing this works fine, but I don't know what it's really for. Actual bit setting this
BYPASS_PLL_CHECKis on0x10:lookup -ac0 0x137000 0x10 PCLOCK.CLK0_CTRL => { BYPASS_PLL_CHECK | UNK12 = 0 }Also, disabling this bit on other CLKs doesn't seem to break anything.
v2: Add back PLL lock test
Signed-off-by Mark Menzynski <[email protected]>--- drm/nouveau/nvkm/subdev/clk/gf100.c | 1 - drm/nouveau/nvkm/subdev/clk/gk104.c | 1 - 2 files changed, 2 deletions(-)drm/nouveau/nvkm/subdev/clk/gf100.c +0
-1@@ -381,7 +381,6 @@ gf100_clk_prog_2(struct gf100_clk *clk, int idx)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 );drm/nouveau/nvkm/subdev/clk/gk104.c +0
-2@@ -400,7 +400,6 @@ gk104_clk_prog_2(struct gk104_clk *clk, int idx)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 ); --2.21.0
Quoted 4 lines
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau