Skip to contentSkip to conversation

drm/drm_debugfs_crc.c: Document that .verify_crc_source vfunc is required for enabling CRC support.

PATCH In review Liviu Dudau 2 participants 4 messages Jul 3, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/drm_debugfs_crc.c: Document that .verify_crc_source vfunc is required for enabling CRC support.

drm_debugfs_crtc_crc_add() function checks that both .set_crc_source and .verify_crc_source hooks are provided before enabling debugfs support for reading per-frame CRC data. Make that explicit in the documentation.

---
 drivers/gpu/drm/drm_debugfs_crc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_debugfs_crc.c +3 -3
index 7ca486d750e9..6604ed223160 100644
@@ -66,9 +66,9 @@
  * the reported CRCs of frames that should have the same contents.
  *
  * On the driver side the implementation effort is minimal, drivers only need to
- * implement &drm_crtc_funcs.set_crc_source. The debugfs files are automatically
- * set up if that vfunc is set. CRC samples need to be captured in the driver by
- * calling drm_crtc_add_crc_entry().
+ * implement &drm_crtc_funcs.set_crc_source and &drm_crtc_funcs.verify_crc_source.
+ * The debugfs files are automatically set up if those vfuncs are set. CRC samples
+ * need to be captured in the driver by calling drm_crtc_add_crc_entry().
  */
 
 static int crc_control_show(struct seq_file *m, void *data)
Signature · 6 lines
2.21.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Liviu Dudau

drm_debugfs_crtc_crc_add() function checks that both .set_crc_source and .verify_crc_source hooks are provided before enabling debugfs support for reading per-frame CRC data. Make that explicit in the documentation.

I think we have some refactoring room here if we make verify_crc_source optional (and only allow "auto" for that case). But would only remove like 3-4 implementations, so I guess that's for when the next trivial one shows up.
-Daniel

Quoted 24 lines
---
 drivers/gpu/drm/drm_debugfs_crc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_debugfs_crc.c +3 -3
index 7ca486d750e9..6604ed223160 100644
@@ -66,9 +66,9 @@
  * the reported CRCs of frames that should have the same contents.
  *
  * On the driver side the implementation effort is minimal, drivers only need to
- * implement &drm_crtc_funcs.set_crc_source. The debugfs files are automatically
- * set up if that vfunc is set. CRC samples need to be captured in the driver by
- * calling drm_crtc_add_crc_entry().
+ * implement &drm_crtc_funcs.set_crc_source and &drm_crtc_funcs.verify_crc_source.
+ * The debugfs files are automatically set up if those vfuncs are set. CRC samples
+ * need to be captured in the driver by calling drm_crtc_add_crc_entry().
  */
 
 static int crc_control_show(struct seq_file *m, void *data)
Signature · 1 line
2.21.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
Quoted 8 lines · Daniel Vetter
Quoted 6 lines · Liviu Dudau

drm_debugfs_crtc_crc_add() function checks that both .set_crc_source and .verify_crc_source hooks are provided before enabling debugfs support for reading per-frame CRC data. Make that explicit in the documentation.

Quoted 6 lines

I think we have some refactoring room here if we make verify_crc_source optional (and only allow "auto" for that case). But would only remove like 3-4 implementations, so I guess that's for when the next trivial one shows up.

I'm preparing a patch to add CRC support for Komeda, does this means I need to look at that refactoring?

Best regards,
Liviu

Quoted 31 lines

-Daniel

Quoted 24 lines
---
 drivers/gpu/drm/drm_debugfs_crc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_debugfs_crc.c +3 -3
index 7ca486d750e9..6604ed223160 100644
@@ -66,9 +66,9 @@
  * the reported CRCs of frames that should have the same contents.
  *
  * On the driver side the implementation effort is minimal, drivers only need to
- * implement &drm_crtc_funcs.set_crc_source. The debugfs files are automatically
- * set up if that vfunc is set. CRC samples need to be captured in the driver by
- * calling drm_crtc_add_crc_entry().
+ * implement &drm_crtc_funcs.set_crc_source and &drm_crtc_funcs.verify_crc_source.
+ * The debugfs files are automatically set up if those vfuncs are set. CRC samples
+ * need to be captured in the driver by calling drm_crtc_add_crc_entry().
  */
 
 static int crc_control_show(struct seq_file *m, void *data)
Signature · 1 line
2.21.0
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Signature · 12 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw
Quoted 12 lines · Liviu Dudau
Quoted 10 lines · Daniel Vetter
Quoted 6 lines · Liviu Dudau

drm_debugfs_crtc_crc_add() function checks that both .set_crc_source and .verify_crc_source hooks are provided before enabling debugfs support for reading per-frame CRC data. Make that explicit in the documentation.

Quoted 7 lines
Quoted 4 lines

I think we have some refactoring room here if we make verify_crc_source optional (and only allow "auto" for that case). But would only remove like 3-4 implementations, so I guess that's for when the next trivial one shows up.

I'm preparing a patch to add CRC support for Komeda, does this means I need to look at that refactoring?

If all you do is add support for the "auto" source, then I think that would be nice. Shouldn't be really more work than another copypasta version, and then if you do the 3 or so patches to remove the copies from drivers you also have people you can volunteer to review the entire thing :-)
-Daniel

Quoted 46 lines

Best regards,
Liviu

Quoted 22 lines

-Daniel

Quoted 20 lines
---
 drivers/gpu/drm/drm_debugfs_crc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/drm_debugfs_crc.c +3 -3
index 7ca486d750e9..6604ed223160 100644
@@ -66,9 +66,9 @@
  * the reported CRCs of frames that should have the same contents.
  *
  * On the driver side the implementation effort is minimal, drivers only need to
- * implement &drm_crtc_funcs.set_crc_source. The debugfs files are automatically
- * set up if that vfunc is set. CRC samples need to be captured in the driver by
- * calling drm_crtc_add_crc_entry().
+ * implement &drm_crtc_funcs.set_crc_source and &drm_crtc_funcs.verify_crc_source.
+ * The debugfs files are automatically set up if those vfuncs are set. CRC samples
+ * need to be captured in the driver by calling drm_crtc_add_crc_entry().
  */
 
Quoted 9 lines
Quoted 4 lines
drivers/gpu/drm/drm_debugfs_crc.c +0 -1
 static int crc_control_show(struct seq_file *m, void *data)
--

2.21.0

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

--
====================

| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel