Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1071229rdd; Wed, 10 Jan 2024 07:52:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnWLNrH8w1WsyltAc6ALWzaJuV3fqmLjDM9tEMuPTy+ZnRzpx16MEgOBmGMjp2LOyuenK2 X-Received: by 2002:a50:d556:0:b0:553:2b99:ce48 with SMTP id f22-20020a50d556000000b005532b99ce48mr543935edj.44.1704901975158; Wed, 10 Jan 2024 07:52:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704901975; cv=none; d=google.com; s=arc-20160816; b=F9DY/OoU33kl+JjU4G5Ulb3+twRtG2c111556x4+LDLdTViheBa+TXEPkrQz6tRlVg MHVn1rZKymlI/wbYcBoEL+TakCJLpHmRC5AXUezpQAL1qKHE5j6ks4q2qCBPNGzQvh47 Rw9NK4c2z0ecBTbFNerzvW+vxZh5ztZohKZXvOcLhEcGrSddBlgiDMVTREDdGGQv4Dqf DpZwxe4dABwzRz3lxl3M6wCq2Dicu/zhYC7RTTx+Jh+kXMNtEQY28rEjXpZbdA9jN6qI aqM8F0tphzmH/SFmNkJYslZ1rrGR3Lw8TIE+gQj7Be2+IajdXNR6SMgLXiZ/6ViJ4ts0 b/DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=rVf/KyCe3y2w+HtApnhWHSc0RRmauZP3HVSAozjLxco=; fh=yZ07vgC2MAvnUvd7pIC99UCIuMIKvSg7Wgnq28hk2E0=; b=mycRi3vohmBUSrrcEyRd4VMWJa3ZMmHas9XZjvMf+5zlfwcVa/XotWq2LPXKN8/0V6 +B28MH40XMWbconjnpopRkTdeadSxp5RC5qjZvP6lDqNJ3D4um9GQmaeBJ4XamConQ9O RMJJEl6A9hpFSJuhnizSd6Ng9ebrApV0dfbpzblxqPBa3/X8Pp9Ejp+zPhwFPYItBFBp j8TWqus5ulPkXDBhROJ7qvGakb1L7MdFhNXRPfTnbHkhEzuoUoJeJLbkpaUcEBzSwvwU lBHxPs8If5DQeZ1jrJ39n7FEiSXPWDpNlp5aKykrWrbW0JC/qX3d3iVcuTu0Pss7rOSn cIPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=EvKF0Duy; spf=pass (google.com: domain of linux-kernel+bounces-22458-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22458-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m4-20020a509304000000b00558727e041dsi320075eda.137.2024.01.10.07.52.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 07:52:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22458-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=EvKF0Duy; spf=pass (google.com: domain of linux-kernel+bounces-22458-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22458-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D02441F2945D for ; Wed, 10 Jan 2024 15:52:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FEEA4CE04; Wed, 10 Jan 2024 15:52:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="EvKF0Duy" Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D261B4CB5D for ; Wed, 10 Jan 2024 15:52:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: 2c6d6cfcafd011ee9e680517dc993faa-20240110 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=rVf/KyCe3y2w+HtApnhWHSc0RRmauZP3HVSAozjLxco=; b=EvKF0DuyyzRJVmWZEZnSiF+3zaRXOXa6F3a6ahy6mU31Zinq3KdwU+llkyEHbqUFColuS3uzGVR66TMgwh/t1HVMg3X0MLRpUFGNj4MuGra9PSL2ykpY24xL69C+aF/5Q4QnaZgnj1Ak5R/2w+PNcVxcbA3TLqV0UgjyWy+hb/g=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:b141a33c-e76f-4747-9cc6-b5dbbab174ef,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:5d391d7,CLOUDID:f13d347f-4f93-4875-95e7-8c66ea833d57,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 2c6d6cfcafd011ee9e680517dc993faa-20240110 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1242431257; Wed, 10 Jan 2024 23:51:52 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 10 Jan 2024 23:51:51 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 10 Jan 2024 23:51:51 +0800 From: Jason-JH.Lin To: Jassi Brar , Matthias Brugger , AngeloGioacchino Del Regno , Chun-Kuang Hu CC: , , , Jason-ch Chen , Johnson Wang , "Jason-JH . Lin" , Singo Chang , Nancy Lin , Shawn Sung , , Jason-jh Lin Subject: [PATCH 0/2] Change GCE hardware timeout to software timeout Date: Wed, 10 Jan 2024 23:51:46 +0800 Message-ID: <20240110155148.6383-1-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--5.263700-8.000000 X-TMASE-MatchedRID: q3F3psOzl9ySm4maZcPB3bMjW/sniEQKKVrLOZD1BXT7efdnqtsaEwNx WPxQqGxCIivmPMAFRzSor0AhuwYJneHxFb2pjr4bXP5rFAucBUGy4iyjvVWTop2iHEDAUb20o8W MkQWv6iXBcIE78YqRWo6HM5rqDwqtgZFlHm/gtnY0ATtLIYswSE9/RQmUBCjZHpPDPfgQysA2V8 IOje1GckMMprcbiest X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--5.263700-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 6C97B50913820EDC4F53C26FD1119DCA9248F4935C41D9B043801622779BF2CB2000:8 X-MTK: N From: Jason-jh Lin Since the max value of GCE hardware interrupt timeout for wait and poll instructions is about 1760ms. It is not enough for the use case of ISP driver below: GCE Thread A: wait for SOF and set event 1. GCE Thread B: wait for event 1 and set event 2. GCE Thread C: wait for event 2 and set event 3. GCE Thread D: wait for event 3 and set event 4. GCE Thread E: wait for event 4 and set EOF. If all GCE Threads start at the same time, the latest GCE Thread E will wait for event more than 2 seconds. Therefore, we changed the hardware timeout to software timeout, making it longer, more certain, and making it configurable by CMDQ client drivers. Jason-JH.Lin (2): mailbox: mtk-cmdq: Change GCE hardware timeout to software timeout mailbox: mtk-cmdq: Add set GCE thread timeout interface drivers/mailbox/mtk-cmdq-mailbox.c | 183 +++++++++++++++++++++++ include/linux/mailbox/mtk-cmdq-mailbox.h | 4 + 2 files changed, 187 insertions(+) -- 2.18.0