[libcamera-devel,2/5] utils: ipu3: Display only if it is modified by userspace
diff mbox series

Message ID 20220630101702.45781-3-jeanmichel.hautbois@ideasonboard.com
State New
Headers show
Series
  • [libcamera-devel,1/5] utils: ipu3: Introduce a parameters dump tool
Related show

Commit Message

Jean-Michel Hautbois June 30, 2022, 10:16 a.m. UTC
The ImgU is configured by passing a parameters buffer which is parsed on
the kernel side to test if a processing block needs to be configured
from the userspace structure or from the default ones. This is controled
by the ipu3_uapi_flags field.

Use this field to display only the structures modified by the userspace.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
---
 utils/ipu3/ipu3-dump-params.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/utils/ipu3/ipu3-dump-params.c b/utils/ipu3/ipu3-dump-params.c
index 9bd61593..37cf2e6f 100644
--- a/utils/ipu3/ipu3-dump-params.c
+++ b/utils/ipu3/ipu3-dump-params.c
@@ -64,9 +64,14 @@  start:
 
 	printf("Read parameters buffer of size %d\n", ret);
 
-	printf("\n**** AWB parameters ****\n");
-	displayGrid(&params.acc_param.awb.config.grid, "awb");
-	displayGrid(&params.acc_param.awb_fr.grid_cfg, "awb_fr");
+	if (params.use.acc_awb) {
+		printf("\n**** AWB parameters ****\n");
+		displayGrid(&params.acc_param.awb.config.grid, "awb");
+	}
+	if (params.use.acc_awb_fr) {
+		printf("\n**** AWB filter response parameters ****\n");
+		displayGrid(&params.acc_param.awb_fr.grid_cfg, "awb_fr");
+	}
 
 	close(in_fd);