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 <michal.wajdeczko@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241220194205.995-11-michal.wajdeczko@intel.com
This commit is contained in:
Michal Wajdeczko 2024-12-20 20:42:03 +01:00
parent d8b2149ba8
commit f90b552dcb

View File

@ -15,6 +15,8 @@
#include <drm/ttm/ttm_tt.h>
#include <uapi/drm/xe_drm.h>
#include <kunit/static_stub.h>
#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;