You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
drm/nouveau/kms/nv04: use vzalloc for nv04_display
commit bd6e07e72f upstream.
The struct is giant, and triggers an order-7 allocation (512K). There is
no reason for this to be kmalloc-type memory, so switch to vmalloc. This
should help loading nouveau on low-memory and/or long-running systems.
Reported-by: Nathan E. Egge <unlord@xiph.org>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests/10
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
605583fccc
commit
8cbbf4a6f1
@@ -205,7 +205,7 @@ nv04_display_destroy(struct drm_device *dev)
|
||||
nvif_notify_dtor(&disp->flip);
|
||||
|
||||
nouveau_display(dev)->priv = NULL;
|
||||
kfree(disp);
|
||||
vfree(disp);
|
||||
|
||||
nvif_object_unmap(&drm->client.device.object);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ nv04_display_create(struct drm_device *dev)
|
||||
struct nv04_display *disp;
|
||||
int i, ret;
|
||||
|
||||
disp = kzalloc(sizeof(*disp), GFP_KERNEL);
|
||||
disp = vzalloc(sizeof(*disp));
|
||||
if (!disp)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user