return -EINVAL;
}
+/* base_regs means DECON0's SFR base address */
+void __decon_dump(u32 id, void __iomem *regs, void __iomem *base_regs, bool dsc_en)
+{
+ decon_info("\n=== DECON%d SFR DUMP ===\n", id);
+ print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ regs, 0x620, false);
+
+ decon_info("\n=== DECON%d SHADOW SFR DUMP ===\n", id);
+ print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ regs + SHADOW_OFFSET, 0x304, false);
+
+ decon_info("\n=== DECON0 WINDOW SFR DUMP ===\n");
+ print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ base_regs + 0x1000, 0x340, false);
+
+ decon_info("\n=== DECON0 WINDOW SHADOW SFR DUMP ===\n");
+ print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ base_regs + SHADOW_OFFSET + 0x1000, 0x220, false);
+
+ if (dsc_en) {
+ decon_info("\n=== DECON0 DSC0 SFR DUMP ===\n");
+ print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ base_regs + 0x4000, 0x80, false);
+
+ decon_info("\n=== DECON0 DSC1 SFR DUMP ===\n");
+ print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ base_regs + 0x5000, 0x80, false);
+
+ decon_info("\n=== DECON0 DSC0 SHADOW SFR DUMP ===\n");
+ print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ base_regs + SHADOW_OFFSET + 0x4000, 0x80, false);
+
+ decon_info("\n=== DECON0 DSC1 SHADOW SFR DUMP ===\n");
+ print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ base_regs + SHADOW_OFFSET + 0x5000, 0x80, false);
+ }
+}
+
}
static bool checked;
-void dma_reg_dump_com_debug_regs(int id)
+static void dma_reg_dump_com_debug_regs(int id)
{
u32 sel[12] = {0x0000, 0x0100, 0x0200, 0x0204, 0x0205, 0x0300, 0x4000,
0x4001, 0x4005, 0x8000, 0x8001, 0x8005};
checked = true;
}
-void dma_reg_dump_debug_regs(int id)
+static void dma_reg_dump_debug_regs(int id)
{
u32 sel_g[11] = {
0x0000, 0x0001, 0x0002, 0x0004, 0x000A, 0x000B, 0x0400, 0x0401,
}
}
-void dpp_reg_dump_debug_regs(int id)
+static void dpp_reg_dump_debug_regs(int id)
{
u32 sel_g[3] = {0x0000, 0x0100, 0x0101};
u32 sel_vg[19] = {0x0000, 0x0100, 0x0101, 0x0200, 0x0201, 0x0202,
dpp_info("-< DPP%d DEBUG SFR >-\n", id);
dpp_reg_dump_ch_data(id, REG_AREA_DPP, sel, cnt);
}
+
+static void dma_dump_regs(u32 id, void __iomem *dma_regs)
+{
+ dpp_info("\n=== DPU_DMA%d SFR DUMP ===\n", id);
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ dma_regs, 0x6C, false);
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ dma_regs + 0x100, 0x8, false);
+
+ dpp_info("=== DPU_DMA%d SHADOW SFR DUMP ===\n", id);
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ dma_regs + 0x800, 0x74, false);
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ dma_regs + 0x900, 0x8, false);
+}
+
+static void dpp_dump_regs(u32 id, void __iomem *regs, unsigned long attr)
+{
+ dpp_info("=== DPP%d SFR DUMP ===\n", id);
+
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ regs, 0x4C, false);
+ if (test_bit(DPP_ATTR_AFBC, &attr)) {
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ regs + 0x5B0, 0x10, false);
+ }
+ if (test_bit(DPP_ATTR_ROT, &attr)) {
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ regs + 0x600, 0x1E0, false);
+ }
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ regs + 0xA54, 0x4, false);
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ regs + 0xB00, 0x4C, false);
+ if (test_bit(DPP_ATTR_AFBC, &attr)) {
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ regs + 0xBB0, 0x10, false);
+ }
+ print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4,
+ regs + 0xD00, 0xC, false);
+}
+
+void __dpp_dump(u32 id, void __iomem *regs, void __iomem *dma_regs,
+ unsigned long attr)
+{
+ dma_reg_dump_com_debug_regs(id);
+
+ dma_dump_regs(id, dma_regs);
+ dma_reg_dump_debug_regs(id);
+
+ dpp_dump_regs(id, regs, attr);
+ dpp_reg_dump_debug_regs(id);
+}