Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3989163rdh; Fri, 29 Sep 2023 08:07:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4N8sbG4u52xzp26M4uBhMOrsQWwWgvaGxMMLyLKPBMuw3g8BJNSYZ5pRC8IHoua5Tr31Q X-Received: by 2002:a17:90a:e008:b0:26b:36a4:feeb with SMTP id u8-20020a17090ae00800b0026b36a4feebmr6977371pjy.8.1696000065954; Fri, 29 Sep 2023 08:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696000065; cv=none; d=google.com; s=arc-20160816; b=vckxGRNNliEJ45E5TjEF6O+C4YNCPi9G1UqkTgUz6glzw8SbsnCGhUCqcn3w/8BT4y sZsdITWnfGkwlX5LBKVNjiK0B0uhnyIkaprqw1eVEClnTko5rSPAcRkTptILxcfMOe8m ISsr4yJE7CR37sf5hYIiBIpVQLTUXtXojr2QdScYlQ6uj5uJK82HIfyAZGqBt/QDom8w xzV9VADqkd1PoV4y8abdayW49w1Gy9474Tqjcitqd4YzgWHuukiI1vNuPHPaEF5+lUk6 aptoggns6hiNU8/OajCUqxm2gd3M/+dMEV60qyfwlGfKaYQBhV14vLy/6zfg3n6PFU+R MBnA== 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=g8mf53VuiV54zaUkgDU36kBMK0+DCqQse1L+dOcBhLw=; fh=gSlqDyTAaX4sD5o7lNdgN6GT1mkO6Z4/Ye0T8jAhwnM=; b=T8pYZs289xun7ek8Vju6VzElsoQXjXIRUTwxa3KFyfWZc+f2GlrWnUSTe9m3lzKtdO ssiB54dr5QFQnQhFN+hjUtwQXaDu+U+NGX5Nfb1w9PP+PTakCyotJIsFb3rwy5U9C42s smEs4wzmC9MVdO9H3dS3oy+2a01L9JdvDTSjqTuLHWbK5q25QLm6VuYR/BFxzFToxDu1 yqPyrh7iIuNY8JOJqfZR4AvdCu6l1t/9aYmqF4nuje5YMczUxFwKzXPO2wPF36zmL2rv 9/uxF/6ygA2nmCdhIbgiLspOKgmSPsXtE+Q+qR2SQCbPIeet19lIUYmegfZcj/J3NNt2 mHLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id g12-20020a17090a578c00b002776a60ea68si1636292pji.1.2023.09.29.08.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 08:07:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2CA46809B0AC; Fri, 29 Sep 2023 07:52:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233265AbjI2Ovl (ORCPT + 99 others); Fri, 29 Sep 2023 10:51:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232954AbjI2Ovi (ORCPT ); Fri, 29 Sep 2023 10:51:38 -0400 Received: from mblankhorst.nl (lankhorst.se [141.105.120.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF9E6F7 for ; Fri, 29 Sep 2023 07:51:35 -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 v5 00/12] sound: Use -EPROBE_DEFER instead of i915 module loading. Date: Fri, 29 Sep 2023 16:51:14 +0200 Message-Id: <20230929145123.233838-1-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 29 Sep 2023 07:52:05 -0700 (PDT) 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 added a fix for sof_ops_free() missing call, renamed probe_no_wq and remove_no_wq to probe_early/probe_late, and fixed the resulting fallout. 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 (10): ASoC/SOF/core: Ensure sof_ops_free() is still called when probe never ran. 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. ALSA: hda/intel: Move snd_hdac_i915_init to before probe_work. ASoC: Intel: Skylake: 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 probe_early and remove_late 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 | 17 +++++++- sound/soc/sof/intel/hda-common-ops.c | 2 + sound/soc/sof/intel/hda.c | 30 +++++++++----- sound/soc/sof/intel/hda.h | 2 + sound/soc/sof/ops.h | 16 ++++++++ sound/soc/sof/sof-priv.h | 2 + 10 files changed, 119 insertions(+), 78 deletions(-) -- 2.39.2