Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp4008991rdb; Wed, 30 Aug 2023 12:29:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESSOfisskO0+nWPBtsuf+pnWvT15AL+g6Zf7L2qmqfbZN9b49ad+sMixLdYgwuHYNwkMNo X-Received: by 2002:a05:6e02:964:b0:34d:f0ff:db49 with SMTP id q4-20020a056e02096400b0034df0ffdb49mr2931049ilt.9.1693423777699; Wed, 30 Aug 2023 12:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693423777; cv=none; d=google.com; s=arc-20160816; b=p2LRqCPwoUSSzoGCMVEIJQwe6knl3+wbUMEDxnNftWb9GRaCcuYFsdggxZ6P+M4Uzt ogPgPjVQBAvDRipuP2Di5qp2oUfKgE40NUCf+DffJR3FYpO21dKJitIz8oy31FxW50ZA cQysWaPFhtd12JCfoiA8GlFvP0jfp3O/33rGBeK3O39wqK7aFxADx3/In9kh3vd+sdfk TUEv5PSOZCwRT+kQAas/N81DjdRFsFK3fvbZPA2j3uyM9O35UWrC07QZlD73xgL4AZId K7saQKWjFNeTMhaN3CPM63rWGkIB4nuvLC46xl8dpHbzggwYAtW8NdQj8GzcldTQeTcV tsog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=RLi90cG8Q2wAcboC0qMPWl1RkMi0GuHLWAOiA/LSQ+8=; fh=gSlqDyTAaX4sD5o7lNdgN6GT1mkO6Z4/Ye0T8jAhwnM=; b=zWQVn8bGwmcmW+Zq4ipPdvcr47d4pVZZJO9J1xP/UUM9xKTwuIROo1/PhVKObL8dxs L3KSNuNGLWNCVNR8LxhhXDS5ZESS89kcbmzMT6yJMpVlnukGj4FoCR+pKmh7Xqn+iqKy a7W4D4zkvjLewZaPgy1ZdcL6JkAPV0w3VU9e9xnxw8V4vUa/Z/Lj+W5ZcDraH0+E40AY MOgXVexFoooHXwJiRFFtHhGWDqWQyGEoV76G50XMeC8zETclrVxMRZD3bZOGLJzaelYC EfNtZm1AbmwjeJqtzm/J7vw5TGgclDvW/AIMg7nKI11a7mKZ0Cc0lsvIpJpfRMhUn87G MKug== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a656785000000b0056bcd715ffdsi13389477pgr.859.2023.08.30.12.29.24; Wed, 30 Aug 2023 12:29:37 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237075AbjH3TWe (ORCPT + 99 others); Wed, 30 Aug 2023 15:22:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245572AbjH3PhM (ORCPT ); Wed, 30 Aug 2023 11:37:12 -0400 Received: from mblankhorst.nl (lankhorst.se [IPv6:2a02:2308:0:7ec:e79c:4e97:b6c4:f0ae]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DBFE1A3 for ; Wed, 30 Aug 2023 08:37:07 -0700 (PDT) From: Maarten Lankhorst To: alsa-devel@alsa-project.org Cc: Maarten Lankhorst , Jaroslav Kysela , Takashi Iwai , Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Daniel Baluta , linux-kernel@vger.kernel.org, sound-open-firmware@alsa-project.org Subject: [PATCH v4 00/11] sound: Use -EPROBE_DEFER instead of i915 module loading. Date: Wed, 30 Aug 2023 17:36:41 +0200 Message-Id: <20230830153652.217855-1-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE autolearn=no 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 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. Compared to previous version, I picked up Pierre's changes to add a probe_no_wq, added remove_no_wq myself and then fixed the SOF changes to use it. 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 Maarten Lankhorst (9): ALSA: hda/intel: Fix error handling in azx_probe() ALSA: hda/i915: Allow override of gpu binding. 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: Move binding to display driver outside of deferred probe ALSA: hda/i915: Remove extra argument from snd_hdac_i915_init Pierre-Louis Bossart (2): ASoC: SOF: core: add 'no_wq' probe and remove callbacks ASoC: SOF: Intel: hda: start splitting the probe sound/hda/hdac_i915.c | 24 ++++++----- sound/pci/hda/hda_intel.c | 60 ++++++++++++++-------------- sound/soc/intel/avs/core.c | 13 ++++-- sound/soc/intel/skylake/skl.c | 31 +++++--------- sound/soc/sof/core.c | 11 ++++- sound/soc/sof/intel/hda-common-ops.c | 2 + sound/soc/sof/intel/hda.c | 31 ++++++++------ sound/soc/sof/intel/hda.h | 2 + sound/soc/sof/ops.h | 16 ++++++++ sound/soc/sof/sof-priv.h | 2 + 10 files changed, 112 insertions(+), 80 deletions(-) -- 2.39.2