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/fb.h> 9 #include <linux/module.h> 10 11 #include <video/sticore.h> 12 13 int fb_is_primary_device(struct fb_info *info) 14 { 15 struct sti_struct *sti; 16 17 sti = sti_get_rom(0); 18 19 /* if no built-in graphics card found, allow any fb driver as default */ 20 if (!sti) 21 return true; 22 23 /* return true if it's the default built-in framebuffer driver */ 24 return (sti->info == info); 25 } 26 EXPORT_SYMBOL(fb_is_primary_device); 27