Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2719864rwb; Mon, 7 Aug 2023 02:13:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHx7Cgv5rrHsutjLpg+lfnTlsT48w9hiUwhiT9D7qYGhSYRtk7bWNt7XdXPZVdw5ydyVjEo X-Received: by 2002:a17:903:22d1:b0:1b8:15bf:d2ed with SMTP id y17-20020a17090322d100b001b815bfd2edmr10010820plg.65.1691399618105; Mon, 07 Aug 2023 02:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691399618; cv=none; d=google.com; s=arc-20160816; b=YIGs47TAuV3/0JLU55AlYcr959DrgBoBknUQxrEQy6ZBl0jqVjKe791Tx2cmh9KE8j /mRcLjFmI9KYT4rJyNMZj2rug88yXp9t1NXvA6Uq2wHQgIF/LavOrApxmGn6ZgRlxDTx SzGyLXwyuJEyxgcVlYk/QbFDxhldEG1Ag0mQDIuj8YfIEkSIZxN6lxWVlEvdj1ld/pUe jmbp8jlFehHWEVasCRWq8xwjTFoefO4F0oYMNFnmXrrFqUynroeGPTjxki6249ncFqlZ 1cl9EJmex5HLTAivCYE3ddOm/f4im6uo5bThcUIFPXzZZJ5/EGnuqDzgOY6chhv+YMkF ECjQ== 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=6BiNflWeIr4XuSQu/ldWHOAeWVhpKlpZRfvFcP9TUzs=; fh=HQJ8yfyZSibhUC3ePaBWyjzUfKL/zFtHbo4S1pjbGBs=; b=RTkl+DmxF6hpF/3ADS5wVDI1HT03N8F30c5sKuYHozLaKwTUVSZnEgk01eUZ+gqAJi FnTL/9PETQnOccceA5pMx/kvaBcry1qbwMBstirTnhj9PsJh+PNfDBpRwsOOTNaA91Xn 1wpHf66g5yxM7TbmBAFGFTFU8Ru0JmowR59PL9gSQETd8U539SYdfIVPv2R1QbIkrOFk 6DDHImX1D3/4F8N3TUPu8Bc9t1JjduFLulD/rv1GQ7tTkYcg8cFlRQiYVf6Pd6r5ZE+M T3Ep3g7rKxnv5jba3JUlnOe70RFWPUUrrlbyfDSinZjGTt9823UB3Wa7LTso7DgEF+hO Cl4Q== 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 t6-20020a170902e84600b001bb98357332si5586402plg.365.2023.08.07.02.13.24; Mon, 07 Aug 2023 02:13:38 -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 S231234AbjHGJBK (ORCPT + 99 others); Mon, 7 Aug 2023 05:01:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230466AbjHGJBH (ORCPT ); Mon, 7 Aug 2023 05:01:07 -0400 Received: from mblankhorst.nl (lankhorst.se [141.105.120.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A69C2E6F for ; Mon, 7 Aug 2023 02:01:05 -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 v3 0/9] sound: Use -EPROBE_DEFER instead of i915 module loading. Date: Mon, 7 Aug 2023 11:00:36 +0200 Message-Id: <20230807090045.198993-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 From: Maarten Lankhorst 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. --- Changes since previous version: - Keep the workqueue for soc/sof/intel, instead only move out snd_hdac_i915_init. (Patch 8/9) Rest of patches unchanged. 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 sound/hda/hdac_i915.c | 25 ++++++++------- 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 | 19 ++++------- 5 files changed, 70 insertions(+), 78 deletions(-) -- 2.39.2