From nobody Thu Jul 6 17:26:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qxk3V0Wrlz4lnnZ; Thu, 6 Jul 2023 17:26:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qxk3V055Pz3h29; Thu, 6 Jul 2023 17:26:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688664406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=74a1wifpejbX4meCU7bM1/RbaP4b9gIN+VSqQt74ZlA=; b=V2aH/6LDXN8tXC6aHteJf5upLaaADJLC9yA9CGh/PZLi1IcjMcTtJC/5ExkdLCh3U8RG02 l9N7yFP/wqzGq9A4/DcHiiiChl/pspCh6GkesdpNIBw7B9nTq9cgFv5zX6g/ZSSZLYVA1a v9RGrnR9QQSu3T6zydd150YZOtt+icjgu3xGYBwrCKMVzZ+c7PF3xYLWI5FgMARBI4omO8 Mz7X4h6b58uIFoH79/dvKAqg5iuW+Q9kRuD5+OBFJ8JAVf6b4FTrGrw/YXIXjFpbKoPzDb 0R7kPnYtjJe6tozBofQOmf75KQKOgDhG2PMOmSqrxyRCGK86hIZESfN6trhuVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688664406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=74a1wifpejbX4meCU7bM1/RbaP4b9gIN+VSqQt74ZlA=; b=ojZVtxeEVjldYCTeXCymFsRY5X48Bpja/2BaFG2pbCvhjEFgcQVbSM+cIHB28/hQKAB2UL pguAbH6A7yJ4qOydaOVBr0OW7ZEGEhjOF52ENfvPVTEgvEYerta15QA021QdYy/55qX1rx wWj2/Fymg0TLi+DCN0i6F8+ID0AYTeu1D7jURELUmqTwCJWMc55RIz+kHlPkJurQQhR0AA Nev52IgNYwrqRGooAyjiYgQTpTsX31X28asMy7nipio5Dfpi1A0wuRab5y4Cr8yJ2cF/+G IexWCkqR+QofuLpC1rQGD70gNbDIvI8vOs1CCsiH9OvBhX4e0t5nzxhnBWynNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688664406; a=rsa-sha256; cv=none; b=X1yE3ZZFTt1z1jeBsUtJ5nyliOTcddjHuEeyD3PNqvMkXOfgqIcy3Ll8IfwoPEUu00JTlt 0O1CUTWR+k8jXucVM8mVFDHBbfmTkBzXaR7YVHEsraky3H0rA7y9NDaB1+XkdlM74LTGaa vCvTS1H+M4k4RT6b+MehU75t5P5GqZayMAupJn8qmWCw9h5KA/Pm9Ia3uNSYYdcOXuUDck nCqSiT66S8UoEg+ADRJHyum9geY4M6SkXtf59I4DJOX+z3GRp8G1ENZDqKv1olkPb7p5bk c990eNPsEeuGr2ZOHGpr+/87fK4v4faAYKtFVo5BENhFQc8mYqlFj5dHWKkyHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qxk3T6Bxtz15M1; Thu, 6 Jul 2023 17:26:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 366HQjiS081857; Thu, 6 Jul 2023 17:26:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 366HQj28081856; Thu, 6 Jul 2023 17:26:45 GMT (envelope-from git) Date: Thu, 6 Jul 2023 17:26:45 GMT Message-Id: <202307061726.366HQj28081856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: e8404a72c5df - main - vgapci: Don't create a drm helper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8404a72c5df939cd9ad869b12cf038c6846440a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=e8404a72c5df939cd9ad869b12cf038c6846440a commit e8404a72c5df939cd9ad869b12cf038c6846440a Author: Dmitry Chagin AuthorDate: 2023-07-06 17:26:24 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-06 17:26:24 +0000 vgapci: Don't create a drm helper Simply speaking, being started the drm-kmod driver should create sysfs helpers, which is «drm» class devices, with the unit number 0, 128 and, perhaps 64. If a drm helper created by vgapci driver with the corresponding unit number exists then the drm-kmod driver initialize it by the device_initialize() lkpi method, otherwise drm-kmod driver create new «drm» device. For hw, where two or more different GPU installed, it's not guaranteed that the order of loading GPU drivers will be the same as the vgapci devices numbered. I.e., on hw where vgapci0 is Nvidia GPU and vgapci1 is Intel GPU, when drm-kmod loaded first it will use drm0 helper of vgapci0 device. There is no problem for drm-kmod driver unless we do not traverse device tree, as needed for https://reviews.freebsd.org/D38545. drm-kmod is ok for this change as it has fallback to create corresponding drm device. Reviewed by: Differential Revision: https://reviews.freebsd.org/D38546 --- sys/dev/pci/vga_pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 12a4057a474c..64847d37f0f6 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -373,8 +373,7 @@ vga_pci_attach(device_t dev) bus_generic_probe(dev); - /* Always create a drm child for now to make it easier on drm. */ - device_add_child(dev, "drm", -1); + /* Always create a drmn child for now to make it easier on drm. */ device_add_child(dev, "drmn", -1); bus_generic_attach(dev);