diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-03-22 09:36:04 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-03-24 09:36:06 +0100 |
commit | 760f71e72eb5c64b12d85d4e6dc79d28a708e09e (patch) | |
tree | 0117c7754e091441c652e133892f2b686a366cbd | |
parent | 4834442d70befd57a5a7420944f42899df2cf807 (diff) | |
download | linux-stable-760f71e72eb5c64b12d85d4e6dc79d28a708e09e.tar.gz linux-stable-760f71e72eb5c64b12d85d4e6dc79d28a708e09e.tar.bz2 linux-stable-760f71e72eb5c64b12d85d4e6dc79d28a708e09e.zip |
drm: document driver interface for CRC capturing
This was missed in Tomeu's patch. Also remove the kerneldoc for the
internal function, we don't document that in general.
While at it word-smith the docs slightly for more clarity.
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170322083617.13361-4-daniel.vetter@ffwll.ch
-rw-r--r-- | Documentation/gpu/drm-uapi.rst | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_debugfs_crc.c | 17 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 5 |
3 files changed, 13 insertions, 12 deletions
diff --git a/Documentation/gpu/drm-uapi.rst b/Documentation/gpu/drm-uapi.rst index 352652810dab..369e8ca12b8e 100644 --- a/Documentation/gpu/drm-uapi.rst +++ b/Documentation/gpu/drm-uapi.rst @@ -207,6 +207,9 @@ Display CRC Support .. kernel-doc:: drivers/gpu/drm/drm_debugfs_crc.c :doc: CRC ABI +.. kernel-doc:: drivers/gpu/drm/drm_debugfs_crc.c + :export: + VBlank event handling ===================== diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c index 96891c4a6e23..1722d8f21449 100644 --- a/drivers/gpu/drm/drm_debugfs_crc.c +++ b/drivers/gpu/drm/drm_debugfs_crc.c @@ -36,7 +36,7 @@ * DOC: CRC ABI * * DRM device drivers can provide to userspace CRC information of each frame as - * it reached a given hardware component (a "source"). + * it reached a given hardware component (a CRC sampling "source"). * * Userspace can control generation of CRCs in a given CRTC by writing to the * file dri/0/crtc-N/crc/control in debugfs, with N being the index of the CRTC. @@ -57,6 +57,11 @@ * rely on being able to generate matching CRC values for the frame contents that * it submits. In this general case, the maximum userspace can do is to compare * 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(). */ static int crc_control_show(struct seq_file *m, void *data) @@ -280,16 +285,6 @@ static const struct file_operations drm_crtc_crc_data_fops = { .release = crtc_crc_release, }; -/** - * drm_debugfs_crtc_crc_add - Add files to debugfs for capture of frame CRCs - * @crtc: CRTC to whom the frames will belong - * - * Adds files to debugfs directory that allows userspace to control the - * generation of frame CRCs and to read them. - * - * Returns: - * Zero on success, error code on failure. - */ int drm_debugfs_crtc_crc_add(struct drm_crtc *crtc) { struct dentry *crc_ent, *ent; diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 6ef59da3fd8e..24dcb121bad4 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -590,9 +590,12 @@ struct drm_crtc_funcs { * When CRC generation is enabled, the driver should call * drm_crtc_add_crc_entry() at each frame, providing any information * that characterizes the frame contents in the crcN arguments, as - * provided from the configured source. Drivers must accept a "auto" + * provided from the configured source. Drivers must accept an "auto" * source name that will select a default source for this CRTC. * + * Note that "auto" can depend upon the current modeset configuration, + * e.g. it could pick an encoder or output specific CRC sampling point. + * * This callback is optional if the driver does not support any CRC * generation functionality. * |