From patchwork Tue Sep 4 10:19:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10587029 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D75314E0 for ; Tue, 4 Sep 2018 10:19:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2807229077 for ; Tue, 4 Sep 2018 10:19:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C03429083; Tue, 4 Sep 2018 10:19:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2932829087 for ; Tue, 4 Sep 2018 10:19:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EADCA89907; Tue, 4 Sep 2018 10:19:44 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9203089907; Tue, 4 Sep 2018 10:19:43 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 13541167-1500050 for multiple; Tue, 04 Sep 2018 11:19:38 +0100 From: Chris Wilson To: igt-dev@lists.freedesktop.org Date: Tue, 4 Sep 2018 11:19:38 +0100 Message-Id: <20180904101938.5545-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.19.0.rc1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] lib/pm: Increase snd module probe timeout to 10s X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Imre Deak , intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 5s is often not enough for the sound module to finish loading, so bump the timeout to 10s. For fun, poll quicker over the 1s! Signed-off-by: Chris Wilson Cc: Imre Deak Reviewed-by: Imre Deak --- lib/igt_pm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/igt_pm.c b/lib/igt_pm.c index e86fa4a40..615463a08 100644 --- a/lib/igt_pm.c +++ b/lib/igt_pm.c @@ -258,12 +258,15 @@ void igt_pm_enable_audio_runtime_pm(void) if (__igt_pm_audio_runtime_power_save[0]) return; - for (int count = 0; count < 5; count++) { + for (int count = 0; count < 110; count++) { if (!__igt_pm_enable_audio_runtime_pm()) return; /* modprobe(sna-hda-intel) acts async so poll for sysfs */ - sleep(1); + if (count < 100) + usleep(10 * 1000); /* poll at 10ms for the first 1s */ + else + sleep(1); } err = __igt_pm_enable_audio_runtime_pm();