Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3093504rwi; Fri, 28 Oct 2022 15:56:34 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5C1NcTR+U9HnKnl1qqTEaMNtYK5AJjmG88X2xHac7iEydrN2wzEkQv9oHZMa7NAjFgu6sY X-Received: by 2002:a17:906:edb9:b0:7ad:a423:dc75 with SMTP id sa25-20020a170906edb900b007ada423dc75mr1365158ejb.213.1666997794678; Fri, 28 Oct 2022 15:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666997794; cv=none; d=google.com; s=arc-20160816; b=v8cJoATjwqkO64/hBfjvgsLeE4eKPst7Gkv14L8TjeLNeAXTbFz9ze75uOqXdlHfCl riqe6DTs1maSYQzXif+ra5ycOEJ7k6y6DX27OYx90ohYY23pJ5yuzzrhmym7Y3N+NGf9 jVX90T79RQL8h/BUVDup+K1TdGIFGq61exS7m8wD9VwWSxbwodH8WIIlx2o+gXlRwIz4 CJkUplQlkJ0rD45p/jfmfYe1AGtRzpiXNPKC6t+gYJmIX7euR4xuOQBJZYhZ7ln0Hi+z xd8KxI/s8lJpsCCJ9L/5l79QnmeGVUhCmrH07YCdkkvmoR1tIRHWkGX6XtBlaeBaKU52 vriw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=r0xiJp4XHOD7FpE79mlTo4FZ8hKLVDdbQ6PJGlmtm0c=; b=m/IfCGSMXUEN+5EV9HVuzbs4NY81CEMbIOxIKULzmXwKi+iAvV5r0RCdlH8ZnkPWho MQca5hbu9zapos08m3WOwFvHv20aa2fut+SdrAtn0hpqsY22wyjnffkAqMkR0s/6XZVA B01AqqAL9gDgBaMUIgvxk2LpEchSBIY1ng9YUD0l2umCa8bp9VdwfHEM2ZNpJ9gjpYYD xhPDM2W4tbwak05L9Y31bJn6S2ynZinzwZvKsPyt6duHFfazPYsHE4WNTilgsBMYMIPX AHZXo6rpve9Uvk9JUxoYJRBJw+uADf7BTJgn7K95tgRUHLcrWHx14Pd8xynawo14mNN1 Gi4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mzDl6TMy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n26-20020a5099da000000b00461e63fe88fsi4914857edb.596.2022.10.28.15.56.09; Fri, 28 Oct 2022 15:56:34 -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; dkim=pass header.i=@chromium.org header.s=google header.b=mzDl6TMy; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbiJ1WtM (ORCPT + 99 others); Fri, 28 Oct 2022 18:49:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbiJ1WtD (ORCPT ); Fri, 28 Oct 2022 18:49:03 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F2E61EA561 for ; Fri, 28 Oct 2022 15:48:23 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id r61-20020a17090a43c300b00212f4e9cccdso11115395pjg.5 for ; Fri, 28 Oct 2022 15:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r0xiJp4XHOD7FpE79mlTo4FZ8hKLVDdbQ6PJGlmtm0c=; b=mzDl6TMyHJf63jH7iKtcAAGM8XDN0rgDSAUs7hfgOey2i6dDPc9aOOCZYNZNETkm2j yVEIR85X+aSQjrVbZpYjQoDLmGgkswWXkfsecH1i+hYCnMCRGj96w+Nxrz2B/QCGVpZQ gtgV0voDj/MPBaheBlaJn/W0fjq4tkMXfBnrw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r0xiJp4XHOD7FpE79mlTo4FZ8hKLVDdbQ6PJGlmtm0c=; b=us+P5QHKaw9R6Pg+6ouWNJtttfJ4G7k5JOtQAJFKwKumYf47F+r2cC9fgErj7eHHSp pGey63k2+HajugNTcdXAfJ1Fiv1FejiRvrsd0/YL2KfcID8bKbdByAGBf2XEtA7/L7qp hVn+rf+MAbp9EhxyPwobjyrJlnwP5gqlToo9wwl9rxaacHN9CwbNwCFOjq60MKiMEAGb VLzPzJy80aSC9QXiyIUy/vG/K0lBBz3Fv10RIPboBzyFK8VHxRwAr+H1H0PYVL0he45r s81TsuJ+Tj8eATajKHfEETKeofa0ltMmWz2iAipWcNtRm6TOTe9+51TA9HqzOxq0plV9 oT0w== X-Gm-Message-State: ACrzQf2O/MnJOLSJEIXCdzWfxDrPtexB1ytWWbjPrw0N/eEY/eAvEhkY DOmqezFuWGPSmhi+MaZQWDrYnQ== X-Received: by 2002:a17:902:848c:b0:17a:b4c0:a02b with SMTP id c12-20020a170902848c00b0017ab4c0a02bmr1355571plo.122.1666997302622; Fri, 28 Oct 2022 15:48:22 -0700 (PDT) Received: from localhost ([2620:15c:9d:2:65f9:c180:249c:190f]) by smtp.gmail.com with UTF8SMTPSA id bd13-20020a656e0d000000b0043c9da02729sm3161736pgb.6.2022.10.28.15.48.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Oct 2022 15:48:22 -0700 (PDT) From: Brian Norris To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , Xinhui Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Brian Norris Subject: [PATCH 2/2] drm/amdgpu: Set PROBE_PREFER_ASYNCHRONOUS Date: Fri, 28 Oct 2022 15:48:13 -0700 Message-Id: <20221028154718.2.I30f27b240e63cc269076556407e6eddcf5177b5e@changeid> X-Mailer: git-send-email 2.38.1.273.g43a17bfeac-goog In-Reply-To: <20221028224813.1466450-1-briannorris@chromium.org> References: <20221028224813.1466450-1-briannorris@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 This driver often takes over 200ms to start, so it can improve boot speed to probe it asynchronously. I did a short review of the driver, and apart from an issue fixed in the parent patch ("drm/amdgpu: Move racy global PMU list into device"), there don't appear to be many cross-device dependencies or racy accesses to global state, so this should be safe. This driver was pinpointed as part of a survey of top slowest initcalls (i.e., are built in, and probing synchronously) on a lab of ChromeOS systems. Signed-off-by: Brian Norris --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 3c9fecdd6b2f..2d180e48df1b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2793,7 +2793,10 @@ static struct pci_driver amdgpu_kms_pci_driver = { .probe = amdgpu_pci_probe, .remove = amdgpu_pci_remove, .shutdown = amdgpu_pci_shutdown, - .driver.pm = &amdgpu_pm_ops, + .driver = { + .pm = &amdgpu_pm_ops, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, + }, .err_handler = &amdgpu_pci_err_handler, .dev_groups = amdgpu_sysfs_groups, }; -- 2.38.1.273.g43a17bfeac-goog