From nobody Mon Feb 13 21:09: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 4PFxmp2LzPz3q5Mx; Mon, 13 Feb 2023 21:09: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 4PFxmp1Z58z4RZQ; Mon, 13 Feb 2023 21:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322586; 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=66/kRhUkCSdUPS3FBLaKd0E23AnkDpQiEd/4g+koN5E=; b=e0ROi2XaekIyY4ForUoDb7BtKVoi6lL9fwxf8uVHD6yIgqoa5yajWyza68aHOpRFBiDzTl Yq0hmgHIo+kNEIFnf4sZB1iGnPqgft2naA0/wi4B9yIkyBRux6novWVUsnvaEMXw709fLi TUaeLqO421DtZ4p/eRG5OhfKYiG0UzdspxoBEuI5y2y2j4B+1e9rD2i6zH76/Vv3lIqgw2 3WMIscwiWlA+vRlo8mp53WqbRRiGtc7tgw+E0mAQjcjy7uZ0ORWFr3u3ti5K05Q5Qb2eeW aPvVjLHfSDYUucZ7fE9VR2C3qqRWwg4/nwtIICB/CV6mSQSZdaeJ7r6L/w/BSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676322586; 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=66/kRhUkCSdUPS3FBLaKd0E23AnkDpQiEd/4g+koN5E=; b=lM2dSI81gKd4+s4Bcbcm+Yknd3116weCNn9VmSfU5kUk5/1DvPuvez3XvWFu24Suve+kYj Vn9RCBH5LK9Jhou9UBIKn3H2Q+iLYc19ShBI4l69IpsPd5OhWuhNdeGM9DN305ANelvPhf 8gNWbT6mqLaTdQvu2P+b8VX7AmMiEkEUklZc1op78+/Dn0sgojImhqmn0B/etXVM6Vbrem raBVgvqGYlrjthpu/Mf1LCMXSA0MR1B6WO+WVHuH+G2AHdyOlpfYVdAbUeKADIcv/wI5R9 fHm9m6QFVz2OmiZ5ABvPH9HrBZWoz3qLMbxU33LUZEPTVZwu1poZJGgdQxhf0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676322586; a=rsa-sha256; cv=none; b=YHHexaYPHoIyjmBEo9/HNTaiopLEC0AZz4OvBZUFiIUXXjlCOqLCYvv4lOAg7v803ZuFnm he5fXVH2HuvHmJ0WmZMyg/AfCW+IzLCq/EQyc771uhQCHt5QewouQF0KZTMuMI6ld6DAm7 OuO8DV7rq9pZd4RnFYCSZ10DQ4dTTXdXFdGB3MTELyKFXYPGFH9srD0AJk/d9YoP2gmW33 GfV/1iJ2xmId+tUHAIaQMduK5MZ2EY5ZmVihBva/0s5CtD2xFBXxLNvWUrFFML8mpCqDJM PQV8sx/qd/qI8EHolDe3KmL/lTB7TcOcV92jWL2L84dfMcMq8rqXj9dn7UN6+Q== 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 4PFxmp0SPhzXrW; Mon, 13 Feb 2023 21:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31DL9jxw056319; Mon, 13 Feb 2023 21:09:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31DL9jSU056318; Mon, 13 Feb 2023 21:09:45 GMT (envelope-from git) Date: Mon, 13 Feb 2023 21:09:45 GMT Message-Id: <202302132109.31DL9jSU056318@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 1c6d8146fdec - main - linuxkpi: Update `vga_client_register()` and add `vga_client_unregister()` 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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c6d8146fdec8267712615c261bf6c8800f8ecfe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1c6d8146fdec8267712615c261bf6c8800f8ecfe commit 1c6d8146fdec8267712615c261bf6c8800f8ecfe Author: Jean-Sébastien Pédron AuthorDate: 2023-02-08 17:53:57 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-13 21:09:31 +0000 linuxkpi: Update `vga_client_register()` and add `vga_client_unregister()` For `vga_client_register()`, the API is modified twice in a row. To keep the API compatible with all commits in the DRM driver, we introduce two `LINUXKPI_VERSION` version bumps. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38533 --- sys/compat/linuxkpi/common/include/linux/vgaarb.h | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/vgaarb.h b/sys/compat/linuxkpi/common/include/linux/vgaarb.h index 853927f1c049..d43a88136864 100644 --- a/sys/compat/linuxkpi/common/include/linux/vgaarb.h +++ b/sys/compat/linuxkpi/common/include/linux/vgaarb.h @@ -239,16 +239,43 @@ static inline int vga_conflicts(struct pci_dev *p1, struct pci_dev *p2) * by userspace since we some older X servers have issues. */ #if defined(CONFIG_VGA_ARB) +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51501 +int vga_client_register(struct pci_dev *pdev, + unsigned int (*set_vga_decode)(struct pci_dev *pdev, bool state)); +#elif defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51500 +int vga_client_register(struct pci_dev *pdev, void *cookie, + unsigned int (*set_vga_decode)(void *cookie, bool state)); +#else int vga_client_register(struct pci_dev *pdev, void *cookie, void (*irq_set_state)(void *cookie, bool state), unsigned int (*set_vga_decode)(void *cookie, bool state)); +#endif +#else +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51501 +static inline int vga_client_register(struct pci_dev *pdev, + unsigned int (*set_vga_decode)(struct pci_dev *pdev, bool state)) +#elif defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51500 +static inline int vga_client_register(struct pci_dev *pdev, void *cookie, + unsigned int (*set_vga_decode)(void *cookie, bool state)) #else static inline int vga_client_register(struct pci_dev *pdev, void *cookie, void (*irq_set_state)(void *cookie, bool state), unsigned int (*set_vga_decode)(void *cookie, bool state)) +#endif { return 0; } + +static inline int vga_client_unregister(struct pci_dev *pdev) +{ +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51501 + return (vga_client_register(NULL, NULL)); +#elif defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51500 + return (vga_client_register(NULL, NULL, NULL)); +#else + return (vga_client_register(NULL, NULL, NULL, NULL)); +#endif +} #endif #endif /* _LINUXKPI_LINUX_VGA_H_ */