Commit 2fe36db5 authored by Jani Nikula's avatar Jani Nikula

drm/xe: make xe_ttm_funcs const

Place the function pointers in rodata. Also drop the extra declaration
while at it.
Reviewed-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240117122044.1544174-1-jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 8ea8c918
...@@ -1041,7 +1041,7 @@ static void xe_ttm_bo_delete_mem_notify(struct ttm_buffer_object *ttm_bo) ...@@ -1041,7 +1041,7 @@ static void xe_ttm_bo_delete_mem_notify(struct ttm_buffer_object *ttm_bo)
} }
} }
struct ttm_device_funcs xe_ttm_funcs = { const struct ttm_device_funcs xe_ttm_funcs = {
.ttm_tt_create = xe_ttm_tt_create, .ttm_tt_create = xe_ttm_tt_create,
.ttm_tt_populate = xe_ttm_tt_populate, .ttm_tt_populate = xe_ttm_tt_populate,
.ttm_tt_unpopulate = xe_ttm_tt_unpopulate, .ttm_tt_unpopulate = xe_ttm_tt_unpopulate,
......
...@@ -243,7 +243,7 @@ int xe_bo_evict(struct xe_bo *bo, bool force_alloc); ...@@ -243,7 +243,7 @@ int xe_bo_evict(struct xe_bo *bo, bool force_alloc);
int xe_bo_evict_pinned(struct xe_bo *bo); int xe_bo_evict_pinned(struct xe_bo *bo);
int xe_bo_restore_pinned(struct xe_bo *bo); int xe_bo_restore_pinned(struct xe_bo *bo);
extern struct ttm_device_funcs xe_ttm_funcs; extern const struct ttm_device_funcs xe_ttm_funcs;
int xe_gem_create_ioctl(struct drm_device *dev, void *data, int xe_gem_create_ioctl(struct drm_device *dev, void *data,
struct drm_file *file); struct drm_file *file);
......
...@@ -199,8 +199,6 @@ struct dma_fence *xe_vm_rebind(struct xe_vm *vm, bool rebind_worker); ...@@ -199,8 +199,6 @@ struct dma_fence *xe_vm_rebind(struct xe_vm *vm, bool rebind_worker);
int xe_vm_invalidate_vma(struct xe_vma *vma); int xe_vm_invalidate_vma(struct xe_vma *vma);
extern struct ttm_device_funcs xe_ttm_funcs;
static inline void xe_vm_queue_rebind_worker(struct xe_vm *vm) static inline void xe_vm_queue_rebind_worker(struct xe_vm *vm)
{ {
xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm)); xe_assert(vm->xe, xe_vm_in_preempt_fence_mode(vm));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment