drm/nouveau/fb: restore init() for ramgp102
Subsystems (4)
PATCH v2 1/1 drm/nouveau/fb: restore init() for ramgp102
init() was removed from ramgp102 when reworking the memory detection, as it was thought that the code was only necessary when the driver performs mclk changes, which nouveau doesn't support on pascal.
However, it turns out that we still need to execute this on some GPUs to restore settings after DEVINIT, so revert to the original behaviour.
v2: fix tags in commit message, cc stable
--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp102.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h +2 -0
@@ -46,6 +46,8 @@ u32 gm107_ram_probe_fbp(const struct nvkm_ram_func *,u32 gm200_ram_probe_fbp_amount (const struct nvkm_ram_func *,u32 ,struct nvkm_device *,int ,int *); +int gp100_ram_init (struct nvkm_ram *); +/* RAM type-specific MR calculation routines */ int nvkm_sddr2_calc (struct nvkm_ram *);int nvkm_sddr3_calc (struct nvkm_ram *);
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c +1 -1
@@ -27,7 +27,7 @@#include <subdev/bios/init.h> #include <subdev/bios/rammap.h> -static int +int gp100_ram_init (struct nvkm_ram *ram) {struct nvkm_subdev *subdev = &ram->fb->subdev;
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp102.c +1 -0
@@ -5,6 +5,7 @@static const struct nvkm_ram_func gp102_ram = { + .init = gp100_ram_init, };int
Signature · 1 line
2.45.1
Quoted 7 lines · Ben Skeggs
init()was removed from ramgp102 when reworking the memory detection, as it was thought that the code was only necessary when the driver performs mclk changes, which nouveau doesn't support on pascal.However, it turns out that we still need to execute this on some GPUs to restore settings after DEVINIT, so revert to the original behaviour.
Quoted 6 lines
v2: fix tags in commit message, cc stable
Fixes 2c0c15a22fa0 ("drm/nouveau/fb/gp102-ga100: switch to simpler vram size detection method")Cc <[email protected]> # 6.6+Signed-off-by Ben Skeggs <[email protected]>
Applied to drm-misc-fixes, thanks!
Quoted 44 lines
--- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp102.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h +2
-0@@ -46,6 +46,8 @@ u32 gm107_ram_probe_fbp(const struct nvkm_ram_func *,u32 gm200_ram_probe_fbp_amount (const struct nvkm_ram_func *,u32 ,struct nvkm_device *,int ,int *); +int gp100_ram_init (struct nvkm_ram *); +/* RAM type-specific MR calculation routines */ int nvkm_sddr2_calc (struct nvkm_ram *);int nvkm_sddr3_calc (struct nvkm_ram *);drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c +1
-1@@ -27,7 +27,7 @@#include <subdev/bios/init.h> #include <subdev/bios/rammap.h> -static int +int gp100_ram_init (struct nvkm_ram *ram) {struct nvkm_subdev *subdev = &ram->fb->subdev;drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp102.c +1
-0@@ -5,6 +5,7 @@static const struct nvkm_ram_func gp102_ram = { + .init = gp100_ram_init, };int