[Intel-xe] [RFC 2/3] drm/xe: Interface xe drm client with fdinfo interface
Tejas Upadhyay
tejas.upadhyay at intel.com
Wed Aug 9 14:07:45 UTC 2023
DRM core driver has introduced recently fdinfo interface to
show memory stats of individual drm client. Lets interface
xe drm client to fdinfo interface.
Signed-off-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
---
drivers/gpu/drm/xe/xe_device.c | 1 +
drivers/gpu/drm/xe/xe_drm_client.c | 4 ++++
drivers/gpu/drm/xe/xe_drm_client.h | 1 +
3 files changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index b79aaf7a66ab..e92706d5d0d2 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -160,6 +160,7 @@ static struct drm_driver driver = {
.dumb_create = xe_bo_dumb_create,
.dumb_map_offset = drm_gem_ttm_dumb_map_offset,
+ .show_fdinfo = xe_drm_client_fdinfo,
.release = &xe_driver_release,
.ioctls = xe_ioctls,
diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index 6349e50d0b5b..89f057ba2a22 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -32,3 +32,7 @@ void __xe_drm_client_free(struct kref *kref)
kfree(client);
}
+void xe_drm_client_fdinfo(struct drm_printer *p, struct drm_file *file)
+{
+ /* show_meminfo() will be developed here */
+}
diff --git a/drivers/gpu/drm/xe/xe_drm_client.h b/drivers/gpu/drm/xe/xe_drm_client.h
index be097cdf5d12..6cd5a30d242d 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.h
+++ b/drivers/gpu/drm/xe/xe_drm_client.h
@@ -39,5 +39,6 @@ struct xe_drm_client *xe_drm_client_alloc(void);
static inline struct xe_drm_client *
xe_drm_client_get(struct xe_drm_client *client);
static inline void xe_drm_client_put(struct xe_drm_client *client);
+void xe_drm_client_fdinfo(struct drm_printer *p, struct drm_file *file);
#endif
--
2.25.1
More information about the Intel-xe
mailing list