mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
b0e40e0805
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
25 lines
477 B
C
25 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);
|
|
}
|