Re: [PATCH 01/20] drm/doc: Fix more kerneldoc/sphinx warnings

2016-08-11 Thread Ville Syrjälä
_FORMAT_*) > > + * @formats: array of supported formats (DRM_FORMAT\_\*) > > Future idea: If we turned DRM_FORMAT_* into an enum instead of a > plethora of macros, we could reference the enum here. Not to mention the > code being self-documenting too. DRM_FORMAT_* is uapi,

Re: [PATCH v3 2/3] drm: Add API for capturing frame CRCs

2016-08-05 Thread Ville Syrjälä
On Fri, Aug 05, 2016 at 12:46:29PM +0200, Tomeu Vizoso wrote: > On 3 August 2016 at 09:06, Ville Syrjälä <ville.syrj...@linux.intel.com> > wrote: > > On Fri, Jul 22, 2016 at 04:10:44PM +0200, Tomeu Vizoso wrote: > >> Adds files and directories to debugfs for co

Re: [PATCH v3 2/3] drm: Add API for capturing frame CRCs

2016-08-03 Thread Ville Syrjälä
ted documentation files (the "Software"), > + * to deal in the Software without restriction, including without limitation > + * the rights to use, copy, modify, merge, publish, distribute, sublicense, > + * and/or sell copies of the Software, and to permit persons to whom the >

Re: [PATCH v2 2/3] drm: Add API for capturing frame CRCs

2016-07-07 Thread Ville Syrjälä
ftware, and to permit persons to whom the > + * Software is furnished to do so, subject to the following conditions: > + * > + * The above copyright notice and this permission notice shall be included in > + * all copies or substantial portions of the Software. > + * > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL > + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR > + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, > + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > + * OTHER DEALINGS IN THE SOFTWARE. > + */ > +#ifndef __DRM_DEBUGFS_CRC_H__ > +#define __DRM_DEBUGFS_CRC_H__ > + > +/** > + * struct drm_crtc_crc_entry - entry describing a frame's content > + * @frame: number of the frame this CRC is about > + * @crc: array of values that characterize the frame > + */ > +struct drm_crtc_crc_entry { > + uint32_t frame; > + uint32_t crc[5]; > +}; > + > +#define DRM_CRTC_CRC_ENTRIES_NR 128 > +/** > + * struct drm_crtc_crc - data supporting CRC capture on a given CRTC > + * @lock: protects the fields in this struct > + * @source: name of the currently configured source of CRCs > + * @opened: whether userspace has opened the data file for reading > + * @entries: array of entries, with size of %DRM_CRTC_CRC_ENTRIES_NR > + * @head: head of circular queue > + * @tail: tail of circular queue > + * @wq: workqueue used to synchronize reading and writing > + */ > +struct drm_crtc_crc { > + spinlock_t lock; > + const char *source; > + bool opened; > + struct drm_crtc_crc_entry *entries; > + int head, tail; > + wait_queue_head_t wq; > +}; > + > +#if defined(CONFIG_DEBUG_FS) > +int drm_debugfs_crtc_crc_add(struct drm_crtc *crtc); > +void drm_crtc_add_crc_entry(struct drm_crtc *crtc, uint32_t frame, > + uint32_t crc0, uint32_t crc1, uint32_t crc2, > + uint32_t crc3, uint32_t crc4); > +#else > +static inline int drm_debugfs_crtc_crc_add(struct drm_crtc *crtc) > +{ > + return 0; > +} > +static inline void drm_crtc_add_crc_entry(struct drm_crtc *crtc, uint32_t > frame, > + uint32_t crc0, uint32_t crc1, > + uint32_t crc2, uint32_t crc3, > + uint32_t crc4) {} > +#endif /* defined(CONFIG_DEBUG_FS) */ > + > +#endif /* __DRM_DEBUGFS_CRC_H__ */ > -- > 2.5.5 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Ville Syrjälä Intel OTC -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html