#define pr_fmt(fmt) …
#include <linux/debugfs.h>
#include <linux/dma-buf.h>
#include <linux/of_irq.h>
#include <linux/pm_opp.h>
#include <drm/drm_crtc.h>
#include <drm/drm_file.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_vblank.h>
#include <drm/drm_writeback.h>
#include "msm_drv.h"
#include "msm_mmu.h"
#include "msm_mdss.h"
#include "msm_gem.h"
#include "disp/msm_disp_snapshot.h"
#include "dpu_core_irq.h"
#include "dpu_crtc.h"
#include "dpu_encoder.h"
#include "dpu_formats.h"
#include "dpu_hw_vbif.h"
#include "dpu_kms.h"
#include "dpu_plane.h"
#include "dpu_vbif.h"
#include "dpu_writeback.h"
#define CREATE_TRACE_POINTS
#include "dpu_trace.h"
#define DPU_DEBUGFS_DIR …
#define DPU_DEBUGFS_HWMASKNAME …
static int dpu_kms_hw_init(struct msm_kms *kms);
static void _dpu_kms_mmu_destroy(struct dpu_kms *dpu_kms);
#ifdef CONFIG_DEBUG_FS
static int _dpu_danger_signal_status(struct seq_file *s,
bool danger_status)
{ … }
static int dpu_debugfs_danger_stats_show(struct seq_file *s, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int dpu_debugfs_safe_stats_show(struct seq_file *s, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static ssize_t _dpu_plane_danger_read(struct file *file,
char __user *buff, size_t count, loff_t *ppos)
{ … }
static void _dpu_plane_set_danger_state(struct dpu_kms *kms, bool enable)
{ … }
static ssize_t _dpu_plane_danger_write(struct file *file,
const char __user *user_buf, size_t count, loff_t *ppos)
{ … }
static const struct file_operations dpu_plane_danger_enable = …;
static void dpu_debugfs_danger_init(struct dpu_kms *dpu_kms,
struct dentry *parent)
{ … }
struct dpu_debugfs_regset32 { … };
static int dpu_regset32_show(struct seq_file *s, void *data)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
void dpu_debugfs_create_regset32(const char *name, umode_t mode,
void *parent,
uint32_t offset, uint32_t length, struct dpu_kms *dpu_kms)
{ … }
static void dpu_debugfs_sspp_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root)
{ … }
static int dpu_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor)
{ … }
#endif
struct dpu_global_state *
dpu_kms_get_existing_global_state(struct dpu_kms *dpu_kms)
{ … }
struct dpu_global_state *dpu_kms_get_global_state(struct drm_atomic_state *s)
{ … }
static struct drm_private_state *
dpu_kms_global_duplicate_state(struct drm_private_obj *obj)
{ … }
static void dpu_kms_global_destroy_state(struct drm_private_obj *obj,
struct drm_private_state *state)
{ … }
static void dpu_kms_global_print_state(struct drm_printer *p,
const struct drm_private_state *state)
{ … }
static const struct drm_private_state_funcs dpu_kms_global_state_funcs = …;
static int dpu_kms_global_obj_init(struct dpu_kms *dpu_kms)
{ … }
static void dpu_kms_global_obj_fini(struct dpu_kms *dpu_kms)
{ … }
static int dpu_kms_parse_data_bus_icc_path(struct dpu_kms *dpu_kms)
{ … }
static int dpu_kms_enable_vblank(struct msm_kms *kms, struct drm_crtc *crtc)
{ … }
static void dpu_kms_disable_vblank(struct msm_kms *kms, struct drm_crtc *crtc)
{ … }
static void dpu_kms_enable_commit(struct msm_kms *kms)
{ … }
static void dpu_kms_disable_commit(struct msm_kms *kms)
{ … }
static void dpu_kms_flush_commit(struct msm_kms *kms, unsigned crtc_mask)
{ … }
static void dpu_kms_complete_commit(struct msm_kms *kms, unsigned crtc_mask)
{ … }
static void dpu_kms_wait_for_commit_done(struct msm_kms *kms,
struct drm_crtc *crtc)
{ … }
static void dpu_kms_wait_flush(struct msm_kms *kms, unsigned crtc_mask)
{ … }
static const char *dpu_vsync_sources[] = …;
static int dpu_kms_dsi_set_te_source(struct msm_display_info *info,
struct msm_dsi *dsi)
{ … }
static int _dpu_kms_initialize_dsi(struct drm_device *dev,
struct msm_drm_private *priv,
struct dpu_kms *dpu_kms)
{ … }
static int _dpu_kms_initialize_displayport(struct drm_device *dev,
struct msm_drm_private *priv,
struct dpu_kms *dpu_kms)
{ … }
static int _dpu_kms_initialize_hdmi(struct drm_device *dev,
struct msm_drm_private *priv,
struct dpu_kms *dpu_kms)
{ … }
static int _dpu_kms_initialize_writeback(struct drm_device *dev,
struct msm_drm_private *priv, struct dpu_kms *dpu_kms,
const u32 *wb_formats, int n_formats)
{ … }
static int _dpu_kms_setup_displays(struct drm_device *dev,
struct msm_drm_private *priv,
struct dpu_kms *dpu_kms)
{ … }
#define MAX_PLANES …
static int _dpu_kms_drm_obj_init(struct dpu_kms *dpu_kms)
{ … }
static void _dpu_kms_hw_destroy(struct dpu_kms *dpu_kms)
{ … }
static void dpu_kms_destroy(struct msm_kms *kms)
{ … }
static int dpu_irq_postinstall(struct msm_kms *kms)
{ … }
static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_kms *kms)
{ … }
static const struct msm_kms_funcs kms_funcs = …;
static void _dpu_kms_mmu_destroy(struct dpu_kms *dpu_kms)
{ … }
static int _dpu_kms_mmu_init(struct dpu_kms *dpu_kms)
{ … }
unsigned long dpu_kms_get_clk_rate(struct dpu_kms *dpu_kms, char *clock_name)
{ … }
#define DPU_PERF_DEFAULT_MAX_CORE_CLK_RATE …
static int dpu_kms_hw_init(struct msm_kms *kms)
{ … }
static int dpu_kms_init(struct drm_device *ddev)
{ … }
static int dpu_kms_mmap_mdp5(struct dpu_kms *dpu_kms)
{ … }
static int dpu_kms_mmap_dpu(struct dpu_kms *dpu_kms)
{ … }
static int dpu_dev_probe(struct platform_device *pdev)
{ … }
static void dpu_dev_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused dpu_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused dpu_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops dpu_pm_ops = …;
static const struct of_device_id dpu_dt_match[] = …;
MODULE_DEVICE_TABLE(of, dpu_dt_match);
static struct platform_driver dpu_driver = …;
void __init msm_dpu_register(void)
{ … }
void __exit msm_dpu_unregister(void)
{ … }