Re: [PATCH v11 2/4] drm: Add API for capturing frame CRCs
From: Emil Velikov
Date: Mon Oct 10 2016 - 09:29:28 EST
On 6 October 2016 at 16:21, Tomeu Vizoso <tomeu.vizoso@xxxxxxxxxxxxx> wrote:
> Adds files and directories to debugfs for controlling and reading frame
> CRCs, per CRTC:
> Drivers can implement the set_crc_source callback() in drm_crtc_funcs to
> start and stop generating frame CRCs and can add entries to the output
> by calling drm_crtc_add_crc_entry.
> - Lots of good fixes suggested by Thierry.
> - Added documentation.
> - Changed the debugfs layout.
> - Moved to allocate the entries circular queue once when frame
> generation gets enabled for the first time.
> - Use the control file just to select the source, and start and stop
> capture when the data file is opened and closed, respectively.
> - Make variable the number of CRC values per entry, per source.
> - Allocate entries queue each time we start capturing as now there
> isn't a fixed number of CRC values per entry.
> - Store the frame counter in the data file as a 8-digit hex number.
> - For sources that cannot provide useful frame numbers, place
> XXXXXXXX in the frame field.
> - Build only if CONFIG_DEBUG_FS is enabled.
> - Use memdup_user_nul.
> - Consolidate calculation of the size of an entry in a helper.
> - Add 0x prefix to hex numbers in the data file.
> - Remove unnecessary snprintf and strlen usage in read callback.
> - Made the crcs array in drm_crtc_crc_entry fixed-size
> - Lots of other smaller improvements suggested by Emil Velikov
> - Move definition of drm_debugfs_crtc_crc_add to drm_internal.h
> - Call debugfs_remove_recursive when we fail to create the minor
> - Register the debugfs directory for a crtc from
> - Don't let debugfs failures interrupt CRTC registration (Emil
> - Remove extra brace that broke compilation. Sorry!
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@xxxxxxxxxxxxx>
Reviewed-by: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>