Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6248251rwd; Mon, 19 Jun 2023 04:47:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ62FP3i2rQuCL614esPIJNc6OmhbxKlgRtGvS4TPg2AaKAqDo3p6zws65G/poFsBOP4ctxK X-Received: by 2002:a17:90a:55c7:b0:25b:b88b:bd41 with SMTP id o7-20020a17090a55c700b0025bb88bbd41mr4711850pjm.43.1687175222153; Mon, 19 Jun 2023 04:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687175222; cv=none; d=google.com; s=arc-20160816; b=CUA/iY6Y1S6qX20bxqtiN0YMh+Y3ODmtSgI9cdtn3RonhaifiQzvjrPa5IUUI6yUH2 tkKeshI93OjVsl/lryi0klR7kBuVaEtmMAAXh/y21/YdxAXD8KNxEbTHnoMsXFtSsi0a RiAnWz5IXQtuoOhNUdCF0HtVpYaduIO59rsnauUKQ6GFrjH0driNHsJ+OY7M/bDb6RfQ CSpK1Pl0erZl1xlEFztt+L59jiuaEit/Tlp/4IcIXLDskAZbM7p+EVbNFkPsf1RxCzUX KfGU/aA5IXwGWytDue5iSW5+/pwVo0sC7o/wqTebIEFVROygrA2+KtquJ1D1rfVkDn3a sZhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Q4Or4P1j8T0NevxsxUtl11eVgTqyt2M4dL8NTcFJ+pA=; b=s/zF4gqQ3wHLPk3cZVs+tkmM6UeOa3+YYluQRbas9qaM7l08M8qMV2ibn+3IRixD4K wTZt38Tuv73+BbLjzhtYvTYPBCfBZ5hWgG6ZZhUOz37fOVIaY1j0s8WeaVlIQMxZhLHZ caWIwqzv8DhBjk00WaVz/zc5ng0OnbbWeEBlqCwHxA024QzTZjz9Yfje9hupQQyYWdnZ L1dTb1XEb/5sK7n5dhJ4tPVCFTlzMcbJfe8EYL/QrdYx0oFLs48/3Kknc9O1/f0S2RQB 35fLDwhFB+wF34BmhM5e+soLypiImo/Su114sbG3Ti2naFE4gA4YfbLPMdRTvHFQrvvK IXmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ZNHpJMwz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k28-20020a637b5c000000b00553c6af75d5si1985387pgn.315.2023.06.19.04.46.47; Mon, 19 Jun 2023 04:47:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ZNHpJMwz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231598AbjFSL1c (ORCPT + 99 others); Mon, 19 Jun 2023 07:27:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbjFSL13 (ORCPT ); Mon, 19 Jun 2023 07:27:29 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CC9F100; Mon, 19 Jun 2023 04:27:28 -0700 (PDT) Received: from desky.lan (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DB887800; Mon, 19 Jun 2023 13:26:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1687174011; bh=Ua5NcitkYLYSqBnLZDqy7P/dMOR9PahCDNt3nwt7wFM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZNHpJMwzDW3Z/m/Niqez8UbbEjXIXS1IOOiQTnROmHWVPt55Owh09Fnz6j/ytirh8 ePGHkqMzS3byVpgXkvJF6NcpS3kxhtDEknarMnldYRYtA6LqlZuLwWOGB3sFlhaJcb WE0zJE+/WWHvQMbci4olFIHpTO3mrfKBxzj16AFM= From: Tomi Valkeinen To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Sakari Ailus , Laurent Pinchart , Jacopo Mondi Cc: Tomi Valkeinen Subject: [PATCH 3/3] media: subdev: Add debug prints to enable/disable_streams Date: Mon, 19 Jun 2023 14:27:07 +0300 Message-Id: <20230619112707.239565-3-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230619112707.239565-1-tomi.valkeinen@ideasonboard.com> References: <20230619112707.239565-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is often useful to see when streaming for a device is being enabled or disabled. Add debug prints for this to v4l2_subdev_enable_streams() and v4l2_subdev_disable_streams(). Signed-off-by: Tomi Valkeinen --- drivers/media/v4l2-core/v4l2-subdev.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 73f716a42569..0f86a165b202 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -1977,11 +1977,16 @@ int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, u32 pad, goto done; } + dev_dbg(dev, "enable streams %u:%#llx\n", pad, streams_mask); + /* Call the .enable_streams() operation. */ ret = v4l2_subdev_call(sd, pad, enable_streams, state, pad, streams_mask); - if (ret) + if (ret) { + dev_dbg(dev, "enable streams %u:%#llx failed: %d\n", pad, + streams_mask, ret); goto done; + } /* Mark the streams as enabled. */ for (i = 0; i < state->stream_configs.num_configs; ++i) { @@ -2089,11 +2094,16 @@ int v4l2_subdev_disable_streams(struct v4l2_subdev *sd, u32 pad, goto done; } + dev_dbg(dev, "disable streams %u:%#llx\n", pad, streams_mask); + /* Call the .disable_streams() operation. */ ret = v4l2_subdev_call(sd, pad, disable_streams, state, pad, streams_mask); - if (ret) + if (ret) { + dev_dbg(dev, "disable streams %u:%#llx failed: %d\n", pad, + streams_mask, ret); goto done; + } /* Mark the streams as disabled. */ for (i = 0; i < state->stream_configs.num_configs; ++i) { -- 2.34.1