Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2662111rdb; Wed, 4 Oct 2023 07:56:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEyMXECqsNVF+EzHoGReYzLxrVFHPlxB5eNdidxRow9Es1PPL+peWJPOYX6A6nJOSyE8CQ/ X-Received: by 2002:a05:6a00:2388:b0:68f:cc67:e709 with SMTP id f8-20020a056a00238800b0068fcc67e709mr9864582pfc.16.1696431387402; Wed, 04 Oct 2023 07:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696431387; cv=none; d=google.com; s=arc-20160816; b=JwmebHqhafhIAJnYxo5Lr4QMDZ1t2ZX3RIKpyxug0eTUXF91aHuWajBUXbBIjUDVCZ zH1hMEBSTmy1Y7AWAY2pJUI1AuyzTtAbSlKTj9ZVn2wtM7CTSqj4DZEOZtrH/g/LuzFI Jx0wrTff78CmiMcfWWMMgkk1V5OHknt22xZyBHuKF8QVyKBz86xjuTOYIxn+IA02cZcM ka7I+NbKJWEYqsYxQORilJjwyiBiH/nkpuZbl89362bzTzvPXLlMJlbY+0H3IJvGCszX m4TIwJ0emDgUrAW5bEs+YIt5NLD0qBT4UqWVN2LzRM+Whsa9DsAMjwSQ+yBfkwxmh7CQ c9nw== 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=Zld14PrgrUQwNdkxliZnMzPpBlemSxYOxfCr5bA1wWE=; fh=EXBuWTfzUA18Ttd9B5kcINHV6LO4IewDn3oM/QyZ97g=; b=N+secHsdM27lx2geqfOCWQnvORrSMXjpiOrjlNRbIvIv3A97phj+tEFR/o5LBUt7f0 3ZJn/D7FLi2SCJ1h+KN1G5QrZmC7jmwMOC8sTQW0rKzXA7yFLSER27TFsdNIr8G9J/8q JbApqxT6pGemF6mbCyiOfn2QsKaTi0vUqTnhwNPw8us1KjxoDPaHBzWlLni3LFppWgg3 M1y0clZO9Z0w3zBGejhZm5n0pqCtzvrVis8t1XP1iud/d5jNZqmzsEjo2Uw/4qO5Ct+p UTygerLkG6JOiv/PLXSejCAlCTkQz8RAOMLLLnAtwOIivR/YKDPR67nzNoMRqOzRu4oB U2Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bx15-20020a056a00428f00b0068fc9c6eafasi3822025pfb.357.2023.10.04.07.56.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 07:56:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id B44D5802FBBC; Wed, 4 Oct 2023 07:56:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243007AbjJDOz6 (ORCPT + 99 others); Wed, 4 Oct 2023 10:55:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242977AbjJDOz5 (ORCPT ); Wed, 4 Oct 2023 10:55:57 -0400 Received: from mblankhorst.nl (lankhorst.se [IPv6:2a02:2308:0:7ec:e79c:4e97:b6c4:f0ae]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29532BF for ; Wed, 4 Oct 2023 07:55:52 -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 v6 00/12] sound: Use -EPROBE_DEFER instead of i915 module loading. Date: Wed, 4 Oct 2023 16:55:28 +0200 Message-Id: <20231004145540.32321-1-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 07:56:01 -0700 (PDT) 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. 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 | 32 ++++++++------- sound/soc/sof/intel/hda.h | 2 + sound/soc/sof/ops.h | 16 ++++++++ sound/soc/sof/sof-priv.h | 2 + 10 files changed, 118 insertions(+), 81 deletions(-) -- 2.40.1