video-sti.c 650 B

123456789101112131415161718192021222324252627
  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. #include <linux/module.h>
  8. #include <video/sticore.h>
  9. #include <asm/video.h>
  10. bool video_is_primary_device(struct device *dev)
  11. {
  12. struct sti_struct *sti;
  13. sti = sti_get_rom(0);
  14. /* if no built-in graphics card found, allow any fb driver as default */
  15. if (!sti)
  16. return true;
  17. /* return true if it's the default built-in framebuffer driver */
  18. return (sti->dev == dev);
  19. }
  20. EXPORT_SYMBOL(video_is_primary_device);