mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-24 14:54:49 +08:00
drm/nouveau: Make PCIE GART size depend on the available RAMIN space.
Reported-by: Tomas Miljenovic <tomasmiljenovic@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
dd661e5f4e
commit
9d5a6c4353
@ -224,11 +224,11 @@ nouveau_sgdma_init(struct drm_device *dev)
|
||||
int i, ret;
|
||||
|
||||
if (dev_priv->card_type < NV_50) {
|
||||
if(dev_priv->card_type < NV_40) {
|
||||
aper_size = (64 * 1024 * 1024);
|
||||
} else {
|
||||
aper_size = (512 * 1024 * 1024);
|
||||
}
|
||||
if(dev_priv->ramin_rsvd_vram < 2 * 1024 * 1024)
|
||||
aper_size = 64 * 1024 * 1024;
|
||||
else
|
||||
aper_size = 512 * 1024 * 1024;
|
||||
|
||||
obj_size = (aper_size >> NV_CTXDMA_PAGE_SHIFT) * 4;
|
||||
obj_size += 8; /* ctxdma header */
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user