summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_tile_sysfs.h
diff options
context:
space:
mode:
authorTejas Upadhyay <tejas.upadhyay@intel.com>2023-06-28 08:38:35 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:35:06 +0300
commite5a845fd8fa4ce61a99c87f37b63530fa4995750 (patch)
treea5c480c5119f94d7629fdff54385bab5d86c61ea /drivers/gpu/drm/xe/xe_tile_sysfs.h
parent5572a004685770f8daad7661c5494b65148ede9f (diff)
downloadlinux-e5a845fd8fa4ce61a99c87f37b63530fa4995750.tar.xz
drm/xe: Add sysfs entry for tile
We have recently introduced tile for each gpu, so lets add sysfs entry per tile for userspace to provide required information specific to tile. V5: - define ktype as const V4: - Reorder headers - Aravind V3: - Make API to return void and add drm_warn - Aravind V2: - Add logs in failure path Reviewed-by: Aravind Iddamsetty <aravind.iddamsetty@intel.com> Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_tile_sysfs.h')
-rw-r--r--drivers/gpu/drm/xe/xe_tile_sysfs.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_tile_sysfs.h b/drivers/gpu/drm/xe/xe_tile_sysfs.h
new file mode 100644
index 000000000000..e4f065039eba
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_tile_sysfs.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#ifndef _XE_TILE_SYSFS_H_
+#define _XE_TILE_SYSFS_H_
+
+#include "xe_tile_sysfs_types.h"
+
+void xe_tile_sysfs_init(struct xe_tile *tile);
+
+static inline struct xe_tile *
+kobj_to_tile(struct kobject *kobj)
+{
+ return container_of(kobj, struct kobj_tile, base)->tile;
+}
+
+#endif /* _XE_TILE_SYSFS_H_ */