]> Git Repo - linux.git/blob - drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[linux.git] / drivers / gpu / drm / xe / xe_hw_engine_class_sysfs.h
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2023 Intel Corporation
4  */
5
6 #ifndef _XE_ENGINE_CLASS_SYSFS_H_
7 #define _XE_ENGINE_CLASS_SYSFS_H_
8
9 #include <linux/kobject.h>
10
11 struct xe_gt;
12 struct xe_hw_engine_class_intf;
13
14 int xe_hw_engine_class_sysfs_init(struct xe_gt *gt);
15 bool xe_hw_engine_timeout_in_range(u64 timeout, u64 min, u64 max);
16
17 /**
18  * struct kobj_eclass - A eclass's kobject struct that connects the kobject and the
19  * eclass.
20  *
21  * When dealing with multiple eclass, this struct helps to understand which eclass
22  * needs to be addressed on a given sysfs call.
23  */
24 struct kobj_eclass {
25         /** @base: The actual kobject */
26         struct kobject base;
27         /** @eclass: A pointer to the hw engine class interface */
28         struct xe_hw_engine_class_intf *eclass;
29 };
30
31 static inline struct xe_hw_engine_class_intf *kobj_to_eclass(struct kobject *kobj)
32 {
33         return container_of(kobj, struct kobj_eclass, base)->eclass;
34 }
35
36 #endif
This page took 0.03559 seconds and 4 git commands to generate.