From: Jonathan Fouquart <[email protected]> Call nvkm_sddr2_calc when calculating the DDR2 memory clock frequency on NV50 architectures. With this change, there are no more errors when reclocking, the DDR2 memory frequency is correctly calculated, and there are a performance gain of around 30% on glxgears.
Signed-off-by: Jonathan Fouquart <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Link: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests/23 Tested-by: Mahdi Salimi <[email protected]> Signed-off-by: Mahdi Salimi <[email protected]> --- Forwarding Jonathan's reviewed patch from GitLab MR !23 as Lyude requested. Tested on an NVIDIA G96 with DDR2 memory (reclocking works without errors). --- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c index be15519d0..d013a2fd2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c @@ -288,6 +288,9 @@ nv50_ram_calc(struct nvkm_ram *base, u32 freq) ram->base.mr[2] = ram_rd32(hwsq, mr[2]); switch (ram->base.type) { + case NVKM_RAM_TYPE_DDR2: + ret = nvkm_sddr2_calc(&ram->base); + break; case NVKM_RAM_TYPE_GDDR3: ret = nvkm_gddr3_calc(&ram->base); break; --- base-commit: 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc change-id: 20261125-ramnv50-ddr2-reclock-b30ca9d5eded Best regards, -- Mahdi Salimi <[email protected]>
