From 70af1472fa1623f99e9a2df8cc29b681b15ef9c6 Mon Sep 17 00:00:00 2001 From: Janghyuck Kim Date: Tue, 6 Mar 2018 19:06:50 +0900 Subject: [PATCH] [COMMON] media: scaler: improve scaler SFR dump 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 --- drivers/media/platform/exynos/scaler/scaler-regs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos/scaler/scaler-regs.c b/drivers/media/platform/exynos/scaler/scaler-regs.c index 261bea573b40..0409bebabb6c 100644 --- a/drivers/media/platform/exynos/scaler/scaler-regs.c +++ b/drivers/media/platform/exynos/scaler/scaler-regs.c @@ -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"); } -- 2.20.1