Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4897470rwb; Mon, 31 Jul 2023 14:17:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlHWa4BEO5LC5ozkXIFFaCCWDBsUjE34xRIrOo1G25YD8RhATpkYGYYHfDhsUWRx+/5Ri32m X-Received: by 2002:a5d:4533:0:b0:315:a1bb:4d7b with SMTP id j19-20020a5d4533000000b00315a1bb4d7bmr704749wra.35.1690838248300; Mon, 31 Jul 2023 14:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690838248; cv=none; d=google.com; s=arc-20160816; b=JjAZrzQulP/aiHy7bPePJ/R66vlpORYz3EwR+2N7pERJxdxyaAK/iOmjECrRtbPx7W R0t6Mq2R1eYT0STYkiKi0+S6M/ZeOvebYjbzyzUb2ht3+NIMLHxvmyqQqFU+/bNH/GEn nPWx+Xwt7IoweJmjwy9Q+IEP/koec7A/CTrupbrj4wnllNpT22q+NKjbrwYa/doNRPKx 0tQ0kxsbIzp0YXHklUSMsi1MwzA23gkp2nHA95qjj0OJq4t+NVlUtcQ/il5ighVlkzi9 1blCkOgMXH45F1mubB7/Qv/TJ3m8INxht/1eP8I/d8gQBbA7aCtOwOtgC7njMBpkFWYK ibfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=orxtpVkB/9b4f2d0jeLwiGzqa6cw1TF4O8ACfBrN1kU=; fh=1/NIQCDXuSTN/p5UTl8yTdoxUe2XNha5jbtKJN986X8=; b=Mpg4adP1HWD3XGCBu6mu8xr24oHfraTJ9gyJAO6StiY1wmnad+SnGGwKV3TwZ31HSp l5wmOQr5rc1Zm7nIusPjRAYYbMaVNdk66d2uiZ1HqJtfg+DcllkP1+PViG0hVUZWSdGy LIQrN4VQrQ2NgXoFHnvNdfVaHLs1qvorK8uvig+sUnf56hcdK8rDCDgtL0bc29EKknaL tsY914LQrSa8GRf0ftXawV0XX8n3vzvA6cgekcpzw3EfgC6kLN4q4f9yqzehD1iig+2s EdPNNJEJwYWYxdi2jIwgAmCwm15fJ6KHf/T2KtDxBi7tua6APTm2w+fmVjEKLoA+GGtc NQag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="gYNnU0/8"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=DLFOBrEQ; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020aa7c902000000b005221f0b75b5si6848114edt.220.2023.07.31.14.17.02; Mon, 31 Jul 2023 14:17:28 -0700 (PDT) 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=@suse.de header.s=susede2_rsa header.b="gYNnU0/8"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=DLFOBrEQ; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231300AbjGaTcz (ORCPT + 99 others); Mon, 31 Jul 2023 15:32:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbjGaTcx (ORCPT ); Mon, 31 Jul 2023 15:32:53 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 013CF171B for ; Mon, 31 Jul 2023 12:32:51 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6310321DC6; Mon, 31 Jul 2023 19:32:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1690831970; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=orxtpVkB/9b4f2d0jeLwiGzqa6cw1TF4O8ACfBrN1kU=; b=gYNnU0/8qYLk3+U/lQsmqa/9N98Mg7KWeV027m4WGpX1bztlHy30SXCEAUW4p2hBzhqKHY SP7lQekoqXgZmiynHYgT1IK2cHpqiqhjEZEufsdXmUlCMbr2ssdi3Z+2gJhsFFVUZqKP4N T82e7wWGqkLbpfKjBct4/CNYy84UGmg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1690831970; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=orxtpVkB/9b4f2d0jeLwiGzqa6cw1TF4O8ACfBrN1kU=; b=DLFOBrEQWMmFiqyqU3M1c3eD0Y7bTlvlpjL8wfzklpy9n31Cw3zdDapKWMtFPcZff3uH3k borskwo2m5LoDICw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 14B2D133F7; Mon, 31 Jul 2023 19:32:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 3voQBGIMyGTWYQAAMHmgww (envelope-from ); Mon, 31 Jul 2023 19:32:50 +0000 Date: Mon, 31 Jul 2023 21:32:49 +0200 Message-ID: <87fs53j2qm.wl-tiwai@suse.de> From: Takashi Iwai To: Maarten Lankhorst Cc: alsa-devel@alsa-project.org, sound-open-firmware@alsa-project.org, linux-kernel@vger.kernel.org, Jaroslav Kysela , Takashi Iwai , Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Daniel Baluta Subject: Re: [PATCH v2 0/9] sound: Use -EPROBE_DEFER instead of i915 module loading. In-Reply-To: References: <20230719164141.228073-1-maarten.lankhorst@linux.intel.com> <87r0oohyea.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 Mon, 31 Jul 2023 18:37:36 +0200, Maarten Lankhorst wrote: > > Hey, > > Den 2023-07-31 kl. 17:51, skrev Takashi Iwai: > > On Wed, 19 Jul 2023 18:41:32 +0200, > > Maarten Lankhorst wrote: > >> Explicitly loading i915 becomes a problem when upstreaming the new intel driver > >> for Tiger Lake and higher graphics (xe). By loading i915, it doesn't wait for > >> driver load of xe, and will fail completely before it loads. > >> > >> -EPROBE_DEFER has to be returned before any device is created in probe(), > >> otherwise the removal of the device will cause EPROBE_DEFER to try again > >> in an infinite loop. > >> > >> The conversion is done in gradual steps. First I add an argument to > >> snd_hdac_i915_init to allow for -EPROBE_DEFER so I can convert each driver > >> separately. Then I convert each driver to move snd_hdac_i915_init out of the > >> workqueue. Finally I drop the ability to choose modprobe behavior after the > >> last user is converted. > >> > >> I suspect the avs and skylake drivers used snd_hdac_i915_init purely for the > >> modprobe, but I don't have the hardware to test if it can be safely removed. > >> It can still be done easily in a followup patch to simplify probing. > >> > >> --- > >> New since first version: > >> > >> - snd_hda_core.gpu_bind is added as a mechanism to force gpu binding, > >> for testing. snd_hda_core.gpu_bind=0 forces waiting for GPU bind to > >> off, snd_hda_core.gpu_bind=1 forces waiting for gpu bind. Default > >> setting depends on whether kernel booted with nomodeset. > >> - Incorporated all feedback review. > > Maarten, are you working on v3 patch set? > > Or, for moving forward, should we merge v2 now and fix the rest based > > on that later? > > I've been working on a small change to keep the workqueue in SOF and > only move the binding to the probe function to match what > snd-hda-intel is doing, but I don't know if that is needed? > > It was a bit unclear to me based on feedback if I should try to kill > the workqueue on all drivers (but with no way to test), or keep it > around. I guess it's still safer to keep the workqueue in many drivers. There can be modprobe or firmware loading at any later stage. We can get rid of the workqueue once after confirming that it's really safe, too. So, if you can work on the patch set in that regard, it's fine, I can wait for it. thanks, Takashi