Karol Herbst
2016-Mar-04 02:04 UTC
[Nouveau] [PATCH 0/2] enable memory reclocking on maxwell1
A quick look over the memory reclocking part inside the maxwell mmiotraces kind of reminded me of the kepler memory reclocking, it looks for most parts the same. I didn't do a deep inspection so treat this with great care, but it seems to work at least on those maxwell gpus this was tested on. It depends on the PMU fixes for the fuc5 though, otherwise the PMU might not work as expected and does something stupid. Karol Herbst (2): fb: maxwell memory reclocking looks like kepler, so try it out fb: remove ramgm107 drm/nouveau/nvkm/subdev/fb/Kbuild | 1 - drm/nouveau/nvkm/subdev/fb/gm107.c | 2 +- drm/nouveau/nvkm/subdev/fb/ram.h | 1 - drm/nouveau/nvkm/subdev/fb/ramgm107.c | 40 ----------------------------------- 4 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 drm/nouveau/nvkm/subdev/fb/ramgm107.c -- 2.7.2
Karol Herbst
2016-Mar-04 02:04 UTC
[Nouveau] [PATCH 1/2] fb/gm107: maxwell memory reclocking looks like kepler
Signed-off-by: Karol Herbst <nouveau at karolherbst.de> --- drm/nouveau/nvkm/subdev/fb/gm107.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drm/nouveau/nvkm/subdev/fb/gm107.c b/drm/nouveau/nvkm/subdev/fb/gm107.c index 2a91df8..9cc7e61 100644 --- a/drm/nouveau/nvkm/subdev/fb/gm107.c +++ b/drm/nouveau/nvkm/subdev/fb/gm107.c @@ -29,7 +29,7 @@ gm107_fb = { .dtor = gf100_fb_dtor, .init = gf100_fb_init, .intr = gf100_fb_intr, - .ram_new = gm107_ram_new, + .ram_new = gk104_ram_new, .memtype_valid = gf100_fb_memtype_valid, }; -- 2.7.2
maxwell1 memory recklocking is just as kepler and if there are some tiny changes we might be able to integrate it in the kepler code. Signed-off-by: Karol Herbst <nouveau at karolherbst.de> --- drm/nouveau/nvkm/subdev/fb/Kbuild | 1 - drm/nouveau/nvkm/subdev/fb/ram.h | 1 - drm/nouveau/nvkm/subdev/fb/ramgm107.c | 40 ----------------------------------- 3 files changed, 42 deletions(-) delete mode 100644 drm/nouveau/nvkm/subdev/fb/ramgm107.c diff --git a/drm/nouveau/nvkm/subdev/fb/Kbuild b/drm/nouveau/nvkm/subdev/fb/Kbuild index 0810570..1a3590c 100644 --- a/drm/nouveau/nvkm/subdev/fb/Kbuild +++ b/drm/nouveau/nvkm/subdev/fb/Kbuild @@ -39,7 +39,6 @@ nvkm-y += nvkm/subdev/fb/ramgt215.o nvkm-y += nvkm/subdev/fb/rammcp77.o nvkm-y += nvkm/subdev/fb/ramgf100.o nvkm-y += nvkm/subdev/fb/ramgk104.o -nvkm-y += nvkm/subdev/fb/ramgm107.o nvkm-y += nvkm/subdev/fb/sddr2.o nvkm-y += nvkm/subdev/fb/sddr3.o nvkm-y += nvkm/subdev/fb/gddr3.o diff --git a/drm/nouveau/nvkm/subdev/fb/ram.h b/drm/nouveau/nvkm/subdev/fb/ram.h index f816cbf..a4f8630 100644 --- a/drm/nouveau/nvkm/subdev/fb/ram.h +++ b/drm/nouveau/nvkm/subdev/fb/ram.h @@ -46,5 +46,4 @@ int gt215_ram_new(struct nvkm_fb *, struct nvkm_ram **); int mcp77_ram_new(struct nvkm_fb *, struct nvkm_ram **); int gf100_ram_new(struct nvkm_fb *, struct nvkm_ram **); int gk104_ram_new(struct nvkm_fb *, struct nvkm_ram **); -int gm107_ram_new(struct nvkm_fb *, struct nvkm_ram **); #endif diff --git a/drm/nouveau/nvkm/subdev/fb/ramgm107.c b/drm/nouveau/nvkm/subdev/fb/ramgm107.c deleted file mode 100644 index 43d807f..0000000 --- a/drm/nouveau/nvkm/subdev/fb/ramgm107.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2013 Red Hat Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: Ben Skeggs - */ -#include "ram.h" - -static const struct nvkm_ram_func -gm107_ram_func = { - .init = gk104_ram_init, - .get = gf100_ram_get, - .put = gf100_ram_put, -}; - -int -gm107_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram) -{ - if (!(*pram = kzalloc(sizeof(**pram), GFP_KERNEL))) - return -ENOMEM; - - return gf100_ram_ctor(&gm107_ram_func, fb, 0x021c14, *pram); -} -- 2.7.2