Am 13.02.23 um 19:16 schrieb Stanislaw Gruszka:
On Thu, Feb 09, 2023 at 10:06:25AM -0300, Maíra Canal wrote:
[ 3.872026] debugfs: File 'v3d_ident' in directory '0' already present!
[ 3.872064] debugfs: File 'v3d_ident' in directory '128' already present!
[ 3.872078] debugfs: File 'v3d_regs' in directory '0' already present!
[ 3.872087] debugfs: File 'v3d_regs' in directory '128' already present!
[ 3.872097] debugfs: File 'measure_clock' in directory '0' already present!
[ 3.872105] debugfs: File 'measure_clock' in directory '128' already present!
[ 3.872116] debugfs: File 'bo_stats' in directory '0' already present!
[ 3.872124] debugfs: File 'bo_stats' in directory '128' already present!
It looks like the render node is being added twice, since this doesn't happen
for vc4 and vkms.
Thanks for the feedback and yes that's exactly what I meant with that I haven't looked into all code paths.
Could it be that v3d registers it's debugfs files from the debugfs_init callback?
Although this is true, I'm not sure if this is the reason why the files are
being registered twice, as this doesn't happen to vc4, and it also uses the
debugfs_init callback. I believe it is somewhat related to the fact that
v3d is the primary node and the render node.
Yes, this seems to be because ->debugfs_init = v3d_debugfs_init() uses
drm_debugfs_add_files() which create files for both primary and render.
And ->debugfs_init is called via drm_minor_register() also for both
when registering.
Probably need to change debugfs_init callback to create files just
for one minor. And if we don't want to use minor pointer directly in
drivers, the callback can take debugfs dir as argument.
Well the intention of Maira's and my work is to get rid of the callback
altogether.
So far nobody came up with an argument why we should keep the
distinction of the debugfs directories into primary and render node. I
will just go ahead and remove that.
This way we will have the callback used only once and can slowly
deprecate it.
Regards,
Christian.
Regards
Stanislaw