#include <linux/clk.h>
#include <linux/of_clk.h>
#include <linux/minmax.h>
#include <linux/of_address.h>
#include <linux/platform_data/simplefb.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/regulator/consumer.h>
#include <drm/drm_aperture.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_state_helper.h>
#include <drm/drm_connector.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_device.h>
#include <drm/drm_drv.h>
#include <drm/drm_fbdev_shmem.h>
#include <drm/drm_format_helper.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_gem_shmem_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_panic.h>
#include <drm/drm_probe_helper.h>
#define DRIVER_NAME …
#define DRIVER_DESC …
#define DRIVER_DATE …
#define DRIVER_MAJOR …
#define DRIVER_MINOR …
static int
simplefb_get_validated_int(struct drm_device *dev, const char *name,
uint32_t value)
{ … }
static int
simplefb_get_validated_int0(struct drm_device *dev, const char *name,
uint32_t value)
{ … }
static const struct drm_format_info *
simplefb_get_validated_format(struct drm_device *dev, const char *format_name)
{ … }
static int
simplefb_get_width_pd(struct drm_device *dev,
const struct simplefb_platform_data *pd)
{ … }
static int
simplefb_get_height_pd(struct drm_device *dev,
const struct simplefb_platform_data *pd)
{ … }
static int
simplefb_get_stride_pd(struct drm_device *dev,
const struct simplefb_platform_data *pd)
{ … }
static const struct drm_format_info *
simplefb_get_format_pd(struct drm_device *dev,
const struct simplefb_platform_data *pd)
{ … }
static int
simplefb_read_u32_of(struct drm_device *dev, struct device_node *of_node,
const char *name, u32 *value)
{ … }
static int
simplefb_read_string_of(struct drm_device *dev, struct device_node *of_node,
const char *name, const char **value)
{ … }
static int
simplefb_get_width_of(struct drm_device *dev, struct device_node *of_node)
{ … }
static int
simplefb_get_height_of(struct drm_device *dev, struct device_node *of_node)
{ … }
static int
simplefb_get_stride_of(struct drm_device *dev, struct device_node *of_node)
{ … }
static const struct drm_format_info *
simplefb_get_format_of(struct drm_device *dev, struct device_node *of_node)
{ … }
static struct resource *
simplefb_get_memory_of(struct drm_device *dev, struct device_node *of_node)
{ … }
struct simpledrm_device { … };
static struct simpledrm_device *simpledrm_device_of_dev(struct drm_device *dev)
{ … }
#if defined CONFIG_OF && defined CONFIG_COMMON_CLK
static void simpledrm_device_release_clocks(void *res)
{ … }
static int simpledrm_device_init_clocks(struct simpledrm_device *sdev)
{ … }
#else
static int simpledrm_device_init_clocks(struct simpledrm_device *sdev)
{
return 0;
}
#endif
#if defined CONFIG_OF && defined CONFIG_REGULATOR
#define SUPPLY_SUFFIX …
static void simpledrm_device_release_regulators(void *res)
{ … }
static int simpledrm_device_init_regulators(struct simpledrm_device *sdev)
{ … }
#else
static int simpledrm_device_init_regulators(struct simpledrm_device *sdev)
{
return 0;
}
#endif
#if defined CONFIG_OF && defined CONFIG_PM_GENERIC_DOMAINS
static void simpledrm_device_detach_genpd(void *res)
{ … }
static int simpledrm_device_attach_genpd(struct simpledrm_device *sdev)
{ … }
#else
static int simpledrm_device_attach_genpd(struct simpledrm_device *sdev)
{
return 0;
}
#endif
static const uint64_t simpledrm_primary_plane_format_modifiers[] = …;
static int simpledrm_primary_plane_helper_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void simpledrm_primary_plane_helper_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void simpledrm_primary_plane_helper_atomic_disable(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static int simpledrm_primary_plane_helper_get_scanout_buffer(struct drm_plane *plane,
struct drm_scanout_buffer *sb)
{ … }
static const struct drm_plane_helper_funcs simpledrm_primary_plane_helper_funcs = …;
static const struct drm_plane_funcs simpledrm_primary_plane_funcs = …;
static enum drm_mode_status simpledrm_crtc_helper_mode_valid(struct drm_crtc *crtc,
const struct drm_display_mode *mode)
{ … }
static const struct drm_crtc_helper_funcs simpledrm_crtc_helper_funcs = …;
static const struct drm_crtc_funcs simpledrm_crtc_funcs = …;
static const struct drm_encoder_funcs simpledrm_encoder_funcs = …;
static int simpledrm_connector_helper_get_modes(struct drm_connector *connector)
{ … }
static const struct drm_connector_helper_funcs simpledrm_connector_helper_funcs = …;
static const struct drm_connector_funcs simpledrm_connector_funcs = …;
static const struct drm_mode_config_funcs simpledrm_mode_config_funcs = …;
static struct drm_display_mode simpledrm_mode(unsigned int width,
unsigned int height,
unsigned int width_mm,
unsigned int height_mm)
{ … }
static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
struct platform_device *pdev)
{ … }
DEFINE_DRM_GEM_FOPS(simpledrm_fops);
static struct drm_driver simpledrm_driver = …;
static int simpledrm_probe(struct platform_device *pdev)
{ … }
static void simpledrm_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id simpledrm_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, simpledrm_of_match_table);
static struct platform_driver simpledrm_platform_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;