drm/xe/kunit: Allow to replace xe_guc_ct_send_recv() with stub
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 4 Jan 2024 22:20:29 +0000 (23:20 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 5 Jan 2024 15:25:53 +0000 (16:25 +0100)
We want to use replacement functions in upcoming kunit tests.

Reviewed-by: Piotr PiĆ³rkowski <piotr.piorkowski@intel.com>
Link: https://lore.kernel.org/r/20240104222031.277-9-michal.wajdeczko@intel.com
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
drivers/gpu/drm/xe/xe_guc_ct.c

index 4cde93c18a2d4183cc81b4532fd343b292f53fa2..8f208267ffc638bf5fece0e24adc09410395612b 100644 (file)
@@ -9,6 +9,8 @@
 #include <linux/circ_buf.h>
 #include <linux/delay.h>
 
+#include <kunit/static_stub.h>
+
 #include <drm/drm_managed.h>
 
 #include "abi/guc_actions_abi.h"
@@ -782,6 +784,7 @@ retry_same_fence:
 int xe_guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
                        u32 *response_buffer)
 {
+       KUNIT_STATIC_STUB_REDIRECT(xe_guc_ct_send_recv, ct, action, len, response_buffer);
        return guc_ct_send_recv(ct, action, len, response_buffer, false);
 }