Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 162874d5 authored by Mythri P K's avatar Mythri P K Committed by Tomi Valkeinen
Browse files

OMAPDSS: HDMI: Add support to dump registers through debugfs



Add support to dump the HDMI wrapper, core, PLL and PHY registers
through debugfs.

Signed-off-by: default avatarMythri P K <mythripk@ti.com>
[tomi.valkeinen@ti.com: updated the description]
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 81302a75
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -144,6 +144,10 @@ static int dss_initialize_debugfs(void)
#ifdef CONFIG_OMAP2_DSS_VENC
	debugfs_create_file("venc", S_IRUGO, dss_debugfs_dir,
			&venc_dump_regs, &dss_debug_fops);
#endif
#ifdef CONFIG_OMAP4_DSS_HDMI
	debugfs_create_file("hdmi", S_IRUGO, dss_debugfs_dir,
			&hdmi_dump_regs, &dss_debug_fops);
#endif
	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -472,6 +472,7 @@ int hdmi_init_platform_driver(void);
void hdmi_uninit_platform_driver(void);
int hdmi_init_display(struct omap_dss_device *dssdev);
unsigned long hdmi_get_pixel_clock(void);
void hdmi_dump_regs(struct seq_file *s);
#else
static inline int hdmi_init_display(struct omap_dss_device *dssdev)
{
+5 −0
Original line number Diff line number Diff line
@@ -447,6 +447,11 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = {
	.pll_enable		=	ti_hdmi_4xxx_pll_enable,
	.pll_disable		=	ti_hdmi_4xxx_pll_disable,
	.video_enable		=	ti_hdmi_4xxx_wp_video_start,
	.dump_wrapper		=	ti_hdmi_4xxx_wp_dump,
	.dump_core		=	ti_hdmi_4xxx_core_dump,
	.dump_pll		=	ti_hdmi_4xxx_pll_dump,
	.dump_phy		=	ti_hdmi_4xxx_phy_dump,

};

void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data)
+16 −0
Original line number Diff line number Diff line
@@ -438,6 +438,22 @@ void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev)
	}
}

void hdmi_dump_regs(struct seq_file *s)
{
	mutex_lock(&hdmi.lock);

	if (hdmi_runtime_get())
		return;

	hdmi.ip_data.ops->dump_wrapper(&hdmi.ip_data, s);
	hdmi.ip_data.ops->dump_pll(&hdmi.ip_data, s);
	hdmi.ip_data.ops->dump_phy(&hdmi.ip_data, s);
	hdmi.ip_data.ops->dump_core(&hdmi.ip_data, s);

	hdmi_runtime_put();
	mutex_unlock(&hdmi.lock);
}

int omapdss_hdmi_read_edid(u8 *buf, int len)
{
	int r;
+14 −0
Original line number Diff line number Diff line
@@ -101,6 +101,15 @@ struct ti_hdmi_ip_ops {
	void (*pll_disable)(struct hdmi_ip_data *ip_data);

	void (*video_enable)(struct hdmi_ip_data *ip_data, bool start);

	void (*dump_wrapper)(struct hdmi_ip_data *ip_data, struct seq_file *s);

	void (*dump_core)(struct hdmi_ip_data *ip_data, struct seq_file *s);

	void (*dump_pll)(struct hdmi_ip_data *ip_data, struct seq_file *s);

	void (*dump_phy)(struct hdmi_ip_data *ip_data, struct seq_file *s);

};

struct hdmi_ip_data {
@@ -121,4 +130,9 @@ void ti_hdmi_4xxx_wp_video_start(struct hdmi_ip_data *ip_data, bool start);
int ti_hdmi_4xxx_pll_enable(struct hdmi_ip_data *ip_data);
void ti_hdmi_4xxx_pll_disable(struct hdmi_ip_data *ip_data);
void ti_hdmi_4xxx_basic_configure(struct hdmi_ip_data *ip_data);
void ti_hdmi_4xxx_wp_dump(struct hdmi_ip_data *ip_data, struct seq_file *s);
void ti_hdmi_4xxx_pll_dump(struct hdmi_ip_data *ip_data, struct seq_file *s);
void ti_hdmi_4xxx_core_dump(struct hdmi_ip_data *ip_data, struct seq_file *s);
void ti_hdmi_4xxx_phy_dump(struct hdmi_ip_data *ip_data, struct seq_file *s);

#endif
Loading