Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4123359rwi; Sat, 22 Oct 2022 05:34:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5EiQa3M8hhj68QXYUgFbwQ27XMkGc8ugqa6zXPgqFQMAbGB/n5N8IzmQocftVHMf5ljbRZ X-Received: by 2002:a05:6402:2744:b0:45c:9978:eae8 with SMTP id z4-20020a056402274400b0045c9978eae8mr22230507edd.361.1666442050406; Sat, 22 Oct 2022 05:34:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666442050; cv=none; d=google.com; s=arc-20160816; b=xj4zLZxdh2gxeC+jkRJ2VKCeOFTdqPiwQxgdZyznaMyPYh7mVudxtG3EGOUlLiSNxI X5235MS5is+OdL0PLrGNUCNlvyNFbPP6E1NPgDldCLualLgTRlFiiYJIFZbDP32GwDg6 tFBhkxAXJzFkH4PtsVS+JUnSFmZGvxVtz4cPZvyOo7QFVWj8UYJAhT2MgAKZ3aOQe8i5 A5TaysFQ2BLefN+xWU5vPUNaulqcTaQoxC8howKulno1JnJRWRI01UGHjGR2SFIrZkTA 7CUqCE+evh/9U01ov2+ly4nj5zIQ+FL+s/8S9P3oBhHhplARgN22+BR0lSJlinPyj7i9 ArPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/0+hNQ3jT2VJP+EFLvyDSUIX64DRA/+JujAN1TNsTIE=; b=jzgblR2xSjqSD4R0K9ZVP7SRl/7LHBVCuF3DDScuQwMMLnNe1Ass1z1dJQAbFVQExY oBxFIVrLAy9pyVGQiWoWTQln5iAzOpBrSENtZ8LEB4sQHV4fXao5qVMBeHam4S+dFuKG 057KwQmYzY2/6d/oq0RaUz0u8ESlsSbb8qMjudwR5yumMhJLFMJGvpCUnwS0hoyTVaMm Wl7e90TLdYvNeL3csTmG8tQJia5b/F8XqnxfwT/qbKogSIkX4nB4ijjDfljwP4ZgIS3U KimH8UIMQkY75Bj2P6c8BGD/AlfP8TlBi772t/BMd0oS6108Sr1LIR7gDeqeUQDNi3mW rAIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UAvLXSGi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x23-20020a170906135700b007470b52f94esi18954694ejb.199.2022.10.22.05.33.45; Sat, 22 Oct 2022 05:34:10 -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 header.i=@linuxfoundation.org header.s=korg header.b=UAvLXSGi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230272AbiJVLkl (ORCPT + 99 others); Sat, 22 Oct 2022 07:40:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbiJVLkE (ORCPT ); Sat, 22 Oct 2022 07:40:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54890422E3; Sat, 22 Oct 2022 04:33:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5627960CBB; Sat, 22 Oct 2022 11:32:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3059EC433D6; Sat, 22 Oct 2022 11:32:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666438378; bh=1sICJHC0lJ2TpJ7b/Au1nHb08DMV/sOXgrux/tW2J0U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UAvLXSGicJuQmibs/esBBZm5JSMxS9M1pjrOYL2WVieIKFenPaDoS99V5TCODB3a4 wOpe/eVdF5nkwYdJKt1Nm2ZUtVT4352h5ngBgTE6uw/YIVxJoJYcX/fvlrXctXpk6p 0VV8P3RyOfGPO53IKIHb/A8yuverttAcKr8B+b50= Date: Sat, 22 Oct 2022 13:32:56 +0200 From: Greg Kroah-Hartman To: Dan Vacura Cc: linux-usb@vger.kernel.org, Daniel Scally , Thinh Nguyen , Jeff Vanhoof , Jonathan Corbet , Laurent Pinchart , Felipe Balbi , Paul Elder , Michael Grzeschik , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v4 5/6] usb: gadget: uvc: make interrupt skip logic configurable Message-ID: References: <20221018215044.765044-1-w36195@motorola.com> <20221018215044.765044-6-w36195@motorola.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221018215044.765044-6-w36195@motorola.com> X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Tue, Oct 18, 2022 at 04:50:41PM -0500, Dan Vacura wrote: > Some UDC hw may not support skipping interrupts, but still support the > request. Allow the interrupt frequency to be configurable to the user. > > Signed-off-by: Dan Vacura > --- > V1 -> V2: > - no change, new patch in series > V2 -> V3: > - default to baseline value of 4, fix storing the initial value > V3 -> V4: > - no change > > Documentation/ABI/testing/configfs-usb-gadget-uvc | 1 + > Documentation/usb/gadget-testing.rst | 2 ++ Adding more tunable knobs always just adds complexity and fragility as things do not get tested. Can't we just make this dynamic and work properly on all systems? What UDC hardware types do not allow skipping interrupts? Why can't we just detect that and only do that if this is the case or not? > drivers/usb/gadget/function/f_uvc.c | 3 +++ > drivers/usb/gadget/function/u_uvc.h | 1 + > drivers/usb/gadget/function/uvc.h | 2 ++ > drivers/usb/gadget/function/uvc_configfs.c | 2 ++ > drivers/usb/gadget/function/uvc_queue.c | 6 ++++++ > drivers/usb/gadget/function/uvc_video.c | 3 ++- > 8 files changed, 19 insertions(+), 1 deletion(-) > > diff --git a/Documentation/ABI/testing/configfs-usb-gadget-uvc b/Documentation/ABI/testing/configfs-usb-gadget-uvc > index 611b23e6488d..5dfaa3f7f6a4 100644 > --- a/Documentation/ABI/testing/configfs-usb-gadget-uvc > +++ b/Documentation/ABI/testing/configfs-usb-gadget-uvc > @@ -8,6 +8,7 @@ Description: UVC function directory > streaming_maxpacket 1..1023 (fs), 1..3072 (hs/ss) > streaming_interval 1..16 > function_name string [32] > + req_int_skip_div unsigned int > =================== ============================= > > What: /config/usb-gadget/gadget/functions/uvc.name/control > diff --git a/Documentation/usb/gadget-testing.rst b/Documentation/usb/gadget-testing.rst > index 2278c9ffb74a..f9b5a09be1f4 100644 > --- a/Documentation/usb/gadget-testing.rst > +++ b/Documentation/usb/gadget-testing.rst > @@ -794,6 +794,8 @@ The uvc function provides these attributes in its function directory: > sending or receiving when this configuration is > selected > function_name name of the interface > + req_int_skip_div divisor of total requests to aid in calculating > + interrupt frequency, 0 indicates all interrupt This provides no information that would help to determine how to configure this at all. I wouldn't know what to do with this, so that's a huge sign that this is not a good interface :( thanks, greg k-h