DRM accel and debugfs/sysfs
Hi
I was about to send debugfs support for ivpu and noticed that there are current changes that deprecate drm_devel->debugfs_init callback.
Further I looked at this commit [1], that stated we should not use drm_minor for debugfs and sysfs. What is quite contrary to what drm accel framework did in the first place.
So my question is how we should use debugfs/sysfs in accel? Use it with old fashioned minor-centric way or change the framework somehow ?
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=99845faae7099cd704ebf67514c1157c26960a26
Regards
Stanislaw
Hi Stanislaw,
Quoted 5 lines · Stanislaw Gruszka
Hi
I was about to send debugfs support for ivpu and noticed that there are current changes that deprecate
drm_devel->debugfs_initcallback.
Quoted 7 lines
Further I looked at this commit [1], that stated we should not use
drm_minorfor debugfs and sysfs. What is quite contrary to what drm accel framework did in the first place.So my question is how we should use debugfs/sysfs in accel? Use it with old fashioned minor-centric way or change the framework somehow ?
As we are trying to replace drm_debugfs_create_files() [1], it would be nice to see the accel debugfs support use the new debugfs API. This would mean using the debugfs_list from the drm_device, deprecating the debugfs_init callback, and adding the a similar code snippet to accel_debugfs_init:
list_for_each_entry_safe(entry, tmp, &dev->debugfs_list, list) {
debugfs_create_file(entry->file.name, 0444,
minor->debugfs_root, entry, &drm_debugfs_entry_fops);
list_del(&entry->list);Maybe Daniel has some more thoughts on this matter, but I guess it would be better to drop the use of the old-fashioned minor-centric implementation in accel.
[1] https://cgit.freedesktop.org/drm/drm-misc/tree/Documentation/gpu/todo.rst#n511
Best Regards,
- Maíra Canal
Quoted 6 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=99845faae7099cd704ebf67514c1157c26960a26
Regards
Stanislaw
Quoted 31 lines · Maíra Canal
Hi Stanislaw,
Quoted 5 lines · Stanislaw Gruszka
Hi
I was about to send debugfs support for ivpu and noticed that there are current changes that deprecate
drm_devel->debugfs_initcallback.Quoted 7 lines
Further I looked at this commit [1], that stated we should not use
drm_minorfor debugfs and sysfs. What is quite contrary to what drm accel framework did in the first place.So my question is how we should use debugfs/sysfs in accel? Use it with old fashioned minor-centric way or change the framework somehow ?
As we are trying to replace
drm_debugfs_create_files()[1], it would be nice to see the accel debugfs support use the new debugfs API. This would mean using thedebugfs_listfrom thedrm_device, deprecating thedebugfs_initcallback, and adding the a similar code snippet toaccel_debugfs_init:
list_for_each_entry_safe(entry, tmp, &dev->debugfs_list, list){
debugfs_create_file(entry->file.name, 0444,minor->debugfs_root, entry,&drm_debugfs_entry_fops);list_del(&entry->list);Maybe Daniel has some more thoughts on this matter, but I guess it would be better to drop the use of the old-fashioned minor-centric implementation in accel.
Quoted 5 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/tree/Documentation/gpu/todo.rst#n511
Best Regards,
- Maíra Canal
Thank you for the details Maira. It helps to explain what the todo is suggesting. Is there an example of a driver/drm_device that uses debugfs_list which you can easily point to?
-Jeff
Quoted 8 lines
Quoted 8 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=99845faae7099cd704ebf67514c1157c26960a26
Regards
Stanislaw
Quoted 32 lines · Jeffrey Hugo
Quoted 31 lines · Maíra Canal
Hi Stanislaw,
Quoted 5 lines · Stanislaw Gruszka
Hi
I was about to send debugfs support for ivpu and noticed that there are current changes that deprecate
drm_devel->debugfs_initcallback.Quoted 7 lines
Further I looked at this commit [1], that stated we should not use
drm_minorfor debugfs and sysfs. What is quite contrary to what drm accel framework did in the first place.So my question is how we should use debugfs/sysfs in accel? Use it with old fashioned minor-centric way or change the framework somehow ?
As we are trying to replace
drm_debugfs_create_files()[1], it would be nice to see the accel debugfs support use the new debugfs API. This would mean using thedebugfs_listfrom thedrm_device, deprecating thedebugfs_initcallback, and adding the a similar code snippet toaccel_debugfs_init:
list_for_each_entry_safe(entry, tmp, &dev->debugfs_list, list){debugfs_create_file(entry->file.name, 0444, minor->debugfs_root, entry, &drm_debugfs_entry_fops);list_del(&entry->list);Maybe Daniel has some more thoughts on this matter, but I guess it would be better to drop the use of the old-fashioned minor-centric implementation in accel.
Quoted 6 lines
Quoted 4 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/tree/Documentation/gpu/todo.rst#n511
Best Regards,
- Maíra CanalThank you for the details Maira. It helps to explain what the todo is suggesting. Is there an example of a driver/drm_device that uses
debugfs_listwhich you can easily point to?
The implementation of this device-centered infrastructure is linked in [1] and an example of the conversion of debugfs APIs is linked in [2], and other drivers such as v3d, vkms, vc4 and gud use this new API as well.
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=1c9cacbea880513a896aee65a5c58007bcb55653
[2] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=2e3ab8a6994f265bbd4dbd00448b84548f18464c
Best Regards,
- Maíra Canal
Quoted 11 lines
-Jeff
Quoted 7 lines
Quoted 7 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=99845faae7099cd704ebf67514c1157c26960a26
Regards
Stanislaw
Quoted 24 lines · Maíra Canal
Quoted 23 lines · Jeffrey Hugo
Quoted 22 lines · Maíra Canal
Hi Stanislaw,
Quoted 5 lines · Stanislaw Gruszka
Hi
I was about to send debugfs support for ivpu and noticed that there are current changes that deprecate
drm_devel->debugfs_initcallback.Quoted 7 lines
Further I looked at this commit [1], that stated we should not use
drm_minorfor debugfs and sysfs. What is quite contrary to what drm accel framework did in the first place.So my question is how we should use debugfs/sysfs in accel? Use it with old fashioned minor-centric way or change the framework somehow ?
As we are trying to replace
drm_debugfs_create_files()[1], it would be nice to see the accel debugfs support use the new debugfs API. This would mean using thedebugfs_listfrom thedrm_device, deprecating thedebugfs_initcallback, and adding the a similar code snippet toaccel_debugfs_init:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
list_for_each_entry_safe(entry, tmp, &dev->debugfs_list, list){debugfs_create_file(entry->file.name, 0444, minor->debugfs_root, entry, &drm_debugfs_entry_fops);list_del(&entry->list);Maybe Daniel has some more thoughts on this matter, but I guess it would be better to drop the use of the old-fashioned minor-centric implementation in accel.
It was a simple case of two things landing in parallel and not being synchronized. Would be good if accel could be adapted to use the new debugfs infra, now that both accel and the new debugfs stuff have landed. -Daniel
Quoted 29 lines
Quoted 7 lines
Quoted 5 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/tree/Documentation/gpu/todo.rst#n511
Best Regards,
- Maíra CanalThank you for the details Maira. It helps to explain what the todo is suggesting. Is there an example of a driver/drm_device that uses
debugfs_listwhich you can easily point to?The implementation of this device-centered infrastructure is linked in [1] and an example of the conversion of debugfs APIs is linked in [2], and other drivers such as v3d, vkms, vc4 and gud use this new API as well.
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=1c9cacbea880513a896aee65a5c58007bcb55653
[2] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=2e3ab8a6994f265bbd4dbd00448b84548f18464cBest Regards,
- Maíra CanalQuoted 11 lines
-Jeff
Quoted 7 lines
Quoted 7 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=99845faae7099cd704ebf67514c1157c26960a26
Regards
Stanislaw
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 31 lines · Daniel Vetter
Quoted 29 lines · Maíra Canal
Quoted 28 lines · Jeffrey Hugo
Quoted 27 lines · Maíra Canal
Hi Stanislaw,
Quoted 5 lines · Stanislaw Gruszka
Hi
I was about to send debugfs support for ivpu and noticed that there are current changes that deprecate
drm_devel->debugfs_initcallback.Quoted 7 lines
Further I looked at this commit [1], that stated we should not use
drm_minorfor debugfs and sysfs. What is quite contrary to what drm accel framework did in the first place.So my question is how we should use debugfs/sysfs in accel? Use it with old fashioned minor-centric way or change the framework somehow ?
As we are trying to replace
drm_debugfs_create_files()[1], it would be nice to see the accel debugfs support use the new debugfs API. This would mean using thedebugfs_listfrom thedrm_device, deprecating thedebugfs_initcallback, and adding the a similar code snippet toaccel_debugfs_init:list_for_each_entry_safe(entry, tmp, &dev->debugfs_list, list) { debugfs_create_file(entry->file.name, 0444, minor->debugfs_root, entry, &drm_debugfs_entry_fops); list_del(&entry->list);
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Maybe Daniel has some more thoughts on this matter, but I guess it would be better to drop the use of the old-fashioned minor-centric implementation in accel.
It was a simple case of two things landing in parallel and not being synchronized. Would be good if accel could be adapted to use the new debugfs infra, now that both accel and the new debugfs stuff have landed. -Daniel
Yes, definitely.
Does anyone volunteer to send a patch to align ? If not, we will do it internally and send a patch.
Oded
Quoted 35 lines
Quoted 13 lines
Quoted 8 lines
Quoted 6 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/tree/Documentation/gpu/todo.rst#n511
Best Regards,
- Maíra CanalThank you for the details Maira. It helps to explain what the todo is suggesting. Is there an example of a driver/drm_device that uses
debugfs_listwhich you can easily point to?The implementation of this device-centered infrastructure is linked in [1] and an example of the conversion of debugfs APIs is linked in [2], and other drivers such as v3d, vkms, vc4 and gud use this new API as well.
Quoted 17 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=1c9cacbea880513a896aee65a5c58007bcb55653
[2] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=2e3ab8a6994f265bbd4dbd00448b84548f18464cBest Regards,
- Maíra CanalQuoted 11 lines
-Jeff
Quoted 7 lines
Quoted 7 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=99845faae7099cd704ebf67514c1157c26960a26
Regards
Stanislaw--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Quoted 36 lines · Oded Gabbay
Quoted 35 lines · Daniel Vetter
Quoted 32 lines · Maíra Canal
Quoted 31 lines · Jeffrey Hugo
Quoted 30 lines · Maíra Canal
Hi Stanislaw,
Quoted 5 lines · Stanislaw Gruszka
Hi
I was about to send debugfs support for ivpu and noticed that there are current changes that deprecate
drm_devel->debugfs_initcallback.Quoted 7 lines
Further I looked at this commit [1], that stated we should not use
drm_minorfor debugfs and sysfs. What is quite contrary to what drm accel framework did in the first place.So my question is how we should use debugfs/sysfs in accel? Use it with old fashioned minor-centric way or change the framework somehow ?
As we are trying to replace
drm_debugfs_create_files()[1], it would be nice to see the accel debugfs support use the new debugfs API. This would mean using thedebugfs_listfrom thedrm_device, deprecating thedebugfs_initcallback, and adding the a similar code snippet toaccel_debugfs_init:list_for_each_entry_safe(entry, tmp, &dev->debugfs_list, list) { debugfs_create_file(entry->file.name, 0444, minor->debugfs_root, entry, &drm_debugfs_entry_fops); list_del(&entry->list);Maybe Daniel has some more thoughts on this matter, but I guess it would be better to drop the use of the old-fashioned minor-centric implementation in accel.
Quoted 6 lines
Quoted 4 lines
It was a simple case of two things landing in parallel and not being synchronized. Would be good if accel could be adapted to use the new debugfs infra, now that both accel and the new debugfs stuff have landed. -Daniel
Yes, definitely.
Does anyone volunteer to send a patch to align ?
I can send a patch this week align it.
Best Regards,
- Maíra Canal
Quoted 38 lines
If not, we will do it internally and send a patch.
Oded
Quoted 35 lines
Quoted 13 lines
Quoted 8 lines
Quoted 6 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/tree/Documentation/gpu/todo.rst#n511
Best Regards,
- Maíra CanalThank you for the details Maira. It helps to explain what the todo is suggesting. Is there an example of a driver/drm_device that uses
debugfs_listwhich you can easily point to?The implementation of this device-centered infrastructure is linked in [1] and an example of the conversion of debugfs APIs is linked in [2], and other drivers such as v3d, vkms, vc4 and gud use this new API as well.
Quoted 17 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=1c9cacbea880513a896aee65a5c58007bcb55653
[2] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=2e3ab8a6994f265bbd4dbd00448b84548f18464cBest Regards,
- Maíra CanalQuoted 11 lines
-Jeff
Quoted 7 lines
Quoted 7 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=99845faae7099cd704ebf67514c1157c26960a26
Regards
Stanislaw--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Quoted 36 lines · Oded Gabbay
Quoted 35 lines · Daniel Vetter
Quoted 32 lines · Maíra Canal
Quoted 31 lines · Jeffrey Hugo
Quoted 30 lines · Maíra Canal
Hi Stanislaw,
Quoted 5 lines · Stanislaw Gruszka
Hi
I was about to send debugfs support for ivpu and noticed that there are current changes that deprecate
drm_devel->debugfs_initcallback.Quoted 7 lines
Further I looked at this commit [1], that stated we should not use
drm_minorfor debugfs and sysfs. What is quite contrary to what drm accel framework did in the first place.So my question is how we should use debugfs/sysfs in accel? Use it with old fashioned minor-centric way or change the framework somehow ?
As we are trying to replace
drm_debugfs_create_files()[1], it would be nice to see the accel debugfs support use the new debugfs API. This would mean using thedebugfs_listfrom thedrm_device, deprecating thedebugfs_initcallback, and adding the a similar code snippet toaccel_debugfs_init:list_for_each_entry_safe(entry, tmp, &dev->debugfs_list, list) { debugfs_create_file(entry->file.name, 0444, minor->debugfs_root, entry, &drm_debugfs_entry_fops); list_del(&entry->list);Maybe Daniel has some more thoughts on this matter, but I guess it would be better to drop the use of the old-fashioned minor-centric implementation in accel.
Quoted 7 lines
Quoted 4 lines
It was a simple case of two things landing in parallel and not being synchronized. Would be good if accel could be adapted to use the new debugfs infra, now that both accel and the new debugfs stuff have landed. -Daniel
Yes, definitely.
Does anyone volunteer to send a patch to align ? If not, we will do it internally and send a patch.
Christian sent today a patchset addressing some problems in the debugfs API [1]. As he is planning to remove the debugfs_list, I guess it would be better to wait a while to align accel with the debugfs API, considering that it currently changing.
Also, it would be nice to get feedback from the accel side.
[1] https://lore.kernel.org/dri-devel/[email protected]/T/
Best Regards,
- Maíra Canal
Quoted 37 lines
Oded
Quoted 35 lines
Quoted 13 lines
Quoted 8 lines
Quoted 6 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/tree/Documentation/gpu/todo.rst#n511
Best Regards,
- Maíra CanalThank you for the details Maira. It helps to explain what the todo is suggesting. Is there an example of a driver/drm_device that uses
debugfs_listwhich you can easily point to?The implementation of this device-centered infrastructure is linked in [1] and an example of the conversion of debugfs APIs is linked in [2], and other drivers such as v3d, vkms, vc4 and gud use this new API as well.
Quoted 17 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=1c9cacbea880513a896aee65a5c58007bcb55653
[2] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=2e3ab8a6994f265bbd4dbd00448b84548f18464cBest Regards,
- Maíra CanalQuoted 11 lines
-Jeff
Quoted 7 lines
Quoted 7 lines
[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?id=99845faae7099cd704ebf67514c1157c26960a26
Regards
Stanislaw--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Quoted 8 lines · Maíra Canal
Christian sent today a patchset addressing some problems in the debugfs API [1]. As he is planning to remove the
debugfs_list, I guess it would be better to wait a while to align accel with the debugfs API, considering that it currently changing.Also, it would be nice to get feedback from the accel side.
I'll cc accel people and continue the discussion there.
Regards
Stanislaw