linux/include/linux/sysfb.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _LINUX_SYSFB_H
#define _LINUX_SYSFB_H

/*
 * Generic System Framebuffers on x86
 * Copyright (c) 2012-2013 David Herrmann <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/platform_data/simplefb.h>

struct screen_info;

enum {};

struct efifb_dmi_info {};

#ifdef CONFIG_SYSFB

void sysfb_disable(void);

#else /* CONFIG_SYSFB */

static inline void sysfb_disable(void)
{
}

#endif /* CONFIG_SYSFB */

#ifdef CONFIG_EFI

extern struct efifb_dmi_info efifb_dmi_list[];
void sysfb_apply_efi_quirks(void);
void sysfb_set_efifb_fwnode(struct platform_device *pd);

#else /* CONFIG_EFI */

static inline void sysfb_apply_efi_quirks(void)
{
}

static inline void sysfb_set_efifb_fwnode(struct platform_device *pd)
{
}

#endif /* CONFIG_EFI */

#ifdef CONFIG_SYSFB_SIMPLEFB

bool sysfb_parse_mode(const struct screen_info *si,
		      struct simplefb_platform_data *mode);
struct platform_device *sysfb_create_simplefb(const struct screen_info *si,
					      const struct simplefb_platform_data *mode,
					      struct device *parent);

#else /* CONFIG_SYSFB_SIMPLE */

static inline bool sysfb_parse_mode(const struct screen_info *si,
				    struct simplefb_platform_data *mode)
{
	return false;
}

static inline struct platform_device *sysfb_create_simplefb(const struct screen_info *si,
							    const struct simplefb_platform_data *mode,
							    struct device *parent)
{
	return ERR_PTR(-EINVAL);
}

#endif /* CONFIG_SYSFB_SIMPLE */

#endif /* _LINUX_SYSFB_H */