mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
drm/nouveau/fb/ram: Use Kepler implementation on Maxwell
This enables memory reclocking on Maxwell. Sadly without a PMU firmware it is useless for gm20x gpus. Signed-off-by: Karol Herbst <karolherbst@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
114653c759
commit
ebaf3e70aa
3 changed files with 9 additions and 12 deletions
|
@ -24,6 +24,7 @@ int gf100_ram_ctor(const struct nvkm_ram_func *, struct nvkm_fb *,
|
|||
int gf100_ram_get(struct nvkm_ram *, u64, u32, u32, u32, struct nvkm_mem **);
|
||||
void gf100_ram_put(struct nvkm_ram *, struct nvkm_mem **);
|
||||
|
||||
int gk104_ram_ctor(struct nvkm_fb *, struct nvkm_ram **, u32);
|
||||
int gk104_ram_init(struct nvkm_ram *ram);
|
||||
|
||||
/* RAM type-specific MR calculation routines */
|
||||
|
|
|
@ -1537,6 +1537,12 @@ gk104_ram_func = {
|
|||
|
||||
int
|
||||
gk104_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
|
||||
{
|
||||
return gk104_ram_ctor(fb, pram, 0x022554);
|
||||
}
|
||||
|
||||
int
|
||||
gk104_ram_ctor(struct nvkm_fb *fb, struct nvkm_ram **pram, u32 maskaddr)
|
||||
{
|
||||
struct nvkm_subdev *subdev = &fb->subdev;
|
||||
struct nvkm_device *device = subdev->device;
|
||||
|
@ -1552,7 +1558,7 @@ gk104_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
|
|||
return -ENOMEM;
|
||||
*pram = &ram->base;
|
||||
|
||||
ret = gf100_ram_ctor(&gk104_ram_func, fb, 0x022554, &ram->base);
|
||||
ret = gf100_ram_ctor(&gk104_ram_func, fb, maskaddr, &ram->base);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -23,18 +23,8 @@
|
|||
*/
|
||||
#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);
|
||||
return gk104_ram_ctor(fb, pram, 0x021c14);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue