forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: drm: Add GPUVM Manager abstraction
Signed-off-by: Asahi Lina <lina@asahilina.net>
- Loading branch information
Showing
5 changed files
with
706 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
|
||
#include <drm/drm_gpuvm.h> | ||
|
||
#ifdef CONFIG_DRM | ||
#ifdef CONFIG_DRM_GPUVM | ||
|
||
struct drm_gpuvm *rust_helper_drm_gpuvm_get(struct drm_gpuvm *obj) | ||
{ | ||
return drm_gpuvm_get(obj); | ||
} | ||
|
||
void rust_helper_drm_gpuvm_exec_unlock(struct drm_gpuvm_exec *vm_exec) | ||
{ | ||
return drm_gpuvm_exec_unlock(vm_exec); | ||
} | ||
|
||
void rust_helper_drm_gpuva_init_from_op(struct drm_gpuva *va, struct drm_gpuva_op_map *op) | ||
{ | ||
drm_gpuva_init_from_op(va, op); | ||
} | ||
|
||
struct drm_gpuvm_bo *rust_helper_drm_gpuvm_bo_get(struct drm_gpuvm_bo *vm_bo) | ||
{ | ||
return drm_gpuvm_bo_get(vm_bo); | ||
} | ||
|
||
bool rust_helper_drm_gpuvm_is_extobj(struct drm_gpuvm *gpuvm, struct drm_gem_object *obj) | ||
{ | ||
return drm_gpuvm_is_extobj(gpuvm, obj); | ||
} | ||
|
||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.