Merge tag 'omap-for-v5.5/ti-sysc-late-signed' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-microblaze.git] / drivers / gpu / drm / bochs / bochs_mm.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  */
4
5 #include "bochs.h"
6
7 /* ---------------------------------------------------------------------- */
8
9 int bochs_mm_init(struct bochs_device *bochs)
10 {
11         struct drm_vram_mm *vmm;
12
13         vmm = drm_vram_helper_alloc_mm(bochs->dev, bochs->fb_base,
14                                        bochs->fb_size);
15         return PTR_ERR_OR_ZERO(vmm);
16 }
17
18 void bochs_mm_fini(struct bochs_device *bochs)
19 {
20         if (!bochs->dev->vram_mm)
21                 return;
22
23         drm_vram_helper_release_mm(bochs->dev);
24 }