mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
dma-buf/sw_sync: sw_sync register as misc devices
Because the kernel debug fs will removed from android 11, so we move sw_sync to misc devices, as android lib sync has done the compatibility work, so after this commit, the hwc there is no need to update. Signed-off-by: Huang Jiachai <hjc@rock-chips.com> Change-Id: I799b66b1ba98c9370893b9554095664010b635df
This commit is contained in:
@@ -21,7 +21,6 @@ config SW_SYNC
|
|||||||
bool "Sync File Validation Framework"
|
bool "Sync File Validation Framework"
|
||||||
default n
|
default n
|
||||||
depends on SYNC_FILE
|
depends on SYNC_FILE
|
||||||
depends on DEBUG_FS
|
|
||||||
help
|
help
|
||||||
A sync object driver that uses a 32bit counter to coordinate
|
A sync object driver that uses a 32bit counter to coordinate
|
||||||
synchronization. Useful when there is no hardware primitive backing
|
synchronization. Useful when there is no hardware primitive backing
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
#include <linux/file.h>
|
#include <linux/file.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
#include <linux/miscdevice.h>
|
||||||
|
#include <linux/module.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/sync_file.h>
|
#include <linux/sync_file.h>
|
||||||
@@ -410,3 +412,13 @@ const struct file_operations sw_sync_debugfs_fops = {
|
|||||||
.unlocked_ioctl = sw_sync_ioctl,
|
.unlocked_ioctl = sw_sync_ioctl,
|
||||||
.compat_ioctl = compat_ptr_ioctl,
|
.compat_ioctl = compat_ptr_ioctl,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct miscdevice sw_sync_dev = {
|
||||||
|
.minor = MISC_DYNAMIC_MINOR,
|
||||||
|
.name = "sw_sync",
|
||||||
|
.fops = &sw_sync_debugfs_fops,
|
||||||
|
};
|
||||||
|
|
||||||
|
module_misc_device(sw_sync_dev);
|
||||||
|
|
||||||
|
MODULE_LICENSE("GPL v2");
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include <linux/debugfs.h>
|
#include <linux/debugfs.h>
|
||||||
#include "sync_debug.h"
|
#include "sync_debug.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_FS
|
||||||
static struct dentry *dbgfs;
|
static struct dentry *dbgfs;
|
||||||
|
|
||||||
static LIST_HEAD(sync_timeline_list_head);
|
static LIST_HEAD(sync_timeline_list_head);
|
||||||
@@ -188,3 +189,4 @@ static __init int sync_debugfs_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
late_initcall(sync_debugfs_init);
|
late_initcall(sync_debugfs_init);
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -62,11 +62,18 @@ struct sync_pt {
|
|||||||
struct rb_node node;
|
struct rb_node node;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_FS
|
||||||
extern const struct file_operations sw_sync_debugfs_fops;
|
extern const struct file_operations sw_sync_debugfs_fops;
|
||||||
|
|
||||||
void sync_timeline_debug_add(struct sync_timeline *obj);
|
void sync_timeline_debug_add(struct sync_timeline *obj);
|
||||||
void sync_timeline_debug_remove(struct sync_timeline *obj);
|
void sync_timeline_debug_remove(struct sync_timeline *obj);
|
||||||
void sync_file_debug_add(struct sync_file *fence);
|
void sync_file_debug_add(struct sync_file *fence);
|
||||||
void sync_file_debug_remove(struct sync_file *fence);
|
void sync_file_debug_remove(struct sync_file *fence);
|
||||||
|
#else
|
||||||
|
static inline void sync_timeline_debug_add(struct sync_timeline *obj) {}
|
||||||
|
static inline void sync_timeline_debug_remove(struct sync_timeline *obj) {}
|
||||||
|
static inline void sync_file_debug_add(struct sync_file *fence) {}
|
||||||
|
static inline void sync_file_debug_remove(struct sync_file *fence) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _LINUX_SYNC_H */
|
#endif /* _LINUX_SYNC_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user