Commit | Line | Data |
---|---|---|
cf41d18b TZ |
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 | ||
cf41d18b TZ |
10 | #include <video/sticore.h> |
11 | ||
2fd001cd | 12 | #include <asm/video.h> |
f178e96d TZ |
13 | |
14 | bool video_is_primary_device(struct device *dev) | |
cf41d18b TZ |
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 */ | |
f178e96d | 25 | return (sti->dev == dev); |
cf41d18b | 26 | } |
f178e96d | 27 | EXPORT_SYMBOL(video_is_primary_device); |