From: Michal Wajdeczko Date: Fri, 20 Dec 2024 19:42:03 +0000 (+0100) Subject: drm/xe/kunit: Allow to replace xe_managed_bo_create_pin_map() X-Git-Tag: block-6.15-20250403~41^2~15^2~101 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f90b552dcbb4e142f2a15d2b4458ea601248b8e8;p=linux-block.git drm/xe/kunit: Allow to replace xe_managed_bo_create_pin_map() We want to use replacement functions in upcoming kunit tests. Signed-off-by: Michal Wajdeczko Reviewed-by: MichaƂ Winiarski Link: https://patchwork.freedesktop.org/patch/msgid/20241220194205.995-11-michal.wajdeczko@intel.com --- diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c index cf0dc9e9c53e..c32201123d44 100644 --- a/drivers/gpu/drm/xe/xe_bo.c +++ b/drivers/gpu/drm/xe/xe_bo.c @@ -15,6 +15,8 @@ #include #include +#include + #include "xe_device.h" #include "xe_dma_buf.h" #include "xe_drm_client.h" @@ -1797,6 +1799,8 @@ struct xe_bo *xe_managed_bo_create_pin_map(struct xe_device *xe, struct xe_tile struct xe_bo *bo; int ret; + KUNIT_STATIC_STUB_REDIRECT(xe_managed_bo_create_pin_map, xe, tile, size, flags); + bo = xe_bo_create_pin_map(xe, tile, NULL, size, ttm_bo_type_kernel, flags); if (IS_ERR(bo)) return bo;