xref: /linux/arch/parisc/video/video-sti.c (revision 375c4d1583948cf2439833e4a85d5a0aee853895)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
4  * Copyright (C) 2001-2020 Helge Deller <deller@gmx.de>
5  * Copyright (C) 2001-2002 Thomas Bogendoerfer <tsbogend@alpha.franken.de>
6  */
7 
8 #include <linux/module.h>
9 
10 #include <video/sticore.h>
11 
12 #include <asm/video.h>
13 
14 bool video_is_primary_device(struct device *dev)
15 {
16 	struct sti_struct *sti;
17 
18 	sti = sti_get_rom(0);
19 
20 	/* if no built-in graphics card found, allow any fb driver as default */
21 	if (!sti)
22 		return true;
23 
24 	/* return true if it's the default built-in framebuffer driver */
25 	return (sti->dev == dev);
26 }
27 EXPORT_SYMBOL(video_is_primary_device);
28