summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/include
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-10-01 06:36:46 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-10-01 06:36:46 +0000
commit4451dee883dd930b290db3640001761c9ebb3d49 (patch)
tree14c1a3496f8fe95f00e4ebde674f16ac5a4e9581 /sys/dev/pci/drm/include
parent9bc120e0ed6f60b98d403b60f0949cced4495f7c (diff)
accel: Use XArray instead of IDR for minors
From Michal Winiarski f6b589e361538285fdad8cf62143e3cf3b2c8b2a in linux-6.6.y/6.6.53 45c4d994b82b08f0ce5eb50f8da29379c92a391e in mainline linux
Diffstat (limited to 'sys/dev/pci/drm/include')
-rw-r--r--sys/dev/pci/drm/include/drm/drm_file.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/include/drm/drm_file.h b/sys/dev/pci/drm/include/drm/drm_file.h
index 6e966a8e86b..50ed4cf44e8 100644
--- a/sys/dev/pci/drm/include/drm/drm_file.h
+++ b/sys/dev/pci/drm/include/drm/drm_file.h
@@ -48,6 +48,8 @@ struct device;
struct file;
struct seq_file;
+extern struct xarray drm_minors_xa;
+
/*
* FIXME: Not sure we want to have drm_minor here in the end, but to avoid
* header include loops we need it here for now.
@@ -449,6 +451,9 @@ static inline bool drm_is_accel_client(const struct drm_file *file_priv)
void drm_file_update_pid(struct drm_file *);
+struct drm_minor *drm_minor_acquire(struct xarray *minors_xa, unsigned int minor_id);
+void drm_minor_release(struct drm_minor *minor);
+
#ifdef __linux__
int drm_open(struct inode *inode, struct file *filp);
int drm_open_helper(struct file *filp, struct drm_minor *minor);