From patchwork Mon Dec 3 13:51:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10709605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 73B2813AF for ; Mon, 3 Dec 2018 13:51:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 632072B015 for ; Mon, 3 Dec 2018 13:51:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 579D22B021; Mon, 3 Dec 2018 13:51:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07EF72B015 for ; Mon, 3 Dec 2018 13:51:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725983AbeLCNw5 (ORCPT ); Mon, 3 Dec 2018 08:52:57 -0500 Received: from lb3-smtp-cloud7.xs4all.net ([194.109.24.31]:38682 "EHLO lb3-smtp-cloud7.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbeLCNw4 (ORCPT ); Mon, 3 Dec 2018 08:52:56 -0500 Received: from tschai.fritz.box ([212.251.195.8]) by smtp-cloud7.xs4all.net with ESMTPA id TodTgVSsf3Hr7TodYgJCtT; Mon, 03 Dec 2018 14:51:49 +0100 From: hverkuil-cisco@xs4all.nl To: linux-media@vger.kernel.org Cc: Alexandre Courbot , maxime.ripard@bootlin.com, paul.kocialkowski@bootlin.com, tfiga@chromium.org, nicolas@ndufresne.ca, sakari.ailus@linux.intel.com, Hans Verkuil Subject: [PATCHv3 3/9] v4l2-ioctl.c: log v4l2_buffer tag Date: Mon, 3 Dec 2018 14:51:37 +0100 Message-Id: <20181203135143.45487-4-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181203135143.45487-1-hverkuil-cisco@xs4all.nl> References: <20181203135143.45487-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfMXm6jLv2Eo43/UtInbvT2v0hLznuwIKS2qV71CzSNfqvPfQ8/pcy2z0zacxjmPV1MaJk4yhMY83qyncG48w0Zk5PxhnGJsHRpmB+0EI46KJh7biKxAI jUmEieVAddT5N5r/6UZf5ZR8ryk/qxeebYc5qhR/wkhnllV1kbBEa66n5MHMRI8vTdMYUgVNRvbV2PmuwDyY/ra+o61IueVSAbMlTsWsvRXXIw6rHxyHFC/g wGtN1FKj9ZO4PwPE4ZGCSu9Nir4uAejRiTNv+iNSH5fEMW80gsoEebPcv54KkXhagk3+c40Xraud2ltnCfPeEJtagsDYuXy27DnOkGl+Erxng+Ydj4e803sH agZNIUbZgPIOksS5hyvr6/WSyBBxJDEnwOXVQaTGKvF7G0usvvr3zokszpcjSWU3SnmQmwYuvS5Eebc1UnX28kT6BKqu2w== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hans Verkuil When debugging is on, log the new tag field of struct v4l2_buffer as well. Signed-off-by: Hans Verkuil Reviewed-by: Paul Kocialkowski Reviewed-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ioctl.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index e384142d2826..653497f31104 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -498,9 +498,12 @@ static void v4l_print_buffer(const void *arg, bool write_only) p->bytesused, p->m.userptr, p->length); } - printk(KERN_DEBUG "timecode=%02d:%02d:%02d type=%d, flags=0x%08x, frames=%d, userbits=0x%08x\n", - tc->hours, tc->minutes, tc->seconds, - tc->type, tc->flags, tc->frames, *(__u32 *)tc->userbits); + if (p->flags & V4L2_BUF_FLAG_TAG) + printk(KERN_DEBUG "tag=%x\n", p->tag); + else if (p->flags & V4L2_BUF_FLAG_TIMECODE) + printk(KERN_DEBUG "timecode=%02d:%02d:%02d type=%d, flags=0x%08x, frames=%d, userbits=0x%08x\n", + tc->hours, tc->minutes, tc->seconds, + tc->type, tc->flags, tc->frames, *(__u32 *)tc->userbits); } static void v4l_print_exportbuffer(const void *arg, bool write_only)