media: staging: media: imx: imx7-mipi-csis: Dump MIPI_CSIS_FRAME_COUNTER_CH0 register
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 8 Apr 2021 01:39:53 +0000 (03:39 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 23 Jan 2022 20:18:41 +0000 (21:18 +0100)
The frame counter is useful debugging information, add it to the
register dump printed by mipi_csis_dump_regs().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Tested-by: Jerome Brunet <jbrunet@baylibre.com> # On i.MX8MP
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/imx/imx7-mipi-csis.c

index 2b73fa55c938bafdbc0edc154a5cc3f7148a9f70..c9c0089ad816a2f1ef4a3a054e27c87ca62491f2 100644 (file)
 #define MIPI_CSIS_DBG_INTR_SRC_CAM_VSYNC_FALL  BIT(4)
 #define MIPI_CSIS_DBG_INTR_SRC_CAM_VSYNC_RISE  BIT(0)
 
+#define MIPI_CSIS_FRAME_COUNTER_CH(n)          (0x0100 + (n) * 4)
+
 /* Non-image packet data buffers */
 #define MIPI_CSIS_PKTDATA_ODD                  0x2000
 #define MIPI_CSIS_PKTDATA_EVEN                 0x3000
@@ -773,6 +775,7 @@ static int mipi_csis_dump_regs(struct csi_state *state)
                { MIPI_CSIS_SDW_CONFIG_CH(0), "SDW_CONFIG_CH0" },
                { MIPI_CSIS_SDW_RESOL_CH(0), "SDW_RESOL_CH0" },
                { MIPI_CSIS_DBG_CTRL, "DBG_CTRL" },
+               { MIPI_CSIS_FRAME_COUNTER_CH(0), "FRAME_COUNTER_CH0" },
        };
 
        unsigned int i;