• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  */
4 
5 #include "bochs.h"
6 
7 /* ---------------------------------------------------------------------- */
8 
bochs_mm_init(struct bochs_device * bochs)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 
bochs_mm_fini(struct bochs_device * bochs)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 }
25