#include <linux/aperture.h>
#include <linux/kernel.h>
#include <linux/efi.h>
#include <linux/efi-bgrt.h>
#include <linux/errno.h>
#include <linux/fb.h>
#include <linux/platform_device.h>
#include <linux/printk.h>
#include <linux/screen_info.h>
#include <video/vga.h>
#include <asm/efi.h>
#include <drm/drm_utils.h>
#include <drm/drm_connector.h>
struct bmp_file_header { … } __packed;
struct bmp_dib_header { … } __packed;
static bool use_bgrt = …;
static bool request_mem_succeeded = …;
static u64 mem_flags = …;
struct efifb_par { … };
static struct fb_var_screeninfo efifb_defined = …;
static struct fb_fix_screeninfo efifb_fix = …;
static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green,
unsigned blue, unsigned transp,
struct fb_info *info)
{ … }
#if defined CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER && \
defined CONFIG_ACPI_BGRT
static void efifb_copy_bmp(u8 *src, u32 *dst, int width, const struct screen_info *si)
{ … }
#ifdef CONFIG_X86
static bool efifb_bgrt_sanity_check(const struct screen_info *si, u32 bmp_width)
{ … }
#else
static bool efifb_bgrt_sanity_check(const struct screen_info *si, u32 bmp_width)
{
return true;
}
#endif
static void efifb_show_boot_graphics(struct fb_info *info, const struct screen_info *si)
{ … }
#else
static inline void efifb_show_boot_graphics(struct fb_info *info, const struct screen_info *si)
{ }
#endif
static void efifb_destroy(struct fb_info *info)
{ … }
static const struct fb_ops efifb_ops = …;
static int efifb_setup(struct screen_info *si, char *options)
{ … }
static inline bool fb_base_is_valid(struct screen_info *si)
{ … }
#define efifb_attr_decl(name, fmt) …
efifb_attr_decl(…);
efifb_attr_decl(…);
efifb_attr_decl(…);
efifb_attr_decl(…);
efifb_attr_decl(…);
static struct attribute *efifb_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int efifb_probe(struct platform_device *dev)
{ … }
static struct platform_driver efifb_driver = …;
builtin_platform_driver(…) …;