Skip to content

Commit

Permalink
drm: move the buddy allocator from i915 into common drm
Browse files Browse the repository at this point in the history
Move the base i915 buddy allocator code into drm
- Move i915_buddy.h to include/drm
- Move i915_buddy.c to drm root folder
- Rename "i915" string with "drm" string wherever applicable
- Rename "I915" string with "DRM" string wherever applicable
- Fix header file dependencies
- Fix alignment issues
- add Makefile support for drm buddy
- export functions and write kerneldoc description
- Remove i915 selftest config check condition as buddy selftest
  will be moved to drm selftest folder

cleanup i915 buddy references in i915 driver module
and replace with drm buddy

v2:
  - include header file in alphabetical order(Thomas)
  - merged changes listed in the body section into a single patch
    to keep the build intact(Christian, Jani)

v3:
  - make drm buddy a separate module(Thomas, Christian)

Signed-off-by: Arunpravin <Arunpravin.PaneerSelvam@amd.com>
  • Loading branch information
arunpravin24 authored and intel-lab-lkp committed Dec 1, 2021
1 parent c7c90b0 commit afbc900
Show file tree
Hide file tree
Showing 12 changed files with 703 additions and 637 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/Kconfig
Expand Up @@ -197,6 +197,12 @@ config DRM_TTM
GPU memory types. Will be enabled automatically if a device driver
uses it.

config DRM_BUDDY
tristate
depends on DRM
help
A page based buddy allocator

config DRM_VRAM_HELPER
tristate
depends on DRM
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/Makefile
Expand Up @@ -35,6 +35,8 @@ drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o

obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o

obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o

drm_vram_helper-y := drm_gem_vram_helper.o
obj-$(CONFIG_DRM_VRAM_HELPER) += drm_vram_helper.o

Expand Down

0 comments on commit afbc900

Please sign in to comment.