Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1891733rdh; Tue, 26 Sep 2023 06:43:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFFuUVAgFEww6+WIhfvg5ns3BS9YfLwrAvYW6nU2XXd+GVnqunqBKtxcsk9hAtlPz5g4Kkg X-Received: by 2002:a05:6a21:6d86:b0:154:fb34:5f09 with SMTP id wl6-20020a056a216d8600b00154fb345f09mr11832035pzb.15.1695735808814; Tue, 26 Sep 2023 06:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695735808; cv=none; d=google.com; s=arc-20160816; b=T1J/JNL5dipVwqey3w/wAlb5FQmVjFJBu/pKYPirYUZRfU3bvKEAjjymmr7Scwusmb KsAD0qzj25aa9QZYBLV0lA5vXcpV0WxK2B1Ze0Trebdz7AtIZS4fezdXfl+r2d/7q3hH 6dsE8qTPAfHGI+89jmKcVSs1wflS/SZmuDSDfGAV3y/WeueFo5uKiEVrfytaawFrxf3L rAHhaHJkrM48M330vrf4SOBmQTnbgf0eYzifM/exs5EcA0Mdh1SS6CpX99sKTztiD4dB 423Hm+eX/1ZRsetn7XxFSdJbor7nuhETdCGzLJbAvGN7L6PnjEYnx2JxK7uWLPWAr76S koYA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=THVVpVIFizAWtGHbSDYoqRIO7C3GhcIZSQ6cpza7nA4=; fh=FO4s9sn4NKBgioBuAzrElziRM7Jle8gjnEduNVW4O9s=; b=uYjtF1BDN82PFonJiet0a5CbR/4FNRql5mpnazKdvjQjrkpiad7XTcH4+BV2HfzMYy +nPdMD2RHRDMMEZa4w7ruNKpT2xx91dPi2I43hX8juMs7tFxDHmCQxMp69vt/9nPvin0 Y2en0XQfDFZNlm8mI/DI4VgJqR5ho85JbBp3ZaxDMF4P0Euzozh992LKMI9t2b8o6C6s Oc8vOqbAjzJ5HBpbrzJhL7YI2wRr/d/r0sQ2sIY8SdtbThDAPcYYnyqVlIXQgGfCeNxl F2joepAW8oqdIL9PJSUtJfzqKkoebIbDXcdqHna5bz9ZDLyoNIkBOszQU5j43VIoGW4z UFGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mess.org header.s=2020 header.b=JJmlZqE1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mess.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f8-20020a056a001ac800b0068fcc84dda7si13022212pfv.327.2023.09.26.06.43.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 06:43:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@mess.org header.s=2020 header.b=JJmlZqE1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mess.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 087DD80254C9; Tue, 26 Sep 2023 00:16:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232313AbjIZHQp (ORCPT + 99 others); Tue, 26 Sep 2023 03:16:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbjIZHQn (ORCPT ); Tue, 26 Sep 2023 03:16:43 -0400 Received: from gofer.mess.org (gofer.mess.org [IPv6:2a02:8011:d000:212::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8346EB; Tue, 26 Sep 2023 00:16:35 -0700 (PDT) Received: by gofer.mess.org (Postfix, from userid 1000) id 199A01000B2; Tue, 26 Sep 2023 08:16:33 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mess.org; s=2020; t=1695712593; bh=q3yvy6U1pA8dk2yNpmmm8FMMggMlyRZgCfRP5FNv19Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JJmlZqE1mqfatxA0PE4r+/oQknTKqr1XLSSa10ptK0XHsrdV0UNQYmpZkI7zW9xk1 N+uxyzsCksaEg+QmhFzV6t2U34i2uqaWG4ddy/3dMkVzLcdjfj8M30p5akR88s4IJc yYgvwDnBzd3fr0pY9c3GUpTGEZ/4j0q8zpkCDihmMcu/yF+fm6NmazdnePcEHJ9ara 6cdzW91KVfnb8tb+D53nSU55qIlPc6i0i+Y7slYYak7h8w6zP7DaErg4Y8y1qnYqvu WUZUhN5cyD4kJEaHcFrVVi7lghq74mvMGJkhnZCNzk+s7lao9hRj2FLykvjj4Gad00 RbSynYpBokk4Q== Date: Tue, 26 Sep 2023 08:16:33 +0100 From: Sean Young To: Ivaylo Dimitrov Cc: linux-media@vger.kernel.org, Tony Lindgren , Russell King , Mauro Carvalho Chehab , Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Timo Kokkonen , Pali =?iso-8859-1?Q?Roh=E1r?= , "Sicelo A . Mhlongo" , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org Subject: Re: [PATCH v5 2/2] media: rc: remove ir-rx51 in favour of generic pwm-ir-tx Message-ID: References: <99f0042f-538c-bcaf-96fd-bac24a87f88e@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <99f0042f-538c-bcaf-96fd-bac24a87f88e@gmail.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 00:16:54 -0700 (PDT) On Mon, Sep 25, 2023 at 07:06:44PM +0300, Ivaylo Dimitrov wrote: > On 1.09.23 г. 17:18 ч., Sean Young wrote: > > The ir-rx51 is a pwm-based TX driver specific to the N900. This can be > > handled entirely by the generic pwm-ir-tx driver, and in fact the > > pwm-ir-tx driver has been compatible with ir-rx51 from the start. > > > > Unfortunately, pwm-ir-tx does not work on n900. My investigation shows that > for some reason usleep_range() sleeps for at least 300-400 us more than what > interval it is requested to sleep. I played with cyclictest from rt-tests > package and it gives similar results - increasing the priority helps, but I > was not able to make it sleep for less that 300 us in average. I tried > cpu_latency_qos_add_request() in pwm-ir-tx, but it made no difference. > > I get similar results on motorola droid4 (OMAP4), albeit there average sleep > is in 200-300 us range, which makes me believe that either OMAPs have issues > with hrtimers or the config we use has some issue which leads to scheduler > latency. Or, something else... The pwm-ir-tx driver does suffer from this problem, but I was under the impression that the ir-rx51 has the same problem. > In either case help is appreciated to dig further trying to find the reason > for such a big delay. pwm-ir-tx uses usleep_range() and ir-rx51 uses hrtimers. I thought that usleep_range() uses hrtimers; however if you're not seeing the same delay on ir-rx51 then maybe it's time to switch pwm-ir-tx to hrtimers. I don't have a n900 to test on, unfortunately. Thanks Sean