#include <linux/module.h>
#include <linux/clk.h>
#include <linux/component.h>
#include <linux/of_device.h>
#include <linux/of_graph.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/debugfs.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_drv.h>
#include <drm/drm_fbdev_dma.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_gem_dma_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_managed.h>
#include <drm/drm_modeset_helper.h>
#include <drm/drm_module.h>
#include <drm/drm_of.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
#include "malidp_drv.h"
#include "malidp_mw.h"
#include "malidp_regs.h"
#include "malidp_hw.h"
#define MALIDP_CONF_VALID_TIMEOUT …
#define AFBC_HEADER_SIZE …
#define AFBC_SUPERBLK_ALIGNMENT …
static void malidp_write_gamma_table(struct malidp_hw_device *hwdev,
u32 data[MALIDP_COEFFTAB_NUM_COEFFS])
{ … }
static void malidp_atomic_commit_update_gamma(struct drm_crtc *crtc,
struct drm_crtc_state *old_state)
{ … }
static
void malidp_atomic_commit_update_coloradj(struct drm_crtc *crtc,
struct drm_crtc_state *old_state)
{ … }
static void malidp_atomic_commit_se_config(struct drm_crtc *crtc,
struct drm_crtc_state *old_state)
{ … }
static int malidp_set_and_wait_config_valid(struct drm_device *drm)
{ … }
static void malidp_atomic_commit_hw_done(struct drm_atomic_state *state)
{ … }
static void malidp_atomic_commit_tail(struct drm_atomic_state *state)
{ … }
static const struct drm_mode_config_helper_funcs malidp_mode_config_helpers = …;
static bool
malidp_verify_afbc_framebuffer_caps(struct drm_device *dev,
const struct drm_mode_fb_cmd2 *mode_cmd)
{ … }
static bool
malidp_verify_afbc_framebuffer_size(struct drm_device *dev,
struct drm_file *file,
const struct drm_mode_fb_cmd2 *mode_cmd)
{ … }
static bool
malidp_verify_afbc_framebuffer(struct drm_device *dev, struct drm_file *file,
const struct drm_mode_fb_cmd2 *mode_cmd)
{ … }
static struct drm_framebuffer *
malidp_fb_create(struct drm_device *dev, struct drm_file *file,
const struct drm_mode_fb_cmd2 *mode_cmd)
{ … }
static const struct drm_mode_config_funcs malidp_mode_config_funcs = …;
static int malidp_init(struct drm_device *drm)
{ … }
static int malidp_irq_init(struct platform_device *pdev)
{ … }
DEFINE_DRM_GEM_DMA_FOPS(fops);
static int malidp_dumb_create(struct drm_file *file_priv,
struct drm_device *drm,
struct drm_mode_create_dumb *args)
{ … }
#ifdef CONFIG_DEBUG_FS
static void malidp_error_stats_init(struct malidp_error_stats *error_stats)
{ … }
void malidp_error(struct malidp_drm *malidp,
struct malidp_error_stats *error_stats, u32 status,
u64 vblank)
{ … }
static void malidp_error_stats_dump(const char *prefix,
struct malidp_error_stats error_stats,
struct seq_file *m)
{ … }
static int malidp_show_stats(struct seq_file *m, void *arg)
{ … }
static int malidp_debugfs_open(struct inode *inode, struct file *file)
{ … }
static ssize_t malidp_debugfs_write(struct file *file, const char __user *ubuf,
size_t len, loff_t *offp)
{ … }
static const struct file_operations malidp_debugfs_fops = …;
static void malidp_debugfs_init(struct drm_minor *minor)
{ … }
#endif
static const struct drm_driver malidp_driver = …;
static const struct of_device_id malidp_drm_of_match[] = …;
MODULE_DEVICE_TABLE(of, malidp_drm_of_match);
static bool malidp_is_compatible_hw_id(struct malidp_hw_device *hwdev,
const struct of_device_id *dev_id)
{ … }
static bool malidp_has_sufficient_address_space(const struct resource *res,
const struct of_device_id *dev_id)
{ … }
static ssize_t core_id_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(core_id);
static struct attribute *mali_dp_attrs[] = …;
ATTRIBUTE_GROUPS(…);
#define MAX_OUTPUT_CHANNELS …
static int malidp_runtime_pm_suspend(struct device *dev)
{ … }
static int malidp_runtime_pm_resume(struct device *dev)
{ … }
static int malidp_bind(struct device *dev)
{ … }
static void malidp_unbind(struct device *dev)
{ … }
static const struct component_master_ops malidp_master_ops = …;
static int malidp_compare_dev(struct device *dev, void *data)
{ … }
static int malidp_platform_probe(struct platform_device *pdev)
{ … }
static void malidp_platform_remove(struct platform_device *pdev)
{ … }
static void malidp_platform_shutdown(struct platform_device *pdev)
{ … }
static int __maybe_unused malidp_pm_suspend(struct device *dev)
{ … }
static int __maybe_unused malidp_pm_resume(struct device *dev)
{ … }
static int __maybe_unused malidp_pm_suspend_late(struct device *dev)
{ … }
static int __maybe_unused malidp_pm_resume_early(struct device *dev)
{ … }
static const struct dev_pm_ops malidp_pm_ops = …;
static struct platform_driver malidp_platform_driver = …;
drm_module_platform_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;