]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drm/nouveau/fb/gf100-: rework ram detection
authorBen Skeggs <bskeggs@redhat.com>
Thu, 2 Mar 2017 03:53:05 +0000 (13:53 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 7 Mar 2017 07:05:17 +0000 (17:05 +1000)
commit97e5268d57bb2ec9c82cf8758fa97a2f04ea9d1b
tree8df957e52625455ab508bf39a07c30280e4c7c0b
parentba4c063d47562d28aed3d440959fb6b13802e921
drm/nouveau/fb/gf100-: rework ram detection

This commit reworks the RAM detection algorithm, using RAM-per-LTC to
determine whether a board has a mixed-memory configuration instead of
using RAM-per-FBPA.  I'm not certain the algorithm is perfect, but it
should handle all currently known configurations in the very least.

This should fix GTX 970 boards with 4GiB of RAM where the last 512MiB
isn't fully accessible, as well as only detecting half the VRAM on
GF108 boards.

As a nice side-effect, GP10x memory detection now reuses the majority
of the code from earlier chipsets.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf108.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm107.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp100.c