drivers/gpu/drm/xe/tests/xe_rtp.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/tests/xe_rtp.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/xe/tests/xe_rtp.c
Extension
.c
Size
1124 bytes
Lines
39
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

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

#include "tests/xe_rtp_test.h"

#include <kunit/visibility.h>

/**
 * xe_rtp_rule_matches - Check if a set of RTP rule set match against the
 *			 device/GT/hwe
 * @xe: The xe device
 * @gt: The GT struct (may be NULL)
 * @hwe: The hw_engine  (may be NULL)
 * @rules: The array of rules to match against
 * @n_rules: Number of items in @rules
 * @err: Pointer (may be NULL) to set error number.
 *
 * This parses the set of rules and check if they match against the passed
 * parameters.
 *
 * If passed, @err is updated with a non-zero negative error number or zero if
 * no errors were found during the parsing/evaluation of rules.
 *
 * Returns true if there is a match and false if there is no match or if an
 * error was found.
 */
bool xe_rtp_rule_matches(const struct xe_device *xe,
			 struct xe_gt *gt,
			 struct xe_hw_engine *hwe,
			 const struct xe_rtp_rule *rules,
			 unsigned int n_rules,
			 int *err)
{
	return rule_matches_with_err(xe, gt, hwe, rules, n_rules, err);
}
EXPORT_SYMBOL_IF_KUNIT(xe_rtp_rule_matches);

Annotation

Implementation Notes