Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1095137pxm; Sat, 26 Feb 2022 05:53:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5pKRUToh12wb2g8zSP7v6NLTA5xO2i2S9aqD/mZkDpQqZVjeXw2jinS/A+RRuFduZqMBR X-Received: by 2002:a17:90b:2098:b0:1bd:14e8:7010 with SMTP id hb24-20020a17090b209800b001bd14e87010mr2869277pjb.68.1645883633135; Sat, 26 Feb 2022 05:53:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645883633; cv=none; d=google.com; s=arc-20160816; b=vJB87n9U6xSO+xej2ORIGOOivoow9uHF5mhSlAg3YoyfEnJtAzyjb2tLMu2Bkwqnm6 khgl6B9GLpQKyTv/5EgJ3jvPLcfJEGpG3ObBBVPQxGp7fbsDFi5CaFGvuTZqjltyiajj iPyiyAMp6nH0MWYc4d0LzCRchsPpOeIk7+noSK1KdmjiW1/tdIuaoqXtIM63LvTjpbLg jHQoNml4R1Ude3NMShPV4yHijnvlA8cCA8DDfx/3DnP6SRZ5DqBBHX3fDVpRVlUXRhmC XPm5VqYlbhOxs7UF50F111XO1YD29LSUdky3d5gvrM3qyyvYHAxP8B9/5X9OOoRl34FY Uplw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=1P2Ald/OcCTFw9/tPkaIRqeNCWPrecaJnymxn1sUGis=; b=G5umBNpFrS9yLEjPyqIKAWhECKhx/iPjRwNmo3o4taiy4esBLQpxQFOIq1BnIEemX5 TbhSk9nQ3g6LjqUVapR92S8c8IuQW1ow99crHLqg+XAELGEG/WJcv5YWtzCLj8yVwTYN zIKfPDiWOcusZ/AYrbFHwFyLnFqb0z+3d5LIvSh2YhmHJ29Ke8xCxCKqlFO8VOo5bBp5 rFaVvvhHmQbg8QnUz0yqEzOkkj8mK7ORglDfusyIzwUIMvYgyQfYpHZ2CZeqalJGZCE6 1c4VbIjmb+nPB98+msDiR7R92rIalBXNw4qiq9hKujJRS7i0g7vPeuZENkuIUNYJf3U3 1/Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=irYNrzjW; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f29-20020a63755d000000b003747462956esi4552871pgn.718.2022.02.26.05.53.37; Sat, 26 Feb 2022 05:53:53 -0800 (PST) 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=@quicinc.com header.s=qcdkim header.b=irYNrzjW; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231719AbiBZMuk (ORCPT + 99 others); Sat, 26 Feb 2022 07:50:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231605AbiBZMuj (ORCPT ); Sat, 26 Feb 2022 07:50:39 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EA481F3B49; Sat, 26 Feb 2022 04:50:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645879805; x=1677415805; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=1P2Ald/OcCTFw9/tPkaIRqeNCWPrecaJnymxn1sUGis=; b=irYNrzjWmW+JtcYwhpy13QHzldJKtO2PgRS3Xe7COwK6UPUM6gSXh6RJ FINnOuKU/HIUa8/L8CJkzpSzuef9ZQKLqtU04DSYYAvJ37JDBwYBUskbm ynjACBSps5o1+2iSHNV4yoEhH6+FrH+kUiXb6oD01xhLw98hPFt+okMXO c=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 26 Feb 2022 04:50:05 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2022 04:50:04 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Sat, 26 Feb 2022 04:50:04 -0800 Received: from [10.216.36.82] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Sat, 26 Feb 2022 04:49:56 -0800 Message-ID: <90408caa-6b3b-bd09-10ca-bc6c4431111f@quicinc.com> Date: Sat, 26 Feb 2022 18:19:53 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2] soundwire: qcom: remove redundant wait for completion Content-Language: en-US To: Srinivas Kandagatla , Pierre-Louis Bossart , , , , , , , , , , , , , , , , , , CC: Venkata Prasad Potturu References: <1645800257-27025-1-git-send-email-quic_srivasam@quicinc.com> <06650d56-eed3-73ad-d6b4-6b56a5a70669@linux.intel.com> <4811be6f-7e86-2a62-94cf-98504d5e64e7@linaro.org> From: Srinivasa Rao Mandadapu Organization: Qualcomm In-Reply-To: <4811be6f-7e86-2a62-94cf-98504d5e64e7@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 On 2/25/2022 11:33 PM, Srinivas Kandagatla wrote: Thanks for Your time Srini!!! > > On 25/02/2022 15:43, Pierre-Louis Bossart wrote: >> >> >> On 2/25/22 08:45, Srinivas Kandagatla wrote: >>> >>> >>> On 25/02/2022 14:44, Srinivasa Rao Mandadapu wrote: >>>> Remove wait_for_completion_timeout from soundwire probe as it seems >>>> unnecessary and device enumeration is anyway not happening here, >>>> hence this api is blocking till it completes max wait time. >>>> Also, as device enumeration event is dependent on wcd938x probe to be >>>> completed, its of no use waiting here. >>>> Waiting here increasing the boot time almost 4 seconds and impacting >>>> other modules like touch screen. >>>> >>>> Fixes: 06dd96738d618 ("soundwire: qcom: wait for enumeration to be >>>> complete in probe") >>>> >>>> Signed-off-by: Srinivasa Rao Mandadapu >>>> Co-developed-by: Venkata Prasad Potturu >>>> Signed-off-by: Venkata Prasad Potturu >>> >>> LGTM, >>> >>> Reviewed-by: Srinivas Kandagatla >> >> I don't get the idea, sorry. >> >> If you look at the code, these are the cases where this 'struct >> completion' is used >> >>     struct completion enumeration; >>     complete(&ctrl->enumeration); >>     /* Enable Auto enumeration */ >>     init_completion(&ctrl->enumeration); >>     wait_for_completion_timeout(&ctrl->enumeration, >> >> >> so if you remove the wait_for_completeion, then you might just as well >> remove the whole thing and revert 06dd96738d618 >> >> what am I missing? > Yes, that makes more sense to revert it, as it is the only user of > this completion. > We could add it back when we really need this again in pm runtime > setup if required. > > --srini Thanks for confirmation. Sent revert patch. >> >> >>>> --- >>>>    drivers/soundwire/qcom.c | 2 -- >>>>    1 file changed, 2 deletions(-) >>>> >>>> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c >>>> index 5481341..9a32a24 100644 >>>> --- a/drivers/soundwire/qcom.c >>>> +++ b/drivers/soundwire/qcom.c >>>> @@ -1309,8 +1309,6 @@ static int qcom_swrm_probe(struct >>>> platform_device *pdev) >>>>        } >>>>          qcom_swrm_init(ctrl); >>>> -    wait_for_completion_timeout(&ctrl->enumeration, >>>> -                    msecs_to_jiffies(TIMEOUT_MS)); >>>>        ret = qcom_swrm_register_dais(ctrl); >>>>        if (ret) >>>>            goto err_master_add;