[COMMON] media: scaler: improve scaler SFR dump
authorJanghyuck Kim <janghyuck.kim@samsung.com>
Tue, 6 Mar 2018 10:06:50 +0000 (19:06 +0900)
committerJanghyuck Kim <janghyuck.kim@samsung.com>
Mon, 23 Jul 2018 05:39:38 +0000 (14:39 +0900)
This patch improved scaler SFR dump that reduced redundant dump and
added mandatory dump for debug status.

Change-Id: Icd5114d766135594948a3172493996b141e6cf63
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
drivers/media/platform/exynos/scaler/scaler-regs.c

index 261bea573b40be8c49804ecf67f7825c71bd74c1..0409bebabb6cc6e8d04998e08d0f41e6e71e62fa 100644 (file)
@@ -957,12 +957,18 @@ void sc_hwregs_dump(struct sc_dev *sc)
                        sc->regs + 0x2A8, 0x2A8 - 0x2A0 + 4, false);
        if (sc->version >= SCALER_VERSION(5, 0, 0))
                print_hex_dump(KERN_NOTICE, "", DUMP_PREFIX_ADDRESS, 16, 4,
-                       sc->regs + 0x2A0, 0x2A8 - 0x280 + 4, false);
+                       sc->regs + 0x2A0, 0x2A8 - 0x2A0 + 4, false);
        print_hex_dump(KERN_NOTICE, "", DUMP_PREFIX_ADDRESS, 16, 4,
                        sc->regs + 0x2B0, 0x2C4 - 0x2B0 + 4, false);
        if (sc->version >= SCALER_VERSION(3, 0, 0))
                print_hex_dump(KERN_NOTICE, "", DUMP_PREFIX_ADDRESS, 16, 4,
                        sc->regs + 0x2D0, 0x2DC - 0x2D0 + 4, false);
+       if (sc->version >= SCALER_VERSION(5, 0, 0))
+               print_hex_dump(KERN_NOTICE, "", DUMP_PREFIX_ADDRESS, 16, 4,
+                       sc->regs + 0x2E0, 0x2E8 - 0x2E0 + 4, false);
+
+       if (sc->version >= SCALER_VERSION(5, 0, 0))
+               goto end;
 
        /* shadow registers */
        print_hex_dump(KERN_NOTICE, "", DUMP_PREFIX_ADDRESS, 16, 4,
@@ -996,6 +1002,7 @@ void sc_hwregs_dump(struct sc_dev *sc)
                        sc->regs + 0x1310, 0x1318 - 0x1310 + 4, false);
        }
 
+end:
        pr_notice("------------------------------------------------\n");
 }