Skip to content

Commit 6db9df4

Browse files
Ben SkeggsDanilo Krummrich
authored andcommitted
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 Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/319 Fixes: 2c0c15a ("drm/nouveau/fb/gp102-ga100: switch to simpler vram size detection method") Cc: stable@vger.kernel.org # 6.6+ Signed-off-by: Ben Skeggs <bskeggs@nvidia.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20240904232418.8590-1-bskeggs@nvidia.com
1 parent ea5ff5d commit 6db9df4

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ u32 gm107_ram_probe_fbp(const struct nvkm_ram_func *,
4646
u32 gm200_ram_probe_fbp_amount(const struct nvkm_ram_func *, u32,
4747
struct nvkm_device *, int, int *);
4848

49+
int gp100_ram_init(struct nvkm_ram *);
50+
4951
/* RAM type-specific MR calculation routines */
5052
int nvkm_sddr2_calc(struct nvkm_ram *);
5153
int nvkm_sddr3_calc(struct nvkm_ram *);

drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <subdev/bios/init.h>
2828
#include <subdev/bios/rammap.h>
2929

30-
static int
30+
int
3131
gp100_ram_init(struct nvkm_ram *ram)
3232
{
3333
struct nvkm_subdev *subdev = &ram->fb->subdev;

drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp102.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
static const struct nvkm_ram_func
77
gp102_ram = {
8+
.init = gp100_ram_init,
89
};
910

1011
int

0 commit comments

Comments
 (0)