xref: /freebsd/sys/compat/linuxkpi/common/include/linux/vgaarb.h (revision 1c6d8146fdec8267712615c261bf6c8800f8ecfe)
14b4ab8c3SEmmanuel Vadot /*
24b4ab8c3SEmmanuel Vadot  * The VGA aribiter manages VGA space routing and VGA resource decode to
34b4ab8c3SEmmanuel Vadot  * allow multiple VGA devices to be used in a system in a safe way.
44b4ab8c3SEmmanuel Vadot  *
54b4ab8c3SEmmanuel Vadot  * (C) Copyright 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org>
64b4ab8c3SEmmanuel Vadot  * (C) Copyright 2007 Paulo R. Zanoni <przanoni@gmail.com>
74b4ab8c3SEmmanuel Vadot  * (C) Copyright 2007, 2009 Tiago Vignatti <vignatti@freedesktop.org>
84b4ab8c3SEmmanuel Vadot  *
94b4ab8c3SEmmanuel Vadot  * Permission is hereby granted, free of charge, to any person obtaining a
104b4ab8c3SEmmanuel Vadot  * copy of this software and associated documentation files (the "Software"),
114b4ab8c3SEmmanuel Vadot  * to deal in the Software without restriction, including without limitation
124b4ab8c3SEmmanuel Vadot  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
134b4ab8c3SEmmanuel Vadot  * and/or sell copies of the Software, and to permit persons to whom the
144b4ab8c3SEmmanuel Vadot  * Software is furnished to do so, subject to the following conditions:
154b4ab8c3SEmmanuel Vadot  *
164b4ab8c3SEmmanuel Vadot  * The above copyright notice and this permission notice (including the next
174b4ab8c3SEmmanuel Vadot  * paragraph) shall be included in all copies or substantial portions of the
184b4ab8c3SEmmanuel Vadot  * Software.
194b4ab8c3SEmmanuel Vadot  *
204b4ab8c3SEmmanuel Vadot  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
214b4ab8c3SEmmanuel Vadot  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
224b4ab8c3SEmmanuel Vadot  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
234b4ab8c3SEmmanuel Vadot  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
244b4ab8c3SEmmanuel Vadot  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
254b4ab8c3SEmmanuel Vadot  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
264b4ab8c3SEmmanuel Vadot  * DEALINGS
274b4ab8c3SEmmanuel Vadot  * IN THE SOFTWARE.
284b4ab8c3SEmmanuel Vadot  *
294b4ab8c3SEmmanuel Vadot  */
304b4ab8c3SEmmanuel Vadot 
314b4ab8c3SEmmanuel Vadot #ifndef _LINUXKPI_LINUX_VGA_H_
324b4ab8c3SEmmanuel Vadot #define	_LINUXKPI_LINUX_VGA_H_
334b4ab8c3SEmmanuel Vadot 
344b4ab8c3SEmmanuel Vadot #include <video/vga.h>
354b4ab8c3SEmmanuel Vadot 
364b4ab8c3SEmmanuel Vadot /* Legacy VGA regions */
374b4ab8c3SEmmanuel Vadot #define VGA_RSRC_NONE	       0x00
384b4ab8c3SEmmanuel Vadot #define VGA_RSRC_LEGACY_IO     0x01
394b4ab8c3SEmmanuel Vadot #define VGA_RSRC_LEGACY_MEM    0x02
404b4ab8c3SEmmanuel Vadot #define VGA_RSRC_LEGACY_MASK   (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM)
414b4ab8c3SEmmanuel Vadot /* Non-legacy access */
424b4ab8c3SEmmanuel Vadot #define VGA_RSRC_NORMAL_IO     0x04
434b4ab8c3SEmmanuel Vadot #define VGA_RSRC_NORMAL_MEM    0x08
444b4ab8c3SEmmanuel Vadot 
454b4ab8c3SEmmanuel Vadot /* Passing that instead of a pci_dev to use the system "default"
464b4ab8c3SEmmanuel Vadot  * device, that is the one used by vgacon. Archs will probably
474b4ab8c3SEmmanuel Vadot  * have to provide their own vga_default_device();
484b4ab8c3SEmmanuel Vadot  */
494b4ab8c3SEmmanuel Vadot #define VGA_DEFAULT_DEVICE     (NULL)
504b4ab8c3SEmmanuel Vadot 
514b4ab8c3SEmmanuel Vadot struct pci_dev;
524b4ab8c3SEmmanuel Vadot 
534b4ab8c3SEmmanuel Vadot /* For use by clients */
544b4ab8c3SEmmanuel Vadot 
554b4ab8c3SEmmanuel Vadot /**
564b4ab8c3SEmmanuel Vadot  *     vga_set_legacy_decoding
574b4ab8c3SEmmanuel Vadot  *
584b4ab8c3SEmmanuel Vadot  *     @pdev: pci device of the VGA card
594b4ab8c3SEmmanuel Vadot  *     @decodes: bit mask of what legacy regions the card decodes
604b4ab8c3SEmmanuel Vadot  *
614b4ab8c3SEmmanuel Vadot  *     Indicates to the arbiter if the card decodes legacy VGA IOs,
624b4ab8c3SEmmanuel Vadot  *     legacy VGA Memory, both, or none. All cards default to both,
634b4ab8c3SEmmanuel Vadot  *     the card driver (fbdev for example) should tell the arbiter
644b4ab8c3SEmmanuel Vadot  *     if it has disabled legacy decoding, so the card can be left
654b4ab8c3SEmmanuel Vadot  *     out of the arbitration process (and can be safe to take
664b4ab8c3SEmmanuel Vadot  *     interrupts at any time.
674b4ab8c3SEmmanuel Vadot  */
684b4ab8c3SEmmanuel Vadot #if defined(CONFIG_VGA_ARB)
694b4ab8c3SEmmanuel Vadot extern void vga_set_legacy_decoding(struct pci_dev *pdev,
704b4ab8c3SEmmanuel Vadot 				    unsigned int decodes);
714b4ab8c3SEmmanuel Vadot #else
vga_set_legacy_decoding(struct pci_dev * pdev,unsigned int decodes)724b4ab8c3SEmmanuel Vadot static inline void vga_set_legacy_decoding(struct pci_dev *pdev,
734b4ab8c3SEmmanuel Vadot 					   unsigned int decodes) { };
744b4ab8c3SEmmanuel Vadot #endif
754b4ab8c3SEmmanuel Vadot 
764b4ab8c3SEmmanuel Vadot /**
774b4ab8c3SEmmanuel Vadot  *     vga_get         - acquire & locks VGA resources
784b4ab8c3SEmmanuel Vadot  *
794b4ab8c3SEmmanuel Vadot  *     @pdev: pci device of the VGA card or NULL for the system default
804b4ab8c3SEmmanuel Vadot  *     @rsrc: bit mask of resources to acquire and lock
814b4ab8c3SEmmanuel Vadot  *     @interruptible: blocking should be interruptible by signals ?
824b4ab8c3SEmmanuel Vadot  *
834b4ab8c3SEmmanuel Vadot  *     This function acquires VGA resources for the given
844b4ab8c3SEmmanuel Vadot  *     card and mark those resources locked. If the resource requested
854b4ab8c3SEmmanuel Vadot  *     are "normal" (and not legacy) resources, the arbiter will first check
864b4ab8c3SEmmanuel Vadot  *     whether the card is doing legacy decoding for that type of resource. If
874b4ab8c3SEmmanuel Vadot  *     yes, the lock is "converted" into a legacy resource lock.
884b4ab8c3SEmmanuel Vadot  *     The arbiter will first look for all VGA cards that might conflict
894b4ab8c3SEmmanuel Vadot  *     and disable their IOs and/or Memory access, including VGA forwarding
904b4ab8c3SEmmanuel Vadot  *     on P2P bridges if necessary, so that the requested resources can
914b4ab8c3SEmmanuel Vadot  *     be used. Then, the card is marked as locking these resources and
924b4ab8c3SEmmanuel Vadot  *     the IO and/or Memory accesse are enabled on the card (including
934b4ab8c3SEmmanuel Vadot  *     VGA forwarding on parent P2P bridges if any).
944b4ab8c3SEmmanuel Vadot  *     This function will block if some conflicting card is already locking
954b4ab8c3SEmmanuel Vadot  *     one of the required resources (or any resource on a different bus
964b4ab8c3SEmmanuel Vadot  *     segment, since P2P bridges don't differenciate VGA memory and IO
974b4ab8c3SEmmanuel Vadot  *     afaik). You can indicate whether this blocking should be interruptible
984b4ab8c3SEmmanuel Vadot  *     by a signal (for userland interface) or not.
994b4ab8c3SEmmanuel Vadot  *     Must not be called at interrupt time or in atomic context.
1004b4ab8c3SEmmanuel Vadot  *     If the card already owns the resources, the function succeeds.
1014b4ab8c3SEmmanuel Vadot  *     Nested calls are supported (a per-resource counter is maintained)
1024b4ab8c3SEmmanuel Vadot  */
1034b4ab8c3SEmmanuel Vadot 
1044b4ab8c3SEmmanuel Vadot #if defined(CONFIG_VGA_ARB)
1054b4ab8c3SEmmanuel Vadot extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible);
1064b4ab8c3SEmmanuel Vadot #else
vga_get(struct pci_dev * pdev,unsigned int rsrc,int interruptible)1074b4ab8c3SEmmanuel Vadot static inline int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible) { return 0; }
1084b4ab8c3SEmmanuel Vadot #endif
1094b4ab8c3SEmmanuel Vadot 
1104b4ab8c3SEmmanuel Vadot /**
1114b4ab8c3SEmmanuel Vadot  *     vga_get_interruptible
1124b4ab8c3SEmmanuel Vadot  *
1134b4ab8c3SEmmanuel Vadot  *     Shortcut to vga_get
1144b4ab8c3SEmmanuel Vadot  */
1154b4ab8c3SEmmanuel Vadot 
vga_get_interruptible(struct pci_dev * pdev,unsigned int rsrc)1164b4ab8c3SEmmanuel Vadot static inline int vga_get_interruptible(struct pci_dev *pdev,
1174b4ab8c3SEmmanuel Vadot 					unsigned int rsrc)
1184b4ab8c3SEmmanuel Vadot {
1194b4ab8c3SEmmanuel Vadot        return vga_get(pdev, rsrc, 1);
1204b4ab8c3SEmmanuel Vadot }
1214b4ab8c3SEmmanuel Vadot 
1224b4ab8c3SEmmanuel Vadot /**
1234b4ab8c3SEmmanuel Vadot  *     vga_get_uninterruptible
1244b4ab8c3SEmmanuel Vadot  *
1254b4ab8c3SEmmanuel Vadot  *     Shortcut to vga_get
1264b4ab8c3SEmmanuel Vadot  */
1274b4ab8c3SEmmanuel Vadot 
vga_get_uninterruptible(struct pci_dev * pdev,unsigned int rsrc)1284b4ab8c3SEmmanuel Vadot static inline int vga_get_uninterruptible(struct pci_dev *pdev,
1294b4ab8c3SEmmanuel Vadot 					  unsigned int rsrc)
1304b4ab8c3SEmmanuel Vadot {
1314b4ab8c3SEmmanuel Vadot        return vga_get(pdev, rsrc, 0);
1324b4ab8c3SEmmanuel Vadot }
1334b4ab8c3SEmmanuel Vadot 
1344b4ab8c3SEmmanuel Vadot /**
1354b4ab8c3SEmmanuel Vadot  *     vga_tryget      - try to acquire & lock legacy VGA resources
1364b4ab8c3SEmmanuel Vadot  *
1374b4ab8c3SEmmanuel Vadot  *     @pdev: pci devivce of VGA card or NULL for system default
1384b4ab8c3SEmmanuel Vadot  *     @rsrc: bit mask of resources to acquire and lock
1394b4ab8c3SEmmanuel Vadot  *
1404b4ab8c3SEmmanuel Vadot  *     This function performs the same operation as vga_get(), but
1414b4ab8c3SEmmanuel Vadot  *     will return an error (-EBUSY) instead of blocking if the resources
1424b4ab8c3SEmmanuel Vadot  *     are already locked by another card. It can be called in any context
1434b4ab8c3SEmmanuel Vadot  */
1444b4ab8c3SEmmanuel Vadot 
1454b4ab8c3SEmmanuel Vadot #if defined(CONFIG_VGA_ARB)
1464b4ab8c3SEmmanuel Vadot extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc);
1474b4ab8c3SEmmanuel Vadot #else
vga_tryget(struct pci_dev * pdev,unsigned int rsrc)1484b4ab8c3SEmmanuel Vadot static inline int vga_tryget(struct pci_dev *pdev, unsigned int rsrc) { return 0; }
1494b4ab8c3SEmmanuel Vadot #endif
1504b4ab8c3SEmmanuel Vadot 
1514b4ab8c3SEmmanuel Vadot /**
1524b4ab8c3SEmmanuel Vadot  *     vga_put         - release lock on legacy VGA resources
1534b4ab8c3SEmmanuel Vadot  *
1544b4ab8c3SEmmanuel Vadot  *     @pdev: pci device of VGA card or NULL for system default
1554b4ab8c3SEmmanuel Vadot  *     @rsrc: but mask of resource to release
1564b4ab8c3SEmmanuel Vadot  *
1574b4ab8c3SEmmanuel Vadot  *     This function releases resources previously locked by vga_get()
1584b4ab8c3SEmmanuel Vadot  *     or vga_tryget(). The resources aren't disabled right away, so
1594b4ab8c3SEmmanuel Vadot  *     that a subsequence vga_get() on the same card will succeed
1604b4ab8c3SEmmanuel Vadot  *     immediately. Resources have a counter, so locks are only
1614b4ab8c3SEmmanuel Vadot  *     released if the counter reaches 0.
1624b4ab8c3SEmmanuel Vadot  */
1634b4ab8c3SEmmanuel Vadot 
1644b4ab8c3SEmmanuel Vadot #if defined(CONFIG_VGA_ARB)
1654b4ab8c3SEmmanuel Vadot extern void vga_put(struct pci_dev *pdev, unsigned int rsrc);
1664b4ab8c3SEmmanuel Vadot #else
1674b4ab8c3SEmmanuel Vadot #define vga_put(pdev, rsrc)
1684b4ab8c3SEmmanuel Vadot #endif
1694b4ab8c3SEmmanuel Vadot 
1704b4ab8c3SEmmanuel Vadot 
1714b4ab8c3SEmmanuel Vadot /**
1724b4ab8c3SEmmanuel Vadot  *     vga_default_device
1734b4ab8c3SEmmanuel Vadot  *
1744b4ab8c3SEmmanuel Vadot  *     This can be defined by the platform. The default implementation
1754b4ab8c3SEmmanuel Vadot  *     is rather dumb and will probably only work properly on single
1764b4ab8c3SEmmanuel Vadot  *     vga card setups and/or x86 platforms.
1774b4ab8c3SEmmanuel Vadot  *
1784b4ab8c3SEmmanuel Vadot  *     If your VGA default device is not PCI, you'll have to return
1794b4ab8c3SEmmanuel Vadot  *     NULL here. In this case, I assume it will not conflict with
1804b4ab8c3SEmmanuel Vadot  *     any PCI card. If this is not true, I'll have to define two archs
1814b4ab8c3SEmmanuel Vadot  *     hooks for enabling/disabling the VGA default device if that is
1824b4ab8c3SEmmanuel Vadot  *     possible. This may be a problem with real _ISA_ VGA cards, in
1834b4ab8c3SEmmanuel Vadot  *     addition to a PCI one. I don't know at this point how to deal
1844b4ab8c3SEmmanuel Vadot  *     with that card. Can theirs IOs be disabled at all ? If not, then
1854b4ab8c3SEmmanuel Vadot  *     I suppose it's a matter of having the proper arch hook telling
1864b4ab8c3SEmmanuel Vadot  *     us about it, so we basically never allow anybody to succeed a
1874b4ab8c3SEmmanuel Vadot  *     vga_get()...
1884b4ab8c3SEmmanuel Vadot  */
1894b4ab8c3SEmmanuel Vadot 
1904b4ab8c3SEmmanuel Vadot #ifdef CONFIG_VGA_ARB
1914b4ab8c3SEmmanuel Vadot extern struct pci_dev *vga_default_device(void);
1924b4ab8c3SEmmanuel Vadot extern void vga_set_default_device(struct pci_dev *pdev);
1934b4ab8c3SEmmanuel Vadot #else
vga_default_device(void)1944b4ab8c3SEmmanuel Vadot static inline struct pci_dev *vga_default_device(void) { return NULL; };
vga_set_default_device(struct pci_dev * pdev)1954b4ab8c3SEmmanuel Vadot static inline void vga_set_default_device(struct pci_dev *pdev) { };
1964b4ab8c3SEmmanuel Vadot #endif
1974b4ab8c3SEmmanuel Vadot 
1984b4ab8c3SEmmanuel Vadot /**
1994b4ab8c3SEmmanuel Vadot  *     vga_conflicts
2004b4ab8c3SEmmanuel Vadot  *
2014b4ab8c3SEmmanuel Vadot  *     Architectures should define this if they have several
2024b4ab8c3SEmmanuel Vadot  *     independent PCI domains that can afford concurrent VGA
2034b4ab8c3SEmmanuel Vadot  *     decoding
2044b4ab8c3SEmmanuel Vadot  */
2054b4ab8c3SEmmanuel Vadot 
2064b4ab8c3SEmmanuel Vadot #ifndef __ARCH_HAS_VGA_CONFLICT
vga_conflicts(struct pci_dev * p1,struct pci_dev * p2)2074b4ab8c3SEmmanuel Vadot static inline int vga_conflicts(struct pci_dev *p1, struct pci_dev *p2)
2084b4ab8c3SEmmanuel Vadot {
2094b4ab8c3SEmmanuel Vadot        return 1;
2104b4ab8c3SEmmanuel Vadot }
2114b4ab8c3SEmmanuel Vadot #endif
2124b4ab8c3SEmmanuel Vadot 
2134b4ab8c3SEmmanuel Vadot /**
2144b4ab8c3SEmmanuel Vadot  *	vga_client_register
2154b4ab8c3SEmmanuel Vadot  *
2164b4ab8c3SEmmanuel Vadot  *	@pdev: pci device of the VGA client
2174b4ab8c3SEmmanuel Vadot  *	@cookie: client cookie to be used in callbacks
2184b4ab8c3SEmmanuel Vadot  *	@irq_set_state: irq state change callback
2194b4ab8c3SEmmanuel Vadot  *	@set_vga_decode: vga decode change callback
2204b4ab8c3SEmmanuel Vadot  *
2214b4ab8c3SEmmanuel Vadot  * 	return value: 0 on success, -1 on failure
2224b4ab8c3SEmmanuel Vadot  * 	Register a client with the VGA arbitration logic
2234b4ab8c3SEmmanuel Vadot  *
2244b4ab8c3SEmmanuel Vadot  *	Clients have two callback mechanisms they can use.
2254b4ab8c3SEmmanuel Vadot  *	irq enable/disable callback -
2264b4ab8c3SEmmanuel Vadot  *		If a client can't disable its GPUs VGA resources, then we
2274b4ab8c3SEmmanuel Vadot  *		need to be able to ask it to turn off its irqs when we
2284b4ab8c3SEmmanuel Vadot  *		turn off its mem and io decoding.
2294b4ab8c3SEmmanuel Vadot  *	set_vga_decode
2304b4ab8c3SEmmanuel Vadot  *		If a client can disable its GPU VGA resource, it will
2314b4ab8c3SEmmanuel Vadot  *		get a callback from this to set the encode/decode state
2324b4ab8c3SEmmanuel Vadot  *
2334b4ab8c3SEmmanuel Vadot  * Rationale: we cannot disable VGA decode resources unconditionally
2344b4ab8c3SEmmanuel Vadot  * some single GPU laptops seem to require ACPI or BIOS access to the
2354b4ab8c3SEmmanuel Vadot  * VGA registers to control things like backlights etc.
2364b4ab8c3SEmmanuel Vadot  * Hopefully newer multi-GPU laptops do something saner, and desktops
2374b4ab8c3SEmmanuel Vadot  * won't have any special ACPI for this.
2384b4ab8c3SEmmanuel Vadot  * They driver will get a callback when VGA arbitration is first used
2394b4ab8c3SEmmanuel Vadot  * by userspace since we some older X servers have issues.
2404b4ab8c3SEmmanuel Vadot  */
2414b4ab8c3SEmmanuel Vadot #if defined(CONFIG_VGA_ARB)
242*1c6d8146SJean-Sébastien Pédron #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51501
243*1c6d8146SJean-Sébastien Pédron int vga_client_register(struct pci_dev *pdev,
244*1c6d8146SJean-Sébastien Pédron 			unsigned int (*set_vga_decode)(struct pci_dev *pdev, bool state));
245*1c6d8146SJean-Sébastien Pédron #elif defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51500
246*1c6d8146SJean-Sébastien Pédron int vga_client_register(struct pci_dev *pdev, void *cookie,
247*1c6d8146SJean-Sébastien Pédron 			unsigned int (*set_vga_decode)(void *cookie, bool state));
248*1c6d8146SJean-Sébastien Pédron #else
2494b4ab8c3SEmmanuel Vadot int vga_client_register(struct pci_dev *pdev, void *cookie,
2504b4ab8c3SEmmanuel Vadot 			void (*irq_set_state)(void *cookie, bool state),
2514b4ab8c3SEmmanuel Vadot 			unsigned int (*set_vga_decode)(void *cookie, bool state));
252*1c6d8146SJean-Sébastien Pédron #endif
253*1c6d8146SJean-Sébastien Pédron #else
254*1c6d8146SJean-Sébastien Pédron #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51501
vga_client_register(struct pci_dev * pdev,unsigned int (* set_vga_decode)(struct pci_dev * pdev,bool state))255*1c6d8146SJean-Sébastien Pédron static inline int vga_client_register(struct pci_dev *pdev,
256*1c6d8146SJean-Sébastien Pédron 				      unsigned int (*set_vga_decode)(struct pci_dev *pdev, bool state))
257*1c6d8146SJean-Sébastien Pédron #elif defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51500
258*1c6d8146SJean-Sébastien Pédron static inline int vga_client_register(struct pci_dev *pdev, void *cookie,
259*1c6d8146SJean-Sébastien Pédron 				      unsigned int (*set_vga_decode)(void *cookie, bool state))
2604b4ab8c3SEmmanuel Vadot #else
2614b4ab8c3SEmmanuel Vadot static inline int vga_client_register(struct pci_dev *pdev, void *cookie,
2624b4ab8c3SEmmanuel Vadot 				      void (*irq_set_state)(void *cookie, bool state),
2634b4ab8c3SEmmanuel Vadot 				      unsigned int (*set_vga_decode)(void *cookie, bool state))
264*1c6d8146SJean-Sébastien Pédron #endif
2654b4ab8c3SEmmanuel Vadot {
2664b4ab8c3SEmmanuel Vadot 	return 0;
2674b4ab8c3SEmmanuel Vadot }
268*1c6d8146SJean-Sébastien Pédron 
vga_client_unregister(struct pci_dev * pdev)269*1c6d8146SJean-Sébastien Pédron static inline int vga_client_unregister(struct pci_dev *pdev)
270*1c6d8146SJean-Sébastien Pédron {
271*1c6d8146SJean-Sébastien Pédron #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51501
272*1c6d8146SJean-Sébastien Pédron 	return (vga_client_register(NULL, NULL));
273*1c6d8146SJean-Sébastien Pédron #elif defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51500
274*1c6d8146SJean-Sébastien Pédron 	return (vga_client_register(NULL, NULL, NULL));
275*1c6d8146SJean-Sébastien Pédron #else
276*1c6d8146SJean-Sébastien Pédron 	return (vga_client_register(NULL, NULL, NULL, NULL));
277*1c6d8146SJean-Sébastien Pédron #endif
278*1c6d8146SJean-Sébastien Pédron }
2794b4ab8c3SEmmanuel Vadot #endif
2804b4ab8c3SEmmanuel Vadot 
2814b4ab8c3SEmmanuel Vadot #endif /* _LINUXKPI_LINUX_VGA_H_ */
282