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