linux/drivers/gpu/drm/xe/tests/xe_pci.c

// SPDX-License-Identifier: GPL-2.0 AND MIT
/*
 * Copyright © 2023 Intel Corporation
 */

#include "tests/xe_pci_test.h"

#include "tests/xe_test.h"

#include <kunit/test-bug.h>
#include <kunit/test.h>
#include <kunit/test-bug.h>
#include <kunit/visibility.h>

/**
 * xe_call_for_each_graphics_ip - Iterate over all recognized graphics IPs
 * @xe_fn: Function to call for each device.
 *
 * This function iterates over the descriptors for all graphics IPs recognized
 * by the driver and calls @xe_fn: for each one of them.
 */
void xe_call_for_each_graphics_ip(xe_graphics_fn xe_fn)
{}
EXPORT_SYMBOL_IF_KUNIT();

/**
 * xe_call_for_each_media_ip - Iterate over all recognized media IPs
 * @xe_fn: Function to call for each device.
 *
 * This function iterates over the descriptors for all media IPs recognized
 * by the driver and calls @xe_fn: for each one of them.
 */
void xe_call_for_each_media_ip(xe_media_fn xe_fn)
{}
EXPORT_SYMBOL_IF_KUNIT();

static void fake_read_gmdid(struct xe_device *xe, enum xe_gmdid_type type,
			    u32 *ver, u32 *revid)
{}

int xe_pci_fake_device_init(struct xe_device *xe)
{}
EXPORT_SYMBOL_IF_KUNIT();

/**
 * xe_pci_live_device_gen_param - Helper to iterate Xe devices as KUnit parameters
 * @prev: the previously returned value, or NULL for the first iteration
 * @desc: the buffer for a parameter name
 *
 * Iterates over the available Xe devices on the system. Uses the device name
 * as the parameter name.
 *
 * To be used only as a parameter generator function in &KUNIT_CASE_PARAM.
 *
 * Return: pointer to the next &struct xe_device ready to be used as a parameter
 *         or NULL if there are no more Xe devices on the system.
 */
const void *xe_pci_live_device_gen_param(const void *prev, char *desc)
{}
EXPORT_SYMBOL_IF_KUNIT();