Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6589283rwp; Tue, 18 Jul 2023 02:53:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlHsQfFe9OHPOxLTmh6jFxysWzTG9rgok1jbBcoUfa6Fc7eXHeCQeuoHkp6umcWkBvrjTdRr X-Received: by 2002:a05:6a21:328a:b0:132:7d91:aadb with SMTP id yt10-20020a056a21328a00b001327d91aadbmr15880577pzb.6.1689673994500; Tue, 18 Jul 2023 02:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689673994; cv=none; d=google.com; s=arc-20160816; b=i1G4fulzy8Ef/VzLW0hDDvxKVzEx0BEL47FvHNITU/5W2FrDX4TYgmeWM7MhuipNTP ro69ZCfH7dZqF/k43tyDPWl1KHB403oy2nnuuu/Vbu9j7wm+tAEYobQ2XNuNCpXVW8p6 zCreuLaFUOu42BNp4YOi39YYkDYFLxv+eFEO1w7wdrde66PE+C0yKT9cQ4L5cpwUMCme Lr0C/TsMMrRcapl7Wpe4dVjnfzTHUWAZYHsBNBofZ4dsF9PN8sGK4bhoAAaPkOkvQwJ+ 4HJUpMxXwBj2EhFwKTEaESZgrIP3+Vhx/6mymyCEPKsRTGc+mcTzxhENFmn5jnpqOk55 BxYA== 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=ZZ4DRsahc+D4vjxx0Qkrolr/JkjVV70PQgkl0Y98x8k=; fh=dxIo+wp2Pw2j7LKHXvog8zBrh2HlBFjJ3CkiHF3U0aM=; b=i9uTxzr2HAvTtUtmHFhYQTbCwytfpJpC+6PbZzzTOMNi3ICSDwjnLjFQhWmTXE0Hhn 5CBP3mQNxpTf/d7sr1C7QPk81ZOmQkGAPzTAOF8Fdxch4BTlZtwce0V0uZi4H1dzebch uFrfSk16AlyxGmvpPnykoM5wBK9Q1y493oKW4TqcIgZHZygmOWtuCKKp5h/G/ZssQAqX JmOIJ+Y5o/Dkk0Xv4WGJbLckQKgDt+SLQ2ws1duIoNdlLDFL77X8WqiLhaNagqEMaD4F 2eRqehLe6t9K7W48KiUF0dnGZgK/R4xlM4c/H7NeHhZVfI6VkT/HTMTWjL9vIRtyOPeu YCDg== 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 j23-20020a635517000000b0055bc2561b6esi1313256pgb.673.2023.07.18.02.53.02; Tue, 18 Jul 2023 02:53:14 -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 S232138AbjGRJBn (ORCPT + 99 others); Tue, 18 Jul 2023 05:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230373AbjGRJB3 (ORCPT ); Tue, 18 Jul 2023 05:01:29 -0400 Received: from mblankhorst.nl (lankhorst.se [141.105.120.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37910198 for ; Tue, 18 Jul 2023 02:01:26 -0700 (PDT) From: Maarten Lankhorst To: alsa-devel@alsa-project.org Cc: sound-open-firmware@alsa-project.org, linux-kernel@vger.kernel.org, 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 Subject: [PATCH 0/7] sound: Use -EPROBE_DEFER instead of i915 module loading. Date: Tue, 18 Jul 2023 10:45:15 +0200 Message-Id: <20230718084522.116952-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.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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. 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. 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