Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1021226pxk; Fri, 18 Sep 2020 01:27:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJt8A2cf3ZiUmltclQR6uqTrOdriH7RwrgP0GhIU/FeIy+toEYjZmHfdkIfG27NEcvFzrt X-Received: by 2002:a17:906:4a07:: with SMTP id w7mr34686134eju.366.1600417646565; Fri, 18 Sep 2020 01:27:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600417646; cv=none; d=google.com; s=arc-20160816; b=xigReyuMprjJVBZgJtfIXHHrvY24TTH76DCyrd1R7KzRRLasnR2yw2gaY8EOHf5Me9 xfdn8+fmiWGjcTJnQnpNrvYrwEvd18DgYUFS6DEKyyhXmTteojwJTUmcwvCC8d+x4IEL ajKu41E3+spTflMrlEZDfq4iYSYvJdvwaRuYbgjrww8+jvbGY8I58L+8U0Sz2vrEQ0UW wo6iCKFuQfg8Z++32eh2X7HdGAZmn3qC1mUZGJwx3TPtXh9Qa1cTEUC2izVkm3rxS61W omyQVHUHwtbxgh0afLcIU6Y88RKnYnXhL+vuWp8XXQc82dk5aCx+D4nG9dhPtoeIvnhO S4hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=phZgT9w3n40GqfvUhy1lvEy5KOo4uXBHkeTSMRdwWYU=; b=C0K7bha3daCkE0zSN5HdlbkuB3p1QWhJ2OOxefpPh6pxihs/RQQ8P8cL3vybilnMu5 hiP2cwPN1b+yG/fDnUlAf4gDOJ71OVL8e5LmD0sG48+8bkYuWosJp8Y6QguvAO/RB8xk CXYBZBMIxmw+mD9Q7HX656XWPZZDVxCBkp0c1dbEcgeqZvneBjFk9iCcd5IxQ9RX9bFx YCcoOWIOpY8ii3LiDz/frC9xFoEaqleJ7LPWlDkYqpdxc3xoDbkn+oINjRMjuKbGsaPU p7IIuTtpjsnwAxgtN21x/jUhzqbormmiALJVVJUZqVGgsidHw93BXB8GJmdkGWLHOqtx Tq/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si1665769eja.528.2020.09.18.01.27.03; Fri, 18 Sep 2020 01:27:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726387AbgIRIX6 (ORCPT + 99 others); Fri, 18 Sep 2020 04:23:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbgIRIXz (ORCPT ); Fri, 18 Sep 2020 04:23:55 -0400 Received: from gofer.mess.org (gofer.mess.org [IPv6:2a02:8011:d000:212::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C529C06174A; Fri, 18 Sep 2020 01:23:55 -0700 (PDT) Received: by gofer.mess.org (Postfix, from userid 1000) id 9A728C6366; Fri, 18 Sep 2020 09:23:52 +0100 (BST) Date: Fri, 18 Sep 2020 09:23:52 +0100 From: Sean Young To: Joakim Zhang Cc: "mchehab@kernel.org" , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx Subject: Re: [PATCH] media: rc: gpio-ir-recv: add QoS support for cpuidle system Message-ID: <20200918082352.GA32346@gofer.mess.org> References: <20200915150202.24165-1-qiangqing.zhang@nxp.com> <20200915093342.GA24139@gofer.mess.org> <20200917204336.GA21441@gofer.mess.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joakim, On Fri, Sep 18, 2020 at 01:42:15AM +0000, Joakim Zhang wrote: > > -----Original Message----- > > From: Sean Young > > Sent: 2020年9月18日 4:44 > > To: Joakim Zhang > > Cc: mchehab@kernel.org; linux-media@vger.kernel.org; > > linux-kernel@vger.kernel.org; dl-linux-imx > > Subject: Re: [PATCH] media: rc: gpio-ir-recv: add QoS support for cpuidle > > system -snip- > > > Autosuspend delay should be fixed value, should be set to gpio device timeout > > value, which is 125ms. > > > > So the idea was that cpuidle is only enabled while IR frames are being received, > > that's why I suggested it. > > May be a typo, "cpuidle is only DISABLED while IR frames are being receive,", this is not I want to implement, experiments have also shown poor results. Sorry, yes I got this wrong. You are right. > > If you set the autosuspend delay to 125ms, then the cpuidle will not be enabled > > between IR frames. Maybe this is what you want, but it does mean cpuidle is > > totally suspended while anyone is pressing buttons on a remote. > > Yes, this is what I want, cpuidle is totally disabled while pressing buttons, disable cpuidle at the first frame then keep disabled until there is no activity for a while. > So that we only can not decode the first frame, such as, if transmitting 4 frames once, we can correctly decode 3 times. > > I also try your suggestion, set autosuspend delay time to protocol's timeout value, but the result is terrible. If transmitting 4 frames once, we can't correctly decode 3 times, > even can't decode it sometime. The sequence is, cpu in idle state when the first frame coming, then disable cpu idle until protocols' timeout, cpu in idle state again, the first frame can't be decoded. > The second frame coming, it will repeat the behavior of the first frame, may cause the second frame can't be decode...... > > Can you take account of I have done in the first version, autosuspend delay time is set to 125ms? Yes, in retrospect you are right. Trying to shorten the cpuidle suspended period will not work. I am sorry about this. How about setting the autosuspend period in devicetree, and 0 will turn this feature off completely? Thanks, Sean