Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6608026rwp; Tue, 18 Jul 2023 03:12:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlGjfuk1RV6GDnuiLgqPHP1w8AT8wGqzQSLY53v3nqffhSuUcCvu/OoScy9ooPQtVyd1q4kF X-Received: by 2002:a05:6a00:17a0:b0:674:8fe0:126f with SMTP id s32-20020a056a0017a000b006748fe0126fmr20162481pfg.27.1689675136703; Tue, 18 Jul 2023 03:12:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689675136; cv=none; d=google.com; s=arc-20160816; b=aNbO9HMxdGlcPXf936LQf1/x7aJkG0j2wwz8SFoW4haYAWSOiCAsz3P+/0tShuaulJ zrl1yhOnCkenYS8HTPUXtqBjSFz1DIRI+goWcGu9kBuVLm7cjaGxzdlJ0M5aHJyH42vS oMU2hK/YwNMxr3EwR5DJKZEISof1Fxsb9X0IiMJPAfzg2CyDwBVsUu7AyhRC3FI1KBxc foWiEXFpPbqsWp7fHhjSr4fKShLzedYA7PBnOwe7SqU5Gh6ZMjNnXbT72LBx6w5nCoo5 zeiAnejvj7Zlwd7RawrUzsS68lDBTVWAldQQCOA8dAc7bcXMO+1tPWYv8LT20t0pVruB m6WA== 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=7J1v+WSoILr6AH3Tx5jxu8P6Bp2lrhJAJ/ulrw+nlT8=; fh=1/NIQCDXuSTN/p5UTl8yTdoxUe2XNha5jbtKJN986X8=; b=cd3ydwGHPlJtiovV9YHRsP4JGfZrI7NUfOkhnUk9EuN0LG6/Zzz3uY2oa4TfwzqgtQ Rw216xAvJJpw/Qx4hB4eMrKSKJTOfR75UFUAn0rit5oXwImPE9PDNU7unl8KtQJHIXwQ I4NZEGKEQRfZ6VT3x6qaXPTxkcPX0+NQrajOcuxETPaL+ir0uJ8TNjUTjLssylcYAvqX /4yNalVOU7uzYTU7o+LEfU7aoaNxubPo/QNIvxQ0xy0Fdfwx1bbOl82RA/Itr240fequ DhzdkgTUeGHCr3GtGNpL+Is/DJQuqAZ+vd3C1m+M/7bXihai+jwwJUfsRLZugX4HBRyJ NSiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=lnIDl0nc; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=2PbfZtKF; 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 z127-20020a633385000000b0056339e5afaesi837898pgz.331.2023.07.18.03.12.01; Tue, 18 Jul 2023 03:12:16 -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=lnIDl0nc; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=2PbfZtKF; 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 S231432AbjGRJu5 (ORCPT + 99 others); Tue, 18 Jul 2023 05:50:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbjGRJu2 (ORCPT ); Tue, 18 Jul 2023 05:50:28 -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 C698C10E for ; Tue, 18 Jul 2023 02:50:26 -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 6AAD921910; Tue, 18 Jul 2023 09:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689673825; 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=7J1v+WSoILr6AH3Tx5jxu8P6Bp2lrhJAJ/ulrw+nlT8=; b=lnIDl0nc492/ylKgUuFVl24wXiOi785Yjna0OWnGPBruklJSogdUkT7FxVEZJhTR63ElS1 Zph4BZCbu5OKG2ZcpwiYZudeCgPPHZarFIoOaXh0rlvHJ+w3VJnB+irCCJSc9FbRcoMrW7 NxOARnzqj0QFn9uhscs17WRrKAndSgc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689673825; 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=7J1v+WSoILr6AH3Tx5jxu8P6Bp2lrhJAJ/ulrw+nlT8=; b=2PbfZtKFd//uJXBwF4u2xh/SRmPoVQCyBq5dUHaTkR6xPesLiDV4VrqD6S1HVautTbgpUQ adZUu5r9VaoViIAw== 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 16D0C134B0; Tue, 18 Jul 2023 09:50:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id d1OcA2FgtmRrbwAAMHmgww (envelope-from ); Tue, 18 Jul 2023 09:50:25 +0000 Date: Tue, 18 Jul 2023 11:50:24 +0200 Message-ID: <87ilaho8f3.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 0/7] sound: Use -EPROBE_DEFER instead of i915 module loading. In-Reply-To: <20230718084522.116952-1-maarten.lankhorst@linux.intel.com> References: <20230718084522.116952-1-maarten.lankhorst@linux.intel.com> 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,URIBL_BLOCKED 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 Tue, 18 Jul 2023 10:45:15 +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. Thanks for the patches. I naively thought that issuing the component binding at the early stage could be problematic, but in this case, this doesn't look OK, since the all i915 stuff is bound always at the HD-audio controller level, not at the codec level like others. So, it's definitely worth to try. Takashi > Maarten Lankhorst (7): > ALSA: hda/i915: Add an allow_modprobe argument to snd_hdac_i915_init > ALSA: hda/i915: Allow xe as match for i915_component_master_match > ASoC: Intel: avs: Move snd_hdac_i915_init to before probe_work. > ASoC: Intel: Skylake: Move snd_hdac_i915_init to before probe_work. > ALSA: hda/intel: Move snd_hdac_i915_init to before probe_work. > ASoC: SOF: Intel: Remove deferred probe for SOF > ALSA: hda/i915: Remove extra argument from snd_hdac_i915_init > > Cc: Jaroslav Kysela > Cc: Takashi Iwai > Cc: Cezary Rojewski > Cc: Pierre-Louis Bossart > Cc: Liam Girdwood > Cc: Peter Ujfalusi > Cc: Bard Liao > Cc: Ranjani Sridharan > Cc: Kai Vehmanen > Cc: Mark Brown > Cc: Daniel Baluta > Cc: alsa-devel@alsa-project.org > Cc: linux-kernel@vger.kernel.org > Cc: sound-open-firmware@alsa-project.org > > sound/hda/hdac_i915.c | 15 +++------ > sound/pci/hda/hda_intel.c | 58 +++++++++++++++++++---------------- > sound/soc/intel/avs/core.c | 13 +++++--- > sound/soc/intel/skylake/skl.c | 31 ++++++------------- > sound/soc/sof/Kconfig | 19 ------------ > sound/soc/sof/core.c | 38 ++--------------------- > sound/soc/sof/intel/Kconfig | 1 - > sound/soc/sof/intel/hda.c | 32 +++++++++++-------- > sound/soc/sof/sof-pci-dev.c | 3 +- > sound/soc/sof/sof-priv.h | 5 --- > 10 files changed, 75 insertions(+), 140 deletions(-) > > -- > 2.39.2 >