Quoting Jani Nikula (2019-12-05 15:43:40)
> +static int i915_param_int_open(struct inode *inode, struct file *file)
> +{
> + return single_open(file, i915_param_int_show, inode->i_private);
What I've always wanted with this style of approach was a means that the
parameter is only set while the debugfs remained open.
fd = open("/debug/my_parameter", O_WRONLY | O_EXCL);
write(fd, "1", 1);
... run test ..
System reverts to default on process termination, or explicit close(fd).
I'd make the open implicitly O_EXCL, i.e. return -EBUSY if something
else already holds the parameter set. Or, you can use the O_EXCL to
select between the different modes of operation.
Moving the parameters to debugfs is more than worth it imo if we can
enable this mode of operation.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx