From nobody Fri Nov 20 18:19:34 2026 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 4jWNsL4x5hz72P2X for ; Fri, 20 Nov 2026 18:19:34 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jWNsL22RCz3CVD for ; Fri, 20 Nov 2026 18:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795198774; 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=IUliaVMsLU+epBbN75wfa5+lXWGF1li1XoF+ThSHpWc=; b=LXZpLrKnTkWEUbETrsJaXsIwpzHqc1+TDMzmmD+/c4moYVZCY7ewhhe+BlOYaaVlTEfQua Nll0y23nEbEIXhXtop+NwfgPYr3J9n+4NcsDNRL1EsLEKi5WT+75I1Cq4CWCO/Rr7XVdAa QBjbzMGX5I7ixzCBrWJbYXaS30WMpYCQ3P7NFMuFe4kY7o6Bue2sYoXfXVzDFBkQBP2EK2 PoS/fNG0K1SKgo/iZZ6jZHrqDD0CvPeo/R2H62xYgGdeAEZv8KLcdFtTnQO/0t1FQq0eZl hgkwdAv2KUmfCO+eBCbUck17OEQQbcFd3cayMWVE1g2jHcAncH3MLxTZaJr/3Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795198774; b=Ti5TYlmW1REzVr4ngpqFPF3CwGFjldjru4ZyEeF6RLF/OFC5HrBj0c8vPbO6O/5r7x5XHt VYq8NoLB7ELmOLG5RSzDHoLD2VfLBEPzK/owxNmidJDzcY4bUi89Ng93Ghse+tFf1tJz78 OeYfwvvnEq8Kwc2Z8Lk0ldNAk/tdUdB1e/GQLyBfFQiiRoJaNbKNaqT5cV9QW4zZ3akiwQ /l02WDelsLfhQ9EawJUkCRekaCKxf+JbeLB+TY6AJ5ZsK1dPoZHHFCoSRJ8ohepptAFM/G 4LeWS+b7nYmTuZ2GTBrwULjVkSqVS1vTyBAB+Z6Qrfq+pYW+SPu9x+8QwhBH+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795198774; 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=IUliaVMsLU+epBbN75wfa5+lXWGF1li1XoF+ThSHpWc=; b=jwqTXIJwOW8f3os9UgKDxpqHLw5G92k4iro1H2gAqxBi5Oc44g2umk1JCh4o2CWJvadVyX DHcCVm+DfqJ6eT8/+4SCFcflywKVU/6DSqPQyHkK0M/TAozSBY4muat21UWcc1sGehNxs9 lyHW1WHYJ/gplnK8lNE8lrI55FFyWGZmU4M+DNTWwDBCUTFOdS3XBEUZ4pvTVnTRgJEiGd cB06mcCTHZwfvq8DocApLYw/E1zsItbPgdDnLQe8XRzmPQNXWpqSxAsu7DSH8ZUwRhlhFx 59lnoFBrlQ/Gs6ewSJG0cf3v2D93PN6T61FHLhIyVP6pBT4m0ZpEmQC8iVqlMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jWNsL1FQqz10Nm for ; Fri, 20 Nov 2026 18:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e21 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Nov 2026 18:19:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 9e4dfe63a77a - main - LinuxKPI: Add PCI method for transferring framebuffer parameters List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e4dfe63a77a57727c7be14eb9513e8b308cdf07 Auto-Submitted: auto-generated Date: Fri, 20 Nov 2026 18:19:34 +0000 Message-Id: <6b008f36.3e21.13b2cd2@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=9e4dfe63a77a57727c7be14eb9513e8b308cdf07 commit 9e4dfe63a77a57727c7be14eb9513e8b308cdf07 Author: Vladimir Kondratyev AuthorDate: 2026-11-20 18:17:58 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-11-20 18:17:58 +0000 LinuxKPI: Add PCI method for transferring framebuffer parameters from LKPI video driver to FreeBSD native framebuffer driver. This makes possible to attach framebuffer driver in traditional way using newbus interface rather than direct calls into vt internals. It is required to make LKPI framebuffer driver compatible with fbd/vt_fb. As a consequence that allows us to switch back to vt_fb on radeon driver where vt_drmfb regressions have been reported [1]. The method expects fbd device ivars pointed to FreeBSD fb_info structure embedded in to Linux fb_info structure. See linux/fb.h. Note that some out-of-tree non-PCI drm drivers may require similar changes in parent bus drivers. [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285088 PR: 285088 Differential Revision: https://reviews.freebsd.org/D60038 --- sys/compat/linuxkpi/common/src/linux_pci.c | 23 +++++++++++++++++++++++ sys/modules/linuxkpi/Makefile | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 365bd2c020b2..d095b5be8ba9 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -82,6 +83,7 @@ #include #include "backlight_if.h" +#include "fb_if.h" #include "pcib_if.h" /* -------------------------------------------------------------------------- */ @@ -2551,6 +2553,23 @@ linux_backlight_device_unregister(struct backlight_device *bd) free(bd, M_DEVBUF); } +static struct fb_info * +lkpi_fb_helper_getinfo(device_t dev) +{ + struct pci_dev *pdev; + device_t fbd; + + pdev = device_get_softc(dev); + if (pdev->pdrv == NULL || !pdev->pdrv->isdrm) + return (NULL); + + fbd = device_find_child(dev, "fbd", -1); + if (fbd == NULL) + return (NULL); + + return (device_get_ivars(fbd)); +} + /* -------------------------------------------------------------------------- */ /* Native bus attachment glue. */ @@ -2573,5 +2592,9 @@ static device_method_t pci_methods[] = { DEVMETHOD(backlight_update_status, lkpi_backlight_update_status), DEVMETHOD(backlight_get_status, lkpi_backlight_get_status), DEVMETHOD(backlight_get_info, lkpi_backlight_get_info), + + /* Framebuffer service methods */ + DEVMETHOD(fb_getinfo, lkpi_fb_helper_getinfo), + DEVMETHOD_END }; diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index 97319194946e..c0e248099115 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -50,7 +50,7 @@ SRCS+= opt_acpi.h acpi_if.h linux_acpi.c SRCS+= opt_apic.h .endif -SRCS+= opt_ddb.h +SRCS+= fb_if.h opt_ddb.h SRCS+= ${LINUXKPI_GENSRCS} CFLAGS+= ${LINUXKPI_INCLUDES}