linux-stable/drivers/gpu/drm/bochs/bochs_mm.c
Thomas Zimmermann b0e40e0805 drm/vram: Have VRAM MM call GEM VRAM functions directly
VRAM MM and GEM VRAM buffer objects are only used with each other;
connected via 3 function pointers. Simplify this code by making the
memory manager call the rsp. functions of the BOs directly; and
remove the functions from the BO's public interface.

v2:
	* typos in commit message

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190911110910.30698-3-tzimmermann@suse.de
2019-09-12 19:54:42 +02:00

24 lines
477 B
C

// SPDX-License-Identifier: GPL-2.0-or-later
/*
*/
#include "bochs.h"
/* ---------------------------------------------------------------------- */
int bochs_mm_init(struct bochs_device *bochs)
{
struct drm_vram_mm *vmm;
vmm = drm_vram_helper_alloc_mm(bochs->dev, bochs->fb_base,
bochs->fb_size);
return PTR_ERR_OR_ZERO(vmm);
}
void bochs_mm_fini(struct bochs_device *bochs)
{
if (!bochs->dev->vram_mm)
return;
drm_vram_helper_release_mm(bochs->dev);
}