drm/fb-helper: improve kerneldoc
Subsystems (3)
PATCH 1/1 drm/fb-helper: improve kerneldoc
Now that the fbdev helper interface for drivers is trimmed down, update the kerneldoc for all the remaining exported functions.
I've tried to beat the DocBook a bit by reordering the function references a bit into a more sensible ordering. But that didn't work out at all. Hence just extend the in-code DOC: section a bit.
Also remove the LOCKING: sections - especially for the setup functions they're totally bogus. But that's not a documentation problem, but simply an artifact of the current rather hazardous locking around drm init and even more so around fbdev setup ...
v2: Some further improvements:
- Also add documentation for drm_fb_helper_single_add_all_connectors, Dave Airlie didn't want me to kill this one from the fb helper interface.
- Update docs for drm_fb_helper_fill_var/fix - they should be used from the driver's ->fb_probe callback to setup the fbdev info structure.
- Clarify what the ->fb_probe callback should all do - it needs to setup both the fbdev info and allocate the drm framebuffer used as backing storage.
- Add basic documentaation for the drm_fb_helper_funcs driver callback vfunc.
v3: Implement clarifications Lauren Pinchart suggested in his review.
--- Documentation/DocBook/drm.tmpl | 1 + drivers/gpu/drm/drm_fb_helper.c | 148 +++++++++++++++++++++++++++++++++++---- include/drm/drm_fb_helper.h | 12 ++++ 3 files changed, 146 insertions(+), 15 deletions(-)
Documentation/DocBook/drm.tmpl +1 -0
@@ -2139,6 +2139,7 @@ void intel_crt_init(struct drm_device *dev) <title>fbdev Helper Functions Reference</title> !Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers !Edrivers/gpu/drm/drm_fb_helper.c +!Iinclude/drm/drm_fb_helper.h </sect2> <sect2> <title>Display Port Helper Functions Reference</title>
drivers/gpu/drm/drm_fb_helper.c +133 -15
250 lines not on this page · raw message
include/drm/drm_fb_helper.h +12 -0
@@ -48,6 +48,18 @@ struct drm_fb_helper_surface_size {u32 surface_depth; }; +/** +* struct drm_fb_helper_funcs - driver callbacks for the fbdev emulation library +* @gamma_set: - Set the given gamma lut register on the given crtc. +* @gamma_get: - Read the given gamma lut register on the given crtc, used to +* safe the current lut when force-restoring the fbdev for e.g. +* kdbg. +* @fb_probe: - Driver callback to allocate and initialize the fbdev info +* structure. Futhermore it also needs to allocate the drm +* framebuffer used to back the fbdev. +* +* Driver callbacks used by the fbdev emulation helper library. +*/ struct drm_fb_helper_funcs {void (*gamma_set)(struct drm_crtc *crtc,u16 red,u16 green,u16 blue,int regno);
Signature · 1 line
1.7.10.4
Hi Daniel,
Thanks for the patch. Just one last small comment.
Quoted 34 lines · On Tuesday 05 February 2013 22:43:48 Daniel Vetter wrote:
Now that the fbdev helper interface for drivers is trimmed down, update the kerneldoc for all the remaining exported functions.
I've tried to beat the DocBook a bit by reordering the function references a bit into a more sensible ordering. But that didn't work out at all. Hence just extend the in-code DOC: section a bit.
Also remove the LOCKING: sections - especially for the setup functions they're totally bogus. But that's not a documentation problem, but simply an artifact of the current rather hazardous locking around drm init and even more so around fbdev setup ...
v2: Some further improvements:
- Also add documentation fordrm_fb_helper_single_add_all_connectors, Dave Airlie didn't want me to kill this one from the fb helper interface.
- Update docs for drm_fb_helper_fill_var/fix - they should be used from the driver's ->fb_probe callback to setup the fbdev info structure.
- Clarify what the ->fb_probe callback should all do - it needs to setup both the fbdev info and allocate the drm framebuffer used as backing storage.
- Add basic documentaation for thedrm_fb_helper_funcsdriver callback vfunc.v3: Implement clarifications Lauren Pinchart suggested in his review.
Cc Laurent Pinchart <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- Documentation/DocBook/drm.tmpl | 1 + drivers/gpu/drm/drm_fb_helper.c | 148 ++++++++++++++++++++++++++++++++---- include/drm/drm_fb_helper.h | 12 ++++ 3 files changed, 146 insertions(+), 15 deletions(-)
[snip]
Quoted 10 lines
include/drm/drm_fb_helper.h +2
-0@@ -48,6 +48,18 @@ struct drm_fb_helper_surface_size {u32 surface_depth; }; +/** +* struct drm_fb_helper_funcs - driver callbacks for the fbdev emulation
Quoted 5 lines
library
+ * @gamma_set: - Set the given gamma lut register on the given crtc.
+ * @gamma_get: - Read the given gamma lut register on the given crtc, used
+ * to safe the current lut when force-restoring the fbdev for e.g.
+ * kdbg.
s/safe/save/
With this changed,
Quoted 9 lines
+ * @fb_probe: - Driver callback to allocate and initialize the fbdev info
+ * structure. Futhermore it also needs to allocate the drm
+ * framebuffer used to back the fbdev.
+ *
+ * Driver callbacks used by the fbdev emulation helper library.
+ */
structdrm_fb_helper_funcs{include/drm/drm_fb_helper.h +0
-0void (*gamma_set)(struct drm_crtc *crtc,u16 red,u16 green,u16 blue,int regno);
Signature · 3 lines
Regards, Laurent Pinchart