media: atomisp: do lots of other coding style cleanups
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Apr 2020 15:51:29 +0000 (17:51 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 10:32:15 +0000 (12:32 +0200)
Use some auto-reformat tools to make the atomisp style
a little better. There are still lots of weird things there,
but this will hopefully reduce the number of pure coding
style patches submitted upstream.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
394 files changed:
drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
drivers/staging/media/atomisp/i2c/atomisp-libmsrlisthelper.c
drivers/staging/media/atomisp/i2c/atomisp-lm3554.c
drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c
drivers/staging/media/atomisp/i2c/atomisp-ov2680.c
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
drivers/staging/media/atomisp/i2c/mt9m114.h
drivers/staging/media/atomisp/i2c/ov2680.h
drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c
drivers/staging/media/atomisp/include/linux/atomisp.h
drivers/staging/media/atomisp/include/linux/atomisp_gmin_platform.h
drivers/staging/media/atomisp/include/linux/atomisp_platform.h
drivers/staging/media/atomisp/include/linux/libmsrlisthelper.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_csi2.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_file.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_file.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_tables.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_trace_event.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/interface/ia_css_circbuf.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/interface/ia_css_circbuf_desc.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/base/refcount/interface/ia_css_refcount.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/base/refcount/src/refcount.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_binarydesc.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_stagedesc.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_util.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/src/pipe_binarydesc.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/src/pipe_stagedesc.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/src/pipe_util.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/src/util.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hive_isp_css_2400_system_generated/ia_css_isp_configs.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hive_isp_css_2400_system_generated/ia_css_isp_configs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hive_isp_css_2400_system_generated/ia_css_isp_params.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hive_isp_css_2400_system_generated/ia_css_isp_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hive_isp_css_2400_system_generated/ia_css_isp_states.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hive_isp_css_2400_system_generated/ia_css_isp_states.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/dma_v2_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/gdc_v2_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/gpio_block_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/hive_isp_css_irq_types_hrt.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/isp2400_mamoiada_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/isp2400_support.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hive_isp_css_2401_system_csi2p_generated/ia_css_isp_configs.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hive_isp_css_2401_system_csi2p_generated/ia_css_isp_configs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hive_isp_css_2401_system_csi2p_generated/ia_css_isp_params.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hive_isp_css_2401_system_csi2p_generated/ia_css_isp_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hive_isp_css_2401_system_csi2p_generated/ia_css_isp_states.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hive_isp_css_2401_system_csi2p_generated/ia_css_isp_states.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/ibuf_ctrl_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/input_system_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_dma.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_dma_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_stream2mmio_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/pixelgen_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/system_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/dma_v2_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/gdc_v2_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/gpio_block_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/hive_isp_css_2401_irq_types_hrt.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/ibuf_cntrl_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp2400_support.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp2401_mamoiada_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/stream2mmio_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/input_system_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/isys_dma_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hive_isp_css_2401_system_generated/ia_css_isp_configs.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hive_isp_css_2401_system_generated/ia_css_isp_configs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hive_isp_css_2401_system_generated/ia_css_isp_params.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hive_isp_css_2401_system_generated/ia_css_isp_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hive_isp_css_2401_system_generated/ia_css_isp_states.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hive_isp_css_2401_system_generated/ia_css_isp_states.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/dma_v2_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/gdc_v2_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/gpio_block_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/hive_isp_css_2401_irq_types_hrt.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/isp2400_support.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/isp2401_mamoiada_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/dma_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/debug.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/debug_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/dma.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/dma_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/dma_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/event_fifo_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/event_fifo_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/fifo_monitor.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/fifo_monitor_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/fifo_monitor_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gdc.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_device.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_device_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gpio_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/hmem_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_formatter.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_formatter_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_formatter_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/isp.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/isp_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/sp.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/sp_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/system_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/timed_ctrl.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/timed_ctrl_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/vamem_private.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/vmem.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/vmem_local.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/input_system_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/vmem_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/device_access/device_access.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/debug_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/dma_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/event_fifo_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/fifo_monitor_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/gdc_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/gp_device_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/gpio_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/hmem_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ibuf_ctrl_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/input_formatter_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/input_system_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/irq_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_dma_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_irq_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_stream2mmio_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/mmu_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/pixelgen_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/sp_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/timed_ctrl_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/memory_access/memory_access.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/memory_realloc.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_control.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_device_access.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_irq.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_memory_access.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_metadata.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mipi.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_format.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_timer.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2_table.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr_1.0/ia_css_bnr.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr_1.0/ia_css_bnr.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_1.0/ia_css_cnr.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_1.0/ia_css_cnr.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/copy_output/copy_output_1.0/ia_css_copy_output.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/copy_output/copy_output_1.0/ia_css_copy_output.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc1_5/ia_css_ctc1_5.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc1_5/ia_css_ctc1_5.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc_1.0/ia_css_ctc.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc_1.0/ia_css_ctc.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc_1.0/ia_css_ctc_table.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_1.0/ia_css_de.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_1.0/ia_css_de.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_1.0/ia_css_de_state.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_2/ia_css_de2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_2/ia_css_de2.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fc/fc_1.0/ia_css_formats.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fc/fc_1.0/ia_css_formats.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fpn/fpn_1.0/ia_css_fpn.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fpn/fpn_1.0/ia_css_fpn.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_1.0/ia_css_gc.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_1.0/ia_css_gc.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_1.0/ia_css_gc_table.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_2/ia_css_gc2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_2/ia_css_gc2.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_2/ia_css_gc2_table.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/gc/gc_2/ia_css_gc2_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/hdr/ia_css_hdr.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/hdr/ia_css_hdr.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/hdr/ia_css_hdr_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/hdr/ia_css_hdr_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/iterator/iterator_1.0/ia_css_iterator.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/iterator/iterator_1.0/ia_css_iterator.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5_table.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc_1.0/ia_css_macc.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc_1.0/ia_css_macc.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc_1.0/ia_css_macc_table.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/qplane/qplane_2/ia_css_qplane.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/qplane/qplane_2/ia_css_qplane.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw_aa_binning/raw_aa_binning_1.0/ia_css_raa.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw_aa_binning/raw_aa_binning_1.0/ia_css_raa.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr3/ia_css_tnr3_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_table.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_1.0/ia_css_ynr.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_1.0/ia_css_ynr.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_1.0/ia_css_ynr_state.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_2/ia_css_ynr2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_2/ia_css_ynr2.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/input_buf.isp.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_const.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/memory_realloc.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/interface/ia_css_bufq.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/interface/ia_css_debug.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/interface/ia_css_debug_pipe.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/event/interface/ia_css_event.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/event/src/event.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/eventq/interface/ia_css_eventq.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/eventq/src/eventq.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/interface/ia_css_frame.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/interface/ia_css_frame_comm.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/interface/ia_css_ifmtr.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/inputfifo/interface/ia_css_inputfifo.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/inputfifo/src/inputfifo.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/src/isp_param.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys_comm.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/csi_rx_rmgr.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_stream2mmio_rmgr.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/rx.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/virtual_isys.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/interface/ia_css_queue.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/interface/ia_css_rmgr_vbuf.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/timer/src/timer.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_hrt.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_legacy.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_metrics.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mmu.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_param_dvs.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_param_dvs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_properties.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_stream_format.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_stream_format.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_struct.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_version.c
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_vm.c
drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c
drivers/staging/media/atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h
drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm.h
drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_bo.h
drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_pool.h
drivers/staging/media/atomisp/pci/atomisp2/include/hmm/hmm_vm.h
drivers/staging/media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h
drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c

index 404dc5187749c7a958b4ee215f4b360cd77bcf74..6ca708e8ff6adc28856e40b052a6ed5a15adf5b4 100644 (file)
@@ -101,7 +101,7 @@ static int gc0310_i2c_write(struct i2c_client *client, u16 len, u8 *data)
 }
 
 static int gc0310_write_reg(struct i2c_client *client, u16 data_length,
-                                                       u8 reg, u8 val)
+                           u8 reg, u8 val)
 {
        int ret;
        unsigned char data[2] = {0};
@@ -191,8 +191,8 @@ static int __gc0310_buf_reg_array(struct i2c_client *client,
 }
 
 static int __gc0310_write_reg_is_consecutive(struct i2c_client *client,
-                                            struct gc0310_write_ctrl *ctrl,
-                                            const struct gc0310_reg *next)
+       struct gc0310_write_ctrl *ctrl,
+       const struct gc0310_reg *next)
 {
        if (ctrl->index == 0)
                return 1;
@@ -222,7 +222,7 @@ static int gc0310_write_reg_array(struct i2c_client *client,
                         * flushed before proceed.
                         */
                        if (!__gc0310_write_reg_is_consecutive(client, &ctrl,
-                                                               next)) {
+                                                              next)) {
                                err = __gc0310_flush_reg_array(client, &ctrl);
                                if (err)
                                        return err;
@@ -230,7 +230,7 @@ static int gc0310_write_reg_array(struct i2c_client *client,
                        err = __gc0310_buf_reg_array(client, &ctrl, next);
                        if (err) {
                                dev_err(&client->dev, "%s: write error, aborted\n",
-                                        __func__);
+                                       __func__);
                                return err;
                        }
                        break;
@@ -256,8 +256,8 @@ static int gc0310_g_fnumber(struct v4l2_subdev *sd, s32 *val)
 static int gc0310_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
 {
        *val = (GC0310_F_NUMBER_DEFAULT_NUM << 24) |
-               (GC0310_F_NUMBER_DEM << 16) |
-               (GC0310_F_NUMBER_DEFAULT_NUM << 8) | GC0310_F_NUMBER_DEM;
+              (GC0310_F_NUMBER_DEM << 16) |
+              (GC0310_F_NUMBER_DEFAULT_NUM << 8) | GC0310_F_NUMBER_DEM;
        return 0;
 }
 
@@ -280,8 +280,8 @@ static int gc0310_g_bin_factor_y(struct v4l2_subdev *sd, s32 *val)
 }
 
 static int gc0310_get_intg_factor(struct i2c_client *client,
-                               struct camera_mipi_info *info,
-                               const struct gc0310_resolution *res)
+                                 struct camera_mipi_info *info,
+                                 const struct gc0310_resolution *res)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct gc0310_device *dev = to_gc0310_sensor(sd);
@@ -304,11 +304,11 @@ static int gc0310_get_intg_factor(struct i2c_client *client,
        /* get integration time */
        buf->coarse_integration_time_min = GC0310_COARSE_INTG_TIME_MIN;
        buf->coarse_integration_time_max_margin =
-                                       GC0310_COARSE_INTG_TIME_MAX_MARGIN;
+           GC0310_COARSE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_min = GC0310_FINE_INTG_TIME_MIN;
        buf->fine_integration_time_max_margin =
-                                       GC0310_FINE_INTG_TIME_MAX_MARGIN;
+           GC0310_FINE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_def = GC0310_FINE_INTG_TIME_MIN;
        buf->read_mode = res->bin_mode;
@@ -316,12 +316,12 @@ static int gc0310_get_intg_factor(struct i2c_client *client,
        /* get the cropping and output resolution to ISP for this mode. */
        /* Getting crop_horizontal_start */
        ret =  gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_H_CROP_START_H, &reg_val);
+                              GC0310_H_CROP_START_H, &reg_val);
        if (ret)
                return ret;
        val = (reg_val & 0xFF) << 8;
        ret =  gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_H_CROP_START_L, &reg_val);
+                              GC0310_H_CROP_START_L, &reg_val);
        if (ret)
                return ret;
        buf->crop_horizontal_start = val | (reg_val & 0xFF);
@@ -329,12 +329,12 @@ static int gc0310_get_intg_factor(struct i2c_client *client,
 
        /* Getting crop_vertical_start */
        ret =  gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_V_CROP_START_H, &reg_val);
+                              GC0310_V_CROP_START_H, &reg_val);
        if (ret)
                return ret;
        val = (reg_val & 0xFF) << 8;
        ret =  gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_V_CROP_START_L, &reg_val);
+                              GC0310_V_CROP_START_L, &reg_val);
        if (ret)
                return ret;
        buf->crop_vertical_start = val | (reg_val & 0xFF);
@@ -342,12 +342,12 @@ static int gc0310_get_intg_factor(struct i2c_client *client,
 
        /* Getting output_width */
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_H_OUTSIZE_H, &reg_val);
+                             GC0310_H_OUTSIZE_H, &reg_val);
        if (ret)
                return ret;
        val = (reg_val & 0xFF) << 8;
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_H_OUTSIZE_L, &reg_val);
+                             GC0310_H_OUTSIZE_L, &reg_val);
        if (ret)
                return ret;
        buf->output_width = val | (reg_val & 0xFF);
@@ -355,12 +355,12 @@ static int gc0310_get_intg_factor(struct i2c_client *client,
 
        /* Getting output_height */
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_V_OUTSIZE_H, &reg_val);
+                             GC0310_V_OUTSIZE_H, &reg_val);
        if (ret)
                return ret;
        val = (reg_val & 0xFF) << 8;
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_V_OUTSIZE_L, &reg_val);
+                             GC0310_V_OUTSIZE_L, &reg_val);
        if (ret)
                return ret;
        buf->output_height = val | (reg_val & 0xFF);
@@ -373,41 +373,43 @@ static int gc0310_get_intg_factor(struct i2c_client *client,
 
        /* Getting line_length_pck */
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_H_BLANKING_H, &reg_val);
+                             GC0310_H_BLANKING_H, &reg_val);
        if (ret)
                return ret;
        val = (reg_val & 0xFF) << 8;
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_H_BLANKING_L, &reg_val);
+                             GC0310_H_BLANKING_L, &reg_val);
        if (ret)
                return ret;
        hori_blanking = val | (reg_val & 0xFF);
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_SH_DELAY, &reg_val);
+                             GC0310_SH_DELAY, &reg_val);
        if (ret)
                return ret;
        sh_delay = reg_val;
        buf->line_length_pck = buf->output_width + hori_blanking + sh_delay + 4;
-       pr_info("hori_blanking=%d sh_delay=%d line_length_pck=%d\n", hori_blanking, sh_delay, buf->line_length_pck);
+       pr_info("hori_blanking=%d sh_delay=%d line_length_pck=%d\n", hori_blanking,
+               sh_delay, buf->line_length_pck);
 
        /* Getting frame_length_lines */
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_V_BLANKING_H, &reg_val);
+                             GC0310_V_BLANKING_H, &reg_val);
        if (ret)
                return ret;
        val = (reg_val & 0xFF) << 8;
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_V_BLANKING_L, &reg_val);
+                             GC0310_V_BLANKING_L, &reg_val);
        if (ret)
                return ret;
        vert_blanking = val | (reg_val & 0xFF);
        buf->frame_length_lines = buf->output_height + vert_blanking;
-       pr_info("vert_blanking=%d frame_length_lines=%d\n", vert_blanking, buf->frame_length_lines);
+       pr_info("vert_blanking=%d frame_length_lines=%d\n", vert_blanking,
+               buf->frame_length_lines);
 
        buf->binning_factor_x = res->bin_factor_x ?
-                                       res->bin_factor_x : 1;
+                               res->bin_factor_x : 1;
        buf->binning_factor_y = res->bin_factor_y ?
-                                       res->bin_factor_y : 1;
+                               res->bin_factor_y : 1;
        return 0;
 }
 
@@ -435,13 +437,13 @@ static int gc0310_set_gain(struct v4l2_subdev *sd, int gain)
 
        /* set analog gain */
        ret = gc0310_write_reg(client, GC0310_8BIT,
-                                       GC0310_AGC_ADJ, again);
+                              GC0310_AGC_ADJ, again);
        if (ret)
                return ret;
 
        /* set digital gain */
        ret = gc0310_write_reg(client, GC0310_8BIT,
-                                       GC0310_DGC_ADJ, dgain);
+                              GC0310_DGC_ADJ, dgain);
        if (ret)
                return ret;
 
@@ -459,14 +461,14 @@ static int __gc0310_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
 
        /* set exposure */
        ret = gc0310_write_reg(client, GC0310_8BIT,
-                                       GC0310_AEC_PK_EXPO_L,
-                                       coarse_itg & 0xff);
+                              GC0310_AEC_PK_EXPO_L,
+                              coarse_itg & 0xff);
        if (ret)
                return ret;
 
        ret = gc0310_write_reg(client, GC0310_8BIT,
-                                       GC0310_AEC_PK_EXPO_H,
-                                       (coarse_itg >> 8) & 0x0f);
+                              GC0310_AEC_PK_EXPO_H,
+                              (coarse_itg >> 8) & 0x0f);
        if (ret)
                return ret;
 
@@ -478,7 +480,7 @@ static int __gc0310_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
 }
 
 static int gc0310_set_exposure(struct v4l2_subdev *sd, int exposure,
-       int gain, int digitgain)
+                              int gain, int digitgain)
 {
        struct gc0310_device *dev = to_gc0310_sensor(sd);
        int ret;
@@ -491,7 +493,7 @@ static int gc0310_set_exposure(struct v4l2_subdev *sd, int exposure,
 }
 
 static long gc0310_s_exposure(struct v4l2_subdev *sd,
-                              struct atomisp_exposure *exposure)
+                             struct atomisp_exposure *exposure)
 {
        int exp = exposure->integration_time[0];
        int gain = exposure->gain[0];
@@ -542,15 +544,15 @@ static int gc0310_q_exposure(struct v4l2_subdev *sd, s32 *value)
 
        /* get exposure */
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_AEC_PK_EXPO_L,
-                                       &reg_v);
+                             GC0310_AEC_PK_EXPO_L,
+                             &reg_v);
        if (ret)
                goto err;
 
        *value = reg_v;
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_AEC_PK_EXPO_H,
-                                       &reg_v);
+                             GC0310_AEC_PK_EXPO_H,
+                             &reg_v);
        if (ret)
                goto err;
 
@@ -622,91 +624,91 @@ static const struct v4l2_ctrl_ops ctrl_ops = {
 
 static const struct v4l2_ctrl_config gc0310_controls[] = {
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_EXPOSURE_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "exposure",
-        .min = 0x0,
-        .max = 0xffff,
-        .step = 0x01,
-        .def = 0x00,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "exposure",
+               .min = 0x0,
+               .max = 0xffff,
+               .step = 0x01,
+               .def = 0x00,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_VFLIP,
-        .type = V4L2_CTRL_TYPE_BOOLEAN,
-        .name = "Flip",
-        .min = 0,
-        .max = 1,
-        .step = 1,
-        .def = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_VFLIP,
+               .type = V4L2_CTRL_TYPE_BOOLEAN,
+               .name = "Flip",
+               .min = 0,
+               .max = 1,
+               .step = 1,
+               .def = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_HFLIP,
-        .type = V4L2_CTRL_TYPE_BOOLEAN,
-        .name = "Mirror",
-        .min = 0,
-        .max = 1,
-        .step = 1,
-        .def = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_HFLIP,
+               .type = V4L2_CTRL_TYPE_BOOLEAN,
+               .name = "Mirror",
+               .min = 0,
+               .max = 1,
+               .step = 1,
+               .def = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FOCAL_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "focal length",
-        .min = GC0310_FOCAL_LENGTH_DEFAULT,
-        .max = GC0310_FOCAL_LENGTH_DEFAULT,
-        .step = 0x01,
-        .def = GC0310_FOCAL_LENGTH_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FOCAL_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "focal length",
+               .min = GC0310_FOCAL_LENGTH_DEFAULT,
+               .max = GC0310_FOCAL_LENGTH_DEFAULT,
+               .step = 0x01,
+               .def = GC0310_FOCAL_LENGTH_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "f-number",
-        .min = GC0310_F_NUMBER_DEFAULT,
-        .max = GC0310_F_NUMBER_DEFAULT,
-        .step = 0x01,
-        .def = GC0310_F_NUMBER_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "f-number",
+               .min = GC0310_F_NUMBER_DEFAULT,
+               .max = GC0310_F_NUMBER_DEFAULT,
+               .step = 0x01,
+               .def = GC0310_F_NUMBER_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_RANGE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "f-number range",
-        .min = GC0310_F_NUMBER_RANGE,
-        .max = GC0310_F_NUMBER_RANGE,
-        .step = 0x01,
-        .def = GC0310_F_NUMBER_RANGE,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_RANGE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "f-number range",
+               .min = GC0310_F_NUMBER_RANGE,
+               .max = GC0310_F_NUMBER_RANGE,
+               .step = 0x01,
+               .def = GC0310_F_NUMBER_RANGE,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_BIN_FACTOR_HORZ,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "horizontal binning factor",
-        .min = 0,
-        .max = GC0310_BIN_FACTOR_MAX,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_BIN_FACTOR_HORZ,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "horizontal binning factor",
+               .min = 0,
+               .max = GC0310_BIN_FACTOR_MAX,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_BIN_FACTOR_VERT,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "vertical binning factor",
-        .min = 0,
-        .max = GC0310_BIN_FACTOR_MAX,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_BIN_FACTOR_VERT,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "vertical binning factor",
+               .min = 0,
+               .max = GC0310_BIN_FACTOR_MAX,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
 };
 
 static int gc0310_init(struct v4l2_subdev *sd)
@@ -904,7 +906,7 @@ static int distance(struct gc0310_resolution *res, u32 w, u32 h)
        match   = abs(((w_ratio << 13) / h_ratio) - 8192);
 
        if ((w_ratio < 8192) || (h_ratio < 8192)  ||
-               (match > LARGEST_ALLOWED_RATIO_MISMATCH))
+           (match > LARGEST_ALLOWED_RATIO_MISMATCH))
                return -1;
 
        return w_ratio + h_ratio;
@@ -1070,13 +1072,13 @@ static int gc0310_detect(struct i2c_client *client)
                return -ENODEV;
 
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_SC_CMMN_CHIP_ID_H, &high);
+                             GC0310_SC_CMMN_CHIP_ID_H, &high);
        if (ret) {
                dev_err(&client->dev, "read sensor_id_high failed\n");
                return -ENODEV;
        }
        ret = gc0310_read_reg(client, GC0310_8BIT,
-                                       GC0310_SC_CMMN_CHIP_ID_L, &low);
+                             GC0310_SC_CMMN_CHIP_ID_L, &low);
        if (ret) {
                dev_err(&client->dev, "read sensor_id_low failed\n");
                return -ENODEV;
@@ -1085,7 +1087,8 @@ static int gc0310_detect(struct i2c_client *client)
        pr_info("sensor ID = 0x%x\n", id);
 
        if (id != GC0310_ID) {
-               dev_err(&client->dev, "sensor ID error, read id = 0x%x, target id = 0x%x\n", id, GC0310_ID);
+               dev_err(&client->dev, "sensor ID error, read id = 0x%x, target id = 0x%x\n", id,
+                       GC0310_ID);
                return -ENODEV;
        }
 
@@ -1108,7 +1111,7 @@ static int gc0310_s_stream(struct v4l2_subdev *sd, int enable)
        if (enable) {
                /* enable per frame MIPI and sensor ctrl reset  */
                ret = gc0310_write_reg(client, GC0310_8BIT,
-                                               0xFE, 0x30);
+                                      0xFE, 0x30);
                if (ret) {
                        mutex_unlock(&dev->input_lock);
                        return ret;
@@ -1116,22 +1119,22 @@ static int gc0310_s_stream(struct v4l2_subdev *sd, int enable)
        }
 
        ret = gc0310_write_reg(client, GC0310_8BIT,
-                               GC0310_RESET_RELATED, GC0310_REGISTER_PAGE_3);
+                              GC0310_RESET_RELATED, GC0310_REGISTER_PAGE_3);
        if (ret) {
                mutex_unlock(&dev->input_lock);
                return ret;
        }
 
        ret = gc0310_write_reg(client, GC0310_8BIT, GC0310_SW_STREAM,
-                               enable ? GC0310_START_STREAMING :
-                               GC0310_STOP_STREAMING);
+                              enable ? GC0310_START_STREAMING :
+                              GC0310_STOP_STREAMING);
        if (ret) {
                mutex_unlock(&dev->input_lock);
                return ret;
        }
 
        ret = gc0310_write_reg(client, GC0310_8BIT,
-                               GC0310_RESET_RELATED, GC0310_REGISTER_PAGE_0);
+                              GC0310_RESET_RELATED, GC0310_REGISTER_PAGE_0);
        if (ret) {
                mutex_unlock(&dev->input_lock);
                return ret;
@@ -1154,7 +1157,7 @@ static int gc0310_s_config(struct v4l2_subdev *sd,
                return -ENODEV;
 
        dev->platform_data =
-               (struct camera_sensor_platform_data *)platform_data;
+           (struct camera_sensor_platform_data *)platform_data;
 
        mutex_lock(&dev->input_lock);
        /* power off the module, then power on it in future
index b7f2e7b494bbdbc138f912aef42f406297f3f0f3..b663b47449a74bdd9c769c8bf59d481175471dd6 100644 (file)
@@ -102,7 +102,7 @@ static int gc2235_i2c_write(struct i2c_client *client, u16 len, u8 *data)
 }
 
 static int gc2235_write_reg(struct i2c_client *client, u16 data_length,
-                                                       u8 reg, u8 val)
+                           u8 reg, u8 val)
 {
        int ret;
        unsigned char data[4] = {0};
@@ -170,8 +170,8 @@ static int __gc2235_buf_reg_array(struct i2c_client *client,
 }
 
 static int __gc2235_write_reg_is_consecutive(struct i2c_client *client,
-                                            struct gc2235_write_ctrl *ctrl,
-                                            const struct gc2235_reg *next)
+       struct gc2235_write_ctrl *ctrl,
+       const struct gc2235_reg *next)
 {
        if (ctrl->index == 0)
                return 1;
@@ -201,7 +201,7 @@ static int gc2235_write_reg_array(struct i2c_client *client,
                         * flushed before proceed.
                         */
                        if (!__gc2235_write_reg_is_consecutive(client, &ctrl,
-                                                               next)) {
+                                                              next)) {
                                err = __gc2235_flush_reg_array(client, &ctrl);
                                if (err)
                                        return err;
@@ -209,7 +209,7 @@ static int gc2235_write_reg_array(struct i2c_client *client,
                        err = __gc2235_buf_reg_array(client, &ctrl, next);
                        if (err) {
                                dev_err(&client->dev, "%s: write error, aborted\n",
-                                        __func__);
+                                       __func__);
                                return err;
                        }
                        break;
@@ -235,14 +235,14 @@ static int gc2235_g_fnumber(struct v4l2_subdev *sd, s32 *val)
 static int gc2235_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
 {
        *val = (GC2235_F_NUMBER_DEFAULT_NUM << 24) |
-               (GC2235_F_NUMBER_DEM << 16) |
-               (GC2235_F_NUMBER_DEFAULT_NUM << 8) | GC2235_F_NUMBER_DEM;
+              (GC2235_F_NUMBER_DEM << 16) |
+              (GC2235_F_NUMBER_DEFAULT_NUM << 8) | GC2235_F_NUMBER_DEM;
        return 0;
 }
 
 static int gc2235_get_intg_factor(struct i2c_client *client,
-                               struct camera_mipi_info *info,
-                               const struct gc2235_resolution *res)
+                                 struct camera_mipi_info *info,
+                                 const struct gc2235_resolution *res)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct gc2235_device *dev = to_gc2235_sensor(sd);
@@ -259,11 +259,11 @@ static int gc2235_get_intg_factor(struct i2c_client *client,
        /* get integration time */
        buf->coarse_integration_time_min = GC2235_COARSE_INTG_TIME_MIN;
        buf->coarse_integration_time_max_margin =
-                                       GC2235_COARSE_INTG_TIME_MAX_MARGIN;
+           GC2235_COARSE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_min = GC2235_FINE_INTG_TIME_MIN;
        buf->fine_integration_time_max_margin =
-                                       GC2235_FINE_INTG_TIME_MAX_MARGIN;
+           GC2235_FINE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_def = GC2235_FINE_INTG_TIME_MIN;
        buf->frame_length_lines = res->lines_per_frame;
@@ -272,48 +272,48 @@ static int gc2235_get_intg_factor(struct i2c_client *client,
 
        /* get the cropping and output resolution to ISP for this mode. */
        ret =  gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_H_CROP_START_H, &reg_val_h);
+                              GC2235_H_CROP_START_H, &reg_val_h);
        ret =  gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_H_CROP_START_L, &reg_val);
+                              GC2235_H_CROP_START_L, &reg_val);
        if (ret)
                return ret;
 
        buf->crop_horizontal_start = (reg_val_h << 8) | reg_val;
 
        ret =  gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_V_CROP_START_H, &reg_val_h);
+                              GC2235_V_CROP_START_H, &reg_val_h);
        ret =  gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_V_CROP_START_L, &reg_val);
+                              GC2235_V_CROP_START_L, &reg_val);
        if (ret)
                return ret;
 
        buf->crop_vertical_start = (reg_val_h << 8) | reg_val;
 
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_H_OUTSIZE_H, &reg_val_h);
+                             GC2235_H_OUTSIZE_H, &reg_val_h);
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_H_OUTSIZE_L, &reg_val);
+                             GC2235_H_OUTSIZE_L, &reg_val);
        if (ret)
                return ret;
        buf->output_width = (reg_val_h << 8) | reg_val;
 
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_V_OUTSIZE_H, &reg_val_h);
+                             GC2235_V_OUTSIZE_H, &reg_val_h);
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_V_OUTSIZE_L, &reg_val);
+                             GC2235_V_OUTSIZE_L, &reg_val);
        if (ret)
                return ret;
        buf->output_height = (reg_val_h << 8) | reg_val;
 
        buf->crop_horizontal_end = buf->crop_horizontal_start +
-                                               buf->output_width - 1;
+                                  buf->output_width - 1;
        buf->crop_vertical_end = buf->crop_vertical_start +
-                                               buf->output_height - 1;
+                                buf->output_height - 1;
 
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_HB_H, &reg_val_h);
+                             GC2235_HB_H, &reg_val_h);
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_HB_L, &reg_val);
+                             GC2235_HB_L, &reg_val);
        if (ret)
                return ret;
 
@@ -322,34 +322,34 @@ static int gc2235_get_intg_factor(struct i2c_client *client,
 #endif
 
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_SH_DELAY_H, &reg_val_h);
+                             GC2235_SH_DELAY_H, &reg_val_h);
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_SH_DELAY_L, &reg_val);
+                             GC2235_SH_DELAY_L, &reg_val);
 
 #if 0
        buf->line_length_pck = buf->output_width + 16 + dummy +
-                               (((u16)reg_val_h << 8) | (u16)reg_val) + 4;
+                              (((u16)reg_val_h << 8) | (u16)reg_val) + 4;
 #endif
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_VB_H, &reg_val_h);
+                             GC2235_VB_H, &reg_val_h);
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_VB_L, &reg_val);
+                             GC2235_VB_L, &reg_val);
        if (ret)
                return ret;
 
 #if 0
        buf->frame_length_lines = buf->output_height + 32 +
-                               (((u16)reg_val_h << 8) | (u16)reg_val);
+                                 (((u16)reg_val_h << 8) | (u16)reg_val);
 #endif
        buf->binning_factor_x = res->bin_factor_x ?
-                                       res->bin_factor_x : 1;
+                               res->bin_factor_x : 1;
        buf->binning_factor_y = res->bin_factor_y ?
-                                       res->bin_factor_y : 1;
+                               res->bin_factor_y : 1;
        return 0;
 }
 
 static long __gc2235_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
-                                int gain, int digitgain)
+                                 int gain, int digitgain)
 
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -361,9 +361,9 @@ static long __gc2235_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        expo_coarse_l = coarse_integration & 0xff;
 
        ret = gc2235_write_reg(client, GC2235_8BIT,
-                                       GC2235_EXPOSURE_H, expo_coarse_h);
+                              GC2235_EXPOSURE_H, expo_coarse_h);
        ret = gc2235_write_reg(client, GC2235_8BIT,
-                                       GC2235_EXPOSURE_L, expo_coarse_l);
+                              GC2235_EXPOSURE_L, expo_coarse_l);
 
        if (gain <= 0x58) {
                gain_val = 0x40;
@@ -377,15 +377,15 @@ static long __gc2235_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        }
 
        ret = gc2235_write_reg(client, GC2235_8BIT,
-                                       GC2235_GLOBAL_GAIN, (u8)gain_val);
+                              GC2235_GLOBAL_GAIN, (u8)gain_val);
        ret = gc2235_write_reg(client, GC2235_8BIT,
-                                       GC2235_PRE_GAIN, (u8)gain_val2);
+                              GC2235_PRE_GAIN, (u8)gain_val2);
 
        return ret;
 }
 
 static int gc2235_set_exposure(struct v4l2_subdev *sd, int exposure,
-       int gain, int digitgain)
+                              int gain, int digitgain)
 {
        struct gc2235_device *dev = to_gc2235_sensor(sd);
        int ret;
@@ -398,7 +398,7 @@ static int gc2235_set_exposure(struct v4l2_subdev *sd, int exposure,
 }
 
 static long gc2235_s_exposure(struct v4l2_subdev *sd,
-                              struct atomisp_exposure *exposure)
+                             struct atomisp_exposure *exposure)
 {
        int exp = exposure->integration_time[0];
        int gain = exposure->gain[0];
@@ -437,14 +437,14 @@ static int gc2235_q_exposure(struct v4l2_subdev *sd, s32 *value)
 
        /* get exposure */
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_EXPOSURE_L,
-                                       &reg_v);
+                             GC2235_EXPOSURE_L,
+                             &reg_v);
        if (ret)
                goto err;
 
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_EXPOSURE_H,
-                                       &reg_v2);
+                             GC2235_EXPOSURE_H,
+                             &reg_v2);
        if (ret)
                goto err;
 
@@ -487,49 +487,49 @@ static const struct v4l2_ctrl_ops ctrl_ops = {
 
 static struct v4l2_ctrl_config gc2235_controls[] = {
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_EXPOSURE_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "exposure",
-        .min = 0x0,
-        .max = 0xffff,
-        .step = 0x01,
-        .def = 0x00,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "exposure",
+               .min = 0x0,
+               .max = 0xffff,
+               .step = 0x01,
+               .def = 0x00,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FOCAL_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "focal length",
-        .min = GC2235_FOCAL_LENGTH_DEFAULT,
-        .max = GC2235_FOCAL_LENGTH_DEFAULT,
-        .step = 0x01,
-        .def = GC2235_FOCAL_LENGTH_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FOCAL_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "focal length",
+               .min = GC2235_FOCAL_LENGTH_DEFAULT,
+               .max = GC2235_FOCAL_LENGTH_DEFAULT,
+               .step = 0x01,
+               .def = GC2235_FOCAL_LENGTH_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "f-number",
-        .min = GC2235_F_NUMBER_DEFAULT,
-        .max = GC2235_F_NUMBER_DEFAULT,
-        .step = 0x01,
-        .def = GC2235_F_NUMBER_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "f-number",
+               .min = GC2235_F_NUMBER_DEFAULT,
+               .max = GC2235_F_NUMBER_DEFAULT,
+               .step = 0x01,
+               .def = GC2235_F_NUMBER_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_RANGE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "f-number range",
-        .min = GC2235_F_NUMBER_RANGE,
-        .max = GC2235_F_NUMBER_RANGE,
-        .step = 0x01,
-        .def = GC2235_F_NUMBER_RANGE,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_RANGE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "f-number range",
+               .min = GC2235_F_NUMBER_RANGE,
+               .max = GC2235_F_NUMBER_RANGE,
+               .step = 0x01,
+               .def = GC2235_F_NUMBER_RANGE,
+               .flags = 0,
+       },
 };
 
 static int __gc2235_init(struct v4l2_subdev *sd)
@@ -854,13 +854,13 @@ static int gc2235_detect(struct i2c_client *client)
                return -ENODEV;
 
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_SENSOR_ID_H, &high);
+                             GC2235_SENSOR_ID_H, &high);
        if (ret) {
                dev_err(&client->dev, "sensor_id_high = 0x%x\n", high);
                return -ENODEV;
        }
        ret = gc2235_read_reg(client, GC2235_8BIT,
-                                       GC2235_SENSOR_ID_L, &low);
+                             GC2235_SENSOR_ID_L, &low);
        id = ((high << 8) | low);
 
        if (id != GC2235_ID) {
@@ -900,7 +900,7 @@ static int gc2235_s_config(struct v4l2_subdev *sd,
                return -ENODEV;
 
        dev->platform_data =
-               (struct camera_sensor_platform_data *)platform_data;
+           (struct camera_sensor_platform_data *)platform_data;
 
        mutex_lock(&dev->input_lock);
        /* power off the module, then power on it in future
@@ -962,8 +962,8 @@ static int gc2235_g_frame_interval(struct v4l2_subdev *sd,
 }
 
 static int gc2235_enum_mbus_code(struct v4l2_subdev *sd,
-                               struct v4l2_subdev_pad_config *cfg,
-                               struct v4l2_subdev_mbus_code_enum *code)
+                                struct v4l2_subdev_pad_config *cfg,
+                                struct v4l2_subdev_mbus_code_enum *code)
 {
        if (code->index >= MAX_FMTS)
                return -EINVAL;
@@ -1062,8 +1062,8 @@ static int gc2235_probe(struct i2c_client *client)
        v4l2_i2c_subdev_init(&dev->sd, client, &gc2235_ops);
 
        gcpdev = gmin_camera_platform_data(&dev->sd,
-                                  ATOMISP_INPUT_FORMAT_RAW_10,
-                                  atomisp_bayer_order_grbg);
+                                          ATOMISP_INPUT_FORMAT_RAW_10,
+                                          atomisp_bayer_order_grbg);
 
        ret = gc2235_s_config(&dev->sd, client->irq, gcpdev);
        if (ret)
index 1d8db57812aceb1367bc5327f26805390a418c50..33ab884f7352f2e8cb1c347103c0524c61125080 100644 (file)
@@ -47,7 +47,7 @@ struct tbd_data_record_header {
 #define TBD_CLASS_DRV_ID 2
 
 static int set_msr_configuration(struct i2c_client *client, uint8_t *bufptr,
-               unsigned int size)
+                                unsigned int size)
 {
        /* The configuration data contains any number of sequences where
         * the first byte (that is, uint8_t) that marks the number of bytes
@@ -87,11 +87,11 @@ static int set_msr_configuration(struct i2c_client *client, uint8_t *bufptr,
 }
 
 static int parse_and_apply(struct i2c_client *client, uint8_t *buffer,
-               unsigned int size)
+                          unsigned int size)
 {
        u8 *endptr8 = buffer + size;
        struct tbd_data_record_header *header =
-               (struct tbd_data_record_header *)buffer;
+           (struct tbd_data_record_header *)buffer;
 
        /* There may be any number of datasets present */
        unsigned int dataset = 0;
@@ -103,7 +103,7 @@ static int parse_and_apply(struct i2c_client *client, uint8_t *buffer,
 
                /* All data should be located within given buffer */
                if ((uint8_t *)header + header->data_offset +
-                               header->data_size > endptr8)
+                   header->data_size > endptr8)
                        return -EINVAL;
 
                /* We have a new valid dataset */
@@ -114,16 +114,16 @@ static int parse_and_apply(struct i2c_client *client, uint8_t *buffer,
                        int ret;
 
                        dev_info(&client->dev,
-                               "New MSR data for sensor driver (dataset %02d) size:%d\n",
-                               dataset, header->data_size);
+                                "New MSR data for sensor driver (dataset %02d) size:%d\n",
+                                dataset, header->data_size);
                        ret = set_msr_configuration(client,
-                                               buffer + header->data_offset,
-                                               header->data_size);
+                                                   buffer + header->data_offset,
+                                                   header->data_size);
                        if (ret)
                                return ret;
                }
                header = (struct tbd_data_record_header *)(buffer +
-                       header->next_offset);
+                        header->next_offset);
        } while (header->next_offset);
 
        return 0;
@@ -168,7 +168,7 @@ int apply_msr_data(struct i2c_client *client, const struct firmware *fw)
 EXPORT_SYMBOL_GPL(apply_msr_data);
 
 int load_msr_list(struct i2c_client *client, char *name,
-               const struct firmware **fw)
+                 const struct firmware **fw)
 {
        int ret = request_firmware(fw, name, &client->dev);
 
@@ -179,7 +179,7 @@ int load_msr_list(struct i2c_client *client, char *name,
                return ret;
        }
        dev_info(&client->dev, "Received %lu bytes drv data\n",
-                       (unsigned long)(*fw)->size);
+                (unsigned long)(*fw)->size);
 
        return 0;
 }
index 7edaf50a6febdc94f36bbf6f1d8c83b82f61352d..4d94f49fccbcce5f6b13ddd697206c3fe5e38710 100644 (file)
@@ -296,7 +296,7 @@ static int lm3554_g_flash_intensity(struct v4l2_subdev *sd, s32 *val)
        struct lm3554 *flash = to_lm3554(sd);
 
        *val = LM3554_VALUE_TO_PERCENT((u32)flash->flash_current,
-                       LM3554_FLASH_STEP);
+                                      LM3554_FLASH_STEP);
 
        return 0;
 }
@@ -318,7 +318,7 @@ static int lm3554_g_torch_intensity(struct v4l2_subdev *sd, s32 *val)
        struct lm3554 *flash = to_lm3554(sd);
 
        *val = LM3554_VALUE_TO_PERCENT((u32)flash->torch_current,
-                       LM3554_TORCH_STEP);
+                                      LM3554_TORCH_STEP);
 
        return 0;
 }
@@ -340,7 +340,7 @@ static int lm3554_g_indicator_intensity(struct v4l2_subdev *sd, s32 *val)
        struct lm3554 *flash = to_lm3554(sd);
 
        *val = LM3554_VALUE_TO_PERCENT((u32)flash->indicator_current,
-                       LM3554_INDICATOR_STEP);
+                                      LM3554_INDICATOR_STEP);
 
        return 0;
 }
@@ -494,94 +494,94 @@ static const struct v4l2_ctrl_ops ctrl_ops = {
 
 static const struct v4l2_ctrl_config lm3554_controls[] = {
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FLASH_TIMEOUT,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "Flash Timeout",
-        .min = 0x0,
-        .max = LM3554_MAX_TIMEOUT,
-        .step = 0x01,
-        .def = LM3554_DEFAULT_TIMEOUT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FLASH_TIMEOUT,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "Flash Timeout",
+               .min = 0x0,
+               .max = LM3554_MAX_TIMEOUT,
+               .step = 0x01,
+               .def = LM3554_DEFAULT_TIMEOUT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FLASH_INTENSITY,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "Flash Intensity",
-        .min = LM3554_MIN_PERCENT,
-        .max = LM3554_MAX_PERCENT,
-        .step = 0x01,
-        .def = LM3554_FLASH_DEFAULT_BRIGHTNESS,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FLASH_INTENSITY,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "Flash Intensity",
+               .min = LM3554_MIN_PERCENT,
+               .max = LM3554_MAX_PERCENT,
+               .step = 0x01,
+               .def = LM3554_FLASH_DEFAULT_BRIGHTNESS,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FLASH_TORCH_INTENSITY,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "Torch Intensity",
-        .min = LM3554_MIN_PERCENT,
-        .max = LM3554_MAX_PERCENT,
-        .step = 0x01,
-        .def = LM3554_TORCH_DEFAULT_BRIGHTNESS,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FLASH_TORCH_INTENSITY,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "Torch Intensity",
+               .min = LM3554_MIN_PERCENT,
+               .max = LM3554_MAX_PERCENT,
+               .step = 0x01,
+               .def = LM3554_TORCH_DEFAULT_BRIGHTNESS,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FLASH_INDICATOR_INTENSITY,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "Indicator Intensity",
-        .min = LM3554_MIN_PERCENT,
-        .max = LM3554_MAX_PERCENT,
-        .step = 0x01,
-        .def = LM3554_INDICATOR_DEFAULT_BRIGHTNESS,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FLASH_INDICATOR_INTENSITY,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "Indicator Intensity",
+               .min = LM3554_MIN_PERCENT,
+               .max = LM3554_MAX_PERCENT,
+               .step = 0x01,
+               .def = LM3554_INDICATOR_DEFAULT_BRIGHTNESS,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FLASH_STROBE,
-        .type = V4L2_CTRL_TYPE_BOOLEAN,
-        .name = "Flash Strobe",
-        .min = 0,
-        .max = 1,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FLASH_STROBE,
+               .type = V4L2_CTRL_TYPE_BOOLEAN,
+               .name = "Flash Strobe",
+               .min = 0,
+               .max = 1,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FLASH_MODE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "Flash Mode",
-        .min = 0,
-        .max = 100,
-        .step = 1,
-        .def = ATOMISP_FLASH_MODE_OFF,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FLASH_MODE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "Flash Mode",
+               .min = 0,
+               .max = 100,
+               .step = 1,
+               .def = ATOMISP_FLASH_MODE_OFF,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FLASH_STATUS,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "Flash Status",
-        .min = ATOMISP_FLASH_STATUS_OK,
-        .max = ATOMISP_FLASH_STATUS_TIMEOUT,
-        .step = 1,
-        .def = ATOMISP_FLASH_STATUS_OK,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FLASH_STATUS,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "Flash Status",
+               .min = ATOMISP_FLASH_STATUS_OK,
+               .max = ATOMISP_FLASH_STATUS_TIMEOUT,
+               .step = 1,
+               .def = ATOMISP_FLASH_STATUS_OK,
+               .flags = 0,
+       },
 #ifndef CSS15
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FLASH_STATUS_REGISTER,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "Flash Status Register",
-        .min = 0,
-        .max = 255,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FLASH_STATUS_REGISTER,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "Flash Status Register",
+               .min = 0,
+               .max = 255,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
 #endif
 };
 
@@ -825,17 +825,17 @@ static void *lm3554_platform_data_func(struct i2c_client *client)
        static struct lm3554_platform_data platform_data;
 
        platform_data.gpio_reset =
-                   desc_to_gpio(gpiod_get_index(&client->dev,
-                                                NULL, 2, GPIOD_OUT_LOW));
+           desc_to_gpio(gpiod_get_index(&client->dev,
+                                        NULL, 2, GPIOD_OUT_LOW));
        platform_data.gpio_strobe =
-                   desc_to_gpio(gpiod_get_index(&client->dev,
-                                                NULL, 0, GPIOD_OUT_LOW));
+           desc_to_gpio(gpiod_get_index(&client->dev,
+                                        NULL, 0, GPIOD_OUT_LOW));
        platform_data.gpio_torch =
-                   desc_to_gpio(gpiod_get_index(&client->dev,
-                                                NULL, 1, GPIOD_OUT_LOW));
+           desc_to_gpio(gpiod_get_index(&client->dev,
+                                        NULL, 1, GPIOD_OUT_LOW));
        dev_info(&client->dev, "camera pdata: lm3554: reset: %d strobe %d torch %d\n",
-               platform_data.gpio_reset, platform_data.gpio_strobe,
-               platform_data.gpio_torch);
+                platform_data.gpio_reset, platform_data.gpio_strobe,
+                platform_data.gpio_torch);
 
        /* Set to TX2 mode, then ENVM/TX2 pin is a power amplifier sync input:
         * ENVM/TX pin asserted, flash forced into torch;
index 56e5ac0c5fa8f7e60ab8a31d6025e5654519a1ce..7f8a2b9a4c6949b84d7cfca7eb372b421d13956d 100644 (file)
@@ -62,7 +62,7 @@ mt9m114_read_reg(struct i2c_client *client, u16 data_length, u32 reg, u32 *val)
        }
 
        if (data_length != MISENSOR_8BIT && data_length != MISENSOR_16BIT
-                                        && data_length != MISENSOR_32BIT) {
+           && data_length != MISENSOR_32BIT) {
                v4l2_err(client, "%s error, invalid data length\n", __func__);
                return -EINVAL;
        }
@@ -92,7 +92,7 @@ mt9m114_read_reg(struct i2c_client *client, u16 data_length, u32 reg, u32 *val)
                        *val = data[1] + (data[0] << 8);
                else
                        *val = data[3] + (data[2] << 8) +
-                           (data[1] << 16) + (data[0] << 24);
+                              (data[1] << 16) + (data[0] << 24);
 
                return 0;
        }
@@ -116,7 +116,7 @@ mt9m114_write_reg(struct i2c_client *client, u16 data_length, u16 reg, u32 val)
        }
 
        if (data_length != MISENSOR_8BIT && data_length != MISENSOR_16BIT
-                                        && data_length != MISENSOR_32BIT) {
+           && data_length != MISENSOR_32BIT) {
                v4l2_err(client, "%s error, invalid data_length\n", __func__);
                return -EINVAL;
        }
@@ -183,7 +183,7 @@ again:
  */
 static int
 misensor_rmw_reg(struct i2c_client *client, u16 data_length, u16 reg,
-                    u32 mask, u32 set)
+                u32 mask, u32 set)
 {
        int err;
        u32 val;
@@ -346,8 +346,8 @@ __mt9m114_write_reg_is_consecutive(struct i2c_client *client,
  *
  */
 static int mt9m114_write_reg_array(struct i2c_client *client,
-                               const struct misensor_reg *reglist,
-                               int poll)
+                                  const struct misensor_reg *reglist,
+                                  int poll)
 {
        const struct misensor_reg *next = reglist;
        struct mt9m114_write_ctrl ctrl;
@@ -372,7 +372,7 @@ static int mt9m114_write_reg_array(struct i2c_client *client,
                        err = __mt9m114_flush_reg_array(client, &ctrl);
                        err |= misensor_rmw_reg(client,
                                                next->length &
-                                                       ~MISENSOR_TOK_RMW,
+                                               ~MISENSOR_TOK_RMW,
                                                next->reg, next->val,
                                                next->val2);
                        if (err) {
@@ -434,7 +434,7 @@ static int mt9m114_set_suspend(struct v4l2_subdev *sd)
        struct i2c_client *client = v4l2_get_subdevdata(sd);
 
        return mt9m114_write_reg_array(client,
-                       mt9m114_standby_reg, POST_POLLING);
+                                      mt9m114_standby_reg, POST_POLLING);
 }
 
 static int mt9m114_init_common(struct v4l2_subdev *sd)
@@ -639,7 +639,7 @@ static int mt9m114_try_res(u32 *w, u32 *h)
        int idx = 0;
 
        if ((*w > MT9M114_RES_960P_SIZE_H)
-               || (*h > MT9M114_RES_960P_SIZE_V)) {
+           || (*h > MT9M114_RES_960P_SIZE_V)) {
                *w = MT9M114_RES_960P_SIZE_H;
                *h = MT9M114_RES_960P_SIZE_V;
        } else {
@@ -712,8 +712,8 @@ static int mt9m114_res2size(struct v4l2_subdev *sd, int *h_size, int *v_size)
 }
 
 static int mt9m114_get_intg_factor(struct i2c_client *client,
-                               struct camera_mipi_info *info,
-                               const struct mt9m114_res_struct *res)
+                                  struct camera_mipi_info *info,
+                                  const struct mt9m114_res_struct *res)
 {
        struct atomisp_sensor_mode_data *buf = &info->data;
        u32 reg_val;
@@ -723,7 +723,7 @@ static int mt9m114_get_intg_factor(struct i2c_client *client,
                return -EINVAL;
 
        ret =  mt9m114_read_reg(client, MISENSOR_32BIT,
-                                       REG_PIXEL_CLK, &reg_val);
+                               REG_PIXEL_CLK, &reg_val);
        if (ret)
                return ret;
        buf->vt_pix_clk_freq_mhz = reg_val;
@@ -731,11 +731,11 @@ static int mt9m114_get_intg_factor(struct i2c_client *client,
        /* get integration time */
        buf->coarse_integration_time_min = MT9M114_COARSE_INTG_TIME_MIN;
        buf->coarse_integration_time_max_margin =
-                                       MT9M114_COARSE_INTG_TIME_MAX_MARGIN;
+           MT9M114_COARSE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_min = MT9M114_FINE_INTG_TIME_MIN;
        buf->fine_integration_time_max_margin =
-                                       MT9M114_FINE_INTG_TIME_MAX_MARGIN;
+           MT9M114_FINE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_def = MT9M114_FINE_INTG_TIME_MIN;
 
@@ -745,63 +745,63 @@ static int mt9m114_get_intg_factor(struct i2c_client *client,
 
        /* get the cropping and output resolution to ISP for this mode. */
        ret =  mt9m114_read_reg(client, MISENSOR_16BIT,
-                                       REG_H_START, &reg_val);
+                               REG_H_START, &reg_val);
        if (ret)
                return ret;
        buf->crop_horizontal_start = reg_val;
 
        ret =  mt9m114_read_reg(client, MISENSOR_16BIT,
-                                       REG_V_START, &reg_val);
+                               REG_V_START, &reg_val);
        if (ret)
                return ret;
        buf->crop_vertical_start = reg_val;
 
        ret = mt9m114_read_reg(client, MISENSOR_16BIT,
-                                       REG_H_END, &reg_val);
+                              REG_H_END, &reg_val);
        if (ret)
                return ret;
        buf->crop_horizontal_end = reg_val;
 
        ret = mt9m114_read_reg(client, MISENSOR_16BIT,
-                                       REG_V_END, &reg_val);
+                              REG_V_END, &reg_val);
        if (ret)
                return ret;
        buf->crop_vertical_end = reg_val;
 
        ret = mt9m114_read_reg(client, MISENSOR_16BIT,
-                                       REG_WIDTH, &reg_val);
+                              REG_WIDTH, &reg_val);
        if (ret)
                return ret;
        buf->output_width = reg_val;
 
        ret = mt9m114_read_reg(client, MISENSOR_16BIT,
-                                       REG_HEIGHT, &reg_val);
+                              REG_HEIGHT, &reg_val);
        if (ret)
                return ret;
        buf->output_height = reg_val;
 
        ret = mt9m114_read_reg(client, MISENSOR_16BIT,
-                                       REG_TIMING_HTS, &reg_val);
+                              REG_TIMING_HTS, &reg_val);
        if (ret)
                return ret;
        buf->line_length_pck = reg_val;
 
        ret = mt9m114_read_reg(client, MISENSOR_16BIT,
-                                       REG_TIMING_VTS, &reg_val);
+                              REG_TIMING_VTS, &reg_val);
        if (ret)
                return ret;
        buf->frame_length_lines = reg_val;
 
        buf->binning_factor_x = res->bin_factor_x ?
-                                       res->bin_factor_x : 1;
+                               res->bin_factor_x : 1;
        buf->binning_factor_y = res->bin_factor_y ?
-                                       res->bin_factor_y : 1;
+                               res->bin_factor_y : 1;
        return 0;
 }
 
 static int mt9m114_get_fmt(struct v4l2_subdev *sd,
-                               struct v4l2_subdev_pad_config *cfg,
-                               struct v4l2_subdev_format *format)
+                          struct v4l2_subdev_pad_config *cfg,
+                          struct v4l2_subdev_format *format)
 {
        struct v4l2_mbus_framefmt *fmt = &format->format;
        int width, height;
@@ -860,18 +860,18 @@ static int mt9m114_set_fmt(struct v4l2_subdev *sd,
        case MT9M114_RES_736P:
                ret = mt9m114_write_reg_array(c, mt9m114_736P_init, NO_POLLING);
                ret += misensor_rmw_reg(c, MISENSOR_16BIT, MISENSOR_READ_MODE,
-                               MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
+                                       MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
                break;
        case MT9M114_RES_864P:
                ret = mt9m114_write_reg_array(c, mt9m114_864P_init, NO_POLLING);
                ret += misensor_rmw_reg(c, MISENSOR_16BIT, MISENSOR_READ_MODE,
-                               MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
+                                       MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
                break;
        case MT9M114_RES_960P:
                ret = mt9m114_write_reg_array(c, mt9m114_976P_init, NO_POLLING);
                /* set sensor read_mode to Normal */
                ret += misensor_rmw_reg(c, MISENSOR_16BIT, MISENSOR_READ_MODE,
-                               MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
+                                       MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
                break;
        default:
                v4l2_err(sd, "set resolution: %d failed!\n", res_index->res);
@@ -920,7 +920,7 @@ static int mt9m114_set_fmt(struct v4l2_subdev *sd,
                }
        }
        ret = mt9m114_get_intg_factor(c, mt9m114_info,
-                                       &mt9m114_res[res_index->res]);
+                                     &mt9m114_res[res_index->res]);
        if (ret) {
                dev_err(&c->dev, "failed to get integration_factor\n");
                return -EINVAL;
@@ -954,8 +954,8 @@ static int mt9m114_g_fnumber(struct v4l2_subdev *sd, s32 *val)
 static int mt9m114_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
 {
        *val = (MT9M114_F_NUMBER_DEFAULT_NUM << 24) |
-               (MT9M114_F_NUMBER_DEM << 16) |
-               (MT9M114_F_NUMBER_DEFAULT_NUM << 8) | MT9M114_F_NUMBER_DEM;
+              (MT9M114_F_NUMBER_DEM << 16) |
+              (MT9M114_F_NUMBER_DEFAULT_NUM << 8) | MT9M114_F_NUMBER_DEM;
        return 0;
 }
 
@@ -967,7 +967,7 @@ static int mt9m114_g_hflip(struct v4l2_subdev *sd, s32 *val)
        u32 data;
 
        ret = mt9m114_read_reg(c, MISENSOR_16BIT,
-                       (u32)MISENSOR_READ_MODE, &data);
+                              (u32)MISENSOR_READ_MODE, &data);
        if (ret)
                return ret;
        *val = !!(data & MISENSOR_HFLIP_MASK);
@@ -982,7 +982,7 @@ static int mt9m114_g_vflip(struct v4l2_subdev *sd, s32 *val)
        u32 data;
 
        ret = mt9m114_read_reg(c, MISENSOR_16BIT,
-                       (u32)MISENSOR_READ_MODE, &data);
+                              (u32)MISENSOR_READ_MODE, &data);
        if (ret)
                return ret;
        *val = !!(data & MISENSOR_VFLIP_MASK);
@@ -1003,8 +1003,8 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd,
        u32 AnalogGainToWrite = 0;
 
        dev_dbg(&client->dev, "%s(0x%X 0x%X 0x%X)\n", __func__,
-                   exposure->integration_time[0], exposure->gain[0],
-                   exposure->gain[1]);
+               exposure->integration_time[0], exposure->gain[0],
+               exposure->gain[1]);
 
        coarse_integration = exposure->integration_time[0];
        /* fine_integration = ExposureTime.FineIntegrationTime; */
@@ -1036,7 +1036,7 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd,
        /* 3A provide real exposure time.
                should not translate to any value here. */
        ret = mt9m114_write_reg(client, MISENSOR_16BIT,
-                       REG_EXPO_COARSE, (u16)(coarse_integration));
+                               REG_EXPO_COARSE, (u16)(coarse_integration));
        if (ret) {
                v4l2_err(client, "%s: fail to set exposure time\n", __func__);
                return -EINVAL;
@@ -1072,10 +1072,10 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd,
                (u16)((DigitalGain << 12) | AnalogGainToWrite); */
        AnalogGainToWrite = (u16)((DigitalGain << 12) | (u16)AnalogGain);
        ret = mt9m114_write_reg(client, MISENSOR_16BIT,
-                                       REG_GAIN, AnalogGainToWrite);
+                               REG_GAIN, AnalogGainToWrite);
        if (ret) {
                v4l2_err(client, "%s: fail to set AnalogGainToWrite\n",
-                       __func__);
+                        __func__);
                return -EINVAL;
        }
 
@@ -1135,7 +1135,7 @@ static int mt9m114_s_exposure_metering(struct v4l2_subdev *sd, s32 val)
        switch (val) {
        case V4L2_EXPOSURE_METERING_SPOT:
                ret = mt9m114_write_reg_array(client, mt9m114_exp_average,
-                                               NO_POLLING);
+                                             NO_POLLING);
                if (ret) {
                        dev_err(&client->dev, "write exp_average reg err.\n");
                        return ret;
@@ -1144,7 +1144,7 @@ static int mt9m114_s_exposure_metering(struct v4l2_subdev *sd, s32 val)
        case V4L2_EXPOSURE_METERING_CENTER_WEIGHTED:
        default:
                ret = mt9m114_write_reg_array(client, mt9m114_exp_center,
-                                               NO_POLLING);
+                                             NO_POLLING);
                if (ret) {
                        dev_err(&client->dev, "write exp_default reg err");
                        return ret;
@@ -1309,7 +1309,7 @@ static int mt9m114_g_3a_lock(struct v4l2_subdev *sd, s32 *val)
 {
        if (aaalock)
                return V4L2_LOCK_EXPOSURE | V4L2_LOCK_WHITE_BALANCE
-                       | V4L2_LOCK_FOCUS;
+                      | V4L2_LOCK_FOCUS;
        return 0;
 }
 
@@ -1404,137 +1404,137 @@ static const struct v4l2_ctrl_ops ctrl_ops = {
 
 static struct v4l2_ctrl_config mt9m114_controls[] = {
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_VFLIP,
-        .name = "Image v-Flip",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = 0,
-        .max = 1,
-        .step = 1,
-        .def = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_VFLIP,
+               .name = "Image v-Flip",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = 0,
+               .max = 1,
+               .step = 1,
+               .def = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_HFLIP,
-        .name = "Image h-Flip",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = 0,
-        .max = 1,
-        .step = 1,
-        .def = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_HFLIP,
+               .name = "Image h-Flip",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = 0,
+               .max = 1,
+               .step = 1,
+               .def = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FOCAL_ABSOLUTE,
-        .name = "focal length",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = MT9M114_FOCAL_LENGTH_DEFAULT,
-        .max = MT9M114_FOCAL_LENGTH_DEFAULT,
-        .step = 1,
-        .def = MT9M114_FOCAL_LENGTH_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FOCAL_ABSOLUTE,
+               .name = "focal length",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = MT9M114_FOCAL_LENGTH_DEFAULT,
+               .max = MT9M114_FOCAL_LENGTH_DEFAULT,
+               .step = 1,
+               .def = MT9M114_FOCAL_LENGTH_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_ABSOLUTE,
-        .name = "f-number",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = MT9M114_F_NUMBER_DEFAULT,
-        .max = MT9M114_F_NUMBER_DEFAULT,
-        .step = 1,
-        .def = MT9M114_F_NUMBER_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_ABSOLUTE,
+               .name = "f-number",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = MT9M114_F_NUMBER_DEFAULT,
+               .max = MT9M114_F_NUMBER_DEFAULT,
+               .step = 1,
+               .def = MT9M114_F_NUMBER_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_RANGE,
-        .name = "f-number range",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = MT9M114_F_NUMBER_RANGE,
-        .max = MT9M114_F_NUMBER_RANGE,
-        .step = 1,
-        .def = MT9M114_F_NUMBER_RANGE,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_RANGE,
+               .name = "f-number range",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = MT9M114_F_NUMBER_RANGE,
+               .max = MT9M114_F_NUMBER_RANGE,
+               .step = 1,
+               .def = MT9M114_F_NUMBER_RANGE,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_EXPOSURE_ABSOLUTE,
-        .name = "exposure",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = 0,
-        .max = 0xffff,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+               .name = "exposure",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = 0,
+               .max = 0xffff,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
 #ifndef CSS15
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_EXPOSURE_ZONE_NUM,
-        .name = "one-time exposure zone number",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = 0,
-        .max = 0xffff,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_EXPOSURE_ZONE_NUM,
+               .name = "one-time exposure zone number",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = 0,
+               .max = 0xffff,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_EXPOSURE_METERING,
-        .name = "metering",
-        .type = V4L2_CTRL_TYPE_MENU,
-        .min = 0,
-        .max = 3,
-        .step = 0,
-        .def = 1,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_EXPOSURE_METERING,
+               .name = "metering",
+               .type = V4L2_CTRL_TYPE_MENU,
+               .min = 0,
+               .max = 3,
+               .step = 0,
+               .def = 1,
+               .flags = 0,
+       },
 #endif
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_BIN_FACTOR_HORZ,
-        .name = "horizontal binning factor",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = 0,
-        .max = MT9M114_BIN_FACTOR_MAX,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_BIN_FACTOR_HORZ,
+               .name = "horizontal binning factor",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = 0,
+               .max = MT9M114_BIN_FACTOR_MAX,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_BIN_FACTOR_VERT,
-        .name = "vertical binning factor",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = 0,
-        .max = MT9M114_BIN_FACTOR_MAX,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_BIN_FACTOR_VERT,
+               .name = "vertical binning factor",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = 0,
+               .max = MT9M114_BIN_FACTOR_MAX,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_EXPOSURE,
-        .name = "exposure biasx",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = -2,
-        .max = 2,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_EXPOSURE,
+               .name = "exposure biasx",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = -2,
+               .max = 2,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_3A_LOCK,
-        .name = "3a lock",
-        .type = V4L2_CTRL_TYPE_BITMASK,
-        .min = 0,
-        .max = V4L2_LOCK_EXPOSURE | V4L2_LOCK_WHITE_BALANCE | V4L2_LOCK_FOCUS,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_3A_LOCK,
+               .name = "3a lock",
+               .type = V4L2_CTRL_TYPE_BITMASK,
+               .min = 0,
+               .max = V4L2_LOCK_EXPOSURE | V4L2_LOCK_WHITE_BALANCE | V4L2_LOCK_FOCUS,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
 };
 
 static int mt9m114_detect(struct mt9m114_device *dev, struct i2c_client *client)
@@ -1686,7 +1686,7 @@ static int mt9m114_t_vflip(struct v4l2_subdev *sd, int value)
 }
 
 static int mt9m114_g_frame_interval(struct v4l2_subdev *sd,
-                                  struct v4l2_subdev_frame_interval *interval)
+                                   struct v4l2_subdev_frame_interval *interval)
 {
        struct mt9m114_device *dev = to_mt9m114_sensor(sd);
 
@@ -1705,7 +1705,7 @@ static int mt9m114_s_stream(struct v4l2_subdev *sd, int enable)
 
        if (enable) {
                ret = mt9m114_write_reg_array(c, mt9m114_chgstat_reg,
-                                       POST_POLLING);
+                                             POST_POLLING);
                if (ret < 0)
                        return ret;
 
index 89169da512346ccda956374207b353b7a6c4e1ae..cb8989e35167282cf47d64213782b2a5e1eebc29 100644 (file)
@@ -58,7 +58,7 @@ static int ov2680_read_reg(struct i2c_client *client,
        }
 
        if (data_length != OV2680_8BIT && data_length != OV2680_16BIT
-                                       && data_length != OV2680_32BIT) {
+           && data_length != OV2680_32BIT) {
                dev_err(&client->dev, "%s error, invalid data length\n",
                        __func__);
                return -EINVAL;
@@ -117,7 +117,7 @@ static int ov2680_i2c_write(struct i2c_client *client, u16 len, u8 *data)
 }
 
 static int ov2680_write_reg(struct i2c_client *client, u16 data_length,
-                                                       u16 reg, u16 val)
+                           u16 reg, u16 val)
 {
        int ret;
        unsigned char data[4] = {0};
@@ -220,8 +220,8 @@ static int __ov2680_buf_reg_array(struct i2c_client *client,
 }
 
 static int __ov2680_write_reg_is_consecutive(struct i2c_client *client,
-                                            struct ov2680_write_ctrl *ctrl,
-                                            const struct ov2680_reg *next)
+       struct ov2680_write_ctrl *ctrl,
+       const struct ov2680_reg *next)
 {
        if (ctrl->index == 0)
                return 1;
@@ -251,9 +251,10 @@ static int ov2680_write_reg_array(struct i2c_client *client,
                         * If next address is not consecutive, data needs to be
                         * flushed before proceed.
                         */
-                        dev_dbg(&client->dev,  "+++ov2680_write_reg_array reg=%x->%x\n", next->reg, next->val);
+                       dev_dbg(&client->dev,  "+++ov2680_write_reg_array reg=%x->%x\n", next->reg,
+                               next->val);
                        if (!__ov2680_write_reg_is_consecutive(client, &ctrl,
-                                                               next)) {
+                                                              next)) {
                                err = __ov2680_flush_reg_array(client, &ctrl);
                                if (err)
                                        return err;
@@ -261,7 +262,7 @@ static int ov2680_write_reg_array(struct i2c_client *client,
                        err = __ov2680_buf_reg_array(client, &ctrl, next);
                        if (err) {
                                dev_err(&client->dev, "%s: write error, aborted\n",
-                                        __func__);
+                                       __func__);
                                return err;
                        }
                        break;
@@ -288,8 +289,8 @@ static int ov2680_g_fnumber(struct v4l2_subdev *sd, s32 *val)
 static int ov2680_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
 {
        *val = (OV2680_F_NUMBER_DEFAULT_NUM << 24) |
-               (OV2680_F_NUMBER_DEM << 16) |
-               (OV2680_F_NUMBER_DEFAULT_NUM << 8) | OV2680_F_NUMBER_DEM;
+              (OV2680_F_NUMBER_DEM << 16) |
+              (OV2680_F_NUMBER_DEFAULT_NUM << 8) | OV2680_F_NUMBER_DEM;
        return 0;
 }
 
@@ -315,8 +316,8 @@ static int ov2680_g_bin_factor_y(struct v4l2_subdev *sd, s32 *val)
 }
 
 static int ov2680_get_intg_factor(struct i2c_client *client,
-                               struct camera_mipi_info *info,
-                               const struct ov2680_resolution *res)
+                                 struct camera_mipi_info *info,
+                                 const struct ov2680_resolution *res)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov2680_device *dev = to_ov2680_sensor(sd);
@@ -338,11 +339,11 @@ static int ov2680_get_intg_factor(struct i2c_client *client,
        /* get integration time */
        buf->coarse_integration_time_min = OV2680_COARSE_INTG_TIME_MIN;
        buf->coarse_integration_time_max_margin =
-                                       OV2680_COARSE_INTG_TIME_MAX_MARGIN;
+           OV2680_COARSE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_min = OV2680_FINE_INTG_TIME_MIN;
        buf->fine_integration_time_max_margin =
-                                       OV2680_FINE_INTG_TIME_MAX_MARGIN;
+           OV2680_FINE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_def = OV2680_FINE_INTG_TIME_MIN;
        buf->frame_length_lines = res->lines_per_frame;
@@ -351,50 +352,50 @@ static int ov2680_get_intg_factor(struct i2c_client *client,
 
        /* get the cropping and output resolution to ISP for this mode. */
        ret =  ov2680_read_reg(client, OV2680_16BIT,
-                                       OV2680_HORIZONTAL_START_H, &reg_val);
+                              OV2680_HORIZONTAL_START_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_horizontal_start = reg_val;
 
        ret =  ov2680_read_reg(client, OV2680_16BIT,
-                                       OV2680_VERTICAL_START_H, &reg_val);
+                              OV2680_VERTICAL_START_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_vertical_start = reg_val;
 
        ret = ov2680_read_reg(client, OV2680_16BIT,
-                                       OV2680_HORIZONTAL_END_H, &reg_val);
+                             OV2680_HORIZONTAL_END_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_horizontal_end = reg_val;
 
        ret = ov2680_read_reg(client, OV2680_16BIT,
-                                       OV2680_VERTICAL_END_H, &reg_val);
+                             OV2680_VERTICAL_END_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_vertical_end = reg_val;
 
        ret = ov2680_read_reg(client, OV2680_16BIT,
-                                       OV2680_HORIZONTAL_OUTPUT_SIZE_H, &reg_val);
+                             OV2680_HORIZONTAL_OUTPUT_SIZE_H, &reg_val);
        if (ret)
                return ret;
        buf->output_width = reg_val;
 
        ret = ov2680_read_reg(client, OV2680_16BIT,
-                                       OV2680_VERTICAL_OUTPUT_SIZE_H, &reg_val);
+                             OV2680_VERTICAL_OUTPUT_SIZE_H, &reg_val);
        if (ret)
                return ret;
        buf->output_height = reg_val;
 
        buf->binning_factor_x = res->bin_factor_x ?
-                                       (res->bin_factor_x * 2) : 1;
+                               (res->bin_factor_x * 2) : 1;
        buf->binning_factor_y = res->bin_factor_y ?
-                                       (res->bin_factor_y * 2) : 1;
+                               (res->bin_factor_y * 2) : 1;
        return 0;
 }
 
 static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
-                                int gain, int digitgain)
+                                 int gain, int digitgain)
 
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -410,7 +411,7 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
 
        /* group hold */
        ret = ov2680_write_reg(client, OV2680_8BIT,
-                                      OV2680_GROUP_ACCESS, 0x00);
+                              OV2680_GROUP_ACCESS, 0x00);
        if (ret) {
                dev_err(&client->dev, "%s: write %x error, aborted\n",
                        __func__, OV2680_GROUP_ACCESS);
@@ -466,7 +467,7 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        /* Digital gain */
        if (digitgain) {
                ret = ov2680_write_reg(client, OV2680_16BIT,
-                               OV2680_MWB_RED_GAIN_H, digitgain);
+                                      OV2680_MWB_RED_GAIN_H, digitgain);
                if (ret) {
                        dev_err(&client->dev, "%s: write %x error, aborted\n",
                                __func__, OV2680_MWB_RED_GAIN_H);
@@ -474,7 +475,7 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
                }
 
                ret = ov2680_write_reg(client, OV2680_16BIT,
-                               OV2680_MWB_GREEN_GAIN_H, digitgain);
+                                      OV2680_MWB_GREEN_GAIN_H, digitgain);
                if (ret) {
                        dev_err(&client->dev, "%s: write %x error, aborted\n",
                                __func__, OV2680_MWB_RED_GAIN_H);
@@ -482,7 +483,7 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
                }
 
                ret = ov2680_write_reg(client, OV2680_16BIT,
-                               OV2680_MWB_BLUE_GAIN_H, digitgain);
+                                      OV2680_MWB_BLUE_GAIN_H, digitgain);
                if (ret) {
                        dev_err(&client->dev, "%s: write %x error, aborted\n",
                                __func__, OV2680_MWB_RED_GAIN_H);
@@ -498,14 +499,14 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
 
        /* Delay launch group */
        ret = ov2680_write_reg(client, OV2680_8BIT,
-                                          OV2680_GROUP_ACCESS, 0xa0);
+                              OV2680_GROUP_ACCESS, 0xa0);
        if (ret)
                return ret;
        return ret;
 }
 
 static int ov2680_set_exposure(struct v4l2_subdev *sd, int exposure,
-       int gain, int digitgain)
+                              int gain, int digitgain)
 {
        struct ov2680_device *dev = to_ov2680_sensor(sd);
        int ret;
@@ -518,7 +519,7 @@ static int ov2680_set_exposure(struct v4l2_subdev *sd, int exposure,
 }
 
 static long ov2680_s_exposure(struct v4l2_subdev *sd,
-                              struct atomisp_exposure *exposure)
+                             struct atomisp_exposure *exposure)
 {
        u16 coarse_itg = exposure->integration_time[0];
        u16 analog_gain = exposure->gain[0];
@@ -559,21 +560,21 @@ static int ov2680_q_exposure(struct v4l2_subdev *sd, s32 *value)
 
        /* get exposure */
        ret = ov2680_read_reg(client, OV2680_8BIT,
-                                       OV2680_EXPOSURE_L,
-                                       &reg_v);
+                             OV2680_EXPOSURE_L,
+                             &reg_v);
        if (ret)
                goto err;
 
        ret = ov2680_read_reg(client, OV2680_8BIT,
-                                       OV2680_EXPOSURE_M,
-                                       &reg_v2);
+                             OV2680_EXPOSURE_M,
+                             &reg_v2);
        if (ret)
                goto err;
 
        reg_v += reg_v2 << 8;
        ret = ov2680_read_reg(client, OV2680_8BIT,
-                                       OV2680_EXPOSURE_H,
-                                       &reg_v2);
+                             OV2680_EXPOSURE_H,
+                             &reg_v2);
        if (ret)
                goto err;
 
@@ -616,15 +617,16 @@ static int ov2680_v_flip(struct v4l2_subdev *sd, s32 value)
                val &= ~OV2680_FLIP_MIRROR_BIT_ENABLE;
        }
        ret = ov2680_write_reg(client, OV2680_8BIT,
-                       OV2680_FLIP_REG, val);
+                              OV2680_FLIP_REG, val);
        if (ret)
                return ret;
-       index = (v_flag > 0 ? OV2680_FLIP_BIT : 0) | (h_flag > 0 ? OV2680_MIRROR_BIT : 0);
+       index = (v_flag > 0 ? OV2680_FLIP_BIT : 0) | (h_flag > 0 ? OV2680_MIRROR_BIT :
+               0);
        ov2680_info = v4l2_get_subdev_hostdata(sd);
        if (ov2680_info) {
                ov2680_info->raw_bayer_order = ov2680_bayer_order_mapping[index];
                dev->format.code = ov2680_translate_bayer_order(
-                       ov2680_info->raw_bayer_order);
+                                      ov2680_info->raw_bayer_order);
        }
        return ret;
 }
@@ -649,15 +651,16 @@ static int ov2680_h_flip(struct v4l2_subdev *sd, s32 value)
                val &= ~OV2680_FLIP_MIRROR_BIT_ENABLE;
        }
        ret = ov2680_write_reg(client, OV2680_8BIT,
-                       OV2680_MIRROR_REG, val);
+                              OV2680_MIRROR_REG, val);
        if (ret)
                return ret;
-       index = (v_flag > 0 ? OV2680_FLIP_BIT : 0) | (h_flag > 0 ? OV2680_MIRROR_BIT : 0);
+       index = (v_flag > 0 ? OV2680_FLIP_BIT : 0) | (h_flag > 0 ? OV2680_MIRROR_BIT :
+               0);
        ov2680_info = v4l2_get_subdev_hostdata(sd);
        if (ov2680_info) {
                ov2680_info->raw_bayer_order = ov2680_bayer_order_mapping[index];
                dev->format.code = ov2680_translate_bayer_order(
-                       ov2680_info->raw_bayer_order);
+                                      ov2680_info->raw_bayer_order);
        }
        return ret;
 }
@@ -725,91 +728,91 @@ static const struct v4l2_ctrl_ops ctrl_ops = {
 
 static const struct v4l2_ctrl_config ov2680_controls[] = {
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_EXPOSURE_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "exposure",
-        .min = 0x0,
-        .max = 0xffff,
-        .step = 0x01,
-        .def = 0x00,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "exposure",
+               .min = 0x0,
+               .max = 0xffff,
+               .step = 0x01,
+               .def = 0x00,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FOCAL_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "focal length",
-        .min = OV2680_FOCAL_LENGTH_DEFAULT,
-        .max = OV2680_FOCAL_LENGTH_DEFAULT,
-        .step = 0x01,
-        .def = OV2680_FOCAL_LENGTH_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FOCAL_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "focal length",
+               .min = OV2680_FOCAL_LENGTH_DEFAULT,
+               .max = OV2680_FOCAL_LENGTH_DEFAULT,
+               .step = 0x01,
+               .def = OV2680_FOCAL_LENGTH_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "f-number",
-        .min = OV2680_F_NUMBER_DEFAULT,
-        .max = OV2680_F_NUMBER_DEFAULT,
-        .step = 0x01,
-        .def = OV2680_F_NUMBER_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "f-number",
+               .min = OV2680_F_NUMBER_DEFAULT,
+               .max = OV2680_F_NUMBER_DEFAULT,
+               .step = 0x01,
+               .def = OV2680_F_NUMBER_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_RANGE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "f-number range",
-        .min = OV2680_F_NUMBER_RANGE,
-        .max = OV2680_F_NUMBER_RANGE,
-        .step = 0x01,
-        .def = OV2680_F_NUMBER_RANGE,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_RANGE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "f-number range",
+               .min = OV2680_F_NUMBER_RANGE,
+               .max = OV2680_F_NUMBER_RANGE,
+               .step = 0x01,
+               .def = OV2680_F_NUMBER_RANGE,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_BIN_FACTOR_HORZ,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "horizontal binning factor",
-        .min = 0,
-        .max = OV2680_BIN_FACTOR_MAX,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_BIN_FACTOR_HORZ,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "horizontal binning factor",
+               .min = 0,
+               .max = OV2680_BIN_FACTOR_MAX,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_BIN_FACTOR_VERT,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "vertical binning factor",
-        .min = 0,
-        .max = OV2680_BIN_FACTOR_MAX,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_BIN_FACTOR_VERT,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "vertical binning factor",
+               .min = 0,
+               .max = OV2680_BIN_FACTOR_MAX,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_VFLIP,
-        .type = V4L2_CTRL_TYPE_BOOLEAN,
-        .name = "Flip",
-        .min = 0,
-        .max = 1,
-        .step = 1,
-        .def = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_VFLIP,
+               .type = V4L2_CTRL_TYPE_BOOLEAN,
+               .name = "Flip",
+               .min = 0,
+               .max = 1,
+               .step = 1,
+               .def = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_HFLIP,
-        .type = V4L2_CTRL_TYPE_BOOLEAN,
-        .name = "Mirror",
-        .min = 0,
-        .max = 1,
-        .step = 1,
-        .def = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_HFLIP,
+               .type = V4L2_CTRL_TYPE_BOOLEAN,
+               .name = "Mirror",
+               .min = 0,
+               .max = 1,
+               .step = 1,
+               .def = 0,
+       },
 };
 
 static int ov2680_init_registers(struct v4l2_subdev *sd)
@@ -1009,7 +1012,7 @@ static int distance(struct ov2680_resolution *res, u32 w, u32 h)
        match   = abs(((w_ratio << 13) / h_ratio) - 8192);
 
        if ((w_ratio < 8192) || (h_ratio < 8192)  ||
-               (match > LARGEST_ALLOWED_RATIO_MISMATCH))
+           (match > LARGEST_ALLOWED_RATIO_MISMATCH))
                return -1;
 
        return w_ratio + h_ratio;
@@ -1091,10 +1094,10 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
                cfg->try_fmt = *fmt;
                mutex_unlock(&dev->input_lock);
                return 0;
-               }
+       }
        dev->fmt_idx = get_resolution_index(fmt->width, fmt->height);
        dev_dbg(&client->dev, "+++++get_resolution_index=%d+++++l\n",
-                    dev->fmt_idx);
+               dev->fmt_idx);
        if (dev->fmt_idx == -1) {
                dev_err(&client->dev, "get resolution fail\n");
                mutex_unlock(&dev->input_lock);
@@ -1103,7 +1106,7 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
        v4l2_info(client, "__s_mbus_fmt i=%d, w=%d, h=%d\n", dev->fmt_idx,
                  fmt->width, fmt->height);
        dev_dbg(&client->dev, "__s_mbus_fmt i=%d, w=%d, h=%d\n",
-                    dev->fmt_idx, fmt->width, fmt->height);
+               dev->fmt_idx, fmt->width, fmt->height);
 
        ret = ov2680_write_reg_array(client, ov2680_res[dev->fmt_idx].regs);
        if (ret)
@@ -1167,13 +1170,13 @@ static int ov2680_detect(struct i2c_client *client)
                return -ENODEV;
 
        ret = ov2680_read_reg(client, OV2680_8BIT,
-                                       OV2680_SC_CMMN_CHIP_ID_H, &high);
+                             OV2680_SC_CMMN_CHIP_ID_H, &high);
        if (ret) {
                dev_err(&client->dev, "sensor_id_high = 0x%x\n", high);
                return -ENODEV;
        }
        ret = ov2680_read_reg(client, OV2680_8BIT,
-                                       OV2680_SC_CMMN_CHIP_ID_L, &low);
+                             OV2680_SC_CMMN_CHIP_ID_L, &low);
        id = ((((u16)high) << 8) | (u16)low);
 
        if (id != OV2680_ID) {
@@ -1182,7 +1185,7 @@ static int ov2680_detect(struct i2c_client *client)
        }
 
        ret = ov2680_read_reg(client, OV2680_8BIT,
-                                       OV2680_SC_CMMN_SUB_ID, &high);
+                             OV2680_SC_CMMN_SUB_ID, &high);
        revision = (u8)high & 0x0f;
 
        dev_info(&client->dev, "sensor_revision id = 0x%x, rev= %d\n",
@@ -1204,8 +1207,8 @@ static int ov2680_s_stream(struct v4l2_subdev *sd, int enable)
                dev_dbg(&client->dev, "ov2680_s_stream off\n");
 
        ret = ov2680_write_reg(client, OV2680_8BIT, OV2680_SW_STREAM,
-                               enable ? OV2680_START_STREAMING :
-                               OV2680_STOP_STREAMING);
+                              enable ? OV2680_START_STREAMING :
+                              OV2680_STOP_STREAMING);
 #if 0
        /* restore settings */
        ov2680_res = ov2680_res_preview;
@@ -1232,7 +1235,7 @@ static int ov2680_s_config(struct v4l2_subdev *sd,
                return -ENODEV;
 
        dev->platform_data =
-               (struct camera_sensor_platform_data *)platform_data;
+           (struct camera_sensor_platform_data *)platform_data;
 
        mutex_lock(&dev->input_lock);
        /* power off the module, then power on it in future
@@ -1338,7 +1341,7 @@ static const struct v4l2_subdev_video_ops ov2680_video_ops = {
 };
 
 static const struct v4l2_subdev_sensor_ops ov2680_sensor_ops = {
-               .g_skip_frames  = ov2680_g_skip_frames,
+       .g_skip_frames  = ov2680_g_skip_frames,
 };
 
 static const struct v4l2_subdev_core_ops ov2680_core_ops = {
@@ -1435,8 +1438,7 @@ static int ov2680_probe(struct i2c_client *client)
        dev->sd.ctrl_handler = &dev->ctrl_handler;
 
        ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);
-       if (ret)
-       {
+       if (ret) {
                ov2680_remove(client);
                dev_dbg(&client->dev, "+++ remove ov2680\n");
        }
index a85bbd02331de410b939001f85f25e459440e6e6..44edd182fbabe3397a831b1f10db33bbed3636bd 100644 (file)
@@ -49,7 +49,7 @@ static int ov2722_read_reg(struct i2c_client *client,
        }
 
        if (data_length != OV2722_8BIT && data_length != OV2722_16BIT
-                                       && data_length != OV2722_32BIT) {
+           && data_length != OV2722_32BIT) {
                dev_err(&client->dev, "%s error, invalid data length\n",
                        __func__);
                return -EINVAL;
@@ -108,7 +108,7 @@ static int ov2722_i2c_write(struct i2c_client *client, u16 len, u8 *data)
 }
 
 static int ov2722_write_reg(struct i2c_client *client, u16 data_length,
-                                                       u16 reg, u16 val)
+                           u16 reg, u16 val)
 {
        int ret;
        unsigned char data[4] = {0};
@@ -211,8 +211,8 @@ static int __ov2722_buf_reg_array(struct i2c_client *client,
 }
 
 static int __ov2722_write_reg_is_consecutive(struct i2c_client *client,
-                                            struct ov2722_write_ctrl *ctrl,
-                                            const struct ov2722_reg *next)
+       struct ov2722_write_ctrl *ctrl,
+       const struct ov2722_reg *next)
 {
        if (ctrl->index == 0)
                return 1;
@@ -242,7 +242,7 @@ static int ov2722_write_reg_array(struct i2c_client *client,
                         * flushed before proceed.
                         */
                        if (!__ov2722_write_reg_is_consecutive(client, &ctrl,
-                                                               next)) {
+                                                              next)) {
                                err = __ov2722_flush_reg_array(client, &ctrl);
                                if (err)
                                        return err;
@@ -250,7 +250,7 @@ static int ov2722_write_reg_array(struct i2c_client *client,
                        err = __ov2722_buf_reg_array(client, &ctrl, next);
                        if (err) {
                                dev_err(&client->dev, "%s: write error, aborted\n",
-                                        __func__);
+                                       __func__);
                                return err;
                        }
                        break;
@@ -276,14 +276,14 @@ static int ov2722_g_fnumber(struct v4l2_subdev *sd, s32 *val)
 static int ov2722_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
 {
        *val = (OV2722_F_NUMBER_DEFAULT_NUM << 24) |
-               (OV2722_F_NUMBER_DEM << 16) |
-               (OV2722_F_NUMBER_DEFAULT_NUM << 8) | OV2722_F_NUMBER_DEM;
+              (OV2722_F_NUMBER_DEM << 16) |
+              (OV2722_F_NUMBER_DEFAULT_NUM << 8) | OV2722_F_NUMBER_DEM;
        return 0;
 }
 
 static int ov2722_get_intg_factor(struct i2c_client *client,
-                               struct camera_mipi_info *info,
-                               const struct ov2722_resolution *res)
+                                 struct camera_mipi_info *info,
+                                 const struct ov2722_resolution *res)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov2722_device *dev = NULL;
@@ -304,17 +304,17 @@ static int ov2722_get_intg_factor(struct i2c_client *client,
 
        /* pixel clock calculattion */
        ret =  ov2722_read_reg(client, OV2722_8BIT,
-                               OV2722_SC_CMMN_PLL_CTRL3, &pre_pll_clk_div);
+                              OV2722_SC_CMMN_PLL_CTRL3, &pre_pll_clk_div);
        if (ret)
                return ret;
 
        ret =  ov2722_read_reg(client, OV2722_8BIT,
-                               OV2722_SC_CMMN_PLL_MULTIPLIER, &pll_multiplier);
+                              OV2722_SC_CMMN_PLL_MULTIPLIER, &pll_multiplier);
        if (ret)
                return ret;
 
        ret =  ov2722_read_reg(client, OV2722_8BIT,
-                               OV2722_SC_CMMN_PLL_DEBUG_OPT, &op_pix_clk_div);
+                              OV2722_SC_CMMN_PLL_DEBUG_OPT, &op_pix_clk_div);
        if (ret)
                return ret;
 
@@ -325,7 +325,7 @@ static int ov2722_get_intg_factor(struct i2c_client *client,
        pll_multiplier = pll_multiplier & 0x7f;
        op_pix_clk_div = op_pix_clk_div & 0x03;
        pix_clk_freq_hz = ext_clk_freq_hz / pre_pll_clk_div * pll_multiplier
-                               * op_pix_clk_div / pll_invariant_div;
+                         * op_pix_clk_div / pll_invariant_div;
 
        dev->vt_pix_clk_freq_mhz = pix_clk_freq_hz;
        buf->vt_pix_clk_freq_mhz = pix_clk_freq_hz;
@@ -333,11 +333,11 @@ static int ov2722_get_intg_factor(struct i2c_client *client,
        /* get integration time */
        buf->coarse_integration_time_min = OV2722_COARSE_INTG_TIME_MIN;
        buf->coarse_integration_time_max_margin =
-                                       OV2722_COARSE_INTG_TIME_MAX_MARGIN;
+           OV2722_COARSE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_min = OV2722_FINE_INTG_TIME_MIN;
        buf->fine_integration_time_max_margin =
-                                       OV2722_FINE_INTG_TIME_MAX_MARGIN;
+           OV2722_FINE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_def = OV2722_FINE_INTG_TIME_MIN;
        buf->frame_length_lines = res->lines_per_frame;
@@ -346,50 +346,50 @@ static int ov2722_get_intg_factor(struct i2c_client *client,
 
        /* get the cropping and output resolution to ISP for this mode. */
        ret =  ov2722_read_reg(client, OV2722_16BIT,
-                                       OV2722_H_CROP_START_H, &reg_val);
+                              OV2722_H_CROP_START_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_horizontal_start = reg_val;
 
        ret =  ov2722_read_reg(client, OV2722_16BIT,
-                                       OV2722_V_CROP_START_H, &reg_val);
+                              OV2722_V_CROP_START_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_vertical_start = reg_val;
 
        ret = ov2722_read_reg(client, OV2722_16BIT,
-                                       OV2722_H_CROP_END_H, &reg_val);
+                             OV2722_H_CROP_END_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_horizontal_end = reg_val;
 
        ret = ov2722_read_reg(client, OV2722_16BIT,
-                                       OV2722_V_CROP_END_H, &reg_val);
+                             OV2722_V_CROP_END_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_vertical_end = reg_val;
 
        ret = ov2722_read_reg(client, OV2722_16BIT,
-                                       OV2722_H_OUTSIZE_H, &reg_val);
+                             OV2722_H_OUTSIZE_H, &reg_val);
        if (ret)
                return ret;
        buf->output_width = reg_val;
 
        ret = ov2722_read_reg(client, OV2722_16BIT,
-                                       OV2722_V_OUTSIZE_H, &reg_val);
+                             OV2722_V_OUTSIZE_H, &reg_val);
        if (ret)
                return ret;
        buf->output_height = reg_val;
 
        buf->binning_factor_x = res->bin_factor_x ?
-                                       res->bin_factor_x : 1;
+                               res->bin_factor_x : 1;
        buf->binning_factor_y = res->bin_factor_y ?
-                                       res->bin_factor_y : 1;
+                               res->bin_factor_y : 1;
        return 0;
 }
 
 static long __ov2722_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
-                                int gain, int digitgain)
+                                 int gain, int digitgain)
 
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -414,53 +414,53 @@ static long __ov2722_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        digitgain <<= 2;
 
        ret = ov2722_write_reg(client, OV2722_16BIT,
-                               OV2722_VTS_H, vts);
+                              OV2722_VTS_H, vts);
        if (ret)
                return ret;
 
        ret = ov2722_write_reg(client, OV2722_16BIT,
-                               OV2722_HTS_H, hts);
+                              OV2722_HTS_H, hts);
        if (ret)
                return ret;
 
        /* set exposure */
        ret = ov2722_write_reg(client, OV2722_8BIT,
-                                       OV2722_AEC_PK_EXPO_L,
-                                       coarse_itg & 0xff);
+                              OV2722_AEC_PK_EXPO_L,
+                              coarse_itg & 0xff);
        if (ret)
                return ret;
 
        ret = ov2722_write_reg(client, OV2722_16BIT,
-                                       OV2722_AEC_PK_EXPO_H,
-                                       (coarse_itg >> 8) & 0xfff);
+                              OV2722_AEC_PK_EXPO_H,
+                              (coarse_itg >> 8) & 0xfff);
        if (ret)
                return ret;
 
        /* set analog gain */
        ret = ov2722_write_reg(client, OV2722_16BIT,
-                                       OV2722_AGC_ADJ_H, gain);
+                              OV2722_AGC_ADJ_H, gain);
        if (ret)
                return ret;
 
        /* set digital gain */
        ret = ov2722_write_reg(client, OV2722_16BIT,
-                               OV2722_MWB_GAIN_R_H, digitgain);
+                              OV2722_MWB_GAIN_R_H, digitgain);
        if (ret)
                return ret;
 
        ret = ov2722_write_reg(client, OV2722_16BIT,
-                               OV2722_MWB_GAIN_G_H, digitgain);
+                              OV2722_MWB_GAIN_G_H, digitgain);
        if (ret)
                return ret;
 
        ret = ov2722_write_reg(client, OV2722_16BIT,
-                               OV2722_MWB_GAIN_B_H, digitgain);
+                              OV2722_MWB_GAIN_B_H, digitgain);
 
        return ret;
 }
 
 static int ov2722_set_exposure(struct v4l2_subdev *sd, int exposure,
-       int gain, int digitgain)
+                              int gain, int digitgain)
 {
        struct ov2722_device *dev = to_ov2722_sensor(sd);
        int ret;
@@ -473,7 +473,7 @@ static int ov2722_set_exposure(struct v4l2_subdev *sd, int exposure,
 }
 
 static long ov2722_s_exposure(struct v4l2_subdev *sd,
-                              struct atomisp_exposure *exposure)
+                             struct atomisp_exposure *exposure)
 {
        int exp = exposure->integration_time[0];
        int gain = exposure->gain[0];
@@ -512,21 +512,21 @@ static int ov2722_q_exposure(struct v4l2_subdev *sd, s32 *value)
 
        /* get exposure */
        ret = ov2722_read_reg(client, OV2722_8BIT,
-                                       OV2722_AEC_PK_EXPO_L,
-                                       &reg_v);
+                             OV2722_AEC_PK_EXPO_L,
+                             &reg_v);
        if (ret)
                goto err;
 
        ret = ov2722_read_reg(client, OV2722_8BIT,
-                                       OV2722_AEC_PK_EXPO_M,
-                                       &reg_v2);
+                             OV2722_AEC_PK_EXPO_M,
+                             &reg_v2);
        if (ret)
                goto err;
 
        reg_v += reg_v2 << 8;
        ret = ov2722_read_reg(client, OV2722_8BIT,
-                                       OV2722_AEC_PK_EXPO_H,
-                                       &reg_v2);
+                             OV2722_AEC_PK_EXPO_H,
+                             &reg_v2);
        if (ret)
                goto err;
 
@@ -575,60 +575,60 @@ static const struct v4l2_ctrl_ops ctrl_ops = {
 
 static const struct v4l2_ctrl_config ov2722_controls[] = {
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_EXPOSURE_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "exposure",
-        .min = 0x0,
-        .max = 0xffff,
-        .step = 0x01,
-        .def = 0x00,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "exposure",
+               .min = 0x0,
+               .max = 0xffff,
+               .step = 0x01,
+               .def = 0x00,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FOCAL_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "focal length",
-        .min = OV2722_FOCAL_LENGTH_DEFAULT,
-        .max = OV2722_FOCAL_LENGTH_DEFAULT,
-        .step = 0x01,
-        .def = OV2722_FOCAL_LENGTH_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FOCAL_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "focal length",
+               .min = OV2722_FOCAL_LENGTH_DEFAULT,
+               .max = OV2722_FOCAL_LENGTH_DEFAULT,
+               .step = 0x01,
+               .def = OV2722_FOCAL_LENGTH_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "f-number",
-        .min = OV2722_F_NUMBER_DEFAULT,
-        .max = OV2722_F_NUMBER_DEFAULT,
-        .step = 0x01,
-        .def = OV2722_F_NUMBER_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "f-number",
+               .min = OV2722_F_NUMBER_DEFAULT,
+               .max = OV2722_F_NUMBER_DEFAULT,
+               .step = 0x01,
+               .def = OV2722_F_NUMBER_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_RANGE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "f-number range",
-        .min = OV2722_F_NUMBER_RANGE,
-        .max = OV2722_F_NUMBER_RANGE,
-        .step = 0x01,
-        .def = OV2722_F_NUMBER_RANGE,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_RANGE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "f-number range",
+               .min = OV2722_F_NUMBER_RANGE,
+               .max = OV2722_F_NUMBER_RANGE,
+               .step = 0x01,
+               .def = OV2722_F_NUMBER_RANGE,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_LINK_FREQ,
-        .name = "Link Frequency",
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .min = 1,
-        .max = 1500000 * 1000,
-        .step = 1,
-        .def = 1,
-        .flags = V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_LINK_FREQ,
+               .name = "Link Frequency",
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .min = 1,
+               .max = 1500000 * 1000,
+               .step = 1,
+               .def = 1,
+               .flags = V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY,
+       },
 };
 
 static int ov2722_init(struct v4l2_subdev *sd)
@@ -859,7 +859,7 @@ static int startup(struct v4l2_subdev *sd)
        int ret = 0;
 
        ret = ov2722_write_reg(client, OV2722_8BIT,
-                                       OV2722_SW_RESET, 0x01);
+                              OV2722_SW_RESET, 0x01);
        if (ret) {
                dev_err(&client->dev, "ov2722 reset err.\n");
                return ret;
@@ -950,7 +950,7 @@ static int ov2722_set_fmt(struct v4l2_subdev *sd,
        }
 
        ret = ov2722_get_intg_factor(client, ov2722_info,
-                                       &ov2722_res[dev->fmt_idx]);
+                                    &ov2722_res[dev->fmt_idx]);
        if (ret)
                dev_err(&client->dev, "failed to get integration_factor\n");
 
@@ -990,13 +990,13 @@ static int ov2722_detect(struct i2c_client *client)
                return -ENODEV;
 
        ret = ov2722_read_reg(client, OV2722_8BIT,
-                                       OV2722_SC_CMMN_CHIP_ID_H, &high);
+                             OV2722_SC_CMMN_CHIP_ID_H, &high);
        if (ret) {
                dev_err(&client->dev, "sensor_id_high = 0x%x\n", high);
                return -ENODEV;
        }
        ret = ov2722_read_reg(client, OV2722_8BIT,
-                                       OV2722_SC_CMMN_CHIP_ID_L, &low);
+                             OV2722_SC_CMMN_CHIP_ID_L, &low);
        id = (high << 8) | low;
 
        if ((id != OV2722_ID) && (id != OV2720_ID)) {
@@ -1005,7 +1005,7 @@ static int ov2722_detect(struct i2c_client *client)
        }
 
        ret = ov2722_read_reg(client, OV2722_8BIT,
-                                       OV2722_SC_CMMN_SUB_ID, &high);
+                             OV2722_SC_CMMN_SUB_ID, &high);
        revision = (u8)high & 0x0f;
 
        dev_dbg(&client->dev, "sensor_revision = 0x%x\n", revision);
@@ -1022,8 +1022,8 @@ static int ov2722_s_stream(struct v4l2_subdev *sd, int enable)
        mutex_lock(&dev->input_lock);
 
        ret = ov2722_write_reg(client, OV2722_8BIT, OV2722_SW_STREAM,
-                               enable ? OV2722_START_STREAMING :
-                               OV2722_STOP_STREAMING);
+                              enable ? OV2722_START_STREAMING :
+                              OV2722_STOP_STREAMING);
 
        mutex_unlock(&dev->input_lock);
        return ret;
@@ -1040,7 +1040,7 @@ static int ov2722_s_config(struct v4l2_subdev *sd,
                return -ENODEV;
 
        dev->platform_data =
-               (struct camera_sensor_platform_data *)platform_data;
+           (struct camera_sensor_platform_data *)platform_data;
 
        mutex_lock(&dev->input_lock);
 
index 4283447fd76f1b661c5fbc11ccccbefd8ac96c8a..172cec0bb39868aadbf2fdd7e6bad73b84efaa30 100644 (file)
@@ -341,52 +341,52 @@ struct mt9m114_write_ctrl {
  */
 static struct mt9m114_res_struct mt9m114_res[] = {
        {
-       .desc   = "720P",
-       .res    = MT9M114_RES_736P,
-       .width  = 1296,
-       .height = 736,
-       .fps    = 30,
-       .used   = false,
-       .regs   = NULL,
-       .skip_frames = 1,
-
-       .pixels_per_line = 0x0640,
-       .lines_per_frame = 0x0307,
-       .bin_factor_x = 1,
-       .bin_factor_y = 1,
-       .bin_mode = 0,
+               .desc   = "720P",
+               .res    = MT9M114_RES_736P,
+               .width  = 1296,
+               .height = 736,
+               .fps    = 30,
+               .used   = false,
+               .regs   = NULL,
+               .skip_frames = 1,
+
+               .pixels_per_line = 0x0640,
+               .lines_per_frame = 0x0307,
+               .bin_factor_x = 1,
+               .bin_factor_y = 1,
+               .bin_mode = 0,
        },
        {
-       .desc   = "848P",
-       .res    = MT9M114_RES_864P,
-       .width  = 1296,
-       .height = 864,
-       .fps    = 30,
-       .used   = false,
-       .regs   = NULL,
-       .skip_frames = 1,
-
-       .pixels_per_line = 0x0640,
-       .lines_per_frame = 0x03E8,
-       .bin_factor_x = 1,
-       .bin_factor_y = 1,
-       .bin_mode = 0,
+               .desc   = "848P",
+               .res    = MT9M114_RES_864P,
+               .width  = 1296,
+               .height = 864,
+               .fps    = 30,
+               .used   = false,
+               .regs   = NULL,
+               .skip_frames = 1,
+
+               .pixels_per_line = 0x0640,
+               .lines_per_frame = 0x03E8,
+               .bin_factor_x = 1,
+               .bin_factor_y = 1,
+               .bin_mode = 0,
        },
        {
-       .desc   = "960P",
-       .res    = MT9M114_RES_960P,
-       .width  = 1296,
-       .height = 976,
-       .fps    = 30,
-       .used   = false,
-       .regs   = NULL,
-       .skip_frames = 1,
-
-       .pixels_per_line = 0x0644, /* consistent with regs arrays */
-       .lines_per_frame = 0x03E5, /* consistent with regs arrays */
-       .bin_factor_x = 1,
-       .bin_factor_y = 1,
-       .bin_mode = 0,
+               .desc   = "960P",
+               .res    = MT9M114_RES_960P,
+               .width  = 1296,
+               .height = 976,
+               .fps    = 30,
+               .used   = false,
+               .regs   = NULL,
+               .skip_frames = 1,
+
+               .pixels_per_line = 0x0644, /* consistent with regs arrays */
+               .lines_per_frame = 0x03E5, /* consistent with regs arrays */
+               .bin_factor_x = 1,
+               .bin_factor_y = 1,
+               .bin_mode = 0,
        },
 };
 
@@ -500,33 +500,33 @@ static struct misensor_reg const mt9m114_exp_center[] = {
 
 #if 0 /* Currently unused */
 static struct misensor_reg const mt9m114_suspend[] = {
-        {MISENSOR_16BIT,  0x098E, 0xDC00},
-        {MISENSOR_8BIT,  0xDC00, 0x40},
-        {MISENSOR_16BIT,  0x0080, 0x8002},
-        {MISENSOR_TOK_TERM, 0, 0}
+       {MISENSOR_16BIT,  0x098E, 0xDC00},
+       {MISENSOR_8BIT,  0xDC00, 0x40},
+       {MISENSOR_16BIT,  0x0080, 0x8002},
+       {MISENSOR_TOK_TERM, 0, 0}
 };
 
 static struct misensor_reg const mt9m114_streaming[] = {
-        {MISENSOR_16BIT,  0x098E, 0xDC00},
-        {MISENSOR_8BIT,  0xDC00, 0x34},
-        {MISENSOR_16BIT,  0x0080, 0x8002},
-        {MISENSOR_TOK_TERM, 0, 0}
+       {MISENSOR_16BIT,  0x098E, 0xDC00},
+       {MISENSOR_8BIT,  0xDC00, 0x34},
+       {MISENSOR_16BIT,  0x0080, 0x8002},
+       {MISENSOR_TOK_TERM, 0, 0}
 };
 #endif
 
 static struct misensor_reg const mt9m114_standby_reg[] = {
-        {MISENSOR_16BIT,  0x098E, 0xDC00},
-        {MISENSOR_8BIT,  0xDC00, 0x50},
-        {MISENSOR_16BIT,  0x0080, 0x8002},
-        {MISENSOR_TOK_TERM, 0, 0}
+       {MISENSOR_16BIT,  0x098E, 0xDC00},
+       {MISENSOR_8BIT,  0xDC00, 0x50},
+       {MISENSOR_16BIT,  0x0080, 0x8002},
+       {MISENSOR_TOK_TERM, 0, 0}
 };
 
 #if 0 /* Currently unused */
 static struct misensor_reg const mt9m114_wakeup_reg[] = {
-        {MISENSOR_16BIT,  0x098E, 0xDC00},
-        {MISENSOR_8BIT,  0xDC00, 0x54},
-        {MISENSOR_16BIT,  0x0080, 0x8002},
-        {MISENSOR_TOK_TERM, 0, 0}
+       {MISENSOR_16BIT,  0x098E, 0xDC00},
+       {MISENSOR_8BIT,  0xDC00, 0x54},
+       {MISENSOR_16BIT,  0x0080, 0x8002},
+       {MISENSOR_TOK_TERM, 0, 0}
 };
 #endif
 
@@ -590,7 +590,7 @@ static struct misensor_reg const mt9m114_976P_init[] = {
        {MISENSOR_16BIT, 0xC80C, 0x0001}, /* cam_sensor_cfg_row_speed = 1 */
        /* cam_sensor_cfg_fine_integ_time_min = 219 */
        {MISENSOR_16BIT, 0xC80E, 0x00DB},
-        /* 0x062E //cam_sensor_cfg_fine_integ_time_max = 1459 */
+       /* 0x062E //cam_sensor_cfg_fine_integ_time_max = 1459 */
        {MISENSOR_16BIT, 0xC810, 0x05B3},
        /* 0x074C //cam_sensor_cfg_frame_length_lines = 1006 */
        {MISENSOR_16BIT, 0xC812, 0x03E5},
@@ -800,19 +800,19 @@ static struct misensor_reg const mt9m114_common[] = {
 
 #if 0 /* Currently unused */
 static struct misensor_reg const mt9m114_antiflicker_50hz[] = {
-        {MISENSOR_16BIT,  0x098E, 0xC88B},
-        {MISENSOR_8BIT,  0xC88B, 0x32},
-        {MISENSOR_8BIT,  0xDC00, 0x28},
-        {MISENSOR_16BIT,  0x0080, 0x8002},
-        {MISENSOR_TOK_TERM, 0, 0}
+       {MISENSOR_16BIT,  0x098E, 0xC88B},
+       {MISENSOR_8BIT,  0xC88B, 0x32},
+       {MISENSOR_8BIT,  0xDC00, 0x28},
+       {MISENSOR_16BIT,  0x0080, 0x8002},
+       {MISENSOR_TOK_TERM, 0, 0}
 };
 
 static struct misensor_reg const mt9m114_antiflicker_60hz[] = {
-        {MISENSOR_16BIT,  0x098E, 0xC88B},
-        {MISENSOR_8BIT,  0xC88B, 0x3C},
-        {MISENSOR_8BIT,  0xDC00, 0x28},
-        {MISENSOR_16BIT,  0x0080, 0x8002},
-        {MISENSOR_TOK_TERM, 0, 0}
+       {MISENSOR_16BIT,  0x098E, 0xC88B},
+       {MISENSOR_8BIT,  0xC88B, 0x3C},
+       {MISENSOR_8BIT,  0xDC00, 0x28},
+       {MISENSOR_16BIT,  0x0080, 0x8002},
+       {MISENSOR_TOK_TERM, 0, 0}
 };
 
 static struct misensor_reg const mt9m114_iq[] = {
index d216d827e573cfca578b27ce023533386a502401..741d0e2e039877d2dab2b4d1f4576e60f5a7afc4 100644 (file)
@@ -162,659 +162,659 @@ struct ov2680_format {
        struct ov2680_reg *regs;
 };
 
-       /*
       * ov2680 device structure.
       */
-       struct ov2680_device {
-               struct v4l2_subdev sd;
-               struct media_pad pad;
-               struct v4l2_mbus_framefmt format;
-               struct mutex input_lock;
+/*
+ * ov2680 device structure.
+ */
+struct ov2680_device {
+       struct v4l2_subdev sd;
+       struct media_pad pad;
+       struct v4l2_mbus_framefmt format;
+       struct mutex input_lock;
        struct v4l2_ctrl_handler ctrl_handler;
-               struct camera_sensor_platform_data *platform_data;
-               int vt_pix_clk_freq_mhz;
-               int fmt_idx;
-               int run_mode;
-               u8 res;
-               u8 type;
-       };
-
-       enum ov2680_tok_type {
-               OV2680_8BIT  = 0x0001,
-               OV2680_16BIT = 0x0002,
-               OV2680_32BIT = 0x0004,
-               OV2680_TOK_TERM   = 0xf000,     /* terminating token for reg list */
-               OV2680_TOK_DELAY  = 0xfe00,     /* delay token for reg list */
-               OV2680_TOK_MASK = 0xfff0
-       };
-
-       /**
       * struct ov2680_reg - MI sensor  register format
       * @type: type of the register
       * @reg: 16-bit offset to register
       * @val: 8/16/32-bit register value
       *
       * Define a structure for sensor register initialization values
       */
-       struct ov2680_reg {
-               enum ov2680_tok_type type;
-               u16 reg;
-               u32 val;        /* @set value for read/mod/write, @mask */
-       };
-
-       #define to_ov2680_sensor(x) container_of(x, struct ov2680_device, sd)
-
-       #define OV2680_MAX_WRITE_BUF_SIZE       30
-
-       struct ov2680_write_buffer {
-               u16 addr;
-               u8 data[OV2680_MAX_WRITE_BUF_SIZE];
-       };
-
-       struct ov2680_write_ctrl {
-               int index;
-               struct ov2680_write_buffer buffer;
-       };
-
-       static struct ov2680_reg const ov2680_global_setting[] = {
-           {OV2680_8BIT, 0x0103, 0x01},
-           {OV2680_8BIT, 0x3002, 0x00},
-           {OV2680_8BIT, 0x3016, 0x1c},
-           {OV2680_8BIT, 0x3018, 0x44},
-           {OV2680_8BIT, 0x3020, 0x00},
-           {OV2680_8BIT, 0x3080, 0x02},
-           {OV2680_8BIT, 0x3082, 0x45},
-           {OV2680_8BIT, 0x3084, 0x09},
-           {OV2680_8BIT, 0x3085, 0x04},
-           {OV2680_8BIT, 0x3503, 0x03},
-           {OV2680_8BIT, 0x350b, 0x36},
-           {OV2680_8BIT, 0x3600, 0xb4},
-           {OV2680_8BIT, 0x3603, 0x39},
-           {OV2680_8BIT, 0x3604, 0x24},
-           {OV2680_8BIT, 0x3605, 0x00},
-           {OV2680_8BIT, 0x3620, 0x26},
-           {OV2680_8BIT, 0x3621, 0x37},
-           {OV2680_8BIT, 0x3622, 0x04},
-           {OV2680_8BIT, 0x3628, 0x00},
-           {OV2680_8BIT, 0x3705, 0x3c},
-           {OV2680_8BIT, 0x370c, 0x50},
-           {OV2680_8BIT, 0x370d, 0xc0},
-           {OV2680_8BIT, 0x3718, 0x88},
-           {OV2680_8BIT, 0x3720, 0x00},
-           {OV2680_8BIT, 0x3721, 0x00},
-           {OV2680_8BIT, 0x3722, 0x00},
-           {OV2680_8BIT, 0x3723, 0x00},
-           {OV2680_8BIT, 0x3738, 0x00},
-           {OV2680_8BIT, 0x3717, 0x58},
-           {OV2680_8BIT, 0x3781, 0x80},
-           {OV2680_8BIT, 0x3789, 0x60},
-           {OV2680_8BIT, 0x3800, 0x00},
-           {OV2680_8BIT, 0x3819, 0x04},
-           {OV2680_8BIT, 0x4000, 0x81},
-           {OV2680_8BIT, 0x4001, 0x40},
-           {OV2680_8BIT, 0x4602, 0x02},
-           {OV2680_8BIT, 0x481f, 0x36},
-           {OV2680_8BIT, 0x4825, 0x36},
-           {OV2680_8BIT, 0x4837, 0x18},
-           {OV2680_8BIT, 0x5002, 0x30},
-           {OV2680_8BIT, 0x5004, 0x04},//manual awb 1x
-           {OV2680_8BIT, 0x5005, 0x00},
-           {OV2680_8BIT, 0x5006, 0x04},
-           {OV2680_8BIT, 0x5007, 0x00},
-           {OV2680_8BIT, 0x5008, 0x04},
-           {OV2680_8BIT, 0x5009, 0x00},
-           {OV2680_8BIT, 0x5080, 0x00},
-           {OV2680_8BIT, 0x3701, 0x64},  //add on 14/05/13
-           {OV2680_8BIT, 0x3784, 0x0c},  //based OV2680_R1A_AM10.ovt add on 14/06/13
-           {OV2680_8BIT, 0x5780, 0x3e},  //based OV2680_R1A_AM10.ovt,Adjust DPC setting (57xx) on 14/06/13
-           {OV2680_8BIT, 0x5781, 0x0f},
-           {OV2680_8BIT, 0x5782, 0x04},
-           {OV2680_8BIT, 0x5783, 0x02},
-           {OV2680_8BIT, 0x5784, 0x01},
-           {OV2680_8BIT, 0x5785, 0x01},
-           {OV2680_8BIT, 0x5786, 0x00},
-           {OV2680_8BIT, 0x5787, 0x04},
-           {OV2680_8BIT, 0x5788, 0x02},
-           {OV2680_8BIT, 0x5789, 0x00},
-           {OV2680_8BIT, 0x578a, 0x01},
-           {OV2680_8BIT, 0x578b, 0x02},
-           {OV2680_8BIT, 0x578c, 0x03},
-           {OV2680_8BIT, 0x578d, 0x03},
-           {OV2680_8BIT, 0x578e, 0x08},
-           {OV2680_8BIT, 0x578f, 0x0c},
-           {OV2680_8BIT, 0x5790, 0x08},
-           {OV2680_8BIT, 0x5791, 0x04},
-           {OV2680_8BIT, 0x5792, 0x00},
-           {OV2680_8BIT, 0x5793, 0x00},
-           {OV2680_8BIT, 0x5794, 0x03}, //based OV2680_R1A_AM10.ovt,Adjust DPC setting (57xx) on 14/06/13
-               {OV2680_8BIT, 0x0100, 0x00},    //stream off
-
-               {OV2680_TOK_TERM, 0, 0}
-       };
+       struct camera_sensor_platform_data *platform_data;
+       int vt_pix_clk_freq_mhz;
+       int fmt_idx;
+       int run_mode;
+       u8 res;
+       u8 type;
+};
+
+enum ov2680_tok_type {
+       OV2680_8BIT  = 0x0001,
+       OV2680_16BIT = 0x0002,
+       OV2680_32BIT = 0x0004,
+       OV2680_TOK_TERM   = 0xf000,     /* terminating token for reg list */
+       OV2680_TOK_DELAY  = 0xfe00,     /* delay token for reg list */
+       OV2680_TOK_MASK = 0xfff0
+};
+
+/**
+ * struct ov2680_reg - MI sensor  register format
+ * @type: type of the register
+ * @reg: 16-bit offset to register
+ * @val: 8/16/32-bit register value
+ *
+ * Define a structure for sensor register initialization values
+ */
+struct ov2680_reg {
+       enum ov2680_tok_type type;
+       u16 reg;
+       u32 val;        /* @set value for read/mod/write, @mask */
+};
+
+#define to_ov2680_sensor(x) container_of(x, struct ov2680_device, sd)
+
+#define OV2680_MAX_WRITE_BUF_SIZE      30
+
+struct ov2680_write_buffer {
+       u16 addr;
+       u8 data[OV2680_MAX_WRITE_BUF_SIZE];
+};
+
+struct ov2680_write_ctrl {
+       int index;
+       struct ov2680_write_buffer buffer;
+};
+
+static struct ov2680_reg const ov2680_global_setting[] = {
+       {OV2680_8BIT, 0x0103, 0x01},
+       {OV2680_8BIT, 0x3002, 0x00},
+       {OV2680_8BIT, 0x3016, 0x1c},
+       {OV2680_8BIT, 0x3018, 0x44},
+       {OV2680_8BIT, 0x3020, 0x00},
+       {OV2680_8BIT, 0x3080, 0x02},
+       {OV2680_8BIT, 0x3082, 0x45},
+       {OV2680_8BIT, 0x3084, 0x09},
+       {OV2680_8BIT, 0x3085, 0x04},
+       {OV2680_8BIT, 0x3503, 0x03},
+       {OV2680_8BIT, 0x350b, 0x36},
+       {OV2680_8BIT, 0x3600, 0xb4},
+       {OV2680_8BIT, 0x3603, 0x39},
+       {OV2680_8BIT, 0x3604, 0x24},
+       {OV2680_8BIT, 0x3605, 0x00},
+       {OV2680_8BIT, 0x3620, 0x26},
+       {OV2680_8BIT, 0x3621, 0x37},
+       {OV2680_8BIT, 0x3622, 0x04},
+       {OV2680_8BIT, 0x3628, 0x00},
+       {OV2680_8BIT, 0x3705, 0x3c},
+       {OV2680_8BIT, 0x370c, 0x50},
+       {OV2680_8BIT, 0x370d, 0xc0},
+       {OV2680_8BIT, 0x3718, 0x88},
+       {OV2680_8BIT, 0x3720, 0x00},
+       {OV2680_8BIT, 0x3721, 0x00},
+       {OV2680_8BIT, 0x3722, 0x00},
+       {OV2680_8BIT, 0x3723, 0x00},
+       {OV2680_8BIT, 0x3738, 0x00},
+       {OV2680_8BIT, 0x3717, 0x58},
+       {OV2680_8BIT, 0x3781, 0x80},
+       {OV2680_8BIT, 0x3789, 0x60},
+       {OV2680_8BIT, 0x3800, 0x00},
+       {OV2680_8BIT, 0x3819, 0x04},
+       {OV2680_8BIT, 0x4000, 0x81},
+       {OV2680_8BIT, 0x4001, 0x40},
+       {OV2680_8BIT, 0x4602, 0x02},
+       {OV2680_8BIT, 0x481f, 0x36},
+       {OV2680_8BIT, 0x4825, 0x36},
+       {OV2680_8BIT, 0x4837, 0x18},
+       {OV2680_8BIT, 0x5002, 0x30},
+       {OV2680_8BIT, 0x5004, 0x04},//manual awb 1x
+       {OV2680_8BIT, 0x5005, 0x00},
+       {OV2680_8BIT, 0x5006, 0x04},
+       {OV2680_8BIT, 0x5007, 0x00},
+       {OV2680_8BIT, 0x5008, 0x04},
+       {OV2680_8BIT, 0x5009, 0x00},
+       {OV2680_8BIT, 0x5080, 0x00},
+       {OV2680_8BIT, 0x3701, 0x64},  //add on 14/05/13
+       {OV2680_8BIT, 0x3784, 0x0c},  //based OV2680_R1A_AM10.ovt add on 14/06/13
+       {OV2680_8BIT, 0x5780, 0x3e},  //based OV2680_R1A_AM10.ovt,Adjust DPC setting (57xx) on 14/06/13
+       {OV2680_8BIT, 0x5781, 0x0f},
+       {OV2680_8BIT, 0x5782, 0x04},
+       {OV2680_8BIT, 0x5783, 0x02},
+       {OV2680_8BIT, 0x5784, 0x01},
+       {OV2680_8BIT, 0x5785, 0x01},
+       {OV2680_8BIT, 0x5786, 0x00},
+       {OV2680_8BIT, 0x5787, 0x04},
+       {OV2680_8BIT, 0x5788, 0x02},
+       {OV2680_8BIT, 0x5789, 0x00},
+       {OV2680_8BIT, 0x578a, 0x01},
+       {OV2680_8BIT, 0x578b, 0x02},
+       {OV2680_8BIT, 0x578c, 0x03},
+       {OV2680_8BIT, 0x578d, 0x03},
+       {OV2680_8BIT, 0x578e, 0x08},
+       {OV2680_8BIT, 0x578f, 0x0c},
+       {OV2680_8BIT, 0x5790, 0x08},
+       {OV2680_8BIT, 0x5791, 0x04},
+       {OV2680_8BIT, 0x5792, 0x00},
+       {OV2680_8BIT, 0x5793, 0x00},
+       {OV2680_8BIT, 0x5794, 0x03}, //based OV2680_R1A_AM10.ovt,Adjust DPC setting (57xx) on 14/06/13
+       {OV2680_8BIT, 0x0100, 0x00},    //stream off
+
+       {OV2680_TOK_TERM, 0, 0}
+};
 
 #if 0 /* None of the definitions below are used currently */
-       /*
       * 176x144 30fps  VBlanking 1lane 10Bit (binning)
       */
-       static struct ov2680_reg const ov2680_QCIF_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x01},
-               {OV2680_8BIT, 0x3501, 0x24},
-               {OV2680_8BIT, 0x3502, 0x40},
-               {OV2680_8BIT, 0x370a, 0x23},
-               {OV2680_8BIT, 0x3801, 0xa0},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x78},
-               {OV2680_8BIT, 0x3804, 0x05},
-               {OV2680_8BIT, 0x3805, 0xaf},
-               {OV2680_8BIT, 0x3806, 0x04},
-               {OV2680_8BIT, 0x3807, 0x47},
-               {OV2680_8BIT, 0x3808, 0x00},
-               {OV2680_8BIT, 0x3809, 0xC0},
-               {OV2680_8BIT, 0x380a, 0x00},
-               {OV2680_8BIT, 0x380b, 0xa0},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xb0},
-               {OV2680_8BIT, 0x380e, 0x02},
-               {OV2680_8BIT, 0x380f, 0x84},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x04},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x04},
-               {OV2680_8BIT, 0x3814, 0x31},
-               {OV2680_8BIT, 0x3815, 0x31},
-               {OV2680_8BIT, 0x4000, 0x81},
-               {OV2680_8BIT, 0x4001, 0x40},
-               {OV2680_8BIT, 0x4008, 0x00},
-               {OV2680_8BIT, 0x4009, 0x03},
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
-               {OV2680_8BIT, 0x5704, 0x10},
-               {OV2680_8BIT, 0x5705, 0xa0},
-               {OV2680_8BIT, 0x5706, 0x0c},
-               {OV2680_8BIT, 0x5707, 0x78},
-               {OV2680_8BIT, 0x3820, 0xc2},
-               {OV2680_8BIT, 0x3821, 0x01},
-               // {OV2680_8BIT, 0x5090, 0x0c},
-               {OV2680_TOK_TERM, 0, 0}
-       };
-
-       /*
       * 352x288 30fps  VBlanking 1lane 10Bit (binning)
       */
-       static struct ov2680_reg const ov2680_CIF_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x01},
-               {OV2680_8BIT, 0x3501, 0x24},
-               {OV2680_8BIT, 0x3502, 0x40},
-               {OV2680_8BIT, 0x370a, 0x23},
-               {OV2680_8BIT, 0x3801, 0xa0},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x78},
-               {OV2680_8BIT, 0x3804, 0x03},
-               {OV2680_8BIT, 0x3805, 0x8f},
-               {OV2680_8BIT, 0x3806, 0x02},
-               {OV2680_8BIT, 0x3807, 0xe7},
-               {OV2680_8BIT, 0x3808, 0x01},
-               {OV2680_8BIT, 0x3809, 0x70},
-               {OV2680_8BIT, 0x380a, 0x01},
-               {OV2680_8BIT, 0x380b, 0x30},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xb0},
-               {OV2680_8BIT, 0x380e, 0x02},
-               {OV2680_8BIT, 0x380f, 0x84},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x04},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x04},
-               {OV2680_8BIT, 0x3814, 0x31},
-               {OV2680_8BIT, 0x3815, 0x31},
-               {OV2680_8BIT, 0x4008, 0x00},
-               {OV2680_8BIT, 0x4009, 0x03},
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
-               {OV2680_8BIT, 0x5704, 0x10},
-               {OV2680_8BIT, 0x5705, 0xa0},
-               {OV2680_8BIT, 0x5706, 0x0c},
-               {OV2680_8BIT, 0x5707, 0x78},
-               {OV2680_8BIT, 0x3820, 0xc2},
-               {OV2680_8BIT, 0x3821, 0x01},
-               // {OV2680_8BIT, 0x5090, 0x0c},
-               {OV2680_TOK_TERM, 0, 0}
-       };
-
-       /*
       * 336x256 30fps  VBlanking 1lane 10Bit (binning)
       */
-       static struct ov2680_reg const ov2680_QVGA_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x01},
-               {OV2680_8BIT, 0x3501, 0x24},
-               {OV2680_8BIT, 0x3502, 0x40},
-               {OV2680_8BIT, 0x370a, 0x23},
-               {OV2680_8BIT, 0x3801, 0xa0},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x78},
-               {OV2680_8BIT, 0x3804, 0x03},
-               {OV2680_8BIT, 0x3805, 0x4f},
-               {OV2680_8BIT, 0x3806, 0x02},
-               {OV2680_8BIT, 0x3807, 0x87},
-               {OV2680_8BIT, 0x3808, 0x01},
-               {OV2680_8BIT, 0x3809, 0x50},
-               {OV2680_8BIT, 0x380a, 0x01},
-               {OV2680_8BIT, 0x380b, 0x00},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xb0},
-               {OV2680_8BIT, 0x380e, 0x02},
-               {OV2680_8BIT, 0x380f, 0x84},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x04},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x04},
-               {OV2680_8BIT, 0x3814, 0x31},
-               {OV2680_8BIT, 0x3815, 0x31},
-               {OV2680_8BIT, 0x4008, 0x00},
-               {OV2680_8BIT, 0x4009, 0x03},
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
-               {OV2680_8BIT, 0x5704, 0x10},
-               {OV2680_8BIT, 0x5705, 0xa0},
-               {OV2680_8BIT, 0x5706, 0x0c},
-               {OV2680_8BIT, 0x5707, 0x78},
-               {OV2680_8BIT, 0x3820, 0xc2},
-               {OV2680_8BIT, 0x3821, 0x01},
-               // {OV2680_8BIT, 0x5090, 0x0c},
-               {OV2680_TOK_TERM, 0, 0}
-       };
-
-       /*
       * 656x496 30fps  VBlanking 1lane 10Bit (binning)
       */
-       static struct ov2680_reg const ov2680_656x496_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x01},
-               {OV2680_8BIT, 0x3501, 0x24},
-               {OV2680_8BIT, 0x3502, 0x40},
-               {OV2680_8BIT, 0x370a, 0x23},
-               {OV2680_8BIT, 0x3801, 0xa0},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x78},
-               {OV2680_8BIT, 0x3804, 0x05},
-               {OV2680_8BIT, 0x3805, 0xcf},
-               {OV2680_8BIT, 0x3806, 0x04},
-               {OV2680_8BIT, 0x3807, 0x67},
-               {OV2680_8BIT, 0x3808, 0x02},
-               {OV2680_8BIT, 0x3809, 0x90},
-               {OV2680_8BIT, 0x380a, 0x01},
-               {OV2680_8BIT, 0x380b, 0xf0},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xb0},
-               {OV2680_8BIT, 0x380e, 0x02},
-               {OV2680_8BIT, 0x380f, 0x84},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x04},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x04},
-               {OV2680_8BIT, 0x3814, 0x31},
-               {OV2680_8BIT, 0x3815, 0x31},
-               {OV2680_8BIT, 0x4008, 0x00},
-               {OV2680_8BIT, 0x4009, 0x03},
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
-               {OV2680_8BIT, 0x5704, 0x10},
-               {OV2680_8BIT, 0x5705, 0xa0},
-               {OV2680_8BIT, 0x5706, 0x0c},
-               {OV2680_8BIT, 0x5707, 0x78},
-               {OV2680_8BIT, 0x3820, 0xc2},
-               {OV2680_8BIT, 0x3821, 0x01},
-               // {OV2680_8BIT, 0x5090, 0x0c},
-               {OV2680_TOK_TERM, 0, 0}
-       };
-       /*
-       * 800x600 30fps  VBlanking 1lane 10Bit (binning)
-       */
-       static struct ov2680_reg const ov2680_720x592_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x01},
-               {OV2680_8BIT, 0x3501, 0x26},
-               {OV2680_8BIT, 0x3502, 0x40},
-               {OV2680_8BIT, 0x370a, 0x23},
-               {OV2680_8BIT, 0x3801, 0x00}, // X_ADDR_START;
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x00}, // Y_ADDR_START;
-               {OV2680_8BIT, 0x3804, 0x05},
-               {OV2680_8BIT, 0x3805, 0xaf}, // X_ADDR_END;
-               {OV2680_8BIT, 0x3806, 0x04},
-               {OV2680_8BIT, 0x3807, 0xaf}, // Y_ADDR_END;
-               {OV2680_8BIT, 0x3808, 0x02},
-               {OV2680_8BIT, 0x3809, 0xd0}, // X_OUTPUT_SIZE;
-               {OV2680_8BIT, 0x380a, 0x02},
-               {OV2680_8BIT, 0x380b, 0x50}, // Y_OUTPUT_SIZE;
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xac}, // HTS;
-               {OV2680_8BIT, 0x380e, 0x02},
-               {OV2680_8BIT, 0x380f, 0x84}, // VTS;
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x00},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x00},
-               {OV2680_8BIT, 0x3814, 0x31},
-               {OV2680_8BIT, 0x3815, 0x31},
-               {OV2680_8BIT, 0x4008, 0x00},
-               {OV2680_8BIT, 0x4009, 0x03},
-               {OV2680_8BIT, 0x5708, 0x00},
-               {OV2680_8BIT, 0x5704, 0x02},
-               {OV2680_8BIT, 0x5705, 0xd0}, // X_WIN;
-               {OV2680_8BIT, 0x5706, 0x02},
-               {OV2680_8BIT, 0x5707, 0x50}, // Y_WIN;
-               {OV2680_8BIT, 0x3820, 0xc2}, // FLIP_FORMAT;
-               {OV2680_8BIT, 0x3821, 0x01}, // MIRROR_FORMAT;
-               {OV2680_8BIT, 0x5090, 0x00}, // PRE ISP CTRL16, default value is 0x0C;
-                                            // BIT[3]: Mirror order, BG or GB;
-                                            // BIT[2]: Flip order, BR or RB;
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_TOK_TERM, 0, 0}
-       };
-       /*
-       * 800x600 30fps  VBlanking 1lane 10Bit (binning)
-       */
-       static struct ov2680_reg const ov2680_800x600_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x01},
-               {OV2680_8BIT, 0x3501, 0x26},
-               {OV2680_8BIT, 0x3502, 0x40},
-               {OV2680_8BIT, 0x370a, 0x23},
-               {OV2680_8BIT, 0x3801, 0x00},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x00},
-               {OV2680_8BIT, 0x3804, 0x06},
-               {OV2680_8BIT, 0x3805, 0x4f},
-               {OV2680_8BIT, 0x3806, 0x04},
-               {OV2680_8BIT, 0x3807, 0xbf},
-               {OV2680_8BIT, 0x3808, 0x03},
-               {OV2680_8BIT, 0x3809, 0x20},
-               {OV2680_8BIT, 0x380a, 0x02},
-               {OV2680_8BIT, 0x380b, 0x58},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xac},
-               {OV2680_8BIT, 0x380e, 0x02},
-               {OV2680_8BIT, 0x380f, 0x84},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x00},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x00},
-               {OV2680_8BIT, 0x3814, 0x31},
-               {OV2680_8BIT, 0x3815, 0x31},
-               {OV2680_8BIT, 0x5708, 0x00},
-               {OV2680_8BIT, 0x5704, 0x03},
-               {OV2680_8BIT, 0x5705, 0x20},
-               {OV2680_8BIT, 0x5706, 0x02},
-               {OV2680_8BIT, 0x5707, 0x58},
-               {OV2680_8BIT, 0x3820, 0xc2},
-               {OV2680_8BIT, 0x3821, 0x01},
-               {OV2680_8BIT, 0x5090, 0x00},
-               {OV2680_8BIT, 0x4008, 0x00},
-               {OV2680_8BIT, 0x4009, 0x03},
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_TOK_TERM, 0, 0}
-       };
-
-       /*
       * 720p=1280*720 30fps  VBlanking 1lane 10Bit (no-Scaling)
       */
-       static struct ov2680_reg const ov2680_720p_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x00},
-               {OV2680_8BIT, 0x3501, 0x48},
-               {OV2680_8BIT, 0x3502, 0xe0},
-               {OV2680_8BIT, 0x370a, 0x21},
-               {OV2680_8BIT, 0x3801, 0xa0},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0xf2},
-               {OV2680_8BIT, 0x3804, 0x05},
-               {OV2680_8BIT, 0x3805, 0xbf},
-               {OV2680_8BIT, 0x3806, 0x03},
-               {OV2680_8BIT, 0x3807, 0xdd},
-               {OV2680_8BIT, 0x3808, 0x05},
-               {OV2680_8BIT, 0x3809, 0x10},
-               {OV2680_8BIT, 0x380a, 0x02},
-               {OV2680_8BIT, 0x380b, 0xe0},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xa8},
-               {OV2680_8BIT, 0x380e, 0x05},
-               {OV2680_8BIT, 0x380f, 0x0e},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x08},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x06},
-               {OV2680_8BIT, 0x3814, 0x11},
-               {OV2680_8BIT, 0x3815, 0x11},
-               {OV2680_8BIT, 0x4008, 0x02},
-               {OV2680_8BIT, 0x4009, 0x09},
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
-               {OV2680_8BIT, 0x5704, 0x10},
-               {OV2680_8BIT, 0x5705, 0xa0},
-               {OV2680_8BIT, 0x5706, 0x0c},
-               {OV2680_8BIT, 0x5707, 0x78},
-               {OV2680_8BIT, 0x3820, 0xc0},
-               {OV2680_8BIT, 0x3821, 0x00},
-               // {OV2680_8BIT, 0x5090, 0x0c},
-               {OV2680_TOK_TERM, 0, 0}
-       };
-
-       /*
       * 1296x976 30fps  VBlanking 1lane 10Bit(no-scaling)
       */
-       static struct ov2680_reg const ov2680_1296x976_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x00},
-               {OV2680_8BIT, 0x3501, 0x48},
-               {OV2680_8BIT, 0x3502, 0xe0},
-               {OV2680_8BIT, 0x370a, 0x21},
-               {OV2680_8BIT, 0x3801, 0xa0},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x78},
-               {OV2680_8BIT, 0x3804, 0x05},
-               {OV2680_8BIT, 0x3805, 0xbf},
-               {OV2680_8BIT, 0x3806, 0x04},
-               {OV2680_8BIT, 0x3807, 0x57},
-               {OV2680_8BIT, 0x3808, 0x05},
-               {OV2680_8BIT, 0x3809, 0x10},
-               {OV2680_8BIT, 0x380a, 0x03},
-               {OV2680_8BIT, 0x380b, 0xd0},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xa8},
-               {OV2680_8BIT, 0x380e, 0x05},
-               {OV2680_8BIT, 0x380f, 0x0e},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x08},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x08},
-               {OV2680_8BIT, 0x3814, 0x11},
-               {OV2680_8BIT, 0x3815, 0x11},
-               {OV2680_8BIT, 0x4008, 0x02},
-               {OV2680_8BIT, 0x4009, 0x09},
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
-               {OV2680_8BIT, 0x5704, 0x10},
-               {OV2680_8BIT, 0x5705, 0xa0},
-               {OV2680_8BIT, 0x5706, 0x0c},
-               {OV2680_8BIT, 0x5707, 0x78},
-               {OV2680_8BIT, 0x3820, 0xc0},
-               {OV2680_8BIT, 0x3821, 0x00}, //miror/flip
-               // {OV2680_8BIT, 0x5090, 0x0c},
-               {OV2680_TOK_TERM, 0, 0}
-       };
-
-       /*
       *   1456*1096 30fps  VBlanking 1lane 10bit(no-scaling)
-       */
-       static struct ov2680_reg const ov2680_1456x1096_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x00},
-               {OV2680_8BIT, 0x3501, 0x48},
-               {OV2680_8BIT, 0x3502, 0xe0},
-               {OV2680_8BIT, 0x370a, 0x21},
-               {OV2680_8BIT, 0x3801, 0x90},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x78},
-               {OV2680_8BIT, 0x3804, 0x06},
-               {OV2680_8BIT, 0x3805, 0x4f},
-               {OV2680_8BIT, 0x3806, 0x04},
-               {OV2680_8BIT, 0x3807, 0xC0},
-               {OV2680_8BIT, 0x3808, 0x05},
-               {OV2680_8BIT, 0x3809, 0xb0},
-               {OV2680_8BIT, 0x380a, 0x04},
-               {OV2680_8BIT, 0x380b, 0x48},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xa8},
-               {OV2680_8BIT, 0x380e, 0x05},
-               {OV2680_8BIT, 0x380f, 0x0e},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x08},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x00},
-               {OV2680_8BIT, 0x3814, 0x11},
-               {OV2680_8BIT, 0x3815, 0x11},
-               {OV2680_8BIT, 0x4008, 0x02},
-               {OV2680_8BIT, 0x4009, 0x09},
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
-               {OV2680_8BIT, 0x5704, 0x10},
-               {OV2680_8BIT, 0x5705, 0xa0},
-               {OV2680_8BIT, 0x5706, 0x0c},
-               {OV2680_8BIT, 0x5707, 0x78},
-               {OV2680_8BIT, 0x3820, 0xc0},
-               {OV2680_8BIT, 0x3821, 0x00},
-               // {OV2680_8BIT, 0x5090, 0x0c},
-               {OV2680_TOK_TERM, 0, 0}
-       };
+/*
+ * 176x144 30fps  VBlanking 1lane 10Bit (binning)
+ */
+static struct ov2680_reg const ov2680_QCIF_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x01},
+       {OV2680_8BIT, 0x3501, 0x24},
+       {OV2680_8BIT, 0x3502, 0x40},
+       {OV2680_8BIT, 0x370a, 0x23},
+       {OV2680_8BIT, 0x3801, 0xa0},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x78},
+       {OV2680_8BIT, 0x3804, 0x05},
+       {OV2680_8BIT, 0x3805, 0xaf},
+       {OV2680_8BIT, 0x3806, 0x04},
+       {OV2680_8BIT, 0x3807, 0x47},
+       {OV2680_8BIT, 0x3808, 0x00},
+       {OV2680_8BIT, 0x3809, 0xC0},
+       {OV2680_8BIT, 0x380a, 0x00},
+       {OV2680_8BIT, 0x380b, 0xa0},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xb0},
+       {OV2680_8BIT, 0x380e, 0x02},
+       {OV2680_8BIT, 0x380f, 0x84},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x04},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x04},
+       {OV2680_8BIT, 0x3814, 0x31},
+       {OV2680_8BIT, 0x3815, 0x31},
+       {OV2680_8BIT, 0x4000, 0x81},
+       {OV2680_8BIT, 0x4001, 0x40},
+       {OV2680_8BIT, 0x4008, 0x00},
+       {OV2680_8BIT, 0x4009, 0x03},
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+       {OV2680_8BIT, 0x5704, 0x10},
+       {OV2680_8BIT, 0x5705, 0xa0},
+       {OV2680_8BIT, 0x5706, 0x0c},
+       {OV2680_8BIT, 0x5707, 0x78},
+       {OV2680_8BIT, 0x3820, 0xc2},
+       {OV2680_8BIT, 0x3821, 0x01},
+       // {OV2680_8BIT, 0x5090, 0x0c},
+       {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 352x288 30fps  VBlanking 1lane 10Bit (binning)
+ */
+static struct ov2680_reg const ov2680_CIF_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x01},
+       {OV2680_8BIT, 0x3501, 0x24},
+       {OV2680_8BIT, 0x3502, 0x40},
+       {OV2680_8BIT, 0x370a, 0x23},
+       {OV2680_8BIT, 0x3801, 0xa0},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x78},
+       {OV2680_8BIT, 0x3804, 0x03},
+       {OV2680_8BIT, 0x3805, 0x8f},
+       {OV2680_8BIT, 0x3806, 0x02},
+       {OV2680_8BIT, 0x3807, 0xe7},
+       {OV2680_8BIT, 0x3808, 0x01},
+       {OV2680_8BIT, 0x3809, 0x70},
+       {OV2680_8BIT, 0x380a, 0x01},
+       {OV2680_8BIT, 0x380b, 0x30},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xb0},
+       {OV2680_8BIT, 0x380e, 0x02},
+       {OV2680_8BIT, 0x380f, 0x84},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x04},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x04},
+       {OV2680_8BIT, 0x3814, 0x31},
+       {OV2680_8BIT, 0x3815, 0x31},
+       {OV2680_8BIT, 0x4008, 0x00},
+       {OV2680_8BIT, 0x4009, 0x03},
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+       {OV2680_8BIT, 0x5704, 0x10},
+       {OV2680_8BIT, 0x5705, 0xa0},
+       {OV2680_8BIT, 0x5706, 0x0c},
+       {OV2680_8BIT, 0x5707, 0x78},
+       {OV2680_8BIT, 0x3820, 0xc2},
+       {OV2680_8BIT, 0x3821, 0x01},
+       // {OV2680_8BIT, 0x5090, 0x0c},
+       {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 336x256 30fps  VBlanking 1lane 10Bit (binning)
+ */
+static struct ov2680_reg const ov2680_QVGA_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x01},
+       {OV2680_8BIT, 0x3501, 0x24},
+       {OV2680_8BIT, 0x3502, 0x40},
+       {OV2680_8BIT, 0x370a, 0x23},
+       {OV2680_8BIT, 0x3801, 0xa0},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x78},
+       {OV2680_8BIT, 0x3804, 0x03},
+       {OV2680_8BIT, 0x3805, 0x4f},
+       {OV2680_8BIT, 0x3806, 0x02},
+       {OV2680_8BIT, 0x3807, 0x87},
+       {OV2680_8BIT, 0x3808, 0x01},
+       {OV2680_8BIT, 0x3809, 0x50},
+       {OV2680_8BIT, 0x380a, 0x01},
+       {OV2680_8BIT, 0x380b, 0x00},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xb0},
+       {OV2680_8BIT, 0x380e, 0x02},
+       {OV2680_8BIT, 0x380f, 0x84},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x04},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x04},
+       {OV2680_8BIT, 0x3814, 0x31},
+       {OV2680_8BIT, 0x3815, 0x31},
+       {OV2680_8BIT, 0x4008, 0x00},
+       {OV2680_8BIT, 0x4009, 0x03},
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+       {OV2680_8BIT, 0x5704, 0x10},
+       {OV2680_8BIT, 0x5705, 0xa0},
+       {OV2680_8BIT, 0x5706, 0x0c},
+       {OV2680_8BIT, 0x5707, 0x78},
+       {OV2680_8BIT, 0x3820, 0xc2},
+       {OV2680_8BIT, 0x3821, 0x01},
+       // {OV2680_8BIT, 0x5090, 0x0c},
+       {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 656x496 30fps  VBlanking 1lane 10Bit (binning)
+ */
+static struct ov2680_reg const ov2680_656x496_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x01},
+       {OV2680_8BIT, 0x3501, 0x24},
+       {OV2680_8BIT, 0x3502, 0x40},
+       {OV2680_8BIT, 0x370a, 0x23},
+       {OV2680_8BIT, 0x3801, 0xa0},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x78},
+       {OV2680_8BIT, 0x3804, 0x05},
+       {OV2680_8BIT, 0x3805, 0xcf},
+       {OV2680_8BIT, 0x3806, 0x04},
+       {OV2680_8BIT, 0x3807, 0x67},
+       {OV2680_8BIT, 0x3808, 0x02},
+       {OV2680_8BIT, 0x3809, 0x90},
+       {OV2680_8BIT, 0x380a, 0x01},
+       {OV2680_8BIT, 0x380b, 0xf0},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xb0},
+       {OV2680_8BIT, 0x380e, 0x02},
+       {OV2680_8BIT, 0x380f, 0x84},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x04},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x04},
+       {OV2680_8BIT, 0x3814, 0x31},
+       {OV2680_8BIT, 0x3815, 0x31},
+       {OV2680_8BIT, 0x4008, 0x00},
+       {OV2680_8BIT, 0x4009, 0x03},
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+       {OV2680_8BIT, 0x5704, 0x10},
+       {OV2680_8BIT, 0x5705, 0xa0},
+       {OV2680_8BIT, 0x5706, 0x0c},
+       {OV2680_8BIT, 0x5707, 0x78},
+       {OV2680_8BIT, 0x3820, 0xc2},
+       {OV2680_8BIT, 0x3821, 0x01},
+       // {OV2680_8BIT, 0x5090, 0x0c},
+       {OV2680_TOK_TERM, 0, 0}
+};
+/*
+* 800x600 30fps  VBlanking 1lane 10Bit (binning)
+*/
+static struct ov2680_reg const ov2680_720x592_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x01},
+       {OV2680_8BIT, 0x3501, 0x26},
+       {OV2680_8BIT, 0x3502, 0x40},
+       {OV2680_8BIT, 0x370a, 0x23},
+       {OV2680_8BIT, 0x3801, 0x00}, // X_ADDR_START;
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x00}, // Y_ADDR_START;
+       {OV2680_8BIT, 0x3804, 0x05},
+       {OV2680_8BIT, 0x3805, 0xaf}, // X_ADDR_END;
+       {OV2680_8BIT, 0x3806, 0x04},
+       {OV2680_8BIT, 0x3807, 0xaf}, // Y_ADDR_END;
+       {OV2680_8BIT, 0x3808, 0x02},
+       {OV2680_8BIT, 0x3809, 0xd0}, // X_OUTPUT_SIZE;
+       {OV2680_8BIT, 0x380a, 0x02},
+       {OV2680_8BIT, 0x380b, 0x50}, // Y_OUTPUT_SIZE;
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xac}, // HTS;
+       {OV2680_8BIT, 0x380e, 0x02},
+       {OV2680_8BIT, 0x380f, 0x84}, // VTS;
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x00},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x00},
+       {OV2680_8BIT, 0x3814, 0x31},
+       {OV2680_8BIT, 0x3815, 0x31},
+       {OV2680_8BIT, 0x4008, 0x00},
+       {OV2680_8BIT, 0x4009, 0x03},
+       {OV2680_8BIT, 0x5708, 0x00},
+       {OV2680_8BIT, 0x5704, 0x02},
+       {OV2680_8BIT, 0x5705, 0xd0}, // X_WIN;
+       {OV2680_8BIT, 0x5706, 0x02},
+       {OV2680_8BIT, 0x5707, 0x50}, // Y_WIN;
+       {OV2680_8BIT, 0x3820, 0xc2}, // FLIP_FORMAT;
+       {OV2680_8BIT, 0x3821, 0x01}, // MIRROR_FORMAT;
+       {OV2680_8BIT, 0x5090, 0x00}, // PRE ISP CTRL16, default value is 0x0C;
+       // BIT[3]: Mirror order, BG or GB;
+       // BIT[2]: Flip order, BR or RB;
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_TOK_TERM, 0, 0}
+};
+/*
+* 800x600 30fps  VBlanking 1lane 10Bit (binning)
+*/
+static struct ov2680_reg const ov2680_800x600_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x01},
+       {OV2680_8BIT, 0x3501, 0x26},
+       {OV2680_8BIT, 0x3502, 0x40},
+       {OV2680_8BIT, 0x370a, 0x23},
+       {OV2680_8BIT, 0x3801, 0x00},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x00},
+       {OV2680_8BIT, 0x3804, 0x06},
+       {OV2680_8BIT, 0x3805, 0x4f},
+       {OV2680_8BIT, 0x3806, 0x04},
+       {OV2680_8BIT, 0x3807, 0xbf},
+       {OV2680_8BIT, 0x3808, 0x03},
+       {OV2680_8BIT, 0x3809, 0x20},
+       {OV2680_8BIT, 0x380a, 0x02},
+       {OV2680_8BIT, 0x380b, 0x58},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xac},
+       {OV2680_8BIT, 0x380e, 0x02},
+       {OV2680_8BIT, 0x380f, 0x84},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x00},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x00},
+       {OV2680_8BIT, 0x3814, 0x31},
+       {OV2680_8BIT, 0x3815, 0x31},
+       {OV2680_8BIT, 0x5708, 0x00},
+       {OV2680_8BIT, 0x5704, 0x03},
+       {OV2680_8BIT, 0x5705, 0x20},
+       {OV2680_8BIT, 0x5706, 0x02},
+       {OV2680_8BIT, 0x5707, 0x58},
+       {OV2680_8BIT, 0x3820, 0xc2},
+       {OV2680_8BIT, 0x3821, 0x01},
+       {OV2680_8BIT, 0x5090, 0x00},
+       {OV2680_8BIT, 0x4008, 0x00},
+       {OV2680_8BIT, 0x4009, 0x03},
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 720p=1280*720 30fps  VBlanking 1lane 10Bit (no-Scaling)
+ */
+static struct ov2680_reg const ov2680_720p_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x00},
+       {OV2680_8BIT, 0x3501, 0x48},
+       {OV2680_8BIT, 0x3502, 0xe0},
+       {OV2680_8BIT, 0x370a, 0x21},
+       {OV2680_8BIT, 0x3801, 0xa0},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0xf2},
+       {OV2680_8BIT, 0x3804, 0x05},
+       {OV2680_8BIT, 0x3805, 0xbf},
+       {OV2680_8BIT, 0x3806, 0x03},
+       {OV2680_8BIT, 0x3807, 0xdd},
+       {OV2680_8BIT, 0x3808, 0x05},
+       {OV2680_8BIT, 0x3809, 0x10},
+       {OV2680_8BIT, 0x380a, 0x02},
+       {OV2680_8BIT, 0x380b, 0xe0},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xa8},
+       {OV2680_8BIT, 0x380e, 0x05},
+       {OV2680_8BIT, 0x380f, 0x0e},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x08},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x06},
+       {OV2680_8BIT, 0x3814, 0x11},
+       {OV2680_8BIT, 0x3815, 0x11},
+       {OV2680_8BIT, 0x4008, 0x02},
+       {OV2680_8BIT, 0x4009, 0x09},
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+       {OV2680_8BIT, 0x5704, 0x10},
+       {OV2680_8BIT, 0x5705, 0xa0},
+       {OV2680_8BIT, 0x5706, 0x0c},
+       {OV2680_8BIT, 0x5707, 0x78},
+       {OV2680_8BIT, 0x3820, 0xc0},
+       {OV2680_8BIT, 0x3821, 0x00},
+       // {OV2680_8BIT, 0x5090, 0x0c},
+       {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 1296x976 30fps  VBlanking 1lane 10Bit(no-scaling)
+ */
+static struct ov2680_reg const ov2680_1296x976_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x00},
+       {OV2680_8BIT, 0x3501, 0x48},
+       {OV2680_8BIT, 0x3502, 0xe0},
+       {OV2680_8BIT, 0x370a, 0x21},
+       {OV2680_8BIT, 0x3801, 0xa0},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x78},
+       {OV2680_8BIT, 0x3804, 0x05},
+       {OV2680_8BIT, 0x3805, 0xbf},
+       {OV2680_8BIT, 0x3806, 0x04},
+       {OV2680_8BIT, 0x3807, 0x57},
+       {OV2680_8BIT, 0x3808, 0x05},
+       {OV2680_8BIT, 0x3809, 0x10},
+       {OV2680_8BIT, 0x380a, 0x03},
+       {OV2680_8BIT, 0x380b, 0xd0},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xa8},
+       {OV2680_8BIT, 0x380e, 0x05},
+       {OV2680_8BIT, 0x380f, 0x0e},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x08},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x08},
+       {OV2680_8BIT, 0x3814, 0x11},
+       {OV2680_8BIT, 0x3815, 0x11},
+       {OV2680_8BIT, 0x4008, 0x02},
+       {OV2680_8BIT, 0x4009, 0x09},
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+       {OV2680_8BIT, 0x5704, 0x10},
+       {OV2680_8BIT, 0x5705, 0xa0},
+       {OV2680_8BIT, 0x5706, 0x0c},
+       {OV2680_8BIT, 0x5707, 0x78},
+       {OV2680_8BIT, 0x3820, 0xc0},
+       {OV2680_8BIT, 0x3821, 0x00}, //miror/flip
+       // {OV2680_8BIT, 0x5090, 0x0c},
+       {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ *   1456*1096 30fps  VBlanking 1lane 10bit(no-scaling)
+*/
+static struct ov2680_reg const ov2680_1456x1096_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x00},
+       {OV2680_8BIT, 0x3501, 0x48},
+       {OV2680_8BIT, 0x3502, 0xe0},
+       {OV2680_8BIT, 0x370a, 0x21},
+       {OV2680_8BIT, 0x3801, 0x90},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x78},
+       {OV2680_8BIT, 0x3804, 0x06},
+       {OV2680_8BIT, 0x3805, 0x4f},
+       {OV2680_8BIT, 0x3806, 0x04},
+       {OV2680_8BIT, 0x3807, 0xC0},
+       {OV2680_8BIT, 0x3808, 0x05},
+       {OV2680_8BIT, 0x3809, 0xb0},
+       {OV2680_8BIT, 0x380a, 0x04},
+       {OV2680_8BIT, 0x380b, 0x48},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xa8},
+       {OV2680_8BIT, 0x380e, 0x05},
+       {OV2680_8BIT, 0x380f, 0x0e},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x08},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x00},
+       {OV2680_8BIT, 0x3814, 0x11},
+       {OV2680_8BIT, 0x3815, 0x11},
+       {OV2680_8BIT, 0x4008, 0x02},
+       {OV2680_8BIT, 0x4009, 0x09},
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+       {OV2680_8BIT, 0x5704, 0x10},
+       {OV2680_8BIT, 0x5705, 0xa0},
+       {OV2680_8BIT, 0x5706, 0x0c},
+       {OV2680_8BIT, 0x5707, 0x78},
+       {OV2680_8BIT, 0x3820, 0xc0},
+       {OV2680_8BIT, 0x3821, 0x00},
+       // {OV2680_8BIT, 0x5090, 0x0c},
+       {OV2680_TOK_TERM, 0, 0}
+};
 #endif
 
-       /*
       *1616x916  30fps  VBlanking 1lane 10bit
       */
-
-       static struct ov2680_reg const ov2680_1616x916_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x00},
-               {OV2680_8BIT, 0x3501, 0x48},
-               {OV2680_8BIT, 0x3502, 0xe0},
-               {OV2680_8BIT, 0x370a, 0x21},
-               {OV2680_8BIT, 0x3801, 0x00},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x96},
-               {OV2680_8BIT, 0x3804, 0x06},
-               {OV2680_8BIT, 0x3805, 0x4f},
-               {OV2680_8BIT, 0x3806, 0x04},
-               {OV2680_8BIT, 0x3807, 0x39},
-               {OV2680_8BIT, 0x3808, 0x06},
-               {OV2680_8BIT, 0x3809, 0x50},
-               {OV2680_8BIT, 0x380a, 0x03},
-               {OV2680_8BIT, 0x380b, 0x94},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xa8},
-               {OV2680_8BIT, 0x380e, 0x05},
-               {OV2680_8BIT, 0x380f, 0x0e},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x00},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x08},
-               {OV2680_8BIT, 0x3814, 0x11},
-               {OV2680_8BIT, 0x3815, 0x11},
-               {OV2680_8BIT, 0x4008, 0x02},
-               {OV2680_8BIT, 0x4009, 0x09},
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
-               {OV2680_8BIT, 0x5704, 0x06},
-               {OV2680_8BIT, 0x5705, 0x50},
-               {OV2680_8BIT, 0x5706, 0x03},
-               {OV2680_8BIT, 0x5707, 0x94},
-               {OV2680_8BIT, 0x3820, 0xc0},
-               {OV2680_8BIT, 0x3821, 0x00},
-               // {OV2680_8BIT, 0x5090, 0x0C},
-               {OV2680_TOK_TERM, 0, 0}
-       };
-
-       /*
       * 1612x1212 30fps VBlanking 1lane 10Bit
       */
+/*
+ *1616x916  30fps  VBlanking 1lane 10bit
+ */
+
+static struct ov2680_reg const ov2680_1616x916_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x00},
+       {OV2680_8BIT, 0x3501, 0x48},
+       {OV2680_8BIT, 0x3502, 0xe0},
+       {OV2680_8BIT, 0x370a, 0x21},
+       {OV2680_8BIT, 0x3801, 0x00},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x96},
+       {OV2680_8BIT, 0x3804, 0x06},
+       {OV2680_8BIT, 0x3805, 0x4f},
+       {OV2680_8BIT, 0x3806, 0x04},
+       {OV2680_8BIT, 0x3807, 0x39},
+       {OV2680_8BIT, 0x3808, 0x06},
+       {OV2680_8BIT, 0x3809, 0x50},
+       {OV2680_8BIT, 0x380a, 0x03},
+       {OV2680_8BIT, 0x380b, 0x94},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xa8},
+       {OV2680_8BIT, 0x380e, 0x05},
+       {OV2680_8BIT, 0x380f, 0x0e},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x00},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x08},
+       {OV2680_8BIT, 0x3814, 0x11},
+       {OV2680_8BIT, 0x3815, 0x11},
+       {OV2680_8BIT, 0x4008, 0x02},
+       {OV2680_8BIT, 0x4009, 0x09},
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
+       {OV2680_8BIT, 0x5704, 0x06},
+       {OV2680_8BIT, 0x5705, 0x50},
+       {OV2680_8BIT, 0x5706, 0x03},
+       {OV2680_8BIT, 0x5707, 0x94},
+       {OV2680_8BIT, 0x3820, 0xc0},
+       {OV2680_8BIT, 0x3821, 0x00},
+       // {OV2680_8BIT, 0x5090, 0x0C},
+       {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 1612x1212 30fps VBlanking 1lane 10Bit
+ */
 #if 0
-       static struct ov2680_reg const ov2680_1616x1082_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x00},
-               {OV2680_8BIT, 0x3501, 0x48},
-               {OV2680_8BIT, 0x3502, 0xe0},
-               {OV2680_8BIT, 0x370a, 0x21},
-               {OV2680_8BIT, 0x3801, 0x00},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x86},
-               {OV2680_8BIT, 0x3804, 0x06},
-               {OV2680_8BIT, 0x3805, 0x4f},
-               {OV2680_8BIT, 0x3806, 0x04},
-               {OV2680_8BIT, 0x3807, 0xbf},
-               {OV2680_8BIT, 0x3808, 0x06},
-               {OV2680_8BIT, 0x3809, 0x50},
-               {OV2680_8BIT, 0x380a, 0x04},
-               {OV2680_8BIT, 0x380b, 0x3a},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xa8},
-               {OV2680_8BIT, 0x380e, 0x05},
-               {OV2680_8BIT, 0x380f, 0x0e},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x00},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x00},
-               {OV2680_8BIT, 0x3814, 0x11},
-               {OV2680_8BIT, 0x3815, 0x11},
-               {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
-               {OV2680_8BIT, 0x5704, 0x06},
-               {OV2680_8BIT, 0x5705, 0x50},
-               {OV2680_8BIT, 0x5706, 0x04},
-               {OV2680_8BIT, 0x5707, 0x3a},
-               {OV2680_8BIT, 0x3820, 0xc0},
-               {OV2680_8BIT, 0x3821, 0x00},
-               // {OV2680_8BIT, 0x5090, 0x0C},
-               {OV2680_8BIT, 0x4008, 0x02},
-               {OV2680_8BIT, 0x4009, 0x09},
-               {OV2680_8BIT, 0x5081, 0x41},
-               {OV2680_TOK_TERM, 0, 0}
-       };
+static struct ov2680_reg const ov2680_1616x1082_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x00},
+       {OV2680_8BIT, 0x3501, 0x48},
+       {OV2680_8BIT, 0x3502, 0xe0},
+       {OV2680_8BIT, 0x370a, 0x21},
+       {OV2680_8BIT, 0x3801, 0x00},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x86},
+       {OV2680_8BIT, 0x3804, 0x06},
+       {OV2680_8BIT, 0x3805, 0x4f},
+       {OV2680_8BIT, 0x3806, 0x04},
+       {OV2680_8BIT, 0x3807, 0xbf},
+       {OV2680_8BIT, 0x3808, 0x06},
+       {OV2680_8BIT, 0x3809, 0x50},
+       {OV2680_8BIT, 0x380a, 0x04},
+       {OV2680_8BIT, 0x380b, 0x3a},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xa8},
+       {OV2680_8BIT, 0x380e, 0x05},
+       {OV2680_8BIT, 0x380f, 0x0e},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x00},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x00},
+       {OV2680_8BIT, 0x3814, 0x11},
+       {OV2680_8BIT, 0x3815, 0x11},
+       {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
+       {OV2680_8BIT, 0x5704, 0x06},
+       {OV2680_8BIT, 0x5705, 0x50},
+       {OV2680_8BIT, 0x5706, 0x04},
+       {OV2680_8BIT, 0x5707, 0x3a},
+       {OV2680_8BIT, 0x3820, 0xc0},
+       {OV2680_8BIT, 0x3821, 0x00},
+       // {OV2680_8BIT, 0x5090, 0x0C},
+       {OV2680_8BIT, 0x4008, 0x02},
+       {OV2680_8BIT, 0x4009, 0x09},
+       {OV2680_8BIT, 0x5081, 0x41},
+       {OV2680_TOK_TERM, 0, 0}
+};
 #endif
-       /*
       * 1616x1216 30fps VBlanking 1lane 10Bit
       */
-       static struct ov2680_reg const ov2680_1616x1216_30fps[] = {
-               {OV2680_8BIT, 0x3086, 0x00},
-               {OV2680_8BIT, 0x3501, 0x48},
-               {OV2680_8BIT, 0x3502, 0xe0},
-               {OV2680_8BIT, 0x370a, 0x21},
-               {OV2680_8BIT, 0x3801, 0x00},
-               {OV2680_8BIT, 0x3802, 0x00},
-               {OV2680_8BIT, 0x3803, 0x00},
-               {OV2680_8BIT, 0x3804, 0x06},
-               {OV2680_8BIT, 0x3805, 0x4f},
-               {OV2680_8BIT, 0x3806, 0x04},
-               {OV2680_8BIT, 0x3807, 0xbf},
-               {OV2680_8BIT, 0x3808, 0x06},
-               {OV2680_8BIT, 0x3809, 0x50},//50},//4line for mirror and flip
-               {OV2680_8BIT, 0x380a, 0x04},
-               {OV2680_8BIT, 0x380b, 0xc0},//c0},
-               {OV2680_8BIT, 0x380c, 0x06},
-               {OV2680_8BIT, 0x380d, 0xa8},
-               {OV2680_8BIT, 0x380e, 0x05},
-               {OV2680_8BIT, 0x380f, 0x0e},
-               {OV2680_8BIT, 0x3810, 0x00},
-               {OV2680_8BIT, 0x3811, 0x00},
-               {OV2680_8BIT, 0x3812, 0x00},
-               {OV2680_8BIT, 0x3813, 0x00},
-               {OV2680_8BIT, 0x3814, 0x11},
-               {OV2680_8BIT, 0x3815, 0x11},
-               {OV2680_8BIT, 0x4008, 0x00},
-               {OV2680_8BIT, 0x4009, 0x0b},
-               {OV2680_8BIT, 0x5081, 0x01},
-               {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
-               {OV2680_8BIT, 0x5704, 0x06},
-               {OV2680_8BIT, 0x5705, 0x50},
-               {OV2680_8BIT, 0x5706, 0x04},
-               {OV2680_8BIT, 0x5707, 0xcc},
-               {OV2680_8BIT, 0x3820, 0xc0},
-               {OV2680_8BIT, 0x3821, 0x00},
-               // {OV2680_8BIT, 0x5090, 0x0C},
-               {OV2680_TOK_TERM, 0, 0}
-       };
-
-       static struct ov2680_resolution ov2680_res_preview[] = {
+/*
+ * 1616x1216 30fps VBlanking 1lane 10Bit
+ */
+static struct ov2680_reg const ov2680_1616x1216_30fps[] = {
+       {OV2680_8BIT, 0x3086, 0x00},
+       {OV2680_8BIT, 0x3501, 0x48},
+       {OV2680_8BIT, 0x3502, 0xe0},
+       {OV2680_8BIT, 0x370a, 0x21},
+       {OV2680_8BIT, 0x3801, 0x00},
+       {OV2680_8BIT, 0x3802, 0x00},
+       {OV2680_8BIT, 0x3803, 0x00},
+       {OV2680_8BIT, 0x3804, 0x06},
+       {OV2680_8BIT, 0x3805, 0x4f},
+       {OV2680_8BIT, 0x3806, 0x04},
+       {OV2680_8BIT, 0x3807, 0xbf},
+       {OV2680_8BIT, 0x3808, 0x06},
+       {OV2680_8BIT, 0x3809, 0x50},//50},//4line for mirror and flip
+       {OV2680_8BIT, 0x380a, 0x04},
+       {OV2680_8BIT, 0x380b, 0xc0},//c0},
+       {OV2680_8BIT, 0x380c, 0x06},
+       {OV2680_8BIT, 0x380d, 0xa8},
+       {OV2680_8BIT, 0x380e, 0x05},
+       {OV2680_8BIT, 0x380f, 0x0e},
+       {OV2680_8BIT, 0x3810, 0x00},
+       {OV2680_8BIT, 0x3811, 0x00},
+       {OV2680_8BIT, 0x3812, 0x00},
+       {OV2680_8BIT, 0x3813, 0x00},
+       {OV2680_8BIT, 0x3814, 0x11},
+       {OV2680_8BIT, 0x3815, 0x11},
+       {OV2680_8BIT, 0x4008, 0x00},
+       {OV2680_8BIT, 0x4009, 0x0b},
+       {OV2680_8BIT, 0x5081, 0x01},
+       {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
+       {OV2680_8BIT, 0x5704, 0x06},
+       {OV2680_8BIT, 0x5705, 0x50},
+       {OV2680_8BIT, 0x5706, 0x04},
+       {OV2680_8BIT, 0x5707, 0xcc},
+       {OV2680_8BIT, 0x3820, 0xc0},
+       {OV2680_8BIT, 0x3821, 0x00},
+       // {OV2680_8BIT, 0x5090, 0x0C},
+       {OV2680_TOK_TERM, 0, 0}
+};
+
+static struct ov2680_resolution ov2680_res_preview[] = {
        {
                .desc = "ov2680_1616x1216_30fps",
                .width = 1616,
index 4a184400c7d7b5d99d3bc14912cec4499ddac2ac..9e92ee8626e5d04b581a41ef61638b218d45df60 100644 (file)
@@ -53,7 +53,8 @@
  */
 static uint up_delay = 30;
 module_param(up_delay, uint, 0644);
-MODULE_PARM_DESC(up_delay, "Delay prior to the first CCI transaction for ov5693");
+MODULE_PARM_DESC(up_delay,
+                "Delay prior to the first CCI transaction for ov5693");
 
 static int vcm_ad_i2c_wr8(struct i2c_client *client, u8 reg, u8 val)
 {
@@ -136,7 +137,7 @@ static int ov5693_read_reg(struct i2c_client *client,
        }
 
        if (data_length != OV5693_8BIT && data_length != OV5693_16BIT
-                                       && data_length != OV5693_32BIT) {
+           && data_length != OV5693_32BIT) {
                dev_err(&client->dev, "%s error, invalid data length\n",
                        __func__);
                return -EINVAL;
@@ -258,7 +259,7 @@ static int vcm_detect(struct i2c_client *client)
 }
 
 static int ov5693_write_reg(struct i2c_client *client, u16 data_length,
-                                                       u16 reg, u16 val)
+                           u16 reg, u16 val)
 {
        int ret;
        unsigned char data[4] = {0};
@@ -363,8 +364,8 @@ static int __ov5693_buf_reg_array(struct i2c_client *client,
 }
 
 static int __ov5693_write_reg_is_consecutive(struct i2c_client *client,
-                                            struct ov5693_write_ctrl *ctrl,
-                                            const struct ov5693_reg *next)
+       struct ov5693_write_ctrl *ctrl,
+       const struct ov5693_reg *next)
 {
        if (ctrl->index == 0)
                return 1;
@@ -394,7 +395,7 @@ static int ov5693_write_reg_array(struct i2c_client *client,
                         * flushed before proceed.
                         */
                        if (!__ov5693_write_reg_is_consecutive(client, &ctrl,
-                                                               next)) {
+                                                              next)) {
                                err = __ov5693_flush_reg_array(client, &ctrl);
                                if (err)
                                        return err;
@@ -429,8 +430,8 @@ static int ov5693_g_fnumber(struct v4l2_subdev *sd, s32 *val)
 static int ov5693_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
 {
        *val = (OV5693_F_NUMBER_DEFAULT_NUM << 24) |
-               (OV5693_F_NUMBER_DEM << 16) |
-               (OV5693_F_NUMBER_DEFAULT_NUM << 8) | OV5693_F_NUMBER_DEM;
+              (OV5693_F_NUMBER_DEM << 16) |
+              (OV5693_F_NUMBER_DEFAULT_NUM << 8) | OV5693_F_NUMBER_DEM;
        return 0;
 }
 
@@ -453,8 +454,8 @@ static int ov5693_g_bin_factor_y(struct v4l2_subdev *sd, s32 *val)
 }
 
 static int ov5693_get_intg_factor(struct i2c_client *client,
-                               struct camera_mipi_info *info,
-                               const struct ov5693_resolution *res)
+                                 struct camera_mipi_info *info,
+                                 const struct ov5693_resolution *res)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov5693_device *dev = to_ov5693_sensor(sd);
@@ -475,11 +476,11 @@ static int ov5693_get_intg_factor(struct i2c_client *client,
        /* get integration time */
        buf->coarse_integration_time_min = OV5693_COARSE_INTG_TIME_MIN;
        buf->coarse_integration_time_max_margin =
-                                       OV5693_COARSE_INTG_TIME_MAX_MARGIN;
+           OV5693_COARSE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_min = OV5693_FINE_INTG_TIME_MIN;
        buf->fine_integration_time_max_margin =
-                                       OV5693_FINE_INTG_TIME_MAX_MARGIN;
+           OV5693_FINE_INTG_TIME_MAX_MARGIN;
 
        buf->fine_integration_time_def = OV5693_FINE_INTG_TIME_MIN;
        buf->frame_length_lines = res->lines_per_frame;
@@ -488,50 +489,50 @@ static int ov5693_get_intg_factor(struct i2c_client *client,
 
        /* get the cropping and output resolution to ISP for this mode. */
        ret =  ov5693_read_reg(client, OV5693_16BIT,
-                                       OV5693_HORIZONTAL_START_H, &reg_val);
+                              OV5693_HORIZONTAL_START_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_horizontal_start = reg_val;
 
        ret =  ov5693_read_reg(client, OV5693_16BIT,
-                                       OV5693_VERTICAL_START_H, &reg_val);
+                              OV5693_VERTICAL_START_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_vertical_start = reg_val;
 
        ret = ov5693_read_reg(client, OV5693_16BIT,
-                                       OV5693_HORIZONTAL_END_H, &reg_val);
+                             OV5693_HORIZONTAL_END_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_horizontal_end = reg_val;
 
        ret = ov5693_read_reg(client, OV5693_16BIT,
-                                       OV5693_VERTICAL_END_H, &reg_val);
+                             OV5693_VERTICAL_END_H, &reg_val);
        if (ret)
                return ret;
        buf->crop_vertical_end = reg_val;
 
        ret = ov5693_read_reg(client, OV5693_16BIT,
-                               OV5693_HORIZONTAL_OUTPUT_SIZE_H, &reg_val);
+                             OV5693_HORIZONTAL_OUTPUT_SIZE_H, &reg_val);
        if (ret)
                return ret;
        buf->output_width = reg_val;
 
        ret = ov5693_read_reg(client, OV5693_16BIT,
-                               OV5693_VERTICAL_OUTPUT_SIZE_H, &reg_val);
+                             OV5693_VERTICAL_OUTPUT_SIZE_H, &reg_val);
        if (ret)
                return ret;
        buf->output_height = reg_val;
 
        buf->binning_factor_x = res->bin_factor_x ?
-                                       res->bin_factor_x : 1;
+                               res->bin_factor_x : 1;
        buf->binning_factor_y = res->bin_factor_y ?
-                                       res->bin_factor_y : 1;
+                               res->bin_factor_y : 1;
        return 0;
 }
 
 static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
-                                int gain, int digitgain)
+                                 int gain, int digitgain)
 
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -552,7 +553,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        }
        /* group hold */
        ret = ov5693_write_reg(client, OV5693_8BIT,
-                               OV5693_GROUP_ACCESS, 0x00);
+                              OV5693_GROUP_ACCESS, 0x00);
        if (ret) {
                dev_err(&client->dev, "%s: write %x error, aborted\n",
                        __func__, OV5693_GROUP_ACCESS);
@@ -560,7 +561,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        }
 
        ret = ov5693_write_reg(client, OV5693_8BIT,
-                               OV5693_TIMING_HTS_H, (hts >> 8) & 0xFF);
+                              OV5693_TIMING_HTS_H, (hts >> 8) & 0xFF);
        if (ret) {
                dev_err(&client->dev, "%s: write %x error, aborted\n",
                        __func__, OV5693_TIMING_HTS_H);
@@ -568,7 +569,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        }
 
        ret = ov5693_write_reg(client, OV5693_8BIT,
-                               OV5693_TIMING_HTS_L, hts & 0xFF);
+                              OV5693_TIMING_HTS_L, hts & 0xFF);
        if (ret) {
                dev_err(&client->dev, "%s: write %x error, aborted\n",
                        __func__, OV5693_TIMING_HTS_L);
@@ -579,7 +580,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
                vts = (u16)coarse_itg + OV5693_INTEGRATION_TIME_MARGIN;
 
        ret = ov5693_write_reg(client, OV5693_8BIT,
-                               OV5693_TIMING_VTS_H, (vts >> 8) & 0xFF);
+                              OV5693_TIMING_VTS_H, (vts >> 8) & 0xFF);
        if (ret) {
                dev_err(&client->dev, "%s: write %x error, aborted\n",
                        __func__, OV5693_TIMING_VTS_H);
@@ -587,7 +588,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        }
 
        ret = ov5693_write_reg(client, OV5693_8BIT,
-                                       OV5693_TIMING_VTS_L, vts & 0xFF);
+                              OV5693_TIMING_VTS_L, vts & 0xFF);
        if (ret) {
                dev_err(&client->dev, "%s: write %x error, aborted\n",
                        __func__, OV5693_TIMING_VTS_L);
@@ -624,7 +625,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
 
        /* Analog gain */
        ret = ov5693_write_reg(client, OV5693_8BIT,
-                               OV5693_AGC_L, gain & 0xff);
+                              OV5693_AGC_L, gain & 0xff);
        if (ret) {
                dev_err(&client->dev, "%s: write %x error, aborted\n",
                        __func__, OV5693_AGC_L);
@@ -632,7 +633,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        }
 
        ret = ov5693_write_reg(client, OV5693_8BIT,
-                               OV5693_AGC_H, (gain >> 8) & 0xff);
+                              OV5693_AGC_H, (gain >> 8) & 0xff);
        if (ret) {
                dev_err(&client->dev, "%s: write %x error, aborted\n",
                        __func__, OV5693_AGC_H);
@@ -642,7 +643,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        /* Digital gain */
        if (digitgain) {
                ret = ov5693_write_reg(client, OV5693_16BIT,
-                               OV5693_MWB_RED_GAIN_H, digitgain);
+                                      OV5693_MWB_RED_GAIN_H, digitgain);
                if (ret) {
                        dev_err(&client->dev, "%s: write %x error, aborted\n",
                                __func__, OV5693_MWB_RED_GAIN_H);
@@ -650,7 +651,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
                }
 
                ret = ov5693_write_reg(client, OV5693_16BIT,
-                               OV5693_MWB_GREEN_GAIN_H, digitgain);
+                                      OV5693_MWB_GREEN_GAIN_H, digitgain);
                if (ret) {
                        dev_err(&client->dev, "%s: write %x error, aborted\n",
                                __func__, OV5693_MWB_RED_GAIN_H);
@@ -658,7 +659,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
                }
 
                ret = ov5693_write_reg(client, OV5693_16BIT,
-                               OV5693_MWB_BLUE_GAIN_H, digitgain);
+                                      OV5693_MWB_BLUE_GAIN_H, digitgain);
                if (ret) {
                        dev_err(&client->dev, "%s: write %x error, aborted\n",
                                __func__, OV5693_MWB_RED_GAIN_H);
@@ -668,20 +669,20 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
 
        /* End group */
        ret = ov5693_write_reg(client, OV5693_8BIT,
-                               OV5693_GROUP_ACCESS, 0x10);
+                              OV5693_GROUP_ACCESS, 0x10);
        if (ret)
                return ret;
 
        /* Delay launch group */
        ret = ov5693_write_reg(client, OV5693_8BIT,
-                               OV5693_GROUP_ACCESS, 0xa0);
+                              OV5693_GROUP_ACCESS, 0xa0);
        if (ret)
                return ret;
        return ret;
 }
 
 static int ov5693_set_exposure(struct v4l2_subdev *sd, int exposure,
-       int gain, int digitgain)
+                              int gain, int digitgain)
 {
        struct ov5693_device *dev = to_ov5693_sensor(sd);
        int ret;
@@ -694,7 +695,7 @@ static int ov5693_set_exposure(struct v4l2_subdev *sd, int exposure,
 }
 
 static long ov5693_s_exposure(struct v4l2_subdev *sd,
-                              struct atomisp_exposure *exposure)
+                             struct atomisp_exposure *exposure)
 {
        u16 coarse_itg = exposure->integration_time[0];
        u16 analog_gain = exposure->gain[0];
@@ -720,7 +721,7 @@ static int ov5693_read_otp_reg_array(struct i2c_client *client, u16 size,
        for (index = 0; index <= size; index++) {
                pVal = (u16 *)(buf + index);
                ret =
-                       ov5693_read_reg(client, OV5693_8BIT, addr + index,
+                   ov5693_read_reg(client, OV5693_8BIT, addr + index,
                                    pVal);
                if (ret)
                        return ret;
@@ -740,7 +741,8 @@ static int __ov5693_otp_read(struct v4l2_subdev *sd, u8 *buf)
        dev->otp_size = 0;
        for (i = 1; i < OV5693_OTP_BANK_MAX; i++) {
                /*set bank NO and OTP read mode. */
-               ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_OTP_BANK_REG, (i | 0xc0));   //[7:6] 2'b11 [5:0] bank no
+               ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_OTP_BANK_REG,
+                                      (i | 0xc0));     //[7:6] 2'b11 [5:0] bank no
                if (ret) {
                        dev_err(&client->dev, "failed to prepare OTP page\n");
                        return ret;
@@ -748,7 +750,8 @@ static int __ov5693_otp_read(struct v4l2_subdev *sd, u8 *buf)
                //pr_debug("write 0x%x->0x%x\n",OV5693_OTP_BANK_REG,(i|0xc0));
 
                /*enable read */
-               ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_OTP_READ_REG, OV5693_OTP_MODE_READ); // enable :1
+               ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_OTP_READ_REG,
+                                      OV5693_OTP_MODE_READ);   // enable :1
                if (ret) {
                        dev_err(&client->dev,
                                "failed to set OTP reading mode page");
@@ -776,7 +779,8 @@ static int __ov5693_otp_read(struct v4l2_subdev *sd, u8 *buf)
                                b = buf;
                                continue;
                        }
-               } else if (i == 24) {           //if the first 320bytes data doesn't not exist, try to read the next 32bytes data.
+               } else if (i ==
+                          24) {                //if the first 320bytes data doesn't not exist, try to read the next 32bytes data.
                        if ((*b) == 0) {
                                dev->otp_size = 32;
                                break;
@@ -784,7 +788,8 @@ static int __ov5693_otp_read(struct v4l2_subdev *sd, u8 *buf)
                                b = buf;
                                continue;
                        }
-               } else if (i == 27) {           //if the prvious 32bytes data doesn't exist, try to read the next 32bytes data again.
+               } else if (i ==
+                          27) {                //if the prvious 32bytes data doesn't exist, try to read the next 32bytes data again.
                        if ((*b) == 0) {
                                dev->otp_size = 32;
                                break;
@@ -900,21 +905,21 @@ static int ov5693_q_exposure(struct v4l2_subdev *sd, s32 *value)
 
        /* get exposure */
        ret = ov5693_read_reg(client, OV5693_8BIT,
-                                       OV5693_EXPOSURE_L,
-                                       &reg_v);
+                             OV5693_EXPOSURE_L,
+                             &reg_v);
        if (ret)
                goto err;
 
        ret = ov5693_read_reg(client, OV5693_8BIT,
-                                       OV5693_EXPOSURE_M,
-                                       &reg_v2);
+                             OV5693_EXPOSURE_M,
+                             &reg_v2);
        if (ret)
                goto err;
 
        reg_v += reg_v2 << 8;
        ret = ov5693_read_reg(client, OV5693_8BIT,
-                                       OV5693_EXPOSURE_H,
-                                       &reg_v2);
+                             OV5693_EXPOSURE_H,
+                             &reg_v2);
        if (ret)
                goto err;
 
@@ -935,7 +940,7 @@ static int ad5823_t_focus_vcm(struct v4l2_subdev *sd, u16 val)
 
        /* set reg VCM_CODE_MSB Bit[1:0] */
        vcm_code = (vcm_code & VCM_CODE_MSB_MASK) |
-               ((val >> 8) & ~VCM_CODE_MSB_MASK);
+                  ((val >> 8) & ~VCM_CODE_MSB_MASK);
        ret = ad5823_i2c_write(client, AD5823_REG_VCM_CODE_MSB, vcm_code);
        if (ret)
                return ret;
@@ -947,7 +952,7 @@ static int ad5823_t_focus_vcm(struct v4l2_subdev *sd, u16 val)
 
        /* set required vcm move time */
        vcm_code = AD5823_RESONANCE_PERIOD / AD5823_RESONANCE_COEF
-               - AD5823_HIGH_FREQ_RANGE;
+                  - AD5823_HIGH_FREQ_RANGE;
        ret = ad5823_i2c_write(client, AD5823_REG_VCM_MOVE_TIME, vcm_code);
 
        return ret;
@@ -1011,8 +1016,8 @@ static int ov5693_q_focus_status(struct v4l2_subdev *sd, s32 *value)
        struct ov5693_device *dev = to_ov5693_sensor(sd);
        ktime_t temptime;
        ktime_t timedelay = ns_to_ktime(min_t(u32,
-                       abs(dev->number_of_steps) * DELAY_PER_STEP_NS,
-                       DELAY_MAX_PER_STEP_NS));
+                                             abs(dev->number_of_steps) * DELAY_PER_STEP_NS,
+                                             DELAY_MAX_PER_STEP_NS));
 
        temptime = ktime_sub(ktime_get(), (dev->timestamp_t_focus_abs));
        if (ktime_compare(temptime, timedelay) <= 0) {
@@ -1136,126 +1141,126 @@ static const struct v4l2_ctrl_ops ctrl_ops = {
 
 static const struct v4l2_ctrl_config ov5693_controls[] = {
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_EXPOSURE_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "exposure",
-        .min = 0x0,
-        .max = 0xffff,
-        .step = 0x01,
-        .def = 0x00,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "exposure",
+               .min = 0x0,
+               .max = 0xffff,
+               .step = 0x01,
+               .def = 0x00,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FOCAL_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "focal length",
-        .min = OV5693_FOCAL_LENGTH_DEFAULT,
-        .max = OV5693_FOCAL_LENGTH_DEFAULT,
-        .step = 0x01,
-        .def = OV5693_FOCAL_LENGTH_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FOCAL_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "focal length",
+               .min = OV5693_FOCAL_LENGTH_DEFAULT,
+               .max = OV5693_FOCAL_LENGTH_DEFAULT,
+               .step = 0x01,
+               .def = OV5693_FOCAL_LENGTH_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "f-number",
-        .min = OV5693_F_NUMBER_DEFAULT,
-        .max = OV5693_F_NUMBER_DEFAULT,
-        .step = 0x01,
-        .def = OV5693_F_NUMBER_DEFAULT,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "f-number",
+               .min = OV5693_F_NUMBER_DEFAULT,
+               .max = OV5693_F_NUMBER_DEFAULT,
+               .step = 0x01,
+               .def = OV5693_F_NUMBER_DEFAULT,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FNUMBER_RANGE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "f-number range",
-        .min = OV5693_F_NUMBER_RANGE,
-        .max = OV5693_F_NUMBER_RANGE,
-        .step = 0x01,
-        .def = OV5693_F_NUMBER_RANGE,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FNUMBER_RANGE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "f-number range",
+               .min = OV5693_F_NUMBER_RANGE,
+               .max = OV5693_F_NUMBER_RANGE,
+               .step = 0x01,
+               .def = OV5693_F_NUMBER_RANGE,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FOCUS_ABSOLUTE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "focus move absolute",
-        .min = 0,
-        .max = OV5693_VCM_MAX_FOCUS_POS,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FOCUS_ABSOLUTE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "focus move absolute",
+               .min = 0,
+               .max = OV5693_VCM_MAX_FOCUS_POS,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FOCUS_RELATIVE,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "focus move relative",
-        .min = OV5693_VCM_MAX_FOCUS_NEG,
-        .max = OV5693_VCM_MAX_FOCUS_POS,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FOCUS_RELATIVE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "focus move relative",
+               .min = OV5693_VCM_MAX_FOCUS_NEG,
+               .max = OV5693_VCM_MAX_FOCUS_POS,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_FOCUS_STATUS,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "focus status",
-        .min = 0,
-        .max = 100,            /* allow enum to grow in the future */
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_FOCUS_STATUS,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "focus status",
+               .min = 0,
+               .max = 100,             /* allow enum to grow in the future */
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_VCM_SLEW,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "vcm slew",
-        .min = 0,
-        .max = OV5693_VCM_SLEW_STEP_MAX,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_VCM_SLEW,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "vcm slew",
+               .min = 0,
+               .max = OV5693_VCM_SLEW_STEP_MAX,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_VCM_TIMEING,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "vcm step time",
-        .min = 0,
-        .max = OV5693_VCM_SLEW_TIME_MAX,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_VCM_TIMEING,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "vcm step time",
+               .min = 0,
+               .max = OV5693_VCM_SLEW_TIME_MAX,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_BIN_FACTOR_HORZ,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "horizontal binning factor",
-        .min = 0,
-        .max = OV5693_BIN_FACTOR_MAX,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_BIN_FACTOR_HORZ,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "horizontal binning factor",
+               .min = 0,
+               .max = OV5693_BIN_FACTOR_MAX,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
        {
-        .ops = &ctrl_ops,
-        .id = V4L2_CID_BIN_FACTOR_VERT,
-        .type = V4L2_CTRL_TYPE_INTEGER,
-        .name = "vertical binning factor",
-        .min = 0,
-        .max = OV5693_BIN_FACTOR_MAX,
-        .step = 1,
-        .def = 0,
-        .flags = 0,
-        },
+               .ops = &ctrl_ops,
+               .id = V4L2_CID_BIN_FACTOR_VERT,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "vertical binning factor",
+               .min = 0,
+               .max = OV5693_BIN_FACTOR_MAX,
+               .step = 1,
+               .def = 0,
+               .flags = 0,
+       },
 };
 
 static int ov5693_init(struct v4l2_subdev *sd)
@@ -1280,7 +1285,7 @@ static int ov5693_init(struct v4l2_subdev *sd)
                        dev_err(&client->dev,
                                "vcm enable ringing failed\n");
                ret = ad5823_i2c_write(client, AD5823_REG_MODE,
-                                       AD5823_ARC_RES1);
+                                      AD5823_ARC_RES1);
                if (ret)
                        dev_err(&client->dev,
                                "vcm change mode failed\n");
@@ -1549,7 +1554,7 @@ static int startup(struct v4l2_subdev *sd)
        int ret = 0;
 
        ret = ov5693_write_reg(client, OV5693_8BIT,
-                                       OV5693_SW_RESET, 0x01);
+                              OV5693_SW_RESET, 0x01);
        if (ret) {
                dev_err(&client->dev, "ov5693 reset err.\n");
                return ret;
@@ -1649,12 +1654,12 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd,
         * data yet. So add stop streaming here.
         */
        ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_SW_STREAM,
-                               OV5693_STOP_STREAMING);
+                              OV5693_STOP_STREAMING);
        if (ret)
                dev_warn(&client->dev, "ov5693 stream off err\n");
 
        ret = ov5693_get_intg_factor(client, ov5693_info,
-                                       &ov5693_res[dev->fmt_idx]);
+                                    &ov5693_res[dev->fmt_idx]);
        if (ret) {
                dev_err(&client->dev, "failed to get integration_factor\n");
                goto err;
@@ -1701,13 +1706,13 @@ static int ov5693_detect(struct i2c_client *client)
                return -ENODEV;
 
        ret = ov5693_read_reg(client, OV5693_8BIT,
-                                       OV5693_SC_CMMN_CHIP_ID_H, &high);
+                             OV5693_SC_CMMN_CHIP_ID_H, &high);
        if (ret) {
                dev_err(&client->dev, "sensor_id_high = 0x%x\n", high);
                return -ENODEV;
        }
        ret = ov5693_read_reg(client, OV5693_8BIT,
-                                       OV5693_SC_CMMN_CHIP_ID_L, &low);
+                             OV5693_SC_CMMN_CHIP_ID_L, &low);
        id = ((((u16)high) << 8) | (u16)low);
 
        if (id != OV5693_ID) {
@@ -1716,7 +1721,7 @@ static int ov5693_detect(struct i2c_client *client)
        }
 
        ret = ov5693_read_reg(client, OV5693_8BIT,
-                                       OV5693_SC_CMMN_SUB_ID, &high);
+                             OV5693_SC_CMMN_SUB_ID, &high);
        revision = (u8)high & 0x0f;
 
        dev_dbg(&client->dev, "sensor_revision = 0x%x\n", revision);
@@ -1733,8 +1738,8 @@ static int ov5693_s_stream(struct v4l2_subdev *sd, int enable)
        mutex_lock(&dev->input_lock);
 
        ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_SW_STREAM,
-                               enable ? OV5693_START_STREAMING :
-                               OV5693_STOP_STREAMING);
+                              enable ? OV5693_START_STREAMING :
+                              OV5693_STOP_STREAMING);
 
        mutex_unlock(&dev->input_lock);
 
@@ -1752,7 +1757,7 @@ static int ov5693_s_config(struct v4l2_subdev *sd,
                return -ENODEV;
 
        dev->platform_data =
-               (struct camera_sensor_platform_data *)platform_data;
+           (struct camera_sensor_platform_data *)platform_data;
 
        mutex_lock(&dev->input_lock);
        /* power off the module, then power on it in future
@@ -1906,7 +1911,7 @@ static int ov5693_probe(struct i2c_client *client)
        i2c = gmin_get_var_int(&client->dev, "I2CAddr", -1);
        if (i2c != -1) {
                dev_info(&client->dev,
-               "Overriding firmware-provided I2C address (0x%x) with 0x%x\n",
+                        "Overriding firmware-provided I2C address (0x%x) with 0x%x\n",
                         client->addr, i2c);
                client->addr = i2c;
        }
index e78e8a5cfb8688e8764873d39038de7b71fccd5f..df0ee5ddedd988925c2346fd94e01c80428e077e 100644 (file)
@@ -407,7 +407,8 @@ struct atomisp_zoom_point {
  * This specifies the region
  */
 struct atomisp_zoom_region {
-       struct atomisp_zoom_point origin; /* Starting point coordinates for the region */
+       struct atomisp_zoom_point
+               origin; /* Starting point coordinates for the region */
        struct atomisp_resolution resolution; /* Region resolution */
 };
 
index e701eac26e3cf7e21d7bd9f90e5bf7d3235e00cf..09e260ea06cac95b0e5fe0b87e939c79a24e1430 100644 (file)
@@ -21,15 +21,15 @@ int atomisp_register_i2c_module(struct v4l2_subdev *subdev,
                                struct camera_sensor_platform_data *plat_data,
                                enum intel_v4l2_subdev_type type);
 struct v4l2_subdev *atomisp_gmin_find_subdev(struct i2c_adapter *adapter,
-                                            struct i2c_board_info *board_info);
+       struct i2c_board_info *board_info);
 int atomisp_gmin_remove_subdev(struct v4l2_subdev *sd);
 int gmin_get_var_int(struct device *dev, const char *var, int def);
 int camera_sensor_csi(struct v4l2_subdev *sd, u32 port,
                      u32 lanes, u32 format, u32 bayer_order, int flag);
 struct camera_sensor_platform_data *gmin_camera_platform_data(
-               struct v4l2_subdev *subdev,
-               enum atomisp_input_format csi_format,
-               enum atomisp_bayer_order csi_bayer);
+    struct v4l2_subdev *subdev,
+    enum atomisp_input_format csi_format,
+    enum atomisp_bayer_order csi_bayer);
 
 int atomisp_gmin_register_vcm_control(struct camera_vcm_control *);
 
index f363a7e2968d3ccdc018c609b836687bcaf68bb9..9cf46325a696c010f8bfe3818be3d6f7ac68e2b7 100644 (file)
@@ -187,13 +187,13 @@ struct camera_vcm_control;
 struct camera_vcm_ops {
        int (*power_up)(struct v4l2_subdev *sd, struct camera_vcm_control *vcm);
        int (*power_down)(struct v4l2_subdev *sd,
-                       struct camera_vcm_control *vcm);
+                         struct camera_vcm_control *vcm);
        int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc,
-                       struct camera_vcm_control *vcm);
+                        struct camera_vcm_control *vcm);
        int (*g_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl,
-                       struct camera_vcm_control *vcm);
+                     struct camera_vcm_control *vcm);
        int (*s_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl,
-                       struct camera_vcm_control *vcm);
+                     struct camera_vcm_control *vcm);
 };
 
 struct camera_vcm_control {
@@ -215,8 +215,8 @@ struct camera_sensor_platform_data {
        int (*v1p8_ctrl)(struct v4l2_subdev *subdev, int on);
        int (*v2p8_ctrl)(struct v4l2_subdev *subdev, int on);
        int (*v1p2_ctrl)(struct v4l2_subdev *subdev, int on);
-       struct camera_vcm_control * (*get_vcm_ctrl)(struct v4l2_subdev *subdev,
-                                                   char *module_id);
+       struct camera_vcm_control *(*get_vcm_ctrl)(struct v4l2_subdev *subdev,
+               char *module_id);
 };
 
 struct camera_mipi_info {
index 431b059e65f43f60a7744eb593cf3eef624a1745..1b5111ad9415fe6925755722734b62df38abc187 100644 (file)
@@ -19,9 +19,9 @@ struct i2c_client;
 struct firmware;
 
 int load_msr_list(struct i2c_client *client, char *path,
-               const struct firmware **fw);
+                 const struct firmware **fw);
 int apply_msr_data(struct i2c_client *client, const struct firmware *fw);
 void release_msr_list(struct i2c_client *client,
-               const struct firmware *fw);
+                     const struct firmware *fw);
 
 #endif /* ifndef __LIBMSRLISTHELPER_H__ */
index 33187ea625bf7897541a276a78140dab25b4d4d7..8d575eb0a73fe89c7bc870b3d417e5cdca022fc1 100644 (file)
@@ -76,8 +76,8 @@ acc_get_fw(struct atomisp_sub_device *asd, unsigned int handle)
        struct atomisp_acc_fw *acc_fw;
 
        list_for_each_entry(acc_fw, &asd->acc.fw, list)
-               if (acc_fw->handle == handle)
-                       return acc_fw;
+       if (acc_fw->handle == handle)
+               return acc_fw;
 
        return NULL;
 }
@@ -141,9 +141,9 @@ int atomisp_acc_load_to_pipe(struct atomisp_sub_device *asd,
                             struct atomisp_acc_fw_load_to_pipe *user_fw)
 {
        static const unsigned int pipeline_flags =
-               ATOMISP_ACC_FW_LOAD_FL_PREVIEW | ATOMISP_ACC_FW_LOAD_FL_COPY |
-               ATOMISP_ACC_FW_LOAD_FL_VIDEO |
-               ATOMISP_ACC_FW_LOAD_FL_CAPTURE | ATOMISP_ACC_FW_LOAD_FL_ACC;
+           ATOMISP_ACC_FW_LOAD_FL_PREVIEW | ATOMISP_ACC_FW_LOAD_FL_COPY |
+           ATOMISP_ACC_FW_LOAD_FL_VIDEO |
+           ATOMISP_ACC_FW_LOAD_FL_CAPTURE | ATOMISP_ACC_FW_LOAD_FL_ACC;
 
        struct atomisp_acc_fw *acc_fw;
        int handle;
@@ -194,11 +194,11 @@ int atomisp_acc_load_to_pipe(struct atomisp_sub_device *asd,
        if (acc_fw->fw->type == ia_css_isp_firmware) {
                static const int type_to_css[] = {
                        [ATOMISP_ACC_FW_LOAD_TYPE_OUTPUT] =
-                               IA_CSS_ACC_OUTPUT,
+                       IA_CSS_ACC_OUTPUT,
                        [ATOMISP_ACC_FW_LOAD_TYPE_VIEWFINDER] =
-                               IA_CSS_ACC_VIEWFINDER,
+                       IA_CSS_ACC_VIEWFINDER,
                        [ATOMISP_ACC_FW_LOAD_TYPE_STANDALONE] =
-                               IA_CSS_ACC_STANDALONE,
+                       IA_CSS_ACC_STANDALONE,
                };
                acc_fw->fw->info.isp.type = type_to_css[acc_fw->type];
        }
@@ -383,7 +383,8 @@ int atomisp_acc_map(struct atomisp_sub_device *asd, struct atomisp_acc_map *map)
        return 0;
 }
 
-int atomisp_acc_unmap(struct atomisp_sub_device *asd, struct atomisp_acc_map *map)
+int atomisp_acc_unmap(struct atomisp_sub_device *asd,
+                     struct atomisp_acc_map *map)
 {
        struct atomisp_map *atomisp_map;
 
@@ -465,9 +466,9 @@ int atomisp_acc_load_extensions(struct atomisp_sub_device *asd)
 
                        if (acc_fw->flags & acc_flag_to_pipe[i].flag) {
                                ret = atomisp_css_load_acc_extension(asd,
-                                       acc_fw->fw,
-                                       acc_flag_to_pipe[i].pipe_id,
-                                       acc_fw->type);
+                                                                    acc_fw->fw,
+                                                                    acc_flag_to_pipe[i].pipe_id,
+                                                                    acc_fw->type);
                                if (ret)
                                        goto error;
 
@@ -496,7 +497,7 @@ error:
        while (--i >= 0) {
                if (acc_fw->flags & acc_flag_to_pipe[i].flag) {
                        atomisp_css_unload_acc_extension(asd, acc_fw->fw,
-                                       acc_flag_to_pipe[i].pipe_id);
+                                                        acc_flag_to_pipe[i].pipe_id);
                }
        }
 
@@ -512,8 +513,8 @@ error:
                                continue;
                        if (acc_fw->flags & acc_flag_to_pipe[i].flag) {
                                atomisp_css_unload_acc_extension(asd,
-                                       acc_fw->fw,
-                                       acc_flag_to_pipe[i].pipe_id);
+                                                                acc_fw->fw,
+                                                                acc_flag_to_pipe[i].pipe_id);
                        }
                }
        }
@@ -536,8 +537,8 @@ void atomisp_acc_unload_extensions(struct atomisp_sub_device *asd)
                for (i = ARRAY_SIZE(acc_flag_to_pipe) - 1; i >= 0; i--) {
                        if (acc_fw->flags & acc_flag_to_pipe[i].flag) {
                                atomisp_css_unload_acc_extension(asd,
-                                       acc_fw->fw,
-                                       acc_flag_to_pipe[i].pipe_id);
+                                                                acc_fw->fw,
+                                                                acc_flag_to_pipe[i].pipe_id);
                        }
                }
        }
@@ -570,7 +571,7 @@ int atomisp_acc_set_state(struct atomisp_sub_device *asd,
        for (i = 0; i < ARRAY_SIZE(acc_flag_to_pipe); i++) {
                if (acc_fw->flags & acc_flag_to_pipe[i].flag) {
                        pipe = asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
-                               pipes[acc_flag_to_pipe[i].pipe_id];
+                              pipes[acc_flag_to_pipe[i].pipe_id];
                        r = ia_css_pipe_set_qos_ext_state(pipe, acc_fw->handle,
                                                          enable);
                        if (r != IA_CSS_SUCCESS)
index 2aba72bce260fb8c3cda535e66c4aedcfc5b873b..77279e73595efcf5b0dda95d90d1ea086ae6a0d5 100644 (file)
@@ -93,7 +93,7 @@ struct camera_mipi_info *atomisp_to_sensor_mipi_info(struct v4l2_subdev *sd)
 struct atomisp_video_pipe *atomisp_to_video_pipe(struct video_device *dev)
 {
        return (struct atomisp_video_pipe *)
-           container_of(dev, struct atomisp_video_pipe, vdev);
+              container_of(dev, struct atomisp_video_pipe, vdev);
 }
 
 /*
@@ -102,7 +102,7 @@ struct atomisp_video_pipe *atomisp_to_video_pipe(struct video_device *dev)
 struct atomisp_acc_pipe *atomisp_to_acc_pipe(struct video_device *dev)
 {
        return (struct atomisp_acc_pipe *)
-           container_of(dev, struct atomisp_acc_pipe, vdev);
+              container_of(dev, struct atomisp_acc_pipe, vdev);
 }
 
 static unsigned short atomisp_get_sensor_fps(struct atomisp_sub_device *asd)
@@ -149,7 +149,7 @@ static int write_target_freq_to_hw(struct atomisp_device *isp,
        if (isp_sspm1 & ISP_FREQ_VALID_MASK) {
                dev_dbg(isp->dev, "clearing ISPSSPM1 valid bit.\n");
                iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, ISPSSPM1,
-                                   isp_sspm1 & ~(1 << ISP_FREQ_VALID_OFFSET));
+                              isp_sspm1 & ~(1 << ISP_FREQ_VALID_OFFSET));
        }
 
        ratio = (2 * isp->hpll_freq + new_freq / 2) / new_freq - 1;
@@ -160,10 +160,10 @@ static int write_target_freq_to_hw(struct atomisp_device *isp,
 
        for (i = 0; i < ISP_DFS_TRY_TIMES; i++) {
                iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, ISPSSPM1,
-                                  isp_sspm1
-                                  | ratio << ISP_REQ_FREQ_OFFSET
-                                  | 1 << ISP_FREQ_VALID_OFFSET
-                                  | guar_ratio << ISP_REQ_GUAR_FREQ_OFFSET);
+                              isp_sspm1
+                              | ratio << ISP_REQ_FREQ_OFFSET
+                              | 1 << ISP_FREQ_VALID_OFFSET
+                              | guar_ratio << ISP_REQ_GUAR_FREQ_OFFSET);
 
                iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ, ISPSSPM1, &isp_sspm1);
                timeout = 20;
@@ -218,7 +218,7 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
        }
 
        if ((isp->pdev->device & ATOMISP_PCI_DEVICE_SOC_MASK) ==
-               ATOMISP_PCI_DEVICE_SOC_CHT && ATOMISP_USE_YUVPP(asd))
+           ATOMISP_PCI_DEVICE_SOC_CHT && ATOMISP_USE_YUVPP(asd))
                isp->dfs = &dfs_config_cht_soc;
 
        dfs = isp->dfs;
@@ -258,7 +258,7 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
                        curr_rules.run_mode = ATOMISP_RUN_MODE_SDV;
                else
                        curr_rules.run_mode =
-                               ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE;
+                           ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE;
        }
 
        /* search for the target frequency by looping freq rules*/
@@ -406,7 +406,8 @@ void atomisp_eof_event(struct atomisp_sub_device *asd, uint8_t exp_id)
        v4l2_event_queue(asd->subdev.devnode, &event);
 }
 
-static void atomisp_3a_stats_ready_event(struct atomisp_sub_device *asd, uint8_t exp_id)
+static void atomisp_3a_stats_ready_event(struct atomisp_sub_device *asd,
+       uint8_t exp_id)
 {
        struct v4l2_event event = {0};
 
@@ -417,7 +418,7 @@ static void atomisp_3a_stats_ready_event(struct atomisp_sub_device *asd, uint8_t
 }
 
 static void atomisp_metadata_ready_event(struct atomisp_sub_device *asd,
-                                        enum atomisp_metadata_type md_type)
+       enum atomisp_metadata_type md_type)
 {
        struct v4l2_event event = {0};
 
@@ -554,9 +555,9 @@ irqreturn_t atomisp_isr(int irq, void *dev)
                         * start processing next frame from sensor before old
                         * one is completely done. */
                        if (atomic_read(&asd->sequence) == atomic_read(
-                                               &asd->sequence_temp))
+                               &asd->sequence_temp))
                                atomic_set(&asd->sequence_temp,
-                                               atomic_read(&asd->sof_count));
+                                          atomic_read(&asd->sof_count));
                }
                if (irq_infos & CSS_IRQ_INFO_EVENTS_READY)
                        atomic_set(&asd->sequence,
@@ -634,10 +635,10 @@ bool atomisp_buffers_queued_pipe(struct atomisp_video_pipe *pipe)
 {
 #ifndef ISP2401
        return asd->video_out_capture.buffers_in_css ||
-               asd->video_out_vf.buffers_in_css ||
-               asd->video_out_preview.buffers_in_css ||
-               asd->video_out_video_capture.buffers_in_css ?
-                   true : false;
+              asd->video_out_vf.buffers_in_css ||
+              asd->video_out_preview.buffers_in_css ||
+              asd->video_out_video_capture.buffers_in_css ?
+              true : false;
 #else
        return pipe->buffers_in_css ? true : false;
 #endif
@@ -654,10 +655,10 @@ void dump_sp_dmem(struct atomisp_device *isp, unsigned int addr,
 
        dev_dbg(isp->dev, "atomisp_io_base:%p\n", atomisp_io_base);
        dev_dbg(isp->dev, "%s, addr:0x%x, size: %d, size32: %d\n", __func__,
-                       addr, size, size32);
+               addr, size, size32);
        if (size32 * 4 + addr > 0x4000) {
                dev_err(isp->dev, "illegal size (%d) or addr (0x%x)\n",
-                               size32, addr);
+                       size32, addr);
                return;
        }
        addr += SP_DMEM_BASE;
@@ -671,7 +672,7 @@ void dump_sp_dmem(struct atomisp_device *isp, unsigned int addr,
 }
 
 static struct videobuf_buffer *atomisp_css_frame_to_vbuf(
-       struct atomisp_video_pipe *pipe, struct atomisp_css_frame *frame)
+    struct atomisp_video_pipe *pipe, struct atomisp_css_frame *frame)
 {
        struct videobuf_vmalloc_memory *vm_mem;
        struct atomisp_css_frame *handle;
@@ -702,7 +703,7 @@ static void atomisp_flush_video_pipe(struct atomisp_sub_device *asd,
                    pipe->capq.bufs[i]->state == VIDEOBUF_QUEUED) {
                        pipe->capq.bufs[i]->ts = ktime_get_ns();
                        pipe->capq.bufs[i]->field_count =
-                               atomic_read(&asd->sequence) << 1;
+                           atomic_read(&asd->sequence) << 1;
                        dev_dbg(asd->isp->dev, "release buffers on device %s\n",
                                pipe->vdev.name);
                        if (pipe->capq.bufs[i]->state == VIDEOBUF_QUEUED)
@@ -754,16 +755,16 @@ static void atomisp_recover_params_queue(struct atomisp_video_pipe *pipe)
 
 /* find atomisp_video_pipe with css pipe id, buffer type and atomisp run_mode */
 static struct atomisp_video_pipe *__atomisp_get_pipe(
-               struct atomisp_sub_device *asd,
-               enum atomisp_input_stream_id stream_id,
-               enum atomisp_css_pipe_id css_pipe_id,
-               enum atomisp_css_buffer_type buf_type)
+    struct atomisp_sub_device *asd,
+    enum atomisp_input_stream_id stream_id,
+    enum atomisp_css_pipe_id css_pipe_id,
+    enum atomisp_css_buffer_type buf_type)
 {
        struct atomisp_device *isp = asd->isp;
 
        if (css_pipe_id == CSS_PIPE_ID_COPY &&
            isp->inputs[asd->input_curr].camera_caps->
-               sensor[asd->sensor_curr].stream_num > 1) {
+           sensor[asd->sensor_curr].stream_num > 1) {
                switch (stream_id) {
                case ATOMISP_INPUT_STREAM_PREVIEW:
                        return &asd->video_out_preview;
@@ -857,8 +858,7 @@ static struct atomisp_video_pipe *__atomisp_get_pipe(
 
 enum atomisp_metadata_type
 atomisp_get_metadata_type(struct atomisp_sub_device *asd,
-                         enum ia_css_pipe_id pipe_id)
-{
+                         enum ia_css_pipe_id pipe_id) {
        if (!asd->continuous_mode->val)
                return ATOMISP_MAIN_METADATA;
 
@@ -926,7 +926,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                list_for_each_entry_safe(s3a_buf, _s3a_buf_tmp,
                                         &asd->s3a_stats_in_css, list) {
                        if (s3a_buf->s3a_data ==
-                               buffer.css_buffer.data.stats_3a) {
+                           buffer.css_buffer.data.stats_3a) {
                                list_del_init(&s3a_buf->list);
                                list_add_tail(&s3a_buf->list,
                                              &asd->s3a_stats_ready);
@@ -947,7 +947,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                list_for_each_entry_safe(md_buf, _md_buf_tmp,
                                         &asd->metadata_in_css[md_type], list) {
                        if (md_buf->metadata ==
-                               buffer.css_buffer.data.metadata) {
+                           buffer.css_buffer.data.metadata) {
                                list_del_init(&md_buf->list);
                                list_add_tail(&md_buf->list,
                                              &asd->metadata_ready[md_type]);
@@ -961,9 +961,9 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                break;
        case CSS_BUFFER_TYPE_DIS_STATISTICS:
                list_for_each_entry_safe(dis_buf, _dis_buf_tmp,
-                                               &asd->dis_stats_in_css, list) {
+                                        &asd->dis_stats_in_css, list) {
                        if (dis_buf->dis_data ==
-                               buffer.css_buffer.data.stats_dvs) {
+                           buffer.css_buffer.data.stats_dvs) {
                                spin_lock_irqsave(&asd->dis_stats_lock,
                                                  irqflags);
                                list_del_init(&dis_buf->list);
@@ -999,7 +999,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                if (IS_BYT && buf_type == CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME &&
                    asd->continuous_mode->val && ATOMISP_USE_YUVPP(asd))
                        frame->exp_id = (asd->postview_exp_id++) %
-                                               (ATOMISP_MAX_EXP_ID + 1);
+                                       (ATOMISP_MAX_EXP_ID + 1);
 
                dev_dbg(isp->dev, "%s: vf frame with exp_id %d is ready\n",
                        __func__, frame->exp_id);
@@ -1023,21 +1023,21 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                if (css_pipe_id == IA_CSS_PIPE_ID_CAPTURE &&
                    asd->pending_capture_request > 0) {
                        err = atomisp_css_offline_capture_configure(asd,
-                                       asd->params.offline_parm.num_captures,
-                                       asd->params.offline_parm.skip_frames,
-                                       asd->params.offline_parm.offset);
+                               asd->params.offline_parm.num_captures,
+                               asd->params.offline_parm.skip_frames,
+                               asd->params.offline_parm.offset);
 #ifndef ISP2401
                        asd->pending_capture_request--;
                        dev_dbg(isp->dev, "Trigger capture again for new buffer. err=%d\n",
                                err);
 #else
-                               asd->pending_capture_request--;
-                               asd->re_trigger_capture = false;
-                               dev_dbg(isp->dev, "Trigger capture again for new buffer. err=%d\n",
-                                               err);
-                       } else {
-                               asd->re_trigger_capture = true;
-                       }
+                       asd->pending_capture_request--;
+                       asd->re_trigger_capture = false;
+                       dev_dbg(isp->dev, "Trigger capture again for new buffer. err=%d\n",
+                               err);
+               } else {
+                       asd->re_trigger_capture = true;
+               }
 #endif
                }
                break;
@@ -1063,7 +1063,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                if (IS_BYT && buf_type == CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME &&
                    asd->continuous_mode->val && ATOMISP_USE_YUVPP(asd))
                        frame->exp_id = (asd->preview_exp_id++) %
-                                               (ATOMISP_MAX_EXP_ID + 1);
+                                       (ATOMISP_MAX_EXP_ID + 1);
 
                dev_dbg(isp->dev, "%s: main frame with exp_id %d is ready\n",
                        __func__, frame->exp_id);
@@ -1079,7 +1079,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                            pipe->frame_params[vb->i]->params.dvs_6axis)
                                asd->params.dvs_6axis = NULL;
                        atomisp_free_css_parameters(
-                               &pipe->frame_params[vb->i]->params);
+                           &pipe->frame_params[vb->i]->params);
                        kvfree(pipe->frame_params[vb->i]);
                        pipe->frame_params[vb->i] = NULL;
                }
@@ -1090,27 +1090,27 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                        if (frame->flash_state
                            == CSS_FRAME_FLASH_STATE_PARTIAL) {
                                asd->frame_status[vb->i] =
-                                       ATOMISP_FRAME_STATUS_FLASH_PARTIAL;
+                                   ATOMISP_FRAME_STATUS_FLASH_PARTIAL;
                                dev_dbg(isp->dev, "%s partially flashed\n",
-                                        __func__);
+                                       __func__);
                        } else if (frame->flash_state
                                   == CSS_FRAME_FLASH_STATE_FULL) {
                                asd->frame_status[vb->i] =
-                                       ATOMISP_FRAME_STATUS_FLASH_EXPOSED;
+                                   ATOMISP_FRAME_STATUS_FLASH_EXPOSED;
                                asd->params.num_flash_frames--;
                                dev_dbg(isp->dev, "%s completely flashed\n",
-                                        __func__);
+                                       __func__);
                        } else {
                                asd->frame_status[vb->i] =
-                                       ATOMISP_FRAME_STATUS_OK;
+                                   ATOMISP_FRAME_STATUS_OK;
                                dev_dbg(isp->dev,
-                                        "%s no flash in this frame\n",
-                                        __func__);
+                                       "%s no flash in this frame\n",
+                                       __func__);
                        }
 
                        /* Check if flashing sequence is done */
                        if (asd->frame_status[vb->i] ==
-                               ATOMISP_FRAME_STATUS_FLASH_EXPOSED)
+                           ATOMISP_FRAME_STATUS_FLASH_EXPOSED)
                                asd->params.flash_state = ATOMISP_FLASH_DONE;
                } else if (isp->flash) {
                        if (v4l2_g_ctrl(isp->flash->ctrl_handler, &ctrl) ==
@@ -1138,14 +1138,14 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                            css_pipe_id == CSS_PIPE_ID_VIDEO) {
                                asd->latest_preview_exp_id = frame->exp_id;
                        } else if (css_pipe_id ==
-                                       CSS_PIPE_ID_CAPTURE) {
+                                  CSS_PIPE_ID_CAPTURE) {
                                if (asd->run_mode->val ==
-                                       ATOMISP_RUN_MODE_VIDEO)
+                                   ATOMISP_RUN_MODE_VIDEO)
                                        dev_dbg(isp->dev, "SDV capture raw buffer id: %u\n",
-                                           frame->exp_id);
+                                               frame->exp_id);
                                else
                                        dev_dbg(isp->dev, "ZSL capture raw buffer id: %u\n",
-                                           frame->exp_id);
+                                               frame->exp_id);
                        }
                }
                /*
@@ -1155,7 +1155,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                 * be locked automatically, so record it here.
                 */
                if (((css_pipe_id == CSS_PIPE_ID_PREVIEW) ||
-                   (css_pipe_id == CSS_PIPE_ID_VIDEO)) &&
+                    (css_pipe_id == CSS_PIPE_ID_VIDEO)) &&
                    asd->enable_raw_buffer_lock->val &&
                    asd->continuous_mode->val) {
                        atomisp_set_raw_buffer_bitmap(asd, frame->exp_id);
@@ -1167,7 +1167,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                                                     &asd->params.css_param);
                        if (asd->params.css_param.update_flag.dz_config)
                                atomisp_css_set_dz_config(asd,
-                                       &asd->params.css_param.dz_config);
+                                                         &asd->params.css_param.dz_config);
                        /* New global dvs 6axis config should be blocked
                         * here if there's a buffer with per-frame parameters
                         * pending in CSS frame buffer queue.
@@ -1178,7 +1178,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                         */
                        if (asd->params.dvs_6axis)
                                atomisp_css_set_dvs_6axis(asd,
-                                       asd->params.dvs_6axis);
+                                                         asd->params.dvs_6axis);
                        else
                                asd->params.css_update_params_needed = false;
                        /* The update flag should not be cleaned here
@@ -1198,7 +1198,8 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
        default:
                break;
        }
-       if (vb) {
+       if (vb)
+       {
                vb->ts = ktime_get_ns();
                vb->field_count = atomic_read(&asd->sequence) << 1;
                /*mark videobuffer done for dequeue*/
@@ -1220,13 +1221,14 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
         * Requeue should only be done for 3a and dis buffers.
         * Queue/dequeue order will change if driver recycles image buffers.
         */
-       if (requeue) {
+       if (requeue)
+       {
                err = atomisp_css_queue_buffer(asd,
                                               stream_id, css_pipe_id,
                                               buf_type, &buffer);
                if (err)
                        dev_err(isp->dev, "%s, q to css fails: %d\n",
-                                       __func__, err);
+                               __func__, err);
                return;
        }
        if (!error && q_buffers)
@@ -1249,8 +1251,8 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
 void atomisp_delayed_init_work(struct work_struct *work)
 {
        struct atomisp_sub_device *asd = container_of(work,
-                       struct atomisp_sub_device,
-                       delayed_init_work);
+                                        struct atomisp_sub_device,
+                                        delayed_init_work);
        /*
         * to SOC camera, use yuvpp pipe and no support continuous mode.
         */
@@ -1303,7 +1305,7 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
                                struct ia_css_pipeline_stage *stage;
 
                                for (stage = acc_pipeline->stages; stage;
-                                       stage = stage->next) {
+                                    stage = stage->next) {
                                        const struct ia_css_fw_info *fw;
 
                                        fw = stage->firmware;
@@ -1326,11 +1328,11 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 
                /* stream off sensor */
                ret = v4l2_subdev_call(
-                               isp->inputs[asd->input_curr].
-                               camera, video, s_stream, 0);
+                         isp->inputs[asd->input_curr].
+                         camera, video, s_stream, 0);
                if (ret)
                        dev_warn(isp->dev,
-                                       "can't stop streaming on sensor!\n");
+                                "can't stop streaming on sensor!\n");
 
                atomisp_acc_unload_extensions(asd);
 
@@ -1377,12 +1379,12 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 
                if (isp->inputs[asd->input_curr].type != FILE_INPUT)
                        atomisp_css_input_set_mode(asd,
-                                       CSS_INPUT_MODE_SENSOR);
+                                                  CSS_INPUT_MODE_SENSOR);
 
                css_pipe_id = atomisp_get_css_pipe_id(asd);
                if (atomisp_css_start(asd, css_pipe_id, true))
                        dev_warn(isp->dev,
-                               "start SP failed, so do not set streaming to be enable!\n");
+                                "start SP failed, so do not set streaming to be enable!\n");
                else
                        asd->streaming = ATOMISP_DEVICE_STREAMING_ENABLED;
 
@@ -1391,7 +1393,7 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 
        if (!isp->sw_contex.file_input) {
                atomisp_css_irq_enable(isp, CSS_IRQ_INFO_CSS_RECEIVER_SOF,
-                               atomisp_css_valid_sof(isp));
+                                      atomisp_css_valid_sof(isp));
 
                if (atomisp_freq_scaling(isp, ATOMISP_DFS_MODE_AUTO, true) < 0)
                        dev_dbg(isp->dev, "dfs failed!\n");
@@ -1413,7 +1415,7 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
                        reinit_completion(&asd->init_done);
                        asd->delayed_init = ATOMISP_DELAYED_INIT_QUEUED;
                        queue_work(asd->delayed_init_workq,
-                                       &asd->delayed_init_work);
+                                  &asd->delayed_init_work);
                }
                /*
                 * dequeueing buffers is not needed. CSS will recycle
@@ -1433,8 +1435,8 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
                }
 
                ret = v4l2_subdev_call(
-                               isp->inputs[asd->input_curr].camera, video,
-                               s_stream, 1);
+                         isp->inputs[asd->input_curr].camera, video,
+                         s_stream, 1);
                if (ret)
                        dev_warn(isp->dev,
                                 "can't start streaming on sensor!\n");
@@ -1450,7 +1452,7 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 void atomisp_wdt_work(struct work_struct *work)
 {
        struct atomisp_device *isp = container_of(work, struct atomisp_device,
-                                                 wdt_work);
+                                    wdt_work);
        int i;
 #ifdef ISP2401
        unsigned int pipe_wdt_cnt[MAX_STREAM_NUM][4] = { {0} };
@@ -1473,20 +1475,21 @@ void atomisp_wdt_work(struct work_struct *work)
                struct atomisp_sub_device *asd = &isp->asd[i];
 
                pipe_wdt_cnt[i][0] +=
-                       atomic_read(&asd->video_out_capture.wdt_count);
+                   atomic_read(&asd->video_out_capture.wdt_count);
                pipe_wdt_cnt[i][1] +=
-                       atomic_read(&asd->video_out_vf.wdt_count);
+                   atomic_read(&asd->video_out_vf.wdt_count);
                pipe_wdt_cnt[i][2] +=
-                       atomic_read(&asd->video_out_preview.wdt_count);
+                   atomic_read(&asd->video_out_preview.wdt_count);
                pipe_wdt_cnt[i][3] +=
-                       atomic_read(&asd->video_out_video_capture.wdt_count);
+                   atomic_read(&asd->video_out_video_capture.wdt_count);
                css_recover =
-                       (pipe_wdt_cnt[i][0] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
-                        pipe_wdt_cnt[i][1] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
-                        pipe_wdt_cnt[i][2] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
-                        pipe_wdt_cnt[i][3] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT)
-                        ? true : false;
-               dev_err(isp->dev, "pipe on asd%d timeout cnt: (%d, %d, %d, %d) of %d, recover = %d\n",
+                   (pipe_wdt_cnt[i][0] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
+                    pipe_wdt_cnt[i][1] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
+                    pipe_wdt_cnt[i][2] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
+                    pipe_wdt_cnt[i][3] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT)
+                   ? true : false;
+               dev_err(isp->dev,
+                       "pipe on asd%d timeout cnt: (%d, %d, %d, %d) of %d, recover = %d\n",
                        asd->index, pipe_wdt_cnt[i][0], pipe_wdt_cnt[i][1],
                        pipe_wdt_cnt[i][2], pipe_wdt_cnt[i][3],
                        ATOMISP_ISP_MAX_TIMEOUT_COUNT, css_recover);
@@ -1610,11 +1613,11 @@ void atomisp_wdt_work(struct work_struct *work)
                struct atomisp_sub_device *asd = &isp->asd[i];
 
                if (asd->streaming ==
-                       ATOMISP_DEVICE_STREAMING_ENABLED) {
+                   ATOMISP_DEVICE_STREAMING_ENABLED) {
                        atomisp_wdt_refresh(asd,
-                               isp->sw_contex.file_input ?
-                               ATOMISP_ISP_FILE_TIMEOUT_DURATION :
-                               ATOMISP_ISP_TIMEOUT_DURATION);
+                                           isp->sw_contex.file_input ?
+                                           ATOMISP_ISP_FILE_TIMEOUT_DURATION :
+                                           ATOMISP_ISP_TIMEOUT_DURATION);
                }
        }
 #endif
@@ -1645,7 +1648,7 @@ void atomisp_css_flush(struct atomisp_device *isp)
                struct atomisp_sub_device *asd = &isp->asd[i];
 
                if (asd->streaming !=
-                               ATOMISP_DEVICE_STREAMING_ENABLED)
+                   ATOMISP_DEVICE_STREAMING_ENABLED)
                        continue;
 
                atomisp_wdt_refresh(asd,
@@ -1669,9 +1672,9 @@ void atomisp_wdt(struct timer_list *t)
 #ifdef ISP2401
        atomic_inc(&pipe->wdt_count);
        dev_warn(isp->dev,
-               "[WARNING]asd %d pipe %s ISP timeout %d!\n",
-                       asd->index, pipe->vdev.name,
-                       atomic_read(&pipe->wdt_count));
+                "[WARNING]asd %d pipe %s ISP timeout %d!\n",
+                asd->index, pipe->vdev.name,
+                atomic_read(&pipe->wdt_count));
 #endif
        if (atomic_read(&isp->wdt_work_queued)) {
                dev_dbg(isp->dev, "ISP watchdog was put into workqueue\n");
@@ -1685,7 +1688,7 @@ void atomisp_wdt(struct timer_list *t)
 void atomisp_wdt_refresh(struct atomisp_sub_device *asd, unsigned int delay)
 #else
 void atomisp_wdt_refresh_pipe(struct atomisp_video_pipe *pipe,
-                               unsigned int delay)
+                             unsigned int delay)
 #endif
 {
        unsigned long next;
@@ -1934,11 +1937,11 @@ int atomisp_get_frame_pgnr(struct atomisp_device *isp,
  * Get internal fmt according to V4L2 fmt
  */
 static enum atomisp_css_frame_format
-v4l2_fmt_to_sh_fmt(u32 fmt)
-{
-       switch (fmt) {
+v4l2_fmt_to_sh_fmt(u32 fmt) {
+       switch (fmt)
+       {
        case V4L2_PIX_FMT_YUV420:
-               return CSS_FRAME_FORMAT_YUV420;
+                               return CSS_FRAME_FORMAT_YUV420;
        case V4L2_PIX_FMT_YVU420:
                return CSS_FRAME_FORMAT_YV12;
        case V4L2_PIX_FMT_YUV422P:
@@ -2084,7 +2087,7 @@ static void atomisp_update_capture_mode(struct atomisp_sub_device *asd)
 
 #ifdef ISP2401
 int atomisp_set_sensor_runmode(struct atomisp_sub_device *asd,
-               struct atomisp_s_runmode *runmode)
+                              struct atomisp_s_runmode *runmode)
 {
        struct atomisp_device *isp = asd->isp;
        struct v4l2_ctrl *c;
@@ -2094,7 +2097,8 @@ int atomisp_set_sensor_runmode(struct atomisp_sub_device *asd,
                        CI_MODE_VIDEO,
                        CI_MODE_STILL_CAPTURE,
                        CI_MODE_CONTINUOUS,
-                       CI_MODE_PREVIEW };
+                       CI_MODE_PREVIEW
+                     };
 
        if (!(runmode && (runmode->mode & RUNMODE_MASK)))
                return -EINVAL;
@@ -2202,7 +2206,7 @@ int atomisp_tnr(struct atomisp_sub_device *asd, int flag,
        } else {
                /* Set tnr config to isp parameters */
                memcpy(&asd->params.css_param.tnr_config, config,
-                       sizeof(struct atomisp_css_tnr_config));
+                      sizeof(struct atomisp_css_tnr_config));
                atomisp_css_set_tnr_config(asd, &asd->params.css_param.tnr_config);
                asd->params.css_update_params_needed = true;
        }
@@ -2296,7 +2300,7 @@ int atomisp_ctc(struct atomisp_sub_device *asd, int flag,
  * Function to update gamma correction parameters
  */
 int atomisp_gamma_correction(struct atomisp_sub_device *asd, int flag,
-       struct atomisp_gc_config *config)
+                            struct atomisp_gc_config *config)
 {
        if (flag == 0) {
                /* Get gamma correction params from current setup */
@@ -2400,7 +2404,7 @@ static void atomisp_curr_user_grid_info(struct atomisp_sub_device *asd,
 }
 
 int atomisp_compare_grid(struct atomisp_sub_device *asd,
-                               struct atomisp_grid_info *atomgrid)
+                        struct atomisp_grid_info *atomgrid)
 {
        struct atomisp_grid_info tmp = {0};
 
@@ -2429,16 +2433,16 @@ int atomisp_gdc_cac_table(struct atomisp_sub_device *asd, int flag,
 
                for (i = 0; i < CSS_MORPH_TABLE_NUM_PLANES; i++) {
                        ret = copy_to_user(config->coordinates_x[i],
-                               tab.coordinates_x[i], tab.height *
-                               tab.width * sizeof(*tab.coordinates_x[i]));
+                                          tab.coordinates_x[i], tab.height *
+                                          tab.width * sizeof(*tab.coordinates_x[i]));
                        if (ret) {
                                dev_err(isp->dev,
                                        "Failed to copy to User for x\n");
                                return -EFAULT;
                        }
                        ret = copy_to_user(config->coordinates_y[i],
-                               tab.coordinates_y[i], tab.height *
-                               tab.width * sizeof(*tab.coordinates_y[i]));
+                                          tab.coordinates_y[i], tab.height *
+                                          tab.width * sizeof(*tab.coordinates_y[i]));
                        if (ret) {
                                dev_err(isp->dev,
                                        "Failed to copy to User for y\n");
@@ -2447,7 +2451,7 @@ int atomisp_gdc_cac_table(struct atomisp_sub_device *asd, int flag,
                }
        } else {
                struct atomisp_css_morph_table *tab =
-                       asd->params.css_param.morph_table;
+                           asd->params.css_param.morph_table;
 
                /* free first if we have one */
                if (tab) {
@@ -2466,24 +2470,24 @@ int atomisp_gdc_cac_table(struct atomisp_sub_device *asd, int flag,
 
                for (i = 0; i < CSS_MORPH_TABLE_NUM_PLANES; i++) {
                        ret = copy_from_user(tab->coordinates_x[i],
-                               config->coordinates_x[i],
-                               config->height * config->width *
-                               sizeof(*config->coordinates_x[i]));
+                                            config->coordinates_x[i],
+                                            config->height * config->width *
+                                            sizeof(*config->coordinates_x[i]));
                        if (ret) {
                                dev_err(isp->dev,
-                               "Failed to copy from User for x, ret %d\n",
-                               ret);
+                                       "Failed to copy from User for x, ret %d\n",
+                                       ret);
                                atomisp_css_morph_table_free(tab);
                                return -EFAULT;
                        }
                        ret = copy_from_user(tab->coordinates_y[i],
-                               config->coordinates_y[i],
-                               config->height * config->width *
-                               sizeof(*config->coordinates_y[i]));
+                                            config->coordinates_y[i],
+                                            config->height * config->width *
+                                            sizeof(*config->coordinates_y[i]));
                        if (ret) {
                                dev_err(isp->dev,
-                               "Failed to copy from User for y, ret is %d\n",
-                               ret);
+                                       "Failed to copy from User for y, ret is %d\n",
+                                       ret);
                                atomisp_css_morph_table_free(tab);
                                return -EFAULT;
                        }
@@ -2561,7 +2565,7 @@ int atomisp_get_dis_stat(struct atomisp_sub_device *asd,
  * Function  set camrea_prefiles.xml current sensor pixel array size
  */
 int atomisp_set_array_res(struct atomisp_sub_device *asd,
-                        struct atomisp_resolution  *config)
+                         struct atomisp_resolution  *config)
 {
        dev_dbg(asd->isp->dev, ">%s start\n", __func__);
        if (!config) {
@@ -2578,23 +2582,23 @@ int atomisp_set_array_res(struct atomisp_sub_device *asd,
  * Function to get DVS2 BQ resolution settings
  */
 int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
-                        struct atomisp_dvs2_bq_resolutions *bq_res)
+                                   struct atomisp_dvs2_bq_resolutions *bq_res)
 {
        struct ia_css_pipe_config *pipe_cfg = NULL;
        struct ia_css_stream_config *stream_cfg = NULL;
        struct ia_css_stream_input_config *input_config = NULL;
 
        struct ia_css_stream *stream =
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;
+                   asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;
        if (!stream) {
                dev_warn(asd->isp->dev, "stream is not created");
                return -EAGAIN;
        }
 
        pipe_cfg = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .pipe_configs[CSS_PIPE_ID_VIDEO];
+                  .pipe_configs[CSS_PIPE_ID_VIDEO];
        stream_cfg = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .stream_config;
+                    .stream_config;
        input_config = &stream_cfg->input_config;
 
        if (!bq_res)
@@ -2609,9 +2613,9 @@ int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
        /* the GDC input resolution */
        if (!asd->continuous_mode->val) {
                bq_res->source_bq.width_bq = bq_res->output_bq.width_bq +
-                               pipe_cfg->dvs_envelope.width / 2;
+                                            pipe_cfg->dvs_envelope.width / 2;
                bq_res->source_bq.height_bq = bq_res->output_bq.height_bq +
-                               pipe_cfg->dvs_envelope.height / 2;
+                                             pipe_cfg->dvs_envelope.height / 2;
                /*
                 * Bad pixels caused by spatial filter processing
                 * ISP filter resolution should be given by CSS/FW, but for now
@@ -2626,9 +2630,9 @@ int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
 
                if (asd->params.video_dis_en) {
                        bq_res->envelope_bq.width_bq = pipe_cfg->dvs_envelope.width
-                                       / 2 - bq_res->ispfilter_bq.width_bq;
+                                                      / 2 - bq_res->ispfilter_bq.width_bq;
                        bq_res->envelope_bq.height_bq = pipe_cfg->dvs_envelope.height
-                                       / 2 - bq_res->ispfilter_bq.height_bq;
+                                                       / 2 - bq_res->ispfilter_bq.height_bq;
                }
        } else {
                unsigned int w_padding;
@@ -2642,13 +2646,13 @@ int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
                 * effective_input / bayer_ds_ratio
                 */
                bq_res->source_bq.width_bq =
-                       (input_config->effective_res.width *
-                        pipe_cfg->bayer_ds_out_res.width /
-                        input_config->effective_res.width + 1) / 2;
+                   (input_config->effective_res.width *
+                    pipe_cfg->bayer_ds_out_res.width /
+                    input_config->effective_res.width + 1) / 2;
                bq_res->source_bq.height_bq =
-                       (input_config->effective_res.height *
-                        pipe_cfg->bayer_ds_out_res.height /
-                        input_config->effective_res.height + 1) / 2;
+                   (input_config->effective_res.height *
+                    pipe_cfg->bayer_ds_out_res.height /
+                    input_config->effective_res.height + 1) / 2;
 
                if (!asd->params.video_dis_en) {
                        /*
@@ -2658,11 +2662,11 @@ int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
                         * formula for SDV.
                         */
                        bq_res->ispfilter_bq.width_bq = 128 *
-                               pipe_cfg->bayer_ds_out_res.width /
-                               input_config->effective_res.width / 2;
+                                                       pipe_cfg->bayer_ds_out_res.width /
+                                                       input_config->effective_res.width / 2;
                        bq_res->ispfilter_bq.height_bq = 128 *
-                               pipe_cfg->bayer_ds_out_res.width /
-                               input_config->effective_res.width / 2;
+                                                        pipe_cfg->bayer_ds_out_res.width /
+                                                        input_config->effective_res.width / 2;
 
                        if (IS_HWREVISION(asd->isp, ATOMISP_HW_REVISION_ISP2401)) {
                                /* No additional left padding for ISYS2401 */
@@ -2680,17 +2684,17 @@ int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
                                 * gdc_shift_bq = w_padding/BDS/2 + ispfilter_bq/2
                                 */
                                gdc_effective_input =
-                                       input_config->effective_res.width +
-                                       pipe_cfg->dvs_envelope.width;
+                                   input_config->effective_res.width +
+                                   pipe_cfg->dvs_envelope.width;
                                w_padding = roundup(gdc_effective_input, 128) -
-                                       input_config->effective_res.width;
+                                           input_config->effective_res.width;
                                w_padding = w_padding *
-                                       pipe_cfg->bayer_ds_out_res.width /
-                                       input_config->effective_res.width + 1;
+                                           pipe_cfg->bayer_ds_out_res.width /
+                                           input_config->effective_res.width + 1;
                                w_padding = roundup(w_padding / 2, 1);
 
                                bq_res->gdc_shift_bq.width_bq = bq_res->ispfilter_bq.width_bq / 2
-                                       + w_padding;
+                                                               + w_padding;
                                bq_res->gdc_shift_bq.height_bq = 4 / 2;
                        }
                } else {
@@ -2710,9 +2714,9 @@ int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
                                if (w_padding < 12)
                                        w_padding = 12;
                                bq_res->gdc_shift_bq.width_bq = 4 / 2 +
-                                   ((w_padding - 12) *
-                                    pipe_cfg->bayer_ds_out_res.width /
-                               input_config->effective_res.width + 1) / 2;
+                                                               ((w_padding - 12) *
+                                                                pipe_cfg->bayer_ds_out_res.width /
+                                                                input_config->effective_res.width + 1) / 2;
                                bq_res->gdc_shift_bq.height_bq = 4 / 2;
                        }
 
@@ -2727,20 +2731,21 @@ int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
                                        pipe_cfg->output_info[0].res.height / 5,
                                        ATOM_ISP_STEP_HEIGHT);
                        bq_res->envelope_bq.width_bq =
-                               min((dvs_w / 2), (dvs_w_max / 2)) -
-                               bq_res->ispfilter_bq.width_bq;
+                           min((dvs_w / 2), (dvs_w_max / 2)) -
+                           bq_res->ispfilter_bq.width_bq;
                        bq_res->envelope_bq.height_bq =
-                               min((dvs_h / 2), (dvs_h_max / 2)) -
-                               bq_res->ispfilter_bq.height_bq;
+                           min((dvs_h / 2), (dvs_h_max / 2)) -
+                           bq_res->ispfilter_bq.height_bq;
                }
        }
 
-       dev_dbg(asd->isp->dev, "source_bq.width_bq %d, source_bq.height_bq %d,\nispfilter_bq.width_bq %d, ispfilter_bq.height_bq %d,\ngdc_shift_bq.width_bq %d, gdc_shift_bq.height_bq %d,\nenvelope_bq.width_bq %d, envelope_bq.height_bq %d,\noutput_bq.width_bq %d, output_bq.height_bq %d\n",
-             bq_res->source_bq.width_bq, bq_res->source_bq.height_bq,
-             bq_res->ispfilter_bq.width_bq, bq_res->ispfilter_bq.height_bq,
-             bq_res->gdc_shift_bq.width_bq, bq_res->gdc_shift_bq.height_bq,
-             bq_res->envelope_bq.width_bq, bq_res->envelope_bq.height_bq,
-             bq_res->output_bq.width_bq, bq_res->output_bq.height_bq);
+       dev_dbg(asd->isp->dev,
+               "source_bq.width_bq %d, source_bq.height_bq %d,\nispfilter_bq.width_bq %d, ispfilter_bq.height_bq %d,\ngdc_shift_bq.width_bq %d, gdc_shift_bq.height_bq %d,\nenvelope_bq.width_bq %d, envelope_bq.height_bq %d,\noutput_bq.width_bq %d, output_bq.height_bq %d\n",
+               bq_res->source_bq.width_bq, bq_res->source_bq.height_bq,
+               bq_res->ispfilter_bq.width_bq, bq_res->ispfilter_bq.height_bq,
+               bq_res->gdc_shift_bq.width_bq, bq_res->gdc_shift_bq.height_bq,
+               bq_res->envelope_bq.width_bq, bq_res->envelope_bq.height_bq,
+               bq_res->output_bq.width_bq, bq_res->output_bq.height_bq);
 
        return 0;
 }
@@ -2781,13 +2786,13 @@ int atomisp_3a_stat(struct atomisp_sub_device *asd, int flag,
        }
 
        s3a_buf = list_entry(asd->s3a_stats_ready.next,
-                       struct atomisp_s3a_buf, list);
+                            struct atomisp_s3a_buf, list);
        if (s3a_buf->s3a_map)
                ia_css_translate_3a_statistics(
-                       asd->params.s3a_user_stat, s3a_buf->s3a_map);
+                   asd->params.s3a_user_stat, s3a_buf->s3a_map);
        else
                ia_css_get_3a_statistics(asd->params.s3a_user_stat,
-                       s3a_buf->s3a_data);
+                                        s3a_buf->s3a_data);
 
        config->exp_id = s3a_buf->s3a_data->exp_id;
        config->isp_config_id = s3a_buf->s3a_data->isp_config_id;
@@ -2796,14 +2801,15 @@ int atomisp_3a_stat(struct atomisp_sub_device *asd, int flag,
                           asd->params.s3a_output_bytes);
        if (ret) {
                dev_err(isp->dev, "copy to user failed: copied %lu bytes\n",
-                               ret);
+                       ret);
                return -EFAULT;
        }
 
        /* Move to free buffer list */
        list_del_init(&s3a_buf->list);
        list_add_tail(&s3a_buf->list, &asd->s3a_stats);
-       dev_dbg(isp->dev, "%s: finish getting exp_id %d 3a stat, isp_config_id %d\n", __func__,
+       dev_dbg(isp->dev, "%s: finish getting exp_id %d 3a stat, isp_config_id %d\n",
+               __func__,
                config->exp_id, config->isp_config_id);
        return 0;
 }
@@ -2823,9 +2829,9 @@ int atomisp_get_metadata(struct atomisp_sub_device *asd, int flag,
                return -EINVAL;
 
        stream_config = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
-               stream_config;
+                       stream_config;
        stream_info = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
-               stream_info;
+                     stream_info;
 
        /* We always return the resolution and stride even if there is
         * no valid metadata. This allows the caller to get the information
@@ -2847,14 +2853,14 @@ int atomisp_get_metadata(struct atomisp_sub_device *asd, int flag,
        }
 
        mipi_info = atomisp_to_sensor_mipi_info(
-               isp->inputs[asd->input_curr].camera);
+                       isp->inputs[asd->input_curr].camera);
        if (!mipi_info)
                return -EINVAL;
 
        if (mipi_info->metadata_effective_width) {
                for (i = 0; i < md->height; i++)
                        md->effective_width[i] =
-                               mipi_info->metadata_effective_width[i];
+                           mipi_info->metadata_effective_width[i];
        }
 
        md_buf = list_entry(asd->metadata_ready[md_type].next,
@@ -2866,8 +2872,8 @@ int atomisp_get_metadata(struct atomisp_sub_device *asd, int flag,
                                   stream_info->metadata_info.size);
        } else {
                hmm_load(md_buf->metadata->address,
-                                   asd->params.metadata_user[md_type],
-                                   stream_info->metadata_info.size);
+                        asd->params.metadata_user[md_type],
+                        stream_info->metadata_info.size);
 
                ret = copy_to_user(md->data,
                                   asd->params.metadata_user[md_type],
@@ -2902,9 +2908,9 @@ int atomisp_get_metadata_by_type(struct atomisp_sub_device *asd, int flag,
                return -EINVAL;
 
        stream_config = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
-               stream_config;
+                       stream_config;
        stream_info = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
-               stream_info;
+                     stream_info;
 
        /* We always return the resolution and stride even if there is
         * no valid metadata. This allows the caller to get the information
@@ -2930,14 +2936,14 @@ int atomisp_get_metadata_by_type(struct atomisp_sub_device *asd, int flag,
        }
 
        mipi_info = atomisp_to_sensor_mipi_info(
-               isp->inputs[asd->input_curr].camera);
+                       isp->inputs[asd->input_curr].camera);
        if (!mipi_info)
                return -EINVAL;
 
        if (mipi_info->metadata_effective_width) {
                for (i = 0; i < md->height; i++)
                        md->effective_width[i] =
-                               mipi_info->metadata_effective_width[i];
+                           mipi_info->metadata_effective_width[i];
        }
 
        md_buf = list_entry(asd->metadata_ready[md_type].next,
@@ -2949,8 +2955,8 @@ int atomisp_get_metadata_by_type(struct atomisp_sub_device *asd, int flag,
                                   stream_info->metadata_info.size);
        } else {
                hmm_load(md_buf->metadata->address,
-                                   asd->params.metadata_user[md_type],
-                                   stream_info->metadata_info.size);
+                        asd->params.metadata_user[md_type],
+                        stream_info->metadata_info.size);
 
                ret = copy_to_user(md->data,
                                   asd->params.metadata_user[md_type],
@@ -2978,7 +2984,7 @@ int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
 
 {
        struct atomisp_stream_env *stream_env =
-                       &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        struct atomisp_resolution  eff_res, out_res;
 #ifdef ISP2401
        int w_offset, h_offset;
@@ -2991,26 +2997,26 @@ int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
                return 0;
 
        if (css_pipe_id != IA_CSS_PIPE_ID_PREVIEW
-               && css_pipe_id != IA_CSS_PIPE_ID_CAPTURE) {
+           && css_pipe_id != IA_CSS_PIPE_ID_CAPTURE) {
                dev_err(asd->isp->dev, "%s the set pipe no support crop region"
                        , __func__);
                return -EINVAL;
        }
 
        eff_res.width =
-               stream_env->stream_config.input_config.effective_res.width;
+           stream_env->stream_config.input_config.effective_res.width;
        eff_res.height =
-               stream_env->stream_config.input_config.effective_res.height;
+           stream_env->stream_config.input_config.effective_res.height;
        if (eff_res.width == 0 || eff_res.height == 0) {
                dev_err(asd->isp->dev, "%s err effective resolution"
-                               , __func__);
+                       , __func__);
                return -EINVAL;
        }
 
        if (dz_config->zoom_region.resolution.width
-               == asd->sensor_array_res.width
-               || dz_config->zoom_region.resolution.height
-               == asd->sensor_array_res.height) {
+           == asd->sensor_array_res.width
+           || dz_config->zoom_region.resolution.height
+           == asd->sensor_array_res.height) {
                /*no need crop region*/
                dz_config->zoom_region.origin.x = 0;
                dz_config->zoom_region.origin.y = 0;
@@ -3026,75 +3032,75 @@ int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
         */
 #ifdef ISP2401
        out_res.width =
-               stream_env->pipe_configs[css_pipe_id].output_info[0].res.width;
+           stream_env->pipe_configs[css_pipe_id].output_info[0].res.width;
        out_res.height =
-               stream_env->pipe_configs[css_pipe_id].output_info[0].res.height;
+           stream_env->pipe_configs[css_pipe_id].output_info[0].res.height;
        if (out_res.width == 0 || out_res.height == 0) {
                dev_err(asd->isp->dev, "%s err current pipe output resolution"
-                               , __func__);
+                       , __func__);
                return -EINVAL;
        }
 
        if (asd->sensor_array_res.width * out_res.height
-                       < out_res.width * asd->sensor_array_res.height) {
+           < out_res.width * asd->sensor_array_res.height) {
                h_offset = asd->sensor_array_res.height -
-                               asd->sensor_array_res.width
-                               * out_res.height / out_res.width;
+                          asd->sensor_array_res.width
+                          * out_res.height / out_res.width;
                h_offset = h_offset / 2;
                if (dz_config->zoom_region.origin.y < h_offset)
                        dz_config->zoom_region.origin.y = 0;
                else
                        dz_config->zoom_region.origin.y =
-                               dz_config->zoom_region.origin.y - h_offset;
+                           dz_config->zoom_region.origin.y - h_offset;
                w_offset = 0;
        } else {
                w_offset = asd->sensor_array_res.width -
-                               asd->sensor_array_res.height
-                               * out_res.width / out_res.height;
+                          asd->sensor_array_res.height
+                          * out_res.width / out_res.height;
                w_offset = w_offset / 2;
                if (dz_config->zoom_region.origin.x < w_offset)
                        dz_config->zoom_region.origin.x = 0;
                else
                        dz_config->zoom_region.origin.x =
-                               dz_config->zoom_region.origin.x - w_offset;
+                           dz_config->zoom_region.origin.x - w_offset;
                h_offset = 0;
        }
 #endif
        dz_config->zoom_region.origin.x =
-                       dz_config->zoom_region.origin.x
-                       * eff_res.width
+           dz_config->zoom_region.origin.x
+           * eff_res.width
 #ifndef ISP2401
-                       / asd->sensor_array_res.width;
+           / asd->sensor_array_res.width;
 #else
-                       / (asd->sensor_array_res.width -
-                       2 * w_offset);
+           / (asd->sensor_array_res.width -
+              2 * w_offset);
 #endif
        dz_config->zoom_region.origin.y =
-                       dz_config->zoom_region.origin.y
-                       * eff_res.height
+           dz_config->zoom_region.origin.y
+           * eff_res.height
 #ifndef ISP2401
-                       / asd->sensor_array_res.height;
+           / asd->sensor_array_res.height;
 #else
-                       / (asd->sensor_array_res.height -
-                       2 * h_offset);
+           / (asd->sensor_array_res.height -
+              2 * h_offset);
 #endif
        dz_config->zoom_region.resolution.width =
-                       dz_config->zoom_region.resolution.width
-                       * eff_res.width
+           dz_config->zoom_region.resolution.width
+           * eff_res.width
 #ifndef ISP2401
-                       / asd->sensor_array_res.width;
+           / asd->sensor_array_res.width;
 #else
-                       / (asd->sensor_array_res.width -
-                       2 * w_offset);
+           / (asd->sensor_array_res.width -
+              2 * w_offset);
 #endif
        dz_config->zoom_region.resolution.height =
-                       dz_config->zoom_region.resolution.height
-                       * eff_res.height
+           dz_config->zoom_region.resolution.height
+           * eff_res.height
 #ifndef ISP2401
-                       / asd->sensor_array_res.height;
+           / asd->sensor_array_res.height;
 #else
-                       / (asd->sensor_array_res.height -
-                       2 * h_offset);
+           / (asd->sensor_array_res.height -
+              2 * h_offset);
 #endif
 
        /*
@@ -3103,42 +3109,43 @@ int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
          */
 #ifndef ISP2401
        out_res.width =
-               stream_env->pipe_configs[css_pipe_id].output_info[0].res.width;
+           stream_env->pipe_configs[css_pipe_id].output_info[0].res.width;
        out_res.height =
-               stream_env->pipe_configs[css_pipe_id].output_info[0].res.height;
+           stream_env->pipe_configs[css_pipe_id].output_info[0].res.height;
        if (out_res.width == 0 || out_res.height == 0) {
                dev_err(asd->isp->dev, "%s err current pipe output resolution"
-                               , __func__);
+                       , __func__);
                return -EINVAL;
        }
 
 #endif
        if (out_res.width * dz_config->zoom_region.resolution.height
-               > dz_config->zoom_region.resolution.width * out_res.height) {
+           > dz_config->zoom_region.resolution.width * out_res.height) {
                dz_config->zoom_region.resolution.height =
-                               dz_config->zoom_region.resolution.width
-                               * out_res.height / out_res.width;
+                   dz_config->zoom_region.resolution.width
+                   * out_res.height / out_res.width;
        } else {
                dz_config->zoom_region.resolution.width =
-                               dz_config->zoom_region.resolution.height
-                               * out_res.width / out_res.height;
-       }
-       dev_dbg(asd->isp->dev, "%s crop region:(%d,%d),(%d,%d) eff_res(%d, %d) array_size(%d,%d) out_res(%d, %d)\n",
-                       __func__, dz_config->zoom_region.origin.x,
-                       dz_config->zoom_region.origin.y,
-                       dz_config->zoom_region.resolution.width,
-                       dz_config->zoom_region.resolution.height,
-                       eff_res.width, eff_res.height,
-                       asd->sensor_array_res.width,
-                       asd->sensor_array_res.height,
-                       out_res.width, out_res.height);
+                   dz_config->zoom_region.resolution.height
+                   * out_res.width / out_res.height;
+       }
+       dev_dbg(asd->isp->dev,
+               "%s crop region:(%d,%d),(%d,%d) eff_res(%d, %d) array_size(%d,%d) out_res(%d, %d)\n",
+               __func__, dz_config->zoom_region.origin.x,
+               dz_config->zoom_region.origin.y,
+               dz_config->zoom_region.resolution.width,
+               dz_config->zoom_region.resolution.height,
+               eff_res.width, eff_res.height,
+               asd->sensor_array_res.width,
+               asd->sensor_array_res.height,
+               out_res.width, out_res.height);
 
        if ((dz_config->zoom_region.origin.x +
-               dz_config->zoom_region.resolution.width
-               > eff_res.width) ||
-               (dz_config->zoom_region.origin.y +
-               dz_config->zoom_region.resolution.height
-               > eff_res.height))
+            dz_config->zoom_region.resolution.width
+            > eff_res.width) ||
+           (dz_config->zoom_region.origin.y +
+            dz_config->zoom_region.resolution.height
+            > eff_res.height))
                return -EINVAL;
 
        return 0;
@@ -3148,8 +3155,8 @@ int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
  * Function to check the zoom region whether is effective
  */
 static bool atomisp_check_zoom_region(
-                       struct atomisp_sub_device *asd,
-                       struct ia_css_dz_config *dz_config)
+    struct atomisp_sub_device *asd,
+    struct ia_css_dz_config *dz_config)
 {
        struct atomisp_resolution  config;
        bool flag = false;
@@ -3163,15 +3170,16 @@ static bool atomisp_check_zoom_region(
        config.width = asd->sensor_array_res.width;
        config.height = asd->sensor_array_res.height;
        w = dz_config->zoom_region.origin.x +
-               dz_config->zoom_region.resolution.width;
+           dz_config->zoom_region.resolution.width;
        h = dz_config->zoom_region.origin.y +
-               dz_config->zoom_region.resolution.height;
+           dz_config->zoom_region.resolution.height;
 
        if ((w <= config.width) && (h <= config.height) && w > 0 && h > 0)
                flag = true;
        else
                /* setting error zoom region */
-               dev_err(asd->isp->dev, "%s zoom region ERROR:dz_config:(%d,%d),(%d,%d)array_res(%d, %d)\n",
+               dev_err(asd->isp->dev,
+                       "%s zoom region ERROR:dz_config:(%d,%d),(%d,%d)array_res(%d, %d)\n",
                        __func__, dz_config->zoom_region.origin.x,
                        dz_config->zoom_region.origin.y,
                        dz_config->zoom_region.resolution.width,
@@ -3182,8 +3190,8 @@ static bool atomisp_check_zoom_region(
 }
 
 void atomisp_apply_css_parameters(
-                               struct atomisp_sub_device *asd,
-                               struct atomisp_css_params *css_param)
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_params *css_param)
 {
        if (css_param->update_flag.wb_config)
                atomisp_css_set_wb_config(asd, &css_param->wb_config);
@@ -3235,11 +3243,11 @@ void atomisp_apply_css_parameters(
 
        if (css_param->update_flag.yuv2rgb_cc_config)
                atomisp_css_set_yuv2rgb_cc_config(asd,
-                                       &css_param->yuv2rgb_cc_config);
+                                                 &css_param->yuv2rgb_cc_config);
 
        if (css_param->update_flag.rgb2yuv_cc_config)
                atomisp_css_set_rgb2yuv_cc_config(asd,
-                                       &css_param->rgb2yuv_cc_config);
+                                                 &css_param->rgb2yuv_cc_config);
 
        if (css_param->update_flag.macc_table)
                atomisp_css_set_macc_table(asd, &css_param->macc_table);
@@ -3267,8 +3275,8 @@ void atomisp_apply_css_parameters(
 
        if (css_param->update_flag.dvs2_coefs) {
                struct atomisp_css_dvs_grid_info *dvs_grid_info =
-                       atomisp_css_get_dvs_grid_info(
-                               &asd->params.curr_grid_info);
+                   atomisp_css_get_dvs_grid_info(
+                       &asd->params.curr_grid_info);
 
                if (dvs_grid_info && dvs_grid_info->enable)
                        atomisp_css_set_dvs2_coefs(asd, css_param->dvs2_coeff);
@@ -3292,7 +3300,7 @@ void atomisp_apply_css_parameters(
 }
 
 static unsigned int long copy_from_compatible(void *to, const void *from,
-                                             unsigned long n, bool from_user)
+       unsigned long n, bool from_user)
 {
        if (from_user)
                return copy_from_user(to, (void __user *)from, n);
@@ -3313,269 +3321,269 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
 
        if (arg->wb_config && (from_user || !cur_config->wb_config)) {
                if (copy_from_compatible(&css_param->wb_config, arg->wb_config,
-                               sizeof(struct atomisp_css_wb_config),
-                               from_user))
+                                        sizeof(struct atomisp_css_wb_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.wb_config =
-                       (struct atomisp_wb_config *)&css_param->wb_config;
+                   (struct atomisp_wb_config *)&css_param->wb_config;
        }
 
        if (arg->ob_config && (from_user || !cur_config->ob_config)) {
                if (copy_from_compatible(&css_param->ob_config, arg->ob_config,
-                               sizeof(struct atomisp_css_ob_config),
-                               from_user))
+                                        sizeof(struct atomisp_css_ob_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.ob_config =
-                       (struct atomisp_ob_config *)&css_param->ob_config;
+                   (struct atomisp_ob_config *)&css_param->ob_config;
        }
 
        if (arg->dp_config && (from_user || !cur_config->dp_config)) {
                if (copy_from_compatible(&css_param->dp_config, arg->dp_config,
-                               sizeof(struct atomisp_css_dp_config),
-                               from_user))
+                                        sizeof(struct atomisp_css_dp_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.dp_config =
-                       (struct atomisp_dp_config *)&css_param->dp_config;
+                   (struct atomisp_dp_config *)&css_param->dp_config;
        }
 
        if (asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO) {
                if (arg->dz_config && (from_user || !cur_config->dz_config)) {
                        if (copy_from_compatible(&css_param->dz_config,
-                               arg->dz_config,
-                               sizeof(struct atomisp_css_dz_config),
-                               from_user))
+                                                arg->dz_config,
+                                                sizeof(struct atomisp_css_dz_config),
+                                                from_user))
                                return -EFAULT;
                        if (!atomisp_check_zoom_region(asd,
-                                               &css_param->dz_config)) {
+                                                      &css_param->dz_config)) {
                                dev_err(asd->isp->dev, "crop region error!");
                                return -EINVAL;
                        }
                        css_param->update_flag.dz_config =
-                               (struct atomisp_dz_config *)
-                               &css_param->dz_config;
+                           (struct atomisp_dz_config *)
+                           &css_param->dz_config;
                }
        }
 
        if (arg->nr_config && (from_user || !cur_config->nr_config)) {
                if (copy_from_compatible(&css_param->nr_config, arg->nr_config,
-                               sizeof(struct atomisp_css_nr_config),
-                               from_user))
+                                        sizeof(struct atomisp_css_nr_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.nr_config =
-                       (struct atomisp_nr_config *)&css_param->nr_config;
+                   (struct atomisp_nr_config *)&css_param->nr_config;
        }
 
        if (arg->ee_config && (from_user || !cur_config->ee_config)) {
                if (copy_from_compatible(&css_param->ee_config, arg->ee_config,
-                               sizeof(struct atomisp_css_ee_config),
-                               from_user))
+                                        sizeof(struct atomisp_css_ee_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.ee_config =
-                       (struct atomisp_ee_config *)&css_param->ee_config;
+                   (struct atomisp_ee_config *)&css_param->ee_config;
        }
 
        if (arg->tnr_config && (from_user || !cur_config->tnr_config)) {
                if (copy_from_compatible(&css_param->tnr_config,
-                               arg->tnr_config,
-                               sizeof(struct atomisp_css_tnr_config),
-                               from_user))
+                                        arg->tnr_config,
+                                        sizeof(struct atomisp_css_tnr_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.tnr_config =
-                       (struct atomisp_tnr_config *)
-                       &css_param->tnr_config;
+                   (struct atomisp_tnr_config *)
+                   &css_param->tnr_config;
        }
 
        if (arg->a3a_config && (from_user || !cur_config->a3a_config)) {
                if (copy_from_compatible(&css_param->s3a_config,
-                               arg->a3a_config,
-                               sizeof(struct atomisp_css_3a_config),
-                               from_user))
+                                        arg->a3a_config,
+                                        sizeof(struct atomisp_css_3a_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.a3a_config =
-                       (struct atomisp_3a_config *)&css_param->s3a_config;
+                   (struct atomisp_3a_config *)&css_param->s3a_config;
        }
 
        if (arg->ctc_config && (from_user || !cur_config->ctc_config)) {
                if (copy_from_compatible(&css_param->ctc_config,
-                               arg->ctc_config,
-                               sizeof(struct atomisp_css_ctc_config),
-                               from_user))
+                                        arg->ctc_config,
+                                        sizeof(struct atomisp_css_ctc_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.ctc_config =
-                       (struct atomisp_ctc_config *)
-                       &css_param->ctc_config;
+                   (struct atomisp_ctc_config *)
+                   &css_param->ctc_config;
        }
 
        if (arg->cnr_config && (from_user || !cur_config->cnr_config)) {
                if (copy_from_compatible(&css_param->cnr_config,
-                               arg->cnr_config,
-                               sizeof(struct atomisp_css_cnr_config),
-                               from_user))
+                                        arg->cnr_config,
+                                        sizeof(struct atomisp_css_cnr_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.cnr_config =
-                       (struct atomisp_cnr_config *)
-                       &css_param->cnr_config;
+                   (struct atomisp_cnr_config *)
+                   &css_param->cnr_config;
        }
 
        if (arg->ecd_config && (from_user || !cur_config->ecd_config)) {
                if (copy_from_compatible(&css_param->ecd_config,
-                               arg->ecd_config,
-                               sizeof(struct atomisp_css_ecd_config),
-                               from_user))
+                                        arg->ecd_config,
+                                        sizeof(struct atomisp_css_ecd_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.ecd_config =
-                       (struct atomisp_ecd_config *)
-                       &css_param->ecd_config;
+                   (struct atomisp_ecd_config *)
+                   &css_param->ecd_config;
        }
 
        if (arg->ynr_config && (from_user || !cur_config->ynr_config)) {
                if (copy_from_compatible(&css_param->ynr_config,
-                               arg->ynr_config,
-                               sizeof(struct atomisp_css_ynr_config),
-                               from_user))
+                                        arg->ynr_config,
+                                        sizeof(struct atomisp_css_ynr_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.ynr_config =
-                       (struct atomisp_ynr_config *)
-                       &css_param->ynr_config;
+                   (struct atomisp_ynr_config *)
+                   &css_param->ynr_config;
        }
 
        if (arg->fc_config && (from_user || !cur_config->fc_config)) {
                if (copy_from_compatible(&css_param->fc_config,
-                               arg->fc_config,
-                               sizeof(struct atomisp_css_fc_config),
-                               from_user))
+                                        arg->fc_config,
+                                        sizeof(struct atomisp_css_fc_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.fc_config =
-                       (struct atomisp_fc_config *)&css_param->fc_config;
+                   (struct atomisp_fc_config *)&css_param->fc_config;
        }
 
        if (arg->macc_config && (from_user || !cur_config->macc_config)) {
                if (copy_from_compatible(&css_param->macc_config,
-                               arg->macc_config,
-                               sizeof(struct atomisp_css_macc_config),
-                               from_user))
+                                        arg->macc_config,
+                                        sizeof(struct atomisp_css_macc_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.macc_config =
-                       (struct atomisp_macc_config *)
-                       &css_param->macc_config;
+                   (struct atomisp_macc_config *)
+                   &css_param->macc_config;
        }
 
        if (arg->aa_config && (from_user || !cur_config->aa_config)) {
                if (copy_from_compatible(&css_param->aa_config, arg->aa_config,
-                               sizeof(struct atomisp_css_aa_config),
-                               from_user))
+                                        sizeof(struct atomisp_css_aa_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.aa_config =
-                       (struct atomisp_aa_config *)&css_param->aa_config;
+                   (struct atomisp_aa_config *)&css_param->aa_config;
        }
 
        if (arg->anr_config && (from_user || !cur_config->anr_config)) {
                if (copy_from_compatible(&css_param->anr_config,
-                               arg->anr_config,
-                               sizeof(struct atomisp_css_anr_config),
-                               from_user))
+                                        arg->anr_config,
+                                        sizeof(struct atomisp_css_anr_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.anr_config =
-                       (struct atomisp_anr_config *)
-                       &css_param->anr_config;
+                   (struct atomisp_anr_config *)
+                   &css_param->anr_config;
        }
 
        if (arg->xnr_config && (from_user || !cur_config->xnr_config)) {
                if (copy_from_compatible(&css_param->xnr_config,
-                               arg->xnr_config,
-                               sizeof(struct atomisp_css_xnr_config),
-                               from_user))
+                                        arg->xnr_config,
+                                        sizeof(struct atomisp_css_xnr_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.xnr_config =
-                       (struct atomisp_xnr_config *)
-                       &css_param->xnr_config;
+                   (struct atomisp_xnr_config *)
+                   &css_param->xnr_config;
        }
 
        if (arg->yuv2rgb_cc_config &&
-          (from_user || !cur_config->yuv2rgb_cc_config)) {
+           (from_user || !cur_config->yuv2rgb_cc_config)) {
                if (copy_from_compatible(&css_param->yuv2rgb_cc_config,
-                               arg->yuv2rgb_cc_config,
-                               sizeof(struct atomisp_css_cc_config),
-                               from_user))
+                                        arg->yuv2rgb_cc_config,
+                                        sizeof(struct atomisp_css_cc_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.yuv2rgb_cc_config =
-                       (struct atomisp_cc_config *)
-                       &css_param->yuv2rgb_cc_config;
+                   (struct atomisp_cc_config *)
+                   &css_param->yuv2rgb_cc_config;
        }
 
        if (arg->rgb2yuv_cc_config &&
-          (from_user || !cur_config->rgb2yuv_cc_config)) {
+           (from_user || !cur_config->rgb2yuv_cc_config)) {
                if (copy_from_compatible(&css_param->rgb2yuv_cc_config,
-                               arg->rgb2yuv_cc_config,
-                               sizeof(struct atomisp_css_cc_config),
-                               from_user))
+                                        arg->rgb2yuv_cc_config,
+                                        sizeof(struct atomisp_css_cc_config),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.rgb2yuv_cc_config =
-                       (struct atomisp_cc_config *)
-                       &css_param->rgb2yuv_cc_config;
+                   (struct atomisp_cc_config *)
+                   &css_param->rgb2yuv_cc_config;
        }
 
        if (arg->macc_table && (from_user || !cur_config->macc_table)) {
                if (copy_from_compatible(&css_param->macc_table,
-                               arg->macc_table,
-                               sizeof(struct atomisp_css_macc_table),
-                               from_user))
+                                        arg->macc_table,
+                                        sizeof(struct atomisp_css_macc_table),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.macc_table =
-                       (struct atomisp_macc_table *)
-                       &css_param->macc_table;
+                   (struct atomisp_macc_table *)
+                   &css_param->macc_table;
        }
 
        if (arg->xnr_table && (from_user || !cur_config->xnr_table)) {
                if (copy_from_compatible(&css_param->xnr_table,
-                               arg->xnr_table,
-                               sizeof(struct atomisp_css_xnr_table),
-                               from_user))
+                                        arg->xnr_table,
+                                        sizeof(struct atomisp_css_xnr_table),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.xnr_table =
-                       (struct atomisp_xnr_table *)&css_param->xnr_table;
+                   (struct atomisp_xnr_table *)&css_param->xnr_table;
        }
 
        if (arg->r_gamma_table && (from_user || !cur_config->r_gamma_table)) {
                if (copy_from_compatible(&css_param->r_gamma_table,
-                               arg->r_gamma_table,
-                               sizeof(struct atomisp_css_rgb_gamma_table),
-                               from_user))
+                                        arg->r_gamma_table,
+                                        sizeof(struct atomisp_css_rgb_gamma_table),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.r_gamma_table =
-                       (struct atomisp_rgb_gamma_table *)
-                       &css_param->r_gamma_table;
+                   (struct atomisp_rgb_gamma_table *)
+                   &css_param->r_gamma_table;
        }
 
        if (arg->g_gamma_table && (from_user || !cur_config->g_gamma_table)) {
                if (copy_from_compatible(&css_param->g_gamma_table,
-                               arg->g_gamma_table,
-                               sizeof(struct atomisp_css_rgb_gamma_table),
-                               from_user))
+                                        arg->g_gamma_table,
+                                        sizeof(struct atomisp_css_rgb_gamma_table),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.g_gamma_table =
-                       (struct atomisp_rgb_gamma_table *)
-                       &css_param->g_gamma_table;
+                   (struct atomisp_rgb_gamma_table *)
+                   &css_param->g_gamma_table;
        }
 
        if (arg->b_gamma_table && (from_user || !cur_config->b_gamma_table)) {
                if (copy_from_compatible(&css_param->b_gamma_table,
-                               arg->b_gamma_table,
-                               sizeof(struct atomisp_css_rgb_gamma_table),
-                               from_user))
+                                        arg->b_gamma_table,
+                                        sizeof(struct atomisp_css_rgb_gamma_table),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.b_gamma_table =
-                       (struct atomisp_rgb_gamma_table *)
-                       &css_param->b_gamma_table;
+                   (struct atomisp_rgb_gamma_table *)
+                   &css_param->b_gamma_table;
        }
 
        if (arg->anr_thres && (from_user || !cur_config->anr_thres)) {
                if (copy_from_compatible(&css_param->anr_thres, arg->anr_thres,
-                               sizeof(struct atomisp_css_anr_thres),
-                               from_user))
+                                        sizeof(struct atomisp_css_anr_thres),
+                                        from_user))
                        return -EFAULT;
                css_param->update_flag.anr_thres =
-                       (struct atomisp_anr_thres *)&css_param->anr_thres;
+                   (struct atomisp_anr_thres *)&css_param->anr_thres;
        }
 
        if (from_user)
@@ -3654,101 +3662,101 @@ int atomisp_cp_lsc_table(struct atomisp_sub_device *asd,
 #endif
                        return -EINVAL;
 #ifdef ISP2401
-               }
-#endif
        }
+#endif
+}
 
-       /* Shading table size per color */
+/* Shading table size per color */
 #ifndef ISP2401
-       if (source_st->width > SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
-               source_st->height > SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR)
+if (source_st->width > SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
+    source_st->height > SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR)
 #else
-       if (st.width > SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
-           st.height > SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR) {
-               dev_err(asd->isp->dev, "shading table w/h validate failed!");
+if (st.width > SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
+    st.height > SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR) {
+       dev_err(asd->isp->dev, "shading table w/h validate failed!");
 #endif
-               return -EINVAL;
+       return -EINVAL;
 #ifdef ISP2401
-       }
+}
 #endif
 
 #ifndef ISP2401
-       shading_table = atomisp_css_shading_table_alloc(source_st->width,
-                                                       source_st->height);
-       if (!shading_table)
-                       return -ENOMEM;
+shading_table = atomisp_css_shading_table_alloc(source_st->width,
+               source_st->height);
+if (!shading_table)
+       return -ENOMEM;
 #else
-       shading_table = atomisp_css_shading_table_alloc(st.width,
-                                                       st.height);
-       if (!shading_table) {
-               dev_err(asd->isp->dev, "shading table alloc failed!");
-               return -ENOMEM;
-       }
+shading_table = atomisp_css_shading_table_alloc(st.width,
+               st.height);
+if (!shading_table) {
+       dev_err(asd->isp->dev, "shading table alloc failed!");
+       return -ENOMEM;
+}
 #endif
 
 #ifndef ISP2401
-       len_table = source_st->width * source_st->height * ATOMISP_SC_TYPE_SIZE;
+len_table = source_st->width * source_st->height * ATOMISP_SC_TYPE_SIZE;
 #else
-       len_table = st.width * st.height * ATOMISP_SC_TYPE_SIZE;
+len_table = st.width * st.height * ATOMISP_SC_TYPE_SIZE;
 #endif
-       for (i = 0; i < ATOMISP_NUM_SC_COLORS; i++) {
-               if (copy_from_compatible(shading_table->data[i],
+for (i = 0; i < ATOMISP_NUM_SC_COLORS; i++) {
+       if (copy_from_compatible(shading_table->data[i],
 #ifndef ISP2401
-                       source_st->data[i], len_table, from_user)) {
+                                source_st->data[i], len_table, from_user)) {
 #else
-                       st.data[i], len_table, from_user)) {
+                                st.data[i], len_table, from_user)) {
 #endif
-                       atomisp_css_shading_table_free(shading_table);
-                       return -EFAULT;
-               }
+               atomisp_css_shading_table_free(shading_table);
+               return -EFAULT;
        }
+}
 #ifndef ISP2401
-       shading_table->sensor_width = source_st->sensor_width;
-       shading_table->sensor_height = source_st->sensor_height;
-       shading_table->fraction_bits = source_st->fraction_bits;
-       shading_table->enable = source_st->enable;
+shading_table->sensor_width = source_st->sensor_width;
+shading_table->sensor_height = source_st->sensor_height;
+shading_table->fraction_bits = source_st->fraction_bits;
+shading_table->enable = source_st->enable;
 #else
-       shading_table->sensor_width = st.sensor_width;
-       shading_table->sensor_height = st.sensor_height;
-       shading_table->fraction_bits = st.fraction_bits;
-       shading_table->enable = st.enable;
+shading_table->sensor_width = st.sensor_width;
+shading_table->sensor_height = st.sensor_height;
+shading_table->fraction_bits = st.fraction_bits;
+shading_table->enable = st.enable;
 #endif
 
-       /* No need to update shading table if it is the same */
-       if (old_table &&
-               old_table->sensor_width == shading_table->sensor_width &&
-               old_table->sensor_height == shading_table->sensor_height &&
-               old_table->width == shading_table->width &&
-               old_table->height == shading_table->height &&
-               old_table->fraction_bits == shading_table->fraction_bits &&
-               old_table->enable == shading_table->enable) {
-               bool data_is_same = true;
-
-               for (i = 0; i < ATOMISP_NUM_SC_COLORS; i++) {
-                       if (memcmp(shading_table->data[i], old_table->data[i],
-                                  len_table) != 0) {
-                               data_is_same = false;
-                               break;
-                       }
-               }
+/* No need to update shading table if it is the same */
+if (old_table &&
+    old_table->sensor_width == shading_table->sensor_width &&
+    old_table->sensor_height == shading_table->sensor_height &&
+    old_table->width == shading_table->width &&
+    old_table->height == shading_table->height &&
+    old_table->fraction_bits == shading_table->fraction_bits &&
+    old_table->enable == shading_table->enable) {
+       bool data_is_same = true;
 
-               if (data_is_same) {
-                       atomisp_css_shading_table_free(shading_table);
-                       return 0;
+       for (i = 0; i < ATOMISP_NUM_SC_COLORS; i++) {
+               if (memcmp(shading_table->data[i], old_table->data[i],
+                          len_table) != 0) {
+                       data_is_same = false;
+                       break;
                }
        }
 
+       if (data_is_same) {
+               atomisp_css_shading_table_free(shading_table);
+               return 0;
+       }
+}
+
 set_lsc:
-       /* set LSC to CSS */
-       css_param->shading_table = shading_table;
-       css_param->update_flag.shading_table =
-               (struct atomisp_shading_table *)shading_table;
-       asd->params.sc_en = shading_table;
+/* set LSC to CSS */
+css_param->shading_table = shading_table;
+css_param->update_flag.shading_table =
+    (struct atomisp_shading_table *)shading_table;
+asd->params.sc_en = shading_table;
 
-       if (old_table)
-               atomisp_css_shading_table_free(old_table);
+if (old_table)
+       atomisp_css_shading_table_free(old_table);
 
-       return 0;
+return 0;
 }
 
 int atomisp_css_cp_dvs2_coefs(struct atomisp_sub_device *asd,
@@ -3757,7 +3765,7 @@ int atomisp_css_cp_dvs2_coefs(struct atomisp_sub_device *asd,
                              bool from_user)
 {
        struct atomisp_css_dvs_grid_info *cur =
-               atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+           atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
        int dvs_hor_coef_bytes, dvs_ver_coef_bytes;
 #ifdef ISP2401
        struct ia_css_dvs2_coefficients dvs2_coefs;
@@ -3822,51 +3830,51 @@ int atomisp_css_cp_dvs2_coefs(struct atomisp_sub_device *asd,
        dvs_ver_coef_bytes = asd->params.dvs_ver_coef_bytes;
        if (copy_from_compatible(css_param->dvs2_coeff->hor_coefs.odd_real,
 #ifndef ISP2401
-           coefs->hor_coefs.odd_real, dvs_hor_coef_bytes, from_user) ||
+                                coefs->hor_coefs.odd_real, dvs_hor_coef_bytes, from_user) ||
 #else
-           dvs2_coefs.hor_coefs.odd_real, dvs_hor_coef_bytes, from_user) ||
+                                dvs2_coefs.hor_coefs.odd_real, dvs_hor_coef_bytes, from_user) ||
 #endif
            copy_from_compatible(css_param->dvs2_coeff->hor_coefs.odd_imag,
 #ifndef ISP2401
-           coefs->hor_coefs.odd_imag, dvs_hor_coef_bytes, from_user) ||
+                                coefs->hor_coefs.odd_imag, dvs_hor_coef_bytes, from_user) ||
 #else
-           dvs2_coefs.hor_coefs.odd_imag, dvs_hor_coef_bytes, from_user) ||
+                                dvs2_coefs.hor_coefs.odd_imag, dvs_hor_coef_bytes, from_user) ||
 #endif
            copy_from_compatible(css_param->dvs2_coeff->hor_coefs.even_real,
 #ifndef ISP2401
-           coefs->hor_coefs.even_real, dvs_hor_coef_bytes, from_user) ||
+                                coefs->hor_coefs.even_real, dvs_hor_coef_bytes, from_user) ||
 #else
-           dvs2_coefs.hor_coefs.even_real, dvs_hor_coef_bytes, from_user) ||
+                                dvs2_coefs.hor_coefs.even_real, dvs_hor_coef_bytes, from_user) ||
 #endif
            copy_from_compatible(css_param->dvs2_coeff->hor_coefs.even_imag,
 #ifndef ISP2401
-           coefs->hor_coefs.even_imag, dvs_hor_coef_bytes, from_user) ||
+                                coefs->hor_coefs.even_imag, dvs_hor_coef_bytes, from_user) ||
 #else
-           dvs2_coefs.hor_coefs.even_imag, dvs_hor_coef_bytes, from_user) ||
+                                dvs2_coefs.hor_coefs.even_imag, dvs_hor_coef_bytes, from_user) ||
 #endif
            copy_from_compatible(css_param->dvs2_coeff->ver_coefs.odd_real,
 #ifndef ISP2401
-           coefs->ver_coefs.odd_real, dvs_ver_coef_bytes, from_user) ||
+                                coefs->ver_coefs.odd_real, dvs_ver_coef_bytes, from_user) ||
 #else
-           dvs2_coefs.ver_coefs.odd_real, dvs_ver_coef_bytes, from_user) ||
+                                dvs2_coefs.ver_coefs.odd_real, dvs_ver_coef_bytes, from_user) ||
 #endif
            copy_from_compatible(css_param->dvs2_coeff->ver_coefs.odd_imag,
 #ifndef ISP2401
-           coefs->ver_coefs.odd_imag, dvs_ver_coef_bytes, from_user) ||
+                                coefs->ver_coefs.odd_imag, dvs_ver_coef_bytes, from_user) ||
 #else
-           dvs2_coefs.ver_coefs.odd_imag, dvs_ver_coef_bytes, from_user) ||
+                                dvs2_coefs.ver_coefs.odd_imag, dvs_ver_coef_bytes, from_user) ||
 #endif
            copy_from_compatible(css_param->dvs2_coeff->ver_coefs.even_real,
 #ifndef ISP2401
-           coefs->ver_coefs.even_real, dvs_ver_coef_bytes, from_user) ||
+                                coefs->ver_coefs.even_real, dvs_ver_coef_bytes, from_user) ||
 #else
-           dvs2_coefs.ver_coefs.even_real, dvs_ver_coef_bytes, from_user) ||
+                                dvs2_coefs.ver_coefs.even_real, dvs_ver_coef_bytes, from_user) ||
 #endif
            copy_from_compatible(css_param->dvs2_coeff->ver_coefs.even_imag,
 #ifndef ISP2401
-           coefs->ver_coefs.even_imag, dvs_ver_coef_bytes, from_user)) {
+                                coefs->ver_coefs.even_imag, dvs_ver_coef_bytes, from_user)) {
 #else
-           dvs2_coefs.ver_coefs.even_imag, dvs_ver_coef_bytes, from_user)) {
+                                dvs2_coefs.ver_coefs.even_imag, dvs_ver_coef_bytes, from_user)) {
 #endif
                ia_css_dvs2_coefficients_free(css_param->dvs2_coeff);
                css_param->dvs2_coeff = NULL;
@@ -3879,9 +3887,9 @@ int atomisp_css_cp_dvs2_coefs(struct atomisp_sub_device *asd,
 }
 
 int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
-                       struct atomisp_dvs_6axis_config *source_6axis_config,
-                       struct atomisp_css_params *css_param,
-                       bool from_user)
+                               struct atomisp_dvs_6axis_config *source_6axis_config,
+                               struct atomisp_css_params *css_param,
+                               bool from_user)
 {
        struct atomisp_css_dvs_6axis_config *dvs_6axis_config;
        struct atomisp_css_dvs_6axis_config *old_6axis_config;
@@ -3889,9 +3897,9 @@ int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
        struct atomisp_css_dvs_6axis_config t_6axis_config;
 #endif
        struct ia_css_stream *stream =
-                       asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;
+                   asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;
        struct atomisp_css_dvs_grid_info *dvs_grid_info =
-               atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+           atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
        int ret = -EFAULT;
 
        if (!stream) {
@@ -3914,8 +3922,8 @@ int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
 #ifdef ISP2401
 
        if (copy_from_compatible(&t_6axis_config, source_6axis_config,
-                          sizeof(struct atomisp_dvs_6axis_config),
-                          from_user)) {
+                                sizeof(struct atomisp_dvs_6axis_config),
+                                from_user)) {
                dev_err(asd->isp->dev, "copy morph table failed!");
                return -EFAULT;
        }
@@ -3953,64 +3961,64 @@ int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
 
        if (copy_from_compatible(dvs_6axis_config->xcoords_y,
 #ifndef ISP2401
-                          source_6axis_config->xcoords_y,
-                          source_6axis_config->width_y *
-                          source_6axis_config->height_y *
-                          sizeof(*source_6axis_config->xcoords_y),
+                                source_6axis_config->xcoords_y,
+                                source_6axis_config->width_y *
+                                source_6axis_config->height_y *
+                                sizeof(*source_6axis_config->xcoords_y),
 #else
-                          t_6axis_config.xcoords_y,
-                          t_6axis_config.width_y *
-                          t_6axis_config.height_y *
-                          sizeof(*dvs_6axis_config->xcoords_y),
+                                t_6axis_config.xcoords_y,
+                                t_6axis_config.width_y *
+                                t_6axis_config.height_y *
+                                sizeof(*dvs_6axis_config->xcoords_y),
 #endif
-                          from_user))
+                                from_user))
                goto error;
        if (copy_from_compatible(dvs_6axis_config->ycoords_y,
 #ifndef ISP2401
-                          source_6axis_config->ycoords_y,
-                          source_6axis_config->width_y *
-                          source_6axis_config->height_y *
-                          sizeof(*source_6axis_config->ycoords_y),
+                                source_6axis_config->ycoords_y,
+                                source_6axis_config->width_y *
+                                source_6axis_config->height_y *
+                                sizeof(*source_6axis_config->ycoords_y),
 #else
-                          t_6axis_config.ycoords_y,
-                          t_6axis_config.width_y *
-                          t_6axis_config.height_y *
-                          sizeof(*dvs_6axis_config->ycoords_y),
+                                t_6axis_config.ycoords_y,
+                                t_6axis_config.width_y *
+                                t_6axis_config.height_y *
+                                sizeof(*dvs_6axis_config->ycoords_y),
 #endif
-                          from_user))
+                                from_user))
                goto error;
        if (copy_from_compatible(dvs_6axis_config->xcoords_uv,
 #ifndef ISP2401
-                          source_6axis_config->xcoords_uv,
-                          source_6axis_config->width_uv *
-                          source_6axis_config->height_uv *
-                          sizeof(*source_6axis_config->xcoords_uv),
+                                source_6axis_config->xcoords_uv,
+                                source_6axis_config->width_uv *
+                                source_6axis_config->height_uv *
+                                sizeof(*source_6axis_config->xcoords_uv),
 #else
-                          t_6axis_config.xcoords_uv,
-                          t_6axis_config.width_uv *
-                          t_6axis_config.height_uv *
-                          sizeof(*dvs_6axis_config->xcoords_uv),
+                                t_6axis_config.xcoords_uv,
+                                t_6axis_config.width_uv *
+                                t_6axis_config.height_uv *
+                                sizeof(*dvs_6axis_config->xcoords_uv),
 #endif
-                          from_user))
+                                from_user))
                goto error;
        if (copy_from_compatible(dvs_6axis_config->ycoords_uv,
 #ifndef ISP2401
-                          source_6axis_config->ycoords_uv,
-                          source_6axis_config->width_uv *
-                          source_6axis_config->height_uv *
-                          sizeof(*source_6axis_config->ycoords_uv),
+                                source_6axis_config->ycoords_uv,
+                                source_6axis_config->width_uv *
+                                source_6axis_config->height_uv *
+                                sizeof(*source_6axis_config->ycoords_uv),
 #else
-                          t_6axis_config.ycoords_uv,
-                          t_6axis_config.width_uv *
-                          t_6axis_config.height_uv *
-                          sizeof(*dvs_6axis_config->ycoords_uv),
+                                t_6axis_config.ycoords_uv,
+                                t_6axis_config.width_uv *
+                                t_6axis_config.height_uv *
+                                sizeof(*dvs_6axis_config->ycoords_uv),
 #endif
-                          from_user))
+                                from_user))
                goto error;
 
        css_param->dvs_6axis = dvs_6axis_config;
        css_param->update_flag.dvs_6axis_config =
-               (struct atomisp_dvs_6axis_config *)dvs_6axis_config;
+           (struct atomisp_dvs_6axis_config *)dvs_6axis_config;
        return 0;
 
 error:
@@ -4020,9 +4028,9 @@ error:
 }
 
 int atomisp_cp_morph_table(struct atomisp_sub_device *asd,
-                               struct atomisp_morph_table *source_morph_table,
-                               struct atomisp_css_params *css_param,
-                               bool from_user)
+                          struct atomisp_morph_table *source_morph_table,
+                          struct atomisp_css_params *css_param,
+                          bool from_user)
 {
        int ret = -EFAULT;
        unsigned int i;
@@ -4051,38 +4059,38 @@ int atomisp_cp_morph_table(struct atomisp_sub_device *asd,
 #endif
        morph_table = atomisp_css_morph_table_allocate(
 #ifndef ISP2401
-               source_morph_table->width,
-               source_morph_table->height);
+                         source_morph_table->width,
+                         source_morph_table->height);
 #else
-               mtbl.width,
-               mtbl.height);
+                         mtbl.width,
+                         mtbl.height);
 #endif
        if (!morph_table)
                return -ENOMEM;
 
        for (i = 0; i < CSS_MORPH_TABLE_NUM_PLANES; i++) {
                if (copy_from_compatible(morph_table->coordinates_x[i],
-                       (__force void *)source_morph_table->coordinates_x[i],
+                                        (__force void *)source_morph_table->coordinates_x[i],
 #ifndef ISP2401
-                       source_morph_table->height * source_morph_table->width *
-                       sizeof(*source_morph_table->coordinates_x[i]),
+                                        source_morph_table->height * source_morph_table->width *
+                                        sizeof(*source_morph_table->coordinates_x[i]),
 #else
-                       mtbl.height * mtbl.width *
-                       sizeof(*morph_table->coordinates_x[i]),
+                                        mtbl.height * mtbl.width *
+                                        sizeof(*morph_table->coordinates_x[i]),
 #endif
-                       from_user))
+                                        from_user))
                        goto error;
 
                if (copy_from_compatible(morph_table->coordinates_y[i],
-                       (__force void *)source_morph_table->coordinates_y[i],
+                                        (__force void *)source_morph_table->coordinates_y[i],
 #ifndef ISP2401
-                       source_morph_table->height * source_morph_table->width *
-                       sizeof(*source_morph_table->coordinates_y[i]),
+                                        source_morph_table->height * source_morph_table->width *
+                                        sizeof(*source_morph_table->coordinates_y[i]),
 #else
-                       mtbl.height * mtbl.width *
-                       sizeof(*morph_table->coordinates_y[i]),
+                                        mtbl.height * mtbl.width *
+                                        sizeof(*morph_table->coordinates_y[i]),
 #endif
-                       from_user))
+                                        from_user))
                        goto error;
        }
 
@@ -4090,7 +4098,7 @@ int atomisp_cp_morph_table(struct atomisp_sub_device *asd,
        if (old_morph_table)
                atomisp_css_morph_table_free(old_morph_table);
        css_param->update_flag.morph_table =
-               (struct atomisp_morph_table *)morph_table;
+           (struct atomisp_morph_table *)morph_table;
        return 0;
 
 error:
@@ -4115,8 +4123,8 @@ int atomisp_makeup_css_parameters(struct atomisp_sub_device *asd,
        if (ret)
                return ret;
        ret = atomisp_css_cp_dvs2_coefs(asd,
-               (struct ia_css_dvs2_coefficients *)arg->dvs2_coefs,
-               css_param, false);
+                                       (struct ia_css_dvs2_coefficients *)arg->dvs2_coefs,
+                                       css_param, false);
        if (ret)
                return ret;
        ret = atomisp_cp_dvs_6axis_config(asd, arg->dvs_6axis_config,
@@ -4175,10 +4183,10 @@ void atomisp_handle_parameter_and_buffer(struct atomisp_video_pipe *pipe)
                return;
 
        list_for_each_entry_safe(vb, vb_tmp,
-                       &pipe->buffers_waiting_for_param, queue) {
+                                &pipe->buffers_waiting_for_param, queue) {
                if (pipe->frame_request_config_id[vb->i]) {
                        list_for_each_entry_safe(param, param_tmp,
-                               &pipe->per_frame_params, list) {
+                                                &pipe->per_frame_params, list) {
                                if (pipe->frame_request_config_id[vb->i] !=
                                    param->params.isp_config_id)
                                        continue;
@@ -4227,7 +4235,7 @@ void atomisp_handle_parameter_and_buffer(struct atomisp_video_pipe *pipe)
                                atomisp_wdt_start(pipe);
                        else
                                atomisp_wdt_refresh_pipe(pipe,
-                                       ATOMISP_WDT_KEEP_CURRENT_DELAY);
+                                                        ATOMISP_WDT_KEEP_CURRENT_DELAY);
                }
 #endif
        }
@@ -4237,7 +4245,7 @@ void atomisp_handle_parameter_and_buffer(struct atomisp_video_pipe *pipe)
 * Function to configure ISP parameters
 */
 int atomisp_set_parameters(struct video_device *vdev,
-                       struct atomisp_parameters *arg)
+                          struct atomisp_parameters *arg)
 {
        struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
        struct atomisp_sub_device *asd = pipe->asd;
@@ -4250,7 +4258,8 @@ int atomisp_set_parameters(struct video_device *vdev,
                return -EINVAL;
        }
 
-       dev_dbg(asd->isp->dev, "%s: set parameter(per_frame_setting %d) for asd%d with isp_config_id %d of %s\n",
+       dev_dbg(asd->isp->dev,
+               "%s: set parameter(per_frame_setting %d) for asd%d with isp_config_id %d of %s\n",
                __func__, arg->per_frame_setting, asd->index,
                arg->isp_config_id, vdev->name);
 #ifdef ISP2401
@@ -4291,8 +4300,8 @@ int atomisp_set_parameters(struct video_device *vdev,
                goto apply_parameter_failed;
 
        ret = atomisp_css_cp_dvs2_coefs(asd,
-               (struct ia_css_dvs2_coefficients *)arg->dvs2_coefs,
-               css_param, true);
+                                       (struct ia_css_dvs2_coefficients *)arg->dvs2_coefs,
+                                       css_param, true);
        if (ret)
                goto apply_parameter_failed;
 
@@ -4328,14 +4337,14 @@ int atomisp_param(struct atomisp_sub_device *asd, int flag,
 {
        struct atomisp_device *isp = asd->isp;
        struct ia_css_pipe_config *vp_cfg =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
-               pipe_configs[IA_CSS_PIPE_ID_VIDEO];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
+                   pipe_configs[IA_CSS_PIPE_ID_VIDEO];
 
        /* Read parameter for 3A binary info */
        if (flag == 0) {
                struct atomisp_css_dvs_grid_info *dvs_grid_info =
-                       atomisp_css_get_dvs_grid_info(
-                               &asd->params.curr_grid_info);
+                   atomisp_css_get_dvs_grid_info(
+                       &asd->params.curr_grid_info);
 
                if (!&config->info) {
                        dev_err(isp->dev, "ERROR: NULL pointer in grid_info\n");
@@ -4356,8 +4365,8 @@ int atomisp_param(struct atomisp_sub_device *asd, int flag,
                /* update dvs grid info */
                if (dvs_grid_info)
                        memcpy(&config->dvs_grid,
-                               dvs_grid_info,
-                               sizeof(struct atomisp_css_dvs_grid_info));
+                              dvs_grid_info,
+                              sizeof(struct atomisp_css_dvs_grid_info));
 
                if (asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO) {
                        config->dvs_envelop.width = 0;
@@ -4369,7 +4378,7 @@ int atomisp_param(struct atomisp_sub_device *asd, int flag,
                if (!asd->continuous_mode->val) {
                        config->dvs_envelop.width = vp_cfg->dvs_envelope.width;
                        config->dvs_envelop.height =
-                                       vp_cfg->dvs_envelope.height;
+                           vp_cfg->dvs_envelope.height;
                } else {
                        unsigned int dvs_w, dvs_h, dvs_w_max, dvs_h_max;
 
@@ -4561,7 +4570,7 @@ int atomisp_bad_pixel_param(struct atomisp_sub_device *asd, int flag,
        } else {
                /* Set bad pixel to isp parameters */
                memcpy(&asd->params.css_param.dp_config, config,
-                       sizeof(asd->params.css_param.dp_config));
+                      sizeof(asd->params.css_param.dp_config));
                atomisp_css_set_dp_config(asd, &asd->params.css_param.dp_config);
                asd->params.css_update_params_needed = true;
        }
@@ -4640,7 +4649,7 @@ atomisp_bytesperline_to_padded_width(unsigned int bytesperline,
 
 static int
 atomisp_v4l2_framebuffer_to_css_frame(const struct v4l2_framebuffer *arg,
-                                        struct atomisp_css_frame **result)
+                                     struct atomisp_css_frame **result)
 {
        struct atomisp_css_frame *res = NULL;
        unsigned int padded_width;
@@ -4650,13 +4659,13 @@ atomisp_v4l2_framebuffer_to_css_frame(const struct v4l2_framebuffer *arg,
 
        sh_format = v4l2_fmt_to_sh_fmt(arg->fmt.pixelformat);
        padded_width = atomisp_bytesperline_to_padded_width(
-                                       arg->fmt.bytesperline, sh_format);
+                          arg->fmt.bytesperline, sh_format);
 
        /* Note: the padded width on an atomisp_css_frame is in elements, not in
           bytes. The RAW frame we use here should always be a 16bit RAW
           frame. This is why we bytesperline/2 is equal to the padded with */
        if (atomisp_css_frame_allocate(&res, arg->fmt.width, arg->fmt.height,
-                                 sh_format, padded_width, 0)) {
+                                      sh_format, padded_width, 0)) {
                ret = -ENOMEM;
                goto err;
        }
@@ -4758,7 +4767,7 @@ int atomisp_false_color_param(struct atomisp_sub_device *asd, int flag,
  * Function to configure white balance params
  */
 int atomisp_white_balance_param(struct atomisp_sub_device *asd, int flag,
-       struct atomisp_wb_config *config)
+                               struct atomisp_wb_config *config)
 {
        if (flag == 0) {
                /* Get white balance from current setup */
@@ -4837,7 +4846,7 @@ int atomisp_get_sensor_mode_data(struct atomisp_sub_device *asd,
        struct atomisp_device *isp = asd->isp;
 
        mipi_info = atomisp_to_sensor_mipi_info(
-               isp->inputs[asd->input_curr].camera);
+                       isp->inputs[asd->input_curr].camera);
        if (!mipi_info)
                return -EINVAL;
 
@@ -4855,7 +4864,7 @@ int atomisp_get_fmt(struct video_device *vdev, struct v4l2_format *f)
 }
 
 static void __atomisp_update_stream_env(struct atomisp_sub_device *asd,
-       u16 stream_index, struct atomisp_input_stream_info *stream_info)
+                                       u16 stream_index, struct atomisp_input_stream_info *stream_info)
 {
        int i;
 
@@ -4866,16 +4875,16 @@ static void __atomisp_update_stream_env(struct atomisp_sub_device *asd,
        asd->stream_env[stream_index].isys_configs = stream_info->isys_configs;
        for (i = 0; i < stream_info->isys_configs; i++) {
                asd->stream_env[stream_index].isys_info[i].input_format =
-                       stream_info->isys_info[i].input_format;
+                   stream_info->isys_info[i].input_format;
                asd->stream_env[stream_index].isys_info[i].width =
-                       stream_info->isys_info[i].width;
+                   stream_info->isys_info[i].width;
                asd->stream_env[stream_index].isys_info[i].height =
-                       stream_info->isys_info[i].height;
+                   stream_info->isys_info[i].height;
        }
 }
 
 static void __atomisp_init_stream_info(u16 stream_index,
-               struct atomisp_input_stream_info *stream_info)
+                                      struct atomisp_input_stream_info *stream_info)
 {
        int i;
 
@@ -4892,7 +4901,7 @@ static void __atomisp_init_stream_info(u16 stream_index,
 
 /* This function looks up the closest available resolution. */
 int atomisp_try_fmt(struct video_device *vdev, struct v4l2_format *f,
-                                               bool *res_overflow)
+                   bool *res_overflow)
 {
        struct atomisp_device *isp = video_get_drvdata(vdev);
        struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
@@ -4976,11 +4985,11 @@ int atomisp_try_fmt(struct video_device *vdev, struct v4l2_format *f,
 
        /* app vs isp */
        f->fmt.pix.width = rounddown(
-               clamp_t(u32, f->fmt.pix.width, ATOM_ISP_MIN_WIDTH,
-                       ATOM_ISP_MAX_WIDTH), ATOM_ISP_STEP_WIDTH);
+                              clamp_t(u32, f->fmt.pix.width, ATOM_ISP_MIN_WIDTH,
+                                      ATOM_ISP_MAX_WIDTH), ATOM_ISP_STEP_WIDTH);
        f->fmt.pix.height = rounddown(
-               clamp_t(u32, f->fmt.pix.height, ATOM_ISP_MIN_HEIGHT,
-                       ATOM_ISP_MAX_HEIGHT), ATOM_ISP_STEP_HEIGHT);
+                               clamp_t(u32, f->fmt.pix.height, ATOM_ISP_MIN_HEIGHT,
+                                       ATOM_ISP_MAX_HEIGHT), ATOM_ISP_STEP_HEIGHT);
 
        return 0;
 }
@@ -5021,17 +5030,17 @@ atomisp_try_fmt_file(struct atomisp_device *isp, struct v4l2_format *f)
 }
 
 enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
-                               enum atomisp_camera_port port)
+                                 enum atomisp_camera_port port)
 {
        switch (port) {
        case ATOMISP_CAMERA_PORT_PRIMARY:
-               return MIPI_PORT0_ID;
+                               return MIPI_PORT0_ID;
        case ATOMISP_CAMERA_PORT_SECONDARY:
                return MIPI_PORT1_ID;
        case ATOMISP_CAMERA_PORT_TERTIARY:
                if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID)
                        return MIPI_PORT1_ID + 1;
-               /* go through down for else case */
+       /* go through down for else case */
        default:
                dev_err(isp->dev, "unsupported port: %d\n", port);
                return MIPI_PORT0_ID;
@@ -5039,9 +5048,9 @@ enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
 }
 
 static inline int atomisp_set_sensor_mipi_to_isp(
-                               struct atomisp_sub_device *asd,
-                               enum atomisp_input_stream_id stream_id,
-                               struct camera_mipi_info *mipi_info)
+    struct atomisp_sub_device *asd,
+    enum atomisp_input_stream_id stream_id,
+    struct camera_mipi_info *mipi_info)
 {
        struct v4l2_control ctrl;
        struct atomisp_device *isp = asd->isp;
@@ -5056,21 +5065,21 @@ static inline int atomisp_set_sensor_mipi_to_isp(
 
        if (asd->stream_env[stream_id].isys_configs == 1) {
                input_format =
-                       asd->stream_env[stream_id].isys_info[0].input_format;
+                   asd->stream_env[stream_id].isys_info[0].input_format;
                atomisp_css_isys_set_format(asd, stream_id,
-                               input_format, IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX);
+                                           input_format, IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX);
        } else if (asd->stream_env[stream_id].isys_configs == 2) {
                atomisp_css_isys_two_stream_cfg_update_stream1(
-                               asd, stream_id,
-                               asd->stream_env[stream_id].isys_info[0].input_format,
-                               asd->stream_env[stream_id].isys_info[0].width,
-                               asd->stream_env[stream_id].isys_info[0].height);
+                   asd, stream_id,
+                   asd->stream_env[stream_id].isys_info[0].input_format,
+                   asd->stream_env[stream_id].isys_info[0].width,
+                   asd->stream_env[stream_id].isys_info[0].height);
 
                atomisp_css_isys_two_stream_cfg_update_stream2(
-                               asd, stream_id,
-                               asd->stream_env[stream_id].isys_info[1].input_format,
-                               asd->stream_env[stream_id].isys_info[1].width,
-                               asd->stream_env[stream_id].isys_info[1].height);
+                   asd, stream_id,
+                   asd->stream_env[stream_id].isys_info[1].input_format,
+                   asd->stream_env[stream_id].isys_info[1].width,
+                   asd->stream_env[stream_id].isys_info[1].height);
        }
 
        /* Compatibility for sensors which provide no media bus code
@@ -5081,7 +5090,7 @@ static inline int atomisp_set_sensor_mipi_to_isp(
                /* Input stream config is still needs configured */
                /* TODO: Check if this is necessary */
                fc = atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
-                                               mipi_info->input_format);
+                        mipi_info->input_format);
                if (!fc)
                        return -EINVAL;
                input_format = fc->css_stream_fmt;
@@ -5102,17 +5111,17 @@ static inline int atomisp_set_sensor_mipi_to_isp(
        atomisp_css_input_set_bayer_order(asd, stream_id, bayer_order);
 
        fc = atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
-                                       mipi_info->metadata_format);
+                mipi_info->metadata_format);
        if (!fc)
                return -EINVAL;
        input_format = fc->css_stream_fmt;
        atomisp_css_input_configure_port(asd,
-                               __get_mipi_port(asd->isp, mipi_info->port),
-                               mipi_info->num_lanes,
-                               0xffff4, mipi_freq,
-                               input_format,
-                               mipi_info->metadata_width,
-                               mipi_info->metadata_height);
+                                        __get_mipi_port(asd->isp, mipi_info->port),
+                                        mipi_info->num_lanes,
+                                        0xffff4, mipi_freq,
+                                        input_format,
+                                        mipi_info->metadata_width,
+                                        mipi_info->metadata_height);
        return 0;
 }
 
@@ -5132,14 +5141,14 @@ static int __enable_continuous_mode(struct atomisp_sub_device *asd,
 #endif
        /* in case of ANR, force capture pipe to offline mode */
        atomisp_css_capture_enable_online(asd, ATOMISP_INPUT_STREAM_GENERAL,
-                       asd->params.low_light ? false : !enable);
+                                         asd->params.low_light ? false : !enable);
        atomisp_css_preview_enable_online(asd, ATOMISP_INPUT_STREAM_GENERAL,
-                       !enable);
+                                         !enable);
        atomisp_css_enable_continuous(asd, enable);
        atomisp_css_enable_cvf(asd, asd->continuous_viewfinder->val);
 
        if (atomisp_css_continuous_set_num_raw_frames(asd,
-                       asd->continuous_raw_buffer_size->val)) {
+               asd->continuous_raw_buffer_size->val)) {
                dev_err(isp->dev, "css_continuous_set_num_raw_frames failed\n");
                return -EINVAL;
        }
@@ -5183,7 +5192,7 @@ static int get_frame_info_nop(struct atomisp_sub_device *asd,
  * handled in CSS when the input resolution is changed.
  */
 static int css_input_resolution_changed(struct atomisp_sub_device *asd,
-               struct v4l2_mbus_framefmt *ffmt)
+                                       struct v4l2_mbus_framefmt *ffmt)
 {
        struct atomisp_metadata_buf *md_buf = NULL, *_md_buf;
        unsigned int i;
@@ -5229,10 +5238,10 @@ static int css_input_resolution_changed(struct atomisp_sub_device *asd,
 }
 
 static int atomisp_set_fmt_to_isp(struct video_device *vdev,
-                       struct atomisp_css_frame_info *output_info,
-                       struct atomisp_css_frame_info *raw_output_info,
-                       struct v4l2_pix_format *pix,
-                       unsigned int source_pad)
+                                 struct atomisp_css_frame_info *output_info,
+                                 struct atomisp_css_frame_info *raw_output_info,
+                                 struct v4l2_pix_format *pix,
+                                 unsigned int source_pad)
 {
        struct camera_mipi_info *mipi_info;
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -5245,13 +5254,13 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
                                unsigned int width, unsigned int height,
                                unsigned int min_width,
                                enum atomisp_css_frame_format sh_fmt) =
-                                                       configure_output_nop;
+                                   configure_output_nop;
        int (*get_frame_info)(struct atomisp_sub_device *asd,
                              struct atomisp_css_frame_info *finfo) =
-                                                       get_frame_info_nop;
+                                 get_frame_info_nop;
        int (*configure_pp_input)(struct atomisp_sub_device *asd,
                                  unsigned int width, unsigned int height) =
-                                                       configure_pp_input_nop;
+                                     configure_pp_input_nop;
        u16 stream_index = atomisp_source_pad_to_stream_id(asd, source_pad);
        const struct atomisp_in_fmt_conv *fc;
        int ret;
@@ -5259,36 +5268,36 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
        v4l2_fh_init(&fh.vfh, vdev);
 
        isp_sink_crop = atomisp_subdev_get_rect(
-               &asd->subdev, NULL, V4L2_SUBDEV_FORMAT_ACTIVE,
-               ATOMISP_SUBDEV_PAD_SINK, V4L2_SEL_TGT_CROP);
+                           &asd->subdev, NULL, V4L2_SUBDEV_FORMAT_ACTIVE,
+                           ATOMISP_SUBDEV_PAD_SINK, V4L2_SEL_TGT_CROP);
 
        format = atomisp_get_format_bridge(pix->pixelformat);
        if (!format)
                return -EINVAL;
 
        if (isp->inputs[asd->input_curr].type != TEST_PATTERN &&
-               isp->inputs[asd->input_curr].type != FILE_INPUT) {
+           isp->inputs[asd->input_curr].type != FILE_INPUT) {
                mipi_info = atomisp_to_sensor_mipi_info(
-                       isp->inputs[asd->input_curr].camera);
+                               isp->inputs[asd->input_curr].camera);
                if (!mipi_info) {
                        dev_err(isp->dev, "mipi_info is NULL\n");
                        return -EINVAL;
                }
                if (atomisp_set_sensor_mipi_to_isp(asd, stream_index,
-                                       mipi_info))
+                                                  mipi_info))
                        return -EINVAL;
                fc = atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
-                               mipi_info->input_format);
+                        mipi_info->input_format);
                if (!fc)
                        fc = atomisp_find_in_fmt_conv(
-                                       atomisp_subdev_get_ffmt(&asd->subdev,
-                                       NULL, V4L2_SUBDEV_FORMAT_ACTIVE,
-                                       ATOMISP_SUBDEV_PAD_SINK)->code);
+                                atomisp_subdev_get_ffmt(&asd->subdev,
+                                                        NULL, V4L2_SUBDEV_FORMAT_ACTIVE,
+                                                        ATOMISP_SUBDEV_PAD_SINK)->code);
                if (!fc)
                        return -EINVAL;
                if (format->sh_fmt == CSS_FRAME_FORMAT_RAW &&
-                    raw_output_format_match_input(fc->css_stream_fmt,
-                       pix->pixelformat))
+                   raw_output_format_match_input(fc->css_stream_fmt,
+                                                 pix->pixelformat))
                        return -EINVAL;
        }
 
@@ -5324,20 +5333,20 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 
                if (asd->vfpp->val == ATOMISP_VFPP_DISABLE_SCALER) {
                        atomisp_css_video_configure_viewfinder(asd,
-                               vf_size.width, vf_size.height, 0,
-                               asd->video_out_vf.sh_fmt);
+                                                              vf_size.width, vf_size.height, 0,
+                                                              asd->video_out_vf.sh_fmt);
                } else if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
                        if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW ||
                            source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VIDEO)
                                atomisp_css_video_configure_viewfinder(asd,
-                                       vf_size.width, vf_size.height, 0,
-                                       asd->video_out_vf.sh_fmt);
+                                                                      vf_size.width, vf_size.height, 0,
+                                                                      asd->video_out_vf.sh_fmt);
                        else
                                atomisp_css_capture_configure_viewfinder(asd,
                                        vf_size.width, vf_size.height, 0,
                                        asd->video_out_vf.sh_fmt);
                } else if (source_pad != ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW ||
-                        asd->vfpp->val == ATOMISP_VFPP_DISABLE_LOWLAT) {
+                          asd->vfpp->val == ATOMISP_VFPP_DISABLE_LOWLAT) {
                        atomisp_css_capture_configure_viewfinder(asd,
                                vf_size.width, vf_size.height, 0,
                                asd->video_out_vf.sh_fmt);
@@ -5352,7 +5361,7 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 
        atomisp_css_input_set_mode(asd, CSS_INPUT_MODE_SENSOR);
        atomisp_css_disable_vf_pp(asd,
-                       asd->vfpp->val != ATOMISP_VFPP_ENABLE);
+                                 asd->vfpp->val != ATOMISP_VFPP_ENABLE);
 
        /* ISP2401 new input system need to use copy pipe */
        if (asd->copy_mode) {
@@ -5367,25 +5376,25 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
                if (!asd->continuous_mode->val) {
                        configure_output = atomisp_css_video_configure_output;
                        get_frame_info =
-                               atomisp_css_video_get_output_frame_info;
+                           atomisp_css_video_get_output_frame_info;
                        pipe_id = CSS_PIPE_ID_VIDEO;
                } else {
                        if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW ||
                            source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VIDEO) {
                                configure_output =
-                                       atomisp_css_video_configure_output;
+                                   atomisp_css_video_configure_output;
                                get_frame_info =
-                                       atomisp_css_video_get_output_frame_info;
+                                   atomisp_css_video_get_output_frame_info;
                                configure_pp_input =
-                                       atomisp_css_video_configure_pp_input;
+                                   atomisp_css_video_configure_pp_input;
                                pipe_id = CSS_PIPE_ID_VIDEO;
                        } else {
                                configure_output =
-                                       atomisp_css_capture_configure_output;
+                                   atomisp_css_capture_configure_output;
                                get_frame_info =
-                                       atomisp_css_capture_get_output_frame_info;
+                                   atomisp_css_capture_get_output_frame_info;
                                configure_pp_input =
-                                       atomisp_css_capture_configure_pp_input;
+                                   atomisp_css_capture_configure_pp_input;
                                pipe_id = CSS_PIPE_ID_CAPTURE;
 
                                atomisp_update_capture_mode(asd);
@@ -5415,8 +5424,8 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
                if (!asd->continuous_mode->val)
                        /* in case of ANR, force capture pipe to offline mode */
                        atomisp_css_capture_enable_online(asd, stream_index,
-                                       asd->params.low_light ?
-                                       false : asd->params.online_process);
+                                                         asd->params.low_light ?
+                                                         false : asd->params.online_process);
 
                configure_output = atomisp_css_capture_configure_output;
                get_frame_info = atomisp_css_capture_get_output_frame_info;
@@ -5426,14 +5435,14 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
                if (!asd->params.online_process &&
                    !asd->continuous_mode->val) {
                        ret = atomisp_css_capture_get_output_raw_frame_info(asd,
-                                                       raw_output_info);
+                               raw_output_info);
                        if (ret)
                                return ret;
                }
                if (!asd->continuous_mode->val && asd->run_mode->val
                    != ATOMISP_RUN_MODE_STILL_CAPTURE) {
                        dev_err(isp->dev,
-                                   "Need to set the running mode first\n");
+                               "Need to set the running mode first\n");
                        asd->run_mode->val = ATOMISP_RUN_MODE_STILL_CAPTURE;
                }
        }
@@ -5446,10 +5455,10 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 
        if (asd->copy_mode)
                ret = atomisp_css_copy_configure_output(asd, stream_index,
-                               pix->width, pix->height,
-                               format->planar ? pix->bytesperline :
-                                       pix->bytesperline * 8 / format->depth,
-                               format->sh_fmt);
+                                                       pix->width, pix->height,
+                                                       format->planar ? pix->bytesperline :
+                                                       pix->bytesperline * 8 / format->depth,
+                                                       format->sh_fmt);
        else
                ret = configure_output(asd, pix->width, pix->height,
                                       format->planar ? pix->bytesperline :
@@ -5485,7 +5494,7 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
        }
        if (asd->copy_mode)
                ret = atomisp_css_copy_get_output_frame_info(asd, stream_index,
-                               output_info);
+                       output_info);
        else
                ret = get_frame_info(asd, output_info);
        if (ret) {
@@ -5502,16 +5511,16 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 
        if (!asd->continuous_mode->val &&
            !asd->params.online_process && !isp->sw_contex.file_input &&
-               atomisp_css_frame_allocate_from_info(&asd->raw_output_frame,
-                                                       raw_output_info))
+           atomisp_css_frame_allocate_from_info(&asd->raw_output_frame,
+                   raw_output_info))
                return -ENOMEM;
 
        return 0;
 }
 
 static void atomisp_get_dis_envelop(struct atomisp_sub_device *asd,
-                           unsigned int width, unsigned int height,
-                           unsigned int *dvs_env_w, unsigned int *dvs_env_h)
+                                   unsigned int width, unsigned int height,
+                                   unsigned int *dvs_env_w, unsigned int *dvs_env_h)
 {
        struct atomisp_device *isp = asd->isp;
 
@@ -5535,22 +5544,22 @@ static void atomisp_get_dis_envelop(struct atomisp_sub_device *asd,
 }
 
 static void atomisp_check_copy_mode(struct atomisp_sub_device *asd,
-               int source_pad, struct v4l2_format *f)
+                                   int source_pad, struct v4l2_format *f)
 {
 #if defined(ISP2401_NEW_INPUT_SYSTEM)
        struct v4l2_mbus_framefmt *sink, *src;
 
        sink = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
-               V4L2_SUBDEV_FORMAT_ACTIVE, ATOMISP_SUBDEV_PAD_SINK);
+                                      V4L2_SUBDEV_FORMAT_ACTIVE, ATOMISP_SUBDEV_PAD_SINK);
        src = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
-               V4L2_SUBDEV_FORMAT_ACTIVE, source_pad);
+                                     V4L2_SUBDEV_FORMAT_ACTIVE, source_pad);
 
        if ((sink->code == src->code &&
-           sink->width == f->fmt.pix.width &&
-           sink->height == f->fmt.pix.height) ||
+            sink->width == f->fmt.pix.width &&
+            sink->height == f->fmt.pix.height) ||
            ((asd->isp->inputs[asd->input_curr].type == SOC_CAMERA) &&
-           (asd->isp->inputs[asd->input_curr].camera_caps->
-           sensor[asd->sensor_curr].stream_num > 1)))
+            (asd->isp->inputs[asd->input_curr].camera_caps->
+             sensor[asd->sensor_curr].stream_num > 1)))
                asd->copy_mode = true;
        else
 #endif
@@ -5561,9 +5570,9 @@ static void atomisp_check_copy_mode(struct atomisp_sub_device *asd,
 }
 
 static int atomisp_set_fmt_to_snr(struct video_device *vdev,
-               struct v4l2_format *f, unsigned int pixelformat,
-               unsigned int padding_w, unsigned int padding_h,
-               unsigned int dvs_env_w, unsigned int dvs_env_h)
+                                 struct v4l2_format *f, unsigned int pixelformat,
+                                 unsigned int padding_w, unsigned int padding_h,
+                                 unsigned int dvs_env_w, unsigned int dvs_env_h)
 {
        struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
        const struct atomisp_format_bridge *format;
@@ -5606,7 +5615,7 @@ static int atomisp_set_fmt_to_snr(struct video_device *vdev,
            source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VIDEO) {
                vformat.which = V4L2_SUBDEV_FORMAT_TRY;
                ret = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
-                       pad, set_fmt, &pad_cfg, &vformat);
+                                      pad, set_fmt, &pad_cfg, &vformat);
                if (ret)
                        return ret;
                if (ffmt->width < req_ffmt->width ||
@@ -5615,7 +5624,7 @@ static int atomisp_set_fmt_to_snr(struct video_device *vdev,
                        req_ffmt->width -= dvs_env_w;
                        ffmt = req_ffmt;
                        dev_warn(isp->dev,
-                         "can not enable video dis due to sensor limitation.");
+                                "can not enable video dis due to sensor limitation.");
                        asd->params.video_dis_en = false;
                }
        }
@@ -5634,7 +5643,7 @@ static int atomisp_set_fmt_to_snr(struct video_device *vdev,
 
        if (ffmt->width < ATOM_ISP_STEP_WIDTH ||
            ffmt->height < ATOM_ISP_STEP_HEIGHT)
-                       return -EINVAL;
+               return -EINVAL;
 
        if (asd->params.video_dis_en &&
            source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VIDEO &&
@@ -5695,7 +5704,7 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
 
        if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VF ||
            (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW
-               && asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO)) {
+            && asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO)) {
                if (asd->fmt_auto->val) {
                        struct v4l2_rect *capture_comp;
                        struct v4l2_rect r = {0};
@@ -5705,16 +5714,16 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
 
                        if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW)
                                capture_comp = atomisp_subdev_get_rect(
-                                       &asd->subdev, NULL,
-                                       V4L2_SUBDEV_FORMAT_ACTIVE,
-                                       ATOMISP_SUBDEV_PAD_SOURCE_VIDEO,
-                                       V4L2_SEL_TGT_COMPOSE);
+                                                  &asd->subdev, NULL,
+                                                  V4L2_SUBDEV_FORMAT_ACTIVE,
+                                                  ATOMISP_SUBDEV_PAD_SOURCE_VIDEO,
+                                                  V4L2_SEL_TGT_COMPOSE);
                        else
                                capture_comp = atomisp_subdev_get_rect(
-                                       &asd->subdev, NULL,
-                                       V4L2_SUBDEV_FORMAT_ACTIVE,
-                                       ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE,
-                                       V4L2_SEL_TGT_COMPOSE);
+                                                  &asd->subdev, NULL,
+                                                  V4L2_SUBDEV_FORMAT_ACTIVE,
+                                                  ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE,
+                                                  V4L2_SEL_TGT_COMPOSE);
 
                        if (capture_comp->width < r.width
                            || capture_comp->height < r.height) {
@@ -5723,9 +5732,9 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
                        }
 
                        atomisp_subdev_set_selection(
-                               &asd->subdev, fh.pad,
-                               V4L2_SUBDEV_FORMAT_ACTIVE, source_pad,
-                               V4L2_SEL_TGT_COMPOSE, 0, &r);
+                           &asd->subdev, fh.pad,
+                           V4L2_SUBDEV_FORMAT_ACTIVE, source_pad,
+                           V4L2_SEL_TGT_COMPOSE, 0, &r);
 
                        f->fmt.pix.width = r.width;
                        f->fmt.pix.height = r.height;
@@ -5734,17 +5743,17 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
                if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW &&
                    (asd->isp->inputs[asd->input_curr].type == SOC_CAMERA) &&
                    (asd->isp->inputs[asd->input_curr].camera_caps->
-                   sensor[asd->sensor_curr].stream_num > 1)) {
+                    sensor[asd->sensor_curr].stream_num > 1)) {
                        /* For M10MO outputing YUV preview images. */
                        u16 video_index =
-                               atomisp_source_pad_to_stream_id(asd,
-                                       ATOMISP_SUBDEV_PAD_SOURCE_VIDEO);
+                           atomisp_source_pad_to_stream_id(asd,
+                                                           ATOMISP_SUBDEV_PAD_SOURCE_VIDEO);
 
                        ret = atomisp_css_copy_get_output_frame_info(asd,
                                video_index, &output_info);
                        if (ret) {
                                dev_err(isp->dev,
-                                     "copy_get_output_frame_info ret %i", ret);
+                                       "copy_get_output_frame_info ret %i", ret);
                                return -EINVAL;
                        }
                        if (!asd->yuvpp_mode) {
@@ -5754,18 +5763,18 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
                                 */
                                asd->yuvpp_mode = true;
                                ret = atomisp_css_copy_configure_output(
-                                       asd, video_index, 0, 0, 0, 0);
+                                         asd, video_index, 0, 0, 0, 0);
                                if (ret) {
                                        dev_err(isp->dev,
                                                "failed to disable copy pipe");
                                        return -EINVAL;
                                }
                                ret = atomisp_css_yuvpp_configure_output(
-                                       asd, video_index,
-                                       output_info.res.width,
-                                       output_info.res.height,
-                                       output_info.padded_width,
-                                       output_info.format);
+                                         asd, video_index,
+                                         output_info.res.width,
+                                         output_info.res.height,
+                                         output_info.padded_width,
+                                         output_info.format);
                                if (ret) {
                                        dev_err(isp->dev,
                                                "failed to set up yuvpp pipe\n");
@@ -5773,23 +5782,23 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
                                }
                                atomisp_css_video_enable_online(asd, false);
                                atomisp_css_preview_enable_online(asd,
-                                       ATOMISP_INPUT_STREAM_GENERAL, false);
+                                                                 ATOMISP_INPUT_STREAM_GENERAL, false);
                        }
                        atomisp_css_yuvpp_configure_viewfinder(asd, video_index,
-                               f->fmt.pix.width, f->fmt.pix.height,
-                               format_bridge->planar ? f->fmt.pix.bytesperline
-                               : f->fmt.pix.bytesperline * 8
-                               / format_bridge->depth, format_bridge->sh_fmt);
+                                                              f->fmt.pix.width, f->fmt.pix.height,
+                                                              format_bridge->planar ? f->fmt.pix.bytesperline
+                                                              : f->fmt.pix.bytesperline * 8
+                                                              / format_bridge->depth, format_bridge->sh_fmt);
                        atomisp_css_yuvpp_get_viewfinder_frame_info(
-                               asd, video_index, &output_info);
+                           asd, video_index, &output_info);
                } else if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW) {
                        atomisp_css_video_configure_viewfinder(asd,
-                               f->fmt.pix.width, f->fmt.pix.height,
-                               format_bridge->planar ? f->fmt.pix.bytesperline
-                               : f->fmt.pix.bytesperline * 8
-                               / format_bridge->depth, format_bridge->sh_fmt);
+                                                              f->fmt.pix.width, f->fmt.pix.height,
+                                                              format_bridge->planar ? f->fmt.pix.bytesperline
+                                                              : f->fmt.pix.bytesperline * 8
+                                                              / format_bridge->depth,  format_bridge->sh_fmt);
                        atomisp_css_video_get_viewfinder_frame_info(asd,
-                                                               &output_info);
+                               &output_info);
                        asd->copy_mode = false;
                } else {
                        atomisp_css_capture_configure_viewfinder(asd,
@@ -5798,7 +5807,7 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
                                : f->fmt.pix.bytesperline * 8
                                / format_bridge->depth, format_bridge->sh_fmt);
                        atomisp_css_capture_get_viewfinder_frame_info(asd,
-                                                               &output_info);
+                               &output_info);
                        asd->copy_mode = false;
                }
 
@@ -5836,18 +5845,18 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
        f->fmt.pix.height = snr_fmt.fmt.pix.height;
 
        snr_format_bridge =
-               atomisp_get_format_bridge(snr_fmt.fmt.pix.pixelformat);
+           atomisp_get_format_bridge(snr_fmt.fmt.pix.pixelformat);
        if (!snr_format_bridge)
                return -EINVAL;
 
        atomisp_subdev_get_ffmt(&asd->subdev, NULL,
                                V4L2_SUBDEV_FORMAT_ACTIVE,
                                ATOMISP_SUBDEV_PAD_SINK)->code =
-               snr_format_bridge->mbus_code;
+                                   snr_format_bridge->mbus_code;
 
        isp_sink_fmt = *atomisp_subdev_get_ffmt(&asd->subdev, NULL,
-                                           V4L2_SUBDEV_FORMAT_ACTIVE,
-                                           ATOMISP_SUBDEV_PAD_SINK);
+                                               V4L2_SUBDEV_FORMAT_ACTIVE,
+                                               ATOMISP_SUBDEV_PAD_SINK);
 
        isp_source_fmt.code = format_bridge->mbus_code;
        atomisp_subdev_set_ffmt(&asd->subdev, fh.pad,
@@ -5865,13 +5874,13 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
        /* construct resolution supported by isp */
        if (res_overflow && !asd->continuous_mode->val) {
                f->fmt.pix.width = rounddown(
-                       clamp_t(u32, f->fmt.pix.width - padding_w,
-                               ATOM_ISP_MIN_WIDTH,
-                               ATOM_ISP_MAX_WIDTH), ATOM_ISP_STEP_WIDTH);
+                                      clamp_t(u32, f->fmt.pix.width - padding_w,
+                                              ATOM_ISP_MIN_WIDTH,
+                                              ATOM_ISP_MAX_WIDTH), ATOM_ISP_STEP_WIDTH);
                f->fmt.pix.height = rounddown(
-                       clamp_t(u32, f->fmt.pix.height - padding_h,
-                               ATOM_ISP_MIN_HEIGHT,
-                               ATOM_ISP_MAX_HEIGHT), ATOM_ISP_STEP_HEIGHT);
+                                       clamp_t(u32, f->fmt.pix.height - padding_h,
+                                               ATOM_ISP_MIN_HEIGHT,
+                                               ATOM_ISP_MAX_HEIGHT), ATOM_ISP_STEP_HEIGHT);
        }
 
        atomisp_get_dis_envelop(asd, f->fmt.pix.width, f->fmt.pix.height,
@@ -5905,7 +5914,7 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
        if (!asd->continuous_mode->val ||
            isp_sink_fmt.width < (f->fmt.pix.width + padding_w + dvs_env_w) ||
            isp_sink_fmt.height < (f->fmt.pix.height + padding_h +
-                                   dvs_env_h)) {
+                                  dvs_env_h)) {
                /*
                 * For jpeg or custom raw format the sensor will return constant
                 * width and height. Because we already had quried try_mbus_fmt,
@@ -5922,8 +5931,8 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
                        s_fmt.fmt.pix.height = backup_fmt.fmt.pix.height;
                }
                ret = atomisp_set_fmt_to_snr(vdev, &s_fmt,
-                                       f->fmt.pix.pixelformat, padding_w,
-                                       padding_h, dvs_env_w, dvs_env_h);
+                                            f->fmt.pix.pixelformat, padding_w,
+                                            padding_h, dvs_env_w, dvs_env_h);
                if (ret)
                        return -EINVAL;
 
@@ -5935,16 +5944,16 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
        asd->yuvpp_mode = false;                        /* Reset variable */
 
        isp_sink_crop = *atomisp_subdev_get_rect(&asd->subdev, NULL,
-                                                V4L2_SUBDEV_FORMAT_ACTIVE,
-                                                ATOMISP_SUBDEV_PAD_SINK,
-                                                V4L2_SEL_TGT_CROP);
+                       V4L2_SUBDEV_FORMAT_ACTIVE,
+                       ATOMISP_SUBDEV_PAD_SINK,
+                       V4L2_SEL_TGT_CROP);
 
        /* Try to enable YUV downscaling if ISP input is 10 % (either
         * width or height) bigger than the desired result. */
        if (isp_sink_crop.width * 9 / 10 < f->fmt.pix.width ||
            isp_sink_crop.height * 9 / 10 < f->fmt.pix.height ||
            (atomisp_subdev_format_conversion(asd, source_pad) &&
-           ((asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO &&
+            ((asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO &&
               !asd->continuous_mode->val) ||
              asd->vfpp->val == ATOMISP_VFPP_DISABLE_SCALER))) {
                /* for continuous mode, preview size might be smaller than
@@ -5956,11 +5965,11 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
                    && source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW
                    && !crop_needs_override) {
                        isp_sink_crop.width =
-                               max_t(unsigned int, f->fmt.pix.width,
-                                     isp_sink_crop.width);
+                           max_t(unsigned int, f->fmt.pix.width,
+                                 isp_sink_crop.width);
                        isp_sink_crop.height =
-                               max_t(unsigned int, f->fmt.pix.height,
-                                     isp_sink_crop.height);
+                           max_t(unsigned int, f->fmt.pix.height,
+                                 isp_sink_crop.height);
                } else {
                        isp_sink_crop.width = f->fmt.pix.width;
                        isp_sink_crop.height = f->fmt.pix.height;
@@ -5981,21 +5990,21 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
 
                main_compose.width = isp_sink_crop.width;
                main_compose.height =
-                       DIV_ROUND_UP(main_compose.width * f->fmt.pix.height,
-                                    f->fmt.pix.width);
+                   DIV_ROUND_UP(main_compose.width * f->fmt.pix.height,
+                                f->fmt.pix.width);
                if (main_compose.height > isp_sink_crop.height) {
                        main_compose.height = isp_sink_crop.height;
                        main_compose.width =
-                               DIV_ROUND_UP(main_compose.height *
-                                            f->fmt.pix.width,
-                                            f->fmt.pix.height);
+                           DIV_ROUND_UP(main_compose.height *
+                                        f->fmt.pix.width,
+                                        f->fmt.pix.height);
                }
 
                atomisp_subdev_set_selection(&asd->subdev, fh.pad,
-                               V4L2_SUBDEV_FORMAT_ACTIVE,
-                               source_pad,
-                               V4L2_SEL_TGT_COMPOSE, 0,
-                               &main_compose);
+                                            V4L2_SUBDEV_FORMAT_ACTIVE,
+                                            source_pad,
+                                            V4L2_SEL_TGT_COMPOSE, 0,
+                                            &main_compose);
        } else {
                struct v4l2_rect sink_crop = {0};
                struct v4l2_rect main_compose = {0};
@@ -6018,30 +6027,30 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
                            isp_sink_crop.height * main_compose.width) {
                                sink_crop.height = isp_sink_crop.height;
                                sink_crop.width = DIV_NEAREST_STEP(
-                                               sink_crop.height *
-                                               f->fmt.pix.width,
-                                               f->fmt.pix.height,
-                                               ATOM_ISP_STEP_WIDTH);
+                                                     sink_crop.height *
+                                                     f->fmt.pix.width,
+                                                     f->fmt.pix.height,
+                                                     ATOM_ISP_STEP_WIDTH);
                        } else {
                                sink_crop.width = isp_sink_crop.width;
                                sink_crop.height = DIV_NEAREST_STEP(
-                                               sink_crop.width *
-                                               f->fmt.pix.height,
-                                               f->fmt.pix.width,
-                                               ATOM_ISP_STEP_HEIGHT);
+                                                      sink_crop.width *
+                                                      f->fmt.pix.height,
+                                                      f->fmt.pix.width,
+                                                      ATOM_ISP_STEP_HEIGHT);
                        }
                        atomisp_subdev_set_selection(&asd->subdev, fh.pad,
-                               V4L2_SUBDEV_FORMAT_ACTIVE,
-                               ATOMISP_SUBDEV_PAD_SINK,
-                               V4L2_SEL_TGT_CROP,
-                               V4L2_SEL_FLAG_KEEP_CONFIG,
-                               &sink_crop);
+                                                    V4L2_SUBDEV_FORMAT_ACTIVE,
+                                                    ATOMISP_SUBDEV_PAD_SINK,
+                                                    V4L2_SEL_TGT_CROP,
+                                                    V4L2_SEL_FLAG_KEEP_CONFIG,
+                                                    &sink_crop);
                }
                atomisp_subdev_set_selection(&asd->subdev, fh.pad,
-                               V4L2_SUBDEV_FORMAT_ACTIVE,
-                               source_pad,
-                               V4L2_SEL_TGT_COMPOSE, 0,
-                               &main_compose);
+                                            V4L2_SUBDEV_FORMAT_ACTIVE,
+                                            source_pad,
+                                            V4L2_SEL_TGT_COMPOSE, 0,
+                                            &main_compose);
        }
 
 set_fmt_to_isp:
@@ -6056,14 +6065,14 @@ done:
        if (format_bridge->planar) {
                pipe->pix.bytesperline = output_info.padded_width;
                pipe->pix.sizeimage = PAGE_ALIGN(f->fmt.pix.height *
-                       DIV_ROUND_UP(format_bridge->depth *
-                                    output_info.padded_width, 8));
+                                                DIV_ROUND_UP(format_bridge->depth *
+                                                        output_info.padded_width, 8));
        } else {
                pipe->pix.bytesperline =
-                       DIV_ROUND_UP(format_bridge->depth *
-                                    output_info.padded_width, 8);
+                   DIV_ROUND_UP(format_bridge->depth *
+                                output_info.padded_width, 8);
                pipe->pix.sizeimage =
-                       PAGE_ALIGN(f->fmt.pix.height * pipe->pix.bytesperline);
+                   PAGE_ALIGN(f->fmt.pix.height * pipe->pix.bytesperline);
        }
        if (f->fmt.pix.field == V4L2_FIELD_ANY)
                f->fmt.pix.field = V4L2_FIELD_NONE;
@@ -6110,15 +6119,15 @@ int atomisp_set_fmt_file(struct video_device *vdev, struct v4l2_format *f)
        format_bridge = atomisp_get_format_bridge(f->fmt.pix.pixelformat);
        if (!format_bridge) {
                dev_dbg(isp->dev, "atomisp_get_format_bridge err! fmt:0x%x\n",
-                               f->fmt.pix.pixelformat);
+                       f->fmt.pix.pixelformat);
                return -EINVAL;
        }
 
        pipe->pix = f->fmt.pix;
        atomisp_css_input_set_mode(asd, CSS_INPUT_MODE_FIFO);
        atomisp_css_input_configure_port(asd,
-               __get_mipi_port(isp, ATOMISP_CAMERA_PORT_PRIMARY), 2, 0xffff4,
-               0, 0, 0, 0);
+                                        __get_mipi_port(isp, ATOMISP_CAMERA_PORT_PRIMARY), 2, 0xffff4,
+                                        0, 0, 0, 0);
        ffmt.width = f->fmt.pix.width;
        ffmt.height = f->fmt.pix.height;
        ffmt.code = format_bridge->mbus_code;
@@ -6130,7 +6139,7 @@ int atomisp_set_fmt_file(struct video_device *vdev, struct v4l2_format *f)
 }
 
 int atomisp_set_shading_table(struct atomisp_sub_device *asd,
-               struct atomisp_shading_table *user_shading_table)
+                             struct atomisp_shading_table *user_shading_table)
 {
        struct atomisp_css_shading_table *shading_table;
        struct atomisp_css_shading_table *free_table;
@@ -6159,7 +6168,7 @@ int atomisp_set_shading_table(struct atomisp_sub_device *asd,
                return -EINVAL;
 
        shading_table = atomisp_css_shading_table_alloc(
-                       user_shading_table->width, user_shading_table->height);
+                           user_shading_table->width, user_shading_table->height);
        if (!shading_table)
                return -ENOMEM;
 
@@ -6272,7 +6281,7 @@ int atomisp_exif_makernote(struct atomisp_sub_device *asd,
 }
 
 int atomisp_offline_capture_configure(struct atomisp_sub_device *asd,
-                             struct atomisp_cont_capture_conf *cvf_config)
+                                     struct atomisp_cont_capture_conf *cvf_config)
 {
        struct v4l2_ctrl *c;
 
@@ -6304,26 +6313,26 @@ int atomisp_offline_capture_configure(struct atomisp_sub_device *asd,
 
                        if (asd->enable_raw_buffer_lock->val) {
                                init_raw_num =
-                                       ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES_LOCK_EN;
+                                   ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES_LOCK_EN;
                                if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO &&
                                    asd->params.video_dis_en)
                                        init_raw_num +=
                                            ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
                        } else {
                                init_raw_num =
-                                       ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES;
+                                   ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES;
                        }
 
                        /* TODO: this can be removed once user-space
                         *       has been updated to use control API */
                        asd->continuous_raw_buffer_size->val =
-                               max_t(int,
-                                     asd->continuous_raw_buffer_size->val,
-                                     asd->params.offline_parm.
-                                     num_captures + init_raw_num);
+                           max_t(int,
+                                 asd->continuous_raw_buffer_size->val,
+                                 asd->params.offline_parm.
+                                 num_captures + init_raw_num);
                        asd->continuous_raw_buffer_size->val =
-                               min_t(int, ATOMISP_CONT_RAW_FRAMES,
-                                     asd->continuous_raw_buffer_size->val);
+                           min_t(int, ATOMISP_CONT_RAW_FRAMES,
+                                 asd->continuous_raw_buffer_size->val);
                }
                asd->continuous_mode->val = true;
        } else {
@@ -6364,14 +6373,14 @@ int atomisp_flash_enable(struct atomisp_sub_device *asd, int num_frames)
 
        if (num_frames < 0) {
                dev_dbg(isp->dev, "%s ERROR: num_frames: %d\n", __func__,
-                               num_frames);
+                       num_frames);
                return -EINVAL;
        }
        /* a requested flash is still in progress. */
        if (num_frames && asd->params.flash_state != ATOMISP_FLASH_IDLE) {
                dev_dbg(isp->dev, "%s flash busy: %d frames left: %d\n",
-                               __func__, asd->params.flash_state,
-                               asd->params.num_flash_frames);
+                       __func__, asd->params.flash_state,
+                       asd->params.num_flash_frames);
                return -EBUSY;
        }
 
@@ -6381,13 +6390,13 @@ int atomisp_flash_enable(struct atomisp_sub_device *asd, int num_frames)
 }
 
 int atomisp_source_pad_to_stream_id(struct atomisp_sub_device *asd,
-                                          uint16_t source_pad)
+                                   uint16_t source_pad)
 {
        int stream_id;
        struct atomisp_device *isp = asd->isp;
 
        if (isp->inputs[asd->input_curr].camera_caps->
-                       sensor[asd->sensor_curr].stream_num == 1)
+           sensor[asd->sensor_curr].stream_num == 1)
                return ATOMISP_INPUT_STREAM_GENERAL;
 
        switch (source_pad) {
@@ -6484,7 +6493,8 @@ int atomisp_set_raw_buffer_bitmap(struct atomisp_sub_device *asd, int exp_id)
                /* WORKAROUND unlock the raw buffer compulsively */
                ret = atomisp_css_exp_id_unlock(asd, exp_id);
                if (ret) {
-                       dev_err(asd->isp->dev, "%s exp_id is wrapping back to %d but force unlock failed,, err %d.\n",
+                       dev_err(asd->isp->dev,
+                               "%s exp_id is wrapping back to %d but force unlock failed,, err %d.\n",
                                __func__, exp_id, ret);
                        return ret;
                }
@@ -6493,8 +6503,9 @@ int atomisp_set_raw_buffer_bitmap(struct atomisp_sub_device *asd, int exp_id)
                (*bitmap) &= ~(1 << bit);
                asd->raw_buffer_locked_count--;
                spin_unlock_irqrestore(&asd->raw_buffer_bitmap_lock, flags);
-               dev_warn(asd->isp->dev, "%s exp_id is wrapping back to %d but it is still locked so force unlock it, raw_buffer_locked_count %d\n",
-                       __func__, exp_id, asd->raw_buffer_locked_count);
+               dev_warn(asd->isp->dev,
+                        "%s exp_id is wrapping back to %d but it is still locked so force unlock it, raw_buffer_locked_count %d\n",
+                        __func__, exp_id, asd->raw_buffer_locked_count);
        }
        return 0;
 }
@@ -6579,7 +6590,7 @@ int atomisp_exp_id_unlock(struct atomisp_sub_device *asd, int *exp_id)
 }
 
 int atomisp_enable_dz_capt_pipe(struct atomisp_sub_device *asd,
-                                          unsigned int *enable)
+                               unsigned int *enable)
 {
        bool value;
 
@@ -6649,12 +6660,12 @@ static int atomisp_get_pipe_id(struct atomisp_video_pipe *pipe)
 
        /* fail through */
        dev_warn(asd->isp->dev, "%s failed to find proper pipe\n",
-               __func__);
+                __func__);
        return CSS_PIPE_ID_CAPTURE;
 }
 
 int atomisp_get_invalid_frame_num(struct video_device *vdev,
-                                       int *invalid_frame_num)
+                                 int *invalid_frame_num)
 {
        struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
        struct atomisp_sub_device *asd = pipe->asd;
@@ -6663,7 +6674,7 @@ int atomisp_get_invalid_frame_num(struct video_device *vdev,
        int ret;
 
        if (asd->isp->inputs[asd->input_curr].camera_caps->
-               sensor[asd->sensor_curr].stream_num > 1) {
+           sensor[asd->sensor_curr].stream_num > 1) {
                /* External ISP */
                *invalid_frame_num = 0;
                return 0;
@@ -6671,14 +6682,15 @@ int atomisp_get_invalid_frame_num(struct video_device *vdev,
 
        pipe_id = atomisp_get_pipe_id(pipe);
        if (!asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].pipes[pipe_id]) {
-               dev_warn(asd->isp->dev, "%s pipe %d has not been created yet, do SET_FMT first!\n",
-                       __func__, pipe_id);
+               dev_warn(asd->isp->dev,
+                        "%s pipe %d has not been created yet, do SET_FMT first!\n",
+                        __func__, pipe_id);
                return -EINVAL;
        }
 
        ret = ia_css_pipe_get_info(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .pipes[pipe_id], &p_info);
+                 asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
+                 .pipes[pipe_id], &p_info);
        if (ret == IA_CSS_SUCCESS) {
                *invalid_frame_num = p_info.num_invalid_frames;
                return 0;
index a403ff95a2a99b369a8bc9faf8d3e2284d726b27..3885a5a9d65a8d84283e7abcf869d2c77ec8b337 100644 (file)
@@ -86,7 +86,7 @@ void atomisp_setup_flash(struct atomisp_sub_device *asd);
 irqreturn_t atomisp_isr(int irq, void *dev);
 irqreturn_t atomisp_isr_thread(int irq, void *isp_ptr);
 const struct atomisp_format_bridge *get_atomisp_format_bridge_from_mbus(
-       u32 mbus_code);
+    u32 mbus_code);
 bool atomisp_is_mbuscode_raw(uint32_t code);
 int atomisp_get_frame_pgnr(struct atomisp_device *isp,
                           const struct atomisp_css_frame *frame, u32 *p_pgnr);
@@ -108,7 +108,7 @@ bool atomisp_is_viewfinder_support(struct atomisp_device *isp);
  * ATOMISP_IOC_S_SENSOR_RUNMODE ioctl was called
  */
 int atomisp_set_sensor_runmode(struct atomisp_sub_device *asd,
-               struct atomisp_s_runmode *runmode);
+                              struct atomisp_s_runmode *runmode);
 /*
 #endif
  * Function to enable/disable lens geometry distortion correction (GDC) and
@@ -130,7 +130,7 @@ int atomisp_low_light(struct atomisp_sub_device *asd, int flag,
 int atomisp_xnr(struct atomisp_sub_device *asd, int flag, int *arg);
 
 int atomisp_formats(struct atomisp_sub_device *asd, int flag,
-               struct atomisp_formats_config *config);
+                   struct atomisp_formats_config *config);
 
 /*
  * Function to configure noise reduction
@@ -171,7 +171,7 @@ int atomisp_ctc(struct atomisp_sub_device *asd, int flag,
  * Function to update gamma correction parameters
  */
 int atomisp_gamma_correction(struct atomisp_sub_device *asd, int flag,
-       struct atomisp_gc_config *config);
+                            struct atomisp_gc_config *config);
 
 /*
  * Function to update Gdc table for gdc
@@ -194,7 +194,7 @@ int atomisp_get_dis_stat(struct atomisp_sub_device *asd,
  * Function to get DVS2 BQ resolution settings
  */
 int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
-                        struct atomisp_dvs2_bq_resolutions *bq_res);
+                                   struct atomisp_dvs2_bq_resolutions *bq_res);
 
 /*
  * Function to set the DIS coefficients.
@@ -221,10 +221,10 @@ int atomisp_get_metadata(struct atomisp_sub_device *asd, int flag,
                         struct atomisp_metadata *config);
 
 int atomisp_get_metadata_by_type(struct atomisp_sub_device *asd, int flag,
-                        struct atomisp_metadata_with_type *config);
+                                struct atomisp_metadata_with_type *config);
 
 int atomisp_set_parameters(struct video_device *vdev,
-                       struct atomisp_parameters *arg);
+                          struct atomisp_parameters *arg);
 /*
  * Function to set/get isp parameters to isp
  */
@@ -298,14 +298,14 @@ int atomisp_digital_zoom(struct atomisp_sub_device *asd, int flag,
  * Function  set camera_prefiles.xml current sensor pixel array size
  */
 int atomisp_set_array_res(struct atomisp_sub_device *asd,
-                       struct atomisp_resolution  *config);
+                         struct atomisp_resolution  *config);
 
 /*
  * Function to calculate real zoom region for every pipe
  */
 int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
-                       struct atomisp_css_dz_config   *dz_config,
-                       enum atomisp_css_pipe_id css_pipe_id);
+                                      struct atomisp_css_dz_config   *dz_config,
+                                      enum atomisp_css_pipe_id css_pipe_id);
 
 int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                      struct atomisp_parameters *arg,
@@ -328,16 +328,16 @@ int atomisp_cp_morph_table(struct atomisp_sub_device *asd,
                           bool from_user);
 
 int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
-                       struct atomisp_dvs_6axis_config *user_6axis_config,
-                       struct atomisp_css_params *css_param,
-                       bool from_user);
+                               struct atomisp_dvs_6axis_config *user_6axis_config,
+                               struct atomisp_css_params *css_param,
+                               bool from_user);
 
 int atomisp_makeup_css_parameters(struct atomisp_sub_device *asd,
                                  struct atomisp_parameters *arg,
                                  struct atomisp_css_params *css_param);
 
 int atomisp_compare_grid(struct atomisp_sub_device *asd,
-                               struct atomisp_grid_info *atomgrid);
+                        struct atomisp_grid_info *atomgrid);
 
 int atomisp_get_sensor_mode_data(struct atomisp_sub_device *asd,
                                 struct atomisp_sensor_mode_data *config);
@@ -346,7 +346,7 @@ int atomisp_get_fmt(struct video_device *vdev, struct v4l2_format *f);
 
 /* This function looks up the closest available resolution. */
 int atomisp_try_fmt(struct video_device *vdev, struct v4l2_format *f,
-                                               bool *res_overflow);
+                   bool *res_overflow);
 
 int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f);
 int atomisp_set_fmt_file(struct video_device *vdev, struct v4l2_format *f);
@@ -355,7 +355,7 @@ int atomisp_set_shading_table(struct atomisp_sub_device *asd,
                              struct atomisp_shading_table *shading_table);
 
 int atomisp_offline_capture_configure(struct atomisp_sub_device *asd,
-                               struct atomisp_cont_capture_conf *cvf_config);
+                                     struct atomisp_cont_capture_conf *cvf_config);
 
 int atomisp_ospm_dphy_down(struct atomisp_device *isp);
 int atomisp_ospm_dphy_up(struct atomisp_device *isp);
@@ -381,7 +381,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
 
 void atomisp_css_flush(struct atomisp_device *isp);
 int atomisp_source_pad_to_stream_id(struct atomisp_sub_device *asd,
-                                          uint16_t source_pad);
+                                   uint16_t source_pad);
 
 /*
  * Events. Only one event has to be exported for now.
@@ -389,13 +389,13 @@ int atomisp_source_pad_to_stream_id(struct atomisp_sub_device *asd,
 void atomisp_eof_event(struct atomisp_sub_device *asd, uint8_t exp_id);
 
 enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
-                               enum atomisp_camera_port port);
+                                 enum atomisp_camera_port port);
 
 bool atomisp_is_vf_pipe(struct atomisp_video_pipe *pipe);
 
 void atomisp_apply_css_parameters(
-                               struct atomisp_sub_device *asd,
-                               struct atomisp_css_params *css_param);
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_params *css_param);
 void atomisp_free_css_parameters(struct atomisp_css_params *css_param);
 
 void atomisp_handle_parameter_and_buffer(struct atomisp_video_pipe *pipe);
@@ -417,7 +417,7 @@ void atomisp_init_raw_buffer_bitmap(struct atomisp_sub_device *asd);
  * Function to enable/disable zoom for capture pipe
  */
 int atomisp_enable_dz_capt_pipe(struct atomisp_sub_device *asd,
-                                          unsigned int *enable);
+                               unsigned int *enable);
 
 /*
  * Function to get metadata type bu pipe id
@@ -436,7 +436,7 @@ int atomisp_inject_a_fake_event(struct atomisp_sub_device *asd, int *event);
  * pipeline output
  */
 int atomisp_get_invalid_frame_num(struct video_device *vdev,
-                       int *invalid_frame_num);
+                                 int *invalid_frame_num);
 
 int atomisp_mrfld_power_up(struct atomisp_device *isp);
 int atomisp_mrfld_power_down(struct atomisp_device *isp);
index e74b205a9537e07be76041722c4c02ea6f48e7e7..205c530e80908f774b8559df5c8ef050f745d59d 100644 (file)
@@ -149,34 +149,34 @@ int atomisp_css_irq_translate(struct atomisp_device *isp,
                              unsigned int *infos);
 
 void atomisp_css_rx_get_irq_info(enum mipi_port_id port,
-                                       unsigned int *infos);
+                                unsigned int *infos);
 
 void atomisp_css_rx_clear_irq_info(enum mipi_port_id port,
-                                       unsigned int infos);
+                                  unsigned int infos);
 
 int atomisp_css_irq_enable(struct atomisp_device *isp,
                           enum atomisp_css_irq_info info, bool enable);
 
 int atomisp_q_video_buffer_to_css(struct atomisp_sub_device *asd,
-                       struct videobuf_vmalloc_memory *vm_mem,
-                       enum atomisp_input_stream_id stream_id,
-                       enum atomisp_css_buffer_type css_buf_type,
-                       enum atomisp_css_pipe_id css_pipe_id);
+                                 struct videobuf_vmalloc_memory *vm_mem,
+                                 enum atomisp_input_stream_id stream_id,
+                                 enum atomisp_css_buffer_type css_buf_type,
+                                 enum atomisp_css_pipe_id css_pipe_id);
 
 int atomisp_q_s3a_buffer_to_css(struct atomisp_sub_device *asd,
-                       struct atomisp_s3a_buf *s3a_buf,
-                       enum atomisp_input_stream_id stream_id,
-                       enum atomisp_css_pipe_id css_pipe_id);
+                               struct atomisp_s3a_buf *s3a_buf,
+                               enum atomisp_input_stream_id stream_id,
+                               enum atomisp_css_pipe_id css_pipe_id);
 
 int atomisp_q_metadata_buffer_to_css(struct atomisp_sub_device *asd,
-                       struct atomisp_metadata_buf *metadata_buf,
-                       enum atomisp_input_stream_id stream_id,
-                       enum atomisp_css_pipe_id css_pipe_id);
+                                    struct atomisp_metadata_buf *metadata_buf,
+                                    enum atomisp_input_stream_id stream_id,
+                                    enum atomisp_css_pipe_id css_pipe_id);
 
 int atomisp_q_dis_buffer_to_css(struct atomisp_sub_device *asd,
-                       struct atomisp_dis_buf *dis_buf,
-                       enum atomisp_input_stream_id stream_id,
-                       enum atomisp_css_pipe_id css_pipe_id);
+                               struct atomisp_dis_buf *dis_buf,
+                               enum atomisp_input_stream_id stream_id,
+                               enum atomisp_css_pipe_id css_pipe_id);
 
 void atomisp_css_mmu_invalidate_cache(void);
 
@@ -187,7 +187,7 @@ int atomisp_css_start(struct atomisp_sub_device *asd,
 
 void atomisp_css_update_isp_params(struct atomisp_sub_device *asd);
 void atomisp_css_update_isp_params_on_pipe(struct atomisp_sub_device *asd,
-                                       struct ia_css_pipe *pipe);
+       struct ia_css_pipe *pipe);
 
 int atomisp_css_queue_buffer(struct atomisp_sub_device *asd,
                             enum atomisp_input_stream_id stream_id,
@@ -196,10 +196,10 @@ int atomisp_css_queue_buffer(struct atomisp_sub_device *asd,
                             struct atomisp_css_buffer *isp_css_buffer);
 
 int atomisp_css_dequeue_buffer(struct atomisp_sub_device *asd,
-                               enum atomisp_input_stream_id stream_id,
-                               enum atomisp_css_pipe_id pipe_id,
-                               enum atomisp_css_buffer_type buf_type,
-                               struct atomisp_css_buffer *isp_css_buffer);
+                              enum atomisp_input_stream_id stream_id,
+                              enum atomisp_css_pipe_id pipe_id,
+                              enum atomisp_css_buffer_type buf_type,
+                              struct atomisp_css_buffer *isp_css_buffer);
 
 int atomisp_css_allocate_stat_buffers(struct atomisp_sub_device *asd,
                                      u16 stream_id,
@@ -213,11 +213,12 @@ void atomisp_css_free_3a_buffer(struct atomisp_s3a_buf *s3a_buf);
 
 void atomisp_css_free_dis_buffer(struct atomisp_dis_buf *dis_buf);
 
-void atomisp_css_free_metadata_buffer(struct atomisp_metadata_buf *metadata_buf);
+void atomisp_css_free_metadata_buffer(struct atomisp_metadata_buf
+                                     *metadata_buf);
 
 int atomisp_css_get_grid_info(struct atomisp_sub_device *asd,
-                               enum atomisp_css_pipe_id pipe_id,
-                               int source_pad);
+                             enum atomisp_css_pipe_id pipe_id,
+                             int source_pad);
 
 int atomisp_alloc_3a_output_buf(struct atomisp_sub_device *asd);
 
@@ -265,102 +266,102 @@ int atomisp_css_isys_two_stream_cfg(struct atomisp_sub_device *asd,
                                    enum atomisp_input_format input_format);
 
 void atomisp_css_isys_two_stream_cfg_update_stream1(
-                                   struct atomisp_sub_device *asd,
-                                   enum atomisp_input_stream_id stream_id,
-                                   enum atomisp_input_format input_format,
-                                   unsigned int width, unsigned int height);
+    struct atomisp_sub_device *asd,
+    enum atomisp_input_stream_id stream_id,
+    enum atomisp_input_format input_format,
+    unsigned int width, unsigned int height);
 
 void atomisp_css_isys_two_stream_cfg_update_stream2(
-                                   struct atomisp_sub_device *asd,
-                                   enum atomisp_input_stream_id stream_id,
-                                   enum atomisp_input_format input_format,
-                                   unsigned int width, unsigned int height);
+    struct atomisp_sub_device *asd,
+    enum atomisp_input_stream_id stream_id,
+    enum atomisp_input_format input_format,
+    unsigned int width, unsigned int height);
 
 int atomisp_css_input_set_resolution(struct atomisp_sub_device *asd,
-                                       enum atomisp_input_stream_id stream_id,
-                                       struct v4l2_mbus_framefmt *ffmt);
+                                    enum atomisp_input_stream_id stream_id,
+                                    struct v4l2_mbus_framefmt *ffmt);
 
 void atomisp_css_input_set_binning_factor(struct atomisp_sub_device *asd,
-                                       enum atomisp_input_stream_id stream_id,
-                                       unsigned int bin_factor);
+       enum atomisp_input_stream_id stream_id,
+       unsigned int bin_factor);
 
 void atomisp_css_input_set_bayer_order(struct atomisp_sub_device *asd,
-                               enum atomisp_input_stream_id stream_id,
-                               enum atomisp_css_bayer_order bayer_order);
+                                      enum atomisp_input_stream_id stream_id,
+                                      enum atomisp_css_bayer_order bayer_order);
 
 void atomisp_css_input_set_format(struct atomisp_sub_device *asd,
-                               enum atomisp_input_stream_id stream_id,
-                               enum atomisp_input_format format);
+                                 enum atomisp_input_stream_id stream_id,
+                                 enum atomisp_input_format format);
 
 int atomisp_css_input_set_effective_resolution(
-                                       struct atomisp_sub_device *asd,
-                                       enum atomisp_input_stream_id stream_id,
-                                       unsigned int width,
-                                       unsigned int height);
+    struct atomisp_sub_device *asd,
+    enum atomisp_input_stream_id stream_id,
+    unsigned int width,
+    unsigned int height);
 
 void atomisp_css_video_set_dis_envelope(struct atomisp_sub_device *asd,
                                        unsigned int dvs_w, unsigned int dvs_h);
 
 void atomisp_css_input_set_two_pixels_per_clock(
-                                       struct atomisp_sub_device *asd,
-                                       bool two_ppc);
+    struct atomisp_sub_device *asd,
+    bool two_ppc);
 
 void atomisp_css_enable_raw_binning(struct atomisp_sub_device *asd,
-                                       bool enable);
+                                   bool enable);
 
 void atomisp_css_enable_dz(struct atomisp_sub_device *asd, bool enable);
 
 void atomisp_css_capture_set_mode(struct atomisp_sub_device *asd,
-                               enum atomisp_css_capture_mode mode);
+                                 enum atomisp_css_capture_mode mode);
 
 void atomisp_css_input_set_mode(struct atomisp_sub_device *asd,
                                enum atomisp_css_input_mode mode);
 
 void atomisp_css_capture_enable_online(struct atomisp_sub_device *asd,
-                               unsigned short stream_index, bool enable);
+                                      unsigned short stream_index, bool enable);
 
 void atomisp_css_preview_enable_online(struct atomisp_sub_device *asd,
-                               unsigned short stream_index, bool enable);
+                                      unsigned short stream_index, bool enable);
 
 void atomisp_css_video_enable_online(struct atomisp_sub_device *asd,
-                                                       bool enable);
+                                    bool enable);
 
 void atomisp_css_enable_continuous(struct atomisp_sub_device *asd,
-                                                       bool enable);
+                                  bool enable);
 
 void atomisp_css_enable_cvf(struct atomisp_sub_device *asd,
-                                                       bool enable);
+                           bool enable);
 
 int atomisp_css_input_configure_port(struct atomisp_sub_device *asd,
-                               enum mipi_port_id port,
-                               unsigned int num_lanes,
-                               unsigned int timeout,
-                               unsigned int mipi_freq,
-                               enum atomisp_input_format metadata_format,
-                               unsigned int metadata_width,
-                               unsigned int metadata_height);
+                                    enum mipi_port_id port,
+                                    unsigned int num_lanes,
+                                    unsigned int timeout,
+                                    unsigned int mipi_freq,
+                                    enum atomisp_input_format metadata_format,
+                                    unsigned int metadata_width,
+                                    unsigned int metadata_height);
 
 int atomisp_css_frame_allocate(struct atomisp_css_frame **frame,
-                               unsigned int width, unsigned int height,
-                               enum atomisp_css_frame_format format,
-                               unsigned int padded_width,
-                               unsigned int raw_bit_depth);
+                              unsigned int width, unsigned int height,
+                              enum atomisp_css_frame_format format,
+                              unsigned int padded_width,
+                              unsigned int raw_bit_depth);
 
 int atomisp_css_frame_allocate_from_info(struct atomisp_css_frame **frame,
-                               const struct atomisp_css_frame_info *info);
+       const struct atomisp_css_frame_info *info);
 
 void atomisp_css_frame_free(struct atomisp_css_frame *frame);
 
 int atomisp_css_frame_map(struct atomisp_css_frame **frame,
-                               const struct atomisp_css_frame_info *info,
-                               const void __user *data, uint16_t attribute,
-                               void *context);
+                         const struct atomisp_css_frame_info *info,
+                         const void __user *data, uint16_t attribute,
+                         void *context);
 
 int atomisp_css_set_black_frame(struct atomisp_sub_device *asd,
-                       const struct atomisp_css_frame *raw_black_frame);
+                               const struct atomisp_css_frame *raw_black_frame);
 
 int atomisp_css_allocate_continuous_frames(bool init_time,
-                       struct atomisp_sub_device *asd);
+       struct atomisp_sub_device *asd);
 
 void atomisp_css_update_continuous_frames(struct atomisp_sub_device *asd);
 
@@ -368,117 +369,117 @@ void atomisp_create_pipes_stream(struct atomisp_sub_device *asd);
 void atomisp_destroy_pipes_stream_force(struct atomisp_sub_device *asd);
 
 int atomisp_css_stop(struct atomisp_sub_device *asd,
-                       enum atomisp_css_pipe_id pipe_id, bool in_reset);
+                    enum atomisp_css_pipe_id pipe_id, bool in_reset);
 
 int atomisp_css_continuous_set_num_raw_frames(
-                                       struct atomisp_sub_device *asd,
-                                       int num_frames);
+    struct atomisp_sub_device *asd,
+    int num_frames);
 
 void atomisp_css_disable_vf_pp(struct atomisp_sub_device *asd,
                               bool disable);
 
 int atomisp_css_copy_configure_output(struct atomisp_sub_device *asd,
-                               unsigned int stream_index,
-                               unsigned int width, unsigned int height,
-                               unsigned int padded_width,
-                               enum atomisp_css_frame_format format);
+                                     unsigned int stream_index,
+                                     unsigned int width, unsigned int height,
+                                     unsigned int padded_width,
+                                     enum atomisp_css_frame_format format);
 
 int atomisp_css_yuvpp_configure_output(struct atomisp_sub_device *asd,
-                               unsigned int stream_index,
-                               unsigned int width, unsigned int height,
-                               unsigned int padded_width,
-                               enum atomisp_css_frame_format format);
+                                      unsigned int stream_index,
+                                      unsigned int width, unsigned int height,
+                                      unsigned int padded_width,
+                                      enum atomisp_css_frame_format format);
 
 int atomisp_css_yuvpp_configure_viewfinder(
-                               struct atomisp_sub_device *asd,
-                               unsigned int stream_index,
-                               unsigned int width, unsigned int height,
-                               unsigned int min_width,
-                               enum atomisp_css_frame_format format);
+    struct atomisp_sub_device *asd,
+    unsigned int stream_index,
+    unsigned int width, unsigned int height,
+    unsigned int min_width,
+    enum atomisp_css_frame_format format);
 
 int atomisp_css_yuvpp_get_output_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       unsigned int stream_index,
-                                       struct atomisp_css_frame_info *info);
+    struct atomisp_sub_device *asd,
+    unsigned int stream_index,
+    struct atomisp_css_frame_info *info);
 
 int atomisp_css_yuvpp_get_viewfinder_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       unsigned int stream_index,
-                                       struct atomisp_css_frame_info *info);
+    struct atomisp_sub_device *asd,
+    unsigned int stream_index,
+    struct atomisp_css_frame_info *info);
 
 int atomisp_css_preview_configure_output(struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height,
-                               unsigned int min_width,
-                               enum atomisp_css_frame_format format);
+       unsigned int width, unsigned int height,
+       unsigned int min_width,
+       enum atomisp_css_frame_format format);
 
 int atomisp_css_capture_configure_output(struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height,
-                               unsigned int min_width,
-                               enum atomisp_css_frame_format format);
+       unsigned int width, unsigned int height,
+       unsigned int min_width,
+       enum atomisp_css_frame_format format);
 
 int atomisp_css_video_configure_output(struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height,
-                               unsigned int min_width,
-                               enum atomisp_css_frame_format format);
+                                      unsigned int width, unsigned int height,
+                                      unsigned int min_width,
+                                      enum atomisp_css_frame_format format);
 
 int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
-                               u16 source_pad,
-                               struct atomisp_css_frame_info *frame_info);
+                              u16 source_pad,
+                              struct atomisp_css_frame_info *frame_info);
 
 int atomisp_css_video_configure_viewfinder(struct atomisp_sub_device *asd,
-                                       unsigned int width, unsigned int height,
-                                       unsigned int min_width,
-                                       enum atomisp_css_frame_format format);
+       unsigned int width, unsigned int height,
+       unsigned int min_width,
+       enum atomisp_css_frame_format format);
 
 int atomisp_css_capture_configure_viewfinder(
-                                       struct atomisp_sub_device *asd,
-                                       unsigned int width, unsigned int height,
-                                       unsigned int min_width,
-                                       enum atomisp_css_frame_format format);
+    struct atomisp_sub_device *asd,
+    unsigned int width, unsigned int height,
+    unsigned int min_width,
+    enum atomisp_css_frame_format format);
 
 int atomisp_css_video_get_viewfinder_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info);
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info);
 
 int atomisp_css_capture_get_viewfinder_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info);
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info);
 
 int atomisp_css_copy_get_output_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       unsigned int stream_index,
-                                       struct atomisp_css_frame_info *info);
+    struct atomisp_sub_device *asd,
+    unsigned int stream_index,
+    struct atomisp_css_frame_info *info);
 
 int atomisp_css_capture_get_output_raw_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info);
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info);
 
 int atomisp_css_preview_get_output_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info);
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info);
 
 int atomisp_css_capture_get_output_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info);
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info);
 
 int atomisp_css_video_get_output_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info);
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info);
 
 int atomisp_css_preview_configure_pp_input(
-                               struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height);
+    struct atomisp_sub_device *asd,
+    unsigned int width, unsigned int height);
 
 int atomisp_css_capture_configure_pp_input(
-                               struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height);
+    struct atomisp_sub_device *asd,
+    unsigned int width, unsigned int height);
 
 int atomisp_css_video_configure_pp_input(
-                               struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height);
+    struct atomisp_sub_device *asd,
+    unsigned int width, unsigned int height);
 
 int atomisp_css_offline_capture_configure(struct atomisp_sub_device *asd,
-                       int num_captures, unsigned int skip, int offset);
+       int num_captures, unsigned int skip, int offset);
 int atomisp_css_exp_id_capture(struct atomisp_sub_device *asd, int exp_id);
 int atomisp_css_exp_id_unlock(struct atomisp_sub_device *asd, int exp_id);
 
@@ -494,130 +495,130 @@ bool atomisp_css_isp_has_started(void);
 void atomisp_css_request_flash(struct atomisp_sub_device *asd);
 
 void atomisp_css_set_wb_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_wb_config *wb_config);
+                              struct atomisp_css_wb_config *wb_config);
 
 void atomisp_css_set_ob_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ob_config *ob_config);
+                              struct atomisp_css_ob_config *ob_config);
 
 void atomisp_css_set_dp_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_dp_config *dp_config);
+                              struct atomisp_css_dp_config *dp_config);
 
 void atomisp_css_set_de_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_de_config *de_config);
+                              struct atomisp_css_de_config *de_config);
 
 void atomisp_css_set_dz_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_dz_config *dz_config);
+                              struct atomisp_css_dz_config *dz_config);
 
 void atomisp_css_set_default_de_config(struct atomisp_sub_device *asd);
 
 void atomisp_css_set_ce_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ce_config *ce_config);
+                              struct atomisp_css_ce_config *ce_config);
 
 void atomisp_css_set_nr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_nr_config *nr_config);
+                              struct atomisp_css_nr_config *nr_config);
 
 void atomisp_css_set_ee_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ee_config *ee_config);
+                              struct atomisp_css_ee_config *ee_config);
 
 void atomisp_css_set_tnr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_tnr_config *tnr_config);
+                               struct atomisp_css_tnr_config *tnr_config);
 
 void atomisp_css_set_cc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_cc_config *cc_config);
+                              struct atomisp_css_cc_config *cc_config);
 
 void atomisp_css_set_macc_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_macc_table *macc_table);
+                               struct atomisp_css_macc_table *macc_table);
 
 void atomisp_css_set_gamma_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_gamma_table *gamma_table);
+                                struct atomisp_css_gamma_table *gamma_table);
 
 void atomisp_css_set_ctc_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ctc_table *ctc_table);
+                              struct atomisp_css_ctc_table *ctc_table);
 
 void atomisp_css_set_gc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_gc_config *gc_config);
+                              struct atomisp_css_gc_config *gc_config);
 
 void atomisp_css_set_3a_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_3a_config *s3a_config);
+                              struct atomisp_css_3a_config *s3a_config);
 
 void atomisp_css_video_set_dis_vector(struct atomisp_sub_device *asd,
-                               struct atomisp_dis_vector *vector);
+                                     struct atomisp_dis_vector *vector);
 
 void atomisp_css_set_dvs2_coefs(struct atomisp_sub_device *asd,
                                struct ia_css_dvs2_coefficients *coefs);
 
 int atomisp_css_set_dis_coefs(struct atomisp_sub_device *asd,
-                         struct atomisp_dis_coefficients *coefs);
+                             struct atomisp_dis_coefficients *coefs);
 
 void atomisp_css_set_zoom_factor(struct atomisp_sub_device *asd,
-                                       unsigned int zoom);
+                                unsigned int zoom);
 
 int atomisp_css_get_wb_config(struct atomisp_sub_device *asd,
-                       struct atomisp_wb_config *config);
+                             struct atomisp_wb_config *config);
 
 int atomisp_css_get_ob_config(struct atomisp_sub_device *asd,
-                       struct atomisp_ob_config *config);
+                             struct atomisp_ob_config *config);
 
 int atomisp_css_get_dp_config(struct atomisp_sub_device *asd,
-                       struct atomisp_dp_config *config);
+                             struct atomisp_dp_config *config);
 
 int atomisp_css_get_de_config(struct atomisp_sub_device *asd,
-                       struct atomisp_de_config *config);
+                             struct atomisp_de_config *config);
 
 int atomisp_css_get_nr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_nr_config *config);
+                             struct atomisp_nr_config *config);
 
 int atomisp_css_get_ee_config(struct atomisp_sub_device *asd,
-                       struct atomisp_ee_config *config);
+                             struct atomisp_ee_config *config);
 
 int atomisp_css_get_tnr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_tnr_config *config);
+                              struct atomisp_tnr_config *config);
 
 int atomisp_css_get_ctc_table(struct atomisp_sub_device *asd,
-                       struct atomisp_ctc_table *config);
+                             struct atomisp_ctc_table *config);
 
 int atomisp_css_get_gamma_table(struct atomisp_sub_device *asd,
-                       struct atomisp_gamma_table *config);
+                               struct atomisp_gamma_table *config);
 
 int atomisp_css_get_gc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_gc_config *config);
+                             struct atomisp_gc_config *config);
 
 int atomisp_css_get_3a_config(struct atomisp_sub_device *asd,
-                       struct atomisp_3a_config *config);
+                             struct atomisp_3a_config *config);
 
 int atomisp_css_get_formats_config(struct atomisp_sub_device *asd,
-                       struct atomisp_formats_config *formats_config);
+                                  struct atomisp_formats_config *formats_config);
 
 void atomisp_css_set_formats_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_formats_config *formats_config);
+                                   struct atomisp_css_formats_config *formats_config);
 
 int atomisp_css_get_zoom_factor(struct atomisp_sub_device *asd,
-                                       unsigned int *zoom);
+                               unsigned int *zoom);
 
 struct atomisp_css_shading_table *atomisp_css_shading_table_alloc(
-                               unsigned int width, unsigned int height);
+    unsigned int width, unsigned int height);
 
 void atomisp_css_set_shading_table(struct atomisp_sub_device *asd,
-                               struct atomisp_css_shading_table *table);
+                                  struct atomisp_css_shading_table *table);
 
 void atomisp_css_shading_table_free(struct atomisp_css_shading_table *table);
 
 struct atomisp_css_morph_table *atomisp_css_morph_table_allocate(
-                               unsigned int width, unsigned int height);
+    unsigned int width, unsigned int height);
 
 void atomisp_css_set_morph_table(struct atomisp_sub_device *asd,
-                               struct atomisp_css_morph_table *table);
+                                struct atomisp_css_morph_table *table);
 
 void atomisp_css_get_morph_table(struct atomisp_sub_device *asd,
-                               struct atomisp_css_morph_table *table);
+                                struct atomisp_css_morph_table *table);
 
 void atomisp_css_morph_table_free(struct atomisp_css_morph_table *table);
 
 void atomisp_css_set_cont_prev_start_time(struct atomisp_device *isp,
-                                       unsigned int overlap);
+       unsigned int overlap);
 
 int atomisp_css_get_dis_stat(struct atomisp_sub_device *asd,
-                        struct atomisp_dis_statistics *stats);
+                            struct atomisp_dis_statistics *stats);
 
 int atomisp_css_update_stream(struct atomisp_sub_device *asd);
 
@@ -630,21 +631,21 @@ int atomisp_css_stop_acc_pipe(struct atomisp_sub_device *asd);
 void atomisp_css_destroy_acc_pipe(struct atomisp_sub_device *asd);
 
 int atomisp_css_load_acc_extension(struct atomisp_sub_device *asd,
-                                       struct atomisp_css_fw_info *fw,
-                                       enum atomisp_css_pipe_id pipe_id,
-                                       unsigned int type);
+                                  struct atomisp_css_fw_info *fw,
+                                  enum atomisp_css_pipe_id pipe_id,
+                                  unsigned int type);
 
 void atomisp_css_unload_acc_extension(struct atomisp_sub_device *asd,
-                                       struct atomisp_css_fw_info *fw,
-                                       enum atomisp_css_pipe_id pipe_id);
+                                     struct atomisp_css_fw_info *fw,
+                                     enum atomisp_css_pipe_id pipe_id);
 
 int atomisp_css_wait_acc_finish(struct atomisp_sub_device *asd);
 
 void atomisp_css_acc_done(struct atomisp_sub_device *asd);
 
 int atomisp_css_load_acc_binary(struct atomisp_sub_device *asd,
-                                       struct atomisp_css_fw_info *fw,
-                                       unsigned int index);
+                               struct atomisp_css_fw_info *fw,
+                               unsigned int index);
 
 void atomisp_css_unload_acc_binary(struct atomisp_sub_device *asd);
 
index 56c69b473898729f4c6901fcd116abf8ce42ce85..fe094dec8e03d82cdef8371e673dc90ed3809612 100644 (file)
@@ -211,12 +211,12 @@ static int hmm_get_mmu_base_addr(unsigned int *mmu_base_addr)
        }
 
        *mmu_base_addr = sh_mmu_mrfld.get_pd_base(&bo_device.mmu,
-                                       bo_device.mmu.base_address);
+                        bo_device.mmu.base_address);
        return 0;
 }
 
 static void atomisp_isp_parameters_clean_up(
-                               struct atomisp_css_isp_config *config)
+    struct atomisp_css_isp_config *config)
 {
        /*
         * Set NULL to configs pointer to avoid they are set into isp again when
@@ -239,89 +239,89 @@ static void __dump_pipe_config(struct atomisp_sub_device *asd,
                pe_config = &stream_env->pipe_extra_configs[pipe_id];
                dev_dbg(isp->dev, "dumping pipe[%d] config:\n", pipe_id);
                dev_dbg(isp->dev,
-                        "pipe_config.pipe_mode:%d.\n", p_config->mode);
+                       "pipe_config.pipe_mode:%d.\n", p_config->mode);
                dev_dbg(isp->dev,
-                        "pipe_config.output_info[0] w=%d, h=%d.\n",
-                        p_config->output_info[0].res.width,
-                        p_config->output_info[0].res.height);
+                       "pipe_config.output_info[0] w=%d, h=%d.\n",
+                       p_config->output_info[0].res.width,
+                       p_config->output_info[0].res.height);
                dev_dbg(isp->dev,
-                        "pipe_config.vf_pp_in_res w=%d, h=%d.\n",
-                        p_config->vf_pp_in_res.width,
-                        p_config->vf_pp_in_res.height);
+                       "pipe_config.vf_pp_in_res w=%d, h=%d.\n",
+                       p_config->vf_pp_in_res.width,
+                       p_config->vf_pp_in_res.height);
                dev_dbg(isp->dev,
-                        "pipe_config.capt_pp_in_res w=%d, h=%d.\n",
-                        p_config->capt_pp_in_res.width,
-                        p_config->capt_pp_in_res.height);
+                       "pipe_config.capt_pp_in_res w=%d, h=%d.\n",
+                       p_config->capt_pp_in_res.width,
+                       p_config->capt_pp_in_res.height);
                dev_dbg(isp->dev,
-                        "pipe_config.output.padded w=%d.\n",
-                        p_config->output_info[0].padded_width);
+                       "pipe_config.output.padded w=%d.\n",
+                       p_config->output_info[0].padded_width);
                dev_dbg(isp->dev,
-                        "pipe_config.vf_output_info[0] w=%d, h=%d.\n",
-                        p_config->vf_output_info[0].res.width,
-                        p_config->vf_output_info[0].res.height);
+                       "pipe_config.vf_output_info[0] w=%d, h=%d.\n",
+                       p_config->vf_output_info[0].res.width,
+                       p_config->vf_output_info[0].res.height);
                dev_dbg(isp->dev,
-                        "pipe_config.bayer_ds_out_res w=%d, h=%d.\n",
-                        p_config->bayer_ds_out_res.width,
-                        p_config->bayer_ds_out_res.height);
+                       "pipe_config.bayer_ds_out_res w=%d, h=%d.\n",
+                       p_config->bayer_ds_out_res.width,
+                       p_config->bayer_ds_out_res.height);
                dev_dbg(isp->dev,
-                        "pipe_config.envelope w=%d, h=%d.\n",
-                        p_config->dvs_envelope.width,
-                        p_config->dvs_envelope.height);
+                       "pipe_config.envelope w=%d, h=%d.\n",
+                       p_config->dvs_envelope.width,
+                       p_config->dvs_envelope.height);
                dev_dbg(isp->dev,
-                        "pipe_config.dvs_frame_delay=%d.\n",
-                        p_config->dvs_frame_delay);
+                       "pipe_config.dvs_frame_delay=%d.\n",
+                       p_config->dvs_frame_delay);
                dev_dbg(isp->dev,
-                        "pipe_config.isp_pipe_version:%d.\n",
+                       "pipe_config.isp_pipe_version:%d.\n",
                        p_config->isp_pipe_version);
                dev_dbg(isp->dev,
-                        "pipe_config.acc_extension=%p.\n",
-                        p_config->acc_extension);
+                       "pipe_config.acc_extension=%p.\n",
+                       p_config->acc_extension);
                dev_dbg(isp->dev,
-                        "pipe_config.acc_stages=%p.\n",
-                        p_config->acc_stages);
+                       "pipe_config.acc_stages=%p.\n",
+                       p_config->acc_stages);
                dev_dbg(isp->dev,
-                        "pipe_config.num_acc_stages=%d.\n",
-                        p_config->num_acc_stages);
+                       "pipe_config.num_acc_stages=%d.\n",
+                       p_config->num_acc_stages);
                dev_dbg(isp->dev,
-                        "pipe_config.acc_num_execs=%d.\n",
-                        p_config->acc_num_execs);
+                       "pipe_config.acc_num_execs=%d.\n",
+                       p_config->acc_num_execs);
                dev_dbg(isp->dev,
-                        "pipe_config.default_capture_config.capture_mode=%d.\n",
-                        p_config->default_capture_config.mode);
+                       "pipe_config.default_capture_config.capture_mode=%d.\n",
+                       p_config->default_capture_config.mode);
                dev_dbg(isp->dev,
-                        "pipe_config.enable_dz=%d.\n",
-                        p_config->enable_dz);
+                       "pipe_config.enable_dz=%d.\n",
+                       p_config->enable_dz);
                dev_dbg(isp->dev,
-                        "pipe_config.default_capture_config.enable_xnr=%d.\n",
-                        p_config->default_capture_config.enable_xnr);
+                       "pipe_config.default_capture_config.enable_xnr=%d.\n",
+                       p_config->default_capture_config.enable_xnr);
                dev_dbg(isp->dev,
-                        "dumping pipe[%d] extra config:\n", pipe_id);
+                       "dumping pipe[%d] extra config:\n", pipe_id);
                dev_dbg(isp->dev,
-                        "pipe_extra_config.enable_raw_binning:%d.\n",
-                        pe_config->enable_raw_binning);
+                       "pipe_extra_config.enable_raw_binning:%d.\n",
+                       pe_config->enable_raw_binning);
                dev_dbg(isp->dev,
-                        "pipe_extra_config.enable_yuv_ds:%d.\n",
-                        pe_config->enable_yuv_ds);
+                       "pipe_extra_config.enable_yuv_ds:%d.\n",
+                       pe_config->enable_yuv_ds);
                dev_dbg(isp->dev,
-                        "pipe_extra_config.enable_high_speed:%d.\n",
-                        pe_config->enable_high_speed);
+                       "pipe_extra_config.enable_high_speed:%d.\n",
+                       pe_config->enable_high_speed);
                dev_dbg(isp->dev,
-                        "pipe_extra_config.enable_dvs_6axis:%d.\n",
-                        pe_config->enable_dvs_6axis);
+                       "pipe_extra_config.enable_dvs_6axis:%d.\n",
+                       pe_config->enable_dvs_6axis);
                dev_dbg(isp->dev,
-                        "pipe_extra_config.enable_reduced_pipe:%d.\n",
-                        pe_config->enable_reduced_pipe);
+                       "pipe_extra_config.enable_reduced_pipe:%d.\n",
+                       pe_config->enable_reduced_pipe);
                dev_dbg(isp->dev,
-                        "pipe_(extra_)config.enable_dz:%d.\n",
-                        p_config->enable_dz);
+                       "pipe_(extra_)config.enable_dz:%d.\n",
+                       p_config->enable_dz);
                dev_dbg(isp->dev,
-                        "pipe_extra_config.disable_vf_pp:%d.\n",
-                        pe_config->disable_vf_pp);
+                       "pipe_extra_config.disable_vf_pp:%d.\n",
+                       pe_config->disable_vf_pp);
        }
 }
 
 static void __dump_stream_config(struct atomisp_sub_device *asd,
-                               struct atomisp_stream_env *stream_env)
+                                struct atomisp_stream_env *stream_env)
 {
        struct atomisp_device *isp = asd->isp;
        struct ia_css_stream_config *s_config;
@@ -342,47 +342,49 @@ static void __dump_stream_config(struct atomisp_sub_device *asd,
        if (s_config->mode == IA_CSS_INPUT_MODE_SENSOR ||
            s_config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
                dev_dbg(isp->dev, "stream_config.source.port.port=%d.\n",
-                               s_config->source.port.port);
+                       s_config->source.port.port);
                dev_dbg(isp->dev, "stream_config.source.port.num_lanes=%d.\n",
-                               s_config->source.port.num_lanes);
+                       s_config->source.port.num_lanes);
                dev_dbg(isp->dev, "stream_config.source.port.timeout=%d.\n",
-                               s_config->source.port.timeout);
+                       s_config->source.port.timeout);
                dev_dbg(isp->dev, "stream_config.source.port.rxcount=0x%x.\n",
-                               s_config->source.port.rxcount);
+                       s_config->source.port.rxcount);
                dev_dbg(isp->dev, "stream_config.source.port.compression.type=%d.\n",
-                               s_config->source.port.compression.type);
-               dev_dbg(isp->dev, "stream_config.source.port.compression.compressed_bits_per_pixel=%d.\n",
-                               s_config->source.port.compression.
-                               compressed_bits_per_pixel);
-               dev_dbg(isp->dev, "stream_config.source.port.compression.uncompressed_bits_per_pixel=%d.\n",
-                               s_config->source.port.compression.
-                               uncompressed_bits_per_pixel);
+                       s_config->source.port.compression.type);
+               dev_dbg(isp->dev,
+                       "stream_config.source.port.compression.compressed_bits_per_pixel=%d.\n",
+                       s_config->source.port.compression.
+                       compressed_bits_per_pixel);
+               dev_dbg(isp->dev,
+                       "stream_config.source.port.compression.uncompressed_bits_per_pixel=%d.\n",
+                       s_config->source.port.compression.
+                       uncompressed_bits_per_pixel);
        } else if (s_config->mode == IA_CSS_INPUT_MODE_TPG) {
                dev_dbg(isp->dev, "stream_config.source.tpg.id=%d.\n",
-                               s_config->source.tpg.id);
+                       s_config->source.tpg.id);
                dev_dbg(isp->dev, "stream_config.source.tpg.mode=%d.\n",
-                               s_config->source.tpg.mode);
+                       s_config->source.tpg.mode);
                dev_dbg(isp->dev, "stream_config.source.tpg.x_mask=%d.\n",
-                               s_config->source.tpg.x_mask);
+                       s_config->source.tpg.x_mask);
                dev_dbg(isp->dev, "stream_config.source.tpg.x_delta=%d.\n",
-                               s_config->source.tpg.x_delta);
+                       s_config->source.tpg.x_delta);
                dev_dbg(isp->dev, "stream_config.source.tpg.y_mask=%d.\n",
-                               s_config->source.tpg.y_mask);
+                       s_config->source.tpg.y_mask);
                dev_dbg(isp->dev, "stream_config.source.tpg.y_delta=%d.\n",
-                               s_config->source.tpg.y_delta);
+                       s_config->source.tpg.y_delta);
                dev_dbg(isp->dev, "stream_config.source.tpg.xy_mask=%d.\n",
-                               s_config->source.tpg.xy_mask);
+                       s_config->source.tpg.xy_mask);
        } else if (s_config->mode == IA_CSS_INPUT_MODE_PRBS) {
                dev_dbg(isp->dev, "stream_config.source.prbs.id=%d.\n",
-                               s_config->source.prbs.id);
+                       s_config->source.prbs.id);
                dev_dbg(isp->dev, "stream_config.source.prbs.h_blank=%d.\n",
-                               s_config->source.prbs.h_blank);
+                       s_config->source.prbs.h_blank);
                dev_dbg(isp->dev, "stream_config.source.prbs.v_blank=%d.\n",
-                               s_config->source.prbs.v_blank);
+                       s_config->source.prbs.v_blank);
                dev_dbg(isp->dev, "stream_config.source.prbs.seed=%d.\n",
-                               s_config->source.prbs.seed);
+                       s_config->source.prbs.seed);
                dev_dbg(isp->dev, "stream_config.source.prbs.seed1=%d.\n",
-                               s_config->source.prbs.seed1);
+                       s_config->source.prbs.seed1);
        }
 
        for (j = 0; j < IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH; j++) {
@@ -419,41 +421,41 @@ static void __dump_stream_config(struct atomisp_sub_device *asd,
                s_config->input_config.bayer_order);
 
        dev_dbg(isp->dev, "stream_config.pixels_per_clock=%d.\n",
-                       s_config->pixels_per_clock);
+               s_config->pixels_per_clock);
        dev_dbg(isp->dev, "stream_config.online=%d.\n", s_config->online);
        dev_dbg(isp->dev, "stream_config.continuous=%d.\n",
-                       s_config->continuous);
+               s_config->continuous);
        dev_dbg(isp->dev, "stream_config.disable_cont_viewfinder=%d.\n",
-                       s_config->disable_cont_viewfinder);
+               s_config->disable_cont_viewfinder);
        dev_dbg(isp->dev, "stream_config.channel_id=%d.\n",
-                       s_config->channel_id);
+               s_config->channel_id);
        dev_dbg(isp->dev, "stream_config.init_num_cont_raw_buf=%d.\n",
-                       s_config->init_num_cont_raw_buf);
+               s_config->init_num_cont_raw_buf);
        dev_dbg(isp->dev, "stream_config.target_num_cont_raw_buf=%d.\n",
-                       s_config->target_num_cont_raw_buf);
+               s_config->target_num_cont_raw_buf);
        dev_dbg(isp->dev, "stream_config.left_padding=%d.\n",
-                       s_config->left_padding);
+               s_config->left_padding);
        dev_dbg(isp->dev, "stream_config.sensor_binning_factor=%d.\n",
-                       s_config->sensor_binning_factor);
+               s_config->sensor_binning_factor);
        dev_dbg(isp->dev, "stream_config.pixels_per_clock=%d.\n",
-                       s_config->pixels_per_clock);
+               s_config->pixels_per_clock);
        dev_dbg(isp->dev, "stream_config.pack_raw_pixels=%d.\n",
-                       s_config->pack_raw_pixels);
+               s_config->pack_raw_pixels);
        dev_dbg(isp->dev, "stream_config.flash_gpio_pin=%d.\n",
-                       s_config->flash_gpio_pin);
+               s_config->flash_gpio_pin);
        dev_dbg(isp->dev, "stream_config.mipi_buffer_config.size_mem_words=%d.\n",
-                       s_config->mipi_buffer_config.size_mem_words);
+               s_config->mipi_buffer_config.size_mem_words);
        dev_dbg(isp->dev, "stream_config.mipi_buffer_config.contiguous=%d.\n",
-                       s_config->mipi_buffer_config.contiguous);
+               s_config->mipi_buffer_config.contiguous);
        dev_dbg(isp->dev, "stream_config.metadata_config.data_type=%d.\n",
-                       s_config->metadata_config.data_type);
+               s_config->metadata_config.data_type);
        dev_dbg(isp->dev, "stream_config.metadata_config.resolution w=%d, h=%d.\n",
-                       s_config->metadata_config.resolution.width,
-                       s_config->metadata_config.resolution.height);
+               s_config->metadata_config.resolution.width,
+               s_config->metadata_config.resolution.height);
 }
 
 static int __destroy_stream(struct atomisp_sub_device *asd,
-                       struct atomisp_stream_env *stream_env, bool force)
+                           struct atomisp_stream_env *stream_env, bool force)
 {
        struct atomisp_device *isp = asd->isp;
        int i;
@@ -531,17 +533,17 @@ static int __create_stream(struct atomisp_sub_device *asd,
                return 0;
 
        stream_env->stream_config.target_num_cont_raw_buf =
-               asd->continuous_raw_buffer_size->val;
+           asd->continuous_raw_buffer_size->val;
        stream_env->stream_config.channel_id = stream_env->ch_id;
        stream_env->stream_config.ia_css_enable_raw_buffer_locking =
-               asd->enable_raw_buffer_lock->val;
+           asd->enable_raw_buffer_lock->val;
 
        __dump_stream_config(asd, stream_env);
        if (ia_css_stream_create(&stream_env->stream_config,
-           pipe_index, multi_pipes, &stream_env->stream) != IA_CSS_SUCCESS)
+                                pipe_index, multi_pipes, &stream_env->stream) != IA_CSS_SUCCESS)
                return -EINVAL;
        if (ia_css_stream_get_info(stream_env->stream,
-                               &stream_env->stream_info) != IA_CSS_SUCCESS) {
+                                  &stream_env->stream_info) != IA_CSS_SUCCESS) {
                ia_css_stream_destroy(stream_env->stream);
                stream_env->stream = NULL;
                return -EINVAL;
@@ -621,59 +623,59 @@ void atomisp_destroy_pipes_stream_force(struct atomisp_sub_device *asd)
 }
 
 static void __apply_additional_pipe_config(
-                               struct atomisp_sub_device *asd,
-                               struct atomisp_stream_env *stream_env,
-                               enum ia_css_pipe_id pipe_id)
+    struct atomisp_sub_device *asd,
+    struct atomisp_stream_env *stream_env,
+    enum ia_css_pipe_id pipe_id)
 {
        struct atomisp_device *isp = asd->isp;
 
        if (pipe_id < 0 || pipe_id >= IA_CSS_PIPE_ID_NUM) {
                dev_err(isp->dev,
-                        "wrong pipe_id for additional pipe config.\n");
+                       "wrong pipe_id for additional pipe config.\n");
                return;
        }
 
        /* apply default pipe config */
        stream_env->pipe_configs[pipe_id].isp_pipe_version = 2;
        stream_env->pipe_configs[pipe_id].enable_dz =
-                               asd->disable_dz->val ? false : true;
+           asd->disable_dz->val ? false : true;
        /* apply isp 2.2 specific config for baytrail*/
        switch (pipe_id) {
        case IA_CSS_PIPE_ID_CAPTURE:
                /* enable capture pp/dz manually or digital zoom would
                 * fail*/
                if (stream_env->pipe_configs[pipe_id].
-                       default_capture_config.mode == CSS_CAPTURE_MODE_RAW)
+                   default_capture_config.mode == CSS_CAPTURE_MODE_RAW)
                        stream_env->pipe_configs[pipe_id].enable_dz = false;
 #ifdef ISP2401
 
                /* the isp default to use ISP2.2 and the camera hal will
                 * control whether use isp2.7 */
                if (asd->select_isp_version->val ==
-                       ATOMISP_CSS_ISP_PIPE_VERSION_2_7)
+                   ATOMISP_CSS_ISP_PIPE_VERSION_2_7)
                        stream_env->pipe_configs[pipe_id].isp_pipe_version =
-                               SH_CSS_ISP_PIPE_VERSION_2_7;
+                           SH_CSS_ISP_PIPE_VERSION_2_7;
                else
                        stream_env->pipe_configs[pipe_id].isp_pipe_version =
-                               SH_CSS_ISP_PIPE_VERSION_2_2;
+                           SH_CSS_ISP_PIPE_VERSION_2_2;
 #endif
                break;
        case IA_CSS_PIPE_ID_VIDEO:
                /* enable reduced pipe to have binary
                 * video_dz_2_min selected*/
                stream_env->pipe_extra_configs[pipe_id]
-                   .enable_reduced_pipe = true;
+               .enable_reduced_pipe = true;
                stream_env->pipe_configs[pipe_id]
-                   .enable_dz = false;
+               .enable_dz = false;
                if (ATOMISP_SOC_CAMERA(asd))
                        stream_env->pipe_configs[pipe_id].enable_dz = true;
 
                if (asd->params.video_dis_en) {
                        stream_env->pipe_extra_configs[pipe_id]
-                               .enable_dvs_6axis = true;
+                       .enable_dvs_6axis = true;
                        stream_env->pipe_configs[pipe_id]
-                               .dvs_frame_delay =
-                                       ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
+                       .dvs_frame_delay =
+                           ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
                }
                break;
        case IA_CSS_PIPE_ID_PREVIEW:
@@ -695,7 +697,7 @@ static void __apply_additional_pipe_config(
 }
 
 static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd,
-                                       enum ia_css_pipe_id pipe_id)
+       enum ia_css_pipe_id pipe_id)
 {
        if (!asd)
                return false;
@@ -736,7 +738,7 @@ static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd,
                        else
                                return false;
                }
-               /* fall through to ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE */
+       /* fall through to ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE */
        case ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE:
                if (pipe_id == IA_CSS_PIPE_ID_CAPTURE ||
                    pipe_id == IA_CSS_PIPE_ID_PREVIEW)
@@ -751,7 +753,7 @@ static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd,
                        else
                                return false;
                }
-               /* fall through to ATOMISP_RUN_MODE_SDV */
+       /* fall through to ATOMISP_RUN_MODE_SDV */
        case ATOMISP_RUN_MODE_SDV:
                if (pipe_id == IA_CSS_PIPE_ID_CAPTURE ||
                    pipe_id == IA_CSS_PIPE_ID_VIDEO)
@@ -792,13 +794,13 @@ static int __create_pipe(struct atomisp_sub_device *asd,
                    &stream_env->pipe_extra_configs[pipe_id],
                    sizeof(extra_config)))
                ret = ia_css_pipe_create(
-                       &stream_env->pipe_configs[pipe_id],
-                       &stream_env->pipes[pipe_id]);
+                         &stream_env->pipe_configs[pipe_id],
+                         &stream_env->pipes[pipe_id]);
        else
                ret = ia_css_pipe_create_extra(
-                       &stream_env->pipe_configs[pipe_id],
-                       &stream_env->pipe_extra_configs[pipe_id],
-                       &stream_env->pipes[pipe_id]);
+                         &stream_env->pipe_configs[pipe_id],
+                         &stream_env->pipe_extra_configs[pipe_id],
+                         &stream_env->pipes[pipe_id]);
        if (ret != IA_CSS_SUCCESS)
                dev_err(isp->dev, "create pipe[%d] error.\n", pipe_id);
        return ret;
@@ -898,10 +900,10 @@ static inline int __set_css_print_env(struct atomisp_device *isp, int opt)
                isp->css_env.isp_css_env.print_env.debug_print = NULL;
        else if (opt == 1)
                isp->css_env.isp_css_env.print_env.debug_print =
-                       atomisp_css2_dbg_ftrace_print;
+                   atomisp_css2_dbg_ftrace_print;
        else if (opt == 2)
                isp->css_env.isp_css_env.print_env.debug_print =
-                       atomisp_css2_dbg_print;
+                   atomisp_css2_dbg_print;
        else
                ret = -EINVAL;
 
@@ -926,17 +928,17 @@ int atomisp_css_load_firmware(struct atomisp_device *isp)
        isp->css_env.isp_css_fw.bytes = isp->firmware->size;
 
        isp->css_env.isp_css_env.hw_access_env.store_8 =
-                                                       atomisp_css2_hw_store_8;
+           atomisp_css2_hw_store_8;
        isp->css_env.isp_css_env.hw_access_env.store_16 =
-                                               atomisp_css2_hw_store_16;
+           atomisp_css2_hw_store_16;
        isp->css_env.isp_css_env.hw_access_env.store_32 =
-                                               atomisp_css2_hw_store_32;
+           atomisp_css2_hw_store_32;
 
        isp->css_env.isp_css_env.hw_access_env.load_8 = atomisp_css2_hw_load_8;
        isp->css_env.isp_css_env.hw_access_env.load_16 =
-                                                       atomisp_css2_hw_load_16;
+           atomisp_css2_hw_load_16;
        isp->css_env.isp_css_env.hw_access_env.load_32 =
-                                                       atomisp_css2_hw_load_32;
+           atomisp_css2_hw_load_32;
 
        isp->css_env.isp_css_env.hw_access_env.load = atomisp_css2_hw_load;
        isp->css_env.isp_css_env.hw_access_env.store = atomisp_css2_hw_store;
@@ -1013,8 +1015,8 @@ int atomisp_css_irq_translate(struct atomisp_device *isp,
        err = ia_css_irq_translate(infos);
        if (err != IA_CSS_SUCCESS) {
                dev_warn(isp->dev,
-                         "%s:failed to translate irq (err = %d,infos = %d)\n",
-                         __func__, err, *infos);
+                        "%s:failed to translate irq (err = %d,infos = %d)\n",
+                        __func__, err, *infos);
                return -EINVAL;
        }
 
@@ -1022,7 +1024,7 @@ int atomisp_css_irq_translate(struct atomisp_device *isp,
 }
 
 void atomisp_css_rx_get_irq_info(enum mipi_port_id port,
-                                       unsigned int *infos)
+                                unsigned int *infos)
 {
 #ifndef ISP2401_NEW_INPUT_SYSTEM
        ia_css_isys_rx_get_irq_info(port, infos);
@@ -1032,7 +1034,7 @@ void atomisp_css_rx_get_irq_info(enum mipi_port_id port,
 }
 
 void atomisp_css_rx_clear_irq_info(enum mipi_port_id port,
-                                       unsigned int infos)
+                                  unsigned int infos)
 {
 #ifndef ISP2401_NEW_INPUT_SYSTEM
        ia_css_isys_rx_clear_irq_info(port, infos);
@@ -1040,7 +1042,7 @@ void atomisp_css_rx_clear_irq_info(enum mipi_port_id port,
 }
 
 int atomisp_css_irq_enable(struct atomisp_device *isp,
-                           enum atomisp_css_irq_info info, bool enable)
+                          enum atomisp_css_irq_info info, bool enable)
 {
        if (ia_css_irq_enable(info, enable) != IA_CSS_SUCCESS) {
                dev_warn(isp->dev, "%s:Invalid irq info.\n", __func__);
@@ -1060,19 +1062,19 @@ void atomisp_css_init_struct(struct atomisp_sub_device *asd)
                        asd->stream_env[i].pipes[j] = NULL;
                        asd->stream_env[i].update_pipe[j] = false;
                        ia_css_pipe_config_defaults(
-                               &asd->stream_env[i].pipe_configs[j]);
+                           &asd->stream_env[i].pipe_configs[j]);
                        ia_css_pipe_extra_config_defaults(
-                               &asd->stream_env[i].pipe_extra_configs[j]);
+                           &asd->stream_env[i].pipe_extra_configs[j]);
                }
                ia_css_stream_config_defaults(&asd->stream_env[i].stream_config);
        }
 }
 
 int atomisp_q_video_buffer_to_css(struct atomisp_sub_device *asd,
-                       struct videobuf_vmalloc_memory *vm_mem,
-                       enum atomisp_input_stream_id stream_id,
-                       enum atomisp_css_buffer_type css_buf_type,
-                       enum atomisp_css_pipe_id css_pipe_id)
+                                 struct videobuf_vmalloc_memory *vm_mem,
+                                 enum atomisp_input_stream_id stream_id,
+                                 enum atomisp_css_buffer_type css_buf_type,
+                                 enum atomisp_css_pipe_id css_pipe_id)
 {
        struct atomisp_stream_env *stream_env = &asd->stream_env[stream_id];
        struct ia_css_buffer css_buf = {0};
@@ -1082,7 +1084,7 @@ int atomisp_q_video_buffer_to_css(struct atomisp_sub_device *asd,
        css_buf.data.frame = vm_mem->vaddr;
 
        err = ia_css_pipe_enqueue_buffer(
-                               stream_env->pipes[css_pipe_id], &css_buf);
+                 stream_env->pipes[css_pipe_id], &css_buf);
        if (err != IA_CSS_SUCCESS)
                return -EINVAL;
 
@@ -1090,9 +1092,9 @@ int atomisp_q_video_buffer_to_css(struct atomisp_sub_device *asd,
 }
 
 int atomisp_q_metadata_buffer_to_css(struct atomisp_sub_device *asd,
-                       struct atomisp_metadata_buf *metadata_buf,
-                       enum atomisp_input_stream_id stream_id,
-                       enum atomisp_css_pipe_id css_pipe_id)
+                                    struct atomisp_metadata_buf *metadata_buf,
+                                    enum atomisp_input_stream_id stream_id,
+                                    enum atomisp_css_pipe_id css_pipe_id)
 {
        struct atomisp_stream_env *stream_env = &asd->stream_env[stream_id];
        struct ia_css_buffer buffer = {0};
@@ -1101,7 +1103,7 @@ int atomisp_q_metadata_buffer_to_css(struct atomisp_sub_device *asd,
        buffer.type = IA_CSS_BUFFER_TYPE_METADATA;
        buffer.data.metadata = metadata_buf->metadata;
        if (ia_css_pipe_enqueue_buffer(stream_env->pipes[css_pipe_id],
-                               &buffer)) {
+                                      &buffer)) {
                dev_err(isp->dev, "failed to q meta data buffer\n");
                return -EINVAL;
        }
@@ -1110,9 +1112,9 @@ int atomisp_q_metadata_buffer_to_css(struct atomisp_sub_device *asd,
 }
 
 int atomisp_q_s3a_buffer_to_css(struct atomisp_sub_device *asd,
-                       struct atomisp_s3a_buf *s3a_buf,
-                       enum atomisp_input_stream_id stream_id,
-                       enum atomisp_css_pipe_id css_pipe_id)
+                               struct atomisp_s3a_buf *s3a_buf,
+                               enum atomisp_input_stream_id stream_id,
+                               enum atomisp_css_pipe_id css_pipe_id)
 {
        struct atomisp_stream_env *stream_env = &asd->stream_env[stream_id];
        struct ia_css_buffer buffer = {0};
@@ -1121,8 +1123,8 @@ int atomisp_q_s3a_buffer_to_css(struct atomisp_sub_device *asd,
        buffer.type = IA_CSS_BUFFER_TYPE_3A_STATISTICS;
        buffer.data.stats_3a = s3a_buf->s3a_data;
        if (ia_css_pipe_enqueue_buffer(
-                               stream_env->pipes[css_pipe_id],
-                               &buffer)) {
+               stream_env->pipes[css_pipe_id],
+               &buffer)) {
                dev_dbg(isp->dev, "failed to q s3a stat buffer\n");
                return -EINVAL;
        }
@@ -1131,9 +1133,9 @@ int atomisp_q_s3a_buffer_to_css(struct atomisp_sub_device *asd,
 }
 
 int atomisp_q_dis_buffer_to_css(struct atomisp_sub_device *asd,
-                       struct atomisp_dis_buf *dis_buf,
-                       enum atomisp_input_stream_id stream_id,
-                       enum atomisp_css_pipe_id css_pipe_id)
+                               struct atomisp_dis_buf *dis_buf,
+                               enum atomisp_input_stream_id stream_id,
+                               enum atomisp_css_pipe_id css_pipe_id)
 {
        struct atomisp_stream_env *stream_env = &asd->stream_env[stream_id];
        struct ia_css_buffer buffer = {0};
@@ -1142,8 +1144,8 @@ int atomisp_q_dis_buffer_to_css(struct atomisp_sub_device *asd,
        buffer.type = IA_CSS_BUFFER_TYPE_DIS_STATISTICS;
        buffer.data.stats_dvs = dis_buf->dis_data;
        if (ia_css_pipe_enqueue_buffer(
-                               stream_env->pipes[css_pipe_id],
-                               &buffer)) {
+               stream_env->pipes[css_pipe_id],
+               &buffer)) {
                dev_dbg(isp->dev, "failed to q dvs stat buffer\n");
                return -EINVAL;
        }
@@ -1162,7 +1164,7 @@ void atomisp_css_mmu_invalidate_tlb(void)
 }
 
 int atomisp_css_start(struct atomisp_sub_device *asd,
-                       enum atomisp_css_pipe_id pipe_id, bool in_reset)
+                     enum atomisp_css_pipe_id pipe_id, bool in_reset)
 {
        struct atomisp_device *isp = asd->isp;
        bool sp_is_started = false;
@@ -1277,18 +1279,18 @@ void atomisp_css_update_isp_params(struct atomisp_sub_device *asd)
        if (asd->copy_mode) {
                dev_warn(asd->isp->dev,
                         "%s: ia_css_stream_set_isp_config() not supported in copy mode!.\n",
-                               __func__);
+                        __func__);
                return;
        }
 
        ia_css_stream_set_isp_config(
-                       asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-                       &asd->params.config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &asd->params.config);
        atomisp_isp_parameters_clean_up(&asd->params.config);
 }
 
 void atomisp_css_update_isp_params_on_pipe(struct atomisp_sub_device *asd,
-                                       struct ia_css_pipe *pipe)
+       struct ia_css_pipe *pipe)
 {
        enum ia_css_err ret;
 
@@ -1297,16 +1299,17 @@ void atomisp_css_update_isp_params_on_pipe(struct atomisp_sub_device *asd,
                return;
        }
 
-       dev_dbg(asd->isp->dev, "%s: apply parameter for ia_css_frame %p with isp_config_id %d on pipe %p.\n",
+       dev_dbg(asd->isp->dev,
+               "%s: apply parameter for ia_css_frame %p with isp_config_id %d on pipe %p.\n",
                __func__, asd->params.config.output_frame,
                asd->params.config.isp_config_id, pipe);
 
        ret = ia_css_stream_set_isp_config_on_pipe(
-                       asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-                       &asd->params.config, pipe);
+                 asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+                 &asd->params.config, pipe);
        if (ret != IA_CSS_SUCCESS)
                dev_warn(asd->isp->dev, "%s: ia_css_stream_set_isp_config_on_pipe failed %d\n",
-                       __func__, ret);
+                        __func__, ret);
        atomisp_isp_parameters_clean_up(&asd->params.config);
 }
 
@@ -1318,25 +1321,25 @@ int atomisp_css_queue_buffer(struct atomisp_sub_device *asd,
 {
        if (ia_css_pipe_enqueue_buffer(
                asd->stream_env[stream_id].pipes[pipe_id],
-                                       &isp_css_buffer->css_buffer)
-                                       != IA_CSS_SUCCESS)
+               &isp_css_buffer->css_buffer)
+           != IA_CSS_SUCCESS)
                return -EINVAL;
 
        return 0;
 }
 
 int atomisp_css_dequeue_buffer(struct atomisp_sub_device *asd,
-                               enum atomisp_input_stream_id stream_id,
-                               enum atomisp_css_pipe_id pipe_id,
-                               enum atomisp_css_buffer_type buf_type,
-                               struct atomisp_css_buffer *isp_css_buffer)
+                              enum atomisp_input_stream_id stream_id,
+                              enum atomisp_css_pipe_id pipe_id,
+                              enum atomisp_css_buffer_type buf_type,
+                              struct atomisp_css_buffer *isp_css_buffer)
 {
        struct atomisp_device *isp = asd->isp;
        enum ia_css_err err;
 
        err = ia_css_pipe_dequeue_buffer(
-               asd->stream_env[stream_id].pipes[pipe_id],
-                                       &isp_css_buffer->css_buffer);
+                 asd->stream_env[stream_id].pipes[pipe_id],
+                 &isp_css_buffer->css_buffer);
        if (err != IA_CSS_SUCCESS) {
                dev_err(isp->dev,
                        "ia_css_pipe_dequeue_buffer failed: 0x%x\n", err);
@@ -1354,13 +1357,13 @@ int atomisp_css_allocate_stat_buffers(struct atomisp_sub_device   *asd,
 {
        struct atomisp_device *isp = asd->isp;
        struct atomisp_css_dvs_grid_info *dvs_grid_info =
-               atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+           atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
 
        if (s3a_buf && asd->params.curr_grid_info.s3a_grid.enable) {
                void *s3a_ptr;
 
                s3a_buf->s3a_data = ia_css_isp_3a_statistics_allocate(
-                               &asd->params.curr_grid_info.s3a_grid);
+                                       &asd->params.curr_grid_info.s3a_grid);
                if (!s3a_buf->s3a_data) {
                        dev_err(isp->dev, "3a buf allocation failed.\n");
                        return -EINVAL;
@@ -1368,7 +1371,7 @@ int atomisp_css_allocate_stat_buffers(struct atomisp_sub_device   *asd,
 
                s3a_ptr = hmm_vmap(s3a_buf->s3a_data->data_ptr, true);
                s3a_buf->s3a_map = ia_css_isp_3a_statistics_map_allocate(
-                                               s3a_buf->s3a_data, s3a_ptr);
+                                      s3a_buf->s3a_data, s3a_ptr);
        }
 
        if (dis_buf && dvs_grid_info && dvs_grid_info->enable) {
@@ -1385,13 +1388,13 @@ int atomisp_css_allocate_stat_buffers(struct atomisp_sub_device   *asd,
 
                dvs_ptr = hmm_vmap(dis_buf->dis_data->data_ptr, true);
                dis_buf->dvs_map = ia_css_isp_dvs_statistics_map_allocate(
-                                               dis_buf->dis_data, dvs_ptr);
+                                      dis_buf->dis_data, dvs_ptr);
        }
 
        if (asd->stream_env[stream_id].stream_info.
-                       metadata_info.size && md_buf) {
+           metadata_info.size && md_buf) {
                md_buf->metadata = ia_css_metadata_allocate(
-                       &asd->stream_env[stream_id].stream_info.metadata_info);
+                                      &asd->stream_env[stream_id].stream_info.metadata_info);
                if (!md_buf->metadata) {
                        if (s3a_buf)
                                ia_css_isp_3a_statistics_free(s3a_buf->s3a_data);
@@ -1441,7 +1444,7 @@ void atomisp_css_free_stat_buffers(struct atomisp_sub_device *asd)
        struct atomisp_dis_buf *dis_buf, *_dis_buf;
        struct atomisp_metadata_buf *md_buf, *_md_buf;
        struct atomisp_css_dvs_grid_info *dvs_grid_info =
-               atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+           atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
        unsigned int i;
 
        /* 3A statistics use vmalloc, DIS use kmalloc */
@@ -1456,13 +1459,13 @@ void atomisp_css_free_stat_buffers(struct atomisp_sub_device *asd)
                asd->params.dvs_ver_coef_bytes = 0;
                asd->params.dis_proj_data_valid = false;
                list_for_each_entry_safe(dis_buf, _dis_buf,
-                                               &asd->dis_stats, list) {
+                                        &asd->dis_stats, list) {
                        atomisp_css_free_dis_buffer(dis_buf);
                        list_del(&dis_buf->list);
                        kfree(dis_buf);
                }
                list_for_each_entry_safe(dis_buf, _dis_buf,
-                                               &asd->dis_stats_in_css, list) {
+                                        &asd->dis_stats_in_css, list) {
                        atomisp_css_free_dis_buffer(dis_buf);
                        list_del(&dis_buf->list);
                        kfree(dis_buf);
@@ -1473,19 +1476,19 @@ void atomisp_css_free_stat_buffers(struct atomisp_sub_device *asd)
                asd->params.s3a_user_stat = NULL;
                asd->params.s3a_output_bytes = 0;
                list_for_each_entry_safe(s3a_buf, _s3a_buf,
-                                               &asd->s3a_stats, list) {
+                                        &asd->s3a_stats, list) {
                        atomisp_css_free_3a_buffer(s3a_buf);
                        list_del(&s3a_buf->list);
                        kfree(s3a_buf);
                }
                list_for_each_entry_safe(s3a_buf, _s3a_buf,
-                                               &asd->s3a_stats_in_css, list) {
+                                        &asd->s3a_stats_in_css, list) {
                        atomisp_css_free_3a_buffer(s3a_buf);
                        list_del(&s3a_buf->list);
                        kfree(s3a_buf);
                }
                list_for_each_entry_safe(s3a_buf, _s3a_buf,
-                                               &asd->s3a_stats_ready, list) {
+                                        &asd->s3a_stats_ready, list) {
                        atomisp_css_free_3a_buffer(s3a_buf);
                        list_del(&s3a_buf->list);
                        kfree(s3a_buf);
@@ -1499,19 +1502,19 @@ void atomisp_css_free_stat_buffers(struct atomisp_sub_device *asd)
 
        for (i = 0; i < ATOMISP_METADATA_TYPE_NUM; i++) {
                list_for_each_entry_safe(md_buf, _md_buf,
-                                       &asd->metadata[i], list) {
+                                        &asd->metadata[i], list) {
                        atomisp_css_free_metadata_buffer(md_buf);
                        list_del(&md_buf->list);
                        kfree(md_buf);
                }
                list_for_each_entry_safe(md_buf, _md_buf,
-                                       &asd->metadata_in_css[i], list) {
+                                        &asd->metadata_in_css[i], list) {
                        atomisp_css_free_metadata_buffer(md_buf);
                        list_del(&md_buf->list);
                        kfree(md_buf);
                }
                list_for_each_entry_safe(md_buf, _md_buf,
-                                       &asd->metadata_ready[i], list) {
+                                        &asd->metadata_ready[i], list) {
                        atomisp_css_free_metadata_buffer(md_buf);
                        list_del(&md_buf->list);
                        kfree(md_buf);
@@ -1522,15 +1525,15 @@ void atomisp_css_free_stat_buffers(struct atomisp_sub_device *asd)
 }
 
 int atomisp_css_get_grid_info(struct atomisp_sub_device *asd,
-                               enum atomisp_css_pipe_id pipe_id,
-                               int source_pad)
+                             enum atomisp_css_pipe_id pipe_id,
+                             int source_pad)
 {
        struct ia_css_pipe_info p_info;
        struct ia_css_grid_info old_info;
        struct atomisp_device *isp = asd->isp;
        int stream_index = atomisp_source_pad_to_stream_id(asd, source_pad);
        int md_width = asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
-               stream_config.metadata_config.resolution.width;
+                      stream_config.metadata_config.resolution.width;
 
        memset(&p_info, 0, sizeof(struct ia_css_pipe_info));
        memset(&old_info, 0, sizeof(struct ia_css_grid_info));
@@ -1543,9 +1546,9 @@ int atomisp_css_get_grid_info(struct atomisp_sub_device *asd,
        }
 
        memcpy(&old_info, &asd->params.curr_grid_info,
-                                       sizeof(struct ia_css_grid_info));
+              sizeof(struct ia_css_grid_info));
        memcpy(&asd->params.curr_grid_info, &p_info.grid_info,
-                                       sizeof(struct ia_css_grid_info));
+              sizeof(struct ia_css_grid_info));
        /*
         * Record which css pipe enables s3a_grid.
         * Currently would have one css pipe that need it
@@ -1553,7 +1556,7 @@ int atomisp_css_get_grid_info(struct atomisp_sub_device *asd,
        if (asd->params.curr_grid_info.s3a_grid.enable) {
                if (asd->params.s3a_enabled_pipe != CSS_PIPE_ID_NUM)
                        dev_dbg(isp->dev, "css pipe %d enabled s3a grid replaced by: %d.\n",
-                                       asd->params.s3a_enabled_pipe, pipe_id);
+                               asd->params.s3a_enabled_pipe, pipe_id);
                asd->params.s3a_enabled_pipe = pipe_id;
        }
 
@@ -1561,18 +1564,18 @@ int atomisp_css_get_grid_info(struct atomisp_sub_device *asd,
         * DIS statistics buffers are allocated or buffer size would be zero
         * then no need to do anything. */
        if (((!memcmp(&old_info, &asd->params.curr_grid_info, sizeof(old_info))
-           && asd->params.s3a_user_stat && asd->params.dvs_stat)
-           || asd->params.curr_grid_info.s3a_grid.width == 0
-           || asd->params.curr_grid_info.s3a_grid.height == 0)
+             && asd->params.s3a_user_stat && asd->params.dvs_stat)
+            || asd->params.curr_grid_info.s3a_grid.width == 0
+            || asd->params.curr_grid_info.s3a_grid.height == 0)
            && asd->params.metadata_width_size == md_width) {
                dev_dbg(isp->dev,
                        "grid info change escape. memcmp=%d, s3a_user_stat=%d,dvs_stat=%d, s3a.width=%d, s3a.height=%d, metadata width =%d\n",
                        !memcmp(&old_info, &asd->params.curr_grid_info,
-                                sizeof(old_info)),
-                        !!asd->params.s3a_user_stat, !!asd->params.dvs_stat,
-                        asd->params.curr_grid_info.s3a_grid.width,
-                        asd->params.curr_grid_info.s3a_grid.height,
-                        asd->params.metadata_width_size);
+                               sizeof(old_info)),
+                       !!asd->params.s3a_user_stat, !!asd->params.dvs_stat,
+                       asd->params.curr_grid_info.s3a_grid.width,
+                       asd->params.curr_grid_info.s3a_grid.height,
+                       asd->params.metadata_width_size);
                return -EINVAL;
        }
        asd->params.metadata_width_size = md_width;
@@ -1583,11 +1586,11 @@ int atomisp_css_get_grid_info(struct atomisp_sub_device *asd,
 int atomisp_alloc_3a_output_buf(struct atomisp_sub_device *asd)
 {
        if (!asd->params.curr_grid_info.s3a_grid.width ||
-                       !asd->params.curr_grid_info.s3a_grid.height)
+           !asd->params.curr_grid_info.s3a_grid.height)
                return 0;
 
        asd->params.s3a_user_stat = ia_css_3a_statistics_allocate(
-                               &asd->params.curr_grid_info.s3a_grid);
+                                       &asd->params.curr_grid_info.s3a_grid);
        if (!asd->params.s3a_user_stat)
                return -ENOMEM;
        /* 3A statistics. These can be big, so we use vmalloc. */
@@ -1602,7 +1605,7 @@ int atomisp_alloc_3a_output_buf(struct atomisp_sub_device *asd)
 int atomisp_alloc_dis_coef_buf(struct atomisp_sub_device *asd)
 {
        struct atomisp_css_dvs_grid_info *dvs_grid =
-               atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+           atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
 
        if (!dvs_grid)
                return 0;
@@ -1614,15 +1617,15 @@ int atomisp_alloc_dis_coef_buf(struct atomisp_sub_device *asd)
 
        /* DIS coefficients. */
        asd->params.css_param.dvs2_coeff = ia_css_dvs2_coefficients_allocate(
-                       dvs_grid);
+                                              dvs_grid);
        if (!asd->params.css_param.dvs2_coeff)
                return -ENOMEM;
 
        asd->params.dvs_hor_coef_bytes = dvs_grid->num_hor_coefs *
-               sizeof(*asd->params.css_param.dvs2_coeff->hor_coefs.odd_real);
+                                        sizeof(*asd->params.css_param.dvs2_coeff->hor_coefs.odd_real);
 
        asd->params.dvs_ver_coef_bytes = dvs_grid->num_ver_coefs *
-               sizeof(*asd->params.css_param.dvs2_coeff->ver_coefs.odd_real);
+                                        sizeof(*asd->params.css_param.dvs2_coeff->ver_coefs.odd_real);
 
        /* DIS projections. */
        asd->params.dis_proj_data_valid = false;
@@ -1631,12 +1634,12 @@ int atomisp_alloc_dis_coef_buf(struct atomisp_sub_device *asd)
                return -ENOMEM;
 
        asd->params.dvs_hor_proj_bytes =
-               dvs_grid->aligned_height * dvs_grid->aligned_width *
-               sizeof(*asd->params.dvs_stat->hor_prod.odd_real);
+           dvs_grid->aligned_height * dvs_grid->aligned_width *
+           sizeof(*asd->params.dvs_stat->hor_prod.odd_real);
 
        asd->params.dvs_ver_proj_bytes =
-               dvs_grid->aligned_height * dvs_grid->aligned_width *
-               sizeof(*asd->params.dvs_stat->ver_prod.odd_real);
+           dvs_grid->aligned_height * dvs_grid->aligned_width *
+           sizeof(*asd->params.dvs_stat->ver_prod.odd_real);
 
        return 0;
 }
@@ -1649,8 +1652,8 @@ int atomisp_alloc_metadata_output_buf(struct atomisp_sub_device *asd)
         * space */
        for (i = 0; i < ATOMISP_METADATA_TYPE_NUM; i++) {
                asd->params.metadata_user[i] = kvmalloc(
-                               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
-                               stream_info.metadata_info.size, GFP_KERNEL);
+                                                  asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
+                                                  stream_info.metadata_info.size, GFP_KERNEL);
                if (!asd->params.metadata_user[i]) {
                        while (--i >= 0) {
                                kvfree(asd->params.metadata_user[i]);
@@ -1682,10 +1685,10 @@ void atomisp_css_get_dis_statistics(struct atomisp_sub_device *asd,
        if (asd->params.dvs_stat) {
                if (dvs_map)
                        ia_css_translate_dvs2_statistics(
-                               asd->params.dvs_stat, dvs_map);
+                           asd->params.dvs_stat, dvs_map);
                else
                        ia_css_get_dvs2_statistics(asd->params.dvs_stat,
-                               isp_css_buffer->css_buffer.data.stats_dvs);
+                                                  isp_css_buffer->css_buffer.data.stats_dvs);
        }
 }
 
@@ -1698,7 +1701,7 @@ int atomisp_css_dequeue_event(struct atomisp_css_event *current_event)
 }
 
 void atomisp_css_temp_pipe_to_pipe_id(struct atomisp_sub_device *asd,
-               struct atomisp_css_event *current_event)
+                                     struct atomisp_css_event *current_event)
 {
        /*
         * FIXME!
@@ -1719,7 +1722,7 @@ int atomisp_css_isys_set_resolution(struct atomisp_sub_device *asd,
                                    int isys_stream)
 {
        struct ia_css_stream_config *s_config =
-                       &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
 
        if (isys_stream >= IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH)
                return -EINVAL;
@@ -1730,11 +1733,11 @@ int atomisp_css_isys_set_resolution(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_input_set_resolution(struct atomisp_sub_device *asd,
-                               enum atomisp_input_stream_id stream_id,
-                               struct v4l2_mbus_framefmt *ffmt)
+                                    enum atomisp_input_stream_id stream_id,
+                                    struct v4l2_mbus_framefmt *ffmt)
 {
        struct ia_css_stream_config *s_config =
-                       &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
 
        s_config->input_config.input_res.width = ffmt->width;
        s_config->input_config.input_res.height = ffmt->height;
@@ -1742,19 +1745,19 @@ int atomisp_css_input_set_resolution(struct atomisp_sub_device *asd,
 }
 
 void atomisp_css_input_set_binning_factor(struct atomisp_sub_device *asd,
-                                       enum atomisp_input_stream_id stream_id,
-                                       unsigned int bin_factor)
+       enum atomisp_input_stream_id stream_id,
+       unsigned int bin_factor)
 {
        asd->stream_env[stream_id]
-           .stream_config.sensor_binning_factor = bin_factor;
+       .stream_config.sensor_binning_factor = bin_factor;
 }
 
 void atomisp_css_input_set_bayer_order(struct atomisp_sub_device *asd,
-                               enum atomisp_input_stream_id stream_id,
-                               enum atomisp_css_bayer_order bayer_order)
+                                      enum atomisp_input_stream_id stream_id,
+                                      enum atomisp_css_bayer_order bayer_order)
 {
        struct ia_css_stream_config *s_config =
-                       &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
        s_config->input_config.bayer_order = bayer_order;
 }
 
@@ -1764,7 +1767,7 @@ void atomisp_css_isys_set_link(struct atomisp_sub_device *asd,
                               int isys_stream)
 {
        struct ia_css_stream_config *s_config =
-               &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
 
        s_config->isys_config[isys_stream].linked_isys_stream_id = link;
 }
@@ -1775,7 +1778,7 @@ void atomisp_css_isys_set_valid(struct atomisp_sub_device *asd,
                                int isys_stream)
 {
        struct ia_css_stream_config *s_config =
-               &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
 
        s_config->isys_config[isys_stream].valid = valid;
 }
@@ -1786,17 +1789,17 @@ void atomisp_css_isys_set_format(struct atomisp_sub_device *asd,
                                 int isys_stream)
 {
        struct ia_css_stream_config *s_config =
-                       &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
 
        s_config->isys_config[isys_stream].format = format;
 }
 
 void atomisp_css_input_set_format(struct atomisp_sub_device *asd,
-                                       enum atomisp_input_stream_id stream_id,
-                                       enum atomisp_input_format format)
+                                 enum atomisp_input_stream_id stream_id,
+                                 enum atomisp_input_format format)
 {
        struct ia_css_stream_config *s_config =
-                       &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
 
        s_config->input_config.format = format;
 }
@@ -1807,7 +1810,7 @@ int atomisp_css_set_default_isys_config(struct atomisp_sub_device *asd,
 {
        int i;
        struct ia_css_stream_config *s_config =
-                       &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
        /*
         * Set all isys configs to not valid.
         * Currently we support only one stream per channel
@@ -1834,69 +1837,69 @@ int atomisp_css_isys_two_stream_cfg(struct atomisp_sub_device *asd,
                                    enum atomisp_input_format input_format)
 {
        struct ia_css_stream_config *s_config =
-               &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
 
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].input_res.width =
-       s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.width;
+           s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.width;
 
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].input_res.height =
-       s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.height / 2;
+           s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.height / 2;
 
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].linked_isys_stream_id
-               = IA_CSS_STREAM_ISYS_STREAM_0;
+           = IA_CSS_STREAM_ISYS_STREAM_0;
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].format =
-               ATOMISP_INPUT_FORMAT_USER_DEF1;
+           ATOMISP_INPUT_FORMAT_USER_DEF1;
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].format =
-               ATOMISP_INPUT_FORMAT_USER_DEF2;
+           ATOMISP_INPUT_FORMAT_USER_DEF2;
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].valid = true;
        return 0;
 }
 
 void atomisp_css_isys_two_stream_cfg_update_stream1(
-                                   struct atomisp_sub_device *asd,
-                                   enum atomisp_input_stream_id stream_id,
-                                   enum atomisp_input_format input_format,
-                                   unsigned int width, unsigned int height)
+    struct atomisp_sub_device *asd,
+    enum atomisp_input_stream_id stream_id,
+    enum atomisp_input_format input_format,
+    unsigned int width, unsigned int height)
 {
        struct ia_css_stream_config *s_config =
-               &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
 
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.width =
-               width;
+           width;
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.height =
-               height;
+           height;
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].format =
-               input_format;
+           input_format;
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].valid = true;
 }
 
 void atomisp_css_isys_two_stream_cfg_update_stream2(
-                                   struct atomisp_sub_device *asd,
-                                   enum atomisp_input_stream_id stream_id,
-                                   enum atomisp_input_format input_format,
-                                   unsigned int width, unsigned int height)
+    struct atomisp_sub_device *asd,
+    enum atomisp_input_stream_id stream_id,
+    enum atomisp_input_format input_format,
+    unsigned int width, unsigned int height)
 {
        struct ia_css_stream_config *s_config =
-               &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
 
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].input_res.width =
-               width;
+           width;
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].input_res.height =
-       height;
+           height;
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].linked_isys_stream_id
-               = IA_CSS_STREAM_ISYS_STREAM_0;
+           = IA_CSS_STREAM_ISYS_STREAM_0;
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].format =
-               input_format;
+           input_format;
        s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].valid = true;
 }
 
 int atomisp_css_input_set_effective_resolution(
-                                       struct atomisp_sub_device *asd,
-                                       enum atomisp_input_stream_id stream_id,
-                                       unsigned int width, unsigned int height)
+    struct atomisp_sub_device *asd,
+    enum atomisp_input_stream_id stream_id,
+    unsigned int width, unsigned int height)
 {
        struct ia_css_stream_config *s_config =
-                       &asd->stream_env[stream_id].stream_config;
+                   &asd->stream_env[stream_id].stream_config;
        s_config->input_config.effective_res.width = width;
        s_config->input_config.effective_res.height = height;
        return 0;
@@ -1906,33 +1909,33 @@ void atomisp_css_video_set_dis_envelope(struct atomisp_sub_device *asd,
                                        unsigned int dvs_w, unsigned int dvs_h)
 {
        asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .pipe_configs[IA_CSS_PIPE_ID_VIDEO].dvs_envelope.width = dvs_w;
+       .pipe_configs[IA_CSS_PIPE_ID_VIDEO].dvs_envelope.width = dvs_w;
        asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .pipe_configs[IA_CSS_PIPE_ID_VIDEO].dvs_envelope.height = dvs_h;
+       .pipe_configs[IA_CSS_PIPE_ID_VIDEO].dvs_envelope.height = dvs_h;
 }
 
 void atomisp_css_input_set_two_pixels_per_clock(
-                                       struct atomisp_sub_device *asd,
-                                       bool two_ppc)
+    struct atomisp_sub_device *asd,
+    bool two_ppc)
 {
        int i;
 
        if (asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .stream_config.pixels_per_clock == (two_ppc ? 2 : 1))
+           .stream_config.pixels_per_clock == (two_ppc ? 2 : 1))
                return;
 
        asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .stream_config.pixels_per_clock = (two_ppc ? 2 : 1);
+       .stream_config.pixels_per_clock = (two_ppc ? 2 : 1);
        for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++)
                asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
                .update_pipe[i] = true;
 }
 
 void atomisp_css_enable_raw_binning(struct atomisp_sub_device *asd,
-                                       bool enable)
+                                   bool enable)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        unsigned int pipe;
 
        if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO)
@@ -1944,7 +1947,7 @@ void atomisp_css_enable_raw_binning(struct atomisp_sub_device *asd,
        stream_env->update_pipe[pipe] = true;
        if (enable)
                stream_env->pipe_configs[pipe].output_info[0].padded_width =
-                       stream_env->stream_config.input_config.effective_res.width;
+                   stream_env->stream_config.input_config.effective_res.width;
 }
 
 void atomisp_css_enable_dz(struct atomisp_sub_device *asd, bool enable)
@@ -1953,21 +1956,21 @@ void atomisp_css_enable_dz(struct atomisp_sub_device *asd, bool enable)
 
        for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++)
                asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-                       .pipe_configs[i].enable_dz = enable;
+               .pipe_configs[i].enable_dz = enable;
 }
 
 void atomisp_css_capture_set_mode(struct atomisp_sub_device *asd,
-                               enum atomisp_css_capture_mode mode)
+                                 enum atomisp_css_capture_mode mode)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
 
        if (stream_env->pipe_configs[IA_CSS_PIPE_ID_CAPTURE]
-               .default_capture_config.mode == mode)
+           .default_capture_config.mode == mode)
                return;
 
        stream_env->pipe_configs[IA_CSS_PIPE_ID_CAPTURE].
-                                       default_capture_config.mode = mode;
+       default_capture_config.mode = mode;
        stream_env->update_pipe[IA_CSS_PIPE_ID_CAPTURE] = true;
 }
 
@@ -1983,7 +1986,7 @@ void atomisp_css_input_set_mode(struct atomisp_sub_device *asd,
 
        if (isp->inputs[asd->input_curr].type == TEST_PATTERN) {
                struct ia_css_stream_config *s_config =
-                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream_config;
+                           &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream_config;
                s_config->mode = IA_CSS_INPUT_MODE_TPG;
                s_config->source.tpg.mode = IA_CSS_TPG_MODE_CHECKERBOARD;
                s_config->source.tpg.x_mask = (1 << 4) - 1;
@@ -2004,26 +2007,26 @@ void atomisp_css_input_set_mode(struct atomisp_sub_device *asd,
                 * Here using a large safe value.
                 */
                struct ia_css_stream_config *s_config =
-                       &asd->stream_env[i].stream_config;
+                           &asd->stream_env[i].stream_config;
 
                if (s_config->input_config.input_res.width == 0)
                        continue;
 
                if (ia_css_mipi_frame_calculate_size(
-                                       s_config->input_config.input_res.width,
-                                       s_config->input_config.input_res.height,
-                                       s_config->input_config.format,
-                                       true,
-                                       0x13000,
-                                       &size_mem_words) != IA_CSS_SUCCESS) {
+                       s_config->input_config.input_res.width,
+                       s_config->input_config.input_res.height,
+                       s_config->input_config.format,
+                       true,
+                       0x13000,
+                       &size_mem_words) != IA_CSS_SUCCESS) {
                        if (intel_mid_identify_cpu() ==
-                               INTEL_MID_CPU_CHIP_TANGIER)
+                           INTEL_MID_CPU_CHIP_TANGIER)
                                size_mem_words = CSS_MIPI_FRAME_BUFFER_SIZE_2;
                        else
                                size_mem_words = CSS_MIPI_FRAME_BUFFER_SIZE_1;
                        dev_warn(asd->isp->dev,
-                               "ia_css_mipi_frame_calculate_size failed,applying pre-defined MIPI buffer size %u.\n",
-                               size_mem_words);
+                                "ia_css_mipi_frame_calculate_size failed,applying pre-defined MIPI buffer size %u.\n",
+                                size_mem_words);
                }
                s_config->mipi_buffer_config.size_mem_words = size_mem_words;
                s_config->mipi_buffer_config.nof_mipi_buffers = 2;
@@ -2031,10 +2034,10 @@ void atomisp_css_input_set_mode(struct atomisp_sub_device *asd,
 }
 
 void atomisp_css_capture_enable_online(struct atomisp_sub_device *asd,
-                               unsigned short stream_index, bool enable)
+                                      unsigned short stream_index, bool enable)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[stream_index];
+                   &asd->stream_env[stream_index];
 
        if (stream_env->stream_config.online == !!enable)
                return;
@@ -2044,10 +2047,10 @@ void atomisp_css_capture_enable_online(struct atomisp_sub_device *asd,
 }
 
 void atomisp_css_preview_enable_online(struct atomisp_sub_device *asd,
-                               unsigned short stream_index, bool enable)
+                                      unsigned short stream_index, bool enable)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[stream_index];
+                   &asd->stream_env[stream_index];
        int i;
 
        if (stream_env->stream_config.online != !!enable) {
@@ -2058,10 +2061,10 @@ void atomisp_css_preview_enable_online(struct atomisp_sub_device *asd,
 }
 
 void atomisp_css_video_enable_online(struct atomisp_sub_device *asd,
-                                                       bool enable)
+                                    bool enable)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_VIDEO];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_VIDEO];
        int i;
 
        if (stream_env->stream_config.online != enable) {
@@ -2072,10 +2075,10 @@ void atomisp_css_video_enable_online(struct atomisp_sub_device *asd,
 }
 
 void atomisp_css_enable_continuous(struct atomisp_sub_device *asd,
-                                                       bool enable)
+                                  bool enable)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        int i;
 
        /*
@@ -2098,10 +2101,10 @@ void atomisp_css_enable_continuous(struct atomisp_sub_device *asd,
 }
 
 void atomisp_css_enable_cvf(struct atomisp_sub_device *asd,
-                               bool enable)
+                           bool enable)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        int i;
 
        if (stream_env->stream_config.disable_cont_viewfinder != !enable) {
@@ -2112,14 +2115,14 @@ void atomisp_css_enable_cvf(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_input_configure_port(
-               struct atomisp_sub_device *asd,
-               enum mipi_port_id port,
-               unsigned int num_lanes,
-               unsigned int timeout,
-               unsigned int mipi_freq,
-               enum atomisp_input_format metadata_format,
-               unsigned int metadata_width,
-               unsigned int metadata_height)
+    struct atomisp_sub_device *asd,
+    enum mipi_port_id port,
+    unsigned int num_lanes,
+    unsigned int timeout,
+    unsigned int mipi_freq,
+    enum atomisp_input_format metadata_format,
+    unsigned int metadata_width,
+    unsigned int metadata_height)
 {
        int i;
        struct atomisp_stream_env *stream_env;
@@ -2135,7 +2138,7 @@ int atomisp_css_input_configure_port(
         * 10-bit fixed points for improved accuracy.
         */
        const unsigned int rxcount =
-               min(((mipi_freq / 46000) - 1280) >> 10, 0xffU) * 0x01010101U;
+           min(((mipi_freq / 46000) - 1280) >> 10, 0xffU) * 0x01010101U;
 
        for (i = 0; i < ATOMISP_INPUT_STREAM_NUM; i++) {
                stream_env = &asd->stream_env[i];
@@ -2145,31 +2148,31 @@ int atomisp_css_input_configure_port(
                if (mipi_freq)
                        stream_env->stream_config.source.port.rxcount = rxcount;
                stream_env->stream_config.
-                       metadata_config.data_type = metadata_format;
+               metadata_config.data_type = metadata_format;
                stream_env->stream_config.
-                       metadata_config.resolution.width = metadata_width;
+               metadata_config.resolution.width = metadata_width;
                stream_env->stream_config.
-                       metadata_config.resolution.height = metadata_height;
+               metadata_config.resolution.height = metadata_height;
        }
 
        return 0;
 }
 
 int atomisp_css_frame_allocate(struct atomisp_css_frame **frame,
-                               unsigned int width, unsigned int height,
-                               enum atomisp_css_frame_format format,
-                               unsigned int padded_width,
-                               unsigned int raw_bit_depth)
+                              unsigned int width, unsigned int height,
+                              enum atomisp_css_frame_format format,
+                              unsigned int padded_width,
+                              unsigned int raw_bit_depth)
 {
        if (ia_css_frame_allocate(frame, width, height, format,
-                       padded_width, raw_bit_depth) != IA_CSS_SUCCESS)
+                                 padded_width, raw_bit_depth) != IA_CSS_SUCCESS)
                return -ENOMEM;
 
        return 0;
 }
 
 int atomisp_css_frame_allocate_from_info(struct atomisp_css_frame **frame,
-                               const struct atomisp_css_frame_info *info)
+       const struct atomisp_css_frame_info *info)
 {
        if (ia_css_frame_allocate_from_info(frame, info) != IA_CSS_SUCCESS)
                return -ENOMEM;
@@ -2183,9 +2186,9 @@ void atomisp_css_frame_free(struct atomisp_css_frame *frame)
 }
 
 int atomisp_css_frame_map(struct atomisp_css_frame **frame,
-                               const struct atomisp_css_frame_info *info,
-                               const void __user *data, uint16_t attribute,
-                               void *context)
+                         const struct atomisp_css_frame_info *info,
+                         const void __user *data, uint16_t attribute,
+                         void *context)
 {
        if (ia_css_frame_map(frame, info, data, attribute, context)
            != IA_CSS_SUCCESS)
@@ -2206,11 +2209,11 @@ int atomisp_css_set_black_frame(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_allocate_continuous_frames(bool init_time,
-                               struct atomisp_sub_device *asd)
+       struct atomisp_sub_device *asd)
 {
        if (ia_css_alloc_continuous_frame_remain(
                asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream)
-                       != IA_CSS_SUCCESS)
+           != IA_CSS_SUCCESS)
                return -EINVAL;
        return 0;
 }
@@ -2218,11 +2221,11 @@ int atomisp_css_allocate_continuous_frames(bool init_time,
 void atomisp_css_update_continuous_frames(struct atomisp_sub_device *asd)
 {
        ia_css_update_continuous_frames(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream);
 }
 
 int atomisp_css_stop(struct atomisp_sub_device *asd,
-                       enum atomisp_css_pipe_id pipe_id, bool in_reset)
+                    enum atomisp_css_pipe_id pipe_id, bool in_reset)
 {
        struct atomisp_device *isp = asd->isp;
        struct atomisp_s3a_buf *s3a_buf;
@@ -2255,12 +2258,12 @@ int atomisp_css_stop(struct atomisp_sub_device *asd,
                        stream_env = &asd->stream_env[i];
                        for (j = 0; j < IA_CSS_PIPE_ID_NUM; j++) {
                                ia_css_pipe_config_defaults(
-                                       &stream_env->pipe_configs[j]);
+                                   &stream_env->pipe_configs[j]);
                                ia_css_pipe_extra_config_defaults(
-                                       &stream_env->pipe_extra_configs[j]);
+                                   &stream_env->pipe_extra_configs[j]);
                        }
                        ia_css_stream_config_defaults(
-                               &stream_env->stream_config);
+                           &stream_env->stream_config);
                }
                atomisp_isp_parameters_clean_up(&asd->params.config);
                asd->params.css_update_params_needed = false;
@@ -2269,13 +2272,13 @@ int atomisp_css_stop(struct atomisp_sub_device *asd,
        /* move stats buffers to free queue list */
        while (!list_empty(&asd->s3a_stats_in_css)) {
                s3a_buf = list_entry(asd->s3a_stats_in_css.next,
-                               struct atomisp_s3a_buf, list);
+                                    struct atomisp_s3a_buf, list);
                list_del(&s3a_buf->list);
                list_add_tail(&s3a_buf->list, &asd->s3a_stats);
        }
        while (!list_empty(&asd->s3a_stats_ready)) {
                s3a_buf = list_entry(asd->s3a_stats_ready.next,
-                               struct atomisp_s3a_buf, list);
+                                    struct atomisp_s3a_buf, list);
                list_del(&s3a_buf->list);
                list_add_tail(&s3a_buf->list, &asd->s3a_stats);
        }
@@ -2283,7 +2286,7 @@ int atomisp_css_stop(struct atomisp_sub_device *asd,
        spin_lock_irqsave(&asd->dis_stats_lock, irqflags);
        while (!list_empty(&asd->dis_stats_in_css)) {
                dis_buf = list_entry(asd->dis_stats_in_css.next,
-                               struct atomisp_dis_buf, list);
+                                    struct atomisp_dis_buf, list);
                list_del(&dis_buf->list);
                list_add_tail(&dis_buf->list, &asd->dis_stats);
        }
@@ -2293,13 +2296,13 @@ int atomisp_css_stop(struct atomisp_sub_device *asd,
        for (i = 0; i < ATOMISP_METADATA_TYPE_NUM; i++) {
                while (!list_empty(&asd->metadata_in_css[i])) {
                        md_buf = list_entry(asd->metadata_in_css[i].next,
-                                       struct atomisp_metadata_buf, list);
+                                           struct atomisp_metadata_buf, list);
                        list_del(&md_buf->list);
                        list_add_tail(&md_buf->list, &asd->metadata[i]);
                }
                while (!list_empty(&asd->metadata_ready[i])) {
                        md_buf = list_entry(asd->metadata_ready[i].next,
-                                       struct atomisp_metadata_buf, list);
+                                           struct atomisp_metadata_buf, list);
                        list_del(&md_buf->list);
                        list_add_tail(&md_buf->list, &asd->metadata[i]);
                }
@@ -2315,31 +2318,31 @@ int atomisp_css_stop(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_continuous_set_num_raw_frames(
-                                       struct atomisp_sub_device *asd,
-                                       int num_frames)
+    struct atomisp_sub_device *asd,
+    int num_frames)
 {
        if (asd->enable_raw_buffer_lock->val) {
                asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
                .stream_config.init_num_cont_raw_buf =
-                       ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES_LOCK_EN;
+                   ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES_LOCK_EN;
                if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO &&
                    asd->params.video_dis_en)
                        asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
                        .stream_config.init_num_cont_raw_buf +=
-                               ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
+                           ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
        } else {
                asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
                .stream_config.init_num_cont_raw_buf =
-                       ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES;
+                   ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES;
        }
 
        if (asd->params.video_dis_en)
                asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-                       .stream_config.init_num_cont_raw_buf +=
-                               ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
+               .stream_config.init_num_cont_raw_buf +=
+                   ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
 
        asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .stream_config.target_num_cont_raw_buf = num_frames;
+       .stream_config.target_num_cont_raw_buf = num_frames;
        return 0;
 }
 
@@ -2354,12 +2357,12 @@ void atomisp_css_disable_vf_pp(struct atomisp_sub_device *asd,
 }
 
 static enum ia_css_pipe_mode __pipe_id_to_pipe_mode(
-                                       struct atomisp_sub_device *asd,
-                                       enum ia_css_pipe_id pipe_id)
+    struct atomisp_sub_device *asd,
+    enum ia_css_pipe_id pipe_id)
 {
        struct atomisp_device *isp = asd->isp;
        struct camera_mipi_info *mipi_info = atomisp_to_sensor_mipi_info(
-                       isp->inputs[asd->input_curr].camera);
+               isp->inputs[asd->input_curr].camera);
 
        switch (pipe_id) {
        case IA_CSS_PIPE_ID_COPY:
@@ -2368,7 +2371,7 @@ static enum ia_css_pipe_mode __pipe_id_to_pipe_mode(
                 * YUV420_Legacy format.
                 */
                if (mipi_info && mipi_info->input_format ==
-                       ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY)
+                   ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY)
                        return IA_CSS_PIPE_MODE_YUVPP;
                return IA_CSS_PIPE_MODE_COPY;
        case IA_CSS_PIPE_ID_PREVIEW:
@@ -2396,11 +2399,11 @@ static void __configure_output(struct atomisp_sub_device *asd,
 {
        struct atomisp_device *isp = asd->isp;
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[stream_index];
+                   &asd->stream_env[stream_index];
        struct ia_css_stream_config *s_config = &stream_env->stream_config;
 
        stream_env->pipe_configs[pipe_id].mode =
-               __pipe_id_to_pipe_mode(asd, pipe_id);
+           __pipe_id_to_pipe_mode(asd, pipe_id);
        stream_env->update_pipe[pipe_id] = true;
 
        stream_env->pipe_configs[pipe_id].output_info[0].res.width = width;
@@ -2420,20 +2423,20 @@ static void __configure_output(struct atomisp_sub_device *asd,
 }
 
 static void __configure_video_preview_output(struct atomisp_sub_device *asd,
-                              unsigned int stream_index,
-                              unsigned int width, unsigned int height,
-                              unsigned int min_width,
-                              enum ia_css_frame_format format,
-                              enum ia_css_pipe_id pipe_id)
+       unsigned int stream_index,
+       unsigned int width, unsigned int height,
+       unsigned int min_width,
+       enum ia_css_frame_format format,
+       enum ia_css_pipe_id pipe_id)
 {
        struct atomisp_device *isp = asd->isp;
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[stream_index];
+                   &asd->stream_env[stream_index];
        struct ia_css_frame_info *css_output_info;
        struct ia_css_stream_config *stream_config = &stream_env->stream_config;
 
        stream_env->pipe_configs[pipe_id].mode =
-               __pipe_id_to_pipe_mode(asd, pipe_id);
+           __pipe_id_to_pipe_mode(asd, pipe_id);
        stream_env->update_pipe[pipe_id] = true;
 
        /*
@@ -2443,10 +2446,10 @@ static void __configure_video_preview_output(struct atomisp_sub_device *asd,
         */
        if (asd->continuous_mode->val)
                css_output_info = &stream_env->pipe_configs[pipe_id].
-                       output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
+                                 output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
        else
                css_output_info = &stream_env->pipe_configs[pipe_id].
-                       output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
+                                 output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
 
        css_output_info->res.width = width;
        css_output_info->res.height = height;
@@ -2469,17 +2472,17 @@ static void __configure_video_preview_output(struct atomisp_sub_device *asd,
  * downscaling input resolution.
  */
 static void __configure_capture_pp_input(struct atomisp_sub_device *asd,
-                                unsigned int width, unsigned int height,
-                                enum ia_css_pipe_id pipe_id)
+       unsigned int width, unsigned int height,
+       enum ia_css_pipe_id pipe_id)
 {
        struct atomisp_device *isp = asd->isp;
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        struct ia_css_stream_config *stream_config = &stream_env->stream_config;
        struct ia_css_pipe_config *pipe_configs =
-               &stream_env->pipe_configs[pipe_id];
+                   &stream_env->pipe_configs[pipe_id];
        struct ia_css_pipe_extra_config *pipe_extra_configs =
-               &stream_env->pipe_extra_configs[pipe_id];
+                   &stream_env->pipe_extra_configs[pipe_id];
        unsigned int hor_ds_factor = 0, ver_ds_factor = 0;
 
        if (width == 0 && height == 0)
@@ -2490,15 +2493,15 @@ static void __configure_capture_pp_input(struct atomisp_sub_device *asd,
                return;
        /* here just copy the calculation in css */
        hor_ds_factor = CEIL_DIV(width >> 1,
-                       pipe_configs->output_info[0].res.width);
+                                pipe_configs->output_info[0].res.width);
        ver_ds_factor = CEIL_DIV(height >> 1,
-                       pipe_configs->output_info[0].res.height);
+                                pipe_configs->output_info[0].res.height);
 
        if ((asd->isp->media_dev.hw_revision <
-           (ATOMISP_HW_REVISION_ISP2401 << ATOMISP_HW_REVISION_SHIFT) ||
-           IS_CHT) && hor_ds_factor != ver_ds_factor) {
+            (ATOMISP_HW_REVISION_ISP2401 << ATOMISP_HW_REVISION_SHIFT) ||
+            IS_CHT) && hor_ds_factor != ver_ds_factor) {
                dev_warn(asd->isp->dev,
-                               "Cropping for capture due to FW limitation");
+                        "Cropping for capture due to FW limitation");
                return;
        }
 
@@ -2508,9 +2511,9 @@ static void __configure_capture_pp_input(struct atomisp_sub_device *asd,
        pipe_extra_configs->enable_yuv_ds = true;
 
        pipe_configs->capt_pp_in_res.width =
-               stream_config->input_config.effective_res.width;
+           stream_config->input_config.effective_res.width;
        pipe_configs->capt_pp_in_res.height =
-               stream_config->input_config.effective_res.height;
+           stream_config->input_config.effective_res.height;
 
        dev_dbg(isp->dev, "configuring pipe[%d]capture pp input w=%d.h=%d.\n",
                pipe_id, width, height);
@@ -2521,24 +2524,24 @@ static void __configure_capture_pp_input(struct atomisp_sub_device *asd,
  * yuv downscaling, which needs addtional configurations.
  */
 static void __configure_preview_pp_input(struct atomisp_sub_device *asd,
-                                unsigned int width, unsigned int height,
-                                enum ia_css_pipe_id pipe_id)
+       unsigned int width, unsigned int height,
+       enum ia_css_pipe_id pipe_id)
 {
        struct atomisp_device *isp = asd->isp;
        int out_width, out_height, yuv_ds_in_width, yuv_ds_in_height;
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        struct ia_css_stream_config *stream_config = &stream_env->stream_config;
        struct ia_css_pipe_config *pipe_configs =
-               &stream_env->pipe_configs[pipe_id];
+                   &stream_env->pipe_configs[pipe_id];
        struct ia_css_pipe_extra_config *pipe_extra_configs =
-               &stream_env->pipe_extra_configs[pipe_id];
+                   &stream_env->pipe_extra_configs[pipe_id];
        struct ia_css_resolution *bayer_ds_out_res =
-               &pipe_configs->bayer_ds_out_res;
+                   &pipe_configs->bayer_ds_out_res;
        struct ia_css_resolution *vf_pp_in_res =
-               &pipe_configs->vf_pp_in_res;
+                   &pipe_configs->vf_pp_in_res;
        struct ia_css_resolution  *effective_res =
-               &stream_config->input_config.effective_res;
+                   &stream_config->input_config.effective_res;
 
        const struct bayer_ds_factor bds_fct[] = {{2, 1}, {3, 2}, {5, 4} };
        /*
@@ -2580,7 +2583,7 @@ static void __configure_preview_pp_input(struct atomisp_sub_device *asd,
         * online == 1 or continuous == 0 or raw_binning = 0
         */
        if (stream_config->online || !stream_config->continuous ||
-                       !pipe_extra_configs->enable_raw_binning) {
+           !pipe_extra_configs->enable_raw_binning) {
                bayer_ds_out_res->width = 0;
                bayer_ds_out_res->height = 0;
        } else {
@@ -2632,7 +2635,7 @@ static void __configure_preview_pp_input(struct atomisp_sub_device *asd,
        }
 
        if (vf_pp_in_res->width == out_width &&
-               vf_pp_in_res->height == out_height) {
+           vf_pp_in_res->height == out_height) {
                pipe_extra_configs->enable_yuv_ds = false;
                vf_pp_in_res->width = 0;
                vf_pp_in_res->height = 0;
@@ -2649,25 +2652,26 @@ static void __configure_preview_pp_input(struct atomisp_sub_device *asd,
  * yuv downscaling, which needs addtional configurations.
  */
 static void __configure_video_pp_input(struct atomisp_sub_device *asd,
-                                unsigned int width, unsigned int height,
-                                enum ia_css_pipe_id pipe_id)
+                                      unsigned int width, unsigned int height,
+                                      enum ia_css_pipe_id pipe_id)
 {
        struct atomisp_device *isp = asd->isp;
        int out_width, out_height;
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        struct ia_css_stream_config *stream_config = &stream_env->stream_config;
        struct ia_css_pipe_config *pipe_configs =
-               &stream_env->pipe_configs[pipe_id];
+                   &stream_env->pipe_configs[pipe_id];
        struct ia_css_pipe_extra_config *pipe_extra_configs =
-               &stream_env->pipe_extra_configs[pipe_id];
+                   &stream_env->pipe_extra_configs[pipe_id];
        struct ia_css_resolution *bayer_ds_out_res =
-               &pipe_configs->bayer_ds_out_res;
+                   &pipe_configs->bayer_ds_out_res;
        struct ia_css_resolution  *effective_res =
-               &stream_config->input_config.effective_res;
+                   &stream_config->input_config.effective_res;
 
        const struct bayer_ds_factor bds_factors[] = {
-               {8, 1}, {6, 1}, {4, 1}, {3, 1}, {2, 1}, {3, 2} };
+               {8, 1}, {6, 1}, {4, 1}, {3, 1}, {2, 1}, {3, 2}
+       };
        unsigned int i;
 
        if (width == 0 && height == 0)
@@ -2717,11 +2721,11 @@ static void __configure_video_pp_input(struct atomisp_sub_device *asd,
                    effective_res->height >= out_height *
                    bds_factors[i].numerator / bds_factors[i].denominator) {
                        bayer_ds_out_res->width = effective_res->width *
-                           bds_factors[i].denominator /
-                           bds_factors[i].numerator;
+                                                 bds_factors[i].denominator /
+                                                 bds_factors[i].numerator;
                        bayer_ds_out_res->height = effective_res->height *
-                           bds_factors[i].denominator /
-                           bds_factors[i].numerator;
+                                                  bds_factors[i].denominator /
+                                                  bds_factors[i].numerator;
                        break;
                }
        }
@@ -2751,34 +2755,34 @@ static void __configure_vf_output(struct atomisp_sub_device *asd,
 {
        struct atomisp_device *isp = asd->isp;
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        stream_env->pipe_configs[pipe_id].mode =
-               __pipe_id_to_pipe_mode(asd, pipe_id);
+           __pipe_id_to_pipe_mode(asd, pipe_id);
        stream_env->update_pipe[pipe_id] = true;
 
        stream_env->pipe_configs[pipe_id].vf_output_info[0].res.width = width;
        stream_env->pipe_configs[pipe_id].vf_output_info[0].res.height = height;
        stream_env->pipe_configs[pipe_id].vf_output_info[0].format = format;
        stream_env->pipe_configs[pipe_id].vf_output_info[0].padded_width =
-               min_width;
+           min_width;
        dev_dbg(isp->dev,
                "configuring pipe[%d] vf output info w=%d.h=%d.f=%d.\n",
-                pipe_id, width, height, format);
+               pipe_id, width, height, format);
 }
 
 static void __configure_video_vf_output(struct atomisp_sub_device *asd,
-                                 unsigned int width, unsigned int height,
-                                 unsigned int min_width,
-                                 enum atomisp_css_frame_format format,
-                                 enum ia_css_pipe_id pipe_id)
+                                       unsigned int width, unsigned int height,
+                                       unsigned int min_width,
+                                       enum atomisp_css_frame_format format,
+                                       enum ia_css_pipe_id pipe_id)
 {
        struct atomisp_device *isp = asd->isp;
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        struct ia_css_frame_info *css_output_info;
 
        stream_env->pipe_configs[pipe_id].mode =
-                                       __pipe_id_to_pipe_mode(asd, pipe_id);
+           __pipe_id_to_pipe_mode(asd, pipe_id);
        stream_env->update_pipe[pipe_id] = true;
 
        /*
@@ -2788,10 +2792,10 @@ static void __configure_video_vf_output(struct atomisp_sub_device *asd,
         */
        if (asd->continuous_mode->val)
                css_output_info = &stream_env->pipe_configs[pipe_id].
-                       vf_output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
+                                 vf_output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
        else
                css_output_info = &stream_env->pipe_configs[pipe_id].
-                       vf_output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
+                                 vf_output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
 
        css_output_info->res.width = width;
        css_output_info->res.height = height;
@@ -2799,14 +2803,14 @@ static void __configure_video_vf_output(struct atomisp_sub_device *asd,
        css_output_info->padded_width = min_width;
        dev_dbg(isp->dev,
                "configuring pipe[%d] vf output info w=%d.h=%d.f=%d.\n",
-                pipe_id, width, height, format);
+               pipe_id, width, height, format);
 }
 
 static int __get_frame_info(struct atomisp_sub_device *asd,
-                               unsigned int stream_index,
-                               struct atomisp_css_frame_info *info,
-                               enum frame_info_type type,
-                               enum ia_css_pipe_id pipe_id)
+                           unsigned int stream_index,
+                           struct atomisp_css_frame_info *info,
+                           enum frame_info_type type,
+                           enum ia_css_pipe_id pipe_id)
 {
        struct atomisp_device *isp = asd->isp;
        enum ia_css_err ret;
@@ -2826,8 +2830,8 @@ static int __get_frame_info(struct atomisp_sub_device *asd,
                goto stream_err;
 
        ret = ia_css_pipe_get_info(
-               asd->stream_env[stream_index]
-               .pipes[pipe_id], &p_info);
+                 asd->stream_env[stream_index]
+                 .pipes[pipe_id], &p_info);
        if (ret == IA_CSS_SUCCESS) {
                switch (type) {
                case ATOMISP_CSS_VF_FRAME:
@@ -2861,7 +2865,7 @@ stream_err:
 }
 
 static unsigned int atomisp_get_pipe_index(struct atomisp_sub_device *asd,
-                                          uint16_t source_pad)
+       uint16_t source_pad)
 {
        struct atomisp_device *isp = asd->isp;
        /*
@@ -2887,7 +2891,7 @@ static unsigned int atomisp_get_pipe_index(struct atomisp_sub_device *asd,
                return IA_CSS_PIPE_ID_CAPTURE;
        case ATOMISP_SUBDEV_PAD_SOURCE_VF:
                if (!atomisp_is_mbuscode_raw(
-                   asd->fmt[asd->capture_pad].fmt.code))
+                       asd->fmt[asd->capture_pad].fmt.code))
                        return IA_CSS_PIPE_ID_CAPTURE;
        case ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW:
                if (asd->yuvpp_mode)
@@ -2906,8 +2910,8 @@ static unsigned int atomisp_get_pipe_index(struct atomisp_sub_device *asd,
 }
 
 int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
-                               u16 source_pad,
-                               struct atomisp_css_frame_info *frame_info)
+                              u16 source_pad,
+                              struct atomisp_css_frame_info *frame_info)
 {
        struct ia_css_pipe_info info;
        int pipe_index = atomisp_get_pipe_index(asd, source_pad);
@@ -2918,12 +2922,12 @@ int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
                stream_index = atomisp_source_pad_to_stream_id(asd, source_pad);
        else {
                stream_index = (pipe_index == IA_CSS_PIPE_ID_YUVPP) ?
-                          ATOMISP_INPUT_STREAM_VIDEO :
-                          atomisp_source_pad_to_stream_id(asd, source_pad);
+                              ATOMISP_INPUT_STREAM_VIDEO :
+                              atomisp_source_pad_to_stream_id(asd, source_pad);
        }
 
        if (IA_CSS_SUCCESS != ia_css_pipe_get_info(asd->stream_env[stream_index]
-                                .pipes[pipe_index], &info)) {
+               .pipes[pipe_index], &info)) {
                dev_err(isp->dev, "ia_css_pipe_get_info FAILED");
                return -EINVAL;
        }
@@ -2935,10 +2939,10 @@ int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
        case ATOMISP_SUBDEV_PAD_SOURCE_VIDEO:
                if (ATOMISP_USE_YUVPP(asd) && asd->continuous_mode->val)
                        *frame_info = info.
-                               output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
+                                     output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
                else
                        *frame_info = info.
-                               output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
+                                     output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
                break;
        case ATOMISP_SUBDEV_PAD_SOURCE_VF:
                if (stream_index == ATOMISP_INPUT_STREAM_POSTVIEW)
@@ -2952,16 +2956,16 @@ int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
                     pipe_index == IA_CSS_PIPE_ID_YUVPP))
                        if (ATOMISP_USE_YUVPP(asd) && asd->continuous_mode->val)
                                *frame_info = info.
-                                       vf_output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
+                                             vf_output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
                        else
                                *frame_info = info.
-                                       vf_output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
+                                             vf_output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
                else if (ATOMISP_USE_YUVPP(asd) && asd->continuous_mode->val)
                        *frame_info =
-                               info.output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
+                           info.output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
                else
                        *frame_info =
-                               info.output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
+                           info.output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
 
                break;
        default:
@@ -2972,14 +2976,14 @@ int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_copy_configure_output(struct atomisp_sub_device *asd,
-                               unsigned int stream_index,
-                               unsigned int width, unsigned int height,
-                               unsigned int padded_width,
-                               enum atomisp_css_frame_format format)
+                                     unsigned int stream_index,
+                                     unsigned int width, unsigned int height,
+                                     unsigned int padded_width,
+                                     enum atomisp_css_frame_format format)
 {
        asd->stream_env[stream_index].pipe_configs[IA_CSS_PIPE_ID_COPY].
-                                       default_capture_config.mode =
-                                       CSS_CAPTURE_MODE_RAW;
+       default_capture_config.mode =
+           CSS_CAPTURE_MODE_RAW;
 
        __configure_output(asd, stream_index, width, height, padded_width,
                           format, IA_CSS_PIPE_ID_COPY);
@@ -2987,14 +2991,14 @@ int atomisp_css_copy_configure_output(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_yuvpp_configure_output(struct atomisp_sub_device *asd,
-                               unsigned int stream_index,
-                               unsigned int width, unsigned int height,
-                               unsigned int padded_width,
-                               enum atomisp_css_frame_format format)
+                                      unsigned int stream_index,
+                                      unsigned int width, unsigned int height,
+                                      unsigned int padded_width,
+                                      enum atomisp_css_frame_format format)
 {
        asd->stream_env[stream_index].pipe_configs[IA_CSS_PIPE_ID_YUVPP].
-                                       default_capture_config.mode =
-                                       CSS_CAPTURE_MODE_RAW;
+       default_capture_config.mode =
+           CSS_CAPTURE_MODE_RAW;
 
        __configure_output(asd, stream_index, width, height, padded_width,
                           format, IA_CSS_PIPE_ID_YUVPP);
@@ -3002,67 +3006,68 @@ int atomisp_css_yuvpp_configure_output(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_yuvpp_configure_viewfinder(
-                               struct atomisp_sub_device *asd,
-                               unsigned int stream_index,
-                               unsigned int width, unsigned int height,
-                               unsigned int min_width,
-                               enum atomisp_css_frame_format format)
+    struct atomisp_sub_device *asd,
+    unsigned int stream_index,
+    unsigned int width, unsigned int height,
+    unsigned int min_width,
+    enum atomisp_css_frame_format format)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[stream_index];
+                   &asd->stream_env[stream_index];
        enum ia_css_pipe_id pipe_id = IA_CSS_PIPE_ID_YUVPP;
 
        stream_env->pipe_configs[pipe_id].mode =
-               __pipe_id_to_pipe_mode(asd, pipe_id);
+           __pipe_id_to_pipe_mode(asd, pipe_id);
        stream_env->update_pipe[pipe_id] = true;
 
        stream_env->pipe_configs[pipe_id].vf_output_info[0].res.width = width;
        stream_env->pipe_configs[pipe_id].vf_output_info[0].res.height = height;
        stream_env->pipe_configs[pipe_id].vf_output_info[0].format = format;
        stream_env->pipe_configs[pipe_id].vf_output_info[0].padded_width =
-               min_width;
+           min_width;
        return 0;
 }
 
 int atomisp_css_yuvpp_get_output_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       unsigned int stream_index,
-                                       struct atomisp_css_frame_info *info)
+    struct atomisp_sub_device *asd,
+    unsigned int stream_index,
+    struct atomisp_css_frame_info *info)
 {
        return __get_frame_info(asd, stream_index, info,
-                       ATOMISP_CSS_OUTPUT_FRAME, IA_CSS_PIPE_ID_YUVPP);
+                               ATOMISP_CSS_OUTPUT_FRAME, IA_CSS_PIPE_ID_YUVPP);
 }
 
 int atomisp_css_yuvpp_get_viewfinder_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       unsigned int stream_index,
-                                       struct atomisp_css_frame_info *info)
+    struct atomisp_sub_device *asd,
+    unsigned int stream_index,
+    struct atomisp_css_frame_info *info)
 {
        return __get_frame_info(asd, stream_index, info,
-                       ATOMISP_CSS_VF_FRAME, IA_CSS_PIPE_ID_YUVPP);
+                               ATOMISP_CSS_VF_FRAME, IA_CSS_PIPE_ID_YUVPP);
 }
 
 int atomisp_css_preview_configure_output(struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height,
-                               unsigned int min_width,
-                               enum atomisp_css_frame_format format)
+       unsigned int width, unsigned int height,
+       unsigned int min_width,
+       enum atomisp_css_frame_format format)
 {
        /*
         * to SOC camera, use yuvpp pipe.
         */
        if (ATOMISP_USE_YUVPP(asd))
-               __configure_video_preview_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width, height,
-                                               min_width, format, IA_CSS_PIPE_ID_YUVPP);
+               __configure_video_preview_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width,
+                                                height,
+                                                min_width, format, IA_CSS_PIPE_ID_YUVPP);
        else
                __configure_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width, height,
-                                       min_width, format, IA_CSS_PIPE_ID_PREVIEW);
+                                  min_width, format, IA_CSS_PIPE_ID_PREVIEW);
        return 0;
 }
 
 int atomisp_css_capture_configure_output(struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height,
-                               unsigned int min_width,
-                               enum atomisp_css_frame_format format)
+       unsigned int width, unsigned int height,
+       unsigned int min_width,
+       enum atomisp_css_frame_format format)
 {
        enum ia_css_pipe_id pipe_id;
 
@@ -3075,50 +3080,51 @@ int atomisp_css_capture_configure_output(struct atomisp_sub_device *asd,
                pipe_id = IA_CSS_PIPE_ID_CAPTURE;
 
        __configure_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width, height,
-                                               min_width, format, pipe_id);
+                          min_width, format, pipe_id);
        return 0;
 }
 
 int atomisp_css_video_configure_output(struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height,
-                               unsigned int min_width,
-                               enum atomisp_css_frame_format format)
+                                      unsigned int width, unsigned int height,
+                                      unsigned int min_width,
+                                      enum atomisp_css_frame_format format)
 {
        /*
         * to SOC camera, use yuvpp pipe.
         */
        if (ATOMISP_USE_YUVPP(asd))
-               __configure_video_preview_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width, height,
-                                       min_width, format, IA_CSS_PIPE_ID_YUVPP);
+               __configure_video_preview_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width,
+                                                height,
+                                                min_width, format, IA_CSS_PIPE_ID_YUVPP);
        else
                __configure_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width, height,
-                                       min_width, format, IA_CSS_PIPE_ID_VIDEO);
+                                  min_width, format, IA_CSS_PIPE_ID_VIDEO);
        return 0;
 }
 
 int atomisp_css_video_configure_viewfinder(
-                               struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height,
-                               unsigned int min_width,
-                               enum atomisp_css_frame_format format)
+    struct atomisp_sub_device *asd,
+    unsigned int width, unsigned int height,
+    unsigned int min_width,
+    enum atomisp_css_frame_format format)
 {
        /*
         * to SOC camera, video will use yuvpp pipe.
         */
        if (ATOMISP_USE_YUVPP(asd))
                __configure_video_vf_output(asd, width, height, min_width, format,
-                                                       IA_CSS_PIPE_ID_YUVPP);
+                                           IA_CSS_PIPE_ID_YUVPP);
        else
                __configure_vf_output(asd, width, height, min_width, format,
-                                                       IA_CSS_PIPE_ID_VIDEO);
+                                     IA_CSS_PIPE_ID_VIDEO);
        return 0;
 }
 
 int atomisp_css_capture_configure_viewfinder(
-                               struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height,
-                               unsigned int min_width,
-                               enum atomisp_css_frame_format format)
+    struct atomisp_sub_device *asd,
+    unsigned int width, unsigned int height,
+    unsigned int min_width,
+    enum atomisp_css_frame_format format)
 {
        enum ia_css_pipe_id pipe_id;
 
@@ -3131,13 +3137,13 @@ int atomisp_css_capture_configure_viewfinder(
                pipe_id = IA_CSS_PIPE_ID_CAPTURE;
 
        __configure_vf_output(asd, width, height, min_width, format,
-                                                       pipe_id);
+                             pipe_id);
        return 0;
 }
 
 int atomisp_css_video_get_viewfinder_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info)
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info)
 {
        enum ia_css_pipe_id pipe_id;
        enum frame_info_type frame_type = ATOMISP_CSS_VF_FRAME;
@@ -3151,12 +3157,12 @@ int atomisp_css_video_get_viewfinder_frame_info(
        }
 
        return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
-                                               frame_type, pipe_id);
+                               frame_type, pipe_id);
 }
 
 int atomisp_css_capture_get_viewfinder_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info)
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info)
 {
        enum ia_css_pipe_id pipe_id;
 
@@ -3166,32 +3172,32 @@ int atomisp_css_capture_get_viewfinder_frame_info(
                pipe_id = IA_CSS_PIPE_ID_CAPTURE;
 
        return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
-                                               ATOMISP_CSS_VF_FRAME, pipe_id);
+                               ATOMISP_CSS_VF_FRAME, pipe_id);
 }
 
 int atomisp_css_capture_get_output_raw_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info)
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info)
 {
        if (ATOMISP_USE_YUVPP(asd))
                return 0;
 
        return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
-                       ATOMISP_CSS_RAW_FRAME, IA_CSS_PIPE_ID_CAPTURE);
+                               ATOMISP_CSS_RAW_FRAME, IA_CSS_PIPE_ID_CAPTURE);
 }
 
 int atomisp_css_copy_get_output_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       unsigned int stream_index,
-                                       struct atomisp_css_frame_info *info)
+    struct atomisp_sub_device *asd,
+    unsigned int stream_index,
+    struct atomisp_css_frame_info *info)
 {
        return __get_frame_info(asd, stream_index, info,
-                       ATOMISP_CSS_OUTPUT_FRAME, IA_CSS_PIPE_ID_COPY);
+                               ATOMISP_CSS_OUTPUT_FRAME, IA_CSS_PIPE_ID_COPY);
 }
 
 int atomisp_css_preview_get_output_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info)
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info)
 {
        enum ia_css_pipe_id pipe_id;
        enum frame_info_type frame_type = ATOMISP_CSS_OUTPUT_FRAME;
@@ -3205,12 +3211,12 @@ int atomisp_css_preview_get_output_frame_info(
        }
 
        return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
-                                       frame_type, pipe_id);
+                               frame_type, pipe_id);
 }
 
 int atomisp_css_capture_get_output_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info)
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info)
 {
        enum ia_css_pipe_id pipe_id;
 
@@ -3220,12 +3226,12 @@ int atomisp_css_capture_get_output_frame_info(
                pipe_id = IA_CSS_PIPE_ID_CAPTURE;
 
        return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
-                                       ATOMISP_CSS_OUTPUT_FRAME, pipe_id);
+                               ATOMISP_CSS_OUTPUT_FRAME, pipe_id);
 }
 
 int atomisp_css_video_get_output_frame_info(
-                                       struct atomisp_sub_device *asd,
-                                       struct atomisp_css_frame_info *info)
+    struct atomisp_sub_device *asd,
+    struct atomisp_css_frame_info *info)
 {
        enum ia_css_pipe_id pipe_id;
        enum frame_info_type frame_type = ATOMISP_CSS_OUTPUT_FRAME;
@@ -3239,68 +3245,68 @@ int atomisp_css_video_get_output_frame_info(
        }
 
        return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
-                                       frame_type, pipe_id);
+                               frame_type, pipe_id);
 }
 
 int atomisp_css_preview_configure_pp_input(
-                               struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height)
+    struct atomisp_sub_device *asd,
+    unsigned int width, unsigned int height)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        __configure_preview_pp_input(asd, width, height,
-               ATOMISP_USE_YUVPP(asd) ?
-               IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_PREVIEW);
+                                    ATOMISP_USE_YUVPP(asd) ?
+                                    IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_PREVIEW);
 
        if (width > stream_env->pipe_configs[IA_CSS_PIPE_ID_CAPTURE].
-                                       capt_pp_in_res.width)
+           capt_pp_in_res.width)
                __configure_capture_pp_input(asd, width, height,
-                       ATOMISP_USE_YUVPP(asd) ?
-               IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
+                                            ATOMISP_USE_YUVPP(asd) ?
+                                            IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
        return 0;
 }
 
 int atomisp_css_capture_configure_pp_input(
-                               struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height)
+    struct atomisp_sub_device *asd,
+    unsigned int width, unsigned int height)
 {
        __configure_capture_pp_input(asd, width, height,
-               ATOMISP_USE_YUVPP(asd) ?
-               IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
+                                    ATOMISP_USE_YUVPP(asd) ?
+                                    IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
        return 0;
 }
 
 int atomisp_css_video_configure_pp_input(
-                               struct atomisp_sub_device *asd,
-                               unsigned int width, unsigned int height)
+    struct atomisp_sub_device *asd,
+    unsigned int width, unsigned int height)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
 
        __configure_video_pp_input(asd, width, height,
-               ATOMISP_USE_YUVPP(asd) ?
-               IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_VIDEO);
+                                  ATOMISP_USE_YUVPP(asd) ?
+                                  IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_VIDEO);
 
        if (width > stream_env->pipe_configs[IA_CSS_PIPE_ID_CAPTURE].
-                                       capt_pp_in_res.width)
+           capt_pp_in_res.width)
                __configure_capture_pp_input(asd, width, height,
-                       ATOMISP_USE_YUVPP(asd) ?
-                       IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
+                                            ATOMISP_USE_YUVPP(asd) ?
+                                            IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
        return 0;
 }
 
 int atomisp_css_offline_capture_configure(struct atomisp_sub_device *asd,
-                       int num_captures, unsigned int skip, int offset)
+       int num_captures, unsigned int skip, int offset)
 {
        enum ia_css_err ret;
 
 #ifdef ISP2401
        dev_dbg(asd->isp->dev, "%s num_capture:%d skip:%d offset:%d\n",
-                       __func__, num_captures, skip, offset);
+               __func__, num_captures, skip, offset);
 #endif
        ret = ia_css_stream_capture(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               num_captures, skip, offset);
+                 asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+                 num_captures, skip, offset);
        if (ret != IA_CSS_SUCCESS)
                return -EINVAL;
 
@@ -3312,8 +3318,8 @@ int atomisp_css_exp_id_capture(struct atomisp_sub_device *asd, int exp_id)
        enum ia_css_err ret;
 
        ret = ia_css_stream_capture_frame(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               exp_id);
+                 asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+                 exp_id);
        if (ret == IA_CSS_ERR_QUEUE_IS_FULL) {
                /* capture cmd queue is full */
                return -EBUSY;
@@ -3329,8 +3335,8 @@ int atomisp_css_exp_id_unlock(struct atomisp_sub_device *asd, int exp_id)
        enum ia_css_err ret;
 
        ret = ia_css_unlock_raw_frame(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               exp_id);
+                 asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+                 exp_id);
        if (ret == IA_CSS_ERR_QUEUE_IS_FULL)
                return -EAGAIN;
        else if (ret != IA_CSS_SUCCESS)
@@ -3343,11 +3349,11 @@ int atomisp_css_capture_enable_xnr(struct atomisp_sub_device *asd,
                                   bool enable)
 {
        asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .pipe_configs[IA_CSS_PIPE_ID_CAPTURE]
-               .default_capture_config.enable_xnr = enable;
+       .pipe_configs[IA_CSS_PIPE_ID_CAPTURE]
+       .default_capture_config.enable_xnr = enable;
        asd->params.capture_config.enable_xnr = enable;
        asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .update_pipe[IA_CSS_PIPE_ID_CAPTURE] = true;
+       .update_pipe[IA_CSS_PIPE_ID_CAPTURE] = true;
 
        return 0;
 }
@@ -3357,8 +3363,8 @@ void atomisp_css_send_input_frame(struct atomisp_sub_device *asd,
                                  unsigned int height)
 {
        ia_css_stream_send_input_frame(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               data, width, height);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           data, width, height);
 }
 
 bool atomisp_css_isp_has_started(void)
@@ -3369,35 +3375,35 @@ bool atomisp_css_isp_has_started(void)
 void atomisp_css_request_flash(struct atomisp_sub_device *asd)
 {
        ia_css_stream_request_flash(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream);
 }
 
 void atomisp_css_set_wb_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_wb_config *wb_config)
+                              struct atomisp_css_wb_config *wb_config)
 {
        asd->params.config.wb_config = wb_config;
 }
 
 void atomisp_css_set_ob_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ob_config *ob_config)
+                              struct atomisp_css_ob_config *ob_config)
 {
        asd->params.config.ob_config = ob_config;
 }
 
 void atomisp_css_set_dp_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_dp_config *dp_config)
+                              struct atomisp_css_dp_config *dp_config)
 {
        asd->params.config.dp_config = dp_config;
 }
 
 void atomisp_css_set_de_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_de_config *de_config)
+                              struct atomisp_css_de_config *de_config)
 {
        asd->params.config.de_config = de_config;
 }
 
 void atomisp_css_set_dz_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_dz_config *dz_config)
+                              struct atomisp_css_dz_config *dz_config)
 {
        asd->params.config.dz_config = dz_config;
 }
@@ -3408,145 +3414,145 @@ void atomisp_css_set_default_de_config(struct atomisp_sub_device *asd)
 }
 
 void atomisp_css_set_ce_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ce_config *ce_config)
+                              struct atomisp_css_ce_config *ce_config)
 {
        asd->params.config.ce_config = ce_config;
 }
 
 void atomisp_css_set_nr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_nr_config *nr_config)
+                              struct atomisp_css_nr_config *nr_config)
 {
        asd->params.config.nr_config = nr_config;
 }
 
 void atomisp_css_set_ee_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ee_config *ee_config)
+                              struct atomisp_css_ee_config *ee_config)
 {
        asd->params.config.ee_config = ee_config;
 }
 
 void atomisp_css_set_tnr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_tnr_config *tnr_config)
+                               struct atomisp_css_tnr_config *tnr_config)
 {
        asd->params.config.tnr_config = tnr_config;
 }
 
 void atomisp_css_set_cc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_cc_config *cc_config)
+                              struct atomisp_css_cc_config *cc_config)
 {
        asd->params.config.cc_config = cc_config;
 }
 
 void atomisp_css_set_macc_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_macc_table *macc_table)
+                               struct atomisp_css_macc_table *macc_table)
 {
        asd->params.config.macc_table = macc_table;
 }
 
 void atomisp_css_set_macc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_macc_config *macc_config)
+                                struct atomisp_css_macc_config *macc_config)
 {
        asd->params.config.macc_config = macc_config;
 }
 
 void atomisp_css_set_ecd_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ecd_config *ecd_config)
+                               struct atomisp_css_ecd_config *ecd_config)
 {
        asd->params.config.ecd_config = ecd_config;
 }
 
 void atomisp_css_set_ynr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ynr_config *ynr_config)
+                               struct atomisp_css_ynr_config *ynr_config)
 {
        asd->params.config.ynr_config = ynr_config;
 }
 
 void atomisp_css_set_fc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_fc_config *fc_config)
+                              struct atomisp_css_fc_config *fc_config)
 {
        asd->params.config.fc_config = fc_config;
 }
 
 void atomisp_css_set_ctc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ctc_config *ctc_config)
+                               struct atomisp_css_ctc_config *ctc_config)
 {
        asd->params.config.ctc_config = ctc_config;
 }
 
 void atomisp_css_set_cnr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_cnr_config *cnr_config)
+                               struct atomisp_css_cnr_config *cnr_config)
 {
        asd->params.config.cnr_config = cnr_config;
 }
 
 void atomisp_css_set_aa_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_aa_config *aa_config)
+                              struct atomisp_css_aa_config *aa_config)
 {
        asd->params.config.aa_config = aa_config;
 }
 
 void atomisp_css_set_baa_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_baa_config *baa_config)
+                               struct atomisp_css_baa_config *baa_config)
 {
        asd->params.config.baa_config = baa_config;
 }
 
 void atomisp_css_set_anr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_anr_config *anr_config)
+                               struct atomisp_css_anr_config *anr_config)
 {
        asd->params.config.anr_config = anr_config;
 }
 
 void atomisp_css_set_xnr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_xnr_config *xnr_config)
+                               struct atomisp_css_xnr_config *xnr_config)
 {
        asd->params.config.xnr_config = xnr_config;
 }
 
 void atomisp_css_set_yuv2rgb_cc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_cc_config *yuv2rgb_cc_config)
+                                      struct atomisp_css_cc_config *yuv2rgb_cc_config)
 {
        asd->params.config.yuv2rgb_cc_config = yuv2rgb_cc_config;
 }
 
 void atomisp_css_set_rgb2yuv_cc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_cc_config *rgb2yuv_cc_config)
+                                      struct atomisp_css_cc_config *rgb2yuv_cc_config)
 {
        asd->params.config.rgb2yuv_cc_config = rgb2yuv_cc_config;
 }
 
 void atomisp_css_set_xnr_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_xnr_table *xnr_table)
+                              struct atomisp_css_xnr_table *xnr_table)
 {
        asd->params.config.xnr_table = xnr_table;
 }
 
 void atomisp_css_set_r_gamma_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_rgb_gamma_table *r_gamma_table)
+                                  struct atomisp_css_rgb_gamma_table *r_gamma_table)
 {
        asd->params.config.r_gamma_table = r_gamma_table;
 }
 
 void atomisp_css_set_g_gamma_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_rgb_gamma_table *g_gamma_table)
+                                  struct atomisp_css_rgb_gamma_table *g_gamma_table)
 {
        asd->params.config.g_gamma_table = g_gamma_table;
 }
 
 void atomisp_css_set_b_gamma_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_rgb_gamma_table *b_gamma_table)
+                                  struct atomisp_css_rgb_gamma_table *b_gamma_table)
 {
        asd->params.config.b_gamma_table = b_gamma_table;
 }
 
 void atomisp_css_set_gamma_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_gamma_table *gamma_table)
+                                struct atomisp_css_gamma_table *gamma_table)
 {
        asd->params.config.gamma_table = gamma_table;
 }
 
 void atomisp_css_set_ctc_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ctc_table *ctc_table)
+                              struct atomisp_css_ctc_table *ctc_table)
 {
        int i;
        u16 *vamem_ptr = ctc_table->data.vamem_1;
@@ -3573,46 +3579,46 @@ void atomisp_css_set_ctc_table(struct atomisp_sub_device *asd,
 }
 
 void atomisp_css_set_anr_thres(struct atomisp_sub_device *asd,
-                       struct atomisp_css_anr_thres *anr_thres)
+                              struct atomisp_css_anr_thres *anr_thres)
 {
        asd->params.config.anr_thres = anr_thres;
 }
 
 void atomisp_css_set_dvs_6axis(struct atomisp_sub_device *asd,
-                       struct atomisp_css_dvs_6axis *dvs_6axis)
+                              struct atomisp_css_dvs_6axis *dvs_6axis)
 {
        asd->params.config.dvs_6axis_config = dvs_6axis;
 }
 
 void atomisp_css_set_gc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_gc_config *gc_config)
+                              struct atomisp_css_gc_config *gc_config)
 {
        asd->params.config.gc_config = gc_config;
 }
 
 void atomisp_css_set_3a_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_3a_config *s3a_config)
+                              struct atomisp_css_3a_config *s3a_config)
 {
        asd->params.config.s3a_config = s3a_config;
 }
 
 void atomisp_css_video_set_dis_vector(struct atomisp_sub_device *asd,
-                               struct atomisp_dis_vector *vector)
+                                     struct atomisp_dis_vector *vector)
 {
        if (!asd->params.config.motion_vector)
                asd->params.config.motion_vector = &asd->params.css_param.motion_vector;
 
        memset(asd->params.config.motion_vector,
-                       0, sizeof(struct ia_css_vector));
+              0, sizeof(struct ia_css_vector));
        asd->params.css_param.motion_vector.x = vector->x;
        asd->params.css_param.motion_vector.y = vector->y;
 }
 
 static int atomisp_compare_dvs_grid(struct atomisp_sub_device *asd,
-                               struct atomisp_dvs_grid_info *atomgrid)
+                                   struct atomisp_dvs_grid_info *atomgrid)
 {
        struct atomisp_css_dvs_grid_info *cur =
-               atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+           atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
 
        if (!cur) {
                dev_err(asd->isp->dev, "dvs grid not available!\n");
@@ -3633,13 +3639,13 @@ static int atomisp_compare_dvs_grid(struct atomisp_sub_device *asd,
 }
 
 void  atomisp_css_set_dvs2_coefs(struct atomisp_sub_device *asd,
-                              struct ia_css_dvs2_coefficients *coefs)
+                                struct ia_css_dvs2_coefficients *coefs)
 {
        asd->params.config.dvs2_coefs = coefs;
 }
 
 int atomisp_css_set_dis_coefs(struct atomisp_sub_device *asd,
-                         struct atomisp_dis_coefficients *coefs)
+                             struct atomisp_dis_coefficients *coefs)
 {
        if (atomisp_compare_dvs_grid(asd, &coefs->grid_info) != 0)
                /* If the grid info in the argument differs from the current
@@ -3666,70 +3672,70 @@ int atomisp_css_set_dis_coefs(struct atomisp_sub_device *asd,
                return -EINVAL;
 
        if (copy_from_user(asd->params.css_param.dvs2_coeff->hor_coefs.odd_real,
-           coefs->hor_coefs.odd_real, asd->params.dvs_hor_coef_bytes))
+                          coefs->hor_coefs.odd_real, asd->params.dvs_hor_coef_bytes))
                return -EFAULT;
        if (copy_from_user(asd->params.css_param.dvs2_coeff->hor_coefs.odd_imag,
-           coefs->hor_coefs.odd_imag, asd->params.dvs_hor_coef_bytes))
+                          coefs->hor_coefs.odd_imag, asd->params.dvs_hor_coef_bytes))
                return -EFAULT;
        if (copy_from_user(asd->params.css_param.dvs2_coeff->hor_coefs.even_real,
-           coefs->hor_coefs.even_real, asd->params.dvs_hor_coef_bytes))
+                          coefs->hor_coefs.even_real, asd->params.dvs_hor_coef_bytes))
                return -EFAULT;
        if (copy_from_user(asd->params.css_param.dvs2_coeff->hor_coefs.even_imag,
-           coefs->hor_coefs.even_imag, asd->params.dvs_hor_coef_bytes))
+                          coefs->hor_coefs.even_imag, asd->params.dvs_hor_coef_bytes))
                return -EFAULT;
 
        if (copy_from_user(asd->params.css_param.dvs2_coeff->ver_coefs.odd_real,
-           coefs->ver_coefs.odd_real, asd->params.dvs_ver_coef_bytes))
+                          coefs->ver_coefs.odd_real, asd->params.dvs_ver_coef_bytes))
                return -EFAULT;
        if (copy_from_user(asd->params.css_param.dvs2_coeff->ver_coefs.odd_imag,
-           coefs->ver_coefs.odd_imag, asd->params.dvs_ver_coef_bytes))
+                          coefs->ver_coefs.odd_imag, asd->params.dvs_ver_coef_bytes))
                return -EFAULT;
        if (copy_from_user(asd->params.css_param.dvs2_coeff->ver_coefs.even_real,
-           coefs->ver_coefs.even_real, asd->params.dvs_ver_coef_bytes))
+                          coefs->ver_coefs.even_real, asd->params.dvs_ver_coef_bytes))
                return -EFAULT;
        if (copy_from_user(asd->params.css_param.dvs2_coeff->ver_coefs.even_imag,
-           coefs->ver_coefs.even_imag, asd->params.dvs_ver_coef_bytes))
+                          coefs->ver_coefs.even_imag, asd->params.dvs_ver_coef_bytes))
                return -EFAULT;
 
        asd->params.css_param.update_flag.dvs2_coefs =
-               (struct atomisp_dvs2_coefficients *)
-               asd->params.css_param.dvs2_coeff;
+           (struct atomisp_dvs2_coefficients *)
+           asd->params.css_param.dvs2_coeff;
        /* FIXME! */
-/*     asd->params.dis_proj_data_valid = false; */
+       /*      asd->params.dis_proj_data_valid = false; */
        asd->params.css_update_params_needed = true;
 
        return 0;
 }
 
 void atomisp_css_set_zoom_factor(struct atomisp_sub_device *asd,
-                                       unsigned int zoom)
+                                unsigned int zoom)
 {
        struct atomisp_device *isp = asd->isp;
 
        if (zoom == asd->params.css_param.dz_config.dx &&
-                zoom == asd->params.css_param.dz_config.dy) {
+           zoom == asd->params.css_param.dz_config.dy) {
                dev_dbg(isp->dev, "same zoom scale. skipped.\n");
                return;
        }
 
        memset(&asd->params.css_param.dz_config, 0,
-               sizeof(struct ia_css_dz_config));
+              sizeof(struct ia_css_dz_config));
        asd->params.css_param.dz_config.dx = zoom;
        asd->params.css_param.dz_config.dy = zoom;
 
        asd->params.css_param.update_flag.dz_config =
-               (struct atomisp_dz_config *)&asd->params.css_param.dz_config;
+           (struct atomisp_dz_config *)&asd->params.css_param.dz_config;
        asd->params.css_update_params_needed = true;
 }
 
 void atomisp_css_set_formats_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_formats_config *formats_config)
+                                   struct atomisp_css_formats_config *formats_config)
 {
        asd->params.config.formats_config = formats_config;
 }
 
 int atomisp_css_get_wb_config(struct atomisp_sub_device *asd,
-                       struct atomisp_wb_config *config)
+                             struct atomisp_wb_config *config)
 {
        struct atomisp_css_wb_config wb_config;
        struct ia_css_isp_config isp_config;
@@ -3744,15 +3750,15 @@ int atomisp_css_get_wb_config(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.wb_config = &wb_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        memcpy(config, &wb_config, sizeof(*config));
 
        return 0;
 }
 
 int atomisp_css_get_ob_config(struct atomisp_sub_device *asd,
-                       struct atomisp_ob_config *config)
+                             struct atomisp_ob_config *config)
 {
        struct atomisp_css_ob_config ob_config;
        struct ia_css_isp_config isp_config;
@@ -3767,15 +3773,15 @@ int atomisp_css_get_ob_config(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.ob_config = &ob_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        memcpy(config, &ob_config, sizeof(*config));
 
        return 0;
 }
 
 int atomisp_css_get_dp_config(struct atomisp_sub_device *asd,
-                       struct atomisp_dp_config *config)
+                             struct atomisp_dp_config *config)
 {
        struct atomisp_css_dp_config dp_config;
        struct ia_css_isp_config isp_config;
@@ -3790,15 +3796,15 @@ int atomisp_css_get_dp_config(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.dp_config = &dp_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        memcpy(config, &dp_config, sizeof(*config));
 
        return 0;
 }
 
 int atomisp_css_get_de_config(struct atomisp_sub_device *asd,
-                       struct atomisp_de_config *config)
+                             struct atomisp_de_config *config)
 {
        struct atomisp_css_de_config de_config;
        struct ia_css_isp_config isp_config;
@@ -3813,15 +3819,15 @@ int atomisp_css_get_de_config(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.de_config = &de_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        memcpy(config, &de_config, sizeof(*config));
 
        return 0;
 }
 
 int atomisp_css_get_nr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_nr_config *config)
+                             struct atomisp_nr_config *config)
 {
        struct atomisp_css_nr_config nr_config;
        struct ia_css_isp_config isp_config;
@@ -3837,15 +3843,15 @@ int atomisp_css_get_nr_config(struct atomisp_sub_device *asd,
 
        isp_config.nr_config = &nr_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        memcpy(config, &nr_config, sizeof(*config));
 
        return 0;
 }
 
 int atomisp_css_get_ee_config(struct atomisp_sub_device *asd,
-                       struct atomisp_ee_config *config)
+                             struct atomisp_ee_config *config)
 {
        struct atomisp_css_ee_config ee_config;
        struct ia_css_isp_config isp_config;
@@ -3853,22 +3859,22 @@ int atomisp_css_get_ee_config(struct atomisp_sub_device *asd,
 
        if (!asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream) {
                dev_err(isp->dev, "%s called after streamoff, skipping.\n",
-                        __func__);
+                       __func__);
                return -EINVAL;
        }
        memset(&ee_config, 0, sizeof(struct atomisp_css_ee_config));
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.ee_config = &ee_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        memcpy(config, &ee_config, sizeof(*config));
 
        return 0;
 }
 
 int atomisp_css_get_tnr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_tnr_config *config)
+                              struct atomisp_tnr_config *config)
 {
        struct atomisp_css_tnr_config tnr_config;
        struct ia_css_isp_config isp_config;
@@ -3883,15 +3889,15 @@ int atomisp_css_get_tnr_config(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.tnr_config = &tnr_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        memcpy(config, &tnr_config, sizeof(*config));
 
        return 0;
 }
 
 int atomisp_css_get_ctc_table(struct atomisp_sub_device *asd,
-                       struct atomisp_ctc_table *config)
+                             struct atomisp_ctc_table *config)
 {
        struct atomisp_css_ctc_table *tab;
        struct ia_css_isp_config isp_config;
@@ -3910,8 +3916,8 @@ int atomisp_css_get_ctc_table(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.ctc_table = tab;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        memcpy(config, tab, sizeof(*tab));
        vfree(tab);
 
@@ -3919,7 +3925,7 @@ int atomisp_css_get_ctc_table(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_get_gamma_table(struct atomisp_sub_device *asd,
-                       struct atomisp_gamma_table *config)
+                               struct atomisp_gamma_table *config)
 {
        struct atomisp_css_gamma_table *tab;
        struct ia_css_isp_config isp_config;
@@ -3938,8 +3944,8 @@ int atomisp_css_get_gamma_table(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.gamma_table = tab;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        memcpy(config, tab, sizeof(*tab));
        vfree(tab);
 
@@ -3947,7 +3953,7 @@ int atomisp_css_get_gamma_table(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_get_gc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_gc_config *config)
+                             struct atomisp_gc_config *config)
 {
        struct atomisp_css_gc_config gc_config;
        struct ia_css_isp_config isp_config;
@@ -3962,8 +3968,8 @@ int atomisp_css_get_gc_config(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.gc_config = &gc_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        /* Get gamma correction params from current setup */
        memcpy(config, &gc_config, sizeof(*config));
 
@@ -3971,7 +3977,7 @@ int atomisp_css_get_gc_config(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_get_3a_config(struct atomisp_sub_device *asd,
-                       struct atomisp_3a_config *config)
+                             struct atomisp_3a_config *config)
 {
        struct atomisp_css_3a_config s3a_config;
        struct ia_css_isp_config isp_config;
@@ -3986,8 +3992,8 @@ int atomisp_css_get_3a_config(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.s3a_config = &s3a_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        /* Get white balance from current setup */
        memcpy(config, &s3a_config, sizeof(*config));
 
@@ -3995,7 +4001,7 @@ int atomisp_css_get_3a_config(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_get_formats_config(struct atomisp_sub_device *asd,
-                       struct atomisp_formats_config *config)
+                                  struct atomisp_formats_config *config)
 {
        struct atomisp_css_formats_config formats_config;
        struct ia_css_isp_config isp_config;
@@ -4010,8 +4016,8 @@ int atomisp_css_get_formats_config(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(isp_config));
        isp_config.formats_config = &formats_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        /* Get narrow gamma from current setup */
        memcpy(config, &formats_config, sizeof(*config));
 
@@ -4019,7 +4025,7 @@ int atomisp_css_get_formats_config(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_get_zoom_factor(struct atomisp_sub_device *asd,
-                                       unsigned int *zoom)
+                               unsigned int *zoom)
 {
        struct ia_css_dz_config dz_config;  /** Digital Zoom */
        struct ia_css_isp_config isp_config;
@@ -4034,8 +4040,8 @@ int atomisp_css_get_zoom_factor(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.dz_config = &dz_config;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
        *zoom = dz_config.dx;
 
        return 0;
@@ -4045,7 +4051,7 @@ int atomisp_css_get_zoom_factor(struct atomisp_sub_device *asd,
  * Function to set/get image stablization statistics
  */
 int atomisp_css_get_dis_stat(struct atomisp_sub_device *asd,
-                        struct atomisp_dis_statistics *stats)
+                            struct atomisp_dis_statistics *stats)
 {
        struct atomisp_device *isp = asd->isp;
        struct atomisp_dis_buf *dis_buf;
@@ -4083,16 +4089,16 @@ int atomisp_css_get_dis_stat(struct atomisp_sub_device *asd,
        }
 
        dis_buf = list_entry(asd->dis_stats.next,
-                       struct atomisp_dis_buf, list);
+                            struct atomisp_dis_buf, list);
        list_del_init(&dis_buf->list);
        spin_unlock_irqrestore(&asd->dis_stats_lock, flags);
 
        if (dis_buf->dvs_map)
                ia_css_translate_dvs2_statistics(
-                       asd->params.dvs_stat, dis_buf->dvs_map);
+                   asd->params.dvs_stat, dis_buf->dvs_map);
        else
                ia_css_get_dvs2_statistics(asd->params.dvs_stat,
-                       dis_buf->dis_data);
+                                          dis_buf->dis_data);
        stats->exp_id = dis_buf->dis_data->exp_id;
 
        spin_lock_irqsave(&asd->dis_stats_lock, flags);
@@ -4136,13 +4142,13 @@ int atomisp_css_get_dis_stat(struct atomisp_sub_device *asd,
 }
 
 struct atomisp_css_shading_table *atomisp_css_shading_table_alloc(
-                               unsigned int width, unsigned int height)
+    unsigned int width, unsigned int height)
 {
        return ia_css_shading_table_alloc(width, height);
 }
 
 void atomisp_css_set_shading_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_shading_table *table)
+                                  struct atomisp_css_shading_table *table)
 {
        asd->params.config.shading_table = table;
 }
@@ -4153,19 +4159,19 @@ void atomisp_css_shading_table_free(struct atomisp_css_shading_table *table)
 }
 
 struct atomisp_css_morph_table *atomisp_css_morph_table_allocate(
-                               unsigned int width, unsigned int height)
+    unsigned int width, unsigned int height)
 {
        return ia_css_morph_table_allocate(width, height);
 }
 
 void atomisp_css_set_morph_table(struct atomisp_sub_device *asd,
-                                       struct atomisp_css_morph_table *table)
+                                struct atomisp_css_morph_table *table)
 {
        asd->params.config.morph_table = table;
 }
 
 void atomisp_css_get_morph_table(struct atomisp_sub_device *asd,
-                               struct atomisp_css_morph_table *table)
+                                struct atomisp_css_morph_table *table)
 {
        struct ia_css_isp_config isp_config;
        struct atomisp_device *isp = asd->isp;
@@ -4179,8 +4185,8 @@ void atomisp_css_get_morph_table(struct atomisp_sub_device *asd,
        memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
        isp_config.morph_table = table;
        ia_css_stream_get_isp_config(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               &isp_config);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           &isp_config);
 }
 
 void atomisp_css_morph_table_free(struct atomisp_css_morph_table *table)
@@ -4189,7 +4195,7 @@ void atomisp_css_morph_table_free(struct atomisp_css_morph_table *table)
 }
 
 void atomisp_css_set_cont_prev_start_time(struct atomisp_device *isp,
-                                       unsigned int overlap)
+       unsigned int overlap)
 {
        /* CSS 2.0 doesn't support this API. */
        dev_dbg(isp->dev, "set cont prev start time is not supported.\n");
@@ -4209,7 +4215,7 @@ int atomisp_css_wait_acc_finish(struct atomisp_sub_device *asd)
        /* Unlock the isp mutex taken in IOCTL handler before sleeping! */
        rt_mutex_unlock(&isp->mutex);
        if (wait_for_completion_interruptible_timeout(&asd->acc.acc_done,
-                                       ATOMISP_ISP_TIMEOUT_DURATION) == 0) {
+               ATOMISP_ISP_TIMEOUT_DURATION) == 0) {
                dev_err(isp->dev, "<%s: completion timeout\n", __func__);
                atomisp_css_debug_dump_sp_sw_debug_info();
                atomisp_css_debug_dump_debug_info(__func__);
@@ -4230,9 +4236,9 @@ int atomisp_css_set_acc_parameters(struct atomisp_acc_fw *acc_fw)
                        continue;
 
                ia_css_isp_param_set_css_mem_init(&acc_fw->fw->mem_initializers,
-                                               IA_CSS_PARAM_CLASS_PARAM, mem,
-                                               acc_fw->args[mem].css_ptr,
-                                               acc_fw->args[mem].length);
+                                                 IA_CSS_PARAM_CLASS_PARAM, mem,
+                                                 acc_fw->args[mem].css_ptr,
+                                                 acc_fw->args[mem].length);
        }
 
        return 0;
@@ -4248,25 +4254,25 @@ int atomisp_css_load_acc_extension(struct atomisp_sub_device *asd,
 
        fw->next = NULL;
        hd = &(asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-                       .pipe_configs[pipe_id].acc_extension);
+              .pipe_configs[pipe_id].acc_extension);
        while (*hd)
                hd = &(*hd)->next;
        *hd = fw;
 
        asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .update_pipe[pipe_id] = true;
+       .update_pipe[pipe_id] = true;
        return 0;
 }
 
 /* Unload acc binary extension */
 void atomisp_css_unload_acc_extension(struct atomisp_sub_device *asd,
-                                       struct atomisp_css_fw_info *fw,
-                                       enum atomisp_css_pipe_id pipe_id)
+                                     struct atomisp_css_fw_info *fw,
+                                     enum atomisp_css_pipe_id pipe_id)
 {
        struct atomisp_css_fw_info **hd;
 
        hd = &(asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-                       .pipe_configs[pipe_id].acc_extension);
+              .pipe_configs[pipe_id].acc_extension);
        while (*hd && *hd != fw)
                hd = &(*hd)->next;
        if (!*hd) {
@@ -4277,7 +4283,7 @@ void atomisp_css_unload_acc_extension(struct atomisp_sub_device *asd,
        fw->next = NULL;
 
        asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-               .update_pipe[pipe_id] = true;
+       .update_pipe[pipe_id] = true;
 }
 
 int atomisp_css_create_acc_pipe(struct atomisp_sub_device *asd)
@@ -4285,19 +4291,19 @@ int atomisp_css_create_acc_pipe(struct atomisp_sub_device *asd)
        struct atomisp_device *isp = asd->isp;
        struct ia_css_pipe_config *pipe_config;
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
 
        if (stream_env->acc_stream) {
                if (stream_env->acc_stream_state == CSS_STREAM_STARTED) {
                        if (ia_css_stream_stop(stream_env->acc_stream)
-                               != IA_CSS_SUCCESS) {
+                           != IA_CSS_SUCCESS) {
                                dev_err(isp->dev, "stop acc_stream failed.\n");
                                return -EBUSY;
                        }
                }
 
                if (ia_css_stream_destroy(stream_env->acc_stream)
-                       != IA_CSS_SUCCESS) {
+                   != IA_CSS_SUCCESS) {
                        dev_err(isp->dev, "destroy acc_stream failed.\n");
                        return -EBUSY;
                }
@@ -4307,7 +4313,7 @@ int atomisp_css_create_acc_pipe(struct atomisp_sub_device *asd)
        pipe_config = &stream_env->pipe_configs[CSS_PIPE_ID_ACC];
        ia_css_pipe_config_defaults(pipe_config);
        asd->acc.acc_stages = kzalloc(MAX_ACC_STAGES *
-                               sizeof(void *), GFP_KERNEL);
+                                     sizeof(void *), GFP_KERNEL);
        if (!asd->acc.acc_stages)
                return -ENOMEM;
        pipe_config->acc_stages = asd->acc.acc_stages;
@@ -4326,22 +4332,22 @@ int atomisp_css_start_acc_pipe(struct atomisp_sub_device *asd)
 {
        struct atomisp_device *isp = asd->isp;
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        struct ia_css_pipe_config *pipe_config =
-                       &stream_env->pipe_configs[IA_CSS_PIPE_ID_ACC];
+                   &stream_env->pipe_configs[IA_CSS_PIPE_ID_ACC];
 
        if (ia_css_pipe_create(pipe_config,
-               &stream_env->pipes[IA_CSS_PIPE_ID_ACC]) != IA_CSS_SUCCESS) {
+                              &stream_env->pipes[IA_CSS_PIPE_ID_ACC]) != IA_CSS_SUCCESS) {
                dev_err(isp->dev, "%s: ia_css_pipe_create failed\n",
-                               __func__);
+                       __func__);
                return -EBADE;
        }
 
        memset(&stream_env->acc_stream_config, 0,
-               sizeof(struct ia_css_stream_config));
+              sizeof(struct ia_css_stream_config));
        if (ia_css_stream_create(&stream_env->acc_stream_config, 1,
-                               &stream_env->pipes[IA_CSS_PIPE_ID_ACC],
-                               &stream_env->acc_stream) != IA_CSS_SUCCESS) {
+                                &stream_env->pipes[IA_CSS_PIPE_ID_ACC],
+                                &stream_env->acc_stream) != IA_CSS_SUCCESS) {
                dev_err(isp->dev, "%s: create acc_stream error.\n", __func__);
                return -EINVAL;
        }
@@ -4358,7 +4364,7 @@ int atomisp_css_start_acc_pipe(struct atomisp_sub_device *asd)
        }
 
        if (ia_css_stream_start(stream_env->acc_stream)
-               != IA_CSS_SUCCESS) {
+           != IA_CSS_SUCCESS) {
                dev_err(isp->dev, "acc_stream start error.\n");
                return -EIO;
        }
@@ -4370,7 +4376,7 @@ int atomisp_css_start_acc_pipe(struct atomisp_sub_device *asd)
 int atomisp_css_stop_acc_pipe(struct atomisp_sub_device *asd)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        if (stream_env->acc_stream_state == CSS_STREAM_STARTED) {
                ia_css_stream_stop(stream_env->acc_stream);
                stream_env->acc_stream_state = CSS_STREAM_STOPPED;
@@ -4381,26 +4387,26 @@ int atomisp_css_stop_acc_pipe(struct atomisp_sub_device *asd)
 void atomisp_css_destroy_acc_pipe(struct atomisp_sub_device *asd)
 {
        struct atomisp_stream_env *stream_env =
-               &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
        if (stream_env->acc_stream) {
                if (ia_css_stream_destroy(stream_env->acc_stream)
                    != IA_CSS_SUCCESS)
                        dev_warn(asd->isp->dev,
-                               "destroy acc_stream failed.\n");
+                                "destroy acc_stream failed.\n");
                stream_env->acc_stream = NULL;
        }
 
        if (stream_env->pipes[IA_CSS_PIPE_ID_ACC]) {
                if (ia_css_pipe_destroy(stream_env->pipes[IA_CSS_PIPE_ID_ACC])
-                       != IA_CSS_SUCCESS)
+                   != IA_CSS_SUCCESS)
                        dev_warn(asd->isp->dev,
-                               "destroy ACC pipe failed.\n");
+                                "destroy ACC pipe failed.\n");
                stream_env->pipes[IA_CSS_PIPE_ID_ACC] = NULL;
                stream_env->update_pipe[IA_CSS_PIPE_ID_ACC] = false;
                ia_css_pipe_config_defaults(
-                       &stream_env->pipe_configs[IA_CSS_PIPE_ID_ACC]);
+                   &stream_env->pipe_configs[IA_CSS_PIPE_ID_ACC]);
                ia_css_pipe_extra_config_defaults(
-                       &stream_env->pipe_extra_configs[IA_CSS_PIPE_ID_ACC]);
+                   &stream_env->pipe_extra_configs[IA_CSS_PIPE_ID_ACC]);
        }
        asd->acc.pipeline = NULL;
 
@@ -4416,16 +4422,16 @@ void atomisp_css_destroy_acc_pipe(struct atomisp_sub_device *asd)
 }
 
 int atomisp_css_load_acc_binary(struct atomisp_sub_device *asd,
-                                       struct atomisp_css_fw_info *fw,
-                                       unsigned int index)
+                               struct atomisp_css_fw_info *fw,
+                               unsigned int index)
 {
        struct ia_css_pipe_config *pipe_config =
-                       &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
-                       .pipe_configs[IA_CSS_PIPE_ID_ACC];
+                   &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
+                   .pipe_configs[IA_CSS_PIPE_ID_ACC];
 
        if (index >= MAX_ACC_STAGES) {
                dev_dbg(asd->isp->dev, "%s: index(%d) out of range\n",
-                               __func__, index);
+                       __func__, index);
                return -ENOMEM;
        }
 
@@ -4437,9 +4443,9 @@ int atomisp_css_load_acc_binary(struct atomisp_sub_device *asd,
 }
 
 static struct atomisp_sub_device *__get_atomisp_subdev(
-                                       struct ia_css_pipe *css_pipe,
-                                       struct atomisp_device *isp,
-                                       enum atomisp_input_stream_id *stream_id)
+    struct ia_css_pipe *css_pipe,
+    struct atomisp_device *isp,
+    enum atomisp_input_stream_id *stream_id)
 {
        int i, j, k;
        struct atomisp_sub_device *asd;
@@ -4454,11 +4460,11 @@ static struct atomisp_sub_device *__get_atomisp_subdev(
                        stream_env = &asd->stream_env[j];
                        for (k = 0; k < IA_CSS_PIPE_ID_NUM; k++) {
                                if (stream_env->pipes[k] &&
-                                       stream_env->pipes[k] == css_pipe) {
-                                               *stream_id = j;
-                                               return asd;
-                                       }
+                                   stream_env->pipes[k] == css_pipe) {
+                                       *stream_id = j;
+                                       return asd;
                                }
+                       }
                }
        }
 
@@ -4479,12 +4485,13 @@ int atomisp_css_isr_thread(struct atomisp_device *isp,
 
        while (!atomisp_css_dequeue_event(&current_event)) {
                if (current_event.event.type ==
-                       IA_CSS_EVENT_TYPE_FW_ASSERT) {
+                   IA_CSS_EVENT_TYPE_FW_ASSERT) {
                        /*
                         * Received FW assertion signal,
                         * trigger WDT to recover
                         */
-                       dev_err(isp->dev, "%s: ISP reports FW_ASSERT event! fw_assert_module_id %d fw_assert_line_no %d\n",
+                       dev_err(isp->dev,
+                               "%s: ISP reports FW_ASSERT event! fw_assert_module_id %d fw_assert_line_no %d\n",
                                __func__,
                                current_event.event.fw_assert_module_id,
                                current_event.event.fw_assert_line_no);
@@ -4498,21 +4505,21 @@ int atomisp_css_isr_thread(struct atomisp_device *isp,
                        return -EINVAL;
                } else if (current_event.event.type == IA_CSS_EVENT_TYPE_FW_WARNING) {
                        dev_warn(isp->dev, "%s: ISP reports warning, code is %d, exp_id %d\n",
-                               __func__, current_event.event.fw_warning,
-                               current_event.event.exp_id);
+                                __func__, current_event.event.fw_warning,
+                                current_event.event.exp_id);
                        continue;
                }
 
                asd = __get_atomisp_subdev(current_event.event.pipe,
-                                       isp, &stream_id);
+                                          isp, &stream_id);
                if (!asd) {
                        if (current_event.event.type == CSS_EVENT_TIMER)
                                dev_dbg(isp->dev,
                                        "event: Timer event.");
                        else
                                dev_warn(isp->dev, "%s:no subdev.event:%d",
-                                               __func__,
-                                               current_event.event.type);
+                                        __func__,
+                                        current_event.event.type);
                        continue;
                }
 
@@ -4576,7 +4583,7 @@ int atomisp_css_isr_thread(struct atomisp_device *isp,
                        break;
                default:
                        dev_dbg(isp->dev, "unhandled css stored event: 0x%x\n",
-                                       current_event.event.type);
+                               current_event.event.type);
                        break;
                }
        }
@@ -4592,9 +4599,9 @@ int atomisp_css_isr_thread(struct atomisp_device *isp,
                if (!atomisp_buffers_queued(asd))
                        atomisp_wdt_stop(asd, false);
                else if (reset_wdt_timer[i])
-               /* SOF irq should not reset wdt timer. */
+                       /* SOF irq should not reset wdt timer. */
                        atomisp_wdt_refresh(asd,
-                                       ATOMISP_WDT_KEEP_CURRENT_DELAY);
+                                           ATOMISP_WDT_KEEP_CURRENT_DELAY);
        }
 #endif
 
@@ -4611,8 +4618,8 @@ bool atomisp_css_valid_sof(struct atomisp_device *isp)
                /* Loop for each css vc stream */
                for (j = 0; j < ATOMISP_INPUT_STREAM_NUM; j++) {
                        if (asd->stream_env[j].stream &&
-                               asd->stream_env[j].stream_config.mode ==
-                               IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+                           asd->stream_env[j].stream_config.mode ==
+                           IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
                                return false;
                }
        }
@@ -4650,13 +4657,13 @@ int atomisp_css_dump_blob_infor(void)
 }
 
 void atomisp_css_set_isp_config_id(struct atomisp_sub_device *asd,
-                       uint32_t isp_config_id)
+                                  uint32_t isp_config_id)
 {
        asd->params.config.isp_config_id = isp_config_id;
 }
 
 void atomisp_css_set_isp_config_applied_frame(struct atomisp_sub_device *asd,
-                       struct atomisp_css_frame *output_frame)
+       struct atomisp_css_frame *output_frame)
 {
        asd->params.config.output_frame = output_frame;
 }
@@ -4680,12 +4687,12 @@ int atomisp_set_css_dbgfunc(struct atomisp_device *isp, int opt)
 void atomisp_en_dz_capt_pipe(struct atomisp_sub_device *asd, bool enable)
 {
        ia_css_en_dz_capt_pipe(
-               asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
-               enable);
+           asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+           enable);
 }
 
 struct atomisp_css_dvs_grid_info *atomisp_css_get_dvs_grid_info(
-       struct atomisp_css_grid_info *grid_info)
+    struct atomisp_css_grid_info *grid_info)
 {
        if (!grid_info)
                return NULL;
index a06c5b6e8027d9e3ffc3cc6afac40d8bf0b8e6f3..7abd1ff356522a1a093a7d8393dd90abab61359c 100644 (file)
@@ -196,55 +196,55 @@ struct atomisp_css_event {
 };
 
 void atomisp_css_set_macc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_macc_config *macc_config);
+                                struct atomisp_css_macc_config *macc_config);
 
 void atomisp_css_set_ecd_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ecd_config *ecd_config);
+                               struct atomisp_css_ecd_config *ecd_config);
 
 void atomisp_css_set_ynr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ynr_config *ynr_config);
+                               struct atomisp_css_ynr_config *ynr_config);
 
 void atomisp_css_set_fc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_fc_config *fc_config);
+                              struct atomisp_css_fc_config *fc_config);
 
 void atomisp_css_set_aa_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_aa_config *aa_config);
+                              struct atomisp_css_aa_config *aa_config);
 
 void atomisp_css_set_baa_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_baa_config *baa_config);
+                               struct atomisp_css_baa_config *baa_config);
 
 void atomisp_css_set_anr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_anr_config *anr_config);
+                               struct atomisp_css_anr_config *anr_config);
 
 void atomisp_css_set_xnr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_xnr_config *xnr_config);
+                               struct atomisp_css_xnr_config *xnr_config);
 
 void atomisp_css_set_cnr_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_cnr_config *cnr_config);
+                               struct atomisp_css_cnr_config *cnr_config);
 
 void atomisp_css_set_ctc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_ctc_config *ctc_config);
+                               struct atomisp_css_ctc_config *ctc_config);
 
 void atomisp_css_set_yuv2rgb_cc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_cc_config *yuv2rgb_cc_config);
+                                      struct atomisp_css_cc_config *yuv2rgb_cc_config);
 
 void atomisp_css_set_rgb2yuv_cc_config(struct atomisp_sub_device *asd,
-                       struct atomisp_css_cc_config *rgb2yuv_cc_config);
+                                      struct atomisp_css_cc_config *rgb2yuv_cc_config);
 
 void atomisp_css_set_xnr_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_xnr_table *xnr_table);
+                              struct atomisp_css_xnr_table *xnr_table);
 
 void atomisp_css_set_r_gamma_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_rgb_gamma_table *r_gamma_table);
+                                  struct atomisp_css_rgb_gamma_table *r_gamma_table);
 
 void atomisp_css_set_g_gamma_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_rgb_gamma_table *g_gamma_table);
+                                  struct atomisp_css_rgb_gamma_table *g_gamma_table);
 
 void atomisp_css_set_b_gamma_table(struct atomisp_sub_device *asd,
-                       struct atomisp_css_rgb_gamma_table *b_gamma_table);
+                                  struct atomisp_css_rgb_gamma_table *b_gamma_table);
 
 void atomisp_css_set_anr_thres(struct atomisp_sub_device *asd,
-                       struct atomisp_css_anr_thres *anr_thres);
+                              struct atomisp_css_anr_thres *anr_thres);
 
 int atomisp_css_check_firmware_version(struct atomisp_device *isp);
 
@@ -253,7 +253,7 @@ int atomisp_css_load_firmware(struct atomisp_device *isp);
 void atomisp_css_unload_firmware(struct atomisp_device *isp);
 
 void atomisp_css_set_dvs_6axis(struct atomisp_sub_device *asd,
-                       struct atomisp_css_dvs_6axis *dvs_6axis);
+                              struct atomisp_css_dvs_6axis *dvs_6axis);
 
 unsigned int atomisp_css_debug_get_dtrace_level(void);
 
@@ -264,14 +264,14 @@ int atomisp_css_dump_sp_raw_copy_linecount(bool reduced);
 int atomisp_css_dump_blob_infor(void);
 
 void atomisp_css_set_isp_config_id(struct atomisp_sub_device *asd,
-                       uint32_t isp_config_id);
+                                  uint32_t isp_config_id);
 
 void atomisp_css_set_isp_config_applied_frame(struct atomisp_sub_device *asd,
-                       struct atomisp_css_frame *output_frame);
+       struct atomisp_css_frame *output_frame);
 
 int atomisp_get_css_dbgfunc(void);
 
 int atomisp_set_css_dbgfunc(struct atomisp_device *isp, int opt);
 struct atomisp_css_dvs_grid_info *atomisp_css_get_dvs_grid_info(
-       struct atomisp_css_grid_info *grid_info);
+    struct atomisp_css_grid_info *grid_info);
 #endif
index fb06dcbc96ed52c743bd8805df4f409b2528dbc0..8a630b0d070f217e4e09d388cbe329e2e9ee4e75 100644 (file)
@@ -25,7 +25,7 @@
 #include "atomisp_compat_ioctl32.h"
 
 static int get_atomisp_histogram32(struct atomisp_histogram *kp,
-                                       struct atomisp_histogram32 __user *up)
+                                  struct atomisp_histogram32 __user *up)
 {
        compat_uptr_t tmp;
 
@@ -39,7 +39,7 @@ static int get_atomisp_histogram32(struct atomisp_histogram *kp,
 }
 
 static int put_atomisp_histogram32(struct atomisp_histogram *kp,
-                                       struct atomisp_histogram32 __user *up)
+                                  struct atomisp_histogram32 __user *up)
 {
        compat_uptr_t tmp = (compat_uptr_t)((uintptr_t)kp->data);
 
@@ -52,7 +52,7 @@ static int put_atomisp_histogram32(struct atomisp_histogram *kp,
 }
 
 static inline int get_v4l2_pix_format(struct v4l2_pix_format *kp,
-                                       struct v4l2_pix_format __user *up)
+                                     struct v4l2_pix_format __user *up)
 {
        if (copy_from_user(kp, up, sizeof(struct v4l2_pix_format)))
                return -EFAULT;
@@ -60,7 +60,7 @@ static inline int get_v4l2_pix_format(struct v4l2_pix_format *kp,
 }
 
 static inline int put_v4l2_pix_format(struct v4l2_pix_format *kp,
-                                       struct v4l2_pix_format __user *up)
+                                     struct v4l2_pix_format __user *up)
 {
        if (copy_to_user(up, kp, sizeof(struct v4l2_pix_format)))
                return -EFAULT;
@@ -68,7 +68,7 @@ static inline int put_v4l2_pix_format(struct v4l2_pix_format *kp,
 }
 
 static int get_v4l2_framebuffer32(struct v4l2_framebuffer *kp,
-                                       struct v4l2_framebuffer32 __user *up)
+                                 struct v4l2_framebuffer32 __user *up)
 {
        compat_uptr_t tmp;
 
@@ -84,7 +84,7 @@ static int get_v4l2_framebuffer32(struct v4l2_framebuffer *kp,
 }
 
 static int get_atomisp_dis_statistics32(struct atomisp_dis_statistics *kp,
-                               struct atomisp_dis_statistics32 __user *up)
+                                       struct atomisp_dis_statistics32 __user *up)
 {
        compat_uptr_t hor_prod_odd_real;
        compat_uptr_t hor_prod_odd_imag;
@@ -120,24 +120,24 @@ static int get_atomisp_dis_statistics32(struct atomisp_dis_statistics *kp,
 }
 
 static int put_atomisp_dis_statistics32(struct atomisp_dis_statistics *kp,
-                               struct atomisp_dis_statistics32 __user *up)
+                                       struct atomisp_dis_statistics32 __user *up)
 {
        compat_uptr_t hor_prod_odd_real =
-               (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.odd_real);
+           (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.odd_real);
        compat_uptr_t hor_prod_odd_imag =
-               (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.odd_imag);
+           (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.odd_imag);
        compat_uptr_t hor_prod_even_real =
-               (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.even_real);
+           (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.even_real);
        compat_uptr_t hor_prod_even_imag =
-               (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.even_imag);
+           (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.even_imag);
        compat_uptr_t ver_prod_odd_real =
-               (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.odd_real);
+           (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.odd_real);
        compat_uptr_t ver_prod_odd_imag =
-               (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.odd_imag);
+           (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.odd_imag);
        compat_uptr_t ver_prod_even_real =
-               (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.even_real);
+           (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.even_real);
        compat_uptr_t ver_prod_even_imag =
-               (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.even_imag);
+           (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.even_imag);
 
        if (!access_ok(up, sizeof(struct atomisp_dis_statistics32)) ||
            copy_to_user(up, kp, sizeof(struct atomisp_dvs_grid_info)) ||
@@ -156,7 +156,7 @@ static int put_atomisp_dis_statistics32(struct atomisp_dis_statistics *kp,
 }
 
 static int get_atomisp_dis_coefficients32(struct atomisp_dis_coefficients *kp,
-                               struct atomisp_dis_coefficients32 __user *up)
+       struct atomisp_dis_coefficients32 __user *up)
 {
        compat_uptr_t hor_coefs_odd_real;
        compat_uptr_t hor_coefs_odd_imag;
@@ -191,8 +191,9 @@ static int get_atomisp_dis_coefficients32(struct atomisp_dis_coefficients *kp,
 }
 
 static int get_atomisp_dvs_6axis_config32(struct atomisp_dvs_6axis_config *kp,
-                               struct atomisp_dvs_6axis_config32 __user *up)
-{      compat_uptr_t xcoords_y;
+       struct atomisp_dvs_6axis_config32 __user *up)
+{
+       compat_uptr_t xcoords_y;
        compat_uptr_t ycoords_y;
        compat_uptr_t xcoords_uv;
        compat_uptr_t ycoords_uv;
@@ -217,7 +218,7 @@ static int get_atomisp_dvs_6axis_config32(struct atomisp_dvs_6axis_config *kp,
 }
 
 static int get_atomisp_3a_statistics32(struct atomisp_3a_statistics *kp,
-                               struct atomisp_3a_statistics32 __user *up)
+                                      struct atomisp_3a_statistics32 __user *up)
 {
        compat_uptr_t data;
        compat_uptr_t rgby_data;
@@ -237,7 +238,7 @@ static int get_atomisp_3a_statistics32(struct atomisp_3a_statistics *kp,
 }
 
 static int put_atomisp_3a_statistics32(struct atomisp_3a_statistics *kp,
-                               struct atomisp_3a_statistics32 __user *up)
+                                      struct atomisp_3a_statistics32 __user *up)
 {
        compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
        compat_uptr_t rgby_data = (compat_uptr_t)((uintptr_t)kp->rgby_data);
@@ -254,7 +255,7 @@ static int put_atomisp_3a_statistics32(struct atomisp_3a_statistics *kp,
 }
 
 static int get_atomisp_metadata_stat32(struct atomisp_metadata *kp,
-                               struct atomisp_metadata32 __user *up)
+                                      struct atomisp_metadata32 __user *up)
 {
        compat_uptr_t data;
        compat_uptr_t effective_width;
@@ -274,11 +275,11 @@ static int get_atomisp_metadata_stat32(struct atomisp_metadata *kp,
 }
 
 static int put_atomisp_metadata_stat32(struct atomisp_metadata *kp,
-                               struct atomisp_metadata32 __user *up)
+                                      struct atomisp_metadata32 __user *up)
 {
        compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
        compat_uptr_t effective_width =
-               (compat_uptr_t)((uintptr_t)kp->effective_width);
+           (compat_uptr_t)((uintptr_t)kp->effective_width);
        if (!access_ok(up, sizeof(struct atomisp_metadata32)) ||
            put_user(data, &up->data) ||
            put_user(kp->width, &up->width) ||
@@ -292,12 +293,12 @@ static int put_atomisp_metadata_stat32(struct atomisp_metadata *kp,
 }
 
 static int put_atomisp_metadata_by_type_stat32(
-                               struct atomisp_metadata_with_type *kp,
-                               struct atomisp_metadata_with_type32 __user *up)
+    struct atomisp_metadata_with_type *kp,
+    struct atomisp_metadata_with_type32 __user *up)
 {
        compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
        compat_uptr_t effective_width =
-               (compat_uptr_t)((uintptr_t)kp->effective_width);
+           (compat_uptr_t)((uintptr_t)kp->effective_width);
        if (!access_ok(up, sizeof(struct atomisp_metadata_with_type32)) ||
            put_user(data, &up->data) ||
            put_user(kp->width, &up->width) ||
@@ -312,8 +313,8 @@ static int put_atomisp_metadata_by_type_stat32(
 }
 
 static int get_atomisp_metadata_by_type_stat32(
-                               struct atomisp_metadata_with_type *kp,
-                               struct atomisp_metadata_with_type32 __user *up)
+    struct atomisp_metadata_with_type *kp,
+    struct atomisp_metadata_with_type32 __user *up)
 {
        compat_uptr_t data;
        compat_uptr_t effective_width;
@@ -334,7 +335,7 @@ static int get_atomisp_metadata_by_type_stat32(
 }
 
 static int get_atomisp_morph_table32(struct atomisp_morph_table *kp,
-                               struct atomisp_morph_table32 __user *up)
+                                    struct atomisp_morph_table32 __user *up)
 {
        unsigned int n = ATOMISP_MORPH_TABLE_NUM_PLANES;
 
@@ -358,7 +359,7 @@ static int get_atomisp_morph_table32(struct atomisp_morph_table *kp,
 }
 
 static int put_atomisp_morph_table32(struct atomisp_morph_table *kp,
-                               struct atomisp_morph_table32 __user *up)
+                                    struct atomisp_morph_table32 __user *up)
 {
        unsigned int n = ATOMISP_MORPH_TABLE_NUM_PLANES;
 
@@ -382,7 +383,7 @@ static int put_atomisp_morph_table32(struct atomisp_morph_table *kp,
 }
 
 static int get_atomisp_overlay32(struct atomisp_overlay *kp,
-                                       struct atomisp_overlay32 __user *up)
+                                struct atomisp_overlay32 __user *up)
 {
        compat_uptr_t frame;
 
@@ -406,7 +407,7 @@ static int get_atomisp_overlay32(struct atomisp_overlay *kp,
 }
 
 static int put_atomisp_overlay32(struct atomisp_overlay *kp,
-                                       struct atomisp_overlay32 __user *up)
+                                struct atomisp_overlay32 __user *up)
 {
        compat_uptr_t frame = (compat_uptr_t)((uintptr_t)kp->frame);
 
@@ -429,8 +430,8 @@ static int put_atomisp_overlay32(struct atomisp_overlay *kp,
 }
 
 static int get_atomisp_calibration_group32(
-                               struct atomisp_calibration_group *kp,
-                               struct atomisp_calibration_group32 __user *up)
+    struct atomisp_calibration_group *kp,
+    struct atomisp_calibration_group32 __user *up)
 {
        compat_uptr_t calb_grp_values;
 
@@ -445,11 +446,11 @@ static int get_atomisp_calibration_group32(
 }
 
 static int put_atomisp_calibration_group32(
-                               struct atomisp_calibration_group *kp,
-                               struct atomisp_calibration_group32 __user *up)
+    struct atomisp_calibration_group *kp,
+    struct atomisp_calibration_group32 __user *up)
 {
        compat_uptr_t calb_grp_values =
-                       (compat_uptr_t)((uintptr_t)kp->calb_grp_values);
+           (compat_uptr_t)((uintptr_t)kp->calb_grp_values);
 
        if (!access_ok(up, sizeof(struct atomisp_calibration_group32)) ||
            put_user(kp->size, &up->size) ||
@@ -461,7 +462,7 @@ static int put_atomisp_calibration_group32(
 }
 
 static int get_atomisp_acc_fw_load32(struct atomisp_acc_fw_load *kp,
-                               struct atomisp_acc_fw_load32 __user *up)
+                                    struct atomisp_acc_fw_load32 __user *up)
 {
        compat_uptr_t data;
 
@@ -476,7 +477,7 @@ static int get_atomisp_acc_fw_load32(struct atomisp_acc_fw_load *kp,
 }
 
 static int put_atomisp_acc_fw_load32(struct atomisp_acc_fw_load *kp,
-                               struct atomisp_acc_fw_load32 __user *up)
+                                    struct atomisp_acc_fw_load32 __user *up)
 {
        compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
 
@@ -490,7 +491,7 @@ static int put_atomisp_acc_fw_load32(struct atomisp_acc_fw_load *kp,
 }
 
 static int get_atomisp_acc_fw_arg32(struct atomisp_acc_fw_arg *kp,
-                                       struct atomisp_acc_fw_arg32 __user *up)
+                                   struct atomisp_acc_fw_arg32 __user *up)
 {
        compat_uptr_t value;
 
@@ -506,7 +507,7 @@ static int get_atomisp_acc_fw_arg32(struct atomisp_acc_fw_arg *kp,
 }
 
 static int put_atomisp_acc_fw_arg32(struct atomisp_acc_fw_arg *kp,
-                                       struct atomisp_acc_fw_arg32 __user *up)
+                                   struct atomisp_acc_fw_arg32 __user *up)
 {
        compat_uptr_t value = (compat_uptr_t)((uintptr_t)kp->value);
 
@@ -521,7 +522,7 @@ static int put_atomisp_acc_fw_arg32(struct atomisp_acc_fw_arg *kp,
 }
 
 static int get_v4l2_private_int_data32(struct v4l2_private_int_data *kp,
-                                       struct v4l2_private_int_data32 __user *up)
+                                      struct v4l2_private_int_data32 __user *up)
 {
        compat_uptr_t data;
 
@@ -537,7 +538,7 @@ static int get_v4l2_private_int_data32(struct v4l2_private_int_data *kp,
 }
 
 static int put_v4l2_private_int_data32(struct v4l2_private_int_data *kp,
-                               struct v4l2_private_int_data32 __user *up)
+                                      struct v4l2_private_int_data32 __user *up)
 {
        compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
 
@@ -552,7 +553,7 @@ static int put_v4l2_private_int_data32(struct v4l2_private_int_data *kp,
 }
 
 static int get_atomisp_shading_table32(struct atomisp_shading_table *kp,
-                               struct atomisp_shading_table32 __user *up)
+                                      struct atomisp_shading_table32 __user *up)
 {
        unsigned int n = ATOMISP_NUM_SC_COLORS;
 
@@ -575,7 +576,7 @@ static int get_atomisp_shading_table32(struct atomisp_shading_table *kp,
 }
 
 static int get_atomisp_acc_map32(struct atomisp_acc_map *kp,
-                                       struct atomisp_acc_map32 __user *up)
+                                struct atomisp_acc_map32 __user *up)
 {
        compat_uptr_t user_ptr;
 
@@ -595,7 +596,7 @@ static int get_atomisp_acc_map32(struct atomisp_acc_map *kp,
 }
 
 static int put_atomisp_acc_map32(struct atomisp_acc_map *kp,
-                                       struct atomisp_acc_map32 __user *up)
+                                struct atomisp_acc_map32 __user *up)
 {
        compat_uptr_t user_ptr = (compat_uptr_t)((uintptr_t)kp->user_ptr);
 
@@ -614,7 +615,7 @@ static int put_atomisp_acc_map32(struct atomisp_acc_map *kp,
 }
 
 static int get_atomisp_acc_s_mapped_arg32(struct atomisp_acc_s_mapped_arg *kp,
-                               struct atomisp_acc_s_mapped_arg32 __user *up)
+       struct atomisp_acc_s_mapped_arg32 __user *up)
 {
        if (!access_ok(up, sizeof(struct atomisp_acc_s_mapped_arg32)) ||
            get_user(kp->fw_handle, &up->fw_handle) ||
@@ -627,7 +628,7 @@ static int get_atomisp_acc_s_mapped_arg32(struct atomisp_acc_s_mapped_arg *kp,
 }
 
 static int put_atomisp_acc_s_mapped_arg32(struct atomisp_acc_s_mapped_arg *kp,
-                               struct atomisp_acc_s_mapped_arg32 __user *up)
+       struct atomisp_acc_s_mapped_arg32 __user *up)
 {
        if (!access_ok(up, sizeof(struct atomisp_acc_s_mapped_arg32)) ||
            put_user(kp->fw_handle, &up->fw_handle) ||
@@ -640,10 +641,10 @@ static int put_atomisp_acc_s_mapped_arg32(struct atomisp_acc_s_mapped_arg *kp,
 }
 
 static int get_atomisp_parameters32(struct atomisp_parameters *kp,
-                                       struct atomisp_parameters32 __user *up)
+                                   struct atomisp_parameters32 __user *up)
 {
        int n = offsetof(struct atomisp_parameters32, output_frame) /
-                               sizeof(compat_uptr_t);
+               sizeof(compat_uptr_t);
        unsigned int size, offset = 0;
        void  __user *user_ptr;
        unsigned int stp, mtp, dcp, dscp = 0;
@@ -676,16 +677,16 @@ static int get_atomisp_parameters32(struct atomisp_parameters *kp,
                } karg;
 
                size = sizeof(struct atomisp_shading_table) +
-                               sizeof(struct atomisp_morph_table) +
-                               sizeof(struct atomisp_dis_coefficients) +
-                               sizeof(struct atomisp_dvs_6axis_config);
+                      sizeof(struct atomisp_morph_table) +
+                      sizeof(struct atomisp_dis_coefficients) +
+                      sizeof(struct atomisp_dvs_6axis_config);
                user_ptr = compat_alloc_user_space(size);
 
                /* handle shading table */
                if (stp != 0) {
                        if (get_atomisp_shading_table32(&karg.shading_table,
-                               (struct atomisp_shading_table32 __user *)
-                                               (uintptr_t)stp))
+                                                       (struct atomisp_shading_table32 __user *)
+                                                       (uintptr_t)stp))
                                return -EFAULT;
 
                        kp->shading_table = (void __force *)user_ptr + offset;
@@ -702,8 +703,8 @@ static int get_atomisp_parameters32(struct atomisp_parameters *kp,
                /* handle morph table */
                if (mtp != 0) {
                        if (get_atomisp_morph_table32(&karg.morph_table,
-                                       (struct atomisp_morph_table32 __user *)
-                                               (uintptr_t)mtp))
+                                                     (struct atomisp_morph_table32 __user *)
+                                                     (uintptr_t)mtp))
                                return -EFAULT;
 
                        kp->morph_table = (void __force *)user_ptr + offset;
@@ -720,8 +721,8 @@ static int get_atomisp_parameters32(struct atomisp_parameters *kp,
                /* handle dvs2 coefficients */
                if (dcp != 0) {
                        if (get_atomisp_dis_coefficients32(&karg.dvs2_coefs,
-                               (struct atomisp_dis_coefficients32 __user *)
-                                               (uintptr_t)dcp))
+                                                          (struct atomisp_dis_coefficients32 __user *)
+                                                          (uintptr_t)dcp))
                                return -EFAULT;
 
                        kp->dvs2_coefs = (void __force *)user_ptr + offset;
@@ -737,8 +738,8 @@ static int get_atomisp_parameters32(struct atomisp_parameters *kp,
                /* handle dvs 6axis configuration */
                if (dscp != 0) {
                        if (get_atomisp_dvs_6axis_config32(&karg.dvs_6axis_config,
-                               (struct atomisp_dvs_6axis_config32 __user *)
-                                               (uintptr_t)dscp))
+                                                          (struct atomisp_dvs_6axis_config32 __user *)
+                                                          (uintptr_t)dscp))
                                return -EFAULT;
 
                        kp->dvs_6axis_config = (void __force *)user_ptr + offset;
@@ -756,8 +757,8 @@ static int get_atomisp_parameters32(struct atomisp_parameters *kp,
 }
 
 static int get_atomisp_acc_fw_load_to_pipe32(
-                       struct atomisp_acc_fw_load_to_pipe *kp,
-                       struct atomisp_acc_fw_load_to_pipe32 __user *up)
+    struct atomisp_acc_fw_load_to_pipe *kp,
+    struct atomisp_acc_fw_load_to_pipe32 __user *up)
 {
        compat_uptr_t data;
 
@@ -777,8 +778,8 @@ static int get_atomisp_acc_fw_load_to_pipe32(
 }
 
 static int put_atomisp_acc_fw_load_to_pipe32(
-                       struct atomisp_acc_fw_load_to_pipe *kp,
-                       struct atomisp_acc_fw_load_to_pipe32 __user *up)
+    struct atomisp_acc_fw_load_to_pipe *kp,
+    struct atomisp_acc_fw_load_to_pipe32 __user *up)
 {
        compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
 
@@ -797,8 +798,8 @@ static int put_atomisp_acc_fw_load_to_pipe32(
 }
 
 static int get_atomisp_sensor_ae_bracketing_lut(
-                       struct atomisp_sensor_ae_bracketing_lut *kp,
-                       struct atomisp_sensor_ae_bracketing_lut32 __user *up)
+    struct atomisp_sensor_ae_bracketing_lut *kp,
+    struct atomisp_sensor_ae_bracketing_lut32 __user *up)
 {
        compat_uptr_t lut;
 
@@ -822,7 +823,7 @@ static long native_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 }
 
 static long atomisp_do_compat_ioctl(struct file *file,
-                               unsigned int cmd, unsigned long arg)
+                                   unsigned int cmd, unsigned long arg)
 {
        union {
                struct atomisp_histogram his;
@@ -996,7 +997,7 @@ static long atomisp_do_compat_ioctl(struct file *file,
                break;
        case ATOMISP_IOC_G_METADATA_BY_TYPE:
                err = get_atomisp_metadata_by_type_stat32(&karg.md_with_type,
-                                                       up);
+                       up);
                break;
        case ATOMISP_IOC_S_SENSOR_AE_BRACKETING_LUT:
                err = get_atomisp_sensor_ae_bracketing_lut(&karg.lut, up);
@@ -1058,7 +1059,7 @@ static long atomisp_do_compat_ioctl(struct file *file,
                break;
        case ATOMISP_IOC_G_METADATA_BY_TYPE:
                err = put_atomisp_metadata_by_type_stat32(&karg.md_with_type,
-                                                       up);
+                       up);
                break;
        }
 
@@ -1168,9 +1169,9 @@ long atomisp_compat_ioctl32(struct file *file,
 
        default:
                dev_warn(isp->dev,
-                       "%s: unknown ioctl '%c', dir=%d, #%d (0x%08x)\n",
-                       __func__, _IOC_TYPE(cmd), _IOC_DIR(cmd), _IOC_NR(cmd),
-                       cmd);
+                        "%s: unknown ioctl '%c', dir=%d, #%d (0x%08x)\n",
+                        __func__, _IOC_TYPE(cmd), _IOC_DIR(cmd), _IOC_NR(cmd),
+                        cmd);
                break;
        }
        return ret;
index 6091ac58b0063615c06419836cd91eb2b1f86445..7e59ccb88a2e3f4f86b70d89301e833ee5bd9935 100644 (file)
@@ -241,12 +241,14 @@ struct atomisp_parameters32 {
        compat_uptr_t   tnr_2500_config;       /* Skylake: TNR config */
        compat_uptr_t   dpc_2500_config;       /* Skylake: DPC config */
        compat_uptr_t   awb_2500_config;       /* Skylake: auto white balance config */
-       compat_uptr_t   awb_fr_2500_config;    /* Skylake: auto white balance filter response config */
+       compat_uptr_t
+       awb_fr_2500_config;    /* Skylake: auto white balance filter response config */
        compat_uptr_t   anr_2500_config;       /* Skylake: ANR config */
        compat_uptr_t   af_2500_config;        /* Skylake: auto focus config */
        compat_uptr_t   ae_2500_config;        /* Skylake: auto exposure config */
        compat_uptr_t   bds_2500_config;       /* Skylake: bayer downscaler config */
-       compat_uptr_t   dvs_2500_config;       /* Skylake: digital video stabilization config */
+       compat_uptr_t
+       dvs_2500_config;       /* Skylake: digital video stabilization config */
        compat_uptr_t   res_mgr_2500_config;
 
        /*
index 0fce3d6bfdd36829c4912c0eafb33ff3ba0e6e5d..b9afeb5d78dec2b3fb4586838e0be5f860c383c6 100644 (file)
 #include "atomisp-regs.h"
 
 static struct v4l2_mbus_framefmt *__csi2_get_format(struct
-                                                   atomisp_mipi_csi2_device
- * csi2,
-                                                   struct
-                                                   v4l2_subdev_pad_config * cfg,
-                                                   enum
-                                                   v4l2_subdev_format_whence
-                                                   which, unsigned int pad)
-{
+       atomisp_mipi_csi2_device
+       * csi2,
+       struct
+       v4l2_subdev_pad_config *cfg,
+       enum
+       v4l2_subdev_format_whence
+       which, unsigned int pad) {
        if (which == V4L2_SUBDEV_FORMAT_TRY)
                return v4l2_subdev_get_try_format(&csi2->subdev, cfg, pad);
        else
@@ -91,7 +90,7 @@ int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
        struct atomisp_mipi_csi2_device *csi2 = v4l2_get_subdevdata(sd);
        struct v4l2_mbus_framefmt *actual_ffmt =
 #ifndef ISP2401
-               __csi2_get_format(csi2, cfg, which, pad);
+           __csi2_get_format(csi2, cfg, which, pad);
 #else
            __csi2_get_format(csi2, cfg, which, pad);
 #endif
@@ -107,11 +106,11 @@ int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
                        actual_ffmt->code = atomisp_in_fmt_conv[0].code;
 
                actual_ffmt->width = clamp_t(
-                       u32, ffmt->width, ATOM_ISP_MIN_WIDTH,
-                       ATOM_ISP_MAX_WIDTH);
+                                        u32, ffmt->width, ATOM_ISP_MIN_WIDTH,
+                                        ATOM_ISP_MAX_WIDTH);
                actual_ffmt->height = clamp_t(
-                       u32, ffmt->height, ATOM_ISP_MIN_HEIGHT,
-                       ATOM_ISP_MAX_HEIGHT);
+                                         u32, ffmt->height, ATOM_ISP_MIN_HEIGHT,
+                                         ATOM_ISP_MAX_HEIGHT);
 
                tmp_ffmt = *ffmt = *actual_ffmt;
 
@@ -122,9 +121,9 @@ int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
        /* FIXME: DPCM decompression */
        *actual_ffmt = *ffmt =
 #ifndef ISP2401
-               *__csi2_get_format(csi2, cfg, which, CSI2_PAD_SINK);
+                          *__csi2_get_format(csi2, cfg, which, CSI2_PAD_SINK);
 #else
-           *__csi2_get_format(csi2, cfg, which, CSI2_PAD_SINK);
+                          *__csi2_get_format(csi2, cfg, which, CSI2_PAD_SINK);
 #endif
 
        return 0;
@@ -194,8 +193,8 @@ static const struct v4l2_subdev_ops csi2_ops = {
  * return -EINVAL or zero on success
 */
 static int csi2_link_setup(struct media_entity *entity,
-           const struct media_pad *local,
-           const struct media_pad *remote, u32 flags)
+                          const struct media_pad *local,
+                          const struct media_pad *remote, u32 flags)
 {
        struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
        struct atomisp_mipi_csi2_device *csi2 = v4l2_get_subdevdata(sd);
@@ -235,7 +234,7 @@ static const struct media_entity_operations csi2_media_ops = {
 * return -ENOMEM or zero on success
 */
 static int mipi_csi2_init_entities(struct atomisp_mipi_csi2_device *csi2,
-                                       int port)
+                                  int port)
 {
        struct v4l2_subdev *sd = &csi2->subdev;
        struct media_pad *pads = csi2->pads;
@@ -258,7 +257,7 @@ static int mipi_csi2_init_entities(struct atomisp_mipi_csi2_device *csi2,
                return ret;
 
        csi2->formats[CSI2_PAD_SINK].code =
-               csi2->formats[CSI2_PAD_SOURCE].code =
+           csi2->formats[CSI2_PAD_SOURCE].code =
                atomisp_in_fmt_conv[0].code;
 
        return 0;
@@ -272,7 +271,7 @@ atomisp_mipi_csi2_unregister_entities(struct atomisp_mipi_csi2_device *csi2)
 }
 
 int atomisp_mipi_csi2_register_entities(struct atomisp_mipi_csi2_device *csi2,
-                       struct v4l2_device *vdev)
+                                       struct v4l2_device *vdev)
 {
        int ret;
 
@@ -379,7 +378,7 @@ static void atomisp_csi2_configure_isp2401(struct atomisp_sub_device *asd)
        int n;
 
        mipi_info = atomisp_to_sensor_mipi_info(
-                                       isp->inputs[asd->input_curr].camera);
+                       isp->inputs[asd->input_curr].camera);
        port = mipi_info->port;
 
        ctrl.id = V4L2_CID_LINK_FREQ;
@@ -388,13 +387,13 @@ static void atomisp_csi2_configure_isp2401(struct atomisp_sub_device *asd)
                mipi_freq = ctrl.value;
 
        clk_termen = atomisp_csi2_configure_calc(coeff_clk_termen,
-                                                mipi_freq, TERMEN_DEFAULT);
+                    mipi_freq, TERMEN_DEFAULT);
        clk_settle = atomisp_csi2_configure_calc(coeff_clk_settle,
-                                                mipi_freq, SETTLE_DEFAULT);
+                    mipi_freq, SETTLE_DEFAULT);
        dat_termen = atomisp_csi2_configure_calc(coeff_dat_termen,
-                                                mipi_freq, TERMEN_DEFAULT);
+                    mipi_freq, TERMEN_DEFAULT);
        dat_settle = atomisp_csi2_configure_calc(coeff_dat_settle,
-                                                mipi_freq, SETTLE_DEFAULT);
+                    mipi_freq, SETTLE_DEFAULT);
        for (n = 0; n < csi2_port_lanes[port] + 1; n++) {
                hrt_address base = csi2_port_base[port] + csi2_lane_base[n];
 
index ccd5f08f7575f35644886e146296c4abd1944163..739c26f0807a90d124afe463e7cbb56884adbc29 100644 (file)
@@ -42,15 +42,16 @@ struct atomisp_mipi_csi2_device {
        u32 output; /* output direction */
 };
 
-int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
+int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
+                         struct v4l2_subdev_pad_config *cfg,
                          unsigned int which, uint16_t pad,
                          struct v4l2_mbus_framefmt *ffmt);
 int atomisp_mipi_csi2_init(struct atomisp_device *isp);
 void atomisp_mipi_csi2_cleanup(struct atomisp_device *isp);
 void atomisp_mipi_csi2_unregister_entities(
-                                       struct atomisp_mipi_csi2_device *csi2);
+    struct atomisp_mipi_csi2_device *csi2);
 int atomisp_mipi_csi2_register_entities(struct atomisp_mipi_csi2_device *csi2,
-                       struct v4l2_device *vdev);
+                                       struct v4l2_device *vdev);
 
 void atomisp_csi2_configure(struct atomisp_sub_device *asd);
 
index a431cc472bdfaba710bd82e753826ca9c80e05d1..4a6ea021ddcc3c5a1cd70f0cbf9dfb36000ac422 100644 (file)
@@ -54,7 +54,7 @@ static struct _iunit_debug iunit_debug = {
 };
 
 static inline int iunit_dump_dbgopt(struct atomisp_device *isp,
-                               unsigned int opt)
+                                   unsigned int opt)
 {
        int ret = 0;
 
@@ -99,11 +99,11 @@ static ssize_t iunit_dbglvl_show(struct device_driver *drv, char *buf)
 }
 
 static ssize_t iunit_dbglvl_store(struct device_driver *drv, const char *buf,
-                               size_t size)
+                                 size_t size)
 {
        if (kstrtouint(buf, 10, &iunit_debug.dbglvl)
-               || iunit_debug.dbglvl < 1
-               || iunit_debug.dbglvl > 9) {
+           || iunit_debug.dbglvl < 1
+           || iunit_debug.dbglvl > 9) {
                return -ERANGE;
        }
        atomisp_css_debug_set_dtrace_level(iunit_debug.dbglvl);
@@ -118,7 +118,7 @@ static ssize_t iunit_dbgfun_show(struct device_driver *drv, char *buf)
 }
 
 static ssize_t iunit_dbgfun_store(struct device_driver *drv, const char *buf,
-                               size_t size)
+                                 size_t size)
 {
        unsigned int opt;
        int ret;
@@ -142,7 +142,7 @@ static ssize_t iunit_dbgopt_show(struct device_driver *drv, char *buf)
 }
 
 static ssize_t iunit_dbgopt_store(struct device_driver *drv, const char *buf,
-                               size_t size)
+                                 size_t size)
 {
        unsigned int opt;
        int ret;
index 354a28ef129ae3532d2b71c553621f54e02eeabd..4ab0390316cf5ffac759e12e9fc79ee51cac9399 100644 (file)
@@ -34,7 +34,7 @@
 static void file_work(struct work_struct *work)
 {
        struct atomisp_file_device *file_dev =
-                       container_of(work, struct atomisp_file_device, work);
+           container_of(work, struct atomisp_file_device, work);
        struct atomisp_device *isp = file_dev->isp;
        /* only support file injection on subdev0 */
        struct atomisp_sub_device *asd = &isp->asd[0];
@@ -183,7 +183,7 @@ atomisp_file_input_unregister_entities(struct atomisp_file_device *file_dev)
 }
 
 int atomisp_file_input_register_entities(struct atomisp_file_device *file_dev,
-                       struct v4l2_device *vdev)
+       struct v4l2_device *vdev)
 {
        /* Register the subdev and video nodes. */
        return  v4l2_device_register_subdev(vdev, &file_dev->sd);
index 61fdeb5ee60a27e74e27525e55bf75ea3ebffffd..e38f8bc389f16b15c62d167d6741e9bcaccbf5da 100644 (file)
@@ -37,7 +37,7 @@ struct atomisp_file_device {
 void atomisp_file_input_cleanup(struct atomisp_device *isp);
 int atomisp_file_input_init(struct atomisp_device *isp);
 void atomisp_file_input_unregister_entities(
-                               struct atomisp_file_device *file_dev);
+    struct atomisp_file_device *file_dev);
 int atomisp_file_input_register_entities(struct atomisp_file_device *file_dev,
-                       struct v4l2_device *vdev);
+       struct v4l2_device *vdev);
 #endif /* __ATOMISP_FILE_H__ */
index 4271a5cc8f662f928aa62b9bc3835afbe5fbca90..2b855e7b61c8cac4f76e21e28aac442af0c88546 100644 (file)
@@ -87,16 +87,16 @@ static int atomisp_buf_prepare(struct videobuf_queue *vq,
 }
 
 static int atomisp_q_one_metadata_buffer(struct atomisp_sub_device *asd,
-               enum atomisp_input_stream_id stream_id,
-               enum atomisp_css_pipe_id css_pipe_id)
+       enum atomisp_input_stream_id stream_id,
+       enum atomisp_css_pipe_id css_pipe_id)
 {
        struct atomisp_metadata_buf *metadata_buf;
        enum atomisp_metadata_type md_type =
-                       atomisp_get_metadata_type(asd, css_pipe_id);
+           atomisp_get_metadata_type(asd, css_pipe_id);
        struct list_head *metadata_list;
 
        if (asd->metadata_bufs_in_css[stream_id][css_pipe_id] >=
-               ATOMISP_CSS_Q_DEPTH)
+           ATOMISP_CSS_Q_DEPTH)
                return 0; /* we have reached CSS queue depth */
 
        if (!list_empty(&asd->metadata[md_type])) {
@@ -105,7 +105,7 @@ static int atomisp_q_one_metadata_buffer(struct atomisp_sub_device *asd,
                metadata_list = &asd->metadata_ready[md_type];
        } else {
                dev_warn(asd->isp->dev, "%s: No metadata buffers available for type %d!\n",
-                       __func__, md_type);
+                        __func__, md_type);
                return -EINVAL;
        }
 
@@ -114,12 +114,12 @@ static int atomisp_q_one_metadata_buffer(struct atomisp_sub_device *asd,
        list_del_init(&metadata_buf->list);
 
        if (atomisp_q_metadata_buffer_to_css(asd, metadata_buf,
-                               stream_id, css_pipe_id)) {
+                                            stream_id, css_pipe_id)) {
                list_add(&metadata_buf->list, metadata_list);
                return -EINVAL;
        } else {
                list_add_tail(&metadata_buf->list,
-                               &asd->metadata_in_css[md_type]);
+                             &asd->metadata_in_css[md_type]);
        }
        asd->metadata_bufs_in_css[stream_id][css_pipe_id]++;
 
@@ -143,7 +143,7 @@ static int atomisp_q_one_s3a_buffer(struct atomisp_sub_device *asd,
                s3a_list = &asd->s3a_stats_ready;
        } else {
                dev_warn(asd->isp->dev, "%s: No s3a buffers available!\n",
-                       __func__);
+                        __func__);
                return -EINVAL;
        }
 
@@ -161,7 +161,7 @@ static int atomisp_q_one_s3a_buffer(struct atomisp_sub_device *asd,
                list_add_tail(&s3a_buf->list, &asd->s3a_stats_in_css);
                if (s3a_list == &asd->s3a_stats_ready)
                        dev_warn(asd->isp->dev, "%s: drop one s3a stat which has exp_id %d!\n",
-                               __func__, exp_id);
+                                __func__, exp_id);
        }
 
        asd->s3a_bufs_in_css[css_pipe_id]++;
@@ -182,12 +182,12 @@ static int atomisp_q_one_dis_buffer(struct atomisp_sub_device *asd,
        if (list_empty(&asd->dis_stats)) {
                spin_unlock_irqrestore(&asd->dis_stats_lock, irqflags);
                dev_warn(asd->isp->dev, "%s: No dis buffers available!\n",
-                       __func__);
+                        __func__);
                return -EINVAL;
        }
 
        dis_buf = list_entry(asd->dis_stats.prev,
-                       struct atomisp_dis_buf, list);
+                            struct atomisp_dis_buf, list);
        list_del_init(&dis_buf->list);
        spin_unlock_irqrestore(&asd->dis_stats_lock, irqflags);
 
@@ -211,15 +211,15 @@ static int atomisp_q_one_dis_buffer(struct atomisp_sub_device *asd,
 }
 
 int atomisp_q_video_buffers_to_css(struct atomisp_sub_device *asd,
-                            struct atomisp_video_pipe *pipe,
-                            enum atomisp_input_stream_id stream_id,
-                            enum atomisp_css_buffer_type css_buf_type,
-                            enum atomisp_css_pipe_id css_pipe_id)
+                                  struct atomisp_video_pipe *pipe,
+                                  enum atomisp_input_stream_id stream_id,
+                                  enum atomisp_css_buffer_type css_buf_type,
+                                  enum atomisp_css_pipe_id css_pipe_id)
 {
        struct videobuf_vmalloc_memory *vm_mem;
        struct atomisp_css_params_with_list *param;
        struct atomisp_css_dvs_grid_info *dvs_grid =
-                atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+           atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
        unsigned long irqflags;
        int err = 0;
 
@@ -246,24 +246,24 @@ int atomisp_q_video_buffers_to_css(struct atomisp_sub_device *asd,
                param = pipe->frame_params[vb->i];
                if (param) {
                        atomisp_makeup_css_parameters(asd,
-                                       &asd->params.css_param.update_flag,
-                                       &param->params);
+                                                     &asd->params.css_param.update_flag,
+                                                     &param->params);
                        atomisp_apply_css_parameters(asd, &param->params);
 
                        if (param->params.update_flag.dz_config &&
-                               asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO) {
+                           asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO) {
                                err = atomisp_calculate_real_zoom_region(asd,
                                        &param->params.dz_config, css_pipe_id);
                                if (!err)
                                        atomisp_css_set_dz_config(asd,
-                                               &param->params.dz_config);
+                                                                 &param->params.dz_config);
                        }
                        atomisp_css_set_isp_config_applied_frame(asd,
-                                               vm_mem->vaddr);
+                               vm_mem->vaddr);
                        atomisp_css_update_isp_params_on_pipe(asd,
-                               asd->stream_env[stream_id].pipes[css_pipe_id]);
+                                                             asd->stream_env[stream_id].pipes[css_pipe_id]);
                        asd->params.dvs_6axis = (struct atomisp_css_dvs_6axis *)
-                               param->params.dvs_6axis;
+                                               param->params.dvs_6axis;
 
                        /*
                         * WORKAROUND:
@@ -274,49 +274,49 @@ int atomisp_q_video_buffers_to_css(struct atomisp_sub_device *asd,
                         * zoom region,I will set it to global setting.
                         */
                        if (param->params.update_flag.dz_config &&
-                               asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO
-                               && !err) {
+                           asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO
+                           && !err) {
                                memcpy(&asd->params.css_param.dz_config,
-                                       &param->params.dz_config,
-                                       sizeof(struct ia_css_dz_config));
+                                      &param->params.dz_config,
+                                      sizeof(struct ia_css_dz_config));
                                asd->params.css_param.update_flag.dz_config =
-                                       (struct atomisp_dz_config *)
-                                       &asd->params.css_param.dz_config;
+                                   (struct atomisp_dz_config *)
+                                   &asd->params.css_param.dz_config;
                                asd->params.css_update_params_needed = true;
                        }
                }
                /* Enqueue buffer */
                err = atomisp_q_video_buffer_to_css(asd, vm_mem, stream_id,
-                                               css_buf_type, css_pipe_id);
+                                                   css_buf_type, css_pipe_id);
                if (err) {
                        spin_lock_irqsave(&pipe->irq_lock, irqflags);
                        list_add_tail(&vb->queue, &pipe->activeq);
                        vb->state = VIDEOBUF_QUEUED;
                        spin_unlock_irqrestore(&pipe->irq_lock, irqflags);
                        dev_err(asd->isp->dev, "%s, css q fails: %d\n",
-                                       __func__, err);
+                               __func__, err);
                        return -EINVAL;
                }
                pipe->buffers_in_css++;
 
                /* enqueue 3A/DIS/metadata buffers */
                if (asd->params.curr_grid_info.s3a_grid.enable &&
-                       css_pipe_id == asd->params.s3a_enabled_pipe &&
-                       css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
+                   css_pipe_id == asd->params.s3a_enabled_pipe &&
+                   css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
                        atomisp_q_one_s3a_buffer(asd, stream_id,
-                                               css_pipe_id);
+                                                css_pipe_id);
 
                if (asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream_info.
-                               metadata_info.size &&
-                       css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
+                   metadata_info.size &&
+                   css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
                        atomisp_q_one_metadata_buffer(asd, stream_id,
-                                               css_pipe_id);
+                                                     css_pipe_id);
 
                if (dvs_grid && dvs_grid->enable &&
-                       css_pipe_id == CSS_PIPE_ID_VIDEO &&
-                       css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
+                   css_pipe_id == CSS_PIPE_ID_VIDEO &&
+                   css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
                        atomisp_q_one_dis_buffer(asd, stream_id,
-                                               css_pipe_id);
+                                                css_pipe_id);
        }
 
        return 0;
@@ -329,7 +329,7 @@ static int atomisp_get_css_buf_type(struct atomisp_sub_device *asd,
        if (ATOMISP_USE_YUVPP(asd)) {
                /* when run ZSL case */
                if (asd->continuous_mode->val &&
-                       asd->run_mode->val == ATOMISP_RUN_MODE_PREVIEW) {
+                   asd->run_mode->val == ATOMISP_RUN_MODE_PREVIEW) {
                        if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE)
                                return CSS_BUFFER_TYPE_OUTPUT_FRAME;
                        else if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW)
@@ -340,7 +340,7 @@ static int atomisp_get_css_buf_type(struct atomisp_sub_device *asd,
 
                /*when run SDV case*/
                if (asd->continuous_mode->val &&
-                       asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
+                   asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
                        if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE)
                                return CSS_BUFFER_TYPE_OUTPUT_FRAME;
                        else if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW)
@@ -387,26 +387,26 @@ static int atomisp_qbuffers_to_css_for_all_pipes(struct atomisp_sub_device *asd)
        video_pipe = &asd->video_out_video_capture;
 
        buf_type = atomisp_get_css_buf_type(
-                       asd, css_preview_pipe_id,
-                       atomisp_subdev_source_pad(&preview_pipe->vdev));
+                      asd, css_preview_pipe_id,
+                      atomisp_subdev_source_pad(&preview_pipe->vdev));
        input_stream_id = ATOMISP_INPUT_STREAM_PREVIEW;
        atomisp_q_video_buffers_to_css(asd, preview_pipe,
                                       input_stream_id,
                                       buf_type, css_preview_pipe_id);
 
        buf_type = atomisp_get_css_buf_type(asd, css_capture_pipe_id,
-                       atomisp_subdev_source_pad(&capture_pipe->vdev));
+                                           atomisp_subdev_source_pad(&capture_pipe->vdev));
        input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
        atomisp_q_video_buffers_to_css(asd, capture_pipe,
-                                              input_stream_id,
-                                              buf_type, css_capture_pipe_id);
+                                      input_stream_id,
+                                      buf_type, css_capture_pipe_id);
 
        buf_type = atomisp_get_css_buf_type(asd, css_video_pipe_id,
-                       atomisp_subdev_source_pad(&video_pipe->vdev));
+                                           atomisp_subdev_source_pad(&video_pipe->vdev));
        input_stream_id = ATOMISP_INPUT_STREAM_VIDEO;
        atomisp_q_video_buffers_to_css(asd, video_pipe,
-                                              input_stream_id,
-                                              buf_type, css_video_pipe_id);
+                                      input_stream_id,
+                                      buf_type, css_video_pipe_id);
        return 0;
 }
 
@@ -483,8 +483,8 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 
        if (capture_pipe) {
                buf_type = atomisp_get_css_buf_type(
-                       asd, css_capture_pipe_id,
-                       atomisp_subdev_source_pad(&capture_pipe->vdev));
+                              asd, css_capture_pipe_id,
+                              atomisp_subdev_source_pad(&capture_pipe->vdev));
                input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
 
                /*
@@ -500,8 +500,8 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 
        if (vf_pipe) {
                buf_type = atomisp_get_css_buf_type(
-                       asd, css_capture_pipe_id,
-                       atomisp_subdev_source_pad(&vf_pipe->vdev));
+                              asd, css_capture_pipe_id,
+                              atomisp_subdev_source_pad(&vf_pipe->vdev));
                if (asd->stream_env[ATOMISP_INPUT_STREAM_POSTVIEW].stream)
                        input_stream_id = ATOMISP_INPUT_STREAM_POSTVIEW;
                else
@@ -519,11 +519,11 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 
        if (preview_pipe) {
                buf_type = atomisp_get_css_buf_type(
-                       asd, css_preview_pipe_id,
-                       atomisp_subdev_source_pad(&preview_pipe->vdev));
+                              asd, css_preview_pipe_id,
+                              atomisp_subdev_source_pad(&preview_pipe->vdev));
                if (ATOMISP_SOC_CAMERA(asd) && css_preview_pipe_id == CSS_PIPE_ID_YUVPP)
                        input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
-                /* else for ext isp use case */
+               /* else for ext isp use case */
                else if (css_preview_pipe_id == CSS_PIPE_ID_YUVPP)
                        input_stream_id = ATOMISP_INPUT_STREAM_VIDEO;
                else if (asd->stream_env[ATOMISP_INPUT_STREAM_PREVIEW].stream)
@@ -544,8 +544,8 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 
        if (video_pipe) {
                buf_type = atomisp_get_css_buf_type(
-                       asd, css_video_pipe_id,
-                       atomisp_subdev_source_pad(&video_pipe->vdev));
+                              asd, css_video_pipe_id,
+                              atomisp_subdev_source_pad(&video_pipe->vdev));
                if (asd->stream_env[ATOMISP_INPUT_STREAM_VIDEO].stream)
                        input_stream_id = ATOMISP_INPUT_STREAM_VIDEO;
                else
@@ -676,10 +676,10 @@ static int atomisp_init_pipe(struct atomisp_video_pipe *pipe)
        INIT_LIST_HEAD(&pipe->buffers_waiting_for_param);
        INIT_LIST_HEAD(&pipe->per_frame_params);
        memset(pipe->frame_request_config_id, 0,
-               VIDEO_MAX_FRAME * sizeof(unsigned int));
+              VIDEO_MAX_FRAME * sizeof(unsigned int));
        memset(pipe->frame_params, 0,
-               VIDEO_MAX_FRAME *
-               sizeof(struct atomisp_css_params_with_list *));
+              VIDEO_MAX_FRAME *
+              sizeof(struct atomisp_css_params_with_list *));
 
        return 0;
 }
@@ -927,8 +927,8 @@ static int atomisp_release(struct file *file)
 
        if (pipe->capq.streaming)
                dev_warn(isp->dev,
-                               "%s: ISP still streaming while closing!",
-                               __func__);
+                        "%s: ISP still streaming while closing!",
+                        __func__);
 
        if (pipe->capq.streaming &&
            __atomisp_streamoff(file, NULL, V4L2_BUF_TYPE_VIDEO_CAPTURE)) {
@@ -982,7 +982,7 @@ subdev_uninit:
        atomisp_css_free_stat_buffers(asd);
        atomisp_free_internal_buffers(asd);
        ret = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
-                                      core, s_power, 0);
+                              core, s_power, 0);
        if (ret)
                dev_warn(isp->dev, "Failed to power-off sensor\n");
 
@@ -1016,10 +1016,10 @@ subdev_uninit:
 done:
        if (!acc_node) {
                atomisp_subdev_set_selection(&asd->subdev, fh.pad,
-                               V4L2_SUBDEV_FORMAT_ACTIVE,
-                               atomisp_subdev_source_pad(vdev),
-                               V4L2_SEL_TGT_COMPOSE, 0,
-                               &clear_compose);
+                                            V4L2_SUBDEV_FORMAT_ACTIVE,
+                                            atomisp_subdev_source_pad(vdev),
+                                            V4L2_SEL_TGT_COMPOSE, 0,
+                                            &clear_compose);
        }
        rt_mutex_unlock(&isp->mutex);
        mutex_unlock(&isp->streamoff_mutex);
@@ -1053,7 +1053,7 @@ static int do_isp_mm_remap(struct atomisp_device *isp,
 }
 
 static int frame_mmap(struct atomisp_device *isp,
-       const struct atomisp_css_frame *frame, struct vm_area_struct *vma)
+                     const struct atomisp_css_frame *frame, struct vm_area_struct *vma)
 {
        ia_css_ptr isp_virt;
        u32 host_virt;
@@ -1075,12 +1075,12 @@ static int frame_mmap(struct atomisp_device *isp,
 }
 
 int atomisp_videobuf_mmap_mapper(struct videobuf_queue *q,
-       struct vm_area_struct *vma)
+                                struct vm_area_struct *vma)
 {
        u32 offset = vma->vm_pgoff << PAGE_SHIFT;
        int ret = -EINVAL, i;
        struct atomisp_device *isp =
-               ((struct atomisp_video_pipe *)(q->priv_data))->isp;
+           ((struct atomisp_video_pipe *)(q->priv_data))->isp;
        struct videobuf_vmalloc_memory *vm_mem;
        struct videobuf_mapping *map;
 
@@ -1126,7 +1126,7 @@ int atomisp_videobuf_mmap_mapper(struct videobuf_queue *q,
  * There is also padding on the right (padded_width - width).
  */
 static int remove_pad_from_frame(struct atomisp_device *isp,
-               struct atomisp_css_frame *in_frame, __u32 width, __u32 height)
+                                struct atomisp_css_frame *in_frame, __u32 width, __u32 height)
 {
        unsigned int i;
        unsigned short *buffer;
@@ -1205,7 +1205,7 @@ static int atomisp_mmap(struct file *file, struct vm_area_struct *vma)
                }
 
                ret = remove_pad_from_frame(isp, raw_virt_addr,
-                                     pipe->pix.width, pipe->pix.height);
+                                           pipe->pix.width, pipe->pix.height);
                if (ret < 0) {
                        dev_err(isp->dev, "remove pad failed.\n");
                        goto error;
@@ -1258,7 +1258,7 @@ static int atomisp_file_mmap(struct file *file, struct vm_area_struct *vma)
 }
 
 static __poll_t atomisp_poll(struct file *file,
-                                struct poll_table_struct *pt)
+                            struct poll_table_struct *pt)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
index 2faab3429d4398acef2af593ef9b1ab4d8653341..e05e8f3a4442ef9b2d9394a9a3557cb27f3bb7b4 100644 (file)
 #include "atomisp_subdev.h"
 
 int atomisp_q_video_buffers_to_css(struct atomisp_sub_device *asd,
-                            struct atomisp_video_pipe *pipe,
-                            enum atomisp_input_stream_id stream_id,
-                            enum atomisp_css_buffer_type css_buf_type,
-                            enum atomisp_css_pipe_id css_pipe_id);
+                                  struct atomisp_video_pipe *pipe,
+                                  enum atomisp_input_stream_id stream_id,
+                                  enum atomisp_css_buffer_type css_buf_type,
+                                  enum atomisp_css_pipe_id css_pipe_id);
 
 unsigned int atomisp_dev_users(struct atomisp_device *isp);
 unsigned int atomisp_sub_dev_users(struct atomisp_sub_device *asd);
@@ -35,7 +35,7 @@ unsigned int atomisp_sub_dev_users(struct atomisp_sub_device *asd);
  */
 
 int atomisp_videobuf_mmap_mapper(struct videobuf_queue *q,
-                                    struct vm_area_struct *vma);
+                                struct vm_area_struct *vma);
 
 int atomisp_qbuf_to_css(struct atomisp_device *isp,
                        struct atomisp_video_pipe *pipe,
index a5412433835dd241c0d8832c9fcfb4851a10283b..8901d2f00c90baf46617983d15a34cc97388ad73 100644 (file)
@@ -295,7 +295,7 @@ extern struct device *atomisp_dev;
 #define atomisp_is_wdt_running(a) timer_pending(&(a)->wdt)
 #ifdef ISP2401
 void atomisp_wdt_refresh_pipe(struct atomisp_video_pipe *pipe,
-                                       unsigned int delay);
+                             unsigned int delay);
 #endif
 void atomisp_wdt_refresh(struct atomisp_sub_device *asd, unsigned int delay);
 #ifndef ISP2401
index d4eef9f76e6aa1ea3630587e1b483fce84071d14..13f8511aa67ca0bcdf1f7ea8c5af5cf36762e85a 100644 (file)
@@ -282,7 +282,7 @@ static struct v4l2_queryctrl ci_v4l2_controls[] = {
                .name = "3a lock",
                .minimum = 0,
                .maximum = V4L2_LOCK_EXPOSURE | V4L2_LOCK_WHITE_BALANCE
-                        | V4L2_LOCK_FOCUS,
+               | V4L2_LOCK_FOCUS,
                .step = 1,
                .default_value = 0,
        },
@@ -504,7 +504,7 @@ const struct atomisp_format_bridge atomisp_output_fmts[] = {
        },
 #if 0
        {
-       /* This is a custom format being used by M10MO to send the RAW data */
+               /* This is a custom format being used by M10MO to send the RAW data */
                .pixelformat = V4L2_PIX_FMT_CUSTOM_M10MO_RAW,
                .depth = 8,
                .mbus_code = V4L2_MBUS_FMT_CUSTOM_M10MO_RAW,
@@ -515,7 +515,7 @@ const struct atomisp_format_bridge atomisp_output_fmts[] = {
 };
 
 const struct atomisp_format_bridge *atomisp_get_format_bridge(
-       unsigned int pixelformat)
+    unsigned int pixelformat)
 {
        unsigned int i;
 
@@ -528,7 +528,7 @@ const struct atomisp_format_bridge *atomisp_get_format_bridge(
 }
 
 const struct atomisp_format_bridge *atomisp_get_format_bridge_from_mbus(
-       u32 mbus_code)
+    u32 mbus_code)
 {
        unsigned int i;
 
@@ -560,7 +560,7 @@ static int atomisp_querycap(struct file *file, void *fh,
        strncpy(cap->bus_info, BUS_INFO, sizeof(cap->card) - 1);
 
        cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
-           V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT;
+                          V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT;
        cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
        return 0;
 }
@@ -569,7 +569,7 @@ static int atomisp_querycap(struct file *file, void *fh,
  * enum input are used to check primary/secondary camera
  */
 static int atomisp_enum_input(struct file *file, void *fh,
-       struct v4l2_input *input)
+                             struct v4l2_input *input)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -621,13 +621,13 @@ static int atomisp_enum_input(struct file *file, void *fh,
 }
 
 static unsigned int atomisp_subdev_streaming_count(
-                                       struct atomisp_sub_device *asd)
+    struct atomisp_sub_device *asd)
 {
        return asd->video_out_preview.capq.streaming
-               + asd->video_out_capture.capq.streaming
-               + asd->video_out_video_capture.capq.streaming
-               + asd->video_out_vf.capq.streaming
-               + asd->video_in.capq.streaming;
+              + asd->video_out_capture.capq.streaming
+              + asd->video_out_video_capture.capq.streaming
+              + asd->video_out_vf.capq.streaming
+              + asd->video_in.capq.streaming;
 }
 
 unsigned int atomisp_streaming_count(struct atomisp_device *isp)
@@ -636,7 +636,7 @@ unsigned int atomisp_streaming_count(struct atomisp_device *isp)
 
        for (i = 0, sum = 0; i < isp->num_of_streams; i++)
                sum += isp->asd[i].streaming ==
-                   ATOMISP_DEVICE_STREAMING_ENABLED;
+                      ATOMISP_DEVICE_STREAMING_ENABLED;
 
        return sum;
 }
@@ -693,8 +693,8 @@ static int atomisp_s_input(struct file *file, void *fh, unsigned int input)
         */
        if (isp->inputs[input].asd && isp->inputs[input].asd != asd) {
                dev_err(isp->dev,
-                        "%s, camera is already used by stream: %d\n", __func__,
-                        isp->inputs[input].asd->index);
+                       "%s, camera is already used by stream: %d\n", __func__,
+                       isp->inputs[input].asd->index);
                ret = -EBUSY;
                goto error;
        }
@@ -708,7 +708,7 @@ static int atomisp_s_input(struct file *file, void *fh, unsigned int input)
 
        if (atomisp_subdev_streaming_count(asd)) {
                dev_err(isp->dev,
-                        "ISP is still streaming, stop first\n");
+                       "ISP is still streaming, stop first\n");
                ret = -EINVAL;
                goto error;
        }
@@ -720,7 +720,7 @@ static int atomisp_s_input(struct file *file, void *fh, unsigned int input)
                                       core, s_power, 0);
                if (ret)
                        dev_warn(isp->dev,
-                                   "Failed to power-off sensor\n");
+                                "Failed to power-off sensor\n");
                /* clear the asd field to show this camera is not used */
                isp->inputs[asd->input_curr].asd = NULL;
        }
@@ -739,7 +739,7 @@ static int atomisp_s_input(struct file *file, void *fh, unsigned int input)
 
        /* select operating sensor */
        ret = v4l2_subdev_call(isp->inputs[input].camera, video, s_routing,
-               0, isp->inputs[input].sensor_index, 0);
+                              0, isp->inputs[input].sensor_index, 0);
        if (ret && (ret != -ENOIOCTLCMD)) {
                dev_err(isp->dev, "Failed to select sensor\n");
                goto error;
@@ -771,7 +771,7 @@ error:
 }
 
 static int atomisp_enum_fmt_cap(struct file *file, void *fh,
-       struct v4l2_fmtdesc *f)
+                               struct v4l2_fmtdesc *f)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -784,9 +784,10 @@ static int atomisp_enum_fmt_cap(struct file *file, void *fh,
        rval = v4l2_subdev_call(isp->inputs[asd->input_curr].camera, pad,
                                enum_mbus_code, NULL, &code);
        if (rval == -ENOIOCTLCMD) {
-               dev_warn(isp->dev, "enum_mbus_code pad op not supported. Please fix your sensor driver!\n");
-       //      rval = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
-       //                              video, enum_mbus_fmt, 0, &code.code);
+               dev_warn(isp->dev,
+                        "enum_mbus_code pad op not supported. Please fix your sensor driver!\n");
+               //      rval = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
+               //                              video, enum_mbus_fmt, 0, &code.code);
        }
        rt_mutex_unlock(&isp->mutex);
 
@@ -795,7 +796,7 @@ static int atomisp_enum_fmt_cap(struct file *file, void *fh,
 
        for (i = 0; i < ARRAY_SIZE(atomisp_output_fmts); i++) {
                const struct atomisp_format_bridge *format =
-                       &atomisp_output_fmts[i];
+                           &atomisp_output_fmts[i];
 
                /*
                 * Is the atomisp-supported format is valid for the
@@ -821,7 +822,7 @@ static int atomisp_enum_fmt_cap(struct file *file, void *fh,
 }
 
 static int atomisp_g_fmt_cap(struct file *file, void *fh,
-       struct v4l2_format *f)
+                            struct v4l2_format *f)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -835,7 +836,7 @@ static int atomisp_g_fmt_cap(struct file *file, void *fh,
 }
 
 static int atomisp_g_fmt_file(struct file *file, void *fh,
-               struct v4l2_format *f)
+                             struct v4l2_format *f)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -850,7 +851,7 @@ static int atomisp_g_fmt_file(struct file *file, void *fh,
 
 /* This function looks up the closest available resolution. */
 static int atomisp_try_fmt_cap(struct file *file, void *fh,
-       struct v4l2_format *f)
+                              struct v4l2_format *f)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -863,7 +864,7 @@ static int atomisp_try_fmt_cap(struct file *file, void *fh,
 }
 
 static int atomisp_s_fmt_cap(struct file *file, void *fh,
-       struct v4l2_format *f)
+                            struct v4l2_format *f)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -881,7 +882,7 @@ static int atomisp_s_fmt_cap(struct file *file, void *fh,
 }
 
 static int atomisp_s_fmt_file(struct file *file, void *fh,
-                               struct v4l2_format *f)
+                             struct v4l2_format *f)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -925,7 +926,7 @@ static void atomisp_videobuf_free_queue(struct videobuf_queue *q)
 }
 
 int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
-       uint16_t stream_id)
+                               uint16_t stream_id)
 {
        struct atomisp_device *isp = asd->isp;
        struct atomisp_s3a_buf *s3a_buf = NULL, *_s3a_buf;
@@ -933,11 +934,11 @@ int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
        struct atomisp_metadata_buf *md_buf = NULL, *_md_buf;
        int count;
        struct atomisp_css_dvs_grid_info *dvs_grid_info =
-               atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+           atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
        unsigned int i;
 
        if (list_empty(&asd->s3a_stats) &&
-               asd->params.curr_grid_info.s3a_grid.enable) {
+           asd->params.curr_grid_info.s3a_grid.enable) {
                count = ATOMISP_CSS_Q_DEPTH +
                        ATOMISP_S3A_BUF_QUEUE_DEPTH_FOR_HAL;
                dev_dbg(isp->dev, "allocating %d 3a buffers\n", count);
@@ -947,7 +948,7 @@ int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
                                goto error;
 
                        if (atomisp_css_allocate_stat_buffers(
-                                       asd, stream_id, s3a_buf, NULL, NULL)) {
+                               asd, stream_id, s3a_buf, NULL, NULL)) {
                                kfree(s3a_buf);
                                goto error;
                        }
@@ -957,7 +958,7 @@ int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
        }
 
        if (list_empty(&asd->dis_stats) && dvs_grid_info &&
-               dvs_grid_info->enable) {
+           dvs_grid_info->enable) {
                count = ATOMISP_CSS_Q_DEPTH + 1;
                dev_dbg(isp->dev, "allocating %d dis buffers\n", count);
                while (count--) {
@@ -967,7 +968,7 @@ int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
                                goto error;
                        }
                        if (atomisp_css_allocate_stat_buffers(
-                                       asd, stream_id, NULL, dis_buf, NULL)) {
+                               asd, stream_id, NULL, dis_buf, NULL)) {
                                kfree(dis_buf);
                                goto error;
                        }
@@ -991,7 +992,7 @@ int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
                                        goto error;
 
                                if (atomisp_css_allocate_stat_buffers(
-                                               asd, stream_id, NULL, NULL, md_buf)) {
+                                       asd, stream_id, NULL, NULL, md_buf)) {
                                        kfree(md_buf);
                                        goto error;
                                }
@@ -1018,7 +1019,7 @@ error:
 
        for (i = 0; i < ATOMISP_METADATA_TYPE_NUM; i++) {
                list_for_each_entry_safe(md_buf, _md_buf, &asd->metadata[i],
-                                       list) {
+                                        list) {
                        atomisp_css_free_metadata_buffer(md_buf);
                        list_del(&md_buf->list);
                        kfree(md_buf);
@@ -1031,7 +1032,7 @@ error:
  * Initiate Memory Mapping or User Pointer I/O
  */
 int __atomisp_reqbufs(struct file *file, void *fh,
-       struct v4l2_requestbuffers *req)
+                     struct v4l2_requestbuffers *req)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
@@ -1052,10 +1053,10 @@ int __atomisp_reqbufs(struct file *file, void *fh,
                mutex_unlock(&pipe->capq.vb_lock);
                /* clear request config id */
                memset(pipe->frame_request_config_id, 0,
-                       VIDEO_MAX_FRAME * sizeof(unsigned int));
+                      VIDEO_MAX_FRAME * sizeof(unsigned int));
                memset(pipe->frame_params, 0,
-                       VIDEO_MAX_FRAME *
-                       sizeof(struct atomisp_css_params_with_list *));
+                      VIDEO_MAX_FRAME *
+                      sizeof(struct atomisp_css_params_with_list *));
                return 0;
        }
 
@@ -1102,7 +1103,7 @@ error:
 }
 
 int atomisp_reqbufs(struct file *file, void *fh,
-       struct v4l2_requestbuffers *req)
+                   struct v4l2_requestbuffers *req)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -1116,7 +1117,7 @@ int atomisp_reqbufs(struct file *file, void *fh,
 }
 
 static int atomisp_reqbufs_file(struct file *file, void *fh,
-               struct v4l2_requestbuffers *req)
+                               struct v4l2_requestbuffers *req)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
@@ -1133,7 +1134,7 @@ static int atomisp_reqbufs_file(struct file *file, void *fh,
 
 /* application query the status of a buffer */
 static int atomisp_querybuf(struct file *file, void *fh,
-       struct v4l2_buffer *buf)
+                           struct v4l2_buffer *buf)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
@@ -1142,7 +1143,7 @@ static int atomisp_querybuf(struct file *file, void *fh,
 }
 
 static int atomisp_querybuf_file(struct file *file, void *fh,
-                               struct v4l2_buffer *buf)
+                                struct v4l2_buffer *buf)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
@@ -1178,13 +1179,13 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
 
        if (asd->streaming == ATOMISP_DEVICE_STREAMING_STOPPING) {
                dev_err(isp->dev, "%s: reject, as ISP at stopping.\n",
-                               __func__);
+                       __func__);
                ret = -EIO;
                goto error;
        }
 
        if (!buf || buf->index >= VIDEO_MAX_FRAME ||
-               !pipe->capq.bufs[buf->index]) {
+           !pipe->capq.bufs[buf->index]) {
                dev_err(isp->dev, "Invalid index for qbuf.\n");
                ret = -EINVAL;
                goto error;
@@ -1211,7 +1212,7 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
                        goto done;
 
                if (atomisp_get_css_frame_info(asd,
-                               atomisp_subdev_source_pad(vdev), &frame_info)) {
+                                              atomisp_subdev_source_pad(vdev), &frame_info)) {
                        ret = -EIO;
                        goto error;
                }
@@ -1220,28 +1221,28 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
 #ifdef CONFIG_ION
 #ifndef ISP2401
                attributes.type = buf->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_ION
-                                       ? HRT_USR_ION : HRT_USR_PTR;
+                                 ? HRT_USR_ION : HRT_USR_PTR;
 #else
                if (buf->reserved & ATOMISP_BUFFER_TYPE_IS_ION) {
                        attributes.type = HRT_USR_ION;
                        if (asd->ion_dev_fd->val !=  ION_FD_UNSET) {
                                dev_dbg(isp->dev, "ION buffer queued, share_fd=%lddev_fd=%d.\n",
-                               buf->m.userptr, asd->ion_dev_fd->val);
+                                       buf->m.userptr, asd->ion_dev_fd->val);
                                /*
                                 * Make sure the shared fd we just got
                                 * from user space isn't larger than
                                 * the space we have for it.
                                 */
                                if ((buf->m.userptr &
-                               (ATOMISP_ION_DEVICE_FD_MASK)) != 0) {
+                                    (ATOMISP_ION_DEVICE_FD_MASK)) != 0) {
                                        dev_err(isp->dev,
-                                                       "Error: v4l2 buffer fd:0X%0lX > 0XFFFF.\n",
-                                                       buf->m.userptr);
+                                               "Error: v4l2 buffer fd:0X%0lX > 0XFFFF.\n",
+                                               buf->m.userptr);
                                        ret = -EINVAL;
                                        goto error;
                                }
                                buf->m.userptr |= asd->ion_dev_fd->val <<
-                                       ATOMISP_ION_DEVICE_FD_OFFSET;
+                                                 ATOMISP_ION_DEVICE_FD_OFFSET;
                        } else {
                                dev_err(isp->dev, "v4l2 buffer type is ION, \
                                                but no dev fd set from userspace.\n");
@@ -1256,8 +1257,8 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
                attributes.type = HRT_USR_PTR;
 #endif
                ret = atomisp_css_frame_map(&handle, &frame_info,
-                                      (void __user *)buf->m.userptr,
-                                      0, &attributes);
+                                           (void __user *)buf->m.userptr,
+                                           0, &attributes);
                if (ret) {
                        dev_err(isp->dev, "Failed to map user buffer\n");
                        goto error;
@@ -1290,8 +1291,9 @@ done:
            (buf->reserved2 & ATOMISP_BUFFER_HAS_PER_FRAME_SETTING)) {
                /* this buffer will have a per-frame parameter */
                pipe->frame_request_config_id[buf->index] = buf->reserved2 &
-                                       ~ATOMISP_BUFFER_HAS_PER_FRAME_SETTING;
-               dev_dbg(isp->dev, "This buffer requires per_frame setting which has isp_config_id %d\n",
+                       ~ATOMISP_BUFFER_HAS_PER_FRAME_SETTING;
+               dev_dbg(isp->dev,
+                       "This buffer requires per_frame setting which has isp_config_id %d\n",
                        pipe->frame_request_config_id[buf->index]);
        } else {
                pipe->frame_request_config_id[buf->index] = 0;
@@ -1318,7 +1320,7 @@ done:
                                atomisp_wdt_start(asd);
 #else
                        if (!atomisp_is_wdt_running(pipe) &&
-                               atomisp_buffers_queued_pipe(pipe))
+                           atomisp_buffers_queued_pipe(pipe))
                                atomisp_wdt_start(pipe);
 #endif
                }
@@ -1341,7 +1343,7 @@ done:
                asd->pending_capture_request++;
                dev_dbg(isp->dev, "Add one pending capture request.\n");
 #else
-       if (asd->re_trigger_capture) {
+               if (asd->re_trigger_capture) {
                        ret = atomisp_css_offline_capture_configure(asd,
                                asd->params.offline_parm.num_captures,
                                asd->params.offline_parm.skip_frames,
@@ -1350,11 +1352,11 @@ done:
                        dev_dbg(isp->dev, "%s Trigger capture again ret=%d\n",
                                __func__, ret);
 
-       } else {
+               } else {
                        asd->pending_capture_request++;
                        asd->re_trigger_capture = false;
                        dev_dbg(isp->dev, "Add one pending capture request.\n");
-       }
+               }
 #endif
        }
        rt_mutex_unlock(&isp->mutex);
@@ -1370,7 +1372,7 @@ error:
 }
 
 static int atomisp_qbuf_file(struct file *file, void *fh,
-                                       struct v4l2_buffer *buf)
+                            struct v4l2_buffer *buf)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -1384,7 +1386,7 @@ static int atomisp_qbuf_file(struct file *file, void *fh,
        }
 
        if (!buf || buf->index >= VIDEO_MAX_FRAME ||
-               !pipe->outq.bufs[buf->index]) {
+           !pipe->outq.bufs[buf->index]) {
                dev_err(isp->dev, "Invalid index for qbuf.\n");
                ret = -EINVAL;
                goto error;
@@ -1412,7 +1414,7 @@ error:
 }
 
 static int __get_frame_exp_id(struct atomisp_video_pipe *pipe,
-               struct v4l2_buffer *buf)
+                             struct v4l2_buffer *buf)
 {
        struct videobuf_vmalloc_memory *vm_mem;
        struct atomisp_css_frame *handle;
@@ -1449,7 +1451,7 @@ static int atomisp_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
        if (asd->streaming == ATOMISP_DEVICE_STREAMING_STOPPING) {
                rt_mutex_unlock(&isp->mutex);
                dev_err(isp->dev, "%s: reject, as ISP at stopping.\n",
-                               __func__);
+                       __func__);
                return -EIO;
        }
 
@@ -1476,7 +1478,8 @@ static int atomisp_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
        buf->reserved2 = pipe->frame_config_id[buf->index];
        rt_mutex_unlock(&isp->mutex);
 
-       dev_dbg(isp->dev, "dqbuf buffer %d (%s) for asd%d with exp_id %d, isp_config_id %d\n",
+       dev_dbg(isp->dev,
+               "dqbuf buffer %d (%s) for asd%d with exp_id %d, isp_config_id %d\n",
                buf->index, vdev->name, asd->index, buf->reserved >> 16,
                buf->reserved2);
        return 0;
@@ -1515,7 +1518,7 @@ enum atomisp_css_pipe_id atomisp_get_css_pipe_id(struct atomisp_sub_device *asd)
        case ATOMISP_RUN_MODE_VIDEO:
                return CSS_PIPE_ID_VIDEO;
        case ATOMISP_RUN_MODE_STILL_CAPTURE:
-               /* fall through */
+       /* fall through */
        default:
                return CSS_PIPE_ID_CAPTURE;
        }
@@ -1540,8 +1543,8 @@ static unsigned int atomisp_sensor_start_stream(struct atomisp_sub_device *asd)
        if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO ||
            (asd->run_mode->val == ATOMISP_RUN_MODE_STILL_CAPTURE &&
             !atomisp_is_mbuscode_raw(
-                    asd->fmt[
-                            asd->capture_pad].fmt.code) &&
+                asd->fmt[
+                 asd->capture_pad].fmt.code) &&
             !asd->continuous_mode->val))
                return 2;
        else
@@ -1562,7 +1565,7 @@ int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp,
                int sensor_index = isp->asd[i].input_curr;
 
                if (isp->inputs[sensor_index].camera_caps->
-                               sensor[isp->asd[i].sensor_curr].is_slave)
+                   sensor[isp->asd[i].sensor_curr].is_slave)
                        slave = sensor_index;
                else
                        master = sensor_index;
@@ -1612,11 +1615,11 @@ int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp,
 /* FIXME! */
 #ifndef ISP2401
 static void __wdt_on_master_slave_sensor(struct atomisp_device *isp,
-                                        unsigned int wdt_duration)
+       unsigned int wdt_duration)
 #else
 static void __wdt_on_master_slave_sensor(struct atomisp_video_pipe *pipe,
-                                        unsigned int wdt_duration,
-                                        bool enable)
+       unsigned int wdt_duration,
+       bool enable)
 #endif
 {
 #ifndef ISP2401
@@ -1649,7 +1652,7 @@ static void atomisp_pause_buffer_event(struct atomisp_device *isp)
                int sensor_index = isp->asd[i].input_curr;
 
                if (isp->inputs[sensor_index].camera_caps->
-                               sensor[isp->asd[i].sensor_curr].is_slave) {
+                   sensor[isp->asd[i].sensor_curr].is_slave) {
                        v4l2_event_queue(isp->asd[i].subdev.devnode, &event);
                        break;
                }
@@ -1678,7 +1681,7 @@ static void atomisp_dma_burst_len_cfg(struct atomisp_sub_device *asd)
  * This ioctl start the capture during streaming I/O.
  */
 static int atomisp_streamon(struct file *file, void *fh,
-       enum v4l2_buf_type type)
+                           enum v4l2_buf_type type)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
@@ -1757,7 +1760,7 @@ static int atomisp_streamon(struct file *file, void *fh,
                                flush_work(&asd->delayed_init_work);
                                rt_mutex_unlock(&isp->mutex);
                                if (wait_for_completion_interruptible(
-                                               &asd->init_done) != 0)
+                                       &asd->init_done) != 0)
                                        return -ERESTARTSYS;
                                rt_mutex_lock(&isp->mutex);
                        }
@@ -1810,7 +1813,7 @@ static int atomisp_streamon(struct file *file, void *fh,
                atomisp_apply_css_parameters(asd, &asd->params.css_param);
                if (asd->params.css_param.update_flag.dz_config)
                        atomisp_css_set_dz_config(asd,
-                               &asd->params.css_param.dz_config);
+                                                 &asd->params.css_param.dz_config);
                atomisp_css_update_isp_params(asd);
                asd->params.css_update_params_needed = false;
                memset(&asd->params.css_param.update_flag, 0,
@@ -1852,7 +1855,7 @@ start_sensor:
 
        if (!isp->sw_contex.file_input) {
                atomisp_css_irq_enable(isp, CSS_IRQ_INFO_CSS_RECEIVER_SOF,
-                               atomisp_css_valid_sof(isp));
+                                      atomisp_css_valid_sof(isp));
                atomisp_csi2_configure(asd);
                /*
                 * set freq to max when streaming count > 1 which indicate
@@ -1860,11 +1863,11 @@ start_sensor:
                */
                if (atomisp_streaming_count(isp) > 1) {
                        if (atomisp_freq_scaling(isp,
-                               ATOMISP_DFS_MODE_MAX, false) < 0)
+                                                ATOMISP_DFS_MODE_MAX, false) < 0)
                                dev_dbg(isp->dev, "dfs failed!\n");
                } else {
                        if (atomisp_freq_scaling(isp,
-                               ATOMISP_DFS_MODE_AUTO, false) < 0)
+                                                ATOMISP_DFS_MODE_AUTO, false) < 0)
                                dev_dbg(isp->dev, "dfs failed!\n");
                }
        } else {
@@ -1873,7 +1876,7 @@ start_sensor:
        }
 
        if (asd->depth_mode->val && atomisp_streaming_count(isp) ==
-                       ATOMISP_DEPTH_SENSOR_STREAMON_COUNT) {
+           ATOMISP_DEPTH_SENSOR_STREAMON_COUNT) {
                ret = atomisp_stream_on_master_slave_sensor(isp, false);
                if (ret) {
                        dev_err(isp->dev, "master slave sensor stream on failed!\n");
@@ -1886,7 +1889,7 @@ start_sensor:
 #endif
                goto start_delay_wq;
        } else if (asd->depth_mode->val && (atomisp_streaming_count(isp) <
-                  ATOMISP_DEPTH_SENSOR_STREAMON_COUNT)) {
+                                           ATOMISP_DEPTH_SENSOR_STREAMON_COUNT)) {
 #ifdef ISP2401
                __wdt_on_master_slave_sensor(pipe, wdt_duration, false);
 #endif
@@ -1895,7 +1898,7 @@ start_sensor:
 
        /* Enable the CSI interface on ANN B0/K0 */
        if (isp->media_dev.hw_revision >= ((ATOMISP_HW_REVISION_ISP2401 <<
-           ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)) {
+                                           ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)) {
                pci_write_config_word(isp->pdev, MRFLD_PCI_CSI_CONTROL,
                                      isp->saved_regs.csi_control |
                                      MRFLD_PCI_CSI_CONTROL_CSI_READY);
@@ -1923,14 +1926,14 @@ start_delay_wq:
                struct v4l2_mbus_framefmt *sink;
 
                sink = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
-                                      V4L2_SUBDEV_FORMAT_ACTIVE,
-                                      ATOMISP_SUBDEV_PAD_SINK);
+                                              V4L2_SUBDEV_FORMAT_ACTIVE,
+                                              ATOMISP_SUBDEV_PAD_SINK);
 
                reinit_completion(&asd->init_done);
                asd->delayed_init = ATOMISP_DELAYED_INIT_QUEUED;
                queue_work(asd->delayed_init_workq, &asd->delayed_init_work);
                atomisp_css_set_cont_prev_start_time(isp,
-                               ATOMISP_CALC_CSS_PREV_OVERLAP(sink->height));
+                                                    ATOMISP_CALC_CSS_PREV_OVERLAP(sink->height));
        } else {
                asd->delayed_init = ATOMISP_DELAYED_INIT_NOT_QUEUED;
        }
@@ -1971,20 +1974,20 @@ int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)
         * case of continuous capture
         */
        if ((asd->continuous_mode->val ||
-           isp->inputs[asd->input_curr].camera_caps->multi_stream_ctrl) &&
+            isp->inputs[asd->input_curr].camera_caps->multi_stream_ctrl) &&
            atomisp_subdev_source_pad(vdev) !=
-               ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW &&
+           ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW &&
            atomisp_subdev_source_pad(vdev) !=
-               ATOMISP_SUBDEV_PAD_SOURCE_VIDEO) {
+           ATOMISP_SUBDEV_PAD_SOURCE_VIDEO) {
                if (isp->inputs[asd->input_curr].camera_caps->multi_stream_ctrl) {
                        v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
-                               video, s_stream, 0);
+                                        video, s_stream, 0);
                } else if (atomisp_subdev_source_pad(vdev)
-                   == ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE) {
+                          == ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE) {
                        /* stop continuous still capture if needed */
                        if (asd->params.offline_parm.num_captures == -1)
                                atomisp_css_offline_capture_configure(asd,
-                                               0, 0, 0);
+                                                                     0, 0, 0);
                        atomisp_freq_scaling(isp, ATOMISP_DFS_MODE_AUTO, false);
                }
                /*
@@ -2035,7 +2038,7 @@ int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)
                 */
                if (isp->sw_contex.file_input)
                        v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
-                                       video, s_stream, 0);
+                                        video, s_stream, 0);
 
                rt_mutex_lock(&isp->mutex);
                atomisp_acc_unload_extensions(asd);
@@ -2057,7 +2060,7 @@ int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)
 
        if (!isp->sw_contex.file_input)
                atomisp_css_irq_enable(isp, CSS_IRQ_INFO_CSS_RECEIVER_SOF,
-                                       false);
+                                      false);
 
        if (asd->delayed_init == ATOMISP_DELAYED_INIT_QUEUED) {
                cancel_work_sync(&asd->delayed_init_work);
@@ -2127,7 +2130,7 @@ stopsensor:
 
        /* Disable the CSI interface on ANN B0/K0 */
        if (isp->media_dev.hw_revision >= ((ATOMISP_HW_REVISION_ISP2401 <<
-           ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)) {
+                                           ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)) {
                pci_write_config_word(isp->pdev, MRFLD_PCI_CSI_CONTROL,
                                      isp->saved_regs.csi_control &
                                      ~MRFLD_PCI_CSI_CONTROL_CSI_READY);
@@ -2157,14 +2160,14 @@ stopsensor:
                for (i = 0; i < isp->num_of_streams; i++) {
                        if (isp->asd[i].stream_prepared) {
                                atomisp_destroy_pipes_stream_force(&isp->
-                                               asd[i]);
+                                                                  asd[i]);
                                recreate_streams[i] = true;
                        }
                }
 
                /* disable  PUNIT/ISP acknowlede/handshake - SRSE=3 */
                pci_write_config_dword(isp->pdev, PCI_I_CONTROL, isp->saved_regs.i_control |
-                               MRFLD_PCI_I_CONTROL_SRSE_RESET_MASK);
+                                      MRFLD_PCI_I_CONTROL_SRSE_RESET_MASK);
                dev_err(isp->dev, "atomisp_reset");
                atomisp_reset(isp);
                for (i = 0; i < isp->num_of_streams; i++) {
@@ -2198,7 +2201,7 @@ static int atomisp_streamoff(struct file *file, void *fh,
  * call this ioctl with a pointer to this structure
  */
 static int atomisp_g_ctrl(struct file *file, void *fh,
-       struct v4l2_control *control)
+                         struct v4l2_control *control)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
@@ -2400,7 +2403,7 @@ static int atomisp_queryctl(struct file *file, void *fh,
 }
 
 static int atomisp_camera_g_ext_ctrls(struct file *file, void *fh,
-       struct v4l2_ext_controls *c)
+                                     struct v4l2_ext_controls *c)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
@@ -2475,8 +2478,8 @@ static int atomisp_camera_g_ext_ctrls(struct file *file, void *fh,
                        break;
                case V4L2_CID_G_SKIP_FRAMES:
                        ret = v4l2_subdev_call(
-                               isp->inputs[asd->input_curr].camera,
-                               sensor, g_skip_frames, (u32 *)&ctrl.value);
+                                 isp->inputs[asd->input_curr].camera,
+                                 sensor, g_skip_frames, (u32 *)&ctrl.value);
                        break;
                default:
                        ret = -EINVAL;
@@ -2493,7 +2496,7 @@ static int atomisp_camera_g_ext_ctrls(struct file *file, void *fh,
 
 /* This ioctl allows the application to get multiple controls by class */
 static int atomisp_g_ext_ctrls(struct file *file, void *fh,
-       struct v4l2_ext_controls *c)
+                              struct v4l2_ext_controls *c)
 {
        struct v4l2_control ctrl;
        int i, ret = 0;
@@ -2518,7 +2521,7 @@ static int atomisp_g_ext_ctrls(struct file *file, void *fh,
 }
 
 static int atomisp_camera_s_ext_ctrls(struct file *file, void *fh,
-       struct v4l2_ext_controls *c)
+                                     struct v4l2_ext_controls *c)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
@@ -2589,7 +2592,7 @@ static int atomisp_camera_s_ext_ctrls(struct file *file, void *fh,
                                 * flash state */
                                if (ctrl.id == V4L2_CID_FLASH_MODE) {
                                        asd->params.flash_state =
-                                               ATOMISP_FLASH_IDLE;
+                                           ATOMISP_FLASH_IDLE;
                                        asd->params.num_flash_frames = 0;
                                }
                        }
@@ -2619,7 +2622,7 @@ static int atomisp_camera_s_ext_ctrls(struct file *file, void *fh,
 
 /* This ioctl allows the application to set multiple controls by class */
 static int atomisp_s_ext_ctrls(struct file *file, void *fh,
-       struct v4l2_ext_controls *c)
+                              struct v4l2_ext_controls *c)
 {
        struct v4l2_control ctrl;
        int i, ret = 0;
@@ -2647,7 +2650,7 @@ static int atomisp_s_ext_ctrls(struct file *file, void *fh,
  * vidioc_g/s_param are used to switch isp running mode
  */
 static int atomisp_g_parm(struct file *file, void *fh,
-       struct v4l2_streamparm *parm)
+                         struct v4l2_streamparm *parm)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
@@ -2666,7 +2669,7 @@ static int atomisp_g_parm(struct file *file, void *fh,
 }
 
 static int atomisp_s_parm(struct file *file, void *fh,
-       struct v4l2_streamparm *parm)
+                         struct v4l2_streamparm *parm)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -2728,7 +2731,7 @@ out:
 }
 
 static int atomisp_s_parm_file(struct file *file, void *fh,
-                               struct v4l2_streamparm *parm)
+                              struct v4l2_streamparm *parm)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -2746,7 +2749,7 @@ static int atomisp_s_parm_file(struct file *file, void *fh,
 }
 
 static long atomisp_vidioc_default(struct file *file, void *fh,
-       bool valid_prio, unsigned int cmd, void *arg)
+                                  bool valid_prio, unsigned int cmd, void *arg)
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
@@ -2837,14 +2840,14 @@ static long atomisp_vidioc_default(struct file *file, void *fh,
 
        case ATOMISP_IOC_S_DIS_COEFS:
                err = atomisp_css_cp_dvs2_coefs(asd, arg,
-                               &asd->params.css_param, true);
+                                               &asd->params.css_param, true);
                if (!err && arg)
                        asd->params.css_update_params_needed = true;
                break;
 
        case ATOMISP_IOC_S_DIS_VECTOR:
                err = atomisp_cp_dvs_6axis_config(asd, arg,
-                               &asd->params.css_param, true);
+                                                 &asd->params.css_param, true);
                if (!err && arg)
                        asd->params.css_update_params_needed = true;
                break;
@@ -2945,17 +2948,17 @@ static long atomisp_vidioc_default(struct file *file, void *fh,
 #endif
 #ifndef ISP2401
                        err = v4l2_subdev_call(
-                                       isp->inputs[asd->input_curr].motor,
-                                       core, ioctl, cmd, arg);
+                                 isp->inputs[asd->input_curr].motor,
+                                 core, ioctl, cmd, arg);
 #else
                        err = v4l2_subdev_call(
-                                       isp->motor,
-                                       core, ioctl, cmd, arg);
+                                 isp->motor,
+                                 core, ioctl, cmd, arg);
 #endif
                else
                        err = v4l2_subdev_call(
-                                       isp->inputs[asd->input_curr].camera,
-                                       core, ioctl, cmd, arg);
+                                 isp->inputs[asd->input_curr].camera,
+                                 core, ioctl, cmd, arg);
                break;
 
        case ATOMISP_IOC_S_EXPOSURE:
@@ -2969,7 +2972,7 @@ static long atomisp_vidioc_default(struct file *file, void *fh,
        case ATOMISP_IOC_G_UPDATE_EXPOSURE:
 #endif
                err = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
-                                       core, ioctl, cmd, arg);
+                                      core, ioctl, cmd, arg);
                break;
 
        case ATOMISP_IOC_ACC_LOAD:
@@ -3031,7 +3034,7 @@ static long atomisp_vidioc_default(struct file *file, void *fh,
                break;
        case ATOMISP_IOC_EXT_ISP_CTRL:
                err = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
-                                       core, ioctl, cmd, arg);
+                                      core, ioctl, cmd, arg);
                break;
        case ATOMISP_IOC_EXP_ID_UNLOCK:
                err = atomisp_exp_id_unlock(asd, arg);
index 0d2785b9ef990ce99ba710a26eb674a30219d2b0..1f87d8f00c4a14c89500c2ba5dc116d75731e86f 100644 (file)
@@ -28,27 +28,27 @@ struct atomisp_video_pipe;
 extern const struct atomisp_format_bridge atomisp_output_fmts[];
 
 const struct atomisp_format_bridge *atomisp_get_format_bridge(
-       unsigned int pixelformat);
+    unsigned int pixelformat);
 #ifndef ISP2401
 const struct atomisp_format_bridge *atomisp_get_format_bridge_from_mbus(
-       u32 mbus_code);
+    u32 mbus_code);
 #else
 const struct atomisp_format_bridge *atomisp_get_format_bridge_from_mbus(u32
-                                                                       mbus_code);
+       mbus_code);
 #endif
 
 int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
-       uint16_t stream_id);
+                               uint16_t stream_id);
 
 int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type);
 int __atomisp_reqbufs(struct file *file, void *fh,
-               struct v4l2_requestbuffers *req);
+                     struct v4l2_requestbuffers *req);
 
 int atomisp_reqbufs(struct file *file, void *fh,
-                       struct v4l2_requestbuffers *req);
+                   struct v4l2_requestbuffers *req);
 
 enum atomisp_css_pipe_id atomisp_get_css_pipe_id(struct atomisp_sub_device
-                                                *asd);
+       *asd);
 
 void atomisp_videobuf_free_buf(struct videobuf_buffer *vb);
 
@@ -65,5 +65,6 @@ unsigned int atomisp_is_acc_enabled(struct atomisp_device *isp);
 long atomisp_compat_ioctl32(struct file *file,
                            unsigned int cmd, unsigned long arg);
 
-int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp, bool isp_timeout);
+int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp,
+       bool isp_timeout);
 #endif /* __ATOMISP_IOCTL_H__ */
index b92d3bf593a00fa5d533ae31b1b061e43056825d..7dc19e038faa086f3c22a745731e6856a7c3b3b1 100644 (file)
@@ -101,7 +101,7 @@ const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv(u32 code)
 }
 
 const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
-       enum atomisp_input_format atomisp_in_fmt)
+    enum atomisp_input_format atomisp_in_fmt)
 {
        int i;
 
@@ -124,7 +124,7 @@ bool atomisp_subdev_format_conversion(struct atomisp_sub_device *asd,
                                      V4L2_SUBDEV_FORMAT_ACTIVE, source_pad);
 
        return atomisp_is_mbuscode_raw(sink->code)
-               && !atomisp_is_mbuscode_raw(src->code);
+              && !atomisp_is_mbuscode_raw(src->code);
 }
 
 uint16_t atomisp_subdev_source_pad(struct video_device *vdev)
@@ -154,7 +154,7 @@ uint16_t atomisp_subdev_source_pad(struct video_device *vdev)
  * Return 0 on success or a negative error code otherwise.
  */
 static long isp_subdev_ioctl(struct v4l2_subdev *sd,
-       unsigned int cmd, void *arg)
+                            unsigned int cmd, void *arg)
 {
        return 0;
 }
@@ -189,7 +189,7 @@ static int isp_subdev_subscribe_event(struct v4l2_subdev *sd,
                return -EINVAL;
 
        if (sub->type == V4L2_EVENT_FRAME_SYNC &&
-                       !atomisp_css_valid_sof(isp))
+           !atomisp_css_valid_sof(isp))
                return -EINVAL;
 
        return v4l2_event_subscribe(fh, sub, 16, NULL);
@@ -243,9 +243,9 @@ static int isp_subdev_validate_rect(struct v4l2_subdev *sd, uint32_t pad,
 }
 
 struct v4l2_rect *atomisp_subdev_get_rect(struct v4l2_subdev *sd,
-                                         struct v4l2_subdev_pad_config *cfg,
-                                         u32 which, uint32_t pad,
-                                         uint32_t target)
+       struct v4l2_subdev_pad_config *cfg,
+       u32 which, uint32_t pad,
+       uint32_t target)
 {
        struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
 
@@ -305,7 +305,7 @@ static void isp_subdev_propagate(struct v4l2_subdev *sd,
 {
        struct v4l2_mbus_framefmt *ffmt[ATOMISP_SUBDEV_PADS_NUM];
        struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM],
-               *comp[ATOMISP_SUBDEV_PADS_NUM];
+                      *comp[ATOMISP_SUBDEV_PADS_NUM];
 
        if (flags & V4L2_SEL_FLAG_KEEP_CONFIG)
                return;
@@ -338,7 +338,7 @@ static int isp_subdev_get_selection(struct v4l2_subdev *sd,
                return rval;
 
        rec = atomisp_subdev_get_rect(sd, cfg, sel->which, sel->pad,
-                                       sel->target);
+                                     sel->target);
        if (!rec)
                return -EINVAL;
 
@@ -350,7 +350,8 @@ static char *atomisp_pad_str[] = { "ATOMISP_SUBDEV_PAD_SINK",
                                   "ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE",
                                   "ATOMISP_SUBDEV_PAD_SOURCE_VF",
                                   "ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW",
-                                  "ATOMISP_SUBDEV_PAD_SOURCE_VIDEO"};
+                                  "ATOMISP_SUBDEV_PAD_SOURCE_VIDEO"
+                                };
 
 int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
                                 struct v4l2_subdev_pad_config *cfg,
@@ -362,7 +363,7 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
        struct v4l2_mbus_framefmt *ffmt[ATOMISP_SUBDEV_PADS_NUM];
        u16 vdev_pad = atomisp_subdev_source_pad(sd->devnode);
        struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM],
-               *comp[ATOMISP_SUBDEV_PADS_NUM];
+                      *comp[ATOMISP_SUBDEV_PADS_NUM];
        enum atomisp_input_stream_id stream_id;
        unsigned int i;
        unsigned int padding_w = pad_w;
@@ -394,7 +395,7 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
                /* Workaround for BYT 1080p perfectshot since the maxinum resolution of
                 * front camera ov2722 is 1932x1092 and cannot use pad_w > 12*/
                if (!strncmp(isp->inputs[isp_sd->input_curr].camera->name,
-                               "ov2722", 6) && crop[pad]->height == 1092) {
+                            "ov2722", 6) && crop[pad]->height == 1092) {
                        padding_w = 12;
                        padding_h = 12;
                }
@@ -436,8 +437,8 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
                                struct v4l2_rect tmp = *crop[pad];
 
                                atomisp_subdev_set_selection(
-                                       sd, cfg, which, i, V4L2_SEL_TGT_COMPOSE,
-                                       flags, &tmp);
+                                   sd, cfg, which, i, V4L2_SEL_TGT_COMPOSE,
+                                   flags, &tmp);
                        }
                }
 
@@ -463,7 +464,7 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
 
                atomisp_css_video_set_dis_envelope(isp_sd, dvs_w, dvs_h);
                atomisp_css_input_set_effective_resolution(isp_sd, stream_id,
-                                       crop[pad]->width, crop[pad]->height);
+                       crop[pad]->width, crop[pad]->height);
 
                break;
        }
@@ -487,8 +488,8 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
                comp[pad]->height = r->height;
 
                if (r->width == 0 || r->height == 0 ||
-                       crop[ATOMISP_SUBDEV_PAD_SINK]->width == 0 ||
-                       crop[ATOMISP_SUBDEV_PAD_SINK]->height == 0)
+                   crop[ATOMISP_SUBDEV_PAD_SINK]->width == 0 ||
+                   crop[ATOMISP_SUBDEV_PAD_SINK]->height == 0)
                        break;
                /*
                 * do cropping on sensor input if ratio of required resolution
@@ -505,20 +506,20 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
                 *
                 */
                if (r->width * crop[ATOMISP_SUBDEV_PAD_SINK]->height <
-                       crop[ATOMISP_SUBDEV_PAD_SINK]->width * r->height)
+                   crop[ATOMISP_SUBDEV_PAD_SINK]->width * r->height)
                        atomisp_css_input_set_effective_resolution(isp_sd,
                                stream_id,
                                rounddown(crop[ATOMISP_SUBDEV_PAD_SINK]->
-                                       height * r->width / r->height,
-                                       ATOM_ISP_STEP_WIDTH),
+                                         height * r->width / r->height,
+                                         ATOM_ISP_STEP_WIDTH),
                                crop[ATOMISP_SUBDEV_PAD_SINK]->height);
                else
                        atomisp_css_input_set_effective_resolution(isp_sd,
                                stream_id,
                                crop[ATOMISP_SUBDEV_PAD_SINK]->width,
                                rounddown(crop[ATOMISP_SUBDEV_PAD_SINK]->
-                                       width * r->height / r->width,
-                                       ATOM_ISP_STEP_WIDTH));
+                                         width * r->height / r->width,
+                                         ATOM_ISP_STEP_WIDTH));
 
                break;
        }
@@ -568,7 +569,7 @@ static int atomisp_get_sensor_bin_factor(struct atomisp_sub_device *asd)
        int ret;
 
        if (isp->inputs[asd->input_curr].type == FILE_INPUT ||
-               isp->inputs[asd->input_curr].type == TEST_PATTERN)
+           isp->inputs[asd->input_curr].type == TEST_PATTERN)
                return 0;
 
        ctrl.id = V4L2_CID_BIN_FACTOR_HORZ;
@@ -601,7 +602,7 @@ void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
        struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
        struct atomisp_device *isp = isp_sd->isp;
        struct v4l2_mbus_framefmt *__ffmt =
-               atomisp_subdev_get_ffmt(sd, cfg, which, pad);
+           atomisp_subdev_get_ffmt(sd, cfg, which, pad);
        u16 vdev_pad = atomisp_subdev_source_pad(sd->devnode);
        enum atomisp_input_stream_id stream_id;
 
@@ -615,7 +616,7 @@ void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
        switch (pad) {
        case ATOMISP_SUBDEV_PAD_SINK: {
                const struct atomisp_in_fmt_conv *fc =
-                       atomisp_find_in_fmt_conv(ffmt->code);
+                   atomisp_find_in_fmt_conv(ffmt->code);
 
                if (!fc) {
                        fc = atomisp_in_fmt_conv;
@@ -631,14 +632,14 @@ void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
 
                if (which == V4L2_SUBDEV_FORMAT_ACTIVE) {
                        atomisp_css_input_set_resolution(isp_sd,
-                               stream_id, ffmt);
+                                                        stream_id, ffmt);
                        atomisp_css_input_set_binning_factor(isp_sd,
-                               stream_id,
-                               atomisp_get_sensor_bin_factor(isp_sd));
+                                                            stream_id,
+                                                            atomisp_get_sensor_bin_factor(isp_sd));
                        atomisp_css_input_set_bayer_order(isp_sd, stream_id,
                                                          fc->bayer_order);
                        atomisp_css_input_set_format(isp_sd, stream_id,
-                                               fc->css_stream_fmt);
+                                                    fc->css_stream_fmt);
                        atomisp_css_set_default_isys_config(isp_sd, stream_id,
                                                            ffmt);
                }
@@ -694,9 +695,9 @@ static int isp_subdev_set_format(struct v4l2_subdev *sd,
 
 /* V4L2 subdev core operations */
 static const struct v4l2_subdev_core_ops isp_subdev_v4l2_core_ops = {
-        .ioctl = isp_subdev_ioctl, .s_power = isp_subdev_set_power,
-        .subscribe_event = isp_subdev_subscribe_event,
-        .unsubscribe_event = isp_subdev_unsubscribe_event,
+       .ioctl = isp_subdev_ioctl, .s_power = isp_subdev_set_power,
+       .subscribe_event = isp_subdev_subscribe_event,
+       .unsubscribe_event = isp_subdev_unsubscribe_event,
 };
 
 /* V4L2 subdev pad operations */
@@ -743,8 +744,8 @@ static void isp_subdev_init_params(struct atomisp_sub_device *asd)
 * return -EINVAL or zero on success
 */
 static int isp_subdev_link_setup(struct media_entity *entity,
-       const struct media_pad *local,
-       const struct media_pad *remote, u32 flags)
+                                const struct media_pad *local,
+                                const struct media_pad *remote, u32 flags)
 {
        struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
        struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
@@ -776,8 +777,8 @@ static int isp_subdev_link_setup(struct media_entity *entity,
                /* read from memory */
                if (flags & MEDIA_LNK_FL_ENABLED) {
                        if (isp_sd->input >= ATOMISP_SUBDEV_INPUT_CSI2_PORT1 &&
-                               isp_sd->input < (ATOMISP_SUBDEV_INPUT_CSI2_PORT1
-                                               + ATOMISP_CAMERA_NR_PORTS))
+                           isp_sd->input < (ATOMISP_SUBDEV_INPUT_CSI2_PORT1
+                                            + ATOMISP_CAMERA_NR_PORTS))
                                return -EBUSY;
                        isp_sd->input = ATOMISP_SUBDEV_INPUT_MEMORY;
                } else {
@@ -811,9 +812,9 @@ static int isp_subdev_link_setup(struct media_entity *entity,
 
 /* media operations */
 static const struct media_entity_operations isp_subdev_media_ops = {
-        .link_setup = isp_subdev_link_setup,
-        .link_validate = v4l2_subdev_link_validate,
-/*      .set_power = v4l2_subdev_set_power,    */
+       .link_setup = isp_subdev_link_setup,
+       .link_validate = v4l2_subdev_link_validate,
+       /*       .set_power = v4l2_subdev_set_power,    */
 };
 
 static int __atomisp_update_run_mode(struct atomisp_sub_device *asd)
@@ -853,14 +854,15 @@ int atomisp_update_run_mode(struct atomisp_sub_device *asd)
 static int s_ctrl(struct v4l2_ctrl *ctrl)
 {
        struct atomisp_sub_device *asd = container_of(
-               ctrl->handler, struct atomisp_sub_device, ctrl_handler);
+                                            ctrl->handler, struct atomisp_sub_device, ctrl_handler);
 
        switch (ctrl->id) {
        case V4L2_CID_RUN_MODE:
                return __atomisp_update_run_mode(asd);
        case V4L2_CID_DEPTH_MODE:
                if (asd->streaming != ATOMISP_DEVICE_STREAMING_DISABLED) {
-                       dev_err(asd->isp->dev, "ISP is streaming, it is not supported to change the depth mode\n");
+                       dev_err(asd->isp->dev,
+                               "ISP is streaming, it is not supported to change the depth mode\n");
                        return -EINVAL;
                }
                break;
@@ -884,7 +886,7 @@ static const struct v4l2_ctrl_config ctrl_fmt_auto = {
        .def = 1,
 };
 
-static const char * const ctrl_run_mode_menu[] = {
+static const char *const ctrl_run_mode_menu[] = {
        NULL,
        "Video",
        "Still capture",
@@ -903,7 +905,7 @@ static const struct v4l2_ctrl_config ctrl_run_mode = {
        .qmenu = ctrl_run_mode_menu,
 };
 
-static const char * const ctrl_vfpp_mode_menu[] = {
+static const char *const ctrl_vfpp_mode_menu[] = {
        "Enable",                       /* vfpp always enabled */
        "Disable to scaler mode",       /* CSS into video mode and disable */
        "Disable to low latency mode",  /* CSS into still mode and disable */
@@ -1064,20 +1066,20 @@ static const struct v4l2_ctrl_config ctrl_select_isp_version = {
  * this fd will be used to map shared fd to buffer.
  */
 static const struct v4l2_ctrl_config ctrl_ion_dev_fd = {
-               .ops = &ctrl_ops,
-               .id = V4L2_CID_ATOMISP_ION_DEVICE_FD,
-               .type = V4L2_CTRL_TYPE_INTEGER,
-               .name = "Ion Device Fd",
-               .min = -1,
-               .max = 1024,
-               .step = 1,
-               .def = ION_FD_UNSET
+       .ops = &ctrl_ops,
+       .id = V4L2_CID_ATOMISP_ION_DEVICE_FD,
+       .type = V4L2_CTRL_TYPE_INTEGER,
+       .name = "Ion Device Fd",
+       .min = -1,
+       .max = 1024,
+       .step = 1,
+       .def = ION_FD_UNSET
 };
 #endif
 
 #endif
 static void atomisp_init_subdev_pipe(struct atomisp_sub_device *asd,
-               struct atomisp_video_pipe *pipe, enum v4l2_buf_type buf_type)
+                                    struct atomisp_video_pipe *pipe, enum v4l2_buf_type buf_type)
 {
        pipe->type = buf_type;
        pipe->asd = asd;
@@ -1091,11 +1093,11 @@ static void atomisp_init_subdev_pipe(struct atomisp_sub_device *asd,
               0, VIDEO_MAX_FRAME * sizeof(unsigned int));
        memset(pipe->frame_params,
               0, VIDEO_MAX_FRAME *
-               sizeof(struct atomisp_css_params_with_list *));
+              sizeof(struct atomisp_css_params_with_list *));
 }
 
 static void atomisp_init_acc_pipe(struct atomisp_sub_device *asd,
-               struct atomisp_acc_pipe *pipe)
+                                 struct atomisp_acc_pipe *pipe)
 {
        pipe->asd = asd;
        pipe->isp = asd->isp;
@@ -1131,15 +1133,15 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
        pads[ATOMISP_SUBDEV_PAD_SOURCE_VIDEO].flags = MEDIA_PAD_FL_SOURCE;
 
        asd->fmt[ATOMISP_SUBDEV_PAD_SINK].fmt.code =
-               MEDIA_BUS_FMT_SBGGR10_1X10;
+           MEDIA_BUS_FMT_SBGGR10_1X10;
        asd->fmt[ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW].fmt.code =
-               MEDIA_BUS_FMT_SBGGR10_1X10;
+           MEDIA_BUS_FMT_SBGGR10_1X10;
        asd->fmt[ATOMISP_SUBDEV_PAD_SOURCE_VF].fmt.code =
-               MEDIA_BUS_FMT_SBGGR10_1X10;
+           MEDIA_BUS_FMT_SBGGR10_1X10;
        asd->fmt[ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE].fmt.code =
-               MEDIA_BUS_FMT_SBGGR10_1X10;
+           MEDIA_BUS_FMT_SBGGR10_1X10;
        asd->fmt[ATOMISP_SUBDEV_PAD_SOURCE_VIDEO].fmt.code =
-               MEDIA_BUS_FMT_SBGGR10_1X10;
+           MEDIA_BUS_FMT_SBGGR10_1X10;
 
        me->ops = &isp_subdev_media_ops;
        me->function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
@@ -1191,44 +1193,44 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
                return ret;
 
        asd->fmt_auto = v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                                   &ctrl_fmt_auto, NULL);
+                                            &ctrl_fmt_auto, NULL);
        asd->run_mode = v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                                   &ctrl_run_mode, NULL);
+                                            &ctrl_run_mode, NULL);
        asd->vfpp = v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                               &ctrl_vfpp, NULL);
+                                        &ctrl_vfpp, NULL);
        asd->continuous_mode = v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                            &ctrl_continuous_mode, NULL);
+                              &ctrl_continuous_mode, NULL);
        asd->continuous_viewfinder = v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                            &ctrl_continuous_viewfinder,
-                                            NULL);
+                                    &ctrl_continuous_viewfinder,
+                                    NULL);
        asd->continuous_raw_buffer_size =
-                       v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                            &ctrl_continuous_raw_buffer_size,
-                                            NULL);
+           v4l2_ctrl_new_custom(&asd->ctrl_handler,
+                                &ctrl_continuous_raw_buffer_size,
+                                NULL);
 
        asd->enable_raw_buffer_lock =
-                       v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                            &ctrl_enable_raw_buffer_lock,
-                                            NULL);
+           v4l2_ctrl_new_custom(&asd->ctrl_handler,
+                                &ctrl_enable_raw_buffer_lock,
+                                NULL);
        asd->depth_mode =
-                       v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                            &ctrl_depth_mode,
-                                            NULL);
+           v4l2_ctrl_new_custom(&asd->ctrl_handler,
+                                &ctrl_depth_mode,
+                                NULL);
        asd->disable_dz =
-                       v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                            &ctrl_disable_dz,
-                                            NULL);
+           v4l2_ctrl_new_custom(&asd->ctrl_handler,
+                                &ctrl_disable_dz,
+                                NULL);
 #ifdef ISP2401
        asd->select_isp_version =
-                       v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                            &ctrl_select_isp_version,
-                                            NULL);
+           v4l2_ctrl_new_custom(&asd->ctrl_handler,
+                                &ctrl_select_isp_version,
+                                NULL);
 
 #ifdef CONFIG_ION
        asd->ion_dev_fd =
-                       v4l2_ctrl_new_custom(&asd->ctrl_handler,
-                                               &ctrl_ion_dev_fd,
-                                                NULL);
+           v4l2_ctrl_new_custom(&asd->ctrl_handler,
+                                &ctrl_ion_dev_fd,
+                                NULL);
 #endif
 #endif
 
@@ -1258,7 +1260,7 @@ int atomisp_create_pads_links(struct atomisp_device *isp)
        for (i = 0; i < isp->input_cnt - 2; i++) {
                ret = media_create_pad_link(&isp->inputs[i].camera->entity, 0,
                                            &isp->csi2_port[isp->inputs[i].
-                                                           port].subdev.entity,
+                                                   port].subdev.entity,
                                            CSI2_PAD_SINK,
                                            MEDIA_LNK_FL_ENABLED |
                                            MEDIA_LNK_FL_IMMUTABLE);
@@ -1320,7 +1322,7 @@ void atomisp_subdev_cleanup_pending_events(struct atomisp_sub_device *asd)
        unsigned int i, pending_event;
 
        list_for_each_entry_safe(fh, fh_tmp,
-               &asd->subdev.devnode->fh_list, list) {
+                                &asd->subdev.devnode->fh_list, list) {
                pending_event = v4l2_event_pending(fh);
                for (i = 0; i < pending_event; i++)
                        v4l2_event_dequeue(fh, &event, 1);
@@ -1340,7 +1342,7 @@ void atomisp_subdev_unregister_entities(struct atomisp_sub_device *asd)
 }
 
 int atomisp_subdev_register_entities(struct atomisp_sub_device *asd,
-       struct v4l2_device *vdev)
+                                    struct v4l2_device *vdev)
 {
        int ret;
 
@@ -1405,7 +1407,7 @@ int atomisp_subdev_init(struct atomisp_device *isp)
         */
        isp->num_of_streams = 2;
        isp->asd = devm_kzalloc(isp->dev, sizeof(struct atomisp_sub_device) *
-                              isp->num_of_streams, GFP_KERNEL);
+                               isp->num_of_streams, GFP_KERNEL);
        if (!isp->asd)
                return -ENOMEM;
        for (i = 0; i < isp->num_of_streams; i++) {
index 6eb2661c3dece35a48f83f028ce470f470964523..58f77a146999c7d110f11d62f9d3aab319cc1d55 100644 (file)
@@ -341,7 +341,7 @@ struct atomisp_sub_device {
        unsigned int dis_bufs_in_css;
 
        unsigned int metadata_bufs_in_css
-               [ATOMISP_INPUT_STREAM_NUM][CSS_PIPE_ID_NUM];
+       [ATOMISP_INPUT_STREAM_NUM][CSS_PIPE_ID_NUM];
        /* The list of free and available metadata buffers for CSS */
        struct list_head metadata[ATOMISP_METADATA_TYPE_NUM];
        /* The list of metadata buffers which have been en-queued to CSS */
@@ -395,7 +395,8 @@ struct atomisp_sub_device {
        bool copy_mode; /* CSI2+ use copy mode */
        bool yuvpp_mode;        /* CSI2+ yuvpp pipe */
 
-       int raw_buffer_bitmap[ATOMISP_MAX_EXP_ID / 32 + 1]; /* Record each Raw Buffer lock status */
+       int raw_buffer_bitmap[ATOMISP_MAX_EXP_ID / 32 +
+                                                1]; /* Record each Raw Buffer lock status */
        int raw_buffer_locked_count;
        spinlock_t raw_buffer_bitmap_lock;
 
@@ -424,11 +425,11 @@ bool atomisp_subdev_is_compressed(u32 code);
 const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv(u32 code);
 #ifndef ISP2401
 const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
-       enum atomisp_input_format atomisp_in_fmt);
+    enum atomisp_input_format atomisp_in_fmt);
 #else
 const struct atomisp_in_fmt_conv
-    *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(enum atomisp_input_format
-                                               atomisp_in_fmt);
+*atomisp_find_in_fmt_conv_by_atomisp_in_fmt(enum atomisp_input_format
+       atomisp_in_fmt);
 #endif
 const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_compressed(u32 code);
 bool atomisp_subdev_format_conversion(struct atomisp_sub_device *asd,
@@ -441,9 +442,9 @@ struct v4l2_mbus_framefmt
                         struct v4l2_subdev_pad_config *cfg, uint32_t which,
                         uint32_t pad);
 struct v4l2_rect *atomisp_subdev_get_rect(struct v4l2_subdev *sd,
-                                         struct v4l2_subdev_pad_config *cfg,
-                                         u32 which, uint32_t pad,
-                                         uint32_t target);
+       struct v4l2_subdev_pad_config *cfg,
+       u32 which, uint32_t pad,
+       uint32_t target);
 int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
                                 struct v4l2_subdev_pad_config *cfg,
                                 u32 which, uint32_t pad, uint32_t target,
@@ -459,7 +460,7 @@ void atomisp_subdev_cleanup_pending_events(struct atomisp_sub_device *asd);
 
 void atomisp_subdev_unregister_entities(struct atomisp_sub_device *asd);
 int atomisp_subdev_register_entities(struct atomisp_sub_device *asd,
-       struct v4l2_device *vdev);
+                                    struct v4l2_device *vdev);
 int atomisp_subdev_init(struct atomisp_device *isp);
 void atomisp_subdev_cleanup(struct atomisp_device *isp);
 int atomisp_create_pads_links(struct atomisp_device *isp);
index 319ded6a96daff0e9db1a1af5d02d55f76c90476..22eac8a25dbadd7c95c18bcff89dd5d540c60165 100644 (file)
@@ -42,146 +42,146 @@ static struct atomisp_css_cc_config mono_cc_config = {
 /*Skin whiten image effect table*/
 static struct atomisp_css_macc_table skin_low_macc_table = {
        .data = {
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       7168, 0, 2048, 8192,
-       5120, -1024, 2048, 8192,
-       8192, 2048, -1024, 5120,
-       8192, 2048, 0, 7168,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               7168, 0, 2048, 8192,
+               5120, -1024, 2048, 8192,
+               8192, 2048, -1024, 5120,
+               8192, 2048, 0, 7168,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192
        }
 };
 
 static struct atomisp_css_macc_table skin_medium_macc_table = {
        .data = {
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       5120, 0, 6144, 8192,
-       3072, -1024, 2048, 6144,
-       6144, 2048, -1024, 3072,
-       8192, 6144, 0, 5120,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               5120, 0, 6144, 8192,
+               3072, -1024, 2048, 6144,
+               6144, 2048, -1024, 3072,
+               8192, 6144, 0, 5120,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192
        }
 };
 
 static struct atomisp_css_macc_table skin_high_macc_table = {
        .data = {
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       4096, 0, 8192, 8192,
-       0, -2048, 4096, 6144,
-       6144, 4096, -2048, 0,
-       8192, 8192, 0, 4096,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               4096, 0, 8192, 8192,
+               0, -2048, 4096, 6144,
+               6144, 4096, -2048, 0,
+               8192, 8192, 0, 4096,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192
        }
 };
 
 /*Blue enhencement image effect table*/
 static struct atomisp_css_macc_table blue_macc_table = {
        .data = {
-       9728, -3072, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       9728, 0, -3072, 8192,
-       12800, 1536, -3072, 8192,
-       11264, 0, 0, 11264,
-       9728, -3072, 0, 11264
+               9728, -3072, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               9728, 0, -3072, 8192,
+               12800, 1536, -3072, 8192,
+               11264, 0, 0, 11264,
+               9728, -3072, 0, 11264
        }
 };
 
 /*Green enhencement image effect table*/
 static struct atomisp_css_macc_table green_macc_table = {
        .data = {
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       10240, 4096, 0, 8192,
-       10240, 4096, 0, 12288,
-       12288, 0, 0, 12288,
-       14336, -2048, 4096, 8192,
-       10240, 0, 4096, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192,
-       8192, 0, 0, 8192
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               10240, 4096, 0, 8192,
+               10240, 4096, 0, 12288,
+               12288, 0, 0, 12288,
+               14336, -2048, 4096, 8192,
+               10240, 0, 4096, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192,
+               8192, 0, 0, 8192
        }
 };
 
 static struct atomisp_css_ctc_table vivid_ctc_table = {
        .data.vamem_2 = {
-       0,  384,  837,  957, 1011, 1062, 1083, 1080,
-       1078, 1077, 1053, 1039, 1012,  992,  969,  951,
-       929,  906,  886,  866,  845,  823,  809,  790,
-       772,  758,  741,  726,  711,  701,  688,  675,
-       666,  656,  648,  639,  633,  626,  618,  612,
-       603,  594,  582,  572,  557,  545,  529,  516,
-       504,  491,  480,  467,  459,  447,  438,  429,
-       419,  412,  404,  397,  389,  382,  376,  368,
-       363,  357,  351,  345,  340,  336,  330,  326,
-       321,  318,  312,  308,  304,  300,  297,  294,
-       291,  286,  284,  281,  278,  275,  271,  268,
-       261,  257,  251,  245,  240,  235,  232,  225,
-       223,  218,  213,  209,  206,  204,  199,  197,
-       193,  189,  186,  185,  183,  179,  177,  175,
-       172,  170,  169,  167,  164,  164,  162,  160,
-       158,  157,  156,  154,  154,  152,  151,  150,
-       149,  148,  146,  147,  146,  144,  143,  143,
-       142,  141,  140,  141,  139,  138,  138,  138,
-       137,  136,  136,  135,  134,  134,  134,  133,
-       132,  132,  131,  130,  131,  130,  129,  128,
-       129,  127,  127,  127,  127,  125,  125,  125,
-       123,  123,  122,  120,  118,  115,  114,  111,
-       110,  108,  106,  105,  103,  102,  100,   99,
-       97,   97,   96,   95,   94,   93,   93,   91,
-       91,   91,   90,   90,   89,   89,   88,   88,
-       89,   88,   88,   87,   87,   87,   87,   86,
-       87,   87,   86,   87,   86,   86,   84,   84,
-       82,   80,   78,   76,   74,   72,   70,   68,
-       67,   65,   62,   60,   58,   56,   55,   54,
-       53,   51,   49,   49,   47,   45,   45,   45,
-       41,   40,   39,   39,   34,   33,   34,   32,
-       25,   23,   24,   20,   13,    9,   12,    0,
-       0
+               0,  384,  837,  957, 1011, 1062, 1083, 1080,
+               1078, 1077, 1053, 1039, 1012,  992,  969,  951,
+               929,  906,  886,  866,  845,  823,  809,  790,
+               772,  758,  741,  726,  711,  701,  688,  675,
+               666,  656,  648,  639,  633,  626,  618,  612,
+               603,  594,  582,  572,  557,  545,  529,  516,
+               504,  491,  480,  467,  459,  447,  438,  429,
+               419,  412,  404,  397,  389,  382,  376,  368,
+               363,  357,  351,  345,  340,  336,  330,  326,
+               321,  318,  312,  308,  304,  300,  297,  294,
+               291,  286,  284,  281,  278,  275,  271,  268,
+               261,  257,  251,  245,  240,  235,  232,  225,
+               223,  218,  213,  209,  206,  204,  199,  197,
+               193,  189,  186,  185,  183,  179,  177,  175,
+               172,  170,  169,  167,  164,  164,  162,  160,
+               158,  157,  156,  154,  154,  152,  151,  150,
+               149,  148,  146,  147,  146,  144,  143,  143,
+               142,  141,  140,  141,  139,  138,  138,  138,
+               137,  136,  136,  135,  134,  134,  134,  133,
+               132,  132,  131,  130,  131,  130,  129,  128,
+               129,  127,  127,  127,  127,  125,  125,  125,
+               123,  123,  122,  120,  118,  115,  114,  111,
+               110,  108,  106,  105,  103,  102,  100,   99,
+               97,   97,   96,   95,   94,   93,   93,   91,
+               91,   91,   90,   90,   89,   89,   88,   88,
+               89,   88,   88,   87,   87,   87,   87,   86,
+               87,   87,   86,   87,   86,   86,   84,   84,
+               82,   80,   78,   76,   74,   72,   70,   68,
+               67,   65,   62,   60,   58,   56,   55,   54,
+               53,   51,   49,   49,   47,   45,   45,   45,
+               41,   40,   39,   39,   34,   33,   34,   32,
+               25,   23,   24,   20,   13,    9,   12,    0,
+               0
        }
 };
 #endif
index 1d233f2a69fdd2db020366462de2c7d051f17198..97176b54d1ec3af094e50c8e5e1e3fe2b08a3c49 100644 (file)
@@ -117,7 +117,7 @@ void atomisp_tpg_unregister_entities(struct atomisp_tpg_device *tpg)
 }
 
 int atomisp_tpg_register_entities(struct atomisp_tpg_device *tpg,
-                       struct v4l2_device *vdev)
+                                 struct v4l2_device *vdev)
 {
        int ret;
        /* Register the subdev and video nodes. */
index af354c4bfd3ebac01b0ae7649d47022c97b86ea7..cf492d75777338bd8363f03b3ed3eb4236b79acf 100644 (file)
@@ -33,6 +33,6 @@ void atomisp_tpg_cleanup(struct atomisp_device *isp);
 int atomisp_tpg_init(struct atomisp_device *isp);
 void atomisp_tpg_unregister_entities(struct atomisp_tpg_device *tpg);
 int atomisp_tpg_register_entities(struct atomisp_tpg_device *tpg,
-                       struct v4l2_device *vdev);
+                                 struct v4l2_device *vdev);
 
 #endif /* __ATOMISP_TPG_H__ */
index 13cdfc4f0976b0caef99d7bdd8b2342bdbea0b87..4d7a6794ee66de5426ffbd9019dee5bfeb7522c6 100644 (file)
 #include <linux/string.h>
 TRACE_EVENT(camera_meminfo,
 
-       TP_PROTO(const char *name, int uptr_size, int counter, int sys_size,
-               int sys_res_size, int cam_sys_use, int cam_dyc_use,
-               int cam_res_use),
+           TP_PROTO(const char *name, int uptr_size, int counter, int sys_size,
+                    int sys_res_size, int cam_sys_use, int cam_dyc_use,
+                    int cam_res_use),
 
-       TP_ARGS(name, uptr_size, counter, sys_size, sys_res_size, cam_sys_use,
-               cam_dyc_use, cam_res_use),
+           TP_ARGS(name, uptr_size, counter, sys_size, sys_res_size, cam_sys_use,
+                   cam_dyc_use, cam_res_use),
 
-       TP_STRUCT__entry(
+           TP_STRUCT__entry(
                __array(char, name, 24)
                __field(int, uptr_size)
                __field(int, counter)
@@ -40,9 +40,9 @@ TRACE_EVENT(camera_meminfo,
                __field(int, cam_res_use)
                __field(int, cam_dyc_use)
                __field(int, cam_sys_use)
-       ),
+           ),
 
-       TP_fast_assign(
+           TP_fast_assign(
                strlcpy(__entry->name, name, 24);
                __entry->uptr_size = uptr_size;
                __entry->counter = counter;
@@ -51,72 +51,72 @@ TRACE_EVENT(camera_meminfo,
                __entry->cam_res_use = cam_res_use;
                __entry->cam_dyc_use = cam_dyc_use;
                __entry->cam_sys_use = cam_sys_use;
-       ),
+           ),
 
-       TP_printk(
+           TP_printk(
                "<%s> User ptr memory:%d pages,\tISP private memory used:%d pages:\tsysFP system size:%d,\treserved size:%d\tcamFP sysUse:%d,\tdycUse:%d,\tresUse:%d.\n",
                __entry->name, __entry->uptr_size, __entry->counter,
                __entry->sys_size, __entry->sys_res_size, __entry->cam_sys_use,
                __entry->cam_dyc_use, __entry->cam_res_use)
-);
+          );
 
 TRACE_EVENT(camera_debug,
 
-       TP_PROTO(const char *name, char *info, const int line),
+           TP_PROTO(const char *name, char *info, const int line),
 
-       TP_ARGS(name, info, line),
+           TP_ARGS(name, info, line),
 
-       TP_STRUCT__entry(
+           TP_STRUCT__entry(
                __array(char, name, 24)
                __array(char, info, 24)
                __field(int, line)
-       ),
+           ),
 
-       TP_fast_assign(
+           TP_fast_assign(
                strlcpy(__entry->name, name, 24);
                strlcpy(__entry->info, info, 24);
                __entry->line = line;
-       ),
+           ),
 
-       TP_printk("<%s>-<%d> %s\n", __entry->name, __entry->line,
-               __entry->info)
-);
+           TP_printk("<%s>-<%d> %s\n", __entry->name, __entry->line,
+                     __entry->info)
+          );
 
 TRACE_EVENT(ipu_cstate,
 
-               TP_PROTO(int cstate),
+           TP_PROTO(int cstate),
 
-               TP_ARGS(cstate),
+           TP_ARGS(cstate),
 
-               TP_STRUCT__entry(
-                       __field(int, cstate)
-               ),
+           TP_STRUCT__entry(
+               __field(int, cstate)
+           ),
 
-               TP_fast_assign(
-                       __entry->cstate = cstate;
-               ),
+           TP_fast_assign(
+               __entry->cstate = cstate;
+           ),
 
-               TP_printk("cstate=%d", __entry->cstate)
-);
+           TP_printk("cstate=%d", __entry->cstate)
+          );
 
 TRACE_EVENT(ipu_pstate,
 
-               TP_PROTO(int freq, int util),
+           TP_PROTO(int freq, int util),
 
-               TP_ARGS(freq, util),
+           TP_ARGS(freq, util),
 
-               TP_STRUCT__entry(
-                       __field(int, freq)
-                       __field(int, util)
-               ),
+           TP_STRUCT__entry(
+               __field(int, freq)
+               __field(int, util)
+           ),
 
-               TP_fast_assign(
-                       __entry->freq = freq;
-                       __entry->util = util;
-               ),
+           TP_fast_assign(
+               __entry->freq = freq;
+               __entry->util = util;
+           ),
 
-               TP_printk("freq=%d util=%d", __entry->freq, __entry->util)
-);
+           TP_printk("freq=%d util=%d", __entry->freq, __entry->util)
+          );
 #endif
 
 #undef TRACE_INCLUDE_PATH
index 5a68967d15c4a2ddca173415b2510ffde4e66a0f..5a624a5ae56b42c68b231dfa06cf6be595a4e691 100644 (file)
@@ -56,24 +56,24 @@ MODULE_PARM_DESC(skip_fwload, "Skip atomisp firmware load");
 static unsigned int repool_pgnr;
 module_param(repool_pgnr, uint, 0644);
 MODULE_PARM_DESC(repool_pgnr,
-               "Set the reserved memory pool size in page (default:0)");
+                "Set the reserved memory pool size in page (default:0)");
 
 /* set dynamic memory pool size in page */
 unsigned int dypool_pgnr = UINT_MAX;
 module_param(dypool_pgnr, uint, 0644);
 MODULE_PARM_DESC(dypool_pgnr,
-               "Set the dynamic memory pool size in page (default:0)");
+                "Set the dynamic memory pool size in page (default:0)");
 
 bool dypool_enable;
 module_param(dypool_enable, bool, 0644);
 MODULE_PARM_DESC(dypool_enable,
-               "dynamic memory pool enable/disable (default:disable)");
+                "dynamic memory pool enable/disable (default:disable)");
 
 /* memory optimization: deferred firmware loading */
 bool defer_fw_load;
 module_param(defer_fw_load, bool, 0644);
 MODULE_PARM_DESC(defer_fw_load,
-               "Defer FW loading until device is opened (default:disable)");
+                "Defer FW loading until device is opened (default:disable)");
 
 /* cross componnet debug message flag */
 int dbg_level;
@@ -84,7 +84,7 @@ MODULE_PARM_DESC(dbg_level, "debug message on/off (default:off)");
 int dbg_func = 2;
 module_param(dbg_func, int, 0644);
 MODULE_PARM_DESC(dbg_func,
-               "log function switch non/trace_printk/printk (default:printk)");
+                "log function switch non/trace_printk/printk (default:printk)");
 
 int mipicsi_flag;
 module_param(mipicsi_flag, int, 0644);
@@ -157,7 +157,7 @@ void atomisp_acc_init(struct atomisp_acc_pipe *video, const char *name)
 }
 
 int atomisp_video_register(struct atomisp_video_pipe *video,
-       struct v4l2_device *vdev)
+                          struct v4l2_device *vdev)
 {
        int ret;
 
@@ -172,7 +172,7 @@ int atomisp_video_register(struct atomisp_video_pipe *video,
 }
 
 int atomisp_acc_register(struct atomisp_acc_pipe *video,
-               struct v4l2_device *vdev)
+                        struct v4l2_device *vdev)
 {
        int ret;
 
@@ -219,10 +219,10 @@ static int atomisp_save_iunit_reg(struct atomisp_device *isp)
                              &isp->saved_regs.pmcs);
        /* Ensure read/write combining is enabled. */
        pci_read_config_dword(dev, PCI_I_CONTROL,
-                       &isp->saved_regs.i_control);
+                             &isp->saved_regs.i_control);
        isp->saved_regs.i_control |=
-                       MRFLD_PCI_I_CONTROL_ENABLE_READ_COMBINING |
-                       MRFLD_PCI_I_CONTROL_ENABLE_WRITE_COMBINING;
+           MRFLD_PCI_I_CONTROL_ENABLE_READ_COMBINING |
+           MRFLD_PCI_I_CONTROL_ENABLE_WRITE_COMBINING;
        pci_read_config_dword(dev, MRFLD_PCI_CSI_ACCESS_CTRL_VIOL,
                              &isp->saved_regs.csi_access_viol);
        pci_read_config_dword(dev, MRFLD_PCI_CSI_RCOMP_CONTROL,
@@ -236,7 +236,7 @@ static int atomisp_save_iunit_reg(struct atomisp_device *isp)
         * For both issues, setting this bit is a workaround.
         */
        isp->saved_regs.csi_rcomp_config |=
-               MRFLD_PCI_CSI_HS_OVR_CLK_GATE_ON_UPDATE;
+           MRFLD_PCI_CSI_HS_OVR_CLK_GATE_ON_UPDATE;
        pci_read_config_dword(dev, MRFLD_PCI_CSI_AFE_TRIM_CONTROL,
                              &isp->saved_regs.csi_afe_dly);
        pci_read_config_dword(dev, MRFLD_PCI_CSI_CONTROL,
@@ -244,14 +244,14 @@ static int atomisp_save_iunit_reg(struct atomisp_device *isp)
        if (isp->media_dev.hw_revision >=
            (ATOMISP_HW_REVISION_ISP2401 << ATOMISP_HW_REVISION_SHIFT))
                isp->saved_regs.csi_control |=
-                       MRFLD_PCI_CSI_CONTROL_PARPATHEN;
+                   MRFLD_PCI_CSI_CONTROL_PARPATHEN;
        /*
         * On CHT CSI_READY bit should be enabled before stream on
         */
        if (IS_CHT && (isp->media_dev.hw_revision >= ((ATOMISP_HW_REVISION_ISP2401 <<
-           ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)))
+                      ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)))
                isp->saved_regs.csi_control |=
-                       MRFLD_PCI_CSI_CONTROL_CSI_READY;
+                   MRFLD_PCI_CSI_CONTROL_CSI_READY;
        pci_read_config_dword(dev, MRFLD_PCI_CSI_AFE_RCOMP_CONTROL,
                              &isp->saved_regs.csi_afe_rcomp_config);
        pci_read_config_dword(dev, MRFLD_PCI_CSI_AFE_HS_CONTROL,
@@ -277,24 +277,24 @@ static int __maybe_unused atomisp_restore_iunit_reg(struct atomisp_device *isp)
        pci_write_config_dword(dev, PCI_INTERRUPT_CTRL,
                               isp->saved_regs.interrupt_control);
        pci_write_config_dword(dev, PCI_I_CONTROL,
-                                       isp->saved_regs.i_control);
+                              isp->saved_regs.i_control);
 
        pci_write_config_dword(dev, MRFLD_PCI_PMCS,
-                                       isp->saved_regs.pmcs);
+                              isp->saved_regs.pmcs);
        pci_write_config_dword(dev, MRFLD_PCI_CSI_ACCESS_CTRL_VIOL,
-                             isp->saved_regs.csi_access_viol);
+                              isp->saved_regs.csi_access_viol);
        pci_write_config_dword(dev, MRFLD_PCI_CSI_RCOMP_CONTROL,
-                             isp->saved_regs.csi_rcomp_config);
+                              isp->saved_regs.csi_rcomp_config);
        pci_write_config_dword(dev, MRFLD_PCI_CSI_AFE_TRIM_CONTROL,
-                             isp->saved_regs.csi_afe_dly);
+                              isp->saved_regs.csi_afe_dly);
        pci_write_config_dword(dev, MRFLD_PCI_CSI_CONTROL,
-                             isp->saved_regs.csi_control);
+                              isp->saved_regs.csi_control);
        pci_write_config_dword(dev, MRFLD_PCI_CSI_AFE_RCOMP_CONTROL,
-                             isp->saved_regs.csi_afe_rcomp_config);
+                              isp->saved_regs.csi_afe_rcomp_config);
        pci_write_config_dword(dev, MRFLD_PCI_CSI_AFE_HS_CONTROL,
-                             isp->saved_regs.csi_afe_hs_control);
+                              isp->saved_regs.csi_afe_hs_control);
        pci_write_config_dword(dev, MRFLD_PCI_CSI_DEADLINE_CONTROL,
-                             isp->saved_regs.csi_deadline_control);
+                              isp->saved_regs.csi_deadline_control);
 
        /*
         * for MRFLD, Software/firmware needs to write a 1 to bit0
@@ -337,8 +337,8 @@ static int atomisp_mrfld_pre_power_down(struct atomisp_device *isp)
        atomisp_load_uint32(MRFLD_INTR_STATUS_REG, &irq);
        if (irq != 0) {
                dev_err(isp->dev,
-                        "%s: fail to clear isp interrupt status reg=0x%x\n",
-                        __func__, irq);
+                       "%s: fail to clear isp interrupt status reg=0x%x\n",
+                       __func__, irq);
                spin_unlock_irqrestore(&isp->lock, flags);
                return -EAGAIN;
        } else {
@@ -352,8 +352,8 @@ static int atomisp_mrfld_pre_power_down(struct atomisp_device *isp)
                        goto done;
                }
                dev_err(isp->dev,
-                        "%s: error in iunit interrupt. status reg=0x%x\n",
-                        __func__, irq);
+                       "%s: error in iunit interrupt. status reg=0x%x\n",
+                       __func__, irq);
                spin_unlock_irqrestore(&isp->lock, flags);
                return -EAGAIN;
        }
@@ -376,10 +376,10 @@ done:
        return 0;
 }
 
- /*
- * WA for DDR DVFS enable/disable
- * By default, ISP will force DDR DVFS 1600MHz before disable DVFS
- */
+/*
+* WA for DDR DVFS enable/disable
+* By default, ISP will force DDR DVFS 1600MHz before disable DVFS
+*/
 static void punit_ddr_dvfs_enable(bool enable)
 {
        int door_bell = 1 << 8;
@@ -430,10 +430,10 @@ int atomisp_mrfld_power_down(struct atomisp_device *isp)
        while (1) {
                iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ, MRFLD_ISPSSPM0, &reg_value);
                dev_dbg(isp->dev, "power-off in progress, ISPSSPM0: 0x%x\n",
-                               reg_value);
+                       reg_value);
                /* wait until ISPSSPM0 bit[25:24] shows 0x3 */
                if ((reg_value >> MRFLD_ISPSSPM0_ISPSSS_OFFSET) ==
-                       MRFLD_ISPSSPM0_IUNIT_POWER_OFF) {
+                   MRFLD_ISPSSPM0_IUNIT_POWER_OFF) {
                        trace_ipu_cstate(0);
                        return 0;
                }
@@ -475,10 +475,10 @@ int atomisp_mrfld_power_up(struct atomisp_device *isp)
        while (1) {
                iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ, MRFLD_ISPSSPM0, &reg_value);
                dev_dbg(isp->dev, "power-on in progress, ISPSSPM0: 0x%x\n",
-                               reg_value);
+                       reg_value);
                /* wait until ISPSSPM0 bit[25:24] shows 0x0 */
                if ((reg_value >> MRFLD_ISPSSPM0_ISPSSS_OFFSET) ==
-                       MRFLD_ISPSSPM0_IUNIT_POWER_ON) {
+                   MRFLD_ISPSSPM0_IUNIT_POWER_ON) {
                        trace_ipu_cstate(1);
                        return 0;
                }
@@ -495,7 +495,7 @@ int atomisp_mrfld_power_up(struct atomisp_device *isp)
 int atomisp_runtime_suspend(struct device *dev)
 {
        struct atomisp_device *isp = (struct atomisp_device *)
-               dev_get_drvdata(dev);
+                                    dev_get_drvdata(dev);
        int ret;
 
        ret = atomisp_mrfld_pre_power_down(isp);
@@ -513,12 +513,12 @@ int atomisp_runtime_suspend(struct device *dev)
 int atomisp_runtime_resume(struct device *dev)
 {
        struct atomisp_device *isp = (struct atomisp_device *)
-               dev_get_drvdata(dev);
+                                    dev_get_drvdata(dev);
        int ret;
 
        ret = atomisp_mrfld_power_up(isp);
        if (ret)
-                       return ret;
+               return ret;
 
        cpu_latency_qos_update_request(&isp->pm_qos, isp->max_isr_latency);
        if (isp->sw_contex.power_state == ATOM_ISP_POWER_DOWN) {
@@ -541,7 +541,7 @@ int atomisp_runtime_resume(struct device *dev)
 static int __maybe_unused atomisp_suspend(struct device *dev)
 {
        struct atomisp_device *isp = (struct atomisp_device *)
-               dev_get_drvdata(dev);
+                                    dev_get_drvdata(dev);
        /* FIXME: only has one isp_subdev at present */
        struct atomisp_sub_device *asd = &isp->asd[0];
        unsigned long flags;
@@ -579,7 +579,7 @@ static int __maybe_unused atomisp_suspend(struct device *dev)
 static int __maybe_unused atomisp_resume(struct device *dev)
 {
        struct atomisp_device *isp = (struct atomisp_device *)
-               dev_get_drvdata(dev);
+                                    dev_get_drvdata(dev);
        int ret;
 
        ret = atomisp_mrfld_power_up(isp);
@@ -638,8 +638,8 @@ int atomisp_csi_lane_config(struct atomisp_device *isp)
        int port3_lanes_shift;
 
        if (isp->media_dev.hw_revision <
-               ATOMISP_HW_REVISION_ISP2401_LEGACY <<
-               ATOMISP_HW_REVISION_SHIFT) {
+           ATOMISP_HW_REVISION_ISP2401_LEGACY <<
+           ATOMISP_HW_REVISION_SHIFT) {
                /* Merrifield */
                port_config_mask = MRFLD_PORT_CONFIG_MASK;
                port3_lanes_shift = MRFLD_PORT3_LANES_SHIFT;
@@ -650,8 +650,8 @@ int atomisp_csi_lane_config(struct atomisp_device *isp)
        }
 
        if (isp->media_dev.hw_revision <
-               ATOMISP_HW_REVISION_ISP2401 <<
-               ATOMISP_HW_REVISION_SHIFT) {
+           ATOMISP_HW_REVISION_ISP2401 <<
+           ATOMISP_HW_REVISION_SHIFT) {
                /* Merrifield / Moorefield legacy input system */
                nportconfigs = MRFLD_PORT_CONFIG_NUM;
        } else {
@@ -709,12 +709,12 @@ int atomisp_csi_lane_config(struct atomisp_device *isp)
        pci_read_config_dword(isp->pdev, MRFLD_PCI_CSI_CONTROL, &csi_control);
        csi_control &= ~port_config_mask;
        csi_control |= (portconfigs[i].code << MRFLD_PORT_CONFIGCODE_SHIFT)
-               | (portconfigs[i].lanes[0] ? 0 : (1 << MRFLD_PORT1_ENABLE_SHIFT))
-               | (portconfigs[i].lanes[1] ? 0 : (1 << MRFLD_PORT2_ENABLE_SHIFT))
-               | (portconfigs[i].lanes[2] ? 0 : (1 << MRFLD_PORT3_ENABLE_SHIFT))
-               | (((1 << portconfigs[i].lanes[0]) - 1) << MRFLD_PORT1_LANES_SHIFT)
-               | (((1 << portconfigs[i].lanes[1]) - 1) << MRFLD_PORT2_LANES_SHIFT)
-               | (((1 << portconfigs[i].lanes[2]) - 1) << port3_lanes_shift);
+                      | (portconfigs[i].lanes[0] ? 0 : (1 << MRFLD_PORT1_ENABLE_SHIFT))
+                      | (portconfigs[i].lanes[1] ? 0 : (1 << MRFLD_PORT2_ENABLE_SHIFT))
+                      | (portconfigs[i].lanes[2] ? 0 : (1 << MRFLD_PORT3_ENABLE_SHIFT))
+                      | (((1 << portconfigs[i].lanes[0]) - 1) << MRFLD_PORT1_LANES_SHIFT)
+                      | (((1 << portconfigs[i].lanes[1]) - 1) << MRFLD_PORT2_LANES_SHIFT)
+                      | (((1 << portconfigs[i].lanes[2]) - 1) << port3_lanes_shift);
 
        pci_write_config_dword(isp->pdev, MRFLD_PCI_CSI_CONTROL, csi_control);
 
@@ -741,9 +741,9 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
        for (subdevs = pdata->subdevs; subdevs->type; ++subdevs) {
                struct v4l2_subdev *subdev;
                struct i2c_board_info *board_info =
-                       &subdevs->v4l2_subdev.board_info;
+                           &subdevs->v4l2_subdev.board_info;
                struct i2c_adapter *adapter =
-                       i2c_get_adapter(subdevs->v4l2_subdev.i2c_adapter_id);
+                   i2c_get_adapter(subdevs->v4l2_subdev.i2c_adapter_id);
                int sensor_num, i;
 
                if (!adapter) {
@@ -796,18 +796,18 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
                         */
                        isp->inputs[isp->input_cnt].frame_size.pixel_format = 0;
                        isp->inputs[isp->input_cnt].camera_caps =
-                                       atomisp_get_default_camera_caps();
+                           atomisp_get_default_camera_caps();
                        sensor_num = isp->inputs[isp->input_cnt]
-                               .camera_caps->sensor_num;
+                                    .camera_caps->sensor_num;
                        isp->input_cnt++;
                        for (i = 1; i < sensor_num; i++) {
                                if (isp->input_cnt >= ATOM_ISP_MAX_INPUTS) {
                                        dev_warn(isp->dev,
-                                               "atomisp inputs out of range\n");
+                                                "atomisp inputs out of range\n");
                                        break;
                                }
                                isp->inputs[isp->input_cnt] =
-                                       isp->inputs[isp->input_cnt - 1];
+                                   isp->inputs[isp->input_cnt - 1];
                                isp->inputs[isp->input_cnt].sensor_index = i;
                                isp->input_cnt++;
                        }
@@ -853,7 +853,7 @@ static void atomisp_unregister_entities(struct atomisp_device *isp)
                atomisp_mipi_csi2_unregister_entities(&isp->csi2_port[i]);
 
        list_for_each_entry_safe(sd, next, &isp->v4l2_dev.subdevs, list)
-               v4l2_device_unregister_subdev(sd);
+       v4l2_device_unregister_subdev(sd);
 
        v4l2_device_unregister(&isp->v4l2_dev);
        media_device_unregister(&isp->media_dev);
@@ -885,7 +885,7 @@ static int atomisp_register_entities(struct atomisp_device *isp)
        /* Register internal entities */
        for (i = 0; i < ATOMISP_CAMERA_NR_PORTS; i++) {
                ret = atomisp_mipi_csi2_register_entities(&isp->csi2_port[i],
-                                                               &isp->v4l2_dev);
+                       &isp->v4l2_dev);
                if (ret == 0)
                        continue;
 
@@ -894,13 +894,13 @@ static int atomisp_register_entities(struct atomisp_device *isp)
                /* deregister all registered CSI ports */
                while (i--)
                        atomisp_mipi_csi2_unregister_entities(
-                                                       &isp->csi2_port[i]);
+                           &isp->csi2_port[i]);
 
                goto csi_and_subdev_probe_failed;
        }
 
        ret =
-       atomisp_file_input_register_entities(&isp->file_dev, &isp->v4l2_dev);
+           atomisp_file_input_register_entities(&isp->file_dev, &isp->v4l2_dev);
        if (ret < 0) {
                dev_err(isp->dev, "atomisp_file_input_register_entities\n");
                goto file_input_register_failed;
@@ -921,7 +921,7 @@ static int atomisp_register_entities(struct atomisp_device *isp)
                                "atomisp_subdev_register_entities fail\n");
                        for (; i > 0; i--)
                                atomisp_subdev_unregister_entities(
-                                               &isp->asd[i - 1]);
+                                   &isp->asd[i - 1]);
                        goto subdev_register_failed;
                }
        }
@@ -932,16 +932,16 @@ static int atomisp_register_entities(struct atomisp_device *isp)
                init_completion(&asd->init_done);
 
                asd->delayed_init_workq =
-                       alloc_workqueue(isp->v4l2_dev.name, WQ_CPU_INTENSIVE,
-                                       1);
+                   alloc_workqueue(isp->v4l2_dev.name, WQ_CPU_INTENSIVE,
+                                   1);
                if (!asd->delayed_init_workq) {
                        dev_err(isp->dev,
-                                       "Failed to initialize delayed init workq\n");
+                               "Failed to initialize delayed init workq\n");
                        ret = -ENOMEM;
 
                        for (; i > 0; i--)
                                destroy_workqueue(isp->asd[i - 1].
-                                               delayed_init_workq);
+                                                 delayed_init_workq);
                        goto wq_alloc_failed;
                }
                INIT_WORK(&asd->delayed_init_work, atomisp_delayed_init_work);
@@ -950,7 +950,7 @@ static int atomisp_register_entities(struct atomisp_device *isp)
        for (i = 0; i < isp->input_cnt; i++) {
                if (isp->inputs[i].port >= ATOMISP_CAMERA_NR_PORTS) {
                        dev_err(isp->dev, "isp->inputs port %d not supported\n",
-                                       isp->inputs[i].port);
+                               isp->inputs[i].port);
                        ret = -EINVAL;
                        goto link_failed;
                }
@@ -961,7 +961,7 @@ static int atomisp_register_entities(struct atomisp_device *isp)
        isp->inputs[isp->input_cnt].type = FILE_INPUT;
        isp->inputs[isp->input_cnt].port = -1;
        isp->inputs[isp->input_cnt].camera_caps =
-                   atomisp_get_default_camera_caps();
+           atomisp_get_default_camera_caps();
        isp->inputs[isp->input_cnt++].camera = &isp->file_dev.sd;
 
        if (isp->input_cnt < ATOM_ISP_MAX_INPUTS) {
@@ -985,11 +985,11 @@ static int atomisp_register_entities(struct atomisp_device *isp)
 link_failed:
        for (i = 0; i < isp->num_of_streams; i++)
                destroy_workqueue(isp->asd[i].
-                               delayed_init_workq);
+                                 delayed_init_workq);
 wq_alloc_failed:
        for (i = 0; i < isp->num_of_streams; i++)
                atomisp_subdev_unregister_entities(
-                                       &isp->asd[i]);
+                   &isp->asd[i]);
 subdev_register_failed:
        atomisp_tpg_unregister_entities(&isp->tpg);
 tpg_register_failed:
@@ -1150,7 +1150,7 @@ alloc_fail:
 #define ATOM_ISP_PCI_BAR       0
 
 static int atomisp_pci_probe(struct pci_dev *dev,
-                                      const struct pci_device_id *id)
+                            const struct pci_device_id *id)
 {
        const struct atomisp_platform_data *pdata;
        struct atomisp_device *isp;
@@ -1217,9 +1217,9 @@ static int atomisp_pci_probe(struct pci_dev *dev,
        switch (id->device & ATOMISP_PCI_DEVICE_SOC_MASK) {
        case ATOMISP_PCI_DEVICE_SOC_MRFLD:
                isp->media_dev.hw_revision =
-                       (ATOMISP_HW_REVISION_ISP2400
-                        << ATOMISP_HW_REVISION_SHIFT) |
-                       ATOMISP_HW_STEPPING_B0;
+                   (ATOMISP_HW_REVISION_ISP2400
+                    << ATOMISP_HW_REVISION_SHIFT) |
+                   ATOMISP_HW_STEPPING_B0;
 
                switch (id->device) {
                case ATOMISP_PCI_DEVICE_SOC_MRFLD_1179:
@@ -1236,12 +1236,12 @@ static int atomisp_pci_probe(struct pci_dev *dev,
                break;
        case ATOMISP_PCI_DEVICE_SOC_BYT:
                isp->media_dev.hw_revision =
-                       (ATOMISP_HW_REVISION_ISP2400
-                        << ATOMISP_HW_REVISION_SHIFT) |
-                       ATOMISP_HW_STEPPING_B0;
+                   (ATOMISP_HW_REVISION_ISP2400
+                    << ATOMISP_HW_REVISION_SHIFT) |
+                   ATOMISP_HW_STEPPING_B0;
 #ifdef FIXME
                if (INTEL_MID_BOARD(3, TABLET, BYT, BLK, PRO, CRV2) ||
-                       INTEL_MID_BOARD(3, TABLET, BYT, BLK, ENG, CRV2)) {
+                   INTEL_MID_BOARD(3, TABLET, BYT, BLK, ENG, CRV2)) {
                        isp->dfs = &dfs_config_byt_cr;
                        isp->hpll_freq = HPLL_FREQ_2000MHZ;
                } else
@@ -1254,7 +1254,7 @@ static int atomisp_pci_probe(struct pci_dev *dev,
                 * have specs yet for exactly how it varies.  Default to
                 * BYT-CR but let provisioning set it via EFI variable */
                isp->hpll_freq = gmin_get_var_int(&dev->dev, "HpllFreq",
-                                       HPLL_FREQ_2000MHZ);
+                                                 HPLL_FREQ_2000MHZ);
 
                /*
                 * for BYT/CHT we are put isp into D3cold to avoid pci registers access
@@ -1266,26 +1266,26 @@ static int atomisp_pci_probe(struct pci_dev *dev,
        case ATOMISP_PCI_DEVICE_SOC_ANN:
                isp->media_dev.hw_revision = (
 #ifdef ISP2401_NEW_INPUT_SYSTEM
-                        ATOMISP_HW_REVISION_ISP2401
+                                                ATOMISP_HW_REVISION_ISP2401
 #else
-                        ATOMISP_HW_REVISION_ISP2401_LEGACY
+                                                ATOMISP_HW_REVISION_ISP2401_LEGACY
 #endif
-                        << ATOMISP_HW_REVISION_SHIFT);
+                                                << ATOMISP_HW_REVISION_SHIFT);
                isp->media_dev.hw_revision |= isp->pdev->revision < 2 ?
-                       ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0;
+                                             ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0;
                isp->dfs = &dfs_config_merr;
                isp->hpll_freq = HPLL_FREQ_1600MHZ;
                break;
        case ATOMISP_PCI_DEVICE_SOC_CHT:
                isp->media_dev.hw_revision = (
 #ifdef ISP2401_NEW_INPUT_SYSTEM
-                        ATOMISP_HW_REVISION_ISP2401
+                                                ATOMISP_HW_REVISION_ISP2401
 #else
-                        ATOMISP_HW_REVISION_ISP2401_LEGACY
+                                                ATOMISP_HW_REVISION_ISP2401_LEGACY
 #endif
-                       << ATOMISP_HW_REVISION_SHIFT);
+                                                << ATOMISP_HW_REVISION_SHIFT);
                isp->media_dev.hw_revision |= isp->pdev->revision < 2 ?
-                        ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0;
+                                             ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0;
 
                isp->dfs = &dfs_config_cht;
                isp->pdev->d3cold_delay = 0;
@@ -1355,7 +1355,7 @@ static int atomisp_pci_probe(struct pci_dev *dev,
        atomisp_store_uint32(MRFLD_CSI_RECEIVER_SELECTION_REG, 1);
 
        if ((id->device & ATOMISP_PCI_DEVICE_SOC_MASK) ==
-                       ATOMISP_PCI_DEVICE_SOC_MRFLD) {
+           ATOMISP_PCI_DEVICE_SOC_MRFLD) {
                u32 csi_afe_trim;
 
                /*
@@ -1365,19 +1365,19 @@ static int atomisp_pci_probe(struct pci_dev *dev,
                pci_read_config_dword(dev, MRFLD_PCI_CSI_AFE_TRIM_CONTROL,
                                      &csi_afe_trim);
                csi_afe_trim &= ~((MRFLD_PCI_CSI_HSRXCLKTRIM_MASK <<
-                                       MRFLD_PCI_CSI1_HSRXCLKTRIM_SHIFT) |
+                                  MRFLD_PCI_CSI1_HSRXCLKTRIM_SHIFT) |
                                  (MRFLD_PCI_CSI_HSRXCLKTRIM_MASK <<
-                                       MRFLD_PCI_CSI2_HSRXCLKTRIM_SHIFT) |
+                                  MRFLD_PCI_CSI2_HSRXCLKTRIM_SHIFT) |
                                  (MRFLD_PCI_CSI_HSRXCLKTRIM_MASK <<
-                                       MRFLD_PCI_CSI3_HSRXCLKTRIM_SHIFT));
+                                  MRFLD_PCI_CSI3_HSRXCLKTRIM_SHIFT));
                csi_afe_trim |= (MRFLD_PCI_CSI1_HSRXCLKTRIM <<
-                                       MRFLD_PCI_CSI1_HSRXCLKTRIM_SHIFT) |
+                                MRFLD_PCI_CSI1_HSRXCLKTRIM_SHIFT) |
                                (MRFLD_PCI_CSI2_HSRXCLKTRIM <<
-                                       MRFLD_PCI_CSI2_HSRXCLKTRIM_SHIFT) |
+                                MRFLD_PCI_CSI2_HSRXCLKTRIM_SHIFT) |
                                (MRFLD_PCI_CSI3_HSRXCLKTRIM <<
-                                       MRFLD_PCI_CSI3_HSRXCLKTRIM_SHIFT);
+                                MRFLD_PCI_CSI3_HSRXCLKTRIM_SHIFT);
                pci_write_config_dword(dev, MRFLD_PCI_CSI_AFE_TRIM_CONTROL,
-                                     csi_afe_trim);
+                                      csi_afe_trim);
        }
 
        err = atomisp_initialize_modules(isp);
@@ -1489,7 +1489,7 @@ load_fw_fail:
 static void atomisp_pci_remove(struct pci_dev *dev)
 {
        struct atomisp_device *isp = (struct atomisp_device *)
-               pci_get_drvdata(dev);
+                                    pci_get_drvdata(dev);
 
        atomisp_drvfs_exit();
 
index 944a6cf40a2f0395d15304d3de579e35aadcc0da..37cdb98f8196a4591f7d1dfba0932925013506ac 100644 (file)
@@ -30,10 +30,10 @@ int atomisp_video_init(struct atomisp_video_pipe *video, const char *name);
 void atomisp_acc_init(struct atomisp_acc_pipe *video, const char *name);
 void atomisp_video_unregister(struct atomisp_video_pipe *video);
 int atomisp_video_register(struct atomisp_video_pipe *video,
-       struct v4l2_device *vdev);
+                          struct v4l2_device *vdev);
 void atomisp_acc_unregister(struct atomisp_acc_pipe *video);
 int atomisp_acc_register(struct atomisp_acc_pipe *video,
-       struct v4l2_device *vdev);
+                        struct v4l2_device *vdev);
 const struct firmware *atomisp_load_firmware(struct atomisp_device *isp);
 int atomisp_csi_lane_config(struct atomisp_device *isp);
 
index 55fe4b7011c273b4f4a4ba50a7d965f876ef0399..789a2e68cab8abdea6d0f8d9248d85c3528756d4 100644 (file)
@@ -45,9 +45,9 @@ struct ia_css_circbuf_s {
  * @param desc The descriptor set to the size using ia_css_circbuf_desc_init().
  */
 void ia_css_circbuf_create(
-       ia_css_circbuf_t *cb,
-       ia_css_circbuf_elem_t *elems,
-       ia_css_circbuf_desc_t *desc);
+    ia_css_circbuf_t *cb,
+    ia_css_circbuf_elem_t *elems,
+    ia_css_circbuf_desc_t *desc);
 
 /**
  * @brief Destroy the circular buffer.
@@ -55,7 +55,7 @@ void ia_css_circbuf_create(
  * @param cb The pointer to the circular buffer.
  */
 void ia_css_circbuf_destroy(
-               ia_css_circbuf_t *cb);
+    ia_css_circbuf_t *cb);
 
 /**
  * @brief Pop a value out of the circular buffer.
@@ -68,7 +68,7 @@ void ia_css_circbuf_destroy(
  * @return the pop-out value.
  */
 uint32_t ia_css_circbuf_pop(
-               ia_css_circbuf_t *cb);
+    ia_css_circbuf_t *cb);
 
 /**
  * @brief Extract a value out of the circular buffer.
@@ -82,8 +82,8 @@ uint32_t ia_css_circbuf_pop(
  * @return the extracted value.
  */
 uint32_t ia_css_circbuf_extract(
-       ia_css_circbuf_t *cb,
-       int offset);
+    ia_css_circbuf_t *cb,
+    int offset);
 
 /****************************************************************
  *
@@ -97,8 +97,8 @@ uint32_t ia_css_circbuf_extract(
  * @param val  The value to be set.
  */
 static inline void ia_css_circbuf_elem_set_val(
-       ia_css_circbuf_elem_t *elem,
-       uint32_t val)
+    ia_css_circbuf_elem_t *elem,
+    uint32_t val)
 {
        OP___assert(elem);
 
@@ -111,7 +111,7 @@ static inline void ia_css_circbuf_elem_set_val(
  * @param elem The pointer to the element.
  */
 static inline void ia_css_circbuf_elem_init(
-               ia_css_circbuf_elem_t *elem)
+    ia_css_circbuf_elem_t *elem)
 {
        OP___assert(elem);
        ia_css_circbuf_elem_set_val(elem, 0);
@@ -124,8 +124,8 @@ static inline void ia_css_circbuf_elem_init(
  * @param dest The element as the copy destination.
  */
 static inline void ia_css_circbuf_elem_cpy(
-       ia_css_circbuf_elem_t *src,
-       ia_css_circbuf_elem_t *dest)
+    ia_css_circbuf_elem_t *src,
+    ia_css_circbuf_elem_t *dest)
 {
        OP___assert(src);
        OP___assert(dest);
@@ -143,9 +143,9 @@ static inline void ia_css_circbuf_elem_cpy(
  * @return the position at offset.
  */
 static inline uint8_t ia_css_circbuf_get_pos_at_offset(
-       ia_css_circbuf_t *cb,
-       u32 base,
-       int offset)
+    ia_css_circbuf_t *cb,
+    u32 base,
+    int offset)
 {
        u8 dest;
 
@@ -176,9 +176,9 @@ static inline uint8_t ia_css_circbuf_get_pos_at_offset(
  * @return the offset.
  */
 static inline int ia_css_circbuf_get_offset(
-       ia_css_circbuf_t *cb,
-       u32 src_pos,
-       uint32_t dest_pos)
+    ia_css_circbuf_t *cb,
+    u32 src_pos,
+    uint32_t dest_pos)
 {
        int offset;
 
@@ -201,7 +201,7 @@ static inline int ia_css_circbuf_get_offset(
  * TODO: Test this API.
  */
 static inline uint32_t ia_css_circbuf_get_size(
-               ia_css_circbuf_t *cb)
+    ia_css_circbuf_t *cb)
 {
        OP___assert(cb);
        OP___assert(cb->desc);
@@ -217,7 +217,7 @@ static inline uint32_t ia_css_circbuf_get_size(
  * @return the number of available elements.
  */
 static inline uint32_t ia_css_circbuf_get_num_elems(
-               ia_css_circbuf_t *cb)
+    ia_css_circbuf_t *cb)
 {
        int num;
 
@@ -239,7 +239,7 @@ static inline uint32_t ia_css_circbuf_get_num_elems(
  *     - false when it is not empty.
  */
 static inline bool ia_css_circbuf_is_empty(
-               ia_css_circbuf_t *cb)
+    ia_css_circbuf_t *cb)
 {
        OP___assert(cb);
        OP___assert(cb->desc);
@@ -274,8 +274,8 @@ static inline bool ia_css_circbuf_is_full(ia_css_circbuf_t *cb)
  * @param elem The new element.
  */
 static inline void ia_css_circbuf_write(
-       ia_css_circbuf_t *cb,
-       ia_css_circbuf_elem_t elem)
+    ia_css_circbuf_t *cb,
+    ia_css_circbuf_elem_t elem)
 {
        OP___assert(cb);
        OP___assert(cb->desc);
@@ -298,8 +298,8 @@ static inline void ia_css_circbuf_write(
  * @param val  The value to be pushed in.
  */
 static inline void ia_css_circbuf_push(
-       ia_css_circbuf_t *cb,
-       uint32_t val)
+    ia_css_circbuf_t *cb,
+    uint32_t val)
 {
        ia_css_circbuf_elem_t elem;
 
@@ -321,7 +321,7 @@ static inline void ia_css_circbuf_push(
  * @return: The number of free elements.
  */
 static inline uint32_t ia_css_circbuf_get_free_elems(
-               ia_css_circbuf_t *cb)
+    ia_css_circbuf_t *cb)
 {
        OP___assert(cb);
        OP___assert(cb->desc);
@@ -338,8 +338,8 @@ static inline uint32_t ia_css_circbuf_get_free_elems(
  * @return the elements value.
  */
 uint32_t ia_css_circbuf_peek(
-       ia_css_circbuf_t *cb,
-       int offset);
+    ia_css_circbuf_t *cb,
+    int offset);
 
 /**
  * @brief Get an element in Circular Buffer.
@@ -350,8 +350,8 @@ uint32_t ia_css_circbuf_peek(
  * @return the elements value.
  */
 uint32_t ia_css_circbuf_peek_from_start(
-       ia_css_circbuf_t *cb,
-       int offset);
+    ia_css_circbuf_t *cb,
+    int offset);
 
 /**
  * @brief Increase Size of a Circular Buffer.
@@ -369,8 +369,8 @@ uint32_t ia_css_circbuf_peek_from_start(
  *                     false on failure
  */
 bool ia_css_circbuf_increase_size(
-               ia_css_circbuf_t *cb,
-               unsigned int sz_delta,
-               ia_css_circbuf_elem_t *elems);
+    ia_css_circbuf_t *cb,
+    unsigned int sz_delta,
+    ia_css_circbuf_elem_t *elems);
 
 #endif /*_IA_CSS_CIRCBUF_H */
index 8724e6098287978348c3cc3afc324902c3e5d1c7..47c488cec8adf3e951ec62f586999c7d7bd70a1c 100644 (file)
@@ -35,7 +35,7 @@
  *     - false when it is not empty.
  */
 static inline bool ia_css_circbuf_desc_is_empty(
-               ia_css_circbuf_desc_t *cb_desc)
+    ia_css_circbuf_desc_t *cb_desc)
 {
        OP___assert(cb_desc);
        return (cb_desc->end == cb_desc->start);
@@ -52,7 +52,7 @@ static inline bool ia_css_circbuf_desc_is_empty(
  *     - false when it is not full.
  */
 static inline bool ia_css_circbuf_desc_is_full(
-               ia_css_circbuf_desc_t *cb_desc)
+    ia_css_circbuf_desc_t *cb_desc)
 {
        OP___assert(cb_desc);
        return (OP_std_modadd(cb_desc->end, 1, cb_desc->size) == cb_desc->start);
@@ -65,8 +65,8 @@ static inline bool ia_css_circbuf_desc_is_full(
  * @param size         The size of the circular buffer
  */
 static inline void ia_css_circbuf_desc_init(
-       ia_css_circbuf_desc_t *cb_desc,
-       int8_t size)
+    ia_css_circbuf_desc_t *cb_desc,
+    int8_t size)
 {
        OP___assert(cb_desc);
        cb_desc->size = size;
@@ -82,9 +82,9 @@ static inline void ia_css_circbuf_desc_init(
  * @return the position in the circular buffer descriptor.
  */
 static inline uint8_t ia_css_circbuf_desc_get_pos_at_offset(
-       ia_css_circbuf_desc_t *cb_desc,
-       u32 base,
-       int offset)
+    ia_css_circbuf_desc_t *cb_desc,
+    u32 base,
+    int offset)
 {
        u8 dest;
 
@@ -115,9 +115,9 @@ static inline uint8_t ia_css_circbuf_desc_get_pos_at_offset(
  * @return the offset.
  */
 static inline int ia_css_circbuf_desc_get_offset(
-       ia_css_circbuf_desc_t *cb_desc,
-       u32 src_pos,
-       uint32_t dest_pos)
+    ia_css_circbuf_desc_t *cb_desc,
+    u32 src_pos,
+    uint32_t dest_pos)
 {
        int offset;
 
@@ -137,15 +137,15 @@ static inline int ia_css_circbuf_desc_get_offset(
  * @return The number of available elements.
  */
 static inline uint32_t ia_css_circbuf_desc_get_num_elems(
-               ia_css_circbuf_desc_t *cb_desc)
+    ia_css_circbuf_desc_t *cb_desc)
 {
        int num;
 
        OP___assert(cb_desc);
 
        num = ia_css_circbuf_desc_get_offset(cb_desc,
-                               cb_desc->start,
-                               cb_desc->end);
+                                            cb_desc->start,
+                                            cb_desc->end);
 
        return (uint32_t)num;
 }
@@ -158,15 +158,15 @@ static inline uint32_t ia_css_circbuf_desc_get_num_elems(
  * @return: The number of free elements.
  */
 static inline uint32_t ia_css_circbuf_desc_get_free_elems(
-               ia_css_circbuf_desc_t *cb_desc)
+    ia_css_circbuf_desc_t *cb_desc)
 {
        u32 num;
 
        OP___assert(cb_desc);
 
        num = ia_css_circbuf_desc_get_offset(cb_desc,
-                               cb_desc->start,
-                               cb_desc->end);
+                                            cb_desc->start,
+                                            cb_desc->end);
 
        return (cb_desc->size - num);
 }
index 1c48ceea72061ee0754e5cf2f37057d41cccb220..78e98268e1888b6486421c5beaa72b16161c111d 100644 (file)
@@ -45,8 +45,8 @@ ia_css_circbuf_read(ia_css_circbuf_t *cb);
  * @param chunk_dest The position to which the first element in the chunk would be shift.
  */
 static inline void ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb,
-                                                  u32 chunk_src,
-                                                  uint32_t chunk_dest);
+       u32 chunk_src,
+       uint32_t chunk_dest);
 
 /*
  * @brief Get the "val" field in the element.
@@ -69,8 +69,8 @@ ia_css_circbuf_elem_get_val(ia_css_circbuf_elem_t *elem);
  */
 void
 ia_css_circbuf_create(ia_css_circbuf_t *cb,
-                          ia_css_circbuf_elem_t *elems,
-                          ia_css_circbuf_desc_t *desc)
+                     ia_css_circbuf_elem_t *elems,
+                     ia_css_circbuf_desc_t *desc)
 {
        u32 i;
 
@@ -200,9 +200,9 @@ uint32_t ia_css_circbuf_peek_from_start(ia_css_circbuf_t *cb, int offset)
  * Please refer to "ia_css_circbuf.h" for details.
  */
 bool ia_css_circbuf_increase_size(
-                               ia_css_circbuf_t *cb,
-                               unsigned int sz_delta,
-                               ia_css_circbuf_elem_t *elems)
+    ia_css_circbuf_t *cb,
+    unsigned int sz_delta,
+    ia_css_circbuf_elem_t *elems)
 {
        u8 curr_size;
        u8 curr_end;
@@ -216,7 +216,8 @@ bool ia_css_circbuf_increase_size(
        /* We assume cb was pre defined as global to allow
         * increase in size */
        /* FM: are we sure this cannot cause size to become too big? */
-       if (((uint8_t)(cb->desc->size + (uint8_t)sz_delta) > cb->desc->size) && ((uint8_t)sz_delta == sz_delta))
+       if (((uint8_t)(cb->desc->size + (uint8_t)sz_delta) > cb->desc->size) &&
+           ((uint8_t)sz_delta == sz_delta))
                cb->desc->size += (uint8_t)sz_delta;
        else
                return false; /* overflow in size */
@@ -239,8 +240,8 @@ bool ia_css_circbuf_increase_size(
                } else {
                        /* Move elements and fix Start*/
                        ia_css_circbuf_shift_chunk(cb,
-                                               curr_size - 1,
-                                               curr_size + sz_delta - 1);
+                                                  curr_size - 1,
+                                                  curr_size + sz_delta - 1);
                }
        }
 
@@ -288,7 +289,7 @@ ia_css_circbuf_read(ia_css_circbuf_t *cb)
  */
 static inline void
 ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb,
-                               u32 chunk_src, uint32_t chunk_dest)
+                          u32 chunk_src, uint32_t chunk_dest)
 {
        int chunk_offset;
        int chunk_sz;
@@ -296,14 +297,14 @@ ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb,
 
        /* get the chunk offset and size */
        chunk_offset = ia_css_circbuf_get_offset(cb,
-                                                     chunk_src, chunk_dest);
+                      chunk_src, chunk_dest);
        chunk_sz = ia_css_circbuf_get_offset(cb, cb->desc->start, chunk_src) + 1;
 
        /* shift each element to its terminal position */
        for (i = 0; i < chunk_sz; i++) {
                /* copy the element from the source to the destination */
                ia_css_circbuf_elem_cpy(&cb->elems[chunk_src],
-                                            &cb->elems[chunk_dest]);
+                                       &cb->elems[chunk_dest]);
 
                /* clear the source position */
                ia_css_circbuf_elem_init(&cb->elems[chunk_src]);
@@ -314,5 +315,6 @@ ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb,
        }
 
        /* adjust the index "start" */
-       cb->desc->start = ia_css_circbuf_get_pos_at_offset(cb, cb->desc->start, chunk_offset);
+       cb->desc->start = ia_css_circbuf_get_pos_at_offset(cb, cb->desc->start,
+                         chunk_offset);
 }
index 7a0a03e7b988646ab7cff3f68add64441026b802..8cf3b0e0cc39456391c658e15328ac74ccf56f91 100644 (file)
@@ -69,7 +69,7 @@ bool ia_css_refcount_is_single(hrt_vaddress ptr);
  *  return                             None
  */
 void ia_css_refcount_clear(s32 id,
-                                 clear_func clear_func_ptr);
+                          clear_func clear_func_ptr);
 
 /*! \brief Function to verify if object is valid
  *
index 6fca1554dd0202fa1a34523047386c35a93e2798..97670fd9e078fa17af6a89909f21c9d6ecc26615 100644 (file)
@@ -38,7 +38,7 @@ struct ia_css_refcount_list {
 static struct ia_css_refcount_list myrefcount;
 
 static struct ia_css_refcount_entry *refcount_find_entry(hrt_vaddress ptr,
-                                                        bool firstfree)
+       bool firstfree)
 {
        u32 i;
 
@@ -143,7 +143,7 @@ hrt_vaddress ia_css_refcount_increment(s32 id, hrt_vaddress ptr)
 
        if (entry->id != id) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
-                           "ia_css_refcount_increment(): Ref count IDS do not match!\n");
+                                   "ia_css_refcount_increment(): Ref count IDS do not match!\n");
                return mmgr_NULL;
        }
 
@@ -193,7 +193,7 @@ bool ia_css_refcount_decrement(s32 id, hrt_vaddress ptr)
           valid anymore */
        if (entry)
                IA_CSS_ERROR("id %x, ptr 0x%x entry %p entry->id %x entry->count %d\n",
-                       id, ptr, entry, entry->id, entry->count);
+                            id, ptr, entry, entry->id, entry->count);
        else
                IA_CSS_ERROR("entry NULL\n");
 #ifdef ISP2401
index ba152c1e081248e7c257c76f747fd945c1736533..551e8d7c5003e80f8ca481c0179532fdc1b495f2 100644 (file)
  *
  */
 void ia_css_pipe_get_copy_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *copy_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *copy_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info);
 
 /* @brief Get a binary descriptor for vfpp.
  *
@@ -46,10 +46,10 @@ void ia_css_pipe_get_copy_binarydesc(
  *
  */
 void ia_css_pipe_get_vfpp_binarydesc(
-               struct ia_css_pipe const * const pipe,
-               struct ia_css_binary_descr *vf_pp_descr,
-               struct ia_css_frame_info *in_info,
-               struct ia_css_frame_info *out_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *vf_pp_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info);
 
 /* @brief Get numerator and denominator of bayer downscaling factor.
  *
@@ -63,9 +63,9 @@ void ia_css_pipe_get_vfpp_binarydesc(
  *
  */
 enum ia_css_err sh_css_bds_factor_get_numerator_denominator(
-       unsigned int bds_factor,
-       unsigned int *bds_factor_numerator,
-       unsigned int *bds_factor_denominator);
+    unsigned int bds_factor,
+    unsigned int *bds_factor_numerator,
+    unsigned int *bds_factor_denominator);
 
 /* @brief Get a binary descriptor for preview stage.
  *
@@ -79,12 +79,12 @@ enum ia_css_err sh_css_bds_factor_get_numerator_denominator(
  *
  */
 enum ia_css_err ia_css_pipe_get_preview_binarydesc(
-       struct ia_css_pipe * const pipe,
-       struct ia_css_binary_descr *preview_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *bds_out_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info);
+    struct ia_css_pipe *const pipe,
+    struct ia_css_binary_descr *preview_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *bds_out_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info);
 
 /* @brief Get a binary descriptor for video stage.
  *
@@ -97,13 +97,13 @@ enum ia_css_err ia_css_pipe_get_preview_binarydesc(
  *
  */
 enum ia_css_err ia_css_pipe_get_video_binarydesc(
-       struct ia_css_pipe * const pipe,
-       struct ia_css_binary_descr *video_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *bds_out_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info,
-       int stream_config_left_padding);
+    struct ia_css_pipe *const pipe,
+    struct ia_css_binary_descr *video_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *bds_out_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info,
+    int stream_config_left_padding);
 
 /* @brief Get a binary descriptor for yuv scaler stage.
  *
@@ -117,12 +117,12 @@ enum ia_css_err ia_css_pipe_get_video_binarydesc(
  *
  */
 void ia_css_pipe_get_yuvscaler_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *yuv_scaler_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *internal_out_info,
-       struct ia_css_frame_info *vf_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *yuv_scaler_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *internal_out_info,
+    struct ia_css_frame_info *vf_info);
 
 /* @brief Get a binary descriptor for capture pp stage.
  *
@@ -134,11 +134,11 @@ void ia_css_pipe_get_yuvscaler_binarydesc(
  *
  */
 void ia_css_pipe_get_capturepp_binarydesc(
-       struct ia_css_pipe * const pipe,
-       struct ia_css_binary_descr *capture_pp_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info);
+    struct ia_css_pipe *const pipe,
+    struct ia_css_binary_descr *capture_pp_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info);
 
 /* @brief Get a binary descriptor for primary capture.
  *
@@ -151,12 +151,12 @@ void ia_css_pipe_get_capturepp_binarydesc(
  *
  */
 void ia_css_pipe_get_primary_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *prim_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info,
-       unsigned int stage_idx);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *prim_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info,
+    unsigned int stage_idx);
 
 /* @brief Get a binary descriptor for pre gdc stage.
  *
@@ -168,10 +168,10 @@ void ia_css_pipe_get_primary_binarydesc(
  *
  */
 void ia_css_pipe_get_pre_gdc_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *gdc_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *gdc_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info);
 
 /* @brief Get a binary descriptor for gdc stage.
  *
@@ -183,10 +183,10 @@ void ia_css_pipe_get_pre_gdc_binarydesc(
  *
  */
 void ia_css_pipe_get_gdc_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *gdc_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *gdc_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info);
 
 /* @brief Get a binary descriptor for post gdc.
  *
@@ -199,11 +199,11 @@ void ia_css_pipe_get_gdc_binarydesc(
  *
  */
 void ia_css_pipe_get_post_gdc_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *post_gdc_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *post_gdc_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info);
 
 /* @brief Get a binary descriptor for de.
  *
@@ -215,10 +215,10 @@ void ia_css_pipe_get_post_gdc_binarydesc(
  *
  */
 void ia_css_pipe_get_pre_de_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *pre_de_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *pre_de_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info);
 
 /* @brief Get a binary descriptor for pre anr stage.
  *
@@ -230,10 +230,10 @@ void ia_css_pipe_get_pre_de_binarydesc(
  *
  */
 void ia_css_pipe_get_pre_anr_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *pre_anr_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *pre_anr_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info);
 
 /* @brief Get a binary descriptor for ANR stage.
  *
@@ -245,10 +245,10 @@ void ia_css_pipe_get_pre_anr_binarydesc(
  *
  */
 void ia_css_pipe_get_anr_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *anr_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *anr_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info);
 
 /* @brief Get a binary descriptor for post anr stage.
  *
@@ -261,11 +261,11 @@ void ia_css_pipe_get_anr_binarydesc(
  *
  */
 void ia_css_pipe_get_post_anr_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *post_anr_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *post_anr_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info);
 
 /* @brief Get a binary descriptor for ldc stage.
  *
@@ -277,10 +277,10 @@ void ia_css_pipe_get_post_anr_binarydesc(
  *
  */
 void ia_css_pipe_get_ldc_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *ldc_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info);
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *ldc_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info);
 
 /* @brief Calculates the required BDS factor
  *
@@ -290,8 +290,8 @@ void ia_css_pipe_get_ldc_binarydesc(
  * @return     IA_CSS_SUCCESS or error code upon error.
  */
 enum ia_css_err binarydesc_calculate_bds_factor(
-       struct ia_css_resolution input_res,
-       struct ia_css_resolution output_res,
-       unsigned int *bds_factor);
+    struct ia_css_resolution input_res,
+    struct ia_css_resolution output_res,
+    unsigned int *bds_factor);
 
 #endif /* __IA_CSS_PIPE_BINARYDESC_H__ */
index 92008ece64bafc0342ae527164a8ec1530b42cd2..e58c9190310d643d9ddd7000024f6825f931ed67 100644 (file)
 #include "ia_css_pipeline_common.h"
 
 void ia_css_pipe_get_generic_stage_desc(
-       struct ia_css_pipeline_stage_desc *stage_desc,
-       struct ia_css_binary *binary,
-       struct ia_css_frame *out_frame[],
-       struct ia_css_frame *in_frame,
-       struct ia_css_frame *vf_frame);
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_binary *binary,
+    struct ia_css_frame *out_frame[],
+    struct ia_css_frame *in_frame,
+    struct ia_css_frame *vf_frame);
 
 void ia_css_pipe_get_firmwares_stage_desc(
-       struct ia_css_pipeline_stage_desc *stage_desc,
-       struct ia_css_binary *binary,
-       struct ia_css_frame *out_frame[],
-       struct ia_css_frame *in_frame,
-       struct ia_css_frame *vf_frame,
-       const struct ia_css_fw_info *fw,
-       unsigned int mode);
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_binary *binary,
+    struct ia_css_frame *out_frame[],
+    struct ia_css_frame *in_frame,
+    struct ia_css_frame *vf_frame,
+    const struct ia_css_fw_info *fw,
+    unsigned int mode);
 
 void ia_css_pipe_get_acc_stage_desc(
-       struct ia_css_pipeline_stage_desc *stage_desc,
-       struct ia_css_binary *binary,
-       struct ia_css_fw_info *fw);
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_binary *binary,
+    struct ia_css_fw_info *fw);
 
 void ia_css_pipe_get_sp_func_stage_desc(
-       struct ia_css_pipeline_stage_desc *stage_desc,
-       struct ia_css_frame *out_frame,
-       enum ia_css_pipeline_stage_sp_func sp_func,
-       unsigned int max_input_width);
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_frame *out_frame,
+    enum ia_css_pipeline_stage_sp_func sp_func,
+    unsigned int max_input_width);
 
 #endif /*__IA_CSS_PIPE_STAGEDESC__H__ */
index d5035824f64fa8c90bb1e5d2d0e372ee207626c9..ad60210abe951b3cdd3bc4536a1063fbdb5043a6 100644 (file)
  *
  */
 unsigned int ia_css_pipe_util_pipe_input_format_bpp(
-       const struct ia_css_pipe * const pipe);
+    const struct ia_css_pipe *const pipe);
 
 void ia_css_pipe_util_create_output_frames(
-       struct ia_css_frame *frames[]);
+    struct ia_css_frame *frames[]);
 
 void ia_css_pipe_util_set_output_frames(
-       struct ia_css_frame *frames[],
-       unsigned int idx,
-       struct ia_css_frame *frame);
+    struct ia_css_frame *frames[],
+    unsigned int idx,
+    struct ia_css_frame *frame);
 
 #endif /* __IA_CSS_PIPE_UTIL_H__ */
index 46c23caea40f9535afe70c41788f993eaa37c0ce..e4f42cb75d5d82a5ec3e38cf486060413420df5a 100644 (file)
 
 /* Generic descriptor for offline binaries. Internal function. */
 static void pipe_binarydesc_get_offline(
-       struct ia_css_pipe const * const pipe,
-       const int mode,
-       struct ia_css_binary_descr *descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info[],
-       struct ia_css_frame_info *vf_info)
+    struct ia_css_pipe const *const pipe,
+    const int mode,
+    struct ia_css_binary_descr *descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info[],
+    struct ia_css_frame_info *vf_info)
 {
        unsigned int i;
        /* in_info, out_info, vf_info can be NULL */
@@ -77,11 +77,11 @@ static void pipe_binarydesc_get_offline(
 }
 
 void ia_css_pipe_get_copy_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *copy_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *copy_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info)
 {
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
        unsigned int i;
@@ -105,10 +105,10 @@ void ia_css_pipe_get_copy_binarydesc(
 }
 
 void ia_css_pipe_get_vfpp_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *vf_pp_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *vf_pp_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info)
 {
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
        unsigned int i;
@@ -123,7 +123,7 @@ void ia_css_pipe_get_vfpp_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_VF_PP,
-                              vf_pp_descr, in_info, out_infos, NULL);
+                                   vf_pp_descr, in_info, out_infos, NULL);
        vf_pp_descr->enable_fractional_ds = true;
        IA_CSS_LEAVE_PRIVATE("");
 }
@@ -144,9 +144,9 @@ static struct sh_css_bds_factor bds_factors_list[] = {
 };
 
 enum ia_css_err sh_css_bds_factor_get_numerator_denominator(
-       unsigned int bds_factor,
-       unsigned int *bds_factor_numerator,
-       unsigned int *bds_factor_denominator)
+    unsigned int bds_factor,
+    unsigned int *bds_factor_numerator,
+    unsigned int *bds_factor_denominator)
 {
        unsigned int i;
 
@@ -165,14 +165,14 @@ enum ia_css_err sh_css_bds_factor_get_numerator_denominator(
 }
 
 enum ia_css_err binarydesc_calculate_bds_factor(
-       struct ia_css_resolution input_res,
-       struct ia_css_resolution output_res,
-       unsigned int *bds_factor)
+    struct ia_css_resolution input_res,
+    struct ia_css_resolution output_res,
+    unsigned int *bds_factor)
 {
        unsigned int i;
        unsigned int in_w = input_res.width,
-           in_h = input_res.height,
-           out_w = output_res.width, out_h = output_res.height;
+                    in_h = input_res.height,
+                    out_w = output_res.width, out_h = output_res.height;
 
        unsigned int max_bds_factor = 8;
        unsigned int max_rounding_margin = 2;
@@ -191,9 +191,9 @@ enum ia_css_err binarydesc_calculate_bds_factor(
                /* See width-wise and height-wise if this bds_factor
                 * satisfies the condition */
                bool cond = (out_w * num / den + delta > in_w) &&
-                   (out_w * num / den <= in_w) &&
-                   (out_h * num / den + delta > in_h) &&
-                   (out_h * num / den <= in_h);
+                           (out_w * num / den <= in_w) &&
+                           (out_h * num / den + delta > in_h) &&
+                           (out_h * num / den <= in_h);
 
                if (cond) {
                        *bds_factor = bds_factors_list[i].bds_factor;
@@ -206,12 +206,12 @@ enum ia_css_err binarydesc_calculate_bds_factor(
 }
 
 enum ia_css_err ia_css_pipe_get_preview_binarydesc(
-       struct ia_css_pipe * const pipe,
-       struct ia_css_binary_descr *preview_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *bds_out_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info)
+    struct ia_css_pipe *const pipe,
+    struct ia_css_binary_descr *preview_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *bds_out_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info)
 {
        enum ia_css_err err;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -242,7 +242,7 @@ enum ia_css_err ia_css_pipe_get_preview_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, mode,
-                              preview_descr, in_info, out_infos, vf_info);
+                                   preview_descr, in_info, out_infos, vf_info);
        if (pipe->stream->config.online) {
                preview_descr->online = pipe->stream->config.online;
                preview_descr->two_ppc =
@@ -264,8 +264,8 @@ enum ia_css_err ia_css_pipe_get_preview_binarydesc(
                            pipe->config.bayer_ds_out_res.width;
                        err =
                            binarydesc_calculate_bds_factor(in_info->res,
-                                   bds_out_info->res,
-                                   &preview_descr->required_bds_factor);
+                                                           bds_out_info->res,
+                                                           &preview_descr->required_bds_factor);
                        if (err != IA_CSS_SUCCESS)
                                return err;
                } else {
@@ -325,13 +325,13 @@ enum ia_css_err ia_css_pipe_get_preview_binarydesc(
 }
 
 enum ia_css_err ia_css_pipe_get_video_binarydesc(
-       struct ia_css_pipe * const pipe,
-       struct ia_css_binary_descr *video_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *bds_out_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info,
-       int stream_config_left_padding)
+    struct ia_css_pipe *const pipe,
+    struct ia_css_binary_descr *video_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *bds_out_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info,
+    int stream_config_left_padding)
 {
        int mode = IA_CSS_BINARY_MODE_VIDEO;
        unsigned int i;
@@ -361,7 +361,7 @@ enum ia_css_err ia_css_pipe_get_video_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, mode,
-              video_descr, in_info, out_infos, vf_info);
+                                   video_descr, in_info, out_infos, vf_info);
 
        if (pipe->stream->config.online) {
                video_descr->online = pipe->stream->config.online;
@@ -377,7 +377,7 @@ enum ia_css_err ia_css_pipe_get_video_binarydesc(
                         HRT_GDC_N));
 
                video_descr->enable_dz = pipe->config.enable_dz
-                   || stream_dz_config;
+                                        || stream_dz_config;
                video_descr->dvs_env = pipe->config.dvs_envelope;
                video_descr->enable_yuv_ds = pipe->extra_config.enable_yuv_ds;
                video_descr->enable_high_speed =
@@ -390,12 +390,12 @@ enum ia_css_err ia_css_pipe_get_video_binarydesc(
                video_descr->enable_fractional_ds =
                    pipe->extra_config.enable_fractional_ds;
                video_descr->enable_dpc =
-                       pipe->config.enable_dpc;
+                   pipe->config.enable_dpc;
 #ifdef ISP2401
                video_descr->enable_luma_only =
-                       pipe->config.enable_luma_only;
+                   pipe->config.enable_luma_only;
                video_descr->enable_tnr =
-                       pipe->config.enable_tnr;
+                   pipe->config.enable_tnr;
 #endif
 
                if (pipe->extra_config.enable_raw_binning) {
@@ -408,7 +408,7 @@ enum ia_css_err ia_css_pipe_get_video_binarydesc(
                                bds_out_info->padded_width =
                                    pipe->config.bayer_ds_out_res.width;
                                err =
-                               binarydesc_calculate_bds_factor(
+                                   binarydesc_calculate_bds_factor(
                                        in_info->res, bds_out_info->res,
                                        &video_descr->required_bds_factor);
                                if (err != IA_CSS_SUCCESS)
@@ -450,12 +450,12 @@ enum ia_css_err ia_css_pipe_get_video_binarydesc(
 }
 
 void ia_css_pipe_get_yuvscaler_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *yuv_scaler_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *internal_out_info,
-       struct ia_css_frame_info *vf_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *yuv_scaler_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *internal_out_info,
+    struct ia_css_frame_info *vf_info)
 {
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
        struct ia_css_frame_info *this_vf_info = NULL;
@@ -481,24 +481,24 @@ void ia_css_pipe_get_yuvscaler_binarydesc(
 
        if (vf_info) {
                this_vf_info = (vf_info->res.width == 0 &&
-                       vf_info->res.height == 0) ? NULL : vf_info;
+                               vf_info->res.height == 0) ? NULL : vf_info;
        }
 
        pipe_binarydesc_get_offline(pipe,
-                              IA_CSS_BINARY_MODE_CAPTURE_PP,
-                              yuv_scaler_descr,
-                              in_info, out_infos, this_vf_info);
+                                   IA_CSS_BINARY_MODE_CAPTURE_PP,
+                                   yuv_scaler_descr,
+                                   in_info, out_infos, this_vf_info);
 
        yuv_scaler_descr->enable_fractional_ds = true;
        IA_CSS_LEAVE_PRIVATE("");
 }
 
 void ia_css_pipe_get_capturepp_binarydesc(
-       struct ia_css_pipe * const pipe,
-       struct ia_css_binary_descr *capture_pp_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info)
+    struct ia_css_pipe *const pipe,
+    struct ia_css_binary_descr *capture_pp_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info)
 {
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -523,15 +523,15 @@ void ia_css_pipe_get_capturepp_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe,
-                              IA_CSS_BINARY_MODE_CAPTURE_PP,
-                              capture_pp_descr,
-                              in_info, out_infos, vf_info);
+                                   IA_CSS_BINARY_MODE_CAPTURE_PP,
+                                   capture_pp_descr,
+                                   in_info, out_infos, vf_info);
 
        capture_pp_descr->enable_capture_pp_bli =
-               pipe->config.default_capture_config.enable_capture_pp_bli;
+           pipe->config.default_capture_config.enable_capture_pp_bli;
        capture_pp_descr->enable_fractional_ds = true;
        capture_pp_descr->enable_xnr =
-               pipe->config.default_capture_config.enable_xnr != 0;
+           pipe->config.default_capture_config.enable_xnr != 0;
        IA_CSS_LEAVE_PRIVATE("");
 }
 
@@ -546,12 +546,12 @@ static unsigned int primary_hq_binary_modes[NUM_PRIMARY_HQ_STAGES] = {
 };
 
 void ia_css_pipe_get_primary_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *prim_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info,
-       unsigned int stage_idx)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *prim_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info,
+    unsigned int stage_idx)
 {
        enum ia_css_pipe_version pipe_version = pipe->config.isp_pipe_version;
        int mode;
@@ -590,7 +590,7 @@ void ia_css_pipe_get_primary_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, mode,
-                              prim_descr, in_info, out_infos, vf_info);
+                                   prim_descr, in_info, out_infos, vf_info);
 
        if (pipe->stream->config.online &&
            pipe->stream->config.mode != IA_CSS_INPUT_MODE_MEMORY) {
@@ -605,7 +605,7 @@ void ia_css_pipe_get_primary_binarydesc(
                    pipe->extra_config.enable_fractional_ds;
 #ifdef ISP2401
                prim_descr->enable_luma_only =
-                       pipe->config.enable_luma_only;
+                   pipe->config.enable_luma_only;
 #endif
                /* We have both striped and non-striped primary binaries,
                 * if continuous viewfinder is required, then we must select
@@ -615,23 +615,24 @@ void ia_css_pipe_get_primary_binarydesc(
                        prim_descr->striped = false;
                else
 #ifndef ISP2401
-                       prim_descr->striped = prim_descr->continuous && (!pipe->stream->stop_copy_preview || !pipe->stream->disable_cont_vf);
+                       prim_descr->striped = prim_descr->continuous &&
+                                             (!pipe->stream->stop_copy_preview || !pipe->stream->disable_cont_vf);
 #else
                        prim_descr->striped = prim_descr->continuous && !pipe->stream->disable_cont_vf;
 
                if ((pipe->config.default_capture_config.enable_xnr != 0) &&
-                       (pipe->extra_config.enable_dvs_6axis == true))
-                               prim_descr->enable_xnr = true;
+                   (pipe->extra_config.enable_dvs_6axis == true))
+                       prim_descr->enable_xnr = true;
 #endif
        }
        IA_CSS_LEAVE_PRIVATE("");
 }
 
 void ia_css_pipe_get_pre_gdc_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *pre_gdc_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *pre_gdc_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info)
 {
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -649,16 +650,16 @@ void ia_css_pipe_get_pre_gdc_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_PRE_ISP,
-                              pre_gdc_descr, in_info, out_infos, NULL);
+                                   pre_gdc_descr, in_info, out_infos, NULL);
        pre_gdc_descr->isp_pipe_version = pipe->config.isp_pipe_version;
        IA_CSS_LEAVE_PRIVATE("");
 }
 
 void ia_css_pipe_get_gdc_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *gdc_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *gdc_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info)
 {
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -675,16 +676,16 @@ void ia_css_pipe_get_gdc_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_GDC,
-                              gdc_descr, in_info, out_infos, NULL);
+                                   gdc_descr, in_info, out_infos, NULL);
        IA_CSS_LEAVE_PRIVATE("");
 }
 
 void ia_css_pipe_get_post_gdc_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *post_gdc_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *post_gdc_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info)
 {
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -703,17 +704,17 @@ void ia_css_pipe_get_post_gdc_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_POST_ISP,
-                              post_gdc_descr, in_info, out_infos, vf_info);
+                                   post_gdc_descr, in_info, out_infos, vf_info);
 
        post_gdc_descr->isp_pipe_version = pipe->config.isp_pipe_version;
        IA_CSS_LEAVE_PRIVATE("");
 }
 
 void ia_css_pipe_get_pre_de_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *pre_de_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *pre_de_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info)
 {
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -732,10 +733,10 @@ void ia_css_pipe_get_pre_de_binarydesc(
 
        if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_1)
                pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_PRE_ISP,
-                                      pre_de_descr, in_info, out_infos, NULL);
+                                           pre_de_descr, in_info, out_infos, NULL);
        else if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_2_2) {
                pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_PRE_DE,
-                                      pre_de_descr, in_info, out_infos, NULL);
+                                           pre_de_descr, in_info, out_infos, NULL);
        }
 
        if (pipe->stream->config.online) {
@@ -749,10 +750,10 @@ void ia_css_pipe_get_pre_de_binarydesc(
 }
 
 void ia_css_pipe_get_pre_anr_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *pre_anr_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *pre_anr_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info)
 {
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -770,7 +771,7 @@ void ia_css_pipe_get_pre_anr_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_PRE_ISP,
-                              pre_anr_descr, in_info, out_infos, NULL);
+                                   pre_anr_descr, in_info, out_infos, NULL);
 
        if (pipe->stream->config.online) {
                pre_anr_descr->online = true;
@@ -783,10 +784,10 @@ void ia_css_pipe_get_pre_anr_binarydesc(
 }
 
 void ia_css_pipe_get_anr_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *anr_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *anr_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info)
 {
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -804,18 +805,18 @@ void ia_css_pipe_get_anr_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_ANR,
-                              anr_descr, in_info, out_infos, NULL);
+                                   anr_descr, in_info, out_infos, NULL);
 
        anr_descr->isp_pipe_version = pipe->config.isp_pipe_version;
        IA_CSS_LEAVE_PRIVATE("");
 }
 
 void ia_css_pipe_get_post_anr_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *post_anr_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *post_anr_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info)
 {
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -834,17 +835,17 @@ void ia_css_pipe_get_post_anr_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_POST_ISP,
-                              post_anr_descr, in_info, out_infos, vf_info);
+                                   post_anr_descr, in_info, out_infos, vf_info);
 
        post_anr_descr->isp_pipe_version = pipe->config.isp_pipe_version;
        IA_CSS_LEAVE_PRIVATE("");
 }
 
 void ia_css_pipe_get_ldc_binarydesc(
-       struct ia_css_pipe const * const pipe,
-       struct ia_css_binary_descr *ldc_descr,
-       struct ia_css_frame_info *in_info,
-       struct ia_css_frame_info *out_info)
+    struct ia_css_pipe const *const pipe,
+    struct ia_css_binary_descr *ldc_descr,
+    struct ia_css_frame_info *in_info,
+    struct ia_css_frame_info *out_info)
 {
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -871,8 +872,8 @@ void ia_css_pipe_get_ldc_binarydesc(
                out_infos[i] = NULL;
 
        pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_CAPTURE_PP,
-                              ldc_descr, in_info, out_infos, NULL);
+                                   ldc_descr, in_info, out_infos, NULL);
        ldc_descr->enable_dvs_6axis =
-                   pipe->extra_config.enable_dvs_6axis;
+           pipe->extra_config.enable_dvs_6axis;
        IA_CSS_LEAVE_PRIVATE("");
 }
index 8b42e86dd9a2b0226b28820221690a52f0fb2aa0..43f63cc20f49369a1f7db20adc88b983dc8f650b 100644 (file)
 #include "ia_css_debug.h"
 
 void ia_css_pipe_get_generic_stage_desc(
-       struct ia_css_pipeline_stage_desc *stage_desc,
-       struct ia_css_binary *binary,
-       struct ia_css_frame *out_frame[],
-       struct ia_css_frame *in_frame,
-       struct ia_css_frame *vf_frame)
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_binary *binary,
+    struct ia_css_frame *out_frame[],
+    struct ia_css_frame *in_frame,
+    struct ia_css_frame *vf_frame)
 {
        unsigned int i;
 
@@ -49,17 +49,18 @@ ERR:
 }
 
 void ia_css_pipe_get_firmwares_stage_desc(
-       struct ia_css_pipeline_stage_desc *stage_desc,
-       struct ia_css_binary *binary,
-       struct ia_css_frame *out_frame[],
-       struct ia_css_frame *in_frame,
-       struct ia_css_frame *vf_frame,
-       const struct ia_css_fw_info *fw,
-       unsigned int mode)
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_binary *binary,
+    struct ia_css_frame *out_frame[],
+    struct ia_css_frame *in_frame,
+    struct ia_css_frame *vf_frame,
+    const struct ia_css_fw_info *fw,
+    unsigned int mode)
 {
        unsigned int i;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_get_firmwares_stage_desc() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_pipe_get_firmwares_stage_desc() enter:\n");
        stage_desc->binary = binary;
        stage_desc->firmware = fw;
        stage_desc->sp_func = IA_CSS_PIPELINE_NO_FUNC;
@@ -73,13 +74,14 @@ void ia_css_pipe_get_firmwares_stage_desc(
 }
 
 void ia_css_pipe_get_acc_stage_desc(
-       struct ia_css_pipeline_stage_desc *stage_desc,
-       struct ia_css_binary *binary,
-       struct ia_css_fw_info *fw)
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_binary *binary,
+    struct ia_css_fw_info *fw)
 {
        unsigned int i;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_get_acc_stage_desc() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_pipe_get_acc_stage_desc() enter:\n");
        stage_desc->binary = binary;
        stage_desc->firmware = fw;
        stage_desc->sp_func = IA_CSS_PIPELINE_NO_FUNC;
@@ -93,14 +95,15 @@ void ia_css_pipe_get_acc_stage_desc(
 }
 
 void ia_css_pipe_get_sp_func_stage_desc(
-       struct ia_css_pipeline_stage_desc *stage_desc,
-       struct ia_css_frame *out_frame,
-       enum ia_css_pipeline_stage_sp_func sp_func,
-       unsigned int max_input_width)
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_frame *out_frame,
+    enum ia_css_pipeline_stage_sp_func sp_func,
+    unsigned int max_input_width)
 {
        unsigned int i;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_get_sp_func_stage_desc() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_pipe_get_sp_func_stage_desc() enter:\n");
        stage_desc->binary = NULL;
        stage_desc->firmware = NULL;
        stage_desc->sp_func = sp_func;
index 32bddb326ab8388cbb96cf934ce5b0261b042aea..cc063155072492903f1d6a7788b5090f57b6c4b6 100644 (file)
 #include "assert_support.h"
 
 unsigned int ia_css_pipe_util_pipe_input_format_bpp(
-       const struct ia_css_pipe * const pipe)
+    const struct ia_css_pipe *const pipe)
 {
        assert(pipe);
        assert(pipe->stream);
 
        return ia_css_util_input_format_bpp(pipe->stream->config.input_config.format,
-                         pipe->stream->config.pixels_per_clock == 2);
+                                           pipe->stream->config.pixels_per_clock == 2);
 }
 
 void ia_css_pipe_util_create_output_frames(
-       struct ia_css_frame *frames[])
+    struct ia_css_frame *frames[])
 {
        unsigned int i;
 
@@ -40,9 +40,9 @@ void ia_css_pipe_util_create_output_frames(
 }
 
 void ia_css_pipe_util_set_output_frames(
-       struct ia_css_frame *frames[],
-       unsigned int idx,
-       struct ia_css_frame *frame)
+    struct ia_css_frame *frames[],
+    unsigned int idx,
+    struct ia_css_frame *frame)
 {
        assert(idx < IA_CSS_BINARY_MAX_OUTPUT_PORTS);
 
index f7cebf085dca52e71b194d0a5ad1c39eac75435e..b09a0a009c08774dc366484a2bced9777be11c20 100644 (file)
@@ -29,7 +29,7 @@
  *
  */
 enum ia_css_err ia_css_convert_errno(
-       int in_err);
+    int in_err);
 
 /* @brief check vf frame info.
  *
@@ -38,7 +38,7 @@ enum ia_css_err ia_css_convert_errno(
  *
  */
 enum ia_css_err ia_css_util_check_vf_info(
-       const struct ia_css_frame_info * const info);
+    const struct ia_css_frame_info *const info);
 
 /* @brief check input configuration.
  *
@@ -48,9 +48,9 @@ enum ia_css_err ia_css_util_check_vf_info(
  *
  */
 enum ia_css_err ia_css_util_check_input(
-       const struct ia_css_stream_config * const stream_config,
-       bool must_be_raw,
-       bool must_be_yuv);
+    const struct ia_css_stream_config *const stream_config,
+    bool must_be_raw,
+    bool must_be_yuv);
 
 /* @brief check vf and out frame info.
  *
@@ -60,8 +60,8 @@ enum ia_css_err ia_css_util_check_input(
  *
  */
 enum ia_css_err ia_css_util_check_vf_out_info(
-       const struct ia_css_frame_info * const out_info,
-       const struct ia_css_frame_info * const vf_info);
+    const struct ia_css_frame_info *const out_info,
+    const struct ia_css_frame_info *const vf_info);
 
 /* @brief check width and height
  *
@@ -71,8 +71,8 @@ enum ia_css_err ia_css_util_check_vf_out_info(
  *
  */
 enum ia_css_err ia_css_util_check_res(
-       unsigned int width,
-       unsigned int height);
+    unsigned int width,
+    unsigned int height);
 
 #ifdef ISP2401
 /* @brief compare resolutions (less or equal)
@@ -84,8 +84,8 @@ enum ia_css_err ia_css_util_check_res(
  *
  */
 bool ia_css_util_res_leq(
-       struct ia_css_resolution a,
-       struct ia_css_resolution b);
+    struct ia_css_resolution a,
+    struct ia_css_resolution b);
 
 /**
  * @brief Check if resolution is zero
@@ -95,7 +95,7 @@ bool ia_css_util_res_leq(
  * @returns true if resolution is zero
  */
 bool ia_css_util_resolution_is_zero(
-               const struct ia_css_resolution resolution);
+    const struct ia_css_resolution resolution);
 
 /**
  * @brief Check if resolution is even
@@ -105,7 +105,7 @@ bool ia_css_util_resolution_is_zero(
  * @returns true if resolution is even
  */
 bool ia_css_util_resolution_is_even(
-               const struct ia_css_resolution resolution);
+    const struct ia_css_resolution resolution);
 
 #endif
 /* @brief check width and height
@@ -116,8 +116,8 @@ bool ia_css_util_resolution_is_even(
  *
  */
 unsigned int ia_css_util_input_format_bpp(
-       enum atomisp_input_format stream_format,
-       bool two_ppc);
+    enum atomisp_input_format stream_format,
+    bool two_ppc);
 
 /* @brief check if input format it raw
  *
@@ -126,7 +126,7 @@ unsigned int ia_css_util_input_format_bpp(
  *
  */
 bool ia_css_util_is_input_format_raw(
-       enum atomisp_input_format stream_format);
+    enum atomisp_input_format stream_format);
 
 /* @brief check if input format it yuv
  *
@@ -135,6 +135,6 @@ bool ia_css_util_is_input_format_raw(
  *
  */
 bool ia_css_util_is_input_format_yuv(
-       enum atomisp_input_format stream_format);
+    enum atomisp_input_format stream_format);
 
 #endif /* __IA_CSS_UTIL_H__ */
index f50198b32888f898b84c14a9037618292fb1e1ab..a44cd35acd0f3358eecb1099441e2005aa2e48d5 100644 (file)
 #include "ia_css_binary.h"
 
 enum ia_css_err ia_css_convert_errno(
-                               int in_err)
+    int in_err)
 {
        enum ia_css_err out_err;
 
        switch (in_err) {
-               case 0:
-                       out_err = IA_CSS_SUCCESS;
-                       break;
-               case EINVAL:
-                       out_err = IA_CSS_ERR_INVALID_ARGUMENTS;
-                       break;
-               case ENODATA:
-                       out_err = IA_CSS_ERR_QUEUE_IS_EMPTY;
-                       break;
-               case ENOSYS:
-               case ENOTSUP:
-                       out_err = IA_CSS_ERR_INTERNAL_ERROR;
-                       break;
-               case ENOBUFS:
-                       out_err = IA_CSS_ERR_QUEUE_IS_FULL;
-                       break;
-               default:
-                       out_err = IA_CSS_ERR_INTERNAL_ERROR;
-                       break;
+       case 0:
+               out_err = IA_CSS_SUCCESS;
+               break;
+       case EINVAL:
+               out_err = IA_CSS_ERR_INVALID_ARGUMENTS;
+               break;
+       case ENODATA:
+               out_err = IA_CSS_ERR_QUEUE_IS_EMPTY;
+               break;
+       case ENOSYS:
+       case ENOTSUP:
+               out_err = IA_CSS_ERR_INTERNAL_ERROR;
+               break;
+       case ENOBUFS:
+               out_err = IA_CSS_ERR_QUEUE_IS_FULL;
+               break;
+       default:
+               out_err = IA_CSS_ERR_INTERNAL_ERROR;
+               break;
        }
        return out_err;
 }
 
 /* MW: Table look-up ??? */
 unsigned int ia_css_util_input_format_bpp(
-       enum atomisp_input_format format,
-       bool two_ppc)
+    enum atomisp_input_format format,
+    bool two_ppc)
 {
        unsigned int rval = 0;
 
@@ -114,7 +114,7 @@ unsigned int ia_css_util_input_format_bpp(
 }
 
 enum ia_css_err ia_css_util_check_vf_info(
-       const struct ia_css_frame_info * const info)
+    const struct ia_css_frame_info *const info)
 {
        enum ia_css_err err;
        unsigned int max_vf_width;
@@ -130,8 +130,8 @@ enum ia_css_err ia_css_util_check_vf_info(
 }
 
 enum ia_css_err ia_css_util_check_vf_out_info(
-       const struct ia_css_frame_info * const out_info,
-       const struct ia_css_frame_info * const vf_info)
+    const struct ia_css_frame_info *const out_info,
+    const struct ia_css_frame_info *const vf_info)
 {
        enum ia_css_err err;
 
@@ -191,18 +191,18 @@ bool ia_css_util_is_input_format_raw(enum atomisp_input_format format)
 bool ia_css_util_is_input_format_yuv(enum atomisp_input_format format)
 {
        return format == ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY ||
-           format == ATOMISP_INPUT_FORMAT_YUV420_8  ||
-           format == ATOMISP_INPUT_FORMAT_YUV420_10 ||
-           format == ATOMISP_INPUT_FORMAT_YUV420_16 ||
-           format == ATOMISP_INPUT_FORMAT_YUV422_8  ||
-           format == ATOMISP_INPUT_FORMAT_YUV422_10 ||
-           format == ATOMISP_INPUT_FORMAT_YUV422_16;
+              format == ATOMISP_INPUT_FORMAT_YUV420_8  ||
+              format == ATOMISP_INPUT_FORMAT_YUV420_10 ||
+              format == ATOMISP_INPUT_FORMAT_YUV420_16 ||
+              format == ATOMISP_INPUT_FORMAT_YUV422_8  ||
+              format == ATOMISP_INPUT_FORMAT_YUV422_10 ||
+              format == ATOMISP_INPUT_FORMAT_YUV422_16;
 }
 
 enum ia_css_err ia_css_util_check_input(
-       const struct ia_css_stream_config * const stream_config,
-       bool must_be_raw,
-       bool must_be_yuv)
+    const struct ia_css_stream_config *const stream_config,
+    bool must_be_raw,
+    bool must_be_yuv)
 {
        assert(stream_config);
 
index de99359a0fbcbe3bc1af0dc96e1a5e3e85714489..9fae24b3e689f58e5938cdf7aa440e33e371cce2 100644 (file)
 
 void
 ia_css_configure_iterator(
-       const struct ia_css_binary *binary,
-       const struct ia_css_iterator_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_iterator_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_iterator() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -39,20 +40,23 @@ ia_css_configure_iterator(
                }
                if (size) {
                        ia_css_iterator_config((struct sh_css_isp_iterator_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                              &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                              config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_iterator() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_copy_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_copy_output_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_copy_output_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_copy_output() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -64,20 +68,23 @@ ia_css_configure_copy_output(
                }
                if (size) {
                        ia_css_copy_output_config((struct sh_css_isp_copy_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                                 &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                                 config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_copy_output() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_crop(
-       const struct ia_css_binary *binary,
-       const struct ia_css_crop_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_crop_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_crop() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -89,20 +96,23 @@ ia_css_configure_crop(
                }
                if (size) {
                        ia_css_crop_config((struct sh_css_isp_crop_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                          &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                          config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_crop() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_fpn(
-       const struct ia_css_binary *binary,
-       const struct ia_css_fpn_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_fpn_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_fpn() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -114,20 +124,23 @@ ia_css_configure_fpn(
                }
                if (size) {
                        ia_css_fpn_config((struct sh_css_isp_fpn_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_fpn() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_dvs(
-       const struct ia_css_binary *binary,
-       const struct ia_css_dvs_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_dvs_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_dvs() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -139,20 +152,23 @@ ia_css_configure_dvs(
                }
                if (size) {
                        ia_css_dvs_config((struct sh_css_isp_dvs_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_dvs() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_qplane(
-       const struct ia_css_binary *binary,
-       const struct ia_css_qplane_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_qplane_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_qplane() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -164,20 +180,23 @@ ia_css_configure_qplane(
                }
                if (size) {
                        ia_css_qplane_config((struct sh_css_isp_qplane_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                            &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                            config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_qplane() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output0(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output0_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_output0_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output0() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -189,20 +208,23 @@ ia_css_configure_output0(
                }
                if (size) {
                        ia_css_output0_config((struct sh_css_isp_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                             config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output0() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output1(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output1_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_output1_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output1() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -214,20 +236,23 @@ ia_css_configure_output1(
                }
                if (size) {
                        ia_css_output1_config((struct sh_css_isp_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                             config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output1() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_output_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -239,10 +264,12 @@ ia_css_configure_output(
                }
                if (size) {
                        ia_css_output_config((struct sh_css_isp_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                            &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                            config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
@@ -250,10 +277,11 @@ ia_css_configure_output(
 
 void
 ia_css_configure_sc(
-       const struct ia_css_binary *binary,
-       const struct ia_css_sc_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_sc_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_sc() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -265,10 +293,12 @@ ia_css_configure_sc(
                }
                if (size) {
                        ia_css_sc_config((struct sh_css_isp_sc_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                        &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                        config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_sc() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
@@ -276,10 +306,11 @@ ia_css_configure_sc(
 
 void
 ia_css_configure_raw(
-       const struct ia_css_binary *binary,
-       const struct ia_css_raw_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_raw_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_raw() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -291,20 +322,23 @@ ia_css_configure_raw(
                }
                if (size) {
                        ia_css_raw_config((struct sh_css_isp_raw_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_raw() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_tnr(
-       const struct ia_css_binary *binary,
-       const struct ia_css_tnr_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_tnr_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_tnr() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -316,20 +350,23 @@ ia_css_configure_tnr(
                }
                if (size) {
                        ia_css_tnr_config((struct sh_css_isp_tnr_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_tnr() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_ref(
-       const struct ia_css_binary *binary,
-       const struct ia_css_ref_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_ref_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_ref() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -341,20 +378,23 @@ ia_css_configure_ref(
                }
                if (size) {
                        ia_css_ref_config((struct sh_css_isp_ref_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_ref() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_vf(
-       const struct ia_css_binary *binary,
-       const struct ia_css_vf_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_vf_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_vf() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -366,8 +406,10 @@ ia_css_configure_vf(
                }
                if (size) {
                        ia_css_vf_config((struct sh_css_isp_vf_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                        &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                        config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_vf() leave:\n");
 }
index 8aacd3dbc05a5263063f91a016f10329c24e61d9..451fbae02aee05511767a56b5b17d2498d08543a 100644 (file)
@@ -88,101 +88,101 @@ struct ia_css_config_memory_offsets {
 
 void
 ia_css_configure_iterator(
-       const struct ia_css_binary *binary,
-       const struct ia_css_iterator_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_iterator_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_copy_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_copy_output_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_copy_output_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_crop(
-       const struct ia_css_binary *binary,
-       const struct ia_css_crop_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_crop_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_fpn(
-       const struct ia_css_binary *binary,
-       const struct ia_css_fpn_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_fpn_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_dvs(
-       const struct ia_css_binary *binary,
-       const struct ia_css_dvs_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_dvs_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_qplane(
-       const struct ia_css_binary *binary,
-       const struct ia_css_qplane_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_qplane_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output0(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output0_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_output0_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output1(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output1_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_output1_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_output_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 #ifdef ISP2401
 void
 ia_css_configure_sc(
-       const struct ia_css_binary *binary,
-       const struct ia_css_sc_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_sc_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 #endif
 void
 ia_css_configure_raw(
-       const struct ia_css_binary *binary,
-       const struct ia_css_raw_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_raw_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_tnr(
-       const struct ia_css_binary *binary,
-       const struct ia_css_tnr_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_tnr_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_ref(
-       const struct ia_css_binary *binary,
-       const struct ia_css_ref_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_ref_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_vf(
-       const struct ia_css_binary *binary,
-       const struct ia_css_vf_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_vf_configuration *config_dmem);
 
 #endif /* IA_CSS_INCLUDE_CONFIGURATION */
 
index ebf69c43e645c15502adba6bbc38e441fbb90de6..28be9146530ad3b3981727d19a7bcf07a76ac371 100644 (file)
 
 static void
 ia_css_process_aa(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
-       unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
-       unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
+       unsigned int size   =
+           stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
+       unsigned int offset =
+           stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
 
        if (size) {
                struct sh_css_isp_aa_params *t =  (struct sh_css_isp_aa_params *)
-                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+                                                 &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                t->strength = params->aa_config.strength;
        }
        params->isp_params_changed = true;
-       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+           true;
 }
 
 /* Code generated by genparam/gencode.c:gen_process_function() */
 
 static void
 ia_css_process_anr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr() enter:\n");
 
                        ia_css_anr_encode((struct sh_css_isp_anr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->anr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->anr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr() leave:\n");
                }
        }
 }
@@ -116,28 +124,33 @@ size);
 
 static void
 ia_css_process_anr2(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr2() enter:\n");
 
                        ia_css_anr2_vmem_encode((struct ia_css_isp_anr2_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->anr_thres,
-size);
+                                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                               &params->anr_thres,
+                                               size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr2() leave:\n");
                }
        }
 }
@@ -146,38 +159,43 @@ size);
 
 static void
 ia_css_process_bh(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
 
                        ia_css_bh_encode((struct sh_css_isp_bh_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->s3a_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->s3a_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
 
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
@@ -188,28 +206,33 @@ size);
 
 static void
 ia_css_process_cnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_cnr() enter:\n");
 
                        ia_css_cnr_encode((struct sh_css_isp_cnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->cnr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->cnr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_cnr() leave:\n");
                }
        }
 }
@@ -218,28 +241,33 @@ size);
 
 static void
 ia_css_process_crop(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_crop() enter:\n");
 
                        ia_css_crop_encode((struct sh_css_isp_crop_isp_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->crop_config,
-size);
+                                          &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                          &params->crop_config,
+                                          size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_crop() leave:\n");
                }
        }
 }
@@ -248,28 +276,33 @@ size);
 
 static void
 ia_css_process_csc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_csc() enter:\n");
 
                        ia_css_csc_encode((struct sh_css_isp_csc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->cc_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->cc_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_csc() leave:\n");
                }
        }
 }
@@ -278,26 +311,29 @@ size);
 
 static void
 ia_css_process_dp(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() enter:\n");
 
                        ia_css_dp_encode((struct sh_css_isp_dp_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dp_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->dp_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() leave:\n");
                }
@@ -308,28 +344,33 @@ size);
 
 static void
 ia_css_process_bnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bnr() enter:\n");
 
                        ia_css_bnr_encode((struct sh_css_isp_bnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->nr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->nr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bnr() leave:\n");
                }
        }
 }
@@ -338,26 +379,29 @@ size);
 
 static void
 ia_css_process_de(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() enter:\n");
 
                        ia_css_de_encode((struct sh_css_isp_de_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->de_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->de_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() leave:\n");
                }
@@ -368,28 +412,33 @@ size);
 
 static void
 ia_css_process_ecd(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ecd() enter:\n");
 
                        ia_css_ecd_encode((struct sh_css_isp_ecd_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ecd_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->ecd_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ecd() leave:\n");
                }
        }
 }
@@ -398,28 +447,33 @@ size);
 
 static void
 ia_css_process_formats(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_formats() enter:\n");
 
                        ia_css_formats_encode((struct sh_css_isp_formats_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->formats_config,
-size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                             &params->formats_config,
+                                             size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_formats() leave:\n");
                }
        }
 }
@@ -428,28 +482,33 @@ size);
 
 static void
 ia_css_process_fpn(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_fpn() enter:\n");
 
                        ia_css_fpn_encode((struct sh_css_isp_fpn_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->fpn_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->fpn_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_fpn() leave:\n");
                }
        }
 }
@@ -458,44 +517,50 @@ size);
 
 static void
 ia_css_process_gc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
 
                        ia_css_gc_encode((struct sh_css_isp_gc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->gc_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->gc_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
 
                        ia_css_gc_vamem_encode((struct sh_css_isp_gc_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
-                                       &params->gc_table,
-size);
+                                              &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+                                              &params->gc_table,
+                                              size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
@@ -506,26 +571,29 @@ size);
 
 static void
 ia_css_process_ce(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() enter:\n");
 
                        ia_css_ce_encode((struct sh_css_isp_ce_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ce_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->ce_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() leave:\n");
                }
@@ -536,28 +604,33 @@ size);
 
 static void
 ia_css_process_yuv2rgb(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yuv2rgb() enter:\n");
 
                        ia_css_yuv2rgb_encode((struct sh_css_isp_csc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->yuv2rgb_cc_config,
-size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                             &params->yuv2rgb_cc_config,
+                                             size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yuv2rgb() leave:\n");
                }
        }
 }
@@ -566,28 +639,33 @@ size);
 
 static void
 ia_css_process_rgb2yuv(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_rgb2yuv() enter:\n");
 
                        ia_css_rgb2yuv_encode((struct sh_css_isp_csc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->rgb2yuv_cc_config,
-size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                             &params->rgb2yuv_cc_config,
+                                             size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_rgb2yuv() leave:\n");
                }
        }
 }
@@ -596,28 +674,33 @@ size);
 
 static void
 ia_css_process_r_gamma(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_r_gamma() enter:\n");
 
                        ia_css_r_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
-                                       &params->r_gamma_table,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+                                                   &params->r_gamma_table,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_r_gamma() leave:\n");
                }
        }
 }
@@ -626,28 +709,33 @@ size);
 
 static void
 ia_css_process_g_gamma(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_g_gamma() enter:\n");
 
                        ia_css_g_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
-                                       &params->g_gamma_table,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+                                                   &params->g_gamma_table,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_g_gamma() leave:\n");
                }
        }
 }
@@ -656,28 +744,33 @@ size);
 
 static void
 ia_css_process_b_gamma(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_b_gamma() enter:\n");
 
                        ia_css_b_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
-                                       &params->b_gamma_table,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
+                                                   &params->b_gamma_table,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_b_gamma() leave:\n");
                }
        }
 }
@@ -686,31 +779,36 @@ size);
 
 static void
 ia_css_process_uds(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
 
                if (size) {
                        struct sh_css_sp_uds_params *p;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_uds() enter:\n");
 
                        p = (struct sh_css_sp_uds_params *)
-                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+                           &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                        p->crop_pos = params->uds_config.crop_pos;
                        p->uds = params->uds_config.uds;
 
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_uds() leave:\n");
                }
        }
 }
@@ -719,28 +817,33 @@ ia_css_process_uds(
 
 static void
 ia_css_process_raa(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_raa() enter:\n");
 
                        ia_css_raa_encode((struct sh_css_isp_aa_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->raa_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->raa_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_raa() leave:\n");
                }
        }
 }
@@ -749,28 +852,33 @@ size);
 
 static void
 ia_css_process_s3a(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_s3a() enter:\n");
 
                        ia_css_s3a_encode((struct sh_css_isp_s3a_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->s3a_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->s3a_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_s3a() leave:\n");
                }
        }
 }
@@ -779,44 +887,50 @@ size);
 
 static void
 ia_css_process_ob(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
 
                        ia_css_ob_encode((struct sh_css_isp_ob_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ob_config,
-&params->stream_configs.ob, size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->ob_config,
+                                        &params->stream_configs.ob, size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
 
                        ia_css_ob_vmem_encode((struct sh_css_isp_ob_vmem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->ob_config,
-&params->stream_configs.ob, size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                             &params->ob_config,
+                                             &params->stream_configs.ob, size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
@@ -827,28 +941,33 @@ ia_css_process_ob(
 
 static void
 ia_css_process_output(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_output() enter:\n");
 
                        ia_css_output_encode((struct sh_css_isp_output_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->output_config,
-size);
+                                            &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                            &params->output_config,
+                                            size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_output() leave:\n");
                }
        }
 }
@@ -857,26 +976,29 @@ size);
 
 static void
 ia_css_process_sc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() enter:\n");
 
                        ia_css_sc_encode((struct sh_css_isp_sc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->sc_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->sc_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() leave:\n");
                }
@@ -887,30 +1009,35 @@ size);
 
 static void
 ia_css_process_bds(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
 
                if (size) {
                        struct sh_css_isp_bds_params *p;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bds() enter:\n");
 
                        p = (struct sh_css_isp_bds_params *)
-                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+                           &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                        p->baf_strength = params->bds_config.strength;
 
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bds() leave:\n");
                }
        }
 }
@@ -919,28 +1046,33 @@ ia_css_process_bds(
 
 static void
 ia_css_process_tnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_tnr() enter:\n");
 
                        ia_css_tnr_encode((struct sh_css_isp_tnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->tnr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->tnr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_tnr() leave:\n");
                }
        }
 }
@@ -949,28 +1081,33 @@ size);
 
 static void
 ia_css_process_macc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_macc() enter:\n");
 
                        ia_css_macc_encode((struct sh_css_isp_macc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->macc_config,
-size);
+                                          &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                          &params->macc_config,
+                                          size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_macc() leave:\n");
                }
        }
 }
@@ -979,28 +1116,33 @@ size);
 
 static void
 ia_css_process_sdis_horicoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horicoef() enter:\n");
 
                        ia_css_sdis_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                        &params->dvs_coefs,
+                                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horicoef() leave:\n");
                }
        }
 }
@@ -1009,28 +1151,33 @@ size);
 
 static void
 ia_css_process_sdis_vertcoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertcoef() enter:\n");
 
                        ia_css_sdis_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                        &params->dvs_coefs,
+                                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertcoef() leave:\n");
                }
        }
 }
@@ -1039,28 +1186,33 @@ size);
 
 static void
 ia_css_process_sdis_horiproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horiproj() enter:\n");
 
                        ia_css_sdis_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                   &params->dvs_coefs,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horiproj() leave:\n");
                }
        }
 }
@@ -1069,28 +1221,33 @@ size);
 
 static void
 ia_css_process_sdis_vertproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertproj() enter:\n");
 
                        ia_css_sdis_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                   &params->dvs_coefs,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertproj() leave:\n");
                }
        }
 }
@@ -1099,28 +1256,33 @@ size);
 
 static void
 ia_css_process_sdis2_horicoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horicoef() enter:\n");
 
                        ia_css_sdis2_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                         &params->dvs2_coefs,
+                                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horicoef() leave:\n");
                }
        }
 }
@@ -1129,28 +1291,33 @@ size);
 
 static void
 ia_css_process_sdis2_vertcoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertcoef() enter:\n");
 
                        ia_css_sdis2_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                         &params->dvs2_coefs,
+                                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertcoef() leave:\n");
                }
        }
 }
@@ -1159,28 +1326,33 @@ size);
 
 static void
 ia_css_process_sdis2_horiproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horiproj() enter:\n");
 
                        ia_css_sdis2_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                    &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                    &params->dvs2_coefs,
+                                                    size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horiproj() leave:\n");
                }
        }
 }
@@ -1189,28 +1361,33 @@ size);
 
 static void
 ia_css_process_sdis2_vertproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertproj() enter:\n");
 
                        ia_css_sdis2_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                    &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                    &params->dvs2_coefs,
+                                                    size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertproj() leave:\n");
                }
        }
 }
@@ -1219,26 +1396,29 @@ size);
 
 static void
 ia_css_process_wb(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() enter:\n");
 
                        ia_css_wb_encode((struct sh_css_isp_wb_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->wb_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->wb_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() leave:\n");
                }
@@ -1249,26 +1429,29 @@ size);
 
 static void
 ia_css_process_nr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() enter:\n");
 
                        ia_css_nr_encode((struct sh_css_isp_ynr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->nr_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->nr_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() leave:\n");
                }
@@ -1279,28 +1462,33 @@ size);
 
 static void
 ia_css_process_yee(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yee() enter:\n");
 
                        ia_css_yee_encode((struct sh_css_isp_yee_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->yee_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->yee_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yee() leave:\n");
                }
        }
 }
@@ -1309,28 +1497,33 @@ size);
 
 static void
 ia_css_process_ynr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ynr() enter:\n");
 
                        ia_css_ynr_encode((struct sh_css_isp_yee2_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ynr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->ynr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ynr() leave:\n");
                }
        }
 }
@@ -1339,26 +1532,29 @@ size);
 
 static void
 ia_css_process_fc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() enter:\n");
 
                        ia_css_fc_encode((struct sh_css_isp_fc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->fc_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->fc_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() leave:\n");
                }
@@ -1369,46 +1565,56 @@ size);
 
 static void
 ia_css_process_ctc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() enter:\n");
 
                        ia_css_ctc_encode((struct sh_css_isp_ctc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ctc_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->ctc_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() enter:\n");
 
                        ia_css_ctc_vamem_encode((struct sh_css_isp_ctc_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
-                                       &params->ctc_table,
-size);
+                                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+                                               &params->ctc_table,
+                                               size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() leave:\n");
                }
        }
 }
@@ -1417,28 +1623,33 @@ size);
 
 static void
 ia_css_process_xnr_table(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr_table() enter:\n");
 
                        ia_css_xnr_table_vamem_encode((struct sh_css_isp_xnr_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
-                                       &params->xnr_table,
-size);
+                                                     &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+                                                     &params->xnr_table,
+                                                     size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr_table() leave:\n");
                }
        }
 }
@@ -1447,28 +1658,33 @@ size);
 
 static void
 ia_css_process_xnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr() enter:\n");
 
                        ia_css_xnr_encode((struct sh_css_isp_xnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->xnr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->xnr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr() leave:\n");
                }
        }
 }
@@ -1477,47 +1693,57 @@ size);
 
 static void
 ia_css_process_xnr3(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() enter:\n");
 
                        ia_css_xnr3_encode((struct sh_css_isp_xnr3_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->xnr3_config,
-size);
+                                          &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                          &params->xnr3_config,
+                                          size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() leave:\n");
                }
        }
 #ifdef ISP2401
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() enter:\n");
 
                        ia_css_xnr3_vmem_encode((struct sh_css_isp_xnr3_vmem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->xnr3_config,
-size);
+                                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                               &params->xnr3_config,
+                                               size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() leave:\n");
                }
        }
 #endif
@@ -1526,9 +1752,9 @@ size);
 /* Code generated by genparam/gencode.c:gen_param_process_table() */
 
 void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
-                       unsigned int pipe_id,
-                       const struct ia_css_pipeline_stage *stage,
-                       struct ia_css_isp_parameters *params) = {
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params) = {
        ia_css_process_aa,
        ia_css_process_anr,
        ia_css_process_anr2,
@@ -1581,17 +1807,20 @@ void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
 
 static void
 ia_css_get_dp_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dp_config *config){
+                    struct ia_css_dp_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_dp_config() enter: config=%p\n",
+                           config);
 
        *config = params->dp_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_dp_config() leave\n");
        ia_css_dp_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1599,7 +1828,7 @@ ia_css_get_dp_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_dp_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dp_config *config)
+                    const struct ia_css_dp_config *config)
 {
        if (!config)
                return;
@@ -1613,24 +1842,28 @@ ia_css_set_dp_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_DP_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_dp_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_dp_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_wb_config *config){
+                    struct ia_css_wb_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_wb_config() enter: config=%p\n",
+                           config);
 
        *config = params->wb_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_wb_config() leave\n");
        ia_css_wb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1638,7 +1871,7 @@ ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_wb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_wb_config *config)
+                    const struct ia_css_wb_config *config)
 {
        if (!config)
                return;
@@ -1652,24 +1885,28 @@ ia_css_set_wb_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_WB_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_wb_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_wb_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_tnr_config *config){
+                     struct ia_css_tnr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_tnr_config() enter: config=%p\n",
+                           config);
 
        *config = params->tnr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_tnr_config() leave\n");
        ia_css_tnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1677,7 +1914,7 @@ ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_tnr_config *config)
+                     const struct ia_css_tnr_config *config)
 {
        if (!config)
                return;
@@ -1691,24 +1928,28 @@ ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_TNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_tnr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_tnr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ob_config *config){
+                    struct ia_css_ob_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ob_config() enter: config=%p\n",
+                           config);
 
        *config = params->ob_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ob_config() leave\n");
        ia_css_ob_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1716,7 +1957,7 @@ ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ob_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ob_config *config)
+                    const struct ia_css_ob_config *config)
 {
        if (!config)
                return;
@@ -1730,24 +1971,28 @@ ia_css_set_ob_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_OB_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ob_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ob_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_de_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_de_config *config){
+                    struct ia_css_de_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_de_config() enter: config=%p\n",
+                           config);
 
        *config = params->de_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_de_config() leave\n");
        ia_css_de_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1755,7 +2000,7 @@ ia_css_get_de_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_de_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_de_config *config)
+                    const struct ia_css_de_config *config)
 {
        if (!config)
                return;
@@ -1769,24 +2014,28 @@ ia_css_set_de_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_DE_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_de_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_de_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_anr_config *config){
+                     struct ia_css_anr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr_config() enter: config=%p\n",
+                           config);
 
        *config = params->anr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr_config() leave\n");
        ia_css_anr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1794,7 +2043,7 @@ ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_anr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_config *config)
+                     const struct ia_css_anr_config *config)
 {
        if (!config)
                return;
@@ -1808,24 +2057,28 @@ ia_css_set_anr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_ANR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_anr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_anr_thres *config){
+                      struct ia_css_anr_thres *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr2_config() enter: config=%p\n",
+                           config);
 
        *config = params->anr_thres;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr2_config() leave\n");
        ia_css_anr2_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1833,7 +2086,7 @@ ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_thres *config)
+                      const struct ia_css_anr_thres *config)
 {
        if (!config)
                return;
@@ -1847,24 +2100,28 @@ ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_ANR2_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr2_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_anr2_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ce_config *config){
+                    struct ia_css_ce_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ce_config() enter: config=%p\n",
+                           config);
 
        *config = params->ce_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ce_config() leave\n");
        ia_css_ce_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1872,7 +2129,7 @@ ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ce_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ce_config *config)
+                    const struct ia_css_ce_config *config)
 {
        if (!config)
                return;
@@ -1886,24 +2143,28 @@ ia_css_set_ce_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CE_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ce_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ce_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ecd_config *config){
+                     struct ia_css_ecd_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ecd_config() enter: config=%p\n",
+                           config);
 
        *config = params->ecd_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ecd_config() leave\n");
        ia_css_ecd_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1911,7 +2172,7 @@ ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ecd_config *config)
+                     const struct ia_css_ecd_config *config)
 {
        if (!config)
                return;
@@ -1925,24 +2186,28 @@ ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_ECD_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ecd_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ecd_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ynr_config *config){
+                     struct ia_css_ynr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ynr_config() enter: config=%p\n",
+                           config);
 
        *config = params->ynr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ynr_config() leave\n");
        ia_css_ynr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1950,7 +2215,7 @@ ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ynr_config *config)
+                     const struct ia_css_ynr_config *config)
 {
        if (!config)
                return;
@@ -1964,24 +2229,28 @@ ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_YNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ynr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ynr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_fc_config *config){
+                    struct ia_css_fc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_fc_config() enter: config=%p\n",
+                           config);
 
        *config = params->fc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_fc_config() leave\n");
        ia_css_fc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1989,7 +2258,7 @@ ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_fc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_fc_config *config)
+                    const struct ia_css_fc_config *config)
 {
        if (!config)
                return;
@@ -2003,24 +2272,28 @@ ia_css_set_fc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_FC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_fc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_fc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cnr_config *config){
+                     struct ia_css_cnr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_cnr_config() enter: config=%p\n",
+                           config);
 
        *config = params->cnr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_cnr_config() leave\n");
        ia_css_cnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2028,7 +2301,7 @@ ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cnr_config *config)
+                     const struct ia_css_cnr_config *config)
 {
        if (!config)
                return;
@@ -2042,24 +2315,28 @@ ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_cnr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_cnr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_macc_config *config){
+                      struct ia_css_macc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_macc_config() enter: config=%p\n",
+                           config);
 
        *config = params->macc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_macc_config() leave\n");
        ia_css_macc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2067,7 +2344,7 @@ ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_macc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_macc_config *config)
+                      const struct ia_css_macc_config *config)
 {
        if (!config)
                return;
@@ -2081,24 +2358,28 @@ ia_css_set_macc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_MACC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_macc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_macc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ctc_config *config){
+                     struct ia_css_ctc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ctc_config() enter: config=%p\n",
+                           config);
 
        *config = params->ctc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ctc_config() leave\n");
        ia_css_ctc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2106,7 +2387,7 @@ ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ctc_config *config)
+                     const struct ia_css_ctc_config *config)
 {
        if (!config)
                return;
@@ -2120,31 +2401,35 @@ ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CTC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ctc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ctc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_aa_config *config){
+                    struct ia_css_aa_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_aa_config() enter: config=%p\n",
+                           config);
 
        *config = params->aa_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_aa_config() leave\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_aa_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_aa_config *config)
+                    const struct ia_css_aa_config *config)
 {
        if (!config)
                return;
@@ -2157,24 +2442,28 @@ ia_css_set_aa_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_AA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_aa_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_aa_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cc_config *config){
+                         struct ia_css_cc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_yuv2rgb_config() enter: config=%p\n",
+                           config);
 
        *config = params->yuv2rgb_cc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_yuv2rgb_config() leave\n");
        ia_css_yuv2rgb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2182,7 +2471,7 @@ ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config)
+                         const struct ia_css_cc_config *config)
 {
        if (!config)
                return;
@@ -2196,24 +2485,28 @@ ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_YUV2RGB_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_yuv2rgb_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_yuv2rgb_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cc_config *config){
+                         struct ia_css_cc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_rgb2yuv_config() enter: config=%p\n",
+                           config);
 
        *config = params->rgb2yuv_cc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_rgb2yuv_config() leave\n");
        ia_css_rgb2yuv_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2221,7 +2514,7 @@ ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config)
+                         const struct ia_css_cc_config *config)
 {
        if (!config)
                return;
@@ -2235,24 +2528,28 @@ ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_RGB2YUV_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_rgb2yuv_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_rgb2yuv_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cc_config *config){
+                     struct ia_css_cc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_csc_config() enter: config=%p\n",
+                           config);
 
        *config = params->cc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_csc_config() leave\n");
        ia_css_csc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2260,7 +2557,7 @@ ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_csc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config)
+                     const struct ia_css_cc_config *config)
 {
        if (!config)
                return;
@@ -2274,24 +2571,28 @@ ia_css_set_csc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CSC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_csc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_csc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_nr_config *config){
+                    struct ia_css_nr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_nr_config() enter: config=%p\n",
+                           config);
 
        *config = params->nr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_nr_config() leave\n");
        ia_css_nr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2299,7 +2600,7 @@ ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_nr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_nr_config *config)
+                    const struct ia_css_nr_config *config)
 {
        if (!config)
                return;
@@ -2314,24 +2615,28 @@ ia_css_set_nr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_NR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_nr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_nr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_gc_config *config){
+                    struct ia_css_gc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_gc_config() enter: config=%p\n",
+                           config);
 
        *config = params->gc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_gc_config() leave\n");
        ia_css_gc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2339,7 +2644,7 @@ ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_gc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_gc_config *config)
+                    const struct ia_css_gc_config *config)
 {
        if (!config)
                return;
@@ -2353,24 +2658,28 @@ ia_css_set_gc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_GC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_gc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_gc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horicoef_config() leave\n");
        ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2378,13 +2687,14 @@ ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horicoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_horicoef_config() enter:\n");
        ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2395,24 +2705,28 @@ ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horicoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_horicoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertcoef_config() leave\n");
        ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2420,13 +2734,14 @@ ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertcoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_vertcoef_config() enter:\n");
        ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2437,24 +2752,28 @@ ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_VERTCOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horiproj_config() leave\n");
        ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2462,13 +2781,14 @@ ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horiproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_horiproj_config() enter:\n");
        ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2479,24 +2799,28 @@ ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_HORIPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horiproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_horiproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertproj_config() leave\n");
        ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2504,13 +2828,14 @@ ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_vertproj_config() enter:\n");
        ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2521,24 +2846,28 @@ ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_VERTPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_vertproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horicoef_config() leave\n");
        ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2546,13 +2875,14 @@ ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horicoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_horicoef_config() enter:\n");
        ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2563,24 +2893,28 @@ ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertcoef_config() leave\n");
        ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2588,13 +2922,14 @@ ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertcoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_vertcoef_config() enter:\n");
        ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2605,24 +2940,28 @@ ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_VERTCOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horiproj_config() leave\n");
        ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2630,13 +2969,14 @@ ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horiproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_horiproj_config() enter:\n");
        ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2647,24 +2987,28 @@ ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_HORIPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertproj_config() leave\n");
        ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2672,13 +3016,14 @@ ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_vertproj_config() enter:\n");
        ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2689,24 +3034,28 @@ ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_VERTPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_rgb_gamma_table *config){
+                         struct ia_css_rgb_gamma_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_r_gamma_config() enter: config=%p\n",
+                           config);
 
        *config = params->r_gamma_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_r_gamma_config() leave\n");
        ia_css_r_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2714,7 +3063,7 @@ ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config)
+                         const struct ia_css_rgb_gamma_table *config)
 {
        if (!config)
                return;
@@ -2728,24 +3077,28 @@ ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_R_GAMMA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_r_gamma_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_r_gamma_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_rgb_gamma_table *config){
+                         struct ia_css_rgb_gamma_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_g_gamma_config() enter: config=%p\n",
+                           config);
 
        *config = params->g_gamma_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_g_gamma_config() leave\n");
        ia_css_g_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2753,7 +3106,7 @@ ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config)
+                         const struct ia_css_rgb_gamma_table *config)
 {
        if (!config)
                return;
@@ -2767,24 +3120,28 @@ ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_G_GAMMA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_g_gamma_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_g_gamma_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_rgb_gamma_table *config){
+                         struct ia_css_rgb_gamma_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_b_gamma_config() enter: config=%p\n",
+                           config);
 
        *config = params->b_gamma_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_b_gamma_config() leave\n");
        ia_css_b_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2792,7 +3149,7 @@ ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config)
+                         const struct ia_css_rgb_gamma_table *config)
 {
        if (!config)
                return;
@@ -2806,24 +3163,28 @@ ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_B_GAMMA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_b_gamma_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_b_gamma_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_xnr_table *config){
+                           struct ia_css_xnr_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_table_config() enter: config=%p\n",
+                           config);
 
        *config = params->xnr_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_table_config() leave\n");
        ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2831,13 +3192,14 @@ ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_table *config)
+                           const struct ia_css_xnr_table *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr_table_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_xnr_table_config() enter:\n");
        ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->xnr_table = *config;
        params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
@@ -2845,24 +3207,28 @@ ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_table_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_xnr_table_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_formats_config *config){
+                         struct ia_css_formats_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_formats_config() enter: config=%p\n",
+                           config);
 
        *config = params->formats_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_formats_config() leave\n");
        ia_css_formats_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2870,7 +3236,7 @@ ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_formats_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_formats_config *config)
+                         const struct ia_css_formats_config *config)
 {
        if (!config)
                return;
@@ -2884,24 +3250,28 @@ ia_css_set_formats_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_FORMATS_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_formats_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_formats_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_xnr_config *config){
+                     struct ia_css_xnr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_config() enter: config=%p\n",
+                           config);
 
        *config = params->xnr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_config() leave\n");
        ia_css_xnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2909,7 +3279,7 @@ ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_config *config)
+                     const struct ia_css_xnr_config *config)
 {
        if (!config)
                return;
@@ -2923,24 +3293,28 @@ ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_XNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_xnr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_xnr3_config *config){
+                      struct ia_css_xnr3_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr3_config() enter: config=%p\n",
+                           config);
 
        *config = params->xnr3_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr3_config() leave\n");
        ia_css_xnr3_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2948,7 +3322,7 @@ ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr3_config *config)
+                      const struct ia_css_xnr3_config *config)
 {
        if (!config)
                return;
@@ -2962,24 +3336,28 @@ ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_XNR3_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr3_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_xnr3_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_3a_config *config){
+                     struct ia_css_3a_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_s3a_config() enter: config=%p\n",
+                           config);
 
        *config = params->s3a_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_s3a_config() leave\n");
        ia_css_s3a_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2987,7 +3365,7 @@ ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_3a_config *config)
+                     const struct ia_css_3a_config *config)
 {
        if (!config)
                return;
@@ -3002,24 +3380,28 @@ ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_S3A_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_s3a_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_s3a_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_output_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_output_config *config){
+                        struct ia_css_output_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_output_config() enter: config=%p\n",
+                           config);
 
        *config = params->output_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_output_config() leave\n");
        ia_css_output_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -3027,7 +3409,7 @@ ia_css_get_output_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_output_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_output_config *config)
+                        const struct ia_css_output_config *config)
 {
        if (!config)
                return;
@@ -3041,14 +3423,15 @@ ia_css_set_output_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_OUTPUT_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_output_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_output_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_global_access_function() */
 
 void
 ia_css_get_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 {
        ia_css_get_dp_config(params, config->dp_config);
        ia_css_get_wb_config(params, config->wb_config);
@@ -3093,7 +3476,7 @@ ia_css_get_configs(struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 {
        ia_css_set_dp_config(params, config->dp_config);
        ia_css_set_wb_config(params, config->wb_config);
index b5175c253c61d02ed224fe86a9743d1da5e87e4e..7b81ffa29d8bd737d257a22378e21fb56839fbf2 100644 (file)
@@ -150,237 +150,237 @@ struct ia_css_memory_offsets {
 struct ia_css_pipeline_stage; /* forward declaration */
 
 extern void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
-                       unsigned int pipe_id,
-                       const struct ia_css_pipeline_stage *stage,
-                       struct ia_css_isp_parameters *params);
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_dp_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dp_config *config);
+                    const struct ia_css_dp_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_wb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_wb_config *config);
+                    const struct ia_css_wb_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_tnr_config *config);
+                     const struct ia_css_tnr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ob_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ob_config *config);
+                    const struct ia_css_ob_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_de_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_de_config *config);
+                    const struct ia_css_de_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_anr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_config *config);
+                     const struct ia_css_anr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_thres *config);
+                      const struct ia_css_anr_thres *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ce_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ce_config *config);
+                    const struct ia_css_ce_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ecd_config *config);
+                     const struct ia_css_ecd_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ynr_config *config);
+                     const struct ia_css_ynr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_fc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_fc_config *config);
+                    const struct ia_css_fc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cnr_config *config);
+                     const struct ia_css_cnr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_macc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_macc_config *config);
+                      const struct ia_css_macc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ctc_config *config);
+                     const struct ia_css_ctc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_aa_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_aa_config *config);
+                    const struct ia_css_aa_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config);
+                         const struct ia_css_cc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config);
+                         const struct ia_css_cc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_csc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config);
+                     const struct ia_css_cc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_nr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_nr_config *config);
+                    const struct ia_css_nr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_gc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_gc_config *config);
+                    const struct ia_css_gc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config);
+                         const struct ia_css_rgb_gamma_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config);
+                         const struct ia_css_rgb_gamma_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config);
+                         const struct ia_css_rgb_gamma_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_table *config);
+                           const struct ia_css_xnr_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_formats_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_formats_config *config);
+                         const struct ia_css_formats_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_config *config);
+                     const struct ia_css_xnr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr3_config *config);
+                      const struct ia_css_xnr3_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_3a_config *config);
+                     const struct ia_css_3a_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_output_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_output_config *config);
+                        const struct ia_css_output_config *config);
 
 /* Code generated by genparam/gencode.c:gen_global_access_function() */
 
 void
 ia_css_get_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 ;
 #ifdef ISP2401
 
@@ -389,7 +389,7 @@ ia_css_get_configs(struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 ;
 #ifdef ISP2401
 
index c14323224d1269763844f068fae57e9e792e8785..42e0344c677d127437d391c1791c988b58e79bb2 100644 (file)
 
 static void
 ia_css_initialize_aa_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_aa_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.aa.size;
@@ -32,18 +33,21 @@ ia_css_initialize_aa_state(
                unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
 
                if (size)
-                       memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset], 0, size);
+                       memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                              0, size);
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_aa_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_cnr_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
@@ -52,20 +56,22 @@ ia_css_initialize_cnr_state(
 
                if (size) {
                        ia_css_init_cnr_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_cnr2_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr2_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
@@ -74,20 +80,22 @@ ia_css_initialize_cnr2_state(
 
                if (size) {
                        ia_css_init_cnr2_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr2_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_dp_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_dp_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.dp.size;
@@ -96,20 +104,22 @@ ia_css_initialize_dp_state(
 
                if (size) {
                        ia_css_init_dp_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_dp_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_de_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_de_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.de.size;
@@ -118,20 +128,22 @@ ia_css_initialize_de_state(
 
                if (size) {
                        ia_css_init_de_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_de_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_tnr_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_tnr_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
@@ -140,20 +152,22 @@ ia_css_initialize_tnr_state(
 
                if (size) {
                        ia_css_init_tnr_state((struct sh_css_isp_tnr_dmem_state *)
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
-                               size);
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+                                             size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_tnr_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_ref_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ref_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.ref.size;
@@ -162,20 +176,22 @@ ia_css_initialize_ref_state(
 
                if (size) {
                        ia_css_init_ref_state((struct sh_css_isp_ref_dmem_state *)
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
-                               size);
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+                                             size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ref_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_ynr_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ynr_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
@@ -184,16 +200,18 @@ ia_css_initialize_ynr_state(
 
                if (size) {
                        ia_css_init_ynr_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ynr_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_state_init_table() */
 
-void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary) = {
+void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+    const struct ia_css_binary *binary) = {
        ia_css_initialize_aa_state,
        ia_css_initialize_cnr_state,
        ia_css_initialize_cnr2_state,
index 732adafb0a633d463d04adcf7b1f9529cddd69e2..cc9cdcd0e2be825421f0bebad0eaa9b7bd7d0902 100644 (file)
@@ -65,7 +65,8 @@ struct ia_css_state_memory_offsets {
 #include "ia_css_binary.h"   /* struct ia_css_binary */
 /* Code generated by genparam/genstate.c:gen_state_init_table() */
 
-extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary);
+extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+    const struct ia_css_binary *binary);
 
 #endif /* IA_CSS_INCLUDE_STATE */
 
index ba43562f12874cac152d4149eb53d9ad1436d96f..8741b8347dd42ce9f2e53b77c919050270556d63 100644 (file)
 #define _DMA_V2_ZERO_EXTEND                             0
 #define _DMA_V2_SIGN_EXTEND                             1
 
-  /* SLAVE address map */
+/* SLAVE address map */
 #define _DMA_V2_SEL_FSM_CMD                             0
 #define _DMA_V2_SEL_CH_REG                              1
 #define _DMA_V2_SEL_CONN_GROUP                          2
index 33f8b5ce9ba3e09ec08ae2d95bb145a8431b2813..3cc627aa6b091f3caa473862241dcefe49f9bccb 100644 (file)
 
 #define HRT_GDC_BCI_COEF_BITS           14 /* 14 bits per coefficient                                                   */
 #define HRT_GDC_BCI_COEF_ONE             (1 << (HRT_GDC_BCI_COEF_BITS - 2))  /* We represent signed 10 bit coefficients.  */
-                                                                       /* The supported range is [-256, .., +256]      */
-                                                                       /* in 14-bit signed notation,                   */
-                                                                       /* We need all ten bits (MSB must be zero).     */
-                                                                       /* -s is inserted to solve this issue, and      */
-                                                                       /* therefore "1" is equal to +256.              */
+/* The supported range is [-256, .., +256]      */
+/* in 14-bit signed notation,                   */
+/* We need all ten bits (MSB must be zero).     */
+/* -s is inserted to solve this issue, and      */
+/* therefore "1" is equal to +256.              */
 #define HRT_GDC_BCI_COEF_MASK            ((1 << HRT_GDC_BCI_COEF_BITS) - 1)
 
 #define HRT_GDC_LUT_BYTES                (HRT_GDC_N * 4 * 2)                /* 1024 addresses, 4 coefficients per address,  */
-                                                                       /* 2 bytes per coefficient                      */
+/* 2 bytes per coefficient                      */
 
 #define _HRT_GDC_REG_ALIGN               4
 
-  //     31  30  29    25 24                     0
-  //  |-----|---|--------|------------------------|
-  //  | CMD | C | Reg_ID |        Value           |
+//     31  30  29    25 24                     0
+//  |-----|---|--------|------------------------|
+//  | CMD | C | Reg_ID |        Value           |
 
-  // There are just two commands possible for the GDC block:
-  // 1 - Configure reg
-  // 0 - Data token
+// There are just two commands possible for the GDC block:
+// 1 - Configure reg
+// 0 - Data token
 
-  // C      - Reserved bit
-  //          Used in protocol to indicate whether it is C-run or other type of runs
-  //          In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
+// C      - Reserved bit
+//          Used in protocol to indicate whether it is C-run or other type of runs
+//          In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
 
-  // Reg_ID - Address of the register to be configured
+// Reg_ID - Address of the register to be configured
 
-  // Value  - Value to store to the addressed register, maximum of 24 bits
+// Value  - Value to store to the addressed register, maximum of 24 bits
 
-  // Configure reg command is not followed by any other token.
-  // The address of the register and the data to be filled in is contained in the same token
+// Configure reg command is not followed by any other token.
+// The address of the register and the data to be filled in is contained in the same token
 
-  // When the first data token is received, it must be:
-  //   1. FRX and FRY (device configured in one of the  scaling modes) ***DEFAULT MODE***, or,
-  //   2. P0'X        (device configured in one of the tetragon modes)
-  // After the first data token is received, pre-defined number of tokens with the following meaning follow:
-  //   1. two  tokens: SRC address ; DST address
-  //   2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
+// When the first data token is received, it must be:
+//   1. FRX and FRY (device configured in one of the  scaling modes) ***DEFAULT MODE***, or,
+//   2. P0'X        (device configured in one of the tetragon modes)
+// After the first data token is received, pre-defined number of tokens with the following meaning follow:
+//   1. two  tokens: SRC address ; DST address
+//   2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
 
 #define HRT_GDC_CONFIG_CMD             1
 #define HRT_GDC_DATA_CMD               0
index d02435a3ec5a1e23fafae4a89505b7e66d48ed03..96286a141b00b6a8471398c367927cafdc8b6162 100644 (file)
 #define _HRT_GPIO_BLOCK_REG_ALIGN 4
 
 /* R/W registers */
-#define _gpio_block_reg_do_e                            0
+#define _gpio_block_reg_do_e                            0
 #define _gpio_block_reg_do_select                     1
-#define _gpio_block_reg_do_0                            2
-#define _gpio_block_reg_do_1                            3
+#define _gpio_block_reg_do_0                            2
+#define _gpio_block_reg_do_1                            3
 #define _gpio_block_reg_do_pwm_cnt_0        4
 #define _gpio_block_reg_do_pwm_cnt_1        5
 #define _gpio_block_reg_do_pwm_cnt_2        6
@@ -36,6 +36,6 @@
 #define _gpio_block_reg_di_active_level          15
 
 /* read-only registers */
-#define _gpio_block_reg_di                               16
+#define _gpio_block_reg_di                               16
 
 #endif /* _gpio_block_defs_h_ */
index b366dbf5019dfa9cb7af839db3580566eab9462e..dd47972f619d8bc0a9ed87885984c640099a77e7 100644 (file)
  * The definitions are taken from <system>_defs.h
  */
 typedef enum hrt_isp_css_irq {
-  hrt_isp_css_irq_gpio_pin_0           = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_1           = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_2           = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_3           = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_4           = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_5           = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_6           = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_7           = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_8           = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_9           = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_10          = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_11          = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
-  hrt_isp_css_irq_sp                   = HIVE_GP_DEV_IRQ_SP_BIT_ID,
-  hrt_isp_css_irq_isp                  = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
-  hrt_isp_css_irq_isys                 = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
-  hrt_isp_css_irq_isel                 = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
-  hrt_isp_css_irq_ifmt                 = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
-  hrt_isp_css_irq_sp_stream_mon        = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
-  hrt_isp_css_irq_isp_stream_mon       = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
-  hrt_isp_css_irq_mod_stream_mon       = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_0           = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_1           = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_2           = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_3           = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_4           = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_5           = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_6           = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_7           = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_8           = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_9           = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_10          = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_11          = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
+       hrt_isp_css_irq_sp                   = HIVE_GP_DEV_IRQ_SP_BIT_ID,
+       hrt_isp_css_irq_isp                  = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
+       hrt_isp_css_irq_isys                 = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
+       hrt_isp_css_irq_isel                 = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
+       hrt_isp_css_irq_ifmt                 = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
+       hrt_isp_css_irq_sp_stream_mon        = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
+       hrt_isp_css_irq_isp_stream_mon       = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
+       hrt_isp_css_irq_mod_stream_mon       = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
 #ifdef _HIVE_ISP_CSS_2401_SYSTEM
-  hrt_isp_css_irq_is2401               = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
+       hrt_isp_css_irq_is2401               = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
 #else
-  hrt_isp_css_irq_isp_pmem_error       = HIVE_GP_DEV_IRQ_ISP_PMEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_isp_pmem_error       = HIVE_GP_DEV_IRQ_ISP_PMEM_ERROR_BIT_ID,
 #endif
-  hrt_isp_css_irq_isp_bamem_error      = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_isp_dmem_error       = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_sp_icache_mem_error  = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_sp_dmem_error        = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_mmu_cache_mem_error  = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_gp_timer_0           = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
-  hrt_isp_css_irq_gp_timer_1           = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
-  hrt_isp_css_irq_sw_pin_0             = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
-  hrt_isp_css_irq_sw_pin_1             = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
-  hrt_isp_css_irq_dma                  = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
-  hrt_isp_css_irq_sp_stream_mon_b      = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
-  /* this must (obviously) be the last on in the enum */
-  hrt_isp_css_irq_num_irqs
+       hrt_isp_css_irq_isp_bamem_error      = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_isp_dmem_error       = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_sp_icache_mem_error  = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_sp_dmem_error        = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_mmu_cache_mem_error  = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_gp_timer_0           = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
+       hrt_isp_css_irq_gp_timer_1           = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
+       hrt_isp_css_irq_sw_pin_0             = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
+       hrt_isp_css_irq_sw_pin_1             = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
+       hrt_isp_css_irq_dma                  = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
+       hrt_isp_css_irq_sp_stream_mon_b      = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
+       /* this must (obviously) be the last on in the enum */
+       hrt_isp_css_irq_num_irqs
 } hrt_isp_css_irq_t;
 
 typedef enum hrt_isp_css_irq_status {
-  hrt_isp_css_irq_status_error,
-  hrt_isp_css_irq_status_more_irqs,
-  hrt_isp_css_irq_status_success
+       hrt_isp_css_irq_status_error,
+       hrt_isp_css_irq_status_more_irqs,
+       hrt_isp_css_irq_status_success
 } hrt_isp_css_irq_status_t;
 
 #endif /* _HIVE_ISP_CSS_IRQ_TYPES_HRT_H_ */
index ebebb38624cb0bbb82e0551edbb22943b8fbd6b5..843c819cf519e9e58430edcd682a8086ba70be1a 100644 (file)
 #define ISP_VMEM_ELEM_PRECISION                14
 #define ISP_VMEM_IS_BAMEM                      1
 #if ISP_VMEM_IS_BAMEM
-  #define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT        8
-  #define ISP_VMEM_BAMEM_LATENCY               5
-  #define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
-  #define ISP_VMEM_BAMEM_NR_DATA_PLANES        8
-  #define ISP_VMEM_BAMEM_NR_CFG_REGISTERS      16
-  #define ISP_VMEM_BAMEM_LININT                0
-  #define ISP_VMEM_BAMEM_DAP_BITS              3
-  #define ISP_VMEM_BAMEM_LININT_FRAC_BITS      0
-  #define ISP_VMEM_BAMEM_PID_BITS              3
-  #define ISP_VMEM_BAMEM_OFFSET_BITS           19
-  #define ISP_VMEM_BAMEM_ADDRESS_BITS          25
-  #define ISP_VMEM_BAMEM_RID_BITS              4
-  #define ISP_VMEM_BAMEM_TRANSPOSITION         1
-  #define ISP_VMEM_BAMEM_VEC_PLUS_SLICE        1
-  #define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
-  #define ISP_VMEM_BAMEM_LUT_ELEMS             16
-  #define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH        14
-  #define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE      1
-  #define ISP_VMEM_BAMEM_SMART_FETCH           1
-  #define ISP_VMEM_BAMEM_BIG_ENDIANNESS        0
+#define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT        8
+#define ISP_VMEM_BAMEM_LATENCY               5
+#define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
+#define ISP_VMEM_BAMEM_NR_DATA_PLANES        8
+#define ISP_VMEM_BAMEM_NR_CFG_REGISTERS      16
+#define ISP_VMEM_BAMEM_LININT                0
+#define ISP_VMEM_BAMEM_DAP_BITS              3
+#define ISP_VMEM_BAMEM_LININT_FRAC_BITS      0
+#define ISP_VMEM_BAMEM_PID_BITS              3
+#define ISP_VMEM_BAMEM_OFFSET_BITS           19
+#define ISP_VMEM_BAMEM_ADDRESS_BITS          25
+#define ISP_VMEM_BAMEM_RID_BITS              4
+#define ISP_VMEM_BAMEM_TRANSPOSITION         1
+#define ISP_VMEM_BAMEM_VEC_PLUS_SLICE        1
+#define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
+#define ISP_VMEM_BAMEM_LUT_ELEMS             16
+#define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH        14
+#define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE      1
+#define ISP_VMEM_BAMEM_SMART_FETCH           1
+#define ISP_VMEM_BAMEM_BIG_ENDIANNESS        0
 #endif /* ISP_VMEM_IS_BAMEM */
 #define ISP_PMEM_DEPTH                         2048
 #define ISP_PMEM_WIDTH                         640
 #define ISP_SRU_GUARDING                       1
 #define ISP_VLSU_GUARDING                      1
 
-#define ISP_VRF_RAM                         1
-#define ISP_SRF_RAM                         1
+#define ISP_VRF_RAM                         1
+#define ISP_SRF_RAM                         1
 
 #define ISP_SPLIT_VMUL_VADD_IS                 0
 #define ISP_RFSPLIT_FPGA                       0
 #define ISP_VMEM_WIDTH                         896
 #define ISP_VMEM_ALIGN                         128
 #if ISP_VMEM_IS_BAMEM
-  #define ISP_VMEM_ALIGN_ELEM                  2
+#define ISP_VMEM_ALIGN_ELEM                  2
 #endif /* ISP_VMEM_IS_BAMEM */
 #define ISP_SIMDLSU                            1
 #define ISP_LSU_IMM_BITS                       12
index e00bc841d0f0d2c00e942467981630e5051d040a..e9106d1e6a63d895487e1ead67dc6023f9f846a5 100644 (file)
@@ -31,8 +31,8 @@ typedef char *tmemvectors, *tmemvectoru, *tvector;
 #define hrt_isp_vmem_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_vmem(cell))
 
 #if ISP_HAS_HIST
-  #define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
-  #define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
+#define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
+#define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
 #endif
 
 #endif /* _isp2400_support_h */
index de99359a0fbcbe3bc1af0dc96e1a5e3e85714489..9fae24b3e689f58e5938cdf7aa440e33e371cce2 100644 (file)
 
 void
 ia_css_configure_iterator(
-       const struct ia_css_binary *binary,
-       const struct ia_css_iterator_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_iterator_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_iterator() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -39,20 +40,23 @@ ia_css_configure_iterator(
                }
                if (size) {
                        ia_css_iterator_config((struct sh_css_isp_iterator_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                              &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                              config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_iterator() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_copy_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_copy_output_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_copy_output_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_copy_output() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -64,20 +68,23 @@ ia_css_configure_copy_output(
                }
                if (size) {
                        ia_css_copy_output_config((struct sh_css_isp_copy_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                                 &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                                 config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_copy_output() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_crop(
-       const struct ia_css_binary *binary,
-       const struct ia_css_crop_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_crop_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_crop() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -89,20 +96,23 @@ ia_css_configure_crop(
                }
                if (size) {
                        ia_css_crop_config((struct sh_css_isp_crop_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                          &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                          config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_crop() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_fpn(
-       const struct ia_css_binary *binary,
-       const struct ia_css_fpn_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_fpn_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_fpn() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -114,20 +124,23 @@ ia_css_configure_fpn(
                }
                if (size) {
                        ia_css_fpn_config((struct sh_css_isp_fpn_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_fpn() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_dvs(
-       const struct ia_css_binary *binary,
-       const struct ia_css_dvs_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_dvs_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_dvs() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -139,20 +152,23 @@ ia_css_configure_dvs(
                }
                if (size) {
                        ia_css_dvs_config((struct sh_css_isp_dvs_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_dvs() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_qplane(
-       const struct ia_css_binary *binary,
-       const struct ia_css_qplane_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_qplane_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_qplane() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -164,20 +180,23 @@ ia_css_configure_qplane(
                }
                if (size) {
                        ia_css_qplane_config((struct sh_css_isp_qplane_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                            &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                            config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_qplane() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output0(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output0_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_output0_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output0() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -189,20 +208,23 @@ ia_css_configure_output0(
                }
                if (size) {
                        ia_css_output0_config((struct sh_css_isp_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                             config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output0() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output1(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output1_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_output1_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output1() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -214,20 +236,23 @@ ia_css_configure_output1(
                }
                if (size) {
                        ia_css_output1_config((struct sh_css_isp_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                             config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output1() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_output_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -239,10 +264,12 @@ ia_css_configure_output(
                }
                if (size) {
                        ia_css_output_config((struct sh_css_isp_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                            &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                            config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
@@ -250,10 +277,11 @@ ia_css_configure_output(
 
 void
 ia_css_configure_sc(
-       const struct ia_css_binary *binary,
-       const struct ia_css_sc_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_sc_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_sc() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -265,10 +293,12 @@ ia_css_configure_sc(
                }
                if (size) {
                        ia_css_sc_config((struct sh_css_isp_sc_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                        &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                        config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_sc() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
@@ -276,10 +306,11 @@ ia_css_configure_sc(
 
 void
 ia_css_configure_raw(
-       const struct ia_css_binary *binary,
-       const struct ia_css_raw_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_raw_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_raw() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -291,20 +322,23 @@ ia_css_configure_raw(
                }
                if (size) {
                        ia_css_raw_config((struct sh_css_isp_raw_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_raw() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_tnr(
-       const struct ia_css_binary *binary,
-       const struct ia_css_tnr_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_tnr_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_tnr() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -316,20 +350,23 @@ ia_css_configure_tnr(
                }
                if (size) {
                        ia_css_tnr_config((struct sh_css_isp_tnr_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_tnr() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_ref(
-       const struct ia_css_binary *binary,
-       const struct ia_css_ref_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_ref_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_ref() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -341,20 +378,23 @@ ia_css_configure_ref(
                }
                if (size) {
                        ia_css_ref_config((struct sh_css_isp_ref_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_ref() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_vf(
-       const struct ia_css_binary *binary,
-       const struct ia_css_vf_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_vf_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_vf() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -366,8 +406,10 @@ ia_css_configure_vf(
                }
                if (size) {
                        ia_css_vf_config((struct sh_css_isp_vf_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                        &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                        config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_vf() leave:\n");
 }
index 8aacd3dbc05a5263063f91a016f10329c24e61d9..451fbae02aee05511767a56b5b17d2498d08543a 100644 (file)
@@ -88,101 +88,101 @@ struct ia_css_config_memory_offsets {
 
 void
 ia_css_configure_iterator(
-       const struct ia_css_binary *binary,
-       const struct ia_css_iterator_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_iterator_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_copy_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_copy_output_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_copy_output_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_crop(
-       const struct ia_css_binary *binary,
-       const struct ia_css_crop_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_crop_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_fpn(
-       const struct ia_css_binary *binary,
-       const struct ia_css_fpn_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_fpn_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_dvs(
-       const struct ia_css_binary *binary,
-       const struct ia_css_dvs_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_dvs_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_qplane(
-       const struct ia_css_binary *binary,
-       const struct ia_css_qplane_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_qplane_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output0(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output0_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_output0_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output1(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output1_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_output1_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_output_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 #ifdef ISP2401
 void
 ia_css_configure_sc(
-       const struct ia_css_binary *binary,
-       const struct ia_css_sc_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_sc_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 #endif
 void
 ia_css_configure_raw(
-       const struct ia_css_binary *binary,
-       const struct ia_css_raw_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_raw_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_tnr(
-       const struct ia_css_binary *binary,
-       const struct ia_css_tnr_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_tnr_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_ref(
-       const struct ia_css_binary *binary,
-       const struct ia_css_ref_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_ref_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_vf(
-       const struct ia_css_binary *binary,
-       const struct ia_css_vf_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_vf_configuration *config_dmem);
 
 #endif /* IA_CSS_INCLUDE_CONFIGURATION */
 
index 3afe861b709efda47cf2272cf8b93f94532a20dd..2df57c4864b72d909c77317889ec5eb8ba480fb6 100644 (file)
 
 static void
 ia_css_process_aa(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
-       unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
-       unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
+       unsigned int size   =
+           stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
+       unsigned int offset =
+           stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
 
        if (size) {
                struct sh_css_isp_aa_params *t =  (struct sh_css_isp_aa_params *)
-                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+                                                 &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                t->strength = params->aa_config.strength;
        }
 }
@@ -85,28 +87,33 @@ ia_css_process_aa(
 
 static void
 ia_css_process_anr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr() enter:\n");
 
                        ia_css_anr_encode((struct sh_css_isp_anr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->anr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->anr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr() leave:\n");
                }
        }
 }
@@ -115,28 +122,33 @@ size);
 
 static void
 ia_css_process_anr2(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr2() enter:\n");
 
                        ia_css_anr2_vmem_encode((struct ia_css_isp_anr2_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->anr_thres,
-size);
+                                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                               &params->anr_thres,
+                                               size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr2() leave:\n");
                }
        }
 }
@@ -145,38 +157,43 @@ size);
 
 static void
 ia_css_process_bh(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
 
                        ia_css_bh_encode((struct sh_css_isp_bh_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->s3a_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->s3a_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
 
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
@@ -187,28 +204,33 @@ size);
 
 static void
 ia_css_process_cnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_cnr() enter:\n");
 
                        ia_css_cnr_encode((struct sh_css_isp_cnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->cnr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->cnr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_cnr() leave:\n");
                }
        }
 }
@@ -217,28 +239,33 @@ size);
 
 static void
 ia_css_process_crop(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_crop() enter:\n");
 
                        ia_css_crop_encode((struct sh_css_isp_crop_isp_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->crop_config,
-size);
+                                          &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                          &params->crop_config,
+                                          size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_crop() leave:\n");
                }
        }
 }
@@ -247,28 +274,33 @@ size);
 
 static void
 ia_css_process_csc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_csc() enter:\n");
 
                        ia_css_csc_encode((struct sh_css_isp_csc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->cc_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->cc_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_csc() leave:\n");
                }
        }
 }
@@ -277,26 +309,29 @@ size);
 
 static void
 ia_css_process_dp(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() enter:\n");
 
                        ia_css_dp_encode((struct sh_css_isp_dp_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dp_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->dp_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() leave:\n");
                }
@@ -307,28 +342,33 @@ size);
 
 static void
 ia_css_process_bnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bnr() enter:\n");
 
                        ia_css_bnr_encode((struct sh_css_isp_bnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->nr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->nr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bnr() leave:\n");
                }
        }
 }
@@ -337,26 +377,29 @@ size);
 
 static void
 ia_css_process_de(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() enter:\n");
 
                        ia_css_de_encode((struct sh_css_isp_de_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->de_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->de_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() leave:\n");
                }
@@ -367,28 +410,33 @@ size);
 
 static void
 ia_css_process_ecd(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ecd() enter:\n");
 
                        ia_css_ecd_encode((struct sh_css_isp_ecd_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ecd_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->ecd_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ecd() leave:\n");
                }
        }
 }
@@ -397,28 +445,33 @@ size);
 
 static void
 ia_css_process_formats(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_formats() enter:\n");
 
                        ia_css_formats_encode((struct sh_css_isp_formats_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->formats_config,
-size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                             &params->formats_config,
+                                             size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_formats() leave:\n");
                }
        }
 }
@@ -427,28 +480,33 @@ size);
 
 static void
 ia_css_process_fpn(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_fpn() enter:\n");
 
                        ia_css_fpn_encode((struct sh_css_isp_fpn_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->fpn_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->fpn_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_fpn() leave:\n");
                }
        }
 }
@@ -457,44 +515,50 @@ size);
 
 static void
 ia_css_process_gc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
 
                        ia_css_gc_encode((struct sh_css_isp_gc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->gc_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->gc_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
 
                        ia_css_gc_vamem_encode((struct sh_css_isp_gc_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
-                                       &params->gc_table,
-size);
+                                              &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+                                              &params->gc_table,
+                                              size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
@@ -505,26 +569,29 @@ size);
 
 static void
 ia_css_process_ce(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() enter:\n");
 
                        ia_css_ce_encode((struct sh_css_isp_ce_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ce_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->ce_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() leave:\n");
                }
@@ -535,28 +602,33 @@ size);
 
 static void
 ia_css_process_yuv2rgb(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yuv2rgb() enter:\n");
 
                        ia_css_yuv2rgb_encode((struct sh_css_isp_csc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->yuv2rgb_cc_config,
-size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                             &params->yuv2rgb_cc_config,
+                                             size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yuv2rgb() leave:\n");
                }
        }
 }
@@ -565,28 +637,33 @@ size);
 
 static void
 ia_css_process_rgb2yuv(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_rgb2yuv() enter:\n");
 
                        ia_css_rgb2yuv_encode((struct sh_css_isp_csc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->rgb2yuv_cc_config,
-size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                             &params->rgb2yuv_cc_config,
+                                             size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_rgb2yuv() leave:\n");
                }
        }
 }
@@ -595,28 +672,33 @@ size);
 
 static void
 ia_css_process_r_gamma(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_r_gamma() enter:\n");
 
                        ia_css_r_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
-                                       &params->r_gamma_table,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+                                                   &params->r_gamma_table,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_r_gamma() leave:\n");
                }
        }
 }
@@ -625,28 +707,33 @@ size);
 
 static void
 ia_css_process_g_gamma(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_g_gamma() enter:\n");
 
                        ia_css_g_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
-                                       &params->g_gamma_table,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+                                                   &params->g_gamma_table,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_g_gamma() leave:\n");
                }
        }
 }
@@ -655,28 +742,33 @@ size);
 
 static void
 ia_css_process_b_gamma(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_b_gamma() enter:\n");
 
                        ia_css_b_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
-                                       &params->b_gamma_table,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
+                                                   &params->b_gamma_table,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_b_gamma() leave:\n");
                }
        }
 }
@@ -685,31 +777,36 @@ size);
 
 static void
 ia_css_process_uds(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
 
                if (size) {
                        struct sh_css_sp_uds_params *p;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_uds() enter:\n");
 
                        p = (struct sh_css_sp_uds_params *)
-                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+                           &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                        p->crop_pos = params->uds_config.crop_pos;
                        p->uds = params->uds_config.uds;
 
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_uds() leave:\n");
                }
        }
 }
@@ -718,28 +815,33 @@ ia_css_process_uds(
 
 static void
 ia_css_process_raa(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_raa() enter:\n");
 
                        ia_css_raa_encode((struct sh_css_isp_aa_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->raa_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->raa_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_raa() leave:\n");
                }
        }
 }
@@ -748,28 +850,33 @@ size);
 
 static void
 ia_css_process_s3a(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_s3a() enter:\n");
 
                        ia_css_s3a_encode((struct sh_css_isp_s3a_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->s3a_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->s3a_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_s3a() leave:\n");
                }
        }
 }
@@ -778,44 +885,50 @@ size);
 
 static void
 ia_css_process_ob(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
 
                        ia_css_ob_encode((struct sh_css_isp_ob_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ob_config,
-&params->stream_configs.ob, size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->ob_config,
+                                        &params->stream_configs.ob, size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
 
                        ia_css_ob_vmem_encode((struct sh_css_isp_ob_vmem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->ob_config,
-&params->stream_configs.ob, size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                             &params->ob_config,
+                                             &params->stream_configs.ob, size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
@@ -826,28 +939,33 @@ ia_css_process_ob(
 
 static void
 ia_css_process_output(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_output() enter:\n");
 
                        ia_css_output_encode((struct sh_css_isp_output_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->output_config,
-size);
+                                            &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                            &params->output_config,
+                                            size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_output() leave:\n");
                }
        }
 }
@@ -856,26 +974,29 @@ size);
 
 static void
 ia_css_process_sc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() enter:\n");
 
                        ia_css_sc_encode((struct sh_css_isp_sc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->sc_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->sc_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() leave:\n");
                }
@@ -886,30 +1007,35 @@ size);
 
 static void
 ia_css_process_bds(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
 
                if (size) {
                        struct sh_css_isp_bds_params *p;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bds() enter:\n");
 
                        p = (struct sh_css_isp_bds_params *)
-                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+                           &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                        p->baf_strength = params->bds_config.strength;
 
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bds() leave:\n");
                }
        }
 }
@@ -918,28 +1044,33 @@ ia_css_process_bds(
 
 static void
 ia_css_process_tnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_tnr() enter:\n");
 
                        ia_css_tnr_encode((struct sh_css_isp_tnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->tnr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->tnr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_tnr() leave:\n");
                }
        }
 }
@@ -948,28 +1079,33 @@ size);
 
 static void
 ia_css_process_macc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_macc() enter:\n");
 
                        ia_css_macc_encode((struct sh_css_isp_macc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->macc_config,
-size);
+                                          &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                          &params->macc_config,
+                                          size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_macc() leave:\n");
                }
        }
 }
@@ -978,28 +1114,33 @@ size);
 
 static void
 ia_css_process_sdis_horicoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horicoef() enter:\n");
 
                        ia_css_sdis_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                        &params->dvs_coefs,
+                                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horicoef() leave:\n");
                }
        }
 }
@@ -1008,28 +1149,33 @@ size);
 
 static void
 ia_css_process_sdis_vertcoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertcoef() enter:\n");
 
                        ia_css_sdis_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                        &params->dvs_coefs,
+                                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertcoef() leave:\n");
                }
        }
 }
@@ -1038,28 +1184,33 @@ size);
 
 static void
 ia_css_process_sdis_horiproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horiproj() enter:\n");
 
                        ia_css_sdis_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                   &params->dvs_coefs,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horiproj() leave:\n");
                }
        }
 }
@@ -1068,28 +1219,33 @@ size);
 
 static void
 ia_css_process_sdis_vertproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertproj() enter:\n");
 
                        ia_css_sdis_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                   &params->dvs_coefs,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertproj() leave:\n");
                }
        }
 }
@@ -1098,28 +1254,33 @@ size);
 
 static void
 ia_css_process_sdis2_horicoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horicoef() enter:\n");
 
                        ia_css_sdis2_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                         &params->dvs2_coefs,
+                                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horicoef() leave:\n");
                }
        }
 }
@@ -1128,28 +1289,33 @@ size);
 
 static void
 ia_css_process_sdis2_vertcoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertcoef() enter:\n");
 
                        ia_css_sdis2_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                         &params->dvs2_coefs,
+                                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertcoef() leave:\n");
                }
        }
 }
@@ -1158,28 +1324,33 @@ size);
 
 static void
 ia_css_process_sdis2_horiproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horiproj() enter:\n");
 
                        ia_css_sdis2_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                    &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                    &params->dvs2_coefs,
+                                                    size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horiproj() leave:\n");
                }
        }
 }
@@ -1188,28 +1359,33 @@ size);
 
 static void
 ia_css_process_sdis2_vertproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertproj() enter:\n");
 
                        ia_css_sdis2_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                    &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                    &params->dvs2_coefs,
+                                                    size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertproj() leave:\n");
                }
        }
 }
@@ -1218,26 +1394,29 @@ size);
 
 static void
 ia_css_process_wb(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() enter:\n");
 
                        ia_css_wb_encode((struct sh_css_isp_wb_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->wb_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->wb_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() leave:\n");
                }
@@ -1248,26 +1427,29 @@ size);
 
 static void
 ia_css_process_nr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() enter:\n");
 
                        ia_css_nr_encode((struct sh_css_isp_ynr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->nr_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->nr_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() leave:\n");
                }
@@ -1278,28 +1460,33 @@ size);
 
 static void
 ia_css_process_yee(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yee() enter:\n");
 
                        ia_css_yee_encode((struct sh_css_isp_yee_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->yee_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->yee_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yee() leave:\n");
                }
        }
 }
@@ -1308,28 +1495,33 @@ size);
 
 static void
 ia_css_process_ynr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ynr() enter:\n");
 
                        ia_css_ynr_encode((struct sh_css_isp_yee2_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ynr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->ynr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ynr() leave:\n");
                }
        }
 }
@@ -1338,26 +1530,29 @@ size);
 
 static void
 ia_css_process_fc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() enter:\n");
 
                        ia_css_fc_encode((struct sh_css_isp_fc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->fc_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->fc_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() leave:\n");
                }
@@ -1368,46 +1563,56 @@ size);
 
 static void
 ia_css_process_ctc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() enter:\n");
 
                        ia_css_ctc_encode((struct sh_css_isp_ctc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ctc_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->ctc_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() enter:\n");
 
                        ia_css_ctc_vamem_encode((struct sh_css_isp_ctc_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
-                                       &params->ctc_table,
-size);
+                                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+                                               &params->ctc_table,
+                                               size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() leave:\n");
                }
        }
 }
@@ -1416,28 +1621,33 @@ size);
 
 static void
 ia_css_process_xnr_table(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr_table() enter:\n");
 
                        ia_css_xnr_table_vamem_encode((struct sh_css_isp_xnr_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
-                                       &params->xnr_table,
-size);
+                                                     &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+                                                     &params->xnr_table,
+                                                     size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr_table() leave:\n");
                }
        }
 }
@@ -1446,28 +1656,33 @@ size);
 
 static void
 ia_css_process_xnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr() enter:\n");
 
                        ia_css_xnr_encode((struct sh_css_isp_xnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->xnr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->xnr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr() leave:\n");
                }
        }
 }
@@ -1476,47 +1691,57 @@ size);
 
 static void
 ia_css_process_xnr3(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() enter:\n");
 
                        ia_css_xnr3_encode((struct sh_css_isp_xnr3_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->xnr3_config,
-size);
+                                          &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                          &params->xnr3_config,
+                                          size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() leave:\n");
                }
        }
 #ifdef ISP2401
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() enter:\n");
 
                        ia_css_xnr3_vmem_encode((struct sh_css_isp_xnr3_vmem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->xnr3_config,
-size);
+                                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                               &params->xnr3_config,
+                                               size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() leave:\n");
                }
        }
 #endif
@@ -1525,9 +1750,9 @@ size);
 /* Code generated by genparam/gencode.c:gen_param_process_table() */
 
 void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
-                       unsigned int pipe_id,
-                       const struct ia_css_pipeline_stage *stage,
-                       struct ia_css_isp_parameters *params) = {
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params) = {
        ia_css_process_aa,
        ia_css_process_anr,
        ia_css_process_anr2,
@@ -1580,17 +1805,20 @@ void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
 
 static void
 ia_css_get_dp_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dp_config *config){
+                    struct ia_css_dp_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_dp_config() enter: config=%p\n",
+                           config);
 
        *config = params->dp_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_dp_config() leave\n");
        ia_css_dp_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1598,7 +1826,7 @@ ia_css_get_dp_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_dp_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dp_config *config)
+                    const struct ia_css_dp_config *config)
 {
        if (!config)
                return;
@@ -1612,24 +1840,28 @@ ia_css_set_dp_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_DP_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_dp_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_dp_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_wb_config *config){
+                    struct ia_css_wb_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_wb_config() enter: config=%p\n",
+                           config);
 
        *config = params->wb_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_wb_config() leave\n");
        ia_css_wb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1637,7 +1869,7 @@ ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_wb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_wb_config *config)
+                    const struct ia_css_wb_config *config)
 {
        if (!config)
                return;
@@ -1651,24 +1883,28 @@ ia_css_set_wb_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_WB_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_wb_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_wb_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_tnr_config *config){
+                     struct ia_css_tnr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_tnr_config() enter: config=%p\n",
+                           config);
 
        *config = params->tnr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_tnr_config() leave\n");
        ia_css_tnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1676,7 +1912,7 @@ ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_tnr_config *config)
+                     const struct ia_css_tnr_config *config)
 {
        if (!config)
                return;
@@ -1690,24 +1926,28 @@ ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_TNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_tnr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_tnr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ob_config *config){
+                    struct ia_css_ob_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ob_config() enter: config=%p\n",
+                           config);
 
        *config = params->ob_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ob_config() leave\n");
        ia_css_ob_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1715,7 +1955,7 @@ ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ob_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ob_config *config)
+                    const struct ia_css_ob_config *config)
 {
        if (!config)
                return;
@@ -1729,24 +1969,28 @@ ia_css_set_ob_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_OB_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ob_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ob_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_de_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_de_config *config){
+                    struct ia_css_de_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_de_config() enter: config=%p\n",
+                           config);
 
        *config = params->de_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_de_config() leave\n");
        ia_css_de_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1754,7 +1998,7 @@ ia_css_get_de_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_de_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_de_config *config)
+                    const struct ia_css_de_config *config)
 {
        if (!config)
                return;
@@ -1768,24 +2012,28 @@ ia_css_set_de_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_DE_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_de_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_de_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_anr_config *config){
+                     struct ia_css_anr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr_config() enter: config=%p\n",
+                           config);
 
        *config = params->anr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr_config() leave\n");
        ia_css_anr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1793,7 +2041,7 @@ ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_anr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_config *config)
+                     const struct ia_css_anr_config *config)
 {
        if (!config)
                return;
@@ -1807,24 +2055,28 @@ ia_css_set_anr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_ANR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_anr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_anr_thres *config){
+                      struct ia_css_anr_thres *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr2_config() enter: config=%p\n",
+                           config);
 
        *config = params->anr_thres;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr2_config() leave\n");
        ia_css_anr2_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1832,7 +2084,7 @@ ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_thres *config)
+                      const struct ia_css_anr_thres *config)
 {
        if (!config)
                return;
@@ -1846,24 +2098,28 @@ ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_ANR2_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr2_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_anr2_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ce_config *config){
+                    struct ia_css_ce_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ce_config() enter: config=%p\n",
+                           config);
 
        *config = params->ce_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ce_config() leave\n");
        ia_css_ce_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1871,7 +2127,7 @@ ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ce_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ce_config *config)
+                    const struct ia_css_ce_config *config)
 {
        if (!config)
                return;
@@ -1885,24 +2141,28 @@ ia_css_set_ce_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CE_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ce_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ce_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ecd_config *config){
+                     struct ia_css_ecd_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ecd_config() enter: config=%p\n",
+                           config);
 
        *config = params->ecd_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ecd_config() leave\n");
        ia_css_ecd_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1910,7 +2170,7 @@ ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ecd_config *config)
+                     const struct ia_css_ecd_config *config)
 {
        if (!config)
                return;
@@ -1924,24 +2184,28 @@ ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_ECD_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ecd_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ecd_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ynr_config *config){
+                     struct ia_css_ynr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ynr_config() enter: config=%p\n",
+                           config);
 
        *config = params->ynr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ynr_config() leave\n");
        ia_css_ynr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1949,7 +2213,7 @@ ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ynr_config *config)
+                     const struct ia_css_ynr_config *config)
 {
        if (!config)
                return;
@@ -1963,24 +2227,28 @@ ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_YNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ynr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ynr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_fc_config *config){
+                    struct ia_css_fc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_fc_config() enter: config=%p\n",
+                           config);
 
        *config = params->fc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_fc_config() leave\n");
        ia_css_fc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1988,7 +2256,7 @@ ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_fc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_fc_config *config)
+                    const struct ia_css_fc_config *config)
 {
        if (!config)
                return;
@@ -2002,24 +2270,28 @@ ia_css_set_fc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_FC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_fc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_fc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cnr_config *config){
+                     struct ia_css_cnr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_cnr_config() enter: config=%p\n",
+                           config);
 
        *config = params->cnr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_cnr_config() leave\n");
        ia_css_cnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2027,7 +2299,7 @@ ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cnr_config *config)
+                     const struct ia_css_cnr_config *config)
 {
        if (!config)
                return;
@@ -2041,24 +2313,28 @@ ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_cnr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_cnr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_macc_config *config){
+                      struct ia_css_macc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_macc_config() enter: config=%p\n",
+                           config);
 
        *config = params->macc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_macc_config() leave\n");
        ia_css_macc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2066,7 +2342,7 @@ ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_macc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_macc_config *config)
+                      const struct ia_css_macc_config *config)
 {
        if (!config)
                return;
@@ -2080,24 +2356,28 @@ ia_css_set_macc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_MACC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_macc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_macc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ctc_config *config){
+                     struct ia_css_ctc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ctc_config() enter: config=%p\n",
+                           config);
 
        *config = params->ctc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ctc_config() leave\n");
        ia_css_ctc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2105,7 +2385,7 @@ ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ctc_config *config)
+                     const struct ia_css_ctc_config *config)
 {
        if (!config)
                return;
@@ -2119,31 +2399,35 @@ ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CTC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ctc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ctc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_aa_config *config){
+                    struct ia_css_aa_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_aa_config() enter: config=%p\n",
+                           config);
 
        *config = params->aa_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_aa_config() leave\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_aa_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_aa_config *config)
+                    const struct ia_css_aa_config *config)
 {
        if (!config)
                return;
@@ -2156,24 +2440,28 @@ ia_css_set_aa_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_AA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_aa_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_aa_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cc_config *config){
+                         struct ia_css_cc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_yuv2rgb_config() enter: config=%p\n",
+                           config);
 
        *config = params->yuv2rgb_cc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_yuv2rgb_config() leave\n");
        ia_css_yuv2rgb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2181,7 +2469,7 @@ ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config)
+                         const struct ia_css_cc_config *config)
 {
        if (!config)
                return;
@@ -2195,24 +2483,28 @@ ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_YUV2RGB_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_yuv2rgb_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_yuv2rgb_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cc_config *config){
+                         struct ia_css_cc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_rgb2yuv_config() enter: config=%p\n",
+                           config);
 
        *config = params->rgb2yuv_cc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_rgb2yuv_config() leave\n");
        ia_css_rgb2yuv_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2220,7 +2512,7 @@ ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config)
+                         const struct ia_css_cc_config *config)
 {
        if (!config)
                return;
@@ -2234,24 +2526,28 @@ ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_RGB2YUV_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_rgb2yuv_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_rgb2yuv_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cc_config *config){
+                     struct ia_css_cc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_csc_config() enter: config=%p\n",
+                           config);
 
        *config = params->cc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_csc_config() leave\n");
        ia_css_csc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2259,7 +2555,7 @@ ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_csc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config)
+                     const struct ia_css_cc_config *config)
 {
        if (!config)
                return;
@@ -2273,24 +2569,28 @@ ia_css_set_csc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CSC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_csc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_csc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_nr_config *config){
+                    struct ia_css_nr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_nr_config() enter: config=%p\n",
+                           config);
 
        *config = params->nr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_nr_config() leave\n");
        ia_css_nr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2298,7 +2598,7 @@ ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_nr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_nr_config *config)
+                    const struct ia_css_nr_config *config)
 {
        if (!config)
                return;
@@ -2313,24 +2613,28 @@ ia_css_set_nr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_NR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_nr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_nr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_gc_config *config){
+                    struct ia_css_gc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_gc_config() enter: config=%p\n",
+                           config);
 
        *config = params->gc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_gc_config() leave\n");
        ia_css_gc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2338,7 +2642,7 @@ ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_gc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_gc_config *config)
+                    const struct ia_css_gc_config *config)
 {
        if (!config)
                return;
@@ -2352,24 +2656,28 @@ ia_css_set_gc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_GC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_gc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_gc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horicoef_config() leave\n");
        ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2377,13 +2685,14 @@ ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horicoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_horicoef_config() enter:\n");
        ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2394,24 +2703,28 @@ ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horicoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_horicoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertcoef_config() leave\n");
        ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2419,13 +2732,14 @@ ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertcoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_vertcoef_config() enter:\n");
        ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2436,24 +2750,28 @@ ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_VERTCOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horiproj_config() leave\n");
        ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2461,13 +2779,14 @@ ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horiproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_horiproj_config() enter:\n");
        ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2478,24 +2797,28 @@ ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_HORIPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horiproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_horiproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertproj_config() leave\n");
        ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2503,13 +2826,14 @@ ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_vertproj_config() enter:\n");
        ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2520,24 +2844,28 @@ ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_VERTPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_vertproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horicoef_config() leave\n");
        ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2545,13 +2873,14 @@ ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horicoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_horicoef_config() enter:\n");
        ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2562,24 +2891,28 @@ ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertcoef_config() leave\n");
        ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2587,13 +2920,14 @@ ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertcoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_vertcoef_config() enter:\n");
        ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2604,24 +2938,28 @@ ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_VERTCOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horiproj_config() leave\n");
        ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2629,13 +2967,14 @@ ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horiproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_horiproj_config() enter:\n");
        ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2646,24 +2985,28 @@ ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_HORIPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertproj_config() leave\n");
        ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2671,13 +3014,14 @@ ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_vertproj_config() enter:\n");
        ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2688,24 +3032,28 @@ ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_VERTPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_rgb_gamma_table *config){
+                         struct ia_css_rgb_gamma_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_r_gamma_config() enter: config=%p\n",
+                           config);
 
        *config = params->r_gamma_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_r_gamma_config() leave\n");
        ia_css_r_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2713,7 +3061,7 @@ ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config)
+                         const struct ia_css_rgb_gamma_table *config)
 {
        if (!config)
                return;
@@ -2727,24 +3075,28 @@ ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_R_GAMMA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_r_gamma_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_r_gamma_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_rgb_gamma_table *config){
+                         struct ia_css_rgb_gamma_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_g_gamma_config() enter: config=%p\n",
+                           config);
 
        *config = params->g_gamma_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_g_gamma_config() leave\n");
        ia_css_g_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2752,7 +3104,7 @@ ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config)
+                         const struct ia_css_rgb_gamma_table *config)
 {
        if (!config)
                return;
@@ -2766,24 +3118,28 @@ ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_G_GAMMA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_g_gamma_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_g_gamma_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_rgb_gamma_table *config){
+                         struct ia_css_rgb_gamma_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_b_gamma_config() enter: config=%p\n",
+                           config);
 
        *config = params->b_gamma_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_b_gamma_config() leave\n");
        ia_css_b_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2791,7 +3147,7 @@ ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config)
+                         const struct ia_css_rgb_gamma_table *config)
 {
        if (!config)
                return;
@@ -2805,24 +3161,28 @@ ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_B_GAMMA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_b_gamma_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_b_gamma_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_xnr_table *config){
+                           struct ia_css_xnr_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_table_config() enter: config=%p\n",
+                           config);
 
        *config = params->xnr_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_table_config() leave\n");
        ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2830,13 +3190,14 @@ ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_table *config)
+                           const struct ia_css_xnr_table *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr_table_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_xnr_table_config() enter:\n");
        ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->xnr_table = *config;
        params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
@@ -2844,24 +3205,28 @@ ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_table_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_xnr_table_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_formats_config *config){
+                         struct ia_css_formats_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_formats_config() enter: config=%p\n",
+                           config);
 
        *config = params->formats_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_formats_config() leave\n");
        ia_css_formats_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2869,7 +3234,7 @@ ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_formats_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_formats_config *config)
+                         const struct ia_css_formats_config *config)
 {
        if (!config)
                return;
@@ -2883,24 +3248,28 @@ ia_css_set_formats_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_FORMATS_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_formats_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_formats_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_xnr_config *config){
+                     struct ia_css_xnr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_config() enter: config=%p\n",
+                           config);
 
        *config = params->xnr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_config() leave\n");
        ia_css_xnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2908,7 +3277,7 @@ ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_config *config)
+                     const struct ia_css_xnr_config *config)
 {
        if (!config)
                return;
@@ -2922,24 +3291,28 @@ ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_XNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_xnr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_xnr3_config *config){
+                      struct ia_css_xnr3_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr3_config() enter: config=%p\n",
+                           config);
 
        *config = params->xnr3_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr3_config() leave\n");
        ia_css_xnr3_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2947,7 +3320,7 @@ ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr3_config *config)
+                      const struct ia_css_xnr3_config *config)
 {
        if (!config)
                return;
@@ -2961,24 +3334,28 @@ ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_XNR3_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr3_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_xnr3_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_3a_config *config){
+                     struct ia_css_3a_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_s3a_config() enter: config=%p\n",
+                           config);
 
        *config = params->s3a_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_s3a_config() leave\n");
        ia_css_s3a_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2986,7 +3363,7 @@ ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_3a_config *config)
+                     const struct ia_css_3a_config *config)
 {
        if (!config)
                return;
@@ -3001,24 +3378,28 @@ ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_S3A_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_s3a_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_s3a_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_output_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_output_config *config){
+                        struct ia_css_output_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_output_config() enter: config=%p\n",
+                           config);
 
        *config = params->output_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_output_config() leave\n");
        ia_css_output_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -3026,7 +3407,7 @@ ia_css_get_output_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_output_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_output_config *config)
+                        const struct ia_css_output_config *config)
 {
        if (!config)
                return;
@@ -3040,14 +3421,15 @@ ia_css_set_output_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_OUTPUT_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_output_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_output_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_global_access_function() */
 
 void
 ia_css_get_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 {
        ia_css_get_dp_config(params, config->dp_config);
        ia_css_get_wb_config(params, config->wb_config);
@@ -3092,7 +3474,7 @@ ia_css_get_configs(struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 {
        ia_css_set_dp_config(params, config->dp_config);
        ia_css_set_wb_config(params, config->wb_config);
index b5175c253c61d02ed224fe86a9743d1da5e87e4e..7b81ffa29d8bd737d257a22378e21fb56839fbf2 100644 (file)
@@ -150,237 +150,237 @@ struct ia_css_memory_offsets {
 struct ia_css_pipeline_stage; /* forward declaration */
 
 extern void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
-                       unsigned int pipe_id,
-                       const struct ia_css_pipeline_stage *stage,
-                       struct ia_css_isp_parameters *params);
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_dp_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dp_config *config);
+                    const struct ia_css_dp_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_wb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_wb_config *config);
+                    const struct ia_css_wb_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_tnr_config *config);
+                     const struct ia_css_tnr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ob_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ob_config *config);
+                    const struct ia_css_ob_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_de_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_de_config *config);
+                    const struct ia_css_de_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_anr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_config *config);
+                     const struct ia_css_anr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_thres *config);
+                      const struct ia_css_anr_thres *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ce_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ce_config *config);
+                    const struct ia_css_ce_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ecd_config *config);
+                     const struct ia_css_ecd_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ynr_config *config);
+                     const struct ia_css_ynr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_fc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_fc_config *config);
+                    const struct ia_css_fc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cnr_config *config);
+                     const struct ia_css_cnr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_macc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_macc_config *config);
+                      const struct ia_css_macc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ctc_config *config);
+                     const struct ia_css_ctc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_aa_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_aa_config *config);
+                    const struct ia_css_aa_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config);
+                         const struct ia_css_cc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config);
+                         const struct ia_css_cc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_csc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config);
+                     const struct ia_css_cc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_nr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_nr_config *config);
+                    const struct ia_css_nr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_gc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_gc_config *config);
+                    const struct ia_css_gc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config);
+                         const struct ia_css_rgb_gamma_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config);
+                         const struct ia_css_rgb_gamma_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config);
+                         const struct ia_css_rgb_gamma_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_table *config);
+                           const struct ia_css_xnr_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_formats_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_formats_config *config);
+                         const struct ia_css_formats_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_config *config);
+                     const struct ia_css_xnr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr3_config *config);
+                      const struct ia_css_xnr3_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_3a_config *config);
+                     const struct ia_css_3a_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_output_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_output_config *config);
+                        const struct ia_css_output_config *config);
 
 /* Code generated by genparam/gencode.c:gen_global_access_function() */
 
 void
 ia_css_get_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 ;
 #ifdef ISP2401
 
@@ -389,7 +389,7 @@ ia_css_get_configs(struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 ;
 #ifdef ISP2401
 
index dcc42c1ce94ef2f19b9026dc14017c21ebd8319c..c54787f3fc2445cea1918347700704be3b723525 100644 (file)
 
 static void
 ia_css_initialize_aa_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_aa_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.aa.size;
                unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
 
                if (size)
-                       memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset], 0, size);
+                       memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                              0, size);
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_aa_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_cnr_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
@@ -52,20 +56,22 @@ ia_css_initialize_cnr_state(
 
                if (size) {
                        ia_css_init_cnr_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_cnr2_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr2_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
@@ -74,20 +80,22 @@ ia_css_initialize_cnr2_state(
 
                if (size) {
                        ia_css_init_cnr2_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr2_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_dp_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_dp_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.dp.size;
@@ -96,20 +104,22 @@ ia_css_initialize_dp_state(
 
                if (size) {
                        ia_css_init_dp_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_dp_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_de_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_de_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.de.size;
@@ -118,20 +128,22 @@ ia_css_initialize_de_state(
 
                if (size) {
                        ia_css_init_de_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_de_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_tnr_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_tnr_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
@@ -140,20 +152,22 @@ ia_css_initialize_tnr_state(
 
                if (size) {
                        ia_css_init_tnr_state((struct sh_css_isp_tnr_dmem_state *)
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
-                               size);
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+                                             size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_tnr_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_ref_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ref_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.ref.size;
@@ -162,20 +176,22 @@ ia_css_initialize_ref_state(
 
                if (size) {
                        ia_css_init_ref_state((struct sh_css_isp_ref_dmem_state *)
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
-                               size);
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+                                             size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ref_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_ynr_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ynr_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
@@ -184,16 +200,18 @@ ia_css_initialize_ynr_state(
 
                if (size) {
                        ia_css_init_ynr_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ynr_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_state_init_table() */
 
-void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary) = {
+void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+    const struct ia_css_binary *binary) = {
        ia_css_initialize_aa_state,
        ia_css_initialize_cnr_state,
        ia_css_initialize_cnr2_state,
index 732adafb0a633d463d04adcf7b1f9529cddd69e2..cc9cdcd0e2be825421f0bebad0eaa9b7bd7d0902 100644 (file)
@@ -65,7 +65,8 @@ struct ia_css_state_memory_offsets {
 #include "ia_css_binary.h"   /* struct ia_css_binary */
 /* Code generated by genparam/genstate.c:gen_state_init_table() */
 
-extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary);
+extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+    const struct ia_css_binary *binary);
 
 #endif /* IA_CSS_INCLUDE_STATE */
 
index c8bcef24d7c28b2e9a0680ab021ee4bd1ea112f3..940e79c7e33782bc301fe31a03326a2111a3e9ab 100644 (file)
  * Refer to "csi_rx_public.h" for details.
  */
 static inline void csi_rx_fe_ctrl_get_state(
-               const csi_rx_frontend_ID_t ID,
-               csi_rx_fe_ctrl_state_t *state)
+    const csi_rx_frontend_ID_t ID,
+    csi_rx_fe_ctrl_state_t *state)
 {
        u32 i;
 
        state->enable =
-               csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_ENABLE_REG_IDX);
+           csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_ENABLE_REG_IDX);
        state->nof_enable_lanes =
-               csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_NOF_ENABLED_LANES_REG_IDX);
+           csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_NOF_ENABLED_LANES_REG_IDX);
        state->error_handling =
-               csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_ERROR_HANDLING_REG_IDX);
+           csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_ERROR_HANDLING_REG_IDX);
        state->status =
-               csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_REG_IDX);
+           csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_REG_IDX);
        state->status_dlane_hs =
-               csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_DLANE_HS_REG_IDX);
+           csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_DLANE_HS_REG_IDX);
        state->status_dlane_lp =
-               csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_DLANE_LP_REG_IDX);
+           csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_DLANE_LP_REG_IDX);
        state->clane.termen =
-               csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_TERMEN_CLANE_REG_IDX);
+           csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_TERMEN_CLANE_REG_IDX);
        state->clane.settle =
-               csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_SETTLE_CLANE_REG_IDX);
+           csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_SETTLE_CLANE_REG_IDX);
 
        /*
         * Get the values of the register-set per
@@ -62,9 +62,9 @@ static inline void csi_rx_fe_ctrl_get_state(
         */
        for (i = 0; i < N_CSI_RX_FE_CTRL_DLANES[ID]; i++) {
                csi_rx_fe_ctrl_get_dlane_state(
-                               ID,
-                               i,
-                               &state->dlane[i]);
+                   ID,
+                   i,
+                   &state->dlane[i]);
        }
 }
 
@@ -73,14 +73,14 @@ static inline void csi_rx_fe_ctrl_get_state(
  * Refer to "csi_rx_public.h" for details.
  */
 static inline void csi_rx_fe_ctrl_get_dlane_state(
-               const csi_rx_frontend_ID_t ID,
-               const u32 lane,
-               csi_rx_fe_ctrl_lane_t *dlane_state)
+    const csi_rx_frontend_ID_t ID,
+    const u32 lane,
+    csi_rx_fe_ctrl_lane_t *dlane_state)
 {
        dlane_state->termen =
-               csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_TERMEN_DLANE_REG_IDX(lane));
+           csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_TERMEN_DLANE_REG_IDX(lane));
        dlane_state->settle =
-               csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_SETTLE_DLANE_REG_IDX(lane));
+           csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_SETTLE_DLANE_REG_IDX(lane));
 }
 
 /**
@@ -88,27 +88,36 @@ static inline void csi_rx_fe_ctrl_get_dlane_state(
  * Refer to "csi_rx_public.h" for details.
  */
 static inline void csi_rx_fe_ctrl_dump_state(
-               const csi_rx_frontend_ID_t ID,
-               csi_rx_fe_ctrl_state_t *state)
+    const csi_rx_frontend_ID_t ID,
+    csi_rx_fe_ctrl_state_t *state)
 {
        u32 i;
 
-       ia_css_print("CSI RX FE STATE Controller %d Enable state 0x%x\n", ID, state->enable);
-       ia_css_print("CSI RX FE STATE Controller %d No Of enable lanes 0x%x\n", ID, state->nof_enable_lanes);
-       ia_css_print("CSI RX FE STATE Controller %d Error handling 0x%x\n", ID, state->error_handling);
+       ia_css_print("CSI RX FE STATE Controller %d Enable state 0x%x\n", ID,
+                    state->enable);
+       ia_css_print("CSI RX FE STATE Controller %d No Of enable lanes 0x%x\n", ID,
+                    state->nof_enable_lanes);
+       ia_css_print("CSI RX FE STATE Controller %d Error handling 0x%x\n", ID,
+                    state->error_handling);
        ia_css_print("CSI RX FE STATE Controller %d Status 0x%x\n", ID, state->status);
-       ia_css_print("CSI RX FE STATE Controller %d Status Dlane HS 0x%x\n", ID, state->status_dlane_hs);
-       ia_css_print("CSI RX FE STATE Controller %d Status Dlane LP 0x%x\n", ID, state->status_dlane_lp);
-       ia_css_print("CSI RX FE STATE Controller %d Status term enable LP 0x%x\n", ID, state->clane.termen);
-       ia_css_print("CSI RX FE STATE Controller %d Status term settle LP 0x%x\n", ID, state->clane.settle);
+       ia_css_print("CSI RX FE STATE Controller %d Status Dlane HS 0x%x\n", ID,
+                    state->status_dlane_hs);
+       ia_css_print("CSI RX FE STATE Controller %d Status Dlane LP 0x%x\n", ID,
+                    state->status_dlane_lp);
+       ia_css_print("CSI RX FE STATE Controller %d Status term enable LP 0x%x\n", ID,
+                    state->clane.termen);
+       ia_css_print("CSI RX FE STATE Controller %d Status term settle LP 0x%x\n", ID,
+                    state->clane.settle);
 
        /*
         * Get the values of the register-set per
         * dlane.
         */
        for (i = 0; i < N_CSI_RX_FE_CTRL_DLANES[ID]; i++) {
-               ia_css_print("CSI RX FE STATE Controller %d DLANE ID %d termen 0x%x\n", ID, i, state->dlane[i].termen);
-               ia_css_print("CSI RX FE STATE Controller %d DLANE ID %d settle 0x%x\n", ID, i, state->dlane[i].settle);
+               ia_css_print("CSI RX FE STATE Controller %d DLANE ID %d termen 0x%x\n", ID, i,
+                            state->dlane[i].termen);
+               ia_css_print("CSI RX FE STATE Controller %d DLANE ID %d settle 0x%x\n", ID, i,
+                            state->dlane[i].settle);
        }
 }
 
@@ -117,61 +126,61 @@ static inline void csi_rx_fe_ctrl_dump_state(
  * Refer to "csi_rx_public.h" for details.
  */
 static inline void csi_rx_be_ctrl_get_state(
-               const csi_rx_backend_ID_t ID,
-               csi_rx_be_ctrl_state_t *state)
+    const csi_rx_backend_ID_t ID,
+    csi_rx_be_ctrl_state_t *state)
 {
        u32 i;
 
        state->enable =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_ENABLE_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_ENABLE_REG_IDX);
 
        state->status =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_STATUS_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_STATUS_REG_IDX);
 
        for (i = 0; i < N_CSI_RX_BE_MIPI_COMP_FMT_REG ; i++) {
                state->comp_format_reg[i] =
-                       csi_rx_be_ctrl_reg_load(ID,
-                                               _HRT_MIPI_BACKEND_COMP_FORMAT_REG0_IDX + i);
+                   csi_rx_be_ctrl_reg_load(ID,
+                                           _HRT_MIPI_BACKEND_COMP_FORMAT_REG0_IDX + i);
        }
 
        state->raw16 =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_RAW16_CONFIG_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_RAW16_CONFIG_REG_IDX);
 
        state->raw18 =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_RAW18_CONFIG_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_RAW18_CONFIG_REG_IDX);
        state->force_raw8 =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_FORCE_RAW8_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_FORCE_RAW8_REG_IDX);
        state->irq_status =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_IRQ_STATUS_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_IRQ_STATUS_REG_IDX);
 #if 0 /* device access error for these registers */
        /* ToDo: rootcause this failure */
        state->custom_mode_enable =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_EN_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_EN_REG_IDX);
 
        state->custom_mode_data_state =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_DATA_STATE_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_DATA_STATE_REG_IDX);
        for (i = 0; i < N_CSI_RX_BE_MIPI_CUSTOM_PEC ; i++) {
                state->pec[i] =
-                       csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_PIX_EXT_S0P0_REG_IDX + i);
+                   csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_PIX_EXT_S0P0_REG_IDX + i);
        }
        state->custom_mode_valid_eop_config =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_REG_IDX);
 #endif
        state->global_lut_disregard_reg =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_GLOBAL_LUT_DISREGARD_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_GLOBAL_LUT_DISREGARD_REG_IDX);
        state->packet_status_stall =
-               csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_PKT_STALL_STATUS_REG_IDX);
+           csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_PKT_STALL_STATUS_REG_IDX);
        /*
         * Get the values of the register-set per
         * lut.
         */
        for (i = 0; i < N_SHORT_PACKET_LUT_ENTRIES[ID]; i++) {
                state->short_packet_lut_entry[i] =
-                       csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_SP_LUT_ENTRY_0_REG_IDX + i);
+                   csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_SP_LUT_ENTRY_0_REG_IDX + i);
        }
        for (i = 0; i < N_LONG_PACKET_LUT_ENTRIES[ID]; i++) {
                state->long_packet_lut_entry[i] =
-                       csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_LP_LUT_ENTRY_0_REG_IDX + i);
+                   csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_LP_LUT_ENTRY_0_REG_IDX + i);
        }
 }
 
@@ -180,8 +189,8 @@ static inline void csi_rx_be_ctrl_get_state(
  * Refer to "csi_rx_public.h" for details.
  */
 static inline void csi_rx_be_ctrl_dump_state(
-               const csi_rx_backend_ID_t ID,
-               csi_rx_be_ctrl_state_t *state)
+    const csi_rx_backend_ID_t ID,
+    csi_rx_be_ctrl_state_t *state)
 {
        u32 i;
 
@@ -189,28 +198,38 @@ static inline void csi_rx_be_ctrl_dump_state(
        ia_css_print("CSI RX BE STATE Controller %d Status 0x%x\n", ID, state->status);
 
        for (i = 0; i < N_CSI_RX_BE_MIPI_COMP_FMT_REG ; i++) {
-               ia_css_print("CSI RX BE STATE Controller %d comp format reg vc%d value 0x%x\n", ID, i, state->status);
+               ia_css_print("CSI RX BE STATE Controller %d comp format reg vc%d value 0x%x\n",
+                            ID, i, state->status);
        }
        ia_css_print("CSI RX BE STATE Controller %d RAW16 0x%x\n", ID, state->raw16);
        ia_css_print("CSI RX BE STATE Controller %d RAW18 0x%x\n", ID, state->raw18);
-       ia_css_print("CSI RX BE STATE Controller %d Force RAW8 0x%x\n", ID, state->force_raw8);
-       ia_css_print("CSI RX BE STATE Controller %d IRQ state 0x%x\n", ID, state->irq_status);
+       ia_css_print("CSI RX BE STATE Controller %d Force RAW8 0x%x\n", ID,
+                    state->force_raw8);
+       ia_css_print("CSI RX BE STATE Controller %d IRQ state 0x%x\n", ID,
+                    state->irq_status);
 #if 0   /* ToDo:Getting device access error for this register */
        for (i = 0; i < N_CSI_RX_BE_MIPI_CUSTOM_PEC ; i++) {
-               ia_css_print("CSI RX BE STATE Controller %d PEC ID %d custom pec 0x%x\n", ID, i, state->pec[i]);
+               ia_css_print("CSI RX BE STATE Controller %d PEC ID %d custom pec 0x%x\n", ID, i,
+                            state->pec[i]);
        }
 #endif
-       ia_css_print("CSI RX BE STATE Controller %d Global LUT disregard reg 0x%x\n", ID, state->global_lut_disregard_reg);
-       ia_css_print("CSI RX BE STATE Controller %d packet stall reg 0x%x\n", ID, state->packet_status_stall);
+       ia_css_print("CSI RX BE STATE Controller %d Global LUT disregard reg 0x%x\n",
+                    ID, state->global_lut_disregard_reg);
+       ia_css_print("CSI RX BE STATE Controller %d packet stall reg 0x%x\n", ID,
+                    state->packet_status_stall);
        /*
         * Get the values of the register-set per
         * lut.
         */
        for (i = 0; i < N_SHORT_PACKET_LUT_ENTRIES[ID]; i++) {
-               ia_css_print("CSI RX BE STATE Controller ID %d Short packat entry %d shart packet lut id 0x%x\n", ID, i, state->short_packet_lut_entry[i]);
+               ia_css_print("CSI RX BE STATE Controller ID %d Short packat entry %d shart packet lut id 0x%x\n",
+                            ID, i,
+                            state->short_packet_lut_entry[i]);
        }
        for (i = 0; i < N_LONG_PACKET_LUT_ENTRIES[ID]; i++) {
-               ia_css_print("CSI RX BE STATE Controller ID %d Long packat entry %d Long packet lut id 0x%x\n", ID, i, state->long_packet_lut_entry[i]);
+               ia_css_print("CSI RX BE STATE Controller ID %d Long packat entry %d Long packet lut id 0x%x\n",
+                            ID, i,
+                            state->long_packet_lut_entry[i]);
        }
 }
 
@@ -225,12 +244,13 @@ static inline void csi_rx_be_ctrl_dump_state(
  * Refer to "csi_rx_public.h" for details.
  */
 static inline hrt_data csi_rx_fe_ctrl_reg_load(
-       const csi_rx_frontend_ID_t ID,
-       const hrt_address reg)
+    const csi_rx_frontend_ID_t ID,
+    const hrt_address reg)
 {
        assert(ID < N_CSI_RX_FRONTEND_ID);
        assert(CSI_RX_FE_CTRL_BASE[ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(CSI_RX_FE_CTRL_BASE[ID] + reg * sizeof(hrt_data));
+       return ia_css_device_load_uint32(CSI_RX_FE_CTRL_BASE[ID] + reg * sizeof(
+                                            hrt_data));
 }
 
 /**
@@ -238,14 +258,15 @@ static inline hrt_data csi_rx_fe_ctrl_reg_load(
  * Refer to "ibuf_ctrl_public.h" for details.
  */
 static inline void csi_rx_fe_ctrl_reg_store(
-       const csi_rx_frontend_ID_t ID,
-       const hrt_address reg,
-       const hrt_data value)
+    const csi_rx_frontend_ID_t ID,
+    const hrt_address reg,
+    const hrt_data value)
 {
        assert(ID < N_CSI_RX_FRONTEND_ID);
        assert(CSI_RX_FE_CTRL_BASE[ID] != (hrt_address)-1);
 
-       ia_css_device_store_uint32(CSI_RX_FE_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
+       ia_css_device_store_uint32(CSI_RX_FE_CTRL_BASE[ID] + reg * sizeof(hrt_data),
+                                  value);
 }
 
 /**
@@ -253,12 +274,13 @@ static inline void csi_rx_fe_ctrl_reg_store(
  * Refer to "csi_rx_public.h" for details.
  */
 static inline hrt_data csi_rx_be_ctrl_reg_load(
-       const csi_rx_backend_ID_t ID,
-       const hrt_address reg)
+    const csi_rx_backend_ID_t ID,
+    const hrt_address reg)
 {
        assert(ID < N_CSI_RX_BACKEND_ID);
        assert(CSI_RX_BE_CTRL_BASE[ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg * sizeof(hrt_data));
+       return ia_css_device_load_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg * sizeof(
+                                            hrt_data));
 }
 
 /**
@@ -266,14 +288,15 @@ static inline hrt_data csi_rx_be_ctrl_reg_load(
  * Refer to "ibuf_ctrl_public.h" for details.
  */
 static inline void csi_rx_be_ctrl_reg_store(
-       const csi_rx_backend_ID_t ID,
-       const hrt_address reg,
-       const hrt_data value)
+    const csi_rx_backend_ID_t ID,
+    const hrt_address reg,
+    const hrt_data value)
 {
        assert(ID < N_CSI_RX_BACKEND_ID);
        assert(CSI_RX_BE_CTRL_BASE[ID] != (hrt_address)-1);
 
-       ia_css_device_store_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
+       ia_css_device_store_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg * sizeof(hrt_data),
+                                  value);
 }
 
 /* end of DLI */
index 5fda64313935db0c54fce41fffeb3a001ee5b8e0..a0800a5df68a7a10af52daeaed7b68616c76b19b 100644 (file)
  * Refer to "ibuf_ctrl_public.h" for details.
  */
 STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_state(
-               const ibuf_ctrl_ID_t ID,
-               ibuf_ctrl_state_t *state)
+    const ibuf_ctrl_ID_t ID,
+    ibuf_ctrl_state_t *state)
 {
        u32 i;
 
        state->recalc_words =
-               ibuf_ctrl_reg_load(ID, _IBUF_CNTRL_RECALC_WORDS_STATUS);
+           ibuf_ctrl_reg_load(ID, _IBUF_CNTRL_RECALC_WORDS_STATUS);
        state->arbiters =
-               ibuf_ctrl_reg_load(ID, _IBUF_CNTRL_ARBITERS_STATUS);
+           ibuf_ctrl_reg_load(ID, _IBUF_CNTRL_ARBITERS_STATUS);
 
        /*
         * Get the values of the register-set per
@@ -48,9 +48,9 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_state(
         */
        for (i = 0; i < N_IBUF_CTRL_PROCS[ID]; i++) {
                ibuf_ctrl_get_proc_state(
-                               ID,
-                               i,
-                               &state->proc_state[i]);
+                   ID,
+                   i,
+                   &state->proc_state[i]);
        }
 }
 
@@ -59,92 +59,92 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_state(
  * Refer to "ibuf_ctrl_public.h" for details.
  */
 STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_proc_state(
-               const ibuf_ctrl_ID_t ID,
-               const u32 proc_id,
-               ibuf_ctrl_proc_state_t  *state)
+    const ibuf_ctrl_ID_t ID,
+    const u32 proc_id,
+    ibuf_ctrl_proc_state_t     *state)
 {
        hrt_address reg_bank_offset;
 
        reg_bank_offset =
-               _IBUF_CNTRL_PROC_REG_ALIGN * (1 + proc_id);
+           _IBUF_CNTRL_PROC_REG_ALIGN * (1 + proc_id);
 
        state->num_items =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_NUM_ITEMS_PER_STORE);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_NUM_ITEMS_PER_STORE);
 
        state->num_stores =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_NUM_STORES_PER_FRAME);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_NUM_STORES_PER_FRAME);
 
        state->dma_channel =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_CHANNEL);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_CHANNEL);
 
        state->dma_command =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_CMD);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_CMD);
 
        state->ibuf_st_addr =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_START_ADDRESS);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_START_ADDRESS);
 
        state->ibuf_stride =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_STRIDE);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_STRIDE);
 
        state->ibuf_end_addr =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_END_ADDRESS);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_END_ADDRESS);
 
        state->dest_st_addr =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_START_ADDRESS);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_START_ADDRESS);
 
        state->dest_stride =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_STRIDE);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_STRIDE);
 
        state->dest_end_addr =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_END_ADDRESS);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_END_ADDRESS);
 
        state->sync_frame =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_SYNC_FRAME);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_SYNC_FRAME);
 
        state->sync_command =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_STR2MMIO_SYNC_CMD);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_STR2MMIO_SYNC_CMD);
 
        state->store_command =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_STR2MMIO_STORE_CMD);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_STR2MMIO_STORE_CMD);
 
        state->shift_returned_items =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_SHIFT_ITEMS);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_SHIFT_ITEMS);
 
        state->elems_ibuf =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ELEMS_P_WORD_IBUF);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ELEMS_P_WORD_IBUF);
 
        state->elems_dest =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ELEMS_P_WORD_DEST);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ELEMS_P_WORD_DEST);
 
        state->cur_stores =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_STORES);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_STORES);
 
        state->cur_acks =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_ACKS);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_ACKS);
 
        state->cur_s2m_ibuf_addr =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_S2M_IBUF_ADDR);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_S2M_IBUF_ADDR);
 
        state->cur_dma_ibuf_addr =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_DMA_IBUF_ADDR);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_DMA_IBUF_ADDR);
 
        state->cur_dma_dest_addr =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_DMA_DEST_ADDR);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_DMA_DEST_ADDR);
 
        state->cur_isp_dest_addr =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_ISP_DEST_ADDR);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_ISP_DEST_ADDR);
 
        state->dma_cmds_send =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_NR_DMA_CMDS_SEND);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_NR_DMA_CMDS_SEND);
 
        state->main_cntrl_state =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_MAIN_CNTRL_STATE);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_MAIN_CNTRL_STATE);
 
        state->dma_sync_state =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_SYNC_STATE);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_SYNC_STATE);
 
        state->isp_sync_state =
-               ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ISP_SYNC_STATE);
+           ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ISP_SYNC_STATE);
 }
 
 /**
@@ -152,12 +152,13 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_proc_state(
  * Refer to "ibuf_ctrl_public.h" for details.
  */
 STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_dump_state(
-               const ibuf_ctrl_ID_t ID,
-               ibuf_ctrl_state_t *state)
+    const ibuf_ctrl_ID_t ID,
+    ibuf_ctrl_state_t *state)
 {
        u32 i;
 
-       ia_css_print("IBUF controller ID %d recalculate words 0x%x\n", ID, state->recalc_words);
+       ia_css_print("IBUF controller ID %d recalculate words 0x%x\n", ID,
+                    state->recalc_words);
        ia_css_print("IBUF controller ID %d arbiters 0x%x\n", ID, state->arbiters);
 
        /*
@@ -165,32 +166,64 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_dump_state(
         * ibuf-controller process.
         */
        for (i = 0; i < N_IBUF_CTRL_PROCS[ID]; i++) {
-               ia_css_print("IBUF controller ID %d Process ID %d num_items 0x%x\n", ID, i, state->proc_state[i].num_items);
-               ia_css_print("IBUF controller ID %d Process ID %d num_stores 0x%x\n", ID, i, state->proc_state[i].num_stores);
-               ia_css_print("IBUF controller ID %d Process ID %d dma_channel 0x%x\n", ID, i, state->proc_state[i].dma_channel);
-               ia_css_print("IBUF controller ID %d Process ID %d dma_command 0x%x\n", ID, i, state->proc_state[i].dma_command);
-               ia_css_print("IBUF controller ID %d Process ID %d ibuf_st_addr 0x%x\n", ID, i, state->proc_state[i].ibuf_st_addr);
-               ia_css_print("IBUF controller ID %d Process ID %d ibuf_stride 0x%x\n", ID, i, state->proc_state[i].ibuf_stride);
-               ia_css_print("IBUF controller ID %d Process ID %d ibuf_end_addr 0x%x\n", ID, i, state->proc_state[i].ibuf_end_addr);
-               ia_css_print("IBUF controller ID %d Process ID %d dest_st_addr 0x%x\n", ID, i, state->proc_state[i].dest_st_addr);
-               ia_css_print("IBUF controller ID %d Process ID %d dest_stride 0x%x\n", ID, i, state->proc_state[i].dest_stride);
-               ia_css_print("IBUF controller ID %d Process ID %d dest_end_addr 0x%x\n", ID, i, state->proc_state[i].dest_end_addr);
-               ia_css_print("IBUF controller ID %d Process ID %d sync_frame 0x%x\n", ID, i, state->proc_state[i].sync_frame);
-               ia_css_print("IBUF controller ID %d Process ID %d sync_command 0x%x\n", ID, i, state->proc_state[i].sync_command);
-               ia_css_print("IBUF controller ID %d Process ID %d store_command 0x%x\n", ID, i, state->proc_state[i].store_command);
-               ia_css_print("IBUF controller ID %d Process ID %d shift_returned_items 0x%x\n", ID, i, state->proc_state[i].shift_returned_items);
-               ia_css_print("IBUF controller ID %d Process ID %d elems_ibuf 0x%x\n", ID, i, state->proc_state[i].elems_ibuf);
-               ia_css_print("IBUF controller ID %d Process ID %d elems_dest 0x%x\n", ID, i, state->proc_state[i].elems_dest);
-               ia_css_print("IBUF controller ID %d Process ID %d cur_stores 0x%x\n", ID, i, state->proc_state[i].cur_stores);
-               ia_css_print("IBUF controller ID %d Process ID %d cur_acks 0x%x\n", ID, i, state->proc_state[i].cur_acks);
-               ia_css_print("IBUF controller ID %d Process ID %d cur_s2m_ibuf_addr 0x%x\n", ID, i, state->proc_state[i].cur_s2m_ibuf_addr);
-               ia_css_print("IBUF controller ID %d Process ID %d cur_dma_ibuf_addr 0x%x\n", ID, i, state->proc_state[i].cur_dma_ibuf_addr);
-               ia_css_print("IBUF controller ID %d Process ID %d cur_dma_dest_addr 0x%x\n", ID, i, state->proc_state[i].cur_dma_dest_addr);
-               ia_css_print("IBUF controller ID %d Process ID %d cur_isp_dest_addr 0x%x\n", ID, i, state->proc_state[i].cur_isp_dest_addr);
-               ia_css_print("IBUF controller ID %d Process ID %d dma_cmds_send 0x%x\n", ID, i, state->proc_state[i].dma_cmds_send);
-               ia_css_print("IBUF controller ID %d Process ID %d main_cntrl_state 0x%x\n", ID, i, state->proc_state[i].main_cntrl_state);
-               ia_css_print("IBUF controller ID %d Process ID %d dma_sync_state 0x%x\n", ID, i, state->proc_state[i].dma_sync_state);
-               ia_css_print("IBUF controller ID %d Process ID %d isp_sync_state 0x%x\n", ID, i, state->proc_state[i].isp_sync_state);
+               ia_css_print("IBUF controller ID %d Process ID %d num_items 0x%x\n", ID, i,
+                            state->proc_state[i].num_items);
+               ia_css_print("IBUF controller ID %d Process ID %d num_stores 0x%x\n", ID, i,
+                            state->proc_state[i].num_stores);
+               ia_css_print("IBUF controller ID %d Process ID %d dma_channel 0x%x\n", ID, i,
+                            state->proc_state[i].dma_channel);
+               ia_css_print("IBUF controller ID %d Process ID %d dma_command 0x%x\n", ID, i,
+                            state->proc_state[i].dma_command);
+               ia_css_print("IBUF controller ID %d Process ID %d ibuf_st_addr 0x%x\n", ID, i,
+                            state->proc_state[i].ibuf_st_addr);
+               ia_css_print("IBUF controller ID %d Process ID %d ibuf_stride 0x%x\n", ID, i,
+                            state->proc_state[i].ibuf_stride);
+               ia_css_print("IBUF controller ID %d Process ID %d ibuf_end_addr 0x%x\n", ID, i,
+                            state->proc_state[i].ibuf_end_addr);
+               ia_css_print("IBUF controller ID %d Process ID %d dest_st_addr 0x%x\n", ID, i,
+                            state->proc_state[i].dest_st_addr);
+               ia_css_print("IBUF controller ID %d Process ID %d dest_stride 0x%x\n", ID, i,
+                            state->proc_state[i].dest_stride);
+               ia_css_print("IBUF controller ID %d Process ID %d dest_end_addr 0x%x\n", ID, i,
+                            state->proc_state[i].dest_end_addr);
+               ia_css_print("IBUF controller ID %d Process ID %d sync_frame 0x%x\n", ID, i,
+                            state->proc_state[i].sync_frame);
+               ia_css_print("IBUF controller ID %d Process ID %d sync_command 0x%x\n", ID, i,
+                            state->proc_state[i].sync_command);
+               ia_css_print("IBUF controller ID %d Process ID %d store_command 0x%x\n", ID, i,
+                            state->proc_state[i].store_command);
+               ia_css_print("IBUF controller ID %d Process ID %d shift_returned_items 0x%x\n",
+                            ID, i,
+                            state->proc_state[i].shift_returned_items);
+               ia_css_print("IBUF controller ID %d Process ID %d elems_ibuf 0x%x\n", ID, i,
+                            state->proc_state[i].elems_ibuf);
+               ia_css_print("IBUF controller ID %d Process ID %d elems_dest 0x%x\n", ID, i,
+                            state->proc_state[i].elems_dest);
+               ia_css_print("IBUF controller ID %d Process ID %d cur_stores 0x%x\n", ID, i,
+                            state->proc_state[i].cur_stores);
+               ia_css_print("IBUF controller ID %d Process ID %d cur_acks 0x%x\n", ID, i,
+                            state->proc_state[i].cur_acks);
+               ia_css_print("IBUF controller ID %d Process ID %d cur_s2m_ibuf_addr 0x%x\n", ID,
+                            i,
+                            state->proc_state[i].cur_s2m_ibuf_addr);
+               ia_css_print("IBUF controller ID %d Process ID %d cur_dma_ibuf_addr 0x%x\n", ID,
+                            i,
+                            state->proc_state[i].cur_dma_ibuf_addr);
+               ia_css_print("IBUF controller ID %d Process ID %d cur_dma_dest_addr 0x%x\n", ID,
+                            i,
+                            state->proc_state[i].cur_dma_dest_addr);
+               ia_css_print("IBUF controller ID %d Process ID %d cur_isp_dest_addr 0x%x\n", ID,
+                            i,
+                            state->proc_state[i].cur_isp_dest_addr);
+               ia_css_print("IBUF controller ID %d Process ID %d dma_cmds_send 0x%x\n", ID, i,
+                            state->proc_state[i].dma_cmds_send);
+               ia_css_print("IBUF controller ID %d Process ID %d main_cntrl_state 0x%x\n", ID,
+                            i,
+                            state->proc_state[i].main_cntrl_state);
+               ia_css_print("IBUF controller ID %d Process ID %d dma_sync_state 0x%x\n", ID, i,
+                            state->proc_state[i].dma_sync_state);
+               ia_css_print("IBUF controller ID %d Process ID %d isp_sync_state 0x%x\n", ID, i,
+                            state->proc_state[i].isp_sync_state);
        }
 }
 
@@ -206,8 +239,8 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_dump_state(
  * Refer to "ibuf_ctrl_public.h" for details.
  */
 STORAGE_CLASS_IBUF_CTRL_C hrt_data ibuf_ctrl_reg_load(
-       const ibuf_ctrl_ID_t ID,
-       const hrt_address reg)
+    const ibuf_ctrl_ID_t ID,
+    const hrt_address reg)
 {
        assert(ID < N_IBUF_CTRL_ID);
        assert(IBUF_CTRL_BASE[ID] != (hrt_address)-1);
@@ -219,9 +252,9 @@ STORAGE_CLASS_IBUF_CTRL_C hrt_data ibuf_ctrl_reg_load(
  * Refer to "ibuf_ctrl_public.h" for details.
  */
 STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_reg_store(
-       const ibuf_ctrl_ID_t ID,
-       const hrt_address reg,
-       const hrt_data value)
+    const ibuf_ctrl_ID_t ID,
+    const hrt_address reg,
+    const hrt_data value)
 {
        assert(ID < N_IBUF_CTRL_ID);
        assert(IBUF_CTRL_BASE[ID] != (hrt_address)-1);
index 361f6fb25395ede1e34323de21023b87bacfee67..3f60f59ae51f6d66d90a021efd4ef8b8eb0d76f1 100644 (file)
@@ -18,8 +18,8 @@
 #include "input_system_public.h"
 
 STORAGE_CLASS_INPUT_SYSTEM_C input_system_err_t input_system_get_state(
-       const input_system_ID_t ID,
-       input_system_state_t *state)
+    const input_system_ID_t    ID,
+    input_system_state_t *state)
 {
        u32 i;
 
@@ -28,36 +28,36 @@ STORAGE_CLASS_INPUT_SYSTEM_C input_system_err_t input_system_get_state(
        /*  get the states of all CSI RX frontend devices */
        for (i = 0; i < N_CSI_RX_FRONTEND_ID; i++) {
                csi_rx_fe_ctrl_get_state(
-                               (csi_rx_frontend_ID_t)i,
-                               &state->csi_rx_fe_ctrl_state[i]);
+                   (csi_rx_frontend_ID_t)i,
+                   &state->csi_rx_fe_ctrl_state[i]);
        }
 
        /*  get the states of all CIS RX backend devices */
        for (i = 0; i < N_CSI_RX_BACKEND_ID; i++) {
                csi_rx_be_ctrl_get_state(
-                               (csi_rx_backend_ID_t)i,
-                               &state->csi_rx_be_ctrl_state[i]);
+                   (csi_rx_backend_ID_t)i,
+                   &state->csi_rx_be_ctrl_state[i]);
        }
 
        /* get the states of all pixelgen devices */
        for (i = 0; i < N_PIXELGEN_ID; i++) {
                pixelgen_ctrl_get_state(
-                               (pixelgen_ID_t)i,
-                               &state->pixelgen_ctrl_state[i]);
+                   (pixelgen_ID_t)i,
+                   &state->pixelgen_ctrl_state[i]);
        }
 
        /* get the states of all stream2mmio devices */
        for (i = 0; i < N_STREAM2MMIO_ID; i++) {
                stream2mmio_get_state(
-                               (stream2mmio_ID_t)i,
-                               &state->stream2mmio_state[i]);
+                   (stream2mmio_ID_t)i,
+                   &state->stream2mmio_state[i]);
        }
 
        /* get the states of all ibuf-controller devices */
        for (i = 0; i < N_IBUF_CTRL_ID; i++) {
                ibuf_ctrl_get_state(
-                               (ibuf_ctrl_ID_t)i,
-                               &state->ibuf_ctrl_state[i]);
+                   (ibuf_ctrl_ID_t)i,
+                   &state->ibuf_ctrl_state[i]);
        }
 
        /* get the states of all isys irq controllers */
@@ -73,8 +73,8 @@ STORAGE_CLASS_INPUT_SYSTEM_C input_system_err_t input_system_get_state(
 }
 
 STORAGE_CLASS_INPUT_SYSTEM_C void input_system_dump_state(
-       const input_system_ID_t ID,
-       input_system_state_t *state)
+    const input_system_ID_t    ID,
+    input_system_state_t *state)
 {
        u32 i;
 
@@ -83,36 +83,36 @@ STORAGE_CLASS_INPUT_SYSTEM_C void input_system_dump_state(
        /*  dump the states of all CSI RX frontend devices */
        for (i = 0; i < N_CSI_RX_FRONTEND_ID; i++) {
                csi_rx_fe_ctrl_dump_state(
-                               (csi_rx_frontend_ID_t)i,
-                               &state->csi_rx_fe_ctrl_state[i]);
+                   (csi_rx_frontend_ID_t)i,
+                   &state->csi_rx_fe_ctrl_state[i]);
        }
 
        /*  dump the states of all CIS RX backend devices */
        for (i = 0; i < N_CSI_RX_BACKEND_ID; i++) {
                csi_rx_be_ctrl_dump_state(
-                               (csi_rx_backend_ID_t)i,
-                               &state->csi_rx_be_ctrl_state[i]);
+                   (csi_rx_backend_ID_t)i,
+                   &state->csi_rx_be_ctrl_state[i]);
        }
 
        /* dump the states of all pixelgen devices */
        for (i = 0; i < N_PIXELGEN_ID; i++) {
                pixelgen_ctrl_dump_state(
-                               (pixelgen_ID_t)i,
-                               &state->pixelgen_ctrl_state[i]);
+                   (pixelgen_ID_t)i,
+                   &state->pixelgen_ctrl_state[i]);
        }
 
        /* dump the states of all st2mmio devices */
        for (i = 0; i < N_STREAM2MMIO_ID; i++) {
                stream2mmio_dump_state(
-                               (stream2mmio_ID_t)i,
-                               &state->stream2mmio_state[i]);
+                   (stream2mmio_ID_t)i,
+                   &state->stream2mmio_state[i]);
        }
 
        /* dump the states of all ibuf-controller devices */
        for (i = 0; i < N_IBUF_CTRL_ID; i++) {
                ibuf_ctrl_dump_state(
-                               (ibuf_ctrl_ID_t)i,
-                               &state->ibuf_ctrl_state[i]);
+                   (ibuf_ctrl_ID_t)i,
+                   &state->ibuf_ctrl_state[i]);
        }
 
        /* dump the states of all isys irq controllers */
index 77767228985ef92934916524df1ae12d5f2c7a30..36c026cbd7cc87adde67a2d0197ed9e26033aaaa 100644 (file)
@@ -28,13 +28,13 @@ const isys2401_dma_channel N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID] = {
 };
 
 void isys2401_dma_set_max_burst_size(
-       const isys2401_dma_ID_t dma_id,
-       uint32_t                max_burst_size)
+    const isys2401_dma_ID_t    dma_id,
+    uint32_t           max_burst_size)
 {
        assert(dma_id < N_ISYS2401_DMA_ID);
        assert((max_burst_size > 0x00) && (max_burst_size <= 0xFF));
 
        isys2401_dma_reg_store(dma_id,
-               DMA_DEV_INFO_REG_IDX(_DMA_V2_DEV_INTERF_MAX_BURST_IDX, HIVE_DMA_BUS_DDR_CONN),
-               (max_burst_size - 1));
+                              DMA_DEV_INFO_REG_IDX(_DMA_V2_DEV_INTERF_MAX_BURST_IDX, HIVE_DMA_BUS_DDR_CONN),
+                              (max_burst_size - 1));
 }
index 6cb9dd69e96f9a55de3b5b9c1629396cb29e1477..a1a222372ed39af20b5f7dd2101f16ebd1917960 100644 (file)
@@ -23,9 +23,9 @@
 #include "print_support.h"
 
 STORAGE_CLASS_ISYS2401_DMA_C void isys2401_dma_reg_store(
-       const isys2401_dma_ID_t dma_id,
-       const unsigned int      reg,
-       const hrt_data          value)
+    const isys2401_dma_ID_t    dma_id,
+    const unsigned int reg,
+    const hrt_data             value)
 {
        unsigned int reg_loc;
 
@@ -34,13 +34,14 @@ STORAGE_CLASS_ISYS2401_DMA_C void isys2401_dma_reg_store(
 
        reg_loc = ISYS2401_DMA_BASE[dma_id] + (reg * sizeof(hrt_data));
 
-       ia_css_print("isys dma store at addr(0x%x) val(%u)\n", reg_loc, (unsigned int)value);
+       ia_css_print("isys dma store at addr(0x%x) val(%u)\n", reg_loc,
+                    (unsigned int)value);
        ia_css_device_store_uint32(reg_loc, value);
 }
 
 STORAGE_CLASS_ISYS2401_DMA_C hrt_data isys2401_dma_reg_load(
-       const isys2401_dma_ID_t dma_id,
-       const unsigned int      reg)
+    const isys2401_dma_ID_t    dma_id,
+    const unsigned int reg)
 {
        unsigned int reg_loc;
        hrt_data value;
@@ -51,7 +52,8 @@ STORAGE_CLASS_ISYS2401_DMA_C hrt_data isys2401_dma_reg_load(
        reg_loc = ISYS2401_DMA_BASE[dma_id] + (reg * sizeof(hrt_data));
 
        value = ia_css_device_load_uint32(reg_loc);
-       ia_css_print("isys dma load from addr(0x%x) val(%u)\n", reg_loc, (unsigned int)value);
+       ia_css_print("isys dma load from addr(0x%x) val(%u)\n", reg_loc,
+                    (unsigned int)value);
 
        return value;
 }
index 842ae340ae138b4d03cfe36e3e307db22d55f657..567c926bd47f56b0b18a022c7bd2934f0311f585 100644 (file)
 
 /* Public interface */
 STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_status_enable(
-       const isys_irq_ID_t     isys_irqc_id)
+    const isys_irq_ID_t        isys_irqc_id)
 {
        assert(isys_irqc_id < N_ISYS_IRQ_ID);
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "Setting irq mask for port %u\n", isys_irqc_id);
-       isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_MASK_REG_IDX, ISYS_IRQ_MASK_REG_VALUE);
-       isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_CLEAR_REG_IDX, ISYS_IRQ_CLEAR_REG_VALUE);
-       isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_ENABLE_REG_IDX, ISYS_IRQ_ENABLE_REG_VALUE);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "Setting irq mask for port %u\n",
+                           isys_irqc_id);
+       isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_MASK_REG_IDX,
+                           ISYS_IRQ_MASK_REG_VALUE);
+       isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_CLEAR_REG_IDX,
+                           ISYS_IRQ_CLEAR_REG_VALUE);
+       isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_ENABLE_REG_IDX,
+                           ISYS_IRQ_ENABLE_REG_VALUE);
 }
index 0bffb5680e255cfab532b2a24034ea840de8ea70..4fd05b29dfdb583f9d42411456b577e235a5fa08 100644 (file)
@@ -27,7 +27,7 @@ struct isys_irqc_state_s {
        hrt_data status;
        hrt_data enable;
        hrt_data level_no;
-/*hrt_data clear;      */      /* write-only register */
+       /*hrt_data clear;       */      /* write-only register */
 };
 
 #endif /* defined(USE_INPUT_SYSTEM_VERSION_2401) */
index c2f34e45d84be376e819af2d8522e0cb83e65240..c519e6f06462c6ecf98da149ecbc4436255d7818 100644 (file)
@@ -29,8 +29,8 @@
 * Refer to "isys_irq.h" for details.
 */
 STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_state_get(
-       const isys_irq_ID_t     isys_irqc_id,
-       isys_irqc_state_t *state)
+    const isys_irq_ID_t        isys_irqc_id,
+    isys_irqc_state_t *state)
 {
        state->edge     = isys_irqc_reg_load(isys_irqc_id, ISYS_IRQ_EDGE_REG_IDX);
        state->mask     = isys_irqc_reg_load(isys_irqc_id, ISYS_IRQ_MASK_REG_IDX);
@@ -48,13 +48,13 @@ STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_state_get(
 * Refer to "isys_irq.h" for details.
 */
 STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_state_dump(
-       const isys_irq_ID_t     isys_irqc_id,
-       const isys_irqc_state_t *state)
+    const isys_irq_ID_t        isys_irqc_id,
+    const isys_irqc_state_t *state)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "isys irq controller id %d\n\tstatus:0x%x\n\tedge:0x%x\n\tmask:0x%x\n\tenable:0x%x\n\tlevel_not_pulse:0x%x\n",
-               isys_irqc_id,
-               state->status, state->edge, state->mask, state->enable, state->level_no);
+                           "isys irq controller id %d\n\tstatus:0x%x\n\tedge:0x%x\n\tmask:0x%x\n\tenable:0x%x\n\tlevel_not_pulse:0x%x\n",
+                           isys_irqc_id,
+                           state->status, state->edge, state->mask, state->enable, state->level_no);
 }
 
 /* end of NCI */
@@ -65,9 +65,9 @@ STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_state_dump(
 
 /* Support functions */
 STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_reg_store(
-       const isys_irq_ID_t     isys_irqc_id,
-       const unsigned int      reg_idx,
-       const hrt_data  value)
+    const isys_irq_ID_t        isys_irqc_id,
+    const unsigned int reg_idx,
+    const hrt_data     value)
 {
        unsigned int reg_addr;
 
@@ -76,14 +76,14 @@ STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_reg_store(
 
        reg_addr = ISYS_IRQ_BASE[isys_irqc_id] + (reg_idx * sizeof(hrt_data));
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "isys irq store at addr(0x%x) val(%u)\n", reg_addr, (unsigned int)value);
+                           "isys irq store at addr(0x%x) val(%u)\n", reg_addr, (unsigned int)value);
 
        ia_css_device_store_uint32(reg_addr, value);
 }
 
 STORAGE_CLASS_ISYS2401_IRQ_C hrt_data isys_irqc_reg_load(
-       const isys_irq_ID_t     isys_irqc_id,
-       const unsigned int      reg_idx)
+    const isys_irq_ID_t        isys_irqc_id,
+    const unsigned int reg_idx)
 {
        unsigned int reg_addr;
        hrt_data value;
@@ -94,7 +94,7 @@ STORAGE_CLASS_ISYS2401_IRQ_C hrt_data isys_irqc_reg_load(
        reg_addr = ISYS_IRQ_BASE[isys_irqc_id] + (reg_idx * sizeof(hrt_data));
        value = ia_css_device_load_uint32(reg_addr);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "isys irq load from addr(0x%x) val(%u)\n", reg_addr, (unsigned int)value);
+                           "isys irq load from addr(0x%x) val(%u)\n", reg_addr, (unsigned int)value);
 
        return value;
 }
index 71743a8b940e6e170f96bba4afd016cda4d6c205..e5aae5c022eba23a0e5f875445cda132d85d9ad8 100644 (file)
@@ -40,8 +40,8 @@
  * Refer to "stream2mmio_public.h" for details.
  */
 STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_get_state(
-               const stream2mmio_ID_t ID,
-               stream2mmio_state_t *state)
+    const stream2mmio_ID_t ID,
+    stream2mmio_state_t *state)
 {
        stream2mmio_sid_ID_t i;
 
@@ -59,30 +59,30 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_get_state(
  * Refer to "stream2mmio_public.h" for details.
  */
 STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_get_sid_state(
-               const stream2mmio_ID_t ID,
-               const stream2mmio_sid_ID_t sid_id,
-               stream2mmio_sid_state_t *state)
+    const stream2mmio_ID_t ID,
+    const stream2mmio_sid_ID_t sid_id,
+    stream2mmio_sid_state_t    *state)
 {
        state->rcv_ack =
-               stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_ACKNOWLEDGE_REG_ID);
+           stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_ACKNOWLEDGE_REG_ID);
 
        state->pix_width_id =
-               stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_PIX_WIDTH_ID_REG_ID);
+           stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_PIX_WIDTH_ID_REG_ID);
 
        state->start_addr =
-               stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_START_ADDR_REG_ID);
+           stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_START_ADDR_REG_ID);
 
        state->end_addr =
-               stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_END_ADDR_REG_ID);
+           stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_END_ADDR_REG_ID);
 
        state->strides =
-               stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_STRIDE_REG_ID);
+           stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_STRIDE_REG_ID);
 
        state->num_items =
-               stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_NUM_ITEMS_REG_ID);
+           stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_NUM_ITEMS_REG_ID);
 
        state->block_when_no_cmd =
-               stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_BLOCK_WHEN_NO_CMD_REG_ID);
+           stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_BLOCK_WHEN_NO_CMD_REG_ID);
 }
 
 /**
@@ -90,7 +90,7 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_get_sid_state(
  * Refer to "stream2mmio_public.h" for details.
  */
 STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_print_sid_state(
-               stream2mmio_sid_state_t *state)
+    stream2mmio_sid_state_t    *state)
 {
        ia_css_print("\t \t Receive acks 0x%x\n", state->rcv_ack);
        ia_css_print("\t \t Pixel width 0x%x\n", state->pix_width_id);
@@ -106,8 +106,8 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_print_sid_state(
  * Refer to "stream2mmio_public.h" for details.
  */
 STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_dump_state(
-               const stream2mmio_ID_t ID,
-               stream2mmio_state_t *state)
+    const stream2mmio_ID_t ID,
+    stream2mmio_state_t *state)
 {
        stream2mmio_sid_ID_t i;
 
@@ -133,9 +133,9 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_dump_state(
  * Refer to "stream2mmio_public.h" for details.
  */
 STORAGE_CLASS_STREAM2MMIO_C hrt_data stream2mmio_reg_load(
-               const stream2mmio_ID_t ID,
-               const stream2mmio_sid_ID_t sid_id,
-               const uint32_t reg_idx)
+    const stream2mmio_ID_t ID,
+    const stream2mmio_sid_ID_t sid_id,
+    const uint32_t reg_idx)
 {
        u32 reg_bank_offset;
 
@@ -143,7 +143,7 @@ STORAGE_CLASS_STREAM2MMIO_C hrt_data stream2mmio_reg_load(
 
        reg_bank_offset = STREAM2MMIO_REGS_PER_SID * sid_id;
        return ia_css_device_load_uint32(STREAM2MMIO_CTRL_BASE[ID] +
-                       (reg_bank_offset + reg_idx) * sizeof(hrt_data));
+                                        (reg_bank_offset + reg_idx) * sizeof(hrt_data));
 }
 
 /**
@@ -151,15 +151,15 @@ STORAGE_CLASS_STREAM2MMIO_C hrt_data stream2mmio_reg_load(
  * Refer to "stream2mmio_public.h" for details.
  */
 STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_reg_store(
-               const stream2mmio_ID_t ID,
-               const hrt_address reg,
-               const hrt_data value)
+    const stream2mmio_ID_t ID,
+    const hrt_address reg,
+    const hrt_data value)
 {
        assert(ID < N_STREAM2MMIO_ID);
        assert(STREAM2MMIO_CTRL_BASE[ID] != (hrt_address)-1);
 
        ia_css_device_store_uint32(STREAM2MMIO_CTRL_BASE[ID] +
-               reg * sizeof(hrt_data), value);
+                                  reg * sizeof(hrt_data), value);
 }
 
 /* end of DLI */
index 3aa7e29d0e7d91600694c57d87e16d86db13cdc7..79f5ef595d35ec402c820ea66751a883b195b22a 100644 (file)
  * Refer to "pixelgen_public.h" for details.
  */
 STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_get_state(
-               const pixelgen_ID_t ID,
-               pixelgen_ctrl_state_t *state)
+    const pixelgen_ID_t ID,
+    pixelgen_ctrl_state_t *state)
 {
        state->com_enable =
-               pixelgen_ctrl_reg_load(ID, _PXG_COM_ENABLE_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_COM_ENABLE_REG_IDX);
        state->prbs_rstval0 =
-               pixelgen_ctrl_reg_load(ID, _PXG_PRBS_RSTVAL_REG0_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_PRBS_RSTVAL_REG0_IDX);
        state->prbs_rstval1 =
-               pixelgen_ctrl_reg_load(ID, _PXG_PRBS_RSTVAL_REG1_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_PRBS_RSTVAL_REG1_IDX);
        state->syng_sid =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_SID_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_SID_REG_IDX);
        state->syng_free_run =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_FREE_RUN_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_FREE_RUN_REG_IDX);
        state->syng_pause =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_PAUSE_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_PAUSE_REG_IDX);
        state->syng_nof_frames =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_FRAME_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_FRAME_REG_IDX);
        state->syng_nof_pixels =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_PIXEL_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_PIXEL_REG_IDX);
        state->syng_nof_line =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_LINE_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_LINE_REG_IDX);
        state->syng_hblank_cyc =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_HBLANK_CYC_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_HBLANK_CYC_REG_IDX);
        state->syng_vblank_cyc =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_VBLANK_CYC_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_VBLANK_CYC_REG_IDX);
        state->syng_stat_hcnt =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_HCNT_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_HCNT_REG_IDX);
        state->syng_stat_vcnt =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_VCNT_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_VCNT_REG_IDX);
        state->syng_stat_fcnt =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_FCNT_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_FCNT_REG_IDX);
        state->syng_stat_done =
-               pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_DONE_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_DONE_REG_IDX);
        state->tpg_mode =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_MODE_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_MODE_REG_IDX);
        state->tpg_hcnt_mask =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_HCNT_MASK_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_HCNT_MASK_REG_IDX);
        state->tpg_vcnt_mask =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_VCNT_MASK_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_VCNT_MASK_REG_IDX);
        state->tpg_xycnt_mask =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_XYCNT_MASK_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_XYCNT_MASK_REG_IDX);
        state->tpg_hcnt_delta =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_HCNT_DELTA_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_HCNT_DELTA_REG_IDX);
        state->tpg_vcnt_delta =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_VCNT_DELTA_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_VCNT_DELTA_REG_IDX);
        state->tpg_r1 =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_R1_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_R1_REG_IDX);
        state->tpg_g1 =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_G1_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_G1_REG_IDX);
        state->tpg_b1 =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_B1_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_B1_REG_IDX);
        state->tpg_r2 =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_R2_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_R2_REG_IDX);
        state->tpg_g2 =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_G2_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_G2_REG_IDX);
        state->tpg_b2 =
-               pixelgen_ctrl_reg_load(ID, _PXG_TPG_B2_REG_IDX);
+           pixelgen_ctrl_reg_load(ID, _PXG_TPG_B2_REG_IDX);
 }
 
 /**
@@ -94,30 +94,47 @@ STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_get_state(
  * Refer to "pixelgen_public.h" for details.
  */
 STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_dump_state(
-               const pixelgen_ID_t ID,
-               pixelgen_ctrl_state_t *state)
+    const pixelgen_ID_t ID,
+    pixelgen_ctrl_state_t *state)
 {
        ia_css_print("Pixel Generator ID %d Enable  0x%x\n", ID, state->com_enable);
-       ia_css_print("Pixel Generator ID %d PRBS reset vlue 0 0x%x\n", ID, state->prbs_rstval0);
-       ia_css_print("Pixel Generator ID %d PRBS reset vlue 1 0x%x\n", ID, state->prbs_rstval1);
+       ia_css_print("Pixel Generator ID %d PRBS reset vlue 0 0x%x\n", ID,
+                    state->prbs_rstval0);
+       ia_css_print("Pixel Generator ID %d PRBS reset vlue 1 0x%x\n", ID,
+                    state->prbs_rstval1);
        ia_css_print("Pixel Generator ID %d SYNC SID 0x%x\n", ID, state->syng_sid);
-       ia_css_print("Pixel Generator ID %d syng free run 0x%x\n", ID, state->syng_free_run);
+       ia_css_print("Pixel Generator ID %d syng free run 0x%x\n", ID,
+                    state->syng_free_run);
        ia_css_print("Pixel Generator ID %d syng pause 0x%x\n", ID, state->syng_pause);
-       ia_css_print("Pixel Generator ID %d syng no of frames 0x%x\n", ID, state->syng_nof_frames);
-       ia_css_print("Pixel Generator ID %d syng no of pixels 0x%x\n", ID, state->syng_nof_pixels);
-       ia_css_print("Pixel Generator ID %d syng no of line 0x%x\n", ID, state->syng_nof_line);
-       ia_css_print("Pixel Generator ID %d syng hblank cyc  0x%x\n", ID, state->syng_hblank_cyc);
-       ia_css_print("Pixel Generator ID %d syng vblank cyc  0x%x\n", ID, state->syng_vblank_cyc);
-       ia_css_print("Pixel Generator ID %d syng stat hcnt  0x%x\n", ID, state->syng_stat_hcnt);
-       ia_css_print("Pixel Generator ID %d syng stat vcnt  0x%x\n", ID, state->syng_stat_vcnt);
-       ia_css_print("Pixel Generator ID %d syng stat fcnt  0x%x\n", ID, state->syng_stat_fcnt);
-       ia_css_print("Pixel Generator ID %d syng stat done  0x%x\n", ID, state->syng_stat_done);
+       ia_css_print("Pixel Generator ID %d syng no of frames 0x%x\n", ID,
+                    state->syng_nof_frames);
+       ia_css_print("Pixel Generator ID %d syng no of pixels 0x%x\n", ID,
+                    state->syng_nof_pixels);
+       ia_css_print("Pixel Generator ID %d syng no of line 0x%x\n", ID,
+                    state->syng_nof_line);
+       ia_css_print("Pixel Generator ID %d syng hblank cyc  0x%x\n", ID,
+                    state->syng_hblank_cyc);
+       ia_css_print("Pixel Generator ID %d syng vblank cyc  0x%x\n", ID,
+                    state->syng_vblank_cyc);
+       ia_css_print("Pixel Generator ID %d syng stat hcnt  0x%x\n", ID,
+                    state->syng_stat_hcnt);
+       ia_css_print("Pixel Generator ID %d syng stat vcnt  0x%x\n", ID,
+                    state->syng_stat_vcnt);
+       ia_css_print("Pixel Generator ID %d syng stat fcnt  0x%x\n", ID,
+                    state->syng_stat_fcnt);
+       ia_css_print("Pixel Generator ID %d syng stat done  0x%x\n", ID,
+                    state->syng_stat_done);
        ia_css_print("Pixel Generator ID %d tpg modee  0x%x\n", ID, state->tpg_mode);
-       ia_css_print("Pixel Generator ID %d tpg hcnt mask  0x%x\n", ID, state->tpg_hcnt_mask);
-       ia_css_print("Pixel Generator ID %d tpg hcnt mask  0x%x\n", ID, state->tpg_hcnt_mask);
-       ia_css_print("Pixel Generator ID %d tpg xycnt mask  0x%x\n", ID, state->tpg_xycnt_mask);
-       ia_css_print("Pixel Generator ID %d tpg hcnt delta  0x%x\n", ID, state->tpg_hcnt_delta);
-       ia_css_print("Pixel Generator ID %d tpg vcnt delta  0x%x\n", ID, state->tpg_vcnt_delta);
+       ia_css_print("Pixel Generator ID %d tpg hcnt mask  0x%x\n", ID,
+                    state->tpg_hcnt_mask);
+       ia_css_print("Pixel Generator ID %d tpg hcnt mask  0x%x\n", ID,
+                    state->tpg_hcnt_mask);
+       ia_css_print("Pixel Generator ID %d tpg xycnt mask  0x%x\n", ID,
+                    state->tpg_xycnt_mask);
+       ia_css_print("Pixel Generator ID %d tpg hcnt delta  0x%x\n", ID,
+                    state->tpg_hcnt_delta);
+       ia_css_print("Pixel Generator ID %d tpg vcnt delta  0x%x\n", ID,
+                    state->tpg_vcnt_delta);
        ia_css_print("Pixel Generator ID %d tpg r1 0x%x\n", ID, state->tpg_r1);
        ia_css_print("Pixel Generator ID %d tpg g1 0x%x\n", ID, state->tpg_g1);
        ia_css_print("Pixel Generator ID %d tpg b1 0x%x\n", ID, state->tpg_b1);
@@ -137,12 +154,13 @@ STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_dump_state(
  * Refer to "pixelgen_public.h" for details.
  */
 STORAGE_CLASS_PIXELGEN_C hrt_data pixelgen_ctrl_reg_load(
-       const pixelgen_ID_t ID,
-       const hrt_address reg)
+    const pixelgen_ID_t ID,
+    const hrt_address reg)
 {
        assert(ID < N_PIXELGEN_ID);
        assert(PIXELGEN_CTRL_BASE[ID] != (hrt_address) - 1);
-       return ia_css_device_load_uint32(PIXELGEN_CTRL_BASE[ID] + reg * sizeof(hrt_data));
+       return ia_css_device_load_uint32(PIXELGEN_CTRL_BASE[ID] + reg * sizeof(
+                                            hrt_data));
 }
 
 /**
@@ -150,14 +168,15 @@ STORAGE_CLASS_PIXELGEN_C hrt_data pixelgen_ctrl_reg_load(
  * Refer to "pixelgen_ctrl_public.h" for details.
  */
 STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_reg_store(
-       const pixelgen_ID_t ID,
-       const hrt_address reg,
-       const hrt_data value)
+    const pixelgen_ID_t ID,
+    const hrt_address reg,
+    const hrt_data value)
 {
        assert(ID < N_PIXELGEN_ID);
        assert(PIXELGEN_CTRL_BASE[ID] != (hrt_address)-1);
 
-       ia_css_device_store_uint32(PIXELGEN_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
+       ia_css_device_store_uint32(PIXELGEN_CTRL_BASE[ID] + reg * sizeof(hrt_data),
+                                  value);
 }
 
 /* end of DLI */
index 3d394b623731d39bdfaa7a1bbf7010c52cca1b12..068b6efb33207d78d472f3b4a465e69058e3f22d 100644 (file)
 
 /* DDR */
 static const hrt_address DDR_BASE[N_DDR_ID] = {
-       0x0000000120000000ULL};
+       0x0000000120000000ULL
+};
 
 /* ISP */
 static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
-       0x0000000000020000ULL};
+       0x0000000000020000ULL
+};
 
 static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
-       0x0000000000200000ULL};
+       0x0000000000200000ULL
+};
 
 static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
-       0x0000000000100000ULL};
+       0x0000000000100000ULL
+};
 
 static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
        0x00000000001C0000ULL,
        0x00000000001D0000ULL,
-       0x00000000001E0000ULL};
+       0x00000000001E0000ULL
+};
 
 static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
-       0x00000000001F0000ULL};
+       0x00000000001F0000ULL
+};
 
 /* SP */
 static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
-       0x0000000000010000ULL};
+       0x0000000000010000ULL
+};
 
 static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
-       0x0000000000300000ULL};
+       0x0000000000300000ULL
+};
 
 /* MMU */
 #if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
@@ -78,24 +86,28 @@ static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
  */
 static const hrt_address MMU_BASE[N_MMU_ID] = {
        0x0000000000070000ULL,
-       0x00000000000A0000ULL};
+       0x00000000000A0000ULL
+};
 #else
 #error "system_local.h: SYSTEM must be one of {2400, 2401 }"
 #endif
 
 /* DMA */
 static const hrt_address DMA_BASE[N_DMA_ID] = {
-       0x0000000000040000ULL};
+       0x0000000000040000ULL
+};
 
 static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
-       0x00000000000CA000ULL};
+       0x00000000000CA000ULL
+};
 
 /* IRQ */
 static const hrt_address IRQ_BASE[N_IRQ_ID] = {
        0x0000000000000500ULL,
        0x0000000000030A00ULL,
        0x000000000008C000ULL,
-       0x0000000000090200ULL};
+       0x0000000000090200ULL
+};
 /*
        0x0000000000000500ULL};
  */
@@ -103,11 +115,13 @@ static const hrt_address IRQ_BASE[N_IRQ_ID] = {
 /* GDC */
 static const hrt_address GDC_BASE[N_GDC_ID] = {
        0x0000000000050000ULL,
-       0x0000000000060000ULL};
+       0x0000000000060000ULL
+};
 
 /* FIFO_MONITOR (not a subset of GP_DEVICE) */
 static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
-       0x0000000000000000ULL};
+       0x0000000000000000ULL
+};
 
 /*
 static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
@@ -119,32 +133,37 @@ static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
 
 /* GP_DEVICE (single base for all separate GP_REG instances) */
 static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
-       0x0000000000000000ULL};
+       0x0000000000000000ULL
+};
 
 /*GP TIMER , all timer registers are inter-twined,
  * so, having multiple base addresses for
  * different timers does not help*/
 static const hrt_address GP_TIMER_BASE =
-       (hrt_address)0x0000000000000600ULL;
+    (hrt_address)0x0000000000000600ULL;
 
 /* GPIO */
 static const hrt_address GPIO_BASE[N_GPIO_ID] = {
-       0x0000000000000400ULL};
+       0x0000000000000400ULL
+};
 
 /* TIMED_CTRL */
 static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
-       0x0000000000000100ULL};
+       0x0000000000000100ULL
+};
 
 /* INPUT_FORMATTER */
 static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
        0x0000000000030000ULL,
        0x0000000000030200ULL,
        0x0000000000030400ULL,
-       0x0000000000030600ULL}; /* memcpy() */
+       0x0000000000030600ULL
+}; /* memcpy() */
 
 /* INPUT_SYSTEM */
 static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
-       0x0000000000080000ULL};
+       0x0000000000080000ULL
+};
 /*     0x0000000000081000ULL, */ /* capture A */
 /*     0x0000000000082000ULL, */ /* capture B */
 /*     0x0000000000083000ULL, */ /* capture C */
@@ -157,7 +176,8 @@ static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
 
 /* RX, the MIPI lane control regs start at offset 0 */
 static const hrt_address RX_BASE[N_RX_ID] = {
-       0x0000000000080100ULL};
+       0x0000000000080100ULL
+};
 
 /* IBUF_CTRL, part of the Input System 2401 */
 static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
@@ -206,32 +226,40 @@ static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
 
 /* DDR : Attention, this value not defined in 32-bit */
 static const hrt_address DDR_BASE[N_DDR_ID] = {
-       0x00000000UL};
+       0x00000000UL
+};
 
 /* ISP */
 static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
-       0x00020000UL};
+       0x00020000UL
+};
 
 static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
-       0xffffffffUL};
+       0xffffffffUL
+};
 
 static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
-       0xffffffffUL};
+       0xffffffffUL
+};
 
 static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
        0xffffffffUL,
        0xffffffffUL,
-       0xffffffffUL};
+       0xffffffffUL
+};
 
 static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
-       0xffffffffUL};
+       0xffffffffUL
+};
 
 /* SP */
 static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
-       0x00010000UL};
+       0x00010000UL
+};
 
 static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
-       0x00300000UL};
+       0x00300000UL
+};
 
 /* MMU */
 #if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
@@ -241,24 +269,28 @@ static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
  */
 static const hrt_address MMU_BASE[N_MMU_ID] = {
        0x00070000UL,
-       0x000A0000UL};
+       0x000A0000UL
+};
 #else
 #error "system_local.h: SYSTEM must be one of {2400, 2401 }"
 #endif
 
 /* DMA */
 static const hrt_address DMA_BASE[N_DMA_ID] = {
-       0x00040000UL};
+       0x00040000UL
+};
 
 static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
-       0x000CA000UL};
+       0x000CA000UL
+};
 
 /* IRQ */
 static const hrt_address IRQ_BASE[N_IRQ_ID] = {
        0x00000500UL,
        0x00030A00UL,
        0x0008C000UL,
-       0x00090200UL};
+       0x00090200UL
+};
 /*
        0x00000500UL};
  */
@@ -266,11 +298,13 @@ static const hrt_address IRQ_BASE[N_IRQ_ID] = {
 /* GDC */
 static const hrt_address GDC_BASE[N_GDC_ID] = {
        0x00050000UL,
-       0x00060000UL};
+       0x00060000UL
+};
 
 /* FIFO_MONITOR (not a subset of GP_DEVICE) */
 static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
-       0x00000000UL};
+       0x00000000UL
+};
 
 /*
 static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
@@ -282,31 +316,36 @@ static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
 
 /* GP_DEVICE (single base for all separate GP_REG instances) */
 static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
-       0x00000000UL};
+       0x00000000UL
+};
 
 /*GP TIMER , all timer registers are inter-twined,
  * so, having multiple base addresses for
  * different timers does not help*/
 static const hrt_address GP_TIMER_BASE =
-       (hrt_address)0x00000600UL;
+    (hrt_address)0x00000600UL;
 /* GPIO */
 static const hrt_address GPIO_BASE[N_GPIO_ID] = {
-       0x00000400UL};
+       0x00000400UL
+};
 
 /* TIMED_CTRL */
 static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
-       0x00000100UL};
+       0x00000100UL
+};
 
 /* INPUT_FORMATTER */
 static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
        0x00030000UL,
        0x00030200UL,
-       0x00030400UL};
+       0x00030400UL
+};
 /*     0x00030600UL, */ /* memcpy() */
 
 /* INPUT_SYSTEM */
 static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
-       0x00080000UL};
+       0x00080000UL
+};
 /*     0x00081000UL, */ /* capture A */
 /*     0x00082000UL, */ /* capture B */
 /*     0x00083000UL, */ /* capture C */
@@ -319,7 +358,8 @@ static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
 
 /* RX, the MIPI lane control regs start at offset 0 */
 static const hrt_address RX_BASE[N_RX_ID] = {
-       0x00080100UL};
+       0x00080100UL
+};
 
 /* IBUF_CTRL, part of the Input System 2401 */
 static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
index ba43562f12874cac152d4149eb53d9ad1436d96f..8741b8347dd42ce9f2e53b77c919050270556d63 100644 (file)
 #define _DMA_V2_ZERO_EXTEND                             0
 #define _DMA_V2_SIGN_EXTEND                             1
 
-  /* SLAVE address map */
+/* SLAVE address map */
 #define _DMA_V2_SEL_FSM_CMD                             0
 #define _DMA_V2_SEL_CH_REG                              1
 #define _DMA_V2_SEL_CONN_GROUP                          2
index 33f8b5ce9ba3e09ec08ae2d95bb145a8431b2813..3cc627aa6b091f3caa473862241dcefe49f9bccb 100644 (file)
 
 #define HRT_GDC_BCI_COEF_BITS           14 /* 14 bits per coefficient                                                   */
 #define HRT_GDC_BCI_COEF_ONE             (1 << (HRT_GDC_BCI_COEF_BITS - 2))  /* We represent signed 10 bit coefficients.  */
-                                                                       /* The supported range is [-256, .., +256]      */
-                                                                       /* in 14-bit signed notation,                   */
-                                                                       /* We need all ten bits (MSB must be zero).     */
-                                                                       /* -s is inserted to solve this issue, and      */
-                                                                       /* therefore "1" is equal to +256.              */
+/* The supported range is [-256, .., +256]      */
+/* in 14-bit signed notation,                   */
+/* We need all ten bits (MSB must be zero).     */
+/* -s is inserted to solve this issue, and      */
+/* therefore "1" is equal to +256.              */
 #define HRT_GDC_BCI_COEF_MASK            ((1 << HRT_GDC_BCI_COEF_BITS) - 1)
 
 #define HRT_GDC_LUT_BYTES                (HRT_GDC_N * 4 * 2)                /* 1024 addresses, 4 coefficients per address,  */
-                                                                       /* 2 bytes per coefficient                      */
+/* 2 bytes per coefficient                      */
 
 #define _HRT_GDC_REG_ALIGN               4
 
-  //     31  30  29    25 24                     0
-  //  |-----|---|--------|------------------------|
-  //  | CMD | C | Reg_ID |        Value           |
+//     31  30  29    25 24                     0
+//  |-----|---|--------|------------------------|
+//  | CMD | C | Reg_ID |        Value           |
 
-  // There are just two commands possible for the GDC block:
-  // 1 - Configure reg
-  // 0 - Data token
+// There are just two commands possible for the GDC block:
+// 1 - Configure reg
+// 0 - Data token
 
-  // C      - Reserved bit
-  //          Used in protocol to indicate whether it is C-run or other type of runs
-  //          In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
+// C      - Reserved bit
+//          Used in protocol to indicate whether it is C-run or other type of runs
+//          In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
 
-  // Reg_ID - Address of the register to be configured
+// Reg_ID - Address of the register to be configured
 
-  // Value  - Value to store to the addressed register, maximum of 24 bits
+// Value  - Value to store to the addressed register, maximum of 24 bits
 
-  // Configure reg command is not followed by any other token.
-  // The address of the register and the data to be filled in is contained in the same token
+// Configure reg command is not followed by any other token.
+// The address of the register and the data to be filled in is contained in the same token
 
-  // When the first data token is received, it must be:
-  //   1. FRX and FRY (device configured in one of the  scaling modes) ***DEFAULT MODE***, or,
-  //   2. P0'X        (device configured in one of the tetragon modes)
-  // After the first data token is received, pre-defined number of tokens with the following meaning follow:
-  //   1. two  tokens: SRC address ; DST address
-  //   2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
+// When the first data token is received, it must be:
+//   1. FRX and FRY (device configured in one of the  scaling modes) ***DEFAULT MODE***, or,
+//   2. P0'X        (device configured in one of the tetragon modes)
+// After the first data token is received, pre-defined number of tokens with the following meaning follow:
+//   1. two  tokens: SRC address ; DST address
+//   2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
 
 #define HRT_GDC_CONFIG_CMD             1
 #define HRT_GDC_DATA_CMD               0
index d02435a3ec5a1e23fafae4a89505b7e66d48ed03..96286a141b00b6a8471398c367927cafdc8b6162 100644 (file)
 #define _HRT_GPIO_BLOCK_REG_ALIGN 4
 
 /* R/W registers */
-#define _gpio_block_reg_do_e                            0
+#define _gpio_block_reg_do_e                            0
 #define _gpio_block_reg_do_select                     1
-#define _gpio_block_reg_do_0                            2
-#define _gpio_block_reg_do_1                            3
+#define _gpio_block_reg_do_0                            2
+#define _gpio_block_reg_do_1                            3
 #define _gpio_block_reg_do_pwm_cnt_0        4
 #define _gpio_block_reg_do_pwm_cnt_1        5
 #define _gpio_block_reg_do_pwm_cnt_2        6
@@ -36,6 +36,6 @@
 #define _gpio_block_reg_di_active_level          15
 
 /* read-only registers */
-#define _gpio_block_reg_di                               16
+#define _gpio_block_reg_di                               16
 
 #endif /* _gpio_block_defs_h_ */
index 3037484d206b7a326c5692ce79f80a047ca32549..6fd48be53d5525ae1b2f0651fafe496fcdbff789 100644 (file)
  * The definitions are taken from <system>_defs.h
  */
 typedef enum hrt_isp_css_irq {
-  hrt_isp_css_irq_gpio_pin_0           = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_1           = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_2           = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_3           = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_4           = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_5           = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_6           = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_7           = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_8           = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_9           = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_10          = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_11          = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
-  hrt_isp_css_irq_sp                   = HIVE_GP_DEV_IRQ_SP_BIT_ID,
-  hrt_isp_css_irq_isp                  = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
-  hrt_isp_css_irq_isys                 = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
-  hrt_isp_css_irq_isel                 = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
-  hrt_isp_css_irq_ifmt                 = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
-  hrt_isp_css_irq_sp_stream_mon        = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
-  hrt_isp_css_irq_isp_stream_mon       = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
-  hrt_isp_css_irq_mod_stream_mon       = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
-  hrt_isp_css_irq_is2401               = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
-  hrt_isp_css_irq_isp_bamem_error      = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_isp_dmem_error       = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_sp_icache_mem_error  = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_sp_dmem_error        = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_mmu_cache_mem_error  = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_gp_timer_0           = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
-  hrt_isp_css_irq_gp_timer_1           = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
-  hrt_isp_css_irq_sw_pin_0             = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
-  hrt_isp_css_irq_sw_pin_1             = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
-  hrt_isp_css_irq_dma                  = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
-  hrt_isp_css_irq_sp_stream_mon_b      = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
-  /* this must (obviously) be the last on in the enum */
-  hrt_isp_css_irq_num_irqs
+       hrt_isp_css_irq_gpio_pin_0           = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_1           = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_2           = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_3           = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_4           = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_5           = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_6           = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_7           = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_8           = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_9           = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_10          = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_11          = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
+       hrt_isp_css_irq_sp                   = HIVE_GP_DEV_IRQ_SP_BIT_ID,
+       hrt_isp_css_irq_isp                  = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
+       hrt_isp_css_irq_isys                 = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
+       hrt_isp_css_irq_isel                 = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
+       hrt_isp_css_irq_ifmt                 = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
+       hrt_isp_css_irq_sp_stream_mon        = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
+       hrt_isp_css_irq_isp_stream_mon       = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
+       hrt_isp_css_irq_mod_stream_mon       = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
+       hrt_isp_css_irq_is2401               = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
+       hrt_isp_css_irq_isp_bamem_error      = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_isp_dmem_error       = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_sp_icache_mem_error  = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_sp_dmem_error        = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_mmu_cache_mem_error  = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_gp_timer_0           = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
+       hrt_isp_css_irq_gp_timer_1           = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
+       hrt_isp_css_irq_sw_pin_0             = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
+       hrt_isp_css_irq_sw_pin_1             = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
+       hrt_isp_css_irq_dma                  = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
+       hrt_isp_css_irq_sp_stream_mon_b      = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
+       /* this must (obviously) be the last on in the enum */
+       hrt_isp_css_irq_num_irqs
 } hrt_isp_css_irq_t;
 
 typedef enum hrt_isp_css_irq_status {
-  hrt_isp_css_irq_status_error,
-  hrt_isp_css_irq_status_more_irqs,
-  hrt_isp_css_irq_status_success
+       hrt_isp_css_irq_status_error,
+       hrt_isp_css_irq_status_more_irqs,
+       hrt_isp_css_irq_status_success
 } hrt_isp_css_irq_status_t;
 
 #endif /* _HIVE_ISP_CSS_2401_IRQ_TYPES_HRT_H_ */
index 0d1b65db83cde7f3d979a74fb7ce7c6a25c6f246..5975b094a9d09673975f97f17d5539eeded5a120 100644 (file)
 #include <dma_v2_defs.h>
 
 #define _IBUF_CNTRL_REG_ALIGN 4
-  /* alignment of register banks, first bank are shared configuration and status registers: */
+/* alignment of register banks, first bank are shared configuration and status registers: */
 #define _IBUF_CNTRL_PROC_REG_ALIGN        32
 
-  /* the actual amount of configuration registers per proc: */
+/* the actual amount of configuration registers per proc: */
 #define _IBUF_CNTRL_CONFIG_REGS_PER_PROC 18
-  /* the actual amount of shared configuration registers: */
+/* the actual amount of shared configuration registers: */
 #define _IBUF_CNTRL_CONFIG_REGS_NO_PROC  0
 
-  /* the actual amount of status registers per proc */
+/* the actual amount of status registers per proc */
 #define _IBUF_CNTRL_STATUS_REGS_PER_PROC (_IBUF_CNTRL_CONFIG_REGS_PER_PROC + 10)
-  /* the actual amount shared status registers */
+/* the actual amount shared status registers */
 #define _IBUF_CNTRL_STATUS_REGS_NO_PROC  (_IBUF_CNTRL_CONFIG_REGS_NO_PROC + 2)
 
-  /* time out bits, maximum time out value is 2^_IBUF_CNTRL_TIME_OUT_BITS - 1 */
+/* time out bits, maximum time out value is 2^_IBUF_CNTRL_TIME_OUT_BITS - 1 */
 #define _IBUF_CNTRL_TIME_OUT_BITS         5
 
 /* command token definition */
@@ -53,7 +53,7 @@
 #define _IBUF_CNTRL_ACK_TOKEN_ITEMS_BITS    _STREAM2MMIO_PACK_NUM_ITEMS_BITS
 #define _IBUF_CNTRL_ACK_TOKEN_LSB          _IBUF_CNTRL_ACK_TOKEN_STORES_IDX
 #define _IBUF_CNTRL_ACK_TOKEN_MSB          (_IBUF_CNTRL_ACK_TOKEN_ITEMS_BITS + _IBUF_CNTRL_ACK_TOKEN_ITEMS_IDX - 1)
-         /* bit 31 indicates a valid ack: */
+/* bit 31 indicates a valid ack: */
 #define _IBUF_CNTRL_ACK_TOKEN_VALID_BIT    (_IBUF_CNTRL_ACK_TOKEN_ITEMS_BITS + _IBUF_CNTRL_ACK_TOKEN_ITEMS_IDX)
 
 /*shared registers:*/
 #define _IBUF_CNTRL_CMD                   0
 #define _IBUF_CNTRL_ACK                   1
 
-       /* number of items (packets or words) per frame: */
+/* number of items (packets or words) per frame: */
 #define _IBUF_CNTRL_NUM_ITEMS_PER_STORE   2
 
-       /* number of stores (packets or words) per store/buffer: */
+/* number of stores (packets or words) per store/buffer: */
 #define _IBUF_CNTRL_NUM_STORES_PER_FRAME  3
 
-       /* the channel and command in the DMA */
+/* the channel and command in the DMA */
 #define _IBUF_CNTRL_DMA_CHANNEL           4
 #define _IBUF_CNTRL_DMA_CMD               5
 
-       /* the start address and stride of the buffers */
+/* the start address and stride of the buffers */
 #define _IBUF_CNTRL_BUFFER_START_ADDRESS  6
 #define _IBUF_CNTRL_BUFFER_STRIDE         7
 #define _IBUF_CNTRL_BUFFER_END_ADDRESS    8
 
-       /* destination start address, stride and end address; should be the same as in the DMA */
+/* destination start address, stride and end address; should be the same as in the DMA */
 #define _IBUF_CNTRL_DEST_START_ADDRESS    9
 #define _IBUF_CNTRL_DEST_STRIDE           10
 #define _IBUF_CNTRL_DEST_END_ADDRESS      11
 
-       /* send a frame sync or not, default 1 */
+/* send a frame sync or not, default 1 */
 #define _IBUF_CNTRL_SYNC_FRAME            12
 
-       /* str2mmio cmds */
+/* str2mmio cmds */
 #define _IBUF_CNTRL_STR2MMIO_SYNC_CMD     13
 #define _IBUF_CNTRL_STR2MMIO_STORE_CMD    14
 
-       /* num elems p word*/
+/* num elems p word*/
 #define _IBUF_CNTRL_SHIFT_ITEMS           15
 #define _IBUF_CNTRL_ELEMS_P_WORD_IBUF     16
 #define _IBUF_CNTRL_ELEMS_P_WORD_DEST     17
 
-   /* STATUS */
-       /* current frame and stores in buffer */
+/* STATUS */
+/* current frame and stores in buffer */
 #define _IBUF_CNTRL_CUR_STORES            18
 #define _IBUF_CNTRL_CUR_ACKS              19
 
-       /* current buffer and destination address for DMA cmd's */
+/* current buffer and destination address for DMA cmd's */
 #define _IBUF_CNTRL_CUR_S2M_IBUF_ADDR     20
 #define _IBUF_CNTRL_CUR_DMA_IBUF_ADDR     21
 #define _IBUF_CNTRL_CUR_DMA_DEST_ADDR     22
 #define _IBUF_CNTRL_CMD_STORE_FRAME_IDX     0
 #define _IBUF_CNTRL_CMD_ONLINE_IDX          1
 
-  /* initialize, copy st_addr to cur_addr etc */
+/* initialize, copy st_addr to cur_addr etc */
 #define _IBUF_CNTRL_CMD_INITIALIZE          0
 
-  /* store an online frame (sync with ISP, use end cfg start, stride and end address: */
+/* store an online frame (sync with ISP, use end cfg start, stride and end address: */
 #define _IBUF_CNTRL_CMD_STORE_ONLINE_FRAME  ((1 << _IBUF_CNTRL_CMD_STORE_FRAME_IDX) | (1 << _IBUF_CNTRL_CMD_ONLINE_IDX))
 
-  /* store an offline frame (don't sync with ISP, requires start address as 2nd token, no end address: */
+/* store an offline frame (don't sync with ISP, requires start address as 2nd token, no end address: */
 #define _IBUF_CNTRL_CMD_STORE_OFFLINE_FRAME  BIT(_IBUF_CNTRL_CMD_STORE_FRAME_IDX)
 
-  /* false command token, should be different then commands. Use online bit, not store frame: */
+/* false command token, should be different then commands. Use online bit, not store frame: */
 #define _IBUF_CNTRL_FALSE_ACK               2
 
 #endif
index e00bc841d0f0d2c00e942467981630e5051d040a..e9106d1e6a63d895487e1ead67dc6023f9f846a5 100644 (file)
@@ -31,8 +31,8 @@ typedef char *tmemvectors, *tmemvectoru, *tvector;
 #define hrt_isp_vmem_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_vmem(cell))
 
 #if ISP_HAS_HIST
-  #define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
-  #define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
+#define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
+#define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
 #endif
 
 #endif /* _isp2400_support_h */
index 7e79e3c611ee4edac16692271947d8f1d673a7bb..29e097b5d9e4ffa89f1c699ae0601322f3fa58d1 100644 (file)
 #define ISP_VMEM_ELEM_PRECISION                14
 #define ISP_VMEM_IS_BAMEM                      1
 #if ISP_VMEM_IS_BAMEM
-  #define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT        8
-  #define ISP_VMEM_BAMEM_LATENCY               5
-  #define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
-  #define ISP_VMEM_BAMEM_NR_DATA_PLANES        8
-  #define ISP_VMEM_BAMEM_NR_CFG_REGISTERS      16
-  #define ISP_VMEM_BAMEM_LININT                0
-  #define ISP_VMEM_BAMEM_DAP_BITS              3
-  #define ISP_VMEM_BAMEM_LININT_FRAC_BITS      0
-  #define ISP_VMEM_BAMEM_PID_BITS              3
-  #define ISP_VMEM_BAMEM_OFFSET_BITS           19
-  #define ISP_VMEM_BAMEM_ADDRESS_BITS          25
-  #define ISP_VMEM_BAMEM_RID_BITS              4
-  #define ISP_VMEM_BAMEM_TRANSPOSITION         1
-  #define ISP_VMEM_BAMEM_VEC_PLUS_SLICE        1
-  #define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
-  #define ISP_VMEM_BAMEM_LUT_ELEMS             16
-  #define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH        14
-  #define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE      1
-  #define ISP_VMEM_BAMEM_SMART_FETCH           1
-  #define ISP_VMEM_BAMEM_BIG_ENDIANNESS        0
+#define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT        8
+#define ISP_VMEM_BAMEM_LATENCY               5
+#define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
+#define ISP_VMEM_BAMEM_NR_DATA_PLANES        8
+#define ISP_VMEM_BAMEM_NR_CFG_REGISTERS      16
+#define ISP_VMEM_BAMEM_LININT                0
+#define ISP_VMEM_BAMEM_DAP_BITS              3
+#define ISP_VMEM_BAMEM_LININT_FRAC_BITS      0
+#define ISP_VMEM_BAMEM_PID_BITS              3
+#define ISP_VMEM_BAMEM_OFFSET_BITS           19
+#define ISP_VMEM_BAMEM_ADDRESS_BITS          25
+#define ISP_VMEM_BAMEM_RID_BITS              4
+#define ISP_VMEM_BAMEM_TRANSPOSITION         1
+#define ISP_VMEM_BAMEM_VEC_PLUS_SLICE        1
+#define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
+#define ISP_VMEM_BAMEM_LUT_ELEMS             16
+#define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH        14
+#define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE      1
+#define ISP_VMEM_BAMEM_SMART_FETCH           1
+#define ISP_VMEM_BAMEM_BIG_ENDIANNESS        0
 #endif /* ISP_VMEM_IS_BAMEM */
 #define ISP_PMEM_DEPTH                         2048
 #define ISP_PMEM_WIDTH                         640
 #define ISP_SRU_GUARDING                       1
 #define ISP_VLSU_GUARDING                      1
 
-#define ISP_VRF_RAM                         1
-#define ISP_SRF_RAM                         1
+#define ISP_VRF_RAM                         1
+#define ISP_SRF_RAM                         1
 
 #define ISP_SPLIT_VMUL_VADD_IS                 0
 #define ISP_RFSPLIT_FPGA                       0
 #define ISP_VMEM_WIDTH                         896
 #define ISP_VMEM_ALIGN                         128
 #if ISP_VMEM_IS_BAMEM
-  #define ISP_VMEM_ALIGN_ELEM                  2
+#define ISP_VMEM_ALIGN_ELEM                  2
 #endif /* ISP_VMEM_IS_BAMEM */
 #define ISP_SIMDLSU                            1
 #define ISP_LSU_IMM_BITS                       12
index 988b3ebc953da035f546d8e56ba7795e641011cc..a3940d2468908946839e5c3e311cb8e588baeb5f 100644 (file)
@@ -56,8 +56,8 @@
 #define _STREAM2MMIO_ACK_TOKEN_EOP_BIT         _STREAM2MMIO_PACK_ACK_EOP_BIT
 #define _STREAM2MMIO_ACK_TOKEN_EOF_BIT         _STREAM2MMIO_PACK_ACK_EOF_BIT
 #define _STREAM2MMIO_ACK_TOKEN_VALID_BIT       (_STREAM2MMIO_ACK_TOKEN_EOF_BIT + 1)      /* this bit indicates a valid ack    */
-                                                                                      /* if there is no valid ack, a read  */
-                                                                                      /* on the ack register returns 0     */
+/* if there is no valid ack, a read  */
+/* on the ack register returns 0     */
 #define _STREAM2MMIO_ACK_TOKEN_WIDTH           (_STREAM2MMIO_ACK_TOKEN_VALID_BIT + 1)
 
 /* commands for packer module */
index 7a68f03c6c5c095627b160594f9b00df3f37c254..ff9f53b07c773828d9ecd5e89522a6eb6cf07367 100644 (file)
@@ -186,7 +186,8 @@ struct virtual_input_system_stream_s {
 #endif
 };
 
-typedef struct virtual_input_system_stream_cfg_s virtual_input_system_stream_cfg_t;
+typedef struct virtual_input_system_stream_cfg_s
+       virtual_input_system_stream_cfg_t;
 struct virtual_input_system_stream_cfg_s {
        u8 enable_metadata;
        input_system_input_port_cfg_t   input_port_cfg;
index cc057d8b93cf93f0f2c7f7ed9dc5b8cc088909e4..2ca4d5210a38c46481ae969ac540c08a3b3a8d21 100644 (file)
@@ -45,7 +45,7 @@ struct isys2401_dma_port_cfg_s {
        u32 elements;
        u32 cropping;
        u32 width;
- };
+};
 /* end of DMA Port */
 
 /************************************************
@@ -68,8 +68,8 @@ typedef enum {
 } isys2401_dma_connection;
 
 typedef enum {
-  isys2401_dma_zero_extension = _DMA_ZERO_EXTEND,
-  isys2401_dma_sign_extension = _DMA_SIGN_EXTEND
+       isys2401_dma_zero_extension = _DMA_ZERO_EXTEND,
+       isys2401_dma_sign_extension = _DMA_SIGN_EXTEND
 } isys2401_dma_extension;
 
 typedef struct isys2401_dma_cfg_s isys2401_dma_cfg_t;
@@ -83,6 +83,7 @@ struct isys2401_dma_cfg_s {
 /* end of DMA Device */
 
 /* isys2401_dma_channel limits per DMA ID */
-extern const isys2401_dma_channel N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID];
+extern const isys2401_dma_channel
+N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID];
 
 #endif /* __ISYS_DMA_GLOBAL_H_INCLUDED__ */
index de99359a0fbcbe3bc1af0dc96e1a5e3e85714489..9fae24b3e689f58e5938cdf7aa440e33e371cce2 100644 (file)
 
 void
 ia_css_configure_iterator(
-       const struct ia_css_binary *binary,
-       const struct ia_css_iterator_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_iterator_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_iterator() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -39,20 +40,23 @@ ia_css_configure_iterator(
                }
                if (size) {
                        ia_css_iterator_config((struct sh_css_isp_iterator_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                              &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                              config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_iterator() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_copy_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_copy_output_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_copy_output_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_copy_output() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -64,20 +68,23 @@ ia_css_configure_copy_output(
                }
                if (size) {
                        ia_css_copy_output_config((struct sh_css_isp_copy_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                                 &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                                 config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_copy_output() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_crop(
-       const struct ia_css_binary *binary,
-       const struct ia_css_crop_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_crop_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_crop() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -89,20 +96,23 @@ ia_css_configure_crop(
                }
                if (size) {
                        ia_css_crop_config((struct sh_css_isp_crop_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                          &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                          config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_crop() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_fpn(
-       const struct ia_css_binary *binary,
-       const struct ia_css_fpn_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_fpn_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_fpn() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -114,20 +124,23 @@ ia_css_configure_fpn(
                }
                if (size) {
                        ia_css_fpn_config((struct sh_css_isp_fpn_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_fpn() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_dvs(
-       const struct ia_css_binary *binary,
-       const struct ia_css_dvs_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_dvs_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_dvs() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -139,20 +152,23 @@ ia_css_configure_dvs(
                }
                if (size) {
                        ia_css_dvs_config((struct sh_css_isp_dvs_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_dvs() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_qplane(
-       const struct ia_css_binary *binary,
-       const struct ia_css_qplane_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_qplane_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_qplane() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -164,20 +180,23 @@ ia_css_configure_qplane(
                }
                if (size) {
                        ia_css_qplane_config((struct sh_css_isp_qplane_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                            &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                            config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_qplane() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output0(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output0_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_output0_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output0() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -189,20 +208,23 @@ ia_css_configure_output0(
                }
                if (size) {
                        ia_css_output0_config((struct sh_css_isp_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                             config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output0() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output1(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output1_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_output1_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output1() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -214,20 +236,23 @@ ia_css_configure_output1(
                }
                if (size) {
                        ia_css_output1_config((struct sh_css_isp_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                             config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output1() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_output_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -239,10 +264,12 @@ ia_css_configure_output(
                }
                if (size) {
                        ia_css_output_config((struct sh_css_isp_output_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                            &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                            config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_output() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
@@ -250,10 +277,11 @@ ia_css_configure_output(
 
 void
 ia_css_configure_sc(
-       const struct ia_css_binary *binary,
-       const struct ia_css_sc_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_sc_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_sc() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -265,10 +293,12 @@ ia_css_configure_sc(
                }
                if (size) {
                        ia_css_sc_config((struct sh_css_isp_sc_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                        &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                        config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_sc() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
@@ -276,10 +306,11 @@ ia_css_configure_sc(
 
 void
 ia_css_configure_raw(
-       const struct ia_css_binary *binary,
-       const struct ia_css_raw_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_raw_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_raw() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -291,20 +322,23 @@ ia_css_configure_raw(
                }
                if (size) {
                        ia_css_raw_config((struct sh_css_isp_raw_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_raw() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_tnr(
-       const struct ia_css_binary *binary,
-       const struct ia_css_tnr_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_tnr_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_tnr() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -316,20 +350,23 @@ ia_css_configure_tnr(
                }
                if (size) {
                        ia_css_tnr_config((struct sh_css_isp_tnr_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_tnr() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_ref(
-       const struct ia_css_binary *binary,
-       const struct ia_css_ref_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_ref_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_ref() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -341,20 +378,23 @@ ia_css_configure_ref(
                }
                if (size) {
                        ia_css_ref_config((struct sh_css_isp_ref_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                         &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                         config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_ref() leave:\n");
 }
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_vf(
-       const struct ia_css_binary *binary,
-       const struct ia_css_vf_configuration *config_dmem)
+    const struct ia_css_binary *binary,
+    const struct ia_css_vf_configuration *config_dmem)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_vf() enter:\n");
 
        {
                unsigned int offset = 0;
@@ -366,8 +406,10 @@ ia_css_configure_vf(
                }
                if (size) {
                        ia_css_vf_config((struct sh_css_isp_vf_isp_config *)
-                                       &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
-                                       config_dmem, size);             }
+                                        &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+                                        config_dmem, size);
+               }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_configure_vf() leave:\n");
 }
index 8aacd3dbc05a5263063f91a016f10329c24e61d9..451fbae02aee05511767a56b5b17d2498d08543a 100644 (file)
@@ -88,101 +88,101 @@ struct ia_css_config_memory_offsets {
 
 void
 ia_css_configure_iterator(
-       const struct ia_css_binary *binary,
-       const struct ia_css_iterator_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_iterator_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_copy_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_copy_output_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_copy_output_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_crop(
-       const struct ia_css_binary *binary,
-       const struct ia_css_crop_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_crop_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_fpn(
-       const struct ia_css_binary *binary,
-       const struct ia_css_fpn_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_fpn_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_dvs(
-       const struct ia_css_binary *binary,
-       const struct ia_css_dvs_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_dvs_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_qplane(
-       const struct ia_css_binary *binary,
-       const struct ia_css_qplane_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_qplane_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output0(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output0_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_output0_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output1(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output1_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_output1_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_output(
-       const struct ia_css_binary *binary,
-       const struct ia_css_output_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_output_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 #ifdef ISP2401
 void
 ia_css_configure_sc(
-       const struct ia_css_binary *binary,
-       const struct ia_css_sc_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_sc_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 #endif
 void
 ia_css_configure_raw(
-       const struct ia_css_binary *binary,
-       const struct ia_css_raw_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_raw_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_tnr(
-       const struct ia_css_binary *binary,
-       const struct ia_css_tnr_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_tnr_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_ref(
-       const struct ia_css_binary *binary,
-       const struct ia_css_ref_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_ref_configuration *config_dmem);
 
 /* Code generated by genparam/genconfig.c:gen_configure_function() */
 
 void
 ia_css_configure_vf(
-       const struct ia_css_binary *binary,
-       const struct ia_css_vf_configuration *config_dmem);
+    const struct ia_css_binary *binary,
+    const struct ia_css_vf_configuration *config_dmem);
 
 #endif /* IA_CSS_INCLUDE_CONFIGURATION */
 
index 3afe861b709efda47cf2272cf8b93f94532a20dd..2df57c4864b72d909c77317889ec5eb8ba480fb6 100644 (file)
 
 static void
 ia_css_process_aa(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
-       unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
-       unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
+       unsigned int size   =
+           stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
+       unsigned int offset =
+           stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
 
        if (size) {
                struct sh_css_isp_aa_params *t =  (struct sh_css_isp_aa_params *)
-                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+                                                 &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                t->strength = params->aa_config.strength;
        }
 }
@@ -85,28 +87,33 @@ ia_css_process_aa(
 
 static void
 ia_css_process_anr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr() enter:\n");
 
                        ia_css_anr_encode((struct sh_css_isp_anr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->anr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->anr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr() leave:\n");
                }
        }
 }
@@ -115,28 +122,33 @@ size);
 
 static void
 ia_css_process_anr2(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr2() enter:\n");
 
                        ia_css_anr2_vmem_encode((struct ia_css_isp_anr2_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->anr_thres,
-size);
+                                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                               &params->anr_thres,
+                                               size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_anr2() leave:\n");
                }
        }
 }
@@ -145,38 +157,43 @@ size);
 
 static void
 ia_css_process_bh(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
 
                        ia_css_bh_encode((struct sh_css_isp_bh_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->s3a_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->s3a_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
 
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
@@ -187,28 +204,33 @@ size);
 
 static void
 ia_css_process_cnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_cnr() enter:\n");
 
                        ia_css_cnr_encode((struct sh_css_isp_cnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->cnr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->cnr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_cnr() leave:\n");
                }
        }
 }
@@ -217,28 +239,33 @@ size);
 
 static void
 ia_css_process_crop(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_crop() enter:\n");
 
                        ia_css_crop_encode((struct sh_css_isp_crop_isp_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->crop_config,
-size);
+                                          &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                          &params->crop_config,
+                                          size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_crop() leave:\n");
                }
        }
 }
@@ -247,28 +274,33 @@ size);
 
 static void
 ia_css_process_csc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_csc() enter:\n");
 
                        ia_css_csc_encode((struct sh_css_isp_csc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->cc_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->cc_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_csc() leave:\n");
                }
        }
 }
@@ -277,26 +309,29 @@ size);
 
 static void
 ia_css_process_dp(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() enter:\n");
 
                        ia_css_dp_encode((struct sh_css_isp_dp_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dp_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->dp_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() leave:\n");
                }
@@ -307,28 +342,33 @@ size);
 
 static void
 ia_css_process_bnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bnr() enter:\n");
 
                        ia_css_bnr_encode((struct sh_css_isp_bnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->nr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->nr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bnr() leave:\n");
                }
        }
 }
@@ -337,26 +377,29 @@ size);
 
 static void
 ia_css_process_de(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() enter:\n");
 
                        ia_css_de_encode((struct sh_css_isp_de_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->de_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->de_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() leave:\n");
                }
@@ -367,28 +410,33 @@ size);
 
 static void
 ia_css_process_ecd(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ecd() enter:\n");
 
                        ia_css_ecd_encode((struct sh_css_isp_ecd_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ecd_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->ecd_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ecd() leave:\n");
                }
        }
 }
@@ -397,28 +445,33 @@ size);
 
 static void
 ia_css_process_formats(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_formats() enter:\n");
 
                        ia_css_formats_encode((struct sh_css_isp_formats_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->formats_config,
-size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                             &params->formats_config,
+                                             size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_formats() leave:\n");
                }
        }
 }
@@ -427,28 +480,33 @@ size);
 
 static void
 ia_css_process_fpn(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_fpn() enter:\n");
 
                        ia_css_fpn_encode((struct sh_css_isp_fpn_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->fpn_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->fpn_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_fpn() leave:\n");
                }
        }
 }
@@ -457,44 +515,50 @@ size);
 
 static void
 ia_css_process_gc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
 
                        ia_css_gc_encode((struct sh_css_isp_gc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->gc_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->gc_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
 
                        ia_css_gc_vamem_encode((struct sh_css_isp_gc_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
-                                       &params->gc_table,
-size);
+                                              &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+                                              &params->gc_table,
+                                              size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
@@ -505,26 +569,29 @@ size);
 
 static void
 ia_css_process_ce(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() enter:\n");
 
                        ia_css_ce_encode((struct sh_css_isp_ce_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ce_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->ce_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() leave:\n");
                }
@@ -535,28 +602,33 @@ size);
 
 static void
 ia_css_process_yuv2rgb(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yuv2rgb() enter:\n");
 
                        ia_css_yuv2rgb_encode((struct sh_css_isp_csc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->yuv2rgb_cc_config,
-size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                             &params->yuv2rgb_cc_config,
+                                             size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yuv2rgb() leave:\n");
                }
        }
 }
@@ -565,28 +637,33 @@ size);
 
 static void
 ia_css_process_rgb2yuv(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_rgb2yuv() enter:\n");
 
                        ia_css_rgb2yuv_encode((struct sh_css_isp_csc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->rgb2yuv_cc_config,
-size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                             &params->rgb2yuv_cc_config,
+                                             size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_rgb2yuv() leave:\n");
                }
        }
 }
@@ -595,28 +672,33 @@ size);
 
 static void
 ia_css_process_r_gamma(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_r_gamma() enter:\n");
 
                        ia_css_r_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
-                                       &params->r_gamma_table,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+                                                   &params->r_gamma_table,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_r_gamma() leave:\n");
                }
        }
 }
@@ -625,28 +707,33 @@ size);
 
 static void
 ia_css_process_g_gamma(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_g_gamma() enter:\n");
 
                        ia_css_g_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
-                                       &params->g_gamma_table,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+                                                   &params->g_gamma_table,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_g_gamma() leave:\n");
                }
        }
 }
@@ -655,28 +742,33 @@ size);
 
 static void
 ia_css_process_b_gamma(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_b_gamma() enter:\n");
 
                        ia_css_b_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
-                                       &params->b_gamma_table,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
+                                                   &params->b_gamma_table,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_b_gamma() leave:\n");
                }
        }
 }
@@ -685,31 +777,36 @@ size);
 
 static void
 ia_css_process_uds(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
 
                if (size) {
                        struct sh_css_sp_uds_params *p;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_uds() enter:\n");
 
                        p = (struct sh_css_sp_uds_params *)
-                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+                           &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                        p->crop_pos = params->uds_config.crop_pos;
                        p->uds = params->uds_config.uds;
 
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_uds() leave:\n");
                }
        }
 }
@@ -718,28 +815,33 @@ ia_css_process_uds(
 
 static void
 ia_css_process_raa(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_raa() enter:\n");
 
                        ia_css_raa_encode((struct sh_css_isp_aa_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->raa_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->raa_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_raa() leave:\n");
                }
        }
 }
@@ -748,28 +850,33 @@ size);
 
 static void
 ia_css_process_s3a(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_s3a() enter:\n");
 
                        ia_css_s3a_encode((struct sh_css_isp_s3a_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->s3a_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->s3a_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_s3a() leave:\n");
                }
        }
 }
@@ -778,44 +885,50 @@ size);
 
 static void
 ia_css_process_ob(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
 
                        ia_css_ob_encode((struct sh_css_isp_ob_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ob_config,
-&params->stream_configs.ob, size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->ob_config,
+                                        &params->stream_configs.ob, size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
 
                        ia_css_ob_vmem_encode((struct sh_css_isp_ob_vmem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->ob_config,
-&params->stream_configs.ob, size);
+                                             &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                             &params->ob_config,
+                                             &params->stream_configs.ob, size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
@@ -826,28 +939,33 @@ ia_css_process_ob(
 
 static void
 ia_css_process_output(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_output() enter:\n");
 
                        ia_css_output_encode((struct sh_css_isp_output_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->output_config,
-size);
+                                            &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                            &params->output_config,
+                                            size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_output() leave:\n");
                }
        }
 }
@@ -856,26 +974,29 @@ size);
 
 static void
 ia_css_process_sc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() enter:\n");
 
                        ia_css_sc_encode((struct sh_css_isp_sc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->sc_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->sc_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() leave:\n");
                }
@@ -886,30 +1007,35 @@ size);
 
 static void
 ia_css_process_bds(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
 
                if (size) {
                        struct sh_css_isp_bds_params *p;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bds() enter:\n");
 
                        p = (struct sh_css_isp_bds_params *)
-                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+                           &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                        p->baf_strength = params->bds_config.strength;
 
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_bds() leave:\n");
                }
        }
 }
@@ -918,28 +1044,33 @@ ia_css_process_bds(
 
 static void
 ia_css_process_tnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_tnr() enter:\n");
 
                        ia_css_tnr_encode((struct sh_css_isp_tnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->tnr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->tnr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_tnr() leave:\n");
                }
        }
 }
@@ -948,28 +1079,33 @@ size);
 
 static void
 ia_css_process_macc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_macc() enter:\n");
 
                        ia_css_macc_encode((struct sh_css_isp_macc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->macc_config,
-size);
+                                          &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                          &params->macc_config,
+                                          size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_macc() leave:\n");
                }
        }
 }
@@ -978,28 +1114,33 @@ size);
 
 static void
 ia_css_process_sdis_horicoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horicoef() enter:\n");
 
                        ia_css_sdis_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                        &params->dvs_coefs,
+                                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horicoef() leave:\n");
                }
        }
 }
@@ -1008,28 +1149,33 @@ size);
 
 static void
 ia_css_process_sdis_vertcoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertcoef() enter:\n");
 
                        ia_css_sdis_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                        &params->dvs_coefs,
+                                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertcoef() leave:\n");
                }
        }
 }
@@ -1038,28 +1184,33 @@ size);
 
 static void
 ia_css_process_sdis_horiproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horiproj() enter:\n");
 
                        ia_css_sdis_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                   &params->dvs_coefs,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_horiproj() leave:\n");
                }
        }
 }
@@ -1068,28 +1219,33 @@ size);
 
 static void
 ia_css_process_sdis_vertproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertproj() enter:\n");
 
                        ia_css_sdis_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs_coefs,
-size);
+                                                   &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                   &params->dvs_coefs,
+                                                   size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis_vertproj() leave:\n");
                }
        }
 }
@@ -1098,28 +1254,33 @@ size);
 
 static void
 ia_css_process_sdis2_horicoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horicoef() enter:\n");
 
                        ia_css_sdis2_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                         &params->dvs2_coefs,
+                                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horicoef() leave:\n");
                }
        }
 }
@@ -1128,28 +1289,33 @@ size);
 
 static void
 ia_css_process_sdis2_vertcoef(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertcoef() enter:\n");
 
                        ia_css_sdis2_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                                         &params->dvs2_coefs,
+                                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertcoef() leave:\n");
                }
        }
 }
@@ -1158,28 +1324,33 @@ size);
 
 static void
 ia_css_process_sdis2_horiproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horiproj() enter:\n");
 
                        ia_css_sdis2_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                    &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                    &params->dvs2_coefs,
+                                                    size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_horiproj() leave:\n");
                }
        }
 }
@@ -1188,28 +1359,33 @@ size);
 
 static void
 ia_css_process_sdis2_vertproj(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertproj() enter:\n");
 
                        ia_css_sdis2_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->dvs2_coefs,
-size);
+                                                    &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                                    &params->dvs2_coefs,
+                                                    size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_sdis2_vertproj() leave:\n");
                }
        }
 }
@@ -1218,26 +1394,29 @@ size);
 
 static void
 ia_css_process_wb(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() enter:\n");
 
                        ia_css_wb_encode((struct sh_css_isp_wb_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->wb_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->wb_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() leave:\n");
                }
@@ -1248,26 +1427,29 @@ size);
 
 static void
 ia_css_process_nr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() enter:\n");
 
                        ia_css_nr_encode((struct sh_css_isp_ynr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->nr_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->nr_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() leave:\n");
                }
@@ -1278,28 +1460,33 @@ size);
 
 static void
 ia_css_process_yee(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yee() enter:\n");
 
                        ia_css_yee_encode((struct sh_css_isp_yee_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->yee_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->yee_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_yee() leave:\n");
                }
        }
 }
@@ -1308,28 +1495,33 @@ size);
 
 static void
 ia_css_process_ynr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ynr() enter:\n");
 
                        ia_css_ynr_encode((struct sh_css_isp_yee2_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ynr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->ynr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ynr() leave:\n");
                }
        }
 }
@@ -1338,26 +1530,29 @@ size);
 
 static void
 ia_css_process_fc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
 
                if (size) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() enter:\n");
 
                        ia_css_fc_encode((struct sh_css_isp_fc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->fc_config,
-size);
+                                        &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->fc_config,
+                                        size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() leave:\n");
                }
@@ -1368,46 +1563,56 @@ size);
 
 static void
 ia_css_process_ctc(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() enter:\n");
 
                        ia_css_ctc_encode((struct sh_css_isp_ctc_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->ctc_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->ctc_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() leave:\n");
                }
        }
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() enter:\n");
 
                        ia_css_ctc_vamem_encode((struct sh_css_isp_ctc_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
-                                       &params->ctc_table,
-size);
+                                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+                                               &params->ctc_table,
+                                               size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_ctc() leave:\n");
                }
        }
 }
@@ -1416,28 +1621,33 @@ size);
 
 static void
 ia_css_process_xnr_table(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr_table() enter:\n");
 
                        ia_css_xnr_table_vamem_encode((struct sh_css_isp_xnr_vamem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
-                                       &params->xnr_table,
-size);
+                                                     &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+                                                     &params->xnr_table,
+                                                     size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr_table() leave:\n");
                }
        }
 }
@@ -1446,28 +1656,33 @@ size);
 
 static void
 ia_css_process_xnr(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr() enter:\n");
 
                        ia_css_xnr_encode((struct sh_css_isp_xnr_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->xnr_config,
-size);
+                                         &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                         &params->xnr_config,
+                                         size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr() leave:\n");
                }
        }
 }
@@ -1476,47 +1691,57 @@ size);
 
 static void
 ia_css_process_xnr3(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        assert(params);
 
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() enter:\n");
 
                        ia_css_xnr3_encode((struct sh_css_isp_xnr3_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                                       &params->xnr3_config,
-size);
+                                          &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                          &params->xnr3_config,
+                                          size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() leave:\n");
                }
        }
 #ifdef ISP2401
        {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
 
                if (size) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() enter:\n");
 
                        ia_css_xnr3_vmem_encode((struct sh_css_isp_xnr3_vmem_params *)
-                                       &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
-                                       &params->xnr3_config,
-size);
+                                               &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+                                               &params->xnr3_config,
+                                               size);
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+                           true;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                           "ia_css_process_xnr3() leave:\n");
                }
        }
 #endif
@@ -1525,9 +1750,9 @@ size);
 /* Code generated by genparam/gencode.c:gen_param_process_table() */
 
 void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
-                       unsigned int pipe_id,
-                       const struct ia_css_pipeline_stage *stage,
-                       struct ia_css_isp_parameters *params) = {
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params) = {
        ia_css_process_aa,
        ia_css_process_anr,
        ia_css_process_anr2,
@@ -1580,17 +1805,20 @@ void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
 
 static void
 ia_css_get_dp_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dp_config *config){
+                    struct ia_css_dp_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_dp_config() enter: config=%p\n",
+                           config);
 
        *config = params->dp_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_dp_config() leave\n");
        ia_css_dp_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1598,7 +1826,7 @@ ia_css_get_dp_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_dp_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dp_config *config)
+                    const struct ia_css_dp_config *config)
 {
        if (!config)
                return;
@@ -1612,24 +1840,28 @@ ia_css_set_dp_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_DP_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_dp_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_dp_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_wb_config *config){
+                    struct ia_css_wb_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_wb_config() enter: config=%p\n",
+                           config);
 
        *config = params->wb_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_wb_config() leave\n");
        ia_css_wb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1637,7 +1869,7 @@ ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_wb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_wb_config *config)
+                    const struct ia_css_wb_config *config)
 {
        if (!config)
                return;
@@ -1651,24 +1883,28 @@ ia_css_set_wb_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_WB_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_wb_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_wb_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_tnr_config *config){
+                     struct ia_css_tnr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_tnr_config() enter: config=%p\n",
+                           config);
 
        *config = params->tnr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_tnr_config() leave\n");
        ia_css_tnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1676,7 +1912,7 @@ ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_tnr_config *config)
+                     const struct ia_css_tnr_config *config)
 {
        if (!config)
                return;
@@ -1690,24 +1926,28 @@ ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_TNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_tnr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_tnr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ob_config *config){
+                    struct ia_css_ob_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ob_config() enter: config=%p\n",
+                           config);
 
        *config = params->ob_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ob_config() leave\n");
        ia_css_ob_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1715,7 +1955,7 @@ ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ob_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ob_config *config)
+                    const struct ia_css_ob_config *config)
 {
        if (!config)
                return;
@@ -1729,24 +1969,28 @@ ia_css_set_ob_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_OB_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ob_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ob_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_de_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_de_config *config){
+                    struct ia_css_de_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_de_config() enter: config=%p\n",
+                           config);
 
        *config = params->de_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_de_config() leave\n");
        ia_css_de_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1754,7 +1998,7 @@ ia_css_get_de_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_de_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_de_config *config)
+                    const struct ia_css_de_config *config)
 {
        if (!config)
                return;
@@ -1768,24 +2012,28 @@ ia_css_set_de_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_DE_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_de_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_de_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_anr_config *config){
+                     struct ia_css_anr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr_config() enter: config=%p\n",
+                           config);
 
        *config = params->anr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr_config() leave\n");
        ia_css_anr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1793,7 +2041,7 @@ ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_anr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_config *config)
+                     const struct ia_css_anr_config *config)
 {
        if (!config)
                return;
@@ -1807,24 +2055,28 @@ ia_css_set_anr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_ANR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_anr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_anr_thres *config){
+                      struct ia_css_anr_thres *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr2_config() enter: config=%p\n",
+                           config);
 
        *config = params->anr_thres;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_anr2_config() leave\n");
        ia_css_anr2_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1832,7 +2084,7 @@ ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_thres *config)
+                      const struct ia_css_anr_thres *config)
 {
        if (!config)
                return;
@@ -1846,24 +2098,28 @@ ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_ANR2_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr2_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_anr2_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ce_config *config){
+                    struct ia_css_ce_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ce_config() enter: config=%p\n",
+                           config);
 
        *config = params->ce_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ce_config() leave\n");
        ia_css_ce_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1871,7 +2127,7 @@ ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ce_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ce_config *config)
+                    const struct ia_css_ce_config *config)
 {
        if (!config)
                return;
@@ -1885,24 +2141,28 @@ ia_css_set_ce_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CE_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ce_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ce_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ecd_config *config){
+                     struct ia_css_ecd_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ecd_config() enter: config=%p\n",
+                           config);
 
        *config = params->ecd_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ecd_config() leave\n");
        ia_css_ecd_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1910,7 +2170,7 @@ ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ecd_config *config)
+                     const struct ia_css_ecd_config *config)
 {
        if (!config)
                return;
@@ -1924,24 +2184,28 @@ ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_ECD_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ecd_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ecd_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ynr_config *config){
+                     struct ia_css_ynr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ynr_config() enter: config=%p\n",
+                           config);
 
        *config = params->ynr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ynr_config() leave\n");
        ia_css_ynr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1949,7 +2213,7 @@ ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ynr_config *config)
+                     const struct ia_css_ynr_config *config)
 {
        if (!config)
                return;
@@ -1963,24 +2227,28 @@ ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_YNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ynr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ynr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_fc_config *config){
+                    struct ia_css_fc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_fc_config() enter: config=%p\n",
+                           config);
 
        *config = params->fc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_fc_config() leave\n");
        ia_css_fc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -1988,7 +2256,7 @@ ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_fc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_fc_config *config)
+                    const struct ia_css_fc_config *config)
 {
        if (!config)
                return;
@@ -2002,24 +2270,28 @@ ia_css_set_fc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_FC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_fc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_fc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cnr_config *config){
+                     struct ia_css_cnr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_cnr_config() enter: config=%p\n",
+                           config);
 
        *config = params->cnr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_cnr_config() leave\n");
        ia_css_cnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2027,7 +2299,7 @@ ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cnr_config *config)
+                     const struct ia_css_cnr_config *config)
 {
        if (!config)
                return;
@@ -2041,24 +2313,28 @@ ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_cnr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_cnr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_macc_config *config){
+                      struct ia_css_macc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_macc_config() enter: config=%p\n",
+                           config);
 
        *config = params->macc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_macc_config() leave\n");
        ia_css_macc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2066,7 +2342,7 @@ ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_macc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_macc_config *config)
+                      const struct ia_css_macc_config *config)
 {
        if (!config)
                return;
@@ -2080,24 +2356,28 @@ ia_css_set_macc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_MACC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_macc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_macc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ctc_config *config){
+                     struct ia_css_ctc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ctc_config() enter: config=%p\n",
+                           config);
 
        *config = params->ctc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_ctc_config() leave\n");
        ia_css_ctc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2105,7 +2385,7 @@ ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ctc_config *config)
+                     const struct ia_css_ctc_config *config)
 {
        if (!config)
                return;
@@ -2119,31 +2399,35 @@ ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CTC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ctc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_ctc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_aa_config *config){
+                    struct ia_css_aa_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_aa_config() enter: config=%p\n",
+                           config);
 
        *config = params->aa_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_aa_config() leave\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_aa_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_aa_config *config)
+                    const struct ia_css_aa_config *config)
 {
        if (!config)
                return;
@@ -2156,24 +2440,28 @@ ia_css_set_aa_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_AA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_aa_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_aa_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cc_config *config){
+                         struct ia_css_cc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_yuv2rgb_config() enter: config=%p\n",
+                           config);
 
        *config = params->yuv2rgb_cc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_yuv2rgb_config() leave\n");
        ia_css_yuv2rgb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2181,7 +2469,7 @@ ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config)
+                         const struct ia_css_cc_config *config)
 {
        if (!config)
                return;
@@ -2195,24 +2483,28 @@ ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_YUV2RGB_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_yuv2rgb_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_yuv2rgb_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cc_config *config){
+                         struct ia_css_cc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_rgb2yuv_config() enter: config=%p\n",
+                           config);
 
        *config = params->rgb2yuv_cc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_rgb2yuv_config() leave\n");
        ia_css_rgb2yuv_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2220,7 +2512,7 @@ ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config)
+                         const struct ia_css_cc_config *config)
 {
        if (!config)
                return;
@@ -2234,24 +2526,28 @@ ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_RGB2YUV_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_rgb2yuv_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_rgb2yuv_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_cc_config *config){
+                     struct ia_css_cc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_csc_config() enter: config=%p\n",
+                           config);
 
        *config = params->cc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_csc_config() leave\n");
        ia_css_csc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2259,7 +2555,7 @@ ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_csc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config)
+                     const struct ia_css_cc_config *config)
 {
        if (!config)
                return;
@@ -2273,24 +2569,28 @@ ia_css_set_csc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_CSC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_csc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_csc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_nr_config *config){
+                    struct ia_css_nr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_nr_config() enter: config=%p\n",
+                           config);
 
        *config = params->nr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_nr_config() leave\n");
        ia_css_nr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2298,7 +2598,7 @@ ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_nr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_nr_config *config)
+                    const struct ia_css_nr_config *config)
 {
        if (!config)
                return;
@@ -2313,24 +2613,28 @@ ia_css_set_nr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_NR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_nr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_nr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_gc_config *config){
+                    struct ia_css_gc_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_gc_config() enter: config=%p\n",
+                           config);
 
        *config = params->gc_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_gc_config() leave\n");
        ia_css_gc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2338,7 +2642,7 @@ ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_gc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_gc_config *config)
+                    const struct ia_css_gc_config *config)
 {
        if (!config)
                return;
@@ -2352,24 +2656,28 @@ ia_css_set_gc_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_GC_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_gc_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_gc_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horicoef_config() leave\n");
        ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2377,13 +2685,14 @@ ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horicoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_horicoef_config() enter:\n");
        ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2394,24 +2703,28 @@ ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horicoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_horicoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertcoef_config() leave\n");
        ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2419,13 +2732,14 @@ ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertcoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_vertcoef_config() enter:\n");
        ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2436,24 +2750,28 @@ ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_VERTCOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_horiproj_config() leave\n");
        ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2461,13 +2779,14 @@ ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horiproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_horiproj_config() enter:\n");
        ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2478,24 +2797,28 @@ ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_HORIPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horiproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_horiproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs_coefficients *config){
+                               struct ia_css_dvs_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis_vertproj_config() leave\n");
        ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2503,13 +2826,14 @@ ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config)
+                               const struct ia_css_dvs_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis_vertproj_config() enter:\n");
        ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs_coefs = *config;
        params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
@@ -2520,24 +2844,28 @@ ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS_VERTPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis_vertproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horicoef_config() leave\n");
        ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2545,13 +2873,14 @@ ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horicoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_horicoef_config() enter:\n");
        ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2562,24 +2891,28 @@ ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertcoef_config() leave\n");
        ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2587,13 +2920,14 @@ ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertcoef_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_vertcoef_config() enter:\n");
        ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2604,24 +2938,28 @@ ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_VERTCOEF_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_horiproj_config() leave\n");
        ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2629,13 +2967,14 @@ ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horiproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_horiproj_config() enter:\n");
        ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2646,24 +2985,28 @@ ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_HORIPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dvs2_coefficients *config){
+                                struct ia_css_dvs2_coefficients *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
+                           config);
 
        *config = params->dvs2_coefs;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_sdis2_vertproj_config() leave\n");
        ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2671,13 +3014,14 @@ ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config)
+                                const struct ia_css_dvs2_coefficients *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertproj_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_sdis2_vertproj_config() enter:\n");
        ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dvs2_coefs = *config;
        params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
@@ -2688,24 +3032,28 @@ ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_SDIS2_VERTPROJ_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_rgb_gamma_table *config){
+                         struct ia_css_rgb_gamma_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_r_gamma_config() enter: config=%p\n",
+                           config);
 
        *config = params->r_gamma_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_r_gamma_config() leave\n");
        ia_css_r_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2713,7 +3061,7 @@ ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config)
+                         const struct ia_css_rgb_gamma_table *config)
 {
        if (!config)
                return;
@@ -2727,24 +3075,28 @@ ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_R_GAMMA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_r_gamma_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_r_gamma_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_rgb_gamma_table *config){
+                         struct ia_css_rgb_gamma_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_g_gamma_config() enter: config=%p\n",
+                           config);
 
        *config = params->g_gamma_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_g_gamma_config() leave\n");
        ia_css_g_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2752,7 +3104,7 @@ ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config)
+                         const struct ia_css_rgb_gamma_table *config)
 {
        if (!config)
                return;
@@ -2766,24 +3118,28 @@ ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_G_GAMMA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_g_gamma_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_g_gamma_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_rgb_gamma_table *config){
+                         struct ia_css_rgb_gamma_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_b_gamma_config() enter: config=%p\n",
+                           config);
 
        *config = params->b_gamma_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_b_gamma_config() leave\n");
        ia_css_b_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2791,7 +3147,7 @@ ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config)
+                         const struct ia_css_rgb_gamma_table *config)
 {
        if (!config)
                return;
@@ -2805,24 +3161,28 @@ ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_B_GAMMA_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_b_gamma_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_b_gamma_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_xnr_table *config){
+                           struct ia_css_xnr_table *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_table_config() enter: config=%p\n",
+                           config);
 
        *config = params->xnr_table;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_table_config() leave\n");
        ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2830,13 +3190,14 @@ ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_table *config)
+                           const struct ia_css_xnr_table *config)
 {
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr_table_config() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_set_xnr_table_config() enter:\n");
        ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->xnr_table = *config;
        params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
@@ -2844,24 +3205,28 @@ ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_table_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_xnr_table_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_formats_config *config){
+                         struct ia_css_formats_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_formats_config() enter: config=%p\n",
+                           config);
 
        *config = params->formats_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_formats_config() leave\n");
        ia_css_formats_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2869,7 +3234,7 @@ ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_formats_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_formats_config *config)
+                         const struct ia_css_formats_config *config)
 {
        if (!config)
                return;
@@ -2883,24 +3248,28 @@ ia_css_set_formats_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_FORMATS_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_formats_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_formats_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_xnr_config *config){
+                     struct ia_css_xnr_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_config() enter: config=%p\n",
+                           config);
 
        *config = params->xnr_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr_config() leave\n");
        ia_css_xnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2908,7 +3277,7 @@ ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_config *config)
+                     const struct ia_css_xnr_config *config)
 {
        if (!config)
                return;
@@ -2922,24 +3291,28 @@ ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_XNR_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_xnr_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_xnr3_config *config){
+                      struct ia_css_xnr3_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr3_config() enter: config=%p\n",
+                           config);
 
        *config = params->xnr3_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_xnr3_config() leave\n");
        ia_css_xnr3_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2947,7 +3320,7 @@ ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr3_config *config)
+                      const struct ia_css_xnr3_config *config)
 {
        if (!config)
                return;
@@ -2961,24 +3334,28 @@ ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_XNR3_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr3_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_xnr3_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_3a_config *config){
+                     struct ia_css_3a_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_s3a_config() enter: config=%p\n",
+                           config);
 
        *config = params->s3a_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_s3a_config() leave\n");
        ia_css_s3a_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -2986,7 +3363,7 @@ ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_3a_config *config)
+                     const struct ia_css_3a_config *config)
 {
        if (!config)
                return;
@@ -3001,24 +3378,28 @@ ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_S3A_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_s3a_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_s3a_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_get_function() */
 
 static void
 ia_css_get_output_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_output_config *config){
+                        struct ia_css_output_config *config)
+{
        if (!config)
                return;
 
        assert(params);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: config=%p\n",
-               config);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_output_config() enter: config=%p\n",
+                           config);
 
        *config = params->output_config;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_get_output_config() leave\n");
        ia_css_output_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
 }
 
@@ -3026,7 +3407,7 @@ ia_css_get_output_config(const struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_output_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_output_config *config)
+                        const struct ia_css_output_config *config)
 {
        if (!config)
                return;
@@ -3040,14 +3421,15 @@ ia_css_set_output_config(struct ia_css_isp_parameters *params,
        params->config_changed[IA_CSS_OUTPUT_ID] = true;
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_output_config() leave: return_void\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_set_output_config() leave: return_void\n");
 }
 
 /* Code generated by genparam/gencode.c:gen_global_access_function() */
 
 void
 ia_css_get_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 {
        ia_css_get_dp_config(params, config->dp_config);
        ia_css_get_wb_config(params, config->wb_config);
@@ -3092,7 +3474,7 @@ ia_css_get_configs(struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 {
        ia_css_set_dp_config(params, config->dp_config);
        ia_css_set_wb_config(params, config->wb_config);
index b5175c253c61d02ed224fe86a9743d1da5e87e4e..7b81ffa29d8bd737d257a22378e21fb56839fbf2 100644 (file)
@@ -150,237 +150,237 @@ struct ia_css_memory_offsets {
 struct ia_css_pipeline_stage; /* forward declaration */
 
 extern void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
-                       unsigned int pipe_id,
-                       const struct ia_css_pipeline_stage *stage,
-                       struct ia_css_isp_parameters *params);
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_dp_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dp_config *config);
+                    const struct ia_css_dp_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_wb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_wb_config *config);
+                    const struct ia_css_wb_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_tnr_config *config);
+                     const struct ia_css_tnr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ob_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ob_config *config);
+                    const struct ia_css_ob_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_de_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_de_config *config);
+                    const struct ia_css_de_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_anr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_config *config);
+                     const struct ia_css_anr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_anr_thres *config);
+                      const struct ia_css_anr_thres *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ce_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ce_config *config);
+                    const struct ia_css_ce_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ecd_config *config);
+                     const struct ia_css_ecd_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ynr_config *config);
+                     const struct ia_css_ynr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_fc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_fc_config *config);
+                    const struct ia_css_fc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cnr_config *config);
+                     const struct ia_css_cnr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_macc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_macc_config *config);
+                      const struct ia_css_macc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ctc_config *config);
+                     const struct ia_css_ctc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_aa_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_aa_config *config);
+                    const struct ia_css_aa_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config);
+                         const struct ia_css_cc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config);
+                         const struct ia_css_cc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_csc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_cc_config *config);
+                     const struct ia_css_cc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_nr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_nr_config *config);
+                    const struct ia_css_nr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_gc_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_gc_config *config);
+                    const struct ia_css_gc_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs_coefficients *config);
+                               const struct ia_css_dvs_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dvs2_coefficients *config);
+                                const struct ia_css_dvs2_coefficients *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config);
+                         const struct ia_css_rgb_gamma_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config);
+                         const struct ia_css_rgb_gamma_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_rgb_gamma_table *config);
+                         const struct ia_css_rgb_gamma_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_table *config);
+                           const struct ia_css_xnr_table *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_formats_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_formats_config *config);
+                         const struct ia_css_formats_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr_config *config);
+                     const struct ia_css_xnr_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_xnr3_config *config);
+                      const struct ia_css_xnr3_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_3a_config *config);
+                     const struct ia_css_3a_config *config);
 
 /* Code generated by genparam/gencode.c:gen_set_function() */
 
 void
 ia_css_set_output_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_output_config *config);
+                        const struct ia_css_output_config *config);
 
 /* Code generated by genparam/gencode.c:gen_global_access_function() */
 
 void
 ia_css_get_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 ;
 #ifdef ISP2401
 
@@ -389,7 +389,7 @@ ia_css_get_configs(struct ia_css_isp_parameters *params,
 
 void
 ia_css_set_configs(struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config)
+                  const struct ia_css_isp_config *config)
 ;
 #ifdef ISP2401
 
index dcc42c1ce94ef2f19b9026dc14017c21ebd8319c..c54787f3fc2445cea1918347700704be3b723525 100644 (file)
 
 static void
 ia_css_initialize_aa_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_aa_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.aa.size;
                unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
 
                if (size)
-                       memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset], 0, size);
+                       memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                              0, size);
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_aa_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_cnr_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
@@ -52,20 +56,22 @@ ia_css_initialize_cnr_state(
 
                if (size) {
                        ia_css_init_cnr_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_cnr2_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr2_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
@@ -74,20 +80,22 @@ ia_css_initialize_cnr2_state(
 
                if (size) {
                        ia_css_init_cnr2_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_cnr2_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_dp_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_dp_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.dp.size;
@@ -96,20 +104,22 @@ ia_css_initialize_dp_state(
 
                if (size) {
                        ia_css_init_dp_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_dp_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_de_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_de_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.de.size;
@@ -118,20 +128,22 @@ ia_css_initialize_de_state(
 
                if (size) {
                        ia_css_init_de_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_de_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_tnr_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_tnr_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
@@ -140,20 +152,22 @@ ia_css_initialize_tnr_state(
 
                if (size) {
                        ia_css_init_tnr_state((struct sh_css_isp_tnr_dmem_state *)
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
-                               size);
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+                                             size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_tnr_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_ref_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ref_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.ref.size;
@@ -162,20 +176,22 @@ ia_css_initialize_ref_state(
 
                if (size) {
                        ia_css_init_ref_state((struct sh_css_isp_ref_dmem_state *)
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
-                               size);
+                                             &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+                                             size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ref_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_init_function() */
 
 static void
 ia_css_initialize_ynr_state(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ynr_state() enter:\n");
 
        {
                unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
@@ -184,16 +200,18 @@ ia_css_initialize_ynr_state(
 
                if (size) {
                        ia_css_init_ynr_state(
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
-                               size);
+                           &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+                           size);
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() leave:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_initialize_ynr_state() leave:\n");
 }
 
 /* Code generated by genparam/genstate.c:gen_state_init_table() */
 
-void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary) = {
+void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+    const struct ia_css_binary *binary) = {
        ia_css_initialize_aa_state,
        ia_css_initialize_cnr_state,
        ia_css_initialize_cnr2_state,
index 732adafb0a633d463d04adcf7b1f9529cddd69e2..cc9cdcd0e2be825421f0bebad0eaa9b7bd7d0902 100644 (file)
@@ -65,7 +65,8 @@ struct ia_css_state_memory_offsets {
 #include "ia_css_binary.h"   /* struct ia_css_binary */
 /* Code generated by genparam/genstate.c:gen_state_init_table() */
 
-extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary);
+extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+    const struct ia_css_binary *binary);
 
 #endif /* IA_CSS_INCLUDE_STATE */
 
index ba43562f12874cac152d4149eb53d9ad1436d96f..8741b8347dd42ce9f2e53b77c919050270556d63 100644 (file)
 #define _DMA_V2_ZERO_EXTEND                             0
 #define _DMA_V2_SIGN_EXTEND                             1
 
-  /* SLAVE address map */
+/* SLAVE address map */
 #define _DMA_V2_SEL_FSM_CMD                             0
 #define _DMA_V2_SEL_CH_REG                              1
 #define _DMA_V2_SEL_CONN_GROUP                          2
index 33f8b5ce9ba3e09ec08ae2d95bb145a8431b2813..3cc627aa6b091f3caa473862241dcefe49f9bccb 100644 (file)
 
 #define HRT_GDC_BCI_COEF_BITS           14 /* 14 bits per coefficient                                                   */
 #define HRT_GDC_BCI_COEF_ONE             (1 << (HRT_GDC_BCI_COEF_BITS - 2))  /* We represent signed 10 bit coefficients.  */
-                                                                       /* The supported range is [-256, .., +256]      */
-                                                                       /* in 14-bit signed notation,                   */
-                                                                       /* We need all ten bits (MSB must be zero).     */
-                                                                       /* -s is inserted to solve this issue, and      */
-                                                                       /* therefore "1" is equal to +256.              */
+/* The supported range is [-256, .., +256]      */
+/* in 14-bit signed notation,                   */
+/* We need all ten bits (MSB must be zero).     */
+/* -s is inserted to solve this issue, and      */
+/* therefore "1" is equal to +256.              */
 #define HRT_GDC_BCI_COEF_MASK            ((1 << HRT_GDC_BCI_COEF_BITS) - 1)
 
 #define HRT_GDC_LUT_BYTES                (HRT_GDC_N * 4 * 2)                /* 1024 addresses, 4 coefficients per address,  */
-                                                                       /* 2 bytes per coefficient                      */
+/* 2 bytes per coefficient                      */
 
 #define _HRT_GDC_REG_ALIGN               4
 
-  //     31  30  29    25 24                     0
-  //  |-----|---|--------|------------------------|
-  //  | CMD | C | Reg_ID |        Value           |
+//     31  30  29    25 24                     0
+//  |-----|---|--------|------------------------|
+//  | CMD | C | Reg_ID |        Value           |
 
-  // There are just two commands possible for the GDC block:
-  // 1 - Configure reg
-  // 0 - Data token
+// There are just two commands possible for the GDC block:
+// 1 - Configure reg
+// 0 - Data token
 
-  // C      - Reserved bit
-  //          Used in protocol to indicate whether it is C-run or other type of runs
-  //          In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
+// C      - Reserved bit
+//          Used in protocol to indicate whether it is C-run or other type of runs
+//          In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
 
-  // Reg_ID - Address of the register to be configured
+// Reg_ID - Address of the register to be configured
 
-  // Value  - Value to store to the addressed register, maximum of 24 bits
+// Value  - Value to store to the addressed register, maximum of 24 bits
 
-  // Configure reg command is not followed by any other token.
-  // The address of the register and the data to be filled in is contained in the same token
+// Configure reg command is not followed by any other token.
+// The address of the register and the data to be filled in is contained in the same token
 
-  // When the first data token is received, it must be:
-  //   1. FRX and FRY (device configured in one of the  scaling modes) ***DEFAULT MODE***, or,
-  //   2. P0'X        (device configured in one of the tetragon modes)
-  // After the first data token is received, pre-defined number of tokens with the following meaning follow:
-  //   1. two  tokens: SRC address ; DST address
-  //   2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
+// When the first data token is received, it must be:
+//   1. FRX and FRY (device configured in one of the  scaling modes) ***DEFAULT MODE***, or,
+//   2. P0'X        (device configured in one of the tetragon modes)
+// After the first data token is received, pre-defined number of tokens with the following meaning follow:
+//   1. two  tokens: SRC address ; DST address
+//   2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
 
 #define HRT_GDC_CONFIG_CMD             1
 #define HRT_GDC_DATA_CMD               0
index d02435a3ec5a1e23fafae4a89505b7e66d48ed03..96286a141b00b6a8471398c367927cafdc8b6162 100644 (file)
 #define _HRT_GPIO_BLOCK_REG_ALIGN 4
 
 /* R/W registers */
-#define _gpio_block_reg_do_e                            0
+#define _gpio_block_reg_do_e                            0
 #define _gpio_block_reg_do_select                     1
-#define _gpio_block_reg_do_0                            2
-#define _gpio_block_reg_do_1                            3
+#define _gpio_block_reg_do_0                            2
+#define _gpio_block_reg_do_1                            3
 #define _gpio_block_reg_do_pwm_cnt_0        4
 #define _gpio_block_reg_do_pwm_cnt_1        5
 #define _gpio_block_reg_do_pwm_cnt_2        6
@@ -36,6 +36,6 @@
 #define _gpio_block_reg_di_active_level          15
 
 /* read-only registers */
-#define _gpio_block_reg_di                               16
+#define _gpio_block_reg_di                               16
 
 #endif /* _gpio_block_defs_h_ */
index 0b921c33a7d2cedb1993581c442560b0f5719ed3..071073d70ebfdc239833544e1c043fa9401fbb06 100644 (file)
  * The definitions are taken from <system>_defs.h
  */
 typedef enum hrt_isp_css_irq {
-  hrt_isp_css_irq_gpio_pin_0           = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_1           = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_2           = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_3           = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_4           = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_5           = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_6           = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_7           = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_8           = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_9           = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_10          = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
-  hrt_isp_css_irq_gpio_pin_11          = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
-  hrt_isp_css_irq_sp                   = HIVE_GP_DEV_IRQ_SP_BIT_ID,
-  hrt_isp_css_irq_isp                  = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
-  hrt_isp_css_irq_isys                 = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
-  hrt_isp_css_irq_isel                 = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
-  hrt_isp_css_irq_ifmt                 = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
-  hrt_isp_css_irq_sp_stream_mon        = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
-  hrt_isp_css_irq_isp_stream_mon       = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
-  hrt_isp_css_irq_mod_stream_mon       = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
-  hrt_isp_css_irq_is2401               = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
-  hrt_isp_css_irq_isp_bamem_error      = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_isp_dmem_error       = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_sp_icache_mem_error  = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_sp_dmem_error        = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_mmu_cache_mem_error  = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
-  hrt_isp_css_irq_gp_timer_0           = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
-  hrt_isp_css_irq_gp_timer_1           = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
-  hrt_isp_css_irq_sw_pin_0             = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
-  hrt_isp_css_irq_sw_pin_1             = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
-  hrt_isp_css_irq_dma                  = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
-  hrt_isp_css_irq_sp_stream_mon_b      = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
-  /* this must (obviously) be the last on in the enum */
-  hrt_isp_css_irq_num_irqs
+       hrt_isp_css_irq_gpio_pin_0           = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_1           = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_2           = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_3           = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_4           = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_5           = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_6           = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_7           = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_8           = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_9           = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_10          = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
+       hrt_isp_css_irq_gpio_pin_11          = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
+       hrt_isp_css_irq_sp                   = HIVE_GP_DEV_IRQ_SP_BIT_ID,
+       hrt_isp_css_irq_isp                  = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
+       hrt_isp_css_irq_isys                 = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
+       hrt_isp_css_irq_isel                 = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
+       hrt_isp_css_irq_ifmt                 = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
+       hrt_isp_css_irq_sp_stream_mon        = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
+       hrt_isp_css_irq_isp_stream_mon       = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
+       hrt_isp_css_irq_mod_stream_mon       = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
+       hrt_isp_css_irq_is2401               = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
+       hrt_isp_css_irq_isp_bamem_error      = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_isp_dmem_error       = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_sp_icache_mem_error  = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_sp_dmem_error        = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_mmu_cache_mem_error  = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
+       hrt_isp_css_irq_gp_timer_0           = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
+       hrt_isp_css_irq_gp_timer_1           = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
+       hrt_isp_css_irq_sw_pin_0             = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
+       hrt_isp_css_irq_sw_pin_1             = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
+       hrt_isp_css_irq_dma                  = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
+       hrt_isp_css_irq_sp_stream_mon_b      = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
+       /* this must (obviously) be the last on in the enum */
+       hrt_isp_css_irq_num_irqs
 } hrt_isp_css_irq_t;
 
 typedef enum hrt_isp_css_irq_status {
-  hrt_isp_css_irq_status_error,
-  hrt_isp_css_irq_status_more_irqs,
-  hrt_isp_css_irq_status_success
+       hrt_isp_css_irq_status_error,
+       hrt_isp_css_irq_status_more_irqs,
+       hrt_isp_css_irq_status_success
 } hrt_isp_css_irq_status_t;
 
 #endif /* _HIVE_ISP_CSS_2401_IRQ_TYPES_HRT_H_ */
index e00bc841d0f0d2c00e942467981630e5051d040a..e9106d1e6a63d895487e1ead67dc6023f9f846a5 100644 (file)
@@ -31,8 +31,8 @@ typedef char *tmemvectors, *tmemvectoru, *tvector;
 #define hrt_isp_vmem_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_vmem(cell))
 
 #if ISP_HAS_HIST
-  #define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
-  #define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
+#define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
+#define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
 #endif
 
 #endif /* _isp2400_support_h */
index 7e79e3c611ee4edac16692271947d8f1d673a7bb..29e097b5d9e4ffa89f1c699ae0601322f3fa58d1 100644 (file)
 #define ISP_VMEM_ELEM_PRECISION                14
 #define ISP_VMEM_IS_BAMEM                      1
 #if ISP_VMEM_IS_BAMEM
-  #define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT        8
-  #define ISP_VMEM_BAMEM_LATENCY               5
-  #define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
-  #define ISP_VMEM_BAMEM_NR_DATA_PLANES        8
-  #define ISP_VMEM_BAMEM_NR_CFG_REGISTERS      16
-  #define ISP_VMEM_BAMEM_LININT                0
-  #define ISP_VMEM_BAMEM_DAP_BITS              3
-  #define ISP_VMEM_BAMEM_LININT_FRAC_BITS      0
-  #define ISP_VMEM_BAMEM_PID_BITS              3
-  #define ISP_VMEM_BAMEM_OFFSET_BITS           19
-  #define ISP_VMEM_BAMEM_ADDRESS_BITS          25
-  #define ISP_VMEM_BAMEM_RID_BITS              4
-  #define ISP_VMEM_BAMEM_TRANSPOSITION         1
-  #define ISP_VMEM_BAMEM_VEC_PLUS_SLICE        1
-  #define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
-  #define ISP_VMEM_BAMEM_LUT_ELEMS             16
-  #define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH        14
-  #define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE      1
-  #define ISP_VMEM_BAMEM_SMART_FETCH           1
-  #define ISP_VMEM_BAMEM_BIG_ENDIANNESS        0
+#define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT        8
+#define ISP_VMEM_BAMEM_LATENCY               5
+#define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
+#define ISP_VMEM_BAMEM_NR_DATA_PLANES        8
+#define ISP_VMEM_BAMEM_NR_CFG_REGISTERS      16
+#define ISP_VMEM_BAMEM_LININT                0
+#define ISP_VMEM_BAMEM_DAP_BITS              3
+#define ISP_VMEM_BAMEM_LININT_FRAC_BITS      0
+#define ISP_VMEM_BAMEM_PID_BITS              3
+#define ISP_VMEM_BAMEM_OFFSET_BITS           19
+#define ISP_VMEM_BAMEM_ADDRESS_BITS          25
+#define ISP_VMEM_BAMEM_RID_BITS              4
+#define ISP_VMEM_BAMEM_TRANSPOSITION         1
+#define ISP_VMEM_BAMEM_VEC_PLUS_SLICE        1
+#define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
+#define ISP_VMEM_BAMEM_LUT_ELEMS             16
+#define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH        14
+#define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE      1
+#define ISP_VMEM_BAMEM_SMART_FETCH           1
+#define ISP_VMEM_BAMEM_BIG_ENDIANNESS        0
 #endif /* ISP_VMEM_IS_BAMEM */
 #define ISP_PMEM_DEPTH                         2048
 #define ISP_PMEM_WIDTH                         640
 #define ISP_SRU_GUARDING                       1
 #define ISP_VLSU_GUARDING                      1
 
-#define ISP_VRF_RAM                         1
-#define ISP_SRF_RAM                         1
+#define ISP_VRF_RAM                         1
+#define ISP_SRF_RAM                         1
 
 #define ISP_SPLIT_VMUL_VADD_IS                 0
 #define ISP_RFSPLIT_FPGA                       0
 #define ISP_VMEM_WIDTH                         896
 #define ISP_VMEM_ALIGN                         128
 #if ISP_VMEM_IS_BAMEM
-  #define ISP_VMEM_ALIGN_ELEM                  2
+#define ISP_VMEM_ALIGN_ELEM                  2
 #endif /* ISP_VMEM_IS_BAMEM */
 #define ISP_SIMDLSU                            1
 #define ISP_LSU_IMM_BITS                       12
index d897fc943da4f3cbc7ca2e74ec18146f7a136fc9..85d509f5b923f0907f5b448682178ddcb0586f51 100644 (file)
 typedef unsigned int dma_channel;
 
 typedef enum {
-  dma_isp_to_bus_connection = HIVE_DMA_ISP_BUS_CONN,
-  dma_isp_to_ddr_connection = HIVE_DMA_ISP_DDR_CONN,
-  dma_bus_to_ddr_connection = HIVE_DMA_BUS_DDR_CONN,
+       dma_isp_to_bus_connection = HIVE_DMA_ISP_BUS_CONN,
+       dma_isp_to_ddr_connection = HIVE_DMA_ISP_DDR_CONN,
+       dma_bus_to_ddr_connection = HIVE_DMA_BUS_DDR_CONN,
 } dma_connection;
 
 typedef enum {
-  dma_zero_extension = _DMA_ZERO_EXTEND,
-  dma_sign_extension = _DMA_SIGN_EXTEND
+       dma_zero_extension = _DMA_ZERO_EXTEND,
+       dma_sign_extension = _DMA_SIGN_EXTEND
 } dma_extension;
 
 #define DMA_PROP_SHIFT(val, param)       ((val) << _DMA_V2_ ## param ## _IDX)
index 92e7b70c17384b89018ace255b586e7405398a8a..d911aec24185bf1268d163fc1f2c7554ceadb134 100644 (file)
@@ -49,13 +49,13 @@ void debug_buffer_ddr_init(const hrt_vaddress addr)
        /* set the ddr queue */
        debug_buffer_ddr_address = addr;
        mmgr_store(addr + DEBUG_DATA_BUF_MODE_DDR_ADDR,
-                               &mode, sizeof(debug_buf_mode_t));
+                  &mode, sizeof(debug_buf_mode_t));
        mmgr_store(addr + DEBUG_DATA_HEAD_DDR_ADDR,
-                               &head, sizeof(uint32_t));
+                  &head, sizeof(uint32_t));
        mmgr_store(addr + DEBUG_DATA_TAIL_DDR_ADDR,
-                               &tail, sizeof(uint32_t));
+                  &tail, sizeof(uint32_t));
        mmgr_store(addr + DEBUG_DATA_ENABLE_DDR_ADDR,
-                               &enable, sizeof(uint32_t));
+                  &enable, sizeof(uint32_t));
 
        /* set the local copy */
        debug_data.head = 0;
@@ -67,5 +67,5 @@ void debug_buffer_setmode(const debug_buf_mode_t mode)
        assert(debug_buffer_address != ((hrt_address)-1));
 
        sp_dmem_store_uint32(SP0_ID,
-               debug_buffer_address + DEBUG_DATA_BUF_MODE_ADDR, mode);
+                            debug_buffer_address + DEBUG_DATA_BUF_MODE_ADDR, mode);
 }
index 9bc0a7cdd9afb332dce0a854c2d573bca1577e40..8447e33d1c04b2992d7257785ba520107581d002 100644 (file)
@@ -42,7 +42,8 @@ STORAGE_CLASS_DEBUG_C hrt_data debug_dequeue(void)
        if (!is_debug_buffer_empty()) {
                value = debug_data_ptr->buf[debug_data_ptr->head];
                debug_data_ptr->head = (debug_data_ptr->head + 1) & DEBUG_BUF_MASK;
-               sp_dmem_store_uint32(SP0_ID, debug_buffer_address + DEBUG_DATA_HEAD_ADDR, debug_data_ptr->head);
+               sp_dmem_store_uint32(SP0_ID, debug_buffer_address + DEBUG_DATA_HEAD_ADDR,
+                                    debug_data_ptr->head);
        }
 
        return value;
@@ -50,34 +51,48 @@ STORAGE_CLASS_DEBUG_C hrt_data debug_dequeue(void)
 
 STORAGE_CLASS_DEBUG_C void debug_synch_queue(void)
 {
-       u32 remote_tail = sp_dmem_load_uint32(SP0_ID, debug_buffer_address + DEBUG_DATA_TAIL_ADDR);
-/* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
+       u32 remote_tail = sp_dmem_load_uint32(SP0_ID,
+                                             debug_buffer_address + DEBUG_DATA_TAIL_ADDR);
+       /* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
        if (remote_tail > debug_data_ptr->tail) {
                size_t  delta = remote_tail - debug_data_ptr->tail;
 
-               sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+               sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR +
+                            debug_data_ptr->tail * sizeof(uint32_t),
+                            (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
        } else if (remote_tail < debug_data_ptr->tail) {
                size_t  delta = DEBUG_BUF_SIZE - debug_data_ptr->tail;
 
-               sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
-               sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR, (void *)&debug_data_ptr->buf[0], remote_tail * sizeof(uint32_t));
+               sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR +
+                            debug_data_ptr->tail * sizeof(uint32_t),
+                            (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+               sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR,
+                            (void *)&debug_data_ptr->buf[0],
+                            remote_tail * sizeof(uint32_t));
        } /* else we are up to date */
        debug_data_ptr->tail = remote_tail;
 }
 
 STORAGE_CLASS_DEBUG_C void debug_synch_queue_isp(void)
 {
-       u32 remote_tail = isp_dmem_load_uint32(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_TAIL_ADDR);
-/* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
+       u32 remote_tail = isp_dmem_load_uint32(ISP0_ID,
+                                              DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_TAIL_ADDR);
+       /* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
        if (remote_tail > debug_data_ptr->tail) {
                size_t  delta = remote_tail - debug_data_ptr->tail;
 
-               isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+               isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR +
+                             debug_data_ptr->tail * sizeof(uint32_t),
+                             (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
        } else if (remote_tail < debug_data_ptr->tail) {
                size_t  delta = DEBUG_BUF_SIZE - debug_data_ptr->tail;
 
-               isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
-               isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR, (void *)&debug_data_ptr->buf[0], remote_tail * sizeof(uint32_t));
+               isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR +
+                             debug_data_ptr->tail * sizeof(uint32_t),
+                             (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+               isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR,
+                             (void *)&debug_data_ptr->buf[0],
+                             remote_tail * sizeof(uint32_t));
        } /* else we are up to date */
        debug_data_ptr->tail = remote_tail;
 }
@@ -86,17 +101,24 @@ STORAGE_CLASS_DEBUG_C void debug_synch_queue_ddr(void)
 {
        u32     remote_tail;
 
-       mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_TAIL_DDR_ADDR, &remote_tail, sizeof(uint32_t));
-/* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
+       mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_TAIL_DDR_ADDR, &remote_tail,
+                 sizeof(uint32_t));
+       /* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
        if (remote_tail > debug_data_ptr->tail) {
                size_t  delta = remote_tail - debug_data_ptr->tail;
 
-               mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+               mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR +
+                         debug_data_ptr->tail * sizeof(uint32_t),
+                         (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
        } else if (remote_tail < debug_data_ptr->tail) {
                size_t  delta = DEBUG_BUF_SIZE - debug_data_ptr->tail;
 
-               mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
-               mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR, (void *)&debug_data_ptr->buf[0], remote_tail * sizeof(uint32_t));
+               mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR +
+                         debug_data_ptr->tail * sizeof(uint32_t),
+                         (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+               mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR,
+                         (void *)&debug_data_ptr->buf[0],
+                         remote_tail * sizeof(uint32_t));
        } /* else we are up to date */
        debug_data_ptr->tail = remote_tail;
 }
index 265dfdd653c6ffe473ba95985bcaf65be624c3b3..87df1da1164eb2347431bf4e7df71c1fe55eb186 100644 (file)
@@ -42,52 +42,52 @@ void dma_get_state(const dma_ID_t ID, dma_state_t *state)
        state->last_command_channel = (tmp >> 10 & 0x1F);
        state->last_command_param =  (tmp >> 15 & 0x0F);
        tmp = (tmp >> 4) & 0x3F;
-/* state->last_command = (dma_commands_t)tmp; */
-/* if the enumerator is made non-linear */
+       /* state->last_command = (dma_commands_t)tmp; */
+       /* if the enumerator is made non-linear */
        /* AM: the list below does not cover all the cases*/
        /*  and these are not correct */
        /* therefore for just dumpinmg this command*/
        state->last_command = tmp;
 
-/*
-       if (tmp == 0)
-               state->last_command = DMA_COMMAND_READ;
-       if (tmp == 1)
-               state->last_command = DMA_COMMAND_WRITE;
-       if (tmp == 2)
-               state->last_command = DMA_COMMAND_SET_CHANNEL;
-       if (tmp == 3)
-               state->last_command = DMA_COMMAND_SET_PARAM;
-       if (tmp == 4)
-               state->last_command = DMA_COMMAND_READ_SPECIFIC;
-       if (tmp == 5)
-               state->last_command = DMA_COMMAND_WRITE_SPECIFIC;
-       if (tmp == 8)
-               state->last_command = DMA_COMMAND_INIT;
-       if (tmp == 12)
-               state->last_command = DMA_COMMAND_INIT_SPECIFIC;
-       if (tmp == 15)
-               state->last_command = DMA_COMMAND_RST;
-*/
+       /*
+               if (tmp == 0)
+                       state->last_command = DMA_COMMAND_READ;
+               if (tmp == 1)
+                       state->last_command = DMA_COMMAND_WRITE;
+               if (tmp == 2)
+                       state->last_command = DMA_COMMAND_SET_CHANNEL;
+               if (tmp == 3)
+                       state->last_command = DMA_COMMAND_SET_PARAM;
+               if (tmp == 4)
+                       state->last_command = DMA_COMMAND_READ_SPECIFIC;
+               if (tmp == 5)
+                       state->last_command = DMA_COMMAND_WRITE_SPECIFIC;
+               if (tmp == 8)
+                       state->last_command = DMA_COMMAND_INIT;
+               if (tmp == 12)
+                       state->last_command = DMA_COMMAND_INIT_SPECIFIC;
+               if (tmp == 15)
+                       state->last_command = DMA_COMMAND_RST;
+       */
 
-/* No sub-fields, idx = 0 */
+       /* No sub-fields, idx = 0 */
        state->current_command = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_CMD_IDX));
+                                             DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_CMD_IDX));
        state->current_addr_a = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_ADDR_A_IDX));
+                                            DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_ADDR_A_IDX));
        state->current_addr_b = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_ADDR_B_IDX));
+                                            DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_ADDR_B_IDX));
 
        tmp =  dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_STATE_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                           DMA_CG_INFO_REG_IDX(
+                               _DMA_FSM_GROUP_FSM_CTRL_STATE_IDX,
+                               _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_idle = tmp & 0x1;
        state->fsm_ctrl_run = tmp & 0x2;
        state->fsm_ctrl_stalling = tmp & 0x4;
        state->fsm_ctrl_error = tmp & 0x8;
        tmp = tmp >> 4;
-/* state->fsm_ctrl_state = (dma_ctrl_states_t)tmp; */
+       /* state->fsm_ctrl_state = (dma_ctrl_states_t)tmp; */
        if (tmp == 0)
                state->fsm_ctrl_state = DMA_CTRL_STATE_IDLE;
        if (tmp == 1)
@@ -99,92 +99,92 @@ void dma_get_state(const dma_ID_t ID, dma_state_t *state)
        if (tmp == 4)
                state->fsm_ctrl_state = DMA_CTRL_STATE_INIT;
        state->fsm_ctrl_source_dev = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_REQ_DEV_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                    DMA_CG_INFO_REG_IDX(
+                                        _DMA_FSM_GROUP_FSM_CTRL_REQ_DEV_IDX,
+                                        _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_source_addr = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_REQ_ADDR_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                     DMA_CG_INFO_REG_IDX(
+                                         _DMA_FSM_GROUP_FSM_CTRL_REQ_ADDR_IDX,
+                                         _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_source_stride = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_REQ_STRIDE_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                       DMA_CG_INFO_REG_IDX(
+                                           _DMA_FSM_GROUP_FSM_CTRL_REQ_STRIDE_IDX,
+                                           _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_source_width = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_REQ_XB_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                      DMA_CG_INFO_REG_IDX(
+                                          _DMA_FSM_GROUP_FSM_CTRL_REQ_XB_IDX,
+                                          _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_source_height = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_REQ_YB_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                       DMA_CG_INFO_REG_IDX(
+                                           _DMA_FSM_GROUP_FSM_CTRL_REQ_YB_IDX,
+                                           _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_pack_source_dev = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_PACK_REQ_DEV_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                         DMA_CG_INFO_REG_IDX(
+                                             _DMA_FSM_GROUP_FSM_CTRL_PACK_REQ_DEV_IDX,
+                                             _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_pack_dest_dev = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_DEV_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                       DMA_CG_INFO_REG_IDX(
+                                           _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_DEV_IDX,
+                                           _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_dest_addr = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_WR_ADDR_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                   DMA_CG_INFO_REG_IDX(
+                                       _DMA_FSM_GROUP_FSM_CTRL_WR_ADDR_IDX,
+                                       _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_dest_stride = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_WR_STRIDE_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                     DMA_CG_INFO_REG_IDX(
+                                         _DMA_FSM_GROUP_FSM_CTRL_WR_STRIDE_IDX,
+                                         _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_pack_source_width = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_PACK_REQ_XB_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                           DMA_CG_INFO_REG_IDX(
+                                               _DMA_FSM_GROUP_FSM_CTRL_PACK_REQ_XB_IDX,
+                                               _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_pack_dest_height = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_YB_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                          DMA_CG_INFO_REG_IDX(
+                                              _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_YB_IDX,
+                                              _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_pack_dest_width = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_XB_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                         DMA_CG_INFO_REG_IDX(
+                                             _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_XB_IDX,
+                                             _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_pack_source_elems = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_PACK_ELEM_REQ_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                           DMA_CG_INFO_REG_IDX(
+                                               _DMA_FSM_GROUP_FSM_CTRL_PACK_ELEM_REQ_IDX,
+                                               _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_pack_dest_elems = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_PACK_ELEM_WR_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                         DMA_CG_INFO_REG_IDX(
+                                             _DMA_FSM_GROUP_FSM_CTRL_PACK_ELEM_WR_IDX,
+                                             _DMA_FSM_GROUP_FSM_CTRL_IDX));
        state->fsm_ctrl_pack_extension = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_CTRL_PACK_S_Z_IDX,
-               _DMA_FSM_GROUP_FSM_CTRL_IDX));
+                                        DMA_CG_INFO_REG_IDX(
+                                            _DMA_FSM_GROUP_FSM_CTRL_PACK_S_Z_IDX,
+                                            _DMA_FSM_GROUP_FSM_CTRL_IDX));
 
        tmp = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_PACK_STATE_IDX,
-               _DMA_FSM_GROUP_FSM_PACK_IDX));
+                          DMA_CG_INFO_REG_IDX(
+                              _DMA_FSM_GROUP_FSM_PACK_STATE_IDX,
+                              _DMA_FSM_GROUP_FSM_PACK_IDX));
        state->pack_idle     = tmp & 0x1;
        state->pack_run      = tmp & 0x2;
        state->pack_stalling = tmp & 0x4;
        state->pack_error    = tmp & 0x8;
        state->pack_cnt_height = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_PACK_CNT_YB_IDX,
-               _DMA_FSM_GROUP_FSM_PACK_IDX));
+                                             DMA_CG_INFO_REG_IDX(
+                                                     _DMA_FSM_GROUP_FSM_PACK_CNT_YB_IDX,
+                                                     _DMA_FSM_GROUP_FSM_PACK_IDX));
        state->pack_src_cnt_width = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_PACK_CNT_XB_REQ_IDX,
-               _DMA_FSM_GROUP_FSM_PACK_IDX));
+                                   DMA_CG_INFO_REG_IDX(
+                                       _DMA_FSM_GROUP_FSM_PACK_CNT_XB_REQ_IDX,
+                                       _DMA_FSM_GROUP_FSM_PACK_IDX));
        state->pack_dest_cnt_width = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_PACK_CNT_XB_WR_IDX,
-               _DMA_FSM_GROUP_FSM_PACK_IDX));
+                                    DMA_CG_INFO_REG_IDX(
+                                        _DMA_FSM_GROUP_FSM_PACK_CNT_XB_WR_IDX,
+                                        _DMA_FSM_GROUP_FSM_PACK_IDX));
 
        tmp = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_REQ_STATE_IDX,
-               _DMA_FSM_GROUP_FSM_REQ_IDX));
-/* state->read_state = (dma_rw_states_t)tmp; */
+                          DMA_CG_INFO_REG_IDX(
+                              _DMA_FSM_GROUP_FSM_REQ_STATE_IDX,
+                              _DMA_FSM_GROUP_FSM_REQ_IDX));
+       /* state->read_state = (dma_rw_states_t)tmp; */
        if (tmp == 0)
                state->read_state = DMA_RW_STATE_IDLE;
        if (tmp == 1)
@@ -194,19 +194,19 @@ void dma_get_state(const dma_ID_t ID, dma_state_t *state)
        if (tmp == 3)
                state->read_state = DMA_RW_STATE_UNLOCK_CHANNEL;
        state->read_cnt_height = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_REQ_CNT_YB_IDX,
-               _DMA_FSM_GROUP_FSM_REQ_IDX));
+                                             DMA_CG_INFO_REG_IDX(
+                                                     _DMA_FSM_GROUP_FSM_REQ_CNT_YB_IDX,
+                                                     _DMA_FSM_GROUP_FSM_REQ_IDX));
        state->read_cnt_width = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_REQ_CNT_XB_IDX,
-               _DMA_FSM_GROUP_FSM_REQ_IDX));
+                                            DMA_CG_INFO_REG_IDX(
+                                                    _DMA_FSM_GROUP_FSM_REQ_CNT_XB_IDX,
+                                                    _DMA_FSM_GROUP_FSM_REQ_IDX));
 
        tmp = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_WR_STATE_IDX,
-               _DMA_FSM_GROUP_FSM_WR_IDX));
-/* state->write_state = (dma_rw_states_t)tmp; */
+                          DMA_CG_INFO_REG_IDX(
+                              _DMA_FSM_GROUP_FSM_WR_STATE_IDX,
+                              _DMA_FSM_GROUP_FSM_WR_IDX));
+       /* state->write_state = (dma_rw_states_t)tmp; */
        if (tmp == 0)
                state->write_state = DMA_RW_STATE_IDLE;
        if (tmp == 1)
@@ -216,13 +216,13 @@ void dma_get_state(const dma_ID_t ID, dma_state_t *state)
        if (tmp == 3)
                state->write_state = DMA_RW_STATE_UNLOCK_CHANNEL;
        state->write_height = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_WR_CNT_YB_IDX,
-               _DMA_FSM_GROUP_FSM_WR_IDX));
+                                          DMA_CG_INFO_REG_IDX(
+                                              _DMA_FSM_GROUP_FSM_WR_CNT_YB_IDX,
+                                              _DMA_FSM_GROUP_FSM_WR_IDX));
        state->write_width = dma_reg_load(ID,
-               DMA_CG_INFO_REG_IDX(
-               _DMA_FSM_GROUP_FSM_WR_CNT_XB_IDX,
-               _DMA_FSM_GROUP_FSM_WR_IDX));
+                                         DMA_CG_INFO_REG_IDX(
+                                             _DMA_FSM_GROUP_FSM_WR_CNT_XB_IDX,
+                                             _DMA_FSM_GROUP_FSM_WR_IDX));
 
        for (i = 0; i < HIVE_ISP_NUM_DMA_CONNS; i++) {
                dma_port_state_t *port = &state->port_states[i];
@@ -253,38 +253,38 @@ void dma_get_state(const dma_ID_t ID, dma_state_t *state)
                dma_channel_state_t *ch = &state->channel_states[i];
 
                ch->connection = DMA_GET_CONNECTION(dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_PACKING_SETUP_PARAM)));
+                                                   DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                           _DMA_PACKING_SETUP_PARAM)));
                ch->sign_extend = DMA_GET_EXTENSION(dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_PACKING_SETUP_PARAM)));
+                                                   DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                           _DMA_PACKING_SETUP_PARAM)));
                ch->height = dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_HEIGHT_PARAM));
+                                         DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                 _DMA_HEIGHT_PARAM));
                ch->stride_a = dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_STRIDE_A_PARAM));
+                                           DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                   _DMA_STRIDE_A_PARAM));
                ch->elems_a = DMA_GET_ELEMENTS(dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_ELEM_CROPPING_A_PARAM)));
+                                              DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                      _DMA_ELEM_CROPPING_A_PARAM)));
                ch->cropping_a = DMA_GET_CROPPING(dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_ELEM_CROPPING_A_PARAM)));
+                                                 DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                         _DMA_ELEM_CROPPING_A_PARAM)));
                ch->width_a = dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_WIDTH_A_PARAM));
+                                          DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                  _DMA_WIDTH_A_PARAM));
                ch->stride_b = dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_STRIDE_B_PARAM));
+                                           DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                   _DMA_STRIDE_B_PARAM));
                ch->elems_b = DMA_GET_ELEMENTS(dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_ELEM_CROPPING_B_PARAM)));
+                                              DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                      _DMA_ELEM_CROPPING_B_PARAM)));
                ch->cropping_b = DMA_GET_CROPPING(dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_ELEM_CROPPING_B_PARAM)));
+                                                 DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                         _DMA_ELEM_CROPPING_B_PARAM)));
                ch->width_b = dma_reg_load(ID,
-                       DMA_CHANNEL_PARAM_REG_IDX(i,
-                       _DMA_WIDTH_B_PARAM));
+                                          DMA_CHANNEL_PARAM_REG_IDX(i,
+                                                  _DMA_WIDTH_B_PARAM));
        }
 }
 
index 2c30925c8f514ae02fec68bcce586012be837d86..54837b5246554bebd0043ecc0dcc523ed6615e76 100644 (file)
@@ -188,9 +188,9 @@ struct dma_state_s {
        int                        fsm_ctrl_pack_dest_elems;
        int                        fsm_ctrl_pack_extension;
        int                                                pack_idle;
-       int                            pack_run;
+       int                            pack_run;
        int                                pack_stalling;
-       int                                pack_error;
+       int                                pack_error;
        int                        pack_cnt_height;
        int                        pack_src_cnt_width;
        int                        pack_dest_cnt_width;
index 5b4d7c02f1baecfa559ee48c0d36ee34380426e1..ebb75da72e182c5cc6486396ad7461e15b11ee66 100644 (file)
@@ -22,8 +22,8 @@
 #include "assert_support.h"
 
 STORAGE_CLASS_DMA_C void dma_reg_store(const dma_ID_t ID,
-                       const unsigned int reg,
-                       const hrt_data value)
+                                      const unsigned int reg,
+                                      const hrt_data value)
 {
        assert(ID < N_DMA_ID);
        assert(DMA_BASE[ID] != (hrt_address) - 1);
@@ -31,7 +31,7 @@ STORAGE_CLASS_DMA_C void dma_reg_store(const dma_ID_t ID,
 }
 
 STORAGE_CLASS_DMA_C hrt_data dma_reg_load(const dma_ID_t ID,
-                                         const unsigned int reg)
+       const unsigned int reg)
 {
        assert(ID < N_DMA_ID);
        assert(DMA_BASE[ID] != (hrt_address) - 1);
index c595692c6ea9871a23416127d5c34b17a86f6b1e..39a9dd697096abedf15a6d0a513fcea19d907992 100644 (file)
@@ -34,24 +34,28 @@ typedef enum {
 static const hrt_address event_source_addr[N_EVENT_ID] = {
        0x0000000000380000ULL,
        0x0000000000380004ULL,
-       0xffffffffffffffffULL};
+       0xffffffffffffffffULL
+};
 
 /* Read from FIFO are blocking, query data availability */
 static const hrt_address event_source_query_addr[N_EVENT_ID] = {
        0x0000000000380010ULL,
        0x0000000000380014ULL,
-       0xffffffffffffffffULL};
+       0xffffffffffffffffULL
+};
 
 /* Events are written to FIFO */
 static const hrt_address event_sink_addr[N_EVENT_ID] = {
        0x0000000000380008ULL,
        0x000000000038000CULL,
-       0x0000000000090104ULL};
+       0x0000000000090104ULL
+};
 
 /* Writes to FIFO are blocking, query data space */
 static const hrt_address event_sink_query_addr[N_EVENT_ID] = {
        0x0000000000380018ULL,
        0x000000000038001CULL,
-       0x000000000009010CULL};
+       0x000000000009010CULL
+};
 
 #endif /* _EVENT_FIFO_LOCAL_H */
index 9af2d46b559706a7e997b764f38c8e94a3838d9a..0fb0172badc5df0e41dd3b6ecc26d65591884fc9 100644 (file)
@@ -32,7 +32,7 @@ STORAGE_CLASS_EVENT_C void event_wait_for(const event_ID_t ID)
 }
 
 STORAGE_CLASS_EVENT_C void cnd_event_wait_for(const event_ID_t ID,
-                                               const bool cnd)
+       const bool cnd)
 {
        if (cnd) {
                event_wait_for(ID);
@@ -47,7 +47,7 @@ STORAGE_CLASS_EVENT_C hrt_data event_receive_token(const event_ID_t ID)
 }
 
 STORAGE_CLASS_EVENT_C void event_send_token(const event_ID_t ID,
-                                           const hrt_data token)
+       const hrt_data token)
 {
        assert(ID < N_EVENT_ID);
        assert(event_sink_addr[ID] != ((hrt_address) - 1));
index bc84a4b298499e44c0b1fcd27aefe26c5fc045f9..e9116f11dc80f7fbbe6744a9d8b3d31c8e1c593d 100644 (file)
 STORAGE_CLASS_FIFO_MONITOR_DATA unsigned int FIFO_SWITCH_ADDR[N_FIFO_SWITCH] = {
        _REG_GP_SWITCH_IF_ADDR,
        _REG_GP_SWITCH_GDC1_ADDR,
-       _REG_GP_SWITCH_GDC2_ADDR};
+       _REG_GP_SWITCH_GDC2_ADDR
+};
 
 #ifndef __INLINE_FIFO_MONITOR__
 #include "fifo_monitor_private.h"
 #endif /* __INLINE_FIFO_MONITOR__ */
 
 static inline bool fifo_monitor_status_valid(
-       const fifo_monitor_ID_t         ID,
-       const unsigned int                      reg,
-       const unsigned int                      port_id);
+    const fifo_monitor_ID_t            ID,
+    const unsigned int                 reg,
+    const unsigned int                 port_id);
 
 static inline bool fifo_monitor_status_accept(
-       const fifo_monitor_ID_t         ID,
-       const unsigned int                      reg,
-       const unsigned int                      port_id);
+    const fifo_monitor_ID_t            ID,
+    const unsigned int                 reg,
+    const unsigned int                 port_id);
 
 void fifo_channel_get_state(
-       const fifo_monitor_ID_t         ID,
-       const fifo_channel_t            channel_id,
-       fifo_channel_state_t            *state)
+    const fifo_monitor_ID_t            ID,
+    const fifo_channel_t               channel_id,
+    fifo_channel_state_t               *state)
 {
        assert(channel_id < N_FIFO_CHANNEL);
        assert(state);
@@ -59,431 +60,429 @@ void fifo_channel_get_state(
        switch (channel_id) {
        case FIFO_CHANNEL_ISP0_TO_SP0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_SP); /* ISP_STR_MON_PORT_ISP2SP */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_SP); /* ISP_STR_MON_PORT_ISP2SP */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_SP);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_SP);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_ISP); /* ISP_STR_MON_PORT_SP2ISP */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_ISP); /* ISP_STR_MON_PORT_SP2ISP */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_ISP);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_ISP);
                break;
        case FIFO_CHANNEL_SP0_TO_ISP0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_ISP); /* ISP_STR_MON_PORT_SP2ISP */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_ISP); /* ISP_STR_MON_PORT_SP2ISP */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_ISP);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_ISP);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_SP); /* ISP_STR_MON_PORT_ISP2SP */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_SP); /* ISP_STR_MON_PORT_ISP2SP */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_SP);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_SP);
                break;
        case FIFO_CHANNEL_ISP0_TO_IF0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_PIF_A); /* ISP_STR_MON_PORT_ISP2PIFA */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_PIF_A); /* ISP_STR_MON_PORT_ISP2PIFA */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_PIF_A);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_PIF_A);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_PIF_A); /* MOD_STR_MON_PORT_CELLS2PIFA */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_PIF_A); /* MOD_STR_MON_PORT_CELLS2PIFA */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_PIF_A);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_PIF_A);
                break;
        case FIFO_CHANNEL_IF0_TO_ISP0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_PIF_A); /* MOD_STR_MON_PORT_PIFA2CELLS */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_PIF_A); /* MOD_STR_MON_PORT_PIFA2CELLS */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_PIF_A);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_PIF_A);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_PIF_A); /* ISP_STR_MON_PORT_PIFA2ISP */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_PIF_A); /* ISP_STR_MON_PORT_PIFA2ISP */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_PIF_A);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_PIF_A);
                break;
        case FIFO_CHANNEL_ISP0_TO_IF1:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_PIF_B); /* ISP_STR_MON_PORT_ISP2PIFA */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_PIF_B); /* ISP_STR_MON_PORT_ISP2PIFA */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_PIF_B);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_PIF_B);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_PIF_B); /* MOD_STR_MON_PORT_CELLS2PIFB */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_PIF_B); /* MOD_STR_MON_PORT_CELLS2PIFB */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_PIF_B);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_PIF_B);
                break;
        case FIFO_CHANNEL_IF1_TO_ISP0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_PIF_B); /* MOD_STR_MON_PORT_PIFB2CELLS */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_PIF_B); /* MOD_STR_MON_PORT_PIFB2CELLS */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_PIF_B);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_PIF_B);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_PIF_B); /* ISP_STR_MON_PORT_PIFB2ISP */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_PIF_B); /* ISP_STR_MON_PORT_PIFB2ISP */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_PIF_B);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_PIF_B);
                break;
        case FIFO_CHANNEL_ISP0_TO_DMA0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_DMA); /* ISP_STR_MON_PORT_ISP2DMA */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_DMA); /* ISP_STR_MON_PORT_ISP2DMA */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_DMA);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_DMA);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_DMA_FR_ISP); /* MOD_STR_MON_PORT_ISP2DMA */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_DMA_FR_ISP); /* MOD_STR_MON_PORT_ISP2DMA */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_DMA_FR_ISP);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_DMA_FR_ISP);
                break;
        case FIFO_CHANNEL_DMA0_TO_ISP0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_DMA2ISP); /* MOD_STR_MON_PORT_DMA2ISP */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_DMA2ISP); /* MOD_STR_MON_PORT_DMA2ISP */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_DMA2ISP);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_DMA2ISP);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_DMA); /* ISP_STR_MON_PORT_DMA2ISP */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_DMA); /* ISP_STR_MON_PORT_DMA2ISP */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_DMA);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_DMA);
                break;
        case FIFO_CHANNEL_ISP0_TO_GDC0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_GDC); /* ISP_STR_MON_PORT_ISP2GDC1 */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_GDC); /* ISP_STR_MON_PORT_ISP2GDC1 */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_GDC);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_GDC);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_GDC); /* MOD_STR_MON_PORT_CELLS2GDC1 */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_GDC); /* MOD_STR_MON_PORT_CELLS2GDC1 */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_GDC);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_GDC);
                break;
        case FIFO_CHANNEL_GDC0_TO_ISP0:
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_GDC); /* MOD_STR_MON_PORT_GDC12CELLS */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_GDC); /* MOD_STR_MON_PORT_GDC12CELLS */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_GDC);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_GDC);
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_GDC); /* ISP_STR_MON_PORT_GDC12ISP */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_GDC); /* ISP_STR_MON_PORT_GDC12ISP */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_GDC);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_GDC);
                break;
        case FIFO_CHANNEL_ISP0_TO_GDC1:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_ISP2GDC2);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_ISP2GDC2);
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_ISP2GDC2);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_ISP2GDC2);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_CELLS2GDC2);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_CELLS2GDC2);
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_CELLS2GDC2);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_CELLS2GDC2);
                break;
        case FIFO_CHANNEL_GDC1_TO_ISP0:
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_GDC22CELLS);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_GDC22CELLS);
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_GDC22CELLS);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_GDC22CELLS);
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_GDC22ISP);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_GDC22ISP);
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_GDC22ISP);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_GDC22ISP);
                break;
        case FIFO_CHANNEL_ISP0_TO_HOST0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_GPD); /* ISP_STR_MON_PORT_ISP2GPD */
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_GPD); /* ISP_STR_MON_PORT_ISP2GPD */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_SND_GPD);
+                                    HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_SND_GPD);
                {
-               hrt_data        value = ia_css_device_load_uint32(0x0000000000380014ULL);
+                       hrt_data        value = ia_css_device_load_uint32(0x0000000000380014ULL);
 
-               state->fifo_valid  = !_hrt_get_bit(value, 0);
-               state->sink_accept = false; /* no monitor connected */
+                       state->fifo_valid  = !_hrt_get_bit(value, 0);
+                       state->sink_accept = false; /* no monitor connected */
                }
                break;
-       case FIFO_CHANNEL_HOST0_TO_ISP0:
-               {
+       case FIFO_CHANNEL_HOST0_TO_ISP0: {
                hrt_data        value = ia_css_device_load_uint32(0x000000000038001CULL);
 
                state->fifo_valid  = false; /* no monitor connected */
                state->sink_accept = !_hrt_get_bit(value, 0);
-               }
-               state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_GPD); /* ISP_STR_MON_PORT_FA2ISP */
-               state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_GPD);
-               break;
+       }
+       state->src_valid   = fifo_monitor_status_valid(ID,
+                            HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_GPD); /* ISP_STR_MON_PORT_FA2ISP */
+       state->fifo_accept = fifo_monitor_status_accept(ID,
+                            HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+                            ISP_STR_MON_PORT_RCV_GPD);
+       break;
        case FIFO_CHANNEL_SP0_TO_IF0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_PIF_A); /* SP_STR_MON_PORT_SP2PIFA */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_PIF_A); /* SP_STR_MON_PORT_SP2PIFA */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_PIF_A);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_PIF_A);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_PIF_A); /* MOD_STR_MON_PORT_CELLS2PIFA */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_PIF_A); /* MOD_STR_MON_PORT_CELLS2PIFA */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_PIF_A);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_PIF_A);
                break;
        case FIFO_CHANNEL_IF0_TO_SP0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_PIF_A); /* MOD_STR_MON_PORT_PIFA2CELLS */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_PIF_A); /* MOD_STR_MON_PORT_PIFA2CELLS */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_PIF_A);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_PIF_A);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_PIF_A); /* SP_STR_MON_PORT_PIFA2SP */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_PIF_A); /* SP_STR_MON_PORT_PIFA2SP */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_PIF_A);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_PIF_A);
                break;
        case FIFO_CHANNEL_SP0_TO_IF1:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_PIF_B); /* SP_STR_MON_PORT_SP2PIFB */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_PIF_B); /* SP_STR_MON_PORT_SP2PIFB */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_PIF_B);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_PIF_B);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_PIF_B); /* MOD_STR_MON_PORT_CELLS2PIFB */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_PIF_B); /* MOD_STR_MON_PORT_CELLS2PIFB */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_PIF_B);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_PIF_B);
                break;
        case FIFO_CHANNEL_IF1_TO_SP0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_PIF_B); /* MOD_STR_MON_PORT_PIFB2CELLS */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_PIF_B); /* MOD_STR_MON_PORT_PIFB2CELLS */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_PIF_B);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_PIF_B);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_PIF_B); /* SP_STR_MON_PORT_PIFB2SP */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_PIF_B); /* SP_STR_MON_PORT_PIFB2SP */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       ISP_STR_MON_PORT_RCV_PIF_B);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    ISP_STR_MON_PORT_RCV_PIF_B);
                break;
        case FIFO_CHANNEL_SP0_TO_IF2:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_SIF); /* SP_STR_MON_PORT_SP2SIF */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_SIF); /* SP_STR_MON_PORT_SP2SIF */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_SIF);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_SIF);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_SIF); /* MOD_STR_MON_PORT_SP2SIF */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_SIF); /* MOD_STR_MON_PORT_SP2SIF */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_SIF);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_SIF);
                break;
        case FIFO_CHANNEL_IF2_TO_SP0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_SIF); /* MOD_STR_MON_PORT_SIF2SP */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_SIF); /* MOD_STR_MON_PORT_SIF2SP */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_SIF);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_SIF);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_SIF); /* SP_STR_MON_PORT_SIF2SP */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_SIF); /* SP_STR_MON_PORT_SIF2SP */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_SIF);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_SIF);
                break;
        case FIFO_CHANNEL_SP0_TO_DMA0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_DMA); /* SP_STR_MON_PORT_SP2DMA */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_DMA); /* SP_STR_MON_PORT_SP2DMA */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_DMA);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_DMA);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_DMA_FR_SP); /* MOD_STR_MON_PORT_SP2DMA */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_DMA_FR_SP); /* MOD_STR_MON_PORT_SP2DMA */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_DMA_FR_SP);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_DMA_FR_SP);
                break;
        case FIFO_CHANNEL_DMA0_TO_SP0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_DMA2SP); /* MOD_STR_MON_PORT_DMA2SP */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_DMA2SP); /* MOD_STR_MON_PORT_DMA2SP */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_DMA2SP);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_DMA2SP);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_DMA); /* SP_STR_MON_PORT_DMA2SP */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_DMA); /* SP_STR_MON_PORT_DMA2SP */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_DMA);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_DMA);
                break;
        case FIFO_CHANNEL_SP0_TO_GDC0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
-                       SP_STR_MON_PORT_B_SP2GDC1);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+                                    SP_STR_MON_PORT_B_SP2GDC1);
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
-                       SP_STR_MON_PORT_B_SP2GDC1);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+                                    SP_STR_MON_PORT_B_SP2GDC1);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_CELLS2GDC1);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_CELLS2GDC1);
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_CELLS2GDC1);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_CELLS2GDC1);
                break;
        case FIFO_CHANNEL_GDC0_TO_SP0:
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_GDC12CELLS);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_GDC12CELLS);
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_GDC12CELLS);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_GDC12CELLS);
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
-                       SP_STR_MON_PORT_B_GDC12SP);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+                                    SP_STR_MON_PORT_B_GDC12SP);
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
-                       SP_STR_MON_PORT_B_GDC12SP);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+                                    SP_STR_MON_PORT_B_GDC12SP);
                break;
        case FIFO_CHANNEL_SP0_TO_GDC1:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
-                       SP_STR_MON_PORT_B_SP2GDC2);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+                                    SP_STR_MON_PORT_B_SP2GDC2);
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
-                       SP_STR_MON_PORT_B_SP2GDC2);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+                                    SP_STR_MON_PORT_B_SP2GDC2);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_CELLS2GDC2);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_CELLS2GDC2);
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_CELLS2GDC2);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_CELLS2GDC2);
                break;
        case FIFO_CHANNEL_GDC1_TO_SP0:
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_GDC22CELLS);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_GDC22CELLS);
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_GDC22CELLS);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_GDC22CELLS);
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
-                       SP_STR_MON_PORT_B_GDC22SP);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+                                    SP_STR_MON_PORT_B_GDC22SP);
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
-                       SP_STR_MON_PORT_B_GDC22SP);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+                                    SP_STR_MON_PORT_B_GDC22SP);
                break;
        case FIFO_CHANNEL_SP0_TO_HOST0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_GPD); /* SP_STR_MON_PORT_SP2GPD */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_GPD); /* SP_STR_MON_PORT_SP2GPD */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_GPD);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_GPD);
                {
-               hrt_data        value = ia_css_device_load_uint32(0x0000000000380010ULL);
+                       hrt_data        value = ia_css_device_load_uint32(0x0000000000380010ULL);
 
-               state->fifo_valid  = !_hrt_get_bit(value, 0);
-               state->sink_accept = false; /* no monitor connected */
+                       state->fifo_valid  = !_hrt_get_bit(value, 0);
+                       state->sink_accept = false; /* no monitor connected */
                }
                break;
-       case FIFO_CHANNEL_HOST0_TO_SP0:
-               {
+       case FIFO_CHANNEL_HOST0_TO_SP0: {
                hrt_data        value = ia_css_device_load_uint32(0x0000000000380018ULL);
 
                state->fifo_valid  = false; /* no monitor connected */
                state->sink_accept = !_hrt_get_bit(value, 0);
-               }
-               state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_GPD); /* SP_STR_MON_PORT_FA2SP */
-               state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_GPD);
-               break;
+       }
+       state->src_valid   = fifo_monitor_status_valid(ID,
+                            HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_GPD); /* SP_STR_MON_PORT_FA2SP */
+       state->fifo_accept = fifo_monitor_status_accept(ID,
+                            HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                            SP_STR_MON_PORT_RCV_GPD);
+       break;
        case FIFO_CHANNEL_SP0_TO_STREAM2MEM0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_MC); /* SP_STR_MON_PORT_SP2MC */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_MC); /* SP_STR_MON_PORT_SP2MC */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SND_MC);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SND_MC);
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_MC); /* MOD_STR_MON_PORT_SP2MC */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_MC); /* MOD_STR_MON_PORT_SP2MC */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_RCV_MC);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_RCV_MC);
                break;
        case FIFO_CHANNEL_STREAM2MEM0_TO_SP0:
                state->fifo_valid  = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_MC); /* SP_STR_MON_PORT_MC2SP */
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_MC); /* SP_STR_MON_PORT_MC2SP */
                state->sink_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
-                       MOD_STR_MON_PORT_SND_MC);
+                                    HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+                                    MOD_STR_MON_PORT_SND_MC);
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_MC); /* MOD_STR_MON_PORT_MC2SP */
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_MC); /* MOD_STR_MON_PORT_MC2SP */
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_RCV_MC);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_RCV_MC);
                break;
        case FIFO_CHANNEL_SP0_TO_INPUT_SYSTEM0:
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SP2ISYS);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SP2ISYS);
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_SP2ISYS);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_SP2ISYS);
                state->fifo_valid  = false;
                state->sink_accept = false;
                break;
@@ -491,11 +490,11 @@ void fifo_channel_get_state(
                state->fifo_valid  = false;
                state->sink_accept = false;
                state->src_valid   = fifo_monitor_status_valid(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_ISYS2SP);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_ISYS2SP);
                state->fifo_accept = fifo_monitor_status_accept(ID,
-                       HIVE_GP_REGS_SP_STREAM_STAT_IDX,
-                       SP_STR_MON_PORT_ISYS2SP);
+                                    HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+                                    SP_STR_MON_PORT_ISYS2SP);
                break;
        default:
                assert(0);
@@ -506,9 +505,9 @@ void fifo_channel_get_state(
 }
 
 void fifo_switch_get_state(
-       const fifo_monitor_ID_t         ID,
-       const fifo_switch_t                     switch_id,
-       fifo_switch_state_t                     *state)
+    const fifo_monitor_ID_t            ID,
+    const fifo_switch_t                        switch_id,
+    fifo_switch_state_t                        *state)
 {
        hrt_data                data = (hrt_data)-1;
 
@@ -528,8 +527,8 @@ void fifo_switch_get_state(
 }
 
 void fifo_monitor_get_state(
-       const fifo_monitor_ID_t         ID,
-       fifo_monitor_state_t            *state)
+    const fifo_monitor_ID_t            ID,
+    fifo_monitor_state_t               *state)
 {
        fifo_channel_t  ch_id;
        fifo_switch_t   sw_id;
@@ -539,20 +538,20 @@ void fifo_monitor_get_state(
 
        for (ch_id = 0; ch_id < N_FIFO_CHANNEL; ch_id++) {
                fifo_channel_get_state(ID, ch_id,
-                       &state->fifo_channels[ch_id]);
+                                      &state->fifo_channels[ch_id]);
        }
 
        for (sw_id = 0; sw_id < N_FIFO_SWITCH; sw_id++) {
                fifo_switch_get_state(ID, sw_id,
-                       &state->fifo_switches[sw_id]);
+                                     &state->fifo_switches[sw_id]);
        }
        return;
 }
 
 static inline bool fifo_monitor_status_valid(
-       const fifo_monitor_ID_t         ID,
-       const unsigned int                      reg,
-       const unsigned int                      port_id)
+    const fifo_monitor_ID_t            ID,
+    const unsigned int                 reg,
+    const unsigned int                 port_id)
 {
        hrt_data        data = fifo_monitor_reg_load(ID, reg);
 
@@ -560,9 +559,9 @@ static inline bool fifo_monitor_status_valid(
 }
 
 static inline bool fifo_monitor_status_accept(
-       const fifo_monitor_ID_t         ID,
-       const unsigned int                      reg,
-       const unsigned int                      port_id)
+    const fifo_monitor_ID_t            ID,
+    const unsigned int                 reg,
+    const unsigned int                 port_id)
 {
        hrt_data        data = fifo_monitor_reg_load(ID, reg);
 
index ed2f8618178866fa8996024afa2fad842b992c7b..a557ff8a416f797d57d44ea34dd813277e0ecbe4 100644 (file)
@@ -68,12 +68,12 @@ typedef enum fifo_channel {
        FIFO_CHANNEL_STREAM2MEM0_TO_SP0,
        FIFO_CHANNEL_SP0_TO_INPUT_SYSTEM0,
        FIFO_CHANNEL_INPUT_SYSTEM0_TO_SP0,
-/*
- * No clue what this is
- *
-       FIFO_CHANNEL_SP0_TO_IRQ0,
-       FIFO_CHANNEL_IRQ0_TO_SP0,
- */
+       /*
       * No clue what this is
       *
+               FIFO_CHANNEL_SP0_TO_IRQ0,
+               FIFO_CHANNEL_IRQ0_TO_SP0,
       */
        N_FIFO_CHANNEL
 } fifo_channel_t;
 
index a85da30e476ef452e2036d61ad7cc2066dda3adf..abaef8672ae2ff9d2f374b7cf3993e79d9031b93 100644 (file)
@@ -29,9 +29,9 @@ extern const unsigned int FIFO_SWITCH_ADDR[N_FIFO_SWITCH];
 #endif
 
 STORAGE_CLASS_FIFO_MONITOR_C void fifo_switch_set(
-       const fifo_monitor_ID_t         ID,
-       const fifo_switch_t                     switch_id,
-       const hrt_data                          sel)
+    const fifo_monitor_ID_t            ID,
+    const fifo_switch_t                        switch_id,
+    const hrt_data                             sel)
 {
        assert(ID == FIFO_MONITOR0_ID);
        assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
@@ -44,8 +44,8 @@ STORAGE_CLASS_FIFO_MONITOR_C void fifo_switch_set(
 }
 
 STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_switch_get(
-       const fifo_monitor_ID_t         ID,
-       const fifo_switch_t                     switch_id)
+    const fifo_monitor_ID_t            ID,
+    const fifo_switch_t                        switch_id)
 {
        assert(ID == FIFO_MONITOR0_ID);
        assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
@@ -56,23 +56,25 @@ STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_switch_get(
 }
 
 STORAGE_CLASS_FIFO_MONITOR_C void fifo_monitor_reg_store(
-       const fifo_monitor_ID_t         ID,
-       const unsigned int                      reg,
-       const hrt_data                          value)
+    const fifo_monitor_ID_t            ID,
+    const unsigned int                 reg,
+    const hrt_data                             value)
 {
        assert(ID < N_FIFO_MONITOR_ID);
        assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
-       ia_css_device_store_uint32(FIFO_MONITOR_BASE[ID] + reg * sizeof(hrt_data), value);
+       ia_css_device_store_uint32(FIFO_MONITOR_BASE[ID] + reg * sizeof(hrt_data),
+                                  value);
        return;
 }
 
 STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_monitor_reg_load(
-       const fifo_monitor_ID_t         ID,
-       const unsigned int                      reg)
+    const fifo_monitor_ID_t            ID,
+    const unsigned int                 reg)
 {
        assert(ID < N_FIFO_MONITOR_ID);
        assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
-       return ia_css_device_load_uint32(FIFO_MONITOR_BASE[ID] + reg * sizeof(hrt_data));
+       return ia_css_device_load_uint32(FIFO_MONITOR_BASE[ID] + reg * sizeof(
+                                            hrt_data));
 }
 
 #endif /* __FIFO_MONITOR_PRIVATE_H_INCLUDED__ */
index 83df4ac25c4ef2fe9ef7cf023d2e3f665eb7ac4d..65c5296163ddb7911318fc413dee489d699f72d4 100644 (file)
  * Local function declarations
  */
 static inline void gdc_reg_store(
-       const gdc_ID_t          ID,
-       const unsigned int      reg,
-       const hrt_data          value);
+    const gdc_ID_t             ID,
+    const unsigned int reg,
+    const hrt_data             value);
 
 static inline hrt_data gdc_reg_load(
-       const gdc_ID_t          ID,
-       const unsigned int      reg);
+    const gdc_ID_t             ID,
+    const unsigned int reg);
 
 #ifndef __INLINE_GDC__
 #include "gdc_private.h"
@@ -39,8 +39,8 @@ static inline hrt_data gdc_reg_load(
  * Exported function implementations
  */
 void gdc_lut_store(
-       const gdc_ID_t          ID,
-       const int                       data[4][HRT_GDC_N])
+    const gdc_ID_t             ID,
+    const int                  data[4][HRT_GDC_N])
 {
        unsigned int i, lut_offset = HRT_GDC_LUT_IDX;
 
@@ -54,9 +54,9 @@ void gdc_lut_store(
                hrt_data        entry_3 = data[3][i] & HRT_GDC_BCI_COEF_MASK;
 
                hrt_data        word_0 = entry_0 |
-                       (entry_1 << HRT_GDC_LUT_COEFF_OFFSET);
+                                    (entry_1 << HRT_GDC_LUT_COEFF_OFFSET);
                hrt_data        word_1 = entry_2 |
-                       (entry_3 << HRT_GDC_LUT_COEFF_OFFSET);
+                                    (entry_3 << HRT_GDC_LUT_COEFF_OFFSET);
 
                gdc_reg_store(ID, lut_offset++, word_0);
                gdc_reg_store(ID, lut_offset++, word_1);
@@ -83,7 +83,7 @@ void gdc_lut_store(
  *
  */
 void gdc_lut_convert_to_isp_format(const int in_lut[4][HRT_GDC_N],
-       int out_lut[4][HRT_GDC_N])
+                                  int out_lut[4][HRT_GDC_N])
 {
        unsigned int i;
        int *out = (int *)out_lut;
@@ -98,7 +98,7 @@ void gdc_lut_convert_to_isp_format(const int in_lut[4][HRT_GDC_N],
 }
 
 int gdc_get_unity(
-       const gdc_ID_t          ID)
+    const gdc_ID_t             ID)
 {
        assert(ID < N_GDC_ID);
        (void)ID;
@@ -109,17 +109,17 @@ int gdc_get_unity(
  * Local function implementations
  */
 static inline void gdc_reg_store(
-       const gdc_ID_t          ID,
-       const unsigned int      reg,
-       const hrt_data          value)
+    const gdc_ID_t             ID,
+    const unsigned int reg,
+    const hrt_data             value)
 {
        ia_css_device_store_uint32(GDC_BASE[ID] + reg * sizeof(hrt_data), value);
        return;
 }
 
 static inline hrt_data gdc_reg_load(
-       const gdc_ID_t          ID,
-       const unsigned int      reg)
+    const gdc_ID_t             ID,
+    const unsigned int reg)
 {
        return ia_css_device_load_uint32(GDC_BASE[ID] + reg * sizeof(hrt_data));
 }
index 118839b3483207736325cab16696de634df33901..5f20ac0b492edcb771f0a4dd7876c89e9b04a5b9 100644 (file)
 #endif /* __INLINE_GP_DEVICE__ */
 
 void gp_device_get_state(
-       const gp_device_ID_t            ID,
-       gp_device_state_t                       *state)
+    const gp_device_ID_t               ID,
+    gp_device_state_t                  *state)
 {
        assert(ID < N_GP_DEVICE_ID);
        assert(state);
 
        state->syncgen_enable = gp_device_reg_load(ID,
-               _REG_GP_SYNCGEN_ENABLE_ADDR);
+                               _REG_GP_SYNCGEN_ENABLE_ADDR);
        state->syncgen_free_running = gp_device_reg_load(ID,
-               _REG_GP_SYNCGEN_FREE_RUNNING_ADDR);
+                                     _REG_GP_SYNCGEN_FREE_RUNNING_ADDR);
        state->syncgen_pause = gp_device_reg_load(ID,
-               _REG_GP_SYNCGEN_PAUSE_ADDR);
+                              _REG_GP_SYNCGEN_PAUSE_ADDR);
        state->nr_frames = gp_device_reg_load(ID,
-               _REG_GP_NR_FRAMES_ADDR);
+                                             _REG_GP_NR_FRAMES_ADDR);
        state->syngen_nr_pix = gp_device_reg_load(ID,
-               _REG_GP_SYNGEN_NR_PIX_ADDR);
+                              _REG_GP_SYNGEN_NR_PIX_ADDR);
        state->syngen_nr_pix = gp_device_reg_load(ID,
-               _REG_GP_SYNGEN_NR_PIX_ADDR);
+                              _REG_GP_SYNGEN_NR_PIX_ADDR);
        state->syngen_nr_lines = gp_device_reg_load(ID,
-               _REG_GP_SYNGEN_NR_LINES_ADDR);
+                                _REG_GP_SYNGEN_NR_LINES_ADDR);
        state->syngen_hblank_cycles = gp_device_reg_load(ID,
-               _REG_GP_SYNGEN_HBLANK_CYCLES_ADDR);
+                                     _REG_GP_SYNGEN_HBLANK_CYCLES_ADDR);
        state->syngen_vblank_cycles = gp_device_reg_load(ID,
-               _REG_GP_SYNGEN_VBLANK_CYCLES_ADDR);
+                                     _REG_GP_SYNGEN_VBLANK_CYCLES_ADDR);
        state->isel_sof = gp_device_reg_load(ID,
-               _REG_GP_ISEL_SOF_ADDR);
+                                            _REG_GP_ISEL_SOF_ADDR);
        state->isel_eof = gp_device_reg_load(ID,
-               _REG_GP_ISEL_EOF_ADDR);
+                                            _REG_GP_ISEL_EOF_ADDR);
        state->isel_sol = gp_device_reg_load(ID,
-               _REG_GP_ISEL_SOL_ADDR);
+                                            _REG_GP_ISEL_SOL_ADDR);
        state->isel_eol = gp_device_reg_load(ID,
-               _REG_GP_ISEL_EOL_ADDR);
+                                            _REG_GP_ISEL_EOL_ADDR);
        state->isel_lfsr_enable = gp_device_reg_load(ID,
-               _REG_GP_ISEL_LFSR_ENABLE_ADDR);
+                                 _REG_GP_ISEL_LFSR_ENABLE_ADDR);
        state->isel_lfsr_enable_b = gp_device_reg_load(ID,
-               _REG_GP_ISEL_LFSR_ENABLE_B_ADDR);
+                                   _REG_GP_ISEL_LFSR_ENABLE_B_ADDR);
        state->isel_lfsr_reset_value = gp_device_reg_load(ID,
-               _REG_GP_ISEL_LFSR_RESET_VALUE_ADDR);
+                                      _REG_GP_ISEL_LFSR_RESET_VALUE_ADDR);
        state->isel_tpg_enable = gp_device_reg_load(ID,
-               _REG_GP_ISEL_TPG_ENABLE_ADDR);
+                                _REG_GP_ISEL_TPG_ENABLE_ADDR);
        state->isel_tpg_enable_b = gp_device_reg_load(ID,
-               _REG_GP_ISEL_TPG_ENABLE_B_ADDR);
+                                  _REG_GP_ISEL_TPG_ENABLE_B_ADDR);
        state->isel_hor_cnt_mask = gp_device_reg_load(ID,
-               _REG_GP_ISEL_HOR_CNT_MASK_ADDR);
+                                  _REG_GP_ISEL_HOR_CNT_MASK_ADDR);
        state->isel_ver_cnt_mask = gp_device_reg_load(ID,
-               _REG_GP_ISEL_VER_CNT_MASK_ADDR);
+                                  _REG_GP_ISEL_VER_CNT_MASK_ADDR);
        state->isel_xy_cnt_mask = gp_device_reg_load(ID,
-               _REG_GP_ISEL_XY_CNT_MASK_ADDR);
+                                 _REG_GP_ISEL_XY_CNT_MASK_ADDR);
        state->isel_hor_cnt_delta = gp_device_reg_load(ID,
-               _REG_GP_ISEL_HOR_CNT_DELTA_ADDR);
+                                   _REG_GP_ISEL_HOR_CNT_DELTA_ADDR);
        state->isel_ver_cnt_delta = gp_device_reg_load(ID,
-               _REG_GP_ISEL_VER_CNT_DELTA_ADDR);
+                                   _REG_GP_ISEL_VER_CNT_DELTA_ADDR);
        state->isel_tpg_mode = gp_device_reg_load(ID,
-               _REG_GP_ISEL_TPG_MODE_ADDR);
+                              _REG_GP_ISEL_TPG_MODE_ADDR);
        state->isel_tpg_red1 = gp_device_reg_load(ID,
-               _REG_GP_ISEL_TPG_RED1_ADDR);
+                              _REG_GP_ISEL_TPG_RED1_ADDR);
        state->isel_tpg_green1 = gp_device_reg_load(ID,
-               _REG_GP_ISEL_TPG_GREEN1_ADDR);
+                                _REG_GP_ISEL_TPG_GREEN1_ADDR);
        state->isel_tpg_blue1 = gp_device_reg_load(ID,
-               _REG_GP_ISEL_TPG_BLUE1_ADDR);
+                               _REG_GP_ISEL_TPG_BLUE1_ADDR);
        state->isel_tpg_red2 = gp_device_reg_load(ID,
-               _REG_GP_ISEL_TPG_RED2_ADDR);
+                              _REG_GP_ISEL_TPG_RED2_ADDR);
        state->isel_tpg_green2 = gp_device_reg_load(ID,
-               _REG_GP_ISEL_TPG_GREEN2_ADDR);
+                                _REG_GP_ISEL_TPG_GREEN2_ADDR);
        state->isel_tpg_blue2 = gp_device_reg_load(ID,
-               _REG_GP_ISEL_TPG_BLUE2_ADDR);
+                               _REG_GP_ISEL_TPG_BLUE2_ADDR);
        state->isel_ch_id = gp_device_reg_load(ID,
-               _REG_GP_ISEL_CH_ID_ADDR);
+                                              _REG_GP_ISEL_CH_ID_ADDR);
        state->isel_fmt_type = gp_device_reg_load(ID,
-               _REG_GP_ISEL_FMT_TYPE_ADDR);
+                              _REG_GP_ISEL_FMT_TYPE_ADDR);
        state->isel_data_sel = gp_device_reg_load(ID,
-               _REG_GP_ISEL_DATA_SEL_ADDR);
+                              _REG_GP_ISEL_DATA_SEL_ADDR);
        state->isel_sband_sel = gp_device_reg_load(ID,
-               _REG_GP_ISEL_SBAND_SEL_ADDR);
+                               _REG_GP_ISEL_SBAND_SEL_ADDR);
        state->isel_sync_sel = gp_device_reg_load(ID,
-               _REG_GP_ISEL_SYNC_SEL_ADDR);
+                              _REG_GP_ISEL_SYNC_SEL_ADDR);
        state->syncgen_hor_cnt = gp_device_reg_load(ID,
-               _REG_GP_SYNCGEN_HOR_CNT_ADDR);
+                                _REG_GP_SYNCGEN_HOR_CNT_ADDR);
        state->syncgen_ver_cnt = gp_device_reg_load(ID,
-               _REG_GP_SYNCGEN_VER_CNT_ADDR);
+                                _REG_GP_SYNCGEN_VER_CNT_ADDR);
        state->syncgen_frame_cnt = gp_device_reg_load(ID,
-               _REG_GP_SYNCGEN_FRAME_CNT_ADDR);
+                                  _REG_GP_SYNCGEN_FRAME_CNT_ADDR);
        state->soft_reset = gp_device_reg_load(ID,
-               _REG_GP_SOFT_RESET_ADDR);
+                                              _REG_GP_SOFT_RESET_ADDR);
        return;
 }
index 0a5b15ec3510636db10dda0c27bc45013776068c..cdc1b12a9e8ab45797113cff4c2076b4b00e14de 100644 (file)
@@ -22,9 +22,9 @@
 #include "assert_support.h"
 
 STORAGE_CLASS_GP_DEVICE_C void gp_device_reg_store(
-       const gp_device_ID_t    ID,
-       const unsigned int              reg_addr,
-       const hrt_data                  value)
+    const gp_device_ID_t       ID,
+    const unsigned int         reg_addr,
+    const hrt_data                     value)
 {
        assert(ID < N_GP_DEVICE_ID);
        assert(GP_DEVICE_BASE[ID] != (hrt_address) - 1);
@@ -34,8 +34,8 @@ STORAGE_CLASS_GP_DEVICE_C void gp_device_reg_store(
 }
 
 STORAGE_CLASS_GP_DEVICE_C hrt_data gp_device_reg_load(
-       const gp_device_ID_t    ID,
-       const hrt_address       reg_addr)
+    const gp_device_ID_t       ID,
+    const hrt_address  reg_addr)
 {
        assert(ID < N_GP_DEVICE_ID);
        assert(GP_DEVICE_BASE[ID] != (hrt_address)-1);
index 2e205b168c17d422086b2abc753bba16013e3a58..4a856f1f14bfeb8eaf705b7be2c98c59ff0aabee 100644 (file)
@@ -33,8 +33,8 @@ static uint32_t
 gp_timer_reg_load(uint32_t reg)
 {
        return ia_css_device_load_uint32(
-                       GP_TIMER_BASE +
-                       (reg * sizeof(uint32_t)));
+                  GP_TIMER_BASE +
+                  (reg * sizeof(uint32_t)));
 }
 
 static void
@@ -42,7 +42,7 @@ gp_timer_reg_store(u32 reg, uint32_t value)
 {
        ia_css_device_store_uint32((GP_TIMER_BASE +
                                    (reg * sizeof(uint32_t))),
-                                   value);
+                                  value);
 }
 
 void gp_timer_init(gp_timer_ID_t ID)
index f01d5833d12493ecf86801c6c9acac3072a6a92f..56b442040ad9ce12d434fc1d0d925fd681a4a409 100644 (file)
 #include "assert_support.h"
 
 STORAGE_CLASS_GPIO_C void gpio_reg_store(
-       const gpio_ID_t ID,
-       const unsigned int              reg,
-       const hrt_data                  value)
+    const gpio_ID_t    ID,
+    const unsigned int         reg,
+    const hrt_data                     value)
 {
-OP___assert(ID < N_GPIO_ID);
-OP___assert(GPIO_BASE[ID] != (hrt_address) - 1);
+       OP___assert(ID < N_GPIO_ID);
+       OP___assert(GPIO_BASE[ID] != (hrt_address) - 1);
        ia_css_device_store_uint32(GPIO_BASE[ID] + reg * sizeof(hrt_data), value);
        return;
 }
 
 STORAGE_CLASS_GPIO_C hrt_data gpio_reg_load(
-       const gpio_ID_t ID,
-       const unsigned int              reg)
+    const gpio_ID_t    ID,
+    const unsigned int         reg)
 {
-OP___assert(ID < N_GPIO_ID);
-OP___assert(GPIO_BASE[ID] != (hrt_address) - 1);
+       OP___assert(ID < N_GPIO_ID);
+       OP___assert(GPIO_BASE[ID] != (hrt_address) - 1);
        return ia_css_device_load_uint32(GPIO_BASE[ID] + reg * sizeof(hrt_data));
 }
 
index a4ffa5a8fed35a1a91e7e6649ecc29ba77462703..270d04cc9d095ea41e3d48257af54ece14419acc 100644 (file)
@@ -20,7 +20,7 @@
 #include "assert_support.h"
 
 STORAGE_CLASS_HMEM_C size_t sizeof_hmem(
-       const hmem_ID_t         ID)
+    const hmem_ID_t            ID)
 {
        assert(ID < N_HMEM_ID);
        (void)ID;
index 8efbc3afff73168ce04d82fe73a27bc6d3d2359e..0c90c5ed659bad6dd19229fb7da2acc986623e7a 100644 (file)
@@ -30,19 +30,22 @@ const hrt_address HIVE_IF_SRST_ADDRESS[N_INPUT_FORMATTER_ID] = {
        INPUT_FORMATTER0_SRST_OFFSET,
        INPUT_FORMATTER1_SRST_OFFSET,
        INPUT_FORMATTER2_SRST_OFFSET,
-       INPUT_FORMATTER3_SRST_OFFSET};
+       INPUT_FORMATTER3_SRST_OFFSET
+};
 
 const hrt_data HIVE_IF_SRST_MASK[N_INPUT_FORMATTER_ID] = {
        INPUT_FORMATTER0_SRST_MASK,
        INPUT_FORMATTER1_SRST_MASK,
        INPUT_FORMATTER2_SRST_MASK,
-       INPUT_FORMATTER3_SRST_MASK};
+       INPUT_FORMATTER3_SRST_MASK
+};
 
 const u8 HIVE_IF_SWITCH_CODE[N_INPUT_FORMATTER_ID] = {
        HIVE_INPUT_SWITCH_SELECT_IF_PRIM,
        HIVE_INPUT_SWITCH_SELECT_IF_PRIM,
        HIVE_INPUT_SWITCH_SELECT_IF_SEC,
-       HIVE_INPUT_SWITCH_SELECT_STR_TO_MEM};
+       HIVE_INPUT_SWITCH_SELECT_STR_TO_MEM
+};
 
 /* MW Should be part of system_global.h, where we have the main enumeration */
 static const bool HIVE_IF_BIN_COPY[N_INPUT_FORMATTER_ID] = {
@@ -50,7 +53,7 @@ static const bool HIVE_IF_BIN_COPY[N_INPUT_FORMATTER_ID] = {
 };
 
 void input_formatter_rst(
-       const input_formatter_ID_t              ID)
+    const input_formatter_ID_t         ID)
 {
        hrt_address     addr;
        hrt_data        rst;
@@ -72,7 +75,7 @@ void input_formatter_rst(
 }
 
 unsigned int input_formatter_get_alignment(
-       const input_formatter_ID_t              ID)
+    const input_formatter_ID_t         ID)
 {
        assert(ID < N_INPUT_FORMATTER_ID);
 
@@ -80,22 +83,22 @@ unsigned int input_formatter_get_alignment(
 }
 
 void input_formatter_set_fifo_blocking_mode(
-       const input_formatter_ID_t              ID,
-       const bool                                              enable)
+    const input_formatter_ID_t         ID,
+    const bool                                         enable)
 {
        assert(ID < N_INPUT_FORMATTER_ID);
 
        /* cnd_input_formatter_reg_store() */
        if (!HIVE_IF_BIN_COPY[ID]) {
                input_formatter_reg_store(ID,
-                        HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS, enable);
+                                         HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS, enable);
        }
        return;
 }
 
 void input_formatter_get_switch_state(
-       const input_formatter_ID_t              ID,
-       input_formatter_switch_state_t  *state)
+    const input_formatter_ID_t         ID,
+    input_formatter_switch_state_t     *state)
 {
        assert(ID < N_INPUT_FORMATTER_ID);
        assert(state);
@@ -103,126 +106,136 @@ void input_formatter_get_switch_state(
        /* We'll change this into an intelligent function to get switch info per IF */
        (void)ID;
 
-       state->if_input_switch_lut_reg[0] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg0);
-       state->if_input_switch_lut_reg[1] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg1);
-       state->if_input_switch_lut_reg[2] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg2);
-       state->if_input_switch_lut_reg[3] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg3);
-       state->if_input_switch_lut_reg[4] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg4);
-       state->if_input_switch_lut_reg[5] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg5);
-       state->if_input_switch_lut_reg[6] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg6);
-       state->if_input_switch_lut_reg[7] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg7);
-       state->if_input_switch_fsync_lut = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_fsync_lut);
-       state->if_input_switch_ch_id_fmt_type = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_ch_id_fmt_type);
+       state->if_input_switch_lut_reg[0] = gp_device_reg_load(GP_DEVICE0_ID,
+                                           _REG_GP_IFMT_input_switch_lut_reg0);
+       state->if_input_switch_lut_reg[1] = gp_device_reg_load(GP_DEVICE0_ID,
+                                           _REG_GP_IFMT_input_switch_lut_reg1);
+       state->if_input_switch_lut_reg[2] = gp_device_reg_load(GP_DEVICE0_ID,
+                                           _REG_GP_IFMT_input_switch_lut_reg2);
+       state->if_input_switch_lut_reg[3] = gp_device_reg_load(GP_DEVICE0_ID,
+                                           _REG_GP_IFMT_input_switch_lut_reg3);
+       state->if_input_switch_lut_reg[4] = gp_device_reg_load(GP_DEVICE0_ID,
+                                           _REG_GP_IFMT_input_switch_lut_reg4);
+       state->if_input_switch_lut_reg[5] = gp_device_reg_load(GP_DEVICE0_ID,
+                                           _REG_GP_IFMT_input_switch_lut_reg5);
+       state->if_input_switch_lut_reg[6] = gp_device_reg_load(GP_DEVICE0_ID,
+                                           _REG_GP_IFMT_input_switch_lut_reg6);
+       state->if_input_switch_lut_reg[7] = gp_device_reg_load(GP_DEVICE0_ID,
+                                           _REG_GP_IFMT_input_switch_lut_reg7);
+       state->if_input_switch_fsync_lut = gp_device_reg_load(GP_DEVICE0_ID,
+                                          _REG_GP_IFMT_input_switch_fsync_lut);
+       state->if_input_switch_ch_id_fmt_type = gp_device_reg_load(GP_DEVICE0_ID,
+                                               _REG_GP_IFMT_input_switch_ch_id_fmt_type);
 
        return;
 }
 
 void input_formatter_get_state(
-       const input_formatter_ID_t              ID,
-       input_formatter_state_t                 *state)
+    const input_formatter_ID_t         ID,
+    input_formatter_state_t                    *state)
 {
        assert(ID < N_INPUT_FORMATTER_ID);
        assert(state);
-/*
-       state->reset = input_formatter_reg_load(ID,
-               HIVE_IF_RESET_ADDRESS);
- */
+       /*
+               state->reset = input_formatter_reg_load(ID,
+                       HIVE_IF_RESET_ADDRESS);
       */
        state->start_line = input_formatter_reg_load(ID,
-               HIVE_IF_START_LINE_ADDRESS);
+                           HIVE_IF_START_LINE_ADDRESS);
        state->start_column = input_formatter_reg_load(ID,
-               HIVE_IF_START_COLUMN_ADDRESS);
+                             HIVE_IF_START_COLUMN_ADDRESS);
        state->cropped_height = input_formatter_reg_load(ID,
-               HIVE_IF_CROPPED_HEIGHT_ADDRESS);
+                               HIVE_IF_CROPPED_HEIGHT_ADDRESS);
        state->cropped_width = input_formatter_reg_load(ID,
-               HIVE_IF_CROPPED_WIDTH_ADDRESS);
+                              HIVE_IF_CROPPED_WIDTH_ADDRESS);
        state->ver_decimation = input_formatter_reg_load(ID,
-               HIVE_IF_VERTICAL_DECIMATION_ADDRESS);
+                               HIVE_IF_VERTICAL_DECIMATION_ADDRESS);
        state->hor_decimation = input_formatter_reg_load(ID,
-               HIVE_IF_HORIZONTAL_DECIMATION_ADDRESS);
+                               HIVE_IF_HORIZONTAL_DECIMATION_ADDRESS);
        state->hor_deinterleaving = input_formatter_reg_load(ID,
-               HIVE_IF_H_DEINTERLEAVING_ADDRESS);
+                                   HIVE_IF_H_DEINTERLEAVING_ADDRESS);
        state->left_padding = input_formatter_reg_load(ID,
-               HIVE_IF_LEFTPADDING_WIDTH_ADDRESS);
+                             HIVE_IF_LEFTPADDING_WIDTH_ADDRESS);
        state->eol_offset = input_formatter_reg_load(ID,
-               HIVE_IF_END_OF_LINE_OFFSET_ADDRESS);
+                           HIVE_IF_END_OF_LINE_OFFSET_ADDRESS);
        state->vmem_start_address = input_formatter_reg_load(ID,
-               HIVE_IF_VMEM_START_ADDRESS_ADDRESS);
+                                   HIVE_IF_VMEM_START_ADDRESS_ADDRESS);
        state->vmem_end_address = input_formatter_reg_load(ID,
-               HIVE_IF_VMEM_END_ADDRESS_ADDRESS);
+                                 HIVE_IF_VMEM_END_ADDRESS_ADDRESS);
        state->vmem_increment = input_formatter_reg_load(ID,
-               HIVE_IF_VMEM_INCREMENT_ADDRESS);
+                               HIVE_IF_VMEM_INCREMENT_ADDRESS);
        state->is_yuv420 = input_formatter_reg_load(ID,
-               HIVE_IF_YUV_420_FORMAT_ADDRESS);
+                          HIVE_IF_YUV_420_FORMAT_ADDRESS);
        state->vsync_active_low = input_formatter_reg_load(ID,
-               HIVE_IF_VSYNCK_ACTIVE_LOW_ADDRESS);
+                                 HIVE_IF_VSYNCK_ACTIVE_LOW_ADDRESS);
        state->hsync_active_low = input_formatter_reg_load(ID,
-               HIVE_IF_HSYNCK_ACTIVE_LOW_ADDRESS);
+                                 HIVE_IF_HSYNCK_ACTIVE_LOW_ADDRESS);
        state->allow_fifo_overflow = input_formatter_reg_load(ID,
-               HIVE_IF_ALLOW_FIFO_OVERFLOW_ADDRESS);
+                                    HIVE_IF_ALLOW_FIFO_OVERFLOW_ADDRESS);
        state->block_fifo_when_no_req = input_formatter_reg_load(ID,
-               HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS);
+                                       HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS);
        state->ver_deinterleaving = input_formatter_reg_load(ID,
-               HIVE_IF_V_DEINTERLEAVING_ADDRESS);
-/* FSM */
+                                   HIVE_IF_V_DEINTERLEAVING_ADDRESS);
+       /* FSM */
        state->fsm_sync_status = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_SYNC_STATUS);
+                                HIVE_IF_FSM_SYNC_STATUS);
        state->fsm_sync_counter = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_SYNC_COUNTER);
+                                 HIVE_IF_FSM_SYNC_COUNTER);
        state->fsm_crop_status = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_CROP_STATUS);
+                                HIVE_IF_FSM_CROP_STATUS);
        state->fsm_crop_line_counter = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_CROP_LINE_COUNTER);
+                                      HIVE_IF_FSM_CROP_LINE_COUNTER);
        state->fsm_crop_pixel_counter = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_CROP_PIXEL_COUNTER);
+                                       HIVE_IF_FSM_CROP_PIXEL_COUNTER);
        state->fsm_deinterleaving_index = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_DEINTERLEAVING_IDX);
+                                         HIVE_IF_FSM_DEINTERLEAVING_IDX);
        state->fsm_dec_h_counter = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_DECIMATION_H_COUNTER);
+                                  HIVE_IF_FSM_DECIMATION_H_COUNTER);
        state->fsm_dec_v_counter = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_DECIMATION_V_COUNTER);
+                                  HIVE_IF_FSM_DECIMATION_V_COUNTER);
        state->fsm_dec_block_v_counter = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_DECIMATION_BLOCK_V_COUNTER);
+                                        HIVE_IF_FSM_DECIMATION_BLOCK_V_COUNTER);
        state->fsm_padding_status = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_PADDING_STATUS);
+                                   HIVE_IF_FSM_PADDING_STATUS);
        state->fsm_padding_elem_counter = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_PADDING_ELEMENT_COUNTER);
+                                         HIVE_IF_FSM_PADDING_ELEMENT_COUNTER);
        state->fsm_vector_support_error = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_VECTOR_SUPPORT_ERROR);
+                                         HIVE_IF_FSM_VECTOR_SUPPORT_ERROR);
        state->fsm_vector_buffer_full = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_VECTOR_SUPPORT_BUFF_FULL);
+                                       HIVE_IF_FSM_VECTOR_SUPPORT_BUFF_FULL);
        state->vector_support = input_formatter_reg_load(ID,
-               HIVE_IF_FSM_VECTOR_SUPPORT);
+                               HIVE_IF_FSM_VECTOR_SUPPORT);
        state->sensor_data_lost = input_formatter_reg_load(ID,
-               HIVE_IF_FIFO_SENSOR_STATUS);
+                                 HIVE_IF_FIFO_SENSOR_STATUS);
 
        return;
 }
 
 void input_formatter_bin_get_state(
-       const input_formatter_ID_t              ID,
-       input_formatter_bin_state_t             *state)
+    const input_formatter_ID_t         ID,
+    input_formatter_bin_state_t                *state)
 {
        assert(ID < N_INPUT_FORMATTER_ID);
        assert(state);
 
        state->reset = input_formatter_reg_load(ID,
-               HIVE_STR2MEM_SOFT_RESET_REG_ADDRESS);
+                                               HIVE_STR2MEM_SOFT_RESET_REG_ADDRESS);
        state->input_endianness = input_formatter_reg_load(ID,
-               HIVE_STR2MEM_INPUT_ENDIANNESS_REG_ADDRESS);
+                                 HIVE_STR2MEM_INPUT_ENDIANNESS_REG_ADDRESS);
        state->output_endianness = input_formatter_reg_load(ID,
-               HIVE_STR2MEM_OUTPUT_ENDIANNESS_REG_ADDRESS);
+                                  HIVE_STR2MEM_OUTPUT_ENDIANNESS_REG_ADDRESS);
        state->bitswap = input_formatter_reg_load(ID,
-               HIVE_STR2MEM_BIT_SWAPPING_REG_ADDRESS);
+                        HIVE_STR2MEM_BIT_SWAPPING_REG_ADDRESS);
        state->block_synch = input_formatter_reg_load(ID,
-               HIVE_STR2MEM_BLOCK_SYNC_LEVEL_REG_ADDRESS);
+                            HIVE_STR2MEM_BLOCK_SYNC_LEVEL_REG_ADDRESS);
        state->packet_synch = input_formatter_reg_load(ID,
-               HIVE_STR2MEM_PACKET_SYNC_LEVEL_REG_ADDRESS);
+                             HIVE_STR2MEM_PACKET_SYNC_LEVEL_REG_ADDRESS);
        state->readpostwrite_synch = input_formatter_reg_load(ID,
-               HIVE_STR2MEM_READ_POST_WRITE_SYNC_ENABLE_REG_ADDRESS);
+                                    HIVE_STR2MEM_READ_POST_WRITE_SYNC_ENABLE_REG_ADDRESS);
        state->is_2ppc = input_formatter_reg_load(ID,
-               HIVE_STR2MEM_DUAL_BYTE_INPUTS_ENABLED_REG_ADDRESS);
+                        HIVE_STR2MEM_DUAL_BYTE_INPUTS_ENABLED_REG_ADDRESS);
        state->en_status_update = input_formatter_reg_load(ID,
-               HIVE_STR2MEM_EN_STAT_UPDATE_ADDRESS);
+                                 HIVE_STR2MEM_EN_STAT_UPDATE_ADDRESS);
        return;
 }
 #endif
index 0fc9f759c44e04161640f26368b50f0fee18c8fb..ee2c8372421cb955eed747fcc8b7a5aa945f877a 100644 (file)
@@ -66,7 +66,7 @@ struct input_formatter_switch_state_s {
 };
 
 struct input_formatter_state_s {
-/*     int     reset; */
+       /*      int     reset; */
        int     start_line;
        int     start_column;
        int     cropped_height;
@@ -115,6 +115,7 @@ struct input_formatter_bin_state_s {
 };
 
 static const unsigned int input_formatter_alignment[N_INPUT_FORMATTER_ID] = {
-       ISP_VEC_ALIGN, ISP_VEC_ALIGN, HIVE_ISP_CTRL_DATA_BYTES};
+       ISP_VEC_ALIGN, ISP_VEC_ALIGN, HIVE_ISP_CTRL_DATA_BYTES
+};
 
 #endif /* __INPUT_FORMATTER_LOCAL_H_INCLUDED__ */
index 2f42a9c2771ce65676a1b93aaecdace3d430c1ca..bdca709219a4d49bbf5ef95fc58724d599a26976 100644 (file)
@@ -22,9 +22,9 @@
 #include "assert_support.h"
 
 STORAGE_CLASS_INPUT_FORMATTER_C void input_formatter_reg_store(
-       const input_formatter_ID_t              ID,
-       const hrt_address                       reg_addr,
-       const hrt_data                          value)
+    const input_formatter_ID_t         ID,
+    const hrt_address                  reg_addr,
+    const hrt_data                             value)
 {
        assert(ID < N_INPUT_FORMATTER_ID);
        assert(INPUT_FORMATTER_BASE[ID] != (hrt_address)-1);
@@ -34,8 +34,8 @@ STORAGE_CLASS_INPUT_FORMATTER_C void input_formatter_reg_store(
 }
 
 STORAGE_CLASS_INPUT_FORMATTER_C hrt_data input_formatter_reg_load(
-       const input_formatter_ID_t      ID,
-       const unsigned int                      reg_addr)
+    const input_formatter_ID_t ID,
+    const unsigned int                 reg_addr)
 {
        assert(ID < N_INPUT_FORMATTER_ID);
        assert(INPUT_FORMATTER_BASE[ID] != (hrt_address)-1);
index 9202cfedd94fdb6d13fc033432e02acf6b150587..2114cf4f3fdab229da93d7d998ba421dc41c279f 100644 (file)
 static const ib_buffer_t   IB_BUFFER_NULL = {0, 0, 0 };
 
 static input_system_error_t input_system_configure_channel(
-       const channel_cfg_t             channel);
+    const channel_cfg_t                channel);
 
 static input_system_error_t input_system_configure_channel_sensor(
-       const channel_cfg_t             channel);
+    const channel_cfg_t                channel);
 
 static input_system_error_t input_buffer_configuration(void);
 
@@ -45,64 +45,64 @@ static void receiver_rst(const rx_ID_t ID);
 static void input_system_network_rst(const input_system_ID_t ID);
 
 static void capture_unit_configure(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       const ib_buffer_t * const cfg);
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    const ib_buffer_t *const cfg);
 
 static void acquisition_unit_configure(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       const ib_buffer_t * const cfg);
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    const ib_buffer_t *const cfg);
 
 static void ctrl_unit_configure(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       const ctrl_unit_cfg_t * const cfg);
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    const ctrl_unit_cfg_t *const cfg);
 
 static void input_system_network_configure(
-       const input_system_ID_t                 ID,
-       const input_system_network_cfg_t * const cfg);
+    const input_system_ID_t                    ID,
+    const input_system_network_cfg_t *const cfg);
 
 // MW: CSI is previously named as "rx" short for "receiver"
 static input_system_error_t set_csi_cfg(
-       csi_cfg_t * const lhs,
-       const csi_cfg_t * const rhs,
-       input_system_config_flags_t * const flags);
+    csi_cfg_t *const lhs,
+    const csi_cfg_t *const rhs,
+    input_system_config_flags_t *const flags);
 
 static input_system_error_t set_source_type(
-       input_system_source_t * const lhs,
-       const input_system_source_t                             rhs,
-       input_system_config_flags_t * const flags);
+    input_system_source_t *const lhs,
+    const input_system_source_t                                rhs,
+    input_system_config_flags_t *const flags);
 
 static input_system_error_t input_system_multiplexer_cfg(
-       input_system_multiplex_t * const lhs,
-       const input_system_multiplex_t                  rhs,
-       input_system_config_flags_t * const flags);
+    input_system_multiplex_t *const lhs,
+    const input_system_multiplex_t                     rhs,
+    input_system_config_flags_t *const flags);
 
 static inline void capture_unit_get_state(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       capture_unit_state_t                    *state);
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    capture_unit_state_t                       *state);
 
 static inline void acquisition_unit_get_state(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       acquisition_unit_state_t                *state);
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    acquisition_unit_state_t           *state);
 
 static inline void ctrl_unit_get_state(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       ctrl_unit_state_t                               *state);
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    ctrl_unit_state_t                          *state);
 
 static inline void mipi_port_get_state(
-       const rx_ID_t                                   ID,
-       const enum mipi_port_id                 port_ID,
-       mipi_port_state_t                               *state);
+    const rx_ID_t                                      ID,
+    const enum mipi_port_id                    port_ID,
+    mipi_port_state_t                          *state);
 
 static inline void rx_channel_get_state(
-       const rx_ID_t                                   ID,
-       const unsigned int                              ch_id,
-       rx_channel_state_t                              *state);
+    const rx_ID_t                                      ID,
+    const unsigned int                         ch_id,
+    rx_channel_state_t                         *state);
 
 static void gp_device_rst(const gp_device_ID_t         ID);
 
@@ -111,13 +111,13 @@ static void input_selector_cfg_for_sensor(const gp_device_ID_t    ID);
 static void input_switch_rst(const gp_device_ID_t      ID);
 
 static void input_switch_cfg(
-       const gp_device_ID_t                            ID,
-       const input_switch_cfg_t * const cfg
+    const gp_device_ID_t                               ID,
+    const input_switch_cfg_t *const cfg
 );
 
 void input_system_get_state(
-       const input_system_ID_t                 ID,
-       input_system_state_t                    *state)
+    const input_system_ID_t                    ID,
+    input_system_state_t                       *state)
 {
        sub_system_ID_t sub_id;
 
@@ -125,58 +125,61 @@ void input_system_get_state(
        assert(state);
 
        state->str_multicastA_sel = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MULTICAST_A_IDX);
+                                   GPREGS_UNIT0_ID,
+                                   HIVE_ISYS_GPREG_MULTICAST_A_IDX);
        state->str_multicastB_sel = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MULTICAST_B_IDX);
+                                   GPREGS_UNIT0_ID,
+                                   HIVE_ISYS_GPREG_MULTICAST_B_IDX);
        state->str_multicastC_sel = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MULTICAST_C_IDX);
+                                   GPREGS_UNIT0_ID,
+                                   HIVE_ISYS_GPREG_MULTICAST_C_IDX);
        state->str_mux_sel = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MUX_IDX);
+                            GPREGS_UNIT0_ID,
+                            HIVE_ISYS_GPREG_MUX_IDX);
        state->str_mon_status = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_STRMON_STAT_IDX);
+                               GPREGS_UNIT0_ID,
+                               HIVE_ISYS_GPREG_STRMON_STAT_IDX);
        state->str_mon_irq_cond = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_STRMON_COND_IDX);
+                                 GPREGS_UNIT0_ID,
+                                 HIVE_ISYS_GPREG_STRMON_COND_IDX);
        state->str_mon_irq_en = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_STRMON_IRQ_EN_IDX);
+                               GPREGS_UNIT0_ID,
+                               HIVE_ISYS_GPREG_STRMON_IRQ_EN_IDX);
        state->isys_srst = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_SRST_IDX);
+                          GPREGS_UNIT0_ID,
+                          HIVE_ISYS_GPREG_SRST_IDX);
        state->isys_slv_reg_srst = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_SLV_REG_SRST_IDX);
+                                  GPREGS_UNIT0_ID,
+                                  HIVE_ISYS_GPREG_SLV_REG_SRST_IDX);
        state->str_deint_portA_cnt = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_REG_PORT_A_IDX);
+                                    GPREGS_UNIT0_ID,
+                                    HIVE_ISYS_GPREG_REG_PORT_A_IDX);
        state->str_deint_portB_cnt = input_system_sub_system_reg_load(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_REG_PORT_B_IDX);
+                                    GPREGS_UNIT0_ID,
+                                    HIVE_ISYS_GPREG_REG_PORT_B_IDX);
 
-       for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID; sub_id++) {
+       for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID;
+            sub_id++) {
                capture_unit_get_state(ID, sub_id,
-                       &state->capture_unit[sub_id - CAPTURE_UNIT0_ID]);
+                                      &state->capture_unit[sub_id - CAPTURE_UNIT0_ID]);
        }
-       for (sub_id = ACQUISITION_UNIT0_ID; sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
+       for (sub_id = ACQUISITION_UNIT0_ID;
+            sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
                acquisition_unit_get_state(ID, sub_id,
-                       &state->acquisition_unit[sub_id - ACQUISITION_UNIT0_ID]);
+                                          &state->acquisition_unit[sub_id - ACQUISITION_UNIT0_ID]);
        }
-       for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID; sub_id++) {
+       for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID;
+            sub_id++) {
                ctrl_unit_get_state(ID, sub_id,
-                       &state->ctrl_unit_state[sub_id - CTRL_UNIT0_ID]);
+                                   &state->ctrl_unit_state[sub_id - CTRL_UNIT0_ID]);
        }
 
        return;
 }
 
 void receiver_get_state(
-       const rx_ID_t                           ID,
-       receiver_state_t                        *state)
+    const rx_ID_t                              ID,
+    receiver_state_t                   *state)
 {
        enum mipi_port_id       port_id;
        unsigned int    ch_id;
@@ -185,85 +188,85 @@ void receiver_get_state(
        assert(state);
 
        state->fs_to_ls_delay = (uint8_t)receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_FS_TO_LS_DELAY_REG_IDX);
+                               _HRT_CSS_RECEIVER_FS_TO_LS_DELAY_REG_IDX);
        state->ls_to_data_delay = (uint8_t)receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_LS_TO_DATA_DELAY_REG_IDX);
+                                 _HRT_CSS_RECEIVER_LS_TO_DATA_DELAY_REG_IDX);
        state->data_to_le_delay = (uint8_t)receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_DATA_TO_LE_DELAY_REG_IDX);
+                                 _HRT_CSS_RECEIVER_DATA_TO_LE_DELAY_REG_IDX);
        state->le_to_fe_delay = (uint8_t)receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_LE_TO_FE_DELAY_REG_IDX);
+                               _HRT_CSS_RECEIVER_LE_TO_FE_DELAY_REG_IDX);
        state->fe_to_fs_delay = (uint8_t)receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_FE_TO_FS_DELAY_REG_IDX);
+                               _HRT_CSS_RECEIVER_FE_TO_FS_DELAY_REG_IDX);
        state->le_to_fs_delay = (uint8_t)receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_LE_TO_LS_DELAY_REG_IDX);
+                               _HRT_CSS_RECEIVER_LE_TO_LS_DELAY_REG_IDX);
        state->is_two_ppc = (bool)receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_TWO_PIXEL_EN_REG_IDX);
+                           _HRT_CSS_RECEIVER_TWO_PIXEL_EN_REG_IDX);
        state->backend_rst = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BACKEND_RST_REG_IDX);
+                                              _HRT_CSS_RECEIVER_BACKEND_RST_REG_IDX);
        state->raw18 = (uint16_t)receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_RAW18_REG_IDX);
+                      _HRT_CSS_RECEIVER_RAW18_REG_IDX);
        state->force_raw8 = (bool)receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_FORCE_RAW8_REG_IDX);
+                           _HRT_CSS_RECEIVER_FORCE_RAW8_REG_IDX);
        state->raw16 = (uint16_t)receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_RAW16_REG_IDX);
+                      _HRT_CSS_RECEIVER_RAW16_REG_IDX);
 
        for (port_id = (enum mipi_port_id)0; port_id < N_MIPI_PORT_ID; port_id++) {
                mipi_port_get_state(ID, port_id,
-                       &state->mipi_port_state[port_id]);
+                                   &state->mipi_port_state[port_id]);
        }
        for (ch_id = 0U; ch_id < N_RX_CHANNEL_ID; ch_id++) {
                rx_channel_get_state(ID, ch_id,
-                       &state->rx_channel_state[ch_id]);
+                                    &state->rx_channel_state[ch_id]);
        }
 
        state->be_gsp_acc_ovl = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_GSP_ACC_OVL_REG_IDX);
+                               _HRT_CSS_RECEIVER_BE_GSP_ACC_OVL_REG_IDX);
        state->be_srst = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_SRST_REG_IDX);
+                                          _HRT_CSS_RECEIVER_BE_SRST_REG_IDX);
        state->be_is_two_ppc = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_TWO_PPC_REG_IDX);
+                              _HRT_CSS_RECEIVER_BE_TWO_PPC_REG_IDX);
        state->be_comp_format0 = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG0_IDX);
+                                _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG0_IDX);
        state->be_comp_format1 = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG1_IDX);
+                                _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG1_IDX);
        state->be_comp_format2 = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG2_IDX);
+                                _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG2_IDX);
        state->be_comp_format3 = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG3_IDX);
+                                _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG3_IDX);
        state->be_sel = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_SEL_REG_IDX);
+                                         _HRT_CSS_RECEIVER_BE_SEL_REG_IDX);
        state->be_raw16_config = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_RAW16_CONFIG_REG_IDX);
+                                _HRT_CSS_RECEIVER_BE_RAW16_CONFIG_REG_IDX);
        state->be_raw18_config = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_RAW18_CONFIG_REG_IDX);
+                                _HRT_CSS_RECEIVER_BE_RAW18_CONFIG_REG_IDX);
        state->be_force_raw8 = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_FORCE_RAW8_REG_IDX);
+                              _HRT_CSS_RECEIVER_BE_FORCE_RAW8_REG_IDX);
        state->be_irq_status = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_IRQ_STATUS_REG_IDX);
+                              _HRT_CSS_RECEIVER_BE_IRQ_STATUS_REG_IDX);
        state->be_irq_clear = receiver_reg_load(ID,
-               _HRT_CSS_RECEIVER_BE_IRQ_CLEAR_REG_IDX);
+                                               _HRT_CSS_RECEIVER_BE_IRQ_CLEAR_REG_IDX);
 
        return;
 }
 
 bool is_mipi_format_yuv420(
-       const mipi_format_t                     mipi_format)
+    const mipi_format_t                        mipi_format)
 {
        bool    is_yuv420 = (
-               (mipi_format == MIPI_FORMAT_YUV420_8) ||
-               (mipi_format == MIPI_FORMAT_YUV420_10) ||
-               (mipi_format == MIPI_FORMAT_YUV420_8_SHIFT) ||
-               (mipi_format == MIPI_FORMAT_YUV420_10_SHIFT));
-/* MIPI_FORMAT_YUV420_8_LEGACY is not YUV420 */
+                               (mipi_format == MIPI_FORMAT_YUV420_8) ||
+                               (mipi_format == MIPI_FORMAT_YUV420_10) ||
+                               (mipi_format == MIPI_FORMAT_YUV420_8_SHIFT) ||
+                               (mipi_format == MIPI_FORMAT_YUV420_10_SHIFT));
+       /* MIPI_FORMAT_YUV420_8_LEGACY is not YUV420 */
 
        return is_yuv420;
 }
 
 void receiver_set_compression(
-       const rx_ID_t                   ID,
-       const unsigned int              cfg_ID,
-       const mipi_compressor_t         comp,
-       const mipi_predictor_t          pred)
+    const rx_ID_t                      ID,
+    const unsigned int         cfg_ID,
+    const mipi_compressor_t            comp,
+    const mipi_predictor_t             pred)
 {
        const unsigned int              field_id = cfg_ID % N_MIPI_FORMAT_CUSTOM;
        const unsigned int              ch_id = cfg_ID / N_MIPI_FORMAT_CUSTOM;
@@ -281,13 +284,21 @@ void receiver_set_compression(
        val = (((uint8_t)pred) << 3) | comp;
 
        switch (ch_id) {
-       case 0: addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG0_IDX : _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG1_IDX);
+       case 0:
+               addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG0_IDX :
+                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG1_IDX);
                break;
-       case 1: addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG0_IDX : _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG1_IDX);
+       case 1:
+               addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG0_IDX :
+                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG1_IDX);
                break;
-       case 2: addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG0_IDX : _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG1_IDX);
+       case 2:
+               addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG0_IDX :
+                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG1_IDX);
                break;
-       case 3: addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG0_IDX : _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG1_IDX);
+       case 3:
+               addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG0_IDX :
+                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG1_IDX);
                break;
        default:
                /* should not happen */
@@ -295,19 +306,20 @@ void receiver_set_compression(
                return;
        }
 
-       reg = ((field_id < 6) ? (val << (field_id * 5)) : (val << ((field_id - 6) * 5)));
+       reg = ((field_id < 6) ? (val << (field_id * 5)) : (val << ((
+                   field_id - 6) * 5)));
        receiver_reg_store(ID, addr, reg);
 
        return;
 }
 
 void receiver_port_enable(
-       const rx_ID_t                   ID,
-       const enum mipi_port_id         port_ID,
-       const bool                      cnd)
+    const rx_ID_t                      ID,
+    const enum mipi_port_id            port_ID,
+    const bool                 cnd)
 {
        hrt_data        reg = receiver_port_reg_load(ID, port_ID,
-               _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
+                         _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
 
        if (cnd) {
                reg |= 0x01;
@@ -316,246 +328,246 @@ void receiver_port_enable(
        }
 
        receiver_port_reg_store(ID, port_ID,
-               _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX, reg);
+                               _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX, reg);
        return;
 }
 
 bool is_receiver_port_enabled(
-       const rx_ID_t                   ID,
-       const enum mipi_port_id         port_ID)
+    const rx_ID_t                      ID,
+    const enum mipi_port_id            port_ID)
 {
        hrt_data        reg = receiver_port_reg_load(ID, port_ID,
-               _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
+                         _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
        return ((reg & 0x01) != 0);
 }
 
 void receiver_irq_enable(
-       const rx_ID_t                   ID,
-       const enum mipi_port_id         port_ID,
-       const rx_irq_info_t             irq_info)
+    const rx_ID_t                      ID,
+    const enum mipi_port_id            port_ID,
+    const rx_irq_info_t                irq_info)
 {
        receiver_port_reg_store(ID,
-               port_ID, _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX, irq_info);
+                               port_ID, _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX, irq_info);
        return;
 }
 
 rx_irq_info_t receiver_get_irq_info(
-       const rx_ID_t                   ID,
-       const enum mipi_port_id         port_ID)
+    const rx_ID_t                      ID,
+    const enum mipi_port_id            port_ID)
 {
        return receiver_port_reg_load(ID,
-       port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX);
+                                     port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX);
 }
 
 void receiver_irq_clear(
-       const rx_ID_t                   ID,
-       const enum mipi_port_id         port_ID,
-       const rx_irq_info_t             irq_info)
+    const rx_ID_t                      ID,
+    const enum mipi_port_id            port_ID,
+    const rx_irq_info_t                irq_info)
 {
        receiver_port_reg_store(ID,
-               port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX, irq_info);
+                               port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX, irq_info);
        return;
 }
 
 static inline void capture_unit_get_state(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       capture_unit_state_t                    *state)
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    capture_unit_state_t                       *state)
 {
        assert(/*(sub_id >= CAPTURE_UNIT0_ID) &&*/ (sub_id <= CAPTURE_UNIT2_ID));
        assert(state);
 
        state->StartMode = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_START_MODE_REG_ID);
+                          sub_id,
+                          CAPT_START_MODE_REG_ID);
        state->Start_Addr = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_START_ADDR_REG_ID);
+                           sub_id,
+                           CAPT_START_ADDR_REG_ID);
        state->Mem_Region_Size = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_MEM_REGION_SIZE_REG_ID);
+                                sub_id,
+                                CAPT_MEM_REGION_SIZE_REG_ID);
        state->Num_Mem_Regions = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_NUM_MEM_REGIONS_REG_ID);
+                                sub_id,
+                                CAPT_NUM_MEM_REGIONS_REG_ID);
 //     AM: Illegal read from following registers.
-/*     state->Init = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_INIT_REG_ID);
-       state->Start = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_START_REG_ID);
-       state->Stop = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_STOP_REG_ID);
-*/
+       /*      state->Init = input_system_sub_system_reg_load(ID,
+                       sub_id,
+                       CAPT_INIT_REG_ID);
+               state->Start = input_system_sub_system_reg_load(ID,
+                       sub_id,
+                       CAPT_START_REG_ID);
+               state->Stop = input_system_sub_system_reg_load(ID,
+                       sub_id,
+                       CAPT_STOP_REG_ID);
+       */
        state->Packet_Length = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_PACKET_LENGTH_REG_ID);
+                              sub_id,
+                              CAPT_PACKET_LENGTH_REG_ID);
        state->Received_Length = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_RECEIVED_LENGTH_REG_ID);
+                                sub_id,
+                                CAPT_RECEIVED_LENGTH_REG_ID);
        state->Received_Short_Packets = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_RECEIVED_SHORT_PACKETS_REG_ID);
+                                       sub_id,
+                                       CAPT_RECEIVED_SHORT_PACKETS_REG_ID);
        state->Received_Long_Packets = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_RECEIVED_LONG_PACKETS_REG_ID);
+                                      sub_id,
+                                      CAPT_RECEIVED_LONG_PACKETS_REG_ID);
        state->Last_Command = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_LAST_COMMAND_REG_ID);
+                             sub_id,
+                             CAPT_LAST_COMMAND_REG_ID);
        state->Next_Command = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_NEXT_COMMAND_REG_ID);
+                             sub_id,
+                             CAPT_NEXT_COMMAND_REG_ID);
        state->Last_Acknowledge = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_LAST_ACKNOWLEDGE_REG_ID);
+                                 sub_id,
+                                 CAPT_LAST_ACKNOWLEDGE_REG_ID);
        state->Next_Acknowledge = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_NEXT_ACKNOWLEDGE_REG_ID);
+                                 sub_id,
+                                 CAPT_NEXT_ACKNOWLEDGE_REG_ID);
        state->FSM_State_Info = input_system_sub_system_reg_load(ID,
-               sub_id,
-               CAPT_FSM_STATE_INFO_REG_ID);
+                               sub_id,
+                               CAPT_FSM_STATE_INFO_REG_ID);
 
        return;
 }
 
 static inline void acquisition_unit_get_state(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       acquisition_unit_state_t                *state)
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    acquisition_unit_state_t           *state)
 {
        assert(sub_id == ACQUISITION_UNIT0_ID);
        assert(state);
 
        state->Start_Addr = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_START_ADDR_REG_ID);
+                           sub_id,
+                           ACQ_START_ADDR_REG_ID);
        state->Mem_Region_Size = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_MEM_REGION_SIZE_REG_ID);
+                                sub_id,
+                                ACQ_MEM_REGION_SIZE_REG_ID);
        state->Num_Mem_Regions = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_NUM_MEM_REGIONS_REG_ID);
+                                sub_id,
+                                ACQ_NUM_MEM_REGIONS_REG_ID);
 //     AM: Illegal read from following registers.
-/*     state->Init = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_INIT_REG_ID);
-*/
+       /*      state->Init = input_system_sub_system_reg_load(ID,
+                       sub_id,
+                       ACQ_INIT_REG_ID);
+       */
        state->Received_Short_Packets = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_RECEIVED_SHORT_PACKETS_REG_ID);
+                                       sub_id,
+                                       ACQ_RECEIVED_SHORT_PACKETS_REG_ID);
        state->Received_Long_Packets = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_RECEIVED_LONG_PACKETS_REG_ID);
+                                      sub_id,
+                                      ACQ_RECEIVED_LONG_PACKETS_REG_ID);
        state->Last_Command = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_LAST_COMMAND_REG_ID);
+                             sub_id,
+                             ACQ_LAST_COMMAND_REG_ID);
        state->Next_Command = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_NEXT_COMMAND_REG_ID);
+                             sub_id,
+                             ACQ_NEXT_COMMAND_REG_ID);
        state->Last_Acknowledge = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_LAST_ACKNOWLEDGE_REG_ID);
+                                 sub_id,
+                                 ACQ_LAST_ACKNOWLEDGE_REG_ID);
        state->Next_Acknowledge = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_NEXT_ACKNOWLEDGE_REG_ID);
+                                 sub_id,
+                                 ACQ_NEXT_ACKNOWLEDGE_REG_ID);
        state->FSM_State_Info = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_FSM_STATE_INFO_REG_ID);
+                               sub_id,
+                               ACQ_FSM_STATE_INFO_REG_ID);
        state->Int_Cntr_Info = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ACQ_INT_CNTR_INFO_REG_ID);
+                              sub_id,
+                              ACQ_INT_CNTR_INFO_REG_ID);
 
        return;
 }
 
 static inline void ctrl_unit_get_state(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       ctrl_unit_state_t                       *state)
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    ctrl_unit_state_t                  *state)
 {
        assert(sub_id == CTRL_UNIT0_ID);
        assert(state);
 
        state->captA_start_addr = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_START_ADDR_A_REG_ID);
+                                 sub_id,
+                                 ISYS_CTRL_CAPT_START_ADDR_A_REG_ID);
        state->captB_start_addr = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_START_ADDR_B_REG_ID);
+                                 sub_id,
+                                 ISYS_CTRL_CAPT_START_ADDR_B_REG_ID);
        state->captC_start_addr = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_START_ADDR_C_REG_ID);
+                                 sub_id,
+                                 ISYS_CTRL_CAPT_START_ADDR_C_REG_ID);
        state->captA_mem_region_size = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_ID);
+                                      sub_id,
+                                      ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_ID);
        state->captB_mem_region_size = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_ID);
+                                      sub_id,
+                                      ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_ID);
        state->captC_mem_region_size = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_ID);
+                                      sub_id,
+                                      ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_ID);
        state->captA_num_mem_regions = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_ID);
+                                      sub_id,
+                                      ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_ID);
        state->captB_num_mem_regions = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_ID);
+                                      sub_id,
+                                      ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_ID);
        state->captC_num_mem_regions = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_ID);
+                                      sub_id,
+                                      ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_ID);
        state->acq_start_addr = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_ACQ_START_ADDR_REG_ID);
+                               sub_id,
+                               ISYS_CTRL_ACQ_START_ADDR_REG_ID);
        state->acq_mem_region_size = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_ID);
+                                    sub_id,
+                                    ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_ID);
        state->acq_num_mem_regions = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_ID);
+                                    sub_id,
+                                    ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_ID);
 //     AM: Illegal read from following registers.
-/*     state->ctrl_init = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_INIT_REG_ID);
-*/
+       /*      state->ctrl_init = input_system_sub_system_reg_load(ID,
+                       sub_id,
+                       ISYS_CTRL_INIT_REG_ID);
+       */
        state->last_cmd = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_LAST_COMMAND_REG_ID);
+                         sub_id,
+                         ISYS_CTRL_LAST_COMMAND_REG_ID);
        state->next_cmd = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_NEXT_COMMAND_REG_ID);
+                         sub_id,
+                         ISYS_CTRL_NEXT_COMMAND_REG_ID);
        state->last_ack = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_LAST_ACKNOWLEDGE_REG_ID);
+                         sub_id,
+                         ISYS_CTRL_LAST_ACKNOWLEDGE_REG_ID);
        state->next_ack = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_NEXT_ACKNOWLEDGE_REG_ID);
+                         sub_id,
+                         ISYS_CTRL_NEXT_ACKNOWLEDGE_REG_ID);
        state->top_fsm_state = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_FSM_STATE_INFO_REG_ID);
+                              sub_id,
+                              ISYS_CTRL_FSM_STATE_INFO_REG_ID);
        state->captA_fsm_state = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_A_FSM_STATE_INFO_REG_ID);
+                                sub_id,
+                                ISYS_CTRL_CAPT_A_FSM_STATE_INFO_REG_ID);
        state->captB_fsm_state = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_B_FSM_STATE_INFO_REG_ID);
+                                sub_id,
+                                ISYS_CTRL_CAPT_B_FSM_STATE_INFO_REG_ID);
        state->captC_fsm_state = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_C_FSM_STATE_INFO_REG_ID);
+                                sub_id,
+                                ISYS_CTRL_CAPT_C_FSM_STATE_INFO_REG_ID);
        state->acq_fsm_state = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_ACQ_FSM_STATE_INFO_REG_ID);
+                              sub_id,
+                              ISYS_CTRL_ACQ_FSM_STATE_INFO_REG_ID);
        state->capt_reserve_one_mem_region = input_system_sub_system_reg_load(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID);
+                                            sub_id,
+                                            ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID);
 
        return;
 }
 
 static inline void mipi_port_get_state(
-       const rx_ID_t                           ID,
-       const enum mipi_port_id                 port_ID,
-       mipi_port_state_t                       *state)
+    const rx_ID_t                              ID,
+    const enum mipi_port_id                    port_ID,
+    mipi_port_state_t                  *state)
 {
        int     i;
 
@@ -564,21 +576,21 @@ static inline void mipi_port_get_state(
        assert(state);
 
        state->device_ready = receiver_port_reg_load(ID,
-               port_ID, _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
+                             port_ID, _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
        state->irq_status = receiver_port_reg_load(ID,
-               port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX);
+                           port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX);
        state->irq_enable = receiver_port_reg_load(ID,
-               port_ID, _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
+                           port_ID, _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
        state->timeout_count = receiver_port_reg_load(ID,
-               port_ID, _HRT_CSS_RECEIVER_TIMEOUT_COUNT_REG_IDX);
+                              port_ID, _HRT_CSS_RECEIVER_TIMEOUT_COUNT_REG_IDX);
        state->init_count = (uint16_t)receiver_port_reg_load(ID,
-               port_ID, _HRT_CSS_RECEIVER_INIT_COUNT_REG_IDX);
+                           port_ID, _HRT_CSS_RECEIVER_INIT_COUNT_REG_IDX);
        state->raw16_18 = (uint16_t)receiver_port_reg_load(ID,
-               port_ID, _HRT_CSS_RECEIVER_RAW16_18_DATAID_REG_IDX);
+                         port_ID, _HRT_CSS_RECEIVER_RAW16_18_DATAID_REG_IDX);
        state->sync_count = receiver_port_reg_load(ID,
-               port_ID, _HRT_CSS_RECEIVER_SYNC_COUNT_REG_IDX);
+                           port_ID, _HRT_CSS_RECEIVER_SYNC_COUNT_REG_IDX);
        state->rx_count = receiver_port_reg_load(ID,
-               port_ID, _HRT_CSS_RECEIVER_RX_COUNT_REG_IDX);
+                         port_ID, _HRT_CSS_RECEIVER_RX_COUNT_REG_IDX);
 
        for (i = 0; i < MIPI_4LANE_CFG ; i++) {
                state->lane_sync_count[i] = (uint8_t)((state->sync_count) >> (i * 8));
@@ -589,9 +601,9 @@ static inline void mipi_port_get_state(
 }
 
 static inline void rx_channel_get_state(
-       const rx_ID_t                                   ID,
-       const unsigned int                              ch_id,
-       rx_channel_state_t                              *state)
+    const rx_ID_t                                      ID,
+    const unsigned int                         ch_id,
+    rx_channel_state_t                         *state)
 {
        int     i;
 
@@ -602,31 +614,31 @@ static inline void rx_channel_get_state(
        switch (ch_id) {
        case 0:
                state->comp_scheme0 = receiver_reg_load(ID,
-                               _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG0_IDX);
+                                                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG0_IDX);
                state->comp_scheme1 = receiver_reg_load(ID,
-                               _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG1_IDX);
+                                                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG1_IDX);
                break;
        case 1:
                state->comp_scheme0 = receiver_reg_load(ID,
-                               _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG0_IDX);
+                                                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG0_IDX);
                state->comp_scheme1 = receiver_reg_load(ID,
-                               _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG1_IDX);
+                                                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG1_IDX);
                break;
        case 2:
                state->comp_scheme0 = receiver_reg_load(ID,
-                               _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG0_IDX);
+                                                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG0_IDX);
                state->comp_scheme1 = receiver_reg_load(ID,
-                               _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG1_IDX);
+                                                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG1_IDX);
                break;
        case 3:
                state->comp_scheme0 = receiver_reg_load(ID,
-                               _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG0_IDX);
+                                                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG0_IDX);
                state->comp_scheme1 = receiver_reg_load(ID,
-                               _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG1_IDX);
+                                                       _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG1_IDX);
                break;
        }
 
-/* See Table 7.1.17,..., 7.1.24 */
+       /* See Table 7.1.17,..., 7.1.24 */
        for (i = 0; i < 6; i++) {
                u8      val = (uint8_t)((state->comp_scheme0) >> (i * 5)) & 0x1f;
 
@@ -647,7 +659,7 @@ static inline void rx_channel_get_state(
 static input_system_cfg2400_t config;
 
 static void receiver_rst(
-       const rx_ID_t                           ID)
+    const rx_ID_t                              ID)
 {
        enum mipi_port_id               port_id;
 
@@ -707,7 +719,8 @@ static void gp_device_rst(const gp_device_ID_t              ID)
        //      gp_device_reg_store(ID, _REG_GP_SYNCGEN_HOR_CNT_ADDR, ZERO);
        //      gp_device_reg_store(ID, _REG_GP_SYNCGEN_VER_CNT_ADDR, ZERO);
        //      gp_device_reg_store(ID, _REG_GP_SYNCGEN_FRAME_CNT_ADDR, ZERO);
-       gp_device_reg_store(ID, _REG_GP_SOFT_RESET_ADDR, ZERO); // AM: Maybe this soft reset is not safe.
+       gp_device_reg_store(ID, _REG_GP_SOFT_RESET_ADDR,
+                           ZERO); // AM: Maybe this soft reset is not safe.
 
        return;
 }
@@ -738,21 +751,21 @@ static void input_switch_rst(const gp_device_ID_t ID)
 
        // Initialize the data&hsync LUT.
        for (addr = _REG_GP_IFMT_input_switch_lut_reg0;
-                        addr <= _REG_GP_IFMT_input_switch_lut_reg7; addr += SIZEOF_HRT_REG) {
+            addr <= _REG_GP_IFMT_input_switch_lut_reg7; addr += SIZEOF_HRT_REG) {
                gp_device_reg_store(ID, addr, ZERO);
        }
 
        // Initialize the vsync LUT.
        gp_device_reg_store(ID,
-               _REG_GP_IFMT_input_switch_fsync_lut,
-               ZERO);
+                           _REG_GP_IFMT_input_switch_fsync_lut,
+                           ZERO);
 
        return;
 }
 
 static void input_switch_cfg(
-       const gp_device_ID_t                    ID,
-       const input_switch_cfg_t * const cfg)
+    const gp_device_ID_t                       ID,
+    const input_switch_cfg_t *const cfg)
 {
        int addr_offset;
 
@@ -761,16 +774,17 @@ static void input_switch_cfg(
 
        // Initialize the data&hsync LUT.
        for (addr_offset = 0; addr_offset < N_RX_CHANNEL_ID * 2; addr_offset++) {
-               assert(addr_offset * SIZEOF_HRT_REG + _REG_GP_IFMT_input_switch_lut_reg0 <= _REG_GP_IFMT_input_switch_lut_reg7);
+               assert(addr_offset * SIZEOF_HRT_REG + _REG_GP_IFMT_input_switch_lut_reg0 <=
+                      _REG_GP_IFMT_input_switch_lut_reg7);
                gp_device_reg_store(ID,
-                       _REG_GP_IFMT_input_switch_lut_reg0 + addr_offset * SIZEOF_HRT_REG,
-                       cfg->hsync_data_reg[addr_offset]);
+                                   _REG_GP_IFMT_input_switch_lut_reg0 + addr_offset * SIZEOF_HRT_REG,
+                                   cfg->hsync_data_reg[addr_offset]);
        }
 
        // Initialize the vsync LUT.
        gp_device_reg_store(ID,
-               _REG_GP_IFMT_input_switch_fsync_lut,
-               cfg->vsync_data_reg);
+                           _REG_GP_IFMT_input_switch_fsync_lut,
+                           cfg->vsync_data_reg);
 
        return;
 }
@@ -781,49 +795,52 @@ static void input_system_network_rst(const input_system_ID_t ID)
 
        // Reset all 3 multicasts.
        input_system_sub_system_reg_store(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MULTICAST_A_IDX,
-               INPUT_SYSTEM_DISCARD_ALL);
+                                         GPREGS_UNIT0_ID,
+                                         HIVE_ISYS_GPREG_MULTICAST_A_IDX,
+                                         INPUT_SYSTEM_DISCARD_ALL);
        input_system_sub_system_reg_store(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MULTICAST_B_IDX,
-               INPUT_SYSTEM_DISCARD_ALL);
+                                         GPREGS_UNIT0_ID,
+                                         HIVE_ISYS_GPREG_MULTICAST_B_IDX,
+                                         INPUT_SYSTEM_DISCARD_ALL);
        input_system_sub_system_reg_store(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MULTICAST_C_IDX,
-               INPUT_SYSTEM_DISCARD_ALL);
+                                         GPREGS_UNIT0_ID,
+                                         HIVE_ISYS_GPREG_MULTICAST_C_IDX,
+                                         INPUT_SYSTEM_DISCARD_ALL);
 
        // Reset stream mux.
        input_system_sub_system_reg_store(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MUX_IDX,
-               N_INPUT_SYSTEM_MULTIPLEX);
+                                         GPREGS_UNIT0_ID,
+                                         HIVE_ISYS_GPREG_MUX_IDX,
+                                         N_INPUT_SYSTEM_MULTIPLEX);
 
        // Reset 3 capture units.
-       for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID; sub_id++) {
+       for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID;
+            sub_id++) {
                input_system_sub_system_reg_store(ID,
-                       sub_id,
-                       CAPT_INIT_REG_ID,
-                       1U << CAPT_INIT_RST_REG_BIT);
+                                                 sub_id,
+                                                 CAPT_INIT_REG_ID,
+                                                 1U << CAPT_INIT_RST_REG_BIT);
        }
 
        // Reset acquisition unit.
-       for (sub_id = ACQUISITION_UNIT0_ID; sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
+       for (sub_id = ACQUISITION_UNIT0_ID;
+            sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
                input_system_sub_system_reg_store(ID,
-                       sub_id,
-                       ACQ_INIT_REG_ID,
-                       1U << ACQ_INIT_RST_REG_BIT);
+                                                 sub_id,
+                                                 ACQ_INIT_REG_ID,
+                                                 1U << ACQ_INIT_RST_REG_BIT);
        }
 
        // DMA unit reset is not needed.
 
        // Reset controller units.
        // NB: In future we need to keep part of ctrl_state for split capture and
-       for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID; sub_id++) {
+       for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID;
+            sub_id++) {
                input_system_sub_system_reg_store(ID,
-                       sub_id,
-                       ISYS_CTRL_INIT_REG_ID,
-                       1U); //AM: Is there any named constant?
+                                                 sub_id,
+                                                 ISYS_CTRL_INIT_REG_ID,
+                                                 1U); //AM: Is there any named constant?
        }
 
        return;
@@ -873,7 +890,7 @@ input_system_error_t input_system_configuration_reset(void)
 // MW: Comments are good, but doxygen is required, place it at the declaration
 // Function that appends the channel to current configuration.
 static input_system_error_t input_system_configure_channel(
-       const channel_cfg_t             channel)
+    const channel_cfg_t                channel)
 {
        input_system_error_t error = INPUT_SYSTEM_ERR_NO_ERROR;
        // Check if channel is not already configured.
@@ -881,39 +898,48 @@ static input_system_error_t input_system_configure_channel(
                return INPUT_SYSTEM_ERR_CHANNEL_ALREADY_SET;
        } else {
                switch (channel.source_type) {
-                       case INPUT_SYSTEM_SOURCE_SENSOR:
-                               error = input_system_configure_channel_sensor(channel);
-                               break;
-                       case INPUT_SYSTEM_SOURCE_TPG:
-                               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                               break;
-                       case INPUT_SYSTEM_SOURCE_PRBS:
-                               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                               break;
-                       case INPUT_SYSTEM_SOURCE_FIFO:
-                               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                               break;
-                       default:
-                               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                               break;
+               case INPUT_SYSTEM_SOURCE_SENSOR:
+                       error = input_system_configure_channel_sensor(channel);
+                       break;
+               case INPUT_SYSTEM_SOURCE_TPG:
+                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+                       break;
+               case INPUT_SYSTEM_SOURCE_PRBS:
+                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+                       break;
+               case INPUT_SYSTEM_SOURCE_FIFO:
+                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+                       break;
+               default:
+                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+                       break;
                }
 
                if (error != INPUT_SYSTEM_ERR_NO_ERROR) return error;
                // Input switch channel configurations must be combined in united config.
-               config.input_switch_cfg.hsync_data_reg[channel.source_cfg.csi_cfg.csi_port * 2] =
-                               channel.target_cfg.input_switch_channel_cfg.hsync_data_reg[0];
-               config.input_switch_cfg.hsync_data_reg[channel.source_cfg.csi_cfg.csi_port * 2 + 1] =
-                               channel.target_cfg.input_switch_channel_cfg.hsync_data_reg[1];
+               config.input_switch_cfg.hsync_data_reg[channel.source_cfg.csi_cfg.csi_port * 2]
+                   =
+                       channel.target_cfg.input_switch_channel_cfg.hsync_data_reg[0];
+               config.input_switch_cfg.hsync_data_reg[channel.source_cfg.csi_cfg.csi_port * 2 +
+                                                                                          1] =
+                                                              channel.target_cfg.input_switch_channel_cfg.hsync_data_reg[1];
                config.input_switch_cfg.vsync_data_reg |=
-                                (channel.target_cfg.input_switch_channel_cfg.vsync_data_reg & 0x7) << (channel.source_cfg.csi_cfg.csi_port * 3);
+                   (channel.target_cfg.input_switch_channel_cfg.vsync_data_reg & 0x7) <<
+                   (channel.source_cfg.csi_cfg.csi_port * 3);
 
                // Other targets are just copied and marked as set.
-               config.target_isp[channel.source_cfg.csi_cfg.csi_port] = channel.target_cfg.target_isp_cfg;
-               config.target_sp[channel.source_cfg.csi_cfg.csi_port] = channel.target_cfg.target_sp_cfg;
-               config.target_strm2mem[channel.source_cfg.csi_cfg.csi_port] = channel.target_cfg.target_strm2mem_cfg;
-               config.target_isp_flags[channel.source_cfg.csi_cfg.csi_port] |= INPUT_SYSTEM_CFG_FLAG_SET;
-               config.target_sp_flags[channel.source_cfg.csi_cfg.csi_port] |= INPUT_SYSTEM_CFG_FLAG_SET;
-               config.target_strm2mem_flags[channel.source_cfg.csi_cfg.csi_port] |= INPUT_SYSTEM_CFG_FLAG_SET;
+               config.target_isp[channel.source_cfg.csi_cfg.csi_port] =
+                   channel.target_cfg.target_isp_cfg;
+               config.target_sp[channel.source_cfg.csi_cfg.csi_port] =
+                   channel.target_cfg.target_sp_cfg;
+               config.target_strm2mem[channel.source_cfg.csi_cfg.csi_port] =
+                   channel.target_cfg.target_strm2mem_cfg;
+               config.target_isp_flags[channel.source_cfg.csi_cfg.csi_port] |=
+                   INPUT_SYSTEM_CFG_FLAG_SET;
+               config.target_sp_flags[channel.source_cfg.csi_cfg.csi_port] |=
+                   INPUT_SYSTEM_CFG_FLAG_SET;
+               config.target_strm2mem_flags[channel.source_cfg.csi_cfg.csi_port] |=
+                   INPUT_SYSTEM_CFG_FLAG_SET;
 
                config.ch_flags[channel.ch_id] = INPUT_SYSTEM_CFG_FLAG_SET;
        }
@@ -937,73 +963,75 @@ static input_system_error_t input_buffer_configuration(void)
                if (config.csi_flags[port] & INPUT_SYSTEM_CFG_FLAG_SET) {
                        // Check and set csi buffer in input buffer.
                        switch (source.buffering_mode) {
-                               case INPUT_SYSTEM_FIFO_CAPTURE:
-                               case INPUT_SYSTEM_XMEM_ACQUIRE:
-                                       config.csi_buffer_flags[port] = INPUT_SYSTEM_CFG_FLAG_BLOCKED; // Well, not used.
-                                       break;
-
-                               case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
-                               case INPUT_SYSTEM_SRAM_BUFFERING:
-                               case INPUT_SYSTEM_XMEM_BUFFERING:
-                               case INPUT_SYSTEM_XMEM_CAPTURE:
-                                       size_requested = source.csi_buffer.mem_reg_size * source.csi_buffer.nof_mem_regs;
-                                       if (source.csi_buffer.mem_reg_size > 0
-                                               && source.csi_buffer.nof_mem_regs > 0
-                                               && size_requested <= unallocated_memory
-                                               ) {
-                                                       config.csi_buffer[port].mem_reg_addr = current_address;
-                                                       config.csi_buffer[port].mem_reg_size = source.csi_buffer.mem_reg_size;
-                                                       config.csi_buffer[port].nof_mem_regs = source.csi_buffer.nof_mem_regs;
-                                                       current_address         += size_requested;
-                                                       unallocated_memory      -= size_requested;
-                                                       config.csi_buffer_flags[port] = INPUT_SYSTEM_CFG_FLAG_SET;
-                                       } else {
-                                                       config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
-                                                       return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
-                                       }
-                                       break;
+                       case INPUT_SYSTEM_FIFO_CAPTURE:
+                       case INPUT_SYSTEM_XMEM_ACQUIRE:
+                               config.csi_buffer_flags[port] =
+                                   INPUT_SYSTEM_CFG_FLAG_BLOCKED; // Well, not used.
+                               break;
 
-                               default:
+                       case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
+                       case INPUT_SYSTEM_SRAM_BUFFERING:
+                       case INPUT_SYSTEM_XMEM_BUFFERING:
+                       case INPUT_SYSTEM_XMEM_CAPTURE:
+                               size_requested = source.csi_buffer.mem_reg_size *
+                                                source.csi_buffer.nof_mem_regs;
+                               if (source.csi_buffer.mem_reg_size > 0
+                                   && source.csi_buffer.nof_mem_regs > 0
+                                   && size_requested <= unallocated_memory
+                                  ) {
+                                       config.csi_buffer[port].mem_reg_addr = current_address;
+                                       config.csi_buffer[port].mem_reg_size = source.csi_buffer.mem_reg_size;
+                                       config.csi_buffer[port].nof_mem_regs = source.csi_buffer.nof_mem_regs;
+                                       current_address         += size_requested;
+                                       unallocated_memory      -= size_requested;
+                                       config.csi_buffer_flags[port] = INPUT_SYSTEM_CFG_FLAG_SET;
+                               } else {
                                        config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
-                                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                                       break;
+                                       return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
+                               }
+                               break;
+
+                       default:
+                               config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
+                               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+                               break;
                        }
 
                        // Check acquisition buffer specified but set it later since it has to be unique.
                        switch (source.buffering_mode) {
-                               case INPUT_SYSTEM_FIFO_CAPTURE:
-                               case INPUT_SYSTEM_SRAM_BUFFERING:
-                               case INPUT_SYSTEM_XMEM_CAPTURE:
-                                       // Nothing to do.
-                                       break;
+                       case INPUT_SYSTEM_FIFO_CAPTURE:
+                       case INPUT_SYSTEM_SRAM_BUFFERING:
+                       case INPUT_SYSTEM_XMEM_CAPTURE:
+                               // Nothing to do.
+                               break;
 
-                               case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
-                               case INPUT_SYSTEM_XMEM_BUFFERING:
-                               case INPUT_SYSTEM_XMEM_ACQUIRE:
-                                       if (acq_already_specified == INPUT_SYSTEM_CFG_FLAG_RESET) {
-                                               size_requested = source.acquisition_buffer.mem_reg_size
-                                                                                                       * source.acquisition_buffer.nof_mem_regs;
-                                               if (source.acquisition_buffer.mem_reg_size > 0
-                                                       && source.acquisition_buffer.nof_mem_regs > 0
-                                                       && size_requested <= unallocated_memory
-                                                       ) {
-                                                               candidate_buffer_acq = source.acquisition_buffer;
-                                                               acq_already_specified = INPUT_SYSTEM_CFG_FLAG_SET;
-                                               }
-                                       } else {
-                                               // Check if specified acquisition buffer is the same as specified before.
-                                               if (source.acquisition_buffer.mem_reg_size != candidate_buffer_acq.mem_reg_size
-                                                       || source.acquisition_buffer.nof_mem_regs !=  candidate_buffer_acq.nof_mem_regs
-                                                  ) {
-                                                       config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
-                                                       return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
-                                               }
+                       case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
+                       case INPUT_SYSTEM_XMEM_BUFFERING:
+                       case INPUT_SYSTEM_XMEM_ACQUIRE:
+                               if (acq_already_specified == INPUT_SYSTEM_CFG_FLAG_RESET) {
+                                       size_requested = source.acquisition_buffer.mem_reg_size
+                                                        * source.acquisition_buffer.nof_mem_regs;
+                                       if (source.acquisition_buffer.mem_reg_size > 0
+                                           && source.acquisition_buffer.nof_mem_regs > 0
+                                           && size_requested <= unallocated_memory
+                                          ) {
+                                               candidate_buffer_acq = source.acquisition_buffer;
+                                               acq_already_specified = INPUT_SYSTEM_CFG_FLAG_SET;
                                        }
-                                       break;
+                               } else {
+                                       // Check if specified acquisition buffer is the same as specified before.
+                                       if (source.acquisition_buffer.mem_reg_size != candidate_buffer_acq.mem_reg_size
+                                           || source.acquisition_buffer.nof_mem_regs !=  candidate_buffer_acq.nof_mem_regs
+                                          ) {
+                                               config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
+                                               return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
+                                       }
+                               }
+                               break;
 
-                               default:
-                                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                                       break;
+                       default:
+                               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+                               break;
                        }
                } else {
                        config.csi_buffer_flags[port] = INPUT_SYSTEM_CFG_FLAG_BLOCKED;
@@ -1011,12 +1039,15 @@ static input_system_error_t input_buffer_configuration(void)
        } // end of for ( port )
 
        // Set the acquisition buffer at the end.
-       size_requested = candidate_buffer_acq.mem_reg_size * candidate_buffer_acq.nof_mem_regs;
+       size_requested = candidate_buffer_acq.mem_reg_size *
+                        candidate_buffer_acq.nof_mem_regs;
        if (acq_already_specified == INPUT_SYSTEM_CFG_FLAG_SET
-               && size_requested <= unallocated_memory) {
+           && size_requested <= unallocated_memory) {
                config.acquisition_buffer_unique.mem_reg_addr = current_address;
-               config.acquisition_buffer_unique.mem_reg_size = candidate_buffer_acq.mem_reg_size;
-               config.acquisition_buffer_unique.nof_mem_regs = candidate_buffer_acq.nof_mem_regs;
+               config.acquisition_buffer_unique.mem_reg_size =
+                   candidate_buffer_acq.mem_reg_size;
+               config.acquisition_buffer_unique.nof_mem_regs =
+                   candidate_buffer_acq.nof_mem_regs;
                current_address         += size_requested;
                unallocated_memory      -= size_requested;
                config.acquisition_buffer_unique_flags = INPUT_SYSTEM_CFG_FLAG_SET;
@@ -1028,125 +1059,126 @@ static input_system_error_t input_buffer_configuration(void)
 }
 
 static void capture_unit_configure(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       const ib_buffer_t * const cfg)
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    const ib_buffer_t *const cfg)
 {
        assert(ID < N_INPUT_SYSTEM_ID);
-       assert(/*(sub_id >= CAPTURE_UNIT0_ID) &&*/ (sub_id <= CAPTURE_UNIT2_ID)); // Commented part is always true.
+       assert(/*(sub_id >= CAPTURE_UNIT0_ID) &&*/ (sub_id <=
+               CAPTURE_UNIT2_ID)); // Commented part is always true.
        assert(cfg);
 
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               CAPT_START_ADDR_REG_ID,
-               cfg->mem_reg_addr);
+                                         sub_id,
+                                         CAPT_START_ADDR_REG_ID,
+                                         cfg->mem_reg_addr);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               CAPT_MEM_REGION_SIZE_REG_ID,
-               cfg->mem_reg_size);
+                                         sub_id,
+                                         CAPT_MEM_REGION_SIZE_REG_ID,
+                                         cfg->mem_reg_size);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               CAPT_NUM_MEM_REGIONS_REG_ID,
-               cfg->nof_mem_regs);
+                                         sub_id,
+                                         CAPT_NUM_MEM_REGIONS_REG_ID,
+                                         cfg->nof_mem_regs);
 
        return;
 }
 
 static void acquisition_unit_configure(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       const ib_buffer_t * const cfg)
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    const ib_buffer_t *const cfg)
 {
        assert(ID < N_INPUT_SYSTEM_ID);
        assert(sub_id == ACQUISITION_UNIT0_ID);
        assert(cfg);
 
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ACQ_START_ADDR_REG_ID,
-               cfg->mem_reg_addr);
+                                         sub_id,
+                                         ACQ_START_ADDR_REG_ID,
+                                         cfg->mem_reg_addr);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ACQ_NUM_MEM_REGIONS_REG_ID,
-               cfg->nof_mem_regs);
+                                         sub_id,
+                                         ACQ_NUM_MEM_REGIONS_REG_ID,
+                                         cfg->nof_mem_regs);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ACQ_MEM_REGION_SIZE_REG_ID,
-               cfg->mem_reg_size);
+                                         sub_id,
+                                         ACQ_MEM_REGION_SIZE_REG_ID,
+                                         cfg->mem_reg_size);
 
        return;
 }
 
 static void ctrl_unit_configure(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_id,
-       const ctrl_unit_cfg_t * const cfg)
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_id,
+    const ctrl_unit_cfg_t *const cfg)
 {
        assert(ID < N_INPUT_SYSTEM_ID);
        assert(sub_id == CTRL_UNIT0_ID);
        assert(cfg);
 
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_START_ADDR_A_REG_ID,
-               cfg->buffer_mipi[CAPTURE_UNIT0_ID].mem_reg_addr);
+                                         sub_id,
+                                         ISYS_CTRL_CAPT_START_ADDR_A_REG_ID,
+                                         cfg->buffer_mipi[CAPTURE_UNIT0_ID].mem_reg_addr);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_ID,
-               cfg->buffer_mipi[CAPTURE_UNIT0_ID].mem_reg_size);
+                                         sub_id,
+                                         ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_ID,
+                                         cfg->buffer_mipi[CAPTURE_UNIT0_ID].mem_reg_size);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_ID,
-               cfg->buffer_mipi[CAPTURE_UNIT0_ID].nof_mem_regs);
+                                         sub_id,
+                                         ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_ID,
+                                         cfg->buffer_mipi[CAPTURE_UNIT0_ID].nof_mem_regs);
 
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_START_ADDR_B_REG_ID,
-               cfg->buffer_mipi[CAPTURE_UNIT1_ID].mem_reg_addr);
+                                         sub_id,
+                                         ISYS_CTRL_CAPT_START_ADDR_B_REG_ID,
+                                         cfg->buffer_mipi[CAPTURE_UNIT1_ID].mem_reg_addr);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_ID,
-               cfg->buffer_mipi[CAPTURE_UNIT1_ID].mem_reg_size);
+                                         sub_id,
+                                         ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_ID,
+                                         cfg->buffer_mipi[CAPTURE_UNIT1_ID].mem_reg_size);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_ID,
-               cfg->buffer_mipi[CAPTURE_UNIT1_ID].nof_mem_regs);
+                                         sub_id,
+                                         ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_ID,
+                                         cfg->buffer_mipi[CAPTURE_UNIT1_ID].nof_mem_regs);
 
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_START_ADDR_C_REG_ID,
-               cfg->buffer_mipi[CAPTURE_UNIT2_ID].mem_reg_addr);
+                                         sub_id,
+                                         ISYS_CTRL_CAPT_START_ADDR_C_REG_ID,
+                                         cfg->buffer_mipi[CAPTURE_UNIT2_ID].mem_reg_addr);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_ID,
-               cfg->buffer_mipi[CAPTURE_UNIT2_ID].mem_reg_size);
+                                         sub_id,
+                                         ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_ID,
+                                         cfg->buffer_mipi[CAPTURE_UNIT2_ID].mem_reg_size);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_ID,
-               cfg->buffer_mipi[CAPTURE_UNIT2_ID].nof_mem_regs);
+                                         sub_id,
+                                         ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_ID,
+                                         cfg->buffer_mipi[CAPTURE_UNIT2_ID].nof_mem_regs);
 
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_ACQ_START_ADDR_REG_ID,
-               cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].mem_reg_addr);
+                                         sub_id,
+                                         ISYS_CTRL_ACQ_START_ADDR_REG_ID,
+                                         cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].mem_reg_addr);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_ID,
-               cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].mem_reg_size);
+                                         sub_id,
+                                         ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_ID,
+                                         cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].mem_reg_size);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_ID,
-               cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].nof_mem_regs);
+                                         sub_id,
+                                         ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_ID,
+                                         cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].nof_mem_regs);
        input_system_sub_system_reg_store(ID,
-               sub_id,
-               ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID,
-               0);
+                                         sub_id,
+                                         ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID,
+                                         0);
        return;
 }
 
 static void input_system_network_configure(
-       const input_system_ID_t                         ID,
-       const input_system_network_cfg_t * const cfg)
+    const input_system_ID_t                            ID,
+    const input_system_network_cfg_t *const cfg)
 {
        u32 sub_id;
 
@@ -1155,45 +1187,49 @@ static void input_system_network_configure(
 
        // Set all 3 multicasts.
        input_system_sub_system_reg_store(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MULTICAST_A_IDX,
-               cfg->multicast_cfg[CAPTURE_UNIT0_ID]);
+                                         GPREGS_UNIT0_ID,
+                                         HIVE_ISYS_GPREG_MULTICAST_A_IDX,
+                                         cfg->multicast_cfg[CAPTURE_UNIT0_ID]);
        input_system_sub_system_reg_store(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MULTICAST_B_IDX,
-               cfg->multicast_cfg[CAPTURE_UNIT1_ID]);
+                                         GPREGS_UNIT0_ID,
+                                         HIVE_ISYS_GPREG_MULTICAST_B_IDX,
+                                         cfg->multicast_cfg[CAPTURE_UNIT1_ID]);
        input_system_sub_system_reg_store(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MULTICAST_C_IDX,
-               cfg->multicast_cfg[CAPTURE_UNIT2_ID]);
+                                         GPREGS_UNIT0_ID,
+                                         HIVE_ISYS_GPREG_MULTICAST_C_IDX,
+                                         cfg->multicast_cfg[CAPTURE_UNIT2_ID]);
 
        // Set stream mux.
        input_system_sub_system_reg_store(ID,
-               GPREGS_UNIT0_ID,
-               HIVE_ISYS_GPREG_MUX_IDX,
-               cfg->mux_cfg);
+                                         GPREGS_UNIT0_ID,
+                                         HIVE_ISYS_GPREG_MUX_IDX,
+                                         cfg->mux_cfg);
 
        // Set capture units.
-       for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID; sub_id++) {
+       for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID;
+            sub_id++) {
                capture_unit_configure(ID,
-                       sub_id,
-                       &cfg->ctrl_unit_cfg[ID].buffer_mipi[sub_id - CAPTURE_UNIT0_ID]);
+                                      sub_id,
+                                      &cfg->ctrl_unit_cfg[ID].buffer_mipi[sub_id - CAPTURE_UNIT0_ID]);
        }
 
        // Set acquisition units.
-       for (sub_id = ACQUISITION_UNIT0_ID; sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
+       for (sub_id = ACQUISITION_UNIT0_ID;
+            sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
                acquisition_unit_configure(ID,
-                       sub_id,
-                       &cfg->ctrl_unit_cfg[sub_id - ACQUISITION_UNIT0_ID].buffer_acquire[sub_id - ACQUISITION_UNIT0_ID]);
+                                          sub_id,
+                                          &cfg->ctrl_unit_cfg[sub_id - ACQUISITION_UNIT0_ID].buffer_acquire[sub_id -
+                                                  ACQUISITION_UNIT0_ID]);
        }
 
        // No DMA configuration needed. Ctrl_unit will fully control it.
 
        // Set controller units.
-       for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID; sub_id++) {
+       for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID;
+            sub_id++) {
                ctrl_unit_configure(ID,
-                       sub_id,
-                       &cfg->ctrl_unit_cfg[sub_id - CTRL_UNIT0_ID]);
+                                   sub_id,
+                                   &cfg->ctrl_unit_cfg[sub_id - CTRL_UNIT0_ID]);
        }
 
        return;
@@ -1207,74 +1243,82 @@ static input_system_error_t configuration_to_registers(void)
        assert(config.source_type_flags & INPUT_SYSTEM_CFG_FLAG_SET);
 
        switch (config.source_type) {
-               case INPUT_SYSTEM_SOURCE_SENSOR:
+       case INPUT_SYSTEM_SOURCE_SENSOR:
+
+               // Determine stream multicasts setting based on the mode of csi_cfg_t.
+               // AM: This should be moved towards earlier function call, e.g. in
+               // the commit function.
+               for (i = MIPI_PORT0_ID; i < N_MIPI_PORT_ID; i++) {
+                       if (config.csi_flags[i] & INPUT_SYSTEM_CFG_FLAG_SET) {
+                               switch (config.csi_value[i].buffering_mode) {
+                               case INPUT_SYSTEM_FIFO_CAPTURE:
+                                       config.multicast[i] = INPUT_SYSTEM_CSI_BACKEND;
+                                       break;
 
-                       // Determine stream multicasts setting based on the mode of csi_cfg_t.
-                       // AM: This should be moved towards earlier function call, e.g. in
-                       // the commit function.
-                       for (i = MIPI_PORT0_ID; i < N_MIPI_PORT_ID; i++) {
-                               if (config.csi_flags[i] & INPUT_SYSTEM_CFG_FLAG_SET) {
-                                       switch (config.csi_value[i].buffering_mode) {
-                                               case INPUT_SYSTEM_FIFO_CAPTURE:
-                                                       config.multicast[i] = INPUT_SYSTEM_CSI_BACKEND;
-                                                       break;
-
-                                               case INPUT_SYSTEM_XMEM_CAPTURE:
-                                               case INPUT_SYSTEM_SRAM_BUFFERING:
-                                               case INPUT_SYSTEM_XMEM_BUFFERING:
-                                                       config.multicast[i] = INPUT_SYSTEM_INPUT_BUFFER;
-                                                       break;
-
-                                               case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
-                                                       config.multicast[i] = INPUT_SYSTEM_MULTICAST;
-                                                       break;
-
-                                               case INPUT_SYSTEM_XMEM_ACQUIRE:
-                                                       config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
-                                                       break;
-
-                                               default:
-                                                       config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
-                                                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                                                       //break;
-                                       }
-                               } else {
+                               case INPUT_SYSTEM_XMEM_CAPTURE:
+                               case INPUT_SYSTEM_SRAM_BUFFERING:
+                               case INPUT_SYSTEM_XMEM_BUFFERING:
+                                       config.multicast[i] = INPUT_SYSTEM_INPUT_BUFFER;
+                                       break;
+
+                               case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
+                                       config.multicast[i] = INPUT_SYSTEM_MULTICAST;
+                                       break;
+
+                               case INPUT_SYSTEM_XMEM_ACQUIRE:
                                        config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
+                                       break;
+
+                               default:
+                                       config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
+                                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+                                       //break;
                                }
+                       } else {
+                               config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
+                       }
 
-                               input_system_network_cfg.multicast_cfg[i] = config.multicast[i];
+                       input_system_network_cfg.multicast_cfg[i] = config.multicast[i];
 
-                       } // for
+               } // for
 
-                       input_system_network_cfg.mux_cfg = config.multiplexer;
+               input_system_network_cfg.mux_cfg = config.multiplexer;
 
-                       input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID - CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT0_ID] = config.csi_buffer[MIPI_PORT0_ID];
-                       input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID - CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT1_ID] = config.csi_buffer[MIPI_PORT1_ID];
-                       input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID - CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT2_ID] = config.csi_buffer[MIPI_PORT2_ID];
-                       input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID - CTRL_UNIT0_ID].buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID] =
-                                       config.acquisition_buffer_unique;
+               input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID -
+                                                      CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT0_ID] =
+                                                              config.csi_buffer[MIPI_PORT0_ID];
+               input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID -
+                                                      CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT1_ID] =
+                                                              config.csi_buffer[MIPI_PORT1_ID];
+               input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID -
+                                                      CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT2_ID] =
+                                                              config.csi_buffer[MIPI_PORT2_ID];
+               input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID -
+                                                      CTRL_UNIT0_ID].buffer_acquire[ACQUISITION_UNIT0_ID -
+                                                              ACQUISITION_UNIT0_ID] =
+                                                                      config.acquisition_buffer_unique;
 
-                       // First set input network around CSI receiver.
-                       input_system_network_configure(INPUT_SYSTEM0_ID, &input_system_network_cfg);
+               // First set input network around CSI receiver.
+               input_system_network_configure(INPUT_SYSTEM0_ID, &input_system_network_cfg);
 
-                       // Set the CSI receiver.
-                       //...
-                       break;
+               // Set the CSI receiver.
+               //...
+               break;
 
-               case INPUT_SYSTEM_SOURCE_TPG:
+       case INPUT_SYSTEM_SOURCE_TPG:
 
-                       break;
+               break;
 
-               case INPUT_SYSTEM_SOURCE_PRBS:
+       case INPUT_SYSTEM_SOURCE_PRBS:
 
-                       break;
+               break;
 
-               case INPUT_SYSTEM_SOURCE_FIFO:
-                       break;
+       case INPUT_SYSTEM_SOURCE_FIFO:
+               break;
 
-               default:
-                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                       break;
+       default:
+               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+               break;
 
        } // end of switch (source_type)
 
@@ -1313,10 +1357,10 @@ input_system_error_t input_system_configuration_commit(void)
 // FIFO
 
 input_system_error_t   input_system_csi_fifo_channel_cfg(
-               u32             ch_id,
-               input_system_csi_port_t port,
-               backend_channel_cfg_t   backend_ch,
-               target_cfg2400_t        target
+    u32                ch_id,
+    input_system_csi_port_t    port,
+    backend_channel_cfg_t      backend_ch,
+    target_cfg2400_t   target
 )
 {
        channel_cfg_t channel;
@@ -1336,13 +1380,13 @@ input_system_error_t    input_system_csi_fifo_channel_cfg(
 }
 
 input_system_error_t   input_system_csi_fifo_channel_with_counting_cfg(
-               u32                             ch_id,
-               u32                             nof_frames,
-               input_system_csi_port_t                 port,
-               backend_channel_cfg_t                   backend_ch,
-               u32                             csi_mem_reg_size,
-               u32                             csi_nof_mem_regs,
-               target_cfg2400_t                        target
+    u32                                ch_id,
+    u32                                nof_frames,
+    input_system_csi_port_t                    port,
+    backend_channel_cfg_t                      backend_ch,
+    u32                                csi_mem_reg_size,
+    u32                                csi_nof_mem_regs,
+    target_cfg2400_t                   target
 )
 {
        channel_cfg_t channel;
@@ -1352,7 +1396,8 @@ input_system_error_t      input_system_csi_fifo_channel_with_counting_cfg(
        channel.source_type             = INPUT_SYSTEM_SOURCE_SENSOR;
        //channel.source
        channel.source_cfg.csi_cfg.csi_port                     = port;
-       channel.source_cfg.csi_cfg.buffering_mode       = INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING;
+       channel.source_cfg.csi_cfg.buffering_mode       =
+           INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING;
        channel.source_cfg.csi_cfg.csi_buffer.mem_reg_size              = csi_mem_reg_size;
        channel.source_cfg.csi_cfg.csi_buffer.nof_mem_regs              = csi_nof_mem_regs;
        channel.source_cfg.csi_cfg.csi_buffer.mem_reg_addr              = 0;
@@ -1366,14 +1411,14 @@ input_system_error_t    input_system_csi_fifo_channel_with_counting_cfg(
 // SRAM
 
 input_system_error_t   input_system_csi_sram_channel_cfg(
-               u32                             ch_id,
-               input_system_csi_port_t                 port,
-               backend_channel_cfg_t                   backend_ch,
-               u32                             csi_mem_reg_size,
-               u32                             csi_nof_mem_regs,
-       //      uint32_t                                acq_mem_reg_size,
-       //      uint32_t                                acq_nof_mem_regs,
-               target_cfg2400_t                        target
+    u32                                ch_id,
+    input_system_csi_port_t                    port,
+    backend_channel_cfg_t                      backend_ch,
+    u32                                csi_mem_reg_size,
+    u32                                csi_nof_mem_regs,
+    // uint32_t                                acq_mem_reg_size,
+    // uint32_t                                acq_nof_mem_regs,
+    target_cfg2400_t                   target
 )
 {
        channel_cfg_t channel;
@@ -1398,15 +1443,15 @@ input_system_error_t    input_system_csi_sram_channel_cfg(
 
 // Collects all parameters and puts them in channel_cfg_t.
 input_system_error_t   input_system_csi_xmem_channel_cfg(
-               u32                             ch_id,
-               input_system_csi_port_t                 port,
-               backend_channel_cfg_t                   backend_ch,
-               u32                             csi_mem_reg_size,
-               u32                             csi_nof_mem_regs,
-               u32                             acq_mem_reg_size,
-               u32                             acq_nof_mem_regs,
-               target_cfg2400_t                        target,
-               uint32_t                                nof_xmem_buffers
+    u32                                ch_id,
+    input_system_csi_port_t                    port,
+    backend_channel_cfg_t                      backend_ch,
+    u32                                csi_mem_reg_size,
+    u32                                csi_nof_mem_regs,
+    u32                                acq_mem_reg_size,
+    u32                                acq_nof_mem_regs,
+    target_cfg2400_t                   target,
+    uint32_t                           nof_xmem_buffers
 )
 {
        channel_cfg_t channel;
@@ -1430,13 +1475,13 @@ input_system_error_t    input_system_csi_xmem_channel_cfg(
 }
 
 input_system_error_t   input_system_csi_xmem_acquire_only_channel_cfg(
-               u32                             ch_id,
-               u32                             nof_frames,
-               input_system_csi_port_t                 port,
-               backend_channel_cfg_t                   backend_ch,
-               u32                             acq_mem_reg_size,
-               u32                             acq_nof_mem_regs,
-               target_cfg2400_t                        target)
+    u32                                ch_id,
+    u32                                nof_frames,
+    input_system_csi_port_t                    port,
+    backend_channel_cfg_t                      backend_ch,
+    u32                                acq_mem_reg_size,
+    u32                                acq_nof_mem_regs,
+    target_cfg2400_t                   target)
 {
        channel_cfg_t channel;
 
@@ -1457,14 +1502,14 @@ input_system_error_t    input_system_csi_xmem_acquire_only_channel_cfg(
 }
 
 input_system_error_t   input_system_csi_xmem_capture_only_channel_cfg(
-               u32                             ch_id,
-               u32                             nof_frames,
-               input_system_csi_port_t                 port,
-               u32                             csi_mem_reg_size,
-               u32                             csi_nof_mem_regs,
-               u32                             acq_mem_reg_size,
-               u32                             acq_nof_mem_regs,
-               target_cfg2400_t                        target)
+    u32                                ch_id,
+    u32                                nof_frames,
+    input_system_csi_port_t                    port,
+    u32                                csi_mem_reg_size,
+    u32                                csi_nof_mem_regs,
+    u32                                acq_mem_reg_size,
+    u32                                acq_nof_mem_regs,
+    target_cfg2400_t                   target)
 {
        channel_cfg_t channel;
 
@@ -1490,14 +1535,14 @@ input_system_error_t    input_system_csi_xmem_capture_only_channel_cfg(
 // Non - CSI
 
 input_system_error_t   input_system_prbs_channel_cfg(
-               u32             ch_id,
-               u32             nof_frames,//not used yet
-               u32             seed,
-               u32             sync_gen_width,
-               u32             sync_gen_height,
-               u32             sync_gen_hblank_cycles,
-               u32             sync_gen_vblank_cycles,
-               target_cfg2400_t        target
+    u32                ch_id,
+    u32                nof_frames,//not used yet
+    u32                seed,
+    u32                sync_gen_width,
+    u32                sync_gen_height,
+    u32                sync_gen_hblank_cycles,
+    u32                sync_gen_vblank_cycles,
+    target_cfg2400_t   target
 )
 {
        channel_cfg_t channel;
@@ -1519,18 +1564,18 @@ input_system_error_t    input_system_prbs_channel_cfg(
 }
 
 input_system_error_t   input_system_tpg_channel_cfg(
-               u32             ch_id,
-               u32             nof_frames,//not used yet
-               u32             x_mask,
-               u32             y_mask,
-               u32             x_delta,
-               u32             y_delta,
-               u32             xy_mask,
-               u32             sync_gen_width,
-               u32             sync_gen_height,
-               u32             sync_gen_hblank_cycles,
-               u32             sync_gen_vblank_cycles,
-               target_cfg2400_t        target
+    u32                ch_id,
+    u32                nof_frames,//not used yet
+    u32                x_mask,
+    u32                y_mask,
+    u32                x_delta,
+    u32                y_delta,
+    u32                xy_mask,
+    u32                sync_gen_width,
+    u32                sync_gen_height,
+    u32                sync_gen_hblank_cycles,
+    u32                sync_gen_vblank_cycles,
+    target_cfg2400_t   target
 )
 {
        channel_cfg_t channel;
@@ -1556,10 +1601,10 @@ input_system_error_t    input_system_tpg_channel_cfg(
 
 // MW: Don't use system specific names, (even in system specific files) "cfg2400" -> cfg
 input_system_error_t   input_system_gpfifo_channel_cfg(
-               u32             ch_id,
-               u32             nof_frames, //not used yet
+    u32                ch_id,
+    u32                nof_frames, //not used yet
 
-               target_cfg2400_t        target)
+    target_cfg2400_t   target)
 {
        channel_cfg_t channel;
 
@@ -1580,7 +1625,7 @@ input_system_error_t      input_system_gpfifo_channel_cfg(
 
 // Fills the parameters to config.csi_value[port]
 static input_system_error_t input_system_configure_channel_sensor(
-       const channel_cfg_t channel)
+    const channel_cfg_t channel)
 {
        const u32 port = channel.source_cfg.csi_cfg.csi_port;
        input_system_error_t status = INPUT_SYSTEM_ERR_NO_ERROR;
@@ -1592,78 +1637,83 @@ static input_system_error_t input_system_configure_channel_sensor(
 
        //check if port > N_INPUT_SYSTEM_MULTIPLEX
 
-       status = set_source_type(&config.source_type, channel.source_type, &config.source_type_flags);
+       status = set_source_type(&config.source_type, channel.source_type,
+                                &config.source_type_flags);
        if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
 
        // Check for conflicts on source (implicitly on multicast, capture unit and input buffer).
 
-       status = set_csi_cfg(&config.csi_value[port], &channel.source_cfg.csi_cfg, &config.csi_flags[port]);
+       status = set_csi_cfg(&config.csi_value[port], &channel.source_cfg.csi_cfg,
+                            &config.csi_flags[port]);
        if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
 
        switch (channel.source_cfg.csi_cfg.buffering_mode) {
-               case INPUT_SYSTEM_FIFO_CAPTURE:
+       case INPUT_SYSTEM_FIFO_CAPTURE:
 
-                       // Check for conflicts on mux.
-                       mux = INPUT_SYSTEM_MIPI_PORT0 + port;
-                       status = input_system_multiplexer_cfg(&config.multiplexer, mux, &config.multiplexer_flags);
-                       if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
-                       config.multicast[port] = INPUT_SYSTEM_CSI_BACKEND;
+               // Check for conflicts on mux.
+               mux = INPUT_SYSTEM_MIPI_PORT0 + port;
+               status = input_system_multiplexer_cfg(&config.multiplexer, mux,
+                                                     &config.multiplexer_flags);
+               if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
+               config.multicast[port] = INPUT_SYSTEM_CSI_BACKEND;
 
-                       // Shared resource, so it should be blocked.
-                       //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
-                       //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
-                       //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+               // Shared resource, so it should be blocked.
+               //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+               //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+               //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
 
-                       break;
-               case INPUT_SYSTEM_SRAM_BUFFERING:
+               break;
+       case INPUT_SYSTEM_SRAM_BUFFERING:
 
-                       // Check for conflicts on mux.
-                       mux = INPUT_SYSTEM_ACQUISITION_UNIT;
-                       status = input_system_multiplexer_cfg(&config.multiplexer, mux, &config.multiplexer_flags);
-                       if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
-                       config.multicast[port] = INPUT_SYSTEM_INPUT_BUFFER;
+               // Check for conflicts on mux.
+               mux = INPUT_SYSTEM_ACQUISITION_UNIT;
+               status = input_system_multiplexer_cfg(&config.multiplexer, mux,
+                                                     &config.multiplexer_flags);
+               if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
+               config.multicast[port] = INPUT_SYSTEM_INPUT_BUFFER;
 
-                       // Shared resource, so it should be blocked.
-                       //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
-                       //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
-                       //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+               // Shared resource, so it should be blocked.
+               //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+               //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+               //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
 
-                       break;
-               case INPUT_SYSTEM_XMEM_BUFFERING:
+               break;
+       case INPUT_SYSTEM_XMEM_BUFFERING:
 
-                       // Check for conflicts on mux.
-                       mux = INPUT_SYSTEM_ACQUISITION_UNIT;
-                       status = input_system_multiplexer_cfg(&config.multiplexer, mux, &config.multiplexer_flags);
-                       if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
-                       config.multicast[port] = INPUT_SYSTEM_INPUT_BUFFER;
+               // Check for conflicts on mux.
+               mux = INPUT_SYSTEM_ACQUISITION_UNIT;
+               status = input_system_multiplexer_cfg(&config.multiplexer, mux,
+                                                     &config.multiplexer_flags);
+               if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
+               config.multicast[port] = INPUT_SYSTEM_INPUT_BUFFER;
 
-                       // Shared resource, so it should be blocked.
-                       //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
-                       //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
-                       //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+               // Shared resource, so it should be blocked.
+               //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+               //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+               //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
 
-                       break;
-               case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
-                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                       break;
-               case INPUT_SYSTEM_XMEM_CAPTURE:
-                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                       break;
-               case INPUT_SYSTEM_XMEM_ACQUIRE:
-                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                       break;
-               default:
-                       return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
-                       break;
+               break;
+       case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
+               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+               break;
+       case INPUT_SYSTEM_XMEM_CAPTURE:
+               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+               break;
+       case INPUT_SYSTEM_XMEM_ACQUIRE:
+               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+               break;
+       default:
+               return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+               break;
        }
        return INPUT_SYSTEM_ERR_NO_ERROR;
 }
 
 // Test flags and set structure.
 static input_system_error_t set_source_type(
-               input_system_source_t * const lhs,
-               const input_system_source_t                     rhs,
-               input_system_config_flags_t * const flags)
+    input_system_source_t *const lhs,
+    const input_system_source_t                        rhs,
+    input_system_config_flags_t *const flags)
 {
        // MW: Not enough asserts
        assert(lhs);
@@ -1697,9 +1747,9 @@ static input_system_error_t set_source_type(
 
 // Test flags and set structure.
 static input_system_error_t set_csi_cfg(
-               csi_cfg_t * const lhs,
-               const csi_cfg_t * const rhs,
-               input_system_config_flags_t * const flags)
+    csi_cfg_t *const lhs,
+    const csi_cfg_t *const rhs,
+    input_system_config_flags_t *const flags)
 {
        u32 memory_required;
        u32 acq_memory_required;
@@ -1716,12 +1766,12 @@ static input_system_error_t set_csi_cfg(
                // check for consistency with already set value.
                if (/*lhs->backend_ch == rhs.backend_ch
                        &&*/ lhs->buffering_mode == rhs->buffering_mode
-                       && lhs->csi_buffer.mem_reg_size == rhs->csi_buffer.mem_reg_size
-                       && lhs->csi_buffer.nof_mem_regs  == rhs->csi_buffer.nof_mem_regs
-                       && lhs->acquisition_buffer.mem_reg_size == rhs->acquisition_buffer.mem_reg_size
-                       && lhs->acquisition_buffer.nof_mem_regs  == rhs->acquisition_buffer.nof_mem_regs
-                       && lhs->nof_xmem_buffers  == rhs->nof_xmem_buffers
-                       ) {
+                   && lhs->csi_buffer.mem_reg_size == rhs->csi_buffer.mem_reg_size
+                   && lhs->csi_buffer.nof_mem_regs  == rhs->csi_buffer.nof_mem_regs
+                   && lhs->acquisition_buffer.mem_reg_size == rhs->acquisition_buffer.mem_reg_size
+                   && lhs->acquisition_buffer.nof_mem_regs  == rhs->acquisition_buffer.nof_mem_regs
+                   && lhs->nof_xmem_buffers  == rhs->nof_xmem_buffers
+               ) {
                        return INPUT_SYSTEM_ERR_NO_ERROR;
                } else {
                        *flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
@@ -1732,13 +1782,14 @@ static input_system_error_t set_csi_cfg(
        // no check for backend_ch
        // no check for nof_xmem_buffers
        memory_required = rhs->csi_buffer.mem_reg_size * rhs->csi_buffer.nof_mem_regs;
-       acq_memory_required = rhs->acquisition_buffer.mem_reg_size * rhs->acquisition_buffer.nof_mem_regs;
+       acq_memory_required = rhs->acquisition_buffer.mem_reg_size *
+                             rhs->acquisition_buffer.nof_mem_regs;
        if (rhs->buffering_mode >= N_INPUT_SYSTEM_BUFFERING_MODE
-               ||
-       // Check if required memory is available in input buffer (SRAM).
-               (memory_required + acq_memory_required) > config.unallocated_ib_mem_words
+           ||
+           // Check if required memory is available in input buffer (SRAM).
+           (memory_required + acq_memory_required) > config.unallocated_ib_mem_words
 
-               ) {
+          ) {
                *flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
                return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
        }
@@ -1751,7 +1802,7 @@ static input_system_error_t set_csi_cfg(
        lhs->csi_buffer.nof_mem_regs  = rhs->csi_buffer.nof_mem_regs;
        lhs->acquisition_buffer.mem_reg_size = rhs->acquisition_buffer.mem_reg_size;
        lhs->acquisition_buffer.nof_mem_regs  = rhs->acquisition_buffer.nof_mem_regs;
-    // ALX: NB: Here we just set buffer parameters, but still not allocate it
+       // ALX: NB: Here we just set buffer parameters, but still not allocate it
        // (no addresses determined). That will be done during commit.
 
        //  FIXIT:      acq_memory_required is not deducted, since it can be allocated multiple times.
@@ -1763,9 +1814,9 @@ static input_system_error_t set_csi_cfg(
 
 // Test flags and set structure.
 static input_system_error_t input_system_multiplexer_cfg(
-       input_system_multiplex_t * const lhs,
-       const input_system_multiplex_t          rhs,
-       input_system_config_flags_t * const flags)
+    input_system_multiplex_t *const lhs,
+    const input_system_multiplex_t             rhs,
+    input_system_config_flags_t *const flags)
 {
        assert(lhs);
        assert(flags);
index 7813cf79fef147a2e26110eb2f7faa99b4cbf30b..3c0e2efb08ae576ef93948abaef9f898b1ef05dc 100644 (file)
@@ -126,31 +126,42 @@ struct channel_cfg_s {
 
 // Complete configuration for input system.
 struct input_system_cfg2400_s {
-       input_system_source_t source_type;                              input_system_config_flags_t     source_type_flags;
+       input_system_source_t source_type;
+       input_system_config_flags_t     source_type_flags;
        //channel_cfg_t         channel[N_CHANNELS];
        input_system_config_flags_t     ch_flags[N_CHANNELS];
        //  This is the place where the buffers' settings are collected, as given.
-       csi_cfg_t                       csi_value[N_CSI_PORTS];         input_system_config_flags_t     csi_flags[N_CSI_PORTS];
+       csi_cfg_t                       csi_value[N_CSI_PORTS];
+       input_system_config_flags_t     csi_flags[N_CSI_PORTS];
 
        // Possible another struct for ib.
        // This buffers set at the end, based on the all configurations.
-       ib_buffer_t                     csi_buffer[N_CSI_PORTS];        input_system_config_flags_t     csi_buffer_flags[N_CSI_PORTS];
-       ib_buffer_t                     acquisition_buffer_unique;      input_system_config_flags_t     acquisition_buffer_unique_flags;
+       ib_buffer_t                     csi_buffer[N_CSI_PORTS];
+       input_system_config_flags_t     csi_buffer_flags[N_CSI_PORTS];
+       ib_buffer_t                     acquisition_buffer_unique;
+       input_system_config_flags_t     acquisition_buffer_unique_flags;
        u32                     unallocated_ib_mem_words; // Used for check.DEFAULT = IB_CAPACITY_IN_WORDS.
        //uint32_t                      acq_allocated_ib_mem_words;
 
        input_system_connection_t               multicast[N_CSI_PORTS];
-       input_system_multiplex_t                multiplexer;                                    input_system_config_flags_t             multiplexer_flags;
+       input_system_multiplex_t                multiplexer;
+       input_system_config_flags_t             multiplexer_flags;
 
-       tpg_cfg_t                       tpg_value;                      input_system_config_flags_t     tpg_flags;
-       prbs_cfg_t                      prbs_value;                     input_system_config_flags_t     prbs_flags;
-       gpfifo_cfg_t            gpfifo_value;           input_system_config_flags_t     gpfifo_flags;
+       tpg_cfg_t                       tpg_value;
+       input_system_config_flags_t     tpg_flags;
+       prbs_cfg_t                      prbs_value;
+       input_system_config_flags_t     prbs_flags;
+       gpfifo_cfg_t            gpfifo_value;
+       input_system_config_flags_t     gpfifo_flags;
 
        input_switch_cfg_t              input_switch_cfg;
 
-       target_isp_cfg_t                target_isp[N_CHANNELS]; input_system_config_flags_t     target_isp_flags[N_CHANNELS];
-       target_sp_cfg_t                 target_sp[N_CHANNELS];  input_system_config_flags_t     target_sp_flags[N_CHANNELS];
-       target_strm2mem_cfg_t   target_strm2mem[N_CHANNELS];    input_system_config_flags_t     target_strm2mem_flags[N_CHANNELS];
+       target_isp_cfg_t                target_isp[N_CHANNELS];
+       input_system_config_flags_t     target_isp_flags[N_CHANNELS];
+       target_sp_cfg_t                 target_sp[N_CHANNELS];
+       input_system_config_flags_t     target_sp_flags[N_CHANNELS];
+       target_strm2mem_cfg_t   target_strm2mem[N_CHANNELS];
+       input_system_config_flags_t     target_strm2mem_flags[N_CHANNELS];
 
        input_system_config_flags_t             session_flags;
 
@@ -326,7 +337,7 @@ typedef enum {
        RX_IRQ_INFO_ERR_SOT_SYNC     = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_SYNC_HS_BIT,
        RX_IRQ_INFO_ERR_CONTROL      = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_CONTROL_BIT,
        RX_IRQ_INFO_ERR_ECC_DOUBLE   = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_DOUBLE_BIT,
-/*     RX_IRQ_INFO_NO_ERR           = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_NO_CORRECTION_BIT, */
+       /*      RX_IRQ_INFO_NO_ERR           = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_NO_CORRECTION_BIT, */
        RX_IRQ_INFO_ERR_CRC          = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_CRC_BIT,
        RX_IRQ_INFO_ERR_UNKNOWN_ID   = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_ID_BIT,
        RX_IRQ_INFO_ERR_FRAME_SYNC   = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_FRAME_SYNC_BIT,
@@ -356,12 +367,14 @@ struct rx_cfg_s {
 static const hrt_address MIPI_PORT_OFFSET[N_MIPI_PORT_ID] = {
        0x00000000UL,
        0x00000100UL,
-       0x00000200UL};
+       0x00000200UL
+};
 
 static const mipi_lane_cfg_t MIPI_PORT_MAXLANES[N_MIPI_PORT_ID] = {
        MIPI_4LANE_CFG,
        MIPI_1LANE_CFG,
-       MIPI_2LANE_CFG};
+       MIPI_2LANE_CFG
+};
 
 static const bool MIPI_PORT_ACTIVE[N_RX_MODE][N_MIPI_PORT_ID] = {
        {true, true, false},
@@ -371,7 +384,8 @@ static const bool MIPI_PORT_ACTIVE[N_RX_MODE][N_MIPI_PORT_ID] = {
        {true, true, true},
        {true, true, true},
        {true, true, true},
-       {true, true, true}};
+       {true, true, true}
+};
 
 static const mipi_lane_cfg_t MIPI_PORT_LANES[N_RX_MODE][N_MIPI_PORT_ID] = {
        {MIPI_4LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG},
@@ -381,7 +395,8 @@ static const mipi_lane_cfg_t MIPI_PORT_LANES[N_RX_MODE][N_MIPI_PORT_ID] = {
        {MIPI_2LANE_CFG, MIPI_1LANE_CFG, MIPI_2LANE_CFG},
        {MIPI_3LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG},
        {MIPI_2LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG},
-       {MIPI_1LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG}};
+       {MIPI_1LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG}
+};
 
 static const hrt_address SUB_SYSTEM_OFFSET[N_SUB_SYSTEM_ID] = {
        0x00001000UL,
@@ -392,7 +407,8 @@ static const hrt_address SUB_SYSTEM_OFFSET[N_SUB_SYSTEM_ID] = {
        0x00009000UL,
        0x0000A000UL,
        0x0000B000UL,
-       0x0000C000UL};
+       0x0000C000UL
+};
 
 struct capture_unit_state_s {
        int     Packet_Length;
@@ -408,13 +424,13 @@ struct capture_unit_state_s {
        int     Start_Addr;
        int     Mem_Region_Size;
        int     Num_Mem_Regions;
-/*     int     Init;   write-only registers
-       int     Start;
-       int     Stop;      */
+       /*      int     Init;   write-only registers
+               int     Start;
+               int     Stop;      */
 };
 
 struct acquisition_unit_state_s {
-/*     int     Init;   write-only register */
+       /*      int     Init;   write-only register */
        int     Received_Short_Packets;
        int     Received_Long_Packets;
        int     Last_Command;
@@ -450,7 +466,7 @@ struct ctrl_unit_state_s {
        int     acq_start_addr;
        int     acq_mem_region_size;
        int     acq_num_mem_regions;
-/*     int     ctrl_init;  write only register */
+       /*      int     ctrl_init;  write only register */
        int     capt_reserve_one_mem_region;
 };
 
index 288b94fdf4caeaef5cf126c26e88343d75b721a9..0ce9cbc0063ea4caa75f74e0d34d02dad6300c18 100644 (file)
 #include "assert_support.h"
 
 STORAGE_CLASS_INPUT_SYSTEM_C void input_system_reg_store(
-       const input_system_ID_t                 ID,
-       const hrt_address                       reg,
-       const hrt_data                          value)
+    const input_system_ID_t                    ID,
+    const hrt_address                  reg,
+    const hrt_data                             value)
 {
        assert(ID < N_INPUT_SYSTEM_ID);
        assert(INPUT_SYSTEM_BASE[ID] != (hrt_address)-1);
-       ia_css_device_store_uint32(INPUT_SYSTEM_BASE[ID] + reg * sizeof(hrt_data), value);
+       ia_css_device_store_uint32(INPUT_SYSTEM_BASE[ID] + reg * sizeof(hrt_data),
+                                  value);
        return;
 }
 
 STORAGE_CLASS_INPUT_SYSTEM_C hrt_data input_system_reg_load(
-       const input_system_ID_t                 ID,
-       const hrt_address                       reg)
+    const input_system_ID_t                    ID,
+    const hrt_address                  reg)
 {
        assert(ID < N_INPUT_SYSTEM_ID);
        assert(INPUT_SYSTEM_BASE[ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(INPUT_SYSTEM_BASE[ID] + reg * sizeof(hrt_data));
+       return ia_css_device_load_uint32(INPUT_SYSTEM_BASE[ID] + reg * sizeof(
+                                            hrt_data));
 }
 
 STORAGE_CLASS_INPUT_SYSTEM_C void receiver_reg_store(
-       const rx_ID_t                           ID,
-       const hrt_address                       reg,
-       const hrt_data                          value)
+    const rx_ID_t                              ID,
+    const hrt_address                  reg,
+    const hrt_data                             value)
 {
        assert(ID < N_RX_ID);
        assert(RX_BASE[ID] != (hrt_address)-1);
@@ -53,8 +55,8 @@ STORAGE_CLASS_INPUT_SYSTEM_C void receiver_reg_store(
 }
 
 STORAGE_CLASS_INPUT_SYSTEM_C hrt_data receiver_reg_load(
-       const rx_ID_t                           ID,
-       const hrt_address                       reg)
+    const rx_ID_t                              ID,
+    const hrt_address                  reg)
 {
        assert(ID < N_RX_ID);
        assert(RX_BASE[ID] != (hrt_address)-1);
@@ -62,55 +64,59 @@ STORAGE_CLASS_INPUT_SYSTEM_C hrt_data receiver_reg_load(
 }
 
 STORAGE_CLASS_INPUT_SYSTEM_C void receiver_port_reg_store(
-       const rx_ID_t                           ID,
-       const enum mipi_port_id                 port_ID,
-       const hrt_address                       reg,
-       const hrt_data                          value)
+    const rx_ID_t                              ID,
+    const enum mipi_port_id                    port_ID,
+    const hrt_address                  reg,
+    const hrt_data                             value)
 {
        assert(ID < N_RX_ID);
        assert(port_ID < N_MIPI_PORT_ID);
        assert(RX_BASE[ID] != (hrt_address)-1);
        assert(MIPI_PORT_OFFSET[port_ID] != (hrt_address)-1);
-       ia_css_device_store_uint32(RX_BASE[ID] + MIPI_PORT_OFFSET[port_ID] + reg * sizeof(hrt_data), value);
+       ia_css_device_store_uint32(RX_BASE[ID] + MIPI_PORT_OFFSET[port_ID] + reg *
+                                  sizeof(hrt_data), value);
        return;
 }
 
 STORAGE_CLASS_INPUT_SYSTEM_C hrt_data receiver_port_reg_load(
-       const rx_ID_t                           ID,
-       const enum mipi_port_id                 port_ID,
-       const hrt_address                       reg)
+    const rx_ID_t                              ID,
+    const enum mipi_port_id                    port_ID,
+    const hrt_address                  reg)
 {
        assert(ID < N_RX_ID);
        assert(port_ID < N_MIPI_PORT_ID);
        assert(RX_BASE[ID] != (hrt_address)-1);
        assert(MIPI_PORT_OFFSET[port_ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(RX_BASE[ID] + MIPI_PORT_OFFSET[port_ID] + reg * sizeof(hrt_data));
+       return ia_css_device_load_uint32(RX_BASE[ID] + MIPI_PORT_OFFSET[port_ID] + reg *
+                                        sizeof(hrt_data));
 }
 
 STORAGE_CLASS_INPUT_SYSTEM_C void input_system_sub_system_reg_store(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_ID,
-       const hrt_address                       reg,
-       const hrt_data                          value)
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_ID,
+    const hrt_address                  reg,
+    const hrt_data                             value)
 {
        assert(ID < N_INPUT_SYSTEM_ID);
        assert(sub_ID < N_SUB_SYSTEM_ID);
        assert(INPUT_SYSTEM_BASE[ID] != (hrt_address)-1);
        assert(SUB_SYSTEM_OFFSET[sub_ID] != (hrt_address)-1);
-       ia_css_device_store_uint32(INPUT_SYSTEM_BASE[ID] + SUB_SYSTEM_OFFSET[sub_ID] + reg * sizeof(hrt_data), value);
+       ia_css_device_store_uint32(INPUT_SYSTEM_BASE[ID] + SUB_SYSTEM_OFFSET[sub_ID] +
+                                  reg * sizeof(hrt_data), value);
        return;
 }
 
 STORAGE_CLASS_INPUT_SYSTEM_C hrt_data input_system_sub_system_reg_load(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_ID,
-       const hrt_address                       reg)
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_ID,
+    const hrt_address                  reg)
 {
        assert(ID < N_INPUT_SYSTEM_ID);
        assert(sub_ID < N_SUB_SYSTEM_ID);
        assert(INPUT_SYSTEM_BASE[ID] != (hrt_address)-1);
        assert(SUB_SYSTEM_OFFSET[sub_ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(INPUT_SYSTEM_BASE[ID] + SUB_SYSTEM_OFFSET[sub_ID] + reg * sizeof(hrt_data));
+       return ia_css_device_load_uint32(INPUT_SYSTEM_BASE[ID] +
+                                        SUB_SYSTEM_OFFSET[sub_ID] + reg * sizeof(hrt_data));
 }
 
 #endif /* __INPUT_SYSTEM_PRIVATE_H_INCLUDED__ */
index 12efe29893f443a225b30a9cc102ae19a1e4d965..fdc99cc6eae4a7e2c7a8bde37341dc6a0df712f4 100644 (file)
 #include "platform_support.h"                  /* hrt_sleep() */
 
 static inline void irq_wait_for_write_complete(
-       const irq_ID_t          ID);
+    const irq_ID_t             ID);
 
 static inline bool any_irq_channel_enabled(
-       const irq_ID_t                          ID);
+    const irq_ID_t                             ID);
 
 static inline irq_ID_t virq_get_irq_id(
-       const virq_id_t         irq_ID,
-       unsigned int            *channel_ID);
+    const virq_id_t            irq_ID,
+    unsigned int               *channel_ID);
 
 #ifndef __INLINE_IRQ__
 #include "irq_private.h"
@@ -40,23 +40,26 @@ static unsigned short IRQ_N_CHANNEL[N_IRQ_ID] = {
        IRQ0_ID_N_CHANNEL,
        IRQ1_ID_N_CHANNEL,
        IRQ2_ID_N_CHANNEL,
-       IRQ3_ID_N_CHANNEL};
+       IRQ3_ID_N_CHANNEL
+};
 
 static unsigned short IRQ_N_ID_OFFSET[N_IRQ_ID + 1] = {
        IRQ0_ID_OFFSET,
        IRQ1_ID_OFFSET,
        IRQ2_ID_OFFSET,
        IRQ3_ID_OFFSET,
-       IRQ_END_OFFSET};
+       IRQ_END_OFFSET
+};
 
 static virq_id_t IRQ_NESTING_ID[N_IRQ_ID] = {
        N_virq_id,
        virq_ifmt,
        virq_isys,
-       virq_isel};
+       virq_isel
+};
 
 void irq_clear_all(
-       const irq_ID_t                          ID)
+    const irq_ID_t                             ID)
 {
        hrt_data        mask = 0xFFFFFFFF;
 
@@ -68,7 +71,7 @@ void irq_clear_all(
        }
 
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, mask);
+                     _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, mask);
        return;
 }
 
@@ -76,15 +79,15 @@ void irq_clear_all(
  * Do we want the user to be able to set the signalling method ?
  */
 void irq_enable_channel(
-       const irq_ID_t                          ID,
+    const irq_ID_t                             ID,
     const unsigned int                 irq_id)
 {
        unsigned int mask = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
+                                        _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
        unsigned int enable = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
+                                          _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
        unsigned int edge_in = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_EDGE_REG_IDX);
+                                           _HRT_IRQ_CONTROLLER_EDGE_REG_IDX);
        unsigned int me = 1U << irq_id;
 
        assert(ID < N_IRQ_ID);
@@ -94,23 +97,23 @@ void irq_enable_channel(
        enable |= me;
        edge_in |= me;  /* rising edge */
 
-/* to avoid mishaps configuration must follow the following order */
+       /* to avoid mishaps configuration must follow the following order */
 
-/* mask this interrupt */
+       /* mask this interrupt */
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask & ~me);
-/* rising edge at input */
+                     _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask & ~me);
+       /* rising edge at input */
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_EDGE_REG_IDX, edge_in);
-/* enable interrupt to output */
+                     _HRT_IRQ_CONTROLLER_EDGE_REG_IDX, edge_in);
+       /* enable interrupt to output */
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX, enable);
-/* clear current irq only */
+                     _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX, enable);
+       /* clear current irq only */
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, me);
-/* unmask interrupt from input */
+                     _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, me);
+       /* unmask interrupt from input */
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask);
+                     _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask);
 
        irq_wait_for_write_complete(ID);
 
@@ -118,8 +121,8 @@ void irq_enable_channel(
 }
 
 void irq_enable_pulse(
-       const irq_ID_t  ID,
-       bool                    pulse)
+    const irq_ID_t     ID,
+    bool                       pulse)
 {
        unsigned int edge_out = 0x0;
 
@@ -128,18 +131,18 @@ void irq_enable_pulse(
        }
        /* output is given as edge, not pulse */
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX, edge_out);
+                     _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX, edge_out);
        return;
 }
 
 void irq_disable_channel(
-       const irq_ID_t                          ID,
-       const unsigned int                      irq_id)
+    const irq_ID_t                             ID,
+    const unsigned int                 irq_id)
 {
        unsigned int mask = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
+                                        _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
        unsigned int enable = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
+                                          _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
        unsigned int me = 1U << irq_id;
 
        assert(ID < N_IRQ_ID);
@@ -148,15 +151,15 @@ void irq_disable_channel(
        mask &= ~me;
        enable &= ~me;
 
-/* enable interrupt to output */
+       /* enable interrupt to output */
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX, enable);
-/* unmask interrupt from input */
+                     _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX, enable);
+       /* unmask interrupt from input */
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask);
-/* clear current irq only */
+                     _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask);
+       /* clear current irq only */
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, me);
+                     _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, me);
 
        irq_wait_for_write_complete(ID);
 
@@ -164,18 +167,18 @@ void irq_disable_channel(
 }
 
 enum hrt_isp_css_irq_status irq_get_channel_id(
-       const irq_ID_t                          ID,
-       unsigned int                            *irq_id)
+    const irq_ID_t                             ID,
+    unsigned int                               *irq_id)
 {
        unsigned int irq_status = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+                                              _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
        unsigned int idx;
        enum hrt_isp_css_irq_status status = hrt_isp_css_irq_status_success;
 
        assert(ID < N_IRQ_ID);
        assert(irq_id);
 
-/* find the first irq bit */
+       /* find the first irq bit */
        for (idx = 0; idx < IRQ_N_CHANNEL[ID]; idx++) {
                if (irq_status & (1U << idx))
                        break;
@@ -183,12 +186,12 @@ enum hrt_isp_css_irq_status irq_get_channel_id(
        if (idx == IRQ_N_CHANNEL[ID])
                return hrt_isp_css_irq_status_error;
 
-/* now check whether there are more bits set */
+       /* now check whether there are more bits set */
        if (irq_status != (1U << idx))
                status = hrt_isp_css_irq_status_more_irqs;
 
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << idx);
+                     _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << idx);
 
        irq_wait_for_write_complete(ID);
 
@@ -200,11 +203,12 @@ enum hrt_isp_css_irq_status irq_get_channel_id(
 
 static const hrt_address IRQ_REQUEST_ADDR[N_IRQ_SW_CHANNEL_ID] = {
        _REG_GP_IRQ_REQUEST0_ADDR,
-       _REG_GP_IRQ_REQUEST1_ADDR};
+       _REG_GP_IRQ_REQUEST1_ADDR
+};
 
 void irq_raise(
-       const irq_ID_t                          ID,
-       const irq_sw_channel_id_t       irq_id)
+    const irq_ID_t                             ID,
+    const irq_sw_channel_id_t  irq_id)
 {
        hrt_address             addr;
 
@@ -215,45 +219,45 @@ void irq_raise(
        (void)ID;
 
        addr = IRQ_REQUEST_ADDR[irq_id];
-/* The SW IRQ pins are remapped to offset zero */
+       /* The SW IRQ pins are remapped to offset zero */
        gp_device_reg_store(GP_DEVICE0_ID,
-               (unsigned int)addr, 1);
+                           (unsigned int)addr, 1);
        gp_device_reg_store(GP_DEVICE0_ID,
-               (unsigned int)addr, 0);
+                           (unsigned int)addr, 0);
        return;
 }
 
 void irq_controller_get_state(
-       const irq_ID_t                          ID,
-       irq_controller_state_t          *state)
+    const irq_ID_t                             ID,
+    irq_controller_state_t             *state)
 {
        assert(ID < N_IRQ_ID);
        assert(state);
 
        state->irq_edge = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_EDGE_REG_IDX);
+                                      _HRT_IRQ_CONTROLLER_EDGE_REG_IDX);
        state->irq_mask = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
+                                      _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
        state->irq_status = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+                                        _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
        state->irq_enable = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
+                                        _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
        state->irq_level_not_pulse = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX);
+                                    _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX);
        return;
 }
 
 bool any_virq_signal(void)
 {
        unsigned int irq_status = irq_reg_load(IRQ0_ID,
-               _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+                                              _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
 
        return (irq_status != 0);
 }
 
 void cnd_virq_enable_channel(
-       const virq_id_t                         irq_ID,
-       const bool                                      en)
+    const virq_id_t                            irq_ID,
+    const bool                                 en)
 {
        irq_ID_t                i;
        unsigned int    channel_ID;
@@ -262,20 +266,20 @@ void cnd_virq_enable_channel(
        assert(ID < N_IRQ_ID);
 
        for (i = IRQ1_ID; i < N_IRQ_ID; i++) {
-       /* It is not allowed to enable the pin of a nested IRQ directly */
+               /* It is not allowed to enable the pin of a nested IRQ directly */
                assert(irq_ID != IRQ_NESTING_ID[i]);
        }
 
        if (en) {
                irq_enable_channel(ID, channel_ID);
                if (IRQ_NESTING_ID[ID] != N_virq_id) {
-/* Single level nesting, otherwise we'd need to recurse */
+                       /* Single level nesting, otherwise we'd need to recurse */
                        irq_enable_channel(IRQ0_ID, IRQ_NESTING_ID[ID]);
                }
        } else {
                irq_disable_channel(ID, channel_ID);
                if ((IRQ_NESTING_ID[ID] != N_virq_id) && !any_irq_channel_enabled(ID)) {
-/* Only disable the top if the nested ones are empty */
+                       /* Only disable the top if the nested ones are empty */
                        irq_disable_channel(IRQ0_ID, IRQ_NESTING_ID[ID]);
                }
        }
@@ -293,7 +297,7 @@ void virq_clear_all(void)
 }
 
 enum hrt_isp_css_irq_status virq_get_channel_signals(
-       virq_info_t                                     *irq_info)
+    virq_info_t                                        *irq_info)
 {
        enum hrt_isp_css_irq_status irq_status = hrt_isp_css_irq_status_error;
        irq_ID_t ID;
@@ -303,17 +307,17 @@ enum hrt_isp_css_irq_status virq_get_channel_signals(
        for (ID = (irq_ID_t)0 ; ID < N_IRQ_ID; ID++) {
                if (any_irq_channel_enabled(ID)) {
                        hrt_data        irq_data = irq_reg_load(ID,
-                               _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+                                                           _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
 
                        if (irq_data != 0) {
-/* The error condition is an IRQ pulse received with no IRQ status written */
+                               /* The error condition is an IRQ pulse received with no IRQ status written */
                                irq_status = hrt_isp_css_irq_status_success;
                        }
 
                        irq_info->irq_status_reg[ID] |= irq_data;
 
                        irq_reg_store(ID,
-                               _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, irq_data);
+                                     _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, irq_data);
 
                        irq_wait_for_write_complete(ID);
                }
@@ -323,30 +327,30 @@ enum hrt_isp_css_irq_status virq_get_channel_signals(
 }
 
 void virq_clear_info(
-       virq_info_t                                     *irq_info)
+    virq_info_t                                        *irq_info)
 {
        irq_ID_t ID;
 
        assert(irq_info);
 
        for (ID = (irq_ID_t)0 ; ID < N_IRQ_ID; ID++) {
-                       irq_info->irq_status_reg[ID] = 0;
+               irq_info->irq_status_reg[ID] = 0;
        }
        return;
 }
 
 enum hrt_isp_css_irq_status virq_get_channel_id(
-       virq_id_t                                       *irq_id)
+    virq_id_t                                  *irq_id)
 {
        unsigned int irq_status = irq_reg_load(IRQ0_ID,
-               _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+                                              _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
        unsigned int idx;
        enum hrt_isp_css_irq_status status = hrt_isp_css_irq_status_success;
        irq_ID_t ID;
 
        assert(irq_id);
 
-/* find the first irq bit on device 0 */
+       /* find the first irq bit on device 0 */
        for (idx = 0; idx < IRQ_N_CHANNEL[IRQ0_ID]; idx++) {
                if (irq_status & (1U << idx))
                        break;
@@ -356,23 +360,23 @@ enum hrt_isp_css_irq_status virq_get_channel_id(
                return hrt_isp_css_irq_status_error;
        }
 
-/* Check whether there are more bits set on device 0 */
+       /* Check whether there are more bits set on device 0 */
        if (irq_status != (1U << idx)) {
                status = hrt_isp_css_irq_status_more_irqs;
        }
 
-/* Check whether we have an IRQ on one of the nested devices */
+       /* Check whether we have an IRQ on one of the nested devices */
        for (ID = N_IRQ_ID - 1 ; ID > (irq_ID_t)0; ID--) {
                if (IRQ_NESTING_ID[ID] == (virq_id_t)idx) {
                        break;
                }
        }
 
-/* If we have a nested IRQ, load that state, discard the device 0 state */
+       /* If we have a nested IRQ, load that state, discard the device 0 state */
        if (ID != IRQ0_ID) {
                irq_status = irq_reg_load(ID,
-                       _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
-/* find the first irq bit on device "id" */
+                                         _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+               /* find the first irq bit on device "id" */
                for (idx = 0; idx < IRQ_N_CHANNEL[ID]; idx++) {
                        if (irq_status & (1U << idx))
                                break;
@@ -382,19 +386,19 @@ enum hrt_isp_css_irq_status virq_get_channel_id(
                        return hrt_isp_css_irq_status_error;
                }
 
-/* Alternatively check whether there are more bits set on this device */
+               /* Alternatively check whether there are more bits set on this device */
                if (irq_status != (1U << idx)) {
                        status = hrt_isp_css_irq_status_more_irqs;
                } else {
-/* If this device is empty, clear the state on device 0 */
+                       /* If this device is empty, clear the state on device 0 */
                        irq_reg_store(IRQ0_ID,
-                               _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << IRQ_NESTING_ID[ID]);
+                                     _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << IRQ_NESTING_ID[ID]);
                }
        } /* if (ID != IRQ0_ID) */
 
-/* Here we proceed to clear the IRQ on detected device, if no nested IRQ, this is device 0 */
+       /* Here we proceed to clear the IRQ on detected device, if no nested IRQ, this is device 0 */
        irq_reg_store(ID,
-               _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << idx);
+                     _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << idx);
 
        irq_wait_for_write_complete(ID);
 
@@ -406,30 +410,30 @@ enum hrt_isp_css_irq_status virq_get_channel_id(
 }
 
 static inline void irq_wait_for_write_complete(
-       const irq_ID_t          ID)
+    const irq_ID_t             ID)
 {
        assert(ID < N_IRQ_ID);
        assert(IRQ_BASE[ID] != (hrt_address)-1);
        (void)ia_css_device_load_uint32(IRQ_BASE[ID] +
-               _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX * sizeof(hrt_data));
+                                       _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX * sizeof(hrt_data));
 }
 
 static inline bool any_irq_channel_enabled(
-       const irq_ID_t                          ID)
+    const irq_ID_t                             ID)
 {
        hrt_data        en_reg;
 
        assert(ID < N_IRQ_ID);
 
        en_reg = irq_reg_load(ID,
-               _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
+                             _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
 
        return (en_reg != 0);
 }
 
 static inline irq_ID_t virq_get_irq_id(
-       const virq_id_t         irq_ID,
-       unsigned int            *channel_ID)
+    const virq_id_t            irq_ID,
+    unsigned int               *channel_ID)
 {
        irq_ID_t ID;
 
index db3cfcba5b817b51e3730f845ed68e4a9ef380d5..8a947aefd85192c044cb2a23f9175d6962a97e86 100644 (file)
@@ -22,9 +22,9 @@
 #include "assert_support.h"
 
 STORAGE_CLASS_IRQ_C void irq_reg_store(
-       const irq_ID_t          ID,
-       const unsigned int      reg,
-       const hrt_data          value)
+    const irq_ID_t             ID,
+    const unsigned int reg,
+    const hrt_data             value)
 {
        assert(ID < N_IRQ_ID);
        assert(IRQ_BASE[ID] != (hrt_address) - 1);
@@ -33,8 +33,8 @@ STORAGE_CLASS_IRQ_C void irq_reg_store(
 }
 
 STORAGE_CLASS_IRQ_C hrt_data irq_reg_load(
-       const irq_ID_t          ID,
-       const unsigned int      reg)
+    const irq_ID_t             ID,
+    const unsigned int reg)
 {
        assert(ID < N_IRQ_ID);
        assert(IRQ_BASE[ID] != (hrt_address) - 1);
index c8ef87d7c07ada72bab88e814ada350be11edd31..7de7d08f4757d5fa1f1c47fd3b09bc7873b146e4 100644 (file)
 #include "platform_support.h"                  /* hrt_sleep() */
 
 void cnd_isp_irq_enable(
-       const isp_ID_t          ID,
-       const bool              cnd)
+    const isp_ID_t             ID,
+    const bool         cnd)
 {
        if (cnd) {
                isp_ctrl_setbit(ID, ISP_IRQ_READY_REG, ISP_IRQ_READY_BIT);
-/* Enabling the IRQ immediately triggers an interrupt, clear it */
+               /* Enabling the IRQ immediately triggers an interrupt, clear it */
                isp_ctrl_setbit(ID, ISP_IRQ_CLEAR_REG, ISP_IRQ_CLEAR_BIT);
        } else {
                isp_ctrl_clearbit(ID, ISP_IRQ_READY_REG,
-                       ISP_IRQ_READY_BIT);
+                                 ISP_IRQ_READY_BIT);
        }
        return;
 }
 
 void isp_get_state(
-       const isp_ID_t          ID,
-       isp_state_t                     *state,
-       isp_stall_t                     *stall)
+    const isp_ID_t             ID,
+    isp_state_t                        *state,
+    isp_stall_t                        *stall)
 {
        hrt_data sc = isp_ctrl_load(ID, ISP_SC_REG);
 
@@ -60,40 +60,40 @@ void isp_get_state(
        state->is_sleeping = isp_ctrl_getbit(ID, ISP_SC_REG, ISP_SLEEPING_BIT);
        state->is_stalling = isp_ctrl_getbit(ID, ISP_SC_REG, ISP_STALLING_BIT);
        stall->stat_ctrl =
-               !isp_ctrl_getbit(ID, ISP_CTRL_SINK_REG, ISP_CTRL_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_CTRL_SINK_REG, ISP_CTRL_SINK_BIT);
        stall->pmem =
-               !isp_ctrl_getbit(ID, ISP_PMEM_SINK_REG, ISP_PMEM_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_PMEM_SINK_REG, ISP_PMEM_SINK_BIT);
        stall->dmem =
-               !isp_ctrl_getbit(ID, ISP_DMEM_SINK_REG, ISP_DMEM_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_DMEM_SINK_REG, ISP_DMEM_SINK_BIT);
        stall->vmem =
-               !isp_ctrl_getbit(ID, ISP_VMEM_SINK_REG, ISP_VMEM_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_VMEM_SINK_REG, ISP_VMEM_SINK_BIT);
        stall->fifo0 =
-               !isp_ctrl_getbit(ID, ISP_FIFO0_SINK_REG, ISP_FIFO0_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_FIFO0_SINK_REG, ISP_FIFO0_SINK_BIT);
        stall->fifo1 =
-               !isp_ctrl_getbit(ID, ISP_FIFO1_SINK_REG, ISP_FIFO1_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_FIFO1_SINK_REG, ISP_FIFO1_SINK_BIT);
        stall->fifo2 =
-               !isp_ctrl_getbit(ID, ISP_FIFO2_SINK_REG, ISP_FIFO2_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_FIFO2_SINK_REG, ISP_FIFO2_SINK_BIT);
        stall->fifo3 =
-               !isp_ctrl_getbit(ID, ISP_FIFO3_SINK_REG, ISP_FIFO3_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_FIFO3_SINK_REG, ISP_FIFO3_SINK_BIT);
        stall->fifo4 =
-               !isp_ctrl_getbit(ID, ISP_FIFO4_SINK_REG, ISP_FIFO4_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_FIFO4_SINK_REG, ISP_FIFO4_SINK_BIT);
        stall->fifo5 =
-               !isp_ctrl_getbit(ID, ISP_FIFO5_SINK_REG, ISP_FIFO5_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_FIFO5_SINK_REG, ISP_FIFO5_SINK_BIT);
        stall->fifo6 =
-               !isp_ctrl_getbit(ID, ISP_FIFO6_SINK_REG, ISP_FIFO6_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_FIFO6_SINK_REG, ISP_FIFO6_SINK_BIT);
        stall->vamem1 =
-               !isp_ctrl_getbit(ID, ISP_VAMEM1_SINK_REG, ISP_VAMEM1_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_VAMEM1_SINK_REG, ISP_VAMEM1_SINK_BIT);
        stall->vamem2 =
-               !isp_ctrl_getbit(ID, ISP_VAMEM2_SINK_REG, ISP_VAMEM2_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_VAMEM2_SINK_REG, ISP_VAMEM2_SINK_BIT);
        stall->vamem3 =
-               !isp_ctrl_getbit(ID, ISP_VAMEM3_SINK_REG, ISP_VAMEM3_SINK_BIT);
+           !isp_ctrl_getbit(ID, ISP_VAMEM3_SINK_REG, ISP_VAMEM3_SINK_BIT);
        stall->hmem =
-               !isp_ctrl_getbit(ID, ISP_HMEM_SINK_REG, ISP_HMEM_SINK_BIT);
-/*
-       stall->icache_master =
-               !isp_ctrl_getbit(ID, ISP_ICACHE_MT_SINK_REG,
-                       ISP_ICACHE_MT_SINK_BIT);
- */
+           !isp_ctrl_getbit(ID, ISP_HMEM_SINK_REG, ISP_HMEM_SINK_BIT);
+       /*
+               stall->icache_master =
+                       !isp_ctrl_getbit(ID, ISP_ICACHE_MT_SINK_REG,
+                               ISP_ICACHE_MT_SINK_BIT);
       */
        return;
 }
 
index 2ba39efc9d064e464dfced0fb5a701b219bd2111..a6ab10711255b37b53454d196b06c8500065f1ba 100644 (file)
@@ -27,9 +27,9 @@
 #include "type_support.h"
 
 STORAGE_CLASS_ISP_C void isp_ctrl_store(
-       const isp_ID_t          ID,
-       const unsigned int      reg,
-       const hrt_data          value)
+    const isp_ID_t             ID,
+    const unsigned int reg,
+    const hrt_data             value)
 {
        assert(ID < N_ISP_ID);
        assert(ISP_CTRL_BASE[ID] != (hrt_address) - 1);
@@ -42,8 +42,8 @@ STORAGE_CLASS_ISP_C void isp_ctrl_store(
 }
 
 STORAGE_CLASS_ISP_C hrt_data isp_ctrl_load(
-       const isp_ID_t          ID,
-       const unsigned int      reg)
+    const isp_ID_t             ID,
+    const unsigned int reg)
 {
        assert(ID < N_ISP_ID);
        assert(ISP_CTRL_BASE[ID] != (hrt_address) - 1);
@@ -55,9 +55,9 @@ STORAGE_CLASS_ISP_C hrt_data isp_ctrl_load(
 }
 
 STORAGE_CLASS_ISP_C bool isp_ctrl_getbit(
-       const isp_ID_t          ID,
-       const unsigned int      reg,
-       const unsigned int      bit)
+    const isp_ID_t             ID,
+    const unsigned int reg,
+    const unsigned int bit)
 {
        hrt_data val = isp_ctrl_load(ID, reg);
 
@@ -65,9 +65,9 @@ STORAGE_CLASS_ISP_C bool isp_ctrl_getbit(
 }
 
 STORAGE_CLASS_ISP_C void isp_ctrl_setbit(
-       const isp_ID_t          ID,
-       const unsigned int      reg,
-       const unsigned int      bit)
+    const isp_ID_t             ID,
+    const unsigned int reg,
+    const unsigned int bit)
 {
        hrt_data        data = isp_ctrl_load(ID, reg);
 
@@ -76,9 +76,9 @@ STORAGE_CLASS_ISP_C void isp_ctrl_setbit(
 }
 
 STORAGE_CLASS_ISP_C void isp_ctrl_clearbit(
-       const isp_ID_t          ID,
-       const unsigned int      reg,
-       const unsigned int      bit)
+    const isp_ID_t             ID,
+    const unsigned int reg,
+    const unsigned int bit)
 {
        hrt_data        data = isp_ctrl_load(ID, reg);
 
@@ -87,10 +87,10 @@ STORAGE_CLASS_ISP_C void isp_ctrl_clearbit(
 }
 
 STORAGE_CLASS_ISP_C void isp_dmem_store(
-       const isp_ID_t          ID,
-       unsigned int            addr,
-       const void              *data,
-       const size_t            size)
+    const isp_ID_t             ID,
+    unsigned int               addr,
+    const void         *data,
+    const size_t               size)
 {
        assert(ID < N_ISP_ID);
        assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
@@ -103,10 +103,10 @@ STORAGE_CLASS_ISP_C void isp_dmem_store(
 }
 
 STORAGE_CLASS_ISP_C void isp_dmem_load(
-       const isp_ID_t          ID,
-       const unsigned int      addr,
-       void                    *data,
-       const size_t            size)
+    const isp_ID_t             ID,
+    const unsigned int addr,
+    void                       *data,
+    const size_t               size)
 {
        assert(ID < N_ISP_ID);
        assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
@@ -119,9 +119,9 @@ STORAGE_CLASS_ISP_C void isp_dmem_load(
 }
 
 STORAGE_CLASS_ISP_C void isp_dmem_store_uint32(
-       const isp_ID_t          ID,
-       unsigned int            addr,
-       const uint32_t          data)
+    const isp_ID_t             ID,
+    unsigned int               addr,
+    const uint32_t             data)
 {
        assert(ID < N_ISP_ID);
        assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
@@ -135,8 +135,8 @@ STORAGE_CLASS_ISP_C void isp_dmem_store_uint32(
 }
 
 STORAGE_CLASS_ISP_C uint32_t isp_dmem_load_uint32(
-       const isp_ID_t          ID,
-       const unsigned int      addr)
+    const isp_ID_t             ID,
+    const unsigned int addr)
 {
        assert(ID < N_ISP_ID);
        assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
@@ -149,11 +149,11 @@ STORAGE_CLASS_ISP_C uint32_t isp_dmem_load_uint32(
 }
 
 STORAGE_CLASS_ISP_C uint32_t isp_2w_cat_1w(
-       const u16               x0,
-       const uint16_t          x1)
+    const u16          x0,
+    const uint16_t             x1)
 {
        u32 out = ((uint32_t)(x1 & HIVE_ISP_VMEM_MASK) << ISP_VMEM_ELEMBITS)
-               | (x0 & HIVE_ISP_VMEM_MASK);
+                 | (x0 & HIVE_ISP_VMEM_MASK);
        return out;
 }
 
index 32dd1f4411523e6ba4de446ed1fe4acc1bfc621f..a17b32b6d4146f20df0f0a640d346378067bbbdf 100644 (file)
 #include "mmu_device.h"
 
 void mmu_set_page_table_base_index(
-       const mmu_ID_t          ID,
-       const hrt_data          base_index)
+    const mmu_ID_t             ID,
+    const hrt_data             base_index)
 {
        mmu_reg_store(ID, _HRT_MMU_PAGE_TABLE_BASE_ADDRESS_REG_IDX, base_index);
        return;
 }
 
 hrt_data mmu_get_page_table_base_index(
-       const mmu_ID_t          ID)
+    const mmu_ID_t             ID)
 {
        return mmu_reg_load(ID, _HRT_MMU_PAGE_TABLE_BASE_ADDRESS_REG_IDX);
 }
 
 void mmu_invalidate_cache(
-       const mmu_ID_t          ID)
+    const mmu_ID_t             ID)
 {
        mmu_reg_store(ID, _HRT_MMU_INVALIDATE_TLB_REG_IDX, 1);
        return;
index 354b67dc738a008ff1c60a20d3ae2378e84f099e..f084b316e37309c0825873da5a1eef041483ed90 100644 (file)
 #include "assert_support.h"
 
 void cnd_sp_irq_enable(
-       const sp_ID_t           ID,
-       const bool              cnd)
+    const sp_ID_t              ID,
+    const bool         cnd)
 {
        if (cnd) {
                sp_ctrl_setbit(ID, SP_IRQ_READY_REG, SP_IRQ_READY_BIT);
-/* Enabling the IRQ immediately triggers an interrupt, clear it */
+               /* Enabling the IRQ immediately triggers an interrupt, clear it */
                sp_ctrl_setbit(ID, SP_IRQ_CLEAR_REG, SP_IRQ_CLEAR_BIT);
        } else {
                sp_ctrl_clearbit(ID, SP_IRQ_READY_REG, SP_IRQ_READY_BIT);
@@ -34,9 +34,9 @@ void cnd_sp_irq_enable(
 }
 
 void sp_get_state(
-       const sp_ID_t                   ID,
-       sp_state_t                              *state,
-       sp_stall_t                              *stall)
+    const sp_ID_t                      ID,
+    sp_state_t                         *state,
+    sp_stall_t                         *stall)
 {
        hrt_data sc = sp_ctrl_load(ID, SP_SC_REG);
 
@@ -50,32 +50,32 @@ void sp_get_state(
        state->is_sleeping = (sc & (1U << SP_SLEEPING_BIT)) != 0;
        state->is_stalling = (sc & (1U << SP_STALLING_BIT)) != 0;
        stall->fifo0 =
-               !sp_ctrl_getbit(ID, SP_FIFO0_SINK_REG, SP_FIFO0_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFO0_SINK_REG, SP_FIFO0_SINK_BIT);
        stall->fifo1 =
-               !sp_ctrl_getbit(ID, SP_FIFO1_SINK_REG, SP_FIFO1_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFO1_SINK_REG, SP_FIFO1_SINK_BIT);
        stall->fifo2 =
-               !sp_ctrl_getbit(ID, SP_FIFO2_SINK_REG, SP_FIFO2_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFO2_SINK_REG, SP_FIFO2_SINK_BIT);
        stall->fifo3 =
-               !sp_ctrl_getbit(ID, SP_FIFO3_SINK_REG, SP_FIFO3_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFO3_SINK_REG, SP_FIFO3_SINK_BIT);
        stall->fifo4 =
-               !sp_ctrl_getbit(ID, SP_FIFO4_SINK_REG, SP_FIFO4_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFO4_SINK_REG, SP_FIFO4_SINK_BIT);
        stall->fifo5 =
-               !sp_ctrl_getbit(ID, SP_FIFO5_SINK_REG, SP_FIFO5_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFO5_SINK_REG, SP_FIFO5_SINK_BIT);
        stall->fifo6 =
-               !sp_ctrl_getbit(ID, SP_FIFO6_SINK_REG, SP_FIFO6_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFO6_SINK_REG, SP_FIFO6_SINK_BIT);
        stall->fifo7 =
-               !sp_ctrl_getbit(ID, SP_FIFO7_SINK_REG, SP_FIFO7_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFO7_SINK_REG, SP_FIFO7_SINK_BIT);
        stall->fifo8 =
-               !sp_ctrl_getbit(ID, SP_FIFO8_SINK_REG, SP_FIFO8_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFO8_SINK_REG, SP_FIFO8_SINK_BIT);
        stall->fifo9 =
-               !sp_ctrl_getbit(ID, SP_FIFO9_SINK_REG, SP_FIFO9_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFO9_SINK_REG, SP_FIFO9_SINK_BIT);
        stall->fifoa =
-               !sp_ctrl_getbit(ID, SP_FIFOA_SINK_REG, SP_FIFOA_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_FIFOA_SINK_REG, SP_FIFOA_SINK_BIT);
        stall->dmem =
-               !sp_ctrl_getbit(ID, SP_DMEM_SINK_REG, SP_DMEM_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_DMEM_SINK_REG, SP_DMEM_SINK_BIT);
        stall->control_master =
-               !sp_ctrl_getbit(ID, SP_CTRL_MT_SINK_REG, SP_CTRL_MT_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_CTRL_MT_SINK_REG, SP_CTRL_MT_SINK_BIT);
        stall->icache_master =
-               !sp_ctrl_getbit(ID, SP_ICACHE_MT_SINK_REG,
-                       SP_ICACHE_MT_SINK_BIT);
+           !sp_ctrl_getbit(ID, SP_ICACHE_MT_SINK_REG,
+                           SP_ICACHE_MT_SINK_BIT);
 }
index 230cfcc5bfc9edf40d7c19a50b54472e1b0a4d4d..e3e24fac126e9d1a93d17a60427afd6baf883bd9 100644 (file)
@@ -22,9 +22,9 @@
 #include "assert_support.h"
 
 STORAGE_CLASS_SP_C void sp_ctrl_store(
-       const sp_ID_t           ID,
-       const hrt_address       reg,
-       const hrt_data          value)
+    const sp_ID_t              ID,
+    const hrt_address  reg,
+    const hrt_data             value)
 {
        assert(ID < N_SP_ID);
        assert(SP_CTRL_BASE[ID] != (hrt_address)-1);
@@ -33,8 +33,8 @@ STORAGE_CLASS_SP_C void sp_ctrl_store(
 }
 
 STORAGE_CLASS_SP_C hrt_data sp_ctrl_load(
-       const sp_ID_t           ID,
-       const hrt_address       reg)
+    const sp_ID_t              ID,
+    const hrt_address  reg)
 {
        assert(ID < N_SP_ID);
        assert(SP_CTRL_BASE[ID] != (hrt_address)-1);
@@ -42,9 +42,9 @@ STORAGE_CLASS_SP_C hrt_data sp_ctrl_load(
 }
 
 STORAGE_CLASS_SP_C bool sp_ctrl_getbit(
-       const sp_ID_t           ID,
-       const hrt_address       reg,
-       const unsigned int      bit)
+    const sp_ID_t              ID,
+    const hrt_address  reg,
+    const unsigned int bit)
 {
        hrt_data val = sp_ctrl_load(ID, reg);
 
@@ -52,9 +52,9 @@ STORAGE_CLASS_SP_C bool sp_ctrl_getbit(
 }
 
 STORAGE_CLASS_SP_C void sp_ctrl_setbit(
-       const sp_ID_t           ID,
-       const hrt_address       reg,
-       const unsigned int      bit)
+    const sp_ID_t              ID,
+    const hrt_address  reg,
+    const unsigned int bit)
 {
        hrt_data        data = sp_ctrl_load(ID, reg);
 
@@ -63,9 +63,9 @@ STORAGE_CLASS_SP_C void sp_ctrl_setbit(
 }
 
 STORAGE_CLASS_SP_C void sp_ctrl_clearbit(
-       const sp_ID_t           ID,
-       const hrt_address       reg,
-       const unsigned int      bit)
+    const sp_ID_t              ID,
+    const hrt_address  reg,
+    const unsigned int bit)
 {
        hrt_data        data = sp_ctrl_load(ID, reg);
 
@@ -74,10 +74,10 @@ STORAGE_CLASS_SP_C void sp_ctrl_clearbit(
 }
 
 STORAGE_CLASS_SP_C void sp_dmem_store(
-       const sp_ID_t           ID,
-       hrt_address             addr,
-       const void                      *data,
-       const size_t            size)
+    const sp_ID_t              ID,
+    hrt_address                addr,
+    const void                 *data,
+    const size_t               size)
 {
        assert(ID < N_SP_ID);
        assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
@@ -86,10 +86,10 @@ STORAGE_CLASS_SP_C void sp_dmem_store(
 }
 
 STORAGE_CLASS_SP_C void sp_dmem_load(
-       const sp_ID_t           ID,
-       const hrt_address       addr,
-       void                            *data,
-       const size_t            size)
+    const sp_ID_t              ID,
+    const hrt_address  addr,
+    void                               *data,
+    const size_t               size)
 {
        assert(ID < N_SP_ID);
        assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
@@ -98,9 +98,9 @@ STORAGE_CLASS_SP_C void sp_dmem_load(
 }
 
 STORAGE_CLASS_SP_C void sp_dmem_store_uint8(
-       const sp_ID_t           ID,
-       hrt_address             addr,
-       const uint8_t           data)
+    const sp_ID_t              ID,
+    hrt_address                addr,
+    const uint8_t              data)
 {
        assert(ID < N_SP_ID);
        assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
@@ -110,9 +110,9 @@ STORAGE_CLASS_SP_C void sp_dmem_store_uint8(
 }
 
 STORAGE_CLASS_SP_C void sp_dmem_store_uint16(
-       const sp_ID_t           ID,
-       hrt_address             addr,
-       const uint16_t          data)
+    const sp_ID_t              ID,
+    hrt_address                addr,
+    const uint16_t             data)
 {
        assert(ID < N_SP_ID);
        assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
@@ -122,9 +122,9 @@ STORAGE_CLASS_SP_C void sp_dmem_store_uint16(
 }
 
 STORAGE_CLASS_SP_C void sp_dmem_store_uint32(
-       const sp_ID_t           ID,
-       hrt_address             addr,
-       const uint32_t          data)
+    const sp_ID_t              ID,
+    hrt_address                addr,
+    const uint32_t             data)
 {
        assert(ID < N_SP_ID);
        assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
@@ -134,8 +134,8 @@ STORAGE_CLASS_SP_C void sp_dmem_store_uint32(
 }
 
 STORAGE_CLASS_SP_C uint8_t sp_dmem_load_uint8(
-       const sp_ID_t           ID,
-       const hrt_address       addr)
+    const sp_ID_t              ID,
+    const hrt_address  addr)
 {
        assert(ID < N_SP_ID);
        assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
@@ -144,8 +144,8 @@ STORAGE_CLASS_SP_C uint8_t sp_dmem_load_uint8(
 }
 
 STORAGE_CLASS_SP_C uint16_t sp_dmem_load_uint16(
-       const sp_ID_t           ID,
-       const hrt_address       addr)
+    const sp_ID_t              ID,
+    const hrt_address  addr)
 {
        assert(ID < N_SP_ID);
        assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
@@ -154,8 +154,8 @@ STORAGE_CLASS_SP_C uint16_t sp_dmem_load_uint16(
 }
 
 STORAGE_CLASS_SP_C uint32_t sp_dmem_load_uint32(
-       const sp_ID_t           ID,
-       const hrt_address       addr)
+    const sp_ID_t              ID,
+    const hrt_address  addr)
 {
        assert(ID < N_SP_ID);
        assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
index f1430c3df301094ef87df3750869de89dcef3258..914263d6bba5767bf8dc59b40dbfbe694ec492c4 100644 (file)
 
 /* DDR */
 static const hrt_address DDR_BASE[N_DDR_ID] = {
-       (hrt_address)0x0000000120000000ULL};
+       (hrt_address)0x0000000120000000ULL
+};
 
 /* ISP */
 static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
-       (hrt_address)0x0000000000020000ULL};
+       (hrt_address)0x0000000000020000ULL
+};
 
 static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
-       (hrt_address)0x0000000000200000ULL};
+       (hrt_address)0x0000000000200000ULL
+};
 
 static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
-       (hrt_address)0x0000000000100000ULL};
+       (hrt_address)0x0000000000100000ULL
+};
 
 static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
        (hrt_address)0x00000000001C0000ULL,
        (hrt_address)0x00000000001D0000ULL,
-       (hrt_address)0x00000000001E0000ULL};
+       (hrt_address)0x00000000001E0000ULL
+};
 
 static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
-       (hrt_address)0x00000000001F0000ULL};
+       (hrt_address)0x00000000001F0000ULL
+};
 
 /* SP */
 static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
-       (hrt_address)0x0000000000010000ULL};
+       (hrt_address)0x0000000000010000ULL
+};
 
 static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
-       (hrt_address)0x0000000000300000ULL};
+       (hrt_address)0x0000000000300000ULL
+};
 
 static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
-       (hrt_address)0x00000000000B0000ULL};
+       (hrt_address)0x00000000000B0000ULL
+};
 
 /* MMU */
 #if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
@@ -83,21 +92,24 @@ static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
  */
 static const hrt_address MMU_BASE[N_MMU_ID] = {
        (hrt_address)0x0000000000070000ULL,
-       (hrt_address)0x00000000000A0000ULL};
+       (hrt_address)0x00000000000A0000ULL
+};
 #else
 #error "system_local.h: SYSTEM must be one of {2400, 2401 }"
 #endif
 
 /* DMA */
 static const hrt_address DMA_BASE[N_DMA_ID] = {
-       (hrt_address)0x0000000000040000ULL};
+       (hrt_address)0x0000000000040000ULL
+};
 
 /* IRQ */
 static const hrt_address IRQ_BASE[N_IRQ_ID] = {
        (hrt_address)0x0000000000000500ULL,
        (hrt_address)0x0000000000030A00ULL,
        (hrt_address)0x000000000008C000ULL,
-       (hrt_address)0x0000000000090200ULL};
+       (hrt_address)0x0000000000090200ULL
+};
 /*
        (hrt_address)0x0000000000000500ULL};
  */
@@ -105,11 +117,13 @@ static const hrt_address IRQ_BASE[N_IRQ_ID] = {
 /* GDC */
 static const hrt_address GDC_BASE[N_GDC_ID] = {
        (hrt_address)0x0000000000050000ULL,
-       (hrt_address)0x0000000000060000ULL};
+       (hrt_address)0x0000000000060000ULL
+};
 
 /* FIFO_MONITOR (not a subset of GP_DEVICE) */
 static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
-       (hrt_address)0x0000000000000000ULL};
+       (hrt_address)0x0000000000000000ULL
+};
 
 /*
 static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
@@ -121,31 +135,36 @@ static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
 
 /* GP_DEVICE (single base for all separate GP_REG instances) */
 static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
-       (hrt_address)0x0000000000000000ULL};
+       (hrt_address)0x0000000000000000ULL
+};
 
 /*GP TIMER , all timer registers are inter-twined,
  * so, having multiple base addresses for
  * different timers does not help*/
 static const hrt_address GP_TIMER_BASE =
-       (hrt_address)0x0000000000000600ULL;
+    (hrt_address)0x0000000000000600ULL;
 /* GPIO */
 static const hrt_address GPIO_BASE[N_GPIO_ID] = {
-       (hrt_address)0x0000000000000400ULL};
+       (hrt_address)0x0000000000000400ULL
+};
 
 /* TIMED_CTRL */
 static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
-       (hrt_address)0x0000000000000100ULL};
+       (hrt_address)0x0000000000000100ULL
+};
 
 /* INPUT_FORMATTER */
 static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
        (hrt_address)0x0000000000030000ULL,
        (hrt_address)0x0000000000030200ULL,
        (hrt_address)0x0000000000030400ULL,
-       (hrt_address)0x0000000000030600ULL}; /* memcpy() */
+       (hrt_address)0x0000000000030600ULL
+}; /* memcpy() */
 
 /* INPUT_SYSTEM */
 static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
-       (hrt_address)0x0000000000080000ULL};
+       (hrt_address)0x0000000000080000ULL
+};
 /*     (hrt_address)0x0000000000081000ULL, */ /* capture A */
 /*     (hrt_address)0x0000000000082000ULL, */ /* capture B */
 /*     (hrt_address)0x0000000000083000ULL, */ /* capture C */
@@ -158,7 +177,8 @@ static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
 
 /* RX, the MIPI lane control regs start at offset 0 */
 static const hrt_address RX_BASE[N_RX_ID] = {
-       (hrt_address)0x0000000000080100ULL};
+       (hrt_address)0x0000000000080100ULL
+};
 
 #elif HRT_ADDRESS_WIDTH == 32
 
@@ -166,35 +186,44 @@ static const hrt_address RX_BASE[N_RX_ID] = {
 
 /* DDR : Attention, this value not defined in 32-bit */
 static const hrt_address DDR_BASE[N_DDR_ID] = {
-       (hrt_address)0x00000000UL};
+       (hrt_address)0x00000000UL
+};
 
 /* ISP */
 static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
-       (hrt_address)0x00020000UL};
+       (hrt_address)0x00020000UL
+};
 
 static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
-       (hrt_address)0x00200000UL};
+       (hrt_address)0x00200000UL
+};
 
 static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
-       (hrt_address)0x100000UL};
+       (hrt_address)0x100000UL
+};
 
 static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
        (hrt_address)0xffffffffUL,
        (hrt_address)0xffffffffUL,
-       (hrt_address)0xffffffffUL};
+       (hrt_address)0xffffffffUL
+};
 
 static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
-       (hrt_address)0xffffffffUL};
+       (hrt_address)0xffffffffUL
+};
 
 /* SP */
 static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
-       (hrt_address)0x00010000UL};
+       (hrt_address)0x00010000UL
+};
 
 static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
-       (hrt_address)0x00300000UL};
+       (hrt_address)0x00300000UL
+};
 
 static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
-       (hrt_address)0x000B0000UL};
+       (hrt_address)0x000B0000UL
+};
 
 /* MMU */
 #if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
@@ -204,21 +233,24 @@ static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
  */
 static const hrt_address MMU_BASE[N_MMU_ID] = {
        (hrt_address)0x00070000UL,
-       (hrt_address)0x000A0000UL};
+       (hrt_address)0x000A0000UL
+};
 #else
 #error "system_local.h: SYSTEM must be one of {2400, 2401 }"
 #endif
 
 /* DMA */
 static const hrt_address DMA_BASE[N_DMA_ID] = {
-       (hrt_address)0x00040000UL};
+       (hrt_address)0x00040000UL
+};
 
 /* IRQ */
 static const hrt_address IRQ_BASE[N_IRQ_ID] = {
        (hrt_address)0x00000500UL,
        (hrt_address)0x00030A00UL,
        (hrt_address)0x0008C000UL,
-       (hrt_address)0x00090200UL};
+       (hrt_address)0x00090200UL
+};
 /*
        (hrt_address)0x00000500UL};
  */
@@ -226,11 +258,13 @@ static const hrt_address IRQ_BASE[N_IRQ_ID] = {
 /* GDC */
 static const hrt_address GDC_BASE[N_GDC_ID] = {
        (hrt_address)0x00050000UL,
-       (hrt_address)0x00060000UL};
+       (hrt_address)0x00060000UL
+};
 
 /* FIFO_MONITOR (not a subset of GP_DEVICE) */
 static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
-       (hrt_address)0x00000000UL};
+       (hrt_address)0x00000000UL
+};
 
 /*
 static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
@@ -242,32 +276,37 @@ static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
 
 /* GP_DEVICE (single base for all separate GP_REG instances) */
 static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
-       (hrt_address)0x00000000UL};
+       (hrt_address)0x00000000UL
+};
 
 /*GP TIMER , all timer registers are inter-twined,
  * so, having multiple base addresses for
  * different timers does not help*/
 static const hrt_address GP_TIMER_BASE =
-       (hrt_address)0x00000600UL;
+    (hrt_address)0x00000600UL;
 
 /* GPIO */
 static const hrt_address GPIO_BASE[N_GPIO_ID] = {
-       (hrt_address)0x00000400UL};
+       (hrt_address)0x00000400UL
+};
 
 /* TIMED_CTRL */
 static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
-       (hrt_address)0x00000100UL};
+       (hrt_address)0x00000100UL
+};
 
 /* INPUT_FORMATTER */
 static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
        (hrt_address)0x00030000UL,
        (hrt_address)0x00030200UL,
-       (hrt_address)0x00030400UL};
+       (hrt_address)0x00030400UL
+};
 /*     (hrt_address)0x00030600UL, */ /* memcpy() */
 
 /* INPUT_SYSTEM */
 static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
-       (hrt_address)0x00080000UL};
+       (hrt_address)0x00080000UL
+};
 /*     (hrt_address)0x00081000UL, */ /* capture A */
 /*     (hrt_address)0x00082000UL, */ /* capture B */
 /*     (hrt_address)0x00083000UL, */ /* capture C */
@@ -280,7 +319,8 @@ static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
 
 /* RX, the MIPI lane control regs start at offset 0 */
 static const hrt_address RX_BASE[N_RX_ID] = {
-       (hrt_address)0x00080100UL};
+       (hrt_address)0x00080100UL
+};
 
 #else
 #error "system_local.h: HRT_ADDRESS_WIDTH must be one of {32,64}"
index 204ea6c0925d29d2471e206488e354b83e2acd2c..aaea743894437c2238116368e42d97710d7e7f50 100644 (file)
 #include "assert_support.h"
 
 void timed_ctrl_snd_commnd(
-       const timed_ctrl_ID_t                   ID,
-       hrt_data                                mask,
-       hrt_data                                condition,
-       hrt_data                                counter,
-       hrt_address                             addr,
-       hrt_data                                value)
+    const timed_ctrl_ID_t                      ID,
+    hrt_data                           mask,
+    hrt_data                           condition,
+    hrt_data                           counter,
+    hrt_address                                addr,
+    hrt_data                           value)
 {
        OP___assert(ID == TIMED_CTRL0_ID);
        OP___assert(TIMED_CTRL_BASE[ID] != (hrt_address)-1);
@@ -42,33 +42,33 @@ void timed_ctrl_snd_commnd(
        correct BASE address both for csim and android */
 
 void timed_ctrl_snd_sp_commnd(
-       const timed_ctrl_ID_t                   ID,
-       hrt_data                                mask,
-       hrt_data                                condition,
-       hrt_data                                counter,
-       const sp_ID_t                           SP_ID,
-       hrt_address                             offset,
-       hrt_data                                value)
+    const timed_ctrl_ID_t                      ID,
+    hrt_data                           mask,
+    hrt_data                           condition,
+    hrt_data                           counter,
+    const sp_ID_t                              SP_ID,
+    hrt_address                                offset,
+    hrt_data                           value)
 {
        OP___assert(SP_ID < N_SP_ID);
        OP___assert(SP_DMEM_BASE[SP_ID] != (hrt_address)-1);
 
        timed_ctrl_snd_commnd(ID, mask, condition, counter,
-                               SP_DMEM_BASE[SP_ID] + offset, value);
+                             SP_DMEM_BASE[SP_ID] + offset, value);
 }
 
 void timed_ctrl_snd_gpio_commnd(
-       const timed_ctrl_ID_t                   ID,
-       hrt_data                                mask,
-       hrt_data                                condition,
-       hrt_data                                counter,
-       const gpio_ID_t                         GPIO_ID,
-       hrt_address                             offset,
-       hrt_data                                value)
+    const timed_ctrl_ID_t                      ID,
+    hrt_data                           mask,
+    hrt_data                           condition,
+    hrt_data                           counter,
+    const gpio_ID_t                            GPIO_ID,
+    hrt_address                                offset,
+    hrt_data                           value)
 {
        OP___assert(GPIO_ID < N_GPIO_ID);
        OP___assert(GPIO_BASE[GPIO_ID] != (hrt_address)-1);
 
        timed_ctrl_snd_commnd(ID, mask, condition, counter,
-                               GPIO_BASE[GPIO_ID] + offset, value);
+                             GPIO_BASE[GPIO_ID] + offset, value);
 }
index ffa295c14f8f0132034387a9034cf32a797c423f..3c137badbd4399116c960eb7de78b57603979afd 100644 (file)
 #include "assert_support.h"
 
 STORAGE_CLASS_TIMED_CTRL_C void timed_ctrl_reg_store(
-       const timed_ctrl_ID_t   ID,
-       const unsigned int              reg,
-       const hrt_data                  value)
+    const timed_ctrl_ID_t      ID,
+    const unsigned int         reg,
+    const hrt_data                     value)
 {
-OP___assert(ID < N_TIMED_CTRL_ID);
-OP___assert(TIMED_CTRL_BASE[ID] != (hrt_address) - 1);
+       OP___assert(ID < N_TIMED_CTRL_ID);
+       OP___assert(TIMED_CTRL_BASE[ID] != (hrt_address) - 1);
        ia_css_device_store_uint32(TIMED_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
 }
 
index 1536cfbabd3923c292bda1c59a01517d0f941413..78a607bb4e713f6d7bb254f980d174fb0ee69171 100644 (file)
 #include "assert_support.h"
 
 STORAGE_CLASS_ISP_C void isp_vamem_store(
-       const vamem_ID_t        ID,
-       vamem_data_t            *addr,
-       const vamem_data_t      *data,
-       const size_t            size) /* in vamem_data_t */
+    const vamem_ID_t   ID,
+    vamem_data_t               *addr,
+    const vamem_data_t *data,
+    const size_t               size) /* in vamem_data_t */
 {
        assert(ID < N_VAMEM_ID);
        assert(ISP_VAMEM_BASE[ID] != (hrt_address) - 1);
-       hrt_master_port_store(ISP_VAMEM_BASE[ID] + (unsigned int)addr, data, size * sizeof(vamem_data_t));
+       hrt_master_port_store(ISP_VAMEM_BASE[ID] + (unsigned int)addr, data,
+                             size * sizeof(vamem_data_t));
 }
 
 #endif /* __VAMEM_PRIVATE_H_INCLUDED__ */
index 728f9d6072a6326090d52124cfba1c8f4a986096..0c6830ae734441110ec38e3639ab83552c650074 100644 (file)
@@ -23,7 +23,7 @@
 #include "platform_support.h"                  /* hrt_sleep() */
 
 typedef unsigned long long hive_uedge;
-typedef hive_uedge * hive_wide;
+typedef hive_uedge *hive_wide;
 
 /* Copied from SDK: sim_semantics.c */
 
@@ -40,11 +40,11 @@ typedef hive_uedge * hive_wide;
 
 static void
 move_subword(
-       hive_uedge *target,
-       unsigned int target_bit,
-       hive_uedge src,
-       unsigned int src_start,
-       unsigned int src_end)
+    hive_uedge *target,
+    unsigned int target_bit,
+    hive_uedge src,
+    unsigned int src_start,
+    unsigned int src_end)
 {
        unsigned int start_elem = target_bit / uedge_bits;
        unsigned int start_bit  = target_bit % uedge_bits;
@@ -57,10 +57,12 @@ move_subword(
                hive_uedge old_val0 = INV_SUBWORD(target[start_elem], start_bit, uedge_bits);
 
                target[start_elem] = old_val0 | (src_subword << start_bit);
-               old_val1 = INV_SUBWORD(target[start_elem + 1], 0, subword_width + start_bit - uedge_bits);
+               old_val1 = INV_SUBWORD(target[start_elem + 1], 0,
+                                      subword_width + start_bit - uedge_bits);
                target[start_elem + 1] = old_val1 | (src_subword >> (uedge_bits - start_bit));
        } else {
-               hive_uedge old_val = INV_SUBWORD(target[start_elem], start_bit, start_bit + subword_width);
+               hive_uedge old_val = INV_SUBWORD(target[start_elem], start_bit,
+                                                start_bit + subword_width);
 
                target[start_elem] = old_val | (src_subword << start_bit);
        }
@@ -68,10 +70,10 @@ move_subword(
 
 static void
 hive_sim_wide_unpack(
-       hive_wide vector,
-       hive_wide elem,
-       hive_uint elem_bits,
-       hive_uint index)
+    hive_wide vector,
+    hive_wide elem,
+    hive_uint elem_bits,
+    hive_uint index)
 {
        /* pointers into wide_type: */
        unsigned int start_elem = (elem_bits * index) / uedge_bits;
@@ -102,10 +104,10 @@ hive_sim_wide_unpack(
 
 static void
 hive_sim_wide_pack(
-       hive_wide vector,
-       hive_wide elem,
-       hive_uint elem_bits,
-       hive_uint index)
+    hive_wide vector,
+    hive_wide elem,
+    hive_uint elem_bits,
+    hive_uint index)
 {
        /* pointers into wide_type: */
        unsigned int start_elem = (elem_bits * index) / uedge_bits;
@@ -118,7 +120,8 @@ hive_sim_wide_pack(
                unsigned int start_bit = elem_bits * index;
                unsigned int i = 0;
 
-               for (; bits_to_write > uedge_bits; bits_to_write -= uedge_bits, i++, start_bit += uedge_bits) {
+               for (; bits_to_write > uedge_bits;
+                    bits_to_write -= uedge_bits, i++, start_bit += uedge_bits) {
                        move_word(vector, start_bit, elem[i]);
                }
                move_lower_bits(vector, start_bit, elem[i], bits_to_write);
@@ -129,9 +132,9 @@ hive_sim_wide_pack(
 }
 
 static void load_vector(
-       const isp_ID_t          ID,
-       t_vmem_elem             *to,
-       const t_vmem_elem       *from)
+    const isp_ID_t             ID,
+    t_vmem_elem                *to,
+    const t_vmem_elem  *from)
 {
        unsigned int i;
        hive_uedge *data;
@@ -155,9 +158,9 @@ static void load_vector(
 }
 
 static void store_vector(
-       const isp_ID_t          ID,
-       t_vmem_elem             *to,
-       const t_vmem_elem       *from)
+    const isp_ID_t             ID,
+    t_vmem_elem                *to,
+    const t_vmem_elem  *from)
 {
        unsigned int i;
        unsigned int size = sizeof(short) * ISP_NWAY;
@@ -180,10 +183,10 @@ static void store_vector(
 }
 
 void isp_vmem_load(
-       const isp_ID_t          ID,
-       const t_vmem_elem       *from,
-       t_vmem_elem             *to,
-       unsigned int elems) /* In t_vmem_elem */
+    const isp_ID_t             ID,
+    const t_vmem_elem  *from,
+    t_vmem_elem                *to,
+    unsigned int elems) /* In t_vmem_elem */
 {
        unsigned int c;
        const t_vmem_elem *vp = from;
@@ -198,10 +201,10 @@ void isp_vmem_load(
 }
 
 void isp_vmem_store(
-       const isp_ID_t          ID,
-       t_vmem_elem             *to,
-       const t_vmem_elem       *from,
-       unsigned int elems) /* In t_vmem_elem */
+    const isp_ID_t             ID,
+    t_vmem_elem                *to,
+    const t_vmem_elem  *from,
+    unsigned int elems) /* In t_vmem_elem */
 {
        unsigned int c;
        t_vmem_elem *vp = to;
@@ -216,14 +219,14 @@ void isp_vmem_store(
 }
 
 void isp_vmem_2d_load(
-       const isp_ID_t          ID,
-       const t_vmem_elem       *from,
-       t_vmem_elem             *to,
-       unsigned int height,
-       unsigned int width,
-       unsigned int stride_to,  /* In t_vmem_elem */
-
-       unsigned stride_from /* In t_vmem_elem */)
+    const isp_ID_t             ID,
+    const t_vmem_elem  *from,
+    t_vmem_elem                *to,
+    unsigned int height,
+    unsigned int width,
+    unsigned int stride_to,  /* In t_vmem_elem */
+
+    unsigned stride_from /* In t_vmem_elem */)
 {
        unsigned int h;
 
@@ -239,19 +242,20 @@ void isp_vmem_2d_load(
                        load_vector(ID, &to[stride_to * h + c], vp);
                        vp = (t_vmem_elem *)((char *)vp + ISP_VEC_ALIGN);
                }
-               from = (const t_vmem_elem *)((const char *)from + stride_from / ISP_NWAY * ISP_VEC_ALIGN);
+               from = (const t_vmem_elem *)((const char *)from + stride_from / ISP_NWAY *
+                                            ISP_VEC_ALIGN);
        }
 }
 
 void isp_vmem_2d_store(
-       const isp_ID_t          ID,
-       t_vmem_elem             *to,
-       const t_vmem_elem       *from,
-       unsigned int height,
-       unsigned int width,
-       unsigned int stride_to,  /* In t_vmem_elem */
-
-       unsigned stride_from /* In t_vmem_elem */)
+    const isp_ID_t             ID,
+    t_vmem_elem                *to,
+    const t_vmem_elem  *from,
+    unsigned int height,
+    unsigned int width,
+    unsigned int stride_to,  /* In t_vmem_elem */
+
+    unsigned stride_from /* In t_vmem_elem */)
 {
        unsigned int h;
 
index 25043677448dc4dcf44cbf84c0b78ca40aa91a94..a42cce42f29d15448cb4f04c75da3135bb1b9250 100644 (file)
@@ -23,35 +23,35 @@ typedef u16 t_vmem_elem;
 #define VMEM_ARRAY(x, s)    t_vmem_elem x[s / ISP_NWAY][ISP_NWAY]
 
 void isp_vmem_load(
-       const isp_ID_t          ID,
-       const t_vmem_elem       *from,
-       t_vmem_elem             *to,
-       unsigned int elems); /* In t_vmem_elem */
+    const isp_ID_t             ID,
+    const t_vmem_elem  *from,
+    t_vmem_elem                *to,
+    unsigned int elems); /* In t_vmem_elem */
 
 void isp_vmem_store(
-       const isp_ID_t          ID,
-       t_vmem_elem             *to,
-       const t_vmem_elem       *from,
-       unsigned int elems); /* In t_vmem_elem */
+    const isp_ID_t             ID,
+    t_vmem_elem                *to,
+    const t_vmem_elem  *from,
+    unsigned int elems); /* In t_vmem_elem */
 
 void isp_vmem_2d_load(
-       const isp_ID_t          ID,
-       const t_vmem_elem       *from,
-       t_vmem_elem             *to,
-       unsigned int height,
-       unsigned int width,
-       unsigned int stride_to,  /* In t_vmem_elem */
+    const isp_ID_t             ID,
+    const t_vmem_elem  *from,
+    t_vmem_elem                *to,
+    unsigned int height,
+    unsigned int width,
+    unsigned int stride_to,  /* In t_vmem_elem */
 
-       unsigned                stride_from /* In t_vmem_elem */);
+    unsigned           stride_from /* In t_vmem_elem */);
 
 void isp_vmem_2d_store(
-       const isp_ID_t          ID,
-       t_vmem_elem             *to,
-       const t_vmem_elem       *from,
-       unsigned int height,
-       unsigned int width,
-       unsigned int stride_to,  /* In t_vmem_elem */
-
-       unsigned                stride_from /* In t_vmem_elem */);
+    const isp_ID_t             ID,
+    t_vmem_elem                *to,
+    const t_vmem_elem  *from,
+    unsigned int height,
+    unsigned int width,
+    unsigned int stride_to,  /* In t_vmem_elem */
+
+    unsigned           stride_from /* In t_vmem_elem */);
 
 #endif /* __VMEM_LOCAL_H_INCLUDED__ */
index b443b58f96089e773856ebf5b3d5f3aba4ece980..759141c9310a6eaf4953ac8b73e2aada2bbd1bd0 100644 (file)
@@ -134,7 +134,7 @@ typedef struct ib_buffer_s  ib_buffer_t;
 
 struct csi_cfg_s {
        u32                     csi_port;
-    buffering_mode_t   buffering_mode;
+       buffering_mode_t        buffering_mode;
        ib_buffer_t                     csi_buffer;
        ib_buffer_t                     acquisition_buffer;
        u32                     nof_xmem_buffers;
index 369856363b5bbbfccb9cf5ba04595b8c100c1d0f..7867cd137f3fe4d2d864ec0a74a74b73696f4393 100644 (file)
@@ -22,7 +22,7 @@
 #define VMEM_ALIGN     ISP_VMEM_ALIGN
 
 #ifndef PIPE_GENERATION
-typedef tvector * pvector;
+typedef tvector *pvector;
 #endif
 
 #endif /* __VMEM_GLOBAL_H_INCLUDED__ */
index 038cf3cf7c607b6fcaf35bd8f08a4d1234ad4aeb..0a86b1fbd27b3df1db7b24672a001c7594f7cbf7 100644 (file)
@@ -76,7 +76,7 @@ typedef       hrt_address             sys_address;
  \return none,
  */
 void device_set_base_address(
-       const sys_address               base_addr);
+    const sys_address          base_addr);
 
 /*! Get the (sub)system base address
 
@@ -91,7 +91,7 @@ sys_address device_get_base_address(void);
  \return device[addr]
  */
 uint8_t ia_css_device_load_uint8(
-       const hrt_address               addr);
+    const hrt_address          addr);
 
 /*! Read a 16-bit value from a device register or memory in the device
 
@@ -100,7 +100,7 @@ uint8_t ia_css_device_load_uint8(
  \return device[addr]
  */
 uint16_t ia_css_device_load_uint16(
-       const hrt_address               addr);
+    const hrt_address          addr);
 
 /*! Read a 32-bit value from a device register or memory in the device
 
@@ -109,7 +109,7 @@ uint16_t ia_css_device_load_uint16(
  \return device[addr]
  */
 uint32_t ia_css_device_load_uint32(
-       const hrt_address               addr);
+    const hrt_address          addr);
 
 /*! Read a 64-bit value from a device register or memory in the device
 
@@ -118,7 +118,7 @@ uint32_t ia_css_device_load_uint32(
  \return device[addr]
  */
 uint64_t ia_css_device_load_uint64(
-       const hrt_address               addr);
+    const hrt_address          addr);
 
 /*! Write an 8-bit value to a device register or memory in the device
 
@@ -128,8 +128,8 @@ uint64_t ia_css_device_load_uint64(
  \return none, device[addr] = value
  */
 void ia_css_device_store_uint8(
-       const hrt_address               addr,
-       const uint8_t                   data);
+    const hrt_address          addr,
+    const uint8_t                      data);
 
 /*! Write a 16-bit value to a device register or memory in the device
 
@@ -139,8 +139,8 @@ void ia_css_device_store_uint8(
  \return none, device[addr] = value
  */
 void ia_css_device_store_uint16(
-       const hrt_address               addr,
-       const uint16_t                  data);
+    const hrt_address          addr,
+    const uint16_t                     data);
 
 /*! Write a 32-bit value to a device register or memory in the device
 
@@ -150,8 +150,8 @@ void ia_css_device_store_uint16(
  \return none, device[addr] = value
  */
 void ia_css_device_store_uint32(
-       const hrt_address               addr,
-       const uint32_t                  data);
+    const hrt_address          addr,
+    const uint32_t                     data);
 
 /*! Write a 64-bit value to a device register or memory in the device
 
@@ -161,8 +161,8 @@ void ia_css_device_store_uint32(
  \return none, device[addr] = value
  */
 void ia_css_device_store_uint64(
-       const hrt_address               addr,
-       const uint64_t                  data);
+    const hrt_address          addr,
+    const uint64_t                     data);
 
 /*! Read an array of bytes from device registers or memory in the device
 
@@ -173,9 +173,9 @@ void ia_css_device_store_uint64(
  \return none
  */
 void ia_css_device_load(
-       const hrt_address               addr,
-       void                                    *data,
-       const size_t                    size);
+    const hrt_address          addr,
+    void                                       *data,
+    const size_t                       size);
 
 /*! Write an array of bytes to device registers or memory in the device
 
@@ -186,8 +186,8 @@ void ia_css_device_load(
  \return none
  */
 void ia_css_device_store(
-       const hrt_address               addr,
-       const void                              *data,
-       const size_t                    size);
+    const hrt_address          addr,
+    const void                         *data,
+    const size_t                       size);
 
 #endif /* __DEVICE_ACCESS_H_INCLUDED__ */
index 63b3c2acc68799e5e6208d0a65b33690b30ed21f..f7cd4d7b96e5a0172b9dbe3d04f0963d94c70fc7 100644 (file)
@@ -29,8 +29,8 @@
  * @param[out] state   Point to the register-state.
  */
 void csi_rx_fe_ctrl_get_state(
-               const csi_rx_frontend_ID_t ID,
-               csi_rx_fe_ctrl_state_t *state);
+    const csi_rx_frontend_ID_t ID,
+    csi_rx_fe_ctrl_state_t *state);
 /**
  * @brief Dump the csi rx frontend state.
  * Dump the state of the csi rx frontend regiester-set.
@@ -39,8 +39,8 @@ void csi_rx_fe_ctrl_get_state(
  * @param[in]  state   Point to the register-state.
  */
 void csi_rx_fe_ctrl_dump_state(
-               const csi_rx_frontend_ID_t ID,
-               csi_rx_fe_ctrl_state_t *state);
+    const csi_rx_frontend_ID_t ID,
+    csi_rx_fe_ctrl_state_t *state);
 /**
  * @brief Get the state of the csi rx fe dlane.
  * Get the state of the register set per dlane process.
@@ -50,9 +50,9 @@ void csi_rx_fe_ctrl_dump_state(
  * @param[out] state           Point to the dlane state.
  */
 void csi_rx_fe_ctrl_get_dlane_state(
-               const csi_rx_frontend_ID_t ID,
-               const u32 lane,
-               csi_rx_fe_ctrl_lane_t *dlane_state);
+    const csi_rx_frontend_ID_t ID,
+    const u32 lane,
+    csi_rx_fe_ctrl_lane_t *dlane_state);
 /**
  * @brief Get the csi rx backend state.
  * Get the state of the csi rx backend regiester-set.
@@ -61,8 +61,8 @@ void csi_rx_fe_ctrl_get_dlane_state(
  * @param[out] state   Point to the register-state.
  */
 void csi_rx_be_ctrl_get_state(
-               const csi_rx_backend_ID_t ID,
-               csi_rx_be_ctrl_state_t *state);
+    const csi_rx_backend_ID_t ID,
+    csi_rx_be_ctrl_state_t *state);
 /**
  * @brief Dump the csi rx backend state.
  * Dump the state of the csi rx backend regiester-set.
@@ -71,8 +71,8 @@ void csi_rx_be_ctrl_get_state(
  * @param[in]  state   Point to the register-state.
  */
 void csi_rx_be_ctrl_dump_state(
-               const csi_rx_backend_ID_t ID,
-               csi_rx_be_ctrl_state_t *state);
+    const csi_rx_backend_ID_t ID,
+    csi_rx_be_ctrl_state_t *state);
 /* end of NCI */
 
 /*****************************************************
@@ -90,8 +90,8 @@ void csi_rx_be_ctrl_dump_state(
  * @return the value of the register.
  */
 hrt_data csi_rx_fe_ctrl_reg_load(
-       const csi_rx_frontend_ID_t ID,
-       const hrt_address reg);
+    const csi_rx_frontend_ID_t ID,
+    const hrt_address reg);
 /**
  * @brief Store a value to the register.
  * Store a value to the registe of the csi rx fe.
@@ -102,9 +102,9 @@ hrt_data csi_rx_fe_ctrl_reg_load(
  *
  */
 void csi_rx_fe_ctrl_reg_store(
-       const csi_rx_frontend_ID_t ID,
-       const hrt_address reg,
-       const hrt_data value);
+    const csi_rx_frontend_ID_t ID,
+    const hrt_address reg,
+    const hrt_data value);
 /**
  * @brief Load the register value.
  * Load the value of the register of the csirx be.
@@ -115,8 +115,8 @@ void csi_rx_fe_ctrl_reg_store(
  * @return the value of the register.
  */
 hrt_data csi_rx_be_ctrl_reg_load(
-       const csi_rx_backend_ID_t ID,
-       const hrt_address reg);
+    const csi_rx_backend_ID_t ID,
+    const hrt_address reg);
 /**
  * @brief Store a value to the register.
  * Store a value to the registe of the csi rx be.
@@ -127,9 +127,9 @@ hrt_data csi_rx_be_ctrl_reg_load(
  *
  */
 void csi_rx_be_ctrl_reg_store(
-       const csi_rx_backend_ID_t ID,
-       const hrt_address reg,
-       const hrt_data value);
+    const csi_rx_backend_ID_t ID,
+    const hrt_address reg,
+    const hrt_data value);
 /* end of DLI */
 #endif /* USE_INPUT_SYSTEM_VERSION_2401 */
 #endif /* __CSI_RX_PUBLIC_H_INCLUDED__ */
index 450f4400fd493ff3deb8c44783043e7326bfb967..79a8446658ee3bc193e110e8a0c7ae956d70d696 100644 (file)
@@ -79,20 +79,20 @@ STORAGE_CLASS_DEBUG_H void debug_synch_queue_ddr(void);
  \return none
  */
 void debug_buffer_init(
-       const hrt_address               addr);
+    const hrt_address          addr);
 
 /*! Set the offset/address of the (remote) debug buffer
 
  \return none
  */
 void debug_buffer_ddr_init(
-       const hrt_vaddress              addr);
+    const hrt_vaddress         addr);
 
 /*! Set the (remote) operating mode of the debug buffer
 
  \return none
  */
 void debug_buffer_setmode(
-       const debug_buf_mode_t  mode);
+    const debug_buf_mode_t     mode);
 
 #endif /* __DEBUG_PUBLIC_H_INCLUDED__ */
index 834e5dfc5ce07dcd9f0276ab61386162e88c36c9..385b978b703b6afe6ef1f60d429fac9d078904f9 100644 (file)
@@ -27,8 +27,8 @@ typedef struct dma_state_s            dma_state_t;
  \return none, state = DMA[ID].state
  */
 void dma_get_state(
-       const dma_ID_t          ID,
-       dma_state_t                     *state);
+    const dma_ID_t             ID,
+    dma_state_t                        *state);
 
 /*! Write to a control register of DMA[ID]
 
@@ -39,9 +39,9 @@ void dma_get_state(
  \return none, DMA[ID].ctrl[reg] = value
  */
 STORAGE_CLASS_DMA_H void dma_reg_store(
-       const dma_ID_t          ID,
-       const unsigned int      reg,
-       const hrt_data          value);
+    const dma_ID_t             ID,
+    const unsigned int reg,
+    const hrt_data             value);
 
 /*! Read from a control register of DMA[ID]
 
@@ -52,8 +52,8 @@ STORAGE_CLASS_DMA_H void dma_reg_store(
  \return DMA[ID].ctrl[reg]
  */
 STORAGE_CLASS_DMA_H hrt_data dma_reg_load(
-       const dma_ID_t          ID,
-       const unsigned int      reg);
+    const dma_ID_t             ID,
+    const unsigned int reg);
 
 /*! Set maximum burst size of DMA[ID]
 
@@ -65,8 +65,8 @@ STORAGE_CLASS_DMA_H hrt_data dma_reg_load(
 */
 void
 dma_set_max_burst_size(
-       dma_ID_t                ID,
-       dma_connection          conn,
-       uint32_t                max_burst_size);
+    dma_ID_t           ID,
+    dma_connection             conn,
+    uint32_t           max_burst_size);
 
 #endif /* __DMA_PUBLIC_H_INCLUDED__ */
index 6e84fc775f259a6720ac2190cc06464c32129672..a84b74b3bc1e643f2edc34f21ac80d0dd9bcb9ab 100644 (file)
@@ -25,7 +25,7 @@
  \return none, dequeue(event_queue[ID])
  */
 STORAGE_CLASS_EVENT_H void event_wait_for(
-       const event_ID_t                ID);
+    const event_ID_t           ID);
 
 /*! Conditional blocking wait for an event source EVENT[ID]
 
@@ -35,8 +35,8 @@ STORAGE_CLASS_EVENT_H void event_wait_for(
  \return none, if(cnd) dequeue(event_queue[ID])
  */
 STORAGE_CLASS_EVENT_H void cnd_event_wait_for(
-       const event_ID_t                ID,
-       const bool                              cnd);
+    const event_ID_t           ID,
+    const bool                         cnd);
 
 /*! Blocking read from an event source EVENT[ID]
 
@@ -45,7 +45,7 @@ STORAGE_CLASS_EVENT_H void cnd_event_wait_for(
  \return dequeue(event_queue[ID])
  */
 STORAGE_CLASS_EVENT_H hrt_data event_receive_token(
-       const event_ID_t                ID);
+    const event_ID_t           ID);
 
 /*! Blocking write to an event sink EVENT[ID]
 
@@ -55,8 +55,8 @@ STORAGE_CLASS_EVENT_H hrt_data event_receive_token(
  \return none, enqueue(event_queue[ID])
  */
 STORAGE_CLASS_EVENT_H void event_send_token(
-       const event_ID_t                ID,
-       const hrt_data                  token);
+    const event_ID_t           ID,
+    const hrt_data                     token);
 
 /*! Query an event source EVENT[ID]
 
@@ -65,7 +65,7 @@ STORAGE_CLASS_EVENT_H void event_send_token(
  \return !isempty(event_queue[ID])
  */
 STORAGE_CLASS_EVENT_H bool is_event_pending(
-       const event_ID_t                ID);
+    const event_ID_t           ID);
 
 /*! Query an event sink EVENT[ID]
 
@@ -74,6 +74,6 @@ STORAGE_CLASS_EVENT_H bool is_event_pending(
  \return !isfull(event_queue[ID])
  */
 STORAGE_CLASS_EVENT_H bool can_event_send_token(
-       const event_ID_t                ID);
+    const event_ID_t           ID);
 
 #endif /* __EVENT_FIFO_PUBLIC_H */
index 93b4f9b441ae0e9dcdf2f0f3d104833b8b34212b..e451d6f2a70d49e300bb79865209ef23c31ed7ae 100644 (file)
@@ -30,9 +30,9 @@ typedef struct fifo_monitor_state_s           fifo_monitor_state_t;
  \return none, fifo_switch[switch_id].sel = sel
  */
 STORAGE_CLASS_FIFO_MONITOR_H void fifo_switch_set(
-       const fifo_monitor_ID_t         ID,
-       const fifo_switch_t                     switch_id,
-       const hrt_data                          sel);
+    const fifo_monitor_ID_t            ID,
+    const fifo_switch_t                        switch_id,
+    const hrt_data                             sel);
 
 /*! Get a fifo switch multiplex
 
@@ -42,8 +42,8 @@ STORAGE_CLASS_FIFO_MONITOR_H void fifo_switch_set(
  \return fifo_switch[switch_id].sel
  */
 STORAGE_CLASS_FIFO_MONITOR_H hrt_data fifo_switch_get(
-       const fifo_monitor_ID_t         ID,
-       const fifo_switch_t                     switch_id);
+    const fifo_monitor_ID_t            ID,
+    const fifo_switch_t                        switch_id);
 
 /*! Read the state of FIFO_MONITOR[ID]
 
@@ -53,8 +53,8 @@ STORAGE_CLASS_FIFO_MONITOR_H hrt_data fifo_switch_get(
  \return none, state = FIFO_MONITOR[ID].state
  */
 void fifo_monitor_get_state(
-       const fifo_monitor_ID_t         ID,
-       fifo_monitor_state_t            *state);
+    const fifo_monitor_ID_t            ID,
+    fifo_monitor_state_t               *state);
 
 /*! Read the state of a fifo channel
 
@@ -65,9 +65,9 @@ void fifo_monitor_get_state(
  \return none, state = fifo_channel[channel_id].state
  */
 void fifo_channel_get_state(
-       const fifo_monitor_ID_t         ID,
-       const fifo_channel_t            channel_id,
-       fifo_channel_state_t            *state);
+    const fifo_monitor_ID_t            ID,
+    const fifo_channel_t               channel_id,
+    fifo_channel_state_t               *state);
 
 /*! Read the state of a fifo switch
 
@@ -78,9 +78,9 @@ void fifo_channel_get_state(
  \return none, state = fifo_switch[switch_id].state
  */
 void fifo_switch_get_state(
-       const fifo_monitor_ID_t         ID,
-       const fifo_switch_t                     switch_id,
-       fifo_switch_state_t                     *state);
+    const fifo_monitor_ID_t            ID,
+    const fifo_switch_t                        switch_id,
+    fifo_switch_state_t                        *state);
 
 /*! Write to a control register of FIFO_MONITOR[ID]
 
@@ -91,9 +91,9 @@ void fifo_switch_get_state(
  \return none, FIFO_MONITOR[ID].ctrl[reg] = value
  */
 STORAGE_CLASS_FIFO_MONITOR_H void fifo_monitor_reg_store(
-       const fifo_monitor_ID_t         ID,
-       const unsigned int                      reg,
-       const hrt_data                          value);
+    const fifo_monitor_ID_t            ID,
+    const unsigned int                 reg,
+    const hrt_data                             value);
 
 /*! Read from a control register of FIFO_MONITOR[ID]
 
@@ -104,7 +104,7 @@ STORAGE_CLASS_FIFO_MONITOR_H void fifo_monitor_reg_store(
  \return FIFO_MONITOR[ID].ctrl[reg]
  */
 STORAGE_CLASS_FIFO_MONITOR_H hrt_data fifo_monitor_reg_load(
-       const fifo_monitor_ID_t         ID,
-       const unsigned int                      reg);
+    const fifo_monitor_ID_t            ID,
+    const unsigned int                 reg);
 
 #endif /* __FIFO_MONITOR_PUBLIC_H_INCLUDED__ */
index 736a3ca67d793ce80603fbb46ff4b3bef02a770f..fc6f42e76fbe6622923fb8963640c3f66519d2f3 100644 (file)
@@ -34,8 +34,8 @@
  \return none, GDC[ID].lut[0...3][0...HRT_GDC_N-1] = data
  */
 void gdc_lut_store(
-       const gdc_ID_t          ID,
-       const int                       data[4][HRT_GDC_N]);
+    const gdc_ID_t             ID,
+    const int                  data[4][HRT_GDC_N]);
 
 /*! Convert the bicubic interpolation table of GDC[ID] to the ISP-specific format
 
@@ -44,8 +44,8 @@ void gdc_lut_store(
  \param out_lut[out]                   The data matrix as the output of conversion
  */
 void gdc_lut_convert_to_isp_format(
-       const int in_lut[4][HRT_GDC_N],
-       int out_lut[4][HRT_GDC_N]);
+    const int in_lut[4][HRT_GDC_N],
+    int out_lut[4][HRT_GDC_N]);
 
 /*! Return the integer representation of 1.0 of GDC[ID]
 
@@ -54,6 +54,6 @@ void gdc_lut_convert_to_isp_format(
  \return unity
  */
 int gdc_get_unity(
-       const gdc_ID_t          ID);
+    const gdc_ID_t             ID);
 
 #endif /* __GDC_PUBLIC_H_INCLUDED__ */
index fa5ff8c4cd28afa6931dd46291fff5164a2182b8..7cc0799d49ed6355f0a8b6cefe6938151d2dc31c 100644 (file)
@@ -27,8 +27,8 @@ typedef struct gp_device_state_s              gp_device_state_t;
  \return none, state = GP_DEVICE[ID].state
  */
 void gp_device_get_state(
-       const gp_device_ID_t            ID,
-       gp_device_state_t                       *state);
+    const gp_device_ID_t               ID,
+    gp_device_state_t                  *state);
 
 /*! Write to a control register of GP_DEVICE[ID]
 
@@ -39,9 +39,9 @@ void gp_device_get_state(
  \return none, GP_DEVICE[ID].ctrl[reg] = value
  */
 STORAGE_CLASS_GP_DEVICE_H void gp_device_reg_store(
-       const gp_device_ID_t    ID,
-       const unsigned int              reg_addr,
-       const hrt_data                  value);
+    const gp_device_ID_t       ID,
+    const unsigned int         reg_addr,
+    const hrt_data                     value);
 
 /*! Read from a control register of GP_DEVICE[ID]
 
@@ -52,7 +52,7 @@ STORAGE_CLASS_GP_DEVICE_H void gp_device_reg_store(
  \return GP_DEVICE[ID].ctrl[reg]
  */
 STORAGE_CLASS_GP_DEVICE_H hrt_data gp_device_reg_load(
-       const gp_device_ID_t    ID,
-       const hrt_address       reg_addr);
+    const gp_device_ID_t       ID,
+    const hrt_address  reg_addr);
 
 #endif /* __GP_DEVICE_PUBLIC_H_INCLUDED__ */
index 275e8e4d853daa1636a4f385222bfb91f71716dd..d21aab3a179d850e145c0fff9d9ab23798ec7de1 100644 (file)
@@ -26,9 +26,9 @@
  \return none, GPIO[ID].ctrl[reg] = value
  */
 STORAGE_CLASS_GPIO_H void gpio_reg_store(
-       const gpio_ID_t ID,
-       const unsigned int              reg_addr,
-       const hrt_data                  value);
+    const gpio_ID_t    ID,
+    const unsigned int         reg_addr,
+    const hrt_data                     value);
 
 /*! Read from a control register of GPIO[ID]
 
@@ -39,7 +39,7 @@ STORAGE_CLASS_GPIO_H void gpio_reg_store(
  \return GPIO[ID].ctrl[reg]
  */
 STORAGE_CLASS_GPIO_H hrt_data gpio_reg_load(
-       const gpio_ID_t ID,
-       const unsigned int              reg_addr);
+    const gpio_ID_t    ID,
+    const unsigned int         reg_addr);
 
 #endif /* __GPIO_PUBLIC_H_INCLUDED__ */
index 8538f86ab5e61114a7a0076b75cb21a3b3ba1e81..567fbc1d35e79b2b28011b9a92cfb67082400bf6 100644 (file)
@@ -27,6 +27,6 @@
  \return sizeof(HMEM[ID])
  */
 STORAGE_CLASS_HMEM_H size_t sizeof_hmem(
-       const hmem_ID_t         ID);
+    const hmem_ID_t            ID);
 
 #endif /* __HMEM_PUBLIC_H_INCLUDED__ */
index 5bd6cebe85b31f4b1595c6e00a331e6fb16f955d..6b17a6b651b7cd507bc87514b25eac63d6250d1e 100644 (file)
@@ -29,8 +29,8 @@
  * @param[out] state   Point to the register-state.
  */
 STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_get_state(
-               const ibuf_ctrl_ID_t ID,
-               ibuf_ctrl_state_t *state);
+    const ibuf_ctrl_ID_t ID,
+    ibuf_ctrl_state_t *state);
 
 /**
  * @brief Get the state of the ibuf-controller process.
@@ -41,9 +41,9 @@ STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_get_state(
  * @param[out] state           Point to the process state.
  */
 STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_get_proc_state(
-               const ibuf_ctrl_ID_t ID,
-               const u32 proc_id,
-               ibuf_ctrl_proc_state_t *state);
+    const ibuf_ctrl_ID_t ID,
+    const u32 proc_id,
+    ibuf_ctrl_proc_state_t *state);
 /**
  * @brief Dump the ibuf-controller state.
  * Dump the state of the ibuf-controller regiester-set.
@@ -52,8 +52,8 @@ STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_get_proc_state(
  * @param[in]  state           Pointer to the register-state.
  */
 STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_dump_state(
-               const ibuf_ctrl_ID_t ID,
-               ibuf_ctrl_state_t *state);
+    const ibuf_ctrl_ID_t ID,
+    ibuf_ctrl_state_t *state);
 /* end of NCI */
 
 /*****************************************************
@@ -71,8 +71,8 @@ STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_dump_state(
  * @return the value of the register.
  */
 STORAGE_CLASS_IBUF_CTRL_H hrt_data ibuf_ctrl_reg_load(
-       const ibuf_ctrl_ID_t ID,
-       const hrt_address reg);
+    const ibuf_ctrl_ID_t ID,
+    const hrt_address reg);
 
 /**
  * @brief Store a value to the register.
@@ -84,9 +84,9 @@ STORAGE_CLASS_IBUF_CTRL_H hrt_data ibuf_ctrl_reg_load(
  *
  */
 STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_reg_store(
-       const ibuf_ctrl_ID_t ID,
-       const hrt_address reg,
-       const hrt_data value);
+    const ibuf_ctrl_ID_t ID,
+    const hrt_address reg,
+    const hrt_data value);
 /* end of DLI */
 
 #endif /* USE_INPUT_SYSTEM_VERSION_2401 */
index 87f6d5031fdfe69355aaba74c7d9b314f76b4b98..e5758cb8beddbc5b1e30e0b3cdf32537f132a2ca 100644 (file)
@@ -25,7 +25,7 @@
  \return none, reset(INPUT_FORMATTER[ID])
  */
 void input_formatter_rst(
-       const input_formatter_ID_t              ID);
+    const input_formatter_ID_t         ID);
 
 /*! Set the blocking mode of INPUT_FORMATTER[ID]
 
@@ -42,8 +42,8 @@ void input_formatter_rst(
  \return none, INPUT_FORMATTER[ID].blocking_mode = enable
  */
 void input_formatter_set_fifo_blocking_mode(
-       const input_formatter_ID_t              ID,
-       const bool                                              enable);
+    const input_formatter_ID_t         ID,
+    const bool                                         enable);
 
 /*! Return the data alignment of INPUT_FORMATTER[ID]
 
@@ -52,7 +52,7 @@ void input_formatter_set_fifo_blocking_mode(
  \return alignment(INPUT_FORMATTER[ID].data)
  */
 unsigned int input_formatter_get_alignment(
-       const input_formatter_ID_t              ID);
+    const input_formatter_ID_t         ID);
 
 /*! Read the source switch state into INPUT_FORMATTER[ID]
 
@@ -62,8 +62,8 @@ unsigned int input_formatter_get_alignment(
  \return none, state = INPUT_FORMATTER[ID].switch_state
  */
 void input_formatter_get_switch_state(
-       const input_formatter_ID_t              ID,
-       input_formatter_switch_state_t  *state);
+    const input_formatter_ID_t         ID,
+    input_formatter_switch_state_t     *state);
 
 /*! Read the control registers of INPUT_FORMATTER[ID]
 
@@ -73,8 +73,8 @@ void input_formatter_get_switch_state(
  \return none, state = INPUT_FORMATTER[ID].state
  */
 void input_formatter_get_state(
-       const input_formatter_ID_t              ID,
-       input_formatter_state_t                 *state);
+    const input_formatter_ID_t         ID,
+    input_formatter_state_t                    *state);
 
 /*! Read the control registers of bin copy INPUT_FORMATTER[ID]
 
@@ -84,8 +84,8 @@ void input_formatter_get_state(
  \return none, state = INPUT_FORMATTER[ID].state
  */
 void input_formatter_bin_get_state(
-       const input_formatter_ID_t              ID,
-       input_formatter_bin_state_t             *state);
+    const input_formatter_ID_t         ID,
+    input_formatter_bin_state_t                *state);
 
 /*! Write to a control register of INPUT_FORMATTER[ID]
 
@@ -96,9 +96,9 @@ void input_formatter_bin_get_state(
  \return none, INPUT_FORMATTER[ID].ctrl[reg] = value
  */
 STORAGE_CLASS_INPUT_FORMATTER_H void input_formatter_reg_store(
-       const input_formatter_ID_t      ID,
-       const hrt_address               reg_addr,
-       const hrt_data                          value);
+    const input_formatter_ID_t ID,
+    const hrt_address          reg_addr,
+    const hrt_data                             value);
 
 /*! Read from a control register of INPUT_FORMATTER[ID]
 
@@ -109,7 +109,7 @@ STORAGE_CLASS_INPUT_FORMATTER_H void input_formatter_reg_store(
  \return INPUT_FORMATTER[ID].ctrl[reg]
  */
 STORAGE_CLASS_INPUT_FORMATTER_H hrt_data input_formatter_reg_load(
-       const input_formatter_ID_t      ID,
-       const unsigned int                      reg_addr);
+    const input_formatter_ID_t ID,
+    const unsigned int                 reg_addr);
 
 #endif /* __INPUT_FORMATTER_PUBLIC_H_INCLUDED__ */
index 786b3585fde3829fa5643d3136931cbec27138b0..d0de27abb95a983d026a7cb9e316ae3f58a00f6f 100644 (file)
@@ -31,8 +31,8 @@ typedef struct receiver_state_s                       receiver_state_t;
  \return none, state = INPUT_SYSTEM[ID].state
  */
 void input_system_get_state(
-       const input_system_ID_t         ID,
-       input_system_state_t            *state);
+    const input_system_ID_t            ID,
+    input_system_state_t               *state);
 
 /*! Read the state of RECEIVER[ID]
 
@@ -42,8 +42,8 @@ void input_system_get_state(
  \return none, state = RECEIVER[ID].state
  */
 void receiver_get_state(
-       const rx_ID_t                           ID,
-       receiver_state_t                        *state);
+    const rx_ID_t                              ID,
+    receiver_state_t                   *state);
 
 /*! Flag whether a MIPI format is YUV420
 
@@ -52,7 +52,7 @@ void receiver_get_state(
  \return mipi_format == YUV420
  */
 bool is_mipi_format_yuv420(
-       const mipi_format_t                     mipi_format);
+    const mipi_format_t                        mipi_format);
 
 /*! Set compression parameters for cfg[cfg_ID] of RECEIVER[ID]
 
@@ -68,10 +68,10 @@ bool is_mipi_format_yuv420(
  \return none, RECEIVER[ID].cfg[cfg_ID] = {comp, pred}
  */
 void receiver_set_compression(
-       const rx_ID_t                           ID,
-       const unsigned int                      cfg_ID,
-       const mipi_compressor_t         comp,
-       const mipi_predictor_t          pred);
+    const rx_ID_t                              ID,
+    const unsigned int                 cfg_ID,
+    const mipi_compressor_t            comp,
+    const mipi_predictor_t             pred);
 
 /*! Enable PORT[port_ID] of RECEIVER[ID]
 
@@ -82,9 +82,9 @@ void receiver_set_compression(
  \return None, enable(RECEIVER[ID].PORT[port_ID])
  */
 void receiver_port_enable(
-       const rx_ID_t                           ID,
-       const enum mipi_port_id         port_ID,
-       const bool                                      cnd);
+    const rx_ID_t                              ID,
+    const enum mipi_port_id            port_ID,
+    const bool                                 cnd);
 
 /*! Flag if PORT[port_ID] of RECEIVER[ID] is enabled
 
@@ -94,8 +94,8 @@ void receiver_port_enable(
  \return enable(RECEIVER[ID].PORT[port_ID]) == true
  */
 bool is_receiver_port_enabled(
-       const rx_ID_t                           ID,
-       const enum mipi_port_id         port_ID);
+    const rx_ID_t                              ID,
+    const enum mipi_port_id            port_ID);
 
 /*! Enable the IRQ channels of PORT[port_ID] of RECEIVER[ID]
 
@@ -106,9 +106,9 @@ bool is_receiver_port_enabled(
  \return None, enable(RECEIVER[ID].PORT[port_ID].irq_info)
  */
 void receiver_irq_enable(
-       const rx_ID_t                           ID,
-       const enum mipi_port_id         port_ID,
-       const rx_irq_info_t                     irq_info);
+    const rx_ID_t                              ID,
+    const enum mipi_port_id            port_ID,
+    const rx_irq_info_t                        irq_info);
 
 /*! Return the IRQ status of PORT[port_ID] of RECEIVER[ID]
 
@@ -118,8 +118,8 @@ void receiver_irq_enable(
  \return RECEIVER[ID].PORT[port_ID].irq_info
  */
 rx_irq_info_t receiver_get_irq_info(
-       const rx_ID_t                           ID,
-       const enum mipi_port_id         port_ID);
+    const rx_ID_t                              ID,
+    const enum mipi_port_id            port_ID);
 
 /*! Clear the IRQ status of PORT[port_ID] of RECEIVER[ID]
 
@@ -130,9 +130,9 @@ rx_irq_info_t receiver_get_irq_info(
  \return None, clear(RECEIVER[ID].PORT[port_ID].irq_info)
  */
 void receiver_irq_clear(
-       const rx_ID_t                           ID,
-       const enum mipi_port_id                 port_ID,
-       const rx_irq_info_t                     irq_info);
+    const rx_ID_t                              ID,
+    const enum mipi_port_id                    port_ID,
+    const rx_irq_info_t                        irq_info);
 
 /*! Write to a control register of INPUT_SYSTEM[ID]
 
@@ -143,9 +143,9 @@ void receiver_irq_clear(
  \return none, INPUT_SYSTEM[ID].ctrl[reg] = value
  */
 STORAGE_CLASS_INPUT_SYSTEM_H void input_system_reg_store(
-       const input_system_ID_t                 ID,
-       const hrt_address                       reg,
-       const hrt_data                          value);
+    const input_system_ID_t                    ID,
+    const hrt_address                  reg,
+    const hrt_data                             value);
 
 /*! Read from a control register of INPUT_SYSTEM[ID]
 
@@ -156,8 +156,8 @@ STORAGE_CLASS_INPUT_SYSTEM_H void input_system_reg_store(
  \return INPUT_SYSTEM[ID].ctrl[reg]
  */
 STORAGE_CLASS_INPUT_SYSTEM_H hrt_data input_system_reg_load(
-       const input_system_ID_t                 ID,
-       const hrt_address                       reg);
+    const input_system_ID_t                    ID,
+    const hrt_address                  reg);
 
 /*! Write to a control register of RECEIVER[ID]
 
@@ -168,9 +168,9 @@ STORAGE_CLASS_INPUT_SYSTEM_H hrt_data input_system_reg_load(
  \return none, RECEIVER[ID].ctrl[reg] = value
  */
 STORAGE_CLASS_INPUT_SYSTEM_H void receiver_reg_store(
-       const rx_ID_t                           ID,
-       const hrt_address                       reg,
-       const hrt_data                          value);
+    const rx_ID_t                              ID,
+    const hrt_address                  reg,
+    const hrt_data                             value);
 
 /*! Read from a control register of RECEIVER[ID]
 
@@ -181,8 +181,8 @@ STORAGE_CLASS_INPUT_SYSTEM_H void receiver_reg_store(
  \return RECEIVER[ID].ctrl[reg]
  */
 STORAGE_CLASS_INPUT_SYSTEM_H hrt_data receiver_reg_load(
-       const rx_ID_t                           ID,
-       const hrt_address                       reg);
+    const rx_ID_t                              ID,
+    const hrt_address                  reg);
 
 /*! Write to a control register of PORT[port_ID] of RECEIVER[ID]
 
@@ -194,10 +194,10 @@ STORAGE_CLASS_INPUT_SYSTEM_H hrt_data receiver_reg_load(
  \return none, RECEIVER[ID].PORT[port_ID].ctrl[reg] = value
  */
 STORAGE_CLASS_INPUT_SYSTEM_H void receiver_port_reg_store(
-       const rx_ID_t                           ID,
-       const enum mipi_port_id                 port_ID,
-       const hrt_address                       reg,
-       const hrt_data                          value);
+    const rx_ID_t                              ID,
+    const enum mipi_port_id                    port_ID,
+    const hrt_address                  reg,
+    const hrt_data                             value);
 
 /*! Read from a control register PORT[port_ID] of of RECEIVER[ID]
 
@@ -209,9 +209,9 @@ STORAGE_CLASS_INPUT_SYSTEM_H void receiver_port_reg_store(
  \return RECEIVER[ID].PORT[port_ID].ctrl[reg]
  */
 STORAGE_CLASS_INPUT_SYSTEM_H hrt_data receiver_port_reg_load(
-       const rx_ID_t                           ID,
-       const enum mipi_port_id         port_ID,
-       const hrt_address                       reg);
+    const rx_ID_t                              ID,
+    const enum mipi_port_id            port_ID,
+    const hrt_address                  reg);
 
 /*! Write to a control register of SUB_SYSTEM[sub_ID] of INPUT_SYSTEM[ID]
 
@@ -223,10 +223,10 @@ STORAGE_CLASS_INPUT_SYSTEM_H hrt_data receiver_port_reg_load(
  \return none, INPUT_SYSTEM[ID].SUB_SYSTEM[sub_ID].ctrl[reg] = value
  */
 STORAGE_CLASS_INPUT_SYSTEM_H void input_system_sub_system_reg_store(
-       const input_system_ID_t                 ID,
-       const sub_system_ID_t                   sub_ID,
-       const hrt_address                       reg,
-       const hrt_data                          value);
+    const input_system_ID_t                    ID,
+    const sub_system_ID_t                      sub_ID,
+    const hrt_address                  reg,
+    const hrt_data                             value);
 
 /*! Read from a control register SUB_SYSTEM[sub_ID] of INPUT_SYSTEM[ID]
 
@@ -238,9 +238,9 @@ STORAGE_CLASS_INPUT_SYSTEM_H void input_system_sub_system_reg_store(
  \return INPUT_SYSTEM[ID].SUB_SYSTEM[sub_ID].ctrl[reg]
  */
 STORAGE_CLASS_INPUT_SYSTEM_H hrt_data input_system_sub_system_reg_load(
-       const input_system_ID_t         ID,
-       const sub_system_ID_t           sub_ID,
-       const hrt_address                       reg);
+    const input_system_ID_t            ID,
+    const sub_system_ID_t              sub_ID,
+    const hrt_address                  reg);
 
 ///////////////////////////////////////////////////////////////////////////
 //
@@ -269,100 +269,100 @@ input_system_error_t input_system_configuration_commit(void);
 // FIFO channel config function user
 
 input_system_error_t   input_system_csi_fifo_channel_cfg(
-       u32                             ch_id,
-       input_system_csi_port_t port,
-       backend_channel_cfg_t   backend_ch,
-       target_cfg2400_t                        target
+    u32                                ch_id,
+    input_system_csi_port_t    port,
+    backend_channel_cfg_t      backend_ch,
+    target_cfg2400_t                   target
 );
 
 input_system_error_t   input_system_csi_fifo_channel_with_counting_cfg(
-       u32                             ch_id,
-       u32                             nof_frame,
-       input_system_csi_port_t port,
-       backend_channel_cfg_t   backend_ch,
-       u32                             mem_region_size,
-       u32                             nof_mem_regions,
-       target_cfg2400_t                        target
+    u32                                ch_id,
+    u32                                nof_frame,
+    input_system_csi_port_t    port,
+    backend_channel_cfg_t      backend_ch,
+    u32                                mem_region_size,
+    u32                                nof_mem_regions,
+    target_cfg2400_t                   target
 );
 
 // SRAM channel config function user
 
 input_system_error_t   input_system_csi_sram_channel_cfg(
-       u32                             ch_id,
-       input_system_csi_port_t port,
-       backend_channel_cfg_t   backend_ch,
-       u32                             csi_mem_region_size,
-       u32                             csi_nof_mem_regions,
-       target_cfg2400_t                        target
+    u32                                ch_id,
+    input_system_csi_port_t    port,
+    backend_channel_cfg_t      backend_ch,
+    u32                                csi_mem_region_size,
+    u32                                csi_nof_mem_regions,
+    target_cfg2400_t                   target
 );
 
 //XMEM channel config function user
 
 input_system_error_t   input_system_csi_xmem_channel_cfg(
-       u32                             ch_id,
-       input_system_csi_port_t port,
-       backend_channel_cfg_t   backend_ch,
-       u32                             mem_region_size,
-       u32                             nof_mem_regions,
-       u32                             acq_mem_region_size,
-       u32                             acq_nof_mem_regions,
-       target_cfg2400_t                        target,
-       uint32_t                                nof_xmem_buffers
+    u32                                ch_id,
+    input_system_csi_port_t port,
+    backend_channel_cfg_t      backend_ch,
+    u32                                mem_region_size,
+    u32                                nof_mem_regions,
+    u32                                acq_mem_region_size,
+    u32                                acq_nof_mem_regions,
+    target_cfg2400_t                   target,
+    uint32_t                           nof_xmem_buffers
 );
 
 input_system_error_t   input_system_csi_xmem_capture_only_channel_cfg(
-       u32                             ch_id,
-       u32                             nof_frames,
-       input_system_csi_port_t port,
-       u32                             csi_mem_region_size,
-       u32                             csi_nof_mem_regions,
-       u32                             acq_mem_region_size,
-       u32                             acq_nof_mem_regions,
-       target_cfg2400_t                        target
+    u32                                ch_id,
+    u32                                nof_frames,
+    input_system_csi_port_t port,
+    u32                                csi_mem_region_size,
+    u32                                csi_nof_mem_regions,
+    u32                                acq_mem_region_size,
+    u32                                acq_nof_mem_regions,
+    target_cfg2400_t                   target
 );
 
 input_system_error_t   input_system_csi_xmem_acquire_only_channel_cfg(
-       u32                             ch_id,
-       u32                             nof_frames,
-       input_system_csi_port_t port,
-       backend_channel_cfg_t   backend_ch,
-       u32                             acq_mem_region_size,
-       u32                             acq_nof_mem_regions,
-       target_cfg2400_t                        target
+    u32                                ch_id,
+    u32                                nof_frames,
+    input_system_csi_port_t port,
+    backend_channel_cfg_t      backend_ch,
+    u32                                acq_mem_region_size,
+    u32                                acq_nof_mem_regions,
+    target_cfg2400_t                   target
 );
 
 // Non - CSI channel config function user
 
 input_system_error_t   input_system_prbs_channel_cfg(
-       u32             ch_id,
-       u32             nof_frames,
-       u32             seed,
-       u32             sync_gen_width,
-       u32             sync_gen_height,
-       u32             sync_gen_hblank_cycles,
-       u32             sync_gen_vblank_cycles,
-       target_cfg2400_t        target
+    u32                ch_id,
+    u32                nof_frames,
+    u32                seed,
+    u32                sync_gen_width,
+    u32                sync_gen_height,
+    u32                sync_gen_hblank_cycles,
+    u32                sync_gen_vblank_cycles,
+    target_cfg2400_t   target
 );
 
 input_system_error_t   input_system_tpg_channel_cfg(
-       u32             ch_id,
-       u32             nof_frames,//not used yet
-       u32             x_mask,
-       u32             y_mask,
-       u32             x_delta,
-       u32             y_delta,
-       u32             xy_mask,
-       u32             sync_gen_width,
-       u32             sync_gen_height,
-       u32             sync_gen_hblank_cycles,
-       u32             sync_gen_vblank_cycles,
-       target_cfg2400_t        target
+    u32                ch_id,
+    u32                nof_frames,//not used yet
+    u32                x_mask,
+    u32                y_mask,
+    u32                x_delta,
+    u32                y_delta,
+    u32                xy_mask,
+    u32                sync_gen_width,
+    u32                sync_gen_height,
+    u32                sync_gen_hblank_cycles,
+    u32                sync_gen_vblank_cycles,
+    target_cfg2400_t   target
 );
 
 input_system_error_t   input_system_gpfifo_channel_cfg(
-       u32             ch_id,
-       u32             nof_frames,
-       target_cfg2400_t        target
+    u32                ch_id,
+    u32                nof_frames,
+    target_cfg2400_t   target
 );
 #endif /* #ifdef USE_INPUT_SYSTEM_VERSION_2401 */
 
index 79d16c0550f048bf1e73ddca54393714757068bd..dfe2aa9ff2572cc9023aec685c6b9c066f3f2ad6 100644 (file)
@@ -26,8 +26,8 @@
  \return none, state = IRQ[ID].state
  */
 void irq_controller_get_state(
-       const irq_ID_t                          ID,
-       irq_controller_state_t          *state);
+    const irq_ID_t                             ID,
+    irq_controller_state_t             *state);
 
 /*! Write to a control register of IRQ[ID]
 
@@ -38,9 +38,9 @@ void irq_controller_get_state(
  \return none, IRQ[ID].ctrl[reg] = value
  */
 STORAGE_CLASS_IRQ_H void irq_reg_store(
-       const irq_ID_t          ID,
-       const unsigned int      reg,
-       const hrt_data          value);
+    const irq_ID_t             ID,
+    const unsigned int reg,
+    const hrt_data             value);
 
 /*! Read from a control register of IRQ[ID]
 
@@ -51,8 +51,8 @@ STORAGE_CLASS_IRQ_H void irq_reg_store(
  \return IRQ[ID].ctrl[reg]
  */
 STORAGE_CLASS_IRQ_H hrt_data irq_reg_load(
-       const irq_ID_t          ID,
-       const unsigned int      reg);
+    const irq_ID_t             ID,
+    const unsigned int reg);
 
 /*! Enable an IRQ channel of IRQ[ID] with a mode
 
@@ -62,8 +62,8 @@ STORAGE_CLASS_IRQ_H hrt_data irq_reg_load(
  \return none, enable(IRQ[ID].channel[irq_ID])
  */
 void irq_enable_channel(
-       const irq_ID_t                          ID,
-       const unsigned int                      irq_ID);
+    const irq_ID_t                             ID,
+    const unsigned int                 irq_ID);
 
 /*! Enable pulse interrupts for IRQ[ID] with a mode
 
@@ -73,8 +73,8 @@ void irq_enable_channel(
  \return none
  */
 void irq_enable_pulse(
-       const irq_ID_t  ID,
-       bool                    pulse);
+    const irq_ID_t     ID,
+    bool                       pulse);
 
 /*! Disable an IRQ channel of IRQ[ID]
 
@@ -84,8 +84,8 @@ void irq_enable_pulse(
  \return none, disable(IRQ[ID].channel[irq_ID])
  */
 void irq_disable_channel(
-       const irq_ID_t                          ID,
-       const unsigned int                      irq);
+    const irq_ID_t                             ID,
+    const unsigned int                 irq);
 
 /*! Clear the state of all IRQ channels of IRQ[ID]
 
@@ -94,7 +94,7 @@ void irq_disable_channel(
  \return none, clear(IRQ[ID].channel[])
  */
 void irq_clear_all(
-       const irq_ID_t                          ID);
+    const irq_ID_t                             ID);
 
 /*! Return the ID of a signalling IRQ channel of IRQ[ID]
 
@@ -108,8 +108,8 @@ void irq_clear_all(
  \return state(IRQ[ID])
  */
 enum hrt_isp_css_irq_status irq_get_channel_id(
-       const irq_ID_t                          ID,
-       unsigned int                            *irq_id);
+    const irq_ID_t                             ID,
+    unsigned int                               *irq_id);
 
 /*! Raise an interrupt on channel irq_id of device IRQ[ID]
 
@@ -119,8 +119,8 @@ enum hrt_isp_css_irq_status irq_get_channel_id(
  \return none, signal(IRQ[ID].channel[irq_id])
  */
 void irq_raise(
-       const irq_ID_t                          ID,
-       const irq_sw_channel_id_t       irq_id);
+    const irq_ID_t                             ID,
+    const irq_sw_channel_id_t  irq_id);
 
 /*! Test if any IRQ channel of the virtual super IRQ has raised a signal
 
@@ -136,8 +136,8 @@ bool any_virq_signal(void);
  \return none, VIRQ.channel[irq_ID].enable = en
  */
 void cnd_virq_enable_channel(
-       const virq_id_t                         irq_ID,
-       const bool                                      en);
+    const virq_id_t                            irq_ID,
+    const bool                                 en);
 
 /*! Clear the state of all IRQ channels of the virtual super IRQ
 
@@ -152,7 +152,7 @@ void virq_clear_all(void);
  \return none
  */
 void virq_clear_info(
-       virq_info_t                                     *irq_info);
+    virq_info_t                                        *irq_info);
 
 /*! Return the ID of a signalling IRQ channel of the virtual super IRQ
 
@@ -165,7 +165,7 @@ void virq_clear_info(
  \return state(IRQ[...])
  */
 enum hrt_isp_css_irq_status virq_get_channel_id(
-       virq_id_t                                       *irq_id);
+    virq_id_t                                  *irq_id);
 
 /*! Return the IDs of all signaling IRQ channels of the virtual super IRQ
 
@@ -179,6 +179,6 @@ enum hrt_isp_css_irq_status virq_get_channel_id(
  \return (error(state(IRQ[...]))
  */
 enum hrt_isp_css_irq_status virq_get_channel_signals(
-       virq_info_t                                     *irq_info);
+    virq_info_t                                        *irq_info);
 
 #endif /* __IRQ_PUBLIC_H_INCLUDED__ */
index e0bbc6499c73215fe6518716479c7a24f30a82a4..0da2937b900e58d8a6264783efdf5660f0755b20 100644 (file)
@@ -26,8 +26,8 @@
  \return none, if(cnd) enable(ISP[ID].irq) else disable(ISP[ID].irq)
  */
 void cnd_isp_irq_enable(
-       const isp_ID_t          ID,
-       const bool                      cnd);
+    const isp_ID_t             ID,
+    const bool                 cnd);
 
 /*! Read the state of cell ISP[ID]
 
@@ -38,9 +38,9 @@ void cnd_isp_irq_enable(
  \return none, state = ISP[ID].state, stall = ISP[ID].stall
  */
 void isp_get_state(
-       const isp_ID_t          ID,
-       isp_state_t                     *state,
-       isp_stall_t                     *stall);
+    const isp_ID_t             ID,
+    isp_state_t                        *state,
+    isp_stall_t                        *stall);
 
 /*! Write to the status and control register of ISP[ID]
 
@@ -51,9 +51,9 @@ void isp_get_state(
  \return none, ISP[ID].sc[reg] = value
  */
 STORAGE_CLASS_ISP_H void isp_ctrl_store(
-       const isp_ID_t          ID,
-       const unsigned int      reg,
-       const hrt_data          value);
+    const isp_ID_t             ID,
+    const unsigned int reg,
+    const hrt_data             value);
 
 /*! Read from the status and control register of ISP[ID]
 
@@ -64,8 +64,8 @@ STORAGE_CLASS_ISP_H void isp_ctrl_store(
  \return ISP[ID].sc[reg]
  */
 STORAGE_CLASS_ISP_H hrt_data isp_ctrl_load(
-       const isp_ID_t          ID,
-       const unsigned int      reg);
+    const isp_ID_t             ID,
+    const unsigned int reg);
 
 /*! Get the status of a bitfield in the control register of ISP[ID]
 
@@ -76,9 +76,9 @@ STORAGE_CLASS_ISP_H hrt_data isp_ctrl_load(
  \return  (ISP[ID].sc[reg] & (1<<bit)) != 0
  */
 STORAGE_CLASS_ISP_H bool isp_ctrl_getbit(
-       const isp_ID_t          ID,
-       const unsigned int      reg,
-       const unsigned int      bit);
+    const isp_ID_t             ID,
+    const unsigned int reg,
+    const unsigned int bit);
 
 /*! Set a bitfield in the control register of ISP[ID]
 
@@ -89,9 +89,9 @@ STORAGE_CLASS_ISP_H bool isp_ctrl_getbit(
  \return none, ISP[ID].sc[reg] |= (1<<bit)
  */
 STORAGE_CLASS_ISP_H void isp_ctrl_setbit(
-       const isp_ID_t          ID,
-       const unsigned int      reg,
-       const unsigned int      bit);
+    const isp_ID_t             ID,
+    const unsigned int reg,
+    const unsigned int bit);
 
 /*! Clear a bitfield in the control register of ISP[ID]
 
@@ -102,9 +102,9 @@ STORAGE_CLASS_ISP_H void isp_ctrl_setbit(
  \return none, ISP[ID].sc[reg] &= ~(1<<bit)
  */
 STORAGE_CLASS_ISP_H void isp_ctrl_clearbit(
-       const isp_ID_t          ID,
-       const unsigned int      reg,
-       const unsigned int      bit);
+    const isp_ID_t             ID,
+    const unsigned int reg,
+    const unsigned int bit);
 
 /*! Write to the DMEM of ISP[ID]
 
@@ -116,10 +116,10 @@ STORAGE_CLASS_ISP_H void isp_ctrl_clearbit(
  \return none, ISP[ID].dmem[addr...addr+size-1] = data
  */
 STORAGE_CLASS_ISP_H void isp_dmem_store(
-       const isp_ID_t          ID,
-       unsigned int            addr,
-       const void                      *data,
-       const size_t            size);
+    const isp_ID_t             ID,
+    unsigned int               addr,
+    const void                 *data,
+    const size_t               size);
 
 /*! Read from the DMEM of ISP[ID]
 
@@ -131,10 +131,10 @@ STORAGE_CLASS_ISP_H void isp_dmem_store(
  \return none, data = ISP[ID].dmem[addr...addr+size-1]
  */
 STORAGE_CLASS_ISP_H void isp_dmem_load(
-       const isp_ID_t          ID,
-       const unsigned int      addr,
-       void                            *data,
-       const size_t            size);
+    const isp_ID_t             ID,
+    const unsigned int addr,
+    void                               *data,
+    const size_t               size);
 
 /*! Write a 32-bit datum to the DMEM of ISP[ID]
 
@@ -146,9 +146,9 @@ STORAGE_CLASS_ISP_H void isp_dmem_load(
  \return none, ISP[ID].dmem[addr] = data
  */
 STORAGE_CLASS_ISP_H void isp_dmem_store_uint32(
-       const isp_ID_t          ID,
-       unsigned int            addr,
-       const uint32_t          data);
+    const isp_ID_t             ID,
+    unsigned int               addr,
+    const uint32_t             data);
 
 /*! Load a 32-bit datum from the DMEM of ISP[ID]
 
@@ -160,8 +160,8 @@ STORAGE_CLASS_ISP_H void isp_dmem_store_uint32(
  \return none, data = ISP[ID].dmem[addr]
  */
 STORAGE_CLASS_ISP_H uint32_t isp_dmem_load_uint32(
-       const isp_ID_t          ID,
-       const unsigned int      addr);
+    const isp_ID_t             ID,
+    const unsigned int addr);
 
 /*! Concatenate the LSW and MSW into a double precision word
 
@@ -171,8 +171,8 @@ STORAGE_CLASS_ISP_H uint32_t isp_dmem_load_uint32(
  \return x0 | (x1 << bits_per_vector_element)
  */
 STORAGE_CLASS_ISP_H uint32_t isp_2w_cat_1w(
-       const u16               x0,
-       const uint16_t          x1);
+    const u16          x0,
+    const uint16_t             x1);
 
 unsigned int isp_is_ready(isp_ID_t ID);
 
index 962555a84f034e70ace60f99eb9b2a0b407fbbd3..734634aedadf16fea3e78720219aed4a35a3e309 100644 (file)
 #include "type_support.h"
 
 STORAGE_CLASS_ISYS2401_DMA_H void isys2401_dma_reg_store(
-       const isys2401_dma_ID_t dma_id,
-       const unsigned int      reg,
-       const hrt_data          value);
+    const isys2401_dma_ID_t dma_id,
+    const unsigned int reg,
+    const hrt_data             value);
 
 STORAGE_CLASS_ISYS2401_DMA_H hrt_data isys2401_dma_reg_load(
-       const isys2401_dma_ID_t dma_id,
-       const unsigned int      reg);
+    const isys2401_dma_ID_t dma_id,
+    const unsigned int reg);
 
 void isys2401_dma_set_max_burst_size(
-       const isys2401_dma_ID_t dma_id,
-       uint32_t                max_burst_size);
+    const isys2401_dma_ID_t dma_id,
+    uint32_t           max_burst_size);
 
 #endif /* USE_INPUT_SYSTEM_VERSION_2401 */
 
index c3e6f76f8c4d7b0ea575eaaecd1bf9c9ceaa469c..d561783e47a32f664e4d7000590c7e7edc37c54e 100644 (file)
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
 
 STORAGE_CLASS_ISYS2401_IRQ_H void isys_irqc_state_get(
-       const isys_irq_ID_t     isys_irqc_id,
-       isys_irqc_state_t       *state);
+    const isys_irq_ID_t        isys_irqc_id,
+    isys_irqc_state_t  *state);
 
 STORAGE_CLASS_ISYS2401_IRQ_H void isys_irqc_state_dump(
-       const isys_irq_ID_t     isys_irqc_id,
-       const isys_irqc_state_t *state);
+    const isys_irq_ID_t        isys_irqc_id,
+    const isys_irqc_state_t *state);
 
 STORAGE_CLASS_ISYS2401_IRQ_H void isys_irqc_reg_store(
-       const isys_irq_ID_t     isys_irqc_id,
-       const unsigned int      reg_idx,
-       const hrt_data          value);
+    const isys_irq_ID_t        isys_irqc_id,
+    const unsigned int reg_idx,
+    const hrt_data             value);
 
 STORAGE_CLASS_ISYS2401_IRQ_H hrt_data isys_irqc_reg_load(
-       const isys_irq_ID_t     isys_irqc_id,
-       const unsigned int      reg_idx);
+    const isys_irq_ID_t        isys_irqc_id,
+    const unsigned int reg_idx);
 
 STORAGE_CLASS_ISYS2401_IRQ_H void isys_irqc_status_enable(
-       const isys_irq_ID_t     isys_irqc_id);
+    const isys_irq_ID_t        isys_irqc_id);
 
 #endif /* defined(USE_INPUT_SYSTEM_VERSION_2401) */
 
index 097dde852c8a8ab87b8a886644de44eaa534330f..2d1859f2c656a7634e43aec9fe0dea6337dbf2bb 100644 (file)
@@ -22,8 +22,8 @@
  \return none, state = INPUT_SYSTEM[ID].state
  */
 STORAGE_CLASS_INPUT_SYSTEM_H input_system_err_t input_system_get_state(
-       const input_system_ID_t ID,
-       input_system_state_t *state);
+    const input_system_ID_t    ID,
+    input_system_state_t *state);
 /*! Dump the state of INPUT_SYSTEM[ID]
  \param ID[in]         INPUT_SYSTEM identifier
  \param state[in]      pointer to input system state structure
@@ -31,7 +31,7 @@ STORAGE_CLASS_INPUT_SYSTEM_H input_system_err_t input_system_get_state(
  \depends on host supplied print function as part of ia_css_init()
  */
 STORAGE_CLASS_INPUT_SYSTEM_H void input_system_dump_state(
-       const input_system_ID_t ID,
-       input_system_state_t *state);
+    const input_system_ID_t    ID,
+    input_system_state_t *state);
 #endif /* USE_INPUT_SYSTEM_VERSION_2401 */
 #endif /* __ISYS_PUBLIC_H_INCLUDED__ */
index f7982e8078cc6b84ae5ccee8947ab71b21b46a94..87a8d512713ef99689855f89dd514cffd5988647 100644 (file)
@@ -28,8 +28,8 @@
  * @param[out] state   Point to the register-state.
  */
 STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_get_state(
-               const stream2mmio_ID_t ID,
-               stream2mmio_state_t *state);
+    const stream2mmio_ID_t ID,
+    stream2mmio_state_t *state);
 
 /**
  * @brief Get the state of the stream2mmio-controller sidess.
@@ -40,9 +40,9 @@ STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_get_state(
  * @param[out] state           Point to the sid state.
  */
 STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_get_sid_state(
-               const stream2mmio_ID_t ID,
-               const stream2mmio_sid_ID_t sid_id,
-               stream2mmio_sid_state_t *state);
+    const stream2mmio_ID_t ID,
+    const stream2mmio_sid_ID_t sid_id,
+    stream2mmio_sid_state_t *state);
 /* end of NCI */
 
 /*****************************************************
@@ -61,9 +61,9 @@ STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_get_sid_state(
  * @return the value of the register.
  */
 STORAGE_CLASS_STREAM2MMIO_H hrt_data stream2mmio_reg_load(
-               const stream2mmio_ID_t ID,
-               const stream2mmio_sid_ID_t sid_id,
-               const uint32_t reg_idx);
+    const stream2mmio_ID_t ID,
+    const stream2mmio_sid_ID_t sid_id,
+    const uint32_t reg_idx);
 
 /**
  * @brief Dump the SID processor state.
@@ -72,7 +72,7 @@ STORAGE_CLASS_STREAM2MMIO_H hrt_data stream2mmio_reg_load(
  * @param[in]  state           Pointer to the register-state.
  */
 STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_print_sid_state(
-               stream2mmio_sid_state_t *state);
+    stream2mmio_sid_state_t    *state);
 /**
  * @brief Dump the stream2mmio state.
  * Dump the state of the ibuf-controller regiester-set.
@@ -81,8 +81,8 @@ STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_print_sid_state(
  * @param[in]  state           Pointer to the register-state.
  */
 STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_dump_state(
-               const stream2mmio_ID_t ID,
-               stream2mmio_state_t *state);
+    const stream2mmio_ID_t ID,
+    stream2mmio_state_t *state);
 /**
  * @brief Store a value to the register.
  * Store a value to the registe of the stream2mmio-controller.
@@ -93,9 +93,9 @@ STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_dump_state(
  *
  */
 STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_reg_store(
-               const stream2mmio_ID_t ID,
-               const hrt_address reg,
-               const hrt_data value);
+    const stream2mmio_ID_t ID,
+    const hrt_address reg,
+    const hrt_data value);
 /* end of DLI */
 
 #endif /* __ISYS_STREAM2MMIO_PUBLIC_H_INCLUDED__ */
index db3eb31bc865282fdc1ef4f6953b990522666ddf..278f9cd85a004784f8c4ad2a0e199304a2807adc 100644 (file)
@@ -27,8 +27,8 @@
  \return none, MMU[ID].page_table_base_index = base_index
  */
 void mmu_set_page_table_base_index(
-       const mmu_ID_t          ID,
-       const hrt_data          base_index);
+    const mmu_ID_t             ID,
+    const hrt_data             base_index);
 
 /*! Get the page table base index of MMU[ID]
 
@@ -38,7 +38,7 @@ void mmu_set_page_table_base_index(
  \return MMU[ID].page_table_base_index
  */
 hrt_data mmu_get_page_table_base_index(
-       const mmu_ID_t          ID);
+    const mmu_ID_t             ID);
 
 /*! Invalidate the page table cache of MMU[ID]
 
@@ -47,7 +47,7 @@ hrt_data mmu_get_page_table_base_index(
  \return none
  */
 void mmu_invalidate_cache(
-       const mmu_ID_t          ID);
+    const mmu_ID_t             ID);
 
 /*! Invalidate the page table cache of all MMUs
 
@@ -64,9 +64,9 @@ void mmu_invalidate_cache_all(void);
  \return none, MMU[ID].ctrl[reg] = value
  */
 static inline void mmu_reg_store(
-       const mmu_ID_t          ID,
-       const unsigned int      reg,
-       const hrt_data          value)
+    const mmu_ID_t             ID,
+    const unsigned int reg,
+    const hrt_data             value)
 {
        assert(ID < N_MMU_ID);
        assert(MMU_BASE[ID] != (hrt_address) - 1);
@@ -83,8 +83,8 @@ static inline void mmu_reg_store(
  \return MMU[ID].ctrl[reg]
  */
 static inline hrt_data mmu_reg_load(
-       const mmu_ID_t          ID,
-       const unsigned int      reg)
+    const mmu_ID_t             ID,
+    const unsigned int reg)
 {
        assert(ID < N_MMU_ID);
        assert(MMU_BASE[ID] != (hrt_address) - 1);
index 411ae2272557ac2cdfc2917705dd615815a134b2..ba67a276ce5586b6aff47f9a4d577460bbed52b5 100644 (file)
@@ -29,8 +29,8 @@
  * @param[out] state   Point to the register-state.
  */
 STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_get_state(
-               const pixelgen_ID_t ID,
-               pixelgen_ctrl_state_t *state);
+    const pixelgen_ID_t ID,
+    pixelgen_ctrl_state_t *state);
 /**
  * @brief Dump the pixelgen state.
  * Dump the state of the pixelgen regiester-set.
@@ -39,8 +39,8 @@ STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_get_state(
  * @param[in]  state   Point to the register-state.
  */
 STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_dump_state(
-               const pixelgen_ID_t ID,
-               pixelgen_ctrl_state_t *state);
+    const pixelgen_ID_t ID,
+    pixelgen_ctrl_state_t *state);
 /* end of NCI */
 
 /*****************************************************
@@ -58,8 +58,8 @@ STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_dump_state(
  * @return the value of the register.
  */
 STORAGE_CLASS_PIXELGEN_H hrt_data pixelgen_ctrl_reg_load(
-       const pixelgen_ID_t ID,
-       const hrt_address reg);
+    const pixelgen_ID_t ID,
+    const hrt_address reg);
 /**
  * @brief Store a value to the register.
  * Store a value to the registe of the pixelgen
@@ -70,9 +70,9 @@ STORAGE_CLASS_PIXELGEN_H hrt_data pixelgen_ctrl_reg_load(
  *
  */
 STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_reg_store(
-       const pixelgen_ID_t ID,
-       const hrt_address reg,
-       const hrt_data value);
+    const pixelgen_ID_t ID,
+    const hrt_address reg,
+    const hrt_data value);
 /* end of DLI */
 
 #endif /* USE_INPUT_SYSTEM_VERSION_2401 */
index ce3f2404e057d528c08fc38b316761a9c1b0b44f..b8db5469b592dd54e048ddbca10feee463c8144f 100644 (file)
@@ -29,8 +29,8 @@ typedef struct sp_stall_s             sp_stall_t;
  \return none, if(cnd) enable(SP[ID].irq) else disable(SP[ID].irq)
  */
 void cnd_sp_irq_enable(
-       const sp_ID_t           ID,
-       const bool                      cnd);
+    const sp_ID_t              ID,
+    const bool                 cnd);
 
 /*! Read the state of cell SP[ID]
 
@@ -41,9 +41,9 @@ void cnd_sp_irq_enable(
  \return none, state = SP[ID].state, stall = SP[ID].stall
  */
 void sp_get_state(
-       const sp_ID_t           ID,
-       sp_state_t                      *state,
-       sp_stall_t                      *stall);
+    const sp_ID_t              ID,
+    sp_state_t                 *state,
+    sp_stall_t                 *stall);
 
 /*! Write to the status and control register of SP[ID]
 
@@ -54,9 +54,9 @@ void sp_get_state(
  \return none, SP[ID].sc[reg] = value
  */
 STORAGE_CLASS_SP_H void sp_ctrl_store(
-       const sp_ID_t           ID,
-       const hrt_address       reg,
-       const hrt_data          value);
+    const sp_ID_t              ID,
+    const hrt_address  reg,
+    const hrt_data             value);
 
 /*! Read from the status and control register of SP[ID]
 
@@ -67,8 +67,8 @@ STORAGE_CLASS_SP_H void sp_ctrl_store(
  \return SP[ID].sc[reg]
  */
 STORAGE_CLASS_SP_H hrt_data sp_ctrl_load(
-       const sp_ID_t           ID,
-       const hrt_address       reg);
+    const sp_ID_t              ID,
+    const hrt_address  reg);
 
 /*! Get the status of a bitfield in the control register of SP[ID]
 
@@ -79,9 +79,9 @@ STORAGE_CLASS_SP_H hrt_data sp_ctrl_load(
  \return  (SP[ID].sc[reg] & (1<<bit)) != 0
  */
 STORAGE_CLASS_SP_H bool sp_ctrl_getbit(
-       const sp_ID_t           ID,
-       const hrt_address       reg,
-       const unsigned int      bit);
+    const sp_ID_t              ID,
+    const hrt_address  reg,
+    const unsigned int bit);
 
 /*! Set a bitfield in the control register of SP[ID]
 
@@ -92,9 +92,9 @@ STORAGE_CLASS_SP_H bool sp_ctrl_getbit(
  \return none, SP[ID].sc[reg] |= (1<<bit)
  */
 STORAGE_CLASS_SP_H void sp_ctrl_setbit(
-       const sp_ID_t           ID,
-       const hrt_address       reg,
-       const unsigned int      bit);
+    const sp_ID_t              ID,
+    const hrt_address  reg,
+    const unsigned int bit);
 
 /*! Clear a bitfield in the control register of SP[ID]
 
@@ -105,9 +105,9 @@ STORAGE_CLASS_SP_H void sp_ctrl_setbit(
  \return none, SP[ID].sc[reg] &= ~(1<<bit)
  */
 STORAGE_CLASS_SP_H void sp_ctrl_clearbit(
-       const sp_ID_t           ID,
-       const hrt_address       reg,
-       const unsigned int      bit);
+    const sp_ID_t              ID,
+    const hrt_address  reg,
+    const unsigned int bit);
 
 /*! Write to the DMEM of SP[ID]
 
@@ -119,10 +119,10 @@ STORAGE_CLASS_SP_H void sp_ctrl_clearbit(
  \return none, SP[ID].dmem[addr...addr+size-1] = data
  */
 STORAGE_CLASS_SP_H void sp_dmem_store(
-       const sp_ID_t           ID,
-       hrt_address             addr,
-       const void                      *data,
-       const size_t            size);
+    const sp_ID_t              ID,
+    hrt_address                addr,
+    const void                 *data,
+    const size_t               size);
 
 /*! Read from the DMEM of SP[ID]
 
@@ -134,10 +134,10 @@ STORAGE_CLASS_SP_H void sp_dmem_store(
  \return none, data = SP[ID].dmem[addr...addr+size-1]
  */
 STORAGE_CLASS_SP_H void sp_dmem_load(
-       const sp_ID_t           ID,
-       const hrt_address       addr,
-       void                    *data,
-       const size_t            size);
+    const sp_ID_t              ID,
+    const hrt_address  addr,
+    void                       *data,
+    const size_t               size);
 
 /*! Write a 8-bit datum to the DMEM of SP[ID]
 
@@ -149,9 +149,9 @@ STORAGE_CLASS_SP_H void sp_dmem_load(
  \return none, SP[ID].dmem[addr...addr+size-1] = data
  */
 STORAGE_CLASS_SP_H void sp_dmem_store_uint8(
-       const sp_ID_t           ID,
-       hrt_address             addr,
-       const uint8_t           data);
+    const sp_ID_t              ID,
+    hrt_address                addr,
+    const uint8_t              data);
 
 /*! Write a 16-bit datum to the DMEM of SP[ID]
 
@@ -163,9 +163,9 @@ STORAGE_CLASS_SP_H void sp_dmem_store_uint8(
  \return none, SP[ID].dmem[addr...addr+size-1] = data
  */
 STORAGE_CLASS_SP_H void sp_dmem_store_uint16(
-       const sp_ID_t           ID,
-       hrt_address             addr,
-       const uint16_t          data);
+    const sp_ID_t              ID,
+    hrt_address                addr,
+    const uint16_t             data);
 
 /*! Write a 32-bit datum to the DMEM of SP[ID]
 
@@ -177,9 +177,9 @@ STORAGE_CLASS_SP_H void sp_dmem_store_uint16(
  \return none, SP[ID].dmem[addr...addr+size-1] = data
  */
 STORAGE_CLASS_SP_H void sp_dmem_store_uint32(
-       const sp_ID_t           ID,
-       hrt_address             addr,
-       const uint32_t          data);
+    const sp_ID_t              ID,
+    hrt_address                addr,
+    const uint32_t             data);
 
 /*! Load a 8-bit datum from the DMEM of SP[ID]
 
@@ -191,8 +191,8 @@ STORAGE_CLASS_SP_H void sp_dmem_store_uint32(
  \return none, data = SP[ID].dmem[addr...addr+size-1]
  */
 STORAGE_CLASS_SP_H uint8_t sp_dmem_load_uint8(
-       const sp_ID_t           ID,
-       const hrt_address       addr);
+    const sp_ID_t              ID,
+    const hrt_address  addr);
 
 /*! Load a 16-bit datum from the DMEM of SP[ID]
 
@@ -204,8 +204,8 @@ STORAGE_CLASS_SP_H uint8_t sp_dmem_load_uint8(
  \return none, data = SP[ID].dmem[addr...addr+size-1]
  */
 STORAGE_CLASS_SP_H uint16_t sp_dmem_load_uint16(
-       const sp_ID_t           ID,
-       const hrt_address       addr);
+    const sp_ID_t              ID,
+    const hrt_address  addr);
 
 /*! Load a 32-bit datum from the DMEM of SP[ID]
 
@@ -217,7 +217,7 @@ STORAGE_CLASS_SP_H uint16_t sp_dmem_load_uint16(
  \return none, data = SP[ID].dmem[addr...addr+size-1]
  */
 STORAGE_CLASS_SP_H uint32_t sp_dmem_load_uint32(
-       const sp_ID_t           ID,
-       const hrt_address       addr);
+    const sp_ID_t              ID,
+    const hrt_address  addr);
 
 #endif /* __SP_PUBLIC_H_INCLUDED__ */
index 6472ac5f119772fdd1a1cc8e91e9ba99e19cfd06..5f9277adb2ab9cbb6f051f3ac31721193a7ce159 100644 (file)
  \return none, TIMED_CTRL[ID].ctrl[reg] = value
  */
 STORAGE_CLASS_TIMED_CTRL_H void timed_ctrl_reg_store(
-       const timed_ctrl_ID_t   ID,
-       const unsigned int              reg_addr,
-       const hrt_data                  value);
+    const timed_ctrl_ID_t      ID,
+    const unsigned int         reg_addr,
+    const hrt_data                     value);
 
 void timed_ctrl_snd_commnd(
-       const timed_ctrl_ID_t                           ID,
-       hrt_data                                mask,
-       hrt_data                                condition,
-       hrt_data                                counter,
-       hrt_address                             addr,
-       hrt_data                                value);
+    const timed_ctrl_ID_t                              ID,
+    hrt_data                           mask,
+    hrt_data                           condition,
+    hrt_data                           counter,
+    hrt_address                                addr,
+    hrt_data                           value);
 
 void timed_ctrl_snd_sp_commnd(
-       const timed_ctrl_ID_t                           ID,
-       hrt_data                                mask,
-       hrt_data                                condition,
-       hrt_data                                counter,
-       const sp_ID_t                   SP_ID,
-       hrt_address                             offset,
-       hrt_data                                value);
+    const timed_ctrl_ID_t                              ID,
+    hrt_data                           mask,
+    hrt_data                           condition,
+    hrt_data                           counter,
+    const sp_ID_t                      SP_ID,
+    hrt_address                                offset,
+    hrt_data                           value);
 
 void timed_ctrl_snd_gpio_commnd(
-       const timed_ctrl_ID_t                           ID,
-       hrt_data                                mask,
-       hrt_data                                condition,
-       hrt_data                                counter,
-       const gpio_ID_t                 GPIO_ID,
-       hrt_address                             offset,
-       hrt_data                                value);
+    const timed_ctrl_ID_t                              ID,
+    hrt_data                           mask,
+    hrt_data                           condition,
+    hrt_data                           counter,
+    const gpio_ID_t                    GPIO_ID,
+    hrt_address                                offset,
+    hrt_data                           value);
 
 #endif /* __TIMED_CTRL_PUBLIC_H_INCLUDED__ */
index 32fd13efe8020e2965ee8087163c90890400ec62..dc63ff0c9c6aee00bf9249fd8e208e4cc52c0e68 100644 (file)
@@ -137,10 +137,10 @@ hrt_vaddress mmgr_alloc_attr(const size_t size, const uint16_t attribute);
  \return vaddress
  */
 hrt_vaddress mmgr_mmap(
-       const void __user *ptr,
-       const size_t size,
-       u16 attribute,
-       void *context);
+    const void __user *ptr,
+    const size_t size,
+    u16 attribute,
+    void *context);
 
 /*! Zero initialise an allocation in memory
 
index 53937aa69dd24d4d963ce876bdb31f74228d8d9a..546b93ca118631a800470a34b42349efbb59dcc9 100644 (file)
@@ -29,10 +29,10 @@ more details.
 #include "ia_css_err.h"
 
 bool reallocate_buffer(
-       hrt_vaddress * curr_buf,
-       size_t *curr_size,
-       size_t needed_size,
-       bool force,
-       enum ia_css_err *err);
+    hrt_vaddress *curr_buf,
+    size_t *curr_size,
+    size_t needed_size,
+    bool force,
+    enum ia_css_err *err);
 
 #endif /*__MEMORY_REALLOC_H_INCLUDED__*/
index 5fbabf4d372203aff398bfcd678d793e28a5e0b0..8fa8d3e6f960aba647d570f746970473d70f7f28 100644 (file)
  * @return     ERANGE on Destination size too small
  */
 static inline int memcpy_s(
-       void *dest_buf,
-       size_t dest_size,
-       const void *src_buf,
-       size_t src_size)
+    void *dest_buf,
+    size_t dest_size,
+    const void *src_buf,
+    size_t src_size)
 {
        if ((!src_buf) || (!dest_buf)) {
                /* Invalid arguments*/
@@ -61,8 +61,8 @@ static inline int memcpy_s(
  * @return     Returns 0 if src_str is NULL
  */
 static size_t strnlen_s(
-       const char *src_str,
-       size_t max_len)
+    const char *src_str,
+    size_t max_len)
 {
        size_t ix;
 
@@ -89,10 +89,10 @@ static size_t strnlen_s(
  * @return     Returns ERANGE on destination size too small
  */
 static inline int strncpy_s(
-       char *dest_str,
-       size_t dest_size,
-       const char *src_str,
-       size_t src_size)
+    char *dest_str,
+    size_t dest_size,
+    const char *src_str,
+    size_t src_size)
 {
        size_t len;
 
@@ -131,9 +131,9 @@ static inline int strncpy_s(
  * @return     Returns ERANGE on destination size too small
  */
 static inline int strcpy_s(
-       char *dest_str,
-       size_t dest_size,
-       const char *src_str)
+    char *dest_str,
+    size_t dest_size,
+    const char *src_str)
 {
        size_t len;
 
index 0fe1ce1d122e1e822e95f8cd132edc85482bb58d..a7089ee7462a57276526355ca92268b6749db54f 100644 (file)
@@ -74,20 +74,18 @@ sh_css_encode_tag_descr(struct sh_css_tag_descr *tag)
        }
        exp_id = tag->exp_id;
 
-       if (exp_id != 0)
-       {
+       if (exp_id != 0) {
                /* we encode either an exp_id or capture data */
                assert((num_captures == 0) && (skip == 0) && (offset == 0));
 
                encoded_tag = TAG_EXP | (exp_id & 0xFF) << TAG_EXP_ID_SHIFT;
-       } else
-       {
+       } else {
                encoded_tag = TAG_CAP
-                               | ((num_captures_sign & 0x00000001) << TAG_NUM_CAPTURES_SIGN_SHIFT)
-                               | ((offset_sign       & 0x00000001) << TAG_OFFSET_SIGN_SHIFT)
-                               | ((num_captures      & 0x000000FF) << TAG_NUM_CAPTURES_SHIFT)
-                               | ((skip              & 0x000000FF) << TAG_OFFSET_SHIFT)
-                               | ((offset            & 0x000000FF) << TAG_SKIP_SHIFT);
+                             | ((num_captures_sign & 0x00000001) << TAG_NUM_CAPTURES_SIGN_SHIFT)
+                             | ((offset_sign       & 0x00000001) << TAG_OFFSET_SIGN_SHIFT)
+                             | ((num_captures      & 0x000000FF) << TAG_NUM_CAPTURES_SHIFT)
+                             | ((skip              & 0x000000FF) << TAG_OFFSET_SHIFT)
+                             | ((offset            & 0x000000FF) << TAG_SKIP_SHIFT);
        }
        return encoded_tag;
 }
index 919574a2039172e9e44ef213a69f182f9f55247f..a79941a2e0f2a526fd177c3d00f5b3010f29fe00 100644 (file)
@@ -121,8 +121,8 @@ ia_css_get_3a_statistics(struct ia_css_3a_statistics           *host_stats,
  * */
 void
 ia_css_translate_3a_statistics(
-               struct ia_css_3a_statistics               *host_stats,
-               const struct ia_css_isp_3a_statistics_map *isp_stats);
+    struct ia_css_3a_statistics               *host_stats,
+    const struct ia_css_isp_3a_statistics_map *isp_stats);
 
 /* Convenience functions for alloc/free of certain datatypes */
 
@@ -172,8 +172,8 @@ ia_css_3a_statistics_free(struct ia_css_3a_statistics *me);
 */
 struct ia_css_isp_3a_statistics_map *
 ia_css_isp_3a_statistics_map_allocate(
-       const struct ia_css_isp_3a_statistics *isp_stats,
-       void *data_ptr);
+    const struct ia_css_isp_3a_statistics *isp_stats,
+    void *data_ptr);
 
 /* @brief Free the 3a statistics map
  * @param[in]  me Pointer to the 3a statistics map
index 3aac8d8f6023191f485bfaaa8f51beed39541003..a8202aabdd3834db67110572ecbafa91880f0dac 100644 (file)
@@ -78,7 +78,8 @@ struct ia_css_blob_descr;
 struct ia_css_blob_info {
        /** Static blob data */
        u32 offset;             /** Blob offset in fw file */
-       struct ia_css_isp_param_memory_offsets memory_offsets;  /** offset wrt hdr in bytes */
+       struct ia_css_isp_param_memory_offsets
+               memory_offsets;  /** offset wrt hdr in bytes */
        u32 prog_name_offset;  /** offset wrt hdr in bytes */
        u32 size;                       /** Size of blob */
        u32 padding_size;       /** total cummulative of bytes added due to section alignment */
@@ -95,8 +96,10 @@ struct ia_css_blob_info {
        u32 bss_target; /** Start position of bss in SP dmem */
        u32 bss_size;           /** Size of bss section */
        /** Dynamic data filled by loader */
-       CSS_ALIGN(const void  *code, 8);                /** Code section absolute pointer within fw, code = icache + text */
-       CSS_ALIGN(const void  *data, 8);                /** Data section absolute pointer within fw, data = data + bss */
+       CSS_ALIGN(const void  *code,
+                 8);           /** Code section absolute pointer within fw, code = icache + text */
+       CSS_ALIGN(const void  *data,
+                 8);           /** Data section absolute pointer within fw, data = data + bss */
 };
 
 struct ia_css_binary_input_info {
@@ -216,7 +219,7 @@ struct ia_css_binary_info {
        struct ia_css_binary_uds_info           uds;
        struct ia_css_binary_block_info         block;
        struct ia_css_isp_param_isp_segments    mem_initializers;
-/* MW: Packing (related) bools in an integer ?? */
+       /* MW: Packing (related) bools in an integer ?? */
        struct {
 #ifdef ISP2401
                u8      luma_only;
@@ -253,7 +256,7 @@ struct ia_css_binary_info {
                u8 padding[2];
        } enable;
        struct {
-/* DMA channel ID: [0,...,HIVE_ISP_NUM_DMA_CHANNELS> */
+               /* DMA channel ID: [0,...,HIVE_ISP_NUM_DMA_CHANNELS> */
                u8      ref_y_channel;
                u8      ref_c_channel;
                u8      tnr_channel;
@@ -284,7 +287,8 @@ struct ia_css_binary_xinfo {
        enum ia_css_frame_format     output_formats[IA_CSS_FRAME_FORMAT_NUM];
 
        CSS_ALIGN(s32        num_vf_formats, 8); /** number of supported vf formats */
-       enum ia_css_frame_format     vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /** types of supported vf formats */
+       enum ia_css_frame_format
+       vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /** types of supported vf formats */
        u8                           num_output_pins;
        ia_css_ptr                   xmem_addr;
 
index 3bb641d8bb57a6461452c3f27fbda1255cf33d79..403fa9416d0fa3a376aa347367cb06c9c4b6895d 100644 (file)
@@ -57,7 +57,8 @@ struct ia_css_buffer {
        /** exposure id for this buffer; 0 = not available
             see ia_css_event_public.h for more detail. */
        union {
-               struct ia_css_isp_3a_statistics  *stats_3a;    /** 3A statistics & optionally RGBY statistics. */
+               struct ia_css_isp_3a_statistics
+                       *stats_3a;    /** 3A statistics & optionally RGBY statistics. */
                struct ia_css_isp_dvs_statistics *stats_dvs;   /** DVS statistics. */
                struct ia_css_isp_skc_dvs_statistics *stats_skc_dvs;  /** SKC DVS statistics. */
                struct ia_css_frame              *frame;       /** Frame buffer. */
@@ -65,8 +66,10 @@ struct ia_css_buffer {
                struct ia_css_metadata           *metadata;    /** Sensor metadata. */
        } data; /** Buffer data pointer. */
        u64 driver_cookie; /** cookie for the driver */
-       struct ia_css_time_meas timing_data; /** timing data (readings from the timer) */
-       struct ia_css_clock_tick isys_eof_clock_tick; /** ISYS's end of frame timer tick*/
+       struct ia_css_time_meas
+               timing_data; /** timing data (readings from the timer) */
+       struct ia_css_clock_tick
+               isys_eof_clock_tick; /** ISYS's end of frame timer tick*/
 };
 
 /* @brief Dequeue param buffers from sp2host_queue
index 9e01ed2c1bbeb49e4e0c39c1981dcd44959827ad..d9bd1861e50d44d561a58e237cf8d9dbbcd80eb9 100644 (file)
  * the fw pointer could be freed after this function completes.
  */
 enum ia_css_err ia_css_init(
-       const struct ia_css_env *env,
-       const struct ia_css_fw  *fw,
-       u32                 l1_base,
-       enum ia_css_irq_type     irq_type);
+    const struct ia_css_env *env,
+    const struct ia_css_fw  *fw,
+    u32                 l1_base,
+    enum ia_css_irq_type     irq_type);
 
 /* @brief Un-initialize the CSS API.
  * @return     None
index 84a960b7abbc046169a92a44bac4e499bd8285d3..b2bf7d540b62172812be9bd8301b42dcd24a53c8 100644 (file)
@@ -54,6 +54,7 @@ void
 ia_css_device_load(const hrt_address addr, void *data, const size_t size);
 
 void
-ia_css_device_store(const hrt_address addr, const void *data, const size_t size);
+ia_css_device_store(const hrt_address addr, const void *data,
+                   const size_t size);
 
 #endif /* _IA_CSS_DEVICE_ACCESS_H */
index d635a747f13db8d464856bf5cf8aa2444972b481..e647f73c3bd6b9221c8d2b8c2388c5055f282194 100644 (file)
@@ -111,8 +111,8 @@ ia_css_get_dvs_statistics(struct ia_css_dvs_statistics *host_stats,
  */
 void
 ia_css_translate_dvs_statistics(
-               struct ia_css_dvs_statistics *host_stats,
-               const struct ia_css_isp_dvs_statistics_map *isp_stats);
+    struct ia_css_dvs_statistics *host_stats,
+    const struct ia_css_isp_dvs_statistics_map *isp_stats);
 
 /* @brief Copy DVS 2.0 statistics from an ISP buffer to a host buffer.
  * @param[in]  host_stats Host buffer
@@ -145,8 +145,8 @@ ia_css_get_dvs2_statistics(struct ia_css_dvs2_statistics *host_stats,
  */
 void
 ia_css_translate_dvs2_statistics(
-               struct ia_css_dvs2_statistics      *host_stats,
-               const struct ia_css_isp_dvs_statistics_map *isp_stats);
+    struct ia_css_dvs2_statistics         *host_stats,
+    const struct ia_css_isp_dvs_statistics_map *isp_stats);
 
 /* @brief Copy DVS statistics from an ISP buffer to a host buffer.
  * @param[in] type - DVS statistics type
@@ -275,8 +275,8 @@ ia_css_dvs2_6axis_config_free(struct ia_css_dvs_6axis_config *dvs_6axis_config);
 */
 struct ia_css_isp_dvs_statistics_map *
 ia_css_isp_dvs_statistics_map_allocate(
-       const struct ia_css_isp_dvs_statistics *isp_stats,
-       void *data_ptr);
+    const struct ia_css_isp_dvs_statistics *isp_stats,
+    void *data_ptr);
 
 /* @brief Free the dvs statistics map
  * @param[in]  me Pointer to the dvs statistics map
index d7d7f0a995e5c0370f3ab89c1c8381279f3abbc5..48059c026c8bbf0ad59f7cb65b4abe17477eed2f 100644 (file)
@@ -49,7 +49,7 @@ struct ia_css_fw {
  */
 enum ia_css_err
 ia_css_load_firmware(const struct ia_css_env *env,
-           const struct ia_css_fw  *fw);
+                    const struct ia_css_fw  *fw);
 
 /* @brief Unloads the firmware
  * @return     None
index a32fb299fa6285141ab2b48f6a8fd27d66cd3ba1..69e9143e5418a1843f544fdc9d19da90d9864a74 100644 (file)
@@ -282,7 +282,7 @@ ia_css_frame_allocate_contiguous(struct ia_css_frame **frame,
  */
 enum ia_css_err
 ia_css_frame_allocate_contiguous_from_info(struct ia_css_frame **frame,
-                                         const struct ia_css_frame_info *info);
+       const struct ia_css_frame_info *info);
 
 /* @brief Allocate a CSS frame structure using a frame info structure.
  *
@@ -295,7 +295,7 @@ ia_css_frame_allocate_contiguous_from_info(struct ia_css_frame **frame,
  */
 enum ia_css_err
 ia_css_frame_create_from_info(struct ia_css_frame **frame,
-       const struct ia_css_frame_info *info);
+                             const struct ia_css_frame_info *info);
 
 /* @brief Set a mapped data buffer to a CSS frame
  *
@@ -312,8 +312,8 @@ ia_css_frame_create_from_info(struct ia_css_frame **frame,
  */
 enum ia_css_err
 ia_css_frame_set_data(struct ia_css_frame *frame,
-       const ia_css_ptr   mapped_data,
-       size_t data_size_bytes);
+                     const ia_css_ptr   mapped_data,
+                     size_t data_size_bytes);
 
 /* @brief Map an existing frame data pointer to a CSS frame.
  *
index c8840138899ac16360832bb6ddc4680b8ba49291..7716373553e0ed108eb235acef61ca411eab9383 100644 (file)
@@ -110,7 +110,7 @@ enum ia_css_rx_irq_info {
        IA_CSS_RX_IRQ_INFO_EXIT_SLEEP_MODE  = 1U << 2, /** exited sleep mode */
        IA_CSS_RX_IRQ_INFO_ECC_CORRECTED    = 1U << 3, /** ECC corrected */
        IA_CSS_RX_IRQ_INFO_ERR_SOT          = 1U << 4,
-                                               /** Start of transmission */
+       /** Start of transmission */
        IA_CSS_RX_IRQ_INFO_ERR_SOT_SYNC     = 1U << 5, /** SOT sync (??) */
        IA_CSS_RX_IRQ_INFO_ERR_CONTROL      = 1U << 6, /** Control (??) */
        IA_CSS_RX_IRQ_INFO_ERR_ECC_DOUBLE   = 1U << 7, /** Double ECC */
index 269392d4d5d4eb66924d311d4120e7df73e5551a..8d1356047448b01ac0f033105bb0822a6df3cd73 100644 (file)
@@ -79,7 +79,7 @@ mmgr_mmap(const void __user *ptr, const size_t size,
        struct hrt_userbuffer_attr *userbuffer_attr = context;
 
        return hrt_isp_css_mm_alloc_user_ptr(
-                       size, ptr, userbuffer_attr->pgnr,
-                       userbuffer_attr->type,
-                       attribute & HRT_BUF_FLAG_CACHED);
+                  size, ptr, userbuffer_attr->pgnr,
+                  userbuffer_attr->type,
+                  attribute & HRT_BUF_FLAG_CACHED);
 }
index 38305aa26b9b3d781a25b78099374d0fd1996bdf..0212d71b3355ed9e03cded94e707ef781accefa6 100644 (file)
@@ -42,8 +42,8 @@ struct ia_css_metadata_info {
 
 struct ia_css_metadata {
        struct ia_css_metadata_info info;    /** Layout info */
-       ia_css_ptr                  address; /** CSS virtual address */
-       u32                 exp_id;
+       ia_css_ptr                  address; /** CSS virtual address */
+       u32                 exp_id;
        /** Exposure ID, see ia_css_event_public.h for more detail */
 };
 
index 367b2aafa5e83f04b3709966fbc453457f35a3c0..c02138ee25117d508707e6764f6f9acf4da3f278 100644 (file)
@@ -39,7 +39,7 @@
  */
 enum ia_css_err
 ia_css_mipi_frame_specify(const unsigned int   size_mem_words,
-                               const bool contiguous);
+                         const bool contiguous);
 
 #if !defined(HAS_NO_INPUT_SYSTEM)
 /* @brief Register size of a CSS MIPI frame for check during capturing.
@@ -56,7 +56,7 @@ ia_css_mipi_frame_specify(const unsigned int  size_mem_words,
  */
 enum ia_css_err
 ia_css_mipi_frame_enable_check_on_size(const enum mipi_port_id port,
-                               const unsigned int      size_mem_words);
+                                      const unsigned int       size_mem_words);
 #endif
 
 /* @brief Calculate the size of a mipi frame.
@@ -73,10 +73,10 @@ ia_css_mipi_frame_enable_check_on_size(const enum mipi_port_id port,
  */
 enum ia_css_err
 ia_css_mipi_frame_calculate_size(const unsigned int width,
-                               const unsigned int height,
-                               const enum atomisp_input_format format,
-                               const bool hasSOLandEOL,
-                               const unsigned int embedded_data_size_words,
-                               unsigned int *size_mem_words);
+                                const unsigned int height,
+                                const enum atomisp_input_format format,
+                                const bool hasSOLandEOL,
+                                const unsigned int embedded_data_size_words,
+                                unsigned int *size_mem_words);
 
 #endif /* __IA_CSS_MIPI_H */
index f0963968f22ce0dce9045d198cf1ac42d60e8f2f..fed632cef5a961a52ce6dd258c5e63aac6967fac 100644 (file)
@@ -187,7 +187,7 @@ void ia_css_pipe_map_queue(struct ia_css_pipe *pipe, bool map);
 
 enum ia_css_err
 sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
-                               struct ia_css_isp_parameters *params,
-                               bool commit, struct ia_css_pipe *pipe);
+                              struct ia_css_isp_parameters *params,
+                              bool commit, struct ia_css_pipe *pipe);
 
 #endif /* __IA_CSS_PIPE_H__ */
index 57542d451ec0a3e1082681dcafab181dfb3edf24..4da21d87d0a6497ade1702303c4d665f2bbbec20 100644 (file)
@@ -296,7 +296,7 @@ ia_css_pipe_get_info(const struct ia_css_pipe *pipe,
  */
 enum ia_css_err
 ia_css_pipe_set_isp_config(struct ia_css_pipe *pipe,
-                                                  struct ia_css_isp_config *config);
+                          struct ia_css_isp_config *config);
 
 /* @brief Controls when the Event generator raises an IRQ to the Host.
  *
@@ -462,8 +462,8 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
  */
 enum ia_css_err
 ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe,
-                          u32 fw_handle,
-                          bool  enable);
+                             u32 fw_handle,
+                             bool  enable);
 
 /* @brief  Get the state (Enable or Disable) of the Extension stage in the
  *          given pipe.
@@ -488,8 +488,8 @@ ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe,
  */
 enum ia_css_err
 ia_css_pipe_get_qos_ext_state(struct ia_css_pipe *pipe,
-                          u32 fw_handle,
-                          bool *enable);
+                             u32 fw_handle,
+                             bool *enable);
 
 #ifdef ISP2401
 /* @brief  Update mapped CSS and ISP arguments for QoS pipe during SP runtime.
@@ -509,9 +509,10 @@ ia_css_pipe_get_qos_ext_state(struct ia_css_pipe *pipe,
  * maintained on IPU3 or further.}
  */
 enum ia_css_err
-ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe, uint32_t fw_handle,
-                       struct ia_css_isp_param_css_segments *css_seg,
-                       struct ia_css_isp_param_isp_segments *isp_seg);
+ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe,
+                                     uint32_t fw_handle,
+                                     struct ia_css_isp_param_css_segments *css_seg,
+                                     struct ia_css_isp_param_isp_segments *isp_seg);
 
 #endif
 /* @brief Get selected configuration settings
@@ -521,7 +522,7 @@ ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe, uint32_t fw_hand
  */
 void
 ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
-                            struct ia_css_isp_config *config);
+                          struct ia_css_isp_config *config);
 
 /* @brief Set the scaler lut on this pipe. A copy of lut is made in the inuit
  *         address space. So the LUT can be freed by caller.
@@ -541,7 +542,7 @@ ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
  */
 enum ia_css_err
 ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe,
-                               const void *lut);
+                              const void *lut);
 /* @brief Checking of DVS statistics ability
  * @param[in]  pipe_info       The pipe info.
  * @return             true - has DVS statistics ability
@@ -571,8 +572,8 @@ bool ia_css_pipe_has_dvs_stats(struct ia_css_pipe_info *pipe_info);
  */
 enum ia_css_err
 ia_css_pipe_override_frame_format(struct ia_css_pipe *pipe,
-                               int output_pin,
-                               enum ia_css_frame_format format);
+                                 int output_pin,
+                                 enum ia_css_frame_format format);
 
 #endif
 #endif /* __IA_CSS_PIPE_PUBLIC_H */
index fb6e8c2ca8bfb011023a2c3488f66742c854719c..59484d38409ffa2e650e9f14f79d153a328edc12 100644 (file)
@@ -67,7 +67,8 @@ unsigned int
 ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream);
 
 bool
-sh_css_params_set_binning_factor(struct ia_css_stream *stream, unsigned int sensor_binning);
+sh_css_params_set_binning_factor(struct ia_css_stream *stream,
+                                unsigned int sensor_binning);
 
 void
 sh_css_invalidate_params(struct ia_css_stream *stream);
@@ -92,14 +93,14 @@ ia_css_get_isp_dis_coefficients(struct ia_css_stream *stream,
 
 void
 ia_css_get_isp_dvs2_coefficients(struct ia_css_stream *stream,
-       short *hor_coefs_odd_real,
-       short *hor_coefs_odd_imag,
-       short *hor_coefs_even_real,
-       short *hor_coefs_even_imag,
-       short *ver_coefs_odd_real,
-       short *ver_coefs_odd_imag,
-       short *ver_coefs_even_real,
-       short *ver_coefs_even_imag);
+                                short *hor_coefs_odd_real,
+                                short *hor_coefs_odd_imag,
+                                short *hor_coefs_even_real,
+                                short *hor_coefs_even_imag,
+                                short *ver_coefs_odd_real,
+                                short *ver_coefs_odd_imag,
+                                short *ver_coefs_even_real,
+                                short *ver_coefs_even_imag);
 
 enum ia_css_err
 ia_css_stream_isp_parameters_init(struct ia_css_stream *stream);
index f97b9eb2b19c23ca32d62e309cd2d54a8a6cf889..4cd29833584f5f6448819b6ff2e1c7c205313d8c 100644 (file)
@@ -23,7 +23,7 @@
 #include "../../../include/linux/atomisp_platform.h"
 
 unsigned int ia_css_util_input_format_bpp(
-       enum atomisp_input_format format,
-       bool two_ppc);
+    enum atomisp_input_format format,
+    bool two_ppc);
 
 #endif /* __ATOMISP_INPUT_FORMAT_H */
index a5ec4e100cec0ee1d9f7f6edafb38797a645327e..ff8d95aa77e347859103779bc46c7a1feb992fbb 100644 (file)
@@ -97,7 +97,8 @@ struct ia_css_stream_config {
                                                   will arrive. Use this field
                                                   to specify virtual channel id.
                                                   Valid values are: 0, 1, 2, 3 */
-       struct ia_css_stream_isys_stream_config isys_config[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
+       struct ia_css_stream_isys_stream_config
+               isys_config[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
        struct ia_css_stream_input_config input_config;
 
 #ifdef ISP2401
@@ -116,7 +117,7 @@ struct ia_css_stream_config {
                                            1, 2 or 4. */
        bool online; /** offline will activate RAW copy on SP, use this for
                          continuous capture. */
-               /* ISYS2401 usage: ISP receives data directly from sensor, no copy. */
+       /* ISYS2401 usage: ISP receives data directly from sensor, no copy. */
        unsigned int init_num_cont_raw_buf; /** initial number of raw buffers to
                                             allocate */
        unsigned int target_num_cont_raw_buf; /** total number of raw buffers to
@@ -127,8 +128,10 @@ struct ia_css_stream_config {
        bool disable_cont_viewfinder; /** disable continuous viewfinder for ZSL use case */
        s32 flash_gpio_pin; /** pin on which the flash is connected, -1 for no flash */
        int left_padding; /** The number of input-formatter left-paddings, -1 for default from binary.*/
-       struct ia_css_mipi_buffer_config mipi_buffer_config; /** mipi buffer configuration */
-       struct ia_css_metadata_config   metadata_config;     /** Metadata configuration. */
+       struct ia_css_mipi_buffer_config
+               mipi_buffer_config; /** mipi buffer configuration */
+       struct ia_css_metadata_config
+               metadata_config;     /** Metadata configuration. */
        bool ia_css_enable_raw_buffer_locking; /** Enable Raw Buffer Locking for HALv3 Support */
        bool lock_all;
        /** Lock all RAW buffers (true) or lock only buffers processed by
@@ -164,20 +167,20 @@ void ia_css_stream_config_defaults(struct ia_css_stream_config *stream_config);
  * create the internal structures and fill in the configuration data and pipes
  */
 
- /* @brief Creates a stream
- * @param[in]  stream_config The stream configuration.
- * @param[in]  num_pipes The number of pipes to incorporate in the stream.
- * @param[in]  pipes The pipes.
- * @param[out] stream The stream.
- * @return     IA_CSS_SUCCESS or the error code.
- *
- * This function will create a stream with a given configuration and given pipes.
- */
+/* @brief Creates a stream
+* @param[in]   stream_config The stream configuration.
+* @param[in]   num_pipes The number of pipes to incorporate in the stream.
+* @param[in]   pipes The pipes.
+* @param[out]  stream The stream.
+* @return      IA_CSS_SUCCESS or the error code.
+*
+* This function will create a stream with a given configuration and given pipes.
+*/
 enum ia_css_err
 ia_css_stream_create(const struct ia_css_stream_config *stream_config,
-                                        int num_pipes,
-                                        struct ia_css_pipe *pipes[],
-                                        struct ia_css_stream **stream);
+                    int num_pipes,
+                    struct ia_css_pipe *pipes[],
+                    struct ia_css_stream **stream);
 
 /* @brief Destroys a stream
  * @param[in]  stream The stream.
@@ -277,7 +280,8 @@ ia_css_stream_get_two_pixels_per_clock(const struct ia_css_stream *stream);
  * This function will Set the output frame stride (at the last pipe)
  */
 enum ia_css_err
-ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int output_padded_width);
+ia_css_stream_set_output_padded_width(struct ia_css_stream *stream,
+                                     unsigned int output_padded_width);
 
 /* @brief Return max number of continuous RAW frames.
  * @param[in]  stream The stream.
@@ -288,7 +292,8 @@ ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int
  * the system can support.
  */
 enum ia_css_err
-ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth);
+ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream,
+                                  int *buffer_depth);
 
 /* @brief Set nr of continuous RAW frames to use.
  *
@@ -342,9 +347,9 @@ ia_css_stream_get_buffer_depth(struct ia_css_stream *stream, int *buffer_depth);
  */
 enum ia_css_err
 ia_css_stream_capture(struct ia_css_stream *stream,
-                       int num_captures,
-                       unsigned int skip,
-                       int offset);
+                     int num_captures,
+                     unsigned int skip,
+                     int offset);
 
 /* @brief Specify which raw frame to tag based on exp_id found in frame info
  *
@@ -358,7 +363,7 @@ ia_css_stream_capture(struct ia_css_stream *stream,
  */
 enum ia_css_err
 ia_css_stream_capture_frame(struct ia_css_stream *stream,
-                       unsigned int exp_id);
+                           unsigned int exp_id);
 
 /* ===== VIDEO ===== */
 
@@ -452,9 +457,9 @@ ia_css_stream_send_input_line(const struct ia_css_stream *stream,
  */
 void
 ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
-                             enum atomisp_input_format format,
-                             const unsigned short *data,
-                             unsigned int width);
+                                      enum atomisp_input_format format,
+                                      const unsigned short *data,
+                                      unsigned int width);
 
 /* @brief End an input frame on the CSS input FIFO.
  *
@@ -499,8 +504,8 @@ ia_css_stream_request_flash(struct ia_css_stream *stream);
  */
 enum ia_css_err
 ia_css_stream_set_isp_config_on_pipe(struct ia_css_stream *stream,
-                            const struct ia_css_isp_config *config,
-                            struct ia_css_pipe *pipe);
+                                    const struct ia_css_isp_config *config,
+                                    struct ia_css_pipe *pipe);
 
 /* @brief Configure a stream with filter coefficients.
  *        @deprecated {Replaced by
@@ -519,8 +524,8 @@ ia_css_stream_set_isp_config_on_pipe(struct ia_css_stream *stream,
  */
 enum ia_css_err
 ia_css_stream_set_isp_config(
-       struct ia_css_stream *stream,
-       const struct ia_css_isp_config *config);
+    struct ia_css_stream *stream,
+    const struct ia_css_isp_config *config);
 
 /* @brief Get selected configuration settings
  * @param[in]  stream  The stream.
index 4ec86142160067f88396277dfb04655cd3a48d2f..82cbe9fca72ba84dc954f98533974dd06b15e93c 100644 (file)
@@ -79,6 +79,6 @@ struct ia_css_time_meas {
 */
 enum ia_css_err
 ia_css_timer_get_current_tick(
-       struct ia_css_clock_tick *curr_ts);
+    struct ia_css_clock_tick *curr_ts);
 
 #endif  /* __IA_CSS_TIMER_H */
index add400b910544307d9fb8e36e4d1772f903bf54c..cb6a82392821d228cc9901e971ea98605122da71 100644 (file)
@@ -316,10 +316,10 @@ struct ia_css_shading_info {
                          output_width = input_width * bayer_scale_hor_ratio_out
                                                / bayer_scale_hor_ratio_in */
 #else
-                               /** Horizontal ratio of bayer scaling between input width and output width,
-                                    for the scaling which should be done before shading correction.
-                                       output_width = input_width * bayer_scale_hor_ratio_out
-                                                                       / bayer_scale_hor_ratio_in + 0.5 */
+                       /** Horizontal ratio of bayer scaling between input width and output width,
+                            for the scaling which should be done before shading correction.
+                               output_width = input_width * bayer_scale_hor_ratio_out
+                                                               / bayer_scale_hor_ratio_in + 0.5 */
 #endif
                        u32 bayer_scale_ver_ratio_in;
                        u32 bayer_scale_ver_ratio_out;
@@ -342,26 +342,26 @@ struct ia_css_shading_info {
                        This corresponds to the top pixel of bayer
                        inputted to isp from sensor. */
 #else
-                               /** Vertical ratio of bayer scaling between input height and output height,
-                                    for the scaling which should be done before shading correction.
-                                       output_height = input_height * bayer_scale_ver_ratio_out
-                                                                       / bayer_scale_ver_ratio_in + 0.5 */
+                       /** Vertical ratio of bayer scaling between input height and output height,
+                            for the scaling which should be done before shading correction.
+                               output_height = input_height * bayer_scale_ver_ratio_out
+                                                               / bayer_scale_ver_ratio_in + 0.5 */
                        struct ia_css_resolution isp_input_sensor_data_res_bqs;
-                               /** Sensor data size (in bqs) inputted to ISP. This is the size BEFORE bayer scaling.
-                                    NOTE: This is NOT the size of the physical sensor size.
-                                          CSS requests the driver that ISP inputs sensor data
-                                          by the size of isp_input_sensor_data_res_bqs.
-                                          The driver sends the sensor data to ISP,
-                                          after the adequate cropping/binning/scaling
-                                          are applied to the physical sensor data area.
-                                          ISP assumes the area of isp_input_sensor_data_res_bqs
-                                          is centered on the physical sensor. */
+                       /** Sensor data size (in bqs) inputted to ISP. This is the size BEFORE bayer scaling.
+                            NOTE: This is NOT the size of the physical sensor size.
+                                  CSS requests the driver that ISP inputs sensor data
+                                  by the size of isp_input_sensor_data_res_bqs.
+                                  The driver sends the sensor data to ISP,
+                                  after the adequate cropping/binning/scaling
+                                  are applied to the physical sensor data area.
+                                  ISP assumes the area of isp_input_sensor_data_res_bqs
+                                  is centered on the physical sensor. */
                        struct ia_css_resolution sensor_data_res_bqs;
-                               /** Sensor data size (in bqs) at shading correction.
-                                    This is the size AFTER bayer scaling. */
+                       /** Sensor data size (in bqs) at shading correction.
+                            This is the size AFTER bayer scaling. */
                        struct ia_css_coordinate sensor_data_origin_bqs_on_sctbl;
-                               /** Origin of sensor data area positioned on shading table at shading correction.
-                                    The coordinate x,y should be positive values. */
+                       /** Origin of sensor data area positioned on shading table at shading correction.
+                            The coordinate x,y should be positive values. */
 #endif
                } type_1;
 
@@ -399,7 +399,7 @@ struct ia_css_grid_info {
 
        struct ia_css_3a_grid_info  s3a_grid; /** 3A grid info */
        union ia_css_dvs_grid_u dvs_grid;
-               /** All types of DVS statistics grid info union */
+       /** All types of DVS statistics grid info union */
 
        enum ia_css_vamem_type vamem_type;
 };
@@ -530,7 +530,8 @@ struct ia_css_isp_config {
                                                        [YNR2&YEE2, 2only] */
        struct ia_css_fc_config   *fc_config;   /** Fringe Control
                                                        [FC2, 2only] */
-       struct ia_css_formats_config   *formats_config; /** Formats Control for main output
+       struct ia_css_formats_config
+               *formats_config;        /** Formats Control for main output
                                                        [FORMATS, 1&2] */
        struct ia_css_cnr_config  *cnr_config;  /** Chroma Noise Reduction
                                                        [CNR2, 2only] */
@@ -598,17 +599,23 @@ struct ia_css_isp_config {
         *  DVS, GDC) from IQ tool level and application level down-to ISP FW level.
         *  the risk for regression is not in the individual blocks, but how they
         *  integrate together. */
-       struct ia_css_output_config   *output_config;   /** Main Output Mirroring, flipping */
+       struct ia_css_output_config
+               *output_config; /** Main Output Mirroring, flipping */
 
 #ifdef ISP2401
-       struct ia_css_tnr3_kernel_config         *tnr3_config;           /** TNR3 config */
+       struct ia_css_tnr3_kernel_config
+               *tnr3_config;           /** TNR3 config */
 #endif
-       struct ia_css_scaler_config              *scaler_config;         /** Skylake: scaler config (optional) */
-       struct ia_css_formats_config             *formats_config_display;/** Formats control for viewfinder/display output (optional)
+       struct ia_css_scaler_config
+               *scaler_config;         /** Skylake: scaler config (optional) */
+       struct ia_css_formats_config
+               *formats_config_display;/** Formats control for viewfinder/display output (optional)
                                                                                [OSYS, n/a] */
-       struct ia_css_output_config              *output_config_display; /** Viewfinder/display output mirroring, flipping (optional) */
+       struct ia_css_output_config
+               *output_config_display; /** Viewfinder/display output mirroring, flipping (optional) */
 
-       struct ia_css_frame                      *output_frame;          /** Output frame the config is to be applied to (optional) */
+       struct ia_css_frame
+               *output_frame;          /** Output frame the config is to be applied to (optional) */
        u32                     isp_config_id;  /** Unique ID to track which config was actually applied to a particular frame */
 };
 
index c5fb1e08f3b4e048cfbcb80a4a6f332e304666c0..c190483dc2b387dab07da0a45755aa9080676870 100644 (file)
 
 const struct ia_css_anr_config default_anr_config = {
        10,
-       { 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
-         0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
-         0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
-         0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4},
+       {
+               0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
+               0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
+               0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
+               0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4
+       },
        {10, 20, 30}
 };
 
 void
 ia_css_anr_encode(
-       struct sh_css_isp_anr_params *to,
-       const struct ia_css_anr_config *from,
-       unsigned int size)
+    struct sh_css_isp_anr_params *to,
+    const struct ia_css_anr_config *from,
+    unsigned int size)
 {
        (void)size;
        to->threshold = from->threshold;
@@ -39,21 +41,21 @@ ia_css_anr_encode(
 
 void
 ia_css_anr_dump(
-       const struct sh_css_isp_anr_params *anr,
-       unsigned int level)
+    const struct sh_css_isp_anr_params *anr,
+    unsigned int level)
 {
        if (!anr) return;
        ia_css_debug_dtrace(level, "Advance Noise Reduction:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "anr_threshold", anr->threshold);
+                           "anr_threshold", anr->threshold);
 }
 
 void
 ia_css_anr_debug_dtrace(
-       const struct ia_css_anr_config *config,
-       unsigned int level)
+    const struct ia_css_anr_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.threshold=%d\n",
-               config->threshold);
+                           "config.threshold=%d\n",
+                           config->threshold);
 }
index 1f045a0ca8df98405280028a7ea5f52fd7899a96..3855f54765e31a0cebcbb0c3ee2664d0e815b378 100644 (file)
@@ -22,18 +22,18 @@ extern const struct ia_css_anr_config default_anr_config;
 
 void
 ia_css_anr_encode(
-       struct sh_css_isp_anr_params *to,
-       const struct ia_css_anr_config *from,
-       unsigned int size);
+    struct sh_css_isp_anr_params *to,
+    const struct ia_css_anr_config *from,
+    unsigned int size);
 
 void
 ia_css_anr_dump(
-       const struct sh_css_isp_anr_params *anr,
-       unsigned int level);
+    const struct sh_css_isp_anr_params *anr,
+    unsigned int level);
 
 void
 ia_css_anr_debug_dtrace(
-       const struct ia_css_anr_config *config, unsigned int level)
+    const struct ia_css_anr_config *config, unsigned int level)
 ;
 
 #endif /* __IA_CSS_ANR_HOST_H */
index 5db6f1afff68e0533d20ed3fd02a5e1ed1265e9d..feee073b509993daf2f6961d86418d218a6794d1 100644 (file)
@@ -20,9 +20,9 @@
 
 void
 ia_css_anr2_vmem_encode(
-       struct ia_css_isp_anr2_params *to,
-       const struct ia_css_anr_thres *from,
-       size_t size)
+    struct ia_css_isp_anr2_params *to,
+    const struct ia_css_anr_thres *from,
+    size_t size)
 {
        unsigned int i;
 
@@ -38,8 +38,8 @@ ia_css_anr2_vmem_encode(
 
 void
 ia_css_anr2_debug_dtrace(
-       const struct ia_css_anr_thres *config,
-       unsigned int level)
+    const struct ia_css_anr_thres *config,
+    unsigned int level)
 {
        (void)config;
        (void)level;
index 96a063ffdc16eec3aeadf59f4ec503ce2d988a63..e681801e8f0f1d63e5dfd0ae663b05e4aa19ff1b 100644 (file)
 
 void
 ia_css_anr2_vmem_encode(
-       struct ia_css_isp_anr2_params *to,
-       const struct ia_css_anr_thres *from,
-       size_t size);
+    struct ia_css_isp_anr2_params *to,
+    const struct ia_css_anr_thres *from,
+    size_t size);
 
 void
 ia_css_anr2_debug_dtrace(
-       const struct ia_css_anr_thres *config, unsigned int level)
+    const struct ia_css_anr_thres *config, unsigned int level)
 ;
 
 #endif /* __IA_CSS_ANR2_HOST_H */
index 9cbeeef7417b8986047527bf1552db8ad4fad0c6..070e90e3e2b534c75f9b545377025ab12cb8bef6 100644 (file)
 
 #if 1
 const struct ia_css_anr_thres default_anr_thres = {
-{128, 384, 640, 896, 896, 640, 384, 128, 384, 1152, 1920, 2688, 2688, 1920, 1152, 384, 640, 1920, 3200, 4480, 4480, 3200, 1920, 640, 896, 2688, 4480, 6272, 6272, 4480, 2688, 896, 896, 2688, 4480, 6272, 6272, 4480, 2688, 896, 640, 1920, 3200, 4480, 4480, 3200, 1920, 640, 384, 1152, 1920, 2688, 2688, 1920, 1152, 384, 128, 384, 640, 896, 896, 640, 384, 128,
-0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20,
-0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40,
-0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60,
-30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50,
-60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100,
-90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150,
-10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30,
-20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60,
-30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90,
-20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40,
-40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80,
-60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120}
+       {
+               128, 384, 640, 896, 896, 640, 384, 128, 384, 1152, 1920, 2688, 2688, 1920, 1152, 384, 640, 1920, 3200, 4480, 4480, 3200, 1920, 640, 896, 2688, 4480, 6272, 6272, 4480, 2688, 896, 896, 2688, 4480, 6272, 6272, 4480, 2688, 896, 640, 1920, 3200, 4480, 4480, 3200, 1920, 640, 384, 1152, 1920, 2688, 2688, 1920, 1152, 384, 128, 384, 640, 896, 896, 640, 384, 128,
+               0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20,
+               0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40,
+               0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60,
+               30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50,
+               60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100,
+               90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150,
+               10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30,
+               20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60,
+               30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90,
+               20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40,
+               40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80,
+               60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120
+       }
 };
 #else
 const struct ia_css_anr_thres default_anr_thres = {
-{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+       {
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+       }
 };
 #endif
index 629c9ae6ad234e77f81324b75726a2ecb9654577..47a0fb08cfcc546f0e1382c8320d9941fdb43d3a 100644 (file)
@@ -21,7 +21,7 @@
 /* Advanced Noise Reduction (ANR) thresholds */
 
 struct ia_css_isp_anr2_params {
-       VMEM_ARRAY(data, ANR_PARAM_SIZE * ISP_VEC_NELEMS);
+       VMEM_ARRAY(data, ANR_PARAM_SIZE *ISP_VEC_NELEMS);
 };
 
 #endif /* __IA_CSS_ANR2_PARAM_H */
index 0e8dd4eebc3b8fcfdddf897873d42dff44e06053..6c7aa51ec079d30ab708310aa5d930eec82dde82 100644 (file)
@@ -24,8 +24,8 @@
 
 void
 ia_css_bh_hmem_decode(
-       struct ia_css_3a_rgby_output *out_ptr,
-       const struct ia_css_bh_table *hmem_buf)
+    struct ia_css_3a_rgby_output *out_ptr,
+    const struct ia_css_bh_table *hmem_buf)
 {
        int i;
 
@@ -49,9 +49,9 @@ ia_css_bh_hmem_decode(
 
 void
 ia_css_bh_encode(
-       struct sh_css_isp_bh_params *to,
-       const struct ia_css_3a_config *from,
-       unsigned int size)
+    struct sh_css_isp_bh_params *to,
+    const struct ia_css_3a_config *from,
+    unsigned int size)
 {
        (void)size;
        /* coefficients to calculate Y */
index 2a4c6c4a75463639a587698db280ea8b773665a3..ccd83169fe224147da2cbfe463116ca0eb723d69 100644 (file)
 
 void
 ia_css_bh_hmem_decode(
-       struct ia_css_3a_rgby_output *out_ptr,
-       const struct ia_css_bh_table *hmem_buf);
+    struct ia_css_3a_rgby_output *out_ptr,
+    const struct ia_css_bh_table *hmem_buf);
 
 void
 ia_css_bh_encode(
-       struct sh_css_isp_bh_params *to,
-       const struct ia_css_3a_config *from,
-       unsigned int size);
+    struct sh_css_isp_bh_params *to,
+    const struct ia_css_3a_config *from,
+    unsigned int size);
 
 #endif /* __IA_CSS_BH_HOST_H */
index 03da019346fc1e654a5a580cdafcb65c14344e9d..6888a7363710fb375d5573714e07c0a159a35b66 100644 (file)
@@ -27,7 +27,7 @@ static const s32 div_lut_nearests[BNLM_DIV_LUT_SIZE] = {
 
 static const s32 div_lut_slopes[BNLM_DIV_LUT_SIZE] = {
        -7760, -6960, -6216, -5536, -4912, -4344, -3832, -3360, -2936, -2552, -2208, -2208
-};
+    };
 
 static const s32 div_lut_intercepts[BNLM_DIV_LUT_SIZE] = {
        8184, 7752, 7336, 6928, 6536, 6152, 5776, 5416, 5064, 4728, 4408, 4408
@@ -41,7 +41,8 @@ static const s32 div_lut_intercepts[BNLM_DIV_LUT_SIZE] = {
  *     lut_size:       Size of lut_val array
  */
 static inline void
-bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lut_val, const uint32_t lut_size)
+bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr,
+               const int32_t *lut_val, const uint32_t lut_size)
 {
        u32 blk, i;
        const u32 block_size = 16;
@@ -94,19 +95,24 @@ bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lut
  */
 void
 ia_css_bnlm_vmem_encode(
-                       struct bnlm_vmem_params *to,
-                       const struct ia_css_bnlm_config *from,
-                       size_t size)
+    struct bnlm_vmem_params *to,
+    const struct ia_css_bnlm_config *from,
+    size_t size)
 {
        int i;
        (void)size;
 
        /* Initialize LUTs in VMEM parameters */
-       bnlm_lut_encode(&to->mu_root_lut, from->mu_root_lut_thr, from->mu_root_lut_val, 16);
-       bnlm_lut_encode(&to->sad_norm_lut, from->sad_norm_lut_thr, from->sad_norm_lut_val, 16);
-       bnlm_lut_encode(&to->sig_detail_lut, from->sig_detail_lut_thr, from->sig_detail_lut_val, 16);
-       bnlm_lut_encode(&to->sig_rad_lut, from->sig_rad_lut_thr, from->sig_rad_lut_val, 16);
-       bnlm_lut_encode(&to->rad_pow_lut, from->rad_pow_lut_thr, from->rad_pow_lut_val, 16);
+       bnlm_lut_encode(&to->mu_root_lut, from->mu_root_lut_thr, from->mu_root_lut_val,
+                       16);
+       bnlm_lut_encode(&to->sad_norm_lut, from->sad_norm_lut_thr,
+                       from->sad_norm_lut_val, 16);
+       bnlm_lut_encode(&to->sig_detail_lut, from->sig_detail_lut_thr,
+                       from->sig_detail_lut_val, 16);
+       bnlm_lut_encode(&to->sig_rad_lut, from->sig_rad_lut_thr, from->sig_rad_lut_val,
+                       16);
+       bnlm_lut_encode(&to->rad_pow_lut, from->rad_pow_lut_thr, from->rad_pow_lut_val,
+                       16);
        bnlm_lut_encode(&to->nl_0_lut, from->nl_0_lut_thr, from->nl_0_lut_val, 16);
        bnlm_lut_encode(&to->nl_1_lut, from->nl_1_lut_thr, from->nl_1_lut_val, 16);
        bnlm_lut_encode(&to->nl_2_lut, from->nl_2_lut_thr, from->nl_2_lut_val, 16);
@@ -124,7 +130,8 @@ ia_css_bnlm_vmem_encode(
        to->match_quality_max_idx[0][2] = from->match_quality_max_idx[2];
        to->match_quality_max_idx[0][3] = from->match_quality_max_idx[3];
 
-       bnlm_lut_encode(&to->div_lut, div_lut_nearests, div_lut_slopes, BNLM_DIV_LUT_SIZE);
+       bnlm_lut_encode(&to->div_lut, div_lut_nearests, div_lut_slopes,
+                       BNLM_DIV_LUT_SIZE);
        memset(to->div_lut_intercepts, 0, sizeof(to->div_lut_intercepts));
        for (i = 0; i < BNLM_DIV_LUT_SIZE; i++) {
                to->div_lut_intercepts[0][i] = div_lut_intercepts[i];
@@ -139,9 +146,9 @@ ia_css_bnlm_vmem_encode(
 /* - Encodes BNLM public parameters into DMEM parameters */
 void
 ia_css_bnlm_encode(
-       struct bnlm_dmem_params *to,
-       const struct ia_css_bnlm_config *from,
-       size_t size)
+    struct bnlm_dmem_params *to,
+    const struct ia_css_bnlm_config *from,
+    size_t size)
 {
        (void)size;
        to->rad_enable = from->rad_enable;
@@ -159,8 +166,8 @@ ia_css_bnlm_encode(
 /* Prints debug traces for BNLM public parameters */
 void
 ia_css_bnlm_debug_trace(
-       const struct ia_css_bnlm_config *config,
-       unsigned int level)
+    const struct ia_css_bnlm_config *config,
+    unsigned int level)
 {
        if (!config)
                return;
@@ -168,15 +175,21 @@ ia_css_bnlm_debug_trace(
 #ifndef IA_CSS_NO_DEBUG
        ia_css_debug_dtrace(level, "BNLM:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rad_enable", config->rad_enable);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rad_x_origin", config->rad_x_origin);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rad_y_origin", config->rad_y_origin);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rad_x_origin",
+                           config->rad_x_origin);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rad_y_origin",
+                           config->rad_y_origin);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "avg_min_th", config->avg_min_th);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "max_min_th", config->max_min_th);
 
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_a", config->exp_coeff_a);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_b", config->exp_coeff_b);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_c", config->exp_coeff_c);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_exponent", config->exp_exponent);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_a",
+                           config->exp_coeff_a);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_b",
+                           config->exp_coeff_b);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_c",
+                           config->exp_coeff_c);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_exponent",
+                           config->exp_exponent);
 
        /* ToDo: print traces for LUTs */
 #endif /* IA_CSS_NO_DEBUG */
index 7f888afeb65acc4574f33bdd18f1f8714f2c54f5..a57933bfb974dd5296ae69efa8217bccafe19331 100644 (file)
 
 void
 ia_css_bnlm_vmem_encode(
-                       struct bnlm_vmem_params *to,
-                       const struct ia_css_bnlm_config *from,
-                       size_t size);
+    struct bnlm_vmem_params *to,
+    const struct ia_css_bnlm_config *from,
+    size_t size);
 
 void
 ia_css_bnlm_encode(
-       struct bnlm_dmem_params *to,
-       const struct ia_css_bnlm_config *from,
-       size_t size);
+    struct bnlm_dmem_params *to,
+    const struct ia_css_bnlm_config *from,
+    size_t size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_bnlm_debug_trace(
-       const struct ia_css_bnlm_config *config,
-       unsigned int level);
+    const struct ia_css_bnlm_config *config,
+    unsigned int level);
 #endif
 
 #endif /* __IA_CSS_BNLM_HOST_H */
index 42c6e5fa5a1eb6f6e15c53f4239630c86f06acf4..a5e20596539d636c7cbb1897f3b9964e000a4cae 100644 (file)
@@ -48,9 +48,9 @@ const struct ia_css_bnr2_2_config default_bnr2_2_config = {
 
 void
 ia_css_bnr2_2_encode(
-       struct sh_css_isp_bnr2_2_params *to,
-       const struct ia_css_bnr2_2_config *from,
-       size_t size)
+    struct sh_css_isp_bnr2_2_params *to,
+    const struct ia_css_bnr2_2_config *from,
+    size_t size)
 {
        (void)size;
        to->d_var_gain_r = from->d_var_gain_r;
@@ -85,8 +85,8 @@ ia_css_bnr2_2_encode(
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_bnr2_2_debug_dtrace(
-       const struct ia_css_bnr2_2_config *bnr,
-       unsigned int level)
+    const struct ia_css_bnr2_2_config *bnr,
+    unsigned int level)
 {
        if (!bnr)
                return;
@@ -95,24 +95,33 @@ ia_css_bnr2_2_debug_dtrace(
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_r", bnr->d_var_gain_r);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_g", bnr->d_var_gain_g);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_b", bnr->d_var_gain_b);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_r", bnr->d_var_gain_slope_r);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_g", bnr->d_var_gain_slope_g);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_b", bnr->d_var_gain_slope_b);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_r",
+                           bnr->d_var_gain_slope_r);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_g",
+                           bnr->d_var_gain_slope_g);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_b",
+                           bnr->d_var_gain_slope_b);
 
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_r", bnr->n_var_gain_r);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_g", bnr->n_var_gain_g);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_b", bnr->n_var_gain_b);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_r", bnr->n_var_gain_slope_r);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_g", bnr->n_var_gain_slope_g);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_b", bnr->n_var_gain_slope_b);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_r",
+                           bnr->n_var_gain_slope_r);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_g",
+                           bnr->n_var_gain_slope_g);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_b",
+                           bnr->n_var_gain_slope_b);
 
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "dir_thres", bnr->dir_thres);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "dir_thres_w", bnr->dir_thres_w);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "var_offset_coef", bnr->var_offset_coef);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "var_offset_coef",
+                           bnr->var_offset_coef);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "dir_gain", bnr->dir_gain);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "detail_gain", bnr->detail_gain);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "detail_gain_divisor", bnr->detail_gain_divisor);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "detail_level_offset", bnr->detail_level_offset);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "detail_gain_divisor",
+                           bnr->detail_gain_divisor);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "detail_level_offset",
+                           bnr->detail_level_offset);
 
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_th_min", bnr->d_var_th_min);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_th_max", bnr->d_var_th_max);
index ab1106fd24d6c6c32804e5d843d1e47bf7cf1d1d..a021733dcdf7214591e835997f59905e3dd2281e 100644 (file)
@@ -21,15 +21,15 @@ extern const struct ia_css_bnr2_2_config default_bnr2_2_config;
 
 void
 ia_css_bnr2_2_encode(
-       struct sh_css_isp_bnr2_2_params *to,
-       const struct ia_css_bnr2_2_config *from,
-       size_t size);
+    struct sh_css_isp_bnr2_2_params *to,
+    const struct ia_css_bnr2_2_config *from,
+    size_t size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_bnr2_2_debug_dtrace(
-       const struct ia_css_bnr2_2_config *config,
-       unsigned int level);
+    const struct ia_css_bnr2_2_config *config,
+    unsigned int level);
 #endif
 
 #endif /* __IA_CSS_BNR2_2_HOST_H */
index 62489df37701df8d9c51c79889e457ca0e37e9ce..5efb0ce7f323192c637df459a6ba674491d8efb0 100644 (file)
@@ -21,9 +21,9 @@
 
 void
 ia_css_bnr_encode(
-       struct sh_css_isp_bnr_params *to,
-       const struct ia_css_nr_config *from,
-       unsigned int size)
+    struct sh_css_isp_bnr_params *to,
+    const struct ia_css_nr_config *from,
+    unsigned int size)
 {
        (void)size;
        /* BNR (Bayer Noise Reduction) */
@@ -41,24 +41,24 @@ ia_css_bnr_encode(
 
 void
 ia_css_bnr_dump(
-       const struct sh_css_isp_bnr_params *bnr,
-       unsigned int level)
+    const struct sh_css_isp_bnr_params *bnr,
+    unsigned int level)
 {
        if (!bnr) return;
        ia_css_debug_dtrace(level, "Bayer Noise Reduction:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "bnr_gain_all", bnr->gain_all);
+                           "bnr_gain_all", bnr->gain_all);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "bnr_gain_dir", bnr->gain_dir);
+                           "bnr_gain_dir", bnr->gain_dir);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "bnr_threshold_low",
-                       bnr->threshold_low);
+                           "bnr_threshold_low",
+                           bnr->threshold_low);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "bnr_threshold_width_log2",
-                       bnr->threshold_width_log2);
+                           "bnr_threshold_width_log2",
+                           bnr->threshold_width_log2);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "bnr_threshold_width",
-                       bnr->threshold_width);
+                           "bnr_threshold_width",
+                           bnr->threshold_width);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "bnr_clip", bnr->clip);
+                           "bnr_clip", bnr->clip);
 }
index aa3493c39b7493561f7745582b7aaa607972a9eb..4c29b47b8177d7fe9deab9d1c1ec21391dcdcde6 100644 (file)
 
 void
 ia_css_bnr_encode(
-       struct sh_css_isp_bnr_params *to,
-       const struct ia_css_nr_config *from,
-       unsigned int size);
+    struct sh_css_isp_bnr_params *to,
+    const struct ia_css_nr_config *from,
+    unsigned int size);
 
 void
 ia_css_bnr_dump(
-       const struct sh_css_isp_bnr_params *bnr,
-       unsigned int level);
+    const struct sh_css_isp_bnr_params *bnr,
+    unsigned int level);
 
 #endif /* __IA_CSS_DP_HOST_H */
index a07b68c92cd3443b0503f12a072182bae63d1e7a..c50afa6bf8a679471b706d485b704198c278d3ce 100644 (file)
@@ -21,8 +21,8 @@
 /* keep the interface here, it is not enabled yet because host doesn't know the size of individual state */
 void
 ia_css_init_cnr_state(
-       void/*struct sh_css_isp_cnr_vmem_state*/ * state,
-       size_t size)
+    void/*struct sh_css_isp_cnr_vmem_state*/ * state,
+    size_t size)
 {
        memset(state, 0, size);
 }
index 8430f1b64054501b9edc3426dd077dfe268c7371..87250ca5842c958bd89416da6718ab7c76371456 100644 (file)
@@ -19,7 +19,7 @@
 
 void
 ia_css_init_cnr_state(
-       void/*struct sh_css_isp_cnr_vmem_state*/ * state,
-       size_t size);
+    void/*struct sh_css_isp_cnr_vmem_state*/ * state,
+    size_t size);
 
 #endif /* __IA_CSS_CNR_HOST_H */
index 899f6b27499434e1b6a98598b146bf5f9b1c4e4a..610871d213bb1a96d6653858051e6e7526a54b79 100644 (file)
@@ -31,9 +31,9 @@ const struct ia_css_cnr_config default_cnr_config = {
 
 void
 ia_css_cnr_encode(
-       struct sh_css_isp_cnr_params *to,
-       const struct ia_css_cnr_config *from,
-       unsigned int size)
+    struct sh_css_isp_cnr_params *to,
+    const struct ia_css_cnr_config *from,
+    unsigned int size)
 {
        (void)size;
        to->coring_u = from->coring_u;
@@ -48,26 +48,26 @@ ia_css_cnr_encode(
 
 void
 ia_css_cnr_dump(
-       const struct sh_css_isp_cnr_params *cnr,
-       unsigned int level);
+    const struct sh_css_isp_cnr_params *cnr,
+    unsigned int level);
 
 void
 ia_css_cnr_debug_dtrace(
-       const struct ia_css_cnr_config *config,
-       unsigned int level)
+    const struct ia_css_cnr_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.coring_u=%d, config.coring_v=%d, config.sense_gain_vy=%d, config.sense_gain_hy=%d, config.sense_gain_vu=%d, config.sense_gain_hu=%d, config.sense_gain_vv=%d, config.sense_gain_hv=%d\n",
-               config->coring_u, config->coring_v,
-               config->sense_gain_vy, config->sense_gain_hy,
-               config->sense_gain_vu, config->sense_gain_hu,
-               config->sense_gain_vv, config->sense_gain_hv);
+                           "config.coring_u=%d, config.coring_v=%d, config.sense_gain_vy=%d, config.sense_gain_hy=%d, config.sense_gain_vu=%d, config.sense_gain_hu=%d, config.sense_gain_vv=%d, config.sense_gain_hv=%d\n",
+                           config->coring_u, config->coring_v,
+                           config->sense_gain_vy, config->sense_gain_hy,
+                           config->sense_gain_vu, config->sense_gain_hu,
+                           config->sense_gain_vv, config->sense_gain_hv);
 }
 
 void
 ia_css_init_cnr2_state(
-       void/*struct sh_css_isp_cnr_vmem_state*/ * state,
-       size_t size)
+    void/*struct sh_css_isp_cnr_vmem_state*/ * state,
+    size_t size)
 {
        memset(state, 0, size);
 }
index 902b850cebf5082361a8580acbc420813bcd538d..d322359feedf72b986b851f1d0afa65768751e03 100644 (file)
@@ -22,22 +22,22 @@ extern const struct ia_css_cnr_config default_cnr_config;
 
 void
 ia_css_cnr_encode(
-       struct sh_css_isp_cnr_params *to,
-       const struct ia_css_cnr_config *from,
-       unsigned int size);
+    struct sh_css_isp_cnr_params *to,
+    const struct ia_css_cnr_config *from,
+    unsigned int size);
 
 void
 ia_css_cnr_dump(
-       const struct sh_css_isp_cnr_params *cnr,
-       unsigned int level);
+    const struct sh_css_isp_cnr_params *cnr,
+    unsigned int level);
 
 void
 ia_css_cnr_debug_dtrace(
-       const struct ia_css_cnr_config *config,
-       unsigned int level);
+    const struct ia_css_cnr_config *config,
+    unsigned int level);
 
 void
 ia_css_init_cnr2_state(
-       void/*struct sh_css_isp_cnr_vmem_state*/ * state,
-       size_t size);
+    void/*struct sh_css_isp_cnr_vmem_state*/ * state,
+    size_t size);
 #endif /* __IA_CSS_CNR2_HOST_H */
index d7c814d3c41023219baea7dd588db5e7e06c7366..e64e26089a4d2223dea4eb0a562016134d09e5e3 100644 (file)
@@ -24,9 +24,9 @@ const struct ia_css_conversion_config default_conversion_config = {
 
 void
 ia_css_conversion_encode(
-       struct sh_css_isp_conversion_params *to,
-       const struct ia_css_conversion_config *from,
-       unsigned int size)
+    struct sh_css_isp_conversion_params *to,
+    const struct ia_css_conversion_config *from,
+    unsigned int size)
 {
        (void)size;
        to->en     = from->en;
index 6f798811c9ab806fb253a2a9dd5a83df72bd4bc8..59db91464da270d7b6a076acd8522e05e53fe4ee 100644 (file)
@@ -22,9 +22,9 @@ extern const struct ia_css_conversion_config default_conversion_config;
 
 void
 ia_css_conversion_encode(
-       struct sh_css_isp_conversion_params *to,
-       const struct ia_css_conversion_config *from,
-       unsigned int size);
+    struct sh_css_isp_conversion_params *to,
+    const struct ia_css_conversion_config *from,
+    unsigned int size);
 
 #ifdef ISP2401
 /* workaround until code generation in isp_kernelparameters.host.c is fixed */
index 18e40c37510b304f68804d40f9bfc525b924e5d4..6e29b7eeb3edd0f49aabe473f1532bae2bce831e 100644 (file)
@@ -25,9 +25,9 @@ static const struct ia_css_copy_output_configuration default_config = {
 
 void
 ia_css_copy_output_config(
-       struct sh_css_isp_copy_output_isp_config      *to,
-       const struct ia_css_copy_output_configuration *from,
-       unsigned int size)
+    struct sh_css_isp_copy_output_isp_config      *to,
+    const struct ia_css_copy_output_configuration *from,
+    unsigned int size)
 {
        (void)size;
        to->enable = from->enable;
@@ -35,8 +35,8 @@ ia_css_copy_output_config(
 
 void
 ia_css_copy_output_configure(
-       const struct ia_css_binary     *binary,
-       bool enable)
+    const struct ia_css_binary     *binary,
+    bool enable)
 {
        struct ia_css_copy_output_configuration config = default_config;
 
index 0e12d80df9d76dec71bd3fbe2a65d2608f972e47..6f42abdec9bbb057ec19e073fe8c1bf9b76e1309 100644 (file)
 
 void
 ia_css_copy_output_config(
-       struct sh_css_isp_copy_output_isp_config      *to,
-       const struct ia_css_copy_output_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_copy_output_isp_config      *to,
+    const struct ia_css_copy_output_configuration *from,
+    unsigned int size);
 
 void
 ia_css_copy_output_configure(
-       const struct ia_css_binary     *binary,
-       bool enable);
+    const struct ia_css_binary     *binary,
+    bool enable);
 
 #endif /* __IA_CSS_COPY_OUTPUT_HOST_H */
index 4f541971a1fdb901895b44acb2db61c6ae12cf43..c6a3bd4fbf80fb402d6b9ad75be790c675f2bbeb 100644 (file)
@@ -27,9 +27,9 @@ static const struct ia_css_crop_configuration default_config = {
 
 void
 ia_css_crop_encode(
-       struct sh_css_isp_crop_isp_params *to,
-       const struct ia_css_crop_config *from,
-       unsigned int size)
+    struct sh_css_isp_crop_isp_params *to,
+    const struct ia_css_crop_config *from,
+    unsigned int size)
 {
        (void)size;
        to->crop_pos = from->crop_pos;
@@ -37,9 +37,9 @@ ia_css_crop_encode(
 
 void
 ia_css_crop_config(
-       struct sh_css_isp_crop_isp_config *to,
-       const struct ia_css_crop_configuration  *from,
-       unsigned int size)
+    struct sh_css_isp_crop_isp_config *to,
+    const struct ia_css_crop_configuration  *from,
+    unsigned int size)
 {
        unsigned int elems_a = ISP_VEC_NELEMS;
 
@@ -53,8 +53,8 @@ ia_css_crop_config(
 
 void
 ia_css_crop_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *info)
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *info)
 {
        struct ia_css_crop_configuration config = default_config;
 
index 5d2bf405946c5d937fc805075d4e7991c91da76d..2e451a872d2af958ff312b8a818a8832eba9fb7c 100644 (file)
 
 void
 ia_css_crop_encode(
-       struct sh_css_isp_crop_isp_params *to,
-       const struct ia_css_crop_config *from,
-       unsigned int size);
+    struct sh_css_isp_crop_isp_params *to,
+    const struct ia_css_crop_config *from,
+    unsigned int size);
 
 void
 ia_css_crop_config(
-       struct sh_css_isp_crop_isp_config      *to,
-       const struct ia_css_crop_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_crop_isp_config      *to,
+    const struct ia_css_crop_configuration *from,
+    unsigned int size);
 
 void
 ia_css_crop_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *from);
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *from);
 
 #endif /* __IA_CSS_CROP_HOST_H */
index 732ca773722c14eb094df31cc4a26f5cebb14191..ea81e1d3e4452d8b4d5eb835b16f0db8c209f093 100644 (file)
@@ -28,9 +28,9 @@ const struct ia_css_cc_config default_cc_config = {
 
 void
 ia_css_encode_cc(
-       struct sh_css_isp_csc_params *to,
-       const struct ia_css_cc_config *from,
-       unsigned int size)
+    struct sh_css_isp_csc_params *to,
+    const struct ia_css_cc_config *from,
+    unsigned int size)
 {
        (void)size;
 #ifndef IA_CSS_NO_DEBUG
@@ -55,9 +55,9 @@ ia_css_encode_cc(
 
 void
 ia_css_csc_encode(
-       struct sh_css_isp_csc_params *to,
-       const struct ia_css_cc_config *from,
-       unsigned int size)
+    struct sh_css_isp_csc_params *to,
+    const struct ia_css_cc_config *from,
+    unsigned int size)
 {
        ia_css_encode_cc(to, from, size);
 }
@@ -65,63 +65,63 @@ ia_css_csc_encode(
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_cc_dump(
-       const struct sh_css_isp_csc_params *csc,
-       unsigned int level,
-       const char *name)
+    const struct sh_css_isp_csc_params *csc,
+    unsigned int level,
+    const char *name)
 {
        if (!csc) return;
        ia_css_debug_dtrace(level, "%s\n", name);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "m_shift",
-               csc->m_shift);
+                           "m_shift",
+                           csc->m_shift);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "m00",
-               csc->m00);
+                           "m00",
+                           csc->m00);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "m01",
-               csc->m01);
+                           "m01",
+                           csc->m01);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "m02",
-               csc->m02);
+                           "m02",
+                           csc->m02);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "m10",
-               csc->m10);
+                           "m10",
+                           csc->m10);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "m11",
-               csc->m11);
+                           "m11",
+                           csc->m11);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "m12",
-               csc->m12);
+                           "m12",
+                           csc->m12);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "m20",
-               csc->m20);
+                           "m20",
+                           csc->m20);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "m21",
-               csc->m21);
+                           "m21",
+                           csc->m21);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "m22",
-               csc->m22);
+                           "m22",
+                           csc->m22);
 }
 
 void
 ia_css_csc_dump(
-       const struct sh_css_isp_csc_params *csc,
-       unsigned int level)
+    const struct sh_css_isp_csc_params *csc,
+    unsigned int level)
 {
        ia_css_cc_dump(csc, level, "Color Space Conversion");
 }
 
 void
 ia_css_cc_config_debug_dtrace(
-       const struct ia_css_cc_config *config,
-       unsigned int level)
+    const struct ia_css_cc_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.m[0]=%d, config.m[1]=%d, config.m[2]=%d, config.m[3]=%d, config.m[4]=%d, config.m[5]=%d, config.m[6]=%d, config.m[7]=%d, config.m[8]=%d\n",
-               config->matrix[0],
-               config->matrix[1], config->matrix[2],
-               config->matrix[3], config->matrix[4],
-               config->matrix[5], config->matrix[6],
-               config->matrix[7], config->matrix[8]);
+                           "config.m[0]=%d, config.m[1]=%d, config.m[2]=%d, config.m[3]=%d, config.m[4]=%d, config.m[5]=%d, config.m[6]=%d, config.m[7]=%d, config.m[8]=%d\n",
+                           config->matrix[0],
+                           config->matrix[1], config->matrix[2],
+                           config->matrix[3], config->matrix[4],
+                           config->matrix[5], config->matrix[6],
+                           config->matrix[7], config->matrix[8]);
 }
 #endif
index 2c9fec710d12b7d86e6fa6d2ff6dfda8fab07a71..347ccd8645774555a6aefb1ff932b11f82f76d4a 100644 (file)
@@ -22,31 +22,31 @@ extern const struct ia_css_cc_config default_cc_config;
 
 void
 ia_css_encode_cc(
-       struct sh_css_isp_csc_params *to,
-       const struct ia_css_cc_config *from,
-       unsigned int size);
+    struct sh_css_isp_csc_params *to,
+    const struct ia_css_cc_config *from,
+    unsigned int size);
 
 void
 ia_css_csc_encode(
-       struct sh_css_isp_csc_params *to,
-       const struct ia_css_cc_config *from,
-       unsigned int size);
+    struct sh_css_isp_csc_params *to,
+    const struct ia_css_cc_config *from,
+    unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_cc_dump(
-       const struct sh_css_isp_csc_params *csc, unsigned int level,
-       const char *name);
+    const struct sh_css_isp_csc_params *csc, unsigned int level,
+    const char *name);
 
 void
 ia_css_csc_dump(
-       const struct sh_css_isp_csc_params *csc,
-       unsigned int level);
+    const struct sh_css_isp_csc_params *csc,
+    unsigned int level);
 
 void
 ia_css_cc_config_debug_dtrace(
-       const struct ia_css_cc_config *config,
-       unsigned int level);
+    const struct ia_css_cc_config *config,
+    unsigned int level);
 
 #define ia_css_csc_debug_dtrace ia_css_cc_config_debug_dtrace
 #endif
index 7558d80c0ff4b209997d96b65a564da4d60d2924..e80f42ab0e6ae12267bacd8a50ce4df784dcd755 100644 (file)
@@ -21,8 +21,8 @@
 #include "ia_css_ctc1_5.host.h"
 
 static void ctc_gradient(
-       int *dydx, int *shift,
-       int y1, int y0, int x1, int x0)
+    int *dydx, int *shift,
+    int y1, int y0, int x1, int x0)
 {
        int frc_bits = max(IA_CSS_CTC_COEF_SHIFT, 16);
        int dy = y1 - y0;
@@ -34,7 +34,8 @@ static void ctc_gradient(
        int max_dydx = (1 << IA_CSS_CTC_COEF_SHIFT) - 1;
 
        if (dx == 0) {
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ctc_gradient() error, illegal division operation\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ctc_gradient() error, illegal division operation\n");
                return;
        } else {
                dydx_int = dy / dx;
@@ -55,7 +56,7 @@ static void ctc_gradient(
                <= ((1 << IA_CSS_CTC_COEF_SHIFT) - 1) */
        for (sft = 0; sft <= IA_CSS_CTC_COEF_SHIFT; sft++) {
                int tmp_dydx = (dydx_int << sft)
-                            + (dydx_frc >> (frc_bits - sft));
+                              + (dydx_frc >> (frc_bits - sft));
                if (tmp_dydx <= max_dydx) {
                        *dydx = tmp_dydx;
                        *shift = sft;
@@ -69,9 +70,9 @@ static void ctc_gradient(
 
 void
 ia_css_ctc_encode(
-       struct sh_css_isp_ctc_params *to,
-       const struct ia_css_ctc_config *from,
-       unsigned int size)
+    struct sh_css_isp_ctc_params *to,
+    const struct ia_css_ctc_config *from,
+    unsigned int size)
 {
        (void)size;
        to->y0 = from->y0;
@@ -116,5 +117,5 @@ ia_css_ctc_encode(
 
 void
 ia_css_ctc_dump(
-       const struct sh_css_isp_ctc_params *ctc,
-       unsigned int level);
+    const struct sh_css_isp_ctc_params *ctc,
+    unsigned int level);
index c5b28151529f6d8bc0b04f4965f52430de9e3e4a..f3c40a49f7c006c54311148ff173fbaffea1ec39 100644 (file)
 
 void
 ia_css_ctc_encode(
-       struct sh_css_isp_ctc_params *to,
-       const struct ia_css_ctc_config *from,
-       unsigned int size);
+    struct sh_css_isp_ctc_params *to,
+    const struct ia_css_ctc_config *from,
+    unsigned int size);
 
 void
 ia_css_ctc_dump(
-       const struct sh_css_isp_ctc_params *ctc,
-       unsigned int level);
+    const struct sh_css_isp_ctc_params *ctc,
+    unsigned int level);
 
 #endif /* __IA_CSS_CTC1_5_HOST_H */
index 9a447f14b869afcebef2988290ff847135aec1a3..b247dc6bec6a75fcd405af99889997fb4314ce86 100644 (file)
@@ -27,7 +27,8 @@ const struct ia_css_ctc2_config default_ctc2_config = {
        INEFFECTIVE_VAL, INEFFECTIVE_VAL, INEFFECTIVE_VAL,
        BASIC_VAL * 2, BASIC_VAL * 4, BASIC_VAL * 6,
        BASIC_VAL * 8, INEFFECTIVE_VAL, INEFFECTIVE_VAL,
-       BASIC_VAL >> 1, BASIC_VAL};
+       BASIC_VAL >> 1, BASIC_VAL
+};
 
 /* (dydx) = ctc2_slope(y1, y0, x1, x0)
  * -----------------------------------------------
@@ -89,15 +90,15 @@ void ia_css_ctc2_vmem_encode(struct ia_css_isp_ctc2_vmem_params *to,
        *  0.0 -> y_x1 -> y_x2 -> y _x3 -> y_x4 -> 1.0
        */
        dydx0 = ctc2_slope(from->y_y1, from->y_y0,
-                           from->y_x1, 0);
+                          from->y_x1, 0);
        dydx1 = ctc2_slope(from->y_y2, from->y_y1,
-                           from->y_x2, from->y_x1);
+                          from->y_x2, from->y_x1);
        dydx2 = ctc2_slope(from->y_y3, from->y_y2,
-                           from->y_x3, from->y_x2);
+                          from->y_x3, from->y_x2);
        dydx3 = ctc2_slope(from->y_y4, from->y_y3,
-                           from->y_x4, from->y_x3);
+                          from->y_x4, from->y_x3);
        dydx4 = ctc2_slope(from->y_y5, from->y_y4,
-                           SH_CSS_BAYER_MAXVAL, from->y_x4);
+                          SH_CSS_BAYER_MAXVAL, from->y_x4);
 
        /*Fill 3 arrays with:
         * - Luma input gain values y_y0, y_y1, y_y2, y_3, y_y4
@@ -152,5 +153,5 @@ void ia_css_ctc2_encode(struct ia_css_isp_ctc2_dmem_params *to,
 
        /*Slope Calculation*/
        to->uv_dydx = ctc2_slope(from->uv_y1, from->uv_y0,
-                                 from->uv_x1, from->uv_x0);
+                                from->uv_x1, from->uv_x0);
 }
index be9cd8c9c470561d83f02cb3dae649f47a074392..9d5dadf70f1aeed3fd00032a000421a006daea4d 100644 (file)
@@ -49,6 +49,6 @@ struct ia_css_ctc2_config {
        */
        s32 uv_x0;
        s32 uv_x1;
-       };
+};
 
 #endif /* __IA_CSS_CTC2_TYPES_H */
index 580b5a84f93332d4843cdf6db48d57c90dca0e03..26311b0a23f99d0cb2b4f2d382aab371bb159c3c 100644 (file)
@@ -35,9 +35,9 @@ const struct ia_css_ctc_config default_ctc_config = {
 
 void
 ia_css_ctc_vamem_encode(
-       struct sh_css_isp_ctc_vamem_params *to,
-       const struct ia_css_ctc_table *from,
-       unsigned int size)
+    struct sh_css_isp_ctc_vamem_params *to,
+    const struct ia_css_ctc_table *from,
+    unsigned int size)
 {
        (void)size;
        memcpy(&to->ctc,  &from->data, sizeof(to->ctc));
@@ -45,14 +45,14 @@ ia_css_ctc_vamem_encode(
 
 void
 ia_css_ctc_debug_dtrace(
-       const struct ia_css_ctc_config *config,
-       unsigned int level)
+    const struct ia_css_ctc_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.ce_gain_exp=%d, config.y0=%d, config.x1=%d, config.y1=%d, config.x2=%d, config.y2=%d, config.x3=%d, config.y3=%d, config.x4=%d, config.y4=%d\n",
-               config->ce_gain_exp, config->y0,
-               config->x1, config->y1,
-               config->x2, config->y2,
-               config->x3, config->y3,
-               config->x4, config->y4);
+                           "config.ce_gain_exp=%d, config.y0=%d, config.x1=%d, config.y1=%d, config.x2=%d, config.y2=%d, config.x3=%d, config.y3=%d, config.x4=%d, config.y4=%d\n",
+                           config->ce_gain_exp, config->y0,
+                           config->x1, config->y1,
+                           config->x2, config->y2,
+                           config->x3, config->y3,
+                           config->x4, config->y4);
 }
index d044071b690d3d389f81449bf17aad59a00c9b03..e4ad676361ddee13486bba2599c98e4d3c4ffc17 100644 (file)
@@ -24,13 +24,13 @@ extern const struct ia_css_ctc_config default_ctc_config;
 
 void
 ia_css_ctc_vamem_encode(
-       struct sh_css_isp_ctc_vamem_params *to,
-       const struct ia_css_ctc_table *from,
-       unsigned int size);
+    struct sh_css_isp_ctc_vamem_params *to,
+    const struct ia_css_ctc_table *from,
+    unsigned int size);
 
 void
 ia_css_ctc_debug_dtrace(
-       const struct ia_css_ctc_config *config, unsigned int level)
+    const struct ia_css_ctc_config *config, unsigned int level)
 ;
 
 #endif /* __IA_CSS_CTC_HOST_H */
index bf140d81493451d3bc55f2e7fb8c2b1055dc27d4..adb146c03a73d061575796b3c0b2835eb1f2d417 100644 (file)
@@ -25,39 +25,39 @@ struct ia_css_ctc_table       default_ctc_table;
 
 static const uint16_t
 default_ctc_table_data[IA_CSS_VAMEM_2_CTC_TABLE_SIZE] = {
-   0,  384,  837,  957, 1011, 1062, 1083, 1080,
-1078, 1077, 1053, 1039, 1012,  992,  969,  951,
- 929,  906,  886,  866,  845,  823,  809,  790,
- 772,  758,  741,  726,  711,  701,  688,  675,
- 666,  656,  648,  639,  633,  626,  618,  612,
- 603,  594,  582,  572,  557,  545,  529,  516,
- 504,  491,  480,  467,  459,  447,  438,  429,
- 419,  412,  404,  397,  389,  382,  376,  368,
- 363,  357,  351,  345,  340,  336,  330,  326,
- 321,  318,  312,  308,  304,  300,  297,  294,
- 291,  286,  284,  281,  278,  275,  271,  268,
- 261,  257,  251,  245,  240,  235,  232,  225,
- 223,  218,  213,  209,  206,  204,  199,  197,
- 193,  189,  186,  185,  183,  179,  177,  175,
- 172,  170,  169,  167,  164,  164,  162,  160,
- 158,  157,  156,  154,  154,  152,  151,  150,
- 149,  148,  146,  147,  146,  144,  143,  143,
- 142,  141,  140,  141,  139,  138,  138,  138,
- 137,  136,  136,  135,  134,  134,  134,  133,
- 132,  132,  131,  130,  131,  130,  129,  128,
- 129,  127,  127,  127,  127,  125,  125,  125,
- 123,  123,  122,  120,  118,  115,  114,  111,
- 110,  108,  106,  105,  103,  102,  100,   99,
-  97,   97,   96,   95,   94,   93,   93,   91,
-  91,   91,   90,   90,   89,   89,   88,   88,
-  89,   88,   88,   87,   87,   87,   87,   86,
-  87,   87,   86,   87,   86,   86,   84,   84,
-  82,   80,   78,   76,   74,   72,   70,   68,
-  67,   65,   62,   60,   58,   56,   55,   54,
-  53,   51,   49,   49,   47,   45,   45,   45,
-  41,   40,   39,   39,   34,   33,   34,   32,
-  25,   23,   24,   20,   13,    9,   12,    0,
-   0
+       0,  384,  837,  957, 1011, 1062, 1083, 1080,
+       1078, 1077, 1053, 1039, 1012,  992,  969,  951,
      929,  906,  886,  866,  845,  823,  809,  790,
      772,  758,  741,  726,  711,  701,  688,  675,
      666,  656,  648,  639,  633,  626,  618,  612,
      603,  594,  582,  572,  557,  545,  529,  516,
      504,  491,  480,  467,  459,  447,  438,  429,
      419,  412,  404,  397,  389,  382,  376,  368,
      363,  357,  351,  345,  340,  336,  330,  326,
      321,  318,  312,  308,  304,  300,  297,  294,
      291,  286,  284,  281,  278,  275,  271,  268,
      261,  257,  251,  245,  240,  235,  232,  225,
      223,  218,  213,  209,  206,  204,  199,  197,
      193,  189,  186,  185,  183,  179,  177,  175,
      172,  170,  169,  167,  164,  164,  162,  160,
      158,  157,  156,  154,  154,  152,  151,  150,
      149,  148,  146,  147,  146,  144,  143,  143,
      142,  141,  140,  141,  139,  138,  138,  138,
      137,  136,  136,  135,  134,  134,  134,  133,
      132,  132,  131,  130,  131,  130,  129,  128,
      129,  127,  127,  127,  127,  125,  125,  125,
      123,  123,  122,  120,  118,  115,  114,  111,
      110,  108,  106,  105,  103,  102,  100,   99,
+       97,   97,   96,   95,   94,   93,   93,   91,
+       91,   91,   90,   90,   89,   89,   88,   88,
+       89,   88,   88,   87,   87,   87,   87,   86,
+       87,   87,   86,   87,   86,   86,   84,   84,
+       82,   80,   78,   76,   74,   72,   70,   68,
+       67,   65,   62,   60,   58,   56,   55,   54,
+       53,   51,   49,   49,   47,   45,   45,   45,
+       41,   40,   39,   39,   34,   33,   34,   32,
+       25,   23,   24,   20,   13,    9,   12,    0,
+       0
 };
 
 #elif defined(HAS_VAMEM_VERSION_1)
@@ -65,134 +65,134 @@ default_ctc_table_data[IA_CSS_VAMEM_2_CTC_TABLE_SIZE] = {
 /* Default Parameters */
 static const uint16_t
 default_ctc_table_data[IA_CSS_VAMEM_1_CTC_TABLE_SIZE] = {
-               0, 0, 256, 384, 384, 497, 765, 806,
-               837, 851, 888, 901, 957, 981, 993, 1001,
-               1011, 1029, 1028, 1039, 1062, 1059, 1073, 1080,
-               1083, 1085, 1085, 1098, 1080, 1084, 1085, 1093,
-               1078, 1073, 1070, 1069, 1077, 1066, 1072, 1063,
-               1053, 1044, 1046, 1053, 1039, 1028, 1025, 1024,
-               1012, 1013, 1016, 996, 992, 990, 990, 980,
-               969, 968, 961, 955, 951, 949, 933, 930,
-               929, 925, 921, 916, 906, 901, 895, 893,
-               886, 877, 872, 869, 866, 861, 857, 849,
-               845, 838, 836, 832, 823, 821, 815, 813,
-               809, 805, 796, 793, 790, 785, 784, 778,
-               772, 768, 766, 763, 758, 752, 749, 745,
-               741, 740, 736, 730, 726, 724, 723, 718,
-               711, 709, 706, 704, 701, 698, 691, 689,
-               688, 683, 683, 678, 675, 673, 671, 669,
-               666, 663, 661, 660, 656, 656, 653, 650,
-               648, 647, 646, 643, 639, 638, 637, 635,
-               633, 632, 629, 627, 626, 625, 622, 621,
-               618, 618, 614, 614, 612, 609, 606, 606,
-               603, 600, 600, 597, 594, 591, 590, 586,
-               582, 581, 578, 575, 572, 569, 563, 560,
-               557, 554, 551, 548, 545, 539, 536, 533,
-               529, 527, 524, 519, 516, 513, 510, 507,
-               504, 501, 498, 493, 491, 488, 485, 484,
-               480, 476, 474, 471, 467, 466, 464, 460,
-               459, 455, 453, 449, 447, 446, 443, 441,
-               438, 435, 432, 432, 429, 427, 426, 422,
-               419, 418, 416, 414, 412, 410, 408, 406,
-               404, 402, 401, 398, 397, 395, 393, 390,
-               389, 388, 387, 384, 382, 380, 378, 377,
-               376, 375, 372, 370, 368, 368, 366, 364,
-               363, 361, 360, 358, 357, 355, 354, 352,
-               351, 350, 349, 346, 345, 344, 344, 342,
-               340, 339, 337, 337, 336, 335, 333, 331,
-               330, 329, 328, 326, 326, 324, 324, 322,
-               321, 320, 318, 318, 318, 317, 315, 313,
-               312, 311, 311, 310, 308, 307, 306, 306,
-               304, 304, 302, 301, 300, 300, 299, 297,
-               297, 296, 296, 294, 294, 292, 291, 291,
-               291, 290, 288, 287, 286, 286, 287, 285,
-               284, 283, 282, 282, 281, 281, 279, 278,
-               278, 278, 276, 276, 275, 274, 274, 273,
-               271, 270, 269, 268, 268, 267, 265, 262,
-               261, 260, 260, 259, 257, 254, 252, 252,
-               251, 251, 249, 246, 245, 244, 243, 242,
-               240, 239, 239, 237, 235, 235, 233, 231,
-               232, 230, 229, 226, 225, 224, 225, 224,
-               223, 220, 219, 219, 218, 217, 217, 214,
-               213, 213, 212, 211, 209, 209, 209, 208,
-               206, 205, 204, 203, 204, 203, 201, 200,
-               199, 197, 198, 198, 197, 195, 194, 194,
-               193, 192, 192, 191, 189, 190, 189, 188,
-               186, 187, 186, 185, 185, 184, 183, 181,
-               183, 182, 181, 180, 179, 178, 178, 178,
-               177, 176, 175, 176, 175, 174, 174, 173,
-               172, 173, 172, 171, 170, 170, 169, 169,
-               169, 168, 167, 166, 167, 167, 166, 165,
-               164, 164, 164, 163, 164, 163, 162, 163,
-               162, 161, 160, 161, 160, 160, 160, 159,
-               158, 157, 158, 158, 157, 157, 156, 156,
-               156, 156, 155, 155, 154, 154, 154, 154,
-               154, 153, 152, 153, 152, 152, 151, 152,
-               151, 152, 151, 150, 150, 149, 149, 150,
-               149, 149, 148, 148, 148, 149, 148, 147,
-               146, 146, 147, 146, 147, 146, 145, 146,
-               146, 145, 144, 145, 144, 145, 144, 144,
-               143, 143, 143, 144, 143, 142, 142, 142,
-               142, 142, 142, 141, 141, 141, 141, 140,
-               140, 141, 140, 140, 141, 140, 139, 139,
-               139, 140, 139, 139, 138, 138, 137, 139,
-               138, 138, 138, 137, 138, 137, 137, 137,
-               137, 136, 137, 136, 136, 136, 136, 135,
-               136, 135, 135, 135, 135, 136, 135, 135,
-               134, 134, 133, 135, 134, 134, 134, 133,
-               134, 133, 134, 133, 133, 132, 133, 133,
-               132, 133, 132, 132, 132, 132, 131, 131,
-               131, 132, 131, 131, 130, 131, 130, 132,
-               131, 130, 130, 129, 130, 129, 130, 129,
-               129, 129, 130, 129, 128, 128, 128, 128,
-               129, 128, 128, 127, 127, 128, 128, 127,
-               127, 126, 126, 127, 127, 126, 126, 126,
-               127, 126, 126, 126, 125, 125, 126, 125,
-               125, 124, 124, 124, 125, 125, 124, 124,
-               123, 124, 124, 123, 123, 122, 122, 122,
-               122, 122, 121, 120, 120, 119, 118, 118,
-               118, 117, 117, 116, 115, 115, 115, 114,
-               114, 113, 113, 112, 111, 111, 111, 110,
-               110, 109, 109, 108, 108, 108, 107, 107,
-               106, 106, 105, 105, 105, 104, 104, 103,
-               103, 102, 102, 102, 102, 101, 101, 100,
-               100, 99, 99, 99, 99, 99, 99, 98,
-               97, 98, 97, 97, 97, 96, 96, 95,
-               96, 95, 96, 95, 95, 94, 94, 95,
-               94, 94, 94, 93, 93, 92, 93, 93,
-               93, 93, 92, 92, 91, 92, 92, 92,
-               91, 91, 90, 90, 91, 91, 91, 90,
-               90, 90, 90, 91, 90, 90, 90, 89,
-               89, 89, 90, 89, 89, 89, 89, 89,
-               88, 89, 89, 88, 88, 88, 88, 87,
-               89, 88, 88, 88, 88, 88, 87, 88,
-               88, 88, 87, 87, 87, 87, 87, 88,
-               87, 87, 87, 87, 87, 87, 88, 87,
-               87, 87, 87, 86, 86, 87, 87, 87,
-               87, 86, 86, 86, 87, 87, 86, 87,
-               86, 86, 86, 87, 87, 86, 86, 86,
-               86, 86, 87, 87, 86, 85, 85, 85,
-               84, 85, 85, 84, 84, 83, 83, 82,
-               82, 82, 81, 81, 80, 79, 79, 79,
-               78, 77, 77, 76, 76, 76, 75, 74,
-               74, 74, 73, 73, 72, 71, 71, 71,
-               70, 70, 69, 69, 68, 68, 67, 67,
-               67, 66, 66, 65, 65, 64, 64, 63,
-               62, 62, 62, 61, 60, 60, 59, 59,
-               58, 58, 57, 57, 56, 56, 56, 55,
-               55, 54, 55, 55, 54, 53, 53, 52,
-               53, 53, 52, 51, 51, 50, 51, 50,
-               49, 49, 50, 49, 49, 48, 48, 47,
-               47, 48, 46, 45, 45, 45, 46, 45,
-               45, 44, 45, 45, 45, 43, 42, 42,
-               41, 43, 41, 40, 40, 39, 40, 41,
-               39, 39, 39, 39, 39, 38, 35, 35,
-               34, 37, 36, 34, 33, 33, 33, 35,
-               34, 32, 32, 31, 32, 30, 29, 26,
-               25, 25, 27, 26, 23, 23, 23, 25,
-               24, 24, 22, 21, 20, 19, 16, 14,
-               13, 13, 13, 10, 9, 7, 7, 7,
-               12, 12, 12, 7, 0, 0, 0, 0
+       0, 0, 256, 384, 384, 497, 765, 806,
+       837, 851, 888, 901, 957, 981, 993, 1001,
+       1011, 1029, 1028, 1039, 1062, 1059, 1073, 1080,
+       1083, 1085, 1085, 1098, 1080, 1084, 1085, 1093,
+       1078, 1073, 1070, 1069, 1077, 1066, 1072, 1063,
+       1053, 1044, 1046, 1053, 1039, 1028, 1025, 1024,
+       1012, 1013, 1016, 996, 992, 990, 990, 980,
+       969, 968, 961, 955, 951, 949, 933, 930,
+       929, 925, 921, 916, 906, 901, 895, 893,
+       886, 877, 872, 869, 866, 861, 857, 849,
+       845, 838, 836, 832, 823, 821, 815, 813,
+       809, 805, 796, 793, 790, 785, 784, 778,
+       772, 768, 766, 763, 758, 752, 749, 745,
+       741, 740, 736, 730, 726, 724, 723, 718,
+       711, 709, 706, 704, 701, 698, 691, 689,
+       688, 683, 683, 678, 675, 673, 671, 669,
+       666, 663, 661, 660, 656, 656, 653, 650,
+       648, 647, 646, 643, 639, 638, 637, 635,
+       633, 632, 629, 627, 626, 625, 622, 621,
+       618, 618, 614, 614, 612, 609, 606, 606,
+       603, 600, 600, 597, 594, 591, 590, 586,
+       582, 581, 578, 575, 572, 569, 563, 560,
+       557, 554, 551, 548, 545, 539, 536, 533,
+       529, 527, 524, 519, 516, 513, 510, 507,
+       504, 501, 498, 493, 491, 488, 485, 484,
+       480, 476, 474, 471, 467, 466, 464, 460,
+       459, 455, 453, 449, 447, 446, 443, 441,
+       438, 435, 432, 432, 429, 427, 426, 422,
+       419, 418, 416, 414, 412, 410, 408, 406,
+       404, 402, 401, 398, 397, 395, 393, 390,
+       389, 388, 387, 384, 382, 380, 378, 377,
+       376, 375, 372, 370, 368, 368, 366, 364,
+       363, 361, 360, 358, 357, 355, 354, 352,
+       351, 350, 349, 346, 345, 344, 344, 342,
+       340, 339, 337, 337, 336, 335, 333, 331,
+       330, 329, 328, 326, 326, 324, 324, 322,
+       321, 320, 318, 318, 318, 317, 315, 313,
+       312, 311, 311, 310, 308, 307, 306, 306,
+       304, 304, 302, 301, 300, 300, 299, 297,
+       297, 296, 296, 294, 294, 292, 291, 291,
+       291, 290, 288, 287, 286, 286, 287, 285,
+       284, 283, 282, 282, 281, 281, 279, 278,
+       278, 278, 276, 276, 275, 274, 274, 273,
+       271, 270, 269, 268, 268, 267, 265, 262,
+       261, 260, 260, 259, 257, 254, 252, 252,
+       251, 251, 249, 246, 245, 244, 243, 242,
+       240, 239, 239, 237, 235, 235, 233, 231,
+       232, 230, 229, 226, 225, 224, 225, 224,
+       223, 220, 219, 219, 218, 217, 217, 214,
+       213, 213, 212, 211, 209, 209, 209, 208,
+       206, 205, 204, 203, 204, 203, 201, 200,
+       199, 197, 198, 198, 197, 195, 194, 194,
+       193, 192, 192, 191, 189, 190, 189, 188,
+       186, 187, 186, 185, 185, 184, 183, 181,
+       183, 182, 181, 180, 179, 178, 178, 178,
+       177, 176, 175, 176, 175, 174, 174, 173,
+       172, 173, 172, 171, 170, 170, 169, 169,
+       169, 168, 167, 166, 167, 167, 166, 165,
+       164, 164, 164, 163, 164, 163, 162, 163,
+       162, 161, 160, 161, 160, 160, 160, 159,
+       158, 157, 158, 158, 157, 157, 156, 156,
+       156, 156, 155, 155, 154, 154, 154, 154,
+       154, 153, 152, 153, 152, 152, 151, 152,
+       151, 152, 151, 150, 150, 149, 149, 150,
+       149, 149, 148, 148, 148, 149, 148, 147,
+       146, 146, 147, 146, 147, 146, 145, 146,
+       146, 145, 144, 145, 144, 145, 144, 144,
+       143, 143, 143, 144, 143, 142, 142, 142,
+       142, 142, 142, 141, 141, 141, 141, 140,
+       140, 141, 140, 140, 141, 140, 139, 139,
+       139, 140, 139, 139, 138, 138, 137, 139,
+       138, 138, 138, 137, 138, 137, 137, 137,
+       137, 136, 137, 136, 136, 136, 136, 135,
+       136, 135, 135, 135, 135, 136, 135, 135,
+       134, 134, 133, 135, 134, 134, 134, 133,
+       134, 133, 134, 133, 133, 132, 133, 133,
+       132, 133, 132, 132, 132, 132, 131, 131,
+       131, 132, 131, 131, 130, 131, 130, 132,
+       131, 130, 130, 129, 130, 129, 130, 129,
+       129, 129, 130, 129, 128, 128, 128, 128,
+       129, 128, 128, 127, 127, 128, 128, 127,
+       127, 126, 126, 127, 127, 126, 126, 126,
+       127, 126, 126, 126, 125, 125, 126, 125,
+       125, 124, 124, 124, 125, 125, 124, 124,
+       123, 124, 124, 123, 123, 122, 122, 122,
+       122, 122, 121, 120, 120, 119, 118, 118,
+       118, 117, 117, 116, 115, 115, 115, 114,
+       114, 113, 113, 112, 111, 111, 111, 110,
+       110, 109, 109, 108, 108, 108, 107, 107,
+       106, 106, 105, 105, 105, 104, 104, 103,
+       103, 102, 102, 102, 102, 101, 101, 100,
+       100, 99, 99, 99, 99, 99, 99, 98,
+       97, 98, 97, 97, 97, 96, 96, 95,
+       96, 95, 96, 95, 95, 94, 94, 95,
+       94, 94, 94, 93, 93, 92, 93, 93,
+       93, 93, 92, 92, 91, 92, 92, 92,
+       91, 91, 90, 90, 91, 91, 91, 90,
+       90, 90, 90, 91, 90, 90, 90, 89,
+       89, 89, 90, 89, 89, 89, 89, 89,
+       88, 89, 89, 88, 88, 88, 88, 87,
+       89, 88, 88, 88, 88, 88, 87, 88,
+       88, 88, 87, 87, 87, 87, 87, 88,
+       87, 87, 87, 87, 87, 87, 88, 87,
+       87, 87, 87, 86, 86, 87, 87, 87,
+       87, 86, 86, 86, 87, 87, 86, 87,
+       86, 86, 86, 87, 87, 86, 86, 86,
+       86, 86, 87, 87, 86, 85, 85, 85,
+       84, 85, 85, 84, 84, 83, 83, 82,
+       82, 82, 81, 81, 80, 79, 79, 79,
+       78, 77, 77, 76, 76, 76, 75, 74,
+       74, 74, 73, 73, 72, 71, 71, 71,
+       70, 70, 69, 69, 68, 68, 67, 67,
+       67, 66, 66, 65, 65, 64, 64, 63,
+       62, 62, 62, 61, 60, 60, 59, 59,
+       58, 58, 57, 57, 56, 56, 56, 55,
+       55, 54, 55, 55, 54, 53, 53, 52,
+       53, 53, 52, 51, 51, 50, 51, 50,
+       49, 49, 50, 49, 49, 48, 48, 47,
+       47, 48, 46, 45, 45, 45, 46, 45,
+       45, 44, 45, 45, 45, 43, 42, 42,
+       41, 43, 41, 40, 40, 39, 40, 41,
+       39, 39, 39, 39, 39, 38, 35, 35,
+       34, 37, 36, 34, 33, 33, 33, 35,
+       34, 32, 32, 31, 32, 30, 29, 26,
+       25, 25, 27, 26, 23, 23, 23, 25,
+       24, 24, 22, 21, 20, 19, 16, 14,
+       13, 13, 13, 10, 9, 7, 7, 7,
+       12, 12, 12, 7, 0, 0, 0, 0
 };
 
 #else
index 4eb96b4dc8dcf8d2a55a103cf55cb3aa0bef8e9a..8e4218cb70cd6377b3fd69bf6a29aac3f68a73e8 100644 (file)
@@ -26,9 +26,9 @@ const struct ia_css_de_config default_de_config = {
 
 void
 ia_css_de_encode(
-       struct sh_css_isp_de_params *to,
-       const struct ia_css_de_config *from,
-       unsigned int size)
+    struct sh_css_isp_de_params *to,
+    const struct ia_css_de_config *from,
+    unsigned int size)
 {
        (void)size;
        to->pixelnoise =
@@ -43,36 +43,36 @@ ia_css_de_encode(
 
 void
 ia_css_de_dump(
-       const struct sh_css_isp_de_params *de,
-       unsigned int level)
+    const struct sh_css_isp_de_params *de,
+    unsigned int level)
 {
        if (!de) return;
        ia_css_debug_dtrace(level, "Demosaic:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "de_pixelnoise", de->pixelnoise);
+                           "de_pixelnoise", de->pixelnoise);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "de_c1_coring_threshold",
-                       de->c1_coring_threshold);
+                           "de_c1_coring_threshold",
+                           de->c1_coring_threshold);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "de_c2_coring_threshold",
-                       de->c2_coring_threshold);
+                           "de_c2_coring_threshold",
+                           de->c2_coring_threshold);
 }
 
 void
 ia_css_de_debug_dtrace(
-       const struct ia_css_de_config *config,
-       unsigned int level)
+    const struct ia_css_de_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.pixelnoise=%d, config.c1_coring_threshold=%d, config.c2_coring_threshold=%d\n",
-               config->pixelnoise,
-               config->c1_coring_threshold, config->c2_coring_threshold);
+                           "config.pixelnoise=%d, config.c1_coring_threshold=%d, config.c2_coring_threshold=%d\n",
+                           config->pixelnoise,
+                           config->c1_coring_threshold, config->c2_coring_threshold);
 }
 
 void
 ia_css_init_de_state(
-       void/*struct sh_css_isp_de_vmem_state*/ * state,
-       size_t size)
+    void/*struct sh_css_isp_de_vmem_state*/ * state,
+    size_t size)
 {
        memset(state, 0, size);
 }
index b7b28af365c556afac77717fedb41b55f37e9cf2..baae1d9809dabf001b086c1d301fe192fa04f0f1 100644 (file)
@@ -22,23 +22,23 @@ extern const struct ia_css_de_config default_de_config;
 
 void
 ia_css_de_encode(
-       struct sh_css_isp_de_params *to,
-       const struct ia_css_de_config *from,
-       unsigned int size);
+    struct sh_css_isp_de_params *to,
+    const struct ia_css_de_config *from,
+    unsigned int size);
 
 void
 ia_css_de_dump(
-       const struct sh_css_isp_de_params *de,
-       unsigned int level);
+    const struct sh_css_isp_de_params *de,
+    unsigned int level);
 
 void
 ia_css_de_debug_dtrace(
-       const struct ia_css_de_config *config,
-       unsigned int level);
+    const struct ia_css_de_config *config,
+    unsigned int level);
 
 void
 ia_css_init_de_state(
-       void/*struct sh_css_isp_de_vmem_state*/ * state,
-       size_t size);
+    void/*struct sh_css_isp_de_vmem_state*/ * state,
+    size_t size);
 
 #endif /* __IA_CSS_DE_HOST_H */
index eddd9ae7d05f29b3ae5a6812216c698b27c905da..59568a182f64c350ea6c2030547aff8a50ab6886 100644 (file)
@@ -20,7 +20,7 @@
 
 /* DE (Demosaic) */
 struct sh_css_isp_de_vmem_state {
-       VMEM_ARRAY(de_buf[4], MAX_VECTORS_PER_BUF_LINE * ISP_NWAY);
+       VMEM_ARRAY(de_buf[4], MAX_VECTORS_PER_BUF_LINE *ISP_NWAY);
 };
 
 #endif /* __IA_CSS_DE_STATE_H */
index d459ec9a973bc702b17dc00ae7c59448a9d4db60..ade23d53f6bb5c99b4576ff9b87587c174f0e598 100644 (file)
@@ -26,9 +26,9 @@ const struct ia_css_ecd_config default_ecd_config = {
 
 void
 ia_css_ecd_encode(
-       struct sh_css_isp_ecd_params *to,
-       const struct ia_css_ecd_config *from,
-       unsigned int size)
+    struct sh_css_isp_ecd_params *to,
+    const struct ia_css_ecd_config *from,
+    unsigned int size)
 {
        (void)size;
        to->zip_strength = from->zip_strength;
@@ -38,16 +38,16 @@ ia_css_ecd_encode(
 
 void
 ia_css_ecd_dump(
-       const struct sh_css_isp_ecd_params *ecd,
-       unsigned int level);
+    const struct sh_css_isp_ecd_params *ecd,
+    unsigned int level);
 
 void
 ia_css_ecd_debug_dtrace(
-       const struct ia_css_ecd_config *config,
-       unsigned int level)
+    const struct ia_css_ecd_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.zip_strength=%d, config.fc_strength=%d, config.fc_debias=%d\n",
-               config->zip_strength,
-               config->fc_strength, config->fc_debias);
+                           "config.zip_strength=%d, config.fc_strength=%d, config.fc_debias=%d\n",
+                           config->zip_strength,
+                           config->fc_strength, config->fc_debias);
 }
index 69c5d2533ef7e3dba181bf5362a551a64c0a46e5..f3749e51450538b16953943d072ab615b9bcddfb 100644 (file)
@@ -22,17 +22,17 @@ extern const struct ia_css_ecd_config default_ecd_config;
 
 void
 ia_css_ecd_encode(
-       struct sh_css_isp_ecd_params *to,
-       const struct ia_css_ecd_config *from,
-       unsigned int size);
+    struct sh_css_isp_ecd_params *to,
+    const struct ia_css_ecd_config *from,
+    unsigned int size);
 
 void
 ia_css_ecd_dump(
-       const struct sh_css_isp_ecd_params *ecd,
-       unsigned int level);
+    const struct sh_css_isp_ecd_params *ecd,
+    unsigned int level);
 
 void
 ia_css_ecd_debug_dtrace(
-       const struct ia_css_ecd_config *config, unsigned int level);
+    const struct ia_css_ecd_config *config, unsigned int level);
 
 #endif /* __IA_CSS_DE2_HOST_H */
index 039865b6a44634be243b84a583e68cfd86260271..461ff18ed011766cbdda75ecb162e908a26f3d34 100644 (file)
@@ -44,9 +44,9 @@ const struct ia_css_dp_config default_dp_config = {
 
 void
 ia_css_dp_encode(
-       struct sh_css_isp_dp_params *to,
-       const struct ia_css_dp_config *from,
-       unsigned int size)
+    struct sh_css_isp_dp_params *to,
+    const struct ia_css_dp_config *from,
+    unsigned int size)
 {
        int gain = from->gain;
        int gr   = from->gr;
@@ -82,51 +82,51 @@ ia_css_dp_encode(
 
 void
 ia_css_dp_dump(
-       const struct sh_css_isp_dp_params *dp,
-       unsigned int level)
+    const struct sh_css_isp_dp_params *dp,
+    unsigned int level)
 {
        if (!dp) return;
        ia_css_debug_dtrace(level, "Defect Pixel Correction:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dp_threshold_single_w_2adj_on",
-               dp->threshold_single);
+                           "dp_threshold_single_w_2adj_on",
+                           dp->threshold_single);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dp_threshold_2adj_w_2adj_on",
-               dp->threshold_2adjacent);
+                           "dp_threshold_2adj_w_2adj_on",
+                           dp->threshold_2adjacent);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dp_gain", dp->gain);
+                           "dp_gain", dp->gain);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dpc_coef_rr_gr", dp->coef_rr_gr);
+                           "dpc_coef_rr_gr", dp->coef_rr_gr);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dpc_coef_rr_gb", dp->coef_rr_gb);
+                           "dpc_coef_rr_gb", dp->coef_rr_gb);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dpc_coef_bb_gb", dp->coef_bb_gb);
+                           "dpc_coef_bb_gb", dp->coef_bb_gb);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dpc_coef_bb_gr", dp->coef_bb_gr);
+                           "dpc_coef_bb_gr", dp->coef_bb_gr);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dpc_coef_gr_rr", dp->coef_gr_rr);
+                           "dpc_coef_gr_rr", dp->coef_gr_rr);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dpc_coef_gr_bb", dp->coef_gr_bb);
+                           "dpc_coef_gr_bb", dp->coef_gr_bb);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dpc_coef_gb_bb", dp->coef_gb_bb);
+                           "dpc_coef_gb_bb", dp->coef_gb_bb);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "dpc_coef_gb_rr", dp->coef_gb_rr);
+                           "dpc_coef_gb_rr", dp->coef_gb_rr);
 }
 
 void
 ia_css_dp_debug_dtrace(
-       const struct ia_css_dp_config *config,
-       unsigned int level)
+    const struct ia_css_dp_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.threshold=%d, config.gain=%d\n",
-               config->threshold, config->gain);
+                           "config.threshold=%d, config.gain=%d\n",
+                           config->threshold, config->gain);
 }
 
 void
 ia_css_init_dp_state(
-       void/*struct sh_css_isp_dp_vmem_state*/ * state,
-       size_t size)
+    void/*struct sh_css_isp_dp_vmem_state*/ * state,
+    size_t size)
 {
        memset(state, 0, size);
 }
index c8359ecc3a8987a46db7e095d9270a6a2b44091a..05fd7fdd618d86bdae4de83f395efa8a212b4b5e 100644 (file)
@@ -25,23 +25,23 @@ extern const struct ia_css_dp_config default_dp_10bpp_config;
 
 void
 ia_css_dp_encode(
-       struct sh_css_isp_dp_params *to,
-       const struct ia_css_dp_config *from,
-       unsigned int size);
+    struct sh_css_isp_dp_params *to,
+    const struct ia_css_dp_config *from,
+    unsigned int size);
 
 void
 ia_css_dp_dump(
-       const struct sh_css_isp_dp_params *dp,
-       unsigned int level);
+    const struct sh_css_isp_dp_params *dp,
+    unsigned int level);
 
 void
 ia_css_dp_debug_dtrace(
-       const struct ia_css_dp_config *config,
-       unsigned int level);
+    const struct ia_css_dp_config *config,
+    unsigned int level);
 
 void
 ia_css_init_dp_state(
-       void/*struct sh_css_isp_dp_vmem_state*/ * state,
-       size_t size);
+    void/*struct sh_css_isp_dp_vmem_state*/ * state,
+    size_t size);
 
 #endif /* __IA_CSS_DP_HOST_H */
index 1217a2a7b2f55f9b5871e2dab2a8431ac222921e..4dfad4ace20bc63b6b14f88759f9b1935ae6dfc4 100644 (file)
 
 void
 ia_css_dpc2_encode(
-       struct ia_css_isp_dpc2_params *to,
-       const struct ia_css_dpc2_config *from,
-       size_t size)
+    struct ia_css_isp_dpc2_params *to,
+    const struct ia_css_dpc2_config *from,
+    size_t size)
 {
        (void)size;
 
        assert((from->metric1 >= 0) && (from->metric1 <= METRIC1_ONE_FP));
        assert((from->metric3 >= 0) && (from->metric3 <= METRIC3_ONE_FP));
        assert((from->metric2 >= METRIC2_ONE_FP) &&
-                       (from->metric2 < 256 * METRIC2_ONE_FP));
+              (from->metric2 < 256 * METRIC2_ONE_FP));
        assert((from->wb_gain_gr > 0) && (from->wb_gain_gr < 16 * WBGAIN_ONE_FP));
        assert((from->wb_gain_r  > 0) && (from->wb_gain_r  < 16 * WBGAIN_ONE_FP));
        assert((from->wb_gain_b  > 0) && (from->wb_gain_b  < 16 * WBGAIN_ONE_FP));
@@ -45,8 +45,8 @@ ia_css_dpc2_encode(
 /* TODO: AM: This needs a proper implementation. */
 void
 ia_css_init_dpc2_state(
-       void *state,
-       size_t size)
+    void *state,
+    size_t size)
 {
        (void)state;
        (void)size;
@@ -56,8 +56,8 @@ ia_css_init_dpc2_state(
 /* TODO: AM: This needs a proper implementation. */
 void
 ia_css_dpc2_debug_dtrace(
-       const struct ia_css_dpc2_config *config,
-       unsigned int level)
+    const struct ia_css_dpc2_config *config,
+    unsigned int level)
 {
        (void)config;
        (void)level;
index 7d4619f2bfb2e1515fcc589af687c526c889c6eb..a31ef0e5047b899095781b3f44e20a4e9fdc1a25 100644 (file)
 
 void
 ia_css_dpc2_encode(
-       struct ia_css_isp_dpc2_params *to,
-       const struct ia_css_dpc2_config *from,
-       size_t size);
+    struct ia_css_isp_dpc2_params *to,
+    const struct ia_css_dpc2_config *from,
+    size_t size);
 
 void
 ia_css_init_dpc2_state(
-       void *state,
-       size_t size);
+    void *state,
+    size_t size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_dpc2_debug_dtrace(
-       const struct ia_css_dpc2_config *config,
-       unsigned int level);
+    const struct ia_css_dpc2_config *config,
+    unsigned int level);
 #endif
 
 #endif /* __IA_CSS_DPC2_HOST_H */
index 0c21b41774c388bceb6b42901006a77063314275..2e438a4de3a640564e1bf4a0330bf56f7b87961a 100644 (file)
@@ -33,9 +33,9 @@ static const struct ia_css_dvs_configuration default_config = {
 
 void
 ia_css_dvs_config(
-       struct sh_css_isp_dvs_isp_config *to,
-       const struct ia_css_dvs_configuration  *from,
-       unsigned int size)
+    struct sh_css_isp_dvs_isp_config *to,
+    const struct ia_css_dvs_configuration  *from,
+    unsigned int size)
 {
        (void)size;
        to->num_horizontal_blocks =
@@ -46,8 +46,8 @@ ia_css_dvs_config(
 
 void
 ia_css_dvs_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *info)
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *info)
 {
        struct ia_css_dvs_configuration config = default_config;
 
@@ -58,12 +58,12 @@ ia_css_dvs_configure(
 
 static void
 convert_coords_to_ispparams(
-       struct ia_css_host_data *gdc_warp_table,
-       const struct ia_css_dvs_6axis_config *config,
-       unsigned int i_stride,
-       unsigned int o_width,
-       unsigned int o_height,
-       unsigned int uv_flag)
+    struct ia_css_host_data *gdc_warp_table,
+    const struct ia_css_dvs_6axis_config *config,
+    unsigned int i_stride,
+    unsigned int o_width,
+    unsigned int o_height,
+    unsigned int uv_flag)
 {
        unsigned int i, j;
 #ifndef ISP2401
@@ -71,17 +71,20 @@ convert_coords_to_ispparams(
 #endif
        gdc_warp_param_mem_t s = { 0 };
        unsigned int x00, x01, x10, x11,
-                    y00, y01, y10, y11;
+                y00, y01, y10, y11;
 
        unsigned int xmin, ymin, xmax, ymax;
        unsigned int topleft_x, topleft_y, bottom_x, bottom_y,
-                    topleft_x_frac, topleft_y_frac;
+                topleft_x_frac, topleft_y_frac;
        unsigned int dvs_interp_envelope = (DVS_GDC_INTERP_METHOD == HRT_GDC_BLI_MODE ?
-                                          DVS_GDC_BLI_INTERP_ENVELOPE : DVS_GDC_BCI_INTERP_ENVELOPE);
+                                           DVS_GDC_BLI_INTERP_ENVELOPE : DVS_GDC_BCI_INTERP_ENVELOPE);
 
        /* number of blocks per height and width */
-       unsigned int num_blocks_y =  (uv_flag ? DVS_NUM_BLOCKS_Y_CHROMA(o_height) : DVS_NUM_BLOCKS_Y(o_height));
-       unsigned int num_blocks_x =  (uv_flag ? DVS_NUM_BLOCKS_X_CHROMA(o_width)  : DVS_NUM_BLOCKS_X(o_width)); // round num_x up to blockdim_x, if it concerns the Y0Y1 block (uv_flag==0) round up to even
+       unsigned int num_blocks_y =  (uv_flag ? DVS_NUM_BLOCKS_Y_CHROMA(
+                                         o_height) : DVS_NUM_BLOCKS_Y(o_height));
+       unsigned int num_blocks_x =  (uv_flag ? DVS_NUM_BLOCKS_X_CHROMA(
+                                         o_width)  : DVS_NUM_BLOCKS_X(
+                                         o_width)); // round num_x up to blockdim_x, if it concerns the Y0Y1 block (uv_flag==0) round up to even
 
        unsigned int in_stride = i_stride * DVS_INPUT_BYTES_PER_PIXEL;
        unsigned int width, height;
@@ -97,14 +100,12 @@ convert_coords_to_ispparams(
 
        ptr += (2 * uv_flag); /* format is Y0 Y1 UV, so UV starts at 3rd position */
 
-       if (uv_flag == 0)
-       {
+       if (uv_flag == 0) {
                xbuff = config->xcoords_y;
                ybuff = config->ycoords_y;
                width = config->width_y;
                height = config->height_y;
-       } else
-       {
+       } else {
                xbuff = config->xcoords_uv;
                ybuff = config->ycoords_uv;
                width = config->width_uv;
@@ -116,7 +117,8 @@ convert_coords_to_ispparams(
        IA_CSS_LOG("num_blocks_x %d num_blocks_y %d", num_blocks_x, num_blocks_y);
        IA_CSS_LOG("width %d height %d", width, height);
 
-       assert(width == num_blocks_x + 1); // the width and height of the provided morphing table should be 1 more than the number of blocks
+       assert(width == num_blocks_x +
+              1); // the width and height of the provided morphing table should be 1 more than the number of blocks
        assert(height == num_blocks_y + 1);
 
        for (j = 0; j < num_blocks_y; j++) {
@@ -145,8 +147,8 @@ convert_coords_to_ispparams(
 
                        topleft_y = ymin >> DVS_COORD_FRAC_BITS;
                        topleft_x = ((xmin >> DVS_COORD_FRAC_BITS)
-                                       >> XMEM_ALIGN_LOG2)
-                                       << (XMEM_ALIGN_LOG2);
+                                    >> XMEM_ALIGN_LOG2)
+                                   << (XMEM_ALIGN_LOG2);
                        s.in_addr_offset = topleft_y * in_stride + topleft_x;
 
                        /* similar to topleft_y calculation, but round up if ymax
@@ -225,9 +227,9 @@ convert_coords_to_ispparams(
 
 struct ia_css_host_data *
 convert_allocate_dvs_6axis_config(
-       const struct ia_css_dvs_6axis_config *dvs_6axis_config,
-       const struct ia_css_binary *binary,
-       const struct ia_css_frame_info *dvs_in_frame_info)
+    const struct ia_css_dvs_6axis_config *dvs_6axis_config,
+    const struct ia_css_binary *binary,
+    const struct ia_css_frame_info *dvs_in_frame_info)
 {
        unsigned int i_stride;
        unsigned int o_width;
@@ -246,7 +248,7 @@ convert_allocate_dvs_6axis_config(
 
        /*DVS only supports input frame of YUV420 or NV12. Fail for all other cases*/
        assert((dvs_in_frame_info->format == IA_CSS_FRAME_FORMAT_NV12)
-               || (dvs_in_frame_info->format == IA_CSS_FRAME_FORMAT_YUV420));
+              || (dvs_in_frame_info->format == IA_CSS_FRAME_FORMAT_YUV420));
 
        isp_data_ptr = (struct gdc_warp_param_mem_s *)me->address;
 
@@ -273,11 +275,10 @@ convert_allocate_dvs_6axis_config(
 
 enum ia_css_err
 store_dvs_6axis_config(
-       const struct ia_css_dvs_6axis_config *dvs_6axis_config,
-       const struct ia_css_binary *binary,
-       const struct ia_css_frame_info *dvs_in_frame_info,
-       hrt_vaddress ddr_addr_y)
-{
+    const struct ia_css_dvs_6axis_config *dvs_6axis_config,
+    const struct ia_css_binary *binary,
+    const struct ia_css_frame_info *dvs_in_frame_info,
+    hrt_vaddress ddr_addr_y) {
        struct ia_css_host_data *me;
 
        assert(dvs_6axis_config);
@@ -285,17 +286,18 @@ store_dvs_6axis_config(
        assert(dvs_in_frame_info);
 
        me = convert_allocate_dvs_6axis_config(dvs_6axis_config,
-                                binary,
-                                dvs_in_frame_info);
+                                              binary,
+                                              dvs_in_frame_info);
 
-       if (!me) {
+       if (!me)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
        }
 
        ia_css_params_store_ia_css_host_data(
-                               ddr_addr_y,
-                               me);
+           ddr_addr_y,
+           me);
        ia_css_host_data_free(me);
 
        return IA_CSS_SUCCESS;
index 4402ca76d627110f6ca26a85b37fe1792bcd2e2e..d711170cf7cc8f16aa6a6023aa17bdd77772b49c 100644 (file)
 
 void
 ia_css_dvs_config(
-       struct sh_css_isp_dvs_isp_config      *to,
-       const struct ia_css_dvs_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_dvs_isp_config      *to,
+    const struct ia_css_dvs_configuration *from,
+    unsigned int size);
 
 void
 ia_css_dvs_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *from);
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *from);
 
 void
 convert_dvs_6axis_config(
-       struct ia_css_isp_parameters *params,
-       const struct ia_css_binary *binary);
+    struct ia_css_isp_parameters *params,
+    const struct ia_css_binary *binary);
 
 struct ia_css_host_data *
 convert_allocate_dvs_6axis_config(
-       const struct ia_css_dvs_6axis_config *dvs_6axis_config,
-       const struct ia_css_binary *binary,
-       const struct ia_css_frame_info *dvs_in_frame_info);
+    const struct ia_css_dvs_6axis_config *dvs_6axis_config,
+    const struct ia_css_binary *binary,
+    const struct ia_css_frame_info *dvs_in_frame_info);
 
 enum ia_css_err
 store_dvs_6axis_config(
-       const struct ia_css_dvs_6axis_config *dvs_6axis_config,
-       const struct ia_css_binary *binary,
-       const struct ia_css_frame_info *dvs_in_frame_info,
-       hrt_vaddress ddr_addr_y);
+    const struct ia_css_dvs_6axis_config *dvs_6axis_config,
+    const struct ia_css_binary *binary,
+    const struct ia_css_frame_info *dvs_in_frame_info,
+    hrt_vaddress ddr_addr_y);
 
 #endif /* __IA_CSS_DVS_HOST_H */
index 5a79f10a6294851ab4aba33d9897eceebd7ebf0d..03e1998b04649ca655acf2ee5f4b33fe2111027a 100644 (file)
 #define NUMBER_OF_FCINV_POINTS 9
 
 static const s16 chgrinv_x[NUMBER_OF_CHGRINV_POINTS] = {
-0, 16, 64, 144, 272, 448, 672, 976,
-1376, 1888, 2528, 3312, 4256, 5376, 6688};
+       0, 16, 64, 144, 272, 448, 672, 976,
+       1376, 1888, 2528, 3312, 4256, 5376, 6688
+};
 
 static const s16 chgrinv_a[NUMBER_OF_CHGRINV_POINTS] = {
--7171, -256, -29, -3456, -1071, -475, -189, -102,
--48, -38, -10, -9, -7, -6, 0};
+       -7171, -256, -29, -3456, -1071, -475, -189, -102,
+           -48, -38, -10, -9, -7, -6, 0
+    };
 
 static const s16 chgrinv_b[NUMBER_OF_CHGRINV_POINTS] = {
-8191, 1021, 256, 114, 60, 37, 24, 17,
-12, 9, 6, 5, 4, 3, 2};
+       8191, 1021, 256, 114, 60, 37, 24, 17,
+       12, 9, 6, 5, 4, 3, 2
+};
 
 static const s16 chgrinv_c[NUMBER_OF_CHGRINV_POINTS] = {
-1, 1, 1, 0, 0, 0, 0, 0,
-0, 0, 0, 0, 0, 0, 0};
+       1, 1, 1, 0, 0, 0, 0, 0,
+       0, 0, 0, 0, 0, 0, 0
+};
 
 static const s16 tcinv_x[NUMBER_OF_TCINV_POINTS] = {
-0, 4, 11, 23, 42, 68, 102, 148, 205};
+       0, 4, 11, 23, 42, 68, 102, 148, 205
+};
 
 static const s16 tcinv_a[NUMBER_OF_TCINV_POINTS] = {
--6364, -631, -126, -34, -13, -6, -4452, -2156, 0};
+       -6364, -631, -126, -34, -13, -6, -4452, -2156, 0
+    };
 
 static const s16 tcinv_b[NUMBER_OF_TCINV_POINTS] = {
-8191, 1828, 726, 352, 197, 121, 80, 55, 40};
+       8191, 1828, 726, 352, 197, 121, 80, 55, 40
+};
 
 static const s16 tcinv_c[NUMBER_OF_TCINV_POINTS] = {
-1, 1, 1, 1, 1, 1, 0, 0, 0};
+       1, 1, 1, 1, 1, 1, 0, 0, 0
+};
 
 static const s16 fcinv_x[NUMBER_OF_FCINV_POINTS] = {
-0, 80, 216, 456, 824, 1344, 2040, 2952, 4096};
+       0, 80, 216, 456, 824, 1344, 2040, 2952, 4096
+};
 
 static const s16 fcinv_a[NUMBER_OF_FCINV_POINTS] = {
--5244, -486, -86, -2849, -961, -400, -180, -86, 0};
+       -5244, -486, -86, -2849, -961, -400, -180, -86, 0
+    };
 
 static const s16 fcinv_b[NUMBER_OF_FCINV_POINTS] = {
-8191, 1637, 607, 287, 159, 98, 64, 44, 32};
+       8191, 1637, 607, 287, 159, 98, 64, 44, 32
+};
 
 static const s16 fcinv_c[NUMBER_OF_FCINV_POINTS] = {
-1, 1, 1, 0, 0, 0, 0, 0, 0};
+       1, 1, 1, 0, 0, 0, 0, 0, 0
+};
 
 void
 ia_css_eed1_8_vmem_encode(
-       struct eed1_8_vmem_params *to,
-       const struct ia_css_eed1_8_config *from,
-       size_t size)
+    struct eed1_8_vmem_params *to,
+    const struct ia_css_eed1_8_config *from,
+    size_t size)
 {
        unsigned int i, j, base;
        const unsigned int total_blocks = 4;
@@ -160,24 +172,24 @@ ia_css_eed1_8_vmem_encode(
 
                for (j = 0; j < IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS; j++) {
                        to->e_dew_enh_x[0][base + j] = min_t(int, max_t(int,
-                                                                       from->dew_enhance_seg_x[j], 0),
-                                                                       8191);
+                                                            from->dew_enhance_seg_x[j], 0),
+                                                            8191);
                        to->e_dew_enh_y[0][base + j] = min_t(int, max_t(int,
-                                                                       from->dew_enhance_seg_y[j], -8192),
-                                                                       8191);
+                                                            from->dew_enhance_seg_y[j], -8192),
+                                                            8191);
                }
 
                for (j = 0; j < (IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1); j++) {
                        to->e_dew_enh_a[0][base + j] = min_t(int, max_t(int,
-                                                                       from->dew_enhance_seg_slope[j],
-                                                                       -8192), 8191);
+                                                            from->dew_enhance_seg_slope[j],
+                                                            -8192), 8191);
                        /* Convert dew_enhance_seg_exp to flag:
                         * 0 -> 0
                         * 1...13 -> 1
                         */
                        to->e_dew_enh_f[0][base + j] = (min_t(int, max_t(int,
-                                                                        from->dew_enhance_seg_exp[j],
-                                                                        0), 13) > 0);
+                                                             from->dew_enhance_seg_exp[j],
+                                                             0), 13) > 0);
                }
 
                /* Hard-coded to 0, in order to be able to handle out of
@@ -212,9 +224,9 @@ ia_css_eed1_8_vmem_encode(
 
 void
 ia_css_eed1_8_encode(
-       struct eed1_8_dmem_params *to,
-       const struct ia_css_eed1_8_config *from,
-       size_t size)
+    struct eed1_8_dmem_params *to,
+    const struct ia_css_eed1_8_config *from,
+    size_t size)
 {
        int i;
        int min_exp = 0;
@@ -270,8 +282,8 @@ ia_css_eed1_8_encode(
 
 void
 ia_css_init_eed1_8_state(
-       void *state,
-       size_t size)
+    void *state,
+    size_t size)
 {
        memset(state, 0, size);
 }
@@ -279,19 +291,21 @@ ia_css_init_eed1_8_state(
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_eed1_8_debug_dtrace(
-       const struct ia_css_eed1_8_config *eed,
-       unsigned int level)
+    const struct ia_css_eed1_8_config *eed,
+    unsigned int level)
 {
        if (!eed)
                return;
 
        ia_css_debug_dtrace(level, "Edge Enhancing Demosaic 1.8:\n");
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rbzp_strength", eed->rbzp_strength);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rbzp_strength",
+                           eed->rbzp_strength);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fcstrength", eed->fcstrength);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fcthres_0", eed->fcthres_0);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fcthres_1", eed->fcthres_1);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fc_sat_coef", eed->fc_sat_coef);
-       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fc_coring_prm", eed->fc_coring_prm);
+       ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fc_coring_prm",
+                           eed->fc_coring_prm);
 
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "aerel_thres0", eed->aerel_thres0);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "aerel_gain0", eed->aerel_gain0);
index aa38a35f75dea74904f7d35912ae98de09311124..05f817125d3ca7cf37348c4539507763ea5b65cd 100644 (file)
 
 void
 ia_css_eed1_8_vmem_encode(
-       struct eed1_8_vmem_params *to,
-       const struct ia_css_eed1_8_config *from,
-       size_t size);
+    struct eed1_8_vmem_params *to,
+    const struct ia_css_eed1_8_config *from,
+    size_t size);
 
 void
 ia_css_eed1_8_encode(
-       struct eed1_8_dmem_params *to,
-       const struct ia_css_eed1_8_config *from,
-       size_t size);
+    struct eed1_8_dmem_params *to,
+    const struct ia_css_eed1_8_config *from,
+    size_t size);
 
 void
 ia_css_init_eed1_8_state(
-       void *state,
-       size_t size);
+    void *state,
+    size_t size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_eed1_8_debug_dtrace(
-       const struct ia_css_eed1_8_config *config,
-       unsigned int level);
+    const struct ia_css_eed1_8_config *config,
+    unsigned int level);
 #endif
 
 #endif /* __IA_CSS_EED1_8_HOST_H */
index 303ec5193ffcf21c0c3b23b8e80f0ef00714e944..b8fdb7a51a127f510623d3d70783bfdabb4a01bb 100644 (file)
@@ -77,8 +77,10 @@ struct ia_css_eed1_8_config {
 
        s32 dew_enhance_seg_x[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS];           /** Segment data for directional edge weight: X. */
        s32 dew_enhance_seg_y[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS];           /** Segment data for directional edge weight: Y. */
-       s32 dew_enhance_seg_slope[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1)]; /** Segment data for directional edge weight: Slope. */
-       s32 dew_enhance_seg_exp[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1)];   /** Segment data for directional edge weight: Exponent. */
+       s32 dew_enhance_seg_slope[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS -
+                                  1)]; /** Segment data for directional edge weight: Slope. */
+       s32 dew_enhance_seg_exp[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS -
+                                1)];   /** Segment data for directional edge weight: Exponent. */
        s32 dedgew_max; /** Max Weight for Directional Edge. */
 };
 
index de08cc2f41f8f8bfa6be9839181b07e0b423edcd..0b96b9618ab6e9582f501fd7aef550ce78124da3 100644 (file)
@@ -28,9 +28,9 @@ const struct ia_css_formats_config default_formats_config = {
 
 void
 ia_css_formats_encode(
-       struct sh_css_isp_formats_params *to,
-       const struct ia_css_formats_config *from,
-       unsigned int size)
+    struct sh_css_isp_formats_params *to,
+    const struct ia_css_formats_config *from,
+    unsigned int size)
 {
        (void)size;
        to->video_full_range_flag = from->video_full_range_flag;
@@ -40,12 +40,12 @@ ia_css_formats_encode(
 /* FIXME: See BZ 4427 */
 void
 ia_css_formats_dump(
-       const struct sh_css_isp_formats_params *formats,
-       unsigned int level)
+    const struct sh_css_isp_formats_params *formats,
+    unsigned int level)
 {
        if (!formats) return;
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "video_full_range_flag", formats->video_full_range_flag);
+                           "video_full_range_flag", formats->video_full_range_flag);
 }
 #endif
 
@@ -53,11 +53,11 @@ ia_css_formats_dump(
 /* FIXME: See BZ 4427 */
 void
 ia_css_formats_debug_dtrace(
-       const struct ia_css_formats_config *config,
-       unsigned int level)
+    const struct ia_css_formats_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.video_full_range_flag=%d\n",
-               config->video_full_range_flag);
+                           "config.video_full_range_flag=%d\n",
+                           config->video_full_range_flag);
 }
 #endif
index a6a4a2e41b21e16619f026a52e06183b7c076571..0aac424d9d54932df506ce125b5a066e7347f691 100644 (file)
@@ -22,23 +22,23 @@ extern const struct ia_css_formats_config default_formats_config;
 
 void
 ia_css_formats_encode(
-       struct sh_css_isp_formats_params *to,
-       const struct ia_css_formats_config *from,
-       unsigned int size);
+    struct sh_css_isp_formats_params *to,
+    const struct ia_css_formats_config *from,
+    unsigned int size);
 #ifndef IA_CSS_NO_DEBUG
 /* FIXME: See BZ 4427 */
 void
 ia_css_formats_dump(
-       const struct sh_css_isp_formats_params *formats,
-       unsigned int level);
+    const struct sh_css_isp_formats_params *formats,
+    unsigned int level);
 #endif
 
 #ifndef IA_CSS_NO_DEBUG
 /* FIXME: See BZ 4427 */
 void
 ia_css_formats_debug_dtrace(
-       const struct ia_css_formats_config *formats,
-       unsigned int level);
+    const struct ia_css_formats_config *formats,
+    unsigned int level);
 #endif /*IA_CSS_NO_DEBUG*/
 
 #endif /* __IA_CSS_FORMATS_HOST_H */
index 06d54dd285b0fa8afee60e6f0209df988b735499..7b55dfea359a8c889f5a6421597c9247ee68bec4 100644 (file)
@@ -28,9 +28,9 @@
 
 void
 ia_css_fpn_encode(
-       struct sh_css_isp_fpn_params *to,
-       const struct ia_css_fpn_table *from,
-       unsigned int size)
+    struct sh_css_isp_fpn_params *to,
+    const struct ia_css_fpn_table *from,
+    unsigned int size)
 {
        (void)size;
        to->shift = from->shift;
@@ -39,22 +39,22 @@ ia_css_fpn_encode(
 
 void
 ia_css_fpn_dump(
-       const struct sh_css_isp_fpn_params *fpn,
-       unsigned int level)
+    const struct sh_css_isp_fpn_params *fpn,
+    unsigned int level)
 {
        if (!fpn) return;
        ia_css_debug_dtrace(level, "Fixed Pattern Noise Reduction:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "fpn_shift", fpn->shift);
+                           "fpn_shift", fpn->shift);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "fpn_enabled", fpn->enabled);
+                           "fpn_enabled", fpn->enabled);
 }
 
 void
 ia_css_fpn_config(
-       struct sh_css_isp_fpn_isp_config *to,
-       const struct ia_css_fpn_configuration *from,
-       unsigned int size)
+    struct sh_css_isp_fpn_isp_config *to,
+    const struct ia_css_fpn_configuration *from,
+    unsigned int size)
 {
        unsigned int elems_a = ISP_VEC_NELEMS;
 
@@ -68,8 +68,8 @@ ia_css_fpn_config(
 
 void
 ia_css_fpn_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *info)
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *info)
 {
        struct ia_css_frame_info my_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
        const struct ia_css_fpn_configuration config = {
index 0aeea3752e65f64c563ef6474fd2030962800991..02e85570bd1c002bfd3c75144ff55f5abb2744ba 100644 (file)
 
 void
 ia_css_fpn_encode(
-       struct sh_css_isp_fpn_params *to,
-       const struct ia_css_fpn_table *from,
-       unsigned int size);
+    struct sh_css_isp_fpn_params *to,
+    const struct ia_css_fpn_table *from,
+    unsigned int size);
 
 void
 ia_css_fpn_dump(
-       const struct sh_css_isp_fpn_params *fpn,
-       unsigned int level);
+    const struct sh_css_isp_fpn_params *fpn,
+    unsigned int level);
 
 void
 ia_css_fpn_config(
-       struct sh_css_isp_fpn_isp_config      *to,
-       const struct ia_css_fpn_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_fpn_isp_config      *to,
+    const struct ia_css_fpn_configuration *from,
+    unsigned int size);
 
 void
 ia_css_fpn_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *from);
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *from);
 
 #endif /* __IA_CSS_FPN_HOST_H */
index 0635190d3b71643905df81cf9a26d0bf357db3e4..1a489c93eb97f2fe6a1431fd518fbab8e3964db3 100644 (file)
@@ -35,24 +35,24 @@ const struct ia_css_ce_config default_ce_config = {
 
 void
 ia_css_gc_encode(
-       struct sh_css_isp_gc_params *to,
-       const struct ia_css_gc_config *from,
-       unsigned int size)
+    struct sh_css_isp_gc_params *to,
+    const struct ia_css_gc_config *from,
+    unsigned int size)
 {
        (void)size;
        to->gain_k1 =
            uDIGIT_FITTING((int)from->gain_k1, 16,
-               IA_CSS_GAMMA_GAIN_K_SHIFT);
+                          IA_CSS_GAMMA_GAIN_K_SHIFT);
        to->gain_k2 =
            uDIGIT_FITTING((int)from->gain_k2, 16,
-               IA_CSS_GAMMA_GAIN_K_SHIFT);
+                          IA_CSS_GAMMA_GAIN_K_SHIFT);
 }
 
 void
 ia_css_ce_encode(
-       struct sh_css_isp_ce_params *to,
-       const struct ia_css_ce_config *from,
-       unsigned int size)
+    struct sh_css_isp_ce_params *to,
+    const struct ia_css_ce_config *from,
+    unsigned int size)
 {
        (void)size;
        to->uv_level_min = from->uv_level_min;
@@ -61,9 +61,9 @@ ia_css_ce_encode(
 
 void
 ia_css_gc_vamem_encode(
-       struct sh_css_isp_gc_vamem_params *to,
-       const struct ia_css_gamma_table *from,
-       unsigned int size)
+    struct sh_css_isp_gc_vamem_params *to,
+    const struct ia_css_gamma_table *from,
+    unsigned int size)
 {
        (void)size;
        memcpy(&to->gc,  &from->data, sizeof(to->gc));
@@ -72,46 +72,46 @@ ia_css_gc_vamem_encode(
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_gc_dump(
-       const struct sh_css_isp_gc_params *gc,
-       unsigned int level)
+    const struct sh_css_isp_gc_params *gc,
+    unsigned int level)
 {
        if (!gc) return;
        ia_css_debug_dtrace(level, "Gamma Correction:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "gamma_gain_k1", gc->gain_k1);
+                           "gamma_gain_k1", gc->gain_k1);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "gamma_gain_k2", gc->gain_k2);
+                           "gamma_gain_k2", gc->gain_k2);
 }
 
 void
 ia_css_ce_dump(
-       const struct sh_css_isp_ce_params *ce,
-       unsigned int level)
+    const struct sh_css_isp_ce_params *ce,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level, "Chroma Enhancement:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ce_uv_level_min", ce->uv_level_min);
+                           "ce_uv_level_min", ce->uv_level_min);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ce_uv_level_max", ce->uv_level_max);
+                           "ce_uv_level_max", ce->uv_level_max);
 }
 
 void
 ia_css_gc_debug_dtrace(
-       const struct ia_css_gc_config *config,
-       unsigned int level)
+    const struct ia_css_gc_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.gain_k1=%d, config.gain_k2=%d\n",
-               config->gain_k1, config->gain_k2);
+                           "config.gain_k1=%d, config.gain_k2=%d\n",
+                           config->gain_k1, config->gain_k2);
 }
 
 void
 ia_css_ce_debug_dtrace(
-       const struct ia_css_ce_config *config,
-       unsigned int level)
+    const struct ia_css_ce_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.uv_level_min=%d, config.uv_level_max=%d\n",
-               config->uv_level_min, config->uv_level_max);
+                           "config.uv_level_min=%d, config.uv_level_max=%d\n",
+                           config->uv_level_min, config->uv_level_max);
 }
 #endif
index 4f470780002c91c78b349735b934d4b90f53d487..2fb2927b07f1b017877b7db14f0cc79a7b04c090 100644 (file)
@@ -23,42 +23,42 @@ extern const struct ia_css_ce_config default_ce_config;
 
 void
 ia_css_gc_encode(
-       struct sh_css_isp_gc_params *to,
-       const struct ia_css_gc_config *from,
-       unsigned int size);
+    struct sh_css_isp_gc_params *to,
+    const struct ia_css_gc_config *from,
+    unsigned int size);
 
 void
 ia_css_gc_vamem_encode(
-       struct sh_css_isp_gc_vamem_params *to,
-       const struct ia_css_gamma_table *from,
-       unsigned int size);
+    struct sh_css_isp_gc_vamem_params *to,
+    const struct ia_css_gamma_table *from,
+    unsigned int size);
 
 void
 ia_css_ce_encode(
-       struct sh_css_isp_ce_params *to,
-       const struct ia_css_ce_config *from,
-       unsigned int size);
+    struct sh_css_isp_ce_params *to,
+    const struct ia_css_ce_config *from,
+    unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_gc_dump(
-       const struct sh_css_isp_gc_params *gc,
-       unsigned int level);
+    const struct sh_css_isp_gc_params *gc,
+    unsigned int level);
 
 void
 ia_css_ce_dump(
-       const struct sh_css_isp_ce_params *ce,
-       unsigned int level);
+    const struct sh_css_isp_ce_params *ce,
+    unsigned int level);
 
 void
 ia_css_gc_debug_dtrace(
-       const struct ia_css_gc_config *config,
-       unsigned int level);
+    const struct ia_css_gc_config *config,
+    unsigned int level);
 
 void
 ia_css_ce_debug_dtrace(
-       const struct ia_css_ce_config *config,
-       unsigned int level);
+    const struct ia_css_ce_config *config,
+    unsigned int level);
 
 #endif
 
index 0c51d283a070f5b53c22a6aba538153458d3c6e4..15cf0575aac5f3bf1346b027255f8313f969c5a2 100644 (file)
@@ -25,173 +25,173 @@ struct ia_css_gamma_table default_gamma_table;
 
 static const uint16_t
 default_gamma_table_data[IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE] = {
-  0,   4,   8,  12,  17,  21,  27,  32,
- 38,  44,  49,  55,  61,  66,  71,  76,
- 80,  84,  88,  92,  95,  98, 102, 105,
-108, 110, 113, 116, 118, 121, 123, 126,
-128, 130, 132, 135, 137, 139, 141, 143,
-145, 146, 148, 150, 152, 153, 155, 156,
-158, 160, 161, 162, 164, 165, 166, 168,
-169, 170, 171, 172, 174, 175, 176, 177,
-178, 179, 180, 181, 182, 183, 184, 184,
-185, 186, 187, 188, 189, 189, 190, 191,
-192, 192, 193, 194, 195, 195, 196, 197,
-197, 198, 198, 199, 200, 200, 201, 201,
-202, 203, 203, 204, 204, 205, 205, 206,
-206, 207, 207, 208, 208, 209, 209, 210,
-210, 210, 211, 211, 212, 212, 213, 213,
-214, 214, 214, 215, 215, 216, 216, 216,
-217, 217, 218, 218, 218, 219, 219, 220,
-220, 220, 221, 221, 222, 222, 222, 223,
-223, 223, 224, 224, 225, 225, 225, 226,
-226, 226, 227, 227, 227, 228, 228, 228,
-229, 229, 229, 230, 230, 230, 231, 231,
-231, 232, 232, 232, 233, 233, 233, 234,
-234, 234, 234, 235, 235, 235, 236, 236,
-236, 237, 237, 237, 237, 238, 238, 238,
-239, 239, 239, 239, 240, 240, 240, 241,
-241, 241, 241, 242, 242, 242, 242, 243,
-243, 243, 243, 244, 244, 244, 245, 245,
-245, 245, 246, 246, 246, 246, 247, 247,
-247, 247, 248, 248, 248, 248, 249, 249,
-249, 249, 250, 250, 250, 250, 251, 251,
-251, 251, 252, 252, 252, 252, 253, 253,
-253, 253, 254, 254, 254, 254, 255, 255,
-255
+       0,   4,   8,  12,  17,  21,  27,  32,
      38,  44,  49,  55,  61,  66,  71,  76,
      80,  84,  88,  92,  95,  98, 102, 105,
+       108, 110, 113, 116, 118, 121, 123, 126,
+       128, 130, 132, 135, 137, 139, 141, 143,
+       145, 146, 148, 150, 152, 153, 155, 156,
+       158, 160, 161, 162, 164, 165, 166, 168,
+       169, 170, 171, 172, 174, 175, 176, 177,
+       178, 179, 180, 181, 182, 183, 184, 184,
+       185, 186, 187, 188, 189, 189, 190, 191,
+       192, 192, 193, 194, 195, 195, 196, 197,
+       197, 198, 198, 199, 200, 200, 201, 201,
+       202, 203, 203, 204, 204, 205, 205, 206,
+       206, 207, 207, 208, 208, 209, 209, 210,
+       210, 210, 211, 211, 212, 212, 213, 213,
+       214, 214, 214, 215, 215, 216, 216, 216,
+       217, 217, 218, 218, 218, 219, 219, 220,
+       220, 220, 221, 221, 222, 222, 222, 223,
+       223, 223, 224, 224, 225, 225, 225, 226,
+       226, 226, 227, 227, 227, 228, 228, 228,
+       229, 229, 229, 230, 230, 230, 231, 231,
+       231, 232, 232, 232, 233, 233, 233, 234,
+       234, 234, 234, 235, 235, 235, 236, 236,
+       236, 237, 237, 237, 237, 238, 238, 238,
+       239, 239, 239, 239, 240, 240, 240, 241,
+       241, 241, 241, 242, 242, 242, 242, 243,
+       243, 243, 243, 244, 244, 244, 245, 245,
+       245, 245, 246, 246, 246, 246, 247, 247,
+       247, 247, 248, 248, 248, 248, 249, 249,
+       249, 249, 250, 250, 250, 250, 251, 251,
+       251, 251, 252, 252, 252, 252, 253, 253,
+       253, 253, 254, 254, 254, 254, 255, 255,
+       255
 };
 
 #elif defined(HAS_VAMEM_VERSION_1)
 
 static const uint16_t
 default_gamma_table_data[IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE] = {
-               0, 1, 2, 3, 4, 5, 6, 7,
-               8, 9, 10, 11, 12, 13, 14, 16,
-               17, 18, 19, 20, 21, 23, 24, 25,
-               27, 28, 29, 31, 32, 33, 35, 36,
-               38, 39, 41, 42, 44, 45, 47, 48,
-               49, 51, 52, 54, 55, 57, 58, 60,
-               61, 62, 64, 65, 66, 68, 69, 70,
-               71, 72, 74, 75, 76, 77, 78, 79,
-               80, 81, 82, 83, 84, 85, 86, 87,
-               88, 89, 90, 91, 92, 93, 93, 94,
-               95, 96, 97, 98, 98, 99, 100, 101,
-               102, 102, 103, 104, 105, 105, 106, 107,
-               108, 108, 109, 110, 110, 111, 112, 112,
-               113, 114, 114, 115, 116, 116, 117, 118,
-               118, 119, 120, 120, 121, 121, 122, 123,
-               123, 124, 125, 125, 126, 126, 127, 127, /* 128 */
-               128, 129, 129, 130, 130, 131, 131, 132,
-               132, 133, 134, 134, 135, 135, 136, 136,
-               137, 137, 138, 138, 139, 139, 140, 140,
-               141, 141, 142, 142, 143, 143, 144, 144,
-               145, 145, 145, 146, 146, 147, 147, 148,
-               148, 149, 149, 150, 150, 150, 151, 151,
-               152, 152, 152, 153, 153, 154, 154, 155,
-               155, 155, 156, 156, 156, 157, 157, 158,
-               158, 158, 159, 159, 160, 160, 160, 161,
-               161, 161, 162, 162, 162, 163, 163, 163,
-               164, 164, 164, 165, 165, 165, 166, 166,
-               166, 167, 167, 167, 168, 168, 168, 169,
-               169, 169, 170, 170, 170, 170, 171, 171,
-               171, 172, 172, 172, 172, 173, 173, 173,
-               174, 174, 174, 174, 175, 175, 175, 176,
-               176, 176, 176, 177, 177, 177, 177, 178, /* 256 */
-               178, 178, 178, 179, 179, 179, 179, 180,
-               180, 180, 180, 181, 181, 181, 181, 182,
-               182, 182, 182, 182, 183, 183, 183, 183,
-               184, 184, 184, 184, 184, 185, 185, 185,
-               185, 186, 186, 186, 186, 186, 187, 187,
-               187, 187, 187, 188, 188, 188, 188, 188,
-               189, 189, 189, 189, 189, 190, 190, 190,
-               190, 190, 191, 191, 191, 191, 191, 192,
-               192, 192, 192, 192, 192, 193, 193, 193,
-               193, 193, 194, 194, 194, 194, 194, 194,
-               195, 195, 195, 195, 195, 195, 196, 196,
-               196, 196, 196, 196, 197, 197, 197, 197,
-               197, 197, 198, 198, 198, 198, 198, 198,
-               198, 199, 199, 199, 199, 199, 199, 200,
-               200, 200, 200, 200, 200, 200, 201, 201,
-               201, 201, 201, 201, 201, 202, 202, 202, /* 384 */
-               202, 202, 202, 202, 203, 203, 203, 203,
-               203, 203, 203, 204, 204, 204, 204, 204,
-               204, 204, 204, 205, 205, 205, 205, 205,
-               205, 205, 205, 206, 206, 206, 206, 206,
-               206, 206, 206, 207, 207, 207, 207, 207,
-               207, 207, 207, 208, 208, 208, 208, 208,
-               208, 208, 208, 209, 209, 209, 209, 209,
-               209, 209, 209, 209, 210, 210, 210, 210,
-               210, 210, 210, 210, 210, 211, 211, 211,
-               211, 211, 211, 211, 211, 211, 212, 212,
-               212, 212, 212, 212, 212, 212, 212, 213,
-               213, 213, 213, 213, 213, 213, 213, 213,
-               214, 214, 214, 214, 214, 214, 214, 214,
-               214, 214, 215, 215, 215, 215, 215, 215,
-               215, 215, 215, 216, 216, 216, 216, 216,
-               216, 216, 216, 216, 216, 217, 217, 217, /* 512 */
-               217, 217, 217, 217, 217, 217, 217, 218,
-               218, 218, 218, 218, 218, 218, 218, 218,
-               218, 219, 219, 219, 219, 219, 219, 219,
-               219, 219, 219, 220, 220, 220, 220, 220,
-               220, 220, 220, 220, 220, 221, 221, 221,
-               221, 221, 221, 221, 221, 221, 221, 221,
-               222, 222, 222, 222, 222, 222, 222, 222,
-               222, 222, 223, 223, 223, 223, 223, 223,
-               223, 223, 223, 223, 223, 224, 224, 224,
-               224, 224, 224, 224, 224, 224, 224, 224,
-               225, 225, 225, 225, 225, 225, 225, 225,
-               225, 225, 225, 226, 226, 226, 226, 226,
-               226, 226, 226, 226, 226, 226, 226, 227,
-               227, 227, 227, 227, 227, 227, 227, 227,
-               227, 227, 228, 228, 228, 228, 228, 228,
-               228, 228, 228, 228, 228, 228, 229, 229,
-               229, 229, 229, 229, 229, 229, 229, 229,
-               229, 229, 230, 230, 230, 230, 230, 230,
-               230, 230, 230, 230, 230, 230, 231, 231,
-               231, 231, 231, 231, 231, 231, 231, 231,
-               231, 231, 231, 232, 232, 232, 232, 232,
-               232, 232, 232, 232, 232, 232, 232, 233,
-               233, 233, 233, 233, 233, 233, 233, 233,
-               233, 233, 233, 233, 234, 234, 234, 234,
-               234, 234, 234, 234, 234, 234, 234, 234,
-               234, 235, 235, 235, 235, 235, 235, 235,
-               235, 235, 235, 235, 235, 235, 236, 236,
-               236, 236, 236, 236, 236, 236, 236, 236,
-               236, 236, 236, 236, 237, 237, 237, 237,
-               237, 237, 237, 237, 237, 237, 237, 237,
-               237, 237, 238, 238, 238, 238, 238, 238,
-               238, 238, 238, 238, 238, 238, 238, 238,
-               239, 239, 239, 239, 239, 239, 239, 239,
-               239, 239, 239, 239, 239, 239, 240, 240,
-               240, 240, 240, 240, 240, 240, 240, 240,
-               240, 240, 240, 240, 241, 241, 241, 241,
-               241, 241, 241, 241, 241, 241, 241, 241,
-               241, 241, 241, 242, 242, 242, 242, 242,
-               242, 242, 242, 242, 242, 242, 242, 242,
-               242, 242, 243, 243, 243, 243, 243, 243,
-               243, 243, 243, 243, 243, 243, 243, 243,
-               243, 244, 244, 244, 244, 244, 244, 244,
-               244, 244, 244, 244, 244, 244, 244, 244,
-               245, 245, 245, 245, 245, 245, 245, 245,
-               245, 245, 245, 245, 245, 245, 245, 246,
-               246, 246, 246, 246, 246, 246, 246, 246,
-               246, 246, 246, 246, 246, 246, 246, 247,
-               247, 247, 247, 247, 247, 247, 247, 247,
-               247, 247, 247, 247, 247, 247, 247, 248,
-               248, 248, 248, 248, 248, 248, 248, 248,
-               248, 248, 248, 248, 248, 248, 248, 249,
-               249, 249, 249, 249, 249, 249, 249, 249,
-               249, 249, 249, 249, 249, 249, 249, 250,
-               250, 250, 250, 250, 250, 250, 250, 250,
-               250, 250, 250, 250, 250, 250, 250, 251,
-               251, 251, 251, 251, 251, 251, 251, 251,
-               251, 251, 251, 251, 251, 251, 251, 252,
-               252, 252, 252, 252, 252, 252, 252, 252,
-               252, 252, 252, 252, 252, 252, 252, 253,
-               253, 253, 253, 253, 253, 253, 253, 253,
-               253, 253, 253, 253, 253, 253, 253, 253,
-               254, 254, 254, 254, 254, 254, 254, 254,
-               254, 254, 254, 254, 254, 254, 254, 254,
-               255, 255, 255, 255, 255, 255, 255, 255
+       0, 1, 2, 3, 4, 5, 6, 7,
+       8, 9, 10, 11, 12, 13, 14, 16,
+       17, 18, 19, 20, 21, 23, 24, 25,
+       27, 28, 29, 31, 32, 33, 35, 36,
+       38, 39, 41, 42, 44, 45, 47, 48,
+       49, 51, 52, 54, 55, 57, 58, 60,
+       61, 62, 64, 65, 66, 68, 69, 70,
+       71, 72, 74, 75, 76, 77, 78, 79,
+       80, 81, 82, 83, 84, 85, 86, 87,
+       88, 89, 90, 91, 92, 93, 93, 94,
+       95, 96, 97, 98, 98, 99, 100, 101,
+       102, 102, 103, 104, 105, 105, 106, 107,
+       108, 108, 109, 110, 110, 111, 112, 112,
+       113, 114, 114, 115, 116, 116, 117, 118,
+       118, 119, 120, 120, 121, 121, 122, 123,
+       123, 124, 125, 125, 126, 126, 127, 127, /* 128 */
+       128, 129, 129, 130, 130, 131, 131, 132,
+       132, 133, 134, 134, 135, 135, 136, 136,
+       137, 137, 138, 138, 139, 139, 140, 140,
+       141, 141, 142, 142, 143, 143, 144, 144,
+       145, 145, 145, 146, 146, 147, 147, 148,
+       148, 149, 149, 150, 150, 150, 151, 151,
+       152, 152, 152, 153, 153, 154, 154, 155,
+       155, 155, 156, 156, 156, 157, 157, 158,
+       158, 158, 159, 159, 160, 160, 160, 161,
+       161, 161, 162, 162, 162, 163, 163, 163,
+       164, 164, 164, 165, 165, 165, 166, 166,
+       166, 167, 167, 167, 168, 168, 168, 169,
+       169, 169, 170, 170, 170, 170, 171, 171,
+       171, 172, 172, 172, 172, 173, 173, 173,
+       174, 174, 174, 174, 175, 175, 175, 176,
+       176, 176, 176, 177, 177, 177, 177, 178, /* 256 */
+       178, 178, 178, 179, 179, 179, 179, 180,
+       180, 180, 180, 181, 181, 181, 181, 182,
+       182, 182, 182, 182, 183, 183, 183, 183,
+       184, 184, 184, 184, 184, 185, 185, 185,
+       185, 186, 186, 186, 186, 186, 187, 187,
+       187, 187, 187, 188, 188, 188, 188, 188,
+       189, 189, 189, 189, 189, 190, 190, 190,
+       190, 190, 191, 191, 191, 191, 191, 192,
+       192, 192, 192, 192, 192, 193, 193, 193,
+       193, 193, 194, 194, 194, 194, 194, 194,
+       195, 195, 195, 195, 195, 195, 196, 196,
+       196, 196, 196, 196, 197, 197, 197, 197,
+       197, 197, 198, 198, 198, 198, 198, 198,
+       198, 199, 199, 199, 199, 199, 199, 200,
+       200, 200, 200, 200, 200, 200, 201, 201,
+       201, 201, 201, 201, 201, 202, 202, 202, /* 384 */
+       202, 202, 202, 202, 203, 203, 203, 203,
+       203, 203, 203, 204, 204, 204, 204, 204,
+       204, 204, 204, 205, 205, 205, 205, 205,
+       205, 205, 205, 206, 206, 206, 206, 206,
+       206, 206, 206, 207, 207, 207, 207, 207,
+       207, 207, 207, 208, 208, 208, 208, 208,
+       208, 208, 208, 209, 209, 209, 209, 209,
+       209, 209, 209, 209, 210, 210, 210, 210,
+       210, 210, 210, 210, 210, 211, 211, 211,
+       211, 211, 211, 211, 211, 211, 212, 212,
+       212, 212, 212, 212, 212, 212, 212, 213,
+       213, 213, 213, 213, 213, 213, 213, 213,
+       214, 214, 214, 214, 214, 214, 214, 214,
+       214, 214, 215, 215, 215, 215, 215, 215,
+       215, 215, 215, 216, 216, 216, 216, 216,
+       216, 216, 216, 216, 216, 217, 217, 217, /* 512 */
+       217, 217, 217, 217, 217, 217, 217, 218,
+       218, 218, 218, 218, 218, 218, 218, 218,
+       218, 219, 219, 219, 219, 219, 219, 219,
+       219, 219, 219, 220, 220, 220, 220, 220,
+       220, 220, 220, 220, 220, 221, 221, 221,
+       221, 221, 221, 221, 221, 221, 221, 221,
+       222, 222, 222, 222, 222, 222, 222, 222,
+       222, 222, 223, 223, 223, 223, 223, 223,
+       223, 223, 223, 223, 223, 224, 224, 224,
+       224, 224, 224, 224, 224, 224, 224, 224,
+       225, 225, 225, 225, 225, 225, 225, 225,
+       225, 225, 225, 226, 226, 226, 226, 226,
+       226, 226, 226, 226, 226, 226, 226, 227,
+       227, 227, 227, 227, 227, 227, 227, 227,
+       227, 227, 228, 228, 228, 228, 228, 228,
+       228, 228, 228, 228, 228, 228, 229, 229,
+       229, 229, 229, 229, 229, 229, 229, 229,
+       229, 229, 230, 230, 230, 230, 230, 230,
+       230, 230, 230, 230, 230, 230, 231, 231,
+       231, 231, 231, 231, 231, 231, 231, 231,
+       231, 231, 231, 232, 232, 232, 232, 232,
+       232, 232, 232, 232, 232, 232, 232, 233,
+       233, 233, 233, 233, 233, 233, 233, 233,
+       233, 233, 233, 233, 234, 234, 234, 234,
+       234, 234, 234, 234, 234, 234, 234, 234,
+       234, 235, 235, 235, 235, 235, 235, 235,
+       235, 235, 235, 235, 235, 235, 236, 236,
+       236, 236, 236, 236, 236, 236, 236, 236,
+       236, 236, 236, 236, 237, 237, 237, 237,
+       237, 237, 237, 237, 237, 237, 237, 237,
+       237, 237, 238, 238, 238, 238, 238, 238,
+       238, 238, 238, 238, 238, 238, 238, 238,
+       239, 239, 239, 239, 239, 239, 239, 239,
+       239, 239, 239, 239, 239, 239, 240, 240,
+       240, 240, 240, 240, 240, 240, 240, 240,
+       240, 240, 240, 240, 241, 241, 241, 241,
+       241, 241, 241, 241, 241, 241, 241, 241,
+       241, 241, 241, 242, 242, 242, 242, 242,
+       242, 242, 242, 242, 242, 242, 242, 242,
+       242, 242, 243, 243, 243, 243, 243, 243,
+       243, 243, 243, 243, 243, 243, 243, 243,
+       243, 244, 244, 244, 244, 244, 244, 244,
+       244, 244, 244, 244, 244, 244, 244, 244,
+       245, 245, 245, 245, 245, 245, 245, 245,
+       245, 245, 245, 245, 245, 245, 245, 246,
+       246, 246, 246, 246, 246, 246, 246, 246,
+       246, 246, 246, 246, 246, 246, 246, 247,
+       247, 247, 247, 247, 247, 247, 247, 247,
+       247, 247, 247, 247, 247, 247, 247, 248,
+       248, 248, 248, 248, 248, 248, 248, 248,
+       248, 248, 248, 248, 248, 248, 248, 249,
+       249, 249, 249, 249, 249, 249, 249, 249,
+       249, 249, 249, 249, 249, 249, 249, 250,
+       250, 250, 250, 250, 250, 250, 250, 250,
+       250, 250, 250, 250, 250, 250, 250, 251,
+       251, 251, 251, 251, 251, 251, 251, 251,
+       251, 251, 251, 251, 251, 251, 251, 252,
+       252, 252, 252, 252, 252, 252, 252, 252,
+       252, 252, 252, 252, 252, 252, 252, 253,
+       253, 253, 253, 253, 253, 253, 253, 253,
+       253, 253, 253, 253, 253, 253, 253, 253,
+       254, 254, 254, 254, 254, 254, 254, 254,
+       254, 254, 254, 254, 254, 254, 254, 254,
+       255, 255, 255, 255, 255, 255, 255, 255
 };
 
 #else
index 6d8ef2298571303bfce08c892c1bdead93b878c0..29a1e013a9aa2ecd61d8f89db4d0089bd8a8f93d 100644 (file)
@@ -35,27 +35,27 @@ const struct ia_css_cc_config default_rgb2yuv_cc_config = {
 
 void
 ia_css_yuv2rgb_encode(
-       struct sh_css_isp_csc_params *to,
-       const struct ia_css_cc_config *from,
-       unsigned int size)
+    struct sh_css_isp_csc_params *to,
+    const struct ia_css_cc_config *from,
+    unsigned int size)
 {
        ia_css_encode_cc(to, from, size);
 }
 
 void
 ia_css_rgb2yuv_encode(
-       struct sh_css_isp_csc_params *to,
-       const struct ia_css_cc_config *from,
-       unsigned int size)
+    struct sh_css_isp_csc_params *to,
+    const struct ia_css_cc_config *from,
+    unsigned int size)
 {
        ia_css_encode_cc(to, from, size);
 }
 
 void
 ia_css_r_gamma_vamem_encode(
-       struct sh_css_isp_rgb_gamma_vamem_params *to,
-       const struct ia_css_rgb_gamma_table *from,
-       unsigned int size)
+    struct sh_css_isp_rgb_gamma_vamem_params *to,
+    const struct ia_css_rgb_gamma_table *from,
+    unsigned int size)
 {
        (void)size;
        memcpy(&to->gc,  &from->data, sizeof(to->gc));
@@ -63,9 +63,9 @@ ia_css_r_gamma_vamem_encode(
 
 void
 ia_css_g_gamma_vamem_encode(
-       struct sh_css_isp_rgb_gamma_vamem_params *to,
-       const struct ia_css_rgb_gamma_table *from,
-       unsigned int size)
+    struct sh_css_isp_rgb_gamma_vamem_params *to,
+    const struct ia_css_rgb_gamma_table *from,
+    unsigned int size)
 {
        (void)size;
        memcpy(&to->gc,  &from->data, sizeof(to->gc));
@@ -73,9 +73,9 @@ ia_css_g_gamma_vamem_encode(
 
 void
 ia_css_b_gamma_vamem_encode(
-       struct sh_css_isp_rgb_gamma_vamem_params *to,
-       const struct ia_css_rgb_gamma_table *from,
-       unsigned int size)
+    struct sh_css_isp_rgb_gamma_vamem_params *to,
+    const struct ia_css_rgb_gamma_table *from,
+    unsigned int size)
 {
        (void)size;
        memcpy(&to->gc,  &from->data, sizeof(to->gc));
@@ -84,24 +84,24 @@ ia_css_b_gamma_vamem_encode(
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_yuv2rgb_dump(
-       const struct sh_css_isp_csc_params *yuv2rgb,
-       unsigned int level)
+    const struct sh_css_isp_csc_params *yuv2rgb,
+    unsigned int level)
 {
        ia_css_cc_dump(yuv2rgb, level, "YUV to RGB Conversion");
 }
 
 void
 ia_css_rgb2yuv_dump(
-       const struct sh_css_isp_csc_params *rgb2yuv,
-       unsigned int level)
+    const struct sh_css_isp_csc_params *rgb2yuv,
+    unsigned int level)
 {
        ia_css_cc_dump(rgb2yuv, level, "RGB to YUV Conversion");
 }
 
 void
 ia_css_rgb_gamma_table_debug_dtrace(
-       const struct ia_css_rgb_gamma_table *config,
-       unsigned int level)
+    const struct ia_css_rgb_gamma_table *config,
+    unsigned int level)
 {
        (void)config;
        (void)level;
index 146bb1d76e40319d42214bf45798ab567b89b1cd..ca7d545764713d2aa57696816c7bbf86c436a15b 100644 (file)
@@ -24,49 +24,49 @@ extern const struct ia_css_cc_config default_rgb2yuv_cc_config;
 
 void
 ia_css_yuv2rgb_encode(
-       struct sh_css_isp_csc_params *to,
-       const struct ia_css_cc_config *from,
-       unsigned int size);
+    struct sh_css_isp_csc_params *to,
+    const struct ia_css_cc_config *from,
+    unsigned int size);
 
 void
 ia_css_rgb2yuv_encode(
-       struct sh_css_isp_csc_params *to,
-       const struct ia_css_cc_config *from,
-       unsigned int size);
+    struct sh_css_isp_csc_params *to,
+    const struct ia_css_cc_config *from,
+    unsigned int size);
 
 void
 ia_css_r_gamma_vamem_encode(
-       struct sh_css_isp_rgb_gamma_vamem_params *to,
-       const struct ia_css_rgb_gamma_table *from,
-       unsigned int size);
+    struct sh_css_isp_rgb_gamma_vamem_params *to,
+    const struct ia_css_rgb_gamma_table *from,
+    unsigned int size);
 
 void
 ia_css_g_gamma_vamem_encode(
-       struct sh_css_isp_rgb_gamma_vamem_params *to,
-       const struct ia_css_rgb_gamma_table *from,
-       unsigned int size);
+    struct sh_css_isp_rgb_gamma_vamem_params *to,
+    const struct ia_css_rgb_gamma_table *from,
+    unsigned int size);
 
 void
 ia_css_b_gamma_vamem_encode(
-       struct sh_css_isp_rgb_gamma_vamem_params *to,
-       const struct ia_css_rgb_gamma_table *from,
-       unsigned int size);
+    struct sh_css_isp_rgb_gamma_vamem_params *to,
+    const struct ia_css_rgb_gamma_table *from,
+    unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_yuv2rgb_dump(
-       const struct sh_css_isp_csc_params *yuv2rgb,
-       unsigned int level);
+    const struct sh_css_isp_csc_params *yuv2rgb,
+    unsigned int level);
 
 void
 ia_css_rgb2yuv_dump(
-       const struct sh_css_isp_csc_params *rgb2yuv,
-       unsigned int level);
+    const struct sh_css_isp_csc_params *rgb2yuv,
+    unsigned int level);
 
 void
 ia_css_rgb_gamma_table_debug_dtrace(
-       const struct ia_css_rgb_gamma_table *config,
-       unsigned int level);
+    const struct ia_css_rgb_gamma_table *config,
+    unsigned int level);
 
 #define ia_css_yuv2rgb_debug_dtrace ia_css_cc_config_debug_dtrace
 #define ia_css_rgb2yuv_debug_dtrace ia_css_cc_config_debug_dtrace
index a90d9d0a185476f1268fd05237ac60fc48387c1b..d2fe0052fb00290a471d0e504e7460f58781cd49 100644 (file)
@@ -29,76 +29,76 @@ struct ia_css_rgb_gamma_table default_b_gamma_table;
 
 static const uint16_t
 default_gamma_table_data[IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE] = {
-   0,   72,  144,  216,  288,  360,  426,  486,
- 541,  592,  641,  687,  730,  772,  812,  850,
- 887,  923,  958,  991, 1024, 1055, 1086, 1117,
-1146, 1175, 1203, 1230, 1257, 1284, 1310, 1335,
-1360, 1385, 1409, 1433, 1457, 1480, 1502, 1525,
-1547, 1569, 1590, 1612, 1632, 1653, 1674, 1694,
-1714, 1734, 1753, 1772, 1792, 1811, 1829, 1848,
-1866, 1884, 1902, 1920, 1938, 1955, 1973, 1990,
-2007, 2024, 2040, 2057, 2074, 2090, 2106, 2122,
-2138, 2154, 2170, 2185, 2201, 2216, 2231, 2247,
-2262, 2277, 2291, 2306, 2321, 2335, 2350, 2364,
-2378, 2393, 2407, 2421, 2435, 2449, 2462, 2476,
-2490, 2503, 2517, 2530, 2543, 2557, 2570, 2583,
-2596, 2609, 2622, 2634, 2647, 2660, 2673, 2685,
-2698, 2710, 2722, 2735, 2747, 2759, 2771, 2783,
-2795, 2807, 2819, 2831, 2843, 2855, 2867, 2878,
-2890, 2901, 2913, 2924, 2936, 2947, 2958, 2970,
-2981, 2992, 3003, 3014, 3025, 3036, 3047, 3058,
-3069, 3080, 3091, 3102, 3112, 3123, 3134, 3144,
-3155, 3165, 3176, 3186, 3197, 3207, 3217, 3228,
-3238, 3248, 3258, 3268, 3279, 3289, 3299, 3309,
-3319, 3329, 3339, 3349, 3358, 3368, 3378, 3388,
-3398, 3407, 3417, 3427, 3436, 3446, 3455, 3465,
-3474, 3484, 3493, 3503, 3512, 3521, 3531, 3540,
-3549, 3559, 3568, 3577, 3586, 3595, 3605, 3614,
-3623, 3632, 3641, 3650, 3659, 3668, 3677, 3686,
-3694, 3703, 3712, 3721, 3730, 3739, 3747, 3756,
-3765, 3773, 3782, 3791, 3799, 3808, 3816, 3825,
-3833, 3842, 3850, 3859, 3867, 3876, 3884, 3893,
-3901, 3909, 3918, 3926, 3934, 3942, 3951, 3959,
-3967, 3975, 3984, 3992, 4000, 4008, 4016, 4024,
-4032, 4040, 4048, 4056, 4064, 4072, 4080, 4088,
-4095
+       0,   72,  144,  216,  288,  360,  426,  486,
      541,  592,  641,  687,  730,  772,  812,  850,
      887,  923,  958,  991, 1024, 1055, 1086, 1117,
+       1146, 1175, 1203, 1230, 1257, 1284, 1310, 1335,
+       1360, 1385, 1409, 1433, 1457, 1480, 1502, 1525,
+       1547, 1569, 1590, 1612, 1632, 1653, 1674, 1694,
+       1714, 1734, 1753, 1772, 1792, 1811, 1829, 1848,
+       1866, 1884, 1902, 1920, 1938, 1955, 1973, 1990,
+       2007, 2024, 2040, 2057, 2074, 2090, 2106, 2122,
+       2138, 2154, 2170, 2185, 2201, 2216, 2231, 2247,
+       2262, 2277, 2291, 2306, 2321, 2335, 2350, 2364,
+       2378, 2393, 2407, 2421, 2435, 2449, 2462, 2476,
+       2490, 2503, 2517, 2530, 2543, 2557, 2570, 2583,
+       2596, 2609, 2622, 2634, 2647, 2660, 2673, 2685,
+       2698, 2710, 2722, 2735, 2747, 2759, 2771, 2783,
+       2795, 2807, 2819, 2831, 2843, 2855, 2867, 2878,
+       2890, 2901, 2913, 2924, 2936, 2947, 2958, 2970,
+       2981, 2992, 3003, 3014, 3025, 3036, 3047, 3058,
+       3069, 3080, 3091, 3102, 3112, 3123, 3134, 3144,
+       3155, 3165, 3176, 3186, 3197, 3207, 3217, 3228,
+       3238, 3248, 3258, 3268, 3279, 3289, 3299, 3309,
+       3319, 3329, 3339, 3349, 3358, 3368, 3378, 3388,
+       3398, 3407, 3417, 3427, 3436, 3446, 3455, 3465,
+       3474, 3484, 3493, 3503, 3512, 3521, 3531, 3540,
+       3549, 3559, 3568, 3577, 3586, 3595, 3605, 3614,
+       3623, 3632, 3641, 3650, 3659, 3668, 3677, 3686,
+       3694, 3703, 3712, 3721, 3730, 3739, 3747, 3756,
+       3765, 3773, 3782, 3791, 3799, 3808, 3816, 3825,
+       3833, 3842, 3850, 3859, 3867, 3876, 3884, 3893,
+       3901, 3909, 3918, 3926, 3934, 3942, 3951, 3959,
+       3967, 3975, 3984, 3992, 4000, 4008, 4016, 4024,
+       4032, 4040, 4048, 4056, 4064, 4072, 4080, 4088,
+       4095
 };
 #elif defined(HAS_VAMEM_VERSION_1)
 
 static const uint16_t
 default_gamma_table_data[IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE] = {
-   0,   72,  144,  216,  288,  360,  426,  486,
- 541,  592,  641,  687,  730,  772,  812,  850,
- 887,  923,  958,  991, 1024, 1055, 1086, 1117,
-1146, 1175, 1203, 1230, 1257, 1284, 1310, 1335,
-1360, 1385, 1409, 1433, 1457, 1480, 1502, 1525,
-1547, 1569, 1590, 1612, 1632, 1653, 1674, 1694,
-1714, 1734, 1753, 1772, 1792, 1811, 1829, 1848,
-1866, 1884, 1902, 1920, 1938, 1955, 1973, 1990,
-2007, 2024, 2040, 2057, 2074, 2090, 2106, 2122,
-2138, 2154, 2170, 2185, 2201, 2216, 2231, 2247,
-2262, 2277, 2291, 2306, 2321, 2335, 2350, 2364,
-2378, 2393, 2407, 2421, 2435, 2449, 2462, 2476,
-2490, 2503, 2517, 2530, 2543, 2557, 2570, 2583,
-2596, 2609, 2622, 2634, 2647, 2660, 2673, 2685,
-2698, 2710, 2722, 2735, 2747, 2759, 2771, 2783,
-2795, 2807, 2819, 2831, 2843, 2855, 2867, 2878,
-2890, 2901, 2913, 2924, 2936, 2947, 2958, 2970,
-2981, 2992, 3003, 3014, 3025, 3036, 3047, 3058,
-3069, 3080, 3091, 3102, 3112, 3123, 3134, 3144,
-3155, 3165, 3176, 3186, 3197, 3207, 3217, 3228,
-3238, 3248, 3258, 3268, 3279, 3289, 3299, 3309,
-3319, 3329, 3339, 3349, 3358, 3368, 3378, 3388,
-3398, 3407, 3417, 3427, 3436, 3446, 3455, 3465,
-3474, 3484, 3493, 3503, 3512, 3521, 3531, 3540,
-3549, 3559, 3568, 3577, 3586, 3595, 3605, 3614,
-3623, 3632, 3641, 3650, 3659, 3668, 3677, 3686,
-3694, 3703, 3712, 3721, 3730, 3739, 3747, 3756,
-3765, 3773, 3782, 3791, 3799, 3808, 3816, 3825,
-3833, 3842, 3850, 3859, 3867, 3876, 3884, 3893,
-3901, 3909, 3918, 3926, 3934, 3942, 3951, 3959,
-3967, 3975, 3984, 3992, 4000, 4008, 4016, 4024,
-4032, 4040, 4048, 4056, 4064, 4072, 4080, 4088
+       0,   72,  144,  216,  288,  360,  426,  486,
      541,  592,  641,  687,  730,  772,  812,  850,
      887,  923,  958,  991, 1024, 1055, 1086, 1117,
+       1146, 1175, 1203, 1230, 1257, 1284, 1310, 1335,
+       1360, 1385, 1409, 1433, 1457, 1480, 1502, 1525,
+       1547, 1569, 1590, 1612, 1632, 1653, 1674, 1694,
+       1714, 1734, 1753, 1772, 1792, 1811, 1829, 1848,
+       1866, 1884, 1902, 1920, 1938, 1955, 1973, 1990,
+       2007, 2024, 2040, 2057, 2074, 2090, 2106, 2122,
+       2138, 2154, 2170, 2185, 2201, 2216, 2231, 2247,
+       2262, 2277, 2291, 2306, 2321, 2335, 2350, 2364,
+       2378, 2393, 2407, 2421, 2435, 2449, 2462, 2476,
+       2490, 2503, 2517, 2530, 2543, 2557, 2570, 2583,
+       2596, 2609, 2622, 2634, 2647, 2660, 2673, 2685,
+       2698, 2710, 2722, 2735, 2747, 2759, 2771, 2783,
+       2795, 2807, 2819, 2831, 2843, 2855, 2867, 2878,
+       2890, 2901, 2913, 2924, 2936, 2947, 2958, 2970,
+       2981, 2992, 3003, 3014, 3025, 3036, 3047, 3058,
+       3069, 3080, 3091, 3102, 3112, 3123, 3134, 3144,
+       3155, 3165, 3176, 3186, 3197, 3207, 3217, 3228,
+       3238, 3248, 3258, 3268, 3279, 3289, 3299, 3309,
+       3319, 3329, 3339, 3349, 3358, 3368, 3378, 3388,
+       3398, 3407, 3417, 3427, 3436, 3446, 3455, 3465,
+       3474, 3484, 3493, 3503, 3512, 3521, 3531, 3540,
+       3549, 3559, 3568, 3577, 3586, 3595, 3605, 3614,
+       3623, 3632, 3641, 3650, 3659, 3668, 3677, 3686,
+       3694, 3703, 3712, 3721, 3730, 3739, 3747, 3756,
+       3765, 3773, 3782, 3791, 3799, 3808, 3816, 3825,
+       3833, 3842, 3850, 3859, 3867, 3876, 3884, 3893,
+       3901, 3909, 3918, 3926, 3934, 3942, 3951, 3959,
+       3967, 3975, 3984, 3992, 4000, 4008, 4016, 4024,
+       4032, 4040, 4048, 4056, 4064, 4072, 4080, 4088
 };
 #else
 #error "VAMEM version must be one of {VAMEM_VERSION_1, VAMEM_VERSION_2}"
index 7df75918ce4c76a240cf9147fb3431f2c8772ac8..30780394ed7fe4dfaf154f4e03e8829994c42a60 100644 (file)
@@ -43,7 +43,7 @@ union ia_css_rgb_gamma_data {
        /** RGB Gamma table on vamem type1. This table is not used,
                because sRGB Gamma Correction is not implemented for ISP2300. */
        u16 vamem_2[IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE];
-               /** RGB Gamma table on vamem type2. u0.12, [0,4095] */
+       /** RGB Gamma table on vamem type2. u0.12, [0,4095] */
 };
 
 struct ia_css_rgb_gamma_table {
index 763ce01afe60f2a5b5dbae46aa298cdd17901673..643b7d9095e620c326e998d31becf1053d036ef2 100644 (file)
@@ -18,9 +18,9 @@
 
 void
 ia_css_hdr_init_config(
-       struct sh_css_isp_hdr_params *to,
-       const struct ia_css_hdr_config *from,
-       unsigned int size)
+    struct sh_css_isp_hdr_params *to,
+    const struct ia_css_hdr_config *from,
+    unsigned int size)
 {
        int i;
        (void)size;
index 5ee0d8dd12c822ee6d8a355186a2ed20013f5abb..ecc8bea3542b907786dca1af7f91e3128f1828fe 100644 (file)
@@ -24,8 +24,8 @@ extern const struct ia_css_hdr_config default_hdr_config;
 
 void
 ia_css_hdr_init_config(
-       struct sh_css_isp_hdr_params *to,
-       const struct ia_css_hdr_config *from,
-       unsigned int size);
+    struct sh_css_isp_hdr_params *to,
+    const struct ia_css_hdr_config *from,
+    unsigned int size);
 
 #endif /* __IA_CSS_HDR_HOST_H */
index 784c716ce5e39cfc839bdc3e721475bd875c31bb..47651cdf94b734e2b644eb2b25a5b87ea18b0e11 100644 (file)
 /* HDR irradiance map parameters on ISP. */
 struct sh_css_hdr_irradiance_params {
        s32 test_irr;
-       s32 match_shift[HDR_NUM_INPUT_FRAMES - 1];  /* Histogram matching shift parameter */
-       s32 match_mul[HDR_NUM_INPUT_FRAMES - 1];    /* Histogram matching multiplication parameter */
-       s32 thr_low[HDR_NUM_INPUT_FRAMES - 1];      /* Weight map soft threshold low bound parameter */
-       s32 thr_high[HDR_NUM_INPUT_FRAMES - 1];     /* Weight map soft threshold high bound parameter */
-       s32 thr_coeff[HDR_NUM_INPUT_FRAMES - 1];    /* Soft threshold linear function coefficient */
-       s32 thr_shift[HDR_NUM_INPUT_FRAMES - 1];    /* Soft threshold precision shift parameter */
+       s32 match_shift[HDR_NUM_INPUT_FRAMES -
+                                            1];  /* Histogram matching shift parameter */
+       s32 match_mul[HDR_NUM_INPUT_FRAMES -
+                                          1];    /* Histogram matching multiplication parameter */
+       s32 thr_low[HDR_NUM_INPUT_FRAMES -
+                                        1];      /* Weight map soft threshold low bound parameter */
+       s32 thr_high[HDR_NUM_INPUT_FRAMES -
+                                         1];     /* Weight map soft threshold high bound parameter */
+       s32 thr_coeff[HDR_NUM_INPUT_FRAMES -
+                                          1];    /* Soft threshold linear function coefficient */
+       s32 thr_shift[HDR_NUM_INPUT_FRAMES -
+                                          1];    /* Soft threshold precision shift parameter */
        s32 weight_bpp;                             /* Weight map bits per pixel */
 };
 
index 9b4b32bc67530cc34e4d9f56806e3d792bc216c9..7c2f8f213befbe55a4a22fd1a1ccbdf6d638c065 100644 (file)
  */
 struct ia_css_hdr_irradiance_params {
        int test_irr;                                          /** Test parameter */
-       int match_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1];  /** Histogram matching shift parameter */
-       int match_mul[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1];    /** Histogram matching multiplication parameter */
-       int thr_low[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1];      /** Weight map soft threshold low bound parameter */
-       int thr_high[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1];     /** Weight map soft threshold high bound parameter */
-       int thr_coeff[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1];    /** Soft threshold linear function coefficien */
-       int thr_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1];    /** Soft threshold precision shift parameter */
+       int match_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+                                                       1];  /** Histogram matching shift parameter */
+       int match_mul[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+                                                     1];    /** Histogram matching multiplication parameter */
+       int thr_low[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+                                                   1];      /** Weight map soft threshold low bound parameter */
+       int thr_high[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+                                                    1];     /** Weight map soft threshold high bound parameter */
+       int thr_coeff[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+                                                     1];    /** Soft threshold linear function coefficien */
+       int thr_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+                                                     1];    /** Soft threshold precision shift parameter */
        int weight_bpp;                                        /** Weight map bits per pixel */
 };
 
index a57a9d124363c772e7ba7e3e72932e03a42d1b76..c50b3d136f83f6cd73b5873b229ca02f50e7a9f7 100644 (file)
 
 void
 ia_css_bayer_io_config(
-       const struct ia_css_binary      *binary,
-       const struct sh_css_binary_args *args)
+    const struct ia_css_binary      *binary,
+    const struct sh_css_binary_args *args)
 {
        const struct ia_css_frame *in_frame = args->in_frame;
-       const struct ia_css_frame **out_frames = (const struct ia_css_frame **)&args->out_frame;
-       const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info : &binary->in_frame_info;
+       const struct ia_css_frame **out_frames = (const struct ia_css_frame **)
+               &args->out_frame;
+       const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info :
+               &binary->in_frame_info;
 
        const unsigned int ddr_bits_per_element = sizeof(short) * 8;
-       const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS, ddr_bits_per_element);
+       const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS,
+                                               ddr_bits_per_element);
        unsigned int size_get = 0, size_put = 0;
        unsigned int offset = 0;
 
@@ -42,10 +45,12 @@ ia_css_bayer_io_config(
        }
 
        if (size_get) {
-               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+                                                    &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                struct dma_port_config config;
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() get part enter:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_bayer_io_config() get part enter:\n");
 #endif
 
                ia_css_dma_configure_from_info(&config, in_frame_info);
@@ -55,7 +60,8 @@ ia_css_bayer_io_config(
                to->stride = config.stride;
                to->ddr_elems_per_word = ddr_elems_per_word;
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() get part leave:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_bayer_io_config() get part leave:\n");
 #endif
        }
 
@@ -65,10 +71,12 @@ ia_css_bayer_io_config(
        }
 
        if (size_put) {
-               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+                                                    &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                struct dma_port_config config;
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() put part enter:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_bayer_io_config() put part enter:\n");
 #endif
 
                ia_css_dma_configure_from_info(&config, &out_frames[0]->info);
@@ -79,7 +87,8 @@ ia_css_bayer_io_config(
                to->ddr_elems_per_word = ddr_elems_per_word;
 
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() put part leave:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_bayer_io_config() put part leave:\n");
 #endif
        }
 }
index 3decbf1a188d177bf4db40f268fd1aaf3676d9ed..8eb7affbd2262d4822ea3b66bee11afc9785aa72 100644 (file)
@@ -23,8 +23,8 @@
 
 void
 ia_css_bayer_io_config(
-       const struct ia_css_binary     *binary,
-       const struct sh_css_binary_args *args);
+    const struct ia_css_binary     *binary,
+    const struct sh_css_binary_args *args);
 
 #endif /*__BAYER_IO_HOST_H */
 #endif
index 5e511edb05e2d41f370beffb8639a57847482ce6..96abc16607210b962cff8f86ab05db219cae3c49 100644 (file)
@@ -24,15 +24,18 @@ more details.
 
 void
 ia_css_bayer_io_config(
-       const struct ia_css_binary      *binary,
-       const struct sh_css_binary_args *args)
+    const struct ia_css_binary      *binary,
+    const struct sh_css_binary_args *args)
 {
        const struct ia_css_frame *in_frame = args->in_frame;
-       const struct ia_css_frame **out_frames = (const struct ia_css_frame **)&args->out_frame;
-       const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info : &binary->in_frame_info;
+       const struct ia_css_frame **out_frames = (const struct ia_css_frame **)
+               &args->out_frame;
+       const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info :
+               &binary->in_frame_info;
 
        const unsigned int ddr_bits_per_element = sizeof(short) * 8;
-       const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS, ddr_bits_per_element);
+       const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS,
+                                               ddr_bits_per_element);
        unsigned int size_get = 0, size_put = 0;
        unsigned int offset = 0;
 
@@ -42,10 +45,12 @@ ia_css_bayer_io_config(
        }
 
        if (size_get) {
-               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+                                                    &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                struct dma_port_config config;
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() get part enter:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_bayer_io_config() get part enter:\n");
 #endif
 
                ia_css_dma_configure_from_info(&config, in_frame_info);
@@ -55,7 +60,8 @@ ia_css_bayer_io_config(
                to->stride = config.stride;
                to->ddr_elems_per_word = ddr_elems_per_word;
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() get part leave:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_bayer_io_config() get part leave:\n");
 #endif
        }
 
@@ -65,10 +71,12 @@ ia_css_bayer_io_config(
        }
 
        if (size_put) {
-               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+                                                    &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                struct dma_port_config config;
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() put part enter:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_bayer_io_config() put part enter:\n");
 #endif
 
                ia_css_dma_configure_from_info(&config, &out_frames[0]->info);
@@ -79,7 +87,8 @@ ia_css_bayer_io_config(
                to->ddr_elems_per_word = ddr_elems_per_word;
 
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() put part leave:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_bayer_io_config() put part leave:\n");
 #endif
        }
 }
index eaf54524245a06fc0b2879b8d3aa70904ad124c8..42f2d1054afd43eb9d03d6aca12a01806e785170 100644 (file)
@@ -23,8 +23,8 @@ more details.
 
 void
 ia_css_bayer_io_config(
-       const struct ia_css_binary     *binary,
-       const struct sh_css_binary_args *args);
+    const struct ia_css_binary     *binary,
+    const struct sh_css_binary_args *args);
 
 #endif /*__BAYER_IO_HOST_H */
 #endif
index bc8a695b8969241d9139778d1e5311166f936d57..2fc0c222a5796f697e6d365c442edef056094c06 100644 (file)
@@ -24,15 +24,18 @@ more details.
 
 void
 ia_css_yuv444_io_config(
-       const struct ia_css_binary      *binary,
-       const struct sh_css_binary_args *args)
+    const struct ia_css_binary      *binary,
+    const struct sh_css_binary_args *args)
 {
        const struct ia_css_frame *in_frame = args->in_frame;
-       const struct ia_css_frame **out_frames = (const struct ia_css_frame **)&args->out_frame;
-       const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info : &binary->in_frame_info;
+       const struct ia_css_frame **out_frames = (const struct ia_css_frame **)
+               &args->out_frame;
+       const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info :
+               &binary->in_frame_info;
 
        const unsigned int ddr_bits_per_element = sizeof(short) * 8;
-       const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS, ddr_bits_per_element);
+       const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS,
+                                               ddr_bits_per_element);
        unsigned int size_get = 0, size_put = 0;
        unsigned int offset = 0;
 
@@ -42,10 +45,12 @@ ia_css_yuv444_io_config(
        }
 
        if (size_get) {
-               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+                                                    &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                struct dma_port_config config;
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_yuv444_io_config() get part enter:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_yuv444_io_config() get part enter:\n");
 #endif
 
                ia_css_dma_configure_from_info(&config, in_frame_info);
@@ -55,7 +60,8 @@ ia_css_yuv444_io_config(
                to->stride = config.stride;
                to->ddr_elems_per_word = ddr_elems_per_word;
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_yuv444_io_config() get part leave:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_yuv444_io_config() get part leave:\n");
 #endif
        }
 
@@ -65,10 +71,12 @@ ia_css_yuv444_io_config(
        }
 
        if (size_put) {
-               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+                                                    &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
                struct dma_port_config config;
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_yuv444_io_config() put part enter:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_yuv444_io_config() put part enter:\n");
 #endif
 
                ia_css_dma_configure_from_info(&config, &out_frames[0]->info);
@@ -79,7 +87,8 @@ ia_css_yuv444_io_config(
                to->ddr_elems_per_word = ddr_elems_per_word;
 
 #ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_yuv444_io_config() put part leave:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_yuv444_io_config() put part leave:\n");
 #endif
        }
 }
index e5b2aa76ceaefb32114b0116bab50e688638f785..b61d4a2311e7f20e06cce22d8263a9a0cc168108 100644 (file)
@@ -23,8 +23,8 @@ more details.
 
 void
 ia_css_yuv444_io_config(
-       const struct ia_css_binary     *binary,
-       const struct sh_css_binary_args *args);
+    const struct ia_css_binary     *binary,
+    const struct sh_css_binary_args *args);
 
 #endif /*__YUV44_IO_HOST_H */
 #endif
index cc39a35b999b663f7a5a36991b0b8b7ae1395b48..49c1b3e3370df259a66287cace6d97c89d6cecac 100644 (file)
@@ -25,9 +25,9 @@ static const struct ia_css_iterator_configuration default_config = {
 
 void
 ia_css_iterator_config(
-       struct sh_css_isp_iterator_isp_config *to,
-       const struct ia_css_iterator_configuration *from,
-       unsigned int size)
+    struct sh_css_isp_iterator_isp_config *to,
+    const struct ia_css_iterator_configuration *from,
+    unsigned int size)
 {
        (void)size;
        ia_css_frame_info_to_frame_sp_info(&to->input_info,    from->input_info);
@@ -39,9 +39,8 @@ ia_css_iterator_config(
 
 enum ia_css_err
 ia_css_iterator_configure(
-       const struct ia_css_binary *binary,
-       const struct ia_css_frame_info *in_info)
-{
+    const struct ia_css_binary *binary,
+    const struct ia_css_frame_info *in_info) {
        struct ia_css_frame_info my_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
        struct ia_css_iterator_configuration config = default_config;
 
@@ -66,7 +65,8 @@ ia_css_iterator_configure(
         * the original out res. for video pipe, it has two output pins --- out and
         * vf_out, so it can keep these two resolutions already. */
        if (binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_PREVIEW &&
-           binary->vf_downscale_log2 > 0) {
+           binary->vf_downscale_log2 > 0)
+       {
                /* TODO: Remove this after preview output decimation is fixed
                 * by configuring out&vf info files properly */
                my_info.padded_width <<= binary->vf_downscale_log2;
index 279909cf66a4926b6732d643a21f2e9e8d16b267..c5e8d58e0fe117b28d495b195f6346a07a222c57 100644 (file)
 
 void
 ia_css_iterator_config(
-       struct sh_css_isp_iterator_isp_config *to,
-       const struct ia_css_iterator_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_iterator_isp_config *to,
+    const struct ia_css_iterator_configuration *from,
+    unsigned int size);
 
 enum ia_css_err
 ia_css_iterator_configure(
-       const struct ia_css_binary *binary,
-       const struct ia_css_frame_info *in_info);
+    const struct ia_css_binary *binary,
+    const struct ia_css_frame_info *in_info);
 
 #endif /* __IA_CSS_ITERATOR_HOST_H */
index 7cef616e7d07fcd1707601ec97feef5046e75285..7a6abe0c5b7ddf3edb657160ff63d141e0a2162b 100644 (file)
@@ -28,9 +28,9 @@ const struct ia_css_macc1_5_config default_macc1_5_config = {
 
 void
 ia_css_macc1_5_encode(
-       struct sh_css_isp_macc1_5_params *to,
-       const struct ia_css_macc1_5_config *from,
-       unsigned int size)
+    struct sh_css_isp_macc1_5_params *to,
+    const struct ia_css_macc1_5_config *from,
+    unsigned int size)
 {
        (void)size;
        to->exp = from->exp;
@@ -38,13 +38,14 @@ ia_css_macc1_5_encode(
 
 void
 ia_css_macc1_5_vmem_encode(
-       struct sh_css_isp_macc1_5_vmem_params *params,
-       const struct ia_css_macc1_5_table *from,
-       unsigned int size)
+    struct sh_css_isp_macc1_5_vmem_params *params,
+    const struct ia_css_macc1_5_table *from,
+    unsigned int size)
 {
        unsigned int i, j, k, idx;
        unsigned int idx_map[] = {
-               0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8};
+               0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8
+       };
 
        (void)size;
 
@@ -63,11 +64,11 @@ ia_css_macc1_5_vmem_encode(
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_macc1_5_debug_dtrace(
-       const struct ia_css_macc1_5_config *config,
-       unsigned int level)
+    const struct ia_css_macc1_5_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.exp=%d\n",
-               config->exp);
+                           "config.exp=%d\n",
+                           config->exp);
 }
 #endif
index 53ef18f7e9121c01a9fecb7f8bf97b4bdf3a04e2..ae9ede2b685a4dde4af46f8266fe6632baba3fab 100644 (file)
@@ -22,20 +22,20 @@ extern const struct ia_css_macc1_5_config default_macc1_5_config;
 
 void
 ia_css_macc1_5_encode(
-       struct sh_css_isp_macc1_5_params *to,
-       const struct ia_css_macc1_5_config *from,
-       unsigned int size);
+    struct sh_css_isp_macc1_5_params *to,
+    const struct ia_css_macc1_5_config *from,
+    unsigned int size);
 
 void
 ia_css_macc1_5_vmem_encode(
-       struct sh_css_isp_macc1_5_vmem_params *params,
-       const struct ia_css_macc1_5_table *from,
-       unsigned int size);
+    struct sh_css_isp_macc1_5_vmem_params *params,
+    const struct ia_css_macc1_5_table *from,
+    unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_macc1_5_debug_dtrace(
-       const struct ia_css_macc1_5_config *config,
-       unsigned int level);
+    const struct ia_css_macc1_5_config *config,
+    unsigned int level);
 #endif
 #endif /* __IA_CSS_MACC1_5_HOST_H */
index 1ac2c9c50a71a888bc406d02d75c9323cac42084..497ad89ab728c94ca5e412f27ab39742b1083de9 100644 (file)
@@ -25,7 +25,7 @@ struct sh_css_isp_macc1_5_params {
 };
 
 struct sh_css_isp_macc1_5_vmem_params {
-       VMEM_ARRAY(data, IA_CSS_MACC_NUM_COEFS * ISP_NWAY);
+       VMEM_ARRAY(data, IA_CSS_MACC_NUM_COEFS *ISP_NWAY);
 };
 
 #endif /* __IA_CSS_MACC1_5_PARAM_H */
index 89714bf87b5295fc784baf77bd2e42b7495f3525..c094f3df10aa36617dde36bce5e7401df02e4829 100644 (file)
  *     ineffective: 16 of "identity 2x2 matix" {4096,0,0,4096}
  */
 const struct ia_css_macc1_5_table default_macc1_5_table = {
-             { 4096, 0, 0, 4096, 4096, 0, 0, 4096,
+       {
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
-               4096, 0, 0, 4096, 4096, 0, 0, 4096 }
+               4096, 0, 0, 4096, 4096, 0, 0, 4096,
+               4096, 0, 0, 4096, 4096, 0, 0, 4096
+       }
 };
index f931f631d2bcba6b970ee5e4318ff5066899686c..0b1d1bf5e8a0aa0c4c1add4a2db9a188b58148e6 100644 (file)
@@ -25,9 +25,9 @@ const struct ia_css_macc_config default_macc_config = {
 
 void
 ia_css_macc_encode(
-       struct sh_css_isp_macc_params *to,
-       const struct ia_css_macc_config *from,
-       unsigned int size)
+    struct sh_css_isp_macc_params *to,
+    const struct ia_css_macc_config *from,
+    unsigned int size)
 {
        (void)size;
        to->exp = from->exp;
@@ -35,15 +35,15 @@ ia_css_macc_encode(
 
 void
 ia_css_macc_dump(
-       const struct sh_css_isp_macc_params *macc,
-       unsigned int level);
+    const struct sh_css_isp_macc_params *macc,
+    unsigned int level);
 
 void
 ia_css_macc_debug_dtrace(
-       const struct ia_css_macc_config *config,
-       unsigned int level)
+    const struct ia_css_macc_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.exp=%d\n",
-               config->exp);
+                           "config.exp=%d\n",
+                           config->exp);
 }
index 843892de45a527aca851de08ec3f7b245ea45ba8..0e13e9cb05477c54f312911db32f71ad3b4944a9 100644 (file)
@@ -24,18 +24,18 @@ extern const struct ia_css_macc_config default_macc_config;
 
 void
 ia_css_macc_encode(
-       struct sh_css_isp_macc_params *to,
-       const struct ia_css_macc_config *from,
-       unsigned int size);
+    struct sh_css_isp_macc_params *to,
+    const struct ia_css_macc_config *from,
+    unsigned int size);
 
 void
 ia_css_macc_dump(
-       const struct sh_css_isp_macc_params *macc,
-       unsigned int level);
+    const struct sh_css_isp_macc_params *macc,
+    unsigned int level);
 
 void
 ia_css_macc_debug_dtrace(
-       const struct ia_css_macc_config *config,
-       unsigned int level);
+    const struct ia_css_macc_config *config,
+    unsigned int level);
 
 #endif /* __IA_CSS_MACC_HOST_H */
index 56c2114fe54c15854a31484de311d40f6f24f00f..f9a430da54b8c9bf4a433f2aabff05c7d5e94ea5 100644 (file)
  *     ineffective: 16 of "identity 2x2 matix" {8192,0,0,8192}
  */
 const struct ia_css_macc_table default_macc_table = {
-               { 8192, 0, 0, 8192, 8192, 0, 0, 8192,
+       {
                8192, 0, 0, 8192, 8192, 0, 0, 8192,
                8192, 0, 0, 8192, 8192, 0, 0, 8192,
                8192, 0, 0, 8192, 8192, 0, 0, 8192,
                8192, 0, 0, 8192, 8192, 0, 0, 8192,
                8192, 0, 0, 8192, 8192, 0, 0, 8192,
                8192, 0, 0, 8192, 8192, 0, 0, 8192,
-               8192, 0, 0, 8192, 8192, 0, 0, 8192 }
+               8192, 0, 0, 8192, 8192, 0, 0, 8192,
+               8192, 0, 0, 8192, 8192, 0, 0, 8192
+       }
 };
 
 /* Multi-Axes Color Correction table for ISP2.
@@ -36,12 +38,14 @@ const struct ia_css_macc_table default_macc_table = {
  *     ineffective: 16 of "identity 2x2 matix" {4096,0,0,4096}
  */
 const struct ia_css_macc_table default_macc2_table = {
-             { 4096, 0, 0, 4096, 4096, 0, 0, 4096,
+       {
+               4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
                4096, 0, 0, 4096, 4096, 0, 0, 4096,
-               4096, 0, 0, 4096, 4096, 0, 0, 4096 }
+               4096, 0, 0, 4096, 4096, 0, 0, 4096
+       }
 };
index 81f5a36e7b17813ae86124e6db6afed5eb5f988e..f7403ce16c994070838b09f9ed023aee226b1cad 100644 (file)
@@ -30,9 +30,9 @@ const struct ia_css_ob2_config default_ob2_config = {
 
 void
 ia_css_ob2_encode(
-       struct sh_css_isp_ob2_params *to,
-       const struct ia_css_ob2_config *from,
-       unsigned int size)
+    struct sh_css_isp_ob2_params *to,
+    const struct ia_css_ob2_config *from,
+    unsigned int size)
 {
        (void)size;
 
@@ -46,31 +46,31 @@ ia_css_ob2_encode(
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_ob2_dump(
-       const struct sh_css_isp_ob2_params *ob2,
-       unsigned int level)
+    const struct sh_css_isp_ob2_params *ob2,
+    unsigned int level)
 {
        if (!ob2)
                return;
 
        ia_css_debug_dtrace(level, "Optical Black 2:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "ob2_blacklevel_gr", ob2->blacklevel_gr);
+                           "ob2_blacklevel_gr", ob2->blacklevel_gr);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "ob2_blacklevel_r", ob2->blacklevel_r);
+                           "ob2_blacklevel_r", ob2->blacklevel_r);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "ob2_blacklevel_b", ob2->blacklevel_b);
+                           "ob2_blacklevel_b", ob2->blacklevel_b);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "ob2_blacklevel_gb", ob2->blacklevel_gb);
+                           "ob2_blacklevel_gb", ob2->blacklevel_gb);
 }
 
 void
 ia_css_ob2_debug_dtrace(
-       const struct ia_css_ob2_config *config,
-       unsigned int level)
+    const struct ia_css_ob2_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.level_gr=%d, config.level_r=%d, config.level_b=%d,  config.level_gb=%d, ",
-               config->level_gr, config->level_r,
-               config->level_b, config->level_gb);
+                           "config.level_gr=%d, config.level_r=%d, config.level_b=%d,  config.level_gb=%d, ",
+                           config->level_gr, config->level_r,
+                           config->level_b, config->level_gb);
 }
 #endif
index 5350ec3ac64216cd9c030e8d2a00c9089d7e4b6a..936f6a08a174d929e9a1425134793f1fb6386919 100644 (file)
@@ -22,19 +22,19 @@ extern const struct ia_css_ob2_config default_ob2_config;
 
 void
 ia_css_ob2_encode(
-       struct sh_css_isp_ob2_params *to,
-       const struct ia_css_ob2_config *from,
-       unsigned int size);
+    struct sh_css_isp_ob2_params *to,
+    const struct ia_css_ob2_config *from,
+    unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_ob2_dump(
-       const struct sh_css_isp_ob2_params *ob2,
-       unsigned int level);
+    const struct sh_css_isp_ob2_params *ob2,
+    unsigned int level);
 
 void
 ia_css_ob2_debug_dtrace(
-       const struct ia_css_ob2_config *config, unsigned int level);
+    const struct ia_css_ob2_config *config, unsigned int level);
 #endif
 
 #endif /* __IA_CSS_OB2_HOST_H */
index fce5e65ff6bce6023c1543805fcc5fad35167e9d..6367d94275fb0df18b26c4f3c12e603b99840b53 100644 (file)
@@ -34,9 +34,9 @@ const struct ia_css_ob_config default_ob_config = {
 
 void
 ia_css_ob_configure(
-       struct sh_css_isp_ob_stream_config *config,
-       unsigned int isp_pipe_version,
-       unsigned int raw_bit_depth)
+    struct sh_css_isp_ob_stream_config *config,
+    unsigned int isp_pipe_version,
+    unsigned int raw_bit_depth)
 {
        config->isp_pipe_version = isp_pipe_version;
        config->raw_bit_depth    = raw_bit_depth;
@@ -44,13 +44,13 @@ ia_css_ob_configure(
 
 void
 ia_css_ob_encode(
-       struct sh_css_isp_ob_params *to,
-       const struct ia_css_ob_config *from,
-       const struct sh_css_isp_ob_stream_config *config,
-       unsigned int size)
+    struct sh_css_isp_ob_params *to,
+    const struct ia_css_ob_config *from,
+    const struct sh_css_isp_ob_stream_config *config,
+    unsigned int size)
 {
        unsigned int ob_bit_depth
-               = config->isp_pipe_version == 2 ? SH_CSS_BAYER_BITS : config->raw_bit_depth;
+           = config->isp_pipe_version == 2 ? SH_CSS_BAYER_BITS : config->raw_bit_depth;
        unsigned int scale = 16 - ob_bit_depth;
 
        (void)size;
@@ -88,10 +88,10 @@ ia_css_ob_encode(
 
 void
 ia_css_ob_vmem_encode(
-       struct sh_css_isp_ob_vmem_params *to,
-       const struct ia_css_ob_config *from,
-       const struct sh_css_isp_ob_stream_config *config,
-       unsigned int size)
+    struct sh_css_isp_ob_vmem_params *to,
+    const struct ia_css_ob_config *from,
+    const struct sh_css_isp_ob_stream_config *config,
+    unsigned int size)
 {
        struct sh_css_isp_ob_params tmp;
        struct sh_css_isp_ob_params *ob = &tmp;
@@ -118,37 +118,37 @@ ia_css_ob_vmem_encode(
 
 void
 ia_css_ob_dump(
-       const struct sh_css_isp_ob_params *ob,
-       unsigned int level)
+    const struct sh_css_isp_ob_params *ob,
+    unsigned int level)
 {
        if (!ob) return;
        ia_css_debug_dtrace(level, "Optical Black:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "ob_blacklevel_gr", ob->blacklevel_gr);
+                           "ob_blacklevel_gr", ob->blacklevel_gr);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "ob_blacklevel_r", ob->blacklevel_r);
+                           "ob_blacklevel_r", ob->blacklevel_r);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "ob_blacklevel_b", ob->blacklevel_b);
+                           "ob_blacklevel_b", ob->blacklevel_b);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "ob_blacklevel_gb", ob->blacklevel_gb);
+                           "ob_blacklevel_gb", ob->blacklevel_gb);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "obarea_start_bq", ob->area_start_bq);
+                           "obarea_start_bq", ob->area_start_bq);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "obarea_length_bq", ob->area_length_bq);
+                           "obarea_length_bq", ob->area_length_bq);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-               "obarea_length_bq_inverse",
-               ob->area_length_bq_inverse);
+                           "obarea_length_bq_inverse",
+                           ob->area_length_bq_inverse);
 }
 
 void
 ia_css_ob_debug_dtrace(
-       const struct ia_css_ob_config *config,
-       unsigned int level)
+    const struct ia_css_ob_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.mode=%d, config.level_gr=%d, config.level_r=%d, config.level_b=%d,  config.level_gb=%d, config.start_position=%d, config.end_position=%d\n",
-               config->mode,
-               config->level_gr, config->level_r,
-               config->level_b, config->level_gb,
-               config->start_position, config->end_position);
+                           "config.mode=%d, config.level_gr=%d, config.level_r=%d, config.level_b=%d,  config.level_gb=%d, config.start_position=%d, config.end_position=%d\n",
+                           config->mode,
+                           config->level_gr, config->level_r,
+                           config->level_b, config->level_gb,
+                           config->start_position, config->end_position);
 }
index 64cbaf15ceba005021c3d10360f74f3f7399ac74..d767c5856880f0068d77f7246736966a92fb798a 100644 (file)
@@ -22,32 +22,32 @@ extern const struct ia_css_ob_config default_ob_config;
 
 void
 ia_css_ob_configure(
-       struct sh_css_isp_ob_stream_config *config,
-       unsigned int isp_pipe_version,
-       unsigned int raw_bit_depth);
+    struct sh_css_isp_ob_stream_config *config,
+    unsigned int isp_pipe_version,
+    unsigned int raw_bit_depth);
 
 void
 ia_css_ob_encode(
-       struct sh_css_isp_ob_params *to,
-       const struct ia_css_ob_config *from,
-       const struct sh_css_isp_ob_stream_config *config,
-       unsigned int size);
+    struct sh_css_isp_ob_params *to,
+    const struct ia_css_ob_config *from,
+    const struct sh_css_isp_ob_stream_config *config,
+    unsigned int size);
 
 void
 ia_css_ob_vmem_encode(
-       struct sh_css_isp_ob_vmem_params *to,
-       const struct ia_css_ob_config *from,
-       const struct sh_css_isp_ob_stream_config *config,
-       unsigned int size);
+    struct sh_css_isp_ob_vmem_params *to,
+    const struct ia_css_ob_config *from,
+    const struct sh_css_isp_ob_stream_config *config,
+    unsigned int size);
 
 void
 ia_css_ob_dump(
-       const struct sh_css_isp_ob_params *ob,
-       unsigned int level);
+    const struct sh_css_isp_ob_params *ob,
+    unsigned int level);
 
 void
 ia_css_ob_debug_dtrace(
-       const struct ia_css_ob_config *config, unsigned int level)
+    const struct ia_css_ob_config *config, unsigned int level)
 ;
 
 #endif /* __IA_CSS_OB_HOST_H */
index 0446faae159f6cd8e29ce947fa114f6d2da0822c..df4cb9c362a4ef33e5893428619c2c5226786156 100644 (file)
@@ -30,19 +30,21 @@ static const struct ia_css_output_configuration default_output_configuration = {
        .info = (struct ia_css_frame_info *)NULL,
 };
 
-static const struct ia_css_output0_configuration default_output0_configuration = {
+static const struct ia_css_output0_configuration default_output0_configuration
+       = {
        .info = (struct ia_css_frame_info *)NULL,
 };
 
-static const struct ia_css_output1_configuration default_output1_configuration = {
+static const struct ia_css_output1_configuration default_output1_configuration
+       = {
        .info = (struct ia_css_frame_info *)NULL,
 };
 
 void
 ia_css_output_encode(
-       struct sh_css_isp_output_params *to,
-       const struct ia_css_output_config *from,
-       unsigned int size)
+    struct sh_css_isp_output_params *to,
+    const struct ia_css_output_config *from,
+    unsigned int size)
 {
        (void)size;
        to->enable_hflip = from->enable_hflip;
@@ -51,9 +53,9 @@ ia_css_output_encode(
 
 void
 ia_css_output_config(
-       struct sh_css_isp_output_isp_config *to,
-       const struct ia_css_output_configuration  *from,
-       unsigned int size)
+    struct sh_css_isp_output_isp_config *to,
+    const struct ia_css_output_configuration  *from,
+    unsigned int size)
 {
        unsigned int elems_a = ISP_VEC_NELEMS;
 
@@ -70,32 +72,32 @@ ia_css_output_config(
 
 void
 ia_css_output0_config(
-       struct sh_css_isp_output_isp_config       *to,
-       const struct ia_css_output0_configuration *from,
-       unsigned int size)
+    struct sh_css_isp_output_isp_config       *to,
+    const struct ia_css_output0_configuration *from,
+    unsigned int size)
 {
        ia_css_output_config(
-               to, (const struct ia_css_output_configuration *)from, size);
+           to, (const struct ia_css_output_configuration *)from, size);
 }
 
 void
 ia_css_output1_config(
-       struct sh_css_isp_output_isp_config       *to,
-       const struct ia_css_output1_configuration *from,
-       unsigned int size)
+    struct sh_css_isp_output_isp_config       *to,
+    const struct ia_css_output1_configuration *from,
+    unsigned int size)
 {
        ia_css_output_config(
-               to, (const struct ia_css_output_configuration *)from, size);
+           to, (const struct ia_css_output_configuration *)from, size);
 }
 
 void
 ia_css_output_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *info)
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *info)
 {
        if (info) {
                struct ia_css_output_configuration config =
-                               default_output_configuration;
+                           default_output_configuration;
 
                config.info = info;
 
@@ -105,12 +107,12 @@ ia_css_output_configure(
 
 void
 ia_css_output0_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *info)
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *info)
 {
        if (info) {
                struct ia_css_output0_configuration config =
-                               default_output0_configuration;
+                           default_output0_configuration;
 
                config.info = info;
 
@@ -120,12 +122,12 @@ ia_css_output0_configure(
 
 void
 ia_css_output1_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *info)
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *info)
 {
        if (info) {
                struct ia_css_output1_configuration config =
-                               default_output1_configuration;
+                           default_output1_configuration;
 
                config.info = info;
 
@@ -135,27 +137,27 @@ ia_css_output1_configure(
 
 void
 ia_css_output_dump(
-       const struct sh_css_isp_output_params *output,
-       unsigned int level)
+    const struct sh_css_isp_output_params *output,
+    unsigned int level)
 {
        if (!output) return;
        ia_css_debug_dtrace(level, "Horizontal Output Flip:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "enable", output->enable_hflip);
+                           "enable", output->enable_hflip);
        ia_css_debug_dtrace(level, "Vertical Output Flip:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "enable", output->enable_vflip);
+                           "enable", output->enable_vflip);
 }
 
 void
 ia_css_output_debug_dtrace(
-       const struct ia_css_output_config *config,
-       unsigned int level)
+    const struct ia_css_output_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.enable_hflip=%d",
-               config->enable_hflip);
+                           "config.enable_hflip=%d",
+                           config->enable_hflip);
        ia_css_debug_dtrace(level,
-               "config.enable_vflip=%d",
-               config->enable_vflip);
+                           "config.enable_vflip=%d",
+                           config->enable_vflip);
 }
index 4fe2c54dae5e7dad283d1342328bc1fba1e88732..3d8f61c225cfb42149417c5ca90976e44f9d7e7a 100644 (file)
@@ -25,51 +25,51 @@ extern const struct ia_css_output_config default_output_config;
 
 void
 ia_css_output_encode(
-       struct sh_css_isp_output_params *to,
-       const struct ia_css_output_config *from,
-       unsigned int size);
+    struct sh_css_isp_output_params *to,
+    const struct ia_css_output_config *from,
+    unsigned int size);
 
 void
 ia_css_output_config(
-       struct sh_css_isp_output_isp_config      *to,
-       const struct ia_css_output_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_output_isp_config      *to,
+    const struct ia_css_output_configuration *from,
+    unsigned int size);
 
 void
 ia_css_output0_config(
-       struct sh_css_isp_output_isp_config       *to,
-       const struct ia_css_output0_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_output_isp_config       *to,
+    const struct ia_css_output0_configuration *from,
+    unsigned int size);
 
 void
 ia_css_output1_config(
-       struct sh_css_isp_output_isp_config       *to,
-       const struct ia_css_output1_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_output_isp_config       *to,
+    const struct ia_css_output1_configuration *from,
+    unsigned int size);
 
 void
 ia_css_output_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *from);
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *from);
 
 void
 ia_css_output0_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *from);
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *from);
 
 void
 ia_css_output1_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *from);
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *from);
 
 void
 ia_css_output_dump(
-       const struct sh_css_isp_output_params *output,
-       unsigned int level);
+    const struct sh_css_isp_output_params *output,
+    unsigned int level);
 
 void
 ia_css_output_debug_dtrace(
-       const struct ia_css_output_config *config,
-       unsigned int level);
+    const struct ia_css_output_config *config,
+    unsigned int level);
 
 #endif /* __IA_CSS_OUTPUT_HOST_H */
index f6e452e1d70afb05230fffa32f612581afe81694..3de108b56005ed7d7de005f6547b372690493dc3 100644 (file)
@@ -29,9 +29,9 @@ static const struct ia_css_qplane_configuration default_config = {
 
 void
 ia_css_qplane_config(
-       struct sh_css_isp_qplane_isp_config *to,
-       const struct ia_css_qplane_configuration  *from,
-       unsigned int size)
+    struct sh_css_isp_qplane_isp_config *to,
+    const struct ia_css_qplane_configuration  *from,
+    unsigned int size)
 {
        unsigned int elems_a = ISP_VEC_NELEMS;
 
@@ -48,9 +48,9 @@ ia_css_qplane_config(
 
 void
 ia_css_qplane_configure(
-       const struct sh_css_sp_pipeline *pipe,
-       const struct ia_css_binary      *binary,
-       const struct ia_css_frame_info  *info)
+    const struct sh_css_sp_pipeline *pipe,
+    const struct ia_css_binary      *binary,
+    const struct ia_css_frame_info  *info)
 {
        struct ia_css_qplane_configuration config = default_config;
 
index 7448ec706893bf09bcc95ca5faa47f0993f673ae..ad6d7ca783e42f747de4a6e0e794f5b61530e322 100644 (file)
 
 void
 ia_css_qplane_config(
-       struct sh_css_isp_qplane_isp_config      *to,
-       const struct ia_css_qplane_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_qplane_isp_config      *to,
+    const struct ia_css_qplane_configuration *from,
+    unsigned int size);
 
 void
 ia_css_qplane_configure(
-       const struct sh_css_sp_pipeline *pipe,
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *from);
+    const struct sh_css_sp_pipeline *pipe,
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *from);
 
 #endif /* __IA_CSS_QPLANE_HOST_H */
index 3d8d2683fb5dfb1d3fca41063f64517c5a99e730..1a85f20770c1794a3087f3c39af486c6aa10cc84 100644 (file)
@@ -36,11 +36,11 @@ sh_css_elems_bytes_from_info(unsigned int raw_bit_depth)
 
 /* MW: These areMIPI / ISYS properties, not camera function properties */
 static enum sh_stream_format
-css2isp_stream_format(enum atomisp_input_format from)
-{
-       switch (from) {
+css2isp_stream_format(enum atomisp_input_format from) {
+       switch (from)
+       {
        case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
-               return sh_stream_format_yuv420_legacy;
+                               return sh_stream_format_yuv420_legacy;
        case ATOMISP_INPUT_FORMAT_YUV420_8:
        case ATOMISP_INPUT_FORMAT_YUV420_10:
        case ATOMISP_INPUT_FORMAT_YUV420_16:
@@ -71,9 +71,9 @@ css2isp_stream_format(enum atomisp_input_format from)
 
 void
 ia_css_raw_config(
-       struct sh_css_isp_raw_isp_config *to,
-       const struct ia_css_raw_configuration  *from,
-       unsigned int size)
+    struct sh_css_isp_raw_isp_config *to,
+    const struct ia_css_raw_configuration  *from,
+    unsigned int size)
 {
        unsigned int elems_a = ISP_VEC_NELEMS;
        const struct ia_css_frame_info *in_info = from->in_info;
@@ -95,7 +95,7 @@ ia_css_raw_config(
 
        /* Assume divisiblity here, may need to generalize to fixed point. */
        assert((in_info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED) ||
-                  (elems_a % to->port_b.elems == 0));
+              (elems_a % to->port_b.elems == 0));
 
        to->width_a_over_b      = elems_a / to->port_b.elems;
        to->inout_port_config   = from->pipe->inout_port_config;
@@ -113,12 +113,12 @@ ia_css_raw_config(
 
 void
 ia_css_raw_configure(
-       const struct sh_css_sp_pipeline *pipe,
-       const struct ia_css_binary      *binary,
-       const struct ia_css_frame_info  *in_info,
-       const struct ia_css_frame_info  *internal_info,
-       bool two_ppc,
-       bool deinterleaved)
+    const struct sh_css_sp_pipeline *pipe,
+    const struct ia_css_binary      *binary,
+    const struct ia_css_frame_info  *in_info,
+    const struct ia_css_frame_info  *internal_info,
+    bool two_ppc,
+    bool deinterleaved)
 {
        u8 enable_left_padding = (uint8_t)((binary->left_padding) ? 1 : 0);
        struct ia_css_raw_configuration config = default_config;
index 189c0839ee01df1cbf83bf270c06ffd6848eb913..36a4079aa24a7f107ade4095ee0a709c3b6007e4 100644 (file)
 
 void
 ia_css_raw_config(
-       struct sh_css_isp_raw_isp_config      *to,
-       const struct ia_css_raw_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_raw_isp_config      *to,
+    const struct ia_css_raw_configuration *from,
+    unsigned int size);
 
 void
 ia_css_raw_configure(
-       const struct sh_css_sp_pipeline *pipe,
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame_info *in_info,
-       const struct ia_css_frame_info *internal_info,
-       bool two_ppc,
-       bool deinterleaved);
+    const struct sh_css_sp_pipeline *pipe,
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame_info *in_info,
+    const struct ia_css_frame_info *internal_info,
+    bool two_ppc,
+    bool deinterleaved);
 
 #endif /* __IA_CSS_RAW_HOST_H */
index 50ab19ad8b1e398220d7cdd739d450bf55a3b7d4..2045b974ec8abc9ee6f63bc3cf35fd22164125e6 100644 (file)
@@ -23,9 +23,9 @@
 
 void
 ia_css_raa_encode(
-       struct sh_css_isp_aa_params *to,
-       const struct ia_css_aa_config *from,
-       unsigned int size)
+    struct sh_css_isp_aa_params *to,
+    const struct ia_css_aa_config *from,
+    unsigned int size)
 {
        (void)size;
        (void)to;
index 9435781ac99ee86e64e9d82e3b31ee5092b3f52f..d4df1dc540a0e92532dd9390c171587f865164e6 100644 (file)
@@ -20,8 +20,8 @@
 
 void
 ia_css_raa_encode(
-       struct sh_css_isp_aa_params *to,
-       const struct ia_css_aa_config *from,
-       unsigned int size);
+    struct sh_css_isp_aa_params *to,
+    const struct ia_css_aa_config *from,
+    unsigned int size);
 
 #endif /* __IA_CSS_RAA_HOST_H */
index 692727ed010076fa562379fa02c18130214b38a2..c3f43fd327d4563fb99a177ebe9364ca8d0e9e92 100644 (file)
@@ -23,9 +23,9 @@
 
 void
 ia_css_ref_config(
-       struct sh_css_isp_ref_isp_config *to,
-       const struct ia_css_ref_configuration  *from,
-       unsigned int size)
+    struct sh_css_isp_ref_isp_config *to,
+    const struct ia_css_ref_configuration  *from,
+    unsigned int size)
 {
        unsigned int elems_a = ISP_VEC_NELEMS, i;
 
@@ -35,8 +35,10 @@ ia_css_ref_config(
        to->dvs_frame_delay = from->dvs_frame_delay;
        for (i = 0; i < MAX_NUM_VIDEO_DELAY_FRAMES; i++) {
                if (from->ref_frames[i]) {
-                       to->ref_frame_addr_y[i] = from->ref_frames[i]->data + from->ref_frames[i]->planes.yuv.y.offset;
-                       to->ref_frame_addr_c[i] = from->ref_frames[i]->data + from->ref_frames[i]->planes.yuv.u.offset;
+                       to->ref_frame_addr_y[i] = from->ref_frames[i]->data +
+                                                 from->ref_frames[i]->planes.yuv.y.offset;
+                       to->ref_frame_addr_c[i] = from->ref_frames[i]->data +
+                                                 from->ref_frames[i]->planes.yuv.u.offset;
                } else {
                        to->ref_frame_addr_y[i] = 0;
                        to->ref_frame_addr_c[i] = 0;
@@ -49,9 +51,9 @@ ia_css_ref_config(
 
 void
 ia_css_ref_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame **ref_frames,
-       const uint32_t dvs_frame_delay)
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame **ref_frames,
+    const uint32_t dvs_frame_delay)
 {
        struct ia_css_ref_configuration config;
        unsigned int i;
@@ -64,8 +66,8 @@ ia_css_ref_configure(
 
 void
 ia_css_init_ref_state(
-       struct sh_css_isp_ref_dmem_state *state,
-       unsigned int size)
+    struct sh_css_isp_ref_dmem_state *state,
+    unsigned int size)
 {
        (void)size;
        assert(MAX_NUM_VIDEO_DELAY_FRAMES >= 2);
index 29cca48b21930b46e3ac245a00d6897b2e9ca98f..4f48a8cfc604f690d484f3a09f22a91c55f66945 100644 (file)
 
 void
 ia_css_ref_config(
-       struct sh_css_isp_ref_isp_config      *to,
-       const struct ia_css_ref_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_ref_isp_config      *to,
+    const struct ia_css_ref_configuration *from,
+    unsigned int size);
 
 void
 ia_css_ref_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame **ref_frames,
-       const uint32_t dvs_frame_delay);
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame **ref_frames,
+    const uint32_t dvs_frame_delay);
 
 void
 ia_css_init_ref_state(
-       struct sh_css_isp_ref_dmem_state *state,
-       unsigned int size);
+    struct sh_css_isp_ref_dmem_state *state,
+    unsigned int size);
 #endif /* __IA_CSS_REF_HOST_H */
index 254835184fe49eb4d35a38b4c00f7541baffbceb..d093565d9eb8c8883c25ba91e1ecb9c067b23a75 100644 (file)
@@ -39,14 +39,14 @@ static unsigned int s3a_raw_bit_depth;
 void
 ia_css_s3a_configure(unsigned int raw_bit_depth)
 {
-  s3a_raw_bit_depth = raw_bit_depth;
+       s3a_raw_bit_depth = raw_bit_depth;
 }
 
 static void
 ia_css_ae_encode(
-       struct sh_css_isp_ae_params *to,
-       const struct ia_css_3a_config *from,
-       unsigned int size)
+    struct sh_css_isp_ae_params *to,
+    const struct ia_css_3a_config *from,
+    unsigned int size)
 {
        (void)size;
        /* coefficients to calculate Y */
@@ -60,25 +60,25 @@ ia_css_ae_encode(
 
 static void
 ia_css_awb_encode(
-       struct sh_css_isp_awb_params *to,
-       const struct ia_css_3a_config *from,
-       unsigned int size)
+    struct sh_css_isp_awb_params *to,
+    const struct ia_css_3a_config *from,
+    unsigned int size)
 {
        (void)size;
        /* AWB level gate */
        to->lg_high_raw =
-               uDIGIT_FITTING(from->awb_lg_high_raw, 16, s3a_raw_bit_depth);
+           uDIGIT_FITTING(from->awb_lg_high_raw, 16, s3a_raw_bit_depth);
        to->lg_low =
-               uDIGIT_FITTING(from->awb_lg_low, 16, SH_CSS_BAYER_BITS);
+           uDIGIT_FITTING(from->awb_lg_low, 16, SH_CSS_BAYER_BITS);
        to->lg_high =
-               uDIGIT_FITTING(from->awb_lg_high, 16, SH_CSS_BAYER_BITS);
+           uDIGIT_FITTING(from->awb_lg_high, 16, SH_CSS_BAYER_BITS);
 }
 
 static void
 ia_css_af_encode(
-       struct sh_css_isp_af_params *to,
-       const struct ia_css_3a_config *from,
-       unsigned int size)
+    struct sh_css_isp_af_params *to,
+    const struct ia_css_3a_config *from,
+    unsigned int size)
 {
        unsigned int i;
        (void)size;
@@ -86,19 +86,19 @@ ia_css_af_encode(
        /* af fir coefficients */
        for (i = 0; i < 7; ++i) {
                to->fir1[i] =
-                 sDIGIT_FITTING(from->af_fir1_coef[i], 15,
-                                SH_CSS_AF_FIR_SHIFT);
+                   sDIGIT_FITTING(from->af_fir1_coef[i], 15,
+                                  SH_CSS_AF_FIR_SHIFT);
                to->fir2[i] =
-                 sDIGIT_FITTING(from->af_fir2_coef[i], 15,
-                                SH_CSS_AF_FIR_SHIFT);
+                   sDIGIT_FITTING(from->af_fir2_coef[i], 15,
+                                  SH_CSS_AF_FIR_SHIFT);
        }
 }
 
 void
 ia_css_s3a_encode(
-       struct sh_css_isp_s3a_params *to,
-       const struct ia_css_3a_config *from,
-       unsigned int size)
+    struct sh_css_isp_s3a_params *to,
+    const struct ia_css_3a_config *from,
+    unsigned int size)
 {
        (void)size;
 
@@ -110,9 +110,9 @@ ia_css_s3a_encode(
 #if 0
 void
 ia_css_process_s3a(
-       unsigned int pipe_id,
-       const struct ia_css_pipeline_stage *stage,
-       struct ia_css_isp_parameters *params)
+    unsigned int pipe_id,
+    const struct ia_css_pipeline_stage *stage,
+    struct ia_css_isp_parameters *params)
 {
        short dmem_offset = stage->binary->info->mem_offsets->dmem.s3a;
 
@@ -120,13 +120,14 @@ ia_css_process_s3a(
 
        if (dmem_offset >= 0) {
                ia_css_s3a_encode((struct sh_css_isp_s3a_params *)
-                               &stage->isp_mem_params[IA_CSS_ISP_DMEM0].address[dmem_offset],
-                               &params->s3a_config);
+                                 &stage->isp_mem_params[IA_CSS_ISP_DMEM0].address[dmem_offset],
+                                 &params->s3a_config);
                ia_css_bh_encode((struct sh_css_isp_bh_params *)
-                               &stage->isp_mem_params[IA_CSS_ISP_DMEM0].address[dmem_offset],
-                               &params->s3a_config);
+                                &stage->isp_mem_params[IA_CSS_ISP_DMEM0].address[dmem_offset],
+                                &params->s3a_config);
                params->isp_params_changed = true;
-               params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM0] = true;
+               params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM0] =
+                   true;
        }
 
        params->isp_params_changed = true;
@@ -136,70 +137,70 @@ ia_css_process_s3a(
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_ae_dump(
-       const struct sh_css_isp_ae_params *ae,
-       unsigned int level)
+    const struct sh_css_isp_ae_params *ae,
+    unsigned int level)
 {
        if (!ae) return;
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ae_y_coef_r", ae->y_coef_r);
+                           "ae_y_coef_r", ae->y_coef_r);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ae_y_coef_g", ae->y_coef_g);
+                           "ae_y_coef_g", ae->y_coef_g);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ae_y_coef_b", ae->y_coef_b);
+                           "ae_y_coef_b", ae->y_coef_b);
 }
 
 void
 ia_css_awb_dump(
-       const struct sh_css_isp_awb_params *awb,
-       unsigned int level)
+    const struct sh_css_isp_awb_params *awb,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "awb_lg_high_raw", awb->lg_high_raw);
+                           "awb_lg_high_raw", awb->lg_high_raw);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "awb_lg_low", awb->lg_low);
+                           "awb_lg_low", awb->lg_low);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "awb_lg_high", awb->lg_high);
+                           "awb_lg_high", awb->lg_high);
 }
 
 void
 ia_css_af_dump(
-       const struct sh_css_isp_af_params *af,
-       unsigned int level)
+    const struct sh_css_isp_af_params *af,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir1[0]", af->fir1[0]);
+                           "af_fir1[0]", af->fir1[0]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir1[1]", af->fir1[1]);
+                           "af_fir1[1]", af->fir1[1]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir1[2]", af->fir1[2]);
+                           "af_fir1[2]", af->fir1[2]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir1[3]", af->fir1[3]);
+                           "af_fir1[3]", af->fir1[3]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir1[4]", af->fir1[4]);
+                           "af_fir1[4]", af->fir1[4]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir1[5]", af->fir1[5]);
+                           "af_fir1[5]", af->fir1[5]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir1[6]", af->fir1[6]);
+                           "af_fir1[6]", af->fir1[6]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir2[0]", af->fir2[0]);
+                           "af_fir2[0]", af->fir2[0]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir2[1]", af->fir2[1]);
+                           "af_fir2[1]", af->fir2[1]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir2[2]", af->fir2[2]);
+                           "af_fir2[2]", af->fir2[2]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir2[3]", af->fir2[3]);
+                           "af_fir2[3]", af->fir2[3]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir2[4]", af->fir2[4]);
+                           "af_fir2[4]", af->fir2[4]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir2[5]", af->fir2[5]);
+                           "af_fir2[5]", af->fir2[5]);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "af_fir2[6]", af->fir2[6]);
+                           "af_fir2[6]", af->fir2[6]);
 }
 
 void
 ia_css_s3a_dump(
-       const struct sh_css_isp_s3a_params *s3a,
-       unsigned int level)
+    const struct sh_css_isp_s3a_params *s3a,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level, "S3A Support:\n");
        ia_css_ae_dump(&s3a->ae, level);
@@ -209,21 +210,21 @@ ia_css_s3a_dump(
 
 void
 ia_css_s3a_debug_dtrace(
-       const struct ia_css_3a_config *config,
-       unsigned int level)
+    const struct ia_css_3a_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.ae_y_coef_r=%d, config.ae_y_coef_g=%d, config.ae_y_coef_b=%d, config.awb_lg_high_raw=%d, config.awb_lg_low=%d, config.awb_lg_high=%d\n",
-               config->ae_y_coef_r, config->ae_y_coef_g,
-               config->ae_y_coef_b, config->awb_lg_high_raw,
-               config->awb_lg_low, config->awb_lg_high);
+                           "config.ae_y_coef_r=%d, config.ae_y_coef_g=%d, config.ae_y_coef_b=%d, config.awb_lg_high_raw=%d, config.awb_lg_low=%d, config.awb_lg_high=%d\n",
+                           config->ae_y_coef_r, config->ae_y_coef_g,
+                           config->ae_y_coef_b, config->awb_lg_high_raw,
+                           config->awb_lg_low, config->awb_lg_high);
 }
 #endif
 
 void
 ia_css_s3a_hmem_decode(
-       struct ia_css_3a_statistics *host_stats,
-       const struct ia_css_bh_table *hmem_buf)
+    struct ia_css_3a_statistics *host_stats,
+    const struct ia_css_bh_table *hmem_buf)
 {
 #if defined(HAS_NO_HMEM)
        (void)host_stats;
@@ -241,8 +242,8 @@ ia_css_s3a_hmem_decode(
        assert(hmem_buf);
 
        count_for_3a = host_stats->grid.width * host_stats->grid.height
-           * host_stats->grid.bqs_per_grid_cell
-           * host_stats->grid.bqs_per_grid_cell;
+                      * host_stats->grid.bqs_per_grid_cell
+                      * host_stats->grid.bqs_per_grid_cell;
 
        out_ptr = host_stats->rgby_data;
 
@@ -294,8 +295,8 @@ ia_css_s3a_hmem_decode(
 
 void
 ia_css_s3a_dmem_decode(
-       struct ia_css_3a_statistics *host_stats,
-       const struct ia_css_3a_output *isp_stats)
+    struct ia_css_3a_statistics *host_stats,
+    const struct ia_css_3a_output *isp_stats)
 {
        int isp_width, host_width, height, i;
        struct ia_css_3a_output *host_ptr;
@@ -330,9 +331,9 @@ merge_hi_lo_14(unsigned short hi, unsigned short lo)
 
 void
 ia_css_s3a_vmem_decode(
-       struct ia_css_3a_statistics *host_stats,
-       const u16 *isp_stats_hi,
-       const uint16_t *isp_stats_lo)
+    struct ia_css_3a_statistics *host_stats,
+    const u16 *isp_stats_hi,
+    const uint16_t *isp_stats_lo)
 {
        int out_width, out_height, chunk, rest, kmax, y, x, k, elm_start, elm, ofs;
        const u16 *hi, *lo;
@@ -362,21 +363,21 @@ ia_css_s3a_vmem_decode(
                        elm = elm_start + x * sizeof(*output) / sizeof(int32_t);
                        for (k = 0; k < kmax; k++, elm++) {
                                output[ofs + k].ae_y    = merge_hi_lo_14(
-                                   hi[elm + chunk * 0], lo[elm + chunk * 0]);
+                                                             hi[elm + chunk * 0], lo[elm + chunk * 0]);
                                output[ofs + k].awb_cnt = merge_hi_lo_14(
-                                   hi[elm + chunk * 1], lo[elm + chunk * 1]);
+                                                             hi[elm + chunk * 1], lo[elm + chunk * 1]);
                                output[ofs + k].awb_gr  = merge_hi_lo_14(
-                                   hi[elm + chunk * 2], lo[elm + chunk * 2]);
+                                                             hi[elm + chunk * 2], lo[elm + chunk * 2]);
                                output[ofs + k].awb_r   = merge_hi_lo_14(
-                                   hi[elm + chunk * 3], lo[elm + chunk * 3]);
+                                                             hi[elm + chunk * 3], lo[elm + chunk * 3]);
                                output[ofs + k].awb_b   = merge_hi_lo_14(
-                                   hi[elm + chunk * 4], lo[elm + chunk * 4]);
+                                                             hi[elm + chunk * 4], lo[elm + chunk * 4]);
                                output[ofs + k].awb_gb  = merge_hi_lo_14(
-                                   hi[elm + chunk * 5], lo[elm + chunk * 5]);
+                                                             hi[elm + chunk * 5], lo[elm + chunk * 5]);
                                output[ofs + k].af_hpf1 = merge_hi_lo_14(
-                                   hi[elm + chunk * 6], lo[elm + chunk * 6]);
+                                                             hi[elm + chunk * 6], lo[elm + chunk * 6]);
                                output[ofs + k].af_hpf2 = merge_hi_lo_14(
-                                   hi[elm + chunk * 7], lo[elm + chunk * 7]);
+                                                             hi[elm + chunk * 7], lo[elm + chunk * 7]);
                        }
                        x += chunk;
                        rest -= chunk;
index 1dfe3262631836b120700c5e2836674c7454a7d0..13d19dab1f1d4f070ae928e6012aa40e80159f0c 100644 (file)
@@ -23,55 +23,55 @@ extern const struct ia_css_3a_config default_3a_config;
 
 void
 ia_css_s3a_configure(
-       unsigned int raw_bit_depth);
+    unsigned int raw_bit_depth);
 
 void
 ia_css_s3a_encode(
-       struct sh_css_isp_s3a_params *to,
-       const struct ia_css_3a_config *from,
-       unsigned int size);
+    struct sh_css_isp_s3a_params *to,
+    const struct ia_css_3a_config *from,
+    unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_ae_dump(
-       const struct sh_css_isp_ae_params *ae,
-       unsigned int level);
+    const struct sh_css_isp_ae_params *ae,
+    unsigned int level);
 
 void
 ia_css_awb_dump(
-       const struct sh_css_isp_awb_params *awb,
-       unsigned int level);
+    const struct sh_css_isp_awb_params *awb,
+    unsigned int level);
 
 void
 ia_css_af_dump(
-       const struct sh_css_isp_af_params *af,
-       unsigned int level);
+    const struct sh_css_isp_af_params *af,
+    unsigned int level);
 
 void
 ia_css_s3a_dump(
-       const struct sh_css_isp_s3a_params *s3a,
-       unsigned int level);
+    const struct sh_css_isp_s3a_params *s3a,
+    unsigned int level);
 
 void
 ia_css_s3a_debug_dtrace(
-       const struct ia_css_3a_config *config,
-       unsigned int level);
+    const struct ia_css_3a_config *config,
+    unsigned int level);
 #endif
 
 void
 ia_css_s3a_hmem_decode(
-       struct ia_css_3a_statistics *host_stats,
-       const struct ia_css_bh_table *hmem_buf);
+    struct ia_css_3a_statistics *host_stats,
+    const struct ia_css_bh_table *hmem_buf);
 
 void
 ia_css_s3a_dmem_decode(
-       struct ia_css_3a_statistics *host_stats,
-       const struct ia_css_3a_output *isp_stats);
+    struct ia_css_3a_statistics *host_stats,
+    const struct ia_css_3a_output *isp_stats);
 
 void
 ia_css_s3a_vmem_decode(
-       struct ia_css_3a_statistics *host_stats,
-       const u16 *isp_stats_hi,
-       const uint16_t *isp_stats_lo);
+    struct ia_css_3a_statistics *host_stats,
+    const u16 *isp_stats_hi,
+    const uint16_t *isp_stats_lo);
 
 #endif /* __IA_CSS_S3A_HOST_H */
index be8e83ec215c3e2f7ab16428c6d948ad2b5728fb..5a5b277ca0eb480b9f7163768243b2f3183e12ed 100644 (file)
@@ -40,11 +40,13 @@ struct ia_css_3a_grid_info {
 #if defined(SYSTEM_css_skycam_c0_system)
        u32 ae_enable;                                  /** ae enabled in binary,
                                                                   0:disabled, 1:enabled */
-       struct ae_public_config_grid_config     ae_grd_info;    /** see description in ae_public.h*/
+       struct ae_public_config_grid_config
+               ae_grd_info;    /** see description in ae_public.h*/
 
        u32 awb_enable;                                 /** awb enabled in binary,
                                                                   0:disabled, 1:enabled */
-       struct awb_public_config_grid_config    awb_grd_info;   /** see description in awb_public.h*/
+       struct awb_public_config_grid_config
+               awb_grd_info;   /** see description in awb_public.h*/
 
        u32 af_enable;                                  /** af enabled in binary,
                                                                   0:disabled, 1:enabled */
@@ -52,7 +54,8 @@ struct ia_css_3a_grid_info {
 
        u32 awb_fr_enable;                                      /** awb_fr enabled in binary,
                                                                   0:disabled, 1:enabled */
-       struct awb_fr_public_grid_config        awb_fr_grd_info;/** see description in awb_fr_public.h*/
+       struct awb_fr_public_grid_config
+               awb_fr_grd_info;/** see description in awb_fr_public.h*/
 
        u32 elem_bit_depth;    /** TODO:Taken from BYT  - need input from AIQ
                                        if needed for SKC
@@ -189,8 +192,10 @@ struct ia_css_3a_output {
  *  using the provided configuration (ia_css_3a_config).
  */
 struct ia_css_3a_statistics {
-       struct ia_css_3a_grid_info    grid;     /** grid info contains the dimensions of the 3A grid */
-       struct ia_css_3a_output      *data;     /** the pointer to 3a_output[grid.width * grid.height]
+       struct ia_css_3a_grid_info
+               grid;   /** grid info contains the dimensions of the 3A grid */
+       struct ia_css_3a_output
+               *data;  /** the pointer to 3a_output[grid.width * grid.height]
                                                     containing the 3A statistics */
        struct ia_css_3a_rgby_output *rgby_data;/** the pointer to 3a_rgby_output[256]
                                                     containing the histogram */
index 8ec9296300ca04ac42fe072fc90a96527fa4ff57..cfec188681e2e6bba55648361a96e5598e5542eb 100644 (file)
@@ -27,9 +27,9 @@
 
 void
 ia_css_sc_encode(
-       struct sh_css_isp_sc_params *to,
-       struct ia_css_shading_table **from,
-       unsigned int size)
+    struct sh_css_isp_sc_params *to,
+    struct ia_css_shading_table **from,
+    unsigned int size)
 {
        (void)size;
        to->gain_shift = (*from)->fraction_bits;
@@ -37,21 +37,21 @@ ia_css_sc_encode(
 
 void
 ia_css_sc_dump(
-       const struct sh_css_isp_sc_params *sc,
-       unsigned int level)
+    const struct sh_css_isp_sc_params *sc,
+    unsigned int level)
 {
        if (!sc) return;
        ia_css_debug_dtrace(level, "Shading Correction:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "sc_gain_shift", sc->gain_shift);
+                           "sc_gain_shift", sc->gain_shift);
 }
 
 #ifdef ISP2401
 void
 ia_css_sc_config(
-       struct sh_css_isp_sc_isp_config *to,
-       const struct ia_css_sc_configuration *from,
-       unsigned int size)
+    struct sh_css_isp_sc_isp_config *to,
+    const struct ia_css_sc_configuration *from,
+    unsigned int size)
 {
        u32 internal_org_x_bqs = from->internal_frame_origin_x_bqs_on_sctbl;
        u32 internal_org_y_bqs = from->internal_frame_origin_y_bqs_on_sctbl;
@@ -72,13 +72,14 @@ ia_css_sc_config(
 
 void
 ia_css_sc_configure(
-       const struct ia_css_binary *binary,
-       u32 internal_frame_origin_x_bqs_on_sctbl,
-       uint32_t internal_frame_origin_y_bqs_on_sctbl)
+    const struct ia_css_binary *binary,
+    u32 internal_frame_origin_x_bqs_on_sctbl,
+    uint32_t internal_frame_origin_y_bqs_on_sctbl)
 {
        const struct ia_css_sc_configuration config = {
                internal_frame_origin_x_bqs_on_sctbl,
-               internal_frame_origin_y_bqs_on_sctbl };
+               internal_frame_origin_y_bqs_on_sctbl
+       };
 
        ia_css_configure_sc(binary, &config);
 }
@@ -93,39 +94,39 @@ ia_css_sc_configure(
    for the ia_css_shading_settings structure. (michie) */
 void
 sh_css_get_shading_settings(const struct ia_css_isp_parameters *params,
-                       struct ia_css_shading_settings *settings)
+                           struct ia_css_shading_settings *settings)
 {
        if (!settings)
                return;
        assert(params);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_get_shading_settings() enter: settings=%p\n", settings);
+                           "ia_css_get_shading_settings() enter: settings=%p\n", settings);
 
        *settings = params->shading_settings;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_get_shading_settings() leave: settings.enable_shading_table_conversion=%d\n",
-               settings->enable_shading_table_conversion);
+                           "ia_css_get_shading_settings() leave: settings.enable_shading_table_conversion=%d\n",
+                           settings->enable_shading_table_conversion);
 }
 
 void
 sh_css_set_shading_settings(struct ia_css_isp_parameters *params,
-                       const struct ia_css_shading_settings *settings)
+                           const struct ia_css_shading_settings *settings)
 {
        if (!settings)
                return;
        assert(params);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_set_shading_settings() enter: settings.enable_shading_table_conversion=%d\n",
-               settings->enable_shading_table_conversion);
+                           "ia_css_set_shading_settings() enter: settings.enable_shading_table_conversion=%d\n",
+                           settings->enable_shading_table_conversion);
 
        params->shading_settings = *settings;
        params->shading_settings_changed = true;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_set_shading_settings() leave: return_void\n");
+                           "ia_css_set_shading_settings() leave: return_void\n");
 }
 
 /* ------ deprecated(bz675) : to ------ */
index 6f25401c173f8cbfa3fbe7cb1cc3bb21191c9378..4f3cb34d45130b8a4175cbae25641b864d522742 100644 (file)
 
 void
 ia_css_sc_encode(
-       struct sh_css_isp_sc_params *to,
-       struct ia_css_shading_table **from,
-       unsigned int size);
+    struct sh_css_isp_sc_params *to,
+    struct ia_css_shading_table **from,
+    unsigned int size);
 
 void
 ia_css_sc_dump(
-       const struct sh_css_isp_sc_params *sc,
-       unsigned int level);
+    const struct sh_css_isp_sc_params *sc,
+    unsigned int level);
 
 #ifdef ISP2401
 /* @brief Configure the shading correction.
@@ -41,9 +41,9 @@ ia_css_sc_dump(
  */
 void
 ia_css_sc_config(
-       struct sh_css_isp_sc_isp_config *to,
-       const struct ia_css_sc_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_sc_isp_config *to,
+    const struct ia_css_sc_configuration *from,
+    unsigned int size);
 
 /* @brief Configure the shading correction.
  * @param[in]  binary  The binary, which has the shading correction.
@@ -59,19 +59,19 @@ ia_css_sc_config(
  */
 void
 ia_css_sc_configure(
-       const struct ia_css_binary *binary,
-       u32 internal_frame_origin_x_bqs_on_sctbl,
-       uint32_t internal_frame_origin_y_bqs_on_sctbl);
+    const struct ia_css_binary *binary,
+    u32 internal_frame_origin_x_bqs_on_sctbl,
+    uint32_t internal_frame_origin_y_bqs_on_sctbl);
 
 #endif
 /* ------ deprecated(bz675) : from ------ */
 void
 sh_css_get_shading_settings(const struct ia_css_isp_parameters *params,
-                       struct ia_css_shading_settings *settings);
+                           struct ia_css_shading_settings *settings);
 
 void
 sh_css_set_shading_settings(struct ia_css_isp_parameters *params,
-                       const struct ia_css_shading_settings *settings);
+                           const struct ia_css_shading_settings *settings);
 /* ------ deprecated(bz675) : to ------ */
 
 #endif /* __IA_CSS_SC_HOST_H */
index 8cd4f4eccfbc3edcb526fdfbae35ff5eda757eec..69e7ec7525c87915b0e685ac2a0258aea9ce9ee2 100644 (file)
@@ -65,7 +65,7 @@ enum ia_css_sc_color {
 struct ia_css_shading_table {
        u32 enable; /** Set to false for no shading correction.
                          The data field can be NULL when enable == true */
-/* ------ deprecated(bz675) : from ------ */
+       /* ------ deprecated(bz675) : from ------ */
        u32 sensor_width;  /** Native sensor width in pixels. */
        u32 sensor_height; /** Native sensor height in lines.
                When shading_settings.enable_shading_table_conversion is set
@@ -73,7 +73,7 @@ struct ia_css_shading_table {
                These are used only in the legacy shading table conversion
                in the css, when shading_settings.
                enable_shading_table_conversion is set as 1. */
-/* ------ deprecated(bz675) : to ------ */
+       /* ------ deprecated(bz675) : to ------ */
        u32 width;  /** Number of data points per line per color.
                                u8.0, [0,81] */
        u32 height; /** Number of lines of data points per color.
@@ -126,10 +126,10 @@ struct ia_css_shading_settings {
 struct ia_css_sc_configuration {
        u32 internal_frame_origin_x_bqs_on_sctbl; /** Origin X (in bqs) of internal frame on shading table. */
        u32 internal_frame_origin_y_bqs_on_sctbl; /** Origin Y (in bqs) of internal frame on shading table. */
-                                               /** NOTE: bqs = size in BQ(Bayer Quad) unit.
-                                                       1BQ means {Gr,R,B,Gb}(2x2 pixels).
-                                                       Horizontal 1 bqs corresponds to horizontal 2 pixels.
-                                                       Vertical 1 bqs corresponds to vertical 2 pixels. */
+       /** NOTE: bqs = size in BQ(Bayer Quad) unit.
+               1BQ means {Gr,R,B,Gb}(2x2 pixels).
+               Horizontal 1 bqs corresponds to horizontal 2 pixels.
+               Vertical 1 bqs corresponds to vertical 2 pixels. */
 };
 #endif
 
index d5be09e851d2c7dfb5a3f30bef679692b2488dba..c03936fb05508bd4714b4fd9de09864d9ba1d35d 100644 (file)
 
 /* Array cannot be 2-dimensional, since driver ddr allocation does not know stride */
 struct sh_css_isp_sdis_hori_proj_tbl {
-  s32 tbl[ISP_DVS_NUM_COEF_TYPES * ISP_MAX_SDIS_HOR_PROJ_NUM_ISP];
+       s32 tbl[ISP_DVS_NUM_COEF_TYPES * ISP_MAX_SDIS_HOR_PROJ_NUM_ISP];
 #if DVS2_PROJ_MARGIN > 0
-  s32 margin[DVS2_PROJ_MARGIN];
+       s32 margin[DVS2_PROJ_MARGIN];
 #endif
 };
 
 struct sh_css_isp_sdis_vert_proj_tbl {
-  s32 tbl[ISP_DVS_NUM_COEF_TYPES * ISP_MAX_SDIS_VER_PROJ_NUM_ISP];
+       s32 tbl[ISP_DVS_NUM_COEF_TYPES * ISP_MAX_SDIS_VER_PROJ_NUM_ISP];
 #if DVS2_PROJ_MARGIN > 0
-  s32 margin[DVS2_PROJ_MARGIN];
+       s32 margin[DVS2_PROJ_MARGIN];
 #endif
 };
 
 struct sh_css_isp_sdis_hori_coef_tbl {
-  VMEM_ARRAY(tbl[ISP_DVS_NUM_COEF_TYPES], ISP_MAX_SDIS_HOR_COEF_NUM_VECS * ISP_NWAY);
+       VMEM_ARRAY(tbl[ISP_DVS_NUM_COEF_TYPES],
+                  ISP_MAX_SDIS_HOR_COEF_NUM_VECS *ISP_NWAY);
 };
 
 struct sh_css_isp_sdis_vert_coef_tbl {
-  VMEM_ARRAY(tbl[ISP_DVS_NUM_COEF_TYPES], ISP_MAX_SDIS_VER_COEF_NUM_VECS * ISP_NWAY);
+       VMEM_ARRAY(tbl[ISP_DVS_NUM_COEF_TYPES],
+                  ISP_MAX_SDIS_VER_COEF_NUM_VECS *ISP_NWAY);
 };
 
 #endif /* defined(__ISP) || defined (MK_FIRMWARE) */
@@ -87,10 +89,10 @@ struct sh_css_isp_sdis_vert_coef_tbl {
 
 #ifndef PIPE_GENERATION
 struct s_sdis_config {
-  unsigned int horicoef_vectors;
-  unsigned int vertcoef_vectors;
-  unsigned int horiproj_num;
-  unsigned int vertproj_num;
+       unsigned int horicoef_vectors;
+       unsigned int vertcoef_vectors;
+       unsigned int horiproj_num;
+       unsigned int vertproj_num;
 };
 
 extern struct s_sdis_config sdis_config;
index c72b36a0ca18cdaaa90b31d6a5f013df73c9edef..e257841bba6717ac4aeeff0e5adc94956c1587bd 100644 (file)
@@ -189,7 +189,8 @@ struct ia_css_dvs_stat_grid_info {
        /** DVS statistics global configuration (kappa, match, binning) */
        struct dvs_stat_public_dvs_grd_cfg       grd_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS];
        /** DVS statistics grid configuration (blocks and grids) */
-       struct dvs_stat_public_dvs_level_fe_roi_cfg fe_roi_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS];
+       struct dvs_stat_public_dvs_level_fe_roi_cfg
+               fe_roi_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS];
        /** DVS statistics FE ROI (region of interest) configuration */
 };
 
index 22293829ad9bf48db36f2f67738a980c0c7960db..418481e016f7624e8663d404d6921dd06aa2c07e 100644 (file)
@@ -26,7 +26,8 @@ const struct ia_css_dvs_coefficients default_sdis_config = {
 };
 
 static void
-fill_row(short *private, const short *public, unsigned int width, unsigned int padding)
+fill_row(short *private, const short *public, unsigned int width,
+        unsigned int padding)
 {
        assert((int)width >= 0);
        assert((int)padding >= 0);
@@ -35,15 +36,17 @@ fill_row(short *private, const short *public, unsigned int width, unsigned int p
 }
 
 void ia_css_sdis_horicoef_vmem_encode(
-       struct sh_css_isp_sdis_hori_coef_tbl *to,
-       const struct ia_css_dvs_coefficients *from,
-       unsigned int size)
+    struct sh_css_isp_sdis_hori_coef_tbl *to,
+    const struct ia_css_dvs_coefficients *from,
+    unsigned int size)
 {
-       unsigned int aligned_width = from->grid.aligned_width * from->grid.bqs_per_grid_cell;
+       unsigned int aligned_width = from->grid.aligned_width *
+                                    from->grid.bqs_per_grid_cell;
        unsigned int width         = from->grid.num_hor_coefs;
        int      padding       = aligned_width - width;
        unsigned int stride        = size / IA_CSS_DVS_NUM_COEF_TYPES / sizeof(short);
-       unsigned int total_bytes   = aligned_width * IA_CSS_DVS_NUM_COEF_TYPES * sizeof(short);
+       unsigned int total_bytes   = aligned_width * IA_CSS_DVS_NUM_COEF_TYPES * sizeof(
+                                        short);
        short   *public        = from->hor_coefs;
        short   *private       = (short *)to;
        unsigned int type;
@@ -51,7 +54,8 @@ void ia_css_sdis_horicoef_vmem_encode(
        /* Copy the table, add padding */
        assert(padding >= 0);
        assert(total_bytes <= size);
-       assert(size % (IA_CSS_DVS_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(short)) == 0);
+       assert(size % (IA_CSS_DVS_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(
+                          short)) == 0);
 
        for (type = 0; type < IA_CSS_DVS_NUM_COEF_TYPES; type++) {
                fill_row(&private[type * stride], &public[type * width], width, padding);
@@ -59,15 +63,17 @@ void ia_css_sdis_horicoef_vmem_encode(
 }
 
 void ia_css_sdis_vertcoef_vmem_encode(
-       struct sh_css_isp_sdis_vert_coef_tbl *to,
-       const struct ia_css_dvs_coefficients *from,
-       unsigned int size)
+    struct sh_css_isp_sdis_vert_coef_tbl *to,
+    const struct ia_css_dvs_coefficients *from,
+    unsigned int size)
 {
-       unsigned int aligned_height = from->grid.aligned_height * from->grid.bqs_per_grid_cell;
+       unsigned int aligned_height = from->grid.aligned_height *
+                                     from->grid.bqs_per_grid_cell;
        unsigned int height         = from->grid.num_ver_coefs;
        int      padding        = aligned_height - height;
        unsigned int stride         = size / IA_CSS_DVS_NUM_COEF_TYPES / sizeof(short);
-       unsigned int total_bytes    = aligned_height * IA_CSS_DVS_NUM_COEF_TYPES * sizeof(short);
+       unsigned int total_bytes    = aligned_height * IA_CSS_DVS_NUM_COEF_TYPES *
+                                     sizeof(short);
        short   *public         = from->ver_coefs;
        short   *private        = (short *)to;
        unsigned int type;
@@ -75,7 +81,8 @@ void ia_css_sdis_vertcoef_vmem_encode(
        /* Copy the table, add padding */
        assert(padding >= 0);
        assert(total_bytes <= size);
-       assert(size % (IA_CSS_DVS_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(short)) == 0);
+       assert(size % (IA_CSS_DVS_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(
+                          short)) == 0);
 
        for (type = 0; type < IA_CSS_DVS_NUM_COEF_TYPES; type++) {
                fill_row(&private[type * stride], &public[type * height], height, padding);
@@ -83,9 +90,9 @@ void ia_css_sdis_vertcoef_vmem_encode(
 }
 
 void ia_css_sdis_horiproj_encode(
-       struct sh_css_isp_sdis_hori_proj_tbl *to,
-       const struct ia_css_dvs_coefficients *from,
-       unsigned int size)
+    struct sh_css_isp_sdis_hori_proj_tbl *to,
+    const struct ia_css_dvs_coefficients *from,
+    unsigned int size)
 {
        (void)to;
        (void)from;
@@ -93,9 +100,9 @@ void ia_css_sdis_horiproj_encode(
 }
 
 void ia_css_sdis_vertproj_encode(
-       struct sh_css_isp_sdis_vert_proj_tbl *to,
-       const struct ia_css_dvs_coefficients *from,
-       unsigned int size)
+    struct sh_css_isp_sdis_vert_proj_tbl *to,
+    const struct ia_css_dvs_coefficients *from,
+    unsigned int size)
 {
        (void)to;
        (void)from;
@@ -103,9 +110,9 @@ void ia_css_sdis_vertproj_encode(
 }
 
 void ia_css_get_isp_dis_coefficients(
-       struct ia_css_stream *stream,
-       short *horizontal_coefficients,
-       short *vertical_coefficients)
+    struct ia_css_stream *stream,
+    short *horizontal_coefficients,
+    short *vertical_coefficients)
 {
        struct ia_css_isp_parameters *params;
        unsigned int hor_num_isp, ver_num_isp;
@@ -132,11 +139,13 @@ void ia_css_get_isp_dis_coefficients(
 
        for (i = 0; i < IA_CSS_DVS_NUM_COEF_TYPES; i++) {
                fill_row(&horizontal_coefficients[i * hor_num_isp],
-                        &params->dvs_coefs.hor_coefs[i * hor_num_3a], hor_num_3a, hor_num_isp - hor_num_3a);
+                        &params->dvs_coefs.hor_coefs[i * hor_num_3a], hor_num_3a,
+                        hor_num_isp - hor_num_3a);
        }
        for (i = 0; i < SH_CSS_DIS_VER_NUM_COEF_TYPES(dvs_binary); i++) {
                fill_row(&vertical_coefficients[i * ver_num_isp],
-                        &params->dvs_coefs.ver_coefs[i * ver_num_3a], ver_num_3a, ver_num_isp - ver_num_3a);
+                        &params->dvs_coefs.ver_coefs[i * ver_num_3a], ver_num_3a,
+                        ver_num_isp - ver_num_3a);
        }
 
        IA_CSS_LEAVE("void");
@@ -144,7 +153,7 @@ void ia_css_get_isp_dis_coefficients(
 
 size_t
 ia_css_sdis_hor_coef_tbl_bytes(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
        if (binary->info->sp.pipeline.isp_pipe_version == 1)
                return sizeof(short) * IA_CSS_DVS_NUM_COEF_TYPES  * binary->dis.coef.pad.width;
@@ -154,19 +163,20 @@ ia_css_sdis_hor_coef_tbl_bytes(
 
 size_t
 ia_css_sdis_ver_coef_tbl_bytes(
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 {
-       return sizeof(short) * SH_CSS_DIS_VER_NUM_COEF_TYPES(binary) * binary->dis.coef.pad.height;
+       return sizeof(short) * SH_CSS_DIS_VER_NUM_COEF_TYPES(binary) *
+              binary->dis.coef.pad.height;
 }
 
 void
 ia_css_sdis_init_info(
-       struct ia_css_sdis_info *dis,
-       unsigned int sc_3a_dis_width,
-       unsigned int sc_3a_dis_padded_width,
-       unsigned int sc_3a_dis_height,
-       unsigned int isp_pipe_version,
-       unsigned int enabled)
+    struct ia_css_sdis_info *dis,
+    unsigned int sc_3a_dis_width,
+    unsigned int sc_3a_dis_padded_width,
+    unsigned int sc_3a_dis_height,
+    unsigned int isp_pipe_version,
+    unsigned int enabled)
 {
        if (!enabled) {
                *dis = (struct ia_css_sdis_info) { };
@@ -176,47 +186,49 @@ ia_css_sdis_init_info(
        dis->deci_factor_log2 = SH_CSS_DIS_DECI_FACTOR_LOG2;
 
        dis->grid.dim.width  =
-                       _ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
+           _ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
        dis->grid.dim.height =
-                       _ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
+           _ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
        dis->grid.pad.width  =
-                       CEIL_SHIFT(_ISP_BQS(sc_3a_dis_padded_width), SH_CSS_DIS_DECI_FACTOR_LOG2);
+           CEIL_SHIFT(_ISP_BQS(sc_3a_dis_padded_width), SH_CSS_DIS_DECI_FACTOR_LOG2);
        dis->grid.pad.height =
-                       CEIL_SHIFT(_ISP_BQS(sc_3a_dis_height), SH_CSS_DIS_DECI_FACTOR_LOG2);
+           CEIL_SHIFT(_ISP_BQS(sc_3a_dis_height), SH_CSS_DIS_DECI_FACTOR_LOG2);
 
        dis->coef.dim.width  =
-                       (_ISP_BQS(sc_3a_dis_width)  >> SH_CSS_DIS_DECI_FACTOR_LOG2) << SH_CSS_DIS_DECI_FACTOR_LOG2;
+           (_ISP_BQS(sc_3a_dis_width)  >> SH_CSS_DIS_DECI_FACTOR_LOG2) <<
+           SH_CSS_DIS_DECI_FACTOR_LOG2;
        dis->coef.dim.height =
-                       (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2) << SH_CSS_DIS_DECI_FACTOR_LOG2;
+           (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2) <<
+           SH_CSS_DIS_DECI_FACTOR_LOG2;
        dis->coef.pad.width  =
-                       __ISP_SDIS_HOR_COEF_NUM_VECS(sc_3a_dis_padded_width) * ISP_VEC_NELEMS;
+           __ISP_SDIS_HOR_COEF_NUM_VECS(sc_3a_dis_padded_width) * ISP_VEC_NELEMS;
        dis->coef.pad.height =
-                       __ISP_SDIS_VER_COEF_NUM_VECS(sc_3a_dis_height) * ISP_VEC_NELEMS;
+           __ISP_SDIS_VER_COEF_NUM_VECS(sc_3a_dis_height) * ISP_VEC_NELEMS;
        if (isp_pipe_version == 1) {
                dis->proj.dim.width  =
-                       _ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
+                   _ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
                dis->proj.dim.height =
-                       _ISP_BQS(sc_3a_dis_width)  >> SH_CSS_DIS_DECI_FACTOR_LOG2;
+                   _ISP_BQS(sc_3a_dis_width)  >> SH_CSS_DIS_DECI_FACTOR_LOG2;
        } else {
                dis->proj.dim.width  =
-                       (_ISP_BQS(sc_3a_dis_width)  >> SH_CSS_DIS_DECI_FACTOR_LOG2) *
-                       (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2);
+                   (_ISP_BQS(sc_3a_dis_width)  >> SH_CSS_DIS_DECI_FACTOR_LOG2) *
+                   (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2);
                dis->proj.dim.height =
-                       (_ISP_BQS(sc_3a_dis_width)  >> SH_CSS_DIS_DECI_FACTOR_LOG2) *
-                       (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2);
+                   (_ISP_BQS(sc_3a_dis_width)  >> SH_CSS_DIS_DECI_FACTOR_LOG2) *
+                   (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2);
        }
        dis->proj.pad.width  =
-                       __ISP_SDIS_HOR_PROJ_NUM_ISP(sc_3a_dis_padded_width,
-                               sc_3a_dis_height,
-                               SH_CSS_DIS_DECI_FACTOR_LOG2,
-                               isp_pipe_version);
+           __ISP_SDIS_HOR_PROJ_NUM_ISP(sc_3a_dis_padded_width,
+                                       sc_3a_dis_height,
+                                       SH_CSS_DIS_DECI_FACTOR_LOG2,
+                                       isp_pipe_version);
        dis->proj.pad.height =
-                       __ISP_SDIS_VER_PROJ_NUM_ISP(sc_3a_dis_padded_width,
-                               SH_CSS_DIS_DECI_FACTOR_LOG2);
+           __ISP_SDIS_VER_PROJ_NUM_ISP(sc_3a_dis_padded_width,
+                                       SH_CSS_DIS_DECI_FACTOR_LOG2);
 }
 
 void ia_css_sdis_clear_coefficients(
-       struct ia_css_dvs_coefficients *dvs_coefs)
+    struct ia_css_dvs_coefficients *dvs_coefs)
 {
        dvs_coefs->hor_coefs = NULL;
        dvs_coefs->ver_coefs = NULL;
@@ -224,9 +236,8 @@ void ia_css_sdis_clear_coefficients(
 
 enum ia_css_err
 ia_css_get_dvs_statistics(
-       struct ia_css_dvs_statistics           *host_stats,
-       const struct ia_css_isp_dvs_statistics *isp_stats)
-{
+    struct ia_css_dvs_statistics              *host_stats,
+    const struct ia_css_isp_dvs_statistics *isp_stats) {
        struct ia_css_isp_dvs_statistics_map *map;
        enum ia_css_err ret = IA_CSS_SUCCESS;
 
@@ -236,11 +247,13 @@ ia_css_get_dvs_statistics(
        assert(isp_stats);
 
        map = ia_css_isp_dvs_statistics_map_allocate(isp_stats, NULL);
-       if (map) {
+       if (map)
+       {
                mmgr_load(isp_stats->data_ptr, map->data_ptr, isp_stats->size);
                ia_css_translate_dvs_statistics(host_stats, map);
                ia_css_isp_dvs_statistics_map_free(map);
-       } else {
+       } else
+       {
                IA_CSS_ERROR("out of memory");
                ret = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
        }
@@ -251,8 +264,8 @@ ia_css_get_dvs_statistics(
 
 void
 ia_css_translate_dvs_statistics(
-       struct ia_css_dvs_statistics               *host_stats,
-       const struct ia_css_isp_dvs_statistics_map *isp_stats)
+    struct ia_css_dvs_statistics               *host_stats,
+    const struct ia_css_isp_dvs_statistics_map *isp_stats)
 {
        unsigned int hor_num_isp, ver_num_isp, hor_num_dvs, ver_num_dvs, i;
        s32 *hor_ptr_dvs, *ver_ptr_dvs, *hor_ptr_isp, *ver_ptr_isp;
@@ -292,7 +305,7 @@ ia_css_translate_dvs_statistics(
 
 struct ia_css_isp_dvs_statistics *
 ia_css_isp_dvs_statistics_allocate(
-       const struct ia_css_dvs_grid_info *grid)
+    const struct ia_css_dvs_grid_info *grid)
 {
        struct ia_css_isp_dvs_statistics *me;
        int hor_size, ver_size;
@@ -308,9 +321,11 @@ ia_css_isp_dvs_statistics_allocate(
        if (!me)
                goto err;
 
-       hor_size = CEIL_MUL(sizeof(int) * IA_CSS_DVS_NUM_COEF_TYPES * grid->aligned_height,
+       hor_size = CEIL_MUL(sizeof(int) * IA_CSS_DVS_NUM_COEF_TYPES *
+                           grid->aligned_height,
                            HIVE_ISP_DDR_WORD_BYTES);
-       ver_size = CEIL_MUL(sizeof(int) * IA_CSS_DVS_NUM_COEF_TYPES * grid->aligned_width,
+       ver_size = CEIL_MUL(sizeof(int) * IA_CSS_DVS_NUM_COEF_TYPES *
+                           grid->aligned_width,
                            HIVE_ISP_DDR_WORD_BYTES);
 
        me->size = hor_size + ver_size;
@@ -335,8 +350,8 @@ err:
 
 struct ia_css_isp_dvs_statistics_map *
 ia_css_isp_dvs_statistics_map_allocate(
-       const struct ia_css_isp_dvs_statistics *isp_stats,
-       void *data_ptr)
+    const struct ia_css_isp_dvs_statistics *isp_stats,
+    void *data_ptr)
 {
        struct ia_css_isp_dvs_statistics_map *me;
        /* Windows compiler does not like adding sizes to a void *
@@ -394,28 +409,28 @@ ia_css_isp_dvs_statistics_free(struct ia_css_isp_dvs_statistics *me)
 }
 
 void ia_css_sdis_horicoef_debug_dtrace(
-       const struct ia_css_dvs_coefficients *config, unsigned int level)
+    const struct ia_css_dvs_coefficients *config, unsigned int level)
 {
        (void)config;
        (void)level;
 }
 
 void ia_css_sdis_vertcoef_debug_dtrace(
-       const struct ia_css_dvs_coefficients *config, unsigned int level)
+    const struct ia_css_dvs_coefficients *config, unsigned int level)
 {
        (void)config;
        (void)level;
 }
 
 void ia_css_sdis_horiproj_debug_dtrace(
-       const struct ia_css_dvs_coefficients *config, unsigned int level)
+    const struct ia_css_dvs_coefficients *config, unsigned int level)
 {
        (void)config;
        (void)level;
 }
 
 void ia_css_sdis_vertproj_debug_dtrace(
-       const struct ia_css_dvs_coefficients *config, unsigned int level)
+    const struct ia_css_dvs_coefficients *config, unsigned int level)
 {
        (void)config;
        (void)level;
index 1f9bcacdecbbb599a0601b91eb791303ee56e7ca..b1b0cb8ea175237b93aba4adceef917932679e17 100644 (file)
@@ -29,73 +29,73 @@ struct sh_css_isp_sdis_hori_proj_tbl;
 struct sh_css_isp_sdis_vert_proj_tbl;
 
 void ia_css_sdis_horicoef_vmem_encode(
-       struct sh_css_isp_sdis_hori_coef_tbl *to,
-       const struct ia_css_dvs_coefficients *from,
-       unsigned int size);
+    struct sh_css_isp_sdis_hori_coef_tbl *to,
+    const struct ia_css_dvs_coefficients *from,
+    unsigned int size);
 
 void ia_css_sdis_vertcoef_vmem_encode(
-       struct sh_css_isp_sdis_vert_coef_tbl *to,
-       const struct ia_css_dvs_coefficients *from,
-       unsigned int size);
+    struct sh_css_isp_sdis_vert_coef_tbl *to,
+    const struct ia_css_dvs_coefficients *from,
+    unsigned int size);
 
 void ia_css_sdis_horiproj_encode(
-       struct sh_css_isp_sdis_hori_proj_tbl *to,
-       const struct ia_css_dvs_coefficients *from,
-       unsigned int size);
+    struct sh_css_isp_sdis_hori_proj_tbl *to,
+    const struct ia_css_dvs_coefficients *from,
+    unsigned int size);
 
 void ia_css_sdis_vertproj_encode(
-       struct sh_css_isp_sdis_vert_proj_tbl *to,
-       const struct ia_css_dvs_coefficients *from,
-       unsigned int size);
+    struct sh_css_isp_sdis_vert_proj_tbl *to,
+    const struct ia_css_dvs_coefficients *from,
+    unsigned int size);
 
 void ia_css_get_isp_dis_coefficients(
-       struct ia_css_stream *stream,
-       short *horizontal_coefficients,
-       short *vertical_coefficients);
+    struct ia_css_stream *stream,
+    short *horizontal_coefficients,
+    short *vertical_coefficients);
 
 enum ia_css_err
 ia_css_get_dvs_statistics(
-       struct ia_css_dvs_statistics           *host_stats,
-       const struct ia_css_isp_dvs_statistics *isp_stats);
+    struct ia_css_dvs_statistics              *host_stats,
+    const struct ia_css_isp_dvs_statistics *isp_stats);
 
 void
 ia_css_translate_dvs_statistics(
-               struct ia_css_dvs_statistics               *host_stats,
-               const struct ia_css_isp_dvs_statistics_map *isp_stats);
+    struct ia_css_dvs_statistics               *host_stats,
+    const struct ia_css_isp_dvs_statistics_map *isp_stats);
 
 struct ia_css_isp_dvs_statistics *
 ia_css_isp_dvs_statistics_allocate(
-       const struct ia_css_dvs_grid_info *grid);
+    const struct ia_css_dvs_grid_info *grid);
 
 void
 ia_css_isp_dvs_statistics_free(
-       struct ia_css_isp_dvs_statistics *me);
+    struct ia_css_isp_dvs_statistics *me);
 
 size_t ia_css_sdis_hor_coef_tbl_bytes(const struct ia_css_binary *binary);
 size_t ia_css_sdis_ver_coef_tbl_bytes(const struct ia_css_binary *binary);
 
 void
 ia_css_sdis_init_info(
-       struct ia_css_sdis_info *dis,
-       unsigned int sc_3a_dis_width,
-       unsigned int sc_3a_dis_padded_width,
-       unsigned int sc_3a_dis_height,
-       unsigned int isp_pipe_version,
-       unsigned int enabled);
+    struct ia_css_sdis_info *dis,
+    unsigned int sc_3a_dis_width,
+    unsigned int sc_3a_dis_padded_width,
+    unsigned int sc_3a_dis_height,
+    unsigned int isp_pipe_version,
+    unsigned int enabled);
 
 void ia_css_sdis_clear_coefficients(
-       struct ia_css_dvs_coefficients *dvs_coefs);
+    struct ia_css_dvs_coefficients *dvs_coefs);
 
 void ia_css_sdis_horicoef_debug_dtrace(
-       const struct ia_css_dvs_coefficients *config, unsigned int level);
+    const struct ia_css_dvs_coefficients *config, unsigned int level);
 
 void ia_css_sdis_vertcoef_debug_dtrace(
-       const struct ia_css_dvs_coefficients *config, unsigned int level);
+    const struct ia_css_dvs_coefficients *config, unsigned int level);
 
 void ia_css_sdis_horiproj_debug_dtrace(
-       const struct ia_css_dvs_coefficients *config, unsigned int level);
+    const struct ia_css_dvs_coefficients *config, unsigned int level);
 
 void ia_css_sdis_vertproj_debug_dtrace(
-       const struct ia_css_dvs_coefficients *config, unsigned int level);
+    const struct ia_css_dvs_coefficients *config, unsigned int level);
 
 #endif /* __IA_CSS_SDIS_HOST_H */
index 766dfd9a4f751d378f929f41b5f6468014b93422..5542fa5555b4a164325d60eb3413119a8af4ebea 100644 (file)
@@ -31,7 +31,8 @@
  */
 
 struct ia_css_dvs_coefficients {
-       struct ia_css_dvs_grid_info grid;/** grid info contains the dimensions of the dvs grid */
+       struct ia_css_dvs_grid_info
+               grid;/** grid info contains the dimensions of the dvs grid */
        s16 *hor_coefs; /** the pointer to int16_t[grid.num_hor_coefs * IA_CSS_DVS_NUM_COEF_TYPES]
                                     containing the horizontal coefficients */
        s16 *ver_coefs; /** the pointer to int16_t[grid.num_ver_coefs * IA_CSS_DVS_NUM_COEF_TYPES]
@@ -43,7 +44,8 @@ struct ia_css_dvs_coefficients {
  */
 
 struct ia_css_dvs_statistics {
-       struct ia_css_dvs_grid_info grid;/** grid info contains the dimensions of the dvs grid */
+       struct ia_css_dvs_grid_info
+               grid;/** grid info contains the dimensions of the dvs grid */
        s32 *hor_proj;  /** the pointer to int16_t[grid.height * IA_CSS_DVS_NUM_COEF_TYPES]
                                     containing the horizontal projections */
        s32 *ver_proj;  /** the pointer to int16_t[grid.width * IA_CSS_DVS_NUM_COEF_TYPES]
index fea03777f81cc5924ea6c9b03fd28fc2519a65c5..20fa7d924d58216299e53234052bc8ad6d3c2e4d 100644 (file)
@@ -24,28 +24,32 @@ const struct ia_css_dvs2_coefficients default_sdis2_config = {
 };
 
 static void
-fill_row(short *private, const short *public, unsigned int width, unsigned int padding)
+fill_row(short *private, const short *public, unsigned int width,
+        unsigned int padding)
 {
        memcpy(private, public, width * sizeof(short));
        memset(&private[width], 0, padding * sizeof(short));
 }
 
 void ia_css_sdis2_horicoef_vmem_encode(
-       struct sh_css_isp_sdis_hori_coef_tbl *to,
-       const struct ia_css_dvs2_coefficients *from,
-       unsigned int size)
+    struct sh_css_isp_sdis_hori_coef_tbl *to,
+    const struct ia_css_dvs2_coefficients *from,
+    unsigned int size)
 {
-       unsigned int aligned_width = from->grid.aligned_width * from->grid.bqs_per_grid_cell;
+       unsigned int aligned_width = from->grid.aligned_width *
+                                    from->grid.bqs_per_grid_cell;
        unsigned int width         = from->grid.num_hor_coefs;
        int      padding       = aligned_width - width;
        unsigned int stride        = size / IA_CSS_DVS2_NUM_COEF_TYPES / sizeof(short);
-       unsigned int total_bytes   = aligned_width * IA_CSS_DVS2_NUM_COEF_TYPES * sizeof(short);
+       unsigned int total_bytes   = aligned_width * IA_CSS_DVS2_NUM_COEF_TYPES *
+                                    sizeof(short);
        short   *private       = (short *)to;
 
        /* Copy the table, add padding */
        assert(padding >= 0);
        assert(total_bytes <= size);
-       assert(size % (IA_CSS_DVS2_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(short)) == 0);
+       assert(size % (IA_CSS_DVS2_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(
+                          short)) == 0);
        fill_row(&private[0 * stride], from->hor_coefs.odd_real,  width, padding);
        fill_row(&private[1 * stride], from->hor_coefs.odd_imag,  width, padding);
        fill_row(&private[2 * stride], from->hor_coefs.even_real, width, padding);
@@ -53,21 +57,24 @@ void ia_css_sdis2_horicoef_vmem_encode(
 }
 
 void ia_css_sdis2_vertcoef_vmem_encode(
-       struct sh_css_isp_sdis_vert_coef_tbl *to,
-       const struct ia_css_dvs2_coefficients *from,
-       unsigned int size)
+    struct sh_css_isp_sdis_vert_coef_tbl *to,
+    const struct ia_css_dvs2_coefficients *from,
+    unsigned int size)
 {
-       unsigned int aligned_height = from->grid.aligned_height * from->grid.bqs_per_grid_cell;
+       unsigned int aligned_height = from->grid.aligned_height *
+                                     from->grid.bqs_per_grid_cell;
        unsigned int height         = from->grid.num_ver_coefs;
        int      padding        = aligned_height - height;
        unsigned int stride         = size / IA_CSS_DVS2_NUM_COEF_TYPES / sizeof(short);
-       unsigned int total_bytes    = aligned_height * IA_CSS_DVS2_NUM_COEF_TYPES * sizeof(short);
+       unsigned int total_bytes    = aligned_height * IA_CSS_DVS2_NUM_COEF_TYPES *
+                                     sizeof(short);
        short   *private        = (short *)to;
 
        /* Copy the table, add padding */
        assert(padding >= 0);
        assert(total_bytes <= size);
-       assert(size % (IA_CSS_DVS2_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(short)) == 0);
+       assert(size % (IA_CSS_DVS2_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(
+                          short)) == 0);
        fill_row(&private[0 * stride], from->ver_coefs.odd_real,  height, padding);
        fill_row(&private[1 * stride], from->ver_coefs.odd_imag,  height, padding);
        fill_row(&private[2 * stride], from->ver_coefs.even_real, height, padding);
@@ -75,9 +82,9 @@ void ia_css_sdis2_vertcoef_vmem_encode(
 }
 
 void ia_css_sdis2_horiproj_encode(
-       struct sh_css_isp_sdis_hori_proj_tbl *to,
-       const struct ia_css_dvs2_coefficients *from,
-       unsigned int size)
+    struct sh_css_isp_sdis_hori_proj_tbl *to,
+    const struct ia_css_dvs2_coefficients *from,
+    unsigned int size)
 {
        (void)to;
        (void)from;
@@ -85,9 +92,9 @@ void ia_css_sdis2_horiproj_encode(
 }
 
 void ia_css_sdis2_vertproj_encode(
-       struct sh_css_isp_sdis_vert_proj_tbl *to,
-       const struct ia_css_dvs2_coefficients *from,
-       unsigned int size)
+    struct sh_css_isp_sdis_vert_proj_tbl *to,
+    const struct ia_css_dvs2_coefficients *from,
+    unsigned int size)
 {
        (void)to;
        (void)from;
@@ -95,15 +102,15 @@ void ia_css_sdis2_vertproj_encode(
 }
 
 void ia_css_get_isp_dvs2_coefficients(
-       struct ia_css_stream *stream,
-       short *hor_coefs_odd_real,
-       short *hor_coefs_odd_imag,
-       short *hor_coefs_even_real,
-       short *hor_coefs_even_imag,
-       short *ver_coefs_odd_real,
-       short *ver_coefs_odd_imag,
-       short *ver_coefs_even_real,
-       short *ver_coefs_even_imag)
+    struct ia_css_stream *stream,
+    short *hor_coefs_odd_real,
+    short *hor_coefs_odd_imag,
+    short *hor_coefs_even_real,
+    short *hor_coefs_even_imag,
+    short *ver_coefs_odd_real,
+    short *ver_coefs_odd_imag,
+    short *ver_coefs_even_real,
+    short *ver_coefs_even_imag)
 {
        struct ia_css_isp_parameters *params;
        unsigned int hor_num_3a, ver_num_3a;
@@ -134,20 +141,28 @@ void ia_css_get_isp_dvs2_coefficients(
        hor_num_isp = dvs_binary->dis.coef.pad.width;
        ver_num_isp = dvs_binary->dis.coef.pad.height;
 
-       memcpy(hor_coefs_odd_real,  params->dvs2_coefs.hor_coefs.odd_real,  hor_num_3a * sizeof(short));
-       memcpy(hor_coefs_odd_imag,  params->dvs2_coefs.hor_coefs.odd_imag,  hor_num_3a * sizeof(short));
-       memcpy(hor_coefs_even_real, params->dvs2_coefs.hor_coefs.even_real, hor_num_3a * sizeof(short));
-       memcpy(hor_coefs_even_imag, params->dvs2_coefs.hor_coefs.even_imag, hor_num_3a * sizeof(short));
-       memcpy(ver_coefs_odd_real,  params->dvs2_coefs.ver_coefs.odd_real,  ver_num_3a * sizeof(short));
-       memcpy(ver_coefs_odd_imag,  params->dvs2_coefs.ver_coefs.odd_imag,  ver_num_3a * sizeof(short));
-       memcpy(ver_coefs_even_real, params->dvs2_coefs.ver_coefs.even_real, ver_num_3a * sizeof(short));
-       memcpy(ver_coefs_even_imag, params->dvs2_coefs.ver_coefs.even_imag, ver_num_3a * sizeof(short));
+       memcpy(hor_coefs_odd_real,  params->dvs2_coefs.hor_coefs.odd_real,
+              hor_num_3a * sizeof(short));
+       memcpy(hor_coefs_odd_imag,  params->dvs2_coefs.hor_coefs.odd_imag,
+              hor_num_3a * sizeof(short));
+       memcpy(hor_coefs_even_real, params->dvs2_coefs.hor_coefs.even_real,
+              hor_num_3a * sizeof(short));
+       memcpy(hor_coefs_even_imag, params->dvs2_coefs.hor_coefs.even_imag,
+              hor_num_3a * sizeof(short));
+       memcpy(ver_coefs_odd_real,  params->dvs2_coefs.ver_coefs.odd_real,
+              ver_num_3a * sizeof(short));
+       memcpy(ver_coefs_odd_imag,  params->dvs2_coefs.ver_coefs.odd_imag,
+              ver_num_3a * sizeof(short));
+       memcpy(ver_coefs_even_real, params->dvs2_coefs.ver_coefs.even_real,
+              ver_num_3a * sizeof(short));
+       memcpy(ver_coefs_even_imag, params->dvs2_coefs.ver_coefs.even_imag,
+              ver_num_3a * sizeof(short));
 
        IA_CSS_LEAVE("void");
 }
 
 void ia_css_sdis2_clear_coefficients(
-       struct ia_css_dvs2_coefficients *dvs2_coefs)
+    struct ia_css_dvs2_coefficients *dvs2_coefs)
 {
        dvs2_coefs->hor_coefs.odd_real  = NULL;
        dvs2_coefs->hor_coefs.odd_imag  = NULL;
@@ -161,9 +176,8 @@ void ia_css_sdis2_clear_coefficients(
 
 enum ia_css_err
 ia_css_get_dvs2_statistics(
-       struct ia_css_dvs2_statistics          *host_stats,
-       const struct ia_css_isp_dvs_statistics *isp_stats)
-{
+    struct ia_css_dvs2_statistics          *host_stats,
+    const struct ia_css_isp_dvs_statistics *isp_stats) {
        struct ia_css_isp_dvs_statistics_map *map;
        enum ia_css_err ret = IA_CSS_SUCCESS;
 
@@ -173,11 +187,13 @@ ia_css_get_dvs2_statistics(
        assert(isp_stats);
 
        map = ia_css_isp_dvs_statistics_map_allocate(isp_stats, NULL);
-       if (map) {
+       if (map)
+       {
                mmgr_load(isp_stats->data_ptr, map->data_ptr, isp_stats->size);
                ia_css_translate_dvs2_statistics(host_stats, map);
                ia_css_isp_dvs_statistics_map_free(map);
-       } else {
+       } else
+       {
                IA_CSS_ERROR("out of memory");
                ret = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
        }
@@ -188,8 +204,8 @@ ia_css_get_dvs2_statistics(
 
 void
 ia_css_translate_dvs2_statistics(
-       struct ia_css_dvs2_statistics              *host_stats,
-       const struct ia_css_isp_dvs_statistics_map *isp_stats)
+    struct ia_css_dvs2_statistics                 *host_stats,
+    const struct ia_css_isp_dvs_statistics_map *isp_stats)
 {
        unsigned int size_bytes, table_width, table_size, height;
        unsigned int src_offset = 0, dst_offset = 0;
@@ -209,18 +225,19 @@ ia_css_translate_dvs2_statistics(
        assert(isp_stats->ver_proj);
 
        IA_CSS_ENTER("hor_coefs.odd_real=%p, hor_coefs.odd_imag=%p, hor_coefs.even_real=%p, hor_coefs.even_imag=%p, ver_coefs.odd_real=%p, ver_coefs.odd_imag=%p, ver_coefs.even_real=%p, ver_coefs.even_imag=%p, haddr=%p, vaddr=%p",
-               host_stats->hor_prod.odd_real, host_stats->hor_prod.odd_imag,
-               host_stats->hor_prod.even_real, host_stats->hor_prod.even_imag,
-               host_stats->ver_prod.odd_real, host_stats->ver_prod.odd_imag,
-               host_stats->ver_prod.even_real, host_stats->ver_prod.even_imag,
-               isp_stats->hor_proj, isp_stats->ver_proj);
+                    host_stats->hor_prod.odd_real, host_stats->hor_prod.odd_imag,
+                    host_stats->hor_prod.even_real, host_stats->hor_prod.even_imag,
+                    host_stats->ver_prod.odd_real, host_stats->ver_prod.odd_imag,
+                    host_stats->ver_prod.even_real, host_stats->ver_prod.even_imag,
+                    isp_stats->hor_proj, isp_stats->ver_proj);
 
        /* Host side: reflecting the true width in bytes */
        size_bytes = host_stats->grid.aligned_width * sizeof(*htemp_ptr);
 
        /* DDR side: need to be aligned to the system bus width */
        /* statistics table width in terms of 32-bit words*/
-       table_width = CEIL_MUL(size_bytes, HIVE_ISP_DDR_WORD_BYTES) / sizeof(*htemp_ptr);
+       table_width = CEIL_MUL(size_bytes,
+                              HIVE_ISP_DDR_WORD_BYTES) / sizeof(*htemp_ptr);
        table_size = table_width * host_stats->grid.aligned_height;
 
        htemp_ptr = isp_stats->hor_proj; /* horizontal stats */
@@ -228,23 +245,23 @@ ia_css_translate_dvs2_statistics(
        for (height = 0; height < host_stats->grid.aligned_height; height++) {
                /* hor stats */
                memcpy(host_stats->hor_prod.odd_real + dst_offset,
-                       &htemp_ptr[0 * table_size + src_offset], size_bytes);
+                      &htemp_ptr[0 * table_size + src_offset], size_bytes);
                memcpy(host_stats->hor_prod.odd_imag + dst_offset,
-                       &htemp_ptr[1 * table_size + src_offset], size_bytes);
+                      &htemp_ptr[1 * table_size + src_offset], size_bytes);
                memcpy(host_stats->hor_prod.even_real + dst_offset,
-                       &htemp_ptr[2 * table_size + src_offset], size_bytes);
+                      &htemp_ptr[2 * table_size + src_offset], size_bytes);
                memcpy(host_stats->hor_prod.even_imag + dst_offset,
-                       &htemp_ptr[3 * table_size + src_offset], size_bytes);
+                      &htemp_ptr[3 * table_size + src_offset], size_bytes);
 
                /* ver stats */
                memcpy(host_stats->ver_prod.odd_real + dst_offset,
-                       &vtemp_ptr[0 * table_size + src_offset], size_bytes);
+                      &vtemp_ptr[0 * table_size + src_offset], size_bytes);
                memcpy(host_stats->ver_prod.odd_imag + dst_offset,
-                       &vtemp_ptr[1 * table_size + src_offset], size_bytes);
+                      &vtemp_ptr[1 * table_size + src_offset], size_bytes);
                memcpy(host_stats->ver_prod.even_real + dst_offset,
-                       &vtemp_ptr[2 * table_size + src_offset], size_bytes);
+                      &vtemp_ptr[2 * table_size + src_offset], size_bytes);
                memcpy(host_stats->ver_prod.even_imag + dst_offset,
-                       &vtemp_ptr[3 * table_size + src_offset], size_bytes);
+                      &vtemp_ptr[3 * table_size + src_offset], size_bytes);
 
                src_offset += table_width; /* aligned table width */
                dst_offset += host_stats->grid.aligned_width;
@@ -255,7 +272,7 @@ ia_css_translate_dvs2_statistics(
 
 struct ia_css_isp_dvs_statistics *
 ia_css_isp_dvs2_statistics_allocate(
-       const struct ia_css_dvs_grid_info *grid)
+    const struct ia_css_dvs_grid_info *grid)
 {
        struct ia_css_isp_dvs_statistics *me;
        int size;
@@ -275,7 +292,7 @@ ia_css_isp_dvs2_statistics_allocate(
           aligned to HIVE_ISP_DDR_WORD_BYTES
        */
        size = CEIL_MUL(sizeof(int) * grid->aligned_width, HIVE_ISP_DDR_WORD_BYTES)
-               * grid->aligned_height * IA_CSS_DVS2_NUM_COEF_TYPES;
+              * grid->aligned_height * IA_CSS_DVS2_NUM_COEF_TYPES;
 
        me->size = 2 * size;
        me->data_ptr = mmgr_malloc(me->size);
@@ -305,28 +322,28 @@ ia_css_isp_dvs2_statistics_free(struct ia_css_isp_dvs_statistics *me)
 }
 
 void ia_css_sdis2_horicoef_debug_dtrace(
-       const struct ia_css_dvs2_coefficients *config, unsigned int level)
+    const struct ia_css_dvs2_coefficients *config, unsigned int level)
 {
        (void)config;
        (void)level;
 }
 
 void ia_css_sdis2_vertcoef_debug_dtrace(
-       const struct ia_css_dvs2_coefficients *config, unsigned int level)
+    const struct ia_css_dvs2_coefficients *config, unsigned int level)
 {
        (void)config;
        (void)level;
 }
 
 void ia_css_sdis2_horiproj_debug_dtrace(
-       const struct ia_css_dvs2_coefficients *config, unsigned int level)
+    const struct ia_css_dvs2_coefficients *config, unsigned int level)
 {
        (void)config;
        (void)level;
 }
 
 void ia_css_sdis2_vertproj_debug_dtrace(
-       const struct ia_css_dvs2_coefficients *config, unsigned int level)
+    const struct ia_css_dvs2_coefficients *config, unsigned int level)
 {
        (void)config;
        (void)level;
index d723b63b150edb3b169bc6b63948a37b7b6ecb65..a966a6bcb692d60a726e4b5c1c7cfb26c0c3e083 100644 (file)
@@ -29,67 +29,67 @@ struct sh_css_isp_sdis_hori_proj_tbl;
 struct sh_css_isp_sdis_vert_proj_tbl;
 
 void ia_css_sdis2_horicoef_vmem_encode(
-       struct sh_css_isp_sdis_hori_coef_tbl *to,
-       const struct ia_css_dvs2_coefficients *from,
-       unsigned int size);
+    struct sh_css_isp_sdis_hori_coef_tbl *to,
+    const struct ia_css_dvs2_coefficients *from,
+    unsigned int size);
 
 void ia_css_sdis2_vertcoef_vmem_encode(
-       struct sh_css_isp_sdis_vert_coef_tbl *to,
-       const struct ia_css_dvs2_coefficients *from,
-       unsigned int size);
+    struct sh_css_isp_sdis_vert_coef_tbl *to,
+    const struct ia_css_dvs2_coefficients *from,
+    unsigned int size);
 
 void ia_css_sdis2_horiproj_encode(
-       struct sh_css_isp_sdis_hori_proj_tbl *to,
-       const struct ia_css_dvs2_coefficients *from,
-       unsigned int size);
+    struct sh_css_isp_sdis_hori_proj_tbl *to,
+    const struct ia_css_dvs2_coefficients *from,
+    unsigned int size);
 
 void ia_css_sdis2_vertproj_encode(
-       struct sh_css_isp_sdis_vert_proj_tbl *to,
-       const struct ia_css_dvs2_coefficients *from,
-       unsigned int size);
+    struct sh_css_isp_sdis_vert_proj_tbl *to,
+    const struct ia_css_dvs2_coefficients *from,
+    unsigned int size);
 
 void ia_css_get_isp_dvs2_coefficients(
-       struct ia_css_stream *stream,
-       short *hor_coefs_odd_real,
-       short *hor_coefs_odd_imag,
-       short *hor_coefs_even_real,
-       short *hor_coefs_even_imag,
-       short *ver_coefs_odd_real,
-       short *ver_coefs_odd_imag,
-       short *ver_coefs_even_real,
-       short *ver_coefs_even_imag);
+    struct ia_css_stream *stream,
+    short *hor_coefs_odd_real,
+    short *hor_coefs_odd_imag,
+    short *hor_coefs_even_real,
+    short *hor_coefs_even_imag,
+    short *ver_coefs_odd_real,
+    short *ver_coefs_odd_imag,
+    short *ver_coefs_even_real,
+    short *ver_coefs_even_imag);
 
 void ia_css_sdis2_clear_coefficients(
-       struct ia_css_dvs2_coefficients *dvs2_coefs);
+    struct ia_css_dvs2_coefficients *dvs2_coefs);
 
 enum ia_css_err
 ia_css_get_dvs2_statistics(
-       struct ia_css_dvs2_statistics          *host_stats,
-       const struct ia_css_isp_dvs_statistics *isp_stats);
+    struct ia_css_dvs2_statistics             *host_stats,
+    const struct ia_css_isp_dvs_statistics *isp_stats);
 
 void
 ia_css_translate_dvs2_statistics(
-       struct ia_css_dvs2_statistics              *host_stats,
-       const struct ia_css_isp_dvs_statistics_map *isp_stats);
+    struct ia_css_dvs2_statistics              *host_stats,
+    const struct ia_css_isp_dvs_statistics_map *isp_stats);
 
 struct ia_css_isp_dvs_statistics *
 ia_css_isp_dvs2_statistics_allocate(
-       const struct ia_css_dvs_grid_info *grid);
+    const struct ia_css_dvs_grid_info *grid);
 
 void
 ia_css_isp_dvs2_statistics_free(
-       struct ia_css_isp_dvs_statistics *me);
+    struct ia_css_isp_dvs_statistics *me);
 
 void ia_css_sdis2_horicoef_debug_dtrace(
-       const struct ia_css_dvs2_coefficients *config, unsigned int level);
+    const struct ia_css_dvs2_coefficients *config, unsigned int level);
 
 void ia_css_sdis2_vertcoef_debug_dtrace(
-       const struct ia_css_dvs2_coefficients *config, unsigned int level);
+    const struct ia_css_dvs2_coefficients *config, unsigned int level);
 
 void ia_css_sdis2_horiproj_debug_dtrace(
-       const struct ia_css_dvs2_coefficients *config, unsigned int level);
+    const struct ia_css_dvs2_coefficients *config, unsigned int level);
 
 void ia_css_sdis2_vertproj_debug_dtrace(
-       const struct ia_css_dvs2_coefficients *config, unsigned int level);
+    const struct ia_css_dvs2_coefficients *config, unsigned int level);
 
 #endif /* __IA_CSS_SDIS2_HOST_H */
index 7a6fb266d5c853a7b8d6d1910d7a395007b5a7ee..e8ae135bfd6ae4d6846443d0bf6a9501a94eaa6d 100644 (file)
@@ -41,9 +41,12 @@ struct ia_css_dvs2_coef_types {
  *  coefficients.
  */
 struct ia_css_dvs2_coefficients {
-       struct ia_css_dvs_grid_info grid;        /** grid info contains the dimensions of the dvs grid */
-       struct ia_css_dvs2_coef_types hor_coefs; /** struct with pointers that contain the horizontal coefficients */
-       struct ia_css_dvs2_coef_types ver_coefs; /** struct with pointers that contain the vertical coefficients */
+       struct ia_css_dvs_grid_info
+               grid;        /** grid info contains the dimensions of the dvs grid */
+       struct ia_css_dvs2_coef_types
+               hor_coefs; /** struct with pointers that contain the horizontal coefficients */
+       struct ia_css_dvs2_coef_types
+               ver_coefs; /** struct with pointers that contain the vertical coefficients */
 };
 
 /* DVS 2.0 Statistic types. This structure contains 4 pointers to
@@ -61,9 +64,12 @@ struct ia_css_dvs2_stat_types {
  *  the horizontal odd real statistics. Valid statistics data area is int16_t[0..grid.height-1][0..grid.width-1]
  */
 struct ia_css_dvs2_statistics {
-       struct ia_css_dvs_grid_info grid;       /** grid info contains the dimensions of the dvs grid */
-       struct ia_css_dvs2_stat_types hor_prod; /** struct with pointers that contain the horizontal statistics */
-       struct ia_css_dvs2_stat_types ver_prod; /** struct with pointers that contain the vertical statistics */
+       struct ia_css_dvs_grid_info
+               grid;       /** grid info contains the dimensions of the dvs grid */
+       struct ia_css_dvs2_stat_types
+               hor_prod; /** struct with pointers that contain the horizontal statistics */
+       struct ia_css_dvs2_stat_types
+               ver_prod; /** struct with pointers that contain the vertical statistics */
 };
 
 #endif /* __IA_CSS_SDIS2_TYPES_H */
index 2ee8d78c6a268677c6caff7b77e4ed82efc2dfd3..69921c27bfaef3a58cc255837ab11790a0a9e5c5 100644 (file)
 #include "ia_css_tdf.host.h"
 
 static const s16 g_pyramid[8][8] = {
-{128, 384, 640, 896, 896, 640, 384, 128},
-{384, 1152, 1920, 2688, 2688, 1920, 1152, 384},
-{640, 1920, 3200, 4480, 4480, 3200, 1920, 640},
-{896, 2688, 4480, 6272, 6272, 4480, 2688, 896},
-{896, 2688, 4480, 6272, 6272, 4480, 2688, 896},
-{640, 1920, 3200, 4480, 4480, 3200, 1920, 640},
-{384, 1152, 1920, 2688, 2688, 1920, 1152, 384},
-{128, 384, 640, 896, 896, 640, 384, 128}
+       {128, 384, 640, 896, 896, 640, 384, 128},
+       {384, 1152, 1920, 2688, 2688, 1920, 1152, 384},
+       {640, 1920, 3200, 4480, 4480, 3200, 1920, 640},
+       {896, 2688, 4480, 6272, 6272, 4480, 2688, 896},
+       {896, 2688, 4480, 6272, 6272, 4480, 2688, 896},
+       {640, 1920, 3200, 4480, 4480, 3200, 1920, 640},
+       {384, 1152, 1920, 2688, 2688, 1920, 1152, 384},
+       {128, 384, 640, 896, 896, 640, 384, 128}
 };
 
 void
 ia_css_tdf_vmem_encode(
-       struct ia_css_isp_tdf_vmem_params *to,
-       const struct ia_css_tdf_config *from,
-       size_t size)
+    struct ia_css_isp_tdf_vmem_params *to,
+    const struct ia_css_tdf_config *from,
+    size_t size)
 {
        unsigned int i;
        (void)size;
@@ -44,9 +44,9 @@ ia_css_tdf_vmem_encode(
 
 void
 ia_css_tdf_encode(
-       struct ia_css_isp_tdf_dmem_params *to,
-       const struct ia_css_tdf_config *from,
-       size_t size)
+    struct ia_css_isp_tdf_dmem_params *to,
+    const struct ia_css_tdf_config *from,
+    size_t size)
 {
        (void)size;
        to->Epsilon_0        = from->epsilon_0;
@@ -66,8 +66,8 @@ ia_css_tdf_encode(
 
 void
 ia_css_tdf_debug_dtrace(
-       const struct ia_css_tdf_config *config,
-       unsigned int level)
+    const struct ia_css_tdf_config *config,
+    unsigned int level)
 {
        (void)config;
        (void)level;
index 468e0177ed8a807fe69024aede39fe3188147031..bc6e1653e354c2ed329c8098f4e6353c8602aa0a 100644 (file)
 
 void
 ia_css_tdf_vmem_encode(
-       struct ia_css_isp_tdf_vmem_params *to,
-       const struct ia_css_tdf_config *from,
-       size_t size);
+    struct ia_css_isp_tdf_vmem_params *to,
+    const struct ia_css_tdf_config *from,
+    size_t size);
 
 void
 ia_css_tdf_encode(
-       struct ia_css_isp_tdf_dmem_params *to,
-       const struct ia_css_tdf_config *from,
-       size_t size);
+    struct ia_css_isp_tdf_dmem_params *to,
+    const struct ia_css_tdf_config *from,
+    size_t size);
 
 void
 ia_css_tdf_debug_dtrace(
-       const struct ia_css_tdf_config *config, unsigned int level)
+    const struct ia_css_tdf_config *config, unsigned int level)
 ;
 
 #endif /* __IA_CSS_TDF_HOST_H */
index 223423f8c40b2dd247401b3c129519449c614d84..37ac2e8b75df7404b00c1af88d9604484aa155ec 100644 (file)
@@ -51,10 +51,14 @@ struct ia_css_tnr3_kernel_config {
        unsigned int round_adj_u;                    /** Rounding Adjust for U */
        unsigned int round_adj_v;                    /** Rounding Adjust for V */
        unsigned int knee_y[TNR3_NUM_SEGMENTS - 1];  /** Knee points */
-       unsigned int sigma_y[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for Y at points Y0, Y1, Y2, Y3 */
-       unsigned int sigma_u[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for U at points U0, U1, U2, U3 */
-       unsigned int sigma_v[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for V at points V0, V1, V2, V3 */
-       unsigned int ref_buf_select;                 /** Selection of the reference buffer */
+       unsigned int sigma_y[TNR3_NUM_SEGMENTS +
+                                              1]; /** Standard deviation for Y at points Y0, Y1, Y2, Y3 */
+       unsigned int sigma_u[TNR3_NUM_SEGMENTS +
+                                              1]; /** Standard deviation for U at points U0, U1, U2, U3 */
+       unsigned int sigma_v[TNR3_NUM_SEGMENTS +
+                                              1]; /** Standard deviation for V at points V0, V1, V2, V3 */
+       unsigned int
+       ref_buf_select;                 /** Selection of the reference buffer */
 };
 
 #endif
index d2f9887ffddb5dbdc37cf128fdb4ede7ebdccc7e..519e33a0555497bee91c86effa6abe2adb1cb0ec 100644 (file)
@@ -31,9 +31,9 @@ const struct ia_css_tnr_config default_tnr_config = {
 
 void
 ia_css_tnr_encode(
-       struct sh_css_isp_tnr_params *to,
-       const struct ia_css_tnr_config *from,
-       unsigned int size)
+    struct sh_css_isp_tnr_params *to,
+    const struct ia_css_tnr_config *from,
+    unsigned int size)
 {
        (void)size;
        to->coef =
@@ -46,35 +46,35 @@ ia_css_tnr_encode(
 
 void
 ia_css_tnr_dump(
-       const struct sh_css_isp_tnr_params *tnr,
-       unsigned int level)
+    const struct sh_css_isp_tnr_params *tnr,
+    unsigned int level)
 {
        if (!tnr) return;
        ia_css_debug_dtrace(level, "Temporal Noise Reduction:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "tnr_coef", tnr->coef);
+                           "tnr_coef", tnr->coef);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "tnr_threshold_Y", tnr->threshold_Y);
+                           "tnr_threshold_Y", tnr->threshold_Y);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "tnr_threshold_C", tnr->threshold_C);
+                           "tnr_threshold_C", tnr->threshold_C);
 }
 
 void
 ia_css_tnr_debug_dtrace(
-       const struct ia_css_tnr_config *config,
-       unsigned int level)
+    const struct ia_css_tnr_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.gain=%d, config.threshold_y=%d, config.threshold_uv=%d\n",
-               config->gain,
-               config->threshold_y, config->threshold_uv);
+                           "config.gain=%d, config.threshold_y=%d, config.threshold_uv=%d\n",
+                           config->gain,
+                           config->threshold_y, config->threshold_uv);
 }
 
 void
 ia_css_tnr_config(
-       struct sh_css_isp_tnr_isp_config *to,
-       const struct ia_css_tnr_configuration *from,
-       unsigned int size)
+    struct sh_css_isp_tnr_isp_config *to,
+    const struct ia_css_tnr_configuration *from,
+    unsigned int size)
 {
        unsigned int elems_a = ISP_VEC_NELEMS;
        unsigned int i;
@@ -88,7 +88,8 @@ ia_css_tnr_config(
 #else
        for (i = 0; i < NUM_TNR_FRAMES; i++) {
 #endif
-               to->tnr_frame_addr[i] = from->tnr_frames[i]->data + from->tnr_frames[i]->planes.yuyv.offset;
+               to->tnr_frame_addr[i] = from->tnr_frames[i]->data +
+                                       from->tnr_frames[i]->planes.yuyv.offset;
        }
 
        /* Assume divisiblity here, may need to generalize to fixed point. */
@@ -97,8 +98,8 @@ ia_css_tnr_config(
 
 void
 ia_css_tnr_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame **frames)
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame **frames)
 {
        struct ia_css_tnr_configuration config;
        unsigned int i;
@@ -115,8 +116,8 @@ ia_css_tnr_configure(
 
 void
 ia_css_init_tnr_state(
-       struct sh_css_isp_tnr_dmem_state *state,
-       size_t size)
+    struct sh_css_isp_tnr_dmem_state *state,
+    size_t size)
 {
        (void)size;
 
index 50aabec5d3ac6adb68ebe49c45e636057010a07b..3dbf962089d00d86f0eacc23aa19d046c16bdf95 100644 (file)
@@ -24,33 +24,33 @@ extern const struct ia_css_tnr_config default_tnr_config;
 
 void
 ia_css_tnr_encode(
-       struct sh_css_isp_tnr_params *to,
-       const struct ia_css_tnr_config *from,
-       unsigned int size);
+    struct sh_css_isp_tnr_params *to,
+    const struct ia_css_tnr_config *from,
+    unsigned int size);
 
 void
 ia_css_tnr_dump(
-       const struct sh_css_isp_tnr_params *tnr,
-       unsigned int level);
+    const struct sh_css_isp_tnr_params *tnr,
+    unsigned int level);
 
 void
 ia_css_tnr_debug_dtrace(
-       const struct ia_css_tnr_config *config,
-       unsigned int level);
+    const struct ia_css_tnr_config *config,
+    unsigned int level);
 
 void
 ia_css_tnr_config(
-       struct sh_css_isp_tnr_isp_config      *to,
-       const struct ia_css_tnr_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_tnr_isp_config      *to,
+    const struct ia_css_tnr_configuration *from,
+    unsigned int size);
 
 void
 ia_css_tnr_configure(
-       const struct ia_css_binary     *binary,
-       const struct ia_css_frame **frames);
+    const struct ia_css_binary     *binary,
+    const struct ia_css_frame **frames);
 
 void
 ia_css_init_tnr_state(
-       struct sh_css_isp_tnr_dmem_state *state,
-       size_t size);
+    struct sh_css_isp_tnr_dmem_state *state,
+    size_t size);
 #endif /* __IA_CSS_TNR_HOST_H */
index 0aa0231b0348106b97a90376396ed632bd2fd67c..be274d680caf50f6f6b8b647e6b79dda9a1d4ca2 100644 (file)
@@ -25,9 +25,9 @@
 
 void
 ia_css_vf_config(
-       struct sh_css_isp_vf_isp_config      *to,
-       const struct ia_css_vf_configuration *from,
-       unsigned int size)
+    struct sh_css_isp_vf_isp_config      *to,
+    const struct ia_css_vf_configuration *from,
+    unsigned int size)
 {
        unsigned int elems_a = ISP_VEC_NELEMS;
 
@@ -51,79 +51,78 @@ ia_css_vf_config(
  */
 enum ia_css_err
 sh_css_vf_downscale_log2(
-       const struct ia_css_frame_info *out_info,
-       const struct ia_css_frame_info *vf_info,
-       unsigned int *downscale_log2)
-{
-       unsigned int ds_log2 = 0;
-       unsigned int out_width;
+    const struct ia_css_frame_info *out_info,
+    const struct ia_css_frame_info *vf_info,
+    unsigned int *downscale_log2) {
+       unsigned int ds_log2 = 0;
+       unsigned int out_width;
 
-       if ((!out_info) | (!vf_info))
-       return IA_CSS_ERR_INVALID_ARGUMENTS;
+       if ((!out_info) | (!vf_info))
+               return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       out_width = out_info->res.width;
+       out_width = out_info->res.width;
 
-       if (out_width == 0)
-       return IA_CSS_ERR_INVALID_ARGUMENTS;
+       if (out_width == 0)
+               return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       /* downscale until width smaller than the viewfinder width. We don't
+       /* downscale until width smaller than the viewfinder width. We don't
        * test for the height since the vmem buffers only put restrictions on
        * the width of a line, not on the number of lines in a frame.
        */
-       while (out_width >= vf_info->res.width) {
-              ds_log2++;
-              out_width /= 2;
-       }
-       /* now width is smaller, so we go up one step */
-       if ((ds_log2 > 0) && (out_width < ia_css_binary_max_vf_width()))
-              ds_log2--;
-       /* TODO: use actual max input resolution of vf_pp binary */
-       if ((out_info->res.width >> ds_log2) >= 2 * ia_css_binary_max_vf_width())
-       return IA_CSS_ERR_INVALID_ARGUMENTS;
-       *downscale_log2 = ds_log2;
-       return IA_CSS_SUCCESS;
+       while (out_width >= vf_info->res.width)
+       {
+               ds_log2++;
+               out_width /= 2;
+       }
+       /* now width is smaller, so we go up one step */
+       if ((ds_log2 > 0) && (out_width < ia_css_binary_max_vf_width()))
+               ds_log2--;
+       /* TODO: use actual max input resolution of vf_pp binary */
+       if ((out_info->res.width >> ds_log2) >= 2 * ia_css_binary_max_vf_width())
+               return IA_CSS_ERR_INVALID_ARGUMENTS;
+       *downscale_log2 = ds_log2;
+       return IA_CSS_SUCCESS;
 }
 
 static enum ia_css_err
 configure_kernel(
-       const struct ia_css_binary_info *info,
-       const struct ia_css_frame_info *out_info,
-       const struct ia_css_frame_info *vf_info,
-       unsigned int *downscale_log2,
-       struct ia_css_vf_configuration *config)
-{
-       enum ia_css_err err;
-       unsigned int vf_log_ds = 0;
-
-       /* First compute value */
-       if (vf_info) {
-              err = sh_css_vf_downscale_log2(out_info, vf_info, &vf_log_ds);
-       if (err != IA_CSS_SUCCESS)
-               return err;
-       }
-       vf_log_ds = min(vf_log_ds, info->vf_dec.max_log_downscale);
-       *downscale_log2 = vf_log_ds;
-
-       /* Then store it in isp config section */
-       config->vf_downscale_bits = vf_log_ds;
-       return IA_CSS_SUCCESS;
+    const struct ia_css_binary_info *info,
+    const struct ia_css_frame_info *out_info,
+    const struct ia_css_frame_info *vf_info,
+    unsigned int *downscale_log2,
+    struct ia_css_vf_configuration *config) {
+       enum ia_css_err err;
+       unsigned int vf_log_ds = 0;
+
+       /* First compute value */
+       if (vf_info)
+       {
+               err = sh_css_vf_downscale_log2(out_info, vf_info, &vf_log_ds);
+               if (err != IA_CSS_SUCCESS)
+                       return err;
+       }
+       vf_log_ds = min(vf_log_ds, info->vf_dec.max_log_downscale);
+       *downscale_log2 = vf_log_ds;
+
+       /* Then store it in isp config section */
+       config->vf_downscale_bits = vf_log_ds;
+       return IA_CSS_SUCCESS;
 }
 
 static void
 configure_dma(
-       struct ia_css_vf_configuration *config,
-       const struct ia_css_frame_info *vf_info)
+    struct ia_css_vf_configuration *config,
+    const struct ia_css_frame_info *vf_info)
 {
        config->info = vf_info;
 }
 
 enum ia_css_err
 ia_css_vf_configure(
-       const struct ia_css_binary *binary,
-       const struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info,
-       unsigned int *downscale_log2)
-{
+    const struct ia_css_binary *binary,
+    const struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info,
+    unsigned int *downscale_log2) {
        enum ia_css_err err;
        struct ia_css_vf_configuration config;
        const struct ia_css_binary_info *info = &binary->info->sp;
index 247ad0a39b9bd404c6539a01878bc69bcf2492cb..9cc594f9a840bbed99bb073528d03f76cedef128 100644 (file)
  */
 enum ia_css_err
 sh_css_vf_downscale_log2(
-       const struct ia_css_frame_info *out_info,
-       const struct ia_css_frame_info *vf_info,
-       unsigned int *downscale_log2);
+    const struct ia_css_frame_info *out_info,
+    const struct ia_css_frame_info *vf_info,
+    unsigned int *downscale_log2);
 
 void
 ia_css_vf_config(
-       struct sh_css_isp_vf_isp_config *to,
-       const struct ia_css_vf_configuration *from,
-       unsigned int size);
+    struct sh_css_isp_vf_isp_config *to,
+    const struct ia_css_vf_configuration *from,
+    unsigned int size);
 
 enum ia_css_err
 ia_css_vf_configure(
-       const struct ia_css_binary *binary,
-       const struct ia_css_frame_info *out_info,
-       struct ia_css_frame_info *vf_info,
-       unsigned int *downscale_log2);
+    const struct ia_css_binary *binary,
+    const struct ia_css_frame_info *out_info,
+    struct ia_css_frame_info *vf_info,
+    unsigned int *downscale_log2);
 
 #endif /* __IA_CSS_VF_HOST_H */
index 5affd3875f268b33fa2f0e30e8633b4825225f61..d07c500eb542f84a8bf532369bbf46a1b1f96491 100644 (file)
@@ -31,9 +31,9 @@ const struct ia_css_wb_config default_wb_config = {
 
 void
 ia_css_wb_encode(
-       struct sh_css_isp_wb_params *to,
-       const struct ia_css_wb_config *from,
-       unsigned int size)
+    struct sh_css_isp_wb_params *to,
+    const struct ia_css_wb_config *from,
+    unsigned int size)
 {
        (void)size;
        to->gain_shift =
@@ -55,32 +55,32 @@ ia_css_wb_encode(
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_wb_dump(
-       const struct sh_css_isp_wb_params *wb,
-       unsigned int level)
+    const struct sh_css_isp_wb_params *wb,
+    unsigned int level)
 {
        if (!wb) return;
        ia_css_debug_dtrace(level, "White Balance:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "wb_gain_shift", wb->gain_shift);
+                           "wb_gain_shift", wb->gain_shift);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "wb_gain_gr", wb->gain_gr);
+                           "wb_gain_gr", wb->gain_gr);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "wb_gain_r", wb->gain_r);
+                           "wb_gain_r", wb->gain_r);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "wb_gain_b", wb->gain_b);
+                           "wb_gain_b", wb->gain_b);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "wb_gain_gb", wb->gain_gb);
+                           "wb_gain_gb", wb->gain_gb);
 }
 
 void
 ia_css_wb_debug_dtrace(
-       const struct ia_css_wb_config *config,
-       unsigned int level)
+    const struct ia_css_wb_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.integer_bits=%d, config.gr=%d, config.r=%d, config.b=%d, config.gb=%d\n",
-               config->integer_bits,
-               config->gr, config->r,
-               config->b, config->gb);
+                           "config.integer_bits=%d, config.gr=%d, config.r=%d, config.b=%d, config.gb=%d\n",
+                           config->integer_bits,
+                           config->gr, config->r,
+                           config->b, config->gb);
 }
 #endif
index 7d983f3f20c7a9dd827ae3863b7daba3942d5784..545dea39c2e0a712de079e17f2f8d4dfc2da3c1c 100644 (file)
@@ -22,18 +22,18 @@ extern const struct ia_css_wb_config default_wb_config;
 
 void
 ia_css_wb_encode(
-       struct sh_css_isp_wb_params *to,
-       const struct ia_css_wb_config *from,
-       unsigned int size);
+    struct sh_css_isp_wb_params *to,
+    const struct ia_css_wb_config *from,
+    unsigned int size);
 
 void
 ia_css_wb_dump(
-       const struct sh_css_isp_wb_params *wb,
-       unsigned int level);
+    const struct sh_css_isp_wb_params *wb,
+    unsigned int level);
 
 void
 ia_css_wb_debug_dtrace(
-       const struct ia_css_wb_config *wb,
-       unsigned int level);
+    const struct ia_css_wb_config *wb,
+    unsigned int level);
 
 #endif /* __IA_CSS_WB_HOST_H */
index 50f42348ed192a72ae211cfbeb194e971afe5bac..e04c604ba61292cfa65e44286b7202fc48e40e90 100644 (file)
@@ -26,9 +26,9 @@ const struct ia_css_xnr_config default_xnr_config = {
 
 void
 ia_css_xnr_table_vamem_encode(
-       struct sh_css_isp_xnr_vamem_params *to,
-       const struct ia_css_xnr_table *from,
-       unsigned int size)
+    struct sh_css_isp_xnr_vamem_params *to,
+    const struct ia_css_xnr_table *from,
+    unsigned int size)
 {
        (void)size;
        memcpy(&to->xnr,  &from->data, sizeof(to->xnr));
@@ -36,20 +36,20 @@ ia_css_xnr_table_vamem_encode(
 
 void
 ia_css_xnr_encode(
-       struct sh_css_isp_xnr_params *to,
-       const struct ia_css_xnr_config *from,
-       unsigned int size)
+    struct sh_css_isp_xnr_params *to,
+    const struct ia_css_xnr_config *from,
+    unsigned int size)
 {
        (void)size;
 
        to->threshold =
-               (uint16_t)uDIGIT_FITTING(from->threshold, 16, SH_CSS_ISP_YUV_BITS);
+           (uint16_t)uDIGIT_FITTING(from->threshold, 16, SH_CSS_ISP_YUV_BITS);
 }
 
 void
 ia_css_xnr_table_debug_dtrace(
-       const struct ia_css_xnr_table *config,
-       unsigned int level)
+    const struct ia_css_xnr_table *config,
+    unsigned int level)
 {
        (void)config;
        (void)level;
@@ -57,9 +57,9 @@ ia_css_xnr_table_debug_dtrace(
 
 void
 ia_css_xnr_debug_dtrace(
-       const struct ia_css_xnr_config *config,
-       unsigned int level)
+    const struct ia_css_xnr_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.threshold=%d\n", config->threshold);
+                           "config.threshold=%d\n", config->threshold);
 }
index eae4aa78ce58d5eeb05da1f6a010bf36ecab2429..31833b78739fd195fdb0c08c6d481076a0e7dca5 100644 (file)
@@ -24,24 +24,24 @@ extern const struct ia_css_xnr_config default_xnr_config;
 
 void
 ia_css_xnr_table_vamem_encode(
-       struct sh_css_isp_xnr_vamem_params *to,
-       const struct ia_css_xnr_table *from,
-       unsigned int size);
+    struct sh_css_isp_xnr_vamem_params *to,
+    const struct ia_css_xnr_table *from,
+    unsigned int size);
 
 void
 ia_css_xnr_encode(
-       struct sh_css_isp_xnr_params *to,
-       const struct ia_css_xnr_config *from,
-       unsigned int size);
+    struct sh_css_isp_xnr_params *to,
+    const struct ia_css_xnr_config *from,
+    unsigned int size);
 
 void
 ia_css_xnr_table_debug_dtrace(
-       const struct ia_css_xnr_table *s3a,
-       unsigned int level);
+    const struct ia_css_xnr_table *s3a,
+    unsigned int level);
 
 void
 ia_css_xnr_debug_dtrace(
-       const struct ia_css_xnr_config *config,
-       unsigned int level);
+    const struct ia_css_xnr_config *config,
+    unsigned int level);
 
 #endif /* __IA_CSS_XNR_HOST_H */
index 0119e20292ce638b035377a6539dc8972becd3a1..78653b2666a45a373065b3736ff961a63f4395d6 100644 (file)
@@ -25,45 +25,45 @@ struct ia_css_xnr_table default_xnr_table;
 
 static const uint16_t
 default_xnr_table_data[IA_CSS_VAMEM_2_XNR_TABLE_SIZE] = {
-  /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
-  8191 >> 1, 4096 >> 1, 2730 >> 1, 2048 >> 1, 1638 >> 1, 1365 >> 1, 1170 >> 1, 1024 >> 1, 910 >> 1, 819 >> 1, 744 >> 1, 682 >> 1, 630 >> 1, 585 >> 1,
-    546 >> 1, 512 >> 1,
+       /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+       8191 >> 1, 4096 >> 1, 2730 >> 1, 2048 >> 1, 1638 >> 1, 1365 >> 1, 1170 >> 1, 1024 >> 1, 910 >> 1, 819 >> 1, 744 >> 1, 682 >> 1, 630 >> 1, 585 >> 1,
+            546 >> 1, 512 >> 1,
 
-  /* 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 */
-  481 >> 1, 455 >> 1, 431 >> 1, 409 >> 1, 390 >> 1, 372 >> 1, 356 >> 1, 341 >> 1, 327 >> 1, 315 >> 1, 303 >> 1, 292 >> 1, 282 >> 1, 273 >> 1, 264 >> 1,
-    256 >> 1,
+            /* 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 */
+            481 >> 1, 455 >> 1, 431 >> 1, 409 >> 1, 390 >> 1, 372 >> 1, 356 >> 1, 341 >> 1, 327 >> 1, 315 >> 1, 303 >> 1, 292 >> 1, 282 >> 1, 273 >> 1, 264 >> 1,
+            256 >> 1,
 
-  /* 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 */
-  248 >> 1, 240 >> 1, 234 >> 1, 227 >> 1, 221 >> 1, 215 >> 1, 210 >> 1, 204 >> 1, 199 >> 1, 195 >> 1, 190 >> 1, 186 >> 1, 182 >> 1, 178 >> 1, 174 >> 1,
-    170 >> 1,
+            /* 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 */
+            248 >> 1, 240 >> 1, 234 >> 1, 227 >> 1, 221 >> 1, 215 >> 1, 210 >> 1, 204 >> 1, 199 >> 1, 195 >> 1, 190 >> 1, 186 >> 1, 182 >> 1, 178 >> 1, 174 >> 1,
+            170 >> 1,
 
-  /* 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 */
-  167 >> 1, 163 >> 1, 160 >> 1, 157 >> 1, 154 >> 1, 151 >> 1, 148 >> 1, 146 >> 1, 143 >> 1, 141 >> 1, 138 >> 1, 136 >> 1, 134 >> 1, 132 >> 1, 130 >> 1, 128 >> 1
+            /* 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 */
+            167 >> 1, 163 >> 1, 160 >> 1, 157 >> 1, 154 >> 1, 151 >> 1, 148 >> 1, 146 >> 1, 143 >> 1, 141 >> 1, 138 >> 1, 136 >> 1, 134 >> 1, 132 >> 1, 130 >> 1, 128 >> 1
 };
 
 #elif defined(HAS_VAMEM_VERSION_1)
 
 static const uint16_t
 default_xnr_table_data[IA_CSS_VAMEM_1_XNR_TABLE_SIZE] = {
-  /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
-  8191 >> 1, 4096 >> 1, 2730 >> 1, 2048 >> 1, 1638 >> 1, 1365 >> 1, 1170 >> 1, 1024 >> 1, 910 >> 1, 819 >> 1, 744 >> 1, 682 >> 1, 630 >> 1, 585 >> 1,
-    546 >> 1, 512 >> 1,
+       /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+       8191 >> 1, 4096 >> 1, 2730 >> 1, 2048 >> 1, 1638 >> 1, 1365 >> 1, 1170 >> 1, 1024 >> 1, 910 >> 1, 819 >> 1, 744 >> 1, 682 >> 1, 630 >> 1, 585 >> 1,
+            546 >> 1, 512 >> 1,
 
-  /* 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 */
-  481 >> 1, 455 >> 1, 431 >> 1, 409 >> 1, 390 >> 1, 372 >> 1, 356 >> 1, 341 >> 1, 327 >> 1, 315 >> 1, 303 >> 1, 292 >> 1, 282 >> 1, 273 >> 1, 264 >> 1,
-    256 >> 1,
+            /* 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 */
+            481 >> 1, 455 >> 1, 431 >> 1, 409 >> 1, 390 >> 1, 372 >> 1, 356 >> 1, 341 >> 1, 327 >> 1, 315 >> 1, 303 >> 1, 292 >> 1, 282 >> 1, 273 >> 1, 264 >> 1,
+            256 >> 1,
 
-  /* 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 */
-  248 >> 1, 240 >> 1, 234 >> 1, 227 >> 1, 221 >> 1, 215 >> 1, 210 >> 1, 204 >> 1, 199 >> 1, 195 >> 1, 190 >> 1, 186 >> 1, 182 >> 1, 178 >> 1, 174 >> 1,
-    170 >> 1,
+            /* 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 */
+            248 >> 1, 240 >> 1, 234 >> 1, 227 >> 1, 221 >> 1, 215 >> 1, 210 >> 1, 204 >> 1, 199 >> 1, 195 >> 1, 190 >> 1, 186 >> 1, 182 >> 1, 178 >> 1, 174 >> 1,
+            170 >> 1,
 
-  /* 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 */
-  167 >> 1, 163 >> 1, 160 >> 1, 157 >> 1, 154 >> 1, 151 >> 1, 148 >> 1, 146 >> 1, 143 >> 1, 141 >> 1, 138 >> 1, 136 >> 1, 134 >> 1, 132 >> 1, 130 >> 1, 128 >> 1
+            /* 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 */
+            167 >> 1, 163 >> 1, 160 >> 1, 157 >> 1, 154 >> 1, 151 >> 1, 148 >> 1, 146 >> 1, 143 >> 1, 141 >> 1, 138 >> 1, 136 >> 1, 134 >> 1, 132 >> 1, 130 >> 1, 128 >> 1
 };
 
 #else
 #error "sh_css_params.c: VAMEM version must \
-       be one of {VAMEM_VERSION_1, VAMEM_VERSION_2}"
+be one of {VAMEM_VERSION_1, VAMEM_VERSION_2}"
 #endif
 
 void
index d26df92aa2b60f73fcd53221fa2c29c9ee182a2a..22189c936f643bb9e4188b3a06edac7801fb92fd 100644 (file)
@@ -44,7 +44,7 @@
 /* Number of elements in the xnr table. */
 #define IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2      6
 /* Number of elements in the xnr table. */
-#define IA_CSS_VAMEM_2_XNR_TABLE_SIZE          BIT(IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2)
+#define IA_CSS_VAMEM_2_XNR_TABLE_SIZE          BIT(IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2)
 
 /** IA_CSS_VAMEM_TYPE_1(ISP2300) or
      IA_CSS_VAMEM_TYPE_2(ISP2400) */
index 59e6da4b25462fa8119e7750498f3aabb90b6b16..886abff24a219a9d8b8d701764881b2f6ec25de0 100644 (file)
 #define XNR3_LOOK_UP_TABLE_POINTS 16
 
 static const s16 x[XNR3_LOOK_UP_TABLE_POINTS] = {
-1024, 1164, 1320, 1492, 1680, 1884, 2108, 2352,
-2616, 2900, 3208, 3540, 3896, 4276, 4684, 5120};
+       1024, 1164, 1320, 1492, 1680, 1884, 2108, 2352,
+       2616, 2900, 3208, 3540, 3896, 4276, 4684, 5120
+};
 
 static const s16 a[XNR3_LOOK_UP_TABLE_POINTS] = {
--7213, -5580, -4371, -3421, -2722, -2159, -6950, -5585,
--4529, -3697, -3010, -2485, -2070, -1727, -1428, 0};
+       -7213, -5580, -4371, -3421, -2722, -2159, -6950, -5585,
+           -4529, -3697, -3010, -2485, -2070, -1727, -1428, 0
+    };
 
 static const s16 b[XNR3_LOOK_UP_TABLE_POINTS] = {
-4096, 3603, 3178, 2811, 2497, 2226, 1990, 1783,
-1603, 1446, 1307, 1185, 1077, 981, 895, 819};
+       4096, 3603, 3178, 2811, 2497, 2226, 1990, 1783,
+       1603, 1446, 1307, 1185, 1077, 981, 895, 819
+};
 
 static const s16 c[XNR3_LOOK_UP_TABLE_POINTS] = {
-1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+       1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
 
 /*
 #endif
@@ -146,9 +150,9 @@ compute_blending(int strength)
 
 void
 ia_css_xnr3_encode(
-       struct sh_css_isp_xnr3_params *to,
-       const struct ia_css_xnr3_config *from,
-       unsigned int size)
+    struct sh_css_isp_xnr3_params *to,
+    const struct ia_css_xnr3_config *from,
+    unsigned int size)
 {
        int kernel_size = XNR_FILTER_SIZE;
        /* The adjust factor is the next power of 2
@@ -203,9 +207,9 @@ ia_css_xnr3_encode(
 */
 void
 ia_css_xnr3_vmem_encode(
-       struct sh_css_isp_xnr3_vmem_params *to,
-       const struct ia_css_xnr3_config *from,
-       unsigned int size)
+    struct sh_css_isp_xnr3_vmem_params *to,
+    const struct ia_css_xnr3_config *from,
+    unsigned int size)
 {
        unsigned int i, j, base;
        const unsigned int total_blocks = 4;
@@ -256,8 +260,8 @@ ia_css_xnr3_vmem_encode(
 /* Dummy Function added as the tool expects it*/
 void
 ia_css_xnr3_debug_dtrace(
-       const struct ia_css_xnr3_config *config,
-       unsigned int level)
+    const struct ia_css_xnr3_config *config,
+    unsigned int level)
 {
        (void)config;
        (void)level;
index 27f969f3a201d71574e3aa1a4e3b224d8143b61f..f6b9e131058860387583bc6e56aaf711ac1785e9 100644 (file)
@@ -22,21 +22,21 @@ extern const struct ia_css_xnr3_config default_xnr3_config;
 
 void
 ia_css_xnr3_encode(
-       struct sh_css_isp_xnr3_params *to,
-       const struct ia_css_xnr3_config *from,
-       unsigned int size);
+    struct sh_css_isp_xnr3_params *to,
+    const struct ia_css_xnr3_config *from,
+    unsigned int size);
 
 #ifdef ISP2401
 void
 ia_css_xnr3_vmem_encode(
-       struct sh_css_isp_xnr3_vmem_params *to,
-       const struct ia_css_xnr3_config *from,
-       unsigned int size);
+    struct sh_css_isp_xnr3_vmem_params *to,
+    const struct ia_css_xnr3_config *from,
+    unsigned int size);
 
 #endif
 void
 ia_css_xnr3_debug_dtrace(
-       const struct ia_css_xnr3_config *config,
-       unsigned int level);
+    const struct ia_css_xnr3_config *config,
+    unsigned int level);
 
 #endif /* __IA_CSS_XNR3_HOST_H */
index a23d876147ada112e11ed49d803cddac00204b39..a1d0e915636de7bc74d5802c791d1df689e9864d 100644 (file)
@@ -36,14 +36,14 @@ const struct ia_css_ee_config default_ee_config = {
 
 void
 ia_css_nr_encode(
-       struct sh_css_isp_ynr_params *to,
-       const struct ia_css_nr_config *from,
-       unsigned int size)
+    struct sh_css_isp_ynr_params *to,
+    const struct ia_css_nr_config *from,
+    unsigned int size)
 {
        (void)size;
        /* YNR (Y Noise Reduction) */
        to->threshold =
-               uDIGIT_FITTING(8192U, 16, SH_CSS_BAYER_BITS);
+           uDIGIT_FITTING(8192U, 16, SH_CSS_BAYER_BITS);
        to->gain_all =
            uDIGIT_FITTING(from->ynr_gain, 16, SH_CSS_YNR_GAIN_SHIFT);
        to->gain_dir =
@@ -56,9 +56,9 @@ ia_css_nr_encode(
 
 void
 ia_css_yee_encode(
-       struct sh_css_isp_yee_params *to,
-       const struct ia_css_yee_config *from,
-       unsigned int size)
+    struct sh_css_isp_yee_params *to,
+    const struct ia_css_yee_config *from,
+    unsigned int size)
 {
        int asiWk1 = (int)from->ee.gain;
        int asiWk2 = asiWk1 / 8;
@@ -68,11 +68,11 @@ ia_css_yee_encode(
        /* YEE (Y Edge Enhancement) */
        to->dirthreshold_s =
            min((uDIGIT_FITTING(from->nr.direction, 16, SH_CSS_BAYER_BITS)
-                                   << 1),
+                << 1),
                SH_CSS_BAYER_MAXVAL);
        to->dirthreshold_g =
            min((uDIGIT_FITTING(from->nr.direction, 16, SH_CSS_BAYER_BITS)
-                                   << 4),
+                << 4),
                SH_CSS_BAYER_MAXVAL);
        to->dirthreshold_width_log2 =
            uFRACTION_BITS_FITTING(8);
@@ -111,107 +111,107 @@ ia_css_yee_encode(
 
 void
 ia_css_nr_dump(
-       const struct sh_css_isp_ynr_params *ynr,
-       unsigned int level)
+    const struct sh_css_isp_ynr_params *ynr,
+    unsigned int level)
 {
        if (!ynr) return;
        ia_css_debug_dtrace(level,
-               "Y Noise Reduction:\n");
+                           "Y Noise Reduction:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ynr_threshold", ynr->threshold);
+                           "ynr_threshold", ynr->threshold);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ynr_gain_all", ynr->gain_all);
+                           "ynr_gain_all", ynr->gain_all);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ynr_gain_dir", ynr->gain_dir);
+                           "ynr_gain_dir", ynr->gain_dir);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ynr_threshold_cb", ynr->threshold_cb);
+                           "ynr_threshold_cb", ynr->threshold_cb);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ynr_threshold_cr", ynr->threshold_cr);
+                           "ynr_threshold_cr", ynr->threshold_cr);
 }
 
 void
 ia_css_yee_dump(
-       const struct sh_css_isp_yee_params *yee,
-       unsigned int level)
+    const struct sh_css_isp_yee_params *yee,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "Y Edge Enhancement:\n");
+                           "Y Edge Enhancement:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ynryee_dirthreshold_s",
-                       yee->dirthreshold_s);
+                           "ynryee_dirthreshold_s",
+                           yee->dirthreshold_s);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ynryee_dirthreshold_g",
-                       yee->dirthreshold_g);
+                           "ynryee_dirthreshold_g",
+                           yee->dirthreshold_g);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ynryee_dirthreshold_width_log2",
-                       yee->dirthreshold_width_log2);
+                           "ynryee_dirthreshold_width_log2",
+                           yee->dirthreshold_width_log2);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ynryee_dirthreshold_width",
-                       yee->dirthreshold_width);
+                           "ynryee_dirthreshold_width",
+                           yee->dirthreshold_width);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_detailgain",
-                       yee->detailgain);
+                           "yee_detailgain",
+                           yee->detailgain);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_coring_s",
-                       yee->coring_s);
+                           "yee_coring_s",
+                           yee->coring_s);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_coring_g",
-                       yee->coring_g);
+                           "yee_coring_g",
+                           yee->coring_g);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_scale_plus_s",
-                       yee->scale_plus_s);
+                           "yee_scale_plus_s",
+                           yee->scale_plus_s);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_scale_plus_g",
-                       yee->scale_plus_g);
+                           "yee_scale_plus_g",
+                           yee->scale_plus_g);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_scale_minus_s",
-                       yee->scale_minus_s);
+                           "yee_scale_minus_s",
+                           yee->scale_minus_s);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_scale_minus_g",
-                       yee->scale_minus_g);
+                           "yee_scale_minus_g",
+                           yee->scale_minus_g);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_clip_plus_s",
-                       yee->clip_plus_s);
+                           "yee_clip_plus_s",
+                           yee->clip_plus_s);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_clip_plus_g",
-                       yee->clip_plus_g);
+                           "yee_clip_plus_g",
+                           yee->clip_plus_g);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_clip_minus_s",
-                       yee->clip_minus_s);
+                           "yee_clip_minus_s",
+                           yee->clip_minus_s);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "yee_clip_minus_g",
-                       yee->clip_minus_g);
+                           "yee_clip_minus_g",
+                           yee->clip_minus_g);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
-                       "ynryee_Yclip",
-                       yee->Yclip);
+                           "ynryee_Yclip",
+                           yee->Yclip);
 }
 
 void
 ia_css_nr_debug_dtrace(
-       const struct ia_css_nr_config *config,
-       unsigned int level)
+    const struct ia_css_nr_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.direction=%d, config.bnr_gain=%d, config.ynr_gain=%d, config.threshold_cb=%d, config.threshold_cr=%d\n",
-               config->direction,
-               config->bnr_gain, config->ynr_gain,
-               config->threshold_cb, config->threshold_cr);
+                           "config.direction=%d, config.bnr_gain=%d, config.ynr_gain=%d, config.threshold_cb=%d, config.threshold_cr=%d\n",
+                           config->direction,
+                           config->bnr_gain, config->ynr_gain,
+                           config->threshold_cb, config->threshold_cr);
 }
 
 void
 ia_css_ee_debug_dtrace(
-       const struct ia_css_ee_config *config,
-       unsigned int level)
+    const struct ia_css_ee_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.threshold=%d, config.gain=%d, config.detail_gain=%d\n",
-               config->threshold, config->gain, config->detail_gain);
+                           "config.threshold=%d, config.gain=%d, config.detail_gain=%d\n",
+                           config->threshold, config->gain, config->detail_gain);
 }
 
 void
 ia_css_init_ynr_state(
-       void/*struct sh_css_isp_ynr_vmem_state*/ * state,
-       size_t size)
+    void/*struct sh_css_isp_ynr_vmem_state*/ * state,
+    size_t size)
 {
        memset(state, 0, size);
 }
index 63a26538b7bd1f8c831334354245ddc7ec3bd715..20165093a298fb735ed3b4f72509389029b67d69 100644 (file)
@@ -23,38 +23,38 @@ extern const struct ia_css_ee_config default_ee_config;
 
 void
 ia_css_nr_encode(
-       struct sh_css_isp_ynr_params *to,
-       const struct ia_css_nr_config *from,
-       unsigned int size);
+    struct sh_css_isp_ynr_params *to,
+    const struct ia_css_nr_config *from,
+    unsigned int size);
 
 void
 ia_css_yee_encode(
-       struct sh_css_isp_yee_params *to,
-       const struct ia_css_yee_config *from,
-       unsigned int size);
+    struct sh_css_isp_yee_params *to,
+    const struct ia_css_yee_config *from,
+    unsigned int size);
 
 void
 ia_css_nr_dump(
-       const struct sh_css_isp_ynr_params *ynr,
-       unsigned int level);
+    const struct sh_css_isp_ynr_params *ynr,
+    unsigned int level);
 
 void
 ia_css_yee_dump(
-       const struct sh_css_isp_yee_params *yee,
-       unsigned int level);
+    const struct sh_css_isp_yee_params *yee,
+    unsigned int level);
 
 void
 ia_css_nr_debug_dtrace(
-       const struct ia_css_nr_config *config,
-       unsigned int level);
+    const struct ia_css_nr_config *config,
+    unsigned int level);
 
 void
 ia_css_ee_debug_dtrace(
-       const struct ia_css_ee_config *config,
-       unsigned int level);
+    const struct ia_css_ee_config *config,
+    unsigned int level);
 
 void
 ia_css_init_ynr_state(
-       void/*struct sh_css_isp_ynr_vmem_state*/ * state,
-       size_t size);
+    void/*struct sh_css_isp_ynr_vmem_state*/ * state,
+    size_t size);
 #endif /* __IA_CSS_YNR_HOST_H */
index 4c5c2f0010d26b9c92f8173cf8dd449b3d6800ad..63aa76f1c4e50ad38644f35e2e33270ccdb440de 100644 (file)
@@ -20,7 +20,7 @@
 
 /* YNR (luminance noise reduction) */
 struct sh_css_isp_ynr_vmem_state {
-       VMEM_ARRAY(ynr_buf[4], MAX_VECTORS_PER_BUF_LINE * ISP_NWAY);
+       VMEM_ARRAY(ynr_buf[4], MAX_VECTORS_PER_BUF_LINE *ISP_NWAY);
 };
 
 #endif /* __IA_CSS_YNR_STATE_H */
index d162fc08b4ddd5185bdfc453e8d1bc2b2c98fa9a..9a3cd59c45075b48d719204dfd1c1ec90753f86e 100644 (file)
@@ -44,9 +44,9 @@ const struct ia_css_fc_config default_fc_config = {
 
 void
 ia_css_ynr_encode(
-       struct sh_css_isp_yee2_params *to,
-       const struct ia_css_ynr_config *from,
-       unsigned int size)
+    struct sh_css_isp_yee2_params *to,
+    const struct ia_css_ynr_config *from,
+    unsigned int size)
 {
        (void)size;
        to->edge_sense_gain_0   = from->edge_sense_gain_0;
@@ -57,9 +57,9 @@ ia_css_ynr_encode(
 
 void
 ia_css_fc_encode(
-       struct sh_css_isp_fc_params *to,
-       const struct ia_css_fc_config *from,
-       unsigned int size)
+    struct sh_css_isp_fc_params *to,
+    const struct ia_css_fc_config *from,
+    unsigned int size)
 {
        (void)size;
        to->gain_exp   = from->gain_exp;
@@ -82,37 +82,37 @@ ia_css_fc_encode(
 
 void
 ia_css_ynr_dump(
-       const struct sh_css_isp_yee2_params *yee2,
-       unsigned int level);
+    const struct sh_css_isp_yee2_params *yee2,
+    unsigned int level);
 
 void
 ia_css_fc_dump(
-       const struct sh_css_isp_fc_params *fc,
-       unsigned int level);
+    const struct sh_css_isp_fc_params *fc,
+    unsigned int level);
 
 void
 ia_css_fc_debug_dtrace(
-       const struct ia_css_fc_config *config,
-       unsigned int level)
+    const struct ia_css_fc_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.gain_exp=%d, config.coring_pos_0=%d, config.coring_pos_1=%d, config.coring_neg_0=%d, config.coring_neg_1=%d, config.gain_pos_0=%d, config.gain_pos_1=%d, config.gain_neg_0=%d, config.gain_neg_1=%d, config.crop_pos_0=%d, config.crop_pos_1=%d, config.crop_neg_0=%d, config.crop_neg_1=%d\n",
-               config->gain_exp,
-               config->coring_pos_0, config->coring_pos_1,
-               config->coring_neg_0, config->coring_neg_1,
-               config->gain_pos_0, config->gain_pos_1,
-               config->gain_neg_0, config->gain_neg_1,
-               config->crop_pos_0, config->crop_pos_1,
-               config->crop_neg_0, config->crop_neg_1);
+                           "config.gain_exp=%d, config.coring_pos_0=%d, config.coring_pos_1=%d, config.coring_neg_0=%d, config.coring_neg_1=%d, config.gain_pos_0=%d, config.gain_pos_1=%d, config.gain_neg_0=%d, config.gain_neg_1=%d, config.crop_pos_0=%d, config.crop_pos_1=%d, config.crop_neg_0=%d, config.crop_neg_1=%d\n",
+                           config->gain_exp,
+                           config->coring_pos_0, config->coring_pos_1,
+                           config->coring_neg_0, config->coring_neg_1,
+                           config->gain_pos_0, config->gain_pos_1,
+                           config->gain_neg_0, config->gain_neg_1,
+                           config->crop_pos_0, config->crop_pos_1,
+                           config->crop_neg_0, config->crop_neg_1);
 }
 
 void
 ia_css_ynr_debug_dtrace(
-       const struct ia_css_ynr_config *config,
-       unsigned int level)
+    const struct ia_css_ynr_config *config,
+    unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.edge_sense_gain_0=%d, config.edge_sense_gain_1=%d, config.corner_sense_gain_0=%d, config.corner_sense_gain_1=%d\n",
-               config->edge_sense_gain_0, config->edge_sense_gain_1,
-               config->corner_sense_gain_0, config->corner_sense_gain_1);
+                           "config.edge_sense_gain_0=%d, config.edge_sense_gain_1=%d, config.corner_sense_gain_0=%d, config.corner_sense_gain_1=%d\n",
+                           config->edge_sense_gain_0, config->edge_sense_gain_1,
+                           config->corner_sense_gain_0, config->corner_sense_gain_1);
 }
index 8ee483a91d08eb3bdababea52b66fc437bef1de7..38204f8c5735f212ba7106397273ae0fd643d037 100644 (file)
@@ -23,34 +23,34 @@ extern const struct ia_css_fc_config  default_fc_config;
 
 void
 ia_css_ynr_encode(
-       struct sh_css_isp_yee2_params *to,
-       const struct ia_css_ynr_config *from,
-       unsigned int size);
+    struct sh_css_isp_yee2_params *to,
+    const struct ia_css_ynr_config *from,
+    unsigned int size);
 
 void
 ia_css_fc_encode(
-       struct sh_css_isp_fc_params *to,
-       const struct ia_css_fc_config *from,
-       unsigned int size);
+    struct sh_css_isp_fc_params *to,
+    const struct ia_css_fc_config *from,
+    unsigned int size);
 
 void
 ia_css_ynr_dump(
-       const struct sh_css_isp_yee2_params *yee2,
-       unsigned int level);
+    const struct sh_css_isp_yee2_params *yee2,
+    unsigned int level);
 
 void
 ia_css_fc_dump(
-       const struct sh_css_isp_fc_params *fc,
-       unsigned int level);
+    const struct sh_css_isp_fc_params *fc,
+    unsigned int level);
 
 void
 ia_css_fc_debug_dtrace(
-       const struct ia_css_fc_config *config,
-       unsigned int level);
+    const struct ia_css_fc_config *config,
+    unsigned int level);
 
 void
 ia_css_ynr_debug_dtrace(
-       const struct ia_css_ynr_config *config,
-       unsigned int level);
+    const struct ia_css_ynr_config *config,
+    unsigned int level);
 
 #endif /* __IA_CSS_YNR2_HOST_H */
index 32714d5870cf98f8eab0f82ddbce6d82d7084c44..490bef3ebe80a35f8d1505e9c930fa82e62a79ae 100644 (file)
@@ -53,18 +53,21 @@ more details.
 
 #if ENABLE_CONTINUOUS
 typedef struct {
-  tmemvectoru  raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE_CONT]; /* 2 bayer lines */
-  /* Two more lines for SP raw copy efficiency */
+       tmemvectoru
+       raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE_CONT]; /* 2 bayer lines */
+       /* Two more lines for SP raw copy efficiency */
 #ifndef ENABLE_REDUCED_INPUT_BUFFER
-  /* "Workaround" solution in the case that space needed vmem exceeds the size of the vmem. */
-  /* Since in theory this buffer is not needed for IPU 2.2/2.3,  */
-  /* the workaround solution will not be needed (and the whole buffer) after the code refactoring. */
-  tmemvectoru _raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE_CONT]; /* 2 bayer lines */
+       /* "Workaround" solution in the case that space needed vmem exceeds the size of the vmem. */
+       /* Since in theory this buffer is not needed for IPU 2.2/2.3,  */
+       /* the workaround solution will not be needed (and the whole buffer) after the code refactoring. */
+       tmemvectoru
+       _raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE_CONT]; /* 2 bayer lines */
 #endif
 } input_line_type;
 #else /* ENABLE CONTINUOUS == 0 */
 typedef struct {
-  tmemvectoru  raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE]; /* 2 bayer lines */
+       tmemvectoru
+       raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE]; /* 2 bayer lines */
 } input_line_type;
 #endif /* ENABLE_CONTINUOUS */
 
index 392b5dd334fb3c3ac94a1a674cefffa3b546623e..b1854fa85d6185cee7cb415d531636e26a970c15 100644 (file)
@@ -51,7 +51,7 @@ more details.
 */
 /* The binary id is used in pre-processor expressions so we cannot
  * use an enum here. */
- /* 24xx pipelines*/
+/* 24xx pipelines*/
 #define SH_CSS_BINARY_ID_COPY                      0
 #define SH_CSS_BINARY_ID_BAYER_DS                  1
 #define SH_CSS_BINARY_ID_VF_PP_FULL                2
index 2c6d1f8dcbb91590b41553434b18418ae7bd49bb..05b76de36fe2293d1723a9b043056b5bd92b6cf5 100644 (file)
@@ -51,20 +51,20 @@ struct s_isp_gdcac_config {
 
 /* output.hive.c request information */
 typedef enum {
-  output_y_channel,
-  output_c_channel,
-  OUTPUT_NUM_CHANNELS
+       output_y_channel,
+       output_c_channel,
+       OUTPUT_NUM_CHANNELS
 } output_channel_type;
 
 typedef struct s_output_dma_info {
-  unsigned int cond;           /* Condition for transfer */
-  output_channel_type channel_type;
-  dma_channel         channel;
-  unsigned int width_a;
-  unsigned int width_b;
-  unsigned int stride;
-  unsigned int v_delta;                /* Offset for v address to do cropping */
-  char               *x_base;           /* X base address */
+       unsigned int cond;              /* Condition for transfer */
+       output_channel_type channel_type;
+       dma_channel         channel;
+       unsigned int width_a;
+       unsigned int width_b;
+       unsigned int stride;
+       unsigned int v_delta;           /* Offset for v address to do cropping */
+       char               *x_base;           /* X base address */
 } output_dma_info_type;
 #endif
 
index 8246ae402075d1e5bf5878c188164637a68257ea..e640d5daf502746b4e73352c8c7e881ae698a215 100644 (file)
@@ -17,19 +17,19 @@ more details.
 #include "memory_access.h"
 
 static bool realloc_isp_css_mm_buf(
-       hrt_vaddress * curr_buf,
-       size_t *curr_size,
-       size_t needed_size,
-       bool force,
-       enum ia_css_err *err,
-       uint16_t mmgr_attribute);
+    hrt_vaddress *curr_buf,
+    size_t *curr_size,
+    size_t needed_size,
+    bool force,
+    enum ia_css_err *err,
+    uint16_t mmgr_attribute);
 
 bool reallocate_buffer(
-       hrt_vaddress * curr_buf,
-       size_t *curr_size,
-       size_t needed_size,
-       bool force,
-       enum ia_css_err *err)
+    hrt_vaddress *curr_buf,
+    size_t *curr_size,
+    size_t needed_size,
+    bool force,
+    enum ia_css_err *err)
 {
        bool ret;
        u16     mmgr_attribute = MMGR_ATTRIBUTE_DEFAULT;
@@ -37,19 +37,19 @@ bool reallocate_buffer(
        IA_CSS_ENTER_PRIVATE("void");
 
        ret = realloc_isp_css_mm_buf(curr_buf,
-               curr_size, needed_size, force, err, mmgr_attribute);
+                                    curr_size, needed_size, force, err, mmgr_attribute);
 
        IA_CSS_LEAVE_PRIVATE("ret=%d", ret);
        return ret;
 }
 
 static bool realloc_isp_css_mm_buf(
-       hrt_vaddress * curr_buf,
-       size_t *curr_size,
-       size_t needed_size,
-       bool force,
-       enum ia_css_err *err,
-       uint16_t mmgr_attribute)
+    hrt_vaddress *curr_buf,
+    size_t *curr_size,
+    size_t needed_size,
+    bool force,
+    enum ia_css_err *err,
+    uint16_t mmgr_attribute)
 {
        s32 id;
 
@@ -59,7 +59,8 @@ static bool realloc_isp_css_mm_buf(
 
        IA_CSS_ENTER_PRIVATE("void");
 
-       if (ia_css_refcount_is_single(*curr_buf) && !force && *curr_size >= needed_size) {
+       if (ia_css_refcount_is_single(*curr_buf) && !force &&
+           *curr_size >= needed_size) {
                IA_CSS_LEAVE_PRIVATE("false");
                return false;
        }
@@ -67,7 +68,7 @@ static bool realloc_isp_css_mm_buf(
        id = IA_CSS_REFCOUNT_PARAM_BUFFER;
        ia_css_refcount_decrement(id, *curr_buf);
        *curr_buf = ia_css_refcount_increment(id, mmgr_alloc_attr(needed_size,
-                                                       mmgr_attribute));
+                                             mmgr_attribute));
 
        if (!*curr_buf) {
                *err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
index b62c4d321a4ec65cf9165c2e2e6ff39e7687fb81..17560e4abfb3f6e15b0352ecd9adc4acdee9fce9 100644 (file)
@@ -177,17 +177,17 @@ ia_css_binary_uninit(void);
 
 enum ia_css_err
 ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
-                bool online,
-                bool two_ppc,
-                enum atomisp_input_format stream_format,
-                const struct ia_css_frame_info *in_info,
-                const struct ia_css_frame_info *bds_out_info,
-                const struct ia_css_frame_info *out_info[],
-                const struct ia_css_frame_info *vf_info,
-                struct ia_css_binary *binary,
-                struct ia_css_resolution *dvs_env,
-                int stream_config_left_padding,
-                bool accelerator);
+                       bool online,
+                       bool two_ppc,
+                       enum atomisp_input_format stream_format,
+                       const struct ia_css_frame_info *in_info,
+                       const struct ia_css_frame_info *bds_out_info,
+                       const struct ia_css_frame_info *out_info[],
+                       const struct ia_css_frame_info *vf_info,
+                       struct ia_css_binary *binary,
+                       struct ia_css_resolution *dvs_env,
+                       int stream_config_left_padding,
+                       bool accelerator);
 
 enum ia_css_err
 ia_css_binary_find(struct ia_css_binary_descr *descr,
@@ -218,14 +218,14 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
  */
 enum ia_css_err
 ia_css_binary_get_shading_info(const struct ia_css_binary *binary,
-                       enum ia_css_shading_correction_type type,
-                       unsigned int required_bds_factor,
-                       const struct ia_css_stream_config *stream_config,
+                              enum ia_css_shading_correction_type type,
+                              unsigned int required_bds_factor,
+                              const struct ia_css_stream_config *stream_config,
 #ifndef ISP2401
-                       struct ia_css_shading_info *info);
+                              struct ia_css_shading_info *info);
 #else
-                       struct ia_css_shading_info *shading_info,
-                       struct ia_css_pipe_config *pipe_config);
+                              struct ia_css_shading_info *shading_info,
+                              struct ia_css_pipe_config *pipe_config);
 #endif
 
 enum ia_css_err
@@ -240,9 +240,9 @@ ia_css_binary_dvs_grid_info(const struct ia_css_binary *binary,
 
 void
 ia_css_binary_dvs_stat_grid_info(
-       const struct ia_css_binary *binary,
-       struct ia_css_grid_info *info,
-       struct ia_css_pipe *pipe);
+    const struct ia_css_binary *binary,
+    struct ia_css_grid_info *info,
+    struct ia_css_pipe *pipe);
 
 unsigned
 ia_css_binary_max_vf_width(void);
@@ -252,6 +252,6 @@ ia_css_binary_destroy_isp_parameters(struct ia_css_binary *binary);
 
 void
 ia_css_binary_get_isp_binaries(struct ia_css_binary_xinfo **binaries,
-       uint32_t *num_isp_binaries);
+                              uint32_t *num_isp_binaries);
 
 #endif /* _IA_CSS_BINARY_H_ */
index d07a4b0132a148a7bdadcb2d3d5a075765928d17..8f012aece09cea3390a033cf972c2a9817bd5731 100644 (file)
@@ -79,16 +79,16 @@ ia_css_binary_internal_res(const struct ia_css_frame_info *in_info,
        if (binary_supports_yuv_ds) {
                if (in_info) {
                        isp_tmp_internal_width = in_info->res.width
-                               + info->pipeline.left_cropping + binary_dvs_env.width;
+                                                + info->pipeline.left_cropping + binary_dvs_env.width;
                        isp_tmp_internal_height = in_info->res.height
-                               + info->pipeline.top_cropping + binary_dvs_env.height;
+                                                 + info->pipeline.top_cropping + binary_dvs_env.height;
                }
        } else if ((bds_out_info) && (out_info) &&
-                               /* TODO: hack to make video_us case work. this should be reverted after
-                               a nice solution in ISP */
-                               (bds_out_info->res.width >= out_info->res.width)) {
-                       isp_tmp_internal_width = bds_out_info->padded_width;
-                       isp_tmp_internal_height = bds_out_info->res.height;
+                  /* TODO: hack to make video_us case work. this should be reverted after
+                  a nice solution in ISP */
+                  (bds_out_info->res.width >= out_info->res.width)) {
+               isp_tmp_internal_width = bds_out_info->padded_width;
+               isp_tmp_internal_height = bds_out_info->res.height;
        } else {
                if (out_info) {
                        isp_tmp_internal_width = out_info->padded_width;
@@ -99,13 +99,13 @@ ia_css_binary_internal_res(const struct ia_css_frame_info *in_info,
        /* We first calculate the resolutions used by the ISP. After that,
         * we use those resolutions to compute sizes for tables etc. */
        internal_res->width = __ISP_INTERNAL_WIDTH(isp_tmp_internal_width,
-               (int)binary_dvs_env.width,
-               info->pipeline.left_cropping, info->pipeline.mode,
-               info->pipeline.c_subsampling,
-               info->output.num_chunks, info->pipeline.pipelining);
+                             (int)binary_dvs_env.width,
+                             info->pipeline.left_cropping, info->pipeline.mode,
+                             info->pipeline.c_subsampling,
+                             info->output.num_chunks, info->pipeline.pipelining);
        internal_res->height = __ISP_INTERNAL_HEIGHT(isp_tmp_internal_height,
-               info->pipeline.top_cropping,
-               binary_dvs_env.height);
+                              info->pipeline.top_cropping,
+                              binary_dvs_env.height);
 }
 
 #ifndef ISP2401
@@ -138,16 +138,16 @@ struct sh_css_binary_sc_requirements {
 static enum ia_css_err
 #ifndef ISP2401
 ia_css_binary_compute_shading_table_bayer_origin(
-       const struct ia_css_binary *binary,                             /* [in] */
-       unsigned int required_bds_factor,                               /* [in] */
-       const struct ia_css_stream_config *stream_config,               /* [in] */
-       struct sh_css_shading_table_bayer_origin_compute_results *res)  /* [out] */
+    const struct ia_css_binary *binary,                                /* [in] */
+    unsigned int required_bds_factor,                          /* [in] */
+    const struct ia_css_stream_config *stream_config,          /* [in] */
+    struct sh_css_shading_table_bayer_origin_compute_results *res)     /* [out] */
 #else
 sh_css_binary_get_sc_requirements(
-       const struct ia_css_binary *binary,                     /* [in] */
-       unsigned int required_bds_factor,                       /* [in] */
-       const struct ia_css_stream_config *stream_config,       /* [in] */
-       struct sh_css_binary_sc_requirements *scr)              /* [out] */
+    const struct ia_css_binary *binary,                        /* [in] */
+    unsigned int required_bds_factor,                  /* [in] */
+    const struct ia_css_stream_config *stream_config,  /* [in] */
+    struct sh_css_binary_sc_requirements *scr)         /* [out] */
 #endif
 {
        enum ia_css_err err;
@@ -198,7 +198,7 @@ sh_css_binary_get_sc_requirements(
 
        /* Get the numerator and denominator of bayer downscaling factor. */
        err = sh_css_bds_factor_get_numerator_denominator
-               (required_bds_factor, &bds_num, &bds_den);
+       (required_bds_factor, &bds_num, &bds_den);
        if (err != IA_CSS_SUCCESS)
 #else
        /* Flags corresponding to NEED_BDS_FACTOR_2_00/NEED_BDS_FACTOR_1_50/NEED_BDS_FACTOR_1_25 macros
@@ -225,264 +225,273 @@ sh_css_binary_get_sc_requirements(
        unsigned int sensor_data_origin_y_bqs_on_internal;
 
        IA_CSS_ENTER_PRIVATE("binary=%p, required_bds_factor=%d, stream_config=%p",
-               binary, required_bds_factor, stream_config);
+                            binary, required_bds_factor, stream_config);
 
        /* Get the numerator and denominator of the required bayer downscaling factor. */
        err = sh_css_bds_factor_get_numerator_denominator(required_bds_factor, &bds_num, &bds_den);
-       if (err != IA_CSS_SUCCESS) {
+       if (err != IA_CSS_SUCCESS)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(err);
 #endif
                return err;
 #ifdef ISP2401
-       }
+}
 #endif
 
 #ifndef ISP2401
-       /* Set the horizontal/vertical ratio of bayer scaling
-       between input area and output area. */
+/* Set the horizontal/vertical ratio of bayer scaling
+between input area and output area. */
 #else
-       IA_CSS_LOG("bds_num=%d, bds_den=%d", bds_num, bds_den);
+IA_CSS_LOG("bds_num=%d, bds_den=%d", bds_num, bds_den);
 
-       /* Set the horizontal/vertical ratio of bayer scaling between input area and output area. */
+/* Set the horizontal/vertical ratio of bayer scaling between input area and output area. */
 #endif
-       bs_hor_ratio_in  = bds_num;
-       bs_hor_ratio_out = bds_den;
-       bs_ver_ratio_in  = bds_num;
-       bs_ver_ratio_out = bds_den;
+bs_hor_ratio_in  = bds_num;
+bs_hor_ratio_out = bds_den;
+bs_ver_ratio_in  = bds_num;
+bs_ver_ratio_out = bds_den;
 
 #ifndef ISP2401
-       /* Set the left padding set by InputFormatter. (ifmtr.c) */
+/* Set the left padding set by InputFormatter. (ifmtr.c) */
 #else
-       /* Set the left padding set by InputFormatter. (ia_css_ifmtr_configure() in ifmtr.c) */
+/* Set the left padding set by InputFormatter. (ia_css_ifmtr_configure() in ifmtr.c) */
 #endif
-       if (stream_config->left_padding == -1)
-               left_padding_bqs = _ISP_BQS(binary->left_padding);
-       else
+if (stream_config->left_padding == -1)
+       left_padding_bqs = _ISP_BQS(binary->left_padding);
+else
 #ifndef ISP2401
-               left_padding_bqs = (unsigned int)((int)ISP_VEC_NELEMS
-                       - _ISP_BQS(stream_config->left_padding));
+       left_padding_bqs = (unsigned int)((int)ISP_VEC_NELEMS
+                                         - _ISP_BQS(stream_config->left_padding));
 #else
-               left_padding_bqs = (unsigned int)((int)ISP_VEC_NELEMS - _ISP_BQS(stream_config->left_padding));
+       left_padding_bqs = (unsigned int)((int)ISP_VEC_NELEMS - _ISP_BQS(stream_config->left_padding));
 #endif
 
 #ifndef ISP2401
-       /* Set the left padding adjusted inside the isp.
-       When bds_factor 2.00 is needed, some padding is added to left_padding
-       inside the isp, before bayer downscaling. (raw.isp.c)
-       (Hopefully, left_crop/left_padding/top_crop should be defined in css
-       appropriately, depending on bds_factor.)
-       */
+/* Set the left padding adjusted inside the isp.
+When bds_factor 2.00 is needed, some padding is added to left_padding
+inside the isp, before bayer downscaling. (raw.isp.c)
+(Hopefully, left_crop/left_padding/top_crop should be defined in css
+appropriately, depending on bds_factor.)
+*/
 #else
-       IA_CSS_LOG("stream.left_padding=%d, binary.left_padding=%d, left_padding_bqs=%d",
-               stream_config->left_padding, binary->left_padding, left_padding_bqs);
+IA_CSS_LOG("stream.left_padding=%d, binary.left_padding=%d, left_padding_bqs=%d",
+          stream_config->left_padding, binary->left_padding, left_padding_bqs);
 
-       /* Set the left padding adjusted inside the isp kernels.
       * When the bds_factor isn't 1.00, the left padding size is adjusted inside the isp,
       * before bayer downscaling. (scaled_hor_plane_index(), raw_compute_hphase() in raw.isp.c)
       */
+/* Set the left padding adjusted inside the isp kernels.
+ * When the bds_factor isn't 1.00, the left padding size is adjusted inside the isp,
+ * before bayer downscaling. (scaled_hor_plane_index(), raw_compute_hphase() in raw.isp.c)
+ */
 #endif
-       need_bds_factor_2_00 = ((binary->info->sp.bds.supported_bds_factors &
-               (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_00) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_50) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_3_00) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_00) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_50) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_5_00) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_6_00) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_8_00))) != 0);
+need_bds_factor_2_00 = ((binary->info->sp.bds.supported_bds_factors &
+                        (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_00) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_50) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_3_00) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_00) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_50) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_5_00) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_6_00) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_8_00))) != 0);
 
 #ifndef ISP2401
-       if (need_bds_factor_2_00 && binary->info->sp.pipeline.left_cropping > 0)
-               left_padding_adjusted_bqs = left_padding_bqs + ISP_VEC_NELEMS;
-       else
+if (need_bds_factor_2_00 && binary->info->sp.pipeline.left_cropping > 0)
+       left_padding_adjusted_bqs = left_padding_bqs + ISP_VEC_NELEMS;
+else
 #else
-       need_bds_factor_1_50 = ((binary->info->sp.bds.supported_bds_factors &
-               (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_1_50) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_25) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_3_00) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_50) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_6_00))) != 0);
-
-       need_bds_factor_1_25 = ((binary->info->sp.bds.supported_bds_factors &
-               (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_1_25) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_50) |
-                PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_5_00))) != 0);
-
-       if (binary->info->sp.pipeline.left_cropping > 0 &&
-           (need_bds_factor_2_00 || need_bds_factor_1_50 || need_bds_factor_1_25)) {
-               /*
-                * downscale 2.0  -> first_vec_adjusted_bqs = 128
-                * downscale 1.5  -> first_vec_adjusted_bqs = 96
-                * downscale 1.25 -> first_vec_adjusted_bqs = 80
-                */
-               unsigned int first_vec_adjusted_bqs
-                       = ISP_VEC_NELEMS * bs_hor_ratio_in / bs_hor_ratio_out;
-               left_padding_adjusted_bqs = first_vec_adjusted_bqs
-                       - _ISP_BQS(binary->info->sp.pipeline.left_cropping);
-       } else
+need_bds_factor_1_50 = ((binary->info->sp.bds.supported_bds_factors &
+                        (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_1_50) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_25) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_3_00) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_50) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_6_00))) != 0);
+
+need_bds_factor_1_25 = ((binary->info->sp.bds.supported_bds_factors &
+                        (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_1_25) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_50) |
+                         PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_5_00))) != 0);
+
+if (binary->info->sp.pipeline.left_cropping > 0 &&
+    (need_bds_factor_2_00 || need_bds_factor_1_50 || need_bds_factor_1_25))
+{
+       /*
+        * downscale 2.0  -> first_vec_adjusted_bqs = 128
+        * downscale 1.5  -> first_vec_adjusted_bqs = 96
+        * downscale 1.25 -> first_vec_adjusted_bqs = 80
+        */
+       unsigned int first_vec_adjusted_bqs
+       = ISP_VEC_NELEMS * bs_hor_ratio_in / bs_hor_ratio_out;
+       left_padding_adjusted_bqs = first_vec_adjusted_bqs
+       - _ISP_BQS(binary->info->sp.pipeline.left_cropping);
+} else
 #endif
-               left_padding_adjusted_bqs = left_padding_bqs;
+       left_padding_adjusted_bqs = left_padding_bqs;
 
 #ifndef ISP2401
-       /* Currently, the bad pixel caused by filters before bayer scaling
-       is NOT considered, because the bad pixel is subtle.
-       When some large filter is used in the future,
-       we need to consider the bad pixel.
-
-       Currently, when bds_factor isn't 1.00, 3x3 anti-alias filter is applied
-       to each color plane(Gr/R/B/Gb) before bayer downscaling.
-       This filter moves each color plane to right/bottom directions
-       by 1 pixel at the most, depending on downscaling factor.
-       */
-       bad_bqs_on_left_before_bs = 0;
-       bad_bqs_on_top_before_bs = 0;
+/* Currently, the bad pixel caused by filters before bayer scaling
+is NOT considered, because the bad pixel is subtle.
+When some large filter is used in the future,
+we need to consider the bad pixel.
+
+Currently, when bds_factor isn't 1.00, 3x3 anti-alias filter is applied
+to each color plane(Gr/R/B/Gb) before bayer downscaling.
+This filter moves each color plane to right/bottom directions
+by 1 pixel at the most, depending on downscaling factor.
+*/
+bad_bqs_on_left_before_bs = 0;
+bad_bqs_on_top_before_bs = 0;
 #else
-       IA_CSS_LOG("supported_bds_factors=%d, need_bds_factor:2_00=%d, 1_50=%d, 1_25=%d",
-               binary->info->sp.bds.supported_bds_factors,
-               need_bds_factor_2_00, need_bds_factor_1_50, need_bds_factor_1_25);
-       IA_CSS_LOG("left_cropping=%d, left_padding_adjusted_bqs=%d",
-               binary->info->sp.pipeline.left_cropping, left_padding_adjusted_bqs);
-
-       /* Set the top padding padded inside the isp kernel for bayer downscaling binaries.
-        * When the bds_factor isn't 1.00, the top padding is padded inside the isp
-        * before bayer downscaling, because the top cropping size (input margin) is not enough.
-        * (calculate_input_line(), raw_compute_vphase(), dma_read_raw() in raw.isp.c)
-        * NOTE: In dma_read_raw(), the factor passed to raw_compute_vphase() is got by get_bds_factor_for_dma_read().
-        *       This factor is BDS_FPVAL_100/BDS_FPVAL_125/BDS_FPVAL_150/BDS_FPVAL_200.
-        */
-       top_padding_bqs = 0;
-       if (binary->info->sp.pipeline.top_cropping > 0 &&
-           (required_bds_factor == SH_CSS_BDS_FACTOR_1_25 ||
-            required_bds_factor == SH_CSS_BDS_FACTOR_1_50 ||
-            required_bds_factor == SH_CSS_BDS_FACTOR_2_00)) {
-               /* Calculation from calculate_input_line() and raw_compute_vphase() in raw.isp.c. */
-               int top_cropping_bqs = _ISP_BQS(binary->info->sp.pipeline.top_cropping);
-                                                               /* top cropping (in bqs) */
-               int factor = bds_num * bds_frac_acc / bds_den;  /* downscaling factor by fixed-point */
-               int top_padding_bqsxfrac_acc = (top_cropping_bqs * factor - top_cropping_bqs * bds_frac_acc)
-                               + (2 * bds_frac_acc - factor);  /* top padding by fixed-point (in bqs) */
-
-               top_padding_bqs = (unsigned int)((top_padding_bqsxfrac_acc + bds_frac_acc / 2 - 1) / bds_frac_acc);
-       }
+IA_CSS_LOG("supported_bds_factors=%d, need_bds_factor:2_00=%d, 1_50=%d, 1_25=%d",
+          binary->info->sp.bds.supported_bds_factors,
+          need_bds_factor_2_00, need_bds_factor_1_50, need_bds_factor_1_25);
+IA_CSS_LOG("left_cropping=%d, left_padding_adjusted_bqs=%d",
+          binary->info->sp.pipeline.left_cropping, left_padding_adjusted_bqs);
+
+/* Set the top padding padded inside the isp kernel for bayer downscaling binaries.
+ * When the bds_factor isn't 1.00, the top padding is padded inside the isp
+ * before bayer downscaling, because the top cropping size (input margin) is not enough.
+ * (calculate_input_line(), raw_compute_vphase(), dma_read_raw() in raw.isp.c)
+ * NOTE: In dma_read_raw(), the factor passed to raw_compute_vphase() is got by get_bds_factor_for_dma_read().
+ *       This factor is BDS_FPVAL_100/BDS_FPVAL_125/BDS_FPVAL_150/BDS_FPVAL_200.
+ */
+top_padding_bqs = 0;
+if (binary->info->sp.pipeline.top_cropping > 0 &&
+    (required_bds_factor == SH_CSS_BDS_FACTOR_1_25 ||
+     required_bds_factor == SH_CSS_BDS_FACTOR_1_50 ||
+     required_bds_factor == SH_CSS_BDS_FACTOR_2_00))
+{
+       /* Calculation from calculate_input_line() and raw_compute_vphase() in raw.isp.c. */
+       int top_cropping_bqs = _ISP_BQS(binary->info->sp.pipeline.top_cropping);
+       /* top cropping (in bqs) */
+       int factor = bds_num * bds_frac_acc /
+       bds_den;        /* downscaling factor by fixed-point */
+       int top_padding_bqsxfrac_acc = (top_cropping_bqs * factor - top_cropping_bqs *
+                                       bds_frac_acc)
+       + (2 * bds_frac_acc - factor);  /* top padding by fixed-point (in bqs) */
+
+       top_padding_bqs = (unsigned int)((top_padding_bqsxfrac_acc + bds_frac_acc / 2 -
+                                         1) / bds_frac_acc);
+}
 
-       IA_CSS_LOG("top_cropping=%d, top_padding_bqs=%d", binary->info->sp.pipeline.top_cropping, top_padding_bqs);
+IA_CSS_LOG("top_cropping=%d, top_padding_bqs=%d", binary->info->sp.pipeline.top_cropping, top_padding_bqs);
 
-       /* Set the right/down shift amount caused by filters applied BEFORE bayer scaling,
       * which scaling is applied BEFORE shading corrertion.
       *
       * When the bds_factor isn't 1.00, 3x3 anti-alias filter is applied to each color plane(Gr/R/B/Gb)
       * before bayer downscaling.
       * This filter shifts each color plane (Gr/R/B/Gb) to right/down directions by 1 pixel.
       */
-       right_shift_bqs_before_bs = 0;
-       down_shift_bqs_before_bs = 0;
+/* Set the right/down shift amount caused by filters applied BEFORE bayer scaling,
+ * which scaling is applied BEFORE shading corrertion.
+ *
+ * When the bds_factor isn't 1.00, 3x3 anti-alias filter is applied to each color plane(Gr/R/B/Gb)
+ * before bayer downscaling.
+ * This filter shifts each color plane (Gr/R/B/Gb) to right/down directions by 1 pixel.
+ */
+right_shift_bqs_before_bs = 0;
+down_shift_bqs_before_bs = 0;
 #endif
 
 #ifndef ISP2401
-       /* Currently, the bad pixel caused by filters after bayer scaling
-       is NOT considered, because the bad pixel is subtle.
-       When some large filter is used in the future,
-       we need to consider the bad pixel.
-
-       Currently, when DPC&BNR is processed between bayer scaling and
-       shading correction, DPC&BNR moves each color plane to
-       right/bottom directions by 1 pixel.
-       */
-       bad_bqs_on_left_after_bs = 0;
-       bad_bqs_on_top_after_bs = 0;
+/* Currently, the bad pixel caused by filters after bayer scaling
+is NOT considered, because the bad pixel is subtle.
+When some large filter is used in the future,
+we need to consider the bad pixel.
+
+Currently, when DPC&BNR is processed between bayer scaling and
+shading correction, DPC&BNR moves each color plane to
+right/bottom directions by 1 pixel.
+*/
+bad_bqs_on_left_after_bs = 0;
+bad_bqs_on_top_after_bs = 0;
 #else
-       if (need_bds_factor_2_00 || need_bds_factor_1_50 || need_bds_factor_1_25) {
-               right_shift_bqs_before_bs = 1;
-               down_shift_bqs_before_bs = 1;
-       }
+if (need_bds_factor_2_00 || need_bds_factor_1_50 || need_bds_factor_1_25)
+{
+       right_shift_bqs_before_bs = 1;
+       down_shift_bqs_before_bs = 1;
+}
 
-       IA_CSS_LOG("right_shift_bqs_before_bs=%d, down_shift_bqs_before_bs=%d",
-               right_shift_bqs_before_bs, down_shift_bqs_before_bs);
+IA_CSS_LOG("right_shift_bqs_before_bs=%d, down_shift_bqs_before_bs=%d",
+          right_shift_bqs_before_bs, down_shift_bqs_before_bs);
 
-       /* Set the right/down shift amount caused by filters applied AFTER bayer scaling,
       * which scaling is applied BEFORE shading corrertion.
       *
       * When DPC&BNR is processed between bayer scaling and shading correction,
       * DPC&BNR moves each color plane (Gr/R/B/Gb) to right/down directions by 1 pixel.
       */
-       right_shift_bqs_after_bs = 0;
-       down_shift_bqs_after_bs = 0;
+/* Set the right/down shift amount caused by filters applied AFTER bayer scaling,
+ * which scaling is applied BEFORE shading corrertion.
+ *
+ * When DPC&BNR is processed between bayer scaling and shading correction,
+ * DPC&BNR moves each color plane (Gr/R/B/Gb) to right/down directions by 1 pixel.
+ */
+right_shift_bqs_after_bs = 0;
+down_shift_bqs_after_bs = 0;
 #endif
 
 #ifndef ISP2401
-       /* Calculate the origin of bayer (real sensor data area)
-       located on the shading table during the shading correction. */
-       res->sc_bayer_origin_x_bqs_on_shading_table
-               = ((left_padding_adjusted_bqs + bad_bqs_on_left_before_bs)
-               * bs_hor_ratio_out + bs_hor_ratio_in / 2) / bs_hor_ratio_in
-               + bad_bqs_on_left_after_bs;
-                       /* "+ bs_hor_ratio_in/2": rounding for division by bs_hor_ratio_in */
-       res->sc_bayer_origin_y_bqs_on_shading_table
-               = (bad_bqs_on_top_before_bs
-               * bs_ver_ratio_out + bs_ver_ratio_in / 2) / bs_ver_ratio_in
-               + bad_bqs_on_top_after_bs;
-                       /* "+ bs_ver_ratio_in/2": rounding for division by bs_ver_ratio_in */
-
-       res->bayer_scale_hor_ratio_in  = (uint32_t)bs_hor_ratio_in;
-       res->bayer_scale_hor_ratio_out = (uint32_t)bs_hor_ratio_out;
-       res->bayer_scale_ver_ratio_in  = (uint32_t)bs_ver_ratio_in;
-       res->bayer_scale_ver_ratio_out = (uint32_t)bs_ver_ratio_out;
+/* Calculate the origin of bayer (real sensor data area)
+located on the shading table during the shading correction. */
+res->sc_bayer_origin_x_bqs_on_shading_table
+= ((left_padding_adjusted_bqs + bad_bqs_on_left_before_bs)
+   * bs_hor_ratio_out + bs_hor_ratio_in / 2) / bs_hor_ratio_in
++ bad_bqs_on_left_after_bs;
+/* "+ bs_hor_ratio_in/2": rounding for division by bs_hor_ratio_in */
+res->sc_bayer_origin_y_bqs_on_shading_table
+= (bad_bqs_on_top_before_bs
+   * bs_ver_ratio_out + bs_ver_ratio_in / 2) / bs_ver_ratio_in
++ bad_bqs_on_top_after_bs;
+/* "+ bs_ver_ratio_in/2": rounding for division by bs_ver_ratio_in */
+
+res->bayer_scale_hor_ratio_in  = (uint32_t)bs_hor_ratio_in;
+res->bayer_scale_hor_ratio_out = (uint32_t)bs_hor_ratio_out;
+res->bayer_scale_ver_ratio_in  = (uint32_t)bs_ver_ratio_in;
+res->bayer_scale_ver_ratio_out = (uint32_t)bs_ver_ratio_out;
 #else
-       if (binary->info->mem_offsets.offsets.param->dmem.dp.size != 0) { /* if DPC&BNR is enabled in the binary */
-               right_shift_bqs_after_bs = 1;
-               down_shift_bqs_after_bs = 1;
-       }
+if (binary->info->mem_offsets.offsets.param->dmem.dp.size != 0)   /* if DPC&BNR is enabled in the binary */
+{
+       right_shift_bqs_after_bs = 1;
+       down_shift_bqs_after_bs = 1;
+}
 
-       IA_CSS_LOG("right_shift_bqs_after_bs=%d, down_shift_bqs_after_bs=%d",
-               right_shift_bqs_after_bs, down_shift_bqs_after_bs);
+IA_CSS_LOG("right_shift_bqs_after_bs=%d, down_shift_bqs_after_bs=%d",
+          right_shift_bqs_after_bs, down_shift_bqs_after_bs);
 
-       /* Set the origin of the sensor data area on the internal frame at shading correction. */
-       {
-               unsigned int bs_frac = bds_frac_acc;    /* scaling factor 1.0 in fixed point */
-               unsigned int bs_out, bs_in;             /* scaling ratio in fixed point */
-
-               bs_out = bs_hor_ratio_out * bs_frac;
-               bs_in = bs_hor_ratio_in * bs_frac;
-               sensor_data_origin_x_bqs_on_internal
-                       = ((left_padding_adjusted_bqs + right_shift_bqs_before_bs) * bs_out + bs_in / 2) / bs_in
-                               + right_shift_bqs_after_bs;     /* "+ bs_in/2": rounding */
-
-               bs_out = bs_ver_ratio_out * bs_frac;
-               bs_in = bs_ver_ratio_in * bs_frac;
-               sensor_data_origin_y_bqs_on_internal
-                       = ((top_padding_bqs + down_shift_bqs_before_bs) * bs_out + bs_in / 2) / bs_in
-                               + down_shift_bqs_after_bs;      /* "+ bs_in/2": rounding */
-       }
+/* Set the origin of the sensor data area on the internal frame at shading correction. */
+{
+       unsigned int bs_frac = bds_frac_acc;    /* scaling factor 1.0 in fixed point */
+       unsigned int bs_out, bs_in;             /* scaling ratio in fixed point */
+
+       bs_out = bs_hor_ratio_out * bs_frac;
+       bs_in = bs_hor_ratio_in * bs_frac;
+       sensor_data_origin_x_bqs_on_internal
+       = ((left_padding_adjusted_bqs + right_shift_bqs_before_bs) * bs_out + bs_in / 2) / bs_in
+       + right_shift_bqs_after_bs;     /* "+ bs_in/2": rounding */
+
+       bs_out = bs_ver_ratio_out * bs_frac;
+       bs_in = bs_ver_ratio_in * bs_frac;
+       sensor_data_origin_y_bqs_on_internal
+       = ((top_padding_bqs + down_shift_bqs_before_bs) * bs_out + bs_in / 2) / bs_in
+       + down_shift_bqs_after_bs;      /* "+ bs_in/2": rounding */
+}
 
-       scr->bayer_scale_hor_ratio_in                   = (uint32_t)bs_hor_ratio_in;
-       scr->bayer_scale_hor_ratio_out                  = (uint32_t)bs_hor_ratio_out;
-       scr->bayer_scale_ver_ratio_in                   = (uint32_t)bs_ver_ratio_in;
-       scr->bayer_scale_ver_ratio_out                  = (uint32_t)bs_ver_ratio_out;
-       scr->sensor_data_origin_x_bqs_on_internal       = (uint32_t)sensor_data_origin_x_bqs_on_internal;
-       scr->sensor_data_origin_y_bqs_on_internal       = (uint32_t)sensor_data_origin_y_bqs_on_internal;
-
-       IA_CSS_LOG("sc_requirements: %d, %d, %d, %d, %d, %d",
-               scr->bayer_scale_hor_ratio_in, scr->bayer_scale_hor_ratio_out,
-               scr->bayer_scale_ver_ratio_in, scr->bayer_scale_ver_ratio_out,
-               scr->sensor_data_origin_x_bqs_on_internal, scr->sensor_data_origin_y_bqs_on_internal);
+scr->bayer_scale_hor_ratio_in                  = (uint32_t)bs_hor_ratio_in;
+scr->bayer_scale_hor_ratio_out                 = (uint32_t)bs_hor_ratio_out;
+scr->bayer_scale_ver_ratio_in                  = (uint32_t)bs_ver_ratio_in;
+scr->bayer_scale_ver_ratio_out                 = (uint32_t)bs_ver_ratio_out;
+scr->sensor_data_origin_x_bqs_on_internal      = (uint32_t)sensor_data_origin_x_bqs_on_internal;
+scr->sensor_data_origin_y_bqs_on_internal      = (uint32_t)sensor_data_origin_y_bqs_on_internal;
+
+IA_CSS_LOG("sc_requirements: %d, %d, %d, %d, %d, %d",
+          scr->bayer_scale_hor_ratio_in, scr->bayer_scale_hor_ratio_out,
+          scr->bayer_scale_ver_ratio_in, scr->bayer_scale_ver_ratio_out,
+          scr->sensor_data_origin_x_bqs_on_internal, scr->sensor_data_origin_y_bqs_on_internal);
 #endif
 
 #ifdef ISP2401
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
+IA_CSS_LEAVE_ERR_PRIVATE(err);
 #endif
-       return err;
+return err;
 }
 
 /* Get the shading information of Shading Correction Type 1. */
 static enum ia_css_err
-ia_css_binary_get_shading_info_type_1(const struct ia_css_binary *binary,      /* [in] */
-                       unsigned int required_bds_factor,                       /* [in] */
-                       const struct ia_css_stream_config *stream_config,       /* [in] */
+ia_css_binary_get_shading_info_type_1(const struct ia_css_binary
+                                     *binary,  /* [in] */
+                                     unsigned int required_bds_factor,                 /* [in] */
+                                     const struct ia_css_stream_config *stream_config, /* [in] */
 #ifndef ISP2401
-                       struct ia_css_shading_info *info)                       /* [out] */
+                                     struct ia_css_shading_info *info)                 /* [out] */
 #else
-                       struct ia_css_shading_info *shading_info,               /* [out] */
-                       struct ia_css_pipe_config *pipe_config)                 /* [out] */
+                                     struct ia_css_shading_info *shading_info,         /* [out] */
+                                     struct ia_css_pipe_config *pipe_config)                   /* [out] */
 #endif
 {
        enum ia_css_err err;
@@ -522,7 +531,7 @@ ia_css_binary_get_shading_info_type_1(const struct ia_css_binary *binary,   /* [in
        info->info.type_1.bqs_per_grid_cell = (1 << binary->deci_factor_log2);
 #else
        IA_CSS_ENTER_PRIVATE("binary=%p, required_bds_factor=%d, stream_config=%p",
-               binary, required_bds_factor, stream_config);
+                            binary, required_bds_factor, stream_config);
 #endif
 
        /* Initialize by default values. */
@@ -535,171 +544,173 @@ ia_css_binary_get_shading_info_type_1(const struct ia_css_binary *binary,       /* [in
        info->info.type_1.sc_bayer_origin_y_bqs_on_shading_table = 0;
 
        err = ia_css_binary_compute_shading_table_bayer_origin(
-               binary,
-               required_bds_factor,
-               stream_config,
-               &res);
+           binary,
+           required_bds_factor,
+           stream_config,
+           &res);
        if (err != IA_CSS_SUCCESS)
 #else
        *shading_info = DEFAULT_SHADING_INFO_TYPE_1;
 
        err = sh_css_binary_get_sc_requirements(binary, required_bds_factor, stream_config, &scr);
-       if (err != IA_CSS_SUCCESS) {
+       if (err != IA_CSS_SUCCESS)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(err);
 #endif
                return err;
 #ifdef ISP2401
-       }
+}
 
-       IA_CSS_LOG("binary: id=%d, sctbl=%dx%d, deci=%d",
-               binary->info->sp.id, binary->sctbl_width_per_color, binary->sctbl_height, binary->deci_factor_log2);
-       IA_CSS_LOG("binary: in=%dx%d, in_padded_w=%d, int=%dx%d, int_padded_w=%d, out=%dx%d, out_padded_w=%d",
-               binary->in_frame_info.res.width, binary->in_frame_info.res.height, binary->in_frame_info.padded_width,
-               binary->internal_frame_info.res.width, binary->internal_frame_info.res.height,
-               binary->internal_frame_info.padded_width,
-               binary->out_frame_info[0].res.width, binary->out_frame_info[0].res.height,
-               binary->out_frame_info[0].padded_width);
-
-       /* Set the input size from sensor, which includes left/top crop size. */
-       in_width_bqs        = _ISP_BQS(binary->in_frame_info.res.width);
-       in_height_bqs       = _ISP_BQS(binary->in_frame_info.res.height);
-
-       /* Frame size internally used in ISP, including sensor data and padding.
       * This is the frame size, to which the shading correction is applied.
       */
-       internal_width_bqs  = _ISP_BQS(binary->internal_frame_info.res.width);
-       internal_height_bqs = _ISP_BQS(binary->internal_frame_info.res.height);
-
-       /* Shading table. */
-       num_hor_grids = binary->sctbl_width_per_color;
-       num_ver_grids = binary->sctbl_height;
-       bqs_per_grid_cell = (1 << binary->deci_factor_log2);
-       tbl_width_bqs  = (num_hor_grids - 1) * bqs_per_grid_cell;
-       tbl_height_bqs = (num_ver_grids - 1) * bqs_per_grid_cell;
+IA_CSS_LOG("binary: id=%d, sctbl=%dx%d, deci=%d",
+          binary->info->sp.id, binary->sctbl_width_per_color, binary->sctbl_height, binary->deci_factor_log2);
+IA_CSS_LOG("binary: in=%dx%d, in_padded_w=%d, int=%dx%d, int_padded_w=%d, out=%dx%d, out_padded_w=%d",
+          binary->in_frame_info.res.width, binary->in_frame_info.res.height, binary->in_frame_info.padded_width,
+          binary->internal_frame_info.res.width, binary->internal_frame_info.res.height,
+          binary->internal_frame_info.padded_width,
+          binary->out_frame_info[0].res.width, binary->out_frame_info[0].res.height,
+          binary->out_frame_info[0].padded_width);
+
+/* Set the input size from sensor, which includes left/top crop size. */
+in_width_bqs       = _ISP_BQS(binary->in_frame_info.res.width);
+in_height_bqs      = _ISP_BQS(binary->in_frame_info.res.height);
+
+/* Frame size internally used in ISP, including sensor data and padding.
+ * This is the frame size, to which the shading correction is applied.
+ */
+internal_width_bqs  = _ISP_BQS(binary->internal_frame_info.res.width);
+internal_height_bqs = _ISP_BQS(binary->internal_frame_info.res.height);
+
+/* Shading table. */
+num_hor_grids = binary->sctbl_width_per_color;
+num_ver_grids = binary->sctbl_height;
+bqs_per_grid_cell = (1 << binary->deci_factor_log2);
+tbl_width_bqs  = (num_hor_grids - 1) * bqs_per_grid_cell;
+tbl_height_bqs = (num_ver_grids - 1) * bqs_per_grid_cell;
 #endif
 
 #ifndef ISP2401
-       info->info.type_1.bayer_scale_hor_ratio_in      = res.bayer_scale_hor_ratio_in;
-       info->info.type_1.bayer_scale_hor_ratio_out     = res.bayer_scale_hor_ratio_out;
-       info->info.type_1.bayer_scale_ver_ratio_in      = res.bayer_scale_ver_ratio_in;
-       info->info.type_1.bayer_scale_ver_ratio_out     = res.bayer_scale_ver_ratio_out;
-       info->info.type_1.sc_bayer_origin_x_bqs_on_shading_table = res.sc_bayer_origin_x_bqs_on_shading_table;
-       info->info.type_1.sc_bayer_origin_y_bqs_on_shading_table = res.sc_bayer_origin_y_bqs_on_shading_table;
+info->info.type_1.bayer_scale_hor_ratio_in     = res.bayer_scale_hor_ratio_in;
+info->info.type_1.bayer_scale_hor_ratio_out    = res.bayer_scale_hor_ratio_out;
+info->info.type_1.bayer_scale_ver_ratio_in     = res.bayer_scale_ver_ratio_in;
+info->info.type_1.bayer_scale_ver_ratio_out    = res.bayer_scale_ver_ratio_out;
+info->info.type_1.sc_bayer_origin_x_bqs_on_shading_table = res.sc_bayer_origin_x_bqs_on_shading_table;
+info->info.type_1.sc_bayer_origin_y_bqs_on_shading_table = res.sc_bayer_origin_y_bqs_on_shading_table;
 #else
-       IA_CSS_LOG("tbl_width_bqs=%d, tbl_height_bqs=%d", tbl_width_bqs, tbl_height_bqs);
+IA_CSS_LOG("tbl_width_bqs=%d, tbl_height_bqs=%d", tbl_width_bqs, tbl_height_bqs);
 #endif
 
 #ifdef ISP2401
-       /* Real sensor data area on the internal frame at shading correction.
-        * Filters and scaling are applied to the internal frame before shading correction, depending on the binary.
-        */
-       sensor_org_x_bqs_on_internal = scr.sensor_data_origin_x_bqs_on_internal;
-       sensor_org_y_bqs_on_internal = scr.sensor_data_origin_y_bqs_on_internal;
-       {
-               unsigned int bs_frac = 8;       /* scaling factor 1.0 in fixed point (8 == FRAC_ACC macro in ISP) */
-               unsigned int bs_out, bs_in;     /* scaling ratio in fixed point */
-
-               bs_out = scr.bayer_scale_hor_ratio_out * bs_frac;
-               bs_in = scr.bayer_scale_hor_ratio_in * bs_frac;
-               sensor_width_bqs  = (in_width_bqs * bs_out + bs_in / 2) / bs_in; /* "+ bs_in/2": rounding */
+/* Real sensor data area on the internal frame at shading correction.
+ * Filters and scaling are applied to the internal frame before shading correction, depending on the binary.
+ */
+sensor_org_x_bqs_on_internal = scr.sensor_data_origin_x_bqs_on_internal;
+sensor_org_y_bqs_on_internal = scr.sensor_data_origin_y_bqs_on_internal;
+{
+       unsigned int bs_frac = 8;       /* scaling factor 1.0 in fixed point (8 == FRAC_ACC macro in ISP) */
+       unsigned int bs_out, bs_in;     /* scaling ratio in fixed point */
 
-               bs_out = scr.bayer_scale_ver_ratio_out * bs_frac;
-               bs_in = scr.bayer_scale_ver_ratio_in * bs_frac;
-               sensor_height_bqs = (in_height_bqs * bs_out + bs_in / 2) / bs_in; /* "+ bs_in/2": rounding */
-       }
+       bs_out = scr.bayer_scale_hor_ratio_out * bs_frac;
+       bs_in = scr.bayer_scale_hor_ratio_in * bs_frac;
+       sensor_width_bqs  = (in_width_bqs * bs_out + bs_in / 2) / bs_in; /* "+ bs_in/2": rounding */
 
-       /* Center of the sensor data on the internal frame at shading correction. */
-       sensor_center_x_bqs_on_internal = sensor_org_x_bqs_on_internal + sensor_width_bqs / 2;
-       sensor_center_y_bqs_on_internal = sensor_org_y_bqs_on_internal + sensor_height_bqs / 2;
+       bs_out = scr.bayer_scale_ver_ratio_out * bs_frac;
+       bs_in = scr.bayer_scale_ver_ratio_in * bs_frac;
+       sensor_height_bqs = (in_height_bqs * bs_out + bs_in / 2) / bs_in; /* "+ bs_in/2": rounding */
+}
 
-       /* Size of left/right/upper/lower sides of the sensor center on the internal frame. */
-       left  = sensor_center_x_bqs_on_internal;
-       right = internal_width_bqs - sensor_center_x_bqs_on_internal;
-       upper = sensor_center_y_bqs_on_internal;
-       lower = internal_height_bqs - sensor_center_y_bqs_on_internal;
+/* Center of the sensor data on the internal frame at shading correction. */
+sensor_center_x_bqs_on_internal = sensor_org_x_bqs_on_internal + sensor_width_bqs / 2;
+sensor_center_y_bqs_on_internal = sensor_org_y_bqs_on_internal + sensor_height_bqs / 2;
 
-       /* Align the size of left/right/upper/lower sides to a multiple of the grid cell size. */
-       adjust_left  = CEIL_MUL(left,  bqs_per_grid_cell);
-       adjust_right = CEIL_MUL(right, bqs_per_grid_cell);
-       adjust_upper = CEIL_MUL(upper, bqs_per_grid_cell);
-       adjust_lower = CEIL_MUL(lower, bqs_per_grid_cell);
+/* Size of left/right/upper/lower sides of the sensor center on the internal frame. */
+left  = sensor_center_x_bqs_on_internal;
+right = internal_width_bqs - sensor_center_x_bqs_on_internal;
+upper = sensor_center_y_bqs_on_internal;
+lower = internal_height_bqs - sensor_center_y_bqs_on_internal;
 
-       /* Shading table should cover the adjusted frame size. */
-       adjust_width_bqs  = adjust_left + adjust_right;
-       adjust_height_bqs = adjust_upper + adjust_lower;
+/* Align the size of left/right/upper/lower sides to a multiple of the grid cell size. */
+adjust_left  = CEIL_MUL(left,  bqs_per_grid_cell);
+adjust_right = CEIL_MUL(right, bqs_per_grid_cell);
+adjust_upper = CEIL_MUL(upper, bqs_per_grid_cell);
+adjust_lower = CEIL_MUL(lower, bqs_per_grid_cell);
 
-       IA_CSS_LOG("adjust_width_bqs=%d, adjust_height_bqs=%d", adjust_width_bqs, adjust_height_bqs);
+/* Shading table should cover the adjusted frame size. */
+adjust_width_bqs  = adjust_left + adjust_right;
+adjust_height_bqs = adjust_upper + adjust_lower;
 
-       if (adjust_width_bqs > tbl_width_bqs || adjust_height_bqs > tbl_height_bqs) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
-               return IA_CSS_ERR_INTERNAL_ERROR;
-       }
+IA_CSS_LOG("adjust_width_bqs=%d, adjust_height_bqs=%d", adjust_width_bqs, adjust_height_bqs);
 
-       /* Origin of the internal frame on the shading table. */
-       internal_org_x_bqs_on_tbl = adjust_left - left;
-       internal_org_y_bqs_on_tbl = adjust_upper - upper;
-
-       /* Origin of the real sensor data area on the shading table. */
-       sensor_org_x_bqs_on_tbl = internal_org_x_bqs_on_tbl + sensor_org_x_bqs_on_internal;
-       sensor_org_y_bqs_on_tbl = internal_org_y_bqs_on_tbl + sensor_org_y_bqs_on_internal;
-
-       /* The shading information necessary as API is stored in the shading_info. */
-       shading_info->info.type_1.num_hor_grids     = num_hor_grids;
-       shading_info->info.type_1.num_ver_grids     = num_ver_grids;
-       shading_info->info.type_1.bqs_per_grid_cell = bqs_per_grid_cell;
-
-       shading_info->info.type_1.bayer_scale_hor_ratio_in  = scr.bayer_scale_hor_ratio_in;
-       shading_info->info.type_1.bayer_scale_hor_ratio_out = scr.bayer_scale_hor_ratio_out;
-       shading_info->info.type_1.bayer_scale_ver_ratio_in  = scr.bayer_scale_ver_ratio_in;
-       shading_info->info.type_1.bayer_scale_ver_ratio_out = scr.bayer_scale_ver_ratio_out;
-
-       shading_info->info.type_1.isp_input_sensor_data_res_bqs.width  = in_width_bqs;
-       shading_info->info.type_1.isp_input_sensor_data_res_bqs.height = in_height_bqs;
-
-       shading_info->info.type_1.sensor_data_res_bqs.width  = sensor_width_bqs;
-       shading_info->info.type_1.sensor_data_res_bqs.height = sensor_height_bqs;
-
-       shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.x = (int32_t)sensor_org_x_bqs_on_tbl;
-       shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.y = (int32_t)sensor_org_y_bqs_on_tbl;
-
-       /* The shading information related to ISP (but, not necessary as API) is stored in the pipe_config. */
-       pipe_config->internal_frame_origin_bqs_on_sctbl.x = (int32_t)internal_org_x_bqs_on_tbl;
-       pipe_config->internal_frame_origin_bqs_on_sctbl.y = (int32_t)internal_org_y_bqs_on_tbl;
-
-       IA_CSS_LOG("shading_info: grids=%dx%d, cell=%d, scale=%d,%d,%d,%d, input=%dx%d, data=%dx%d, origin=(%d,%d)",
-               shading_info->info.type_1.num_hor_grids,
-               shading_info->info.type_1.num_ver_grids,
-               shading_info->info.type_1.bqs_per_grid_cell,
-               shading_info->info.type_1.bayer_scale_hor_ratio_in,
-               shading_info->info.type_1.bayer_scale_hor_ratio_out,
-               shading_info->info.type_1.bayer_scale_ver_ratio_in,
-               shading_info->info.type_1.bayer_scale_ver_ratio_out,
-               shading_info->info.type_1.isp_input_sensor_data_res_bqs.width,
-               shading_info->info.type_1.isp_input_sensor_data_res_bqs.height,
-               shading_info->info.type_1.sensor_data_res_bqs.width,
-               shading_info->info.type_1.sensor_data_res_bqs.height,
-               shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.x,
-               shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.y);
-
-       IA_CSS_LOG("pipe_config: origin=(%d,%d)",
-               pipe_config->internal_frame_origin_bqs_on_sctbl.x,
-               pipe_config->internal_frame_origin_bqs_on_sctbl.y);
+if (adjust_width_bqs > tbl_width_bqs || adjust_height_bqs > tbl_height_bqs)
+{
+       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
+       return IA_CSS_ERR_INTERNAL_ERROR;
+}
 
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
+/* Origin of the internal frame on the shading table. */
+internal_org_x_bqs_on_tbl = adjust_left - left;
+internal_org_y_bqs_on_tbl = adjust_upper - upper;
+
+/* Origin of the real sensor data area on the shading table. */
+sensor_org_x_bqs_on_tbl = internal_org_x_bqs_on_tbl + sensor_org_x_bqs_on_internal;
+sensor_org_y_bqs_on_tbl = internal_org_y_bqs_on_tbl + sensor_org_y_bqs_on_internal;
+
+/* The shading information necessary as API is stored in the shading_info. */
+shading_info->info.type_1.num_hor_grids            = num_hor_grids;
+shading_info->info.type_1.num_ver_grids            = num_ver_grids;
+shading_info->info.type_1.bqs_per_grid_cell = bqs_per_grid_cell;
+
+shading_info->info.type_1.bayer_scale_hor_ratio_in  = scr.bayer_scale_hor_ratio_in;
+shading_info->info.type_1.bayer_scale_hor_ratio_out = scr.bayer_scale_hor_ratio_out;
+shading_info->info.type_1.bayer_scale_ver_ratio_in  = scr.bayer_scale_ver_ratio_in;
+shading_info->info.type_1.bayer_scale_ver_ratio_out = scr.bayer_scale_ver_ratio_out;
+
+shading_info->info.type_1.isp_input_sensor_data_res_bqs.width  = in_width_bqs;
+shading_info->info.type_1.isp_input_sensor_data_res_bqs.height = in_height_bqs;
+
+shading_info->info.type_1.sensor_data_res_bqs.width  = sensor_width_bqs;
+shading_info->info.type_1.sensor_data_res_bqs.height = sensor_height_bqs;
+
+shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.x = (int32_t)sensor_org_x_bqs_on_tbl;
+shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.y = (int32_t)sensor_org_y_bqs_on_tbl;
+
+/* The shading information related to ISP (but, not necessary as API) is stored in the pipe_config. */
+pipe_config->internal_frame_origin_bqs_on_sctbl.x = (int32_t)internal_org_x_bqs_on_tbl;
+pipe_config->internal_frame_origin_bqs_on_sctbl.y = (int32_t)internal_org_y_bqs_on_tbl;
+
+IA_CSS_LOG("shading_info: grids=%dx%d, cell=%d, scale=%d,%d,%d,%d, input=%dx%d, data=%dx%d, origin=(%d,%d)",
+          shading_info->info.type_1.num_hor_grids,
+          shading_info->info.type_1.num_ver_grids,
+          shading_info->info.type_1.bqs_per_grid_cell,
+          shading_info->info.type_1.bayer_scale_hor_ratio_in,
+          shading_info->info.type_1.bayer_scale_hor_ratio_out,
+          shading_info->info.type_1.bayer_scale_ver_ratio_in,
+          shading_info->info.type_1.bayer_scale_ver_ratio_out,
+          shading_info->info.type_1.isp_input_sensor_data_res_bqs.width,
+          shading_info->info.type_1.isp_input_sensor_data_res_bqs.height,
+          shading_info->info.type_1.sensor_data_res_bqs.width,
+          shading_info->info.type_1.sensor_data_res_bqs.height,
+          shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.x,
+          shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.y);
+
+IA_CSS_LOG("pipe_config: origin=(%d,%d)",
+          pipe_config->internal_frame_origin_bqs_on_sctbl.x,
+          pipe_config->internal_frame_origin_bqs_on_sctbl.y);
+
+IA_CSS_LEAVE_ERR_PRIVATE(err);
 #endif
-       return err;
+return err;
 }
 
 enum ia_css_err
 ia_css_binary_get_shading_info(const struct ia_css_binary *binary,                     /* [in] */
-                               enum ia_css_shading_correction_type type,               /* [in] */
-                               unsigned int required_bds_factor,                       /* [in] */
-                               const struct ia_css_stream_config *stream_config,       /* [in] */
+                              enum ia_css_shading_correction_type type,                /* [in] */
+                              unsigned int required_bds_factor,                        /* [in] */
+                              const struct ia_css_stream_config *stream_config,        /* [in] */
 #ifndef ISP2401
-                               struct ia_css_shading_info *info)                       /* [out] */
+                              struct ia_css_shading_info *info)                        /* [out] */
 #else
-                               struct ia_css_shading_info *shading_info,               /* [out] */
-                               struct ia_css_pipe_config *pipe_config)                 /* [out] */
+                              struct ia_css_shading_info *shading_info,                /* [out] */
+                              struct ia_css_pipe_config *pipe_config)                  /* [out] */
 #endif
 {
        enum ia_css_err err;
@@ -711,7 +722,7 @@ ia_css_binary_get_shading_info(const struct ia_css_binary *binary,                  /* [in] */
        assert(shading_info);
 
        IA_CSS_ENTER_PRIVATE("binary=%p, type=%d, required_bds_factor=%d, stream_config=%p",
-               binary, type, required_bds_factor, stream_config);
+                            binary, type, required_bds_factor, stream_config);
 #endif
 
        if (type == IA_CSS_SHADING_CORRECTION_TYPE_1)
@@ -719,7 +730,7 @@ ia_css_binary_get_shading_info(const struct ia_css_binary *binary,                  /* [in] */
                err = ia_css_binary_get_shading_info_type_1(binary, required_bds_factor, stream_config, info);
 #else
                err = ia_css_binary_get_shading_info_type_1(binary, required_bds_factor, stream_config,
-                                                               shading_info, pipe_config);
+                       shading_info, pipe_config);
 #endif
 
        /* Other function calls can be added here when other shading correction types will be added in the future. */
@@ -732,7 +743,7 @@ ia_css_binary_get_shading_info(const struct ia_css_binary *binary,                  /* [in] */
 }
 
 static void sh_css_binary_common_grid_info(const struct ia_css_binary *binary,
-                               struct ia_css_grid_info *info)
+       struct ia_css_grid_info *info)
 {
        assert(binary);
        assert(info);
@@ -774,9 +785,9 @@ ia_css_binary_dvs_grid_info(const struct ia_css_binary *binary,
 
 void
 ia_css_binary_dvs_stat_grid_info(
-       const struct ia_css_binary *binary,
-       struct ia_css_grid_info *info,
-       struct ia_css_pipe *pipe)
+    const struct ia_css_binary *binary,
+    struct ia_css_grid_info *info,
+    struct ia_css_pipe *pipe)
 {
        (void)pipe;
        sh_css_binary_common_grid_info(binary, info);
@@ -786,8 +797,7 @@ ia_css_binary_dvs_stat_grid_info(
 enum ia_css_err
 ia_css_binary_3a_grid_info(const struct ia_css_binary *binary,
                           struct ia_css_grid_info *info,
-                          struct ia_css_pipe *pipe)
-{
+                          struct ia_css_pipe *pipe) {
        struct ia_css_3a_grid_info *s3a_info;
        enum ia_css_err err = IA_CSS_SUCCESS;
 
@@ -829,7 +839,7 @@ binary_init_pc_histogram(struct sh_css_pc_histogram *histo)
 
 static void
 binary_init_metrics(struct sh_css_binary_metrics *metrics,
-            const struct ia_css_binary_info *info)
+                   const struct ia_css_binary_info *info)
 {
        assert(metrics);
        assert(info);
@@ -844,7 +854,7 @@ binary_init_metrics(struct sh_css_binary_metrics *metrics,
 /* move to host part of output module */
 static bool
 binary_supports_output_format(const struct ia_css_binary_xinfo *info,
-                      enum ia_css_frame_format format)
+                             enum ia_css_frame_format format)
 {
        int i;
 
@@ -887,15 +897,14 @@ binary_supports_vf_format(const struct ia_css_binary_xinfo *info,
 /* move to host part of bds module */
 static bool
 supports_bds_factor(u32 supported_factors,
-                      uint32_t bds_factor)
+                   uint32_t bds_factor)
 {
        return ((supported_factors & PACK_BDS_FACTOR(bds_factor)) != 0);
 }
 
 static enum ia_css_err
 binary_init_info(struct ia_css_binary_xinfo *info, unsigned int i,
-                bool *binary_found)
-{
+                bool *binary_found) {
        const unsigned char *blob = sh_css_blob_info[i].blob;
        unsigned int size = sh_css_blob_info[i].header.blob.size;
 
@@ -919,8 +928,7 @@ binary_init_info(struct ia_css_binary_xinfo *info, unsigned int i,
  * be selected if no other primary matches.
  */
 enum ia_css_err
-ia_css_binary_init_infos(void)
-{
+ia_css_binary_init_infos(void) {
        unsigned int i;
        unsigned int num_of_isp_binaries = sh_css_num_binaries - NUM_OF_SPS - NUM_OF_BLS;
 
@@ -928,11 +936,12 @@ ia_css_binary_init_infos(void)
                return IA_CSS_SUCCESS;
 
        all_binaries = sh_css_malloc(num_of_isp_binaries *
-                                               sizeof(*all_binaries));
+                                    sizeof(*all_binaries));
        if (!all_binaries)
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 
-       for (i = 0; i < num_of_isp_binaries; i++) {
+       for (i = 0; i < num_of_isp_binaries; i++)
+       {
                enum ia_css_err ret;
                struct ia_css_binary_xinfo *binary = &all_binaries[i];
                bool binary_found;
@@ -952,12 +961,12 @@ ia_css_binary_init_infos(void)
 }
 
 enum ia_css_err
-ia_css_binary_uninit(void)
-{
+ia_css_binary_uninit(void) {
        unsigned int i;
        struct ia_css_binary_xinfo *b;
 
-       for (i = 0; i < IA_CSS_BINARY_NUM_MODES; i++) {
+       for (i = 0; i < IA_CSS_BINARY_NUM_MODES; i++)
+       {
                for (b = binary_infos[i]; b; b = b->next) {
                        if (b->xmem_addr)
                                hmm_free(b->xmem_addr);
@@ -978,24 +987,24 @@ ia_css_binary_uninit(void)
 static int
 binary_grid_deci_factor_log2(int width, int height)
 {
-/* 3A/Shading decimation factor spcification (at August 2008)
- * ------------------------------------------------------------------
- * [Image Width (BQ)] [Decimation Factor (BQ)] [Resulting grid cells]
-#ifndef ISP2401
- * 1280 ?c             32                       40 ?c
- *  640 ?c 1279        16                       40 ?c 80
- *      ?c  639         8                          ?c 80
-#else
- * from 1280                   32                 from 40
- * from  640 to 1279           16                 from 40 to 80
- *           to  639            8                         to 80
-#endif
- * ------------------------------------------------------------------
- */
-/* Maximum and minimum decimation factor by the specification */
+       /* 3A/Shading decimation factor spcification (at August 2008)
       * ------------------------------------------------------------------
       * [Image Width (BQ)] [Decimation Factor (BQ)] [Resulting grid cells]
+       #ifndef ISP2401
       * 1280 ?c             32                       40 ?c
       *  640 ?c 1279        16                       40 ?c 80
       *      ?c  639         8                          ?c 80
+       #else
       * from 1280                   32                 from 40
       * from  640 to 1279           16                 from 40 to 80
       *           to  639            8                         to 80
+       #endif
       * ------------------------------------------------------------------
       */
+       /* Maximum and minimum decimation factor by the specification */
 #define MAX_SPEC_DECI_FACT_LOG2                5
 #define MIN_SPEC_DECI_FACT_LOG2                3
-/* the smallest frame width in bayer quads when decimation factor (log2) is 5 or 4, by the specification */
+       /* the smallest frame width in bayer quads when decimation factor (log2) is 5 or 4, by the specification */
 #define DECI_FACT_LOG2_5_SMALLEST_FRAME_WIDTH_BQ       1280
 #define DECI_FACT_LOG2_4_SMALLEST_FRAME_WIDTH_BQ       640
 
@@ -1003,12 +1012,15 @@ binary_grid_deci_factor_log2(int width, int height)
        int spec_factor;     /* the factor (log2) which satisfies the specification */
 
        /* Currently supported maximum width and height are 5120(=80*64) and 3840(=60*64). */
-       assert(ISP_BQ_GRID_WIDTH(width, MAX_SPEC_DECI_FACT_LOG2) <= SH_CSS_MAX_BQ_GRID_WIDTH);
-       assert(ISP_BQ_GRID_HEIGHT(height, MAX_SPEC_DECI_FACT_LOG2) <= SH_CSS_MAX_BQ_GRID_HEIGHT);
+       assert(ISP_BQ_GRID_WIDTH(width,
+                                MAX_SPEC_DECI_FACT_LOG2) <= SH_CSS_MAX_BQ_GRID_WIDTH);
+       assert(ISP_BQ_GRID_HEIGHT(height,
+                                 MAX_SPEC_DECI_FACT_LOG2) <= SH_CSS_MAX_BQ_GRID_HEIGHT);
 
        /* Compute the smallest factor. */
        smallest_factor = MAX_SPEC_DECI_FACT_LOG2;
-       while (ISP_BQ_GRID_WIDTH(width, smallest_factor - 1) <= SH_CSS_MAX_BQ_GRID_WIDTH &&
+       while (ISP_BQ_GRID_WIDTH(width,
+                                smallest_factor - 1) <= SH_CSS_MAX_BQ_GRID_WIDTH &&
               ISP_BQ_GRID_HEIGHT(height, smallest_factor - 1) <= SH_CSS_MAX_BQ_GRID_HEIGHT
               && smallest_factor > MIN_SPEC_DECI_FACT_LOG2)
                smallest_factor--;
@@ -1064,15 +1076,15 @@ binary_in_frame_padded_width(int in_frame_width,
                if (stream_config_left_padding != -1) {
                        /* Different than before, we do left&right padding. */
                        rval =
-                               CEIL_MUL(in_frame_width + nr_of_left_paddings,
-                                       2 * ISP_VEC_NELEMS);
+                           CEIL_MUL(in_frame_width + nr_of_left_paddings,
+                                    2 * ISP_VEC_NELEMS);
                } else {
                        /* Different than before, we do left&right padding. */
                        in_frame_width += dvs_env_width;
                        rval =
-                               CEIL_MUL(in_frame_width +
-                                       (left_cropping ? nr_of_left_paddings : 0),
-                                       2 * ISP_VEC_NELEMS);
+                           CEIL_MUL(in_frame_width +
+                                    (left_cropping ? nr_of_left_paddings : 0),
+                                    2 * ISP_VEC_NELEMS);
                }
        } else {
                rval = isp_internal_width;
@@ -1083,33 +1095,32 @@ binary_in_frame_padded_width(int in_frame_width,
 
 enum ia_css_err
 ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
-                bool online,
-                bool two_ppc,
-                enum atomisp_input_format stream_format,
-                const struct ia_css_frame_info *in_info, /* can be NULL */
-                const struct ia_css_frame_info *bds_out_info, /* can be NULL */
-                const struct ia_css_frame_info *out_info[], /* can be NULL */
-                const struct ia_css_frame_info *vf_info, /* can be NULL */
-                struct ia_css_binary *binary,
-                struct ia_css_resolution *dvs_env,
-                int stream_config_left_padding,
-                bool accelerator)
-{
+                       bool online,
+                       bool two_ppc,
+                       enum atomisp_input_format stream_format,
+                       const struct ia_css_frame_info *in_info, /* can be NULL */
+                       const struct ia_css_frame_info *bds_out_info, /* can be NULL */
+                       const struct ia_css_frame_info *out_info[], /* can be NULL */
+                       const struct ia_css_frame_info *vf_info, /* can be NULL */
+                       struct ia_css_binary *binary,
+                       struct ia_css_resolution *dvs_env,
+                       int stream_config_left_padding,
+                       bool accelerator) {
        const struct ia_css_binary_info *info = &xinfo->sp;
        unsigned int dvs_env_width = 0,
-                    dvs_env_height = 0,
-                    vf_log_ds = 0,
-                    s3a_log_deci = 0,
-                    bits_per_pixel = 0,
-                    /* Resolution at SC/3A/DIS kernel. */
-                    sc_3a_dis_width = 0,
-                    /* Resolution at SC/3A/DIS kernel. */
-                    sc_3a_dis_padded_width = 0,
-                    /* Resolution at SC/3A/DIS kernel. */
-                    sc_3a_dis_height = 0,
-                    isp_internal_width = 0,
-                    isp_internal_height = 0,
-                    s3a_isp_width = 0;
+       dvs_env_height = 0,
+       vf_log_ds = 0,
+       s3a_log_deci = 0,
+       bits_per_pixel = 0,
+       /* Resolution at SC/3A/DIS kernel. */
+       sc_3a_dis_width = 0,
+       /* Resolution at SC/3A/DIS kernel. */
+       sc_3a_dis_padded_width = 0,
+       /* Resolution at SC/3A/DIS kernel. */
+       sc_3a_dis_height = 0,
+       isp_internal_width = 0,
+       isp_internal_height = 0,
+       s3a_isp_width = 0;
 
        bool need_scaling = false;
        struct ia_css_resolution binary_dvs_env, internal_res;
@@ -1121,24 +1132,27 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
        assert(binary);
 
        binary->info = xinfo;
-       if (!accelerator) {
+       if (!accelerator)
+       {
                /* binary->css_params has been filled by accelerator itself. */
                err = ia_css_isp_param_allocate_isp_parameters(
-                       &binary->mem_params, &binary->css_params,
-                       &info->mem_initializers);
+                   &binary->mem_params, &binary->css_params,
+                   &info->mem_initializers);
                if (err != IA_CSS_SUCCESS) {
                        return err;
                }
        }
-       for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
+       for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++)
+       {
                if (out_info[i] && (out_info[i]->res.width != 0)) {
                        bin_out_info = out_info[i];
                        break;
                }
        }
-       if (in_info && bin_out_info) {
+       if (in_info && bin_out_info)
+       {
                need_scaling = (in_info->res.width != bin_out_info->res.width) ||
-                       (in_info->res.height != bin_out_info->res.height);
+                              (in_info->res.height != bin_out_info->res.height);
        }
 
        /* binary_dvs_env has to be equal or larger than SH_CSS_MIN_DVS_ENVELOPE */
@@ -1167,39 +1181,44 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
        binary->internal_frame_info.res.height      = isp_internal_height;
        binary->internal_frame_info.raw_bit_depth   = bits_per_pixel;
 
-       if (in_info) {
+       if (in_info)
+       {
                binary->effective_in_frame_res.width = in_info->res.width;
                binary->effective_in_frame_res.height = in_info->res.height;
 
                bits_per_pixel = in_info->raw_bit_depth;
 
                /* input info */
-               binary->in_frame_info.res.width = in_info->res.width + info->pipeline.left_cropping;
-               binary->in_frame_info.res.height = in_info->res.height + info->pipeline.top_cropping;
+               binary->in_frame_info.res.width = in_info->res.width +
+                                                 info->pipeline.left_cropping;
+               binary->in_frame_info.res.height = in_info->res.height +
+                                                  info->pipeline.top_cropping;
 
                binary->in_frame_info.res.width += dvs_env_width;
                binary->in_frame_info.res.height += dvs_env_height;
 
                binary->in_frame_info.padded_width =
-                       binary_in_frame_padded_width(in_info->res.width,
-                                                    isp_internal_width,
-                                                    dvs_env_width,
-                                                    stream_config_left_padding,
-                                                    info->pipeline.left_cropping,
-                                                    need_scaling);
+                   binary_in_frame_padded_width(in_info->res.width,
+                                                isp_internal_width,
+                                                dvs_env_width,
+                                                stream_config_left_padding,
+                                                info->pipeline.left_cropping,
+                                                need_scaling);
 
                binary->in_frame_info.format = in_info->format;
                binary->in_frame_info.raw_bayer_order = in_info->raw_bayer_order;
                binary->in_frame_info.crop_info = in_info->crop_info;
        }
 
-       if (online) {
+       if (online)
+       {
                bits_per_pixel = ia_css_util_input_format_bpp(
-                       stream_format, two_ppc);
+                                    stream_format, two_ppc);
        }
        binary->in_frame_info.raw_bit_depth = bits_per_pixel;
 
-       for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
+       for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++)
+       {
                if (out_info[i]) {
                        binary->out_frame_info[i].res.width     = out_info[i]->res.width;
                        binary->out_frame_info[i].res.height    = out_info[i]->res.height;
@@ -1218,13 +1237,15 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
                }
        }
 
-       if (vf_info && (vf_info->res.width != 0)) {
-               err = ia_css_vf_configure(binary, bin_out_info, (struct ia_css_frame_info *)vf_info, &vf_log_ds);
+       if (vf_info && (vf_info->res.width != 0))
+       {
+               err = ia_css_vf_configure(binary, bin_out_info,
+                                         (struct ia_css_frame_info *)vf_info, &vf_log_ds);
                if (err != IA_CSS_SUCCESS) {
                        if (!accelerator) {
                                ia_css_isp_param_destroy_isp_parameters(
-                                       &binary->mem_params,
-                                       &binary->css_params);
+                                   &binary->mem_params,
+                                   &binary->css_params);
                        }
                        return err;
                }
@@ -1235,22 +1256,23 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
        binary->input_format      = stream_format;
 
        /* viewfinder output info */
-       if ((vf_info) && (vf_info->res.width != 0)) {
+       if ((vf_info) && (vf_info->res.width != 0))
+       {
                unsigned int vf_out_vecs, vf_out_width, vf_out_height;
 
                binary->vf_frame_info.format = vf_info->format;
                if (!bin_out_info)
                        return IA_CSS_ERR_INTERNAL_ERROR;
                vf_out_vecs = __ISP_VF_OUTPUT_WIDTH_VECS(bin_out_info->padded_width,
-                       vf_log_ds);
+                             vf_log_ds);
                vf_out_width = _ISP_VF_OUTPUT_WIDTH(vf_out_vecs);
                vf_out_height = _ISP_VF_OUTPUT_HEIGHT(bin_out_info->res.height,
-                       vf_log_ds);
+                                                     vf_log_ds);
 
                /* For preview mode, output pin is used instead of vf. */
                if (info->pipeline.mode == IA_CSS_BINARY_MODE_PREVIEW) {
                        binary->out_frame_info[0].res.width =
-                               (bin_out_info->res.width >> vf_log_ds);
+                           (bin_out_info->res.width >> vf_log_ds);
                        binary->out_frame_info[0].padded_width = vf_out_width;
                        binary->out_frame_info[0].res.height   = vf_out_height;
 
@@ -1263,24 +1285,27 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
                         * the width that we actually want to keep, not on
                         * the aligned width. */
                        binary->vf_frame_info.res.width =
-                               (bin_out_info->res.width >> vf_log_ds);
+                           (bin_out_info->res.width >> vf_log_ds);
                        binary->vf_frame_info.padded_width = vf_out_width;
                        binary->vf_frame_info.res.height   = vf_out_height;
                }
-       } else {
+       } else
+       {
                binary->vf_frame_info.res.width    = 0;
                binary->vf_frame_info.padded_width = 0;
                binary->vf_frame_info.res.height   = 0;
        }
 
-       if (info->enable.ca_gdc) {
+       if (info->enable.ca_gdc)
+       {
                binary->morph_tbl_width =
-                       _ISP_MORPH_TABLE_WIDTH(isp_internal_width);
+                   _ISP_MORPH_TABLE_WIDTH(isp_internal_width);
                binary->morph_tbl_aligned_width  =
-                       _ISP_MORPH_TABLE_ALIGNED_WIDTH(isp_internal_width);
+                   _ISP_MORPH_TABLE_ALIGNED_WIDTH(isp_internal_width);
                binary->morph_tbl_height =
-                       _ISP_MORPH_TABLE_HEIGHT(isp_internal_height);
-       } else {
+                   _ISP_MORPH_TABLE_HEIGHT(isp_internal_height);
+       } else
+       {
                binary->morph_tbl_width  = 0;
                binary->morph_tbl_aligned_width  = 0;
                binary->morph_tbl_height = 0;
@@ -1290,7 +1315,8 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
        sc_3a_dis_padded_width = binary->in_frame_info.padded_width;
        sc_3a_dis_height = binary->in_frame_info.res.height;
        if (bds_out_info && in_info &&
-                       bds_out_info->res.width != in_info->res.width) {
+           bds_out_info->res.width != in_info->res.width)
+       {
                /* TODO: Next, "internal_frame_info" should be derived from
                 * bds_out. So this part will change once it is in place! */
                sc_3a_dis_width = bds_out_info->res.width + info->pipeline.left_cropping;
@@ -1299,56 +1325,62 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
        }
 
        s3a_isp_width = _ISP_S3A_ELEMS_ISP_WIDTH(sc_3a_dis_padded_width,
-               info->pipeline.left_cropping);
-       if (info->s3a.fixed_s3a_deci_log) {
+                       info->pipeline.left_cropping);
+       if (info->s3a.fixed_s3a_deci_log)
+       {
                s3a_log_deci = info->s3a.fixed_s3a_deci_log;
-       } else {
+       } else
+       {
                s3a_log_deci = binary_grid_deci_factor_log2(s3a_isp_width,
-                                                           sc_3a_dis_height);
+                              sc_3a_dis_height);
        }
        binary->deci_factor_log2  = s3a_log_deci;
 
-       if (info->enable.s3a) {
+       if (info->enable.s3a)
+       {
                binary->s3atbl_width  =
-                       _ISP_S3ATBL_WIDTH(sc_3a_dis_width,
-                               s3a_log_deci);
+                   _ISP_S3ATBL_WIDTH(sc_3a_dis_width,
+                                     s3a_log_deci);
                binary->s3atbl_height =
-                       _ISP_S3ATBL_HEIGHT(sc_3a_dis_height,
-                               s3a_log_deci);
+                   _ISP_S3ATBL_HEIGHT(sc_3a_dis_height,
+                                      s3a_log_deci);
                binary->s3atbl_isp_width =
-                       _ISP_S3ATBL_ISP_WIDTH(s3a_isp_width,
-                                       s3a_log_deci);
+                   _ISP_S3ATBL_ISP_WIDTH(s3a_isp_width,
+                                         s3a_log_deci);
                binary->s3atbl_isp_height =
-                       _ISP_S3ATBL_ISP_HEIGHT(sc_3a_dis_height,
-                               s3a_log_deci);
-       } else {
+                   _ISP_S3ATBL_ISP_HEIGHT(sc_3a_dis_height,
+                                          s3a_log_deci);
+       } else
+       {
                binary->s3atbl_width  = 0;
                binary->s3atbl_height = 0;
                binary->s3atbl_isp_width  = 0;
                binary->s3atbl_isp_height = 0;
        }
 
-       if (info->enable.sc) {
+       if (info->enable.sc)
+       {
                binary->sctbl_width_per_color  =
 #ifndef ISP2401
-                       _ISP_SCTBL_WIDTH_PER_COLOR(sc_3a_dis_padded_width,
-                               s3a_log_deci);
+                   _ISP_SCTBL_WIDTH_PER_COLOR(sc_3a_dis_padded_width,
+                                              s3a_log_deci);
 #else
-                       _ISP_SCTBL_WIDTH_PER_COLOR(isp_internal_width, s3a_log_deci);
+                   _ISP_SCTBL_WIDTH_PER_COLOR(isp_internal_width, s3a_log_deci);
 #endif
                binary->sctbl_aligned_width_per_color =
-                       SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR;
+                   SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR;
                binary->sctbl_height =
 #ifndef ISP2401
-                       _ISP_SCTBL_HEIGHT(sc_3a_dis_height, s3a_log_deci);
+                   _ISP_SCTBL_HEIGHT(sc_3a_dis_height, s3a_log_deci);
 #else
-                       _ISP_SCTBL_HEIGHT(isp_internal_height, s3a_log_deci);
+                   _ISP_SCTBL_HEIGHT(isp_internal_height, s3a_log_deci);
                binary->sctbl_legacy_width_per_color  =
-                       _ISP_SCTBL_LEGACY_WIDTH_PER_COLOR(sc_3a_dis_padded_width, s3a_log_deci);
+                   _ISP_SCTBL_LEGACY_WIDTH_PER_COLOR(sc_3a_dis_padded_width, s3a_log_deci);
                binary->sctbl_legacy_height =
-                       _ISP_SCTBL_LEGACY_HEIGHT(sc_3a_dis_height, s3a_log_deci);
+                   _ISP_SCTBL_LEGACY_HEIGHT(sc_3a_dis_height, s3a_log_deci);
 #endif
-       } else {
+       } else
+       {
                binary->sctbl_width_per_color         = 0;
                binary->sctbl_aligned_width_per_color = 0;
                binary->sctbl_height                  = 0;
@@ -1358,11 +1390,11 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
 #endif
        }
        ia_css_sdis_init_info(&binary->dis,
-                               sc_3a_dis_width,
-                               sc_3a_dis_padded_width,
-                               sc_3a_dis_height,
-                               info->pipeline.isp_pipe_version,
-                               info->enable.dis);
+                             sc_3a_dis_width,
+                             sc_3a_dis_padded_width,
+                             sc_3a_dis_height,
+                             info->pipeline.isp_pipe_version,
+                             info->enable.dis);
        if (info->pipeline.left_cropping)
                binary->left_padding = 2 * ISP_VEC_NELEMS - info->pipeline.left_cropping;
        else
@@ -1373,17 +1405,16 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
 
 enum ia_css_err
 ia_css_binary_find(struct ia_css_binary_descr *descr,
-                  struct ia_css_binary *binary)
-{
+                  struct ia_css_binary *binary) {
        int mode;
        bool online;
        bool two_ppc;
        enum atomisp_input_format stream_format;
        const struct ia_css_frame_info *req_in_info,
-                                      *req_bds_out_info,
-                                      *req_out_info[IA_CSS_BINARY_MAX_OUTPUT_PORTS],
-                                      *req_bin_out_info = NULL,
-                                      *req_vf_info;
+               *req_bds_out_info,
+               *req_out_info[IA_CSS_BINARY_MAX_OUTPUT_PORTS],
+               *req_bin_out_info = NULL,
+               *req_vf_info;
 
        struct ia_css_binary_xinfo *xcandidate;
 #ifndef ISP2401
@@ -1411,9 +1442,9 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
        assert(binary);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_binary_find() enter: descr=%p, (mode=%d), binary=%p\n",
-               descr, descr->mode,
-               binary);
+                           "ia_css_binary_find() enter: descr=%p, (mode=%d), binary=%p\n",
+                           descr, descr->mode,
+                           binary);
 
        mode = descr->mode;
        online = descr->online;
@@ -1421,7 +1452,8 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
        stream_format = descr->stream_format;
        req_in_info = descr->in_info;
        req_bds_out_info = descr->bds_out_info;
-       for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
+       for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++)
+       {
                req_out_info[i] = descr->out_info[i];
                if (req_out_info[i] && (req_out_info[i]->res.width != 0))
                        req_bin_out_info = req_out_info[i];
@@ -1464,7 +1496,8 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
        internal_res.width = 0;
        internal_res.height = 0;
 
-       if (mode == IA_CSS_BINARY_MODE_VIDEO) {
+       if (mode == IA_CSS_BINARY_MODE_VIDEO)
+       {
                dvs_env = descr->dvs_env;
                need_dz = descr->enable_dz;
                /* Video is the only mode that has a nodz variant. */
@@ -1473,14 +1506,15 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
 
        /* print a map of the binary file */
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "BINARY INFO:\n");
-       for (i = 0; i < IA_CSS_BINARY_NUM_MODES; i++) {
+       for (i = 0; i < IA_CSS_BINARY_NUM_MODES; i++)
+       {
                xcandidate = binary_infos[i];
                if (xcandidate) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%d:\n", i);
                        while (xcandidate) {
                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, " Name:%s Type:%d Cont:%d\n",
-                                               xcandidate->blob->name, xcandidate->type,
-                                               xcandidate->sp.enable.continuous);
+                                                   xcandidate->blob->name, xcandidate->type,
+                                                   xcandidate->sp.enable.continuous);
                                xcandidate = xcandidate->next;
                        }
                }
@@ -1488,13 +1522,14 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
 
        /* printf("sh_css_binary_find: pipe version %d\n", isp_pipe_version); */
        for (xcandidate = binary_infos[mode]; xcandidate;
-            xcandidate = xcandidate->next) {
+            xcandidate = xcandidate->next)
+       {
                struct ia_css_binary_info *candidate = &xcandidate->sp;
                /* printf("sh_css_binary_find: evaluating candidate:
                 * %d\n",candidate->id); */
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "ia_css_binary_find() candidate = %p, mode = %d ID = %d\n",
-                       candidate, candidate->pipeline.mode, candidate->id);
+                                   "ia_css_binary_find() candidate = %p, mode = %d ID = %d\n",
+                                   candidate, candidate->pipeline.mode, candidate->id);
 
                /*
                 * MW: Only a limited set of jointly configured binaries can
@@ -1504,16 +1539,16 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
                if (!candidate->enable.continuous &&
                    continuous && (mode != IA_CSS_BINARY_MODE_COPY)) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: !%d && %d && (%d != %d)\n",
-                                       __LINE__, candidate->enable.continuous,
-                                       continuous, mode,
-                                       IA_CSS_BINARY_MODE_COPY);
+                                           "ia_css_binary_find() [%d] continue: !%d && %d && (%d != %d)\n",
+                                           __LINE__, candidate->enable.continuous,
+                                           continuous, mode,
+                                           IA_CSS_BINARY_MODE_COPY);
                        continue;
                }
                if (striped && candidate->iterator.num_stripes == 1) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: binary is not striped\n",
-                                       __LINE__);
+                                           "ia_css_binary_find() [%d] continue: binary is not striped\n",
+                                           __LINE__);
                        continue;
                }
 
@@ -1522,83 +1557,83 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
                    (mode != IA_CSS_BINARY_MODE_CAPTURE_PP) &&
                    (mode != IA_CSS_BINARY_MODE_VF_PP)) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: (%d != %d)\n",
-                               __LINE__,
-                               candidate->pipeline.isp_pipe_version, isp_pipe_version);
+                                           "ia_css_binary_find() [%d] continue: (%d != %d)\n",
+                                           __LINE__,
+                                           candidate->pipeline.isp_pipe_version, isp_pipe_version);
                        continue;
                }
                if (!candidate->enable.reduced_pipe && enable_reduced_pipe) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: !%d && %d\n",
-                               __LINE__,
-                               candidate->enable.reduced_pipe,
-                               enable_reduced_pipe);
+                                           "ia_css_binary_find() [%d] continue: !%d && %d\n",
+                                           __LINE__,
+                                           candidate->enable.reduced_pipe,
+                                           enable_reduced_pipe);
                        continue;
                }
                if (!candidate->enable.dvs_6axis && enable_dvs_6axis) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: !%d && %d\n",
-                               __LINE__,
-                               candidate->enable.dvs_6axis,
-                               enable_dvs_6axis);
+                                           "ia_css_binary_find() [%d] continue: !%d && %d\n",
+                                           __LINE__,
+                                           candidate->enable.dvs_6axis,
+                                           enable_dvs_6axis);
                        continue;
                }
                if (candidate->enable.high_speed && !enable_high_speed) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: %d && !%d\n",
-                               __LINE__,
-                               candidate->enable.high_speed,
-                               enable_high_speed);
+                                           "ia_css_binary_find() [%d] continue: %d && !%d\n",
+                                           __LINE__,
+                                           candidate->enable.high_speed,
+                                           enable_high_speed);
                        continue;
                }
                if (!candidate->enable.xnr && need_xnr) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: %d && !%d\n",
-                               __LINE__,
-                               candidate->enable.xnr,
-                               need_xnr);
+                                           "ia_css_binary_find() [%d] continue: %d && !%d\n",
+                                           __LINE__,
+                                           candidate->enable.xnr,
+                                           need_xnr);
                        continue;
                }
                if (!(candidate->enable.ds & 2) && enable_yuv_ds) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: !%d && %d\n",
-                               __LINE__,
-                               ((candidate->enable.ds & 2) != 0),
-                               enable_yuv_ds);
+                                           "ia_css_binary_find() [%d] continue: !%d && %d\n",
+                                           __LINE__,
+                                           ((candidate->enable.ds & 2) != 0),
+                                           enable_yuv_ds);
                        continue;
                }
                if ((candidate->enable.ds & 2) && !enable_yuv_ds) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: %d && !%d\n",
-                               __LINE__,
-                               ((candidate->enable.ds & 2) != 0),
-                               enable_yuv_ds);
+                                           "ia_css_binary_find() [%d] continue: %d && !%d\n",
+                                           __LINE__,
+                                           ((candidate->enable.ds & 2) != 0),
+                                           enable_yuv_ds);
                        continue;
                }
 
                if (mode == IA_CSS_BINARY_MODE_VIDEO &&
-                       candidate->enable.ds && need_ds)
+                   candidate->enable.ds && need_ds)
                        need_dz = false;
 
                /* when we require vf output, we need to have vf_veceven */
                if ((req_vf_info) && !(candidate->enable.vf_veceven ||
-                               /* or variable vf vec even */
-                               candidate->vf_dec.is_variable ||
-                               /* or more than one output pin. */
-                               xcandidate->num_output_pins > 1)) {
+                                      /* or variable vf vec even */
+                                      candidate->vf_dec.is_variable ||
+                                      /* or more than one output pin. */
+                                      xcandidate->num_output_pins > 1)) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: (%p != NULL) && !(%d || %d || (%d >%d))\n",
-                               __LINE__, req_vf_info,
-                               candidate->enable.vf_veceven,
-                               candidate->vf_dec.is_variable,
-                               xcandidate->num_output_pins, 1);
+                                           "ia_css_binary_find() [%d] continue: (%p != NULL) && !(%d || %d || (%d >%d))\n",
+                                           __LINE__, req_vf_info,
+                                           candidate->enable.vf_veceven,
+                                           candidate->vf_dec.is_variable,
+                                           xcandidate->num_output_pins, 1);
                        continue;
                }
                if (!candidate->enable.dvs_envelope && need_dvs) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: !%d && %d\n",
-                               __LINE__,
-                               candidate->enable.dvs_envelope, (int)need_dvs);
+                                           "ia_css_binary_find() [%d] continue: !%d && %d\n",
+                                           __LINE__,
+                                           candidate->enable.dvs_envelope, (int)need_dvs);
                        continue;
                }
                /* internal_res check considers input, output, and dvs envelope sizes */
@@ -1606,79 +1641,80 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
                                           req_bin_out_info, &dvs_env, candidate, &internal_res);
                if (internal_res.width > candidate->internal.max_width) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "ia_css_binary_find() [%d] continue: (%d > %d)\n",
-                       __LINE__, internal_res.width,
-                       candidate->internal.max_width);
+                                           "ia_css_binary_find() [%d] continue: (%d > %d)\n",
+                                           __LINE__, internal_res.width,
+                                           candidate->internal.max_width);
                        continue;
                }
                if (internal_res.height > candidate->internal.max_height) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "ia_css_binary_find() [%d] continue: (%d > %d)\n",
-                       __LINE__, internal_res.height,
-                       candidate->internal.max_height);
+                                           "ia_css_binary_find() [%d] continue: (%d > %d)\n",
+                                           __LINE__, internal_res.height,
+                                           candidate->internal.max_height);
                        continue;
                }
                if (!candidate->enable.ds && need_ds && !(xcandidate->num_output_pins > 1)) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: !%d && %d\n",
-                               __LINE__, candidate->enable.ds, (int)need_ds);
+                                           "ia_css_binary_find() [%d] continue: !%d && %d\n",
+                                           __LINE__, candidate->enable.ds, (int)need_ds);
                        continue;
                }
                if (!candidate->enable.uds && !candidate->enable.dvs_6axis && need_dz) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: !%d && !%d && %d\n",
-                               __LINE__, candidate->enable.uds,
-                               candidate->enable.dvs_6axis, (int)need_dz);
+                                           "ia_css_binary_find() [%d] continue: !%d && !%d && %d\n",
+                                           __LINE__, candidate->enable.uds,
+                                           candidate->enable.dvs_6axis, (int)need_dz);
                        continue;
                }
                if (online && candidate->input.source == IA_CSS_BINARY_INPUT_MEMORY) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: %d && (%d == %d)\n",
-                               __LINE__, online, candidate->input.source,
-                               IA_CSS_BINARY_INPUT_MEMORY);
+                                           "ia_css_binary_find() [%d] continue: %d && (%d == %d)\n",
+                                           __LINE__, online, candidate->input.source,
+                                           IA_CSS_BINARY_INPUT_MEMORY);
                        continue;
                }
                if (!online && candidate->input.source == IA_CSS_BINARY_INPUT_SENSOR) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: !%d && (%d == %d)\n",
-                               __LINE__, online, candidate->input.source,
-                               IA_CSS_BINARY_INPUT_SENSOR);
+                                           "ia_css_binary_find() [%d] continue: !%d && (%d == %d)\n",
+                                           __LINE__, online, candidate->input.source,
+                                           IA_CSS_BINARY_INPUT_SENSOR);
                        continue;
                }
                if (req_bin_out_info->res.width < candidate->output.min_width ||
                    req_bin_out_info->res.width > candidate->output.max_width) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: (%d > %d) || (%d < %d)\n",
-                               __LINE__,
-                               req_bin_out_info->padded_width,
-                               candidate->output.min_width,
-                               req_bin_out_info->padded_width,
-                               candidate->output.max_width);
+                                           "ia_css_binary_find() [%d] continue: (%d > %d) || (%d < %d)\n",
+                                           __LINE__,
+                                           req_bin_out_info->padded_width,
+                                           candidate->output.min_width,
+                                           req_bin_out_info->padded_width,
+                                           candidate->output.max_width);
                        continue;
                }
-               if (xcandidate->num_output_pins > 1 && /* in case we have a second output pin, */
-                    req_vf_info) { /* and we need vf output. */
+               if (xcandidate->num_output_pins > 1 &&
+                   /* in case we have a second output pin, */
+                   req_vf_info) { /* and we need vf output. */
                        if (req_vf_info->res.width > candidate->output.max_width) {
                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                                       "ia_css_binary_find() [%d] continue: (%d < %d)\n",
-                                       __LINE__,
-                                       req_vf_info->res.width,
-                                       candidate->output.max_width);
+                                                   "ia_css_binary_find() [%d] continue: (%d < %d)\n",
+                                                   __LINE__,
+                                                   req_vf_info->res.width,
+                                                   candidate->output.max_width);
                                continue;
                        }
                }
                if (req_in_info->padded_width > candidate->input.max_width) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: (%d > %d)\n",
-                               __LINE__, req_in_info->padded_width,
-                               candidate->input.max_width);
+                                           "ia_css_binary_find() [%d] continue: (%d > %d)\n",
+                                           __LINE__, req_in_info->padded_width,
+                                           candidate->input.max_width);
                        continue;
                }
                if (!binary_supports_output_format(xcandidate, req_bin_out_info->format)) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: !%d\n",
-                               __LINE__,
-                               binary_supports_output_format(xcandidate, req_bin_out_info->format));
+                                           "ia_css_binary_find() [%d] continue: !%d\n",
+                                           __LINE__,
+                                           binary_supports_output_format(xcandidate, req_bin_out_info->format));
                        continue;
                }
 #ifdef ISP2401
@@ -1690,16 +1726,17 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
                        continue;
                }
 #endif
-               if (xcandidate->num_output_pins > 1 && /* in case we have a second output pin, */
+               if (xcandidate->num_output_pins > 1 &&
+                   /* in case we have a second output pin, */
                    req_vf_info                   && /* and we need vf output. */
-                                                     /* check if the required vf format
-                                                        is supported. */
+                   /* check if the required vf format
+                   is supported. */
                    !binary_supports_output_format(xcandidate, req_vf_info->format)) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: (%d > %d) && (%p != NULL) && !%d\n",
-                               __LINE__, xcandidate->num_output_pins, 1,
-                               req_vf_info,
-                               binary_supports_output_format(xcandidate, req_vf_info->format));
+                                           "ia_css_binary_find() [%d] continue: (%d > %d) && (%p != NULL) && !%d\n",
+                                           __LINE__, xcandidate->num_output_pins, 1,
+                                           req_vf_info,
+                                           binary_supports_output_format(xcandidate, req_vf_info->format));
                        continue;
                }
 
@@ -1708,10 +1745,10 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
                    req_vf_info && candidate->enable.vf_veceven &&
                    !binary_supports_vf_format(xcandidate, req_vf_info->format)) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: (%d == %d) && (%p != NULL) && %d && !%d\n",
-                               __LINE__, xcandidate->num_output_pins, 1,
-                               req_vf_info, candidate->enable.vf_veceven,
-                               binary_supports_vf_format(xcandidate, req_vf_info->format));
+                                           "ia_css_binary_find() [%d] continue: (%d == %d) && (%p != NULL) && %d && !%d\n",
+                                           __LINE__, xcandidate->num_output_pins, 1,
+                                           req_vf_info, candidate->enable.vf_veceven,
+                                           binary_supports_vf_format(xcandidate, req_vf_info->format));
                        continue;
                }
 
@@ -1720,65 +1757,65 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
                    req_vf_info && candidate->enable.vf_veceven) { /* and we need vf output. */
                        if (req_vf_info->res.width > candidate->output.max_width) {
                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                                       "ia_css_binary_find() [%d] continue: (%d < %d)\n",
-                                       __LINE__,
-                                       req_vf_info->res.width,
-                                       candidate->output.max_width);
+                                                   "ia_css_binary_find() [%d] continue: (%d < %d)\n",
+                                                   __LINE__,
+                                                   req_vf_info->res.width,
+                                                   candidate->output.max_width);
                                continue;
                        }
                }
 
                if (!supports_bds_factor(candidate->bds.supported_bds_factors,
-                   descr->required_bds_factor)) {
+                                        descr->required_bds_factor)) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
-                               __LINE__, candidate->bds.supported_bds_factors,
-                               descr->required_bds_factor);
+                                           "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
+                                           __LINE__, candidate->bds.supported_bds_factors,
+                                           descr->required_bds_factor);
                        continue;
                }
 
                if (!candidate->enable.dpc && need_dpc) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
-                               __LINE__, candidate->enable.dpc,
-                               descr->enable_dpc);
+                                           "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
+                                           __LINE__, candidate->enable.dpc,
+                                           descr->enable_dpc);
                        continue;
                }
 
                if (candidate->uds.use_bci && enable_capture_pp_bli) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
-                               __LINE__, candidate->uds.use_bci,
-                               descr->enable_capture_pp_bli);
+                                           "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
+                                           __LINE__, candidate->uds.use_bci,
+                                           descr->enable_capture_pp_bli);
                        continue;
                }
 
 #ifdef ISP2401
                if (candidate->enable.luma_only != enable_luma_only) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: %d != %d\n",
-                               __LINE__, candidate->enable.luma_only,
-                               descr->enable_luma_only);
+                                           "ia_css_binary_find() [%d] continue: %d != %d\n",
+                                           __LINE__, candidate->enable.luma_only,
+                                           descr->enable_luma_only);
                        continue;
                }
 
                if (!candidate->enable.tnr && need_tnr) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_binary_find() [%d] continue: !%d && %d\n",
-                               __LINE__, candidate->enable.tnr,
-                               descr->enable_tnr);
+                                           "ia_css_binary_find() [%d] continue: !%d && %d\n",
+                                           __LINE__, candidate->enable.tnr,
+                                           descr->enable_tnr);
                        continue;
                }
 
 #endif
                /* reconfigure any variable properties of the binary */
                err = ia_css_binary_fill_info(xcandidate, online, two_ppc,
-                                      stream_format, req_in_info,
-                                      req_bds_out_info,
-                                      req_out_info, req_vf_info,
-                                      binary, &dvs_env,
-                                      descr->stream_config_left_padding,
-                                      false);
+                                             stream_format, req_in_info,
+                                             req_bds_out_info,
+                                             req_out_info, req_vf_info,
+                                             binary, &dvs_env,
+                                             descr->stream_config_left_padding,
+                                             false);
 
                if (err != IA_CSS_SUCCESS)
                        break;
@@ -1787,11 +1824,11 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
        }
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_binary_find() selected = %p, mode = %d ID = %d\n",
-               xcandidate, xcandidate ? xcandidate->sp.pipeline.mode : 0, xcandidate ? xcandidate->sp.id : 0);
+                           "ia_css_binary_find() selected = %p, mode = %d ID = %d\n",
+                           xcandidate, xcandidate ? xcandidate->sp.pipeline.mode : 0, xcandidate ? xcandidate->sp.id : 0);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_binary_find() leave: return_err=%d\n", err);
+                           "ia_css_binary_find() leave: return_err=%d\n", err);
 
        return err;
 }
@@ -1817,7 +1854,7 @@ ia_css_binary_destroy_isp_parameters(struct ia_css_binary *binary)
 
 void
 ia_css_binary_get_isp_binaries(struct ia_css_binary_xinfo **binaries,
-       uint32_t *num_isp_binaries)
+                              uint32_t *num_isp_binaries)
 {
        assert(binaries);
 
index fffe3b846162552906f00feb03345888c3e64280..9eca373c136363d48b2d7d1ab0f699777cbd6a2a 100644 (file)
@@ -48,10 +48,10 @@ more details.
  *     false, if the query fails.
  */
 bool ia_css_query_internal_queue_id(
-       enum ia_css_buffer_type buf_type,
-       unsigned int thread_id,
-       enum sh_css_queue_id *val
-       );
+    enum ia_css_buffer_type buf_type,
+    unsigned int thread_id,
+    enum sh_css_queue_id *val
+);
 
 /**
  * @brief  Map buffer type to a internal queue id.
@@ -62,10 +62,10 @@ bool ia_css_query_internal_queue_id(
  * @return none
  */
 void ia_css_queue_map(
-       unsigned int thread_id,
-       enum ia_css_buffer_type buf_type,
-       bool map
-       );
+    unsigned int thread_id,
+    enum ia_css_buffer_type buf_type,
+    bool map
+);
 
 /**
  * @brief  Initialize buffer type to a queue id mapping
@@ -97,9 +97,9 @@ void ia_css_bufq_init(void);
  *
 */
 enum ia_css_err ia_css_bufq_enqueue_buffer(
-       int thread_index,
-       int queue_id,
-       uint32_t item);
+    int thread_index,
+    int queue_id,
+    uint32_t item);
 
 /**
 * @brief Dequeues an item from SP to host buffer queue.
@@ -111,8 +111,8 @@ enum ia_css_err ia_css_bufq_enqueue_buffer(
  *
 */
 enum  ia_css_err ia_css_bufq_dequeue_buffer(
-       int queue_id,
-       uint32_t *item);
+    int queue_id,
+    uint32_t *item);
 
 /**
 * @brief  Enqueue an event item into host to SP communication event queue.
@@ -125,11 +125,11 @@ enum  ia_css_err ia_css_bufq_dequeue_buffer(
  *
 */
 enum ia_css_err ia_css_bufq_enqueue_psys_event(
-       u8 evt_id,
-       u8 evt_payload_0,
-       u8 evt_payload_1,
-       uint8_t evt_payload_2
-       );
+    u8 evt_id,
+    u8 evt_payload_0,
+    u8 evt_payload_1,
+    uint8_t evt_payload_2
+);
 
 /**
  * @brief   Dequeue an item from  SP to host communication event queue.
@@ -139,9 +139,9 @@ enum ia_css_err ia_css_bufq_enqueue_psys_event(
  *
 */
 enum  ia_css_err ia_css_bufq_dequeue_psys_event(
-       u8 item[BUFQ_EVENT_SIZE]
+    u8 item[BUFQ_EVENT_SIZE]
 
-       );
+);
 
 /**
  * @brief  Enqueue an event item into host to SP EOF event queue.
@@ -151,7 +151,7 @@ enum  ia_css_err ia_css_bufq_dequeue_psys_event(
  *
  */
 enum ia_css_err ia_css_bufq_enqueue_isys_event(
-       uint8_t evt_id);
+    uint8_t evt_id);
 
 /**
 * @brief   Dequeue an item from  SP to host communication EOF event queue.
@@ -162,7 +162,7 @@ enum ia_css_err ia_css_bufq_enqueue_isys_event(
  *
  */
 enum  ia_css_err ia_css_bufq_dequeue_isys_event(
-       u8 item[BUFQ_EVENT_SIZE]);
+    u8 item[BUFQ_EVENT_SIZE]);
 
 /**
 * @brief   Enqueue a tagger command item into tagger command queue..
@@ -172,7 +172,7 @@ enum  ia_css_err ia_css_bufq_dequeue_isys_event(
  *
 */
 enum ia_css_err ia_css_bufq_enqueue_tag_cmd(
-       uint32_t item);
+    uint32_t item);
 
 /**
 * @brief  Uninitializes bufq module.
index dff5bb8211b1c0f16f9de8bf9dc903aa7bcf165d..87ce18f8267ec506c671c7cf11c4a02692f599e1 100644 (file)
@@ -38,10 +38,10 @@ static char prefix[BUFQ_DUMP_FILE_NAME_PREFIX_SIZE] = {0};
 struct sh_css_queues {
        /* Host2SP buffer queue */
        ia_css_queue_t host2sp_buffer_queue_handles
-               [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
+       [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
        /* SP2Host buffer queue */
        ia_css_queue_t sp2host_buffer_queue_handles
-               [SH_CSS_MAX_NUM_QUEUES];
+       [SH_CSS_MAX_NUM_QUEUES];
 
        /* Host2SP event queue */
        ia_css_queue_t host2sp_psys_event_queue_handle;
@@ -65,10 +65,10 @@ struct sh_css_queues {
 struct sh_css_queues {
        /* Host2SP buffer queue */
        ia_css_queue_t host2sp_buffer_queue_handles
-               [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
+       [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
        /* SP2Host buffer queue */
        ia_css_queue_t sp2host_buffer_queue_handles
-               [SH_CSS_MAX_NUM_QUEUES];
+       [SH_CSS_MAX_NUM_QUEUES];
 
        /* Host2SP event queue */
        ia_css_queue_t host2sp_psys_event_queue_handle;
@@ -95,26 +95,27 @@ struct sh_css_queues {
 ********************************************************/
 static struct sh_css_queues css_queues;
 
-static int buffer_type_to_queue_id_map[SH_CSS_MAX_SP_THREADS][IA_CSS_NUM_DYNAMIC_BUFFER_TYPE];
+static int
+buffer_type_to_queue_id_map[SH_CSS_MAX_SP_THREADS][IA_CSS_NUM_DYNAMIC_BUFFER_TYPE];
 static bool queue_availability[SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
 
 /*******************************************************
 *** Static functions
 ********************************************************/
 static void map_buffer_type_to_queue_id(
-       unsigned int thread_id,
-       enum ia_css_buffer_type buf_type
-       );
+    unsigned int thread_id,
+    enum ia_css_buffer_type buf_type
+);
 static void unmap_buffer_type_to_queue_id(
-       unsigned int thread_id,
-       enum ia_css_buffer_type buf_type
-       );
+    unsigned int thread_id,
+    enum ia_css_buffer_type buf_type
+);
 
 static ia_css_queue_t *bufq_get_qhandle(
-       enum sh_css_queue_type type,
-       enum sh_css_queue_id id,
-       int thread
-       );
+    enum sh_css_queue_type type,
+    enum sh_css_queue_id id,
+    int thread
+);
 
 /*******************************************************
 *** Public functions
@@ -135,15 +136,15 @@ void ia_css_queue_map_init(void)
 }
 
 void ia_css_queue_map(
-       unsigned int thread_id,
-       enum ia_css_buffer_type buf_type,
-       bool map)
+    unsigned int thread_id,
+    enum ia_css_buffer_type buf_type,
+    bool map)
 {
        assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
        assert(thread_id < SH_CSS_MAX_SP_THREADS);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_queue_map() enter: buf_type=%d, thread_id=%d\n", buf_type, thread_id);
+                           "ia_css_queue_map() enter: buf_type=%d, thread_id=%d\n", buf_type, thread_id);
 
        if (map)
                map_buffer_type_to_queue_id(thread_id, buf_type);
@@ -155,13 +156,14 @@ void ia_css_queue_map(
  * @brief Query the internal queue ID.
  */
 bool ia_css_query_internal_queue_id(
-       enum ia_css_buffer_type buf_type,
-       unsigned int thread_id,
-       enum sh_css_queue_id *val)
+    enum ia_css_buffer_type buf_type,
+    unsigned int thread_id,
+    enum sh_css_queue_id *val)
 {
        IA_CSS_ENTER("buf_type=%d, thread_id=%d, val = %p", buf_type, thread_id, val);
 
-       if ((!val) || (thread_id >= SH_CSS_MAX_SP_THREADS) || (buf_type >= IA_CSS_NUM_DYNAMIC_BUFFER_TYPE)) {
+       if ((!val) || (thread_id >= SH_CSS_MAX_SP_THREADS) ||
+           (buf_type >= IA_CSS_NUM_DYNAMIC_BUFFER_TYPE)) {
                IA_CSS_LEAVE("return_val = false");
                return false;
        }
@@ -180,20 +182,22 @@ bool ia_css_query_internal_queue_id(
 *** Static functions
 ********************************************************/
 static void map_buffer_type_to_queue_id(
-       unsigned int thread_id,
-       enum ia_css_buffer_type buf_type)
+    unsigned int thread_id,
+    enum ia_css_buffer_type buf_type)
 {
        unsigned int i;
 
        assert(thread_id < SH_CSS_MAX_SP_THREADS);
        assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
-       assert(buffer_type_to_queue_id_map[thread_id][buf_type] == SH_CSS_INVALID_QUEUE_ID);
+       assert(buffer_type_to_queue_id_map[thread_id][buf_type] ==
+              SH_CSS_INVALID_QUEUE_ID);
 
        /* queue 0 is reserved for parameters because it doesn't depend on events */
        if (buf_type == IA_CSS_BUFFER_TYPE_PARAMETER_SET) {
                assert(queue_availability[thread_id][IA_CSS_PARAMETER_SET_QUEUE_ID]);
                queue_availability[thread_id][IA_CSS_PARAMETER_SET_QUEUE_ID] = false;
-               buffer_type_to_queue_id_map[thread_id][buf_type] = IA_CSS_PARAMETER_SET_QUEUE_ID;
+               buffer_type_to_queue_id_map[thread_id][buf_type] =
+                   IA_CSS_PARAMETER_SET_QUEUE_ID;
                return;
        }
 
@@ -201,7 +205,8 @@ static void map_buffer_type_to_queue_id(
        if (buf_type == IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET) {
                assert(queue_availability[thread_id][IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID]);
                queue_availability[thread_id][IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID] = false;
-               buffer_type_to_queue_id_map[thread_id][buf_type] = IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID;
+               buffer_type_to_queue_id_map[thread_id][buf_type] =
+                   IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID;
                return;
        }
 
@@ -218,14 +223,15 @@ static void map_buffer_type_to_queue_id(
 }
 
 static void unmap_buffer_type_to_queue_id(
-       unsigned int thread_id,
-       enum ia_css_buffer_type buf_type)
+    unsigned int thread_id,
+    enum ia_css_buffer_type buf_type)
 {
        int queue_id;
 
        assert(thread_id < SH_CSS_MAX_SP_THREADS);
        assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
-       assert(buffer_type_to_queue_id_map[thread_id][buf_type] != SH_CSS_INVALID_QUEUE_ID);
+       assert(buffer_type_to_queue_id_map[thread_id][buf_type] !=
+              SH_CSS_INVALID_QUEUE_ID);
 
        queue_id = buffer_type_to_queue_id_map[thread_id][buf_type];
        buffer_type_to_queue_id_map[thread_id][buf_type] = SH_CSS_INVALID_QUEUE_ID;
@@ -233,16 +239,16 @@ static void unmap_buffer_type_to_queue_id(
 }
 
 static ia_css_queue_t *bufq_get_qhandle(
-       enum sh_css_queue_type type,
-       enum sh_css_queue_id id,
-       int thread)
+    enum sh_css_queue_type type,
+    enum sh_css_queue_id id,
+    int thread)
 {
        ia_css_queue_t *q = NULL;
 
        switch (type) {
        case sh_css_host2sp_buffer_queue:
                if ((thread >= SH_CSS_MAX_SP_THREADS) || (thread < 0) ||
-                       (id == SH_CSS_INVALID_QUEUE_ID))
+                   (id == SH_CSS_INVALID_QUEUE_ID))
                        break;
                q = &css_queues.host2sp_buffer_queue_handles[thread][id];
                break;
@@ -308,7 +314,8 @@ void ia_css_bufq_init(void)
        /* Setup all the local queue descriptors for Host2SP Buffer Queues */
        for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++)
                for (j = 0; j < SH_CSS_MAX_NUM_QUEUES; j++) {
-                       init_bufq((uint32_t)offsetof(struct host_sp_queues, host2sp_buffer_queues_desc[i][j]),
+                       init_bufq((uint32_t)offsetof(struct host_sp_queues,
+                                                    host2sp_buffer_queues_desc[i][j]),
                                  (uint32_t)offsetof(struct host_sp_queues, host2sp_buffer_queues_elems[i][j]),
                                  &css_queues.host2sp_buffer_queue_handles[i][j]);
                }
@@ -321,23 +328,27 @@ void ia_css_bufq_init(void)
        }
 
        /* Host2SP event queue*/
-       init_bufq((uint32_t)offsetof(struct host_sp_queues, host2sp_psys_event_queue_desc),
+       init_bufq((uint32_t)offsetof(struct host_sp_queues,
+                                    host2sp_psys_event_queue_desc),
                  (uint32_t)offsetof(struct host_sp_queues, host2sp_psys_event_queue_elems),
                  &css_queues.host2sp_psys_event_queue_handle);
 
        /* SP2Host event queue */
-       init_bufq((uint32_t)offsetof(struct host_sp_queues, sp2host_psys_event_queue_desc),
+       init_bufq((uint32_t)offsetof(struct host_sp_queues,
+                                    sp2host_psys_event_queue_desc),
                  (uint32_t)offsetof(struct host_sp_queues, sp2host_psys_event_queue_elems),
                  &css_queues.sp2host_psys_event_queue_handle);
 
 #if !defined(HAS_NO_INPUT_SYSTEM)
        /* Host2SP ISYS event queue */
-       init_bufq((uint32_t)offsetof(struct host_sp_queues, host2sp_isys_event_queue_desc),
+       init_bufq((uint32_t)offsetof(struct host_sp_queues,
+                                    host2sp_isys_event_queue_desc),
                  (uint32_t)offsetof(struct host_sp_queues, host2sp_isys_event_queue_elems),
                  &css_queues.host2sp_isys_event_queue_handle);
 
        /* SP2Host ISYS event queue*/
-       init_bufq((uint32_t)offsetof(struct host_sp_queues, sp2host_isys_event_queue_desc),
+       init_bufq((uint32_t)offsetof(struct host_sp_queues,
+                                    sp2host_isys_event_queue_desc),
                  (uint32_t)offsetof(struct host_sp_queues, sp2host_isys_event_queue_elems),
                  &css_queues.sp2host_isys_event_queue_handle);
 
@@ -351,9 +362,9 @@ void ia_css_bufq_init(void)
 }
 
 enum ia_css_err ia_css_bufq_enqueue_buffer(
-       int thread_index,
-       int queue_id,
-       uint32_t item)
+    int thread_index,
+    int queue_id,
+    uint32_t item)
 {
        enum ia_css_err return_err = IA_CSS_SUCCESS;
        ia_css_queue_t *q;
@@ -361,13 +372,13 @@ enum ia_css_err ia_css_bufq_enqueue_buffer(
 
        IA_CSS_ENTER_PRIVATE("queue_id=%d", queue_id);
        if ((thread_index >= SH_CSS_MAX_SP_THREADS) || (thread_index < 0) ||
-                       (queue_id == SH_CSS_INVALID_QUEUE_ID))
+           (queue_id == SH_CSS_INVALID_QUEUE_ID))
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        /* Get the queue for communication */
        q = bufq_get_qhandle(sh_css_host2sp_buffer_queue,
-               queue_id,
-               thread_index);
+                            queue_id,
+                            thread_index);
        if (q) {
                error = ia_css_queue_enqueue(q, item);
                return_err = ia_css_convert_errno(error);
@@ -381,8 +392,8 @@ enum ia_css_err ia_css_bufq_enqueue_buffer(
 }
 
 enum ia_css_err ia_css_bufq_dequeue_buffer(
-       int queue_id,
-       uint32_t *item)
+    int queue_id,
+    uint32_t *item)
 {
        enum ia_css_err return_err;
        int error = 0;
@@ -396,8 +407,8 @@ enum ia_css_err ia_css_bufq_dequeue_buffer(
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        q = bufq_get_qhandle(sh_css_sp2host_buffer_queue,
-               queue_id,
-               -1);
+                            queue_id,
+                            -1);
        if (q) {
                error = ia_css_queue_dequeue(q, item);
                return_err = ia_css_convert_errno(error);
@@ -411,10 +422,10 @@ enum ia_css_err ia_css_bufq_dequeue_buffer(
 }
 
 enum ia_css_err ia_css_bufq_enqueue_psys_event(
-       u8 evt_id,
-       u8 evt_payload_0,
-       u8 evt_payload_1,
-       uint8_t evt_payload_2)
+    u8 evt_id,
+    u8 evt_payload_0,
+    u8 evt_payload_1,
+    uint8_t evt_payload_2)
 {
        enum ia_css_err return_err;
        int error = 0;
@@ -428,7 +439,7 @@ enum ia_css_err ia_css_bufq_enqueue_psys_event(
        }
 
        error = ia_css_eventq_send(q,
-                       evt_id, evt_payload_0, evt_payload_1, evt_payload_2);
+                                  evt_id, evt_payload_0, evt_payload_1, evt_payload_2);
 
        return_err = ia_css_convert_errno(error);
        IA_CSS_LEAVE_ERR_PRIVATE(return_err);
@@ -436,7 +447,7 @@ enum ia_css_err ia_css_bufq_enqueue_psys_event(
 }
 
 enum  ia_css_err ia_css_bufq_dequeue_psys_event(
-       u8 item[BUFQ_EVENT_SIZE])
+    u8 item[BUFQ_EVENT_SIZE])
 {
        enum ia_css_err;
        int error = 0;
@@ -459,7 +470,7 @@ enum  ia_css_err ia_css_bufq_dequeue_psys_event(
 }
 
 enum  ia_css_err ia_css_bufq_dequeue_isys_event(
-       u8 item[BUFQ_EVENT_SIZE])
+    u8 item[BUFQ_EVENT_SIZE])
 {
 #if !defined(HAS_NO_INPUT_SYSTEM)
        enum ia_css_err;
@@ -510,7 +521,7 @@ enum ia_css_err ia_css_bufq_enqueue_isys_event(uint8_t evt_id)
 }
 
 enum ia_css_err ia_css_bufq_enqueue_tag_cmd(
-       uint32_t item)
+    uint32_t item)
 {
 #if !defined(HAS_NO_INPUT_SYSTEM)
        enum ia_css_err return_err;
@@ -547,7 +558,7 @@ static void bufq_dump_queue_info(const char *prefix, ia_css_queue_t *qhandle)
        ia_css_queue_get_used_space(qhandle, &used);
        ia_css_queue_get_free_space(qhandle, &free);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s: used=%u free=%u\n",
-               prefix, used, free);
+                           prefix, used, free);
 }
 
 void ia_css_bufq_dump_queue_info(void)
@@ -559,29 +570,29 @@ void ia_css_bufq_dump_queue_info(void)
        for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++) {
                for (j = 0; j < SH_CSS_MAX_NUM_QUEUES; j++) {
                        snprintf(prefix, BUFQ_DUMP_FILE_NAME_PREFIX_SIZE,
-                               "host2sp_buffer_queue[%u][%u]", i, j);
+                                "host2sp_buffer_queue[%u][%u]", i, j);
                        bufq_dump_queue_info(prefix,
-                               &css_queues.host2sp_buffer_queue_handles[i][j]);
+                                            &css_queues.host2sp_buffer_queue_handles[i][j]);
                }
        }
 
        for (i = 0; i < SH_CSS_MAX_NUM_QUEUES; i++) {
                snprintf(prefix, BUFQ_DUMP_FILE_NAME_PREFIX_SIZE,
-                       "sp2host_buffer_queue[%u]", i);
+                        "sp2host_buffer_queue[%u]", i);
                bufq_dump_queue_info(prefix,
-                       &css_queues.sp2host_buffer_queue_handles[i]);
+                                    &css_queues.sp2host_buffer_queue_handles[i]);
        }
        bufq_dump_queue_info("host2sp_psys_event",
-               &css_queues.host2sp_psys_event_queue_handle);
+                            &css_queues.host2sp_psys_event_queue_handle);
        bufq_dump_queue_info("sp2host_psys_event",
-               &css_queues.sp2host_psys_event_queue_handle);
+                            &css_queues.sp2host_psys_event_queue_handle);
 
 #if !defined(HAS_NO_INPUT_SYSTEM)
        bufq_dump_queue_info("host2sp_isys_event",
-               &css_queues.host2sp_isys_event_queue_handle);
+                            &css_queues.host2sp_isys_event_queue_handle);
        bufq_dump_queue_info("sp2host_isys_event",
-               &css_queues.sp2host_isys_event_queue_handle);
+                            &css_queues.sp2host_isys_event_queue_handle);
        bufq_dump_queue_info("host2sp_tag_cmd",
-               &css_queues.host2sp_tag_cmd_queue_handle);
+                            &css_queues.host2sp_tag_cmd_queue_handle);
 #endif
 }
index a330575bb1522c6aae30fa12714b687e9fe4e4bb..682ecff5bc52aeb80975dee1291993735f58ce2d 100644 (file)
@@ -152,7 +152,7 @@ void ia_css_debug_dump_sp_stack_info(void);
  * @return     None
  */
 void ia_css_debug_set_dtrace_level(
-       const unsigned int      trace_level);
+    const unsigned int trace_level);
 
 /*! @brief Function to get the global dtrace verbosity level.
  * @return     global dtrace verbosity level
@@ -203,11 +203,11 @@ void ia_css_debug_dump_sp_sw_debug_info(void);
  * @return     None
  */
 void ia_css_debug_dump_debug_info(
-       const char      *context);
+    const char *context);
 
 #if SP_DEBUG != SP_DEBUG_NONE
 void ia_css_debug_print_sp_debug_state(
-       const struct sh_css_sp_debug_state *state);
+    const struct sh_css_sp_debug_state *state);
 #endif
 
 /*! @brief Dump all related binary info data
@@ -215,7 +215,7 @@ void ia_css_debug_print_sp_debug_state(
  * @return     None
  */
 void ia_css_debug_binary_print(
-       const struct ia_css_binary *bi);
+    const struct ia_css_binary *bi);
 
 void ia_css_debug_sp_dump_mipi_fifo_high_water(void);
 
@@ -286,8 +286,8 @@ void ia_css_debug_dump_isys_state(void);
  * @return     None
  */
 void ia_css_debug_frame_print(
-       const struct ia_css_frame       *frame,
-       const char      *descr);
+    const struct ia_css_frame  *frame,
+    const char *descr);
 
 /*! @brief Function to enable sp sleep mode.
  * Function that enables sp sleep mode
@@ -309,7 +309,8 @@ void ia_css_debug_wake_up_sp(void);
  * @param[in]  enable          flag indicating which parameters to dump.
  * @return     None
  */
-void ia_css_debug_dump_isp_params(struct ia_css_stream *stream, unsigned int enable);
+void ia_css_debug_dump_isp_params(struct ia_css_stream *stream,
+                                 unsigned int enable);
 
 /*! @brief Function to dump some sp performance counters.
  * Dump sp performance counters, currently input system errors.
@@ -334,8 +335,8 @@ void sh_css_dump_sp_raw_copy_linecount(bool reduced);
  * @return     None
  */
 void ia_css_debug_dump_resolution(
-       const struct ia_css_resolution *res,
-       const char *label);
+    const struct ia_css_resolution *res,
+    const char *label);
 
 /*! @brief Dump the frame info to the trace output
  * Dumps the frame info to the trace output.
@@ -344,8 +345,8 @@ void ia_css_debug_dump_resolution(
  * @return     None
  */
 void ia_css_debug_dump_frame_info(
-       const struct ia_css_frame_info *info,
-       const char *label);
+    const struct ia_css_frame_info *info,
+    const char *label);
 
 /*! @brief Dump the capture config info to the trace output
  * Dumps the capture config info to the trace output.
@@ -353,7 +354,7 @@ void ia_css_debug_dump_frame_info(
  * @return     None
  */
 void ia_css_debug_dump_capture_config(
-       const struct ia_css_capture_config *config);
+    const struct ia_css_capture_config *config);
 
 /*! @brief Dump the pipe extra config info to the trace output
  * Dumps the pipe extra config info to the trace output.
@@ -361,7 +362,7 @@ void ia_css_debug_dump_capture_config(
  * @return     None
  */
 void ia_css_debug_dump_pipe_extra_config(
-       const struct ia_css_pipe_extra_config *extra_config);
+    const struct ia_css_pipe_extra_config *extra_config);
 
 /*! @brief Dump the pipe config info to the trace output
  * Dumps the pipe config info to the trace output.
@@ -369,7 +370,7 @@ void ia_css_debug_dump_pipe_extra_config(
  * @return     None
  */
 void ia_css_debug_dump_pipe_config(
-       const struct ia_css_pipe_config *config);
+    const struct ia_css_pipe_config *config);
 
 /*! @brief Dump the stream config source info to the trace output
  * Dumps the stream config source info to the trace output.
@@ -377,7 +378,7 @@ void ia_css_debug_dump_pipe_config(
  * @return     None
  */
 void ia_css_debug_dump_stream_config_source(
-       const struct ia_css_stream_config *config);
+    const struct ia_css_stream_config *config);
 
 /*! @brief Dump the mipi buffer config info to the trace output
  * Dumps the mipi buffer config info to the trace output.
@@ -385,7 +386,7 @@ void ia_css_debug_dump_stream_config_source(
  * @return     None
  */
 void ia_css_debug_dump_mipi_buffer_config(
-       const struct ia_css_mipi_buffer_config *config);
+    const struct ia_css_mipi_buffer_config *config);
 
 /*! @brief Dump the metadata config info to the trace output
  * Dumps the metadata config info to the trace output.
@@ -393,7 +394,7 @@ void ia_css_debug_dump_mipi_buffer_config(
  * @return     None
  */
 void ia_css_debug_dump_metadata_config(
-       const struct ia_css_metadata_config *config);
+    const struct ia_css_metadata_config *config);
 
 /*! @brief Dump the stream config info to the trace output
  * Dumps the stream config info to the trace output.
@@ -402,8 +403,8 @@ void ia_css_debug_dump_metadata_config(
  * @return     None
  */
 void ia_css_debug_dump_stream_config(
-       const struct ia_css_stream_config *config,
-       int num_pipes);
+    const struct ia_css_stream_config *config,
+    int num_pipes);
 
 /*! @brief Dump the state of the SP tagger
  * Dumps the internal state of the SP tagger
@@ -440,9 +441,9 @@ bool ia_css_debug_mode_init(void);
  *     - false, otherwise.
  */
 bool ia_css_debug_mode_disable_dma_channel(
-       int dma_ID,
-       int channel_id,
-       int request_type);
+    int dma_ID,
+    int channel_id,
+    int request_type);
 /**
  * @brief Enable the DMA channel.
  *
@@ -458,9 +459,9 @@ bool ia_css_debug_mode_disable_dma_channel(
  *     - false, otherwise.
  */
 bool ia_css_debug_mode_enable_dma_channel(
-       int dma_ID,
-       int channel_id,
-       int request_type);
+    int dma_ID,
+    int channel_id,
+    int request_type);
 
 /**
  * @brief Dump tracer data.
@@ -493,7 +494,7 @@ void ia_css_debug_pc_dump(sp_ID_t id, unsigned int num_of_dumps);
  * @return     None
  */
 void ia_css_debug_dump_hang_status(
-       struct ia_css_pipe *pipe);
+    struct ia_css_pipe *pipe);
 
 /*! @brief External command handler
  * External command handler
index fcb923d9c4c6c725a6b649c92d58d77644b1c763..3443807cb7c93805bd192060713c6681fc9c6c36 100644 (file)
@@ -59,8 +59,8 @@ void ia_css_debug_pipe_graph_dump_epilogue(void);
  * @return     None
  */
 void ia_css_debug_pipe_graph_dump_stage(
-               struct ia_css_pipeline_stage *stage,
-               enum ia_css_pipe_id id);
+    struct ia_css_pipeline_stage *stage,
+    enum ia_css_pipe_id id);
 
 /**
  * @brief Internal debug support for constructing a pipe graph.
@@ -69,7 +69,7 @@ void ia_css_debug_pipe_graph_dump_stage(
  * @return     None
  */
 void ia_css_debug_pipe_graph_dump_sp_raw_copy(
-               struct ia_css_frame *out_frame);
+    struct ia_css_frame *out_frame);
 
 /**
  * @brief Internal debug support for constructing a pipe graph.
@@ -78,6 +78,6 @@ void ia_css_debug_pipe_graph_dump_sp_raw_copy(
  * @return     None
  */
 void ia_css_debug_pipe_graph_dump_stream_config(
-               const struct ia_css_stream_config *stream_config);
+    const struct ia_css_stream_config *stream_config);
 
 #endif /* _IA_CSS_DEBUG_PIPE_H_ */
index 05969686b8c241a7628d22367a03962f84df6c98..88d43ce3f97034e35a21a8601dc8c4bb10cedb7e 100644 (file)
@@ -141,7 +141,7 @@ static struct pipe_graph_class {
        enum atomisp_input_format stream_format;
 } pg_inst = {true, 0, 0, 0, 0, N_ATOMISP_INPUT_FORMAT};
 
-static const char * const queue_id_to_str[] = {
+static const char *const queue_id_to_str[] = {
        /* [SH_CSS_QUEUE_A_ID]     =*/ "queue_A",
        /* [SH_CSS_QUEUE_B_ID]     =*/ "queue_B",
        /* [SH_CSS_QUEUE_C_ID]     =*/ "queue_C",
@@ -152,7 +152,7 @@ static const char * const queue_id_to_str[] = {
        /* [SH_CSS_QUEUE_H_ID]     =*/ "queue_H"
 };
 
-static const char * const pipe_id_to_str[] = {
+static const char *const pipe_id_to_str[] = {
        /* [IA_CSS_PIPE_ID_PREVIEW]   =*/ "preview",
        /* [IA_CSS_PIPE_ID_COPY]      =*/ "copy",
        /* [IA_CSS_PIPE_ID_VIDEO]     =*/ "video",
@@ -174,9 +174,9 @@ void ia_css_debug_dtrace(unsigned int level, const char *fmt, ...)
 }
 
 static void debug_dump_long_array_formatted(
-       const sp_ID_t sp_id,
-       hrt_address stack_sp_addr,
-       unsigned int stack_size)
+    const sp_ID_t sp_id,
+    hrt_address stack_sp_addr,
+    unsigned int stack_size)
 {
        unsigned int i;
        u32 val;
@@ -198,7 +198,7 @@ static void debug_dump_long_array_formatted(
 }
 
 static void debug_dump_sp_stack_info(
-       const sp_ID_t sp_id)
+    const sp_ID_t sp_id)
 {
        const struct ia_css_fw_info *fw;
        unsigned int HIVE_ADDR_sp_threads_stack;
@@ -211,33 +211,33 @@ static void debug_dump_sp_stack_info(
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "sp_id(%u) stack info\n", sp_id);
        ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-               "from objects stack_addr_offset:0x%x stack_size_offset:0x%x\n",
-               fw->info.sp.threads_stack,
-               fw->info.sp.threads_stack_size);
+                           "from objects stack_addr_offset:0x%x stack_size_offset:0x%x\n",
+                           fw->info.sp.threads_stack,
+                           fw->info.sp.threads_stack_size);
 
        HIVE_ADDR_sp_threads_stack = fw->info.sp.threads_stack;
        HIVE_ADDR_sp_threads_stack_size = fw->info.sp.threads_stack_size;
 
        if (fw->info.sp.threads_stack == 0 ||
-               fw->info.sp.threads_stack_size == 0)
+           fw->info.sp.threads_stack_size == 0)
                return;
 
        (void)HIVE_ADDR_sp_threads_stack;
        (void)HIVE_ADDR_sp_threads_stack_size;
 
        sp_dmem_load(sp_id,
-               (unsigned int)sp_address_of(sp_threads_stack),
-               &stack_sp_addr, sizeof(stack_sp_addr));
+                    (unsigned int)sp_address_of(sp_threads_stack),
+                    &stack_sp_addr, sizeof(stack_sp_addr));
        sp_dmem_load(sp_id,
-               (unsigned int)sp_address_of(sp_threads_stack_size),
-               &stack_sizes, sizeof(stack_sizes));
+                    (unsigned int)sp_address_of(sp_threads_stack_size),
+                    &stack_sizes, sizeof(stack_sizes));
 
        for (i = 0 ; i < MAX_THREAD_NUM; i++) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-                       "thread: %u stack_addr: 0x%08x stack_size: %u\n",
-                       i, stack_sp_addr[i], stack_sizes[i]);
+                                   "thread: %u stack_addr: 0x%08x stack_size: %u\n",
+                                   i, stack_sp_addr[i], stack_sizes[i]);
                debug_dump_long_array_formatted(sp_id, (hrt_address)stack_sp_addr[i],
-                       stack_sizes[i]);
+                                               stack_sizes[i]);
        }
 }
 
@@ -257,7 +257,8 @@ unsigned int ia_css_debug_get_dtrace_level(void)
        return ia_css_debug_trace_level;
 }
 
-static const char *debug_stream_format2str(const enum atomisp_input_format stream_format)
+static const char *debug_stream_format2str(const enum atomisp_input_format
+       stream_format)
 {
        switch (stream_format) {
        case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
@@ -345,7 +346,8 @@ static const char *debug_stream_format2str(const enum atomisp_input_format strea
        }
 };
 
-static const char *debug_frame_format2str(const enum ia_css_frame_format frame_format)
+static const char *debug_frame_format2str(const enum ia_css_frame_format
+       frame_format)
 {
        switch (frame_format) {
        case IA_CSS_FRAME_FORMAT_NV11:
@@ -559,7 +561,7 @@ void ia_css_debug_dump_sp_state(void)
 }
 
 static void debug_print_fifo_channel_state(const fifo_channel_state_t *state,
-                                          const char *descr)
+       const char *descr)
 {
        assert(state);
        assert(descr);
@@ -680,11 +682,11 @@ static void debug_print_if_state(input_formatter_state_t *state, const char *id)
                            "Hsync", st_hsync_active_low);
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "Allow FIFO overflow", st_allow_fifo_overflow);
-/* Flag that tells whether the IF gives backpressure on frames */
-/*
- * FYI, this is only on the frame request (indicate), when the IF has
- * synch'd on a frame it will always give back pressure
- */
+       /* Flag that tells whether the IF gives backpressure on frames */
+       /*
       * FYI, this is only on the frame request (indicate), when the IF has
       * synch'd on a frame it will always give back pressure
       */
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "Block when no request", st_block_fifo_when_no_req);
 
@@ -692,65 +694,65 @@ static void debug_print_if_state(input_formatter_state_t *state, const char *id)
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "IF_BLOCKED_FIFO_NO_REQ_ADDRESS",
                            input_formatter_reg_load(INPUT_FORMATTER0_ID,
-                           HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS)
-           );
+                                   HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS)
+                          );
 
        ia_css_debug_dtrace(2, "\t%-32s:\n", "InputSwitch State");
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_input_switch_lut_reg0",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                           _REG_GP_IFMT_input_switch_lut_reg0));
+                                              _REG_GP_IFMT_input_switch_lut_reg0));
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_input_switch_lut_reg1",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                               _REG_GP_IFMT_input_switch_lut_reg1));
+                                              _REG_GP_IFMT_input_switch_lut_reg1));
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_input_switch_lut_reg2",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                               _REG_GP_IFMT_input_switch_lut_reg2));
+                                              _REG_GP_IFMT_input_switch_lut_reg2));
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_input_switch_lut_reg3",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                               _REG_GP_IFMT_input_switch_lut_reg3));
+                                              _REG_GP_IFMT_input_switch_lut_reg3));
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_input_switch_lut_reg4",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                               _REG_GP_IFMT_input_switch_lut_reg4));
+                                              _REG_GP_IFMT_input_switch_lut_reg4));
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_input_switch_lut_reg5",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                               _REG_GP_IFMT_input_switch_lut_reg5));
+                                              _REG_GP_IFMT_input_switch_lut_reg5));
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_input_switch_lut_reg6",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                               _REG_GP_IFMT_input_switch_lut_reg6));
+                                              _REG_GP_IFMT_input_switch_lut_reg6));
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_input_switch_lut_reg7",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                               _REG_GP_IFMT_input_switch_lut_reg7));
+                                              _REG_GP_IFMT_input_switch_lut_reg7));
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_input_switch_fsync_lut",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                               _REG_GP_IFMT_input_switch_fsync_lut));
+                                              _REG_GP_IFMT_input_switch_fsync_lut));
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_srst",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                               _REG_GP_IFMT_srst));
+                                              _REG_GP_IFMT_srst));
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "_REG_GP_IFMT_slv_reg_srst",
                            gp_device_reg_load(GP_DEVICE0_ID,
-                                _REG_GP_IFMT_slv_reg_srst));
+                                              _REG_GP_IFMT_slv_reg_srst));
 #endif
 
        ia_css_debug_dtrace(2, "\tFSM Status:\n");
@@ -1002,7 +1004,7 @@ void ia_css_debug_dump_dma_state(void)
                break;
        default:
                snprintf(last_cmd_str, 64,
-                 "unknown [Channel: %d]", ch_id);
+                        "unknown [Channel: %d]", ch_id);
                break;
        }
        ia_css_debug_dtrace(2, "\t%-32s: (0x%X : %s)\n",
@@ -1304,12 +1306,12 @@ void ia_css_debug_binary_print(const struct ia_css_binary *bi)
        for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
                if (bi->out_frame_info[i].res.width != 0) {
                        ia_css_debug_dtrace(2,
-                                   "out%d:    %dx%d, format = %d, padded width = %d\n",
-                                       i,
-                                   bi->out_frame_info[i].res.width,
-                                   bi->out_frame_info[i].res.height,
-                                   bi->out_frame_info[i].format,
-                                   bi->out_frame_info[i].padded_width);
+                                           "out%d:    %dx%d, format = %d, padded width = %d\n",
+                                           i,
+                                           bi->out_frame_info[i].res.width,
+                                           bi->out_frame_info[i].res.height,
+                                           bi->out_frame_info[i].format,
+                                           bi->out_frame_info[i].padded_width);
                }
        }
        ia_css_debug_dtrace(2,
@@ -1617,13 +1619,13 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
 
 #elif SP_DEBUG == SP_DEBUG_TRACE
 
-/*
- * This is just an example how TRACE_FILE_ID (see ia_css_debug.sp.h) will
- * me mapped on the file name string.
- *
- * Adjust this to your trace case!
- */
-       static char const * const id2filename[8] = {
+       /*
       * This is just an example how TRACE_FILE_ID (see ia_css_debug.sp.h) will
       * me mapped on the file name string.
       *
       * Adjust this to your trace case!
       */
+       static char const *const id2filename[8] = {
                "param_buffer.sp.c | tagger.sp.c | pipe_data.sp.c",
                "isp_init.sp.c",
                "sp_raw_copy.hive.c",
@@ -1680,9 +1682,9 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
                for (n = host_index_last[t]; n < sp_index_last; n++) {
                        int i = n % SH_CSS_SP_DBG_TRACE_DEPTH;
                        int l = state->trace[t][i].location &
-                           ((1 << SH_CSS_SP_DBG_TRACE_FILE_ID_BIT_POS) - 1);
+                               ((1 << SH_CSS_SP_DBG_TRACE_FILE_ID_BIT_POS) - 1);
                        int fid = state->trace[t][i].location >>
-                           SH_CSS_SP_DBG_TRACE_FILE_ID_BIT_POS;
+                                 SH_CSS_SP_DBG_TRACE_FILE_ID_BIT_POS;
                        int ts = state->trace[t][i].time_stamp;
 
                        if (ts) {
@@ -1988,7 +1990,7 @@ static void debug_print_isys_capture_unit_state(capture_unit_state_t *state)
 }
 
 static void debug_print_isys_acquisition_unit_state(
-                               acquisition_unit_state_t *state)
+    acquisition_unit_state_t *state)
 {
        assert(state);
 
@@ -2315,8 +2317,8 @@ findf_dmem_params(struct ia_css_stream *stream, short idx)
                        short *offsets = (short *)&binary->info->mem_offsets.offsets.param->dmem;
                        short dmem_offset = offsets[idx];
                        const struct ia_css_host_data *isp_data =
-                               ia_css_isp_param_get_mem_init(&binary->mem_params,
-                                                       IA_CSS_PARAM_CLASS_PARAM, IA_CSS_ISP_DMEM0);
+                           ia_css_isp_param_get_mem_init(&binary->mem_params,
+                                                         IA_CSS_PARAM_CLASS_PARAM, IA_CSS_ISP_DMEM0);
                        if (dmem_offset < 0)
                                continue;
                        return &isp_data->address[dmem_offset];
@@ -2376,8 +2378,10 @@ void ia_css_debug_dump_isp_params(struct ia_css_stream *stream,
        if ((enable & IA_CSS_DEBUG_DUMP_CSC)
            || (enable & IA_CSS_DEBUG_DUMP_ALL)) {
                ia_css_csc_dump(FIND_DMEM_PARAMS(stream, csc), IA_CSS_DEBUG_VERBOSE);
-               ia_css_yuv2rgb_dump(FIND_DMEM_PARAMS_TYPE(stream, yuv2rgb, csc), IA_CSS_DEBUG_VERBOSE);
-               ia_css_rgb2yuv_dump(FIND_DMEM_PARAMS_TYPE(stream, rgb2yuv, csc), IA_CSS_DEBUG_VERBOSE);
+               ia_css_yuv2rgb_dump(FIND_DMEM_PARAMS_TYPE(stream, yuv2rgb, csc),
+                                   IA_CSS_DEBUG_VERBOSE);
+               ia_css_rgb2yuv_dump(FIND_DMEM_PARAMS_TYPE(stream, rgb2yuv, csc),
+                                   IA_CSS_DEBUG_VERBOSE);
        }
        if ((enable & IA_CSS_DEBUG_DUMP_GC)
            || (enable & IA_CSS_DEBUG_DUMP_ALL)) {
@@ -2407,12 +2411,12 @@ void sh_css_dump_sp_raw_copy_linecount(bool reduced)
 
        fw = &sh_css_sp_fw;
        HIVE_ADDR_raw_copy_line_count =
-                       fw->info.sp.raw_copy_line_count;
+           fw->info.sp.raw_copy_line_count;
 
        (void)HIVE_ADDR_raw_copy_line_count;
 
        sp_dmem_load(SP0_ID,
-               (unsigned int)sp_address_of(raw_copy_line_count),
+                    (unsigned int)sp_address_of(raw_copy_line_count),
                     &raw_copy_line_count,
                     sizeof(raw_copy_line_count));
 
@@ -2422,8 +2426,8 @@ void sh_css_dump_sp_raw_copy_linecount(bool reduced)
        /* do the handling */
        if (prev_raw_copy_line_count != raw_copy_line_count) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-                       "sh_css_dump_sp_raw_copy_linecount() line_count=%d\n",
-                       raw_copy_line_count);
+                                   "sh_css_dump_sp_raw_copy_linecount() line_count=%d\n",
+                                   raw_copy_line_count);
                prev_raw_copy_line_count = raw_copy_line_count;
        }
 }
@@ -2465,12 +2469,14 @@ void ia_css_debug_dump_perf_counters(void)
        const struct ia_css_fw_info *fw;
        int i;
        unsigned int HIVE_ADDR_ia_css_isys_sp_error_cnt;
-       s32 ia_css_sp_input_system_error_cnt[N_MIPI_PORT_ID + 1]; /* 3 Capture Units and 1 Acquire Unit. */
+       s32 ia_css_sp_input_system_error_cnt[N_MIPI_PORT_ID +
+                                                           1]; /* 3 Capture Units and 1 Acquire Unit. */
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "Input System Error Counters:\n");
 
        fw = &sh_css_sp_fw;
-       HIVE_ADDR_ia_css_isys_sp_error_cnt = fw->info.sp.perf_counter_input_system_error;
+       HIVE_ADDR_ia_css_isys_sp_error_cnt =
+           fw->info.sp.perf_counter_input_system_error;
 
        (void)HIVE_ADDR_ia_css_isys_sp_error_cnt;
 
@@ -2481,7 +2487,7 @@ void ia_css_debug_dump_perf_counters(void)
 
        for (i = 0; i < N_MIPI_PORT_ID + 1; i++) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "\tport[%d] = %d\n",
-                               i, ia_css_sp_input_system_error_cnt[i]);
+                                   i, ia_css_sp_input_system_error_cnt[i]);
        }
 #endif
 }
@@ -2593,18 +2599,18 @@ void sh_css_dump_thread_wait_info(void)
 
        fw = &sh_css_sp_fw;
        HIVE_ADDR_sp_thread_wait =
-                       fw->info.sp.debug_wait;
+           fw->info.sp.debug_wait;
 
        (void)HIVE_ADDR_sp_thread_wait;
 
        sp_dmem_load(SP0_ID,
-               (unsigned int)sp_address_of(sp_thread_wait),
+                    (unsigned int)sp_address_of(sp_thread_wait),
                     &sp_thread_wait,
                     sizeof(sp_thread_wait));
        for (i = 0; i < MAX_THREAD_NUM; i++) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-                       "\twait[%d] = 0x%X\n",
-                       i, sp_thread_wait[i]);
+                                   "\twait[%d] = 0x%X\n",
+                                   i, sp_thread_wait[i]);
        }
 }
 
@@ -2619,18 +2625,18 @@ void sh_css_dump_pipe_stage_info(void)
 
        fw = &sh_css_sp_fw;
        HIVE_ADDR_sp_pipe_stage =
-                       fw->info.sp.debug_stage;
+           fw->info.sp.debug_stage;
 
        (void)HIVE_ADDR_sp_pipe_stage;
 
        sp_dmem_load(SP0_ID,
-               (unsigned int)sp_address_of(sp_pipe_stage),
+                    (unsigned int)sp_address_of(sp_pipe_stage),
                     &sp_pipe_stage,
                     sizeof(sp_pipe_stage));
        for (i = 0; i < MAX_THREAD_NUM; i++) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-                       "\tstage[%d] = %d\n",
-                       i, sp_pipe_stage[i]);
+                                   "\tstage[%d] = %d\n",
+                                   i, sp_pipe_stage[i]);
        }
 }
 
@@ -2645,29 +2651,29 @@ void sh_css_dump_pipe_stripe_info(void)
 
        fw = &sh_css_sp_fw;
        HIVE_ADDR_sp_pipe_stripe =
-                       fw->info.sp.debug_stripe;
+           fw->info.sp.debug_stripe;
 
        (void)HIVE_ADDR_sp_pipe_stripe;
 
        sp_dmem_load(SP0_ID,
-               (unsigned int)sp_address_of(sp_pipe_stripe),
+                    (unsigned int)sp_address_of(sp_pipe_stripe),
                     &sp_pipe_stripe,
                     sizeof(sp_pipe_stripe));
        for (i = 0; i < MAX_THREAD_NUM; i++) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-                       "\tstripe[%d] = %d\n",
-                       i, sp_pipe_stripe[i]);
+                                   "\tstripe[%d] = %d\n",
+                                   i, sp_pipe_stripe[i]);
        }
 }
 #endif
 
 static void
 ia_css_debug_pipe_graph_dump_frame(
-       struct ia_css_frame *frame,
-       enum ia_css_pipe_id id,
-       char const *blob_name,
-       char const *frame_name,
-       bool in_frame)
+    struct ia_css_frame *frame,
+    enum ia_css_pipe_id id,
+    char const *blob_name,
+    char const *frame_name,
+    bool in_frame)
 {
        char bufinfo[100];
 
@@ -2675,30 +2681,30 @@ ia_css_debug_pipe_graph_dump_frame(
                snprintf(bufinfo, sizeof(bufinfo), "Internal");
        } else {
                snprintf(bufinfo, sizeof(bufinfo), "Queue: %s %s",
-                       pipe_id_to_str[id],
-                       queue_id_to_str[frame->dynamic_queue_id]);
+                        pipe_id_to_str[id],
+                        queue_id_to_str[frame->dynamic_queue_id]);
        }
        dtrace_dot(
-               "node [shape = box, fixedsize=true, width=2, height=0.7]; \"%p\" [label = \"%s\\n%d(%d) x %d, %dbpp\\n%s\"];",
-               frame,
-               debug_frame_format2str(frame->info.format),
-               frame->info.res.width,
-               frame->info.padded_width,
-               frame->info.res.height,
-               frame->info.raw_bit_depth,
-               bufinfo);
+           "node [shape = box, fixedsize=true, width=2, height=0.7]; \"%p\" [label = \"%s\\n%d(%d) x %d, %dbpp\\n%s\"];",
+           frame,
+           debug_frame_format2str(frame->info.format),
+           frame->info.res.width,
+           frame->info.padded_width,
+           frame->info.res.height,
+           frame->info.raw_bit_depth,
+           bufinfo);
 
        if (in_frame) {
                dtrace_dot(
-                       "\"%p\"->\"%s(pipe%d)\" [label = %s_frame];",
-                       frame,
-                       blob_name, id, frame_name);
+                   "\"%p\"->\"%s(pipe%d)\" [label = %s_frame];",
+                   frame,
+                   blob_name, id, frame_name);
        } else {
                dtrace_dot(
-                       "\"%s(pipe%d)\"->\"%p\" [label = %s_frame];",
-                       blob_name, id,
-                       frame,
-                       frame_name);
+                   "\"%s(pipe%d)\"->\"%p\" [label = %s_frame];",
+                   blob_name, id,
+                   frame,
+                   frame_name);
        }
 }
 
@@ -2710,7 +2716,7 @@ ia_css_debug_pipe_graph_dump_prologue(void)
 
        dtrace_dot("fontsize=9;");
        dtrace_dot("label = \"\\nEnable options: rp=reduced pipe, vfve=vf_veceven, dvse=dvs_envelope, dvs6=dvs_6axis, bo=block_out, fbds=fixed_bayer_ds, bf6=bayer_fir_6db, rawb=raw_binning, cont=continuous, disc=dis_crop\\n"
-               "dp2a=dp_2adjacent, outp=output, outt=out_table, reff=ref_frame, par=params, gam=gamma, cagdc=ca_gdc, ispa=isp_addresses, inf=in_frame, outf=out_frame, hs=high_speed, inpc=input_chunking\"");
+                  "dp2a=dp_2adjacent, outp=output, outt=out_table, reff=ref_frame, par=params, gam=gamma, cagdc=ca_gdc, ispa=isp_addresses, inf=in_frame, outf=out_frame, hs=high_speed, inpc=input_chunking\"");
 }
 
 void ia_css_debug_pipe_graph_dump_epilogue(void)
@@ -2725,20 +2731,20 @@ void ia_css_debug_pipe_graph_dump_epilogue(void)
                 */
 
                dtrace_dot(
-                       "node [shape = doublecircle, fixedsize=true, width=2.5]; \"input_system\" [label = \"Input system\"];");
+                   "node [shape = doublecircle, fixedsize=true, width=2.5]; \"input_system\" [label = \"Input system\"];");
 
                dtrace_dot(
-                       "\"input_system\"->\"%s\" [label = \"%s\"];",
-                       dot_id_input_bin, debug_stream_format2str(pg_inst.stream_format));
+                   "\"input_system\"->\"%s\" [label = \"%s\"];",
+                   dot_id_input_bin, debug_stream_format2str(pg_inst.stream_format));
 
                dtrace_dot(
-                       "node [shape = doublecircle, fixedsize=true, width=2.5]; \"sensor\" [label = \"Sensor\"];");
+                   "node [shape = doublecircle, fixedsize=true, width=2.5]; \"sensor\" [label = \"Sensor\"];");
 
                dtrace_dot(
-                       "\"sensor\"->\"input_system\" [label = \"%s\\n%d x %d\\n(%d x %d)\"];",
-                       debug_stream_format2str(pg_inst.stream_format),
-                       pg_inst.width, pg_inst.height,
-                       pg_inst.eff_width, pg_inst.eff_height);
+                   "\"sensor\"->\"input_system\" [label = \"%s\\n%d x %d\\n(%d x %d)\"];",
+                   debug_stream_format2str(pg_inst.stream_format),
+                   pg_inst.width, pg_inst.height,
+                   pg_inst.eff_width, pg_inst.eff_height);
        }
 
        dtrace_dot("}");
@@ -2757,8 +2763,8 @@ void ia_css_debug_pipe_graph_dump_epilogue(void)
 
 void
 ia_css_debug_pipe_graph_dump_stage(
-       struct ia_css_pipeline_stage *stage,
-       enum ia_css_pipe_id id)
+    struct ia_css_pipeline_stage *stage,
+    enum ia_css_pipe_id id)
 {
        char blob_name[SH_CSS_MAX_BINARY_NAME + 10] = "<unknown type>";
        char const *bin_type = "<unknown type>";
@@ -2777,10 +2783,11 @@ ia_css_debug_pipe_graph_dump_stage(
                bin_type = "binary";
                if (stage->binary->info->blob)
                        snprintf(blob_name, sizeof(blob_name), "%s_stage%d",
-                               stage->binary->info->blob->name, stage->stage_num);
+                                stage->binary->info->blob->name, stage->stage_num);
        } else if (stage->firmware) {
                bin_type = "firmware";
-               strncpy_s(blob_name, sizeof(blob_name), IA_CSS_EXT_ISP_PROG_NAME(stage->firmware), sizeof(blob_name));
+               strncpy_s(blob_name, sizeof(blob_name),
+                         IA_CSS_EXT_ISP_PROG_NAME(stage->firmware), sizeof(blob_name));
        }
 
        /* Guard in case of binaries that don't have any binary_info */
@@ -2795,41 +2802,41 @@ ia_css_debug_pipe_graph_dump_stage(
                 * parameters per call "reasonable"
                 */
                snprintf(enable_info1, sizeof(enable_info1),
-                       "%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
-                       bi->enable.reduced_pipe ?       "rp," : "",
-                       bi->enable.vf_veceven ?         "vfve," : "",
-                       bi->enable.dis ?                "dis," : "",
-                       bi->enable.dvs_envelope ?       "dvse," : "",
-                       bi->enable.uds ?                "uds," : "",
-                       bi->enable.dvs_6axis ?          "dvs6," : "",
-                       bi->enable.block_output ?       "bo," : "",
-                       bi->enable.ds ?                 "ds," : "",
-                       bi->enable.bayer_fir_6db ?      "bf6," : "",
-                       bi->enable.raw_binning ?        "rawb," : "",
-                       bi->enable.continuous ?         "cont," : "",
-                       bi->enable.s3a ?                "s3a," : "",
-                       bi->enable.fpnr ?               "fpnr," : "",
-                       bi->enable.sc ?                 "sc," : ""
+                        "%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+                        bi->enable.reduced_pipe ?      "rp," : "",
+                        bi->enable.vf_veceven ?                "vfve," : "",
+                        bi->enable.dis ?               "dis," : "",
+                        bi->enable.dvs_envelope ?      "dvse," : "",
+                        bi->enable.uds ?               "uds," : "",
+                        bi->enable.dvs_6axis ?         "dvs6," : "",
+                        bi->enable.block_output ?      "bo," : "",
+                        bi->enable.ds ?                        "ds," : "",
+                        bi->enable.bayer_fir_6db ?     "bf6," : "",
+                        bi->enable.raw_binning ?       "rawb," : "",
+                        bi->enable.continuous ?                "cont," : "",
+                        bi->enable.s3a ?               "s3a," : "",
+                        bi->enable.fpnr ?              "fpnr," : "",
+                        bi->enable.sc ?                        "sc," : ""
                        );
 
                snprintf(enable_info2, sizeof(enable_info2),
-                       "%s%s%s%s%s%s%s%s%s%s%s",
-                       bi->enable.macc ?               "macc," : "",
-                       bi->enable.output ?             "outp," : "",
-                       bi->enable.ref_frame ?          "reff," : "",
-                       bi->enable.tnr ?                "tnr," : "",
-                       bi->enable.xnr ?                "xnr," : "",
-                       bi->enable.params ?             "par," : "",
-                       bi->enable.ca_gdc ?             "cagdc," : "",
-                       bi->enable.isp_addresses ?      "ispa," : "",
-                       bi->enable.in_frame ?           "inf," : "",
-                       bi->enable.out_frame ?          "outf," : "",
-                       bi->enable.high_speed ?         "hs," : ""
+                        "%s%s%s%s%s%s%s%s%s%s%s",
+                        bi->enable.macc ?              "macc," : "",
+                        bi->enable.output ?            "outp," : "",
+                        bi->enable.ref_frame ?         "reff," : "",
+                        bi->enable.tnr ?               "tnr," : "",
+                        bi->enable.xnr ?               "xnr," : "",
+                        bi->enable.params ?            "par," : "",
+                        bi->enable.ca_gdc ?            "cagdc," : "",
+                        bi->enable.isp_addresses ?     "ispa," : "",
+                        bi->enable.in_frame ?          "inf," : "",
+                        bi->enable.out_frame ?         "outf," : "",
+                        bi->enable.high_speed ?                "hs," : ""
                        );
 
                /* And merge them into one string */
                snprintf(enable_info, sizeof(enable_info), "%s%s",
-                                               enable_info1, enable_info2);
+                        enable_info1, enable_info2);
                {
                        int l, p;
                        char *ei = enable_info;
@@ -2847,8 +2854,8 @@ ia_css_debug_pipe_graph_dump_stage(
                                        p--;
                                /* Last comma found, copy till that comma */
                                strncpy_s(enable_info1,
-                                       sizeof(enable_info1),
-                                       ei, p);
+                                         sizeof(enable_info1),
+                                         ei, p);
                                enable_info1[p] = '\0';
 
                                ei += p + 1;
@@ -2860,11 +2867,11 @@ ia_css_debug_pipe_graph_dump_stage(
                                         * it is not guaranteed dword aligned
                                         */
                                        strncpy_s(enable_info2,
-                                               sizeof(enable_info2),
-                                               ei, l);
+                                                 sizeof(enable_info2),
+                                                 ei, l);
                                        enable_info2[l] = '\0';
                                        snprintf(enable_info, sizeof(enable_info), "%s\\n%s",
-                                               enable_info1, enable_info2);
+                                                enable_info1, enable_info2);
 
                                } else {
                                        /* 2nd line is still too long */
@@ -2872,8 +2879,8 @@ ia_css_debug_pipe_graph_dump_stage(
                                        while (ei[p] != ',')
                                                p--;
                                        strncpy_s(enable_info2,
-                                               sizeof(enable_info2),
-                                               ei, p);
+                                                 sizeof(enable_info2),
+                                                 ei, p);
                                        enable_info2[p] = '\0';
                                        ei += p + 1;
                                        l = strlen(ei);
@@ -2884,38 +2891,38 @@ ia_css_debug_pipe_graph_dump_stage(
                                                * it is not guaranteed dword aligned
                                                */
                                                strcpy_s(enable_info3,
-                                                       sizeof(enable_info3), ei);
+                                                        sizeof(enable_info3), ei);
                                                enable_info3[l] = '\0';
                                                snprintf(enable_info, sizeof(enable_info),
-                                                       "%s\\n%s\\n%s",
-                                                       enable_info1, enable_info2,
-                                                       enable_info3);
+                                                        "%s\\n%s\\n%s",
+                                                        enable_info1, enable_info2,
+                                                        enable_info3);
                                        } else {
                                                /* 3rd line is still too long */
                                                p = ENABLE_LINE_MAX_LENGTH;
                                                while (ei[p] != ',')
                                                        p--;
                                                strncpy_s(enable_info3,
-                                                       sizeof(enable_info3),
-                                                       ei, p);
+                                                         sizeof(enable_info3),
+                                                         ei, p);
                                                enable_info3[p] = '\0';
                                                ei += p + 1;
                                                strcpy_s(enable_info3,
-                                                       sizeof(enable_info3), ei);
+                                                        sizeof(enable_info3), ei);
                                                snprintf(enable_info, sizeof(enable_info),
-                                                       "%s\\n%s\\n%s",
-                                                       enable_info1, enable_info2,
-                                                       enable_info3);
+                                                        "%s\\n%s\\n%s",
+                                                        enable_info1, enable_info2,
+                                                        enable_info3);
                                        }
                                }
                        }
                }
 
                dtrace_dot("node [shape = circle, fixedsize=true, width=2.5, label=\"%s\\n%s\\n\\n%s\"]; \"%s(pipe%d)\"",
-                       bin_type, blob_name, enable_info, blob_name, id);
+                          bin_type, blob_name, enable_info, blob_name, id);
        } else {
                dtrace_dot("node [shape = circle, fixedsize=true, width=2.5, label=\"%s\\n%s\\n\"]; \"%s(pipe%d)\"",
-                       bin_type, blob_name, blob_name, id);
+                          bin_type, blob_name, blob_name, id);
        }
 
        if (stage->stage_num == 0) {
@@ -2928,14 +2935,14 @@ ia_css_debug_pipe_graph_dump_stage(
                 */
                if (strlen(dot_id_input_bin) == 0) {
                        snprintf(dot_id_input_bin, sizeof(dot_id_input_bin),
-                               "%s(pipe%d)", blob_name, id);
+                                "%s(pipe%d)", blob_name, id);
                }
        }
 
        if (stage->args.in_frame) {
                ia_css_debug_pipe_graph_dump_frame(
-                       stage->args.in_frame, id, blob_name,
-                       "in", true);
+                   stage->args.in_frame, id, blob_name,
+                   "in", true);
        }
 
 #ifndef ISP2401
@@ -2945,37 +2952,37 @@ ia_css_debug_pipe_graph_dump_stage(
 #endif
                if (stage->args.tnr_frames[i]) {
                        ia_css_debug_pipe_graph_dump_frame(
-                                       stage->args.tnr_frames[i], id,
-                                       blob_name, "tnr_frame", true);
+                           stage->args.tnr_frames[i], id,
+                           blob_name, "tnr_frame", true);
                }
        }
 
        for (i = 0; i < MAX_NUM_VIDEO_DELAY_FRAMES; i++) {
                if (stage->args.delay_frames[i]) {
                        ia_css_debug_pipe_graph_dump_frame(
-                                       stage->args.delay_frames[i], id,
-                                       blob_name, "delay_frame", true);
+                           stage->args.delay_frames[i], id,
+                           blob_name, "delay_frame", true);
                }
        }
 
        for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
                if (stage->args.out_frame[i]) {
                        ia_css_debug_pipe_graph_dump_frame(
-                               stage->args.out_frame[i], id, blob_name,
-                               "out", false);
+                           stage->args.out_frame[i], id, blob_name,
+                           "out", false);
                }
        }
 
        if (stage->args.out_vf_frame) {
                ia_css_debug_pipe_graph_dump_frame(
-                       stage->args.out_vf_frame, id, blob_name,
-                       "out_vf", false);
+                   stage->args.out_vf_frame, id, blob_name,
+                   "out_vf", false);
        }
 }
 
 void
 ia_css_debug_pipe_graph_dump_sp_raw_copy(
-       struct ia_css_frame *out_frame)
+    struct ia_css_frame *out_frame)
 {
        assert(out_frame);
        if (pg_inst.do_init) {
@@ -2984,28 +2991,29 @@ ia_css_debug_pipe_graph_dump_sp_raw_copy(
        }
 
        dtrace_dot("node [shape = circle, fixedsize=true, width=2.5, label=\"%s\\n%s\"]; \"%s(pipe%d)\"",
-               "sp-binary", "sp_raw_copy", "sp_raw_copy", 1);
+                  "sp-binary", "sp_raw_copy", "sp_raw_copy", 1);
 
        snprintf(ring_buffer, sizeof(ring_buffer),
-               "node [shape = box, fixedsize=true, width=2, height=0.7]; \"%p\" [label = \"%s\\n%d(%d) x %d\\nRingbuffer\"];",
-               out_frame,
-               debug_frame_format2str(out_frame->info.format),
-               out_frame->info.res.width,
-               out_frame->info.padded_width,
-               out_frame->info.res.height);
+                "node [shape = box, fixedsize=true, width=2, height=0.7]; \"%p\" [label = \"%s\\n%d(%d) x %d\\nRingbuffer\"];",
+                out_frame,
+                debug_frame_format2str(out_frame->info.format),
+                out_frame->info.res.width,
+                out_frame->info.padded_width,
+                out_frame->info.res.height);
 
        dtrace_dot(ring_buffer);
 
        dtrace_dot(
-               "\"%s(pipe%d)\"->\"%p\" [label = out_frame];",
-               "sp_raw_copy", 1, out_frame);
+           "\"%s(pipe%d)\"->\"%p\" [label = out_frame];",
+           "sp_raw_copy", 1, out_frame);
 
-       snprintf(dot_id_input_bin, sizeof(dot_id_input_bin), "%s(pipe%d)", "sp_raw_copy", 1);
+       snprintf(dot_id_input_bin, sizeof(dot_id_input_bin), "%s(pipe%d)",
+                "sp_raw_copy", 1);
 }
 
 void
 ia_css_debug_pipe_graph_dump_stream_config(
-       const struct ia_css_stream_config *stream_config)
+    const struct ia_css_stream_config *stream_config)
 {
        pg_inst.width = stream_config->input_config.input_res.width;
        pg_inst.height = stream_config->input_config.input_res.height;
@@ -3016,72 +3024,72 @@ ia_css_debug_pipe_graph_dump_stream_config(
 
 void
 ia_css_debug_dump_resolution(
-       const struct ia_css_resolution *res,
-       const char *label)
+    const struct ia_css_resolution *res,
+    const char *label)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s: =%d x =%d\n",
-                       label, res->width, res->height);
+                           label, res->width, res->height);
 }
 
 void
 ia_css_debug_dump_frame_info(
-       const struct ia_css_frame_info *info,
-       const char *label)
+    const struct ia_css_frame_info *info,
+    const char *label)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s\n", label);
        ia_css_debug_dump_resolution(&info->res, "res");
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "padded_width: %d\n",
-                       info->padded_width);
+                           info->padded_width);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "format: %d\n", info->format);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "raw_bit_depth: %d\n",
-                       info->raw_bit_depth);
+                           info->raw_bit_depth);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "raw_bayer_order: %d\n",
-                       info->raw_bayer_order);
+                           info->raw_bayer_order);
 }
 
 void
 ia_css_debug_dump_capture_config(
-       const struct ia_css_capture_config *config)
+    const struct ia_css_capture_config *config)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s\n", __func__);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "mode: %d\n", config->mode);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "enable_xnr:  %d\n",
-                       config->enable_xnr);
+                           config->enable_xnr);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "enable_raw_output: %d\n",
-                       config->enable_raw_output);
+                           config->enable_raw_output);
 }
 
 void
 ia_css_debug_dump_pipe_extra_config(
-       const struct ia_css_pipe_extra_config *extra_config)
+    const struct ia_css_pipe_extra_config *extra_config)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s\n", __func__);
        if (extra_config) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "enable_raw_binning: %d\n",
-                               extra_config->enable_raw_binning);
+                                   "enable_raw_binning: %d\n",
+                                   extra_config->enable_raw_binning);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "enable_yuv_ds: %d\n",
-                               extra_config->enable_yuv_ds);
+                                   extra_config->enable_yuv_ds);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "enable_high_speed:  %d\n",
-                               extra_config->enable_high_speed);
+                                   "enable_high_speed:  %d\n",
+                                   extra_config->enable_high_speed);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "enable_dvs_6axis: %d\n",
-                               extra_config->enable_dvs_6axis);
+                                   "enable_dvs_6axis: %d\n",
+                                   extra_config->enable_dvs_6axis);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "enable_reduced_pipe: %d\n",
-                               extra_config->enable_reduced_pipe);
+                                   "enable_reduced_pipe: %d\n",
+                                   extra_config->enable_reduced_pipe);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "enable_fractional_ds: %d\n",
-                               extra_config->enable_fractional_ds);
+                                   "enable_fractional_ds: %d\n",
+                                   extra_config->enable_fractional_ds);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "disable_vf_pp: %d\n",
-                               extra_config->disable_vf_pp);
+                                   extra_config->disable_vf_pp);
        }
 }
 
 void
 ia_css_debug_dump_pipe_config(
-       const struct ia_css_pipe_config *config)
+    const struct ia_css_pipe_config *config)
 {
        unsigned int i;
 
@@ -3093,41 +3101,41 @@ ia_css_debug_dump_pipe_config(
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "mode: %d\n", config->mode);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "isp_pipe_version: %d\n",
-                       config->isp_pipe_version);
+                           config->isp_pipe_version);
        ia_css_debug_dump_resolution(&config->bayer_ds_out_res,
-                       "bayer_ds_out_res");
+                                    "bayer_ds_out_res");
        ia_css_debug_dump_resolution(&config->capt_pp_in_res,
-                       "capt_pp_in_res");
+                                    "capt_pp_in_res");
        ia_css_debug_dump_resolution(&config->vf_pp_in_res, "vf_pp_in_res");
 #ifdef ISP2401
        ia_css_debug_dump_resolution(&config->output_system_in_res,
                                     "output_system_in_res");
 #endif
        ia_css_debug_dump_resolution(&config->dvs_crop_out_res,
-                       "dvs_crop_out_res");
+                                    "dvs_crop_out_res");
        for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
                ia_css_debug_dump_frame_info(&config->output_info[i], "output_info");
                ia_css_debug_dump_frame_info(&config->vf_output_info[i],
-                               "vf_output_info");
+                                            "vf_output_info");
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "acc_extension: %p\n",
                            config->acc_extension);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "num_acc_stages: %d\n",
-                       config->num_acc_stages);
+                           config->num_acc_stages);
        ia_css_debug_dump_capture_config(&config->default_capture_config);
        ia_css_debug_dump_resolution(&config->dvs_envelope, "dvs_envelope");
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "dvs_frame_delay: %d\n",
-                       config->dvs_frame_delay);
+                           config->dvs_frame_delay);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "acc_num_execs: %d\n",
-                       config->acc_num_execs);
+                           config->acc_num_execs);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "enable_dz: %d\n",
-                       config->enable_dz);
+                           config->enable_dz);
        IA_CSS_LEAVE_PRIVATE("");
 }
 
 void
 ia_css_debug_dump_stream_config_source(
-       const struct ia_css_stream_config *config)
+    const struct ia_css_stream_config *config)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
        switch (config->mode) {
@@ -3135,43 +3143,43 @@ ia_css_debug_dump_stream_config_source(
        case IA_CSS_INPUT_MODE_BUFFERED_SENSOR:
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "source.port\n");
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "port: %d\n",
-                               config->source.port.port);
+                                   config->source.port.port);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "num_lanes: %d\n",
-                               config->source.port.num_lanes);
+                                   config->source.port.num_lanes);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "timeout: %d\n",
-                               config->source.port.timeout);
+                                   config->source.port.timeout);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "compression: %d\n",
-                               config->source.port.compression.type);
+                                   config->source.port.compression.type);
                break;
        case IA_CSS_INPUT_MODE_TPG:
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "source.tpg\n");
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "id: %d\n",
-                               config->source.tpg.id);
+                                   config->source.tpg.id);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "mode: %d\n",
-                               config->source.tpg.mode);
+                                   config->source.tpg.mode);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "x_mask: 0x%x\n",
-                               config->source.tpg.x_mask);
+                                   config->source.tpg.x_mask);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "x_delta: %d\n",
-                               config->source.tpg.x_delta);
+                                   config->source.tpg.x_delta);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "y_mask: 0x%x\n",
-                               config->source.tpg.y_mask);
+                                   config->source.tpg.y_mask);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "y_delta: %d\n",
-                               config->source.tpg.y_delta);
+                                   config->source.tpg.y_delta);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "xy_mask: 0x%x\n",
-                               config->source.tpg.xy_mask);
+                                   config->source.tpg.xy_mask);
                break;
        case IA_CSS_INPUT_MODE_PRBS:
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "source.prbs\n");
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "id: %d\n",
-                               config->source.prbs.id);
+                                   config->source.prbs.id);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "h_blank: %d\n",
-                               config->source.prbs.h_blank);
+                                   config->source.prbs.h_blank);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "v_blank: %d\n",
-                               config->source.prbs.v_blank);
+                                   config->source.prbs.v_blank);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "seed: 0x%x\n",
-                               config->source.prbs.seed);
+                                   config->source.prbs.seed);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "seed1: 0x%x\n",
-                               config->source.prbs.seed1);
+                                   config->source.prbs.seed1);
                break;
        default:
        case IA_CSS_INPUT_MODE_FIFO:
@@ -3182,61 +3190,62 @@ ia_css_debug_dump_stream_config_source(
 
 void
 ia_css_debug_dump_mipi_buffer_config(
-       const struct ia_css_mipi_buffer_config *config)
+    const struct ia_css_mipi_buffer_config *config)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "size_mem_words: %d\n",
-                       config->size_mem_words);
+                           config->size_mem_words);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "nof_mipi_buffers: %d\n",
-                       config->nof_mipi_buffers);
+                           config->nof_mipi_buffers);
 }
 
 void
 ia_css_debug_dump_metadata_config(
-       const struct ia_css_metadata_config *config)
+    const struct ia_css_metadata_config *config)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "data_type: %d\n",
-                       config->data_type);
+                           config->data_type);
        ia_css_debug_dump_resolution(&config->resolution, "resolution");
 }
 
 void
 ia_css_debug_dump_stream_config(
-       const struct ia_css_stream_config *config,
-       int num_pipes)
+    const struct ia_css_stream_config *config,
+    int num_pipes)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "num_pipes: %d\n", num_pipes);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "mode: %d\n", config->mode);
        ia_css_debug_dump_stream_config_source(config);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "channel_id: %d\n",
-                       config->channel_id);
+                           config->channel_id);
        ia_css_debug_dump_resolution(&config->input_config.input_res, "input_res");
-       ia_css_debug_dump_resolution(&config->input_config.effective_res, "effective_res");
+       ia_css_debug_dump_resolution(&config->input_config.effective_res,
+                                    "effective_res");
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "format: %d\n",
-                       config->input_config.format);
+                           config->input_config.format);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "bayer_order: %d\n",
-                       config->input_config.bayer_order);
+                           config->input_config.bayer_order);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sensor_binning_factor: %d\n",
-                       config->sensor_binning_factor);
+                           config->sensor_binning_factor);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "pixels_per_clock: %d\n",
-                       config->pixels_per_clock);
+                           config->pixels_per_clock);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "online: %d\n",
-                       config->online);
+                           config->online);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "init_num_cont_raw_buf: %d\n",
-                       config->init_num_cont_raw_buf);
+                           config->init_num_cont_raw_buf);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "target_num_cont_raw_buf: %d\n",
-                       config->target_num_cont_raw_buf);
+                           "target_num_cont_raw_buf: %d\n",
+                           config->target_num_cont_raw_buf);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "pack_raw_pixels: %d\n",
-                       config->pack_raw_pixels);
+                           config->pack_raw_pixels);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "continuous: %d\n",
-                       config->continuous);
+                           config->continuous);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "flash_gpio_pin: %d\n",
-                       config->flash_gpio_pin);
+                           config->flash_gpio_pin);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "left_padding: %d\n",
-                       config->left_padding);
+                           config->left_padding);
        ia_css_debug_dump_mipi_buffer_config(&config->mipi_buffer_config);
        ia_css_debug_dump_metadata_config(&config->metadata_config);
 }
@@ -3300,8 +3309,7 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
 
        /* read the header and parse it */
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "~~~ Tracer ");
-       switch (proc_id)
-       {
+       switch (proc_id) {
        case TRACE_SP0_ID:
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "SP0");
                start_addr = TRACE_SP0_ADDR;
@@ -3324,7 +3332,8 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
                max_trace_points = TRACE_ISP_MAX_POINTS;
                break;
        default:
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "\t\ttraces are not supported for this processor ID - exiting\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "\t\ttraces are not supported for this processor ID - exiting\n");
                return;
        }
 #ifndef ISP2401
@@ -3333,7 +3342,8 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
 #endif
 
 #ifndef ISP2401
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, " ver %d %d points\n", tmp & 0xFF, point_num);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, " ver %d %d points\n", tmp & 0xFF,
+                           point_num);
        if ((tmp & 0xFF) != TRACER_VER) {
 #else
        /* Loading byte-by-byte as using the master routine had issues */
@@ -3343,7 +3353,8 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
 
        point_num = header.max_tracer_points;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, " ver %d %d points\n", header.version, point_num);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, " ver %d %d points\n", header.version,
+                           point_num);
        if ((header.version & 0xFF) != TRACER_VER) {
 #endif
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "\t\tUnknown version - exiting\n");
@@ -3355,21 +3366,23 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
        }
        /* copy the TPs and find the first 0 */
        for (i = 0; i < point_num; i++) {
-               trace_read_buf[i] = ia_css_device_load_uint32(start_addr_data + (i * item_size));
+               trace_read_buf[i] = ia_css_device_load_uint32(start_addr_data +
+                                   (i * item_size));
                if ((limit == (-1)) && (trace_read_buf[i] == 0))
                        limit = i;
        }
 #ifdef ISP2401
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "Status:\n");
        for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++)
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "\tT%d: %3d (%02x)  %6d (%04x)  %10d (%08x)\n", i,
-                               header.thr_status_byte[i], header.thr_status_byte[i],
-                               header.thr_status_word[i], header.thr_status_word[i],
-                               header.thr_status_dword[i], header.thr_status_dword[i]);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "\tT%d: %3d (%02x)  %6d (%04x)  %10d (%08x)\n", i,
+                                   header.thr_status_byte[i], header.thr_status_byte[i],
+                                   header.thr_status_word[i], header.thr_status_word[i],
+                                   header.thr_status_dword[i], header.thr_status_dword[i]);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "Scratch:\n");
        for (i = 0; i < MAX_SCRATCH_DATA; i++)
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%10d (%08x)  ",
-                       header.scratch_debug[i], header.scratch_debug[i]);
+                                   header.scratch_debug[i], header.scratch_debug[i]);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "\n");
 
 #endif
@@ -3379,8 +3392,10 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
                return;
        }
        /* no overrun: start from 0 */
-       if ((limit == point_num - 1) ||         /* first 0 is at the end - border case */
-           (trace_read_buf[limit + 1] == 0))   /* did not make a full cycle after the memset */
+       if ((limit == point_num - 1) ||
+           /* first 0 is at the end - border case */
+           (trace_read_buf[limit + 1] ==
+            0))   /* did not make a full cycle after the memset */
                limit = 0;
        /* overrun: limit is the first non-zero after the first zero */
        else
@@ -3389,8 +3404,7 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
        /* print the TPs */
        for (i = 0; i < point_num; i++) {
                j = (limit + i) % point_num;
-               if (trace_read_buf[j])
-               {
+               if (trace_read_buf[j]) {
 #ifndef ISP2401
                        TRACE_DUMP_FORMAT dump_format = FIELD_FORMAT_UNPACK(trace_read_buf[j]);
 #else
@@ -3406,24 +3420,23 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
                                dump_format = FIELD_FORMAT_UNPACK(trace_read_buf[j]);
                        }
 #endif
-                       switch (dump_format)
-                       {
+                       switch (dump_format) {
                        case TRACE_DUMP_FORMAT_POINT:
                                ia_css_debug_dtrace(
 #ifndef ISP2401
-                                               IA_CSS_DEBUG_TRACE,     "\t\t%d %d:%d value - %d\n",
-                                               j, FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+                                   IA_CSS_DEBUG_TRACE, "\t\t%d %d:%d value - %d\n",
+                                   j, FIELD_MAJOR_UNPACK(trace_read_buf[j]),
 #else
-                                               IA_CSS_DEBUG_TRACE,     "\t\t%d T%d %d:%d value - %x (%d)\n",
-                                               j,
-                                               tid_val,
-                                               FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+                                   IA_CSS_DEBUG_TRACE, "\t\t%d T%d %d:%d value - %x (%d)\n",
+                                   j,
+                                   tid_val,
+                                   FIELD_MAJOR_UNPACK(trace_read_buf[j]),
 #endif
-                                               FIELD_MINOR_UNPACK(trace_read_buf[j]),
+                                   FIELD_MINOR_UNPACK(trace_read_buf[j]),
 #ifdef ISP2401
-                                               FIELD_VALUE_UNPACK(trace_read_buf[j]),
+                                   FIELD_VALUE_UNPACK(trace_read_buf[j]),
 #endif
-                                               FIELD_VALUE_UNPACK(trace_read_buf[j]));
+                                   FIELD_VALUE_UNPACK(trace_read_buf[j]));
                                break;
 #ifndef ISP2401
                        case TRACE_DUMP_FORMAT_VALUE24_HEX:
@@ -3432,19 +3445,19 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
 #endif
                                ia_css_debug_dtrace(
 #ifndef ISP2401
-                                               IA_CSS_DEBUG_TRACE,     "\t\t%d, %d, 24bit value %x H\n",
+                                   IA_CSS_DEBUG_TRACE, "\t\t%d, %d, 24bit value %x H\n",
 #else
-                                               IA_CSS_DEBUG_TRACE,     "\t\t%d %d:%d value - %x (%d)\n",
+                                   IA_CSS_DEBUG_TRACE, "\t\t%d %d:%d value - %x (%d)\n",
 #endif
-                                               j,
+                                   j,
 #ifndef ISP2401
-                                               FIELD_MAJOR_UNPACK(trace_read_buf[j]),
-                                               FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
+                                   FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+                                   FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
 #else
-                                               FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
-                                               FIELD_MINOR_UNPACK(trace_read_buf[j]),
-                                               FIELD_VALUE_UNPACK(trace_read_buf[j]),
-                                               FIELD_VALUE_UNPACK(trace_read_buf[j]));
+                                   FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
+                                   FIELD_MINOR_UNPACK(trace_read_buf[j]),
+                                   FIELD_VALUE_UNPACK(trace_read_buf[j]),
+                                   FIELD_VALUE_UNPACK(trace_read_buf[j]));
 #endif
                                break;
 #ifndef ISP2401
@@ -3454,51 +3467,51 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
 #endif
                                ia_css_debug_dtrace(
 #ifndef ISP2401
-                                               IA_CSS_DEBUG_TRACE,     "\t\t%d, %d, 24bit value %d D\n",
+                                   IA_CSS_DEBUG_TRACE, "\t\t%d, %d, 24bit value %d D\n",
 #else
-                                               IA_CSS_DEBUG_TRACE,     "\t\t%d, %d, 24bit value %x (%d)\n",
+                                   IA_CSS_DEBUG_TRACE, "\t\t%d, %d, 24bit value %x (%d)\n",
 #endif
-                                               j,
-                                               FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+                                   j,
+                                   FIELD_MAJOR_UNPACK(trace_read_buf[j]),
 #ifdef ISP2401
-                                               FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
-                                               FIELD_VALUE_24_UNPACK(trace_read_buf[j]),
+                                   FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
+                                   FIELD_VALUE_24_UNPACK(trace_read_buf[j]),
 #endif
-                                               FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
+                                   FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
                                break;
 #ifdef ISP2401
 
 #endif
                        case TRACE_DUMP_FORMAT_VALUE24_TIMING:
                                ia_css_debug_dtrace(
-                                               IA_CSS_DEBUG_TRACE,     "\t\t%d, %d, timing %x\n",
-                                               j,
+                                   IA_CSS_DEBUG_TRACE, "\t\t%d, %d, timing %x\n",
+                                   j,
 #ifndef ISP2401
-                                               FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+                                   FIELD_MAJOR_UNPACK(trace_read_buf[j]),
 #else
-                                               FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
+                                   FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
 #endif
-                                               FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
+                                   FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
                                break;
                        case TRACE_DUMP_FORMAT_VALUE24_TIMING_DELTA:
                                ia_css_debug_dtrace(
-                                               IA_CSS_DEBUG_TRACE,     "\t\t%d, %d, timing delta %x\n",
-                                               j,
+                                   IA_CSS_DEBUG_TRACE, "\t\t%d, %d, timing delta %x\n",
+                                   j,
 #ifndef ISP2401
-                                               FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+                                   FIELD_MAJOR_UNPACK(trace_read_buf[j]),
 #else
-                                               FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
+                                   FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
 #endif
-                                               FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
+                                   FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
                                break;
                        default:
                                ia_css_debug_dtrace(
-                                               IA_CSS_DEBUG_TRACE,
-                                               "no such trace dump format %d",
+                                   IA_CSS_DEBUG_TRACE,
+                                   "no such trace dump format %d",
 #ifndef ISP2401
-                                               FIELD_FORMAT_UNPACK(trace_read_buf[j]));
+                                   FIELD_FORMAT_UNPACK(trace_read_buf[j]));
 #else
-                                               dump_format);
+                                   dump_format);
 #endif
                                break;
                        }
@@ -3546,7 +3559,7 @@ void ia_css_debug_tagger_state(void)
        ia_css_debug_dtrace(2, "Tagger Info:\n");
        for (i = 0; i < MAX_CB_ELEMS_FOR_TAGGER; i++) {
                ia_css_debug_dtrace(2, "\t tagger frame[%d]: exp_id=%d, marked=%d, locked=%d\n",
-                               i, tbuf_frames[i].exp_id, tbuf_frames[i].mark, tbuf_frames[i].lock);
+                                   i, tbuf_frames[i].exp_id, tbuf_frames[i].mark, tbuf_frames[i].lock);
        }
 }
 #endif /* defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401) */
index 295b2960320c68232c49074f3cbfdc6807104a21..809ee8fcbf29388dcf9f3170e52e9def04bc3c12 100644 (file)
@@ -35,12 +35,12 @@ more details.
 #include "sw_event_global.h"    /*event macros.TODO : Change File Name..???*/
 
 bool ia_css_event_encode(
-       u8      *in,
-       u8      nr,
-       uint32_t        *out);
+    u8 *in,
+    u8 nr,
+    uint32_t   *out);
 
 void ia_css_event_decode(
-       u32 event,
-       uint8_t *payload);
+    u32 event,
+    uint8_t *payload);
 
 #endif /*_IA_CSS_EVENT_H*/
index 5902d550350bdf13c8fa756c690f62d5facdda66..74ad5f3d5d0e00be65c55eeca630fffdf674811d 100644 (file)
@@ -57,9 +57,9 @@ more details.
  * Refer to "sw_event_public.h" for details.
  */
 bool ia_css_event_encode(
-       u8      *in,
-       u8      nr,
-       uint32_t        *out)
+    u8 *in,
+    u8 nr,
+    uint32_t   *out)
 {
        bool ret;
        u32 nr_of_bits;
@@ -88,14 +88,15 @@ bool ia_css_event_encode(
 }
 
 void ia_css_event_decode(
-       u32 event,
-       uint8_t *payload)
+    u32 event,
+    uint8_t *payload)
 {
        assert(payload[1] == 0);
        assert(payload[2] == 0);
        assert(payload[3] == 0);
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_event_decode() enter:\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "ia_css_event_decode() enter:\n");
 
        /* First decode according to the common case
         * In case of a PORT_EOF event we overwrite with
index 62aaf0e3d7721c80db021d7a16cfb5b548a27e11..d12cfde88926564e4eb1511cc36bb573a5a0f483 100644 (file)
@@ -43,8 +43,8 @@ more details.
  * @return     ENODATA         - Queue is empty.
  */
 int ia_css_eventq_recv(
-               ia_css_queue_t *eventq_handle,
-               uint8_t *payload);
+    ia_css_queue_t *eventq_handle,
+    uint8_t *payload);
 
 /**
  * @brief The Host sends the event to SP.
@@ -61,9 +61,9 @@ int ia_css_eventq_recv(
  * @return     ENOBUFS         - Queue is full.
  */
 int ia_css_eventq_send(
-               ia_css_queue_t *eventq_handle,
-               u8 evt_id,
-               u8 evt_payload_0,
-               u8 evt_payload_1,
-               uint8_t evt_payload_2);
+    ia_css_queue_t *eventq_handle,
+    u8 evt_id,
+    u8 evt_payload_0,
+    u8 evt_payload_1,
+    uint8_t evt_payload_2);
 #endif /* _IA_CSS_EVENTQ_H */
index b49039b05c69a4a2a40d3291e8e400286a118ca5..0460f102d36fd2864c507e679b65e4945ab268d5 100644 (file)
@@ -22,8 +22,8 @@
 #include "platform_support.h" /* hrt_sleep() */
 
 int ia_css_eventq_recv(
-               ia_css_queue_t *eventq_handle,
-               uint8_t *payload)
+    ia_css_queue_t *eventq_handle,
+    uint8_t *payload)
 {
        u32 sp_event;
        int error;
@@ -42,11 +42,11 @@ int ia_css_eventq_recv(
  * Refer to "sh_css_sp.h" for details.
  */
 int ia_css_eventq_send(
-                       ia_css_queue_t *eventq_handle,
-                       u8 evt_id,
-                       u8 evt_payload_0,
-                       u8 evt_payload_1,
-                       uint8_t evt_payload_2)
+    ia_css_queue_t *eventq_handle,
+    u8 evt_id,
+    u8 evt_payload_0,
+    u8 evt_payload_1,
+    uint8_t evt_payload_2)
 {
        u8 tmp[4];
        u32 sw_event;
index 89ad8080ceb126888dbebe2bff3477de7cf91f73..0f8eed0a480fab41f936f1a93162cf15528b619c 100644 (file)
@@ -50,8 +50,8 @@ more details.
  * @return
  */
 void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
-       unsigned int width,
-       unsigned int min_padded_width);
+                                unsigned int width,
+                                unsigned int min_padded_width);
 
 /* @brief Sets the given format to the frame info
  *
@@ -61,7 +61,7 @@ void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
  * @return
  */
 void ia_css_frame_info_set_format(struct ia_css_frame_info *info,
-       enum ia_css_frame_format format);
+                                 enum ia_css_frame_format format);
 
 /* @brief Sets the frame info with the given parameters
  *
@@ -74,10 +74,10 @@ void ia_css_frame_info_set_format(struct ia_css_frame_info *info,
  * @return
  */
 void ia_css_frame_info_init(struct ia_css_frame_info *info,
-       unsigned int width,
-       unsigned int height,
-       enum ia_css_frame_format format,
-       unsigned int aligned);
+                           unsigned int width,
+                           unsigned int height,
+                           enum ia_css_frame_format format,
+                           unsigned int aligned);
 
 /* @brief Checks whether 2 frame infos has the same resolution
  *
@@ -87,8 +87,8 @@ void ia_css_frame_info_init(struct ia_css_frame_info *info,
  * @return      Returns true if the frames are equal
  */
 bool ia_css_frame_info_is_same_resolution(
-       const struct ia_css_frame_info *info_a,
-       const struct ia_css_frame_info *info_b);
+    const struct ia_css_frame_info *info_a,
+    const struct ia_css_frame_info *info_b);
 
 /* @brief Check the frame info is valid
  *
@@ -118,7 +118,7 @@ enum ia_css_err ia_css_frame_init_planes(struct ia_css_frame *frame);
  * @return
  */
 void ia_css_frame_free_multiple(unsigned int num_frames,
-       struct ia_css_frame **frames_array);
+                               struct ia_css_frame **frames_array);
 
 /* @brief Allocate a CSS frame structure of given size in bytes..
  *
@@ -131,9 +131,9 @@ void ia_css_frame_free_multiple(unsigned int num_frames,
  * The frame structure is partially null initialized.
  */
 enum ia_css_err ia_css_frame_allocate_with_buffer_size(
-       struct ia_css_frame **frame,
-       const unsigned int size_bytes,
-       const bool contiguous);
+    struct ia_css_frame **frame,
+    const unsigned int size_bytes,
+    const bool contiguous);
 
 /* @brief Check whether 2 frames are same type
  *
@@ -143,8 +143,8 @@ enum ia_css_err ia_css_frame_allocate_with_buffer_size(
  * @return      Returns true if the frames are equal
  */
 bool ia_css_frame_is_same_type(
-       const struct ia_css_frame *frame_a,
-       const struct ia_css_frame *frame_b);
+    const struct ia_css_frame *frame_a,
+    const struct ia_css_frame *frame_b);
 
 /* @brief Configure a dma port from frame info
  *
@@ -154,8 +154,8 @@ bool ia_css_frame_is_same_type(
  * @return
  */
 void ia_css_dma_configure_from_info(
-       struct dma_port_config *config,
-       const struct ia_css_frame_info *info);
+    struct dma_port_config *config,
+    const struct ia_css_frame_info *info);
 
 #ifdef ISP2401
 /* @brief Finds the cropping resolution
@@ -173,8 +173,8 @@ void ia_css_dma_configure_from_info(
  */
 enum ia_css_err
 ia_css_frame_find_crop_resolution(const struct ia_css_resolution *in_res,
-       const struct ia_css_resolution *out_res,
-       struct ia_css_resolution *crop_res);
+                                 const struct ia_css_resolution *out_res,
+                                 struct ia_css_resolution *crop_res);
 
 #endif
 #endif /* __IA_CSS_FRAME_H__ */
index 5f995efae39d1a4dd623ae7385bff18ecd68a7e4..3351d34dbef3099e348fabf686551747b562a06e 100644 (file)
@@ -43,7 +43,7 @@ more details.
  */
 struct ia_css_frame_sp_plane {
        unsigned int offset;    /* offset in bytes to start of frame data */
-                               /* offset is wrt data in sh_css_sp_sp_frame */
+       /* offset is wrt data in sh_css_sp_sp_frame */
 };
 
 struct ia_css_frame_sp_binary_plane {
@@ -121,11 +121,11 @@ struct ia_css_frame_sp {
 };
 
 void ia_css_frame_info_to_frame_sp_info(
-       struct ia_css_frame_sp_info *sp_info,
-       const struct ia_css_frame_info *info);
+    struct ia_css_frame_sp_info *sp_info,
+    const struct ia_css_frame_info *info);
 
 void ia_css_resolution_to_sp_resolution(
-       struct ia_css_sp_resolution *sp_info,
-       const struct ia_css_resolution *info);
+    struct ia_css_sp_resolution *sp_info,
+    const struct ia_css_resolution *info);
 
 #endif /*__IA_CSS_FRAME_COMM_H__*/
index 05740a3a54099b992cc5112ca77e83d923a6bf61..ab4ca17f05746ee06d59671c1c002f20d82b0866 100644 (file)
@@ -43,29 +43,29 @@ more details.
 **     Static functions declarations
 **************************************************************************/
 static void frame_init_plane(struct ia_css_frame_plane *plane,
-       unsigned int width,
-       unsigned int stride,
-       unsigned int height,
-       unsigned int offset);
+                            unsigned int width,
+                            unsigned int stride,
+                            unsigned int height,
+                            unsigned int offset);
 
 static void frame_init_single_plane(struct ia_css_frame *frame,
-       struct ia_css_frame_plane *plane,
-       unsigned int height,
-       unsigned int subpixels_per_line,
-       unsigned int bytes_per_pixel);
+                                   struct ia_css_frame_plane *plane,
+                                   unsigned int height,
+                                   unsigned int subpixels_per_line,
+                                   unsigned int bytes_per_pixel);
 
 static void frame_init_raw_single_plane(
-       struct ia_css_frame *frame,
-       struct ia_css_frame_plane *plane,
-       unsigned int height,
-       unsigned int subpixels_per_line,
-       unsigned int bits_per_pixel);
+    struct ia_css_frame *frame,
+    struct ia_css_frame_plane *plane,
+    unsigned int height,
+    unsigned int subpixels_per_line,
+    unsigned int bits_per_pixel);
 
 static void frame_init_mipi_plane(struct ia_css_frame *frame,
-       struct ia_css_frame_plane *plane,
-       unsigned int height,
-       unsigned int subpixels_per_line,
-       unsigned int bytes_per_pixel);
+                                 struct ia_css_frame_plane *plane,
+                                 unsigned int height,
+                                 unsigned int subpixels_per_line,
+                                 unsigned int bytes_per_pixel);
 
 static void frame_init_nv_planes(struct ia_css_frame *frame,
                                 unsigned int horizontal_decimation,
@@ -73,13 +73,13 @@ static void frame_init_nv_planes(struct ia_css_frame *frame,
                                 unsigned int bytes_per_element);
 
 static void frame_init_yuv_planes(struct ia_css_frame *frame,
-       unsigned int horizontal_decimation,
-       unsigned int vertical_decimation,
-       bool swap_uv,
-       unsigned int bytes_per_element);
+                                 unsigned int horizontal_decimation,
+                                 unsigned int vertical_decimation,
+                                 bool swap_uv,
+                                 unsigned int bytes_per_element);
 
 static void frame_init_rgb_planes(struct ia_css_frame *frame,
-       unsigned int bytes_per_element);
+                                 unsigned int bytes_per_element);
 
 static void frame_init_qplane6_planes(struct ia_css_frame *frame);
 
@@ -103,7 +103,7 @@ static struct ia_css_frame *frame_create(unsigned int width,
 
 static unsigned
 ia_css_elems_bytes_from_info(
-       const struct ia_css_frame_info *info);
+    const struct ia_css_frame_info *info);
 
 /**************************************************************************
 **     CSS API functions, exposed by ia_css.h
@@ -123,22 +123,22 @@ enum ia_css_err ia_css_frame_allocate_from_info(struct ia_css_frame **frame,
        if (!frame || !info)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_frame_allocate_from_info() enter:\n");
+                           "ia_css_frame_allocate_from_info() enter:\n");
        err =
            ia_css_frame_allocate(frame, info->res.width, info->res.height,
                                  info->format, info->padded_width,
                                  info->raw_bit_depth);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_frame_allocate_from_info() leave:\n");
+                           "ia_css_frame_allocate_from_info() leave:\n");
        return err;
 }
 
 enum ia_css_err ia_css_frame_allocate(struct ia_css_frame **frame,
-       unsigned int width,
-       unsigned int height,
-       enum ia_css_frame_format format,
-       unsigned int padded_width,
-       unsigned int raw_bit_depth)
+                                     unsigned int width,
+                                     unsigned int height,
+                                     enum ia_css_frame_format format,
+                                     unsigned int padded_width,
+                                     unsigned int raw_bit_depth)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
@@ -147,11 +147,11 @@ enum ia_css_err ia_css_frame_allocate(struct ia_css_frame **frame,
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
 #ifndef ISP2401
-         "ia_css_frame_allocate() enter: width=%d, height=%d, format=%d\n",
-         width, height, format);
+                           "ia_css_frame_allocate() enter: width=%d, height=%d, format=%d\n",
+                           width, height, format);
 #else
-         "ia_css_frame_allocate() enter: width=%d, height=%d, format=%d, padded_width=%d, raw_bit_depth=%d\n",
-         width, height, format, padded_width, raw_bit_depth);
+                           "ia_css_frame_allocate() enter: width=%d, height=%d, format=%d, padded_width=%d, raw_bit_depth=%d\n",
+                           width, height, format, padded_width, raw_bit_depth);
 #endif
 
        err = frame_allocate_with_data(frame, width, height, format,
@@ -159,25 +159,26 @@ enum ia_css_err ia_css_frame_allocate(struct ia_css_frame **frame,
 
 #ifndef ISP2401
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_frame_allocate() leave: frame=%p\n", *frame);
+                           "ia_css_frame_allocate() leave: frame=%p\n", *frame);
 #else
        if ((*frame) && err == IA_CSS_SUCCESS)
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_frame_allocate() leave: frame=%p, data(DDR address)=0x%x\n", *frame, (*frame)->data);
+                                   "ia_css_frame_allocate() leave: frame=%p, data(DDR address)=0x%x\n", *frame,
+                                   (*frame)->data);
        else
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_frame_allocate() leave: frame=%p, data(DDR address)=0x%x\n",
-                     (void *)-1, (unsigned int)-1);
+                                   "ia_css_frame_allocate() leave: frame=%p, data(DDR address)=0x%x\n",
+                                   (void *)-1, (unsigned int)-1);
 #endif
 
        return err;
 }
 
 enum ia_css_err ia_css_frame_map(struct ia_css_frame **frame,
-       const struct ia_css_frame_info *info,
-       const void __user *data,
-       u16 attribute,
-       void *context)
+                                const struct ia_css_frame_info *info,
+                                const void __user *data,
+                                u16 attribute,
+                                void *context)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_frame *me;
@@ -220,23 +221,23 @@ enum ia_css_err ia_css_frame_create_from_info(struct ia_css_frame **frame,
        struct ia_css_frame *me;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_frame_create_from_info() enter:\n");
+                           "ia_css_frame_create_from_info() enter:\n");
        if (!frame || !info) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "ia_css_frame_create_from_info() leave: invalid arguments\n");
+                                   "ia_css_frame_create_from_info() leave: invalid arguments\n");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
        me = frame_create(info->res.width,
-               info->res.height,
-               info->format,
-               info->padded_width,
-               info->raw_bit_depth,
-               false,
-               false);
+                         info->res.height,
+                         info->format,
+                         info->padded_width,
+                         info->raw_bit_depth,
+                         false,
+                         false);
        if (!me) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "ia_css_frame_create_from_info() leave: frame create failed\n");
+                                   "ia_css_frame_create_from_info() leave: frame create failed\n");
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
        }
 
@@ -251,28 +252,29 @@ enum ia_css_err ia_css_frame_create_from_info(struct ia_css_frame **frame,
 #endif
                sh_css_free(me);
 #ifdef ISP2401
-               me = NULL;
-       }
+       me = NULL;
+}
 
-       *frame = me;
+*frame = me;
 #endif
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_frame_create_from_info() leave:\n");
+ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                   "ia_css_frame_create_from_info() leave:\n");
 
-       return err;
+return err;
 }
 
 enum ia_css_err ia_css_frame_set_data(struct ia_css_frame *frame,
-       const ia_css_ptr mapped_data,
-       size_t data_bytes)
+                                     const ia_css_ptr mapped_data,
+                                     size_t data_bytes)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_frame_set_data() enter:\n");
+                           "ia_css_frame_set_data() enter:\n");
        if (!frame) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "ia_css_frame_set_data() leave: NULL frame\n");
+                                   "ia_css_frame_set_data() leave: NULL frame\n");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
@@ -282,7 +284,7 @@ enum ia_css_err ia_css_frame_set_data(struct ia_css_frame *frame,
         */
        if ((mapped_data != mmgr_NULL) && (frame->data_bytes > data_bytes)) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "ia_css_frame_set_data() leave: invalid arguments\n");
+                                   "ia_css_frame_set_data() leave: invalid arguments\n");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
@@ -303,42 +305,42 @@ enum ia_css_err ia_css_frame_allocate_contiguous(struct ia_css_frame **frame,
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_frame_allocate_contiguous() "
+                           "ia_css_frame_allocate_contiguous() "
 #ifndef ISP2401
-               "enter: width=%d, height=%d, format=%d\n",
-               width, height, format);
+                           "enter: width=%d, height=%d, format=%d\n",
+                           width, height, format);
 #else
-               "enter: width=%d, height=%d, format=%d, padded_width=%d, raw_bit_depth=%d\n",
-               width, height, format, padded_width, raw_bit_depth);
+                           "enter: width=%d, height=%d, format=%d, padded_width=%d, raw_bit_depth=%d\n",
+                           width, height, format, padded_width, raw_bit_depth);
 #endif
 
        err = frame_allocate_with_data(frame, width, height, format,
-                       padded_width, raw_bit_depth, true);
+                                      padded_width, raw_bit_depth, true);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_frame_allocate_contiguous() leave: frame=%p\n",
-               frame ? *frame : (void *)-1);
+                           "ia_css_frame_allocate_contiguous() leave: frame=%p\n",
+                           frame ? *frame : (void *)-1);
 
        return err;
 }
 
 enum ia_css_err ia_css_frame_allocate_contiguous_from_info(
-       struct ia_css_frame **frame,
-       const struct ia_css_frame_info *info)
+    struct ia_css_frame **frame,
+    const struct ia_css_frame_info *info)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        assert(frame);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_frame_allocate_contiguous_from_info() enter:\n");
+                           "ia_css_frame_allocate_contiguous_from_info() enter:\n");
        err = ia_css_frame_allocate_contiguous(frame,
-                                               info->res.width,
-                                               info->res.height,
-                                               info->format,
-                                               info->padded_width,
-                                               info->raw_bit_depth);
+                                              info->res.width,
+                                              info->res.height,
+                                              info->format,
+                                              info->padded_width,
+                                              info->raw_bit_depth);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_frame_allocate_contiguous_from_info() leave:\n");
+                           "ia_css_frame_allocate_contiguous_from_info() leave:\n");
        return err;
 }
 
@@ -373,58 +375,58 @@ enum ia_css_err ia_css_frame_init_planes(struct ia_css_frame *frame)
        switch (frame->info.format) {
        case IA_CSS_FRAME_FORMAT_MIPI:
                frame_init_mipi_plane(frame, &frame->planes.raw,
-                       frame->info.res.height,
-                       frame->info.padded_width,
-                       frame->info.raw_bit_depth <= 8 ? 1 : 2);
+                                     frame->info.res.height,
+                                     frame->info.padded_width,
+                                     frame->info.raw_bit_depth <= 8 ? 1 : 2);
                break;
        case IA_CSS_FRAME_FORMAT_RAW_PACKED:
                frame_init_raw_single_plane(frame, &frame->planes.raw,
-                       frame->info.res.height,
-                       frame->info.padded_width,
-                       frame->info.raw_bit_depth);
+                                           frame->info.res.height,
+                                           frame->info.padded_width,
+                                           frame->info.raw_bit_depth);
                break;
        case IA_CSS_FRAME_FORMAT_RAW:
                frame_init_single_plane(frame, &frame->planes.raw,
-                       frame->info.res.height,
-                       frame->info.padded_width,
-                       frame->info.raw_bit_depth <= 8 ? 1 : 2);
+                                       frame->info.res.height,
+                                       frame->info.padded_width,
+                                       frame->info.raw_bit_depth <= 8 ? 1 : 2);
                break;
        case IA_CSS_FRAME_FORMAT_RGB565:
                frame_init_single_plane(frame, &frame->planes.rgb,
-                       frame->info.res.height,
-                       frame->info.padded_width, 2);
+                                       frame->info.res.height,
+                                       frame->info.padded_width, 2);
                break;
        case IA_CSS_FRAME_FORMAT_RGBA888:
                frame_init_single_plane(frame, &frame->planes.rgb,
-                       frame->info.res.height,
-                       frame->info.padded_width * 4, 1);
+                                       frame->info.res.height,
+                                       frame->info.padded_width * 4, 1);
                break;
        case IA_CSS_FRAME_FORMAT_PLANAR_RGB888:
                frame_init_rgb_planes(frame, 1);
                break;
-               /* yuyv and uyvu have the same frame layout, only the data
-                * positioning differs.
-                */
+       /* yuyv and uyvu have the same frame layout, only the data
+        * positioning differs.
+        */
        case IA_CSS_FRAME_FORMAT_YUYV:
        case IA_CSS_FRAME_FORMAT_UYVY:
        case IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_8:
        case IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8:
                frame_init_single_plane(frame, &frame->planes.yuyv,
-                       frame->info.res.height,
-                       frame->info.padded_width * 2, 1);
+                                       frame->info.res.height,
+                                       frame->info.padded_width * 2, 1);
                break;
        case IA_CSS_FRAME_FORMAT_YUV_LINE:
                /* Needs 3 extra lines to allow vf_pp prefetching */
                frame_init_single_plane(frame, &frame->planes.yuyv,
-                       frame->info.res.height * 3 / 2 + 3,
-                       frame->info.padded_width, 1);
+                                       frame->info.res.height * 3 / 2 + 3,
+                                       frame->info.padded_width, 1);
                break;
        case IA_CSS_FRAME_FORMAT_NV11:
-         frame_init_nv_planes(frame, 4, 1, 1);
+               frame_init_nv_planes(frame, 4, 1, 1);
                break;
-               /* nv12 and nv21 have the same frame layout, only the data
-                * positioning differs.
-                */
+       /* nv12 and nv21 have the same frame layout, only the data
+        * positioning differs.
+        */
        case IA_CSS_FRAME_FORMAT_NV12:
        case IA_CSS_FRAME_FORMAT_NV21:
        case IA_CSS_FRAME_FORMAT_NV12_TILEY:
@@ -433,9 +435,9 @@ enum ia_css_err ia_css_frame_init_planes(struct ia_css_frame *frame)
        case IA_CSS_FRAME_FORMAT_NV12_16:
                frame_init_nv_planes(frame, 2, 2, 2);
                break;
-               /* nv16 and nv61 have the same frame layout, only the data
-                * positioning differs.
-                */
+       /* nv16 and nv61 have the same frame layout, only the data
+        * positioning differs.
+        */
        case IA_CSS_FRAME_FORMAT_NV16:
        case IA_CSS_FRAME_FORMAT_NV61:
                frame_init_nv_planes(frame, 2, 1, 1);
@@ -466,8 +468,8 @@ enum ia_css_err ia_css_frame_init_planes(struct ia_css_frame *frame)
                break;
        case IA_CSS_FRAME_FORMAT_BINARY_8:
                frame_init_single_plane(frame, &frame->planes.binary.data,
-                       frame->info.res.height,
-                       frame->info.padded_width, 1);
+                                       frame->info.res.height,
+                                       frame->info.padded_width, 1);
                frame->planes.binary.size = 0;
                break;
        default:
@@ -477,8 +479,8 @@ enum ia_css_err ia_css_frame_init_planes(struct ia_css_frame *frame)
 }
 
 void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
-       unsigned int width,
-       unsigned int min_padded_width)
+                                unsigned int width,
+                                unsigned int min_padded_width)
 {
        unsigned int align;
 
@@ -518,19 +520,19 @@ void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
 }
 
 void ia_css_frame_info_set_format(struct ia_css_frame_info *info,
-       enum ia_css_frame_format format)
+                                 enum ia_css_frame_format format)
 {
        assert(info);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_frame_info_set_format() enter:\n");
+                           "ia_css_frame_info_set_format() enter:\n");
        info->format = format;
 }
 
 void ia_css_frame_info_init(struct ia_css_frame_info *info,
-       unsigned int width,
-       unsigned int height,
-       enum ia_css_frame_format format,
-       unsigned int aligned)
+                           unsigned int width,
+                           unsigned int height,
+                           enum ia_css_frame_format format,
+                           unsigned int aligned)
 {
        IA_CSS_ENTER_PRIVATE("info = %p, width = %d, height = %d, format = %d, aligned = %d",
                             info, width, height, format, aligned);
@@ -546,7 +548,7 @@ void ia_css_frame_info_init(struct ia_css_frame_info *info,
 }
 
 void ia_css_frame_free_multiple(unsigned int num_frames,
-       struct ia_css_frame **frames_array)
+                               struct ia_css_frame **frames_array)
 {
        unsigned int i;
 
@@ -559,15 +561,15 @@ void ia_css_frame_free_multiple(unsigned int num_frames,
 }
 
 enum ia_css_err ia_css_frame_allocate_with_buffer_size(
-       struct ia_css_frame **frame,
-       const unsigned int buffer_size_bytes,
-       const bool contiguous)
+    struct ia_css_frame **frame,
+    const unsigned int buffer_size_bytes,
+    const bool contiguous)
 {
        /* AM: Body coppied from frame_allocate_with_data(). */
        enum ia_css_err err;
        struct ia_css_frame *me = frame_create(0, 0,
-               IA_CSS_FRAME_FORMAT_NUM,/* Not valid format yet */
-               0, 0, contiguous, false);
+                                              IA_CSS_FRAME_FORMAT_NUM,/* Not valid format yet */
+                                              0, 0, contiguous, false);
 
        if (!me)
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
@@ -592,24 +594,24 @@ enum ia_css_err ia_css_frame_allocate_with_buffer_size(
 }
 
 bool ia_css_frame_info_is_same_resolution(
-       const struct ia_css_frame_info *info_a,
-       const struct ia_css_frame_info *info_b)
+    const struct ia_css_frame_info *info_a,
+    const struct ia_css_frame_info *info_b)
 {
        if (!info_a || !info_b)
                return false;
        return (info_a->res.width == info_b->res.width) &&
-           (info_a->res.height == info_b->res.height);
+              (info_a->res.height == info_b->res.height);
 }
 
 bool ia_css_frame_is_same_type(const struct ia_css_frame *frame_a,
-       const struct ia_css_frame *frame_b)
+                              const struct ia_css_frame *frame_b)
 {
        bool is_equal = false;
        const struct ia_css_frame_info *info_a = &frame_a->info,
-           *info_b = &frame_b->info;
+                                               *info_b = &frame_b->info;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_frame_is_same_type() enter:\n");
+                           "ia_css_frame_is_same_type() enter:\n");
 
        if (!info_a || !info_b)
                return false;
@@ -620,18 +622,19 @@ bool ia_css_frame_is_same_type(const struct ia_css_frame *frame_a,
        is_equal = ia_css_frame_info_is_same_resolution(info_a, info_b);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_frame_is_same_type() leave:\n");
+                           "ia_css_frame_is_same_type() leave:\n");
 
        return is_equal;
 }
 
 void
 ia_css_dma_configure_from_info(
-       struct dma_port_config *config,
-       const struct ia_css_frame_info *info)
+    struct dma_port_config *config,
+    const struct ia_css_frame_info *info)
 {
        unsigned int is_raw_packed = info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED;
-       unsigned int bits_per_pixel = is_raw_packed ? info->raw_bit_depth : ia_css_elems_bytes_from_info(info) * 8;
+       unsigned int bits_per_pixel = is_raw_packed ? info->raw_bit_depth :
+                                     ia_css_elems_bytes_from_info(info) * 8;
        unsigned int pix_per_ddrword = HIVE_ISP_DDR_WORD_BITS / bits_per_pixel;
        unsigned int words_per_line = CEIL_DIV(info->padded_width, pix_per_ddrword);
        unsigned int elems_b = pix_per_ddrword;
@@ -648,10 +651,10 @@ ia_css_dma_configure_from_info(
 **************************************************************************/
 
 static void frame_init_plane(struct ia_css_frame_plane *plane,
-       unsigned int width,
-       unsigned int stride,
-       unsigned int height,
-       unsigned int offset)
+                            unsigned int width,
+                            unsigned int stride,
+                            unsigned int height,
+                            unsigned int offset)
 {
        plane->height = height;
        plane->width = width;
@@ -660,10 +663,10 @@ static void frame_init_plane(struct ia_css_frame_plane *plane,
 }
 
 static void frame_init_single_plane(struct ia_css_frame *frame,
-       struct ia_css_frame_plane *plane,
-       unsigned int height,
-       unsigned int subpixels_per_line,
-       unsigned int bytes_per_pixel)
+                                   struct ia_css_frame_plane *plane,
+                                   unsigned int height,
+                                   unsigned int subpixels_per_line,
+                                   unsigned int bytes_per_pixel)
 {
        unsigned int stride;
 
@@ -680,29 +683,29 @@ static void frame_init_single_plane(struct ia_css_frame *frame,
 }
 
 static void frame_init_raw_single_plane(
-       struct ia_css_frame *frame,
-       struct ia_css_frame_plane *plane,
-       unsigned int height,
-       unsigned int subpixels_per_line,
-       unsigned int bits_per_pixel)
+    struct ia_css_frame *frame,
+    struct ia_css_frame_plane *plane,
+    unsigned int height,
+    unsigned int subpixels_per_line,
+    unsigned int bits_per_pixel)
 {
        unsigned int stride;
 
        assert(frame);
 
        stride = HIVE_ISP_DDR_WORD_BYTES *
-                       CEIL_DIV(subpixels_per_line,
-                               HIVE_ISP_DDR_WORD_BITS / bits_per_pixel);
+                CEIL_DIV(subpixels_per_line,
+                         HIVE_ISP_DDR_WORD_BITS / bits_per_pixel);
        frame->data_bytes = stride * height;
        frame_init_plane(plane, subpixels_per_line, stride, height, 0);
        return;
 }
 
 static void frame_init_mipi_plane(struct ia_css_frame *frame,
-       struct ia_css_frame_plane *plane,
-       unsigned int height,
-       unsigned int subpixels_per_line,
-       unsigned int bytes_per_pixel)
+                                 struct ia_css_frame_plane *plane,
+                                 unsigned int height,
+                                 unsigned int subpixels_per_line,
+                                 unsigned int bytes_per_pixel)
 {
        unsigned int stride;
 
@@ -753,16 +756,16 @@ static void frame_init_nv_planes(struct ia_css_frame *frame,
 }
 
 static void frame_init_yuv_planes(struct ia_css_frame *frame,
-       unsigned int horizontal_decimation,
-       unsigned int vertical_decimation,
-       bool swap_uv,
-       unsigned int bytes_per_element)
+                                 unsigned int horizontal_decimation,
+                                 unsigned int vertical_decimation,
+                                 bool swap_uv,
+                                 unsigned int bytes_per_element)
 {
        unsigned int y_width = frame->info.padded_width,
-           y_height = frame->info.res.height,
-           uv_width = y_width / horizontal_decimation,
-           uv_height = y_height / vertical_decimation,
-           y_stride, y_bytes, uv_bytes, uv_stride;
+                    y_height = frame->info.res.height,
+                    uv_width = y_width / horizontal_decimation,
+                    uv_height = y_height / vertical_decimation,
+                    y_stride, y_bytes, uv_bytes, uv_stride;
 
        y_stride = y_width * bytes_per_element;
        uv_stride = uv_width * bytes_per_element;
@@ -786,10 +789,10 @@ static void frame_init_yuv_planes(struct ia_css_frame *frame,
 }
 
 static void frame_init_rgb_planes(struct ia_css_frame *frame,
-       unsigned int bytes_per_element)
+                                 unsigned int bytes_per_element)
 {
        unsigned int width = frame->info.res.width,
-           height = frame->info.res.height, stride, bytes;
+                    height = frame->info.res.height, stride, bytes;
 
        stride = width * bytes_per_element;
        bytes = stride * height;
@@ -805,7 +808,7 @@ static void frame_init_rgb_planes(struct ia_css_frame *frame,
 static void frame_init_qplane6_planes(struct ia_css_frame *frame)
 {
        unsigned int width = frame->info.padded_width / 2,
-           height = frame->info.res.height / 2, bytes, stride;
+                    height = frame->info.res.height / 2, bytes, stride;
 
        stride = width * 2;
        bytes = stride * height;
@@ -851,12 +854,12 @@ static enum ia_css_err frame_allocate_with_data(struct ia_css_frame **frame,
 {
        enum ia_css_err err;
        struct ia_css_frame *me = frame_create(width,
-               height,
-               format,
-               padded_width,
-               raw_bit_depth,
-               contiguous,
-               true);
+                                              height,
+                                              format,
+                                              padded_width,
+                                              raw_bit_depth,
+                                              contiguous,
+                                              true);
 
        if (!me)
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
@@ -928,7 +931,7 @@ ia_css_elems_bytes_from_info(const struct ia_css_frame_info *info)
                return 1; /* bytes per pixel */
 
        if (info->format == IA_CSS_FRAME_FORMAT_RAW
-               || (info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED)) {
+           || (info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED)) {
                if (info->raw_bit_depth)
                        return CEIL_DIV(info->raw_bit_depth, 8);
                else
@@ -944,8 +947,8 @@ ia_css_elems_bytes_from_info(const struct ia_css_frame_info *info)
 }
 
 void ia_css_frame_info_to_frame_sp_info(
-       struct ia_css_frame_sp_info *to,
-       const struct ia_css_frame_info *from)
+    struct ia_css_frame_sp_info *to,
+    const struct ia_css_frame_info *from)
 {
        ia_css_resolution_to_sp_resolution(&to->res, &from->res);
        to->padded_width = (uint16_t)from->padded_width;
@@ -955,8 +958,8 @@ void ia_css_frame_info_to_frame_sp_info(
 }
 
 void ia_css_resolution_to_sp_resolution(
-       struct ia_css_sp_resolution *to,
-       const struct ia_css_resolution *from)
+    struct ia_css_sp_resolution *to,
+    const struct ia_css_resolution *from)
 {
        to->width  = (uint16_t)from->width;
        to->height = (uint16_t)from->height;
@@ -966,9 +969,8 @@ void ia_css_resolution_to_sp_resolution(
 
 enum ia_css_err
 ia_css_frame_find_crop_resolution(const struct ia_css_resolution *in_res,
-       const struct ia_css_resolution *out_res,
-       struct ia_css_resolution *crop_res)
-{
+                                 const struct ia_css_resolution *out_res,
+                                 struct ia_css_resolution *crop_res) {
        u32 wd_even_ceil, ht_even_ceil;
        u32 in_ratio, out_ratio;
 
@@ -976,17 +978,17 @@ ia_css_frame_find_crop_resolution(const struct ia_css_resolution *in_res,
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        IA_CSS_ENTER_PRIVATE("in(%ux%u) -> out(%ux%u)", in_res->width,
-               in_res->height, out_res->width, out_res->height);
+                            in_res->height, out_res->width, out_res->height);
 
        if ((in_res->width == 0)
-               || (in_res->height == 0)
-               || (out_res->width == 0)
-               || (out_res->height == 0))
-                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+           || (in_res->height == 0)
+           || (out_res->width == 0)
+           || (out_res->height == 0))
+               return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        if ((out_res->width > in_res->width) ||
-                (out_res->height > in_res->height))
-                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+           (out_res->height > in_res->height))
+               return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        /* If aspect ratio (width/height) of out_res is higher than the aspect
         * ratio of the in_res, then we crop vertically, otherwise we crop
@@ -995,17 +997,20 @@ ia_css_frame_find_crop_resolution(const struct ia_css_resolution *in_res,
        in_ratio = in_res->width * out_res->height;
        out_ratio = out_res->width * in_res->height;
 
-       if (in_ratio == out_ratio) {
+       if (in_ratio == out_ratio)
+       {
                crop_res->width = in_res->width;
                crop_res->height = in_res->height;
-       } else if (out_ratio > in_ratio) {
+       } else if (out_ratio > in_ratio)
+       {
                crop_res->width = in_res->width;
                crop_res->height = ROUND_DIV(out_res->height * crop_res->width,
-                       out_res->width);
-       } else {
+                                            out_res->width);
+       } else
+       {
                crop_res->height = in_res->height;
                crop_res->width = ROUND_DIV(out_res->width * crop_res->height,
-                       out_res->height);
+                                           out_res->height);
        }
 
        /* Round new (cropped) width and height to an even number.
@@ -1016,16 +1021,18 @@ ia_css_frame_find_crop_resolution(const struct ia_css_resolution *in_res,
         */
        wd_even_ceil = EVEN_CEIL(crop_res->width);
        ht_even_ceil = EVEN_CEIL(crop_res->height);
-       if ((wd_even_ceil > in_res->width) || (ht_even_ceil > in_res->height)) {
+       if ((wd_even_ceil > in_res->width) || (ht_even_ceil > in_res->height))
+       {
                crop_res->width = EVEN_FLOOR(crop_res->width);
                crop_res->height = EVEN_FLOOR(crop_res->height);
-       } else {
+       } else
+       {
                crop_res->width = wd_even_ceil;
                crop_res->height = ht_even_ceil;
        }
 
        IA_CSS_LEAVE_PRIVATE("in(%ux%u) -> out(%ux%u)", crop_res->width,
-               crop_res->height, out_res->width, out_res->height);
+                            crop_res->height, out_res->width, out_res->height);
        return IA_CSS_SUCCESS;
 }
 #endif
index d02bff1bbf46eb90f72b5001c2e947b89e820bb5..53941fbf0b8f0ce8525fabf5f5f28af845ac5bad 100644 (file)
@@ -38,10 +38,10 @@ more details.
 extern bool ifmtr_set_if_blocking_mode_reset;
 
 unsigned int ia_css_ifmtr_lines_needed_for_bayer_order(
-                       const struct ia_css_stream_config *config);
+    const struct ia_css_stream_config *config);
 
 unsigned int ia_css_ifmtr_columns_needed_for_bayer_order(
-                       const struct ia_css_stream_config *config);
+    const struct ia_css_stream_config *config);
 
 enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
                                       struct ia_css_binary *binary);
index bccbddd35d28d05963c0e035b3c0539fa675d2ac..cf55a01b203432059cbfec73654c0492d3124756 100644 (file)
@@ -45,18 +45,18 @@ more details.
  * Static functions declarations
  ************************************************************/
 static enum ia_css_err ifmtr_start_column(
-               const struct ia_css_stream_config *config,
-               unsigned int bin_in,
-               unsigned int *start_column);
+    const struct ia_css_stream_config *config,
+    unsigned int bin_in,
+    unsigned int *start_column);
 
 static enum ia_css_err ifmtr_input_start_line(
-               const struct ia_css_stream_config *config,
-               unsigned int bin_in,
-               unsigned int *start_line);
+    const struct ia_css_stream_config *config,
+    unsigned int bin_in,
+    unsigned int *start_line);
 
 static void ifmtr_set_if_blocking_mode(
-               const input_formatter_cfg_t * const config_a,
-               const input_formatter_cfg_t * const config_b);
+    const input_formatter_cfg_t *const config_a,
+    const input_formatter_cfg_t *const config_b);
 
 /************************************************************
  * Public functions
@@ -66,7 +66,7 @@ static void ifmtr_set_if_blocking_mode(
  * to correct in case the input bayer order is different.
  */
 unsigned int ia_css_ifmtr_lines_needed_for_bayer_order(
-               const struct ia_css_stream_config *config)
+    const struct ia_css_stream_config *config)
 {
        assert(config);
        if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_BGGR)
@@ -77,7 +77,7 @@ unsigned int ia_css_ifmtr_lines_needed_for_bayer_order(
 }
 
 unsigned int ia_css_ifmtr_columns_needed_for_bayer_order(
-               const struct ia_css_stream_config *config)
+    const struct ia_css_stream_config *config)
 {
        assert(config);
        if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_RGGB)
@@ -91,26 +91,26 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
                                       struct ia_css_binary *binary)
 {
        unsigned int start_line, start_column = 0,
-           cropped_height,
-           cropped_width,
-           num_vectors,
-           buffer_height = 2,
-           buffer_width,
-           two_ppc,
-           vmem_increment = 0,
-           deinterleaving = 0,
-           deinterleaving_b = 0,
-           width_a = 0,
-           width_b = 0,
-           bits_per_pixel,
-           vectors_per_buffer,
-           vectors_per_line = 0,
-           buffers_per_line = 0,
-           buf_offset_a = 0,
-           buf_offset_b = 0,
-           line_width = 0,
-           width_b_factor = 1, start_column_b,
-           left_padding = 0;
+                                cropped_height,
+                                cropped_width,
+                                num_vectors,
+                                buffer_height = 2,
+                                buffer_width,
+                                two_ppc,
+                                vmem_increment = 0,
+                                deinterleaving = 0,
+                                deinterleaving_b = 0,
+                                width_a = 0,
+                                width_b = 0,
+                                bits_per_pixel,
+                                vectors_per_buffer,
+                                vectors_per_line = 0,
+                                buffers_per_line = 0,
+                                buf_offset_a = 0,
+                                buf_offset_b = 0,
+                                line_width = 0,
+                                width_b_factor = 1, start_column_b,
+                                left_padding = 0;
        input_formatter_cfg_t if_a_config, if_b_config;
        enum atomisp_input_format input_format;
        enum ia_css_err err = IA_CSS_SUCCESS;
@@ -125,7 +125,8 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
                cropped_width = binary->in_frame_info.res.width;
                /* This should correspond to the input buffer definition for
                ISP binaries in input_buf.isp.h */
-               if (binary->info->sp.enable.continuous && binary->info->sp.pipeline.mode != IA_CSS_BINARY_MODE_COPY)
+               if (binary->info->sp.enable.continuous &&
+                   binary->info->sp.pipeline.mode != IA_CSS_BINARY_MODE_COPY)
                        buffer_width = MAX_VECTORS_PER_INPUT_LINE_CONT * ISP_VEC_NELEMS;
                else
                        buffer_width = binary->info->sp.input.max_width;
@@ -186,7 +187,7 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
        start_column_b = start_column;
 
        bits_per_pixel = input_formatter_get_alignment(INPUT_FORMATTER0_ID)
-           * 8 / ISP_VEC_NELEMS;
+                        * 8 / ISP_VEC_NELEMS;
        switch (input_format) {
        case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
                if (two_ppc) {
@@ -205,8 +206,8 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
                        vectors_per_line = num_vectors / buffer_height;
                        /* Even lines are half size */
                        line_width = vectors_per_line *
-                           input_formatter_get_alignment(INPUT_FORMATTER0_ID) /
-                           2;
+                                    input_formatter_get_alignment(INPUT_FORMATTER0_ID) /
+                                    2;
                        start_column /= 2;
                } else {
                        vmem_increment = 1;
@@ -231,8 +232,8 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
                        vectors_per_line = num_vectors / buffer_height;
                        /* Even lines are half size */
                        line_width = vectors_per_line *
-                           input_formatter_get_alignment(INPUT_FORMATTER0_ID) /
-                           2;
+                                    input_formatter_get_alignment(INPUT_FORMATTER0_ID) /
+                                    2;
                        start_column *= deinterleaving;
                        start_column /= 2;
                        start_column_b = start_column;
@@ -317,7 +318,7 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
                        vmem_increment = 1;
                        deinterleaving = 2;
                        if ((!binary) || (config->continuous && binary
-                               && binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY)) {
+                                         && binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY)) {
                                /* !binary -> sp raw copy pipe, no deinterleaving */
                                deinterleaving = 1;
                        }
@@ -388,7 +389,7 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
        }
        if (!line_width)
                line_width = vectors_per_line *
-                   input_formatter_get_alignment(INPUT_FORMATTER0_ID);
+                            input_formatter_get_alignment(INPUT_FORMATTER0_ID);
        if (!buffers_per_line)
                buffers_per_line = deinterleaving;
        line_width = CEIL_MUL(line_width,
@@ -399,7 +400,7 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
 
        if (config->mode == IA_CSS_INPUT_MODE_TPG &&
            ((binary && binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_VIDEO) ||
-           (!binary))) {
+            (!binary))) {
                /* !binary -> sp raw copy pipe */
                /* workaround for TPG in video mode */
                start_line = 0;
@@ -432,10 +433,10 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
                        buffer_width *= deinterleaving;
                        /* Patch from bayer to rgb */
                        num_vectors = num_vectors / 2 *
-                           deinterleaving * width_b_factor;
+                                     deinterleaving * width_b_factor;
                        vectors_per_line = num_vectors / buffer_height;
                        line_width = vectors_per_line *
-                           input_formatter_get_alignment(INPUT_FORMATTER0_ID);
+                                    input_formatter_get_alignment(INPUT_FORMATTER0_ID);
                }
                if_b_config.start_line = start_line;
                if_b_config.start_column = start_column_b;
@@ -483,8 +484,8 @@ bool ifmtr_set_if_blocking_mode_reset = true;
  * Static functions
  ************************************************************/
 static void ifmtr_set_if_blocking_mode(
-               const input_formatter_cfg_t * const config_a,
-               const input_formatter_cfg_t * const config_b)
+    const input_formatter_cfg_t *const config_a,
+    const input_formatter_cfg_t *const config_b)
 {
        int i;
        bool block[] = { false, false, false, false };
@@ -516,12 +517,12 @@ static void ifmtr_set_if_blocking_mode(
 }
 
 static enum ia_css_err ifmtr_start_column(
-               const struct ia_css_stream_config *config,
-               unsigned int bin_in,
-               unsigned int *start_column)
+    const struct ia_css_stream_config *config,
+    unsigned int bin_in,
+    unsigned int *start_column)
 {
        unsigned int in = config->input_config.input_res.width, start,
-           for_bayer = ia_css_ifmtr_columns_needed_for_bayer_order(config);
+                    for_bayer = ia_css_ifmtr_columns_needed_for_bayer_order(config);
 
        if (bin_in + 2 * for_bayer > in)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -542,12 +543,12 @@ static enum ia_css_err ifmtr_start_column(
 }
 
 static enum ia_css_err ifmtr_input_start_line(
-               const struct ia_css_stream_config *config,
-               unsigned int bin_in,
-               unsigned int *start_line)
+    const struct ia_css_stream_config *config,
+    unsigned int bin_in,
+    unsigned int *start_line)
 {
        unsigned int in = config->input_config.input_res.height, start,
-           for_bayer = ia_css_ifmtr_lines_needed_for_bayer_order(config);
+                    for_bayer = ia_css_ifmtr_lines_needed_for_bayer_order(config);
 
        if (bin_in + 2 * for_bayer > in)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
index 545f9e2da59e9b01ede84b174c091b974e0f7530..a5e552e590e8a9124dbf54df8037c6712d5e6c74 100644 (file)
@@ -38,32 +38,32 @@ more details.
 
 /* SP access */
 void ia_css_inputfifo_send_input_frame(
-       const unsigned short    *data,
-       unsigned int    width,
-       unsigned int    height,
-       unsigned int    ch_id,
-       enum atomisp_input_format       input_format,
-       bool                    two_ppc);
+    const unsigned short       *data,
+    unsigned int       width,
+    unsigned int       height,
+    unsigned int       ch_id,
+    enum atomisp_input_format  input_format,
+    bool                       two_ppc);
 
 void ia_css_inputfifo_start_frame(
-       unsigned int    ch_id,
-       enum atomisp_input_format       input_format,
-       bool                    two_ppc);
+    unsigned int       ch_id,
+    enum atomisp_input_format  input_format,
+    bool                       two_ppc);
 
 void ia_css_inputfifo_send_line(
-       unsigned int    ch_id,
-       const unsigned short    *data,
-       unsigned int    width,
-       const unsigned short    *data2,
-       unsigned int    width2);
+    unsigned int       ch_id,
+    const unsigned short       *data,
+    unsigned int       width,
+    const unsigned short       *data2,
+    unsigned int       width2);
 
 void ia_css_inputfifo_send_embedded_line(
-       unsigned int    ch_id,
-       enum atomisp_input_format       data_type,
-       const unsigned short    *data,
-       unsigned int    width);
+    unsigned int       ch_id,
+    enum atomisp_input_format  data_type,
+    const unsigned short       *data,
+    unsigned int       width);
 
 void ia_css_inputfifo_end_frame(
-       unsigned int    ch_id);
+    unsigned int       ch_id);
 
 #endif /* _IA_CSS_INPUTFIFO_H */
index 029db01a94411fc7286093b3e19e536a7ba3e933..57efa4055f5f776cebbf6f1f44af6769bd2104ce 100644 (file)
@@ -107,12 +107,12 @@ static struct inputfifo_instance
 
 /* Streaming to MIPI */
 static unsigned int inputfifo_wrap_marker(
-/* static inline unsigned inputfifo_wrap_marker( */
-       unsigned int marker)
+    /* static inline unsigned inputfifo_wrap_marker( */
+    unsigned int marker)
 {
        return marker |
-       (inputfifo_curr_ch_id << HIVE_STR_TO_MIPI_CH_ID_LSB) |
-       (inputfifo_curr_fmt_type << _HIVE_STR_TO_MIPI_FMT_TYPE_LSB);
+              (inputfifo_curr_ch_id << HIVE_STR_TO_MIPI_CH_ID_LSB) |
+              (inputfifo_curr_fmt_type << _HIVE_STR_TO_MIPI_FMT_TYPE_LSB);
 }
 
 static inline void
@@ -125,8 +125,8 @@ _sh_css_fifo_snd(unsigned int token)
 }
 
 static void inputfifo_send_data_a(
-/* static inline void inputfifo_send_data_a( */
-unsigned int data)
+    /* static inline void inputfifo_send_data_a( */
+    unsigned int data)
 {
        unsigned int token = (1 << HIVE_STR_TO_MIPI_VALID_A_BIT) |
                             (data << HIVE_STR_TO_MIPI_DATA_A_LSB);
@@ -135,8 +135,8 @@ unsigned int data)
 }
 
 static void inputfifo_send_data_b(
-/* static inline void inputfifo_send_data_b( */
-       unsigned int data)
+    /* static inline void inputfifo_send_data_b( */
+    unsigned int data)
 {
        unsigned int token = (1 << HIVE_STR_TO_MIPI_VALID_B_BIT) |
                             (data << _HIVE_STR_TO_MIPI_DATA_B_LSB);
@@ -145,9 +145,9 @@ static void inputfifo_send_data_b(
 }
 
 static void inputfifo_send_data(
-/* static inline void inputfifo_send_data( */
-       unsigned int a,
-       unsigned int b)
+    /* static inline void inputfifo_send_data( */
+    unsigned int a,
+    unsigned int b)
 {
        unsigned int token = ((1 << HIVE_STR_TO_MIPI_VALID_A_BIT) |
                              (1 << HIVE_STR_TO_MIPI_VALID_B_BIT) |
@@ -161,7 +161,7 @@ static void inputfifo_send_sol(void)
 /* static inline void inputfifo_send_sol(void) */
 {
        hrt_data        token = inputfifo_wrap_marker(
-               1 << HIVE_STR_TO_MIPI_SOL_BIT);
+                               1 << HIVE_STR_TO_MIPI_SOL_BIT);
 
        _sh_css_fifo_snd(token);
        return;
@@ -171,7 +171,7 @@ static void inputfifo_send_eol(void)
 /* static inline void inputfifo_send_eol(void) */
 {
        hrt_data        token = inputfifo_wrap_marker(
-               1 << HIVE_STR_TO_MIPI_EOL_BIT);
+                               1 << HIVE_STR_TO_MIPI_EOL_BIT);
        _sh_css_fifo_snd(token);
        return;
 }
@@ -180,7 +180,7 @@ static void inputfifo_send_sof(void)
 /* static inline void inputfifo_send_sof(void) */
 {
        hrt_data        token = inputfifo_wrap_marker(
-               1 << HIVE_STR_TO_MIPI_SOF_BIT);
+                               1 << HIVE_STR_TO_MIPI_SOF_BIT);
 
        _sh_css_fifo_snd(token);
        return;
@@ -190,15 +190,15 @@ static void inputfifo_send_eof(void)
 /* static inline void inputfifo_send_eof(void) */
 {
        hrt_data        token = inputfifo_wrap_marker(
-               1 << HIVE_STR_TO_MIPI_EOF_BIT);
+                               1 << HIVE_STR_TO_MIPI_EOF_BIT);
        _sh_css_fifo_snd(token);
        return;
 }
 
 #ifdef __ON__
 static void inputfifo_send_ch_id(
-/* static inline void inputfifo_send_ch_id( */
-       unsigned int ch_id)
+    /* static inline void inputfifo_send_ch_id( */
+    unsigned int ch_id)
 {
        hrt_data        token;
 
@@ -212,8 +212,8 @@ static void inputfifo_send_ch_id(
 }
 
 static void inputfifo_send_fmt_type(
-/* static inline void inputfifo_send_fmt_type( */
-       unsigned int fmt_type)
+    /* static inline void inputfifo_send_fmt_type( */
+    unsigned int fmt_type)
 {
        hrt_data        token;
 
@@ -228,10 +228,10 @@ static void inputfifo_send_fmt_type(
 #endif /*  __ON__ */
 
 static void inputfifo_send_ch_id_and_fmt_type(
-/* static inline
-void inputfifo_send_ch_id_and_fmt_type( */
-       unsigned int ch_id,
-       unsigned int fmt_type)
+    /* static inline
+    void inputfifo_send_ch_id_and_fmt_type( */
+    unsigned int ch_id,
+    unsigned int fmt_type)
 {
        hrt_data        token;
 
@@ -255,9 +255,9 @@ static void inputfifo_send_empty_token(void)
 }
 
 static void inputfifo_start_frame(
-/* static inline void inputfifo_start_frame( */
-       unsigned int ch_id,
-       unsigned int fmt_type)
+    /* static inline void inputfifo_start_frame( */
+    unsigned int ch_id,
+    unsigned int fmt_type)
 {
        inputfifo_send_ch_id_and_fmt_type(ch_id, fmt_type);
        inputfifo_send_sof();
@@ -265,7 +265,7 @@ static void inputfifo_start_frame(
 }
 
 static void inputfifo_end_frame(
-       unsigned int marker_cycles)
+    unsigned int marker_cycles)
 {
        unsigned int i;
 
@@ -276,14 +276,14 @@ static void inputfifo_end_frame(
 }
 
 static void inputfifo_send_line2(
-       const unsigned short *data,
-       unsigned int width,
-       const unsigned short *data2,
-       unsigned int width2,
-       unsigned int hblank_cycles,
-       unsigned int marker_cycles,
-       unsigned int two_ppc,
-       enum inputfifo_mipi_data_type type)
+    const unsigned short *data,
+    unsigned int width,
+    const unsigned short *data2,
+    unsigned int width2,
+    unsigned int hblank_cycles,
+    unsigned int marker_cycles,
+    unsigned int two_ppc,
+    enum inputfifo_mipi_data_type type)
 {
        unsigned int i, is_rgb = 0, is_legacy = 0;
 
@@ -315,10 +315,10 @@ static void inputfifo_send_line2(
                                 * if the file contains an odd number of bytes.
                                 */
                                inputfifo_send_data(
-                                                       data[0], 0);
+                                   data[0], 0);
                        } else {
                                inputfifo_send_data(
-                                                       data[0], data[1]);
+                                   data[0], data[1]);
                        }
                        /* Additional increment because we send 2 pixels */
                        data++;
@@ -345,10 +345,10 @@ static void inputfifo_send_line2(
                                 * if the file contains an odd number of bytes.
                                 */
                                inputfifo_send_data(
-                                                       data2[0], 0);
+                                   data2[0], 0);
                        } else {
                                inputfifo_send_data(
-                                                       data2[0], data2[1]);
+                                   data2[0], data2[1]);
                        }
                        /* Additional increment because we send 2 pixels */
                        data2++;
@@ -367,18 +367,18 @@ static void inputfifo_send_line2(
 
 static void
 inputfifo_send_line(const unsigned short *data,
-                        unsigned int width,
-                        unsigned int hblank_cycles,
-                        unsigned int marker_cycles,
-                        unsigned int two_ppc,
-                        enum inputfifo_mipi_data_type type)
+                   unsigned int width,
+                   unsigned int hblank_cycles,
+                   unsigned int marker_cycles,
+                   unsigned int two_ppc,
+                   enum inputfifo_mipi_data_type type)
 {
        assert(data);
        inputfifo_send_line2(data, width, NULL, 0,
-                                       hblank_cycles,
-                                       marker_cycles,
-                                       two_ppc,
-                                       type);
+                            hblank_cycles,
+                            marker_cycles,
+                            two_ppc,
+                            type);
 }
 
 /* Send a frame of data into the input network via the GP FIFO.
@@ -410,15 +410,15 @@ inputfifo_send_line(const unsigned short *data,
  */
 
 static void inputfifo_send_frame(
-       const unsigned short *data,
-       unsigned int width,
-       unsigned int height,
-       unsigned int ch_id,
-       unsigned int fmt_type,
-       unsigned int hblank_cycles,
-       unsigned int marker_cycles,
-       unsigned int two_ppc,
-       enum inputfifo_mipi_data_type type)
+    const unsigned short *data,
+    unsigned int width,
+    unsigned int height,
+    unsigned int ch_id,
+    unsigned int fmt_type,
+    unsigned int hblank_cycles,
+    unsigned int marker_cycles,
+    unsigned int two_ppc,
+    enum inputfifo_mipi_data_type type)
 {
        unsigned int i;
 
@@ -429,15 +429,15 @@ static void inputfifo_send_frame(
                if ((type == inputfifo_mipi_data_type_yuv420) &&
                    (i & 1) == 1) {
                        inputfifo_send_line(data, 2 * width,
-                                                          hblank_cycles,
-                                                          marker_cycles,
-                                                          two_ppc, type);
+                                           hblank_cycles,
+                                           marker_cycles,
+                                           two_ppc, type);
                        data += 2 * width;
                } else {
                        inputfifo_send_line(data, width,
-                                                          hblank_cycles,
-                                                          marker_cycles,
-                                                          two_ppc, type);
+                                           hblank_cycles,
+                                           marker_cycles,
+                                           two_ppc, type);
                        data += width;
                }
        }
@@ -446,40 +446,40 @@ static void inputfifo_send_frame(
 }
 
 static enum inputfifo_mipi_data_type inputfifo_determine_type(
-       enum atomisp_input_format input_format)
+    enum atomisp_input_format input_format)
 {
        enum inputfifo_mipi_data_type type;
 
        type = inputfifo_mipi_data_type_regular;
        if (input_format == ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) {
                type =
-                       inputfifo_mipi_data_type_yuv420_legacy;
+                   inputfifo_mipi_data_type_yuv420_legacy;
        } else if (input_format == ATOMISP_INPUT_FORMAT_YUV420_8  ||
                   input_format == ATOMISP_INPUT_FORMAT_YUV420_10 ||
                   input_format == ATOMISP_INPUT_FORMAT_YUV420_16) {
                type =
-                       inputfifo_mipi_data_type_yuv420;
+                   inputfifo_mipi_data_type_yuv420;
        } else if (input_format >= ATOMISP_INPUT_FORMAT_RGB_444 &&
                   input_format <= ATOMISP_INPUT_FORMAT_RGB_888) {
                type =
-                       inputfifo_mipi_data_type_rgb;
+                   inputfifo_mipi_data_type_rgb;
        }
        return type;
 }
 
 static struct inputfifo_instance *inputfifo_get_inst(
-       unsigned int ch_id)
+    unsigned int ch_id)
 {
        return &inputfifo_inst_admin[ch_id];
 }
 
 void ia_css_inputfifo_send_input_frame(
-       const unsigned short *data,
-       unsigned int width,
-       unsigned int height,
-       unsigned int ch_id,
-       enum atomisp_input_format input_format,
-       bool two_ppc)
+    const unsigned short *data,
+    unsigned int width,
+    unsigned int height,
+    unsigned int ch_id,
+    enum atomisp_input_format input_format,
+    bool two_ppc)
 {
        unsigned int fmt_type, hblank_cycles, marker_cycles;
        enum inputfifo_mipi_data_type type;
@@ -488,20 +488,20 @@ void ia_css_inputfifo_send_input_frame(
        hblank_cycles = HBLANK_CYCLES;
        marker_cycles = MARKER_CYCLES;
        ia_css_isys_convert_stream_format_to_mipi_format(input_format,
-                                MIPI_PREDICTOR_NONE,
-                                &fmt_type);
+               MIPI_PREDICTOR_NONE,
+               &fmt_type);
 
        type = inputfifo_determine_type(input_format);
 
        inputfifo_send_frame(data, width, height,
-                       ch_id, fmt_type, hblank_cycles, marker_cycles,
-                       two_ppc, type);
+                            ch_id, fmt_type, hblank_cycles, marker_cycles,
+                            two_ppc, type);
 }
 
 void ia_css_inputfifo_start_frame(
-       unsigned int ch_id,
-       enum atomisp_input_format input_format,
-       bool two_ppc)
+    unsigned int ch_id,
+    enum atomisp_input_format input_format,
+    bool two_ppc)
 {
        struct inputfifo_instance *s2mi;
 
@@ -509,8 +509,8 @@ void ia_css_inputfifo_start_frame(
 
        s2mi->ch_id = ch_id;
        ia_css_isys_convert_stream_format_to_mipi_format(input_format,
-                               MIPI_PREDICTOR_NONE,
-                               &s2mi->fmt_type);
+               MIPI_PREDICTOR_NONE,
+               &s2mi->fmt_type);
        s2mi->two_ppc = two_ppc;
        s2mi->type = inputfifo_determine_type(input_format);
        s2mi->hblank_cycles = HBLANK_CYCLES;
@@ -522,11 +522,11 @@ void ia_css_inputfifo_start_frame(
 }
 
 void ia_css_inputfifo_send_line(
-       unsigned int ch_id,
-       const unsigned short *data,
-       unsigned int width,
-       const unsigned short *data2,
-       unsigned int width2)
+    unsigned int ch_id,
+    const unsigned short *data,
+    unsigned int width,
+    const unsigned short *data2,
+    unsigned int width2)
 {
        struct inputfifo_instance *s2mi;
 
@@ -539,17 +539,17 @@ void ia_css_inputfifo_send_line(
        inputfifo_curr_fmt_type = (s2mi->fmt_type) & _HIVE_ISP_FMT_TYPE_MASK;
 
        inputfifo_send_line2(data, width, data2, width2,
-                                       s2mi->hblank_cycles,
-                                       s2mi->marker_cycles,
-                                       s2mi->two_ppc,
-                                       s2mi->type);
+                            s2mi->hblank_cycles,
+                            s2mi->marker_cycles,
+                            s2mi->two_ppc,
+                            s2mi->type);
 }
 
 void ia_css_inputfifo_send_embedded_line(
-       unsigned int    ch_id,
-       enum atomisp_input_format       data_type,
-       const unsigned short    *data,
-       unsigned int    width)
+    unsigned int       ch_id,
+    enum atomisp_input_format  data_type,
+    const unsigned short       *data,
+    unsigned int       width)
 {
        struct inputfifo_instance *s2mi;
        unsigned int fmt_type;
@@ -557,17 +557,17 @@ void ia_css_inputfifo_send_embedded_line(
        assert(data);
        s2mi = inputfifo_get_inst(ch_id);
        ia_css_isys_convert_stream_format_to_mipi_format(data_type,
-                       MIPI_PREDICTOR_NONE, &fmt_type);
+               MIPI_PREDICTOR_NONE, &fmt_type);
 
        /* Set format_type for metadata line. */
        inputfifo_curr_fmt_type = fmt_type & _HIVE_ISP_FMT_TYPE_MASK;
 
        inputfifo_send_line(data, width, s2mi->hblank_cycles, s2mi->marker_cycles,
-                       s2mi->two_ppc, inputfifo_mipi_data_type_regular);
+                           s2mi->two_ppc, inputfifo_mipi_data_type_regular);
 }
 
 void ia_css_inputfifo_end_frame(
-       unsigned int    ch_id)
+    unsigned int       ch_id)
 {
        struct inputfifo_instance *s2mi;
 
index 15e4b3bff6d3320cddab1d0c22db6c4dfd08fbbf..d32323866fd9e904926acb0c5a0516e8a82b8943 100644 (file)
@@ -37,82 +37,82 @@ more details.
 /* Set functions for parameter memory descriptors */
 void
 ia_css_isp_param_set_mem_init(
-       struct ia_css_isp_param_host_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem,
-       char *address, size_t size);
+    struct ia_css_isp_param_host_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem,
+    char *address, size_t size);
 
 void
 ia_css_isp_param_set_css_mem_init(
-       struct ia_css_isp_param_css_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem,
-       hrt_vaddress address, size_t size);
+    struct ia_css_isp_param_css_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem,
+    hrt_vaddress address, size_t size);
 
 void
 ia_css_isp_param_set_isp_mem_init(
-       struct ia_css_isp_param_isp_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem,
-       u32 address, size_t size);
+    struct ia_css_isp_param_isp_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem,
+    u32 address, size_t size);
 
 /* Get functions for parameter memory descriptors */
-const struct ia_css_host_data*
+const struct ia_css_host_data *
 ia_css_isp_param_get_mem_init(
-       const struct ia_css_isp_param_host_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem);
+    const struct ia_css_isp_param_host_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem);
 
-const struct ia_css_data*
+const struct ia_css_data *
 ia_css_isp_param_get_css_mem_init(
-       const struct ia_css_isp_param_css_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem);
+    const struct ia_css_isp_param_css_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem);
 
-const struct ia_css_isp_data*
+const struct ia_css_isp_data *
 ia_css_isp_param_get_isp_mem_init(
-       const struct ia_css_isp_param_isp_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem);
+    const struct ia_css_isp_param_isp_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem);
 
 /* Initialize the memory interface sizes and addresses */
 void
 ia_css_init_memory_interface(
-       struct ia_css_isp_param_css_segments *isp_mem_if,
-       const struct ia_css_isp_param_host_segments *mem_params,
-       const struct ia_css_isp_param_css_segments *css_params);
+    struct ia_css_isp_param_css_segments *isp_mem_if,
+    const struct ia_css_isp_param_host_segments *mem_params,
+    const struct ia_css_isp_param_css_segments *css_params);
 
 /* Allocate memory parameters */
 enum ia_css_err
 ia_css_isp_param_allocate_isp_parameters(
-       struct ia_css_isp_param_host_segments *mem_params,
-       struct ia_css_isp_param_css_segments *css_params,
-       const struct ia_css_isp_param_isp_segments *mem_initializers);
+    struct ia_css_isp_param_host_segments *mem_params,
+    struct ia_css_isp_param_css_segments *css_params,
+    const struct ia_css_isp_param_isp_segments *mem_initializers);
 
 /* Destroy memory parameters */
 void
 ia_css_isp_param_destroy_isp_parameters(
-       struct ia_css_isp_param_host_segments *mem_params,
-       struct ia_css_isp_param_css_segments *css_params);
+    struct ia_css_isp_param_host_segments *mem_params,
+    struct ia_css_isp_param_css_segments *css_params);
 
 /* Load fw parameters */
 void
 ia_css_isp_param_load_fw_params(
-       const char *fw,
-       union ia_css_all_memory_offsets *mem_offsets,
-       const struct ia_css_isp_param_memory_offsets *memory_offsets,
-       bool init);
+    const char *fw,
+    union ia_css_all_memory_offsets *mem_offsets,
+    const struct ia_css_isp_param_memory_offsets *memory_offsets,
+    bool init);
 
 /* Copy host parameter images to ddr */
 enum ia_css_err
 ia_css_isp_param_copy_isp_mem_if_to_ddr(
-       struct ia_css_isp_param_css_segments *ddr,
-       const struct ia_css_isp_param_host_segments *host,
-       enum ia_css_param_class pclass);
+    struct ia_css_isp_param_css_segments *ddr,
+    const struct ia_css_isp_param_host_segments *host,
+    enum ia_css_param_class pclass);
 
 /* Enable a pipeline by setting the control field in the isp dmem parameters */
 void
 ia_css_isp_param_enable_pipeline(
-       const struct ia_css_isp_param_host_segments *mem_params);
+    const struct ia_css_isp_param_host_segments *mem_params);
 
 #endif /* _IA_CSS_ISP_PARAM_H_ */
index a0b4387582980bc38cabf6c932f09f0bc033b9b6..cab82a9698b2acf8e9c849acb925d4fe8f58220f 100644 (file)
@@ -36,10 +36,10 @@ more details.
 
 void
 ia_css_isp_param_set_mem_init(
-       struct ia_css_isp_param_host_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem,
-       char *address, size_t size)
+    struct ia_css_isp_param_host_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem,
+    char *address, size_t size)
 {
        mem_init->params[pclass][mem].address = address;
        mem_init->params[pclass][mem].size = (uint32_t)size;
@@ -47,10 +47,10 @@ ia_css_isp_param_set_mem_init(
 
 void
 ia_css_isp_param_set_css_mem_init(
-       struct ia_css_isp_param_css_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem,
-       hrt_vaddress address, size_t size)
+    struct ia_css_isp_param_css_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem,
+    hrt_vaddress address, size_t size)
 {
        mem_init->params[pclass][mem].address = address;
        mem_init->params[pclass][mem].size = (uint32_t)size;
@@ -58,48 +58,48 @@ ia_css_isp_param_set_css_mem_init(
 
 void
 ia_css_isp_param_set_isp_mem_init(
-       struct ia_css_isp_param_isp_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem,
-       u32 address, size_t size)
+    struct ia_css_isp_param_isp_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem,
+    u32 address, size_t size)
 {
        mem_init->params[pclass][mem].address = address;
        mem_init->params[pclass][mem].size = (uint32_t)size;
 }
 
 /* Get functions for parameter memory descriptors */
-const struct ia_css_host_data*
+const struct ia_css_host_data *
 ia_css_isp_param_get_mem_init(
-       const struct ia_css_isp_param_host_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem)
+    const struct ia_css_isp_param_host_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem)
 {
        return &mem_init->params[pclass][mem];
 }
 
-const struct ia_css_data*
+const struct ia_css_data *
 ia_css_isp_param_get_css_mem_init(
-       const struct ia_css_isp_param_css_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem)
+    const struct ia_css_isp_param_css_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem)
 {
        return &mem_init->params[pclass][mem];
 }
 
-const struct ia_css_isp_data*
+const struct ia_css_isp_data *
 ia_css_isp_param_get_isp_mem_init(
-       const struct ia_css_isp_param_isp_segments *mem_init,
-       enum ia_css_param_class pclass,
-       enum ia_css_isp_memories mem)
+    const struct ia_css_isp_param_isp_segments *mem_init,
+    enum ia_css_param_class pclass,
+    enum ia_css_isp_memories mem)
 {
        return &mem_init->params[pclass][mem];
 }
 
 void
 ia_css_init_memory_interface(
-       struct ia_css_isp_param_css_segments *isp_mem_if,
-       const struct ia_css_isp_param_host_segments *mem_params,
-       const struct ia_css_isp_param_css_segments *css_params)
+    struct ia_css_isp_param_css_segments *isp_mem_if,
+    const struct ia_css_isp_param_host_segments *mem_params,
+    const struct ia_css_isp_param_css_segments *css_params)
 {
        unsigned int pclass, mem;
 
@@ -110,22 +110,23 @@ ia_css_init_memory_interface(
                                continue;
                        isp_mem_if->params[pclass][mem].size = mem_params->params[pclass][mem].size;
                        if (pclass != IA_CSS_PARAM_CLASS_PARAM)
-                               isp_mem_if->params[pclass][mem].address = css_params->params[pclass][mem].address;
+                               isp_mem_if->params[pclass][mem].address =
+                                   css_params->params[pclass][mem].address;
                }
        }
 }
 
 enum ia_css_err
 ia_css_isp_param_allocate_isp_parameters(
-       struct ia_css_isp_param_host_segments *mem_params,
-       struct ia_css_isp_param_css_segments *css_params,
-       const struct ia_css_isp_param_isp_segments *mem_initializers)
-{
+    struct ia_css_isp_param_host_segments *mem_params,
+    struct ia_css_isp_param_css_segments *css_params,
+    const struct ia_css_isp_param_isp_segments *mem_initializers) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        unsigned int mem, pclass;
 
        pclass = IA_CSS_PARAM_CLASS_PARAM;
-       for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) {
+       for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++)
+       {
                for (pclass = 0; pclass < IA_CSS_NUM_PARAM_CLASSES; pclass++) {
                        u32 size = 0;
 
@@ -159,8 +160,8 @@ cleanup:
 
 void
 ia_css_isp_param_destroy_isp_parameters(
-       struct ia_css_isp_param_host_segments *mem_params,
-       struct ia_css_isp_param_css_segments *css_params)
+    struct ia_css_isp_param_host_segments *mem_params,
+    struct ia_css_isp_param_css_segments *css_params)
 {
        unsigned int mem, pclass;
 
@@ -178,10 +179,10 @@ ia_css_isp_param_destroy_isp_parameters(
 
 void
 ia_css_isp_param_load_fw_params(
-       const char *fw,
-       union ia_css_all_memory_offsets *mem_offsets,
-       const struct ia_css_isp_param_memory_offsets *memory_offsets,
-       bool init)
+    const char *fw,
+    union ia_css_all_memory_offsets *mem_offsets,
+    const struct ia_css_isp_param_memory_offsets *memory_offsets,
+    bool init)
 {
        unsigned int pclass;
 
@@ -194,13 +195,13 @@ ia_css_isp_param_load_fw_params(
 
 enum ia_css_err
 ia_css_isp_param_copy_isp_mem_if_to_ddr(
-       struct ia_css_isp_param_css_segments *ddr,
-       const struct ia_css_isp_param_host_segments *host,
-       enum ia_css_param_class pclass)
-{
+    struct ia_css_isp_param_css_segments *ddr,
+    const struct ia_css_isp_param_host_segments *host,
+    enum ia_css_param_class pclass) {
        unsigned int mem;
 
-       for (mem = 0; mem < N_IA_CSS_ISP_MEMORIES; mem++) {
+       for (mem = 0; mem < N_IA_CSS_ISP_MEMORIES; mem++)
+       {
                size_t       size         = host->params[pclass][mem].size;
                hrt_vaddress ddr_mem_ptr  = ddr->params[pclass][mem].address;
                char        *host_mem_ptr = host->params[pclass][mem].address;
@@ -216,7 +217,7 @@ ia_css_isp_param_copy_isp_mem_if_to_ddr(
 
 void
 ia_css_isp_param_enable_pipeline(
-       const struct ia_css_isp_param_host_segments *mem_params)
+    const struct ia_css_isp_param_host_segments *mem_params)
 {
        /* By protocol b0 of the mandatory uint32_t first field of the
           input parameter is a disable bit*/
@@ -225,5 +226,7 @@ ia_css_isp_param_enable_pipeline(
        if (mem_params->params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM0].size == 0)
                return;
 
-       *(uint32_t *)&mem_params->params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM0].address[dmem_offset] = 0x0;
+       *(uint32_t *)
+       &mem_params->params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM0].address[dmem_offset]
+           = 0x0;
 }
index 9207a48856dffd21eac9d7e98cf7f41cc9dff310..8387dbfb90254ca0817960f453c1c2980ef262d9 100644 (file)
@@ -51,7 +51,7 @@ typedef input_system_cfg_t    ia_css_isys_descr_t;
 input_system_error_t ia_css_isys_init(void);
 void ia_css_isys_uninit(void);
 enum mipi_port_id ia_css_isys_port_to_mipi_port(
-       enum mipi_port_id api_port);
+    enum mipi_port_id api_port);
 #endif
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
@@ -68,8 +68,8 @@ enum mipi_port_id ia_css_isys_port_to_mipi_port(
  *                             there is already a stream registered with the same handle
  */
 enum ia_css_err ia_css_isys_csi_rx_register_stream(
-       enum mipi_port_id port,
-       uint32_t isys_stream_id);
+    enum mipi_port_id port,
+    uint32_t isys_stream_id);
 
 /**
  * @brief Unregister one (virtual) stream. This is used to track when all
@@ -83,21 +83,21 @@ enum ia_css_err ia_css_isys_csi_rx_register_stream(
  *                             there is no stream registered with that handle
  */
 enum ia_css_err ia_css_isys_csi_rx_unregister_stream(
-       enum mipi_port_id port,
-       uint32_t isys_stream_id);
+    enum mipi_port_id port,
+    uint32_t isys_stream_id);
 
 enum ia_css_err ia_css_isys_convert_compressed_format(
-               struct ia_css_csi2_compression *comp,
-               struct input_system_cfg_s *cfg);
+    struct ia_css_csi2_compression *comp,
+    struct input_system_cfg_s *cfg);
 unsigned int ia_css_csi2_calculate_input_system_alignment(
-       enum atomisp_input_format fmt_type);
+    enum atomisp_input_format fmt_type);
 #endif
 
 #if !defined(USE_INPUT_SYSTEM_VERSION_2401)
 /* CSS Receiver */
 void ia_css_isys_rx_configure(
-       const rx_cfg_t *config,
-       const enum ia_css_input_mode input_mode);
+    const rx_cfg_t *config,
+    const enum ia_css_input_mode input_mode);
 
 void ia_css_isys_rx_disable(void);
 
@@ -124,75 +124,75 @@ unsigned int ia_css_isys_rx_translate_irq_infos(unsigned int bits);
  * format type must be sumitted correctly by the application.
  */
 enum ia_css_err ia_css_isys_convert_stream_format_to_mipi_format(
-               enum atomisp_input_format input_format,
-               mipi_predictor_t compression,
-               unsigned int *fmt_type);
+    enum atomisp_input_format input_format,
+    mipi_predictor_t compression,
+    unsigned int *fmt_type);
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
 /**
  * Virtual Input System. (Input System 2401)
  */
 ia_css_isys_error_t ia_css_isys_stream_create(
-               ia_css_isys_descr_t     *isys_stream_descr,
-               ia_css_isys_stream_h    isys_stream,
-               uint32_t isys_stream_id);
+    ia_css_isys_descr_t        *isys_stream_descr,
+    ia_css_isys_stream_h       isys_stream,
+    uint32_t isys_stream_id);
 
 void ia_css_isys_stream_destroy(
-               ia_css_isys_stream_h    isys_stream);
+    ia_css_isys_stream_h       isys_stream);
 
 ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
-               ia_css_isys_stream_h            isys_stream,
-               ia_css_isys_descr_t             *isys_stream_descr,
-               ia_css_isys_stream_cfg_t        *isys_stream_cfg);
+    ia_css_isys_stream_h               isys_stream,
+    ia_css_isys_descr_t                *isys_stream_descr,
+    ia_css_isys_stream_cfg_t   *isys_stream_cfg);
 
 void ia_css_isys_csi_rx_lut_rmgr_init(void);
 
 void ia_css_isys_csi_rx_lut_rmgr_uninit(void);
 
 bool ia_css_isys_csi_rx_lut_rmgr_acquire(
-       csi_rx_backend_ID_t             backend,
-       csi_mipi_packet_type_t          packet_type,
-       csi_rx_backend_lut_entry_t      *entry);
+    csi_rx_backend_ID_t                backend,
+    csi_mipi_packet_type_t             packet_type,
+    csi_rx_backend_lut_entry_t *entry);
 
 void ia_css_isys_csi_rx_lut_rmgr_release(
-       csi_rx_backend_ID_t             backend,
-       csi_mipi_packet_type_t          packet_type,
-       csi_rx_backend_lut_entry_t      *entry);
+    csi_rx_backend_ID_t                backend,
+    csi_mipi_packet_type_t             packet_type,
+    csi_rx_backend_lut_entry_t *entry);
 
 void ia_css_isys_ibuf_rmgr_init(void);
 
 void ia_css_isys_ibuf_rmgr_uninit(void);
 
 bool ia_css_isys_ibuf_rmgr_acquire(
-       u32     size,
-       uint32_t        *start_addr);
+    u32        size,
+    uint32_t   *start_addr);
 
 void ia_css_isys_ibuf_rmgr_release(
-       uint32_t        *start_addr);
+    uint32_t   *start_addr);
 
 void ia_css_isys_dma_channel_rmgr_init(void);
 
 void ia_css_isys_dma_channel_rmgr_uninit(void);
 
 bool ia_css_isys_dma_channel_rmgr_acquire(
-       isys2401_dma_ID_t       dma_id,
-       isys2401_dma_channel    *channel);
+    isys2401_dma_ID_t  dma_id,
+    isys2401_dma_channel       *channel);
 
 void ia_css_isys_dma_channel_rmgr_release(
-       isys2401_dma_ID_t       dma_id,
-       isys2401_dma_channel    *channel);
+    isys2401_dma_ID_t  dma_id,
+    isys2401_dma_channel       *channel);
 
 void ia_css_isys_stream2mmio_sid_rmgr_init(void);
 
 void ia_css_isys_stream2mmio_sid_rmgr_uninit(void);
 
 bool ia_css_isys_stream2mmio_sid_rmgr_acquire(
-       stream2mmio_ID_t        stream2mmio,
-       stream2mmio_sid_ID_t    *sid);
+    stream2mmio_ID_t   stream2mmio,
+    stream2mmio_sid_ID_t       *sid);
 
 void ia_css_isys_stream2mmio_sid_rmgr_release(
-       stream2mmio_ID_t        stream2mmio,
-       stream2mmio_sid_ID_t    *sid);
+    stream2mmio_ID_t   stream2mmio,
+    stream2mmio_sid_ID_t       *sid);
 
 /* end of Virtual Input System */
 #endif
index 71d1b66e954bde3e6ebdec0547915243f9485024..451b0dc6a3a33b28a7db520e5b41a40e3e44b053 100644 (file)
@@ -59,8 +59,8 @@ typedef virtual_input_system_stream_cfg_t     ia_css_isys_stream_cfg_t;
 typedef bool ia_css_isys_error_t;
 
 static inline uint32_t ia_css_isys_generate_stream_id(
-       u32     sp_thread_id,
-       uint32_t        stream_id)
+    u32        sp_thread_id,
+    uint32_t   stream_id)
 {
        return sp_thread_id * IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH + stream_id;
 }
index f15c805a519308ae2faeefd9a3ad60e42ff8657b..06557c16071f4bd354a6b7e878bd6089150e417c 100644 (file)
@@ -55,9 +55,9 @@ void ia_css_isys_csi_rx_lut_rmgr_uninit(void)
 }
 
 bool ia_css_isys_csi_rx_lut_rmgr_acquire(
-       csi_rx_backend_ID_t             backend,
-       csi_mipi_packet_type_t          packet_type,
-       csi_rx_backend_lut_entry_t      *entry)
+    csi_rx_backend_ID_t                backend,
+    csi_mipi_packet_type_t             packet_type,
+    csi_rx_backend_lut_entry_t *entry)
 {
        bool retval = false;
        u32 max_num_packets_of_type;
@@ -66,7 +66,8 @@ bool ia_css_isys_csi_rx_lut_rmgr_acquire(
        u16 i;
 
        assert(backend < N_CSI_RX_BACKEND_ID);
-       assert((packet_type == CSI_MIPI_PACKET_TYPE_LONG) || (packet_type == CSI_MIPI_PACKET_TYPE_SHORT));
+       assert((packet_type == CSI_MIPI_PACKET_TYPE_LONG) ||
+              (packet_type == CSI_MIPI_PACKET_TYPE_SHORT));
        assert(entry);
 
        if ((backend < N_CSI_RX_BACKEND_ID) && (entry)) {
@@ -104,9 +105,9 @@ bool ia_css_isys_csi_rx_lut_rmgr_acquire(
 }
 
 void ia_css_isys_csi_rx_lut_rmgr_release(
-       csi_rx_backend_ID_t             backend,
-       csi_mipi_packet_type_t          packet_type,
-       csi_rx_backend_lut_entry_t      *entry)
+    csi_rx_backend_ID_t                backend,
+    csi_mipi_packet_type_t             packet_type,
+    csi_rx_backend_lut_entry_t *entry)
 {
        u32 max_num_packets;
        isys_csi_rx_rsrc_t *cur_rsrc = NULL;
@@ -114,7 +115,8 @@ void ia_css_isys_csi_rx_lut_rmgr_release(
 
        assert(backend < N_CSI_RX_BACKEND_ID);
        assert(entry);
-       assert((packet_type >= CSI_MIPI_PACKET_TYPE_LONG) || (packet_type <= CSI_MIPI_PACKET_TYPE_SHORT));
+       assert((packet_type >= CSI_MIPI_PACKET_TYPE_LONG) ||
+              (packet_type <= CSI_MIPI_PACKET_TYPE_SHORT));
 
        if ((backend < N_CSI_RX_BACKEND_ID) && (entry)) {
                if (packet_type == CSI_MIPI_PACKET_TYPE_LONG) {
@@ -141,8 +143,8 @@ void ia_css_isys_csi_rx_lut_rmgr_release(
 }
 
 enum ia_css_err ia_css_isys_csi_rx_register_stream(
-       enum mipi_port_id port,
-       uint32_t isys_stream_id)
+    enum mipi_port_id port,
+    uint32_t isys_stream_id)
 {
        enum ia_css_err retval = IA_CSS_ERR_INTERNAL_ERROR;
 
@@ -161,8 +163,8 @@ enum ia_css_err ia_css_isys_csi_rx_register_stream(
 }
 
 enum ia_css_err ia_css_isys_csi_rx_unregister_stream(
-       enum mipi_port_id port,
-       uint32_t isys_stream_id)
+    enum mipi_port_id port,
+    uint32_t isys_stream_id)
 {
        enum ia_css_err retval = IA_CSS_ERR_INTERNAL_ERROR;
 
index faa14ed630808a4147aa2b71b66f9f99619aa27a..72804774ea23c3182a0fbd5d1f74b9f27c16524e 100644 (file)
@@ -61,8 +61,8 @@ void ia_css_isys_ibuf_rmgr_uninit(void)
 }
 
 bool ia_css_isys_ibuf_rmgr_acquire(
-       u32     size,
-       uint32_t        *start_addr)
+    u32        size,
+    uint32_t   *start_addr)
 {
        bool retval = false;
        bool input_buffer_found = false;
@@ -121,7 +121,7 @@ bool ia_css_isys_ibuf_rmgr_acquire(
 }
 
 void ia_css_isys_ibuf_rmgr_release(
-       uint32_t        *start_addr)
+    uint32_t   *start_addr)
 {
        u16 i;
        ibuf_handle_t *handle = NULL;
index 425b317699f39112fc11a1cbb27e4b15a8783af2..8ce21091c81d940d9adfe95a11ec45b7e514b23d 100644 (file)
@@ -51,8 +51,8 @@ void ia_css_isys_dma_channel_rmgr_uninit(void)
 }
 
 bool ia_css_isys_dma_channel_rmgr_acquire(
-       isys2401_dma_ID_t       dma_id,
-       isys2401_dma_channel    *channel)
+    isys2401_dma_ID_t  dma_id,
+    isys2401_dma_channel       *channel)
 {
        bool retval = false;
        isys2401_dma_channel    i;
@@ -81,8 +81,8 @@ bool ia_css_isys_dma_channel_rmgr_acquire(
 }
 
 void ia_css_isys_dma_channel_rmgr_release(
-       isys2401_dma_ID_t       dma_id,
-       isys2401_dma_channel    *channel)
+    isys2401_dma_ID_t  dma_id,
+    isys2401_dma_channel       *channel)
 {
        isys2401_dma_channel    max_dma_channel;
        isys_dma_rsrc_t         *cur_rsrc = NULL;
index 0397f79edfef5e6e803d7f5de721711534bc9ba2..5e7565cdf871b445d1a705fb293c1480f9ee7e75 100644 (file)
@@ -60,41 +60,41 @@ input_system_error_t ia_css_isys_init(void)
                return error;
 
        error = input_system_csi_xmem_channel_cfg(
-                       0,                      /*ch_id                 */
-                       INPUT_SYSTEM_PORT_A,    /*port                  */
-                       backend_ch0,            /*backend_ch            */
-                       32,                     /*mem_region_size       */
-                       6,                      /*nof_mem_regions       */
-                       acq_mem_region_size,    /*acq_mem_region_size   */
-                       acq_nof_mem_regions,    /*acq_nof_mem_regions   */
-                       targetB,                /*target                */
-                       3);                     /*nof_xmem_buffers      */
+                   0,                  /*ch_id                 */
+                   INPUT_SYSTEM_PORT_A,        /*port                  */
+                   backend_ch0,                /*backend_ch            */
+                   32,                 /*mem_region_size       */
+                   6,                  /*nof_mem_regions       */
+                   acq_mem_region_size,        /*acq_mem_region_size   */
+                   acq_nof_mem_regions,        /*acq_nof_mem_regions   */
+                   targetB,            /*target                */
+                   3);                 /*nof_xmem_buffers      */
        if (error != INPUT_SYSTEM_ERR_NO_ERROR)
                return error;
 
        error = input_system_csi_xmem_channel_cfg(
-                       1,                      /*ch_id                 */
-                       INPUT_SYSTEM_PORT_B,    /*port                  */
-                       backend_ch0,            /*backend_ch            */
-                       16,                     /*mem_region_size       */
-                       3,                      /*nof_mem_regions       */
-                       acq_mem_region_size,    /*acq_mem_region_size   */
-                       acq_nof_mem_regions,    /*acq_nof_mem_regions   */
-                       targetB,                /*target                */
-                       3);                     /*nof_xmem_buffers      */
+                   1,                  /*ch_id                 */
+                   INPUT_SYSTEM_PORT_B,        /*port                  */
+                   backend_ch0,                /*backend_ch            */
+                   16,                 /*mem_region_size       */
+                   3,                  /*nof_mem_regions       */
+                   acq_mem_region_size,        /*acq_mem_region_size   */
+                   acq_nof_mem_regions,        /*acq_nof_mem_regions   */
+                   targetB,            /*target                */
+                   3);                 /*nof_xmem_buffers      */
        if (error != INPUT_SYSTEM_ERR_NO_ERROR)
                return error;
 
        error = input_system_csi_xmem_channel_cfg(
-                       2,                      /*ch_id                 */
-                       INPUT_SYSTEM_PORT_C,    /*port                  */
-                       backend_ch1,            /*backend_ch            */
-                       32,                     /*mem_region_size       */
-                       3,                      /*nof_mem_regions       */
-                       acq_mem_region_size,    /*acq_mem_region_size   */
-                       acq_nof_mem_regions,    /*acq_nof_mem_regions   */
-                       targetC,                /*target                */
-                       2);                     /*nof_xmem_buffers      */
+                   2,                  /*ch_id                 */
+                   INPUT_SYSTEM_PORT_C,        /*port                  */
+                   backend_ch1,                /*backend_ch            */
+                   32,                 /*mem_region_size       */
+                   3,                  /*nof_mem_regions       */
+                   acq_mem_region_size,        /*acq_mem_region_size   */
+                   acq_nof_mem_regions,        /*acq_nof_mem_regions   */
+                   targetC,            /*target                */
+                   2);                 /*nof_xmem_buffers      */
        if (error != INPUT_SYSTEM_ERR_NO_ERROR)
                return error;
 
@@ -111,7 +111,7 @@ input_system_error_t ia_css_isys_init(void)
        ia_css_isys_stream2mmio_sid_rmgr_init();
 
        isys2401_dma_set_max_burst_size(ISYS2401_DMA0_ID,
-               1 /* Non Burst DMA transactions */);
+                                       1 /* Non Burst DMA transactions */);
 
        /* Enable 2401 input system IRQ status for driver to retrieve */
        isys_irqc_status_enable(ISYS_IRQ0_ID);
index 3c2345f1156e47467daa7e33a6615b804512aca2..44b9bb84981c530b0866988548e9024cc5f45155 100644 (file)
@@ -51,8 +51,8 @@ void ia_css_isys_stream2mmio_sid_rmgr_uninit(void)
 }
 
 bool ia_css_isys_stream2mmio_sid_rmgr_acquire(
-       stream2mmio_ID_t        stream2mmio,
-       stream2mmio_sid_ID_t    *sid)
+    stream2mmio_ID_t   stream2mmio,
+    stream2mmio_sid_ID_t       *sid)
 {
        bool retval = false;
        stream2mmio_sid_ID_t max_sid;
@@ -82,8 +82,8 @@ bool ia_css_isys_stream2mmio_sid_rmgr_acquire(
 }
 
 void ia_css_isys_stream2mmio_sid_rmgr_release(
-       stream2mmio_ID_t        stream2mmio,
-       stream2mmio_sid_ID_t    *sid)
+    stream2mmio_ID_t   stream2mmio,
+    stream2mmio_sid_ID_t       *sid)
 {
        stream2mmio_sid_ID_t max_sid;
        isys_stream2mmio_rsrc_t *cur_rsrc = NULL;
index 12682d3f907c3e49c8967973f8f2f829fb036c40..cf0a6866e25a1e4de1ee56ab2a960532c9117363 100644 (file)
@@ -39,27 +39,27 @@ more details.
 void ia_css_isys_rx_enable_all_interrupts(enum mipi_port_id port)
 {
        hrt_data bits = receiver_port_reg_load(RX0_ID,
-                               port,
-                               _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
+                                              port,
+                                              _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
 
        bits |= (1U << _HRT_CSS_RECEIVER_IRQ_OVERRUN_BIT) |
 #if defined(HAS_RX_VERSION_2)
-           (1U << _HRT_CSS_RECEIVER_IRQ_INIT_TIMEOUT_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_INIT_TIMEOUT_BIT) |
 #endif
-           (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_ENTRY_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_EXIT_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_HS_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_SYNC_HS_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_ERR_CONTROL_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_DOUBLE_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_CORRECTED_BIT) |
-           /*(1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_NO_CORRECTION_BIT) | */
-           (1U << _HRT_CSS_RECEIVER_IRQ_ERR_CRC_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ID_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_ERR_FRAME_SYNC_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_ERR_FRAME_DATA_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_DATA_TIMEOUT_BIT) |
-           (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ESCAPE_BIT);
+               (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_ENTRY_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_EXIT_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_HS_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_SYNC_HS_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_ERR_CONTROL_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_DOUBLE_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_CORRECTED_BIT) |
+               /*(1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_NO_CORRECTION_BIT) | */
+               (1U << _HRT_CSS_RECEIVER_IRQ_ERR_CRC_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ID_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_ERR_FRAME_SYNC_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_ERR_FRAME_DATA_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_DATA_TIMEOUT_BIT) |
+               (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ESCAPE_BIT);
        /*(1U << _HRT_CSS_RECEIVER_IRQ_ERR_LINE_SYNC_BIT); */
 
        receiver_port_reg_store(RX0_ID,
@@ -173,18 +173,20 @@ void ia_css_rx_clear_irq_info(unsigned int irq_infos)
        ia_css_rx_port_clear_irq_info(MIPI_PORT1_ID, irq_infos);
 }
 
-void ia_css_rx_port_clear_irq_info(enum mipi_port_id api_port, unsigned int irq_infos)
+void ia_css_rx_port_clear_irq_info(enum mipi_port_id api_port,
+                                  unsigned int irq_infos)
 {
        enum mipi_port_id port = ia_css_isys_port_to_mipi_port(api_port);
 
        ia_css_isys_rx_clear_irq_info(port, irq_infos);
 }
 
-void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port, unsigned int irq_infos)
+void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port,
+                                  unsigned int irq_infos)
 {
        hrt_data bits = receiver_port_reg_load(RX0_ID,
-                               port,
-                               _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
+                                              port,
+                                              _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
 
        /* MW: Why do we remap the receiver bitmap */
        if (irq_infos & IA_CSS_RX_IRQ_INFO_BUFFER_OVERRUN)
@@ -231,9 +233,9 @@ void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port, unsigned int irq_info
 #endif /* #if !defined(USE_INPUT_SYSTEM_VERSION_2401) */
 
 enum ia_css_err ia_css_isys_convert_stream_format_to_mipi_format(
-               enum atomisp_input_format input_format,
-               mipi_predictor_t compression,
-               unsigned int *fmt_type)
+    enum atomisp_input_format input_format,
+    mipi_predictor_t compression,
+    unsigned int *fmt_type)
 {
        assert(fmt_type);
        /*
@@ -376,7 +378,8 @@ enum ia_css_err ia_css_isys_convert_stream_format_to_mipi_format(
 }
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
-static mipi_predictor_t sh_css_csi2_compression_type_2_mipi_predictor(enum ia_css_csi2_compression_type type)
+static mipi_predictor_t sh_css_csi2_compression_type_2_mipi_predictor(
+    enum ia_css_csi2_compression_type type)
 {
        mipi_predictor_t predictor = MIPI_PREDICTOR_NONE;
 
@@ -393,8 +396,8 @@ static mipi_predictor_t sh_css_csi2_compression_type_2_mipi_predictor(enum ia_cs
 }
 
 enum ia_css_err ia_css_isys_convert_compressed_format(
-               struct ia_css_csi2_compression *comp,
-               struct input_system_cfg_s *cfg)
+    struct ia_css_csi2_compression *comp,
+    struct input_system_cfg_s *cfg)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
@@ -429,7 +432,8 @@ enum ia_css_err ia_css_isys_convert_compressed_format(
                        default:
                                err = IA_CSS_ERR_INVALID_ARGUMENTS;
                        }
-               } else if (comp->uncompressed_bits_per_pixel == UNCOMPRESSED_BITS_PER_PIXEL_12) {
+               } else if (comp->uncompressed_bits_per_pixel ==
+                          UNCOMPRESSED_BITS_PER_PIXEL_12) {
                        switch (comp->compressed_bits_per_pixel) {
                        case COMPRESSED_BITS_PER_PIXEL_6:
                                cfg->csi_port_attr.comp_scheme = MIPI_COMPRESSOR_12_6_12;
@@ -445,7 +449,8 @@ enum ia_css_err ia_css_isys_convert_compressed_format(
                        }
                } else
                        err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               cfg->csi_port_attr.comp_predictor = sh_css_csi2_compression_type_2_mipi_predictor(comp->type);
+               cfg->csi_port_attr.comp_predictor =
+                   sh_css_csi2_compression_type_2_mipi_predictor(comp->type);
                cfg->csi_port_attr.comp_enable = true;
        } else /* No compression */
                cfg->csi_port_attr.comp_enable = false;
@@ -453,7 +458,7 @@ enum ia_css_err ia_css_isys_convert_compressed_format(
 }
 
 unsigned int ia_css_csi2_calculate_input_system_alignment(
-       enum atomisp_input_format fmt_type)
+    enum atomisp_input_format fmt_type)
 {
        unsigned int memory_alignment_in_bytes = HIVE_ISP_DDR_WORD_BYTES;
 
@@ -500,8 +505,8 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config,
        enum mipi_port_id port;
 
        if ((!config)
-               || (config->mode >= N_RX_MODE)
-               || (config->port >= N_MIPI_PORT_ID)) {
+           || (config->mode >= N_RX_MODE)
+           || (config->port >= N_MIPI_PORT_ID)) {
                assert(0);
                return;
        }
@@ -520,17 +525,17 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config,
        /* AM: Check whether this is a problem with multiple streams. */
        if (MIPI_PORT_LANES[config->mode][port] != MIPI_0LANE_CFG) {
                receiver_port_reg_store(RX0_ID, port,
-                               _HRT_CSS_RECEIVER_FUNC_PROG_REG_IDX,
-                               config->timeout);
+                                       _HRT_CSS_RECEIVER_FUNC_PROG_REG_IDX,
+                                       config->timeout);
                receiver_port_reg_store(RX0_ID, port,
-                               _HRT_CSS_RECEIVER_2400_INIT_COUNT_REG_IDX,
-                               config->initcount);
+                                       _HRT_CSS_RECEIVER_2400_INIT_COUNT_REG_IDX,
+                                       config->initcount);
                receiver_port_reg_store(RX0_ID, port,
-                               _HRT_CSS_RECEIVER_2400_SYNC_COUNT_REG_IDX,
-                               config->synccount);
+                                       _HRT_CSS_RECEIVER_2400_SYNC_COUNT_REG_IDX,
+                                       config->synccount);
                receiver_port_reg_store(RX0_ID, port,
-                               _HRT_CSS_RECEIVER_2400_RX_COUNT_REG_IDX,
-                               config->rxcount);
+                                       _HRT_CSS_RECEIVER_2400_RX_COUNT_REG_IDX,
+                                       config->rxcount);
 
                port_enabled[port] = true;
 
@@ -538,29 +543,29 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config,
                        /* MW: A bit of a hack, straight wiring of the capture
                         * units,assuming they are linearly enumerated. */
                        input_system_sub_system_reg_store(INPUT_SYSTEM0_ID,
-                                       GPREGS_UNIT0_ID,
-                                       HIVE_ISYS_GPREG_MULTICAST_A_IDX
-                                               + (unsigned int)port,
-                                       INPUT_SYSTEM_CSI_BACKEND);
+                                                         GPREGS_UNIT0_ID,
+                                                         HIVE_ISYS_GPREG_MULTICAST_A_IDX
+                                                         + (unsigned int)port,
+                                                         INPUT_SYSTEM_CSI_BACKEND);
                        /* MW: Like the integration test example we overwite,
                         * the GPREG_MUX register */
                        input_system_sub_system_reg_store(INPUT_SYSTEM0_ID,
-                                       GPREGS_UNIT0_ID,
-                                       HIVE_ISYS_GPREG_MUX_IDX,
-                                       (input_system_multiplex_t)port);
+                                                         GPREGS_UNIT0_ID,
+                                                         HIVE_ISYS_GPREG_MUX_IDX,
+                                                         (input_system_multiplex_t)port);
                } else {
                        /*
                         * AM: A bit of a hack, wiring the input system.
                         */
                        input_system_sub_system_reg_store(INPUT_SYSTEM0_ID,
-                                       GPREGS_UNIT0_ID,
-                                       HIVE_ISYS_GPREG_MULTICAST_A_IDX
-                                               + (unsigned int)port,
-                                       INPUT_SYSTEM_INPUT_BUFFER);
+                                                         GPREGS_UNIT0_ID,
+                                                         HIVE_ISYS_GPREG_MULTICAST_A_IDX
+                                                         + (unsigned int)port,
+                                                         INPUT_SYSTEM_INPUT_BUFFER);
                        input_system_sub_system_reg_store(INPUT_SYSTEM0_ID,
-                                       GPREGS_UNIT0_ID,
-                                       HIVE_ISYS_GPREG_MUX_IDX,
-                                       INPUT_SYSTEM_ACQUISITION_UNIT);
+                                                         GPREGS_UNIT0_ID,
+                                                         HIVE_ISYS_GPREG_MUX_IDX,
+                                                         INPUT_SYSTEM_ACQUISITION_UNIT);
                }
        }
        /*
index c47e14d8bcad07c3357314385089c6c9d8757b9b..ceef7d0482327c2f4396cc14e57459bc96139bb6 100644 (file)
@@ -49,122 +49,122 @@ more details.
 
 #endif
 static bool create_input_system_channel(
-       input_system_cfg_t      *cfg,
-       bool                    metadata,
-       input_system_channel_t  *channel);
+    input_system_cfg_t *cfg,
+    bool                       metadata,
+    input_system_channel_t     *channel);
 
 static void destroy_input_system_channel(
-       input_system_channel_t  *channel);
+    input_system_channel_t     *channel);
 
 static bool create_input_system_input_port(
-       input_system_cfg_t              *cfg,
-       input_system_input_port_t       *input_port);
+    input_system_cfg_t         *cfg,
+    input_system_input_port_t  *input_port);
 
 static void destroy_input_system_input_port(
-       input_system_input_port_t       *input_port);
+    input_system_input_port_t  *input_port);
 
 static bool calculate_input_system_channel_cfg(
-       input_system_channel_t          *channel,
-       input_system_input_port_t       *input_port,
-       input_system_cfg_t              *isys_cfg,
-       input_system_channel_cfg_t      *channel_cfg,
-       bool metadata);
+    input_system_channel_t             *channel,
+    input_system_input_port_t  *input_port,
+    input_system_cfg_t         *isys_cfg,
+    input_system_channel_cfg_t *channel_cfg,
+    bool metadata);
 
 static bool calculate_input_system_input_port_cfg(
-       input_system_channel_t          *channel,
-       input_system_input_port_t       *input_port,
-       input_system_cfg_t              *isys_cfg,
-       input_system_input_port_cfg_t   *input_port_cfg);
+    input_system_channel_t             *channel,
+    input_system_input_port_t  *input_port,
+    input_system_cfg_t         *isys_cfg,
+    input_system_input_port_cfg_t      *input_port_cfg);
 
 static bool acquire_sid(
-       stream2mmio_ID_t        stream2mmio,
-       stream2mmio_sid_ID_t    *sid);
+    stream2mmio_ID_t   stream2mmio,
+    stream2mmio_sid_ID_t       *sid);
 
 static void release_sid(
-       stream2mmio_ID_t        stream2mmio,
-       stream2mmio_sid_ID_t    *sid);
+    stream2mmio_ID_t   stream2mmio,
+    stream2mmio_sid_ID_t       *sid);
 
 static bool acquire_ib_buffer(
-       s32 bits_per_pixel,
-       s32 pixels_per_line,
-       s32 lines_per_frame,
-       s32 align_in_bytes,
-       bool online,
-       ib_buffer_t *buf);
+    s32 bits_per_pixel,
+    s32 pixels_per_line,
+    s32 lines_per_frame,
+    s32 align_in_bytes,
+    bool online,
+    ib_buffer_t *buf);
 
 static void release_ib_buffer(
-       ib_buffer_t *buf);
+    ib_buffer_t *buf);
 
 static bool acquire_dma_channel(
-       isys2401_dma_ID_t       dma_id,
-       isys2401_dma_channel    *channel);
+    isys2401_dma_ID_t  dma_id,
+    isys2401_dma_channel       *channel);
 
 static void release_dma_channel(
-       isys2401_dma_ID_t       dma_id,
-       isys2401_dma_channel    *channel);
+    isys2401_dma_ID_t  dma_id,
+    isys2401_dma_channel       *channel);
 
 static bool acquire_be_lut_entry(
-       csi_rx_backend_ID_t             backend,
-       csi_mipi_packet_type_t          packet_type,
-       csi_rx_backend_lut_entry_t      *entry);
+    csi_rx_backend_ID_t                backend,
+    csi_mipi_packet_type_t             packet_type,
+    csi_rx_backend_lut_entry_t *entry);
 
 static void release_be_lut_entry(
-       csi_rx_backend_ID_t             backend,
-       csi_mipi_packet_type_t          packet_type,
-       csi_rx_backend_lut_entry_t      *entry);
+    csi_rx_backend_ID_t                backend,
+    csi_mipi_packet_type_t             packet_type,
+    csi_rx_backend_lut_entry_t *entry);
 
 static bool calculate_tpg_cfg(
-       input_system_channel_t          *channel,
-       input_system_input_port_t       *input_port,
-       input_system_cfg_t              *isys_cfg,
-       pixelgen_tpg_cfg_t              *cfg);
+    input_system_channel_t             *channel,
+    input_system_input_port_t  *input_port,
+    input_system_cfg_t         *isys_cfg,
+    pixelgen_tpg_cfg_t         *cfg);
 
 static bool calculate_prbs_cfg(
-       input_system_channel_t          *channel,
-       input_system_input_port_t       *input_port,
-       input_system_cfg_t              *isys_cfg,
-       pixelgen_prbs_cfg_t             *cfg);
+    input_system_channel_t             *channel,
+    input_system_input_port_t  *input_port,
+    input_system_cfg_t         *isys_cfg,
+    pixelgen_prbs_cfg_t                *cfg);
 
 static bool calculate_fe_cfg(
-       const input_system_cfg_t        *isys_cfg,
-       csi_rx_frontend_cfg_t           *cfg);
+    const input_system_cfg_t   *isys_cfg,
+    csi_rx_frontend_cfg_t              *cfg);
 
 static bool calculate_be_cfg(
-       const input_system_input_port_t *input_port,
-       const input_system_cfg_t        *isys_cfg,
-       bool                            metadata,
-       csi_rx_backend_cfg_t            *cfg);
+    const input_system_input_port_t    *input_port,
+    const input_system_cfg_t   *isys_cfg,
+    bool                               metadata,
+    csi_rx_backend_cfg_t               *cfg);
 
 static bool calculate_stream2mmio_cfg(
-       const input_system_cfg_t        *isys_cfg,
-       bool                            metadata,
-       stream2mmio_cfg_t               *cfg);
+    const input_system_cfg_t   *isys_cfg,
+    bool                               metadata,
+    stream2mmio_cfg_t          *cfg);
 
 static bool calculate_ibuf_ctrl_cfg(
-       const input_system_channel_t    *channel,
-       const input_system_input_port_t *input_port,
-       const input_system_cfg_t        *isys_cfg,
-       ibuf_ctrl_cfg_t                 *cfg);
+    const input_system_channel_t       *channel,
+    const input_system_input_port_t    *input_port,
+    const input_system_cfg_t   *isys_cfg,
+    ibuf_ctrl_cfg_t                    *cfg);
 
 static bool calculate_isys2401_dma_cfg(
-       const input_system_channel_t    *channel,
-       const input_system_cfg_t        *isys_cfg,
-       isys2401_dma_cfg_t              *cfg);
+    const input_system_channel_t       *channel,
+    const input_system_cfg_t   *isys_cfg,
+    isys2401_dma_cfg_t         *cfg);
 
 static bool calculate_isys2401_dma_port_cfg(
-       const input_system_cfg_t        *isys_cfg,
-       bool                            raw_packed,
-       bool                            metadata,
-       isys2401_dma_port_cfg_t         *cfg);
+    const input_system_cfg_t   *isys_cfg,
+    bool                               raw_packed,
+    bool                               metadata,
+    isys2401_dma_port_cfg_t            *cfg);
 
 static csi_mipi_packet_type_t get_csi_mipi_packet_type(
-       int32_t data_type);
+    int32_t data_type);
 
 static int32_t calculate_stride(
-       s32 bits_per_pixel,
-       s32 pixels_per_line,
-       bool    raw_packed,
-       int32_t align_in_bytes);
+    s32 bits_per_pixel,
+    s32 pixels_per_line,
+    bool       raw_packed,
+    int32_t    align_in_bytes);
 
 /* end of Forwarded Declaration */
 
@@ -174,18 +174,18 @@ static int32_t calculate_stride(
  *
  **************************************************/
 ia_css_isys_error_t ia_css_isys_stream_create(
-       ia_css_isys_descr_t     *isys_stream_descr,
-       ia_css_isys_stream_h    isys_stream,
-       uint32_t isys_stream_id)
+    ia_css_isys_descr_t        *isys_stream_descr,
+    ia_css_isys_stream_h       isys_stream,
+    uint32_t isys_stream_id)
 {
        ia_css_isys_error_t rc;
 
        if (!isys_stream_descr || !isys_stream ||
-               isys_stream_id >= SH_CSS_MAX_ISYS_CHANNEL_NODES)
+           isys_stream_id >= SH_CSS_MAX_ISYS_CHANNEL_NODES)
                return  false;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "ia_css_isys_stream_create() enter:\n");
+                           "ia_css_isys_stream_create() enter:\n");
 
        /*Reset isys_stream to 0*/
        memset(isys_stream, 0, sizeof(*isys_stream));
@@ -193,11 +193,13 @@ ia_css_isys_error_t ia_css_isys_stream_create(
        isys_stream->id = isys_stream_id;
 
        isys_stream->linked_isys_stream_id = isys_stream_descr->linked_isys_stream_id;
-       rc = create_input_system_input_port(isys_stream_descr, &isys_stream->input_port);
+       rc = create_input_system_input_port(isys_stream_descr,
+                                           &isys_stream->input_port);
        if (rc == false)
                return false;
 
-       rc = create_input_system_channel(isys_stream_descr, false, &isys_stream->channel);
+       rc = create_input_system_channel(isys_stream_descr, false,
+                                        &isys_stream->channel);
        if (rc == false) {
                destroy_input_system_input_port(&isys_stream->input_port);
                return false;
@@ -216,7 +218,8 @@ ia_css_isys_error_t ia_css_isys_stream_create(
 #endif
        /* create metadata channel */
        if (isys_stream_descr->metadata.enable) {
-               rc = create_input_system_channel(isys_stream_descr, true, &isys_stream->md_channel);
+               rc = create_input_system_channel(isys_stream_descr, true,
+                                                &isys_stream->md_channel);
                if (rc == false) {
                        destroy_input_system_input_port(&isys_stream->input_port);
                        destroy_input_system_channel(&isys_stream->channel);
@@ -224,13 +227,13 @@ ia_css_isys_error_t ia_css_isys_stream_create(
                }
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "ia_css_isys_stream_create() leave:\n");
+                           "ia_css_isys_stream_create() leave:\n");
 
        return true;
 }
 
 void ia_css_isys_stream_destroy(
-       ia_css_isys_stream_h    isys_stream)
+    ia_css_isys_stream_h       isys_stream)
 {
        destroy_input_system_input_port(&isys_stream->input_port);
        destroy_input_system_channel(&isys_stream->channel);
@@ -241,26 +244,26 @@ void ia_css_isys_stream_destroy(
 }
 
 ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
-       ia_css_isys_stream_h            isys_stream,
-       ia_css_isys_descr_t             *isys_stream_descr,
-       ia_css_isys_stream_cfg_t        *isys_stream_cfg)
+    ia_css_isys_stream_h               isys_stream,
+    ia_css_isys_descr_t                *isys_stream_descr,
+    ia_css_isys_stream_cfg_t   *isys_stream_cfg)
 {
        ia_css_isys_error_t rc;
 
        if (!isys_stream_cfg            ||
-               !isys_stream_descr      ||
-               !isys_stream)
+           !isys_stream_descr  ||
+           !isys_stream)
                return false;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "ia_css_isys_stream_calculate_cfg() enter:\n");
+                           "ia_css_isys_stream_calculate_cfg() enter:\n");
 
        rc  = calculate_input_system_channel_cfg(
-                       &isys_stream->channel,
-                       &isys_stream->input_port,
-                       isys_stream_descr,
-                       &isys_stream_cfg->channel_cfg,
-                       false);
+                 &isys_stream->channel,
+                 &isys_stream->input_port,
+                 isys_stream_descr,
+                 &isys_stream_cfg->channel_cfg,
+                 false);
        if (rc == false)
                return false;
 
@@ -268,27 +271,27 @@ ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
        if (isys_stream_descr->metadata.enable) {
                isys_stream_cfg->enable_metadata = true;
                rc  = calculate_input_system_channel_cfg(
-                               &isys_stream->md_channel,
-                               &isys_stream->input_port,
-                               isys_stream_descr,
-                               &isys_stream_cfg->md_channel_cfg,
-                               true);
+                         &isys_stream->md_channel,
+                         &isys_stream->input_port,
+                         isys_stream_descr,
+                         &isys_stream_cfg->md_channel_cfg,
+                         true);
                if (rc == false)
                        return false;
        }
 
        rc = calculate_input_system_input_port_cfg(
-                       &isys_stream->channel,
-                       &isys_stream->input_port,
-                       isys_stream_descr,
-                       &isys_stream_cfg->input_port_cfg);
+                &isys_stream->channel,
+                &isys_stream->input_port,
+                isys_stream_descr,
+                &isys_stream_cfg->input_port_cfg);
        if (rc == false)
                return false;
 
        isys_stream->valid = 1;
        isys_stream_cfg->valid = 1;
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "ia_css_isys_stream_calculate_cfg() leave:\n");
+                           "ia_css_isys_stream_calculate_cfg() leave:\n");
        return rc;
 }
 
@@ -300,9 +303,9 @@ ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
  *
  **************************************************/
 static bool create_input_system_channel(
-       input_system_cfg_t      *cfg,
-       bool                    metadata,
-       input_system_channel_t  *me)
+    input_system_cfg_t *cfg,
+    bool                       metadata,
+    input_system_channel_t     *me)
 {
        bool rc = true;
 
@@ -339,12 +342,16 @@ static bool create_input_system_channel(
        }
 
        if (!acquire_ib_buffer(
-                       metadata ? cfg->metadata.bits_per_pixel : cfg->input_port_resolution.bits_per_pixel,
-                       metadata ? cfg->metadata.pixels_per_line : cfg->input_port_resolution.pixels_per_line,
-                       metadata ? cfg->metadata.lines_per_frame : cfg->input_port_resolution.lines_per_frame,
-                       metadata ? cfg->metadata.align_req_in_bytes : cfg->input_port_resolution.align_req_in_bytes,
-                       cfg->online,
-                       &me->ib_buffer)) {
+               metadata ? cfg->metadata.bits_per_pixel :
+               cfg->input_port_resolution.bits_per_pixel,
+               metadata ? cfg->metadata.pixels_per_line :
+               cfg->input_port_resolution.pixels_per_line,
+               metadata ? cfg->metadata.lines_per_frame :
+               cfg->input_port_resolution.lines_per_frame,
+               metadata ? cfg->metadata.align_req_in_bytes :
+               cfg->input_port_resolution.align_req_in_bytes,
+               cfg->online,
+               &me->ib_buffer)) {
                release_sid(me->stream2mmio_id, &me->stream2mmio_sid_id);
                return false;
        }
@@ -359,10 +366,10 @@ static bool create_input_system_channel(
 }
 
 static void destroy_input_system_channel(
-       input_system_channel_t  *me)
+    input_system_channel_t     *me)
 {
        release_sid(me->stream2mmio_id,
-               &me->stream2mmio_sid_id);
+                   &me->stream2mmio_sid_id);
 
        release_ib_buffer(&me->ib_buffer);
 
@@ -370,8 +377,8 @@ static void destroy_input_system_channel(
 }
 
 static bool create_input_system_input_port(
-       input_system_cfg_t              *cfg,
-       input_system_input_port_t       *me)
+    input_system_cfg_t         *cfg,
+    input_system_input_port_t  *me)
 {
        csi_mipi_packet_type_t packet_type;
        bool rc = true;
@@ -385,9 +392,9 @@ static bool create_input_system_input_port(
                me->csi_rx.packet_type = packet_type;
 
                rc = acquire_be_lut_entry(
-                               me->csi_rx.backend_id,
-                               packet_type,
-                               &me->csi_rx.backend_lut_entry);
+                        me->csi_rx.backend_id,
+                        packet_type,
+                        &me->csi_rx.backend_lut_entry);
                break;
        case INPUT_SYSTEM_PIXELGEN_PORT0_ID:
                me->pixelgen.pixelgen_id = PIXELGEN0_ID;
@@ -400,9 +407,9 @@ static bool create_input_system_input_port(
                me->csi_rx.packet_type = packet_type;
 
                rc = acquire_be_lut_entry(
-                               me->csi_rx.backend_id,
-                               packet_type,
-                               &me->csi_rx.backend_lut_entry);
+                        me->csi_rx.backend_id,
+                        packet_type,
+                        &me->csi_rx.backend_lut_entry);
                break;
        case INPUT_SYSTEM_PIXELGEN_PORT1_ID:
                me->pixelgen.pixelgen_id = PIXELGEN1_ID;
@@ -416,9 +423,9 @@ static bool create_input_system_input_port(
                me->csi_rx.packet_type = packet_type;
 
                rc = acquire_be_lut_entry(
-                               me->csi_rx.backend_id,
-                               packet_type,
-                               &me->csi_rx.backend_lut_entry);
+                        me->csi_rx.backend_id,
+                        packet_type,
+                        &me->csi_rx.backend_lut_entry);
                break;
        case INPUT_SYSTEM_PIXELGEN_PORT2_ID:
                me->pixelgen.pixelgen_id = PIXELGEN2_ID;
@@ -434,79 +441,80 @@ static bool create_input_system_input_port(
        me->metadata.packet_type = CSI_MIPI_PACKET_TYPE_UNDEFINED;
        if (rc && cfg->metadata.enable) {
                me->metadata.packet_type = get_csi_mipi_packet_type(
-                               cfg->metadata.fmt_type);
+                                              cfg->metadata.fmt_type);
                rc = acquire_be_lut_entry(
-                               me->csi_rx.backend_id,
-                               me->metadata.packet_type,
-                               &me->metadata.backend_lut_entry);
+                        me->csi_rx.backend_id,
+                        me->metadata.packet_type,
+                        &me->metadata.backend_lut_entry);
        }
 
        return rc;
 }
 
 static void destroy_input_system_input_port(
-       input_system_input_port_t       *me)
+    input_system_input_port_t  *me)
 {
        if (me->source_type == INPUT_SYSTEM_SOURCE_TYPE_SENSOR) {
                release_be_lut_entry(
-                               me->csi_rx.backend_id,
-                               me->csi_rx.packet_type,
-                               &me->csi_rx.backend_lut_entry);
+                   me->csi_rx.backend_id,
+                   me->csi_rx.packet_type,
+                   &me->csi_rx.backend_lut_entry);
        }
 
        if (me->metadata.packet_type != CSI_MIPI_PACKET_TYPE_UNDEFINED) {
                /*Free the backend lut allocated for metadata*/
                release_be_lut_entry(
-                               me->csi_rx.backend_id,
-                               me->metadata.packet_type,
-                               &me->metadata.backend_lut_entry);
+                   me->csi_rx.backend_id,
+                   me->metadata.packet_type,
+                   &me->metadata.backend_lut_entry);
        }
 }
 
 static bool calculate_input_system_channel_cfg(
-       input_system_channel_t          *channel,
-       input_system_input_port_t       *input_port,
-       input_system_cfg_t              *isys_cfg,
-       input_system_channel_cfg_t      *channel_cfg,
-       bool metadata)
+    input_system_channel_t             *channel,
+    input_system_input_port_t  *input_port,
+    input_system_cfg_t         *isys_cfg,
+    input_system_channel_cfg_t *channel_cfg,
+    bool metadata)
 {
        bool rc;
 
        rc = calculate_stream2mmio_cfg(isys_cfg, metadata,
-                       &channel_cfg->stream2mmio_cfg);
+                                      &channel_cfg->stream2mmio_cfg);
        if (!rc)
                return false;
 
        rc = calculate_ibuf_ctrl_cfg(
-                       channel,
-                       input_port,
-                       isys_cfg,
-                       &channel_cfg->ibuf_ctrl_cfg);
+                channel,
+                input_port,
+                isys_cfg,
+                &channel_cfg->ibuf_ctrl_cfg);
        if (!rc)
                return false;
        if (metadata)
-               channel_cfg->ibuf_ctrl_cfg.stores_per_frame = isys_cfg->metadata.lines_per_frame;
+               channel_cfg->ibuf_ctrl_cfg.stores_per_frame =
+                   isys_cfg->metadata.lines_per_frame;
 
        rc = calculate_isys2401_dma_cfg(
-                       channel,
-                       isys_cfg,
-                       &channel_cfg->dma_cfg);
+                channel,
+                isys_cfg,
+                &channel_cfg->dma_cfg);
        if (!rc)
                return false;
 
        rc = calculate_isys2401_dma_port_cfg(
-                       isys_cfg,
-                       false,
-                       metadata,
-                       &channel_cfg->dma_src_port_cfg);
+                isys_cfg,
+                false,
+                metadata,
+                &channel_cfg->dma_src_port_cfg);
        if (!rc)
                return false;
 
        rc = calculate_isys2401_dma_port_cfg(
-                       isys_cfg,
-                       isys_cfg->raw_packed,
-                       metadata,
-                       &channel_cfg->dma_dest_port_cfg);
+                isys_cfg,
+                isys_cfg->raw_packed,
+                metadata,
+                &channel_cfg->dma_dest_port_cfg);
        if (!rc)
                return false;
 
@@ -514,42 +522,42 @@ static bool calculate_input_system_channel_cfg(
 }
 
 static bool calculate_input_system_input_port_cfg(
-       input_system_channel_t          *channel,
-       input_system_input_port_t       *input_port,
-       input_system_cfg_t              *isys_cfg,
-       input_system_input_port_cfg_t   *input_port_cfg)
+    input_system_channel_t             *channel,
+    input_system_input_port_t  *input_port,
+    input_system_cfg_t         *isys_cfg,
+    input_system_input_port_cfg_t      *input_port_cfg)
 {
        bool rc;
 
        switch (input_port->source_type) {
        case INPUT_SYSTEM_SOURCE_TYPE_SENSOR:
                rc  = calculate_fe_cfg(
-                               isys_cfg,
-                               &input_port_cfg->csi_rx_cfg.frontend_cfg);
+                         isys_cfg,
+                         &input_port_cfg->csi_rx_cfg.frontend_cfg);
 
                rc &= calculate_be_cfg(
-                               input_port,
-                               isys_cfg,
-                               false,
-                               &input_port_cfg->csi_rx_cfg.backend_cfg);
+                         input_port,
+                         isys_cfg,
+                         false,
+                         &input_port_cfg->csi_rx_cfg.backend_cfg);
 
                if (rc && isys_cfg->metadata.enable)
                        rc &= calculate_be_cfg(input_port, isys_cfg, true,
-                                       &input_port_cfg->csi_rx_cfg.md_backend_cfg);
+                                              &input_port_cfg->csi_rx_cfg.md_backend_cfg);
                break;
        case INPUT_SYSTEM_SOURCE_TYPE_TPG:
                rc = calculate_tpg_cfg(
-                               channel,
-                               input_port,
-                               isys_cfg,
-                               &input_port_cfg->pixelgen_cfg.tpg_cfg);
+                        channel,
+                        input_port,
+                        isys_cfg,
+                        &input_port_cfg->pixelgen_cfg.tpg_cfg);
                break;
        case INPUT_SYSTEM_SOURCE_TYPE_PRBS:
                rc = calculate_prbs_cfg(
-                               channel,
-                               input_port,
-                               isys_cfg,
-                               &input_port_cfg->pixelgen_cfg.prbs_cfg);
+                        channel,
+                        input_port,
+                        isys_cfg,
+                        &input_port_cfg->pixelgen_cfg.prbs_cfg);
                break;
        default:
                rc = false;
@@ -560,25 +568,25 @@ static bool calculate_input_system_input_port_cfg(
 }
 
 static bool acquire_sid(
-       stream2mmio_ID_t        stream2mmio,
-       stream2mmio_sid_ID_t    *sid)
+    stream2mmio_ID_t   stream2mmio,
+    stream2mmio_sid_ID_t       *sid)
 {
        return ia_css_isys_stream2mmio_sid_rmgr_acquire(stream2mmio, sid);
 }
 
 static void release_sid(
-       stream2mmio_ID_t        stream2mmio,
-       stream2mmio_sid_ID_t    *sid)
+    stream2mmio_ID_t   stream2mmio,
+    stream2mmio_sid_ID_t       *sid)
 {
        ia_css_isys_stream2mmio_sid_rmgr_release(stream2mmio, sid);
 }
 
 /* See also: ia_css_dma_configure_from_info() */
 static int32_t calculate_stride(
-       s32 bits_per_pixel,
-       s32 pixels_per_line,
-       bool    raw_packed,
-       int32_t align_in_bytes)
+    s32 bits_per_pixel,
+    s32 pixels_per_line,
+    bool       raw_packed,
+    int32_t align_in_bytes)
 {
        s32 bytes_per_line;
        s32 pixels_per_word;
@@ -598,152 +606,157 @@ static int32_t calculate_stride(
 }
 
 static bool acquire_ib_buffer(
-       s32 bits_per_pixel,
-       s32 pixels_per_line,
-       s32 lines_per_frame,
-       s32 align_in_bytes,
-       bool online,
-       ib_buffer_t *buf)
+    s32 bits_per_pixel,
+    s32 pixels_per_line,
+    s32 lines_per_frame,
+    s32 align_in_bytes,
+    bool online,
+    ib_buffer_t *buf)
 {
-       buf->stride = calculate_stride(bits_per_pixel, pixels_per_line, false, align_in_bytes);
+       buf->stride = calculate_stride(bits_per_pixel, pixels_per_line, false,
+                                      align_in_bytes);
        if (online)
                buf->lines = 4; /* use double buffering for online usecases */
        else
                buf->lines = 2;
 
        (void)(lines_per_frame);
-       return ia_css_isys_ibuf_rmgr_acquire(buf->stride * buf->lines, &buf->start_addr);
+       return ia_css_isys_ibuf_rmgr_acquire(buf->stride * buf->lines,
+                                            &buf->start_addr);
 }
 
 static void release_ib_buffer(
-       ib_buffer_t *buf)
+    ib_buffer_t *buf)
 {
        ia_css_isys_ibuf_rmgr_release(&buf->start_addr);
 }
 
 static bool acquire_dma_channel(
-       isys2401_dma_ID_t       dma_id,
-       isys2401_dma_channel    *channel)
+    isys2401_dma_ID_t  dma_id,
+    isys2401_dma_channel       *channel)
 {
        return ia_css_isys_dma_channel_rmgr_acquire(dma_id, channel);
 }
 
 static void release_dma_channel(
-       isys2401_dma_ID_t       dma_id,
-       isys2401_dma_channel    *channel)
+    isys2401_dma_ID_t  dma_id,
+    isys2401_dma_channel       *channel)
 {
        ia_css_isys_dma_channel_rmgr_release(dma_id, channel);
 }
 
 static bool acquire_be_lut_entry(
-       csi_rx_backend_ID_t             backend,
-       csi_mipi_packet_type_t          packet_type,
-       csi_rx_backend_lut_entry_t      *entry)
+    csi_rx_backend_ID_t                backend,
+    csi_mipi_packet_type_t             packet_type,
+    csi_rx_backend_lut_entry_t *entry)
 {
        return ia_css_isys_csi_rx_lut_rmgr_acquire(backend, packet_type, entry);
 }
 
 static void release_be_lut_entry(
-       csi_rx_backend_ID_t             backend,
-       csi_mipi_packet_type_t          packet_type,
-       csi_rx_backend_lut_entry_t      *entry)
+    csi_rx_backend_ID_t                backend,
+    csi_mipi_packet_type_t             packet_type,
+    csi_rx_backend_lut_entry_t *entry)
 {
        ia_css_isys_csi_rx_lut_rmgr_release(backend, packet_type, entry);
 }
 
 static bool calculate_tpg_cfg(
-       input_system_channel_t          *channel,
-       input_system_input_port_t       *input_port,
-       input_system_cfg_t              *isys_cfg,
-       pixelgen_tpg_cfg_t              *cfg)
+    input_system_channel_t             *channel,
+    input_system_input_port_t  *input_port,
+    input_system_cfg_t         *isys_cfg,
+    pixelgen_tpg_cfg_t         *cfg)
 {
        (void)channel;
        (void)input_port;
 
        memcpy_s(
-               (void *)cfg,
-               sizeof(pixelgen_tpg_cfg_t),
-               (void *)(&isys_cfg->tpg_port_attr),
-               sizeof(pixelgen_tpg_cfg_t));
+           (void *)cfg,
+           sizeof(pixelgen_tpg_cfg_t),
+           (void *)(&isys_cfg->tpg_port_attr),
+           sizeof(pixelgen_tpg_cfg_t));
        return true;
 }
 
 static bool calculate_prbs_cfg(
-       input_system_channel_t          *channel,
-       input_system_input_port_t       *input_port,
-       input_system_cfg_t              *isys_cfg,
-       pixelgen_prbs_cfg_t             *cfg)
+    input_system_channel_t             *channel,
+    input_system_input_port_t  *input_port,
+    input_system_cfg_t         *isys_cfg,
+    pixelgen_prbs_cfg_t                *cfg)
 {
        (void)channel;
        (void)input_port;
 
        memcpy_s(
-               (void *)cfg,
-               sizeof(pixelgen_prbs_cfg_t),
-               (void *)(&isys_cfg->prbs_port_attr),
-               sizeof(pixelgen_prbs_cfg_t));
+           (void *)cfg,
+           sizeof(pixelgen_prbs_cfg_t),
+           (void *)(&isys_cfg->prbs_port_attr),
+           sizeof(pixelgen_prbs_cfg_t));
        return true;
 }
 
 static bool calculate_fe_cfg(
-       const input_system_cfg_t        *isys_cfg,
-       csi_rx_frontend_cfg_t           *cfg)
+    const input_system_cfg_t   *isys_cfg,
+    csi_rx_frontend_cfg_t              *cfg)
 {
        cfg->active_lanes = isys_cfg->csi_port_attr.active_lanes;
        return true;
 }
 
 static bool calculate_be_cfg(
-       const input_system_input_port_t *input_port,
-       const input_system_cfg_t        *isys_cfg,
-       bool                            metadata,
-       csi_rx_backend_cfg_t            *cfg)
+    const input_system_input_port_t    *input_port,
+    const input_system_cfg_t   *isys_cfg,
+    bool                               metadata,
+    csi_rx_backend_cfg_t               *cfg)
 {
        memcpy_s(
-               (void *)(&cfg->lut_entry),
-               sizeof(csi_rx_backend_lut_entry_t),
-               metadata ? (void *)(&input_port->metadata.backend_lut_entry) :
-                       (void *)(&input_port->csi_rx.backend_lut_entry),
-               sizeof(csi_rx_backend_lut_entry_t));
+           (void *)(&cfg->lut_entry),
+           sizeof(csi_rx_backend_lut_entry_t),
+           metadata ? (void *)(&input_port->metadata.backend_lut_entry) :
+           (void *)(&input_port->csi_rx.backend_lut_entry),
+           sizeof(csi_rx_backend_lut_entry_t));
 
        cfg->csi_mipi_cfg.virtual_channel = isys_cfg->csi_port_attr.ch_id;
        if (metadata) {
-               cfg->csi_mipi_packet_type = get_csi_mipi_packet_type(isys_cfg->metadata.fmt_type);
+               cfg->csi_mipi_packet_type = get_csi_mipi_packet_type(
+                                               isys_cfg->metadata.fmt_type);
                cfg->csi_mipi_cfg.comp_enable = false;
                cfg->csi_mipi_cfg.data_type = isys_cfg->metadata.fmt_type;
        } else {
-               cfg->csi_mipi_packet_type = get_csi_mipi_packet_type(isys_cfg->csi_port_attr.fmt_type);
+               cfg->csi_mipi_packet_type = get_csi_mipi_packet_type(
+                                               isys_cfg->csi_port_attr.fmt_type);
                cfg->csi_mipi_cfg.data_type = isys_cfg->csi_port_attr.fmt_type;
                cfg->csi_mipi_cfg.comp_enable = isys_cfg->csi_port_attr.comp_enable;
                cfg->csi_mipi_cfg.comp_scheme = isys_cfg->csi_port_attr.comp_scheme;
                cfg->csi_mipi_cfg.comp_predictor = isys_cfg->csi_port_attr.comp_predictor;
-               cfg->csi_mipi_cfg.comp_bit_idx = cfg->csi_mipi_cfg.data_type - MIPI_FORMAT_CUSTOM0;
+               cfg->csi_mipi_cfg.comp_bit_idx = cfg->csi_mipi_cfg.data_type -
+                                                MIPI_FORMAT_CUSTOM0;
        }
 
        return true;
 }
 
 static bool calculate_stream2mmio_cfg(
-       const input_system_cfg_t        *isys_cfg,
-       bool                            metadata,
-       stream2mmio_cfg_t               *cfg
+    const input_system_cfg_t   *isys_cfg,
+    bool                               metadata,
+    stream2mmio_cfg_t          *cfg
 )
 {
        cfg->bits_per_pixel = metadata ? isys_cfg->metadata.bits_per_pixel :
-               isys_cfg->input_port_resolution.bits_per_pixel;
+                             isys_cfg->input_port_resolution.bits_per_pixel;
 
        cfg->enable_blocking =
-               ((isys_cfg->mode == INPUT_SYSTEM_SOURCE_TYPE_TPG) ||
-                (isys_cfg->mode == INPUT_SYSTEM_SOURCE_TYPE_PRBS));
+           ((isys_cfg->mode == INPUT_SYSTEM_SOURCE_TYPE_TPG) ||
+            (isys_cfg->mode == INPUT_SYSTEM_SOURCE_TYPE_PRBS));
 
        return true;
 }
 
 static bool calculate_ibuf_ctrl_cfg(
-       const input_system_channel_t    *channel,
-       const input_system_input_port_t *input_port,
-       const input_system_cfg_t        *isys_cfg,
-       ibuf_ctrl_cfg_t                 *cfg)
+    const input_system_channel_t       *channel,
+    const input_system_input_port_t    *input_port,
+    const input_system_cfg_t   *isys_cfg,
+    ibuf_ctrl_cfg_t                    *cfg)
 {
        const s32 bits_per_byte = 8;
        s32 bits_per_pixel;
@@ -756,7 +769,7 @@ static bool calculate_ibuf_ctrl_cfg(
        bytes_per_pixel = ceil_div(bits_per_pixel, bits_per_byte);
 
        left_padding = CEIL_MUL(isys_cfg->output_port_attr.left_padding, ISP_VEC_NELEMS)
-                       * bytes_per_pixel;
+                      * bytes_per_pixel;
 
        cfg->online     = isys_cfg->online;
 
@@ -772,9 +785,9 @@ static bool calculate_ibuf_ctrl_cfg(
        cfg->ib_buffer.lines                    = channel->ib_buffer.lines;
 
        /*
-#ifndef ISP2401
+       #ifndef ISP2401
         * zhengjie.lu@intel.com:
-#endif
+       #endif
         * "dest_buf_cfg" should be part of the input system output
         * port configuration.
         *
@@ -788,21 +801,21 @@ static bool calculate_ibuf_ctrl_cfg(
        if (cfg->online) {
                cfg->dest_buf_cfg.start_addr    = ISP_INPUT_BUF_START_ADDR + left_padding;
                cfg->dest_buf_cfg.stride        = bytes_per_pixel
-                       * isys_cfg->output_port_attr.max_isp_input_width;
+                                             * isys_cfg->output_port_attr.max_isp_input_width;
                cfg->dest_buf_cfg.lines         = LINES_OF_ISP_INPUT_BUF;
        } else if (isys_cfg->raw_packed) {
                cfg->dest_buf_cfg.stride        = calculate_stride(bits_per_pixel,
-                                                       isys_cfg->input_port_resolution.pixels_per_line,
-                                                       isys_cfg->raw_packed,
-                                                       isys_cfg->input_port_resolution.align_req_in_bytes);
+                                             isys_cfg->input_port_resolution.pixels_per_line,
+                                             isys_cfg->raw_packed,
+                                             isys_cfg->input_port_resolution.align_req_in_bytes);
        } else {
                cfg->dest_buf_cfg.stride        = channel->ib_buffer.stride;
        }
 
        /*
-#ifndef ISP2401
+       #ifndef ISP2401
         * zhengjie.lu@intel.com:
-#endif
+       #endif
         * "items_per_store" is hard coded as "1", which is ONLY valid
         * when the CSI-MIPI long packet is transferred.
         *
@@ -823,9 +836,9 @@ static bool calculate_ibuf_ctrl_cfg(
 }
 
 static bool calculate_isys2401_dma_cfg(
-       const input_system_channel_t    *channel,
-       const input_system_cfg_t        *isys_cfg,
-       isys2401_dma_cfg_t              *cfg)
+    const input_system_channel_t       *channel,
+    const input_system_cfg_t   *isys_cfg,
+    isys2401_dma_cfg_t         *cfg)
 {
        cfg->channel    = channel->dma_channel;
 
@@ -844,10 +857,10 @@ static bool calculate_isys2401_dma_cfg(
 
 /* See also: ia_css_dma_configure_from_info() */
 static bool calculate_isys2401_dma_port_cfg(
-       const input_system_cfg_t        *isys_cfg,
-       bool                            raw_packed,
-       bool                            metadata,
-       isys2401_dma_port_cfg_t         *cfg)
+    const input_system_cfg_t   *isys_cfg,
+    bool                               raw_packed,
+    bool                               metadata,
+    isys2401_dma_port_cfg_t            *cfg)
 {
        s32 bits_per_pixel;
        s32 pixels_per_line;
@@ -864,7 +877,8 @@ static bool calculate_isys2401_dma_port_cfg(
                align_req_in_bytes = isys_cfg->input_port_resolution.align_req_in_bytes;
        }
 
-       cfg->stride     = calculate_stride(bits_per_pixel, pixels_per_line, raw_packed, align_req_in_bytes);
+       cfg->stride     = calculate_stride(bits_per_pixel, pixels_per_line, raw_packed,
+                                      align_req_in_bytes);
 
        if (!raw_packed)
                bits_per_pixel = CEIL_MUL(bits_per_pixel, 8);
@@ -877,7 +891,7 @@ static bool calculate_isys2401_dma_port_cfg(
 }
 
 static csi_mipi_packet_type_t get_csi_mipi_packet_type(
-       int32_t data_type)
+    int32_t data_type)
 {
        csi_mipi_packet_type_t packet_type;
 
index 1f10eaedc05157b41dedc0e877541f176c81fb27..3ad5e6227b27e9247ea97f7d0b8be83e0295fc47 100644 (file)
@@ -117,10 +117,10 @@ void ia_css_pipeline_init(void);
  * externally and needs sane defaults
  */
 enum ia_css_err ia_css_pipeline_create(
-       struct ia_css_pipeline *pipeline,
-       enum ia_css_pipe_id pipe_id,
-       unsigned int pipe_num,
-       unsigned int dvs_frame_delay);
+    struct ia_css_pipeline *pipeline,
+    enum ia_css_pipe_id pipe_id,
+    unsigned int pipe_num,
+    unsigned int dvs_frame_delay);
 
 /* @brief destroy a pipeline
  *
@@ -176,9 +176,9 @@ void ia_css_pipeline_clean(struct ia_css_pipeline *pipeline);
  * arguments.
 */
 enum ia_css_err ia_css_pipeline_create_and_add_stage(
-                       struct ia_css_pipeline *pipeline,
-                       struct ia_css_pipeline_stage_desc *stage_desc,
-                       struct ia_css_pipeline_stage **stage);
+    struct ia_css_pipeline *pipeline,
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_pipeline_stage **stage);
 
 /* @brief Finalize the stages in a pipeline
  *
@@ -188,7 +188,7 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
  * This API is expected to be called after adding all stages
 */
 void ia_css_pipeline_finalize_stages(struct ia_css_pipeline *pipeline,
-                       bool continuous);
+                                    bool continuous);
 
 /* @brief gets a stage from the pipeline
  *
@@ -197,8 +197,8 @@ void ia_css_pipeline_finalize_stages(struct ia_css_pipeline *pipeline,
  *
  */
 enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline,
-                         int mode,
-                         struct ia_css_pipeline_stage **stage);
+       int mode,
+       struct ia_css_pipeline_stage **stage);
 
 /* @brief Gets a pipeline stage corresponding Firmware handle from the pipeline
  *
@@ -209,9 +209,10 @@ enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline,
  * @return   IA_CSS_SUCCESS or error code upon error.
  *
  */
-enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeline,
-                         u32 fw_handle,
-                         struct ia_css_pipeline_stage **stage);
+enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline
+       *pipeline,
+       u32 fw_handle,
+       struct ia_css_pipeline_stage **stage);
 
 /* @brief Gets the Firmware handle corresponding the stage num from the pipeline
  *
@@ -222,9 +223,10 @@ enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeli
  * @return   IA_CSS_SUCCESS or error code upon error.
  *
  */
-enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline *pipeline,
-                         u32 stage_num,
-                         uint32_t *fw_handle);
+enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline
+       *pipeline,
+       u32 stage_num,
+       uint32_t *fw_handle);
 
 /* @brief gets the output stage from the pipeline
  *
@@ -233,9 +235,9 @@ enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline *pipeli
  *
  */
 enum ia_css_err ia_css_pipeline_get_output_stage(
-                       struct ia_css_pipeline *pipeline,
-                       int mode,
-                       struct ia_css_pipeline_stage **stage);
+    struct ia_css_pipeline *pipeline,
+    int mode,
+    struct ia_css_pipeline_stage **stage);
 
 /* @brief Checks whether the pipeline uses params
  *
index 3d36be4795e73b2f4620efeac353e0780a0f680d..08386add94e01823f11f1ec1bf89ddd3917dc829 100644 (file)
@@ -55,15 +55,15 @@ static void pipeline_init_sp_thread_map(void);
 static void pipeline_map_num_to_sp_thread(unsigned int pipe_num);
 static void pipeline_unmap_num_to_sp_thread(unsigned int pipe_num);
 static void pipeline_init_defaults(
-       struct ia_css_pipeline *pipeline,
-       enum ia_css_pipe_id pipe_id,
-       unsigned int pipe_num,
-       unsigned int dvs_frame_delay);
+    struct ia_css_pipeline *pipeline,
+    enum ia_css_pipe_id pipe_id,
+    unsigned int pipe_num,
+    unsigned int dvs_frame_delay);
 
 static void pipeline_stage_destroy(struct ia_css_pipeline_stage *stage);
 static enum ia_css_err pipeline_stage_create(
-       struct ia_css_pipeline_stage_desc *stage_desc,
-       struct ia_css_pipeline_stage **new_stage);
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_pipeline_stage **new_stage);
 static void ia_css_pipeline_set_zoom_stage(struct ia_css_pipeline *pipeline);
 static void ia_css_pipeline_configure_inout_port(struct ia_css_pipeline *me,
        bool continuous);
@@ -77,14 +77,14 @@ void ia_css_pipeline_init(void)
 }
 
 enum ia_css_err ia_css_pipeline_create(
-       struct ia_css_pipeline *pipeline,
-       enum ia_css_pipe_id pipe_id,
-       unsigned int pipe_num,
-       unsigned int dvs_frame_delay)
+    struct ia_css_pipeline *pipeline,
+    enum ia_css_pipe_id pipe_id,
+    unsigned int pipe_num,
+    unsigned int dvs_frame_delay)
 {
        assert(pipeline);
        IA_CSS_ENTER_PRIVATE("pipeline = %p, pipe_id = %d, pipe_num = %d, dvs_frame_delay = %d",
-                    pipeline, pipe_id, pipe_num, dvs_frame_delay);
+                            pipeline, pipe_id, pipe_num, dvs_frame_delay);
        if (!pipeline) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -147,8 +147,8 @@ void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id,
 
        assert(pipeline);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-             "ia_css_pipeline_start() enter: pipe_id=%d, pipeline=%p\n",
-             pipe_id, pipeline);
+                           "ia_css_pipeline_start() enter: pipe_id=%d, pipeline=%p\n",
+                           pipe_id, pipeline);
        pipeline->pipe_id = pipe_id;
        sh_css_sp_init_pipeline(pipeline, pipe_id, pipe_num,
                                false, false, false, true, SH_CSS_BDS_FACTOR_1_00,
@@ -166,14 +166,14 @@ void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id,
 #endif
 #endif
 #ifndef ISP2401
-                               );
+                              );
 #else
                                NULL, NULL);
 #endif
        ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
        if (!sh_css_sp_is_running()) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_pipeline_start() error,leaving\n");
+                                   "ia_css_pipeline_start() error,leaving\n");
                /* queues are invalid*/
                return;
        }
@@ -183,7 +183,7 @@ void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id,
                                       0);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-             "ia_css_pipeline_start() leave: return_void\n");
+                           "ia_css_pipeline_start() leave: return_void\n");
 }
 
 /*
@@ -215,10 +215,10 @@ void ia_css_pipeline_dump_thread_map_info(void)
        unsigned int i;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "pipeline_num_to_sp_thread_map:\n");
+                           "pipeline_num_to_sp_thread_map:\n");
        for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "pipe_num: %u, tid: 0x%x\n", i, pipeline_num_to_sp_thread_map[i]);
+                                   "pipe_num: %u, tid: 0x%x\n", i, pipeline_num_to_sp_thread_map[i]);
        }
 }
 
@@ -233,18 +233,17 @@ enum ia_css_err ia_css_pipeline_request_stop(struct ia_css_pipeline *pipeline)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_pipeline_request_stop() enter: pipeline=%p\n",
-               pipeline);
+                           "ia_css_pipeline_request_stop() enter: pipeline=%p\n",
+                           pipeline);
        pipeline->stop_requested = true;
 
        /* Send stop event to the sp*/
        /* This needs improvement, stop on all the pipes available
         * in the stream*/
        ia_css_pipeline_get_sp_thread_id(pipeline->pipe_num, &thread_id);
-       if (!sh_css_sp_is_running())
-       {
+       if (!sh_css_sp_is_running()) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_pipeline_request_stop() leaving\n");
+                                   "ia_css_pipeline_request_stop() leaving\n");
                /* queues are invalid */
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        }
@@ -255,8 +254,8 @@ enum ia_css_err ia_css_pipeline_request_stop(struct ia_css_pipeline *pipeline)
        sh_css_sp_uninit_pipeline(pipeline->pipe_num);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_pipeline_request_stop() leave: return_err=%d\n",
-                     err);
+                           "ia_css_pipeline_request_stop() leave: return_err=%d\n",
+                           err);
        return err;
 }
 
@@ -280,7 +279,8 @@ void ia_css_pipeline_clean(struct ia_css_pipeline *pipeline)
                pipeline_stage_destroy(s);
                s = next;
        }
-       pipeline_init_defaults(pipeline, pipeline->pipe_id, pipeline->pipe_num, pipeline->dvs_frame_delay);
+       pipeline_init_defaults(pipeline, pipeline->pipe_id, pipeline->pipe_num,
+                              pipeline->dvs_frame_delay);
 
        IA_CSS_LEAVE_PRIVATE("void");
 }
@@ -297,9 +297,9 @@ void ia_css_pipeline_clean(struct ia_css_pipeline *pipeline)
  * output arguments.
 */
 enum ia_css_err ia_css_pipeline_create_and_add_stage(
-               struct ia_css_pipeline *pipeline,
-               struct ia_css_pipeline_stage_desc *stage_desc,
-               struct ia_css_pipeline_stage **stage)
+    struct ia_css_pipeline *pipeline,
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_pipeline_stage **stage)
 {
        struct ia_css_pipeline_stage *last, *new_stage = NULL;
        enum ia_css_err err;
@@ -310,11 +310,11 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
        last = pipeline->stages;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_pipeline_create_and_add_stage() enter:\n");
+                           "ia_css_pipeline_create_and_add_stage() enter:\n");
        if (!stage_desc->binary && !stage_desc->firmware
            && (stage_desc->sp_func == IA_CSS_PIPELINE_NO_FUNC)) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                             "ia_css_pipeline_create_and_add_stage() done: Invalid args\n");
+                                   "ia_css_pipeline_create_and_add_stage() done: Invalid args\n");
 
                return IA_CSS_ERR_INTERNAL_ERROR;
        }
@@ -327,9 +327,9 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
         * stage, if no previous stage, it's an error.
         */
        if ((stage_desc->sp_func == IA_CSS_PIPELINE_NO_FUNC)
-               && (!stage_desc->in_frame)
-               && (!stage_desc->firmware)
-               && (!stage_desc->binary->online)) {
+           && (!stage_desc->in_frame)
+           && (!stage_desc->firmware)
+           && (!stage_desc->binary->online)) {
                /* Do this only for ISP stages*/
                if (last && last->args.out_frame[0])
                        stage_desc->in_frame = last->args.out_frame[0];
@@ -342,7 +342,7 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
        err = pipeline_stage_create(stage_desc, &new_stage);
        if (err != IA_CSS_SUCCESS) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                             "ia_css_pipeline_create_and_add_stage() done: stage_create_failed\n");
+                                   "ia_css_pipeline_create_and_add_stage() done: stage_create_failed\n");
                return err;
        }
 
@@ -356,12 +356,12 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
                *stage = new_stage;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_pipeline_create_and_add_stage() done:\n");
+                           "ia_css_pipeline_create_and_add_stage() done:\n");
        return IA_CSS_SUCCESS;
 }
 
 void ia_css_pipeline_finalize_stages(struct ia_css_pipeline *pipeline,
-                       bool continuous)
+                                    bool continuous)
 {
        unsigned int i = 0;
        struct ia_css_pipeline_stage *stage;
@@ -378,15 +378,15 @@ void ia_css_pipeline_finalize_stages(struct ia_css_pipeline *pipeline,
 }
 
 enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline,
-                                         int mode,
-                                         struct ia_css_pipeline_stage **stage)
+       int mode,
+       struct ia_css_pipeline_stage **stage)
 {
        struct ia_css_pipeline_stage *s;
 
        assert(pipeline);
        assert(stage);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_pipeline_get_stage() enter:\n");
+                           "ia_css_pipeline_get_stage() enter:\n");
        for (s = pipeline->stages; s; s = s->next) {
                if (s->mode == mode) {
                        *stage = s;
@@ -396,9 +396,10 @@ enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline,
        return IA_CSS_ERR_INTERNAL_ERROR;
 }
 
-enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeline,
-                         u32 fw_handle,
-                         struct ia_css_pipeline_stage **stage)
+enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline
+       *pipeline,
+       u32 fw_handle,
+       struct ia_css_pipeline_stage **stage)
 {
        struct ia_css_pipeline_stage *s;
 
@@ -414,9 +415,10 @@ enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeli
        return IA_CSS_ERR_INTERNAL_ERROR;
 }
 
-enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline *pipeline,
-                         u32 stage_num,
-                         uint32_t *fw_handle)
+enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline
+       *pipeline,
+       u32 stage_num,
+       uint32_t *fw_handle)
 {
        struct ia_css_pipeline_stage *s;
 
@@ -434,16 +436,16 @@ enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline *pipeli
 }
 
 enum ia_css_err ia_css_pipeline_get_output_stage(
-               struct ia_css_pipeline *pipeline,
-               int mode,
-               struct ia_css_pipeline_stage **stage)
+    struct ia_css_pipeline *pipeline,
+    int mode,
+    struct ia_css_pipeline_stage **stage)
 {
        struct ia_css_pipeline_stage *s;
 
        assert(pipeline);
        assert(stage);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                     "ia_css_pipeline_get_output_stage() enter:\n");
+                           "ia_css_pipeline_get_output_stage() enter:\n");
 
        *stage = NULL;
        /* First find acceleration firmware at end of pipe */
@@ -499,7 +501,8 @@ bool ia_css_pipeline_is_mapped(unsigned int key)
                return false;
        }
 
-       ret = (bool)(pipeline_num_to_sp_thread_map[key] != (unsigned int)PIPELINE_NUM_UNMAPPED);
+       ret = (bool)(pipeline_num_to_sp_thread_map[key] != (unsigned int)
+                    PIPELINE_NUM_UNMAPPED);
 
        IA_CSS_LEAVE_PRIVATE("return = %d", ret);
        return ret;
@@ -556,7 +559,7 @@ static void pipeline_map_num_to_sp_thread(unsigned int pipe_num)
 
        /* pipe is not mapped to any thread */
        assert(pipeline_num_to_sp_thread_map[pipe_num]
-               == (unsigned int)PIPELINE_NUM_UNMAPPED);
+              == (unsigned int)PIPELINE_NUM_UNMAPPED);
 
        for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++) {
                if (pipeline_sp_thread_list[i] ==
@@ -583,7 +586,7 @@ static void pipeline_unmap_num_to_sp_thread(unsigned int pipe_num)
        unsigned int thread_id;
 
        assert(pipeline_num_to_sp_thread_map[pipe_num]
-               != (unsigned int)PIPELINE_NUM_UNMAPPED);
+              != (unsigned int)PIPELINE_NUM_UNMAPPED);
 
        thread_id = pipeline_num_to_sp_thread_map[pipe_num];
        pipeline_num_to_sp_thread_map[pipe_num] = PIPELINE_NUM_UNMAPPED;
@@ -591,8 +594,8 @@ static void pipeline_unmap_num_to_sp_thread(unsigned int pipe_num)
 }
 
 static enum ia_css_err pipeline_stage_create(
-       struct ia_css_pipeline_stage_desc *stage_desc,
-       struct ia_css_pipeline_stage **new_stage)
+    struct ia_css_pipeline_stage_desc *stage_desc,
+    struct ia_css_pipeline_stage **new_stage)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_pipeline_stage *stage = NULL;
@@ -648,9 +651,9 @@ static enum ia_css_err pipeline_stage_create(
 
        for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
                if (!(out_frame[i]) && (binary)
-                       && (binary->out_frame_info[i].res.width)) {
+                   && (binary->out_frame_info[i].res.width)) {
                        err = ia_css_frame_allocate_from_info(&out_frame[i],
-                                                       &binary->out_frame_info[i]);
+                                                             &binary->out_frame_info[i]);
                        if (err != IA_CSS_SUCCESS)
                                goto ERR;
                        stage->out_frame_allocated[i] = true;
@@ -662,15 +665,15 @@ static enum ia_css_err pipeline_stage_create(
        if (!vf_frame) {
                if ((binary && binary->vf_frame_info.res.width) ||
                    (firmware && firmware->info.isp.sp.enable.vf_veceven)
-                   ) {
+                  ) {
                        err = ia_css_frame_allocate_from_info(&vf_frame,
-                                                       &binary->vf_frame_info);
+                                                             &binary->vf_frame_info);
                        if (err != IA_CSS_SUCCESS)
                                goto ERR;
                        stage->vf_frame_allocated = true;
                }
        } else if (vf_frame && binary && binary->vf_frame_info.res.width
-               && !firmware) {
+                  && !firmware) {
                /* only mark as allocated if buffer pointer available */
                if (vf_frame->data != mmgr_NULL)
                        stage->vf_frame_allocated = true;
@@ -689,10 +692,10 @@ ERR:
 }
 
 static void pipeline_init_defaults(
-       struct ia_css_pipeline *pipeline,
-       enum ia_css_pipe_id pipe_id,
-       unsigned int pipe_num,
-       unsigned int dvs_frame_delay)
+    struct ia_css_pipeline *pipeline,
+    enum ia_css_pipe_id pipe_id,
+    unsigned int pipe_num,
+    unsigned int dvs_frame_delay)
 {
        unsigned int i;
 
@@ -724,7 +727,8 @@ static void ia_css_pipeline_set_zoom_stage(struct ia_css_pipeline *pipeline)
                        stage->enable_zoom = true;
        } else if (pipeline->pipe_id == IA_CSS_PIPE_ID_CAPTURE) {
                /* in capture pipeline, capture_pp stage should do zoom */
-               err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP, &stage);
+               err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP,
+                                               &stage);
                if (err == IA_CSS_SUCCESS)
                        stage->enable_zoom = true;
        } else if (pipeline->pipe_id == IA_CSS_PIPE_ID_VIDEO) {
@@ -734,74 +738,76 @@ static void ia_css_pipeline_set_zoom_stage(struct ia_css_pipeline *pipeline)
                        stage->enable_zoom = true;
        } else if (pipeline->pipe_id == IA_CSS_PIPE_ID_YUVPP) {
                /* in yuvpp pipeline, first yuv_scaler stage should do zoom */
-               err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP, &stage);
+               err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP,
+                                               &stage);
                if (err == IA_CSS_SUCCESS)
                        stage->enable_zoom = true;
        }
 }
 
 static void
-ia_css_pipeline_configure_inout_port(struct ia_css_pipeline *me, bool continuous)
+ia_css_pipeline_configure_inout_port(struct ia_css_pipeline *me,
+                                    bool continuous)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "ia_css_pipeline_configure_inout_port() enter: pipe_id(%d) continuous(%d)\n",
-                       me->pipe_id, continuous);
+                           "ia_css_pipeline_configure_inout_port() enter: pipe_id(%d) continuous(%d)\n",
+                           me->pipe_id, continuous);
        switch (me->pipe_id) {
-               case IA_CSS_PIPE_ID_PREVIEW:
-               case IA_CSS_PIPE_ID_VIDEO:
-                       SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_INPUT,
-                                                  (uint8_t)(continuous ? SH_CSS_COPYSINK_TYPE : SH_CSS_HOST_TYPE), 1);
-                       SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_OUTPUT,
-                                                  (uint8_t)SH_CSS_HOST_TYPE, 1);
-                       break;
-               case IA_CSS_PIPE_ID_COPY: /*Copy pipe ports configured to "offline" mode*/
-                       SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_INPUT,
-                                                  (uint8_t)SH_CSS_HOST_TYPE, 1);
-                       if (continuous) {
-                               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_OUTPUT,
-                                                  (uint8_t)SH_CSS_COPYSINK_TYPE, 1);
-                               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_OUTPUT,
-                                                  (uint8_t)SH_CSS_TAGGERSINK_TYPE, 1);
-                       } else {
-                               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_OUTPUT,
-                                                  (uint8_t)SH_CSS_HOST_TYPE, 1);
-                       }
-                       break;
-               case IA_CSS_PIPE_ID_CAPTURE:
-                       SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_INPUT,
-                                                  (uint8_t)(continuous ? SH_CSS_TAGGERSINK_TYPE : SH_CSS_HOST_TYPE),
-                                                  1);
+       case IA_CSS_PIPE_ID_PREVIEW:
+       case IA_CSS_PIPE_ID_VIDEO:
+               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+                                           (uint8_t)SH_CSS_PORT_INPUT,
+                                           (uint8_t)(continuous ? SH_CSS_COPYSINK_TYPE : SH_CSS_HOST_TYPE), 1);
+               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+                                           (uint8_t)SH_CSS_PORT_OUTPUT,
+                                           (uint8_t)SH_CSS_HOST_TYPE, 1);
+               break;
+       case IA_CSS_PIPE_ID_COPY: /*Copy pipe ports configured to "offline" mode*/
+               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+                                           (uint8_t)SH_CSS_PORT_INPUT,
+                                           (uint8_t)SH_CSS_HOST_TYPE, 1);
+               if (continuous) {
                        SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_OUTPUT,
-                                                  (uint8_t)SH_CSS_HOST_TYPE, 1);
-                       break;
-               case IA_CSS_PIPE_ID_YUVPP:
-                       SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_INPUT,
-                                                  (uint8_t)(SH_CSS_HOST_TYPE), 1);
-                       SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_OUTPUT,
-                                                  (uint8_t)SH_CSS_HOST_TYPE, 1);
-                       break;
-               case IA_CSS_PIPE_ID_ACC:
+                                                   (uint8_t)SH_CSS_PORT_OUTPUT,
+                                                   (uint8_t)SH_CSS_COPYSINK_TYPE, 1);
                        SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_INPUT,
-                                                  (uint8_t)SH_CSS_HOST_TYPE, 1);
+                                                   (uint8_t)SH_CSS_PORT_OUTPUT,
+                                                   (uint8_t)SH_CSS_TAGGERSINK_TYPE, 1);
+               } else {
                        SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
-                                                  (uint8_t)SH_CSS_PORT_OUTPUT,
-                                                  (uint8_t)SH_CSS_HOST_TYPE, 1);
-                       break;
-               default:
-                       break;
+                                                   (uint8_t)SH_CSS_PORT_OUTPUT,
+                                                   (uint8_t)SH_CSS_HOST_TYPE, 1);
+               }
+               break;
+       case IA_CSS_PIPE_ID_CAPTURE:
+               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+                                           (uint8_t)SH_CSS_PORT_INPUT,
+                                           (uint8_t)(continuous ? SH_CSS_TAGGERSINK_TYPE : SH_CSS_HOST_TYPE),
+                                           1);
+               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+                                           (uint8_t)SH_CSS_PORT_OUTPUT,
+                                           (uint8_t)SH_CSS_HOST_TYPE, 1);
+               break;
+       case IA_CSS_PIPE_ID_YUVPP:
+               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+                                           (uint8_t)SH_CSS_PORT_INPUT,
+                                           (uint8_t)(SH_CSS_HOST_TYPE), 1);
+               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+                                           (uint8_t)SH_CSS_PORT_OUTPUT,
+                                           (uint8_t)SH_CSS_HOST_TYPE, 1);
+               break;
+       case IA_CSS_PIPE_ID_ACC:
+               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+                                           (uint8_t)SH_CSS_PORT_INPUT,
+                                           (uint8_t)SH_CSS_HOST_TYPE, 1);
+               SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+                                           (uint8_t)SH_CSS_PORT_OUTPUT,
+                                           (uint8_t)SH_CSS_HOST_TYPE, 1);
+               break;
+       default:
+               break;
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "ia_css_pipeline_configure_inout_port() leave: inout_port_config(%x)\n",
-               me->inout_port_config);
+                           "ia_css_pipeline_configure_inout_port() leave: inout_port_config(%x)\n",
+                           me->inout_port_config);
 }
index 9eb46411ac8b990d8a9a3b95e4d9d5768ab62626..d1ef2179e7295ad619c3eedb193d11a31f8f55a1 100644 (file)
@@ -60,8 +60,8 @@ typedef struct ia_css_queue ia_css_queue_t;
  *
  */
 int ia_css_queue_local_init(
-                       ia_css_queue_t *qhandle,
-                       ia_css_queue_local_t *desc);
+    ia_css_queue_t *qhandle,
+    ia_css_queue_local_t *desc);
 
 /* @brief Initialize a remote queue instance
  *
@@ -71,8 +71,8 @@ int ia_css_queue_local_init(
  * @return     EINVAL - Invalid argument.
  */
 int ia_css_queue_remote_init(
-                       ia_css_queue_t *qhandle,
-                       ia_css_queue_remote_t *desc);
+    ia_css_queue_t *qhandle,
+    ia_css_queue_remote_t *desc);
 
 /* @brief Uninitialize a queue instance
  *
@@ -81,7 +81,7 @@ int ia_css_queue_remote_init(
  *
  */
 int ia_css_queue_uninit(
-                       ia_css_queue_t *qhandle);
+    ia_css_queue_t *qhandle);
 
 /* @brief Enqueue an item in the queue instance
  *
@@ -93,8 +93,8 @@ int ia_css_queue_uninit(
  *
  */
 int ia_css_queue_enqueue(
-                       ia_css_queue_t *qhandle,
-                       uint32_t item);
+    ia_css_queue_t *qhandle,
+    uint32_t item);
 
 /* @brief Dequeue an item from the queue instance
  *
@@ -107,8 +107,8 @@ int ia_css_queue_enqueue(
  *
  */
 int ia_css_queue_dequeue(
-                       ia_css_queue_t *qhandle,
-                       uint32_t *item);
+    ia_css_queue_t *qhandle,
+    uint32_t *item);
 
 /* @brief Check if the queue is empty
  *
@@ -120,8 +120,8 @@ int ia_css_queue_dequeue(
  *
  */
 int ia_css_queue_is_empty(
-                       ia_css_queue_t *qhandle,
-                       bool *is_empty);
+    ia_css_queue_t *qhandle,
+    bool *is_empty);
 
 /* @brief Check if the queue is full
  *
@@ -133,8 +133,8 @@ int ia_css_queue_is_empty(
  *
  */
 int ia_css_queue_is_full(
-                       ia_css_queue_t *qhandle,
-                       bool *is_full);
+    ia_css_queue_t *qhandle,
+    bool *is_full);
 
 /* @brief Get used space in the queue
  *
@@ -145,8 +145,8 @@ int ia_css_queue_is_full(
  *
  */
 int ia_css_queue_get_used_space(
-                       ia_css_queue_t *qhandle,
-                       uint32_t *size);
+    ia_css_queue_t *qhandle,
+    uint32_t *size);
 
 /* @brief Get free space in the queue
  *
@@ -157,8 +157,8 @@ int ia_css_queue_get_used_space(
  *
  */
 int ia_css_queue_get_free_space(
-                       ia_css_queue_t *qhandle,
-                       uint32_t *size);
+    ia_css_queue_t *qhandle,
+    uint32_t *size);
 
 /* @brief Peek at an element in the queue
  *
@@ -171,9 +171,9 @@ int ia_css_queue_get_free_space(
  *
  */
 int ia_css_queue_peek(
-               ia_css_queue_t *qhandle,
-               u32 offset,
-               uint32_t *element);
+    ia_css_queue_t *qhandle,
+    u32 offset,
+    uint32_t *element);
 
 /* @brief Get the usable size for the queue
  *
@@ -185,7 +185,7 @@ int ia_css_queue_peek(
  *
  */
 int ia_css_queue_get_size(
-               ia_css_queue_t *qhandle,
-               uint32_t *size);
+    ia_css_queue_t *qhandle,
+    uint32_t *size);
 
 #endif /* __IA_CSS_QUEUE_H */
index d8746e7f6a6868138637abbd9b98aedb364278d8..dd79c6f180af503b3503dc0e274e60e72b67ae33 100644 (file)
  * Queue Public APIs
  *****************************************************************************/
 int ia_css_queue_local_init(
-                       ia_css_queue_t *qhandle,
-                       ia_css_queue_local_t *desc)
+    ia_css_queue_t *qhandle,
+    ia_css_queue_local_t *desc)
 {
        if (NULL == qhandle || NULL == desc
-               || NULL == desc->cb_elems || NULL == desc->cb_desc) {
+           || NULL == desc->cb_elems || NULL == desc->cb_desc) {
                /* Invalid parameters, return error*/
                return EINVAL;
        }
@@ -36,15 +36,15 @@ int ia_css_queue_local_init(
 
        /* Create a local circular buffer queue*/
        ia_css_circbuf_create(&qhandle->desc.cb_local,
-             desc->cb_elems,
-             desc->cb_desc);
+                             desc->cb_elems,
+                             desc->cb_desc);
 
        return 0;
 }
 
 int ia_css_queue_remote_init(
-                       ia_css_queue_t *qhandle,
-                       ia_css_queue_remote_t *desc)
+    ia_css_queue_t *qhandle,
+    ia_css_queue_remote_t *desc)
 {
        if (NULL == qhandle || NULL == desc) {
                /* Invalid parameters, return error*/
@@ -69,7 +69,7 @@ int ia_css_queue_remote_init(
 }
 
 int ia_css_queue_uninit(
-                       ia_css_queue_t *qhandle)
+    ia_css_queue_t *qhandle)
 {
        if (!qhandle)
                return EINVAL;
@@ -84,8 +84,8 @@ int ia_css_queue_uninit(
 }
 
 int ia_css_queue_enqueue(
-                       ia_css_queue_t *qhandle,
-                       uint32_t item)
+    ia_css_queue_t *qhandle,
+    uint32_t item)
 {
        int error = 0;
 
@@ -143,8 +143,8 @@ int ia_css_queue_enqueue(
 }
 
 int ia_css_queue_dequeue(
-                       ia_css_queue_t *qhandle,
-                       uint32_t *item)
+    ia_css_queue_t *qhandle,
+    uint32_t *item)
 {
        int error = 0;
 
@@ -200,8 +200,8 @@ int ia_css_queue_dequeue(
 }
 
 int ia_css_queue_is_full(
-                       ia_css_queue_t *qhandle,
-                       bool *is_full)
+    ia_css_queue_t *qhandle,
+    bool *is_full)
 {
        int error = 0;
 
@@ -234,8 +234,8 @@ int ia_css_queue_is_full(
 }
 
 int ia_css_queue_get_free_space(
-                       ia_css_queue_t *qhandle,
-                       uint32_t *size)
+    ia_css_queue_t *qhandle,
+    uint32_t *size)
 {
        int error = 0;
 
@@ -268,8 +268,8 @@ int ia_css_queue_get_free_space(
 }
 
 int ia_css_queue_get_used_space(
-                       ia_css_queue_t *qhandle,
-                       uint32_t *size)
+    ia_css_queue_t *qhandle,
+    uint32_t *size)
 {
        int error = 0;
 
@@ -302,9 +302,9 @@ int ia_css_queue_get_used_space(
 }
 
 int ia_css_queue_peek(
-               ia_css_queue_t *qhandle,
-               u32 offset,
-               uint32_t *element)
+    ia_css_queue_t *qhandle,
+    u32 offset,
+    uint32_t *element)
 {
        u32 num_elems = 0;
        int error = 0;
@@ -354,8 +354,8 @@ int ia_css_queue_peek(
 }
 
 int ia_css_queue_is_empty(
-                       ia_css_queue_t *qhandle,
-                       bool *is_empty)
+    ia_css_queue_t *qhandle,
+    bool *is_empty)
 {
        int error = 0;
 
@@ -388,8 +388,8 @@ int ia_css_queue_is_empty(
 }
 
 int ia_css_queue_get_size(
-                       ia_css_queue_t *qhandle,
-                       uint32_t *size)
+    ia_css_queue_t *qhandle,
+    uint32_t *size)
 {
        int error = 0;
 
index d9243184c112bebdbbfcc6308f8a165c21e7c656..3b2a06655e99bbefebcf912b783f19fa3bde1e37 100644 (file)
@@ -36,9 +36,9 @@ more details.
 #include "assert_support.h"
 
 int ia_css_queue_load(
-               struct ia_css_queue *rdesc,
-               ia_css_circbuf_desc_t *cb_desc,
-               uint32_t ignore_desc_flags)
+    struct ia_css_queue *rdesc,
+    ia_css_circbuf_desc_t *cb_desc,
+    uint32_t ignore_desc_flags)
 {
        if (!rdesc || !cb_desc)
                return EINVAL;
@@ -48,8 +48,8 @@ int ia_css_queue_load(
 
                if (0 == (ignore_desc_flags & QUEUE_IGNORE_SIZE_FLAG)) {
                        cb_desc->size = sp_dmem_load_uint8(rdesc->proc_id,
-                               rdesc->desc.remote.cb_desc_addr
-                               + offsetof(ia_css_circbuf_desc_t, size));
+                                                          rdesc->desc.remote.cb_desc_addr
+                                                          + offsetof(ia_css_circbuf_desc_t, size));
 
                        if (cb_desc->size == 0) {
                                /* Adding back the workaround which was removed
@@ -64,24 +64,24 @@ int ia_css_queue_load(
 
                if (0 == (ignore_desc_flags & QUEUE_IGNORE_START_FLAG))
                        cb_desc->start = sp_dmem_load_uint8(rdesc->proc_id,
-                               rdesc->desc.remote.cb_desc_addr
-                               + offsetof(ia_css_circbuf_desc_t, start));
+                                                           rdesc->desc.remote.cb_desc_addr
+                                                           + offsetof(ia_css_circbuf_desc_t, start));
 
                if (0 == (ignore_desc_flags & QUEUE_IGNORE_END_FLAG))
                        cb_desc->end = sp_dmem_load_uint8(rdesc->proc_id,
-                               rdesc->desc.remote.cb_desc_addr
-                               + offsetof(ia_css_circbuf_desc_t, end));
+                                                         rdesc->desc.remote.cb_desc_addr
+                                                         + offsetof(ia_css_circbuf_desc_t, end));
 
                if (0 == (ignore_desc_flags & QUEUE_IGNORE_STEP_FLAG))
                        cb_desc->step = sp_dmem_load_uint8(rdesc->proc_id,
-                               rdesc->desc.remote.cb_desc_addr
-                               + offsetof(ia_css_circbuf_desc_t, step));
+                                                          rdesc->desc.remote.cb_desc_addr
+                                                          + offsetof(ia_css_circbuf_desc_t, step));
 
        } else if (rdesc->location == IA_CSS_QUEUE_LOC_HOST) {
                /* doing DMA transfer of entire structure */
                mmgr_load(rdesc->desc.remote.cb_desc_addr,
-                       (void *)cb_desc,
-                       sizeof(ia_css_circbuf_desc_t));
+                         (void *)cb_desc,
+                         sizeof(ia_css_circbuf_desc_t));
        } else if (rdesc->location == IA_CSS_QUEUE_LOC_ISP) {
                /* Not supported yet */
                return ENOTSUP;
@@ -91,9 +91,9 @@ int ia_css_queue_load(
 }
 
 int ia_css_queue_store(
-               struct ia_css_queue *rdesc,
-               ia_css_circbuf_desc_t *cb_desc,
-               uint32_t ignore_desc_flags)
+    struct ia_css_queue *rdesc,
+    ia_css_circbuf_desc_t *cb_desc,
+    uint32_t ignore_desc_flags)
 {
        if (!rdesc || !cb_desc)
                return EINVAL;
@@ -103,32 +103,32 @@ int ia_css_queue_store(
 
                if (0 == (ignore_desc_flags & QUEUE_IGNORE_SIZE_FLAG))
                        sp_dmem_store_uint8(rdesc->proc_id,
-                               rdesc->desc.remote.cb_desc_addr
-                               + offsetof(ia_css_circbuf_desc_t, size),
-                               cb_desc->size);
+                                           rdesc->desc.remote.cb_desc_addr
+                                           + offsetof(ia_css_circbuf_desc_t, size),
+                                           cb_desc->size);
 
                if (0 == (ignore_desc_flags & QUEUE_IGNORE_START_FLAG))
                        sp_dmem_store_uint8(rdesc->proc_id,
-                               rdesc->desc.remote.cb_desc_addr
-                               + offsetof(ia_css_circbuf_desc_t, start),
-                               cb_desc->start);
+                                           rdesc->desc.remote.cb_desc_addr
+                                           + offsetof(ia_css_circbuf_desc_t, start),
+                                           cb_desc->start);
 
                if (0 == (ignore_desc_flags & QUEUE_IGNORE_END_FLAG))
                        sp_dmem_store_uint8(rdesc->proc_id,
-                               rdesc->desc.remote.cb_desc_addr
-                               + offsetof(ia_css_circbuf_desc_t, end),
-                               cb_desc->end);
+                                           rdesc->desc.remote.cb_desc_addr
+                                           + offsetof(ia_css_circbuf_desc_t, end),
+                                           cb_desc->end);
 
                if (0 == (ignore_desc_flags & QUEUE_IGNORE_STEP_FLAG))
                        sp_dmem_store_uint8(rdesc->proc_id,
-                               rdesc->desc.remote.cb_desc_addr
-                               + offsetof(ia_css_circbuf_desc_t, step),
-                               cb_desc->step);
+                                           rdesc->desc.remote.cb_desc_addr
+                                           + offsetof(ia_css_circbuf_desc_t, step),
+                                           cb_desc->step);
        } else if (rdesc->location == IA_CSS_QUEUE_LOC_HOST) {
                /* doing DMA transfer of entire structure */
                mmgr_store(rdesc->desc.remote.cb_desc_addr,
-                       (void *)cb_desc,
-                       sizeof(ia_css_circbuf_desc_t));
+                          (void *)cb_desc,
+                          sizeof(ia_css_circbuf_desc_t));
        } else if (rdesc->location == IA_CSS_QUEUE_LOC_ISP) {
                /* Not supported yet */
                return ENOTSUP;
@@ -138,24 +138,24 @@ int ia_css_queue_store(
 }
 
 int ia_css_queue_item_load(
-               struct ia_css_queue *rdesc,
-               u8 position,
-               ia_css_circbuf_elem_t *item)
+    struct ia_css_queue *rdesc,
+    u8 position,
+    ia_css_circbuf_elem_t *item)
 {
        if (!rdesc || !item)
                return EINVAL;
 
        if (rdesc->location == IA_CSS_QUEUE_LOC_SP) {
                sp_dmem_load(rdesc->proc_id,
-                       rdesc->desc.remote.cb_elems_addr
-                       + position * sizeof(ia_css_circbuf_elem_t),
-                       item,
-                       sizeof(ia_css_circbuf_elem_t));
+                            rdesc->desc.remote.cb_elems_addr
+                            + position * sizeof(ia_css_circbuf_elem_t),
+                            item,
+                            sizeof(ia_css_circbuf_elem_t));
        } else if (rdesc->location == IA_CSS_QUEUE_LOC_HOST) {
                mmgr_load(rdesc->desc.remote.cb_elems_addr
-                       + position * sizeof(ia_css_circbuf_elem_t),
-                       (void *)item,
-                       sizeof(ia_css_circbuf_elem_t));
+                         + position * sizeof(ia_css_circbuf_elem_t),
+                         (void *)item,
+                         sizeof(ia_css_circbuf_elem_t));
        } else if (rdesc->location == IA_CSS_QUEUE_LOC_ISP) {
                /* Not supported yet */
                return ENOTSUP;
@@ -165,24 +165,24 @@ int ia_css_queue_item_load(
 }
 
 int ia_css_queue_item_store(
-               struct ia_css_queue *rdesc,
-               u8 position,
-               ia_css_circbuf_elem_t *item)
+    struct ia_css_queue *rdesc,
+    u8 position,
+    ia_css_circbuf_elem_t *item)
 {
        if (!rdesc || !item)
                return EINVAL;
 
        if (rdesc->location == IA_CSS_QUEUE_LOC_SP) {
                sp_dmem_store(rdesc->proc_id,
-                       rdesc->desc.remote.cb_elems_addr
-                       + position * sizeof(ia_css_circbuf_elem_t),
-                       item,
-                       sizeof(ia_css_circbuf_elem_t));
+                             rdesc->desc.remote.cb_elems_addr
+                             + position * sizeof(ia_css_circbuf_elem_t),
+                             item,
+                             sizeof(ia_css_circbuf_elem_t));
        } else if (rdesc->location == IA_CSS_QUEUE_LOC_HOST) {
                mmgr_store(rdesc->desc.remote.cb_elems_addr
-                       + position * sizeof(ia_css_circbuf_elem_t),
-                       (void *)item,
-                       sizeof(ia_css_circbuf_elem_t));
+                          + position * sizeof(ia_css_circbuf_elem_t),
+                          (void *)item,
+                          sizeof(ia_css_circbuf_elem_t));
        } else if (rdesc->location == IA_CSS_QUEUE_LOC_ISP) {
                /* Not supported yet */
                return ENOTSUP;
index 3438288474bdc3d64ab2308df797fc8e48afe65c..6922b741a1165ea72a8b9786a6c8531bd7691ac0 100644 (file)
@@ -79,23 +79,23 @@ struct ia_css_queue {
 };
 
 int ia_css_queue_load(
-               struct ia_css_queue *rdesc,
-               ia_css_circbuf_desc_t *cb_desc,
-               uint32_t ignore_desc_flags);
+    struct ia_css_queue *rdesc,
+    ia_css_circbuf_desc_t *cb_desc,
+    uint32_t ignore_desc_flags);
 
 int ia_css_queue_store(
-               struct ia_css_queue *rdesc,
-               ia_css_circbuf_desc_t *cb_desc,
-               uint32_t ignore_desc_flags);
+    struct ia_css_queue *rdesc,
+    ia_css_circbuf_desc_t *cb_desc,
+    uint32_t ignore_desc_flags);
 
 int ia_css_queue_item_load(
-               struct ia_css_queue *rdesc,
-               u8 position,
-               ia_css_circbuf_elem_t *item);
+    struct ia_css_queue *rdesc,
+    u8 position,
+    ia_css_circbuf_elem_t *item);
 
 int ia_css_queue_item_store(
-               struct ia_css_queue *rdesc,
-               u8 position,
-               ia_css_circbuf_elem_t *item);
+    struct ia_css_queue *rdesc,
+    u8 position,
+    ia_css_circbuf_elem_t *item);
 
 #endif /* __QUEUE_ACCESS_H */
index b81acc80d861edd3fe41e212b701028eb14013bd..0046c6d49a87292a2fa096b064cdcc1f245830d6 100644 (file)
@@ -68,7 +68,7 @@ extern struct ia_css_rmgr_vbuf_pool *hmm_buffer_pool;
  * @param pool The pointer to the pool
  */
 STORAGE_CLASS_RMGR_H enum ia_css_err ia_css_rmgr_init_vbuf(
-       struct ia_css_rmgr_vbuf_pool *pool);
+    struct ia_css_rmgr_vbuf_pool *pool);
 
 /**
  * @brief Uninitialize the resource pool (host, vbuf)
@@ -76,7 +76,7 @@ STORAGE_CLASS_RMGR_H enum ia_css_err ia_css_rmgr_init_vbuf(
  * @param pool The pointer to the pool
  */
 STORAGE_CLASS_RMGR_H void ia_css_rmgr_uninit_vbuf(
-       struct ia_css_rmgr_vbuf_pool *pool);
+    struct ia_css_rmgr_vbuf_pool *pool);
 
 /**
  * @brief Acquire a handle from the pool (host, vbuf)
@@ -85,8 +85,8 @@ STORAGE_CLASS_RMGR_H void ia_css_rmgr_uninit_vbuf(
  * @param handle       The pointer to the handle
  */
 STORAGE_CLASS_RMGR_H void ia_css_rmgr_acq_vbuf(
-       struct ia_css_rmgr_vbuf_pool *pool,
-       struct ia_css_rmgr_vbuf_handle **handle);
+    struct ia_css_rmgr_vbuf_pool *pool,
+    struct ia_css_rmgr_vbuf_handle **handle);
 
 /**
  * @brief Release a handle to the pool (host, vbuf)
@@ -95,8 +95,8 @@ STORAGE_CLASS_RMGR_H void ia_css_rmgr_acq_vbuf(
  * @param handle       The pointer to the handle
  */
 STORAGE_CLASS_RMGR_H void ia_css_rmgr_rel_vbuf(
-       struct ia_css_rmgr_vbuf_pool *pool,
-       struct ia_css_rmgr_vbuf_handle **handle);
+    struct ia_css_rmgr_vbuf_pool *pool,
+    struct ia_css_rmgr_vbuf_handle **handle);
 
 /**
  * @brief Retain the reference count for a handle (host, vbuf)
index d49f50b61931287404861cd969e9e6fff9db4494..2c204dceb4915937c37f54283640a71d4d636601 100644 (file)
@@ -101,7 +101,7 @@ void ia_css_rmgr_refcount_retain_vbuf(struct ia_css_rmgr_vbuf_handle **handle)
                 */
                if (!*handle) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
-                               "ia_css_i_host_refcount_retain_vbuf() failed to find empty slot!\n");
+                                           "ia_css_i_host_refcount_retain_vbuf() failed to find empty slot!\n");
                        return;
                }
                (*handle)->vptr = h->vptr;
@@ -176,7 +176,8 @@ void ia_css_rmgr_uninit_vbuf(struct ia_css_rmgr_vbuf_pool *pool)
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_rmgr_uninit_vbuf()\n");
        if (!pool) {
-               ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR, "ia_css_rmgr_uninit_vbuf(): NULL argument\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
+                                   "ia_css_rmgr_uninit_vbuf(): NULL argument\n");
                return;
        }
        if (pool->handles) {
@@ -184,14 +185,14 @@ void ia_css_rmgr_uninit_vbuf(struct ia_css_rmgr_vbuf_pool *pool)
                for (i = 0; i < pool->size; i++) {
                        if (pool->handles[i]) {
                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                                     "   freeing/releasing %x (count=%d)\n",
-                                     pool->handles[i]->vptr,
-                                     pool->handles[i]->count);
+                                                   "   freeing/releasing %x (count=%d)\n",
+                                                   pool->handles[i]->vptr,
+                                                   pool->handles[i]->count);
                                /* free memory */
                                hmm_free(pool->handles[i]->vptr);
                                /* remove from refcount admin */
                                ia_css_rmgr_refcount_release_vbuf(
-                                       &pool->handles[i]);
+                                   &pool->handles[i]);
                        }
                }
                /* now free the pool handles list */
index 39b82c4685e7284f76bf6b558c6f9fbeef9bd00d..64a517148ff9fe7ac795108db46225b0c789689d 100644 (file)
@@ -55,7 +55,7 @@ hrt_vaddress get_sp_code_addr(sp_ID_t  sp_id);
 /* ! Load firmware on to specfied SP
 */
 enum ia_css_err ia_css_spctrl_load_fw(sp_ID_t sp_id,
-                       ia_css_spctrl_cfg *spctrl_cfg);
+                                     ia_css_spctrl_cfg *spctrl_cfg);
 
 #ifdef ISP2401
 /*! Setup registers for reloading FW */
index 6166619c24325bfb6173822fd8d36290bdf204c9..c4093945973c43056272bff27693f2c30c8f5376 100644 (file)
@@ -52,7 +52,7 @@ static bool spctrl_loaded[N_SP_ID] = {0};
 
 /* Load firmware */
 enum ia_css_err ia_css_spctrl_load_fw(sp_ID_t sp_id,
-                               ia_css_spctrl_cfg *spctrl_cfg)
+                                     ia_css_spctrl_cfg *spctrl_cfg)
 {
        hrt_vaddress code_addr = mmgr_NULL;
        struct ia_css_sp_init_dmem_cfg *init_dmem_cfg;
@@ -69,8 +69,10 @@ enum ia_css_err ia_css_spctrl_load_fw(sp_ID_t sp_id,
        init_dmem_cfg->bss_size       = spctrl_cfg->bss_size;
        init_dmem_cfg->sp_id          = sp_id;
 
-       spctrl_cofig_info[sp_id].spctrl_config_dmem_addr = spctrl_cfg->spctrl_config_dmem_addr;
-       spctrl_cofig_info[sp_id].spctrl_state_dmem_addr = spctrl_cfg->spctrl_state_dmem_addr;
+       spctrl_cofig_info[sp_id].spctrl_config_dmem_addr =
+           spctrl_cfg->spctrl_config_dmem_addr;
+       spctrl_cofig_info[sp_id].spctrl_state_dmem_addr =
+           spctrl_cfg->spctrl_state_dmem_addr;
 
        /* store code (text + icache) and data to DDR
         *
@@ -106,7 +108,8 @@ enum ia_css_err ia_css_spctrl_load_fw(sp_ID_t sp_id,
        /* now we program the base address into the icache and
         * invalidate the cache.
         */
-       sp_ctrl_store(sp_id, SP_ICACHE_ADDR_REG, (hrt_data)spctrl_cofig_info[sp_id].code_addr);
+       sp_ctrl_store(sp_id, SP_ICACHE_ADDR_REG,
+                     (hrt_data)spctrl_cofig_info[sp_id].code_addr);
        sp_ctrl_setbit(sp_id, SP_ICACHE_INV_REG, SP_ICACHE_INV_BIT);
        spctrl_loaded[sp_id] = true;
        return IA_CSS_SUCCESS;
@@ -119,7 +122,8 @@ void sh_css_spctrl_reload_fw(sp_ID_t sp_id)
        /* now we program the base address into the icache and
        * invalidate the cache.
        */
-       sp_ctrl_store(sp_id, SP_ICACHE_ADDR_REG, (hrt_data)spctrl_cofig_info[sp_id].code_addr);
+       sp_ctrl_store(sp_id, SP_ICACHE_ADDR_REG,
+                     (hrt_data)spctrl_cofig_info[sp_id].code_addr);
        sp_ctrl_setbit(sp_id, SP_ICACHE_INV_REG, SP_ICACHE_INV_BIT);
        spctrl_loaded[sp_id] = true;
 }
@@ -157,11 +161,12 @@ enum ia_css_err ia_css_spctrl_start(sp_ID_t sp_id)
        assert(sizeof(unsigned int) <= sizeof(hrt_data));
 
        sp_dmem_store(sp_id,
-               spctrl_cofig_info[sp_id].spctrl_config_dmem_addr,
-               &spctrl_cofig_info[sp_id].dmem_config,
-               sizeof(spctrl_cofig_info[sp_id].dmem_config));
+                     spctrl_cofig_info[sp_id].spctrl_config_dmem_addr,
+                     &spctrl_cofig_info[sp_id].dmem_config,
+                     sizeof(spctrl_cofig_info[sp_id].dmem_config));
        /* set the start address */
-       sp_ctrl_store(sp_id, SP_START_ADDR_REG, (hrt_data)spctrl_cofig_info[sp_id].sp_entry);
+       sp_ctrl_store(sp_id, SP_START_ADDR_REG,
+                     (hrt_data)spctrl_cofig_info[sp_id].sp_entry);
        sp_ctrl_setbit(sp_id, SP_SC_REG, SP_RUN_BIT);
        sp_ctrl_setbit(sp_id, SP_SC_REG, SP_START_BIT);
        return IA_CSS_SUCCESS;
index c1d63e5a26566de320e2a6319c34ccb7dc29fb77..fe1e53085cbee24a91051558cdcc0ebaf0a527c5 100644 (file)
@@ -36,9 +36,10 @@ more details.
 
 enum ia_css_err
 ia_css_timer_get_current_tick(
-       struct ia_css_clock_tick *curr_ts) {
+    struct ia_css_clock_tick *curr_ts) {
        assert(curr_ts);
-       if (!curr_ts) {
+       if (!curr_ts)
+       {
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
        curr_ts->ticks = (clock_value_t)gp_timer_read(GP_TIMER_SEL);
index e094d1c3ea4dc94ad825371042befcd52334ef31..91251faa9b49a3d3c91360c55272d5409a46b2dc 100644 (file)
@@ -130,13 +130,16 @@ enum ia_sh_css_modes {
    the stream seed contains all the data required to "grow" the seed again after it was closed.
 */
 struct sh_css_stream_seed {
-       struct ia_css_stream            **orig_stream;                /* pointer to restore the original handle */
+       struct ia_css_stream
+               **orig_stream;                /* pointer to restore the original handle */
        struct ia_css_stream            *stream;                      /* handle, used as ID too.*/
        struct ia_css_stream_config     stream_config;                          /* stream config struct */
        int                             num_pipes;
        struct ia_css_pipe              *pipes[IA_CSS_PIPE_ID_NUM];                     /* pipe handles */
-       struct ia_css_pipe              **orig_pipes[IA_CSS_PIPE_ID_NUM];       /* pointer to restore original handle */
-       struct ia_css_pipe_config       pipe_config[IA_CSS_PIPE_ID_NUM];        /* pipe config structs */
+       struct ia_css_pipe
+               **orig_pipes[IA_CSS_PIPE_ID_NUM];       /* pointer to restore original handle */
+       struct ia_css_pipe_config
+               pipe_config[IA_CSS_PIPE_ID_NUM];        /* pipe config structs */
 };
 
 #define MAX_ACTIVE_STREAMS     5
@@ -220,7 +223,8 @@ static bool
 sh_css_pipes_have_stopped(struct ia_css_stream *stream);
 
 static enum ia_css_err
-ia_css_pipe_check_format(struct ia_css_pipe *pipe, enum ia_css_frame_format format);
+ia_css_pipe_check_format(struct ia_css_pipe *pipe,
+                        enum ia_css_frame_format format);
 
 static enum ia_css_err
 check_pipe_resolutions(const struct ia_css_pipe *pipe);
@@ -229,18 +233,19 @@ check_pipe_resolutions(const struct ia_css_pipe *pipe);
 
 static enum ia_css_err
 ia_css_pipe_load_extension(struct ia_css_pipe *pipe,
-               struct ia_css_fw_info *firmware);
+                          struct ia_css_fw_info *firmware);
 
 static void
 ia_css_pipe_unload_extension(struct ia_css_pipe *pipe,
-               struct ia_css_fw_info *firmware);
+                            struct ia_css_fw_info *firmware);
 static void
 ia_css_reset_defaults(struct sh_css *css);
 
 static void
 sh_css_init_host_sp_control_vars(void);
 
-static enum ia_css_err set_num_primary_stages(unsigned int *num, enum ia_css_pipe_version version);
+static enum ia_css_err set_num_primary_stages(unsigned int *num,
+       enum ia_css_pipe_version version);
 
 static bool
 need_capture_pp(const struct ia_css_pipe *pipe);
@@ -249,16 +254,17 @@ static bool
 need_yuv_scaler_stage(const struct ia_css_pipe *pipe);
 
 static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output(
-       struct ia_css_frame_info *cas_scaler_in_info,
-       struct ia_css_frame_info *cas_scaler_out_info,
-       struct ia_css_frame_info *cas_scaler_vf_info,
-       struct ia_css_cas_binary_descr *descr);
+    struct ia_css_frame_info *cas_scaler_in_info,
+    struct ia_css_frame_info *cas_scaler_out_info,
+    struct ia_css_frame_info *cas_scaler_vf_info,
+    struct ia_css_cas_binary_descr *descr);
 
-static void ia_css_pipe_destroy_cas_scaler_desc(struct ia_css_cas_binary_descr *descr);
+static void ia_css_pipe_destroy_cas_scaler_desc(struct ia_css_cas_binary_descr
+       *descr);
 
 static bool
 need_downscaling(const struct ia_css_resolution in_res,
-               const struct ia_css_resolution out_res);
+                const struct ia_css_resolution out_res);
 
 static bool need_capt_ldc(const struct ia_css_pipe *pipe);
 
@@ -267,9 +273,9 @@ sh_css_pipe_load_binaries(struct ia_css_pipe *pipe);
 
 static
 enum ia_css_err sh_css_pipe_get_viewfinder_frame_info(
-       struct ia_css_pipe *pipe,
-       struct ia_css_frame_info *info,
-       unsigned int idx);
+    struct ia_css_pipe *pipe,
+    struct ia_css_frame_info *info,
+    unsigned int idx);
 
 static enum ia_css_err
 sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
@@ -292,15 +298,15 @@ static bool copy_on_sp(struct ia_css_pipe *pipe);
 
 static enum ia_css_err
 init_vf_frameinfo_defaults(struct ia_css_pipe *pipe,
-       struct ia_css_frame *vf_frame, unsigned int idx);
+                          struct ia_css_frame *vf_frame, unsigned int idx);
 
 static enum ia_css_err
 init_in_frameinfo_memory_defaults(struct ia_css_pipe *pipe,
-       struct ia_css_frame *frame, enum ia_css_frame_format format);
+                                 struct ia_css_frame *frame, enum ia_css_frame_format format);
 
 static enum ia_css_err
 init_out_frameinfo_defaults(struct ia_css_pipe *pipe,
-       struct ia_css_frame *out_frame, unsigned int idx);
+                           struct ia_css_frame *out_frame, unsigned int idx);
 
 static enum ia_css_err
 sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline,
@@ -308,13 +314,14 @@ sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline,
 
 static enum ia_css_err
 alloc_continuous_frames(
-       struct ia_css_pipe *pipe, bool init_time);
+    struct ia_css_pipe *pipe, bool init_time);
 
 static void
 pipe_global_init(void);
 
 static enum ia_css_err
-pipe_generate_pipe_num(const struct ia_css_pipe *pipe, unsigned int *pipe_number);
+pipe_generate_pipe_num(const struct ia_css_pipe *pipe,
+                      unsigned int *pipe_number);
 
 static void
 pipe_release_pipe_num(unsigned int pipe_num);
@@ -333,8 +340,8 @@ create_host_video_pipeline(struct ia_css_pipe *pipe);
 
 static enum ia_css_err
 create_host_copy_pipeline(struct ia_css_pipe *pipe,
-    unsigned int max_input_width,
-    struct ia_css_frame *out_frame);
+                         unsigned int max_input_width,
+                         struct ia_css_frame *out_frame);
 
 static enum ia_css_err
 create_host_isyscopy_capture_pipeline(struct ia_css_pipe *pipe);
@@ -351,7 +358,8 @@ create_host_acc_pipeline(struct ia_css_pipe *pipe);
 static unsigned int
 sh_css_get_sw_interrupt_value(unsigned int irq);
 
-static struct ia_css_binary *ia_css_pipe_get_shading_correction_binary(const struct ia_css_pipe *pipe);
+static struct ia_css_binary *ia_css_pipe_get_shading_correction_binary(
+    const struct ia_css_pipe *pipe);
 
 static struct ia_css_binary *
 ia_css_pipe_get_s3a_binary(const struct ia_css_pipe *pipe);
@@ -370,42 +378,45 @@ sh_css_hmm_buffer_record_reset(struct sh_css_hmm_buffer_record *buffer_record);
 
 static struct sh_css_hmm_buffer_record
 *sh_css_hmm_buffer_record_acquire(struct ia_css_rmgr_vbuf_handle *h_vbuf,
-                       enum ia_css_buffer_type type,
-                       hrt_address kernel_ptr);
+                                 enum ia_css_buffer_type type,
+                                 hrt_address kernel_ptr);
 
 static struct sh_css_hmm_buffer_record
 *sh_css_hmm_buffer_record_validate(hrt_vaddress ddr_buffer_addr,
-               enum ia_css_buffer_type type);
+                                  enum ia_css_buffer_type type);
 
 void
 ia_css_get_acc_configs(
-       struct ia_css_pipe *pipe,
-       struct ia_css_isp_config *config);
+    struct ia_css_pipe *pipe,
+    struct ia_css_isp_config *config);
 
 #if CONFIG_ON_FRAME_ENQUEUE()
-static enum ia_css_err set_config_on_frame_enqueue(struct ia_css_frame_info *info, struct frame_data_wrapper *frame);
+static enum ia_css_err set_config_on_frame_enqueue(struct ia_css_frame_info
+       *info, struct frame_data_wrapper *frame);
 #endif
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-static unsigned int get_crop_lines_for_bayer_order(const struct ia_css_stream_config *config);
-static unsigned int get_crop_columns_for_bayer_order(const struct ia_css_stream_config *config);
+static unsigned int get_crop_lines_for_bayer_order(const struct
+       ia_css_stream_config *config);
+static unsigned int get_crop_columns_for_bayer_order(const struct
+       ia_css_stream_config *config);
 static void get_pipe_extra_pixel(struct ia_css_pipe *pipe,
-               unsigned int *extra_row, unsigned int *extra_column);
+                                unsigned int *extra_row, unsigned int *extra_column);
 #endif
 
 #ifdef ISP2401
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
 static enum ia_css_err
 aspect_ratio_crop_init(struct ia_css_stream *curr_stream,
-               struct ia_css_pipe *pipes[],
-               bool *do_crop_status);
+                      struct ia_css_pipe *pipes[],
+                      bool *do_crop_status);
 
 static bool
 aspect_ratio_crop_check(bool enabled, struct ia_css_pipe *curr_pipe);
 
 static enum ia_css_err
 aspect_ratio_crop(struct ia_css_pipe *curr_pipe,
-               struct ia_css_resolution *effective_res);
+                 struct ia_css_resolution *effective_res);
 #endif
 
 #endif
@@ -452,15 +463,15 @@ static enum ia_css_frame_format yuv422_copy_formats[] = {
  * by the copy binary given the stream format.
  * */
 static enum ia_css_err
-verify_copy_out_frame_format(struct ia_css_pipe *pipe)
-{
+verify_copy_out_frame_format(struct ia_css_pipe *pipe) {
        enum ia_css_frame_format out_fmt = pipe->output_info[0].format;
        unsigned int i, found = 0;
 
        assert(pipe);
        assert(pipe->stream);
 
-       switch (pipe->stream->config.input_config.format) {
+       switch (pipe->stream->config.input_config.format)
+       {
        case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
        case ATOMISP_INPUT_FORMAT_YUV420_8:
                for (i = 0; i < ARRAY_SIZE(yuv420_copy_formats) && !found; i++)
@@ -498,7 +509,7 @@ verify_copy_out_frame_format(struct ia_css_pipe *pipe)
        case ATOMISP_INPUT_FORMAT_RAW_14:
        case ATOMISP_INPUT_FORMAT_RAW_16:
                found = (out_fmt == IA_CSS_FRAME_FORMAT_RAW) ||
-                       (out_fmt == IA_CSS_FRAME_FORMAT_RAW_PACKED);
+               (out_fmt == IA_CSS_FRAME_FORMAT_RAW_PACKED);
                break;
        case ATOMISP_INPUT_FORMAT_BINARY_8:
                found = (out_fmt == IA_CSS_FRAME_FORMAT_BINARY_8);
@@ -518,15 +529,14 @@ ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream)
 
        if (stream)
                bpp = ia_css_util_input_format_bpp(stream->config.input_config.format,
-                                               stream->config.pixels_per_clock == 2);
+                                                  stream->config.pixels_per_clock == 2);
 
        return bpp;
 }
 
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
 static enum ia_css_err
-sh_css_config_input_network(struct ia_css_stream *stream)
-{
+sh_css_config_input_network(struct ia_css_stream *stream) {
        unsigned int fmt_type;
        struct ia_css_pipe *pipe = stream->last_pipe;
        struct ia_css_binary *binary = NULL;
@@ -536,15 +546,15 @@ sh_css_config_input_network(struct ia_css_stream *stream)
        assert(pipe);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_config_input_network() enter:\n");
+                           "sh_css_config_input_network() enter:\n");
 
        if (pipe->pipeline.stages)
                binary = pipe->pipeline.stages->binary;
 
        err = ia_css_isys_convert_stream_format_to_mipi_format(
-                               stream->config.input_config.format,
-                               stream->csi_rx_config.comp,
-                               &fmt_type);
+           stream->config.input_config.format,
+           stream->csi_rx_config.comp,
+           &fmt_type);
        if (err != IA_CSS_SUCCESS)
                return err;
        sh_css_sp_program_input_circuit(fmt_type,
@@ -552,21 +562,24 @@ sh_css_config_input_network(struct ia_css_stream *stream)
                                        stream->config.mode);
 
        if ((binary && (binary->online || stream->config.continuous)) ||
-                       pipe->config.mode == IA_CSS_PIPE_MODE_COPY) {
+           pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
+       {
                err = ia_css_ifmtr_configure(&stream->config,
-                       binary);
+                                            binary);
                if (err != IA_CSS_SUCCESS)
                        return err;
        }
 
        if (stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
-           stream->config.mode == IA_CSS_INPUT_MODE_PRBS) {
+           stream->config.mode == IA_CSS_INPUT_MODE_PRBS)
+       {
                unsigned int hblank_cycles = 100,
-                            vblank_lines = 6,
-                            width,
-                            height,
-                            vblank_cycles;
-               width  = (stream->config.input_config.input_res.width) / (1 + (stream->config.pixels_per_clock == 2));
+               vblank_lines = 6,
+               width,
+               height,
+               vblank_cycles;
+               width  = (stream->config.input_config.input_res.width) / (1 +
+                       (stream->config.pixels_per_clock == 2));
                height = stream->config.input_config.input_res.height;
                vblank_cycles = vblank_lines * (width + hblank_cycles);
                sh_css_sp_configure_sync_gen(width, height, hblank_cycles,
@@ -574,19 +587,19 @@ sh_css_config_input_network(struct ia_css_stream *stream)
 #if defined(IS_ISP_2400_SYSTEM)
                if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG) {
                        /* TODO: move define to proper file in tools */
-                       #define GP_ISEL_TPG_MODE 0x90058
+#define GP_ISEL_TPG_MODE 0x90058
                        ia_css_device_store_uint32(GP_ISEL_TPG_MODE, 0);
                }
 #endif
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_config_input_network() leave:\n");
+                           "sh_css_config_input_network() leave:\n");
        return IA_CSS_SUCCESS;
 }
 #elif !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2401)
 static unsigned int csi2_protocol_calculate_max_subpixels_per_line(
-               enum atomisp_input_format       format,
-               unsigned int                    pixels_per_line)
+    enum atomisp_input_format  format,
+    unsigned int                       pixels_per_line)
 {
        unsigned int rval;
 
@@ -710,8 +723,8 @@ static unsigned int csi2_protocol_calculate_max_subpixels_per_line(
 }
 
 static bool sh_css_translate_stream_cfg_to_input_system_input_port_id(
-               struct ia_css_stream_config *stream_cfg,
-               ia_css_isys_descr_t     *isys_stream_descr)
+    struct ia_css_stream_config *stream_cfg,
+    ia_css_isys_descr_t        *isys_stream_descr)
 {
        bool rc;
 
@@ -759,8 +772,8 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_id(
 }
 
 static bool sh_css_translate_stream_cfg_to_input_system_input_port_type(
-               struct ia_css_stream_config *stream_cfg,
-               ia_css_isys_descr_t     *isys_stream_descr)
+    struct ia_css_stream_config *stream_cfg,
+    ia_css_isys_descr_t        *isys_stream_descr)
 {
        bool rc;
 
@@ -791,9 +804,9 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_type(
 }
 
 static bool sh_css_translate_stream_cfg_to_input_system_input_port_attr(
-               struct ia_css_stream_config *stream_cfg,
-               ia_css_isys_descr_t     *isys_stream_descr,
-               int isys_stream_idx)
+    struct ia_css_stream_config *stream_cfg,
+    ia_css_isys_descr_t        *isys_stream_descr,
+    int isys_stream_idx)
 {
        bool rc;
 
@@ -821,12 +834,17 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_attr(
                isys_stream_descr->tpg_port_attr.color_cfg.G2 = 100;
                isys_stream_descr->tpg_port_attr.color_cfg.B2 = 160;
 
-               isys_stream_descr->tpg_port_attr.mask_cfg.h_mask = stream_cfg->source.tpg.x_mask;
-               isys_stream_descr->tpg_port_attr.mask_cfg.v_mask = stream_cfg->source.tpg.y_mask;
-               isys_stream_descr->tpg_port_attr.mask_cfg.hv_mask = stream_cfg->source.tpg.xy_mask;
+               isys_stream_descr->tpg_port_attr.mask_cfg.h_mask =
+                   stream_cfg->source.tpg.x_mask;
+               isys_stream_descr->tpg_port_attr.mask_cfg.v_mask =
+                   stream_cfg->source.tpg.y_mask;
+               isys_stream_descr->tpg_port_attr.mask_cfg.hv_mask =
+                   stream_cfg->source.tpg.xy_mask;
 
-               isys_stream_descr->tpg_port_attr.delta_cfg.h_delta = stream_cfg->source.tpg.x_delta;
-               isys_stream_descr->tpg_port_attr.delta_cfg.v_delta = stream_cfg->source.tpg.y_delta;
+               isys_stream_descr->tpg_port_attr.delta_cfg.h_delta =
+                   stream_cfg->source.tpg.x_delta;
+               isys_stream_descr->tpg_port_attr.delta_cfg.v_delta =
+                   stream_cfg->source.tpg.y_delta;
 
                /*
                 * TODO
@@ -834,10 +852,13 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_attr(
                 */
                isys_stream_descr->tpg_port_attr.sync_gen_cfg.hblank_cycles = 100;
                isys_stream_descr->tpg_port_attr.sync_gen_cfg.vblank_cycles = 100;
-               isys_stream_descr->tpg_port_attr.sync_gen_cfg.pixels_per_clock = stream_cfg->pixels_per_clock;
+               isys_stream_descr->tpg_port_attr.sync_gen_cfg.pixels_per_clock =
+                   stream_cfg->pixels_per_clock;
                isys_stream_descr->tpg_port_attr.sync_gen_cfg.nr_of_frames = (uint32_t)~(0x0);
-               isys_stream_descr->tpg_port_attr.sync_gen_cfg.pixels_per_line = stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.width;
-               isys_stream_descr->tpg_port_attr.sync_gen_cfg.lines_per_frame = stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.height;
+               isys_stream_descr->tpg_port_attr.sync_gen_cfg.pixels_per_line =
+                   stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.width;
+               isys_stream_descr->tpg_port_attr.sync_gen_cfg.lines_per_frame =
+                   stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.height;
 
                break;
        case IA_CSS_INPUT_MODE_PRBS:
@@ -851,33 +872,36 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_attr(
                 */
                isys_stream_descr->prbs_port_attr.sync_gen_cfg.hblank_cycles = 100;
                isys_stream_descr->prbs_port_attr.sync_gen_cfg.vblank_cycles = 100;
-               isys_stream_descr->prbs_port_attr.sync_gen_cfg.pixels_per_clock = stream_cfg->pixels_per_clock;
+               isys_stream_descr->prbs_port_attr.sync_gen_cfg.pixels_per_clock =
+                   stream_cfg->pixels_per_clock;
                isys_stream_descr->prbs_port_attr.sync_gen_cfg.nr_of_frames = (uint32_t)~(0x0);
-               isys_stream_descr->prbs_port_attr.sync_gen_cfg.pixels_per_line = stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.width;
-               isys_stream_descr->prbs_port_attr.sync_gen_cfg.lines_per_frame = stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.height;
+               isys_stream_descr->prbs_port_attr.sync_gen_cfg.pixels_per_line =
+                   stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.width;
+               isys_stream_descr->prbs_port_attr.sync_gen_cfg.lines_per_frame =
+                   stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.height;
 
                break;
-       case IA_CSS_INPUT_MODE_BUFFERED_SENSOR:
-       {
+       case IA_CSS_INPUT_MODE_BUFFERED_SENSOR: {
                enum ia_css_err err;
                unsigned int fmt_type;
 
                err = ia_css_isys_convert_stream_format_to_mipi_format(
-                       stream_cfg->isys_config[isys_stream_idx].format,
-                       MIPI_PREDICTOR_NONE,
-                       &fmt_type);
+                         stream_cfg->isys_config[isys_stream_idx].format,
+                         MIPI_PREDICTOR_NONE,
+                         &fmt_type);
                if (err != IA_CSS_SUCCESS)
                        rc = false;
 
-               isys_stream_descr->csi_port_attr.active_lanes = stream_cfg->source.port.num_lanes;
+               isys_stream_descr->csi_port_attr.active_lanes =
+                   stream_cfg->source.port.num_lanes;
                isys_stream_descr->csi_port_attr.fmt_type = fmt_type;
                isys_stream_descr->csi_port_attr.ch_id = stream_cfg->channel_id;
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
                isys_stream_descr->online = stream_cfg->online;
 #endif
                err |= ia_css_isys_convert_compressed_format(
-                               &stream_cfg->source.port.compression,
-                               isys_stream_descr);
+                          &stream_cfg->source.port.compression,
+                          isys_stream_descr);
                if (err != IA_CSS_SUCCESS)
                        rc = false;
 
@@ -885,25 +909,28 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_attr(
                isys_stream_descr->metadata.enable = false;
                if (stream_cfg->metadata_config.resolution.height > 0) {
                        err = ia_css_isys_convert_stream_format_to_mipi_format(
-                               stream_cfg->metadata_config.data_type,
-                               MIPI_PREDICTOR_NONE,
-                                       &fmt_type);
+                                 stream_cfg->metadata_config.data_type,
+                                 MIPI_PREDICTOR_NONE,
+                                 &fmt_type);
                        if (err != IA_CSS_SUCCESS)
                                rc = false;
                        isys_stream_descr->metadata.fmt_type = fmt_type;
                        isys_stream_descr->metadata.bits_per_pixel =
-                               ia_css_util_input_format_bpp(stream_cfg->metadata_config.data_type, true);
-                       isys_stream_descr->metadata.pixels_per_line = stream_cfg->metadata_config.resolution.width;
-                       isys_stream_descr->metadata.lines_per_frame = stream_cfg->metadata_config.resolution.height;
+                           ia_css_util_input_format_bpp(stream_cfg->metadata_config.data_type, true);
+                       isys_stream_descr->metadata.pixels_per_line =
+                           stream_cfg->metadata_config.resolution.width;
+                       isys_stream_descr->metadata.lines_per_frame =
+                           stream_cfg->metadata_config.resolution.height;
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
                        /* For new input system, number of str2mmio requests must be even.
                         * So we round up number of metadata lines to be even. */
                        if (isys_stream_descr->metadata.lines_per_frame > 0)
                                isys_stream_descr->metadata.lines_per_frame +=
-                                       (isys_stream_descr->metadata.lines_per_frame & 1);
+                                   (isys_stream_descr->metadata.lines_per_frame & 1);
 #endif
                        isys_stream_descr->metadata.align_req_in_bytes =
-                               ia_css_csi2_calculate_input_system_alignment(stream_cfg->metadata_config.data_type);
+                           ia_css_csi2_calculate_input_system_alignment(
+                               stream_cfg->metadata_config.data_type);
                        isys_stream_descr->metadata.enable = true;
                }
 
@@ -918,9 +945,9 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_attr(
 }
 
 static bool sh_css_translate_stream_cfg_to_input_system_input_port_resolution(
-               struct ia_css_stream_config *stream_cfg,
-               ia_css_isys_descr_t     *isys_stream_descr,
-               int isys_stream_idx)
+    struct ia_css_stream_config *stream_cfg,
+    ia_css_isys_descr_t        *isys_stream_descr,
+    int isys_stream_idx)
 {
        unsigned int bits_per_subpixel;
        unsigned int max_subpixels_per_line;
@@ -930,26 +957,26 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_resolution(
 
        fmt_type = stream_cfg->isys_config[isys_stream_idx].format;
        if ((stream_cfg->mode == IA_CSS_INPUT_MODE_SENSOR ||
-                       stream_cfg->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) &&
-               stream_cfg->source.port.compression.type != IA_CSS_CSI2_COMPRESSION_TYPE_NONE) {
+            stream_cfg->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) &&
+           stream_cfg->source.port.compression.type != IA_CSS_CSI2_COMPRESSION_TYPE_NONE) {
                if (stream_cfg->source.port.compression.uncompressed_bits_per_pixel ==
-                       UNCOMPRESSED_BITS_PER_PIXEL_10) {
-                               fmt_type = ATOMISP_INPUT_FORMAT_RAW_10;
+                   UNCOMPRESSED_BITS_PER_PIXEL_10) {
+                       fmt_type = ATOMISP_INPUT_FORMAT_RAW_10;
                } else if (stream_cfg->source.port.compression.uncompressed_bits_per_pixel ==
-                       UNCOMPRESSED_BITS_PER_PIXEL_12) {
-                               fmt_type = ATOMISP_INPUT_FORMAT_RAW_12;
+                          UNCOMPRESSED_BITS_PER_PIXEL_12) {
+                       fmt_type = ATOMISP_INPUT_FORMAT_RAW_12;
                } else
                        return false;
        }
 
        bits_per_subpixel =
-               sh_css_stream_format_2_bits_per_subpixel(fmt_type);
+           sh_css_stream_format_2_bits_per_subpixel(fmt_type);
        if (bits_per_subpixel == 0)
                return false;
 
        max_subpixels_per_line =
-               csi2_protocol_calculate_max_subpixels_per_line(fmt_type,
-                       stream_cfg->isys_config[isys_stream_idx].input_res.width);
+           csi2_protocol_calculate_max_subpixels_per_line(fmt_type,
+                   stream_cfg->isys_config[isys_stream_idx].input_res.width);
        if (max_subpixels_per_line == 0)
                return false;
 
@@ -961,30 +988,37 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_resolution(
 
        /* HW needs subpixel info for their settings */
        isys_stream_descr->input_port_resolution.bits_per_pixel = bits_per_subpixel;
-       isys_stream_descr->input_port_resolution.pixels_per_line = max_subpixels_per_line;
+       isys_stream_descr->input_port_resolution.pixels_per_line =
+           max_subpixels_per_line;
        isys_stream_descr->input_port_resolution.lines_per_frame = lines_per_frame;
-       isys_stream_descr->input_port_resolution.align_req_in_bytes = align_req_in_bytes;
+       isys_stream_descr->input_port_resolution.align_req_in_bytes =
+           align_req_in_bytes;
 
        return true;
 }
 
 static bool sh_css_translate_stream_cfg_to_isys_stream_descr(
-               struct ia_css_stream_config *stream_cfg,
-               bool early_polling,
-               ia_css_isys_descr_t     *isys_stream_descr,
-               int isys_stream_idx)
+    struct ia_css_stream_config *stream_cfg,
+    bool early_polling,
+    ia_css_isys_descr_t        *isys_stream_descr,
+    int isys_stream_idx)
 {
        bool rc;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_translate_stream_cfg_to_isys_stream_descr() enter:\n");
-       rc  = sh_css_translate_stream_cfg_to_input_system_input_port_id(stream_cfg, isys_stream_descr);
-       rc &= sh_css_translate_stream_cfg_to_input_system_input_port_type(stream_cfg, isys_stream_descr);
-       rc &= sh_css_translate_stream_cfg_to_input_system_input_port_attr(stream_cfg, isys_stream_descr, isys_stream_idx);
-       rc &= sh_css_translate_stream_cfg_to_input_system_input_port_resolution(stream_cfg, isys_stream_descr, isys_stream_idx);
+                           "sh_css_translate_stream_cfg_to_isys_stream_descr() enter:\n");
+       rc  = sh_css_translate_stream_cfg_to_input_system_input_port_id(stream_cfg,
+               isys_stream_descr);
+       rc &= sh_css_translate_stream_cfg_to_input_system_input_port_type(stream_cfg,
+               isys_stream_descr);
+       rc &= sh_css_translate_stream_cfg_to_input_system_input_port_attr(stream_cfg,
+               isys_stream_descr, isys_stream_idx);
+       rc &= sh_css_translate_stream_cfg_to_input_system_input_port_resolution(
+                 stream_cfg, isys_stream_descr, isys_stream_idx);
 
        isys_stream_descr->raw_packed = stream_cfg->pack_raw_pixels;
-       isys_stream_descr->linked_isys_stream_id = (int8_t)stream_cfg->isys_config[isys_stream_idx].linked_isys_stream_id;
+       isys_stream_descr->linked_isys_stream_id = (int8_t)
+               stream_cfg->isys_config[isys_stream_idx].linked_isys_stream_id;
        /*
         * Early polling is required for timestamp accuracy in certain case.
         * The ISYS HW polling is started on
@@ -995,30 +1029,30 @@ static bool sh_css_translate_stream_cfg_to_isys_stream_descr(
         * Only 2401 relevant ??
         */
        isys_stream_descr->polling_mode
-               = early_polling ? INPUT_SYSTEM_POLL_ON_CAPTURE_REQUEST
-                       : INPUT_SYSTEM_POLL_ON_WAIT_FOR_FRAME;
+           = early_polling ? INPUT_SYSTEM_POLL_ON_CAPTURE_REQUEST
+             : INPUT_SYSTEM_POLL_ON_WAIT_FOR_FRAME;
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n");
+                           "sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n");
 
        return rc;
 }
 
 static bool sh_css_translate_binary_info_to_input_system_output_port_attr(
-               struct ia_css_binary *binary,
-               ia_css_isys_descr_t     *isys_stream_descr)
+    struct ia_css_binary *binary,
+    ia_css_isys_descr_t     *isys_stream_descr)
 {
        if (!binary)
                return false;
 
        isys_stream_descr->output_port_attr.left_padding = binary->left_padding;
-       isys_stream_descr->output_port_attr.max_isp_input_width = binary->info->sp.input.max_width;
+       isys_stream_descr->output_port_attr.max_isp_input_width =
+           binary->info->sp.input.max_width;
 
        return true;
 }
 
 static enum ia_css_err
-sh_css_config_input_network(struct ia_css_stream *stream)
-{
+sh_css_config_input_network(struct ia_css_stream *stream) {
        bool                                    rc;
        ia_css_isys_descr_t                     isys_stream_descr;
        unsigned int                            sp_thread_id;
@@ -1031,9 +1065,10 @@ sh_css_config_input_network(struct ia_css_stream *stream)
 
        assert(stream);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_config_input_network() enter 0x%p:\n", stream);
+                           "sh_css_config_input_network() enter 0x%p:\n", stream);
 
-       if (stream->config.continuous == true) {
+       if (stream->config.continuous == true)
+       {
                if (stream->last_pipe->config.mode == IA_CSS_PIPE_MODE_CAPTURE) {
                        pipe = stream->last_pipe;
                } else if (stream->last_pipe->config.mode == IA_CSS_PIPE_MODE_YUVPP) {
@@ -1043,7 +1078,8 @@ sh_css_config_input_network(struct ia_css_stream *stream)
                } else if (stream->last_pipe->config.mode == IA_CSS_PIPE_MODE_VIDEO) {
                        pipe = stream->last_pipe->pipe_settings.video.copy_pipe;
                }
-       } else {
+       } else
+       {
                pipe = stream->last_pipe;
                if (stream->last_pipe->config.mode == IA_CSS_PIPE_MODE_CAPTURE) {
                        /*
@@ -1066,7 +1102,8 @@ sh_css_config_input_network(struct ia_css_stream *stream)
                if (pipe->pipeline.stages->binary)
                        binary = pipe->pipeline.stages->binary;
 
-       if (binary) {
+       if (binary)
+       {
                /* this was being done in ifmtr in 2400.
                 * online and cont bypass the init_in_frameinfo_memory_defaults
                 * so need to do it here
@@ -1081,7 +1118,8 @@ sh_css_config_input_network(struct ia_css_stream *stream)
        /* get the target input terminal */
        sp_pipeline_input_terminal = &sh_css_sp_group.pipe_io[sp_thread_id].input;
 
-       for (i = 0; i < IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH; i++) {
+       for (i = 0; i < IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH; i++)
+       {
                /* initialization */
                memset((void *)(&isys_stream_descr), 0, sizeof(ia_css_isys_descr_t));
                sp_pipeline_input_terminal->context.virtual_input_system_stream[i].valid = 0;
@@ -1092,14 +1130,14 @@ sh_css_config_input_network(struct ia_css_stream *stream)
 
                /* translate the stream configuration to the Input System (2401) configuration */
                rc = sh_css_translate_stream_cfg_to_isys_stream_descr(
-                               &stream->config,
-                               early_polling,
-                               &(isys_stream_descr), i);
+                        &stream->config,
+                        early_polling,
+                        &(isys_stream_descr), i);
 
                if (stream->config.online) {
                        rc &= sh_css_translate_binary_info_to_input_system_output_port_attr(
-                                       binary,
-                                       &(isys_stream_descr));
+                                 binary,
+                                 &(isys_stream_descr));
                }
 
                if (!rc)
@@ -1109,31 +1147,32 @@ sh_css_config_input_network(struct ia_css_stream *stream)
 
                /* create the virtual Input System (2401) */
                rc =  ia_css_isys_stream_create(
-                               &(isys_stream_descr),
-                               &sp_pipeline_input_terminal->context.virtual_input_system_stream[i],
-                               isys_stream_id);
+                         &(isys_stream_descr),
+                         &sp_pipeline_input_terminal->context.virtual_input_system_stream[i],
+                         isys_stream_id);
                if (!rc)
                        return IA_CSS_ERR_INTERNAL_ERROR;
 
                /* calculate the configuration of the virtual Input System (2401) */
                rc = ia_css_isys_stream_calculate_cfg(
-                               &sp_pipeline_input_terminal->context.virtual_input_system_stream[i],
-                               &(isys_stream_descr),
-                               &sp_pipeline_input_terminal->ctrl.virtual_input_system_stream_cfg[i]);
+                        &sp_pipeline_input_terminal->context.virtual_input_system_stream[i],
+                        &(isys_stream_descr),
+                        &sp_pipeline_input_terminal->ctrl.virtual_input_system_stream_cfg[i]);
                if (!rc) {
-                       ia_css_isys_stream_destroy(&sp_pipeline_input_terminal->context.virtual_input_system_stream[i]);
+                       ia_css_isys_stream_destroy(
+                           &sp_pipeline_input_terminal->context.virtual_input_system_stream[i]);
                        return IA_CSS_ERR_INTERNAL_ERROR;
                }
        }
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_config_input_network() leave:\n");
+                           "sh_css_config_input_network() leave:\n");
 
        return IA_CSS_SUCCESS;
 }
 
 static inline struct ia_css_pipe *stream_get_last_pipe(
-               struct ia_css_stream *stream)
+    struct ia_css_stream *stream)
 {
        struct ia_css_pipe *last_pipe = NULL;
 
@@ -1144,7 +1183,7 @@ static inline struct ia_css_pipe *stream_get_last_pipe(
 }
 
 static inline struct ia_css_pipe *stream_get_copy_pipe(
-               struct ia_css_stream *stream)
+    struct ia_css_stream *stream)
 {
        struct ia_css_pipe *copy_pipe = NULL;
        struct ia_css_pipe *last_pipe = NULL;
@@ -1157,15 +1196,15 @@ static inline struct ia_css_pipe *stream_get_copy_pipe(
            (stream->config.continuous)) {
                pipe_id = last_pipe->mode;
                switch (pipe_id) {
-                       case IA_CSS_PIPE_ID_PREVIEW:
-                               copy_pipe = last_pipe->pipe_settings.preview.copy_pipe;
-                               break;
-                       case IA_CSS_PIPE_ID_VIDEO:
-                               copy_pipe = last_pipe->pipe_settings.video.copy_pipe;
-                               break;
-                       default:
-                               copy_pipe = NULL;
-                               break;
+               case IA_CSS_PIPE_ID_PREVIEW:
+                       copy_pipe = last_pipe->pipe_settings.preview.copy_pipe;
+                       break;
+               case IA_CSS_PIPE_ID_VIDEO:
+                       copy_pipe = last_pipe->pipe_settings.video.copy_pipe;
+                       break;
+               default:
+                       copy_pipe = NULL;
+                       break;
                }
        }
 
@@ -1173,7 +1212,7 @@ static inline struct ia_css_pipe *stream_get_copy_pipe(
 }
 
 static inline struct ia_css_pipe *stream_get_target_pipe(
-               struct ia_css_stream *stream)
+    struct ia_css_stream *stream)
 {
        struct ia_css_pipe *target_pipe;
 
@@ -1188,8 +1227,8 @@ static inline struct ia_css_pipe *stream_get_target_pipe(
 }
 
 static enum ia_css_err stream_csi_rx_helper(
-       struct ia_css_stream *stream,
-       enum ia_css_err (*func)(enum mipi_port_id, uint32_t))
+    struct ia_css_stream *stream,
+    enum ia_css_err (*func)(enum mipi_port_id, uint32_t))
 {
        enum ia_css_err retval = IA_CSS_ERR_INTERNAL_ERROR;
        u32 sp_thread_id, stream_id;
@@ -1205,8 +1244,8 @@ static enum ia_css_err stream_csi_rx_helper(
                goto exit;
 
        rc = ia_css_pipeline_get_sp_thread_id(
-               ia_css_pipe_get_pipe_num(target_pipe),
-               &sp_thread_id);
+                ia_css_pipe_get_pipe_num(target_pipe),
+                &sp_thread_id);
 
        if (!rc)
                goto exit;
@@ -1228,13 +1267,13 @@ exit:
 }
 
 static inline enum ia_css_err stream_register_with_csi_rx(
-       struct ia_css_stream *stream)
+    struct ia_css_stream *stream)
 {
        return stream_csi_rx_helper(stream, ia_css_isys_csi_rx_register_stream);
 }
 
 static inline enum ia_css_err stream_unregister_with_csi_rx(
-       struct ia_css_stream *stream)
+    struct ia_css_stream *stream)
 {
        return stream_csi_rx_helper(stream, ia_css_isys_csi_rx_unregister_stream);
 }
@@ -1260,13 +1299,13 @@ static void print_pc_histo(char *core_name, struct sh_css_pc_histogram *hist)
                if ((hist->run[i] == 0) && (hist->run[i] == hist->stall[i]))
                        continue;
                sh_css_print("%s %d\t%d\t%d\n",
-                               core_name, i, hist->run[i], hist->stall[i]);
+                            core_name, i, hist->run[i], hist->stall[i]);
                cnt_run += hist->run[i];
                cnt_stall += hist->stall[i];
        }
 
        sh_css_print(" Statistics for %s, cnt_run = %d, cnt_stall = %d, hist->length = %d\n",
-                       core_name, cnt_run, cnt_stall, hist->length);
+                    core_name, cnt_run, cnt_stall, hist->length);
 }
 
 static void print_pc_histogram(void)
@@ -1279,7 +1318,7 @@ static void print_pc_histogram(void)
                if (metrics->mode == IA_CSS_BINARY_MODE_PREVIEW ||
                    metrics->mode == IA_CSS_BINARY_MODE_VF_PP) {
                        sh_css_print("pc_histogram for binary %d is SKIPPED\n",
-                               metrics->id);
+                                    metrics->id);
                        continue;
                }
 
@@ -1320,7 +1359,7 @@ static void spying_thread_create(void)
 static void input_frame_info(struct ia_css_frame_info frame_info)
 {
        sh_css_print("SH_CSS:input_frame_info() -- frame->info.res.width = %d, frame->info.res.height = %d, format = %d\n",
-                       frame_info.res.width, frame_info.res.height, frame_info.format);
+                    frame_info.res.width, frame_info.res.height, frame_info.format);
 }
 #endif /* WITH_PC_MONITORING */
 
@@ -1368,8 +1407,7 @@ start_binary(struct ia_css_pipe *pipe,
 /* start the copy function on the SP */
 static enum ia_css_err
 start_copy_on_sp(struct ia_css_pipe *pipe,
-                struct ia_css_frame *out_frame)
-{
+                struct ia_css_frame *out_frame) {
        (void)out_frame;
        assert(pipe);
        assert(pipe->stream);
@@ -1387,8 +1425,10 @@ start_copy_on_sp(struct ia_css_pipe *pipe,
        sh_css_sp_start_binary_copy(ia_css_pipe_get_pipe_num(pipe), out_frame, pipe->stream->config.pixels_per_clock == 2);
 
 #if !defined(HAS_NO_INPUT_SYSTEM) && !defined(USE_INPUT_SYSTEM_VERSION_2401)
-       if (pipe->stream->reconfigure_css_rx) {
-               ia_css_isys_rx_configure(&pipe->stream->csi_rx_config, pipe->stream->config.mode);
+       if (pipe->stream->reconfigure_css_rx)
+       {
+               ia_css_isys_rx_configure(&pipe->stream->csi_rx_config,
+                                        pipe->stream->config.mode);
                pipe->stream->reconfigure_css_rx = false;
        }
 #endif
@@ -1418,9 +1458,9 @@ void sh_css_binary_args_reset(struct sh_css_binary_args *args)
 }
 
 static void start_pipe(
-       struct ia_css_pipe *me,
-       enum sh_css_pipe_config_override copy_ovrd,
-       enum ia_css_input_mode input_mode)
+    struct ia_css_pipe *me,
+    enum sh_css_pipe_config_override copy_ovrd,
+    enum ia_css_input_mode input_mode)
 {
 #if defined(HAS_NO_INPUT_SYSTEM)
        (void)input_mode;
@@ -1445,14 +1485,14 @@ static void start_pipe(
                                &me->stream->info.metadata_info
 #if !defined(HAS_NO_INPUT_SYSTEM)
                                , (input_mode == IA_CSS_INPUT_MODE_MEMORY) ?
-                                       (enum mipi_port_id)0 :
-                                       me->stream->config.source.port.port
+                               (enum mipi_port_id)0 :
+                               me->stream->config.source.port.port
 #endif
 #ifdef ISP2401
                                , &me->config.internal_frame_origin_bqs_on_sctbl,
                                me->stream->isp_params_configs
 #endif
-                       );
+                              );
 
        if (me->config.mode != IA_CSS_PIPE_MODE_COPY) {
                struct ia_css_pipeline_stage *stage;
@@ -1474,7 +1514,7 @@ sh_css_invalidate_shading_tables(struct ia_css_stream *stream)
        assert(stream);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "sh_css_invalidate_shading_tables() enter:\n");
+                           "sh_css_invalidate_shading_tables() enter:\n");
 
        for (i = 0; i < stream->num_pipes; i++) {
                assert(stream->pipes[i]);
@@ -1482,7 +1522,7 @@ sh_css_invalidate_shading_tables(struct ia_css_stream *stream)
        }
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "sh_css_invalidate_shading_tables() leave: return_void\n");
+                           "sh_css_invalidate_shading_tables() leave: return_void\n");
 }
 
 #ifndef ISP2401
@@ -1505,17 +1545,17 @@ enable_interrupts(enum ia_css_irq_type irq_type)
 
        /* Enable SW interrupt 0, this is used to signal ISYS events */
        cnd_virq_enable_channel(
-                       (virq_id_t)(IRQ_SW_CHANNEL0_ID + IRQ_SW_CHANNEL_OFFSET),
-                       true);
+           (virq_id_t)(IRQ_SW_CHANNEL0_ID + IRQ_SW_CHANNEL_OFFSET),
+           true);
        /* Enable SW interrupt 1, this is used to signal PSYS events */
        cnd_virq_enable_channel(
-                       (virq_id_t)(IRQ_SW_CHANNEL1_ID + IRQ_SW_CHANNEL_OFFSET),
-                       true);
+           (virq_id_t)(IRQ_SW_CHANNEL1_ID + IRQ_SW_CHANNEL_OFFSET),
+           true);
 #if !defined(HAS_IRQ_MAP_VERSION_2)
        /* IRQ_SW_CHANNEL2_ID does not exist on 240x systems */
        cnd_virq_enable_channel(
-                       (virq_id_t)(IRQ_SW_CHANNEL2_ID + IRQ_SW_CHANNEL_OFFSET),
-                       true);
+           (virq_id_t)(IRQ_SW_CHANNEL2_ID + IRQ_SW_CHANNEL_OFFSET),
+           true);
        virq_clear_all();
 #endif
 
@@ -1530,8 +1570,8 @@ enable_interrupts(enum ia_css_irq_type irq_type)
 #endif
 
 static bool sh_css_setup_spctrl_config(const struct ia_css_fw_info *fw,
-                                                       const char *program,
-                                                       ia_css_spctrl_cfg  *spctrl_cfg)
+                                      const char *program,
+                                      ia_css_spctrl_cfg  *spctrl_cfg)
 {
        if ((!fw) || (!spctrl_cfg))
                return false;
@@ -1557,8 +1597,7 @@ static bool sh_css_setup_spctrl_config(const struct ia_css_fw_info *fw,
 void
 ia_css_unload_firmware(void)
 {
-       if (sh_css_num_binaries)
-       {
+       if (sh_css_num_binaries) {
                /* we have already loaded before so get rid of the old stuff */
                ia_css_binary_uninit();
                sh_css_unload_firmware();
@@ -1601,8 +1640,7 @@ ia_css_check_firmware_version(const struct ia_css_fw  *fw)
 
 enum ia_css_err
 ia_css_load_firmware(const struct ia_css_env *env,
-           const struct ia_css_fw  *fw)
-{
+                    const struct ia_css_fw  *fw) {
        enum ia_css_err err;
 
        if (!env)
@@ -1613,14 +1651,16 @@ ia_css_load_firmware(const struct ia_css_env *env,
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_load_firmware() enter\n");
 
        /* make sure we initialize my_css */
-       if (my_css.flush != env->cpu_mem_env.flush) {
+       if (my_css.flush != env->cpu_mem_env.flush)
+       {
                ia_css_reset_defaults(&my_css);
                my_css.flush = env->cpu_mem_env.flush;
        }
 
        ia_css_unload_firmware(); /* in case we are called twice */
        err = sh_css_load_firmware(fw->data, fw->bytes);
-       if (err == IA_CSS_SUCCESS) {
+       if (err == IA_CSS_SUCCESS)
+       {
                err = ia_css_binary_init_infos();
                if (err == IA_CSS_SUCCESS)
                        fw_explicitly_loaded = true;
@@ -1634,8 +1674,7 @@ enum ia_css_err
 ia_css_init(const struct ia_css_env *env,
            const struct ia_css_fw  *fw,
            u32                 mmu_l1_base,
-           enum ia_css_irq_type     irq_type)
-{
+           enum ia_css_irq_type     irq_type) {
        enum ia_css_err err;
        ia_css_spctrl_cfg spctrl_cfg;
 
@@ -1681,7 +1720,7 @@ ia_css_init(const struct ia_css_env *env,
        if (!fw && !fw_explicitly_loaded)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        if (!env)
-       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        sh_css_printf = env->print_env.debug_print;
 
@@ -1696,9 +1735,9 @@ ia_css_init(const struct ia_css_env *env,
        ia_css_device_access_init(&env->hw_access_env);
 
        select = gpio_reg_load(GPIO0_ID, _gpio_block_reg_do_select)
-                                               & (~GPIO_FLASH_PIN_MASK);
+       & (~GPIO_FLASH_PIN_MASK);
        enable = gpio_reg_load(GPIO0_ID, _gpio_block_reg_do_e)
-                                                       | GPIO_FLASH_PIN_MASK;
+       | GPIO_FLASH_PIN_MASK;
        sh_css_mmu_set_page_table_base_index(mmu_l1_base);
 #ifndef ISP2401
        my_css_save.mmu_base = mmu_l1_base;
@@ -1712,7 +1751,8 @@ ia_css_init(const struct ia_css_env *env,
        my_css.flush     = flush_func;
 
        err = ia_css_rmgr_init();
-       if (err != IA_CSS_SUCCESS) {
+       if (err != IA_CSS_SUCCESS)
+       {
                IA_CSS_LEAVE_ERR(err);
                return err;
        }
@@ -1728,7 +1768,8 @@ ia_css_init(const struct ia_css_env *env,
        {
                my_css_save_initialized = true;
                my_css_save.mode = sh_css_mode_working;
-               memset(my_css_save.stream_seeds, 0, sizeof(struct sh_css_stream_seed) * MAX_ACTIVE_STREAMS);
+               memset(my_css_save.stream_seeds, 0,
+                      sizeof(struct sh_css_stream_seed) * MAX_ACTIVE_STREAMS);
                IA_CSS_LOG("init: %d mode=%d", my_css_save_initialized, my_css_save.mode);
        }
 #endif
@@ -1754,12 +1795,14 @@ ia_css_init(const struct ia_css_env *env,
        gpio_reg_store(GPIO0_ID, _gpio_block_reg_do_0, 0);
 
        err = ia_css_refcount_init(REFCOUNT_SIZE);
-       if (err != IA_CSS_SUCCESS) {
+       if (err != IA_CSS_SUCCESS)
+       {
                IA_CSS_LEAVE_ERR(err);
                return err;
        }
        err = sh_css_params_init();
-       if (err != IA_CSS_SUCCESS) {
+       if (err != IA_CSS_SUCCESS)
+       {
                IA_CSS_LEAVE_ERR(err);
                return err;
        }
@@ -1785,20 +1828,23 @@ ia_css_init(const struct ia_css_env *env,
                return IA_CSS_ERR_INTERNAL_ERROR;
 
        err = ia_css_spctrl_load_fw(SP0_ID, &spctrl_cfg);
-       if (err != IA_CSS_SUCCESS) {
+       if (err != IA_CSS_SUCCESS)
+       {
                IA_CSS_LEAVE_ERR(err);
                return err;
        }
 
 #if WITH_PC_MONITORING
-       if (!thread_alive) {
+       if (!thread_alive)
+       {
                thread_alive++;
                sh_css_print("PC_MONITORING: %s() -- create thread DISABLED\n",
                             __func__);
                spying_thread_create();
        }
 #endif
-       if (!sh_css_hrt_system_is_idle()) {
+       if (!sh_css_hrt_system_is_idle())
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_SYSTEM_NOT_IDLE);
                return IA_CSS_ERR_SYSTEM_NOT_IDLE;
        }
@@ -1838,23 +1884,23 @@ enum ia_css_err ia_css_suspend(void)
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_suspend() enter\n");
        my_css_save.mode = sh_css_mode_suspend;
        for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
-               if (my_css_save.stream_seeds[i].stream)
-               {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> unloading seed %d (%p)\n", i, my_css_save.stream_seeds[i].stream);
+               if (my_css_save.stream_seeds[i].stream) {
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> unloading seed %d (%p)\n", i,
+                                           my_css_save.stream_seeds[i].stream);
                        ia_css_stream_unload(my_css_save.stream_seeds[i].stream);
                }
        my_css_save.mode = sh_css_mode_working;
        ia_css_stop_sp();
        ia_css_uninit();
        for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> after 1: seed %d (%p)\n", i, my_css_save.stream_seeds[i].stream);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> after 1: seed %d (%p)\n", i,
+                                   my_css_save.stream_seeds[i].stream);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_suspend() leave\n");
        return IA_CSS_SUCCESS;
 }
 
 enum ia_css_err
-ia_css_resume(void)
-{
+ia_css_resume(void) {
        int i, j;
        enum ia_css_err err;
 
@@ -1869,23 +1915,20 @@ ia_css_resume(void)
        my_css_save.mode = sh_css_mode_resume;
        for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
        {
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> seed stream %p\n", my_css_save.stream_seeds[i].stream);
-               if (my_css_save.stream_seeds[i].stream)
-               {
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> seed stream %p\n",
+                                   my_css_save.stream_seeds[i].stream);
+               if (my_css_save.stream_seeds[i].stream) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> loading seed %d\n", i);
                        err = ia_css_stream_load(my_css_save.stream_seeds[i].stream);
-                       if (err != IA_CSS_SUCCESS)
-                       {
+                       if (err != IA_CSS_SUCCESS) {
                                if (i)
                                        for (j = 0; j < i; j++)
                                                ia_css_stream_unload(my_css_save.stream_seeds[j].stream);
                                return err;
                        }
                        err = ia_css_stream_start(my_css_save.stream_seeds[i].stream);
-                       if (err != IA_CSS_SUCCESS)
-                       {
-                               for (j = 0; j <= i; j++)
-                               {
+                       if (err != IA_CSS_SUCCESS) {
+                               for (j = 0; j <= i; j++) {
                                        ia_css_stream_stop(my_css_save.stream_seeds[j].stream);
                                        ia_css_stream_unload(my_css_save.stream_seeds[j].stream);
                                }
@@ -1893,7 +1936,8 @@ ia_css_resume(void)
                        }
                        *my_css_save.stream_seeds[i].orig_stream = my_css_save.stream_seeds[i].stream;
                        for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
-                               *my_css_save.stream_seeds[i].orig_pipes[j] = my_css_save.stream_seeds[i].pipes[j];
+                               *my_css_save.stream_seeds[i].orig_pipes[j] =
+                                   my_css_save.stream_seeds[i].pipes[j];
                }
        }
        my_css_save.mode = sh_css_mode_working;
@@ -1902,8 +1946,7 @@ ia_css_resume(void)
 }
 
 enum ia_css_err
-ia_css_enable_isys_event_queue(bool enable)
-{
+ia_css_enable_isys_event_queue(bool enable) {
        if (sh_css_sp_is_running())
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        sh_css_sp_enable_isys_event_queue(enable);
@@ -1912,7 +1955,8 @@ ia_css_enable_isys_event_queue(bool enable)
 
 void *sh_css_malloc(size_t size)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_malloc() enter: size=%zu\n", size);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_malloc() enter: size=%zu\n",
+                           size);
        /* FIXME: This first test can probably go away */
        if (size == 0)
                return NULL;
@@ -1925,7 +1969,8 @@ void *sh_css_calloc(size_t N, size_t size)
 {
        void *p;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_calloc() enter: N=%zu, size=%zu\n", N, size);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "sh_css_calloc() enter: N=%zu, size=%zu\n", N, size);
 
        /* FIXME: this test can probably go away */
        if (size > 0) {
@@ -1959,8 +2004,7 @@ sh_css_flush(struct ia_css_acc_fw *fw)
  * doing it from stream_create since we could run out of sp threads due to
  * allocation on inactive pipelines. */
 static enum ia_css_err
-map_sp_threads(struct ia_css_stream *stream, bool map)
-{
+map_sp_threads(struct ia_css_stream *stream, bool map) {
        struct ia_css_pipe *main_pipe = NULL;
        struct ia_css_pipe *copy_pipe = NULL;
        struct ia_css_pipe *capture_pipe = NULL;
@@ -1972,7 +2016,8 @@ map_sp_threads(struct ia_css_stream *stream, bool map)
        IA_CSS_ENTER_PRIVATE("stream = %p, map = %s",
                             stream, map ? "true" : "false");
 
-       if (!stream) {
+       if (!stream)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -1982,7 +2027,8 @@ map_sp_threads(struct ia_css_stream *stream, bool map)
 
        ia_css_pipeline_map(main_pipe->pipe_num, map);
 
-       switch (pipe_id) {
+       switch (pipe_id)
+       {
        case IA_CSS_PIPE_ID_PREVIEW:
                copy_pipe    = main_pipe->pipe_settings.preview.copy_pipe;
                capture_pipe = main_pipe->pipe_settings.preview.capture_pipe;
@@ -2000,20 +2046,24 @@ map_sp_threads(struct ia_css_stream *stream, bool map)
                break;
        }
 
-       if (acc_pipe) {
+       if (acc_pipe)
+       {
                ia_css_pipeline_map(acc_pipe->pipe_num, map);
        }
 
-       if (capture_pipe) {
+       if (capture_pipe)
+       {
                ia_css_pipeline_map(capture_pipe->pipe_num, map);
        }
 
        /* Firmware expects copy pipe to be the last pipe mapped. (if needed) */
-       if (copy_pipe) {
+       if (copy_pipe)
+       {
                ia_css_pipeline_map(copy_pipe->pipe_num, map);
        }
        /* DH regular multi pipe - not continuous mode: map the next pipes too */
-       if (!stream->config.continuous) {
+       if (!stream->config.continuous)
+       {
                int i;
 
                for (i = 1; i < stream->num_pipes; i++)
@@ -2027,41 +2077,44 @@ map_sp_threads(struct ia_css_stream *stream, bool map)
 /* creates a host pipeline skeleton for all pipes in a stream. Called during
  * stream_create. */
 static enum ia_css_err
-create_host_pipeline_structure(struct ia_css_stream *stream)
-{
+create_host_pipeline_structure(struct ia_css_stream *stream) {
        struct ia_css_pipe *copy_pipe = NULL, *capture_pipe = NULL;
        struct ia_css_pipe *acc_pipe = NULL;
        enum ia_css_pipe_id pipe_id;
        struct ia_css_pipe *main_pipe = NULL;
        enum ia_css_err err = IA_CSS_SUCCESS;
        unsigned int copy_pipe_delay = 0,
-                    capture_pipe_delay = 0;
+       capture_pipe_delay = 0;
 
        assert(stream);
        IA_CSS_ENTER_PRIVATE("stream = %p", stream);
 
-       if (!stream) {
+       if (!stream)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
        main_pipe       = stream->last_pipe;
        assert(main_pipe);
-       if (!main_pipe) {
+       if (!main_pipe)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
        pipe_id = main_pipe->mode;
 
-       switch (pipe_id) {
+       switch (pipe_id)
+       {
        case IA_CSS_PIPE_ID_PREVIEW:
                copy_pipe    = main_pipe->pipe_settings.preview.copy_pipe;
                copy_pipe_delay = main_pipe->dvs_frame_delay;
                capture_pipe = main_pipe->pipe_settings.preview.capture_pipe;
                capture_pipe_delay = IA_CSS_FRAME_DELAY_0;
                acc_pipe     = main_pipe->pipe_settings.preview.acc_pipe;
-               err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode, main_pipe->pipe_num, main_pipe->dvs_frame_delay);
+               err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode,
+                                            main_pipe->pipe_num, main_pipe->dvs_frame_delay);
                break;
 
        case IA_CSS_PIPE_ID_VIDEO:
@@ -2069,7 +2122,8 @@ create_host_pipeline_structure(struct ia_css_stream *stream)
                copy_pipe_delay = main_pipe->dvs_frame_delay;
                capture_pipe = main_pipe->pipe_settings.video.capture_pipe;
                capture_pipe_delay = IA_CSS_FRAME_DELAY_0;
-               err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode, main_pipe->pipe_num, main_pipe->dvs_frame_delay);
+               err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode,
+                                            main_pipe->pipe_num, main_pipe->dvs_frame_delay);
                break;
 
        case IA_CSS_PIPE_ID_CAPTURE:
@@ -2079,45 +2133,51 @@ create_host_pipeline_structure(struct ia_css_stream *stream)
 
        case IA_CSS_PIPE_ID_YUVPP:
                err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode,
-                                               main_pipe->pipe_num, main_pipe->dvs_frame_delay);
+                                            main_pipe->pipe_num, main_pipe->dvs_frame_delay);
                break;
 
        case IA_CSS_PIPE_ID_ACC:
-               err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode, main_pipe->pipe_num, main_pipe->dvs_frame_delay);
+               err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode,
+                                            main_pipe->pipe_num, main_pipe->dvs_frame_delay);
                break;
 
        default:
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if ((err == IA_CSS_SUCCESS) && copy_pipe) {
+       if ((err == IA_CSS_SUCCESS) && copy_pipe)
+       {
                err = ia_css_pipeline_create(&copy_pipe->pipeline,
-                                                               copy_pipe->mode,
-                                                               copy_pipe->pipe_num,
-                                                               copy_pipe_delay);
+                                            copy_pipe->mode,
+                                            copy_pipe->pipe_num,
+                                            copy_pipe_delay);
        }
 
-       if ((err == IA_CSS_SUCCESS) && capture_pipe) {
+       if ((err == IA_CSS_SUCCESS) && capture_pipe)
+       {
                err = ia_css_pipeline_create(&capture_pipe->pipeline,
-                                                               capture_pipe->mode,
-                                                               capture_pipe->pipe_num,
-                                                               capture_pipe_delay);
+                                            capture_pipe->mode,
+                                            capture_pipe->pipe_num,
+                                            capture_pipe_delay);
        }
 
-       if ((err == IA_CSS_SUCCESS) && acc_pipe) {
-               err = ia_css_pipeline_create(&acc_pipe->pipeline, acc_pipe->mode, acc_pipe->pipe_num, main_pipe->dvs_frame_delay);
+       if ((err == IA_CSS_SUCCESS) && acc_pipe)
+       {
+               err = ia_css_pipeline_create(&acc_pipe->pipeline, acc_pipe->mode,
+                                            acc_pipe->pipe_num, main_pipe->dvs_frame_delay);
        }
 
        /* DH regular multi pipe - not continuous mode: create the next pipelines too */
-       if (!stream->config.continuous) {
+       if (!stream->config.continuous)
+       {
                int i;
 
                for (i = 1; i < stream->num_pipes && IA_CSS_SUCCESS == err; i++) {
                        main_pipe = stream->pipes[i];
                        err = ia_css_pipeline_create(&main_pipe->pipeline,
-                                                       main_pipe->mode,
-                                                       main_pipe->pipe_num,
-                                                       main_pipe->dvs_frame_delay);
+                                                    main_pipe->mode,
+                                                    main_pipe->pipe_num,
+                                                    main_pipe->dvs_frame_delay);
                }
        }
 
@@ -2128,8 +2188,7 @@ create_host_pipeline_structure(struct ia_css_stream *stream)
 /* creates a host pipeline for all pipes in a stream. Called during
  * stream_start. */
 static enum ia_css_err
-create_host_pipeline(struct ia_css_stream *stream)
-{
+create_host_pipeline(struct ia_css_stream *stream) {
        struct ia_css_pipe *copy_pipe = NULL, *capture_pipe = NULL;
        struct ia_css_pipe *acc_pipe = NULL;
        enum ia_css_pipe_id pipe_id;
@@ -2138,7 +2197,8 @@ create_host_pipeline(struct ia_css_stream *stream)
        unsigned int max_input_width = 0;
 
        IA_CSS_ENTER_PRIVATE("stream = %p", stream);
-       if (!stream) {
+       if (!stream)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2149,7 +2209,8 @@ create_host_pipeline(struct ia_css_stream *stream)
        /* No continuous frame allocation for capture pipe. It uses the
         * "main" pipe's frames. */
        if ((pipe_id == IA_CSS_PIPE_ID_PREVIEW) ||
-          (pipe_id == IA_CSS_PIPE_ID_VIDEO)) {
+           (pipe_id == IA_CSS_PIPE_ID_VIDEO))
+       {
                /* About pipe_id == IA_CSS_PIPE_ID_PREVIEW && stream->config.mode != IA_CSS_INPUT_MODE_MEMORY:
                 * The original condition pipe_id == IA_CSS_PIPE_ID_PREVIEW is too strong. E.g. in SkyCam (with memory
                 * based input frames) there is no continuous mode and thus no need for allocated continuous frames
@@ -2157,7 +2218,8 @@ create_host_pipeline(struct ia_css_stream *stream)
                 * reason the stream->config.mode != IA_CSS_INPUT_MODE_MEMORY has beed added.
                 */
                if (stream->config.continuous ||
-                       (pipe_id == IA_CSS_PIPE_ID_PREVIEW && stream->config.mode != IA_CSS_INPUT_MODE_MEMORY)) {
+                   (pipe_id == IA_CSS_PIPE_ID_PREVIEW &&
+                    stream->config.mode != IA_CSS_INPUT_MODE_MEMORY)) {
                        err = alloc_continuous_frames(main_pipe, true);
                        if (err != IA_CSS_SUCCESS)
                                goto ERR;
@@ -2166,27 +2228,30 @@ create_host_pipeline(struct ia_css_stream *stream)
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2)
        /* old isys: need to allocate_mipi_frames() even in IA_CSS_PIPE_MODE_COPY */
-       if (pipe_id != IA_CSS_PIPE_ID_ACC) {
+       if (pipe_id != IA_CSS_PIPE_ID_ACC)
+       {
                err = allocate_mipi_frames(main_pipe, &stream->info);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
        }
 #elif defined(USE_INPUT_SYSTEM_VERSION_2401)
        if ((pipe_id != IA_CSS_PIPE_ID_ACC) &&
-               (main_pipe->config.mode != IA_CSS_PIPE_MODE_COPY)) {
+           (main_pipe->config.mode != IA_CSS_PIPE_MODE_COPY))
+       {
                err = allocate_mipi_frames(main_pipe, &stream->info);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
        }
 #endif
 
-       switch (pipe_id) {
+       switch (pipe_id)
+       {
        case IA_CSS_PIPE_ID_PREVIEW:
                copy_pipe    = main_pipe->pipe_settings.preview.copy_pipe;
                capture_pipe = main_pipe->pipe_settings.preview.capture_pipe;
                acc_pipe     = main_pipe->pipe_settings.preview.acc_pipe;
                max_input_width =
-                       main_pipe->pipe_settings.preview.preview_binary.info->sp.input.max_width;
+                   main_pipe->pipe_settings.preview.preview_binary.info->sp.input.max_width;
 
                err = create_host_preview_pipeline(main_pipe);
                if (err != IA_CSS_SUCCESS)
@@ -2198,7 +2263,7 @@ create_host_pipeline(struct ia_css_stream *stream)
                copy_pipe    = main_pipe->pipe_settings.video.copy_pipe;
                capture_pipe = main_pipe->pipe_settings.video.capture_pipe;
                max_input_width =
-                       main_pipe->pipe_settings.video.video_binary.info->sp.input.max_width;
+                   main_pipe->pipe_settings.video.video_binary.info->sp.input.max_width;
 
                err = create_host_video_pipeline(main_pipe);
                if (err != IA_CSS_SUCCESS)
@@ -2230,27 +2295,31 @@ create_host_pipeline(struct ia_css_stream *stream)
        if (err != IA_CSS_SUCCESS)
                goto ERR;
 
-       if (copy_pipe) {
+       if (copy_pipe)
+       {
                err = create_host_copy_pipeline(copy_pipe, max_input_width,
-                                         main_pipe->continuous_frames[0]);
+                                               main_pipe->continuous_frames[0]);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
        }
 
-       if (capture_pipe) {
+       if (capture_pipe)
+       {
                err = create_host_capture_pipeline(capture_pipe);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
        }
 
-       if (acc_pipe) {
+       if (acc_pipe)
+       {
                err = create_host_acc_pipeline(acc_pipe);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
        }
 
        /* DH regular multi pipe - not continuous mode: create the next pipelines too */
-       if (!stream->config.continuous) {
+       if (!stream->config.continuous)
+       {
                int i;
 
                for (i = 1; i < stream->num_pipes && IA_CSS_SUCCESS == err; i++) {
@@ -2285,10 +2354,10 @@ ERR:
 
 static enum ia_css_err
 init_pipe_defaults(enum ia_css_pipe_mode mode,
-              struct ia_css_pipe *pipe,
-              bool copy_pipe)
-{
-       if (!pipe) {
+                  struct ia_css_pipe *pipe,
+                  bool copy_pipe) {
+       if (!pipe)
+       {
                IA_CSS_ERROR("NULL pipe parameter");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2297,7 +2366,8 @@ init_pipe_defaults(enum ia_css_pipe_mode mode,
        *pipe = IA_CSS_DEFAULT_PIPE;
 
        /* TODO: JB should not be needed, but temporary backward reference */
-       switch (mode) {
+       switch (mode)
+       {
        case IA_CSS_PIPE_MODE_PREVIEW:
                pipe->mode = IA_CSS_PIPE_ID_PREVIEW;
                pipe->pipe_settings.preview = IA_CSS_DEFAULT_PREVIEW_SETTINGS;
@@ -2343,19 +2413,21 @@ pipe_global_init(void)
 }
 
 static enum ia_css_err
-pipe_generate_pipe_num(const struct ia_css_pipe *pipe, unsigned int *pipe_number)
-{
+pipe_generate_pipe_num(const struct ia_css_pipe *pipe,
+                      unsigned int *pipe_number) {
        const u8 INVALID_PIPE_NUM = (uint8_t)~(0);
        u8 pipe_num = INVALID_PIPE_NUM;
        u8 i;
 
-       if (!pipe) {
+       if (!pipe)
+       {
                IA_CSS_ERROR("NULL pipe parameter");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
        /* Assign a new pipe_num .... search for empty place */
-       for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++) {
+       for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++)
+       {
                if (!my_css.all_pipes[i]) {
                        /*position is reserved */
                        my_css.all_pipes[i] = (struct ia_css_pipe *)pipe;
@@ -2363,7 +2435,8 @@ pipe_generate_pipe_num(const struct ia_css_pipe *pipe, unsigned int *pipe_number
                        break;
                }
        }
-       if (pipe_num == INVALID_PIPE_NUM) {
+       if (pipe_num == INVALID_PIPE_NUM)
+       {
                /* Max number of pipes already allocated */
                IA_CSS_ERROR("Max number of pipes already created");
                return IA_CSS_ERR_RESOURCE_EXHAUSTED;
@@ -2383,18 +2456,18 @@ pipe_release_pipe_num(unsigned int pipe_num)
        my_css.all_pipes[pipe_num] = NULL;
        my_css.pipe_counter--;
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "pipe_release_pipe_num (%d)\n", pipe_num);
+                           "pipe_release_pipe_num (%d)\n", pipe_num);
 }
 
 static enum ia_css_err
 create_pipe(enum ia_css_pipe_mode mode,
            struct ia_css_pipe **pipe,
-           bool copy_pipe)
-{
+           bool copy_pipe) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_pipe *me;
 
-       if (!pipe) {
+       if (!pipe)
+       {
                IA_CSS_ERROR("NULL pipe parameter");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2404,13 +2477,15 @@ create_pipe(enum ia_css_pipe_mode mode,
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 
        err = init_pipe_defaults(mode, me, copy_pipe);
-       if (err != IA_CSS_SUCCESS) {
+       if (err != IA_CSS_SUCCESS)
+       {
                kfree(me);
                return err;
        }
 
        err = pipe_generate_pipe_num(me, &me->pipe_num);
-       if (err != IA_CSS_SUCCESS) {
+       if (err != IA_CSS_SUCCESS)
+       {
                kfree(me);
                return err;
        }
@@ -2426,7 +2501,7 @@ find_pipe_by_num(uint32_t pipe_num)
 
        for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++) {
                if (my_css.all_pipes[i] &&
-                               ia_css_pipe_get_pipe_num(my_css.all_pipes[i]) == pipe_num) {
+                   ia_css_pipe_get_pipe_num(my_css.all_pipes[i]) == pipe_num) {
                        return my_css.all_pipes[i];
                }
        }
@@ -2449,67 +2524,75 @@ static void sh_css_pipe_free_acc_binaries(
        /* loop through the stages and unload them */
        for (stage = pipeline->stages; stage; stage = stage->next) {
                struct ia_css_fw_info *firmware = (struct ia_css_fw_info *)
-                                               stage->firmware;
+                                                 stage->firmware;
                if (firmware)
                        ia_css_pipe_unload_extension(pipe, firmware);
        }
 }
 
 enum ia_css_err
-ia_css_pipe_destroy(struct ia_css_pipe *pipe)
-{
+ia_css_pipe_destroy(struct ia_css_pipe *pipe) {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        IA_CSS_ENTER("pipe = %p", pipe);
 
-       if (!pipe) {
+       if (!pipe)
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if (pipe->stream) {
+       if (pipe->stream)
+       {
                IA_CSS_LOG("ia_css_stream_destroy not called!");
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       switch (pipe->config.mode) {
+       switch (pipe->config.mode)
+       {
        case IA_CSS_PIPE_MODE_PREVIEW:
                /* need to take into account that this function is also called
                   on the internal copy pipe */
                if (pipe->mode == IA_CSS_PIPE_ID_PREVIEW) {
                        ia_css_frame_free_multiple(NUM_CONTINUOUS_FRAMES,
-                                       pipe->continuous_frames);
+                                                  pipe->continuous_frames);
                        ia_css_metadata_free_multiple(NUM_CONTINUOUS_FRAMES,
-                                       pipe->cont_md_buffers);
+                                                     pipe->cont_md_buffers);
                        if (pipe->pipe_settings.preview.copy_pipe) {
                                err = ia_css_pipe_destroy(pipe->pipe_settings.preview.copy_pipe);
-                               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_destroy(): destroyed internal copy pipe err=%d\n",
-                                       err);
+                               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                                   "ia_css_pipe_destroy(): destroyed internal copy pipe err=%d\n",
+                                                   err);
                        }
                }
                break;
        case IA_CSS_PIPE_MODE_VIDEO:
                if (pipe->mode == IA_CSS_PIPE_ID_VIDEO) {
                        ia_css_frame_free_multiple(NUM_CONTINUOUS_FRAMES,
-                               pipe->continuous_frames);
+                                                  pipe->continuous_frames);
                        ia_css_metadata_free_multiple(NUM_CONTINUOUS_FRAMES,
-                                       pipe->cont_md_buffers);
+                                                     pipe->cont_md_buffers);
                        if (pipe->pipe_settings.video.copy_pipe) {
                                err = ia_css_pipe_destroy(pipe->pipe_settings.video.copy_pipe);
-                               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_destroy(): destroyed internal copy pipe err=%d\n",
-                                       err);
+                               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                                   "ia_css_pipe_destroy(): destroyed internal copy pipe err=%d\n",
+                                                   err);
                        }
                }
 #ifndef ISP2401
-               ia_css_frame_free_multiple(NUM_VIDEO_TNR_FRAMES, pipe->pipe_settings.video.tnr_frames);
+               ia_css_frame_free_multiple(NUM_VIDEO_TNR_FRAMES,
+                                          pipe->pipe_settings.video.tnr_frames);
 #else
-               ia_css_frame_free_multiple(NUM_TNR_FRAMES, pipe->pipe_settings.video.tnr_frames);
+               ia_css_frame_free_multiple(NUM_TNR_FRAMES,
+                                          pipe->pipe_settings.video.tnr_frames);
 #endif
-               ia_css_frame_free_multiple(MAX_NUM_VIDEO_DELAY_FRAMES, pipe->pipe_settings.video.delay_frames);
+               ia_css_frame_free_multiple(MAX_NUM_VIDEO_DELAY_FRAMES,
+                                          pipe->pipe_settings.video.delay_frames);
                break;
        case IA_CSS_PIPE_MODE_CAPTURE:
-               ia_css_frame_free_multiple(MAX_NUM_VIDEO_DELAY_FRAMES, pipe->pipe_settings.capture.delay_frames);
+               ia_css_frame_free_multiple(MAX_NUM_VIDEO_DELAY_FRAMES,
+                                          pipe->pipe_settings.capture.delay_frames);
                break;
        case IA_CSS_PIPE_MODE_ACC:
                sh_css_pipe_free_acc_binaries(pipe);
@@ -2530,7 +2613,8 @@ ia_css_pipe_destroy(struct ia_css_pipe *pipe)
        pipe_release_pipe_num(ia_css_pipe_get_pipe_num(pipe));
 
        /* Temporarily, not every sh_css_pipe has an acc_extension. */
-       if (pipe->config.acc_extension) {
+       if (pipe->config.acc_extension)
+       {
                ia_css_pipe_unload_extension(pipe, pipe->config.acc_extension);
        }
        kfree(pipe);
@@ -2583,15 +2667,16 @@ ia_css_uninit(void)
 
 #if defined(HAS_IRQ_MAP_VERSION_2)
 enum ia_css_err ia_css_irq_translate(
-       unsigned int *irq_infos)
+    unsigned int *irq_infos)
 {
        virq_id_t       irq;
        enum hrt_isp_css_irq_status status = hrt_isp_css_irq_status_more_irqs;
        unsigned int infos = 0;
 
-/* irq_infos can be NULL, but that would make the function useless */
-/* assert(irq_infos != NULL); */
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_irq_translate() enter: irq_infos=%p\n", irq_infos);
+       /* irq_infos can be NULL, but that would make the function useless */
+       /* assert(irq_infos != NULL); */
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_irq_translate() enter: irq_infos=%p\n", irq_infos);
 
        while (status == hrt_isp_css_irq_status_more_irqs) {
                status = virq_get_channel_id(&irq);
@@ -2646,15 +2731,16 @@ enum ia_css_err ia_css_irq_translate(
        if (irq_infos)
                *irq_infos = infos;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_irq_translate() leave: irq_infos=%u\n",
-               infos);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_irq_translate() leave: irq_infos=%u\n",
+                           infos);
 
        return IA_CSS_SUCCESS;
 }
 
 enum ia_css_err ia_css_irq_enable(
-       enum ia_css_irq_info info,
-       bool enable)
+    enum ia_css_irq_info info,
+    bool enable)
 {
        virq_id_t       irq = N_virq_id;
 
@@ -2698,8 +2784,7 @@ enum ia_css_err ia_css_irq_enable(
 }
 
 #else
-#error "sh_css.c: IRQ MAP must be one of \
-       {IRQ_MAP_VERSION_2}"
+#error "sh_css.c: IRQ MAP must be one of { IRQ_MAP_VERSION_2 }"
 #endif
 
 static unsigned int
@@ -2707,18 +2792,20 @@ sh_css_get_sw_interrupt_value(unsigned int irq)
 {
        unsigned int irq_value;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_get_sw_interrupt_value() enter: irq=%d\n", irq);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "sh_css_get_sw_interrupt_value() enter: irq=%d\n", irq);
        irq_value = sh_css_sp_get_sw_interrupt_value(irq);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_get_sw_interrupt_value() leave: irq_value=%d\n", irq_value);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "sh_css_get_sw_interrupt_value() leave: irq_value=%d\n", irq_value);
        return irq_value;
 }
 
 /* configure and load the copy binary, the next binary is used to
    determine whether the copy binary needs to do left padding. */
 static enum ia_css_err load_copy_binary(
-       struct ia_css_pipe *pipe,
-       struct ia_css_binary *copy_binary,
-       struct ia_css_binary *next_binary)
+    struct ia_css_pipe *pipe,
+    struct ia_css_binary *copy_binary,
+    struct ia_css_binary *next_binary)
 {
        struct ia_css_frame_info copy_out_info, copy_in_info, copy_vf_info;
        unsigned int left_padding;
@@ -2729,7 +2816,7 @@ static enum ia_css_err load_copy_binary(
        assert(pipe);
        assert(copy_binary);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "load_copy_binary() enter:\n");
+                           "load_copy_binary() enter:\n");
 
        if (next_binary) {
                copy_out_info = next_binary->in_frame_info;
@@ -2742,7 +2829,8 @@ static enum ia_css_err load_copy_binary(
        }
 
        ia_css_pipe_get_copy_binarydesc(pipe, &copy_descr,
-               &copy_in_info, &copy_out_info, (next_binary) ? NULL : NULL/*TODO: &copy_vf_info*/);
+                                       &copy_in_info, &copy_out_info,
+                                       (next_binary) ? NULL : NULL/*TODO: &copy_vf_info*/);
        err = ia_css_binary_find(&copy_descr, copy_binary);
        if (err != IA_CSS_SUCCESS)
                return err;
@@ -2752,8 +2840,7 @@ static enum ia_css_err load_copy_binary(
 
 static enum ia_css_err
 alloc_continuous_frames(
-       struct ia_css_pipe *pipe, bool init_time)
-{
+    struct ia_css_pipe *pipe, bool init_time) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_frame_info ref_info;
        enum ia_css_pipe_id pipe_id;
@@ -2764,7 +2851,8 @@ alloc_continuous_frames(
 
        IA_CSS_ENTER_PRIVATE("pipe = %p, init_time = %d", pipe, init_time);
 
-       if ((!pipe) || (!pipe->stream)) {
+       if ((!pipe) || (!pipe->stream))
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2772,21 +2860,26 @@ alloc_continuous_frames(
        pipe_id = pipe->mode;
        continuous = pipe->stream->config.continuous;
 
-       if (continuous) {
+       if (continuous)
+       {
                if (init_time) {
                        num_frames = pipe->stream->config.init_num_cont_raw_buf;
                        pipe->stream->continuous_pipe = pipe;
                } else
                        num_frames = pipe->stream->config.target_num_cont_raw_buf;
-       } else {
-           num_frames = NUM_ONLINE_INIT_CONTINUOUS_FRAMES;
+       } else
+       {
+               num_frames = NUM_ONLINE_INIT_CONTINUOUS_FRAMES;
        }
 
-       if (pipe_id == IA_CSS_PIPE_ID_PREVIEW) {
+       if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+       {
                ref_info = pipe->pipe_settings.preview.preview_binary.in_frame_info;
-       } else if (pipe_id == IA_CSS_PIPE_ID_VIDEO) {
+       } else if (pipe_id == IA_CSS_PIPE_ID_VIDEO)
+       {
                ref_info = pipe->pipe_settings.video.video_binary.in_frame_info;
-       } else {
+       } else
+       {
                /* should not happen */
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
                return IA_CSS_ERR_INTERNAL_ERROR;
@@ -2802,26 +2895,31 @@ alloc_continuous_frames(
 #endif
 
 #if !defined(HAS_NO_PACKED_RAW_PIXELS)
-       if (pipe->stream->config.pack_raw_pixels) {
+       if (pipe->stream->config.pack_raw_pixels)
+       {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                       "alloc_continuous_frames() IA_CSS_FRAME_FORMAT_RAW_PACKED\n");
+                                   "alloc_continuous_frames() IA_CSS_FRAME_FORMAT_RAW_PACKED\n");
                ref_info.format = IA_CSS_FRAME_FORMAT_RAW_PACKED;
        } else
 #endif
        {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                       "alloc_continuous_frames() IA_CSS_FRAME_FORMAT_RAW\n");
+                                   "alloc_continuous_frames() IA_CSS_FRAME_FORMAT_RAW\n");
                ref_info.format = IA_CSS_FRAME_FORMAT_RAW;
        }
 
        /* Write format back to binary */
-       if (pipe_id == IA_CSS_PIPE_ID_PREVIEW) {
-               pipe->pipe_settings.preview.preview_binary.in_frame_info.format = ref_info.format;
+       if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+       {
+               pipe->pipe_settings.preview.preview_binary.in_frame_info.format =
+                   ref_info.format;
                capture_pipe = pipe->pipe_settings.preview.capture_pipe;
-       } else if (pipe_id == IA_CSS_PIPE_ID_VIDEO) {
+       } else if (pipe_id == IA_CSS_PIPE_ID_VIDEO)
+       {
                pipe->pipe_settings.video.video_binary.in_frame_info.format = ref_info.format;
                capture_pipe = pipe->pipe_settings.video.capture_pipe;
-       } else {
+       } else
+       {
                /* should not happen */
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
                return IA_CSS_ERR_INTERNAL_ERROR;
@@ -2832,7 +2930,8 @@ alloc_continuous_frames(
        else
                idx = pipe->stream->config.init_num_cont_raw_buf;
 
-       for (i = idx; i < NUM_CONTINUOUS_FRAMES; i++) {
+       for (i = idx; i < NUM_CONTINUOUS_FRAMES; i++)
+       {
                /* free previous frame */
                if (pipe->continuous_frames[i]) {
                        ia_css_frame_free(pipe->continuous_frames[i]);
@@ -2846,15 +2945,15 @@ alloc_continuous_frames(
                if (i < num_frames) {
                        /* allocate new frame */
                        err = ia_css_frame_allocate_from_info(
-                               &pipe->continuous_frames[i],
-                               &ref_info);
+                                 &pipe->continuous_frames[i],
+                                 &ref_info);
                        if (err != IA_CSS_SUCCESS) {
                                IA_CSS_LEAVE_ERR_PRIVATE(err);
                                return err;
                        }
                        /* allocate metadata buffer */
                        pipe->cont_md_buffers[i] = ia_css_metadata_allocate(
-                                       &pipe->stream->info.metadata_info);
+                                                      &pipe->stream->info.metadata_info);
                }
        }
        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
@@ -2862,20 +2961,18 @@ alloc_continuous_frames(
 }
 
 enum ia_css_err
-ia_css_alloc_continuous_frame_remain(struct ia_css_stream *stream)
-{
+ia_css_alloc_continuous_frame_remain(struct ia_css_stream *stream) {
        if (!stream)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        return alloc_continuous_frames(stream->continuous_pipe, false);
 }
 
 static enum ia_css_err
-load_preview_binaries(struct ia_css_pipe *pipe)
-{
+load_preview_binaries(struct ia_css_pipe *pipe) {
        struct ia_css_frame_info prev_in_info,
-                                prev_bds_out_info,
-                                prev_out_info,
-                                prev_vf_info;
+               prev_bds_out_info,
+               prev_out_info,
+               prev_vf_info;
        struct ia_css_binary_descr preview_descr;
        bool online;
        enum ia_css_err err = IA_CSS_SUCCESS;
@@ -2925,9 +3022,9 @@ load_preview_binaries(struct ia_css_pipe *pipe)
         * */
        need_vf_pp = pipe->config.enable_dz;
        need_vf_pp |= pipe_out_info->format != IA_CSS_FRAME_FORMAT_YUV_LINE &&
-                     !(pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12 ||
-                       pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12_16 ||
-                       pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12_TILEY);
+       !(pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12 ||
+         pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12_16 ||
+         pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12_TILEY);
 
        /* Preview step 1 */
        if (pipe->vf_yuv_ds_input_info.res.width)
@@ -2944,12 +3041,12 @@ load_preview_binaries(struct ia_css_pipe *pipe)
                                             IA_CSS_FRAME_FORMAT_YUV_LINE);
 
        err = ia_css_pipe_get_preview_binarydesc(
-                       pipe,
-                       &preview_descr,
-                       &prev_in_info,
-                       &prev_bds_out_info,
-                       &prev_out_info,
-                       &prev_vf_info);
+           pipe,
+           &preview_descr,
+           &prev_in_info,
+           &prev_bds_out_info,
+           &prev_out_info,
+           &prev_vf_info);
        if (err != IA_CSS_SUCCESS)
                return err;
        err = ia_css_binary_find(&preview_descr, &mycs->preview_binary);
@@ -2963,8 +3060,8 @@ load_preview_binaries(struct ia_css_pipe *pipe)
        pipe->info.num_invalid_frames = pipe->num_invalid_frames;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "load_preview_binaries() num_invalid_frames=%d dvs_frame_delay=%d\n",
-               pipe->num_invalid_frames, pipe->dvs_frame_delay);
+                           "load_preview_binaries() num_invalid_frames=%d dvs_frame_delay=%d\n",
+                           pipe->num_invalid_frames, pipe->dvs_frame_delay);
 
 #endif
        /* The vf_pp binary is needed when (further) YUV downscaling is required */
@@ -2976,7 +3073,8 @@ load_preview_binaries(struct ia_css_pipe *pipe)
         * then the preview binary selection is done again.
         */
        if (need_vf_pp &&
-               (mycs->preview_binary.out_frame_info[0].format != IA_CSS_FRAME_FORMAT_YUV_LINE)) {
+           (mycs->preview_binary.out_frame_info[0].format != IA_CSS_FRAME_FORMAT_YUV_LINE))
+       {
                /* Preview step 2 */
                if (pipe->vf_yuv_ds_input_info.res.width)
                        prev_vf_info = pipe->vf_yuv_ds_input_info;
@@ -2984,32 +3082,33 @@ load_preview_binaries(struct ia_css_pipe *pipe)
                        prev_vf_info = *pipe_out_info;
 
                ia_css_frame_info_set_format(&prev_vf_info,
-                       IA_CSS_FRAME_FORMAT_YUV_LINE);
+                                            IA_CSS_FRAME_FORMAT_YUV_LINE);
 
                err = ia_css_pipe_get_preview_binarydesc(
-                               pipe,
-                               &preview_descr,
-                               &prev_in_info,
-                               &prev_bds_out_info,
-                               &prev_out_info,
-                               &prev_vf_info);
+                   pipe,
+                   &preview_descr,
+                   &prev_in_info,
+                   &prev_bds_out_info,
+                   &prev_out_info,
+                   &prev_vf_info);
                if (err != IA_CSS_SUCCESS)
                        return err;
                err = ia_css_binary_find(&preview_descr,
-                               &mycs->preview_binary);
+                                        &mycs->preview_binary);
                if (err != IA_CSS_SUCCESS)
                        return err;
        }
 
-       if (need_vf_pp) {
+       if (need_vf_pp)
+       {
                struct ia_css_binary_descr vf_pp_descr;
 
                /* Viewfinder post-processing */
                ia_css_pipe_get_vfpp_binarydesc(pipe, &vf_pp_descr,
-                       &mycs->preview_binary.out_frame_info[0],
-                       pipe_out_info);
+                                               &mycs->preview_binary.out_frame_info[0],
+                                               pipe_out_info);
                err = ia_css_binary_find(&vf_pp_descr,
-                                &mycs->vf_pp_binary);
+                                        &mycs->vf_pp_binary);
                if (err != IA_CSS_SUCCESS)
                        return err;
        }
@@ -3033,7 +3132,8 @@ load_preview_binaries(struct ia_css_pipe *pipe)
 #endif
 
        /* Copy */
-       if (need_isp_copy_binary) {
+       if (need_isp_copy_binary)
+       {
                err = load_copy_binary(pipe,
                                       &mycs->copy_binary,
                                       &mycs->preview_binary);
@@ -3041,7 +3141,8 @@ load_preview_binaries(struct ia_css_pipe *pipe)
                        return err;
        }
 
-       if (pipe->shading_table) {
+       if (pipe->shading_table)
+       {
                ia_css_shading_table_free(pipe->shading_table);
                pipe->shading_table = NULL;
        }
@@ -3056,11 +3157,11 @@ ia_css_binary_unload(struct ia_css_binary *binary)
 }
 
 static enum ia_css_err
-unload_preview_binaries(struct ia_css_pipe *pipe)
-{
+unload_preview_binaries(struct ia_css_pipe *pipe) {
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
 
-       if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW)) {
+       if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW))
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -3073,10 +3174,10 @@ unload_preview_binaries(struct ia_css_pipe *pipe)
 }
 
 static const struct ia_css_fw_info *last_output_firmware(
-       const struct ia_css_fw_info *fw)
+    const struct ia_css_fw_info *fw)
 {
        const struct ia_css_fw_info *last_fw = NULL;
-/* fw can be NULL */
+       /* fw can be NULL */
        IA_CSS_ENTER_LEAVE_PRIVATE("");
 
        for (; fw; fw = fw->next) {
@@ -3089,24 +3190,24 @@ static const struct ia_css_fw_info *last_output_firmware(
 }
 
 static enum ia_css_err add_firmwares(
-       struct ia_css_pipeline *me,
-       struct ia_css_binary *binary,
-       const struct ia_css_fw_info *fw,
-       const struct ia_css_fw_info *last_fw,
-       unsigned int binary_mode,
-       struct ia_css_frame *in_frame,
-       struct ia_css_frame *out_frame,
-       struct ia_css_frame *vf_frame,
-       struct ia_css_pipeline_stage **my_stage,
-       struct ia_css_pipeline_stage **vf_stage)
+    struct ia_css_pipeline *me,
+    struct ia_css_binary *binary,
+    const struct ia_css_fw_info *fw,
+    const struct ia_css_fw_info *last_fw,
+    unsigned int binary_mode,
+    struct ia_css_frame *in_frame,
+    struct ia_css_frame *out_frame,
+    struct ia_css_frame *vf_frame,
+    struct ia_css_pipeline_stage **my_stage,
+    struct ia_css_pipeline_stage **vf_stage)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_pipeline_stage *extra_stage = NULL;
        struct ia_css_pipeline_stage_desc stage_desc;
 
-/* all args can be NULL ??? */
+       /* all args can be NULL ??? */
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "add_firmwares() enter:\n");
+                           "add_firmwares() enter:\n");
 
        for (; fw; fw = fw->next) {
                struct ia_css_frame *out[IA_CSS_BINARY_MAX_OUTPUT_PORTS] = {NULL};
@@ -3123,10 +3224,10 @@ static enum ia_css_err add_firmwares(
                        vf = vf_frame;
                }
                ia_css_pipe_get_firmwares_stage_desc(&stage_desc, binary,
-                       out, in, vf, fw, binary_mode);
+                                                    out, in, vf, fw, binary_mode);
                err = ia_css_pipeline_create_and_add_stage(me,
-                               &stage_desc,
-                               &extra_stage);
+                       &stage_desc,
+                       &extra_stage);
                if (err != IA_CSS_SUCCESS)
                        return err;
                if (fw->info.isp.sp.enable.output != 0)
@@ -3141,11 +3242,11 @@ static enum ia_css_err add_firmwares(
 }
 
 static enum ia_css_err add_vf_pp_stage(
-       struct ia_css_pipe *pipe,
-       struct ia_css_frame *in_frame,
-       struct ia_css_frame *out_frame,
-       struct ia_css_binary *vf_pp_binary,
-       struct ia_css_pipeline_stage **vf_pp_stage)
+    struct ia_css_pipe *pipe,
+    struct ia_css_frame *in_frame,
+    struct ia_css_frame *out_frame,
+    struct ia_css_binary *vf_pp_binary,
+    struct ia_css_pipeline_stage **vf_pp_stage)
 {
        struct ia_css_pipeline *me = NULL;
        const struct ia_css_fw_info *last_fw = NULL;
@@ -3153,7 +3254,7 @@ static enum ia_css_err add_vf_pp_stage(
        struct ia_css_frame *out_frames[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
        struct ia_css_pipeline_stage_desc stage_desc;
 
-/* out_frame can be NULL ??? */
+       /* out_frame can be NULL ??? */
 
        if (!pipe)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -3168,7 +3269,7 @@ static enum ia_css_err add_vf_pp_stage(
        me = &pipe->pipeline;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-       "add_vf_pp_stage() enter:\n");
+                           "add_vf_pp_stage() enter:\n");
 
        *vf_pp_stage = NULL;
 
@@ -3177,11 +3278,11 @@ static enum ia_css_err add_vf_pp_stage(
                if (last_fw) {
                        ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
                        ia_css_pipe_get_generic_stage_desc(&stage_desc, vf_pp_binary,
-                               out_frames, in_frame, NULL);
+                                                          out_frames, in_frame, NULL);
                } else {
                        ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
                        ia_css_pipe_get_generic_stage_desc(&stage_desc, vf_pp_binary,
-                               out_frames, in_frame, NULL);
+                                                          out_frames, in_frame, NULL);
                }
                err = ia_css_pipeline_create_and_add_stage(me, &stage_desc, vf_pp_stage);
                if (err != IA_CSS_SUCCESS)
@@ -3196,13 +3297,13 @@ static enum ia_css_err add_vf_pp_stage(
 }
 
 static enum ia_css_err add_yuv_scaler_stage(
-       struct ia_css_pipe *pipe,
-       struct ia_css_pipeline *me,
-       struct ia_css_frame *in_frame,
-       struct ia_css_frame *out_frame,
-       struct ia_css_frame *internal_out_frame,
-       struct ia_css_binary *yuv_scaler_binary,
-       struct ia_css_pipeline_stage **pre_vf_pp_stage)
+    struct ia_css_pipe *pipe,
+    struct ia_css_pipeline *me,
+    struct ia_css_frame *in_frame,
+    struct ia_css_frame *out_frame,
+    struct ia_css_frame *internal_out_frame,
+    struct ia_css_binary *yuv_scaler_binary,
+    struct ia_css_pipeline_stage **pre_vf_pp_stage)
 {
        const struct ia_css_fw_info *last_fw;
        enum ia_css_err err = IA_CSS_SUCCESS;
@@ -3217,7 +3318,7 @@ static enum ia_css_err add_yuv_scaler_stage(
        assert(yuv_scaler_binary);
        assert(pre_vf_pp_stage);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "add_yuv_scaler_stage() enter:\n");
+                           "add_yuv_scaler_stage() enter:\n");
 
        *pre_vf_pp_stage = NULL;
        ia_css_pipe_util_create_output_frames(out_frames);
@@ -3227,12 +3328,12 @@ static enum ia_css_err add_yuv_scaler_stage(
        if (last_fw) {
                ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
                ia_css_pipe_get_generic_stage_desc(&stage_desc,
-                       yuv_scaler_binary, out_frames, in_frame, vf_frame);
+                                                  yuv_scaler_binary, out_frames, in_frame, vf_frame);
        } else {
                ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
                ia_css_pipe_util_set_output_frames(out_frames, 1, internal_out_frame);
                ia_css_pipe_get_generic_stage_desc(&stage_desc,
-                       yuv_scaler_binary, out_frames, in_frame, vf_frame);
+                                                  yuv_scaler_binary, out_frames, in_frame, vf_frame);
        }
        err = ia_css_pipeline_create_and_add_stage(me,
                &stage_desc,
@@ -3246,20 +3347,21 @@ static enum ia_css_err add_yuv_scaler_stage(
                            in_frame, out_frame, vf_frame,
                            NULL, pre_vf_pp_stage);
        /* If a firmware produce vf_pp output, we set that as vf_pp input */
-       (*pre_vf_pp_stage)->args.vf_downscale_log2 = yuv_scaler_binary->vf_downscale_log2;
+       (*pre_vf_pp_stage)->args.vf_downscale_log2 =
+           yuv_scaler_binary->vf_downscale_log2;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "add_yuv_scaler_stage() leave:\n");
+                           "add_yuv_scaler_stage() leave:\n");
        return err;
 }
 
 static enum ia_css_err add_capture_pp_stage(
-       struct ia_css_pipe *pipe,
-       struct ia_css_pipeline *me,
-       struct ia_css_frame *in_frame,
-       struct ia_css_frame *out_frame,
-       struct ia_css_binary *capture_pp_binary,
-       struct ia_css_pipeline_stage **capture_pp_stage)
+    struct ia_css_pipe *pipe,
+    struct ia_css_pipeline *me,
+    struct ia_css_frame *in_frame,
+    struct ia_css_frame *out_frame,
+    struct ia_css_binary *capture_pp_binary,
+    struct ia_css_pipeline_stage **capture_pp_stage)
 {
        const struct ia_css_fw_info *last_fw = NULL;
        enum ia_css_err err = IA_CSS_SUCCESS;
@@ -3274,24 +3376,24 @@ static enum ia_css_err add_capture_pp_stage(
        assert(capture_pp_binary);
        assert(capture_pp_stage);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "add_capture_pp_stage() enter:\n");
+                           "add_capture_pp_stage() enter:\n");
 
        *capture_pp_stage = NULL;
        ia_css_pipe_util_create_output_frames(out_frames);
 
        last_fw = last_output_firmware(pipe->output_stage);
        err = ia_css_frame_allocate_from_info(&vf_frame,
-                                   &capture_pp_binary->vf_frame_info);
+                                             &capture_pp_binary->vf_frame_info);
        if (err != IA_CSS_SUCCESS)
                return err;
        if (last_fw)    {
                ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
                ia_css_pipe_get_generic_stage_desc(&stage_desc,
-                       capture_pp_binary, out_frames, NULL, vf_frame);
+                                                  capture_pp_binary, out_frames, NULL, vf_frame);
        } else {
                ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
                ia_css_pipe_get_generic_stage_desc(&stage_desc,
-                       capture_pp_binary, out_frames, NULL, vf_frame);
+                                                  capture_pp_binary, out_frames, NULL, vf_frame);
        }
        err = ia_css_pipeline_create_and_add_stage(me,
                &stage_desc,
@@ -3305,7 +3407,7 @@ static enum ia_css_err add_capture_pp_stage(
        /* If a firmware produce vf_pp output, we set that as vf_pp input */
        if (*capture_pp_stage) {
                (*capture_pp_stage)->args.vf_downscale_log2 =
-                 capture_pp_binary->vf_downscale_log2;
+                   capture_pp_binary->vf_downscale_log2;
        }
        return err;
 }
@@ -3321,21 +3423,20 @@ static void sh_css_setup_queues(void)
 
        fw = &sh_css_sp_fw;
        HIVE_ADDR_host_sp_queues_initialized =
-               fw->info.sp.host_sp_queues_initialized;
+           fw->info.sp.host_sp_queues_initialized;
 
        ia_css_bufq_init();
 
        /* set "host_sp_queues_initialized" to "true" */
        sp_dmem_store_uint32(SP0_ID,
-               (unsigned int)sp_address_of(host_sp_queues_initialized),
-               (uint32_t)(1));
+                            (unsigned int)sp_address_of(host_sp_queues_initialized),
+                            (uint32_t)(1));
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_setup_queues() leave:\n");
 }
 
 static enum ia_css_err
 init_vf_frameinfo_defaults(struct ia_css_pipe *pipe,
-       struct ia_css_frame *vf_frame, unsigned int idx)
-{
+                          struct ia_css_frame *vf_frame, unsigned int idx) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        unsigned int thread_id;
        enum sh_css_queue_id queue_id;
@@ -3357,7 +3458,7 @@ init_vf_frameinfo_defaults(struct ia_css_pipe *pipe,
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
 static unsigned int
 get_crop_lines_for_bayer_order(
-               const struct ia_css_stream_config *config)
+    const struct ia_css_stream_config *config)
 {
        assert(config);
        if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_BGGR)
@@ -3369,7 +3470,7 @@ get_crop_lines_for_bayer_order(
 
 static unsigned int
 get_crop_columns_for_bayer_order(
-               const struct ia_css_stream_config *config)
+    const struct ia_css_stream_config *config)
 {
        assert(config);
        if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_RGGB)
@@ -3382,7 +3483,7 @@ get_crop_columns_for_bayer_order(
 /* This function is to get the sum of all extra pixels in addition to the effective
  * input, it includes dvs envelop and filter run-in */
 static void get_pipe_extra_pixel(struct ia_css_pipe *pipe,
-               unsigned int *extra_row, unsigned int *extra_column)
+                                unsigned int *extra_row, unsigned int *extra_column)
 {
        enum ia_css_pipe_id pipe_id = pipe->mode;
        unsigned int left_cropping = 0, top_cropping = 0;
@@ -3396,26 +3497,34 @@ static void get_pipe_extra_pixel(struct ia_css_pipe *pipe,
        switch (pipe_id) {
        case IA_CSS_PIPE_ID_PREVIEW:
                if (pipe->pipe_settings.preview.preview_binary.info) {
-                       left_cropping = pipe->pipe_settings.preview.preview_binary.info->sp.pipeline.left_cropping;
-                       top_cropping = pipe->pipe_settings.preview.preview_binary.info->sp.pipeline.top_cropping;
+                       left_cropping =
+                           pipe->pipe_settings.preview.preview_binary.info->sp.pipeline.left_cropping;
+                       top_cropping =
+                           pipe->pipe_settings.preview.preview_binary.info->sp.pipeline.top_cropping;
                }
                dvs_env = pipe->pipe_settings.preview.preview_binary.dvs_envelope;
                break;
        case IA_CSS_PIPE_ID_VIDEO:
                if (pipe->pipe_settings.video.video_binary.info) {
-                       left_cropping = pipe->pipe_settings.video.video_binary.info->sp.pipeline.left_cropping;
-                       top_cropping = pipe->pipe_settings.video.video_binary.info->sp.pipeline.top_cropping;
+                       left_cropping =
+                           pipe->pipe_settings.video.video_binary.info->sp.pipeline.left_cropping;
+                       top_cropping =
+                           pipe->pipe_settings.video.video_binary.info->sp.pipeline.top_cropping;
                }
                dvs_env = pipe->pipe_settings.video.video_binary.dvs_envelope;
                break;
        case IA_CSS_PIPE_ID_CAPTURE:
                for (i = 0; i < pipe->pipe_settings.capture.num_primary_stage; i++) {
                        if (pipe->pipe_settings.capture.primary_binary[i].info) {
-                               left_cropping += pipe->pipe_settings.capture.primary_binary[i].info->sp.pipeline.left_cropping;
-                               top_cropping += pipe->pipe_settings.capture.primary_binary[i].info->sp.pipeline.top_cropping;
+                               left_cropping +=
+                                   pipe->pipe_settings.capture.primary_binary[i].info->sp.pipeline.left_cropping;
+                               top_cropping +=
+                                   pipe->pipe_settings.capture.primary_binary[i].info->sp.pipeline.top_cropping;
                        }
-                       dvs_env.width += pipe->pipe_settings.capture.primary_binary[i].dvs_envelope.width;
-                       dvs_env.height += pipe->pipe_settings.capture.primary_binary[i].dvs_envelope.height;
+                       dvs_env.width +=
+                           pipe->pipe_settings.capture.primary_binary[i].dvs_envelope.width;
+                       dvs_env.height +=
+                           pipe->pipe_settings.capture.primary_binary[i].dvs_envelope.height;
                }
                break;
        default:
@@ -3443,8 +3552,8 @@ ia_css_get_crop_offsets(
        assert(in_frame);
 
        IA_CSS_ENTER_PRIVATE("pipe = %p effective_wd = %u effective_ht = %u",
-               pipe, pipe->config.input_effective_res.width,
-               pipe->config.input_effective_res.height);
+                            pipe, pipe->config.input_effective_res.width,
+                            pipe->config.input_effective_res.height);
 
        input_res = &pipe->stream->config.input_config.input_res;
 #ifndef ISP2401
@@ -3492,8 +3601,7 @@ ia_css_get_crop_offsets(
 
 static enum ia_css_err
 init_in_frameinfo_memory_defaults(struct ia_css_pipe *pipe,
-       struct ia_css_frame *frame, enum ia_css_frame_format format)
-{
+                                 struct ia_css_frame *frame, enum ia_css_frame_format format) {
        struct ia_css_frame *in_frame;
        enum ia_css_err err = IA_CSS_SUCCESS;
        unsigned int thread_id;
@@ -3507,13 +3615,13 @@ init_in_frameinfo_memory_defaults(struct ia_css_pipe *pipe,
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
        if (format == IA_CSS_FRAME_FORMAT_RAW)
                in_frame->info.format = (pipe->stream->config.pack_raw_pixels) ?
-                                       IA_CSS_FRAME_FORMAT_RAW_PACKED : IA_CSS_FRAME_FORMAT_RAW;
+               IA_CSS_FRAME_FORMAT_RAW_PACKED : IA_CSS_FRAME_FORMAT_RAW;
 #endif
 
        in_frame->info.res.width = pipe->stream->config.input_config.input_res.width;
        in_frame->info.res.height = pipe->stream->config.input_config.input_res.height;
        in_frame->info.raw_bit_depth =
-               ia_css_pipe_util_pipe_input_format_bpp(pipe);
+       ia_css_pipe_util_pipe_input_format_bpp(pipe);
        ia_css_frame_info_set_width(&in_frame->info, pipe->stream->config.input_config.input_res.width, 0);
        in_frame->contiguous = false;
        in_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
@@ -3527,15 +3635,14 @@ init_in_frameinfo_memory_defaults(struct ia_css_pipe *pipe,
        err = ia_css_frame_init_planes(in_frame);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "init_in_frameinfo_memory_defaults() bayer_order = %d:\n", in_frame->info.raw_bayer_order);
+                           "init_in_frameinfo_memory_defaults() bayer_order = %d:\n", in_frame->info.raw_bayer_order);
 
        return err;
 }
 
 static enum ia_css_err
 init_out_frameinfo_defaults(struct ia_css_pipe *pipe,
-       struct ia_css_frame *out_frame, unsigned int idx)
-{
+                           struct ia_css_frame *out_frame, unsigned int idx) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        unsigned int thread_id;
        enum sh_css_queue_id queue_id;
@@ -3559,7 +3666,7 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
 {
        struct ia_css_pipeline_stage_desc stage_desc;
        struct ia_css_binary *copy_binary, *video_binary,
-                            *yuv_scaler_binary, *vf_pp_binary;
+                      *yuv_scaler_binary, *vf_pp_binary;
        struct ia_css_pipeline_stage *copy_stage  = NULL;
        struct ia_css_pipeline_stage *video_stage = NULL;
        struct ia_css_pipeline_stage *yuv_scaler_stage  = NULL;
@@ -3597,16 +3704,19 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
        /* When the input system is 2401, always enable 'in_frameinfo_memory'
         * except for the following: online or continuous
         */
-       need_in_frameinfo_memory = !(pipe->stream->config.online || pipe->stream->config.continuous);
+       need_in_frameinfo_memory = !(pipe->stream->config.online ||
+                                    pipe->stream->config.continuous);
 #else
        /* Construct in_frame info (only in case we have dynamic input */
-       need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
+       need_in_frameinfo_memory = pipe->stream->config.mode ==
+                                  IA_CSS_INPUT_MODE_MEMORY;
 #endif
 
        /* Construct in_frame info (only in case we have dynamic input */
        if (need_in_frameinfo_memory) {
                in_frame = &pipe->in_frame_struct;
-               err = init_in_frameinfo_memory_defaults(pipe, in_frame, IA_CSS_FRAME_FORMAT_RAW);
+               err = init_in_frameinfo_memory_defaults(pipe, in_frame,
+                                                       IA_CSS_FRAME_FORMAT_RAW);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
        }
@@ -3640,7 +3750,7 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
        if (need_copy) {
                ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
                ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
-                       out_frames, NULL, NULL);
+                                                  out_frames, NULL, NULL);
                err = ia_css_pipeline_create_and_add_stage(me,
                        &stage_desc,
                        &copy_stage);
@@ -3658,27 +3768,28 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
 #endif
        }
 
-       ia_css_pipe_util_set_output_frames(out_frames, 0, need_yuv_pp ? NULL : out_frame);
+       ia_css_pipe_util_set_output_frames(out_frames, 0,
+                                          need_yuv_pp ? NULL : out_frame);
 
        /* when the video binary supports a second output pin,
           it can directly produce the vf_frame.  */
        if (need_vf_pp) {
                ia_css_pipe_get_generic_stage_desc(&stage_desc, video_binary,
-                       out_frames, in_frame, NULL);
+                                                  out_frames, in_frame, NULL);
        } else {
                ia_css_pipe_get_generic_stage_desc(&stage_desc, video_binary,
-                       out_frames, in_frame, vf_frame);
+                                                  out_frames, in_frame, vf_frame);
        }
        err = ia_css_pipeline_create_and_add_stage(me,
-                       &stage_desc,
-                       &video_stage);
+               &stage_desc,
+               &video_stage);
        if (err != IA_CSS_SUCCESS)
                goto ERR;
 
        /* If we use copy iso video, the input must be yuv iso raw */
        if (video_stage) {
                video_stage->args.copy_vf =
-                       video_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY;
+                   video_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY;
                video_stage->args.copy_output = video_stage->args.copy_vf;
        }
 
@@ -3699,18 +3810,17 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
                for (frm = 0; frm < NUM_TNR_FRAMES; frm++) {
 #endif
                        video_stage->args.tnr_frames[frm] =
-                               pipe->pipe_settings.video.tnr_frames[frm];
+                           pipe->pipe_settings.video.tnr_frames[frm];
                }
                for (frm = 0; frm < MAX_NUM_VIDEO_DELAY_FRAMES; frm++) {
                        video_stage->args.delay_frames[frm] =
-                               pipe->pipe_settings.video.delay_frames[frm];
+                           pipe->pipe_settings.video.delay_frames[frm];
                }
        }
 
        /* Append Extension on Video out, if enabled */
        if (!need_vf_pp && video_stage && pipe->config.acc_extension &&
-                (pipe->config.acc_extension->info.isp.type == IA_CSS_ACC_OUTPUT))
-       {
+           (pipe->config.acc_extension->info.isp.type == IA_CSS_ACC_OUTPUT)) {
                struct ia_css_frame *out = NULL;
                struct ia_css_frame *in = NULL;
 
@@ -3726,9 +3836,9 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
                }
 
                err = add_firmwares(me, video_binary, pipe->output_stage,
-                                       last_output_firmware(pipe->output_stage),
-                                       IA_CSS_BINARY_MODE_VIDEO,
-                                       in, out, NULL, &video_stage, NULL);
+                                   last_output_firmware(pipe->output_stage),
+                                   IA_CSS_BINARY_MODE_VIDEO,
+                                   in, out, NULL, &video_stage, NULL);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
        }
@@ -3759,7 +3869,8 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
        }
 
        pipe->pipeline.acquire_isp_each_stage = false;
-       ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
+       ia_css_pipeline_finalize_stages(&pipe->pipeline,
+                                       pipe->stream->config.continuous);
 
 ERR:
        IA_CSS_LEAVE_ERR_PRIVATE(err);
@@ -3767,14 +3878,14 @@ ERR:
 }
 
 static enum ia_css_err
-create_host_acc_pipeline(struct ia_css_pipe *pipe)
-{
+create_host_acc_pipeline(struct ia_css_pipe *pipe) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        const struct ia_css_fw_info *fw;
        unsigned int i;
 
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((!pipe) || (!pipe->stream)) {
+       if ((!pipe) || (!pipe->stream))
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -3782,16 +3893,18 @@ create_host_acc_pipeline(struct ia_css_pipe *pipe)
        pipe->pipeline.num_execs = pipe->config.acc_num_execs;
        /* Reset pipe_qos_config to default disable all QOS extension stages */
        if (pipe->config.acc_extension)
-          pipe->pipeline.pipe_qos_config = 0;
+               pipe->pipeline.pipe_qos_config = 0;
 
        fw = pipe->vf_stage;
-       for (i = 0; fw; fw = fw->next) {
+       for (i = 0; fw; fw = fw->next)
+       {
                err = sh_css_pipeline_add_acc_stage(&pipe->pipeline, fw);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
        }
 
-       for (i = 0; i < pipe->config.num_acc_stages; i++) {
+       for (i = 0; i < pipe->config.num_acc_stages; i++)
+       {
                struct ia_css_fw_info *fw = pipe->config.acc_stages[i];
 
                err = sh_css_pipeline_add_acc_stage(&pipe->pipeline, fw);
@@ -3808,8 +3921,7 @@ ERR:
 
 /* Create stages for preview */
 static enum ia_css_err
-create_host_preview_pipeline(struct ia_css_pipe *pipe)
-{
+create_host_preview_pipeline(struct ia_css_pipe *pipe) {
        struct ia_css_pipeline_stage *copy_stage = NULL;
        struct ia_css_pipeline_stage *preview_stage = NULL;
        struct ia_css_pipeline_stage *vf_pp_stage = NULL;
@@ -3829,7 +3941,8 @@ create_host_preview_pipeline(struct ia_css_pipe *pipe)
 #endif
 
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW)) {
+       if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW))
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -3852,18 +3965,21 @@ create_host_preview_pipeline(struct ia_css_pipe *pipe)
        online = pipe->stream->config.online;
        continuous = pipe->stream->config.continuous;
        need_in_frameinfo_memory =
-               !((sensor && (online || continuous)) || (buffered_sensor && (online || continuous)));
+       !((sensor && (online || continuous)) || (buffered_sensor && (online || continuous)));
 #else
        /* Construct in_frame info (only in case we have dynamic input */
        need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
 #endif
-       if (need_in_frameinfo_memory) {
-               err = init_in_frameinfo_memory_defaults(pipe, &me->in_frame, IA_CSS_FRAME_FORMAT_RAW);
+       if (need_in_frameinfo_memory)
+       {
+               err = init_in_frameinfo_memory_defaults(pipe, &me->in_frame,
+                                                       IA_CSS_FRAME_FORMAT_RAW);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
 
                in_frame = &me->in_frame;
-       } else {
+       } else
+       {
                in_frame = NULL;
        }
 
@@ -3877,20 +3993,23 @@ create_host_preview_pipeline(struct ia_css_pipe *pipe)
        if (pipe->pipe_settings.preview.vf_pp_binary.info)
                vf_pp_binary = &pipe->pipe_settings.preview.vf_pp_binary;
 
-       if (pipe->pipe_settings.preview.copy_binary.info) {
+       if (pipe->pipe_settings.preview.copy_binary.info)
+       {
                ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
                ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
-                       out_frames, NULL, NULL);
+                                                  out_frames, NULL, NULL);
                err = ia_css_pipeline_create_and_add_stage(me,
-                               &stage_desc,
-                               &copy_stage);
+                       &stage_desc,
+                       &copy_stage);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
                in_frame = me->stages->args.out_frame[0];
 #ifndef ISP2401
-       } else {
+       } else
+       {
 #else
-       } else if (pipe->stream->config.continuous) {
+       } else if (pipe->stream->config.continuous)
+       {
 #endif
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
                /* When continuous is enabled, configure in_frame with the
@@ -3904,14 +4023,16 @@ create_host_preview_pipeline(struct ia_css_pipe *pipe)
 #endif
        }
 
-       if (vf_pp_binary) {
+       if (vf_pp_binary)
+       {
                ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
                ia_css_pipe_get_generic_stage_desc(&stage_desc, preview_binary,
-                       out_frames, in_frame, NULL);
-       } else {
+                                                  out_frames, in_frame, NULL);
+       } else
+       {
                ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
                ia_css_pipe_get_generic_stage_desc(&stage_desc, preview_binary,
-                       out_frames, in_frame, NULL);
+                                                  out_frames, in_frame, NULL);
        }
        err = ia_css_pipeline_create_and_add_stage(me,
                &stage_desc,
@@ -3920,20 +4041,22 @@ create_host_preview_pipeline(struct ia_css_pipe *pipe)
                goto ERR;
        /* If we use copy iso preview, the input must be yuv iso raw */
        preview_stage->args.copy_vf =
-               preview_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY;
+           preview_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY;
        preview_stage->args.copy_output = !preview_stage->args.copy_vf;
-       if (preview_stage->args.copy_vf && !preview_stage->args.out_vf_frame) {
+       if (preview_stage->args.copy_vf && !preview_stage->args.out_vf_frame)
+       {
                /* in case of copy, use the vf frame as output frame */
                preview_stage->args.out_vf_frame =
-                       preview_stage->args.out_frame[0];
+                   preview_stage->args.out_frame[0];
        }
-       if (vf_pp_binary) {
+       if (vf_pp_binary)
+       {
                if (preview_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY)
                        in_frame = preview_stage->args.out_vf_frame;
                else
                        in_frame = preview_stage->args.out_frame[0];
                err = add_vf_pp_stage(pipe, in_frame, out_frame, vf_pp_binary,
-                               &vf_pp_stage);
+                                     &vf_pp_stage);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
        }
@@ -3952,14 +4075,14 @@ static void send_raw_frames(struct ia_css_pipe *pipe)
                unsigned int i;
 
                sh_css_update_host2sp_cont_num_raw_frames
-                       (pipe->stream->config.init_num_cont_raw_buf, true);
+               (pipe->stream->config.init_num_cont_raw_buf, true);
                sh_css_update_host2sp_cont_num_raw_frames
-                       (pipe->stream->config.target_num_cont_raw_buf, false);
+               (pipe->stream->config.target_num_cont_raw_buf, false);
 
                /* Hand-over all the SP-internal buffers */
                for (i = 0; i < pipe->stream->config.init_num_cont_raw_buf; i++) {
                        sh_css_update_host2sp_offline_frame(i,
-                               pipe->continuous_frames[i], pipe->cont_md_buffers[i]);
+                                                           pipe->continuous_frames[i], pipe->cont_md_buffers[i]);
                }
        }
 
@@ -3967,8 +4090,7 @@ static void send_raw_frames(struct ia_css_pipe *pipe)
 }
 
 static enum ia_css_err
-preview_start(struct ia_css_pipe *pipe)
-{
+preview_start(struct ia_css_pipe *pipe) {
        struct ia_css_pipeline *me;
        struct ia_css_binary *copy_binary, *preview_binary, *vf_pp_binary = NULL;
        enum ia_css_err err = IA_CSS_SUCCESS;
@@ -3978,7 +4100,8 @@ preview_start(struct ia_css_pipe *pipe)
        enum ia_css_input_mode preview_pipe_input_mode;
 
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW)) {
+       if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW))
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -4012,40 +4135,43 @@ preview_start(struct ia_css_pipe *pipe)
                ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
                copy_ovrd = 1 << thread_id;
 
-               if (pipe->stream->cont_capt) {
-                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe), &thread_id);
+               if (pipe->stream->cont_capt)
+               {
+                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe),
+                                                        &thread_id);
                        copy_ovrd |= 1 << thread_id;
                }
        }
 
        /* Construct and load the copy pipe */
-       if (pipe->stream->config.continuous) {
+       if (pipe->stream->config.continuous)
+       {
                sh_css_sp_init_pipeline(&copy_pipe->pipeline,
-                       IA_CSS_PIPE_ID_COPY,
-                       (uint8_t)ia_css_pipe_get_pipe_num(copy_pipe),
-                       false,
-                       pipe->stream->config.pixels_per_clock == 2, false,
-                       false, pipe->required_bds_factor,
-                       copy_ovrd,
-                       pipe->stream->config.mode,
-                       &pipe->stream->config.metadata_config,
+                                       IA_CSS_PIPE_ID_COPY,
+                                       (uint8_t)ia_css_pipe_get_pipe_num(copy_pipe),
+                                       false,
+                                       pipe->stream->config.pixels_per_clock == 2, false,
+                                       false, pipe->required_bds_factor,
+                                       copy_ovrd,
+                                       pipe->stream->config.mode,
+                                       &pipe->stream->config.metadata_config,
 #ifndef ISP2401
-                       &pipe->stream->info.metadata_info
+                                       &pipe->stream->info.metadata_info
 #else
-                       &pipe->stream->info.metadata_info,
+                                       &pipe->stream->info.metadata_info,
 #endif
 #if !defined(HAS_NO_INPUT_SYSTEM)
 #ifndef ISP2401
-                       , pipe->stream->config.source.port.port
+                                       , pipe->stream->config.source.port.port
 #else
-                       pipe->stream->config.source.port.port,
+                                       pipe->stream->config.source.port.port,
 #endif
 #endif
 #ifndef ISP2401
-                       );
+                                      );
 #else
- & pipe->config.internal_frame_origin_bqs_on_sctbl,
-                       pipe->stream->isp_params_configs);
                                      & pipe->config.internal_frame_origin_bqs_on_sctbl,
+                                       pipe->stream->isp_params_configs);
 #endif
 
                /* make the preview pipe start with mem mode input, copy handles
@@ -4054,67 +4180,69 @@ preview_start(struct ia_css_pipe *pipe)
        }
 
        /* Construct and load the capture pipe */
-       if (pipe->stream->cont_capt) {
+       if (pipe->stream->cont_capt)
+       {
                sh_css_sp_init_pipeline(&capture_pipe->pipeline,
-                       IA_CSS_PIPE_ID_CAPTURE,
-                       (uint8_t)ia_css_pipe_get_pipe_num(capture_pipe),
-                       capture_pipe->config.default_capture_config.enable_xnr != 0,
-                       capture_pipe->stream->config.pixels_per_clock == 2,
-                       true, /* continuous */
-                       false, /* offline */
-                       capture_pipe->required_bds_factor,
-                       0,
-                       IA_CSS_INPUT_MODE_MEMORY,
-                       &pipe->stream->config.metadata_config,
+                                       IA_CSS_PIPE_ID_CAPTURE,
+                                       (uint8_t)ia_css_pipe_get_pipe_num(capture_pipe),
+                                       capture_pipe->config.default_capture_config.enable_xnr != 0,
+                                       capture_pipe->stream->config.pixels_per_clock == 2,
+                                       true, /* continuous */
+                                       false, /* offline */
+                                       capture_pipe->required_bds_factor,
+                                       0,
+                                       IA_CSS_INPUT_MODE_MEMORY,
+                                       &pipe->stream->config.metadata_config,
 #ifndef ISP2401
-                       &pipe->stream->info.metadata_info
+                                       &pipe->stream->info.metadata_info
 #else
-                       &pipe->stream->info.metadata_info,
+                                       &pipe->stream->info.metadata_info,
 #endif
 #if !defined(HAS_NO_INPUT_SYSTEM)
 #ifndef ISP2401
-                       , (enum mipi_port_id)0
+                                       , (enum mipi_port_id)0
 #else
-                       (enum mipi_port_id)0,
+                                       (enum mipi_port_id)0,
 #endif
 #endif
 #ifndef ISP2401
-                       );
+                                      );
 #else
- & capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
-                       capture_pipe->stream->isp_params_configs);
                                      & capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
+                                       capture_pipe->stream->isp_params_configs);
 #endif
        }
 
-       if (acc_pipe) {
+       if (acc_pipe)
+       {
                sh_css_sp_init_pipeline(&acc_pipe->pipeline,
-                       IA_CSS_PIPE_ID_ACC,
-                       (uint8_t)ia_css_pipe_get_pipe_num(acc_pipe),
-                       false,
-                       pipe->stream->config.pixels_per_clock == 2,
-                       false, /* continuous */
-                       false, /* offline */
-                       pipe->required_bds_factor,
-                       0,
-                       IA_CSS_INPUT_MODE_MEMORY,
-                       NULL,
+                                       IA_CSS_PIPE_ID_ACC,
+                                       (uint8_t)ia_css_pipe_get_pipe_num(acc_pipe),
+                                       false,
+                                       pipe->stream->config.pixels_per_clock == 2,
+                                       false, /* continuous */
+                                       false, /* offline */
+                                       pipe->required_bds_factor,
+                                       0,
+                                       IA_CSS_INPUT_MODE_MEMORY,
+                                       NULL,
 #ifndef ISP2401
-                       NULL
+                                       NULL
 #else
-                       NULL,
+                                       NULL,
 #endif
 #if !defined(HAS_NO_INPUT_SYSTEM)
 #ifndef ISP2401
-                       , (enum mipi_port_id)0
+                                       , (enum mipi_port_id)0
 #else
-                       (enum mipi_port_id)0,
+                                       (enum mipi_port_id)0,
 #endif
 #endif
 #ifndef ISP2401
-                       );
+                                      );
 #else
- & pipe->config.internal_frame_origin_bqs_on_sctbl,
-                       pipe->stream->isp_params_configs);
                                      & pipe->config.internal_frame_origin_bqs_on_sctbl,
+                                       pipe->stream->isp_params_configs);
 #endif
        }
 
@@ -4129,8 +4257,7 @@ ERR:
 
 enum ia_css_err
 ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
-                          const struct ia_css_buffer *buffer)
-{
+                          const struct ia_css_buffer *buffer) {
        enum ia_css_err return_err = IA_CSS_SUCCESS;
        unsigned int thread_id;
        enum sh_css_queue_id queue_id;
@@ -4145,7 +4272,8 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
 
        IA_CSS_ENTER("pipe=%p, buffer=%p", pipe, buffer);
 
-       if ((!pipe) || (!buffer)) {
+       if ((!pipe) || (!buffer))
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -4154,12 +4282,13 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
        /* following code will be enabled when IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME
           is removed */
 #if 0
-       if (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME) {
+       if (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME)
+       {
                bool found_pipe = false;
 
                for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
                        if ((buffer->data.frame->info.res.width == pipe->output_info[i].res.width) &&
-                               (buffer->data.frame->info.res.height == pipe->output_info[i].res.height)) {
+                           (buffer->data.frame->info.res.height == pipe->output_info[i].res.height)) {
                                buf_type += i;
                                found_pipe = true;
                                break;
@@ -4168,12 +4297,13 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
                if (!found_pipe)
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
-       if (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME) {
+       if (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)
+       {
                bool found_pipe = false;
 
                for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
                        if ((buffer->data.frame->info.res.width == pipe->vf_output_info[i].res.width) &&
-                               (buffer->data.frame->info.res.height == pipe->vf_output_info[i].res.height)) {
+                           (buffer->data.frame->info.res.height == pipe->vf_output_info[i].res.height)) {
                                buf_type += i;
                                found_pipe = true;
                                break;
@@ -4191,29 +4321,34 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
        assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
        if ((buf_type == IA_CSS_BUFFER_TYPE_INVALID) ||
            (buf_type >= IA_CSS_NUM_DYNAMIC_BUFFER_TYPE) ||
-           (pipe_id >= IA_CSS_PIPE_ID_NUM)) {
+           (pipe_id >= IA_CSS_PIPE_ID_NUM))
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INTERNAL_ERROR);
                return IA_CSS_ERR_INTERNAL_ERROR;
        }
 
        ret_err = ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
-       if (!ret_err) {
+       if (!ret_err)
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
        ret_err = ia_css_query_internal_queue_id(buf_type, thread_id, &queue_id);
-       if (!ret_err) {
+       if (!ret_err)
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if ((queue_id <= SH_CSS_INVALID_QUEUE_ID) || (queue_id >= SH_CSS_MAX_NUM_QUEUES)) {
+       if ((queue_id <= SH_CSS_INVALID_QUEUE_ID) || (queue_id >= SH_CSS_MAX_NUM_QUEUES))
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if (!sh_css_sp_is_running()) {
+       if (!sh_css_sp_is_running())
+       {
                IA_CSS_LOG("SP is not running!");
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
                /* SP is not running. The queues are not valid */
@@ -4231,21 +4366,24 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
        ddr_buffer.cookie_ptr = buffer->driver_cookie;
        ddr_buffer.timing_data = buffer->timing_data;
 
-       if (buf_type == IA_CSS_BUFFER_TYPE_3A_STATISTICS) {
+       if (buf_type == IA_CSS_BUFFER_TYPE_3A_STATISTICS)
+       {
                if (!buffer->data.stats_3a) {
                        IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
                }
                ddr_buffer.kernel_ptr = HOST_ADDRESS(buffer->data.stats_3a);
                ddr_buffer.payload.s3a = *buffer->data.stats_3a;
-       } else if (buf_type == IA_CSS_BUFFER_TYPE_DIS_STATISTICS) {
+       } else if (buf_type == IA_CSS_BUFFER_TYPE_DIS_STATISTICS)
+       {
                if (!buffer->data.stats_dvs) {
                        IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
                }
                ddr_buffer.kernel_ptr = HOST_ADDRESS(buffer->data.stats_dvs);
                ddr_buffer.payload.dis = *buffer->data.stats_dvs;
-       } else if (buf_type == IA_CSS_BUFFER_TYPE_METADATA) {
+       } else if (buf_type == IA_CSS_BUFFER_TYPE_METADATA)
+       {
                if (!buffer->data.metadata) {
                        IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -4253,10 +4391,11 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
                ddr_buffer.kernel_ptr = HOST_ADDRESS(buffer->data.metadata);
                ddr_buffer.payload.metadata = *buffer->data.metadata;
        } else if ((buf_type == IA_CSS_BUFFER_TYPE_INPUT_FRAME)
-               || (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME)
-               || (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)
-               || (buf_type == IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME)
-               || (buf_type == IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME)) {
+                  || (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME)
+                  || (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)
+                  || (buf_type == IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME)
+                  || (buf_type == IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME))
+       {
                if (!buffer->data.frame) {
                        IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -4266,13 +4405,13 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
                ddr_buffer.payload.frame.flashed = 0;
 
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "ia_css_pipe_enqueue_buffer() buf_type=%d, data(DDR address)=0x%x\n",
-                       buf_type, buffer->data.frame->data);
+                                   "ia_css_pipe_enqueue_buffer() buf_type=%d, data(DDR address)=0x%x\n",
+                                   buf_type, buffer->data.frame->data);
 
 #if CONFIG_ON_FRAME_ENQUEUE()
                return_err = set_config_on_frame_enqueue(
-                               &buffer->data.frame->info,
-                               &ddr_buffer.payload.frame);
+                                &buffer->data.frame->info,
+                                &ddr_buffer.payload.frame);
                if (return_err != IA_CSS_SUCCESS) {
                        IA_CSS_LEAVE_ERR(return_err);
                        return return_err;
@@ -4291,17 +4430,19 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
        assert(h_vbuf);
        assert(h_vbuf->vptr != 0x0);
 
-       if ((!h_vbuf) || (h_vbuf->vptr == 0x0)) {
+       if ((!h_vbuf) || (h_vbuf->vptr == 0x0))
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INTERNAL_ERROR);
                return IA_CSS_ERR_INTERNAL_ERROR;
        }
 
        mmgr_store(h_vbuf->vptr,
-                               (void *)(&ddr_buffer),
-                               sizeof(struct sh_css_hmm_buffer));
+                  (void *)(&ddr_buffer),
+                  sizeof(struct sh_css_hmm_buffer));
        if ((buf_type == IA_CSS_BUFFER_TYPE_3A_STATISTICS)
-               || (buf_type == IA_CSS_BUFFER_TYPE_DIS_STATISTICS)
-               || (buf_type == IA_CSS_BUFFER_TYPE_LACE_STATISTICS)) {
+           || (buf_type == IA_CSS_BUFFER_TYPE_DIS_STATISTICS)
+           || (buf_type == IA_CSS_BUFFER_TYPE_LACE_STATISTICS))
+       {
                if (!pipeline) {
                        ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &h_vbuf);
                        IA_CSS_LOG("pipeline is empty!");
@@ -4315,8 +4456,8 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
                        if (STATS_ENABLED(stage)) {
                                /* there is a stage that needs it */
                                return_err = ia_css_bufq_enqueue_buffer(thread_id,
-                                                               queue_id,
-                                                               (uint32_t)h_vbuf->vptr);
+                                                                       queue_id,
+                                                                       (uint32_t)h_vbuf->vptr);
                        }
                }
        } else if ((buf_type == IA_CSS_BUFFER_TYPE_INPUT_FRAME)
@@ -4324,23 +4465,26 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
                   || (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)
                   || (buf_type == IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME)
                   || (buf_type == IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME)
-                  || (buf_type == IA_CSS_BUFFER_TYPE_METADATA)) {
+                  || (buf_type == IA_CSS_BUFFER_TYPE_METADATA))
+       {
                return_err = ia_css_bufq_enqueue_buffer(thread_id,
                                                        queue_id,
                                                        (uint32_t)h_vbuf->vptr);
 #if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
-               if ((return_err == IA_CSS_SUCCESS) && (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME)) {
+               if ((return_err == IA_CSS_SUCCESS) &&
+                   (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME)) {
                        IA_CSS_LOG("pfp: enqueued OF %d to q %d thread %d",
-                               ddr_buffer.payload.frame.frame_data,
-                               queue_id, thread_id);
+                                  ddr_buffer.payload.frame.frame_data,
+                                  queue_id, thread_id);
                }
 #endif
        }
 
-       if (return_err == IA_CSS_SUCCESS) {
+       if (return_err == IA_CSS_SUCCESS)
+       {
                if (sh_css_hmm_buffer_record_acquire(
-                               h_vbuf, buf_type,
-                               HOST_ADDRESS(ddr_buffer.kernel_ptr))) {
+                       h_vbuf, buf_type,
+                       HOST_ADDRESS(ddr_buffer.kernel_ptr))) {
                        IA_CSS_LOG("send vbuf=%p", h_vbuf);
                } else {
                        return_err = IA_CSS_ERR_INTERNAL_ERROR;
@@ -4352,7 +4496,8 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
         * Tell the SP which queues are not empty,
         * by sending the software event.
         */
-       if (return_err == IA_CSS_SUCCESS) {
+       if (return_err == IA_CSS_SUCCESS)
+       {
                if (!sh_css_sp_is_running()) {
                        /* SP is not running. The queues are not valid */
                        IA_CSS_LOG("SP is not running!");
@@ -4360,11 +4505,12 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
                        return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
                }
                return_err = ia_css_bufq_enqueue_psys_event(
-                               IA_CSS_PSYS_SW_EVENT_BUFFER_ENQUEUED,
-                               (uint8_t)thread_id,
-                               queue_id,
-                               0);
-       } else {
+                                IA_CSS_PSYS_SW_EVENT_BUFFER_ENQUEUED,
+                                (uint8_t)thread_id,
+                                queue_id,
+                                0);
+       } else
+       {
                ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &h_vbuf);
                IA_CSS_ERROR("buffer not enqueued");
        }
@@ -4379,8 +4525,7 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
         */
 enum ia_css_err
 ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
-                          struct ia_css_buffer *buffer)
-{
+                          struct ia_css_buffer *buffer) {
        enum ia_css_err return_err;
        enum sh_css_queue_id queue_id;
        hrt_vaddress ddr_buffer_addr = (hrt_vaddress)0;
@@ -4393,7 +4538,8 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
 
        IA_CSS_ENTER("pipe=%p, buffer=%p", pipe, buffer);
 
-       if ((!pipe) || (!buffer)) {
+       if ((!pipe) || (!buffer))
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -4407,23 +4553,27 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
        ddr_buffer.kernel_ptr = 0;
 
        ret_err = ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
-       if (!ret_err) {
+       if (!ret_err)
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
        ret_err = ia_css_query_internal_queue_id(buf_type, thread_id, &queue_id);
-       if (!ret_err) {
+       if (!ret_err)
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if ((queue_id <= SH_CSS_INVALID_QUEUE_ID) || (queue_id >= SH_CSS_MAX_NUM_QUEUES)) {
+       if ((queue_id <= SH_CSS_INVALID_QUEUE_ID) || (queue_id >= SH_CSS_MAX_NUM_QUEUES))
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if (!sh_css_sp_is_running()) {
+       if (!sh_css_sp_is_running())
+       {
                IA_CSS_LOG("SP is not running!");
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
                /* SP is not running. The queues are not valid */
@@ -4431,9 +4581,10 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
        }
 
        return_err = ia_css_bufq_dequeue_buffer(queue_id,
-               (uint32_t *)&ddr_buffer_addr);
+                                               (uint32_t *)&ddr_buffer_addr);
 
-       if (return_err == IA_CSS_SUCCESS) {
+       if (return_err == IA_CSS_SUCCESS)
+       {
                struct ia_css_frame *frame;
                struct sh_css_hmm_buffer_record *hmm_buffer_record = NULL;
 
@@ -4441,7 +4592,7 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
 
                /* Validate the ddr_buffer_addr and buf_type */
                hmm_buffer_record = sh_css_hmm_buffer_record_validate(
-                               ddr_buffer_addr, buf_type);
+                   ddr_buffer_addr, buf_type);
                if (hmm_buffer_record) {
                        /* valid hmm_buffer_record found. Save the kernel_ptr
                         * for validation after performing mmgr_load.  The
@@ -4452,14 +4603,14 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
                        sh_css_hmm_buffer_record_reset(hmm_buffer_record);
                } else {
                        IA_CSS_ERROR("hmm_buffer_record not found (0x%x) buf_type(%d)",
-                                ddr_buffer_addr, buf_type);
+                                    ddr_buffer_addr, buf_type);
                        IA_CSS_LEAVE_ERR(IA_CSS_ERR_INTERNAL_ERROR);
                        return IA_CSS_ERR_INTERNAL_ERROR;
                }
 
                mmgr_load(ddr_buffer_addr,
-                               &ddr_buffer,
-                               sizeof(struct sh_css_hmm_buffer));
+                         &ddr_buffer,
+                         sizeof(struct sh_css_hmm_buffer));
 
                /* if the kernel_ptr is 0 or an invalid, return an error.
                 * do not access the buffer via the kernal_ptr.
@@ -4482,7 +4633,7 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
                        buffer->timing_data = ddr_buffer.timing_data;
 
                        if ((buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME) ||
-                               (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)) {
+                           (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)) {
                                buffer->isys_eof_clock_tick.ticks = ddr_buffer.isys_eof_clock_tick;
                        }
 
@@ -4490,8 +4641,7 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
                        case IA_CSS_BUFFER_TYPE_INPUT_FRAME:
                        case IA_CSS_BUFFER_TYPE_OUTPUT_FRAME:
                        case IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME:
-                               if ((pipe) && (pipe->stop_requested == true))
-                               {
+                               if ((pipe) && (pipe->stop_requested == true)) {
 #if defined(USE_INPUT_SYSTEM_VERSION_2)
                                        /* free mipi frames only for old input system
                                         * for 2401 it is done in ia_css_stream_destroy call
@@ -4514,10 +4664,10 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
                                frame->isp_config_id = ddr_buffer.payload.frame.isp_parameters_id;
                                if (ddr_buffer.payload.frame.flashed == 1)
                                        frame->flash_state =
-                                               IA_CSS_FRAME_FLASH_STATE_PARTIAL;
+                                           IA_CSS_FRAME_FLASH_STATE_PARTIAL;
                                if (ddr_buffer.payload.frame.flashed == 2)
                                        frame->flash_state =
-                                               IA_CSS_FRAME_FLASH_STATE_FULL;
+                                           IA_CSS_FRAME_FLASH_STATE_FULL;
                                frame->valid = pipe->num_invalid_frames == 0;
                                if (!frame->valid)
                                        pipe->num_invalid_frames--;
@@ -4533,26 +4683,26 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
 #if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
                                if (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME) {
                                        IA_CSS_LOG("pfp: dequeued OF %d with config id %d thread %d",
-                                               frame->data, frame->isp_config_id, thread_id);
+                                                  frame->data, frame->isp_config_id, thread_id);
                                }
 #endif
 
                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                                       "ia_css_pipe_dequeue_buffer() buf_type=%d, data(DDR address)=0x%x\n",
-                                       buf_type, buffer->data.frame->data);
+                                                   "ia_css_pipe_dequeue_buffer() buf_type=%d, data(DDR address)=0x%x\n",
+                                                   buf_type, buffer->data.frame->data);
 
                                break;
                        case IA_CSS_BUFFER_TYPE_3A_STATISTICS:
                                buffer->data.stats_3a =
-                                       (struct ia_css_isp_3a_statistics *)HOST_ADDRESS(ddr_buffer.kernel_ptr);
+                                   (struct ia_css_isp_3a_statistics *)HOST_ADDRESS(ddr_buffer.kernel_ptr);
                                buffer->exp_id = ddr_buffer.payload.s3a.exp_id;
                                buffer->data.stats_3a->exp_id = ddr_buffer.payload.s3a.exp_id;
                                buffer->data.stats_3a->isp_config_id = ddr_buffer.payload.s3a.isp_config_id;
                                break;
                        case IA_CSS_BUFFER_TYPE_DIS_STATISTICS:
                                buffer->data.stats_dvs =
-                                       (struct ia_css_isp_dvs_statistics *)
-                                               HOST_ADDRESS(ddr_buffer.kernel_ptr);
+                                   (struct ia_css_isp_dvs_statistics *)
+                                   HOST_ADDRESS(ddr_buffer.kernel_ptr);
                                buffer->exp_id = ddr_buffer.payload.dis.exp_id;
                                buffer->data.stats_dvs->exp_id = ddr_buffer.payload.dis.exp_id;
                                break;
@@ -4560,7 +4710,7 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
                                break;
                        case IA_CSS_BUFFER_TYPE_METADATA:
                                buffer->data.metadata =
-                                       (struct ia_css_metadata *)HOST_ADDRESS(ddr_buffer.kernel_ptr);
+                                   (struct ia_css_metadata *)HOST_ADDRESS(ddr_buffer.kernel_ptr);
                                buffer->exp_id = ddr_buffer.payload.metadata.exp_id;
                                buffer->data.metadata->exp_id = ddr_buffer.payload.metadata.exp_id;
                                break;
@@ -4575,7 +4725,8 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
         * Tell the SP which queues are not full,
         * by sending the software event.
         */
-       if (return_err == IA_CSS_SUCCESS) {
+       if (return_err == IA_CSS_SUCCESS)
+       {
                if (!sh_css_sp_is_running()) {
                        IA_CSS_LOG("SP is not running!");
                        IA_CSS_LEAVE_ERR(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
@@ -4583,10 +4734,10 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
                        return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
                }
                ia_css_bufq_enqueue_psys_event(
-                                       IA_CSS_PSYS_SW_EVENT_BUFFER_DEQUEUED,
-                                       0,
-                                       queue_id,
-                                       0);
+                   IA_CSS_PSYS_SW_EVENT_BUFFER_DEQUEUED,
+                   0,
+                   queue_id,
+                   0);
        }
        IA_CSS_LEAVE("buffer=%p", buffer);
 
@@ -4624,14 +4775,12 @@ static enum ia_css_event_type convert_event_sp_to_host_domain[] = {
 };
 
 enum ia_css_err
-ia_css_dequeue_event(struct ia_css_event *event)
-{
+ia_css_dequeue_event(struct ia_css_event *event) {
        return ia_css_dequeue_psys_event(event);
 }
 
 enum ia_css_err
-ia_css_dequeue_psys_event(struct ia_css_event *event)
-{
+ia_css_dequeue_psys_event(struct ia_css_event *event) {
        enum ia_css_pipe_id pipe_id = 0;
        u8 payload[4] = {0, 0, 0, 0};
        enum ia_css_err ret_err;
@@ -4646,7 +4795,8 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
        if (!event)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       if (!sh_css_sp_is_running()) {
+       if (!sh_css_sp_is_running())
+       {
                /* SP is not running. The queues are not valid */
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        }
@@ -4660,7 +4810,7 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
 
        /* Tell the SP that we dequeued an event from the event queue. */
        ia_css_bufq_enqueue_psys_event(
-                       IA_CSS_PSYS_SW_EVENT_EVENT_DEQUEUED, 0, 0, 0);
+           IA_CSS_PSYS_SW_EVENT_EVENT_DEQUEUED, 0, 0, 0);
 
        /* Events are decoded into 4 bytes of payload, the first byte
         * contains the sp event type. This is converted to a host enum.
@@ -4676,7 +4826,8 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
        event->timer_code = 0;
        event->timer_subcode = 0;
 
-       if (event->type == IA_CSS_EVENT_TYPE_TIMER) {
+       if (event->type == IA_CSS_EVENT_TYPE_TIMER)
+       {
                /* timer event ??? get the 2nd event and decode the data into the event struct */
                u32 tmp_data;
                /* 1st event: LSB 16-bit timer data and code */
@@ -4692,9 +4843,9 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
                        return ret_err;
                }
                ia_css_bufq_enqueue_psys_event(
-                       IA_CSS_PSYS_SW_EVENT_EVENT_DEQUEUED, 0, 0, 0);
+                   IA_CSS_PSYS_SW_EVENT_EVENT_DEQUEUED, 0, 0, 0);
                event->type = convert_event_sp_to_host_domain[payload[0]];
-                /* It's a timer */
+               /* It's a timer */
                if (event->type == IA_CSS_EVENT_TYPE_TIMER) {
                        /* 2nd event data: MSB 16-bit timer and subcode */
                        tmp_data = ((payload[1] & 0xFF) | ((payload[3] & 0xFF) << 8));
@@ -4713,20 +4864,24 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
                        IA_CSS_ERROR("Missing 2nd timer event. Timer event discarded");
                }
        }
-       if (event->type == IA_CSS_EVENT_TYPE_PORT_EOF) {
+       if (event->type == IA_CSS_EVENT_TYPE_PORT_EOF)
+       {
                event->port = (enum mipi_port_id)payload[1];
                event->exp_id = payload[3];
-       } else if (event->type == IA_CSS_EVENT_TYPE_FW_WARNING) {
+       } else if (event->type == IA_CSS_EVENT_TYPE_FW_WARNING)
+       {
                event->fw_warning = (enum ia_css_fw_warning)payload[1];
                /* exp_id is only available in these warning types */
                if (event->fw_warning == IA_CSS_FW_WARNING_EXP_ID_LOCKED ||
                    event->fw_warning == IA_CSS_FW_WARNING_TAG_EXP_ID_FAILED)
                        event->exp_id = payload[3];
-       } else if (event->type == IA_CSS_EVENT_TYPE_FW_ASSERT) {
+       } else if (event->type == IA_CSS_EVENT_TYPE_FW_ASSERT)
+       {
                event->fw_assert_module_id = payload[1]; /* module */
                event->fw_assert_line_no = (payload[2] << 8) + payload[3];
                /* payload[2] is line_no>>8, payload[3] is line_no&0xff */
-       } else if (event->type != IA_CSS_EVENT_TYPE_TIMER) {
+       } else if (event->type != IA_CSS_EVENT_TYPE_TIMER)
+       {
                /* pipe related events.
                 * payload[1] contains the pipe_num,
                 * payload[2] contains the pipe_id. These are different. */
@@ -4743,7 +4898,7 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
                        n = event->pipe->stream->num_pipes;
                        for (i = 0; i < n; i++) {
                                struct ia_css_pipe *p =
-                                       event->pipe->stream->pipes[i];
+                                           event->pipe->stream->pipes[i];
                                if (p->config.mode == IA_CSS_PIPE_MODE_CAPTURE) {
                                        event->pipe = p;
                                        break;
@@ -4756,9 +4911,9 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
                        u32 stage_num = (uint32_t)payload[3];
 
                        ret_err = ia_css_pipeline_get_fw_from_stage(
-                                       &event->pipe->pipeline,
-                                       stage_num,
-                                       &event->fw_handle);
+                                     &event->pipe->pipeline,
+                                     stage_num,
+                                     &event->fw_handle);
                        if (ret_err != IA_CSS_SUCCESS) {
                                IA_CSS_ERROR("Invalid stage num received for ACC event. stage_num:%u",
                                             stage_num);
@@ -4776,8 +4931,7 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
 }
 
 enum ia_css_err
-ia_css_dequeue_isys_event(struct ia_css_event *event)
-{
+ia_css_dequeue_isys_event(struct ia_css_event *event) {
        u8 payload[4] = {0, 0, 0, 0};
        enum ia_css_err err = IA_CSS_SUCCESS;
 
@@ -4787,7 +4941,8 @@ ia_css_dequeue_isys_event(struct ia_css_event *event)
        if (!event)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       if (!sh_css_sp_is_running()) {
+       if (!sh_css_sp_is_running())
+       {
                /* SP is not running. The queues are not valid */
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        }
@@ -4819,12 +4974,11 @@ acc_start(struct ia_css_pipe *pipe)
        assert(pipe->stream);
 
        start_pipe(pipe, SH_CSS_PIPE_CONFIG_OVRD_NO_OVRD,
-                       pipe->stream->config.mode);
+                  pipe->stream->config.mode);
 }
 
 static enum ia_css_err
-sh_css_pipe_start(struct ia_css_stream *stream)
-{
+sh_css_pipe_start(struct ia_css_stream *stream) {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        struct ia_css_pipe *pipe;
@@ -4833,19 +4987,22 @@ sh_css_pipe_start(struct ia_css_stream *stream)
 
        IA_CSS_ENTER_PRIVATE("stream = %p", stream);
 
-       if (!stream) {
+       if (!stream)
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
        pipe = stream->last_pipe;
-       if (!pipe) {
+       if (!pipe)
+       {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
        pipe_id = pipe->mode;
 
-       if (stream->started == true) {
+       if (stream->started == true)
+       {
                IA_CSS_WARNING("Cannot start stream that is already started");
                IA_CSS_LEAVE_ERR(err);
                return err;
@@ -4853,7 +5010,8 @@ sh_css_pipe_start(struct ia_css_stream *stream)
 
        pipe->stop_requested = false;
 
-       switch (pipe_id) {
+       switch (pipe_id)
+       {
        case IA_CSS_PIPE_ID_PREVIEW:
                err = preview_start(pipe);
                break;
@@ -4873,7 +5031,8 @@ sh_css_pipe_start(struct ia_css_stream *stream)
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
        }
        /* DH regular multi pipe - not continuous mode: start the next pipes too */
-       if (!stream->config.continuous) {
+       if (!stream->config.continuous)
+       {
                int i;
 
                for (i = 1; i < stream->num_pipes && IA_CSS_SUCCESS == err ; i++) {
@@ -4903,7 +5062,8 @@ sh_css_pipe_start(struct ia_css_stream *stream)
                        }
                }
        }
-       if (err != IA_CSS_SUCCESS) {
+       if (err != IA_CSS_SUCCESS)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(err);
                return err;
        }
@@ -4913,10 +5073,11 @@ sh_css_pipe_start(struct ia_css_stream *stream)
         * don't use ISP parameters anyway. So this should be okay.
         * The SP binary (jpeg) copy does not use any parameters.
         */
-       if (!copy_on_sp(pipe)) {
+       if (!copy_on_sp(pipe))
+       {
                sh_css_invalidate_params(stream);
                err = sh_css_param_update_isp_params(pipe,
-                                                       stream->isp_params_configs, true, NULL);
+                                                    stream->isp_params_configs, true, NULL);
                if (err != IA_CSS_SUCCESS) {
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
                        return err;
@@ -4927,7 +5088,8 @@ sh_css_pipe_start(struct ia_css_stream *stream)
 
        ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
 
-       if (!sh_css_sp_is_running()) {
+       if (!sh_css_sp_is_running())
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
                /* SP is not running. The queues are not valid */
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
@@ -4936,21 +5098,23 @@ sh_css_pipe_start(struct ia_css_stream *stream)
                                       (uint8_t)thread_id, 0, 0);
 
        /* DH regular multi pipe - not continuous mode: enqueue event to the next pipes too */
-       if (!stream->config.continuous) {
+       if (!stream->config.continuous)
+       {
                int i;
 
                for (i = 1; i < stream->num_pipes; i++) {
                        ia_css_pipeline_get_sp_thread_id(
-                                                       ia_css_pipe_get_pipe_num(stream->pipes[i]),
-                                                       &thread_id);
+                           ia_css_pipe_get_pipe_num(stream->pipes[i]),
+                           &thread_id);
                        ia_css_bufq_enqueue_psys_event(
-                               IA_CSS_PSYS_SW_EVENT_START_STREAM,
-                               (uint8_t)thread_id, 0, 0);
+                           IA_CSS_PSYS_SW_EVENT_START_STREAM,
+                           (uint8_t)thread_id, 0, 0);
                }
        }
 
        /* in case of continuous capture mode, we also start capture thread and copy thread*/
-       if (pipe->stream->config.continuous) {
+       if (pipe->stream->config.continuous)
+       {
                struct ia_css_pipe *copy_pipe = NULL;
 
                if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
@@ -4962,13 +5126,15 @@ sh_css_pipe_start(struct ia_css_stream *stream)
                        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
                        return IA_CSS_ERR_INTERNAL_ERROR;
                }
-               ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(copy_pipe), &thread_id);
-                /* by the time we reach here q is initialized and handle is available.*/
+               ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(copy_pipe),
+                                                &thread_id);
+               /* by the time we reach here q is initialized and handle is available.*/
                ia_css_bufq_enqueue_psys_event(
-                               IA_CSS_PSYS_SW_EVENT_START_STREAM,
-                               (uint8_t)thread_id, 0,  0);
+                   IA_CSS_PSYS_SW_EVENT_START_STREAM,
+                   (uint8_t)thread_id, 0,  0);
        }
-       if (pipe->stream->cont_capt) {
+       if (pipe->stream->cont_capt)
+       {
                struct ia_css_pipe *capture_pipe = NULL;
 
                if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
@@ -4980,25 +5146,28 @@ sh_css_pipe_start(struct ia_css_stream *stream)
                        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
                        return IA_CSS_ERR_INTERNAL_ERROR;
                }
-               ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe), &thread_id);
-                /* by the time we reach here q is initialized and handle is available.*/
+               ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe),
+                                                &thread_id);
+               /* by the time we reach here q is initialized and handle is available.*/
                ia_css_bufq_enqueue_psys_event(
-                               IA_CSS_PSYS_SW_EVENT_START_STREAM,
-                               (uint8_t)thread_id, 0,  0);
+                   IA_CSS_PSYS_SW_EVENT_START_STREAM,
+                   (uint8_t)thread_id, 0,  0);
        }
 
        /* in case of PREVIEW mode, check whether QOS acc_pipe is available, then start the qos pipe */
-       if (pipe_id == IA_CSS_PIPE_ID_PREVIEW) {
+       if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+       {
                struct ia_css_pipe *acc_pipe = NULL;
 
                acc_pipe = pipe->pipe_settings.preview.acc_pipe;
 
                if (acc_pipe) {
-                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(acc_pipe), &thread_id);
+                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(acc_pipe),
+                                                        &thread_id);
                        /* by the time we reach here q is initialized and handle is available.*/
                        ia_css_bufq_enqueue_psys_event(
-                               IA_CSS_PSYS_SW_EVENT_START_STREAM,
-                               (uint8_t)thread_id, 0, 0);
+                           IA_CSS_PSYS_SW_EVENT_START_STREAM,
+                           (uint8_t)thread_id, 0, 0);
                }
        }
 
@@ -5012,10 +5181,10 @@ sh_css_pipe_start(struct ia_css_stream *stream)
 void
 sh_css_enable_cont_capt(bool enable, bool stop_copy_preview)
 {
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-             "sh_css_enable_cont_capt() enter: enable=%d\n", enable);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "sh_css_enable_cont_capt() enter: enable=%d\n", enable);
 //my_css.cont_capt = enable;
-       my_css.stop_copy_preview = stop_copy_preview;
+       my_css.stop_copy_preview = stop_copy_preview;
 }
 
 bool
@@ -5045,7 +5214,8 @@ sh_css_pipes_stop(struct ia_css_stream *stream)
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_continuous_is_enabled() enter: pipe_num=%d\n", pipe_num);
 #else
        assert(stream);
-       if (!stream) {
+       if (!stream)
+       {
                IA_CSS_LOG("stream does NOT exist!");
                err = IA_CSS_ERR_INTERNAL_ERROR;
                goto ERR;
@@ -5056,14 +5226,15 @@ sh_css_pipes_stop(struct ia_css_stream *stream)
        pipe = find_pipe_by_num(pipe_num);
        continuous = pipe && pipe->stream->config.continuous;
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "sh_css_continuous_is_enabled() leave: enable=%d\n",
-               continuous);
+                           "sh_css_continuous_is_enabled() leave: enable=%d\n",
+                           continuous);
        return continuous;
 }
 #else
        main_pipe = stream->last_pipe;
        assert(main_pipe);
-       if (!main_pipe) {
+       if (!main_pipe)
+       {
                IA_CSS_LOG("main_pipe does NOT exist!");
                err = IA_CSS_ERR_INTERNAL_ERROR;
                goto ERR;
@@ -5072,8 +5243,8 @@ sh_css_pipes_stop(struct ia_css_stream *stream)
 
 #ifndef ISP2401
 enum ia_css_err
-ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
-{
+ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream,
+                                  int *buffer_depth) {
        if (!buffer_depth)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_max_buffer_depth() enter: void\n");
@@ -5082,14 +5253,13 @@ ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_dep
        return IA_CSS_SUCCESS;
 }
 #else
-       main_pipe_id = main_pipe->mode;
-       IA_CSS_ENTER_PRIVATE("main_pipe_id=%d", main_pipe_id);
+main_pipe_id = main_pipe->mode;
+IA_CSS_ENTER_PRIVATE("main_pipe_id=%d", main_pipe_id);
 #endif
 
 #ifndef ISP2401
 enum ia_css_err
-ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth)
-{
+ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth) {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_set_buffer_depth() enter: num_frames=%d\n", buffer_depth);
        (void)stream;
        if (buffer_depth > NUM_CONTINUOUS_FRAMES || buffer_depth < 1)
@@ -5100,80 +5270,82 @@ ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth)
        return IA_CSS_SUCCESS;
 }
 #else
-       /*
-        * Stop all "ia_css_pipe" instances in this target
-        * "ia_css_stream" instance.
-        */
-       for (i = 0; i < stream->num_pipes; i++) {
-               /* send the "stop" request to the "ia_css_pipe" instance */
-               IA_CSS_LOG("Send the stop-request to the pipe: pipe_id=%d",
-                               stream->pipes[i]->pipeline.pipe_id);
-               err = ia_css_pipeline_request_stop(&stream->pipes[i]->pipeline);
+/*
+ * Stop all "ia_css_pipe" instances in this target
+ * "ia_css_stream" instance.
+ */
+for (i = 0; i < stream->num_pipes; i++)
+{
+       /* send the "stop" request to the "ia_css_pipe" instance */
+       IA_CSS_LOG("Send the stop-request to the pipe: pipe_id=%d",
+                  stream->pipes[i]->pipeline.pipe_id);
+       err = ia_css_pipeline_request_stop(&stream->pipes[i]->pipeline);
 #endif
 
 #ifndef ISP2401
 enum ia_css_err
-ia_css_stream_get_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
-{
+ia_css_stream_get_buffer_depth(struct ia_css_stream *stream,
+                              int *buffer_depth) {
        if (!buffer_depth)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_buffer_depth() enter: void\n");
 #else
-               /*
-                * Exit this loop if "ia_css_pipeline_request_stop()"
-                * returns the error code.
-                *
-                * The error code would be generated in the following
-                * two cases:
-                * (1) The Scalar Processor has already been stopped.
-                * (2) The "Host->SP" event queue is full.
-                *
-                * As the convention of using CSS API 2.0/2.1, such CSS
-                * error code would be propogated from the CSS-internal
-                * API returned value to the CSS API returned value. Then
-                * the CSS driver should capture these error code and
-                * handle it in the driver exception handling mechanism.
-                */
-               if (err != IA_CSS_SUCCESS) {
-                       goto ERR;
-               }
-       }
-
-       /*
-        * In the CSS firmware use scenario "Continuous Preview"
-        * as well as "Continuous Video", the "ia_css_pipe" instance
-        * "Copy Pipe" is activated. This "Copy Pipe" is private to
-        * the CSS firmware so that it is not listed in the target
-        * "ia_css_stream" instance.
-        *
-        * We need to stop this "Copy Pipe", as well.
-        */
-       if (main_pipe->stream->config.continuous) {
-               struct ia_css_pipe *copy_pipe = NULL;
+/*
+ * Exit this loop if "ia_css_pipeline_request_stop()"
+ * returns the error code.
+ *
+ * The error code would be generated in the following
+ * two cases:
+ * (1) The Scalar Processor has already been stopped.
+ * (2) The "Host->SP" event queue is full.
+ *
+ * As the convention of using CSS API 2.0/2.1, such CSS
+ * error code would be propogated from the CSS-internal
+ * API returned value to the CSS API returned value. Then
+ * the CSS driver should capture these error code and
+ * handle it in the driver exception handling mechanism.
+ */
+if (err != IA_CSS_SUCCESS) {
+       goto ERR;
+}
+}
 
-               /* get the reference to "Copy Pipe" */
-               if (main_pipe_id == IA_CSS_PIPE_ID_PREVIEW)
-                       copy_pipe = main_pipe->pipe_settings.preview.copy_pipe;
-               else if (main_pipe_id == IA_CSS_PIPE_ID_VIDEO)
-                       copy_pipe = main_pipe->pipe_settings.video.copy_pipe;
+/*
+ * In the CSS firmware use scenario "Continuous Preview"
+ * as well as "Continuous Video", the "ia_css_pipe" instance
+ * "Copy Pipe" is activated. This "Copy Pipe" is private to
+ * the CSS firmware so that it is not listed in the target
+ * "ia_css_stream" instance.
+ *
+ * We need to stop this "Copy Pipe", as well.
+ */
+if (main_pipe->stream->config.continuous)
+{
+       struct ia_css_pipe *copy_pipe = NULL;
 
-               /* return the error code if "Copy Pipe" does NOT exist */
-               assert(copy_pipe);
-               if (!copy_pipe) {
-                       IA_CSS_LOG("Copy Pipe does NOT exist!");
-                       err = IA_CSS_ERR_INTERNAL_ERROR;
-                       goto ERR;
-               }
+       /* get the reference to "Copy Pipe" */
+       if (main_pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+               copy_pipe = main_pipe->pipe_settings.preview.copy_pipe;
+       else if (main_pipe_id == IA_CSS_PIPE_ID_VIDEO)
+               copy_pipe = main_pipe->pipe_settings.video.copy_pipe;
 
-               /* send the "stop" request to "Copy Pipe" */
-               IA_CSS_LOG("Send the stop-request to the pipe: pipe_id=%d",
-                               copy_pipe->pipeline.pipe_id);
-               err = ia_css_pipeline_request_stop(&copy_pipe->pipeline);
+       /* return the error code if "Copy Pipe" does NOT exist */
+       assert(copy_pipe);
+       if (!copy_pipe) {
+               IA_CSS_LOG("Copy Pipe does NOT exist!");
+               err = IA_CSS_ERR_INTERNAL_ERROR;
+               goto ERR;
        }
 
+       /* send the "stop" request to "Copy Pipe" */
+       IA_CSS_LOG("Send the stop-request to the pipe: pipe_id=%d",
+                  copy_pipe->pipeline.pipe_id);
+       err = ia_css_pipeline_request_stop(&copy_pipe->pipeline);
+}
+
 ERR:
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
-       return err;
+IA_CSS_LEAVE_ERR_PRIVATE(err);
+return err;
 }
 
 /*
@@ -5218,8 +5390,8 @@ sh_css_pipes_have_stopped(struct ia_css_stream *stream)
        for (i = 0; i < stream->num_pipes; i++) {
                rval = rval && ia_css_pipeline_has_stopped(&stream->pipes[i]->pipeline);
                IA_CSS_LOG("Pipe has stopped: pipe_id=%d, stopped=%d",
-                               stream->pipes[i]->pipeline.pipe_id,
-                               rval);
+                          stream->pipes[i]->pipeline.pipe_id,
+                          rval);
        }
 
        /*
@@ -5252,8 +5424,8 @@ sh_css_pipes_have_stopped(struct ia_css_stream *stream)
                /* check if "Copy Pipe" has stopped or not */
                rval = rval && ia_css_pipeline_has_stopped(&copy_pipe->pipeline);
                IA_CSS_LOG("Pipe has stopped: pipe_id=%d, stopped=%d",
-                               copy_pipe->pipeline.pipe_id,
-                               rval);
+                          copy_pipe->pipeline.pipe_id,
+                          rval);
        }
 
 RET:
@@ -5267,19 +5439,20 @@ sh_css_continuous_is_enabled(uint8_t pipe_num)
        struct ia_css_pipe *pipe;
        bool continuous;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_continuous_is_enabled() enter: pipe_num=%d\n", pipe_num);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "sh_css_continuous_is_enabled() enter: pipe_num=%d\n", pipe_num);
 
        pipe = find_pipe_by_num(pipe_num);
        continuous = pipe && pipe->stream->config.continuous;
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "sh_css_continuous_is_enabled() leave: enable=%d\n",
-               continuous);
+                           "sh_css_continuous_is_enabled() leave: enable=%d\n",
+                           continuous);
        return continuous;
 }
 
 enum ia_css_err
-ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
-{
+ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream,
+                                  int *buffer_depth) {
        if (!buffer_depth)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_max_buffer_depth() enter: void\n");
@@ -5289,8 +5462,7 @@ ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_dep
 }
 
 enum ia_css_err
-ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth)
-{
+ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth) {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_set_buffer_depth() enter: num_frames=%d\n", buffer_depth);
        (void)stream;
        if (buffer_depth > NUM_CONTINUOUS_FRAMES || buffer_depth < 1)
@@ -5302,8 +5474,8 @@ ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth)
 }
 
 enum ia_css_err
-ia_css_stream_get_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
-{
+ia_css_stream_get_buffer_depth(struct ia_css_stream *stream,
+                              int *buffer_depth) {
        if (!buffer_depth)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_buffer_depth() enter: void\n");
@@ -5319,19 +5491,20 @@ sh_css_get_mipi_sizes_for_check(const unsigned int port, const unsigned int idx)
 {
        OP___assert(port < N_CSI_PORTS);
        OP___assert(idx  < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "sh_css_get_mipi_sizes_for_check(port %d, idx %d): %d\n",
-               port, idx, my_css.mipi_sizes_for_check[port][idx]);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "sh_css_get_mipi_sizes_for_check(port %d, idx %d): %d\n",
+                           port, idx, my_css.mipi_sizes_for_check[port][idx]);
        return my_css.mipi_sizes_for_check[port][idx];
 }
 #endif
 
 static enum ia_css_err sh_css_pipe_configure_output(
-       struct ia_css_pipe *pipe,
-       unsigned int width,
-       unsigned int height,
-       unsigned int padded_width,
-       enum ia_css_frame_format format,
-       unsigned int idx)
+    struct ia_css_pipe *pipe,
+    unsigned int width,
+    unsigned int height,
+    unsigned int padded_width,
+    enum ia_css_frame_format format,
+    unsigned int idx)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
@@ -5349,14 +5522,13 @@ static enum ia_css_err sh_css_pipe_configure_output(
        }
        if (pipe->output_info[idx].res.width != width ||
            pipe->output_info[idx].res.height != height ||
-           pipe->output_info[idx].format != format)
-       {
+           pipe->output_info[idx].format != format) {
                ia_css_frame_info_init(
-                               &pipe->output_info[idx],
-                               width,
-                               height,
-                               format,
-                               padded_width);
+                   &pipe->output_info[idx],
+                   width,
+                   height,
+                   format,
+                   padded_width);
        }
        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
        return IA_CSS_SUCCESS;
@@ -5382,24 +5554,26 @@ sh_css_pipe_get_shading_info(struct ia_css_pipe *pipe,
        assert(pipe_config);
 #endif
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_pipe_get_shading_info() enter:\n");
+                           "sh_css_pipe_get_shading_info() enter:\n");
 
        binary = ia_css_pipe_get_shading_correction_binary(pipe);
 
-       if (binary) {
+       if (binary)
+       {
                err = ia_css_binary_get_shading_info(binary,
-                       IA_CSS_SHADING_CORRECTION_TYPE_1,
-                       pipe->required_bds_factor,
-                       (const struct ia_css_stream_config *)&pipe->stream->config,
+                                                    IA_CSS_SHADING_CORRECTION_TYPE_1,
+                                                    pipe->required_bds_factor,
+                                                    (const struct ia_css_stream_config *)&pipe->stream->config,
 #ifndef ISP2401
-                       info);
+                                                    info);
 #else
-                       shading_info, pipe_config);
+                                                    shading_info, pipe_config);
 #endif
                /* Other function calls can be added here when other shading correction types will be added
                 * in the future.
                 */
-       } else {
+       } else
+       {
                /* When the pipe does not have a binary which has the shading
                 * correction, this function does not need to fill the shading
                 * information. It is not a error case, and then
@@ -5416,8 +5590,7 @@ sh_css_pipe_get_shading_info(struct ia_css_pipe *pipe,
 
 static enum ia_css_err
 sh_css_pipe_get_grid_info(struct ia_css_pipe *pipe,
-                         struct ia_css_grid_info *info)
-{
+                         struct ia_css_grid_info *info) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_binary *binary = NULL;
 
@@ -5428,7 +5601,8 @@ sh_css_pipe_get_grid_info(struct ia_css_pipe *pipe,
 
        binary = ia_css_pipe_get_s3a_binary(pipe);
 
-       if (binary) {
+       if (binary)
+       {
                err = ia_css_binary_3a_grid_info(binary, info, pipe);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
@@ -5437,17 +5611,20 @@ sh_css_pipe_get_grid_info(struct ia_css_pipe *pipe,
 
        binary = ia_css_pipe_get_sdis_binary(pipe);
 
-       if (binary) {
+       if (binary)
+       {
                ia_css_binary_dvs_grid_info(binary, info, pipe);
                ia_css_binary_dvs_stat_grid_info(binary, info, pipe);
-       } else {
+       } else
+       {
                memset(&info->dvs_grid.dvs_grid_info, 0,
-                          sizeof(info->dvs_grid.dvs_grid_info));
+                      sizeof(info->dvs_grid.dvs_grid_info));
                memset(&info->dvs_grid.dvs_stat_grid_info, 0,
-                          sizeof(info->dvs_grid.dvs_stat_grid_info));
+                      sizeof(info->dvs_grid.dvs_stat_grid_info));
        }
 
-       if (binary) {
+       if (binary)
+       {
                /* copy pipe does not have ISP binary*/
                info->isp_in_width = binary->internal_frame_info.res.width;
                info->isp_in_height = binary->internal_frame_info.res.height;
@@ -5472,8 +5649,8 @@ ERR :
  *
  */
 static enum ia_css_err
-ia_css_pipe_check_format(struct ia_css_pipe *pipe, enum ia_css_frame_format format)
-{
+ia_css_pipe_check_format(struct ia_css_pipe *pipe,
+                        enum ia_css_frame_format format) {
        const enum ia_css_frame_format *supported_formats;
        int number_of_formats;
        int found = 0;
@@ -5481,7 +5658,8 @@ ia_css_pipe_check_format(struct ia_css_pipe *pipe, enum ia_css_frame_format form
 
        IA_CSS_ENTER_PRIVATE("");
 
-       if (NULL == pipe || NULL == pipe->pipe_settings.video.video_binary.info) {
+       if (NULL == pipe || NULL == pipe->pipe_settings.video.video_binary.info)
+       {
                IA_CSS_ERROR("Pipe or binary info is not set");
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -5490,17 +5668,20 @@ ia_css_pipe_check_format(struct ia_css_pipe *pipe, enum ia_css_frame_format form
        supported_formats = pipe->pipe_settings.video.video_binary.info->output_formats;
        number_of_formats = sizeof(pipe->pipe_settings.video.video_binary.info->output_formats) / sizeof(enum ia_css_frame_format);
 
-       for (i = 0; i < number_of_formats && !found; i++) {
+       for (i = 0; i < number_of_formats && !found; i++)
+       {
                if (supported_formats[i] == format) {
                        found = 1;
                        break;
                }
        }
-       if (!found) {
+       if (!found)
+       {
                IA_CSS_ERROR("Requested format is not supported by binary");
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
-       } else {
+       } else
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
                return IA_CSS_SUCCESS;
        }
@@ -5510,7 +5691,7 @@ ia_css_pipe_check_format(struct ia_css_pipe *pipe, enum ia_css_frame_format form
 static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
 {
        struct ia_css_frame_info video_in_info, tnr_info,
-                                *video_vf_info, video_bds_out_info, *pipe_out_info, *pipe_vf_out_info;
+                      *video_vf_info, video_bds_out_info, *pipe_out_info, *pipe_vf_out_info;
        bool online;
        enum ia_css_err err = IA_CSS_SUCCESS;
        bool continuous = pipe->stream->config.continuous;
@@ -5552,7 +5733,7 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0]) {
                err = ia_css_util_check_vf_out_info(pipe_out_info,
-                                       pipe_vf_out_info);
+                                                   pipe_vf_out_info);
                if (err != IA_CSS_SUCCESS)
                        return err;
        } else {
@@ -5569,8 +5750,9 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
        /* Video */
        if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0]) {
                video_vf_info = pipe_vf_out_info;
-               vf_res_different_than_output = (video_vf_info->res.width != video_bin_out_info.res.width) ||
-                                               (video_vf_info->res.height != video_bin_out_info.res.height);
+               vf_res_different_than_output = (video_vf_info->res.width !=
+                                               video_bin_out_info.res.width) ||
+                                              (video_vf_info->res.height != video_bin_out_info.res.height);
        } else {
                video_vf_info = NULL;
        }
@@ -5587,21 +5769,21 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                video_bin_out_info.format = IA_CSS_FRAME_FORMAT_NV12;
 
                err = ia_css_pipe_create_cas_scaler_desc_single_output(
-                       &video_bin_out_info,
-                       pipe_out_info,
-                       NULL,
-                       &cas_scaler_descr);
+                         &video_bin_out_info,
+                         pipe_out_info,
+                         NULL,
+                         &cas_scaler_descr);
                if (err != IA_CSS_SUCCESS)
                        return err;
                mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
                mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
-                       sizeof(struct ia_css_binary), GFP_KERNEL);
+                                                 sizeof(struct ia_css_binary), GFP_KERNEL);
                if (!mycs->yuv_scaler_binary) {
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                        return err;
                }
                mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage
-                                       * sizeof(bool), GFP_KERNEL);
+                                               * sizeof(bool), GFP_KERNEL);
                if (!mycs->is_output_stage) {
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                        return err;
@@ -5611,12 +5793,12 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
 
                        mycs->is_output_stage[i] = cas_scaler_descr.is_output_stage[i];
                        ia_css_pipe_get_yuvscaler_binarydesc(pipe,
-                               &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
-                               &cas_scaler_descr.out_info[i],
-                               &cas_scaler_descr.internal_out_info[i],
-                               &cas_scaler_descr.vf_info[i]);
+                                                            &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
+                                                            &cas_scaler_descr.out_info[i],
+                                                            &cas_scaler_descr.internal_out_info[i],
+                                                            &cas_scaler_descr.vf_info[i]);
                        err = ia_css_binary_find(&yuv_scaler_descr,
-                                               &mycs->yuv_scaler_binary[i]);
+                                                &mycs->yuv_scaler_binary[i]);
                        if (err != IA_CSS_SUCCESS) {
                                kfree(mycs->is_output_stage);
                                mycs->is_output_stage = NULL;
@@ -5631,8 +5813,9 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                enum ia_css_frame_format vf_info_format;
 
                err = ia_css_pipe_get_video_binarydesc(pipe,
-                       &video_descr, &video_in_info, &video_bds_out_info, &video_bin_out_info, video_vf_info,
-                       pipe->stream->config.left_padding);
+                                                      &video_descr, &video_in_info, &video_bds_out_info, &video_bin_out_info,
+                                                      video_vf_info,
+                                                      pipe->stream->config.left_padding);
                if (err != IA_CSS_SUCCESS)
                        return err;
 
@@ -5663,29 +5846,29 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                        /* If the binary has single output pin, we need vf_pp if additional
                        * scaling is needed for vf */
                        need_vf_pp |= ((num_output_pins == 1) &&
-                               ((video_vf_info->res.width << vf_ds_log2 != pipe_out_info->res.width) ||
-                               (video_vf_info->res.height << vf_ds_log2 != pipe_out_info->res.height)));
+                                      ((video_vf_info->res.width << vf_ds_log2 != pipe_out_info->res.width) ||
+                                       (video_vf_info->res.height << vf_ds_log2 != pipe_out_info->res.height)));
                }
 
                if (need_vf_pp) {
                        /* save the current vf_info format for restoration later */
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "load_video_binaries() need_vf_pp; find video binary with YUV_LINE again\n");
+                                           "load_video_binaries() need_vf_pp; find video binary with YUV_LINE again\n");
 
                        vf_info_format = video_vf_info->format;
 
                        if (!pipe->config.enable_vfpp_bci)
                                ia_css_frame_info_set_format(video_vf_info,
-                                       IA_CSS_FRAME_FORMAT_YUV_LINE);
+                                                            IA_CSS_FRAME_FORMAT_YUV_LINE);
 
                        ia_css_binary_destroy_isp_parameters(&mycs->video_binary);
 
                        err = ia_css_binary_find(&video_descr,
-                                               &mycs->video_binary);
+                                                &mycs->video_binary);
 
                        /* restore original vf_info format */
                        ia_css_frame_info_set_format(video_vf_info,
-                                       vf_info_format);
+                                                    vf_info_format);
                        if (err != IA_CSS_SUCCESS)
                                return err;
                }
@@ -5708,10 +5891,10 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                pipe->num_invalid_frames *= 2;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "load_video_binaries() num_invalid_frames=%d dvs_frame_delay=%d\n",
-               pipe->num_invalid_frames, pipe->dvs_frame_delay);
+                           "load_video_binaries() num_invalid_frames=%d dvs_frame_delay=%d\n",
+                           pipe->num_invalid_frames, pipe->dvs_frame_delay);
 
-/* pqiao TODO: temp hack for PO, should be removed after offline YUVPP is enabled */
+       /* pqiao TODO: temp hack for PO, should be removed after offline YUVPP is enabled */
 #if !defined(USE_INPUT_SYSTEM_VERSION_2401)
        /* Copy */
        if (!online && !continuous) {
@@ -5733,21 +5916,21 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                struct ia_css_binary_descr vf_pp_descr;
 
                if (mycs->video_binary.vf_frame_info.format
-                               == IA_CSS_FRAME_FORMAT_YUV_LINE) {
+                   == IA_CSS_FRAME_FORMAT_YUV_LINE) {
                        ia_css_pipe_get_vfpp_binarydesc(pipe, &vf_pp_descr,
-                               &mycs->video_binary.vf_frame_info,
-                               pipe_vf_out_info);
+                                                       &mycs->video_binary.vf_frame_info,
+                                                       pipe_vf_out_info);
                } else {
                        /* output from main binary is not yuv line. currently this is
                         * possible only when bci is enabled on vfpp output */
                        assert(pipe->config.enable_vfpp_bci == true);
                        ia_css_pipe_get_yuvscaler_binarydesc(pipe, &vf_pp_descr,
-                               &mycs->video_binary.vf_frame_info,
-                               pipe_vf_out_info, NULL, NULL);
+                                                            &mycs->video_binary.vf_frame_info,
+                                                            pipe_vf_out_info, NULL, NULL);
                }
 
                err = ia_css_binary_find(&vf_pp_descr,
-                               &mycs->vf_pp_binary);
+                                        &mycs->vf_pp_binary);
                if (err != IA_CSS_SUCCESS)
                        return err;
        }
@@ -5770,7 +5953,8 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                 * output_system_in_resolution(GDC_out_resolution) is
                 * being used, then select that as it will also be in resolution for
                 * TNR. At present, it only make sense for Skycam */
-               if (pipe->config.output_system_in_res.width && pipe->config.output_system_in_res.height) {
+               if (pipe->config.output_system_in_res.width &&
+                   pipe->config.output_system_in_res.height) {
                        tnr_width = pipe->config.output_system_in_res.width;
                        tnr_height = pipe->config.output_system_in_res.height;
                } else {
@@ -5780,20 +5964,20 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
 
                /* Make tnr reference buffers output block width(in pix) align */
                tnr_info.res.width  =
-                       CEIL_MUL(tnr_width,
-                        (mycs->video_binary.info->sp.block.block_width * ISP_NWAY));
+                   CEIL_MUL(tnr_width,
+                            (mycs->video_binary.info->sp.block.block_width * ISP_NWAY));
                tnr_info.padded_width = tnr_info.res.width;
 
 #endif
                /* Make tnr reference buffers output block height align */
 #ifndef ISP2401
                tnr_info.res.height =
-                       CEIL_MUL(tnr_info.res.height,
-                                mycs->video_binary.info->sp.block.output_block_height);
+                   CEIL_MUL(tnr_info.res.height,
+                            mycs->video_binary.info->sp.block.output_block_height);
 #else
                tnr_info.res.height =
-                       CEIL_MUL(tnr_height,
-                                mycs->video_binary.info->sp.block.output_block_height);
+                   CEIL_MUL(tnr_height,
+                            mycs->video_binary.info->sp.block.output_block_height);
 #endif
        } else {
                tnr_info = mycs->video_binary.internal_frame_info;
@@ -5811,8 +5995,8 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                        mycs->tnr_frames[i] = NULL;
                }
                err = ia_css_frame_allocate_from_info(
-                               &mycs->tnr_frames[i],
-                               &tnr_info);
+                         &mycs->tnr_frames[i],
+                         &tnr_info);
                if (err != IA_CSS_SUCCESS)
                        return err;
        }
@@ -5821,13 +6005,13 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
 }
 
 static enum ia_css_err
-unload_video_binaries(struct ia_css_pipe *pipe)
-{
+unload_video_binaries(struct ia_css_pipe *pipe) {
        unsigned int i;
 
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
 
-       if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_VIDEO)) {
+       if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_VIDEO))
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -5889,7 +6073,8 @@ static enum ia_css_err video_start(struct ia_css_pipe *pipe)
                copy_ovrd = 1 << thread_id;
 
                if (pipe->stream->cont_capt) {
-                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe), &thread_id);
+                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe),
+                                                        &thread_id);
                        copy_ovrd |= 1 << thread_id;
                }
        }
@@ -5897,31 +6082,31 @@ static enum ia_css_err video_start(struct ia_css_pipe *pipe)
        /* Construct and load the copy pipe */
        if (pipe->stream->config.continuous) {
                sh_css_sp_init_pipeline(&copy_pipe->pipeline,
-                       IA_CSS_PIPE_ID_COPY,
-                       (uint8_t)ia_css_pipe_get_pipe_num(copy_pipe),
-                       false,
-                       pipe->stream->config.pixels_per_clock == 2, false,
-                       false, pipe->required_bds_factor,
-                       copy_ovrd,
-                       pipe->stream->config.mode,
-                       &pipe->stream->config.metadata_config,
+                                       IA_CSS_PIPE_ID_COPY,
+                                       (uint8_t)ia_css_pipe_get_pipe_num(copy_pipe),
+                                       false,
+                                       pipe->stream->config.pixels_per_clock == 2, false,
+                                       false, pipe->required_bds_factor,
+                                       copy_ovrd,
+                                       pipe->stream->config.mode,
+                                       &pipe->stream->config.metadata_config,
 #ifndef ISP2401
-                       &pipe->stream->info.metadata_info
+                                       &pipe->stream->info.metadata_info
 #else
-                       &pipe->stream->info.metadata_info,
+                                       &pipe->stream->info.metadata_info,
 #endif
 #if !defined(HAS_NO_INPUT_SYSTEM)
 #ifndef ISP2401
-                       , pipe->stream->config.source.port.port
+                                       , pipe->stream->config.source.port.port
 #else
-                       pipe->stream->config.source.port.port,
+                                       pipe->stream->config.source.port.port,
 #endif
 #endif
 #ifndef ISP2401
-                       );
+                                      );
 #else
- & copy_pipe->config.internal_frame_origin_bqs_on_sctbl,
-                       copy_pipe->stream->isp_params_configs);
                                      & copy_pipe->config.internal_frame_origin_bqs_on_sctbl,
+                                       copy_pipe->stream->isp_params_configs);
 #endif
 
                /* make the video pipe start with mem mode input, copy handles
@@ -5932,33 +6117,33 @@ static enum ia_css_err video_start(struct ia_css_pipe *pipe)
        /* Construct and load the capture pipe */
        if (pipe->stream->cont_capt) {
                sh_css_sp_init_pipeline(&capture_pipe->pipeline,
-                       IA_CSS_PIPE_ID_CAPTURE,
-                       (uint8_t)ia_css_pipe_get_pipe_num(capture_pipe),
-                       capture_pipe->config.default_capture_config.enable_xnr != 0,
-                       capture_pipe->stream->config.pixels_per_clock == 2,
-                       true, /* continuous */
-                       false, /* offline */
-                       capture_pipe->required_bds_factor,
-                       0,
-                       IA_CSS_INPUT_MODE_MEMORY,
-                       &pipe->stream->config.metadata_config,
+                                       IA_CSS_PIPE_ID_CAPTURE,
+                                       (uint8_t)ia_css_pipe_get_pipe_num(capture_pipe),
+                                       capture_pipe->config.default_capture_config.enable_xnr != 0,
+                                       capture_pipe->stream->config.pixels_per_clock == 2,
+                                       true, /* continuous */
+                                       false, /* offline */
+                                       capture_pipe->required_bds_factor,
+                                       0,
+                                       IA_CSS_INPUT_MODE_MEMORY,
+                                       &pipe->stream->config.metadata_config,
 #ifndef ISP2401
-                       &pipe->stream->info.metadata_info
+                                       &pipe->stream->info.metadata_info
 #else
-                       &pipe->stream->info.metadata_info,
+                                       &pipe->stream->info.metadata_info,
 #endif
 #if !defined(HAS_NO_INPUT_SYSTEM)
 #ifndef ISP2401
-                       , (enum mipi_port_id)0
+                                       , (enum mipi_port_id)0
 #else
-                       (enum mipi_port_id)0,
+                                       (enum mipi_port_id)0,
 #endif
 #endif
 #ifndef ISP2401
-                       );
+                                      );
 #else
- & capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
-                       capture_pipe->stream->isp_params_configs);
                                      & capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
+                                       capture_pipe->stream->isp_params_configs);
 #endif
        }
 
@@ -5970,15 +6155,16 @@ static enum ia_css_err video_start(struct ia_css_pipe *pipe)
 
 static
 enum ia_css_err sh_css_pipe_get_viewfinder_frame_info(
-       struct ia_css_pipe *pipe,
-       struct ia_css_frame_info *info,
-       unsigned int idx)
+    struct ia_css_pipe *pipe,
+    struct ia_css_frame_info *info,
+    unsigned int idx)
 {
        assert(pipe);
        assert(info);
 
-/* We could print the pointer as input arg, and the values as output */
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "sh_css_pipe_get_viewfinder_frame_info() enter: void\n");
+       /* We could print the pointer as input arg, and the values as output */
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                           "sh_css_pipe_get_viewfinder_frame_info() enter: void\n");
 
        if (pipe->mode == IA_CSS_PIPE_ID_CAPTURE &&
            (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW ||
@@ -5988,13 +6174,13 @@ enum ia_css_err sh_css_pipe_get_viewfinder_frame_info(
        *info = pipe->vf_output_info[idx];
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_pipe_get_viewfinder_frame_info() leave: \
+                           "sh_css_pipe_get_viewfinder_frame_info() leave: \
                info.res.width=%d, info.res.height=%d, \
                info.padded_width=%d, info.format=%d, \
                info.raw_bit_depth=%d, info.raw_bayer_order=%d\n",
-               info->res.width, info->res.height,
-               info->padded_width, info->format,
-               info->raw_bit_depth, info->raw_bayer_order);
+                           info->res.width, info->res.height,
+                           info->padded_width, info->format,
+                           info->raw_bit_depth, info->raw_bayer_order);
 
        return IA_CSS_SUCCESS;
 }
@@ -6003,26 +6189,28 @@ static enum ia_css_err
 sh_css_pipe_configure_viewfinder(struct ia_css_pipe *pipe, unsigned int width,
                                 unsigned int height, unsigned int min_width,
                                 enum ia_css_frame_format format,
-                                unsigned int idx)
-{
+                                unsigned int idx) {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        IA_CSS_ENTER_PRIVATE("pipe = %p, width = %d, height = %d, min_width = %d, format = %d, idx = %d\n",
                             pipe, width, height, min_width, format, idx);
 
-       if (!pipe) {
+       if (!pipe)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
        err = ia_css_util_check_res(width, height);
-       if (err != IA_CSS_SUCCESS) {
+       if (err != IA_CSS_SUCCESS)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(err);
                return err;
        }
        if (pipe->vf_output_info[idx].res.width != width ||
            pipe->vf_output_info[idx].res.height != height ||
-           pipe->vf_output_info[idx].format != format) {
+           pipe->vf_output_info[idx].format != format)
+       {
                ia_css_frame_info_init(&pipe->vf_output_info[idx], width, height,
                                       format, min_width);
        }
@@ -6037,7 +6225,8 @@ static enum ia_css_err load_copy_binaries(struct ia_css_pipe *pipe)
        assert(pipe);
        IA_CSS_ENTER_PRIVATE("");
 
-       assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
+       assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+              pipe->mode == IA_CSS_PIPE_ID_COPY);
        if (pipe->pipe_settings.capture.copy_binary.info)
                return IA_CSS_SUCCESS;
 
@@ -6050,8 +6239,8 @@ static enum ia_css_err load_copy_binaries(struct ia_css_pipe *pipe)
                goto ERR;
 
        err = load_copy_binary(pipe,
-                               &pipe->pipe_settings.capture.copy_binary,
-                               NULL);
+                              &pipe->pipe_settings.capture.copy_binary,
+                              NULL);
 
 ERR:
        IA_CSS_LEAVE_ERR_PRIVATE(err);
@@ -6059,7 +6248,7 @@ ERR:
 }
 
 static bool need_capture_pp(
-       const struct ia_css_pipe *pipe)
+    const struct ia_css_pipe *pipe)
 {
        const struct ia_css_frame_info *out_info = &pipe->output_info[0];
 
@@ -6095,7 +6284,7 @@ static bool need_capture_pp(
 }
 
 static bool need_capt_ldc(
-       const struct ia_css_pipe *pipe)
+    const struct ia_css_pipe *pipe)
 {
        IA_CSS_ENTER_LEAVE_PRIVATE("");
        assert(pipe);
@@ -6103,7 +6292,8 @@ static bool need_capt_ldc(
        return (pipe->extra_config.enable_dvs_6axis) ? true : false;
 }
 
-static enum ia_css_err set_num_primary_stages(unsigned int *num, enum ia_css_pipe_version version)
+static enum ia_css_err set_num_primary_stages(unsigned int *num,
+       enum ia_css_pipe_version version)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
@@ -6127,7 +6317,7 @@ static enum ia_css_err set_num_primary_stages(unsigned int *num, enum ia_css_pip
 }
 
 static enum ia_css_err load_primary_binaries(
-       struct ia_css_pipe *pipe)
+    struct ia_css_pipe *pipe)
 {
        bool online = false;
        bool memory = false;
@@ -6139,14 +6329,14 @@ static enum ia_css_err load_primary_binaries(
        bool sensor = false;
 #endif
        struct ia_css_frame_info prim_in_info,
-                                prim_out_info,
-                                capt_pp_out_info, vf_info,
-                                *vf_pp_in_info, *pipe_out_info,
+                      prim_out_info,
+                      capt_pp_out_info, vf_info,
+                      *vf_pp_in_info, *pipe_out_info,
 #ifndef ISP2401
-                                *pipe_vf_out_info, *capt_pp_in_info,
-                                capt_ldc_out_info;
+                      *pipe_vf_out_info, *capt_pp_in_info,
+                      capt_ldc_out_info;
 #else
-                                *pipe_vf_out_info;
+                      *pipe_vf_out_info;
 #endif
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_capture_settings *mycs;
@@ -6156,7 +6346,8 @@ static enum ia_css_err load_primary_binaries(
        IA_CSS_ENTER_PRIVATE("");
        assert(pipe);
        assert(pipe->stream);
-       assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
+       assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+              pipe->mode == IA_CSS_PIPE_ID_COPY);
 
        online = pipe->stream->config.online;
        memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
@@ -6172,7 +6363,8 @@ static enum ia_css_err load_primary_binaries(
        if (mycs->primary_binary[0].info)
                return IA_CSS_SUCCESS;
 
-       err = set_num_primary_stages(&mycs->num_primary_stage, pipe->config.isp_pipe_version);
+       err = set_num_primary_stages(&mycs->num_primary_stage,
+                                    pipe->config.isp_pipe_version);
        if (err != IA_CSS_SUCCESS) {
                IA_CSS_LEAVE_ERR_PRIVATE(err);
                return err;
@@ -6198,16 +6390,16 @@ static enum ia_css_err load_primary_binaries(
           factor. */
        vf_info = *pipe_vf_out_info;
 
-/*
- * WARNING: The #if def flag has been added below as a
- * temporary solution to solve the problem of enabling the
- * view finder in a single binary in a capture flow. The
- * vf-pp stage has been removed for Skycam in the solution
- * provided. The vf-pp stage should be re-introduced when
- * required. This should not be considered as a clean solution.
- * Proper investigation should be done to come up with the clean
- * solution.
- * */
+       /*
       * WARNING: The #if def flag has been added below as a
       * temporary solution to solve the problem of enabling the
       * view finder in a single binary in a capture flow. The
       * vf-pp stage has been removed for Skycam in the solution
       * provided. The vf-pp stage should be re-introduced when
       * required. This should not be considered as a clean solution.
       * Proper investigation should be done to come up with the clean
       * solution.
       * */
        ia_css_frame_info_set_format(&vf_info, IA_CSS_FRAME_FORMAT_YUV_LINE);
 
        /* TODO: All this yuv_scaler and capturepp calculation logic
@@ -6220,41 +6412,41 @@ static enum ia_css_err load_primary_binaries(
        capt_pp_out_info.res.height /= MAX_PREFERRED_YUV_DS_PER_STEP;
        ia_css_frame_info_set_width(&capt_pp_out_info, capt_pp_out_info.res.width, 0);
 
-/*
- * WARNING: The #if def flag has been added below as a
- * temporary solution to solve the problem of enabling the
- * view finder in a single binary in a capture flow. The
- * vf-pp stage has been removed for Skycam in the solution
- * provided. The vf-pp stage should be re-introduced when
- * required. This should not be considered as a clean solution.
- * Proper investigation should be done to come up with the clean
- * solution.
- * */
+       /*
       * WARNING: The #if def flag has been added below as a
       * temporary solution to solve the problem of enabling the
       * view finder in a single binary in a capture flow. The
       * vf-pp stage has been removed for Skycam in the solution
       * provided. The vf-pp stage should be re-introduced when
       * required. This should not be considered as a clean solution.
       * Proper investigation should be done to come up with the clean
       * solution.
       * */
        need_extra_yuv_scaler = need_downscaling(capt_pp_out_info.res,
-                                               pipe_out_info->res);
+                               pipe_out_info->res);
 
        if (need_extra_yuv_scaler) {
                struct ia_css_cas_binary_descr cas_scaler_descr = { };
 
                err = ia_css_pipe_create_cas_scaler_desc_single_output(
-                       &capt_pp_out_info,
-                       pipe_out_info,
-                       NULL,
-                       &cas_scaler_descr);
+                         &capt_pp_out_info,
+                         pipe_out_info,
+                         NULL,
+                         &cas_scaler_descr);
                if (err != IA_CSS_SUCCESS) {
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
                        return err;
                }
                mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
                mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
-                       sizeof(struct ia_css_binary), GFP_KERNEL);
+                                                 sizeof(struct ia_css_binary), GFP_KERNEL);
                if (!mycs->yuv_scaler_binary) {
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
                        return err;
                }
                mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage *
-                       sizeof(bool), GFP_KERNEL);
+                                               sizeof(bool), GFP_KERNEL);
                if (!mycs->is_output_stage) {
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
@@ -6265,12 +6457,12 @@ static enum ia_css_err load_primary_binaries(
 
                        mycs->is_output_stage[i] = cas_scaler_descr.is_output_stage[i];
                        ia_css_pipe_get_yuvscaler_binarydesc(pipe,
-                               &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
-                               &cas_scaler_descr.out_info[i],
-                               &cas_scaler_descr.internal_out_info[i],
-                               &cas_scaler_descr.vf_info[i]);
+                                                            &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
+                                                            &cas_scaler_descr.out_info[i],
+                                                            &cas_scaler_descr.internal_out_info[i],
+                                                            &cas_scaler_descr.vf_info[i]);
                        err = ia_css_binary_find(&yuv_scaler_descr,
-                                               &mycs->yuv_scaler_binary[i]);
+                                                &mycs->yuv_scaler_binary[i]);
                        if (err != IA_CSS_SUCCESS) {
                                IA_CSS_LEAVE_ERR_PRIVATE(err);
                                return err;
@@ -6290,173 +6482,173 @@ static enum ia_css_err load_primary_binaries(
                struct ia_css_binary_descr capt_ldc_descr;
 
                ia_css_pipe_get_ldc_binarydesc(pipe,
-                       &capt_ldc_descr, &prim_out_info,
-                       &capt_pp_out_info);
+                                              &capt_ldc_descr, &prim_out_info,
+                                              &capt_pp_out_info);
 #endif
 
 #ifdef ISP2401
                err = ia_css_binary_find(&capt_ldc_descr,
-                                       &mycs->capture_ldc_binary);
+                                        &mycs->capture_ldc_binary);
                if (err != IA_CSS_SUCCESS) {
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
                        return err;
                }
        } else if (need_pp) {
 #endif
-       /* we build up the pipeline starting at the end */
-       /* Capture post-processing */
+               /* we build up the pipeline starting at the end */
+               /* Capture post-processing */
 #ifndef ISP2401
-       if (need_pp) {
+               if (need_pp) {
 #endif
-               struct ia_css_binary_descr capture_pp_descr;
+                       struct ia_css_binary_descr capture_pp_descr;
 #ifndef ISP2401
-               capt_pp_in_info = need_ldc ? &capt_ldc_out_info : &prim_out_info;
+                       capt_pp_in_info = need_ldc ? &capt_ldc_out_info : &prim_out_info;
 #endif
 
-               ia_css_pipe_get_capturepp_binarydesc(pipe,
+                       ia_css_pipe_get_capturepp_binarydesc(pipe,
 #ifndef ISP2401
-                       &capture_pp_descr, capt_pp_in_info,
+                                                            &capture_pp_descr, capt_pp_in_info,
 #else
-                       &capture_pp_descr, &prim_out_info,
+                                                            &capture_pp_descr, &prim_out_info,
 #endif
-                       &capt_pp_out_info, &vf_info);
-               err = ia_css_binary_find(&capture_pp_descr,
-                                       &mycs->capture_pp_binary);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
-               }
+                                                            &capt_pp_out_info, &vf_info);
+                       err = ia_css_binary_find(&capture_pp_descr,
+                                                &mycs->capture_pp_binary);
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
 #ifndef ISP2401
 
-               if (need_ldc) {
-                       struct ia_css_binary_descr capt_ldc_descr;
+                       if (need_ldc) {
+                               struct ia_css_binary_descr capt_ldc_descr;
 
-                       ia_css_pipe_get_ldc_binarydesc(pipe,
-                               &capt_ldc_descr, &prim_out_info,
-                               &capt_ldc_out_info);
+                               ia_css_pipe_get_ldc_binarydesc(pipe,
+                                                              &capt_ldc_descr, &prim_out_info,
+                                                              &capt_ldc_out_info);
 
-                       err = ia_css_binary_find(&capt_ldc_descr,
-                                               &mycs->capture_ldc_binary);
-                       if (err != IA_CSS_SUCCESS) {
-                               IA_CSS_LEAVE_ERR_PRIVATE(err);
-                               return err;
+                               err = ia_css_binary_find(&capt_ldc_descr,
+                                                        &mycs->capture_ldc_binary);
+                               if (err != IA_CSS_SUCCESS) {
+                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                                       return err;
+                               }
                        }
-               }
 #endif
-       } else {
-               prim_out_info = *pipe_out_info;
-       }
+               } else {
+                       prim_out_info = *pipe_out_info;
+               }
 
-       /* Primary */
-       {
-               struct ia_css_binary_descr prim_descr[MAX_NUM_PRIMARY_STAGES];
+               /* Primary */
+               {
+                       struct ia_css_binary_descr prim_descr[MAX_NUM_PRIMARY_STAGES];
+
+                       for (i = 0; i < mycs->num_primary_stage; i++) {
+                               struct ia_css_frame_info *local_vf_info = NULL;
+
+                               if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0] &&
+                                   (i == mycs->num_primary_stage - 1))
+                                       local_vf_info = &vf_info;
+                               ia_css_pipe_get_primary_binarydesc(pipe, &prim_descr[i], &prim_in_info,
+                                                                  &prim_out_info, local_vf_info, i);
+                               err = ia_css_binary_find(&prim_descr[i], &mycs->primary_binary[i]);
+                               if (err != IA_CSS_SUCCESS) {
+                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                                       return err;
+                               }
+                       }
+               }
 
-               for (i = 0; i < mycs->num_primary_stage; i++) {
-                       struct ia_css_frame_info *local_vf_info = NULL;
+               /* Viewfinder post-processing */
+               if (need_pp) {
+                       vf_pp_in_info =
+                           &mycs->capture_pp_binary.vf_frame_info;
+               } else {
+                       vf_pp_in_info =
+                           &mycs->primary_binary[mycs->num_primary_stage - 1].vf_frame_info;
+               }
 
-                       if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0] && (i == mycs->num_primary_stage - 1))
-                               local_vf_info = &vf_info;
-                       ia_css_pipe_get_primary_binarydesc(pipe, &prim_descr[i], &prim_in_info, &prim_out_info, local_vf_info, i);
-                       err = ia_css_binary_find(&prim_descr[i], &mycs->primary_binary[i]);
+               /*
+                * WARNING: The #if def flag has been added below as a
+                * temporary solution to solve the problem of enabling the
+                * view finder in a single binary in a capture flow. The
+                * vf-pp stage has been removed for Skycam in the solution
+                * provided. The vf-pp stage should be re-introduced when
+                * required. Thisshould not be considered as a clean solution.
+                * Proper  * investigation should be done to come up with the clean
+                * solution.
+                * */
+               if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0]) {
+                       struct ia_css_binary_descr vf_pp_descr;
+
+                       ia_css_pipe_get_vfpp_binarydesc(pipe,
+                                                       &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
+                       err = ia_css_binary_find(&vf_pp_descr, &mycs->vf_pp_binary);
                        if (err != IA_CSS_SUCCESS) {
                                IA_CSS_LEAVE_ERR_PRIVATE(err);
                                return err;
                        }
                }
-       }
-
-       /* Viewfinder post-processing */
-       if (need_pp) {
-               vf_pp_in_info =
-                   &mycs->capture_pp_binary.vf_frame_info;
-       } else {
-               vf_pp_in_info =
-                   &mycs->primary_binary[mycs->num_primary_stage - 1].vf_frame_info;
-       }
-
-/*
- * WARNING: The #if def flag has been added below as a
- * temporary solution to solve the problem of enabling the
- * view finder in a single binary in a capture flow. The
- * vf-pp stage has been removed for Skycam in the solution
- * provided. The vf-pp stage should be re-introduced when
- * required. Thisshould not be considered as a clean solution.
- * Proper  * investigation should be done to come up with the clean
- * solution.
- * */
-       if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0])
-       {
-               struct ia_css_binary_descr vf_pp_descr;
+               err = allocate_delay_frames(pipe);
 
-               ia_css_pipe_get_vfpp_binarydesc(pipe,
-                               &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
-               err = ia_css_binary_find(&vf_pp_descr, &mycs->vf_pp_binary);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+               if (err != IA_CSS_SUCCESS)
                        return err;
-               }
-       }
-       err = allocate_delay_frames(pipe);
-
-       if (err != IA_CSS_SUCCESS)
-               return err;
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       /* When the input system is 2401, only the Direct Sensor Mode
-        * Offline Capture uses the ISP copy binary.
-        */
-       need_isp_copy_binary = !online && sensor;
+               /* When the input system is 2401, only the Direct Sensor Mode
+                * Offline Capture uses the ISP copy binary.
+                */
+               need_isp_copy_binary = !online && sensor;
 #else
-       need_isp_copy_binary = !online && !continuous && !memory;
+               need_isp_copy_binary = !online && !continuous && !memory;
 #endif
 
-       /* ISP Copy */
-       if (need_isp_copy_binary) {
-               err = load_copy_binary(pipe,
-                               &mycs->copy_binary,
-                               &mycs->primary_binary[0]);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
+               /* ISP Copy */
+               if (need_isp_copy_binary) {
+                       err = load_copy_binary(pipe,
+                                              &mycs->copy_binary,
+                                              &mycs->primary_binary[0]);
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
                }
-       }
 
-       return IA_CSS_SUCCESS;
-}
+               return IA_CSS_SUCCESS;
+       }
 
-static enum ia_css_err
-allocate_delay_frames(struct ia_css_pipe *pipe)
-{
-       unsigned int num_delay_frames = 0, i = 0;
-       unsigned int dvs_frame_delay = 0;
-       struct ia_css_frame_info ref_info;
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       enum ia_css_pipe_id mode = IA_CSS_PIPE_ID_VIDEO;
-       struct ia_css_frame **delay_frames = NULL;
+       static enum ia_css_err
+       allocate_delay_frames(struct ia_css_pipe *pipe) {
+               unsigned int num_delay_frames = 0, i = 0;
+               unsigned int dvs_frame_delay = 0;
+               struct ia_css_frame_info ref_info;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               enum ia_css_pipe_id mode = IA_CSS_PIPE_ID_VIDEO;
+               struct ia_css_frame **delay_frames = NULL;
 
-       IA_CSS_ENTER_PRIVATE("");
+               IA_CSS_ENTER_PRIVATE("");
 
-       if (!pipe) {
-               IA_CSS_ERROR("Invalid args - pipe %p", pipe);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
+               if (!pipe)
+               {
+                       IA_CSS_ERROR("Invalid args - pipe %p", pipe);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       mode = pipe->mode;
-       dvs_frame_delay = pipe->dvs_frame_delay;
+               mode = pipe->mode;
+               dvs_frame_delay = pipe->dvs_frame_delay;
 
-       if (dvs_frame_delay > 0)
-               num_delay_frames = dvs_frame_delay + 1;
+               if (dvs_frame_delay > 0)
+                       num_delay_frames = dvs_frame_delay + 1;
 
-       switch (mode) {
-               case IA_CSS_PIPE_ID_CAPTURE:
+               switch (mode)
                {
+               case IA_CSS_PIPE_ID_CAPTURE: {
                        struct ia_css_capture_settings *mycs_capture = &pipe->pipe_settings.capture;
                        (void)mycs_capture;
                        return err;
                }
                break;
-               case IA_CSS_PIPE_ID_VIDEO:
-               {
+               case IA_CSS_PIPE_ID_VIDEO: {
                        struct ia_css_video_settings *mycs_video = &pipe->pipe_settings.video;
 
                        ref_info = mycs_video->video_binary.internal_frame_info;
@@ -6475,8 +6667,7 @@ allocate_delay_frames(struct ia_css_pipe *pipe)
                        delay_frames = mycs_video->delay_frames;
                }
                break;
-               case IA_CSS_PIPE_ID_PREVIEW:
-               {
+               case IA_CSS_PIPE_ID_PREVIEW: {
                        struct ia_css_preview_settings *mycs_preview = &pipe->pipe_settings.preview;
 
                        ref_info = mycs_preview->preview_binary.internal_frame_info;
@@ -6497,2414 +6688,2467 @@ allocate_delay_frames(struct ia_css_pipe *pipe)
                break;
                default:
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
+
+               ref_info.raw_bit_depth = SH_CSS_REF_BIT_DEPTH;
+
+               assert(num_delay_frames <= MAX_NUM_VIDEO_DELAY_FRAMES);
+               for (i = 0; i < num_delay_frames; i++)
+               {
+                       err = ia_css_frame_allocate_from_info(&delay_frames[i], &ref_info);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               }
+               IA_CSS_LEAVE_PRIVATE("");
+               return IA_CSS_SUCCESS;
        }
 
-       ref_info.raw_bit_depth = SH_CSS_REF_BIT_DEPTH;
+       static enum ia_css_err load_advanced_binaries(
+           struct ia_css_pipe *pipe) {
+               struct ia_css_frame_info pre_in_info, gdc_in_info,
+                              post_in_info, post_out_info,
+                              vf_info, *vf_pp_in_info, *pipe_out_info,
+                              *pipe_vf_out_info;
+               bool need_pp;
+               bool need_isp_copy = true;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+
+               IA_CSS_ENTER_PRIVATE("");
+
+               assert(pipe);
+               assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+                      pipe->mode == IA_CSS_PIPE_ID_COPY);
+               if (pipe->pipe_settings.capture.pre_isp_binary.info)
+                       return IA_CSS_SUCCESS;
+               pipe_out_info = &pipe->output_info[0];
+               pipe_vf_out_info = &pipe->vf_output_info[0];
 
-       assert(num_delay_frames <= MAX_NUM_VIDEO_DELAY_FRAMES);
-       for (i = 0; i < num_delay_frames; i++) {
-               err = ia_css_frame_allocate_from_info(&delay_frames[i], &ref_info);
+               vf_info = *pipe_vf_out_info;
+               err = ia_css_util_check_vf_out_info(pipe_out_info, &vf_info);
                if (err != IA_CSS_SUCCESS)
                        return err;
-       }
-       IA_CSS_LEAVE_PRIVATE("");
-       return IA_CSS_SUCCESS;
-}
+               need_pp = need_capture_pp(pipe);
 
-static enum ia_css_err load_advanced_binaries(
-       struct ia_css_pipe *pipe)
-{
-       struct ia_css_frame_info pre_in_info, gdc_in_info,
-                                post_in_info, post_out_info,
-                                vf_info, *vf_pp_in_info, *pipe_out_info,
-                                *pipe_vf_out_info;
-       bool need_pp;
-       bool need_isp_copy = true;
-       enum ia_css_err err = IA_CSS_SUCCESS;
+               ia_css_frame_info_set_format(&vf_info,
+                                            IA_CSS_FRAME_FORMAT_YUV_LINE);
 
-       IA_CSS_ENTER_PRIVATE("");
+               /* we build up the pipeline starting at the end */
+               /* Capture post-processing */
+               if (need_pp) {
+                       struct ia_css_binary_descr capture_pp_descr;
 
-       assert(pipe);
-       assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
-       if (pipe->pipe_settings.capture.pre_isp_binary.info)
-               return IA_CSS_SUCCESS;
-       pipe_out_info = &pipe->output_info[0];
-       pipe_vf_out_info = &pipe->vf_output_info[0];
+                       ia_css_pipe_get_capturepp_binarydesc(pipe,
+                                                            &capture_pp_descr, &post_out_info, pipe_out_info, &vf_info);
+                       err = ia_css_binary_find(&capture_pp_descr,
+                                                &pipe->pipe_settings.capture.capture_pp_binary);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               } else {
+                       post_out_info = *pipe_out_info;
+               }
 
-       vf_info = *pipe_vf_out_info;
-       err = ia_css_util_check_vf_out_info(pipe_out_info, &vf_info);
-       if (err != IA_CSS_SUCCESS)
-               return err;
-       need_pp = need_capture_pp(pipe);
+               /* Post-gdc */
+               {
+                       struct ia_css_binary_descr post_gdc_descr;
 
-       ia_css_frame_info_set_format(&vf_info,
-                                    IA_CSS_FRAME_FORMAT_YUV_LINE);
+                       ia_css_pipe_get_post_gdc_binarydesc(pipe,
+                                                           &post_gdc_descr, &post_in_info, &post_out_info, &vf_info);
+                       err = ia_css_binary_find(&post_gdc_descr,
+                                                &pipe->pipe_settings.capture.post_isp_binary);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               }
 
-       /* we build up the pipeline starting at the end */
-       /* Capture post-processing */
-       if (need_pp) {
-               struct ia_css_binary_descr capture_pp_descr;
-
-               ia_css_pipe_get_capturepp_binarydesc(pipe,
-                       &capture_pp_descr, &post_out_info, pipe_out_info, &vf_info);
-               err = ia_css_binary_find(&capture_pp_descr,
-                               &pipe->pipe_settings.capture.capture_pp_binary);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       } else {
-               post_out_info = *pipe_out_info;
-       }
+               /* Gdc */
+               {
+                       struct ia_css_binary_descr gdc_descr;
 
-       /* Post-gdc */
-       {
-               struct ia_css_binary_descr post_gdc_descr;
+                       ia_css_pipe_get_gdc_binarydesc(pipe, &gdc_descr, &gdc_in_info,
+                                                      &pipe->pipe_settings.capture.post_isp_binary.in_frame_info);
+                       err = ia_css_binary_find(&gdc_descr,
+                                                &pipe->pipe_settings.capture.anr_gdc_binary);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               }
+               pipe->pipe_settings.capture.anr_gdc_binary.left_padding =
+                   pipe->pipe_settings.capture.post_isp_binary.left_padding;
 
-               ia_css_pipe_get_post_gdc_binarydesc(pipe,
-                       &post_gdc_descr, &post_in_info, &post_out_info, &vf_info);
-               err = ia_css_binary_find(&post_gdc_descr,
-                                        &pipe->pipe_settings.capture.post_isp_binary);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       }
+               /* Pre-gdc */
+               {
+                       struct ia_css_binary_descr pre_gdc_descr;
 
-       /* Gdc */
-       {
-               struct ia_css_binary_descr gdc_descr;
+                       ia_css_pipe_get_pre_gdc_binarydesc(pipe, &pre_gdc_descr, &pre_in_info,
+                                                          &pipe->pipe_settings.capture.anr_gdc_binary.in_frame_info);
+                       err = ia_css_binary_find(&pre_gdc_descr,
+                                                &pipe->pipe_settings.capture.pre_isp_binary);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               }
+               pipe->pipe_settings.capture.pre_isp_binary.left_padding =
+                   pipe->pipe_settings.capture.anr_gdc_binary.left_padding;
 
-               ia_css_pipe_get_gdc_binarydesc(pipe, &gdc_descr, &gdc_in_info,
-                              &pipe->pipe_settings.capture.post_isp_binary.in_frame_info);
-               err = ia_css_binary_find(&gdc_descr,
-                                        &pipe->pipe_settings.capture.anr_gdc_binary);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       }
-       pipe->pipe_settings.capture.anr_gdc_binary.left_padding =
-               pipe->pipe_settings.capture.post_isp_binary.left_padding;
+               /* Viewfinder post-processing */
+               if (need_pp) {
+                       vf_pp_in_info =
+                           &pipe->pipe_settings.capture.capture_pp_binary.vf_frame_info;
+               } else {
+                       vf_pp_in_info =
+                           &pipe->pipe_settings.capture.post_isp_binary.vf_frame_info;
+               }
 
-       /* Pre-gdc */
-       {
-               struct ia_css_binary_descr pre_gdc_descr;
+               {
+                       struct ia_css_binary_descr vf_pp_descr;
+
+                       ia_css_pipe_get_vfpp_binarydesc(pipe,
+                                                       &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
+                       err = ia_css_binary_find(&vf_pp_descr,
+                                                &pipe->pipe_settings.capture.vf_pp_binary);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               }
 
-               ia_css_pipe_get_pre_gdc_binarydesc(pipe, &pre_gdc_descr, &pre_in_info,
-                                  &pipe->pipe_settings.capture.anr_gdc_binary.in_frame_info);
-               err = ia_css_binary_find(&pre_gdc_descr,
+               /* Copy */
+#ifdef USE_INPUT_SYSTEM_VERSION_2401
+               /* For CSI2+, only the direct sensor mode/online requires ISP copy */
+               need_isp_copy = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
+#endif
+               if (need_isp_copy)
+                       load_copy_binary(pipe,
+                                        &pipe->pipe_settings.capture.copy_binary,
                                         &pipe->pipe_settings.capture.pre_isp_binary);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       }
-       pipe->pipe_settings.capture.pre_isp_binary.left_padding =
-               pipe->pipe_settings.capture.anr_gdc_binary.left_padding;
 
-       /* Viewfinder post-processing */
-       if (need_pp) {
-               vf_pp_in_info =
-                   &pipe->pipe_settings.capture.capture_pp_binary.vf_frame_info;
-       } else {
-               vf_pp_in_info =
-                   &pipe->pipe_settings.capture.post_isp_binary.vf_frame_info;
+               return err;
        }
 
-       {
-               struct ia_css_binary_descr vf_pp_descr;
-
-               ia_css_pipe_get_vfpp_binarydesc(pipe,
-                       &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
-               err = ia_css_binary_find(&vf_pp_descr,
-                                        &pipe->pipe_settings.capture.vf_pp_binary);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       }
+       static enum ia_css_err load_bayer_isp_binaries(
+           struct ia_css_pipe *pipe) {
+               struct ia_css_frame_info pre_isp_in_info, *pipe_out_info;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               struct ia_css_binary_descr pre_de_descr;
 
-       /* Copy */
-#ifdef USE_INPUT_SYSTEM_VERSION_2401
-       /* For CSI2+, only the direct sensor mode/online requires ISP copy */
-       need_isp_copy = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
-#endif
-       if (need_isp_copy)
-               load_copy_binary(pipe,
-                              &pipe->pipe_settings.capture.copy_binary,
-                              &pipe->pipe_settings.capture.pre_isp_binary);
+               IA_CSS_ENTER_PRIVATE("");
+               assert(pipe);
+               assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+                      pipe->mode == IA_CSS_PIPE_ID_COPY);
+               pipe_out_info = &pipe->output_info[0];
 
-       return err;
-}
+               if (pipe->pipe_settings.capture.pre_isp_binary.info)
+                       return IA_CSS_SUCCESS;
 
-static enum ia_css_err load_bayer_isp_binaries(
-       struct ia_css_pipe *pipe)
-{
-       struct ia_css_frame_info pre_isp_in_info, *pipe_out_info;
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       struct ia_css_binary_descr pre_de_descr;
+               err = ia_css_frame_check_info(pipe_out_info);
+               if (err != IA_CSS_SUCCESS)
+                       return err;
 
-       IA_CSS_ENTER_PRIVATE("");
-       assert(pipe);
-       assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
-       pipe_out_info = &pipe->output_info[0];
+               ia_css_pipe_get_pre_de_binarydesc(pipe, &pre_de_descr,
+                                                 &pre_isp_in_info,
+                                                 pipe_out_info);
 
-       if (pipe->pipe_settings.capture.pre_isp_binary.info)
-               return IA_CSS_SUCCESS;
+               err = ia_css_binary_find(&pre_de_descr,
+                                        &pipe->pipe_settings.capture.pre_isp_binary);
 
-       err = ia_css_frame_check_info(pipe_out_info);
-       if (err != IA_CSS_SUCCESS)
                return err;
+       }
 
-       ia_css_pipe_get_pre_de_binarydesc(pipe, &pre_de_descr,
-                               &pre_isp_in_info,
-                               pipe_out_info);
-
-       err = ia_css_binary_find(&pre_de_descr,
-                                &pipe->pipe_settings.capture.pre_isp_binary);
-
-       return err;
-}
+       static enum ia_css_err load_low_light_binaries(
+           struct ia_css_pipe *pipe) {
+               struct ia_css_frame_info pre_in_info, anr_in_info,
+                              post_in_info, post_out_info,
+                              vf_info, *pipe_vf_out_info, *pipe_out_info,
+                              *vf_pp_in_info;
+               bool need_pp;
+               bool need_isp_copy = true;
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-static enum ia_css_err load_low_light_binaries(
-       struct ia_css_pipe *pipe)
-{
-       struct ia_css_frame_info pre_in_info, anr_in_info,
-                                post_in_info, post_out_info,
-                                vf_info, *pipe_vf_out_info, *pipe_out_info,
-                                *vf_pp_in_info;
-       bool need_pp;
-       bool need_isp_copy = true;
-       enum ia_css_err err = IA_CSS_SUCCESS;
+               IA_CSS_ENTER_PRIVATE("");
+               assert(pipe);
+               assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+                      pipe->mode == IA_CSS_PIPE_ID_COPY);
 
-       IA_CSS_ENTER_PRIVATE("");
-       assert(pipe);
-       assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
+               if (pipe->pipe_settings.capture.pre_isp_binary.info)
+                       return IA_CSS_SUCCESS;
+               pipe_vf_out_info = &pipe->vf_output_info[0];
+               pipe_out_info = &pipe->output_info[0];
 
-       if (pipe->pipe_settings.capture.pre_isp_binary.info)
-               return IA_CSS_SUCCESS;
-       pipe_vf_out_info = &pipe->vf_output_info[0];
-       pipe_out_info = &pipe->output_info[0];
+               vf_info = *pipe_vf_out_info;
+               err = ia_css_util_check_vf_out_info(pipe_out_info,
+                                                   &vf_info);
+               if (err != IA_CSS_SUCCESS)
+                       return err;
+               need_pp = need_capture_pp(pipe);
 
-       vf_info = *pipe_vf_out_info;
-       err = ia_css_util_check_vf_out_info(pipe_out_info,
-                               &vf_info);
-       if (err != IA_CSS_SUCCESS)
-               return err;
-       need_pp = need_capture_pp(pipe);
+               ia_css_frame_info_set_format(&vf_info,
+                                            IA_CSS_FRAME_FORMAT_YUV_LINE);
 
-       ia_css_frame_info_set_format(&vf_info,
-                                    IA_CSS_FRAME_FORMAT_YUV_LINE);
+               /* we build up the pipeline starting at the end */
+               /* Capture post-processing */
+               if (need_pp) {
+                       struct ia_css_binary_descr capture_pp_descr;
 
-       /* we build up the pipeline starting at the end */
-       /* Capture post-processing */
-       if (need_pp) {
-               struct ia_css_binary_descr capture_pp_descr;
-
-               ia_css_pipe_get_capturepp_binarydesc(pipe,
-                       &capture_pp_descr, &post_out_info, pipe_out_info, &vf_info);
-               err = ia_css_binary_find(&capture_pp_descr,
-                               &pipe->pipe_settings.capture.capture_pp_binary);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       } else {
-               post_out_info = *pipe_out_info;
-       }
+                       ia_css_pipe_get_capturepp_binarydesc(pipe,
+                                                            &capture_pp_descr, &post_out_info, pipe_out_info, &vf_info);
+                       err = ia_css_binary_find(&capture_pp_descr,
+                                                &pipe->pipe_settings.capture.capture_pp_binary);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               } else {
+                       post_out_info = *pipe_out_info;
+               }
 
-       /* Post-anr */
-       {
-               struct ia_css_binary_descr post_anr_descr;
+               /* Post-anr */
+               {
+                       struct ia_css_binary_descr post_anr_descr;
 
-               ia_css_pipe_get_post_anr_binarydesc(pipe,
-                       &post_anr_descr, &post_in_info, &post_out_info, &vf_info);
-               err = ia_css_binary_find(&post_anr_descr,
-                                        &pipe->pipe_settings.capture.post_isp_binary);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       }
+                       ia_css_pipe_get_post_anr_binarydesc(pipe,
+                                                           &post_anr_descr, &post_in_info, &post_out_info, &vf_info);
+                       err = ia_css_binary_find(&post_anr_descr,
+                                                &pipe->pipe_settings.capture.post_isp_binary);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               }
 
-       /* Anr */
-       {
-               struct ia_css_binary_descr anr_descr;
+               /* Anr */
+               {
+                       struct ia_css_binary_descr anr_descr;
 
-               ia_css_pipe_get_anr_binarydesc(pipe, &anr_descr, &anr_in_info,
-                               &pipe->pipe_settings.capture.post_isp_binary.in_frame_info);
-               err = ia_css_binary_find(&anr_descr,
-                                        &pipe->pipe_settings.capture.anr_gdc_binary);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       }
-       pipe->pipe_settings.capture.anr_gdc_binary.left_padding =
-               pipe->pipe_settings.capture.post_isp_binary.left_padding;
+                       ia_css_pipe_get_anr_binarydesc(pipe, &anr_descr, &anr_in_info,
+                                                      &pipe->pipe_settings.capture.post_isp_binary.in_frame_info);
+                       err = ia_css_binary_find(&anr_descr,
+                                                &pipe->pipe_settings.capture.anr_gdc_binary);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               }
+               pipe->pipe_settings.capture.anr_gdc_binary.left_padding =
+                   pipe->pipe_settings.capture.post_isp_binary.left_padding;
 
-       /* Pre-anr */
-       {
-               struct ia_css_binary_descr pre_anr_descr;
+               /* Pre-anr */
+               {
+                       struct ia_css_binary_descr pre_anr_descr;
 
-               ia_css_pipe_get_pre_anr_binarydesc(pipe, &pre_anr_descr, &pre_in_info,
-                                  &pipe->pipe_settings.capture.anr_gdc_binary.in_frame_info);
-               err = ia_css_binary_find(&pre_anr_descr,
-                               &pipe->pipe_settings.capture.pre_isp_binary);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       }
-       pipe->pipe_settings.capture.pre_isp_binary.left_padding =
-               pipe->pipe_settings.capture.anr_gdc_binary.left_padding;
+                       ia_css_pipe_get_pre_anr_binarydesc(pipe, &pre_anr_descr, &pre_in_info,
+                                                          &pipe->pipe_settings.capture.anr_gdc_binary.in_frame_info);
+                       err = ia_css_binary_find(&pre_anr_descr,
+                                                &pipe->pipe_settings.capture.pre_isp_binary);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               }
+               pipe->pipe_settings.capture.pre_isp_binary.left_padding =
+                   pipe->pipe_settings.capture.anr_gdc_binary.left_padding;
 
-       /* Viewfinder post-processing */
-       if (need_pp) {
-               vf_pp_in_info =
-                   &pipe->pipe_settings.capture.capture_pp_binary.vf_frame_info;
-       } else {
-               vf_pp_in_info =
-                   &pipe->pipe_settings.capture.post_isp_binary.vf_frame_info;
-       }
+               /* Viewfinder post-processing */
+               if (need_pp) {
+                       vf_pp_in_info =
+                           &pipe->pipe_settings.capture.capture_pp_binary.vf_frame_info;
+               } else {
+                       vf_pp_in_info =
+                           &pipe->pipe_settings.capture.post_isp_binary.vf_frame_info;
+               }
 
-       {
-               struct ia_css_binary_descr vf_pp_descr;
+               {
+                       struct ia_css_binary_descr vf_pp_descr;
 
-               ia_css_pipe_get_vfpp_binarydesc(pipe,
-                       &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
-               err = ia_css_binary_find(&vf_pp_descr,
-                                        &pipe->pipe_settings.capture.vf_pp_binary);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       }
+                       ia_css_pipe_get_vfpp_binarydesc(pipe,
+                                                       &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
+                       err = ia_css_binary_find(&vf_pp_descr,
+                                                &pipe->pipe_settings.capture.vf_pp_binary);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               }
 
-       /* Copy */
+               /* Copy */
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       /* For CSI2+, only the direct sensor mode/online requires ISP copy */
-       need_isp_copy = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
+               /* For CSI2+, only the direct sensor mode/online requires ISP copy */
+               need_isp_copy = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
 #endif
-       if (need_isp_copy)
-               err = load_copy_binary(pipe,
-                              &pipe->pipe_settings.capture.copy_binary,
-                              &pipe->pipe_settings.capture.pre_isp_binary);
+               if (need_isp_copy)
+                       err = load_copy_binary(pipe,
+                                              &pipe->pipe_settings.capture.copy_binary,
+                                              &pipe->pipe_settings.capture.pre_isp_binary);
 
-       return err;
-}
+               return err;
+       }
 
-static bool copy_on_sp(struct ia_css_pipe *pipe)
-{
-       bool rval;
+       static bool copy_on_sp(struct ia_css_pipe *pipe) {
+               bool rval;
 
-       assert(pipe);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "copy_on_sp() enter:\n");
+               assert(pipe);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "copy_on_sp() enter:\n");
 
-       rval = true;
+               rval = true;
 
-       rval &= (pipe->mode == IA_CSS_PIPE_ID_CAPTURE);
+               rval &= (pipe->mode == IA_CSS_PIPE_ID_CAPTURE);
 
-       rval &= (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW);
+               rval &= (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW);
 
-       rval &= ((pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) ||
-               (pipe->config.mode == IA_CSS_PIPE_MODE_COPY));
+               rval &= ((pipe->stream->config.input_config.format ==
+                         ATOMISP_INPUT_FORMAT_BINARY_8) ||
+                        (pipe->config.mode == IA_CSS_PIPE_MODE_COPY));
 
-       return rval;
-}
+               return rval;
+       }
 
-static enum ia_css_err load_capture_binaries(
-       struct ia_css_pipe *pipe)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       bool must_be_raw;
+       static enum ia_css_err load_capture_binaries(
+           struct ia_css_pipe *pipe) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               bool must_be_raw;
 
-       IA_CSS_ENTER_PRIVATE("");
-       assert(pipe);
-       assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
+               IA_CSS_ENTER_PRIVATE("");
+               assert(pipe);
+               assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+                      pipe->mode == IA_CSS_PIPE_ID_COPY);
 
-       if (pipe->pipe_settings.capture.primary_binary[0].info) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
-               return IA_CSS_SUCCESS;
-       }
+               if (pipe->pipe_settings.capture.primary_binary[0].info) {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+                       return IA_CSS_SUCCESS;
+               }
 
-       /* in primary, advanced,low light or bayer,
-                                               the input format must be raw */
-       must_be_raw =
-               pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
-               pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER ||
-               pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT;
-       err = ia_css_util_check_input(&pipe->stream->config, must_be_raw, false);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
-       if (copy_on_sp(pipe) &&
-           pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
-               ia_css_frame_info_init(
-                       &pipe->output_info[0],
-                       JPEG_BYTES,
-                       1,
-                       IA_CSS_FRAME_FORMAT_BINARY_8,
-                       0);
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
-               return IA_CSS_SUCCESS;
-       }
+               /* in primary, advanced,low light or bayer,
+                                                       the input format must be raw */
+               must_be_raw =
+                   pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
+                   pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER ||
+                   pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT;
+               err = ia_css_util_check_input(&pipe->stream->config, must_be_raw, false);
+               if (err != IA_CSS_SUCCESS) {
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
+               if (copy_on_sp(pipe) &&
+                   pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
+                       ia_css_frame_info_init(
+                           &pipe->output_info[0],
+                           JPEG_BYTES,
+                           1,
+                           IA_CSS_FRAME_FORMAT_BINARY_8,
+                           0);
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+                       return IA_CSS_SUCCESS;
+               }
 
-       switch (pipe->config.default_capture_config.mode) {
-       case IA_CSS_CAPTURE_MODE_RAW:
-               err = load_copy_binaries(pipe);
+               switch (pipe->config.default_capture_config.mode) {
+               case IA_CSS_CAPTURE_MODE_RAW:
+                       err = load_copy_binaries(pipe);
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2401)
-       if (err == IA_CSS_SUCCESS)
-                 pipe->pipe_settings.capture.copy_binary.online = pipe->stream->config.online;
+                       if (err == IA_CSS_SUCCESS)
+                               pipe->pipe_settings.capture.copy_binary.online = pipe->stream->config.online;
 #endif
-               break;
-       case IA_CSS_CAPTURE_MODE_BAYER:
-               err = load_bayer_isp_binaries(pipe);
-               break;
-       case IA_CSS_CAPTURE_MODE_PRIMARY:
-               err = load_primary_binaries(pipe);
-               break;
-       case IA_CSS_CAPTURE_MODE_ADVANCED:
-               err = load_advanced_binaries(pipe);
-               break;
-       case IA_CSS_CAPTURE_MODE_LOW_LIGHT:
-               err = load_low_light_binaries(pipe);
-               break;
-       }
-       if (err != IA_CSS_SUCCESS) {
+                       break;
+               case IA_CSS_CAPTURE_MODE_BAYER:
+                       err = load_bayer_isp_binaries(pipe);
+                       break;
+               case IA_CSS_CAPTURE_MODE_PRIMARY:
+                       err = load_primary_binaries(pipe);
+                       break;
+               case IA_CSS_CAPTURE_MODE_ADVANCED:
+                       err = load_advanced_binaries(pipe);
+                       break;
+               case IA_CSS_CAPTURE_MODE_LOW_LIGHT:
+                       err = load_low_light_binaries(pipe);
+                       break;
+               }
+               if (err != IA_CSS_SUCCESS) {
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
+
                IA_CSS_LEAVE_ERR_PRIVATE(err);
                return err;
        }
 
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
-       return err;
-}
+       static enum ia_css_err
+       unload_capture_binaries(struct ia_css_pipe *pipe) {
+               unsigned int i;
 
-static enum ia_css_err
-unload_capture_binaries(struct ia_css_pipe *pipe)
-{
-       unsigned int i;
+               IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
 
-       IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+               if ((!pipe) || ((pipe->mode != IA_CSS_PIPE_ID_CAPTURE) && (pipe->mode != IA_CSS_PIPE_ID_COPY)))
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
+               ia_css_binary_unload(&pipe->pipe_settings.capture.copy_binary);
+               for (i = 0; i < MAX_NUM_PRIMARY_STAGES; i++)
+                       ia_css_binary_unload(&pipe->pipe_settings.capture.primary_binary[i]);
+               ia_css_binary_unload(&pipe->pipe_settings.capture.pre_isp_binary);
+               ia_css_binary_unload(&pipe->pipe_settings.capture.anr_gdc_binary);
+               ia_css_binary_unload(&pipe->pipe_settings.capture.post_isp_binary);
+               ia_css_binary_unload(&pipe->pipe_settings.capture.capture_pp_binary);
+               ia_css_binary_unload(&pipe->pipe_settings.capture.capture_ldc_binary);
+               ia_css_binary_unload(&pipe->pipe_settings.capture.vf_pp_binary);
 
-       if ((!pipe) || ((pipe->mode != IA_CSS_PIPE_ID_CAPTURE) && (pipe->mode != IA_CSS_PIPE_ID_COPY))) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+               for (i = 0; i < pipe->pipe_settings.capture.num_yuv_scaler; i++)
+                       ia_css_binary_unload(&pipe->pipe_settings.capture.yuv_scaler_binary[i]);
+
+               kfree(pipe->pipe_settings.capture.is_output_stage);
+               pipe->pipe_settings.capture.is_output_stage = NULL;
+               kfree(pipe->pipe_settings.capture.yuv_scaler_binary);
+               pipe->pipe_settings.capture.yuv_scaler_binary = NULL;
+
+               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+               return IA_CSS_SUCCESS;
        }
-       ia_css_binary_unload(&pipe->pipe_settings.capture.copy_binary);
-       for (i = 0; i < MAX_NUM_PRIMARY_STAGES; i++)
-               ia_css_binary_unload(&pipe->pipe_settings.capture.primary_binary[i]);
-       ia_css_binary_unload(&pipe->pipe_settings.capture.pre_isp_binary);
-       ia_css_binary_unload(&pipe->pipe_settings.capture.anr_gdc_binary);
-       ia_css_binary_unload(&pipe->pipe_settings.capture.post_isp_binary);
-       ia_css_binary_unload(&pipe->pipe_settings.capture.capture_pp_binary);
-       ia_css_binary_unload(&pipe->pipe_settings.capture.capture_ldc_binary);
-       ia_css_binary_unload(&pipe->pipe_settings.capture.vf_pp_binary);
 
-       for (i = 0; i < pipe->pipe_settings.capture.num_yuv_scaler; i++)
-               ia_css_binary_unload(&pipe->pipe_settings.capture.yuv_scaler_binary[i]);
+       static bool
+       need_downscaling(const struct ia_css_resolution in_res,
+                        const struct ia_css_resolution out_res) {
+               if (in_res.width > out_res.width || in_res.height > out_res.height)
+                       return true;
 
-       kfree(pipe->pipe_settings.capture.is_output_stage);
-       pipe->pipe_settings.capture.is_output_stage = NULL;
-       kfree(pipe->pipe_settings.capture.yuv_scaler_binary);
-       pipe->pipe_settings.capture.yuv_scaler_binary = NULL;
+               return false;
+       }
 
-       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
-       return IA_CSS_SUCCESS;
-}
+       static bool
+       need_yuv_scaler_stage(const struct ia_css_pipe *pipe) {
+               unsigned int i;
+               struct ia_css_resolution in_res, out_res;
 
-static bool
-need_downscaling(const struct ia_css_resolution in_res,
-               const struct ia_css_resolution out_res)
-{
-       if (in_res.width > out_res.width || in_res.height > out_res.height)
-               return true;
+               bool need_format_conversion = false;
 
-       return false;
-}
+               IA_CSS_ENTER_PRIVATE("");
+               assert(pipe);
+               assert(pipe->mode == IA_CSS_PIPE_ID_YUVPP);
 
-static bool
-need_yuv_scaler_stage(const struct ia_css_pipe *pipe)
-{
-       unsigned int i;
-       struct ia_css_resolution in_res, out_res;
+               /* TODO: make generic function */
+               need_format_conversion =
+                   ((pipe->stream->config.input_config.format ==
+                     ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) &&
+                    (pipe->output_info[0].format != IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8));
 
-       bool need_format_conversion = false;
+               in_res = pipe->config.input_effective_res;
 
-       IA_CSS_ENTER_PRIVATE("");
-       assert(pipe);
-       assert(pipe->mode == IA_CSS_PIPE_ID_YUVPP);
-
-       /* TODO: make generic function */
-       need_format_conversion =
-               ((pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) &&
-               (pipe->output_info[0].format != IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8));
-
-       in_res = pipe->config.input_effective_res;
+               if (pipe->config.enable_dz)
+                       return true;
 
-       if (pipe->config.enable_dz)
-               return true;
+               if ((pipe->output_info[0].res.width != 0) && need_format_conversion)
+                       return true;
 
-       if ((pipe->output_info[0].res.width != 0) && need_format_conversion)
-               return true;
+               for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
+                       out_res = pipe->output_info[i].res;
 
-       for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
-               out_res = pipe->output_info[i].res;
+                       /* A non-zero width means it is a valid output port */
+                       if ((out_res.width != 0) && need_downscaling(in_res, out_res))
+                               return true;
+               }
 
-               /* A non-zero width means it is a valid output port */
-               if ((out_res.width != 0) && need_downscaling(in_res, out_res))
-                       return true;
+               return false;
        }
 
-       return false;
-}
-
-/* TODO: it is temporarily created from ia_css_pipe_create_cas_scaler_desc */
-/* which has some hard-coded knowledge which prevents reuse of the function. */
-/* Later, merge this with ia_css_pipe_create_cas_scaler_desc */
-static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output(
-       struct ia_css_frame_info *cas_scaler_in_info,
-       struct ia_css_frame_info *cas_scaler_out_info,
-       struct ia_css_frame_info *cas_scaler_vf_info,
-       struct ia_css_cas_binary_descr *descr)
-{
-       unsigned int i;
-       unsigned int hor_ds_factor = 0, ver_ds_factor = 0;
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       struct ia_css_frame_info tmp_in_info;
+       /* TODO: it is temporarily created from ia_css_pipe_create_cas_scaler_desc */
+       /* which has some hard-coded knowledge which prevents reuse of the function. */
+       /* Later, merge this with ia_css_pipe_create_cas_scaler_desc */
+       static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output(
+           struct ia_css_frame_info *cas_scaler_in_info,
+           struct ia_css_frame_info *cas_scaler_out_info,
+           struct ia_css_frame_info *cas_scaler_vf_info,
+           struct ia_css_cas_binary_descr *descr) {
+               unsigned int i;
+               unsigned int hor_ds_factor = 0, ver_ds_factor = 0;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               struct ia_css_frame_info tmp_in_info;
 
-       unsigned int max_scale_factor_per_stage = MAX_PREFERRED_YUV_DS_PER_STEP;
+               unsigned int max_scale_factor_per_stage = MAX_PREFERRED_YUV_DS_PER_STEP;
 
-       assert(cas_scaler_in_info);
-       assert(cas_scaler_out_info);
+               assert(cas_scaler_in_info);
+               assert(cas_scaler_out_info);
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_create_cas_scaler_desc() enter:\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_pipe_create_cas_scaler_desc() enter:\n");
 
-       /* We assume that this function is used only for single output port case. */
-       descr->num_output_stage = 1;
+               /* We assume that this function is used only for single output port case. */
+               descr->num_output_stage = 1;
 
-       hor_ds_factor = CEIL_DIV(cas_scaler_in_info->res.width, cas_scaler_out_info->res.width);
-       ver_ds_factor = CEIL_DIV(cas_scaler_in_info->res.height, cas_scaler_out_info->res.height);
-       /* use the same horizontal and vertical downscaling factor for simplicity */
-       assert(hor_ds_factor == ver_ds_factor);
+               hor_ds_factor = CEIL_DIV(cas_scaler_in_info->res.width,
+                                        cas_scaler_out_info->res.width);
+               ver_ds_factor = CEIL_DIV(cas_scaler_in_info->res.height,
+                                        cas_scaler_out_info->res.height);
+               /* use the same horizontal and vertical downscaling factor for simplicity */
+               assert(hor_ds_factor == ver_ds_factor);
 
-       i = 1;
-       while (i < hor_ds_factor) {
-               descr->num_stage++;
-               i *= max_scale_factor_per_stage;
-       }
+               i = 1;
+               while (i < hor_ds_factor) {
+                       descr->num_stage++;
+                       i *= max_scale_factor_per_stage;
+               }
 
-       descr->in_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
-       if (!descr->in_info) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
-       descr->internal_out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
-       if (!descr->internal_out_info) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
-       descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
-       if (!descr->out_info) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
-       descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
-       if (!descr->vf_info) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
-       descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL);
-       if (!descr->is_output_stage) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
+               descr->in_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info),
+                                        GFP_KERNEL);
+               if (!descr->in_info) {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
+               }
+               descr->internal_out_info = kmalloc(descr->num_stage * sizeof(
+                                                      struct ia_css_frame_info), GFP_KERNEL);
+               if (!descr->internal_out_info) {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
+               }
+               descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info),
+                                         GFP_KERNEL);
+               if (!descr->out_info) {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
+               }
+               descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info),
+                                        GFP_KERNEL);
+               if (!descr->vf_info) {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
+               }
+               descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL);
+               if (!descr->is_output_stage) {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
+               }
 
-       tmp_in_info = *cas_scaler_in_info;
-       for (i = 0; i < descr->num_stage; i++) {
-               descr->in_info[i] = tmp_in_info;
-               if ((tmp_in_info.res.width / max_scale_factor_per_stage) <= cas_scaler_out_info->res.width) {
-                       descr->is_output_stage[i] = true;
-                       if ((descr->num_output_stage > 1) && (i != (descr->num_stage - 1))) {
-                               descr->internal_out_info[i].res.width = cas_scaler_out_info->res.width;
-                               descr->internal_out_info[i].res.height = cas_scaler_out_info->res.height;
-                               descr->internal_out_info[i].padded_width = cas_scaler_out_info->padded_width;
-                               descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
-                       } else {
-                               assert(i == (descr->num_stage - 1));
-                               descr->internal_out_info[i].res.width = 0;
-                               descr->internal_out_info[i].res.height = 0;
-                       }
-                       descr->out_info[i].res.width = cas_scaler_out_info->res.width;
-                       descr->out_info[i].res.height = cas_scaler_out_info->res.height;
-                       descr->out_info[i].padded_width = cas_scaler_out_info->padded_width;
-                       descr->out_info[i].format = cas_scaler_out_info->format;
-                       if (cas_scaler_vf_info) {
-                               descr->vf_info[i].res.width = cas_scaler_vf_info->res.width;
-                               descr->vf_info[i].res.height = cas_scaler_vf_info->res.height;
-                               descr->vf_info[i].padded_width = cas_scaler_vf_info->padded_width;
-                               ia_css_frame_info_set_format(&descr->vf_info[i], IA_CSS_FRAME_FORMAT_YUV_LINE);
+               tmp_in_info = *cas_scaler_in_info;
+               for (i = 0; i < descr->num_stage; i++) {
+                       descr->in_info[i] = tmp_in_info;
+                       if ((tmp_in_info.res.width / max_scale_factor_per_stage) <=
+                           cas_scaler_out_info->res.width) {
+                               descr->is_output_stage[i] = true;
+                               if ((descr->num_output_stage > 1) && (i != (descr->num_stage - 1))) {
+                                       descr->internal_out_info[i].res.width = cas_scaler_out_info->res.width;
+                                       descr->internal_out_info[i].res.height = cas_scaler_out_info->res.height;
+                                       descr->internal_out_info[i].padded_width = cas_scaler_out_info->padded_width;
+                                       descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
+                               } else {
+                                       assert(i == (descr->num_stage - 1));
+                                       descr->internal_out_info[i].res.width = 0;
+                                       descr->internal_out_info[i].res.height = 0;
+                               }
+                               descr->out_info[i].res.width = cas_scaler_out_info->res.width;
+                               descr->out_info[i].res.height = cas_scaler_out_info->res.height;
+                               descr->out_info[i].padded_width = cas_scaler_out_info->padded_width;
+                               descr->out_info[i].format = cas_scaler_out_info->format;
+                               if (cas_scaler_vf_info) {
+                                       descr->vf_info[i].res.width = cas_scaler_vf_info->res.width;
+                                       descr->vf_info[i].res.height = cas_scaler_vf_info->res.height;
+                                       descr->vf_info[i].padded_width = cas_scaler_vf_info->padded_width;
+                                       ia_css_frame_info_set_format(&descr->vf_info[i], IA_CSS_FRAME_FORMAT_YUV_LINE);
+                               } else {
+                                       descr->vf_info[i].res.width = 0;
+                                       descr->vf_info[i].res.height = 0;
+                                       descr->vf_info[i].padded_width = 0;
+                               }
                        } else {
+                               descr->is_output_stage[i] = false;
+                               descr->internal_out_info[i].res.width = tmp_in_info.res.width /
+                                                                       max_scale_factor_per_stage;
+                               descr->internal_out_info[i].res.height = tmp_in_info.res.height /
+                                       max_scale_factor_per_stage;
+                               descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
+                               ia_css_frame_info_init(&descr->internal_out_info[i],
+                                                      tmp_in_info.res.width / max_scale_factor_per_stage,
+                                                      tmp_in_info.res.height / max_scale_factor_per_stage,
+                                                      IA_CSS_FRAME_FORMAT_YUV420, 0);
+                               descr->out_info[i].res.width = 0;
+                               descr->out_info[i].res.height = 0;
                                descr->vf_info[i].res.width = 0;
                                descr->vf_info[i].res.height = 0;
-                               descr->vf_info[i].padded_width = 0;
                        }
-               } else {
-                       descr->is_output_stage[i] = false;
-                       descr->internal_out_info[i].res.width = tmp_in_info.res.width / max_scale_factor_per_stage;
-                       descr->internal_out_info[i].res.height = tmp_in_info.res.height / max_scale_factor_per_stage;
-                       descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
-                       ia_css_frame_info_init(&descr->internal_out_info[i],
-                                       tmp_in_info.res.width / max_scale_factor_per_stage,
-                                       tmp_in_info.res.height / max_scale_factor_per_stage,
-                                       IA_CSS_FRAME_FORMAT_YUV420, 0);
-                       descr->out_info[i].res.width = 0;
-                       descr->out_info[i].res.height = 0;
-                       descr->vf_info[i].res.width = 0;
-                       descr->vf_info[i].res.height = 0;
-               }
-               tmp_in_info = descr->internal_out_info[i];
-       }
+                       tmp_in_info = descr->internal_out_info[i];
+               }
 ERR:
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_create_cas_scaler_desc() leave, err=%d\n",
-                       err);
-       return err;
-}
-
-/* FIXME: merge most of this and single output version */
-static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pipe,
-       struct ia_css_cas_binary_descr *descr)
-{
-       struct ia_css_frame_info in_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
-       struct ia_css_frame_info *out_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
-       struct ia_css_frame_info *vf_out_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
-       struct ia_css_frame_info tmp_in_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
-       unsigned int i, j;
-       unsigned int hor_scale_factor[IA_CSS_PIPE_MAX_OUTPUT_STAGE],
-                               ver_scale_factor[IA_CSS_PIPE_MAX_OUTPUT_STAGE],
-                               scale_factor = 0;
-       unsigned int num_stages = 0;
-       enum ia_css_err err = IA_CSS_SUCCESS;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_pipe_create_cas_scaler_desc() leave, err=%d\n",
+                                   err);
+               return err;
+       }
 
-       unsigned int max_scale_factor_per_stage = MAX_PREFERRED_YUV_DS_PER_STEP;
+       /* FIXME: merge most of this and single output version */
+       static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(
+           struct ia_css_pipe *pipe,
+           struct ia_css_cas_binary_descr *descr) {
+               struct ia_css_frame_info in_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
+               struct ia_css_frame_info *out_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
+               struct ia_css_frame_info *vf_out_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
+               struct ia_css_frame_info tmp_in_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
+               unsigned int i, j;
+               unsigned int hor_scale_factor[IA_CSS_PIPE_MAX_OUTPUT_STAGE],
+                        ver_scale_factor[IA_CSS_PIPE_MAX_OUTPUT_STAGE],
+                        scale_factor = 0;
+               unsigned int num_stages = 0;
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_create_cas_scaler_desc() enter:\n");
+               unsigned int max_scale_factor_per_stage = MAX_PREFERRED_YUV_DS_PER_STEP;
 
-       for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
-               out_info[i] = NULL;
-               vf_out_info[i] = NULL;
-               hor_scale_factor[i] = 0;
-               ver_scale_factor[i] = 0;
-       }
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_pipe_create_cas_scaler_desc() enter:\n");
 
-       in_info.res = pipe->config.input_effective_res;
-       in_info.padded_width = in_info.res.width;
-       descr->num_output_stage = 0;
-       /* Find out how much scaling we need for each output */
-       for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
-               if (pipe->output_info[i].res.width != 0) {
-                       out_info[i] = &pipe->output_info[i];
-                       if (pipe->vf_output_info[i].res.width != 0)
-                               vf_out_info[i] = &pipe->vf_output_info[i];
-                       descr->num_output_stage += 1;
+               for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
+                       out_info[i] = NULL;
+                       vf_out_info[i] = NULL;
+                       hor_scale_factor[i] = 0;
+                       ver_scale_factor[i] = 0;
                }
 
-               if (out_info[i]) {
-                       hor_scale_factor[i] = CEIL_DIV(in_info.res.width, out_info[i]->res.width);
-                       ver_scale_factor[i] = CEIL_DIV(in_info.res.height, out_info[i]->res.height);
-                       /* use the same horizontal and vertical scaling factor for simplicity */
-                       assert(hor_scale_factor[i] == ver_scale_factor[i]);
-                       scale_factor = 1;
-                       do {
-                               num_stages++;
-                               scale_factor *= max_scale_factor_per_stage;
-                       } while (scale_factor < hor_scale_factor[i]);
+               in_info.res = pipe->config.input_effective_res;
+               in_info.padded_width = in_info.res.width;
+               descr->num_output_stage = 0;
+               /* Find out how much scaling we need for each output */
+               for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
+                       if (pipe->output_info[i].res.width != 0) {
+                               out_info[i] = &pipe->output_info[i];
+                               if (pipe->vf_output_info[i].res.width != 0)
+                                       vf_out_info[i] = &pipe->vf_output_info[i];
+                               descr->num_output_stage += 1;
+                       }
 
-                       in_info.res = out_info[i]->res;
+                       if (out_info[i]) {
+                               hor_scale_factor[i] = CEIL_DIV(in_info.res.width, out_info[i]->res.width);
+                               ver_scale_factor[i] = CEIL_DIV(in_info.res.height, out_info[i]->res.height);
+                               /* use the same horizontal and vertical scaling factor for simplicity */
+                               assert(hor_scale_factor[i] == ver_scale_factor[i]);
+                               scale_factor = 1;
+                               do {
+                                       num_stages++;
+                                       scale_factor *= max_scale_factor_per_stage;
+                               } while (scale_factor < hor_scale_factor[i]);
+
+                               in_info.res = out_info[i]->res;
+                       }
                }
-       }
 
-       if (need_yuv_scaler_stage(pipe) && (num_stages == 0))
-               num_stages = 1;
+               if (need_yuv_scaler_stage(pipe) && (num_stages == 0))
+                       num_stages = 1;
 
-       descr->num_stage = num_stages;
+               descr->num_stage = num_stages;
 
-       descr->in_info = kmalloc_array(descr->num_stage, sizeof(struct ia_css_frame_info), GFP_KERNEL);
-       if (!descr->in_info) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
-       descr->internal_out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
-       if (!descr->internal_out_info) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
-       descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
-       if (!descr->out_info) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
-       descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
-       if (!descr->vf_info) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
-       descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL);
-       if (!descr->is_output_stage) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
+               descr->in_info = kmalloc_array(descr->num_stage,
+                                              sizeof(struct ia_css_frame_info), GFP_KERNEL);
+               if (!descr->in_info) {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
+               }
+               descr->internal_out_info = kmalloc(descr->num_stage * sizeof(
+                                                      struct ia_css_frame_info), GFP_KERNEL);
+               if (!descr->internal_out_info) {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
+               }
+               descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info),
+                                         GFP_KERNEL);
+               if (!descr->out_info) {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
+               }
+               descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info),
+                                        GFP_KERNEL);
+               if (!descr->vf_info) {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
+               }
+               descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL);
+               if (!descr->is_output_stage) {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
+               }
 
-       for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
-               if (out_info[i]) {
-                       if (i > 0) {
-                               assert((out_info[i - 1]->res.width >= out_info[i]->res.width) &&
-                                               (out_info[i - 1]->res.height >= out_info[i]->res.height));
+               for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
+                       if (out_info[i]) {
+                               if (i > 0) {
+                                       assert((out_info[i - 1]->res.width >= out_info[i]->res.width) &&
+                                              (out_info[i - 1]->res.height >= out_info[i]->res.height));
+                               }
                        }
                }
-       }
-
-       tmp_in_info.res = pipe->config.input_effective_res;
-       tmp_in_info.format = IA_CSS_FRAME_FORMAT_YUV420;
-       for (i = 0, j = 0; i < descr->num_stage; i++) {
-               assert(j < 2);
-               assert(out_info[j]);
 
-               descr->in_info[i] = tmp_in_info;
-               if ((tmp_in_info.res.width / max_scale_factor_per_stage) <= out_info[j]->res.width) {
-                       descr->is_output_stage[i] = true;
-                       if ((descr->num_output_stage > 1) && (i != (descr->num_stage - 1))) {
-                               descr->internal_out_info[i].res.width = out_info[j]->res.width;
-                               descr->internal_out_info[i].res.height = out_info[j]->res.height;
-                               descr->internal_out_info[i].padded_width = out_info[j]->padded_width;
-                               descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
-                       } else {
-                               assert(i == (descr->num_stage - 1));
-                               descr->internal_out_info[i].res.width = 0;
-                               descr->internal_out_info[i].res.height = 0;
-                       }
-                       descr->out_info[i].res.width = out_info[j]->res.width;
-                       descr->out_info[i].res.height = out_info[j]->res.height;
-                       descr->out_info[i].padded_width = out_info[j]->padded_width;
-                       descr->out_info[i].format = out_info[j]->format;
-                       if (vf_out_info[j]) {
-                               descr->vf_info[i].res.width = vf_out_info[j]->res.width;
-                               descr->vf_info[i].res.height = vf_out_info[j]->res.height;
-                               descr->vf_info[i].padded_width = vf_out_info[j]->padded_width;
-                               ia_css_frame_info_set_format(&descr->vf_info[i], IA_CSS_FRAME_FORMAT_YUV_LINE);
+               tmp_in_info.res = pipe->config.input_effective_res;
+               tmp_in_info.format = IA_CSS_FRAME_FORMAT_YUV420;
+               for (i = 0, j = 0; i < descr->num_stage; i++) {
+                       assert(j < 2);
+                       assert(out_info[j]);
+
+                       descr->in_info[i] = tmp_in_info;
+                       if ((tmp_in_info.res.width / max_scale_factor_per_stage) <=
+                           out_info[j]->res.width) {
+                               descr->is_output_stage[i] = true;
+                               if ((descr->num_output_stage > 1) && (i != (descr->num_stage - 1))) {
+                                       descr->internal_out_info[i].res.width = out_info[j]->res.width;
+                                       descr->internal_out_info[i].res.height = out_info[j]->res.height;
+                                       descr->internal_out_info[i].padded_width = out_info[j]->padded_width;
+                                       descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
+                               } else {
+                                       assert(i == (descr->num_stage - 1));
+                                       descr->internal_out_info[i].res.width = 0;
+                                       descr->internal_out_info[i].res.height = 0;
+                               }
+                               descr->out_info[i].res.width = out_info[j]->res.width;
+                               descr->out_info[i].res.height = out_info[j]->res.height;
+                               descr->out_info[i].padded_width = out_info[j]->padded_width;
+                               descr->out_info[i].format = out_info[j]->format;
+                               if (vf_out_info[j]) {
+                                       descr->vf_info[i].res.width = vf_out_info[j]->res.width;
+                                       descr->vf_info[i].res.height = vf_out_info[j]->res.height;
+                                       descr->vf_info[i].padded_width = vf_out_info[j]->padded_width;
+                                       ia_css_frame_info_set_format(&descr->vf_info[i], IA_CSS_FRAME_FORMAT_YUV_LINE);
+                               } else {
+                                       descr->vf_info[i].res.width = 0;
+                                       descr->vf_info[i].res.height = 0;
+                                       descr->vf_info[i].padded_width = 0;
+                               }
+                               j++;
                        } else {
+                               descr->is_output_stage[i] = false;
+                               descr->internal_out_info[i].res.width = tmp_in_info.res.width /
+                                                                       max_scale_factor_per_stage;
+                               descr->internal_out_info[i].res.height = tmp_in_info.res.height /
+                                       max_scale_factor_per_stage;
+                               descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
+                               ia_css_frame_info_init(&descr->internal_out_info[i],
+                                                      tmp_in_info.res.width / max_scale_factor_per_stage,
+                                                      tmp_in_info.res.height / max_scale_factor_per_stage,
+                                                      IA_CSS_FRAME_FORMAT_YUV420, 0);
+                               descr->out_info[i].res.width = 0;
+                               descr->out_info[i].res.height = 0;
                                descr->vf_info[i].res.width = 0;
                                descr->vf_info[i].res.height = 0;
-                               descr->vf_info[i].padded_width = 0;
                        }
-                       j++;
-               } else {
-                       descr->is_output_stage[i] = false;
-                       descr->internal_out_info[i].res.width = tmp_in_info.res.width / max_scale_factor_per_stage;
-                       descr->internal_out_info[i].res.height = tmp_in_info.res.height / max_scale_factor_per_stage;
-                       descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
-                       ia_css_frame_info_init(&descr->internal_out_info[i],
-                                       tmp_in_info.res.width / max_scale_factor_per_stage,
-                                       tmp_in_info.res.height / max_scale_factor_per_stage,
-                                       IA_CSS_FRAME_FORMAT_YUV420, 0);
-                       descr->out_info[i].res.width = 0;
-                       descr->out_info[i].res.height = 0;
-                       descr->vf_info[i].res.width = 0;
-                       descr->vf_info[i].res.height = 0;
-               }
-               tmp_in_info = descr->internal_out_info[i];
-       }
+                       tmp_in_info = descr->internal_out_info[i];
+               }
 ERR:
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_create_cas_scaler_desc() leave, err=%d\n",
-                       err);
-       return err;
-}
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_pipe_create_cas_scaler_desc() leave, err=%d\n",
+                                   err);
+               return err;
+       }
 
-static void ia_css_pipe_destroy_cas_scaler_desc(struct ia_css_cas_binary_descr *descr)
-{
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_destroy_cas_scaler_desc() enter:\n");
-       kfree(descr->in_info);
-       descr->in_info = NULL;
-       kfree(descr->internal_out_info);
-       descr->internal_out_info = NULL;
-       kfree(descr->out_info);
-       descr->out_info = NULL;
-       kfree(descr->vf_info);
-       descr->vf_info = NULL;
-       kfree(descr->is_output_stage);
-       descr->is_output_stage = NULL;
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_destroy_cas_scaler_desc() leave\n");
-}
+       static void ia_css_pipe_destroy_cas_scaler_desc(struct ia_css_cas_binary_descr
+               *descr) {
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_pipe_destroy_cas_scaler_desc() enter:\n");
+               kfree(descr->in_info);
+               descr->in_info = NULL;
+               kfree(descr->internal_out_info);
+               descr->internal_out_info = NULL;
+               kfree(descr->out_info);
+               descr->out_info = NULL;
+               kfree(descr->vf_info);
+               descr->vf_info = NULL;
+               kfree(descr->is_output_stage);
+               descr->is_output_stage = NULL;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "ia_css_pipe_destroy_cas_scaler_desc() leave\n");
+       }
 
-static enum ia_css_err
-load_yuvpp_binaries(struct ia_css_pipe *pipe)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       bool need_scaler = false;
-       struct ia_css_frame_info *vf_pp_in_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
-       struct ia_css_yuvpp_settings *mycs;
-       struct ia_css_binary *next_binary;
-       struct ia_css_cas_binary_descr cas_scaler_descr = { };
-       unsigned int i, j;
-       bool need_isp_copy_binary = false;
+       static enum ia_css_err
+       load_yuvpp_binaries(struct ia_css_pipe *pipe) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               bool need_scaler = false;
+               struct ia_css_frame_info *vf_pp_in_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
+               struct ia_css_yuvpp_settings *mycs;
+               struct ia_css_binary *next_binary;
+               struct ia_css_cas_binary_descr cas_scaler_descr = { };
+               unsigned int i, j;
+               bool need_isp_copy_binary = false;
 
-       IA_CSS_ENTER_PRIVATE("");
-       assert(pipe);
-       assert(pipe->stream);
-       assert(pipe->mode == IA_CSS_PIPE_ID_YUVPP);
+               IA_CSS_ENTER_PRIVATE("");
+               assert(pipe);
+               assert(pipe->stream);
+               assert(pipe->mode == IA_CSS_PIPE_ID_YUVPP);
 
-       if (pipe->pipe_settings.yuvpp.copy_binary.info)
-               goto ERR;
+               if (pipe->pipe_settings.yuvpp.copy_binary.info)
+                       goto ERR;
 
-       /* Set both must_be_raw and must_be_yuv to false then yuvpp can take rgb inputs */
-       err = ia_css_util_check_input(&pipe->stream->config, false, false);
-       if (err != IA_CSS_SUCCESS)
-               goto ERR;
+               /* Set both must_be_raw and must_be_yuv to false then yuvpp can take rgb inputs */
+               err = ia_css_util_check_input(&pipe->stream->config, false, false);
+               if (err != IA_CSS_SUCCESS)
+                       goto ERR;
 
-       mycs = &pipe->pipe_settings.yuvpp;
+               mycs = &pipe->pipe_settings.yuvpp;
 
-       for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
-               if (pipe->vf_output_info[i].res.width != 0) {
-                       err = ia_css_util_check_vf_out_info(&pipe->output_info[i],
-                                       &pipe->vf_output_info[i]);
-                       if (err != IA_CSS_SUCCESS)
-                               goto ERR;
+               for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++)
+               {
+                       if (pipe->vf_output_info[i].res.width != 0) {
+                               err = ia_css_util_check_vf_out_info(&pipe->output_info[i],
+                                                                   &pipe->vf_output_info[i]);
+                               if (err != IA_CSS_SUCCESS)
+                                       goto ERR;
+                       }
+                       vf_pp_in_info[i] = NULL;
                }
-               vf_pp_in_info[i] = NULL;
-       }
 
-       need_scaler = need_yuv_scaler_stage(pipe);
+               need_scaler = need_yuv_scaler_stage(pipe);
 
-       /* we build up the pipeline starting at the end */
-       /* Capture post-processing */
-       if (need_scaler) {
-               struct ia_css_binary_descr yuv_scaler_descr;
+               /* we build up the pipeline starting at the end */
+               /* Capture post-processing */
+               if (need_scaler)
+               {
+                       struct ia_css_binary_descr yuv_scaler_descr;
 
-               err = ia_css_pipe_create_cas_scaler_desc(pipe,
-                       &cas_scaler_descr);
-               if (err != IA_CSS_SUCCESS)
-                       goto ERR;
-               mycs->num_output = cas_scaler_descr.num_output_stage;
-               mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
-               mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
-                       sizeof(struct ia_css_binary), GFP_KERNEL);
-               if (!mycs->yuv_scaler_binary) {
-                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-                       goto ERR;
-               }
-               mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage *
-                       sizeof(bool), GFP_KERNEL);
-               if (!mycs->is_output_stage) {
-                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-                       goto ERR;
-               }
-               for (i = 0; i < cas_scaler_descr.num_stage; i++) {
-                       mycs->is_output_stage[i] = cas_scaler_descr.is_output_stage[i];
-                       ia_css_pipe_get_yuvscaler_binarydesc(pipe,
-                               &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
-                               &cas_scaler_descr.out_info[i],
-                               &cas_scaler_descr.internal_out_info[i],
-                               &cas_scaler_descr.vf_info[i]);
-                       err = ia_css_binary_find(&yuv_scaler_descr,
-                                               &mycs->yuv_scaler_binary[i]);
+                       err = ia_css_pipe_create_cas_scaler_desc(pipe,
+                               &cas_scaler_descr);
                        if (err != IA_CSS_SUCCESS)
                                goto ERR;
+                       mycs->num_output = cas_scaler_descr.num_output_stage;
+                       mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
+                       mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
+                                                         sizeof(struct ia_css_binary), GFP_KERNEL);
+                       if (!mycs->yuv_scaler_binary) {
+                               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                               goto ERR;
+                       }
+                       mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage *
+                                                       sizeof(bool), GFP_KERNEL);
+                       if (!mycs->is_output_stage) {
+                               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                               goto ERR;
+                       }
+                       for (i = 0; i < cas_scaler_descr.num_stage; i++) {
+                               mycs->is_output_stage[i] = cas_scaler_descr.is_output_stage[i];
+                               ia_css_pipe_get_yuvscaler_binarydesc(pipe,
+                                                                    &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
+                                                                    &cas_scaler_descr.out_info[i],
+                                                                    &cas_scaler_descr.internal_out_info[i],
+                                                                    &cas_scaler_descr.vf_info[i]);
+                               err = ia_css_binary_find(&yuv_scaler_descr,
+                                                        &mycs->yuv_scaler_binary[i]);
+                               if (err != IA_CSS_SUCCESS)
+                                       goto ERR;
+                       }
+                       ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);
+               } else
+               {
+                       mycs->num_output = 1;
                }
-               ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);
-       } else {
-               mycs->num_output = 1;
-       }
 
-       if (need_scaler) {
-               next_binary = &mycs->yuv_scaler_binary[0];
-       } else {
-               next_binary = NULL;
-       }
+               if (need_scaler)
+               {
+                       next_binary = &mycs->yuv_scaler_binary[0];
+               } else
+               {
+                       next_binary = NULL;
+               }
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
-       /*
-        * NOTES
-        * - Why does the "yuvpp" pipe needs "isp_copy_binary" (i.e. ISP Copy) when
-        *   its input is "ATOMISP_INPUT_FORMAT_YUV422_8"?
-        *
-        *   In most use cases, the first stage in the "yuvpp" pipe is the "yuv_scale_
-        *   binary". However, the "yuv_scale_binary" does NOT support the input-frame
-        *   format as "IA_CSS_STREAM _FORMAT_YUV422_8".
-        *
-        *   Hence, the "isp_copy_binary" is required to be present in front of the "yuv
-        *   _scale_binary". It would translate the input-frame to the frame formats that
-        *   are supported by the "yuv_scale_binary".
-        *
-        *   Please refer to "FrameWork/css/isp/pipes/capture_pp/capture_pp_1.0/capture_
-        *   pp_defs.h" for the list of input-frame formats that are supported by the
-        *   "yuv_scale_binary".
-        */
-       need_isp_copy_binary =
-               (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV422_8);
-#else  /* !USE_INPUT_SYSTEM_VERSION_2401 */
-       need_isp_copy_binary = true;
-#endif /*  USE_INPUT_SYSTEM_VERSION_2401 */
-
-       if (need_isp_copy_binary) {
-               err = load_copy_binary(pipe,
-                                      &mycs->copy_binary,
-                                      next_binary);
-
-               if (err != IA_CSS_SUCCESS)
-                       goto ERR;
-
                /*
                 * NOTES
-                * - Why is "pipe->pipe_settings.capture.copy_binary.online" specified?
+                * - Why does the "yuvpp" pipe needs "isp_copy_binary" (i.e. ISP Copy) when
+                *   its input is "ATOMISP_INPUT_FORMAT_YUV422_8"?
                 *
-                *   In some use cases, the first stage in the "yuvpp" pipe is the
-                *   "isp_copy_binary". The "isp_copy_binary" is designed to process
-                *   the input from either the system DDR or from the IPU internal VMEM.
-                *   So it provides the flag "online" to specify where its input is from,
-                *   i.e.:
+                *   In most use cases, the first stage in the "yuvpp" pipe is the "yuv_scale_
+                *   binary". However, the "yuv_scale_binary" does NOT support the input-frame
+                *   format as "IA_CSS_STREAM _FORMAT_YUV422_8".
                 *
-                *      (1) "online <= true", the input is from the IPU internal VMEM.
-                *      (2) "online <= false", the input is from the system DDR.
+                *   Hence, the "isp_copy_binary" is required to be present in front of the "yuv
+                *   _scale_binary". It would translate the input-frame to the frame formats that
+                *   are supported by the "yuv_scale_binary".
                 *
-                *   In other use cases, the first stage in the "yuvpp" pipe is the
-                *   "yuv_scale_binary". "The "yuv_scale_binary" is designed to process the
-                *   input ONLY from the system DDR. So it does not provide the flag "online"
-                *   to specify where its input is from.
+                *   Please refer to "FrameWork/css/isp/pipes/capture_pp/capture_pp_1.0/capture_
+                *   pp_defs.h" for the list of input-frame formats that are supported by the
+                *   "yuv_scale_binary".
                 */
-               pipe->pipe_settings.capture.copy_binary.online = pipe->stream->config.online;
-       }
+               need_isp_copy_binary =
+                   (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV422_8);
+#else  /* !USE_INPUT_SYSTEM_VERSION_2401 */
+               need_isp_copy_binary = true;
+#endif /*  USE_INPUT_SYSTEM_VERSION_2401 */
 
-       /* Viewfinder post-processing */
-       if (need_scaler) {
-               for (i = 0, j = 0; i < mycs->num_yuv_scaler; i++) {
-                       if (mycs->is_output_stage[i]) {
-                               assert(j < 2);
-                               vf_pp_in_info[j] =
-                                       &mycs->yuv_scaler_binary[i].vf_frame_info;
-                               j++;
+               if (need_isp_copy_binary)
+               {
+                       err = load_copy_binary(pipe,
+                                              &mycs->copy_binary,
+                                              next_binary);
+
+                       if (err != IA_CSS_SUCCESS)
+                               goto ERR;
+
+                       /*
+                        * NOTES
+                        * - Why is "pipe->pipe_settings.capture.copy_binary.online" specified?
+                        *
+                        *   In some use cases, the first stage in the "yuvpp" pipe is the
+                        *   "isp_copy_binary". The "isp_copy_binary" is designed to process
+                        *   the input from either the system DDR or from the IPU internal VMEM.
+                        *   So it provides the flag "online" to specify where its input is from,
+                        *   i.e.:
+                        *
+                        *      (1) "online <= true", the input is from the IPU internal VMEM.
+                        *      (2) "online <= false", the input is from the system DDR.
+                        *
+                        *   In other use cases, the first stage in the "yuvpp" pipe is the
+                        *   "yuv_scale_binary". "The "yuv_scale_binary" is designed to process the
+                        *   input ONLY from the system DDR. So it does not provide the flag "online"
+                        *   to specify where its input is from.
+                        */
+                       pipe->pipe_settings.capture.copy_binary.online = pipe->stream->config.online;
+               }
+
+               /* Viewfinder post-processing */
+               if (need_scaler)
+               {
+                       for (i = 0, j = 0; i < mycs->num_yuv_scaler; i++) {
+                               if (mycs->is_output_stage[i]) {
+                                       assert(j < 2);
+                                       vf_pp_in_info[j] =
+                                           &mycs->yuv_scaler_binary[i].vf_frame_info;
+                                       j++;
+                               }
+                       }
+                       mycs->num_vf_pp = j;
+               } else
+               {
+                       vf_pp_in_info[0] =
+                           &mycs->copy_binary.vf_frame_info;
+                       for (i = 1; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
+                               vf_pp_in_info[i] = NULL;
                        }
+                       mycs->num_vf_pp = 1;
                }
-               mycs->num_vf_pp = j;
-       } else {
-               vf_pp_in_info[0] =
-                   &mycs->copy_binary.vf_frame_info;
-               for (i = 1; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
-                       vf_pp_in_info[i] = NULL;
+               mycs->vf_pp_binary = kzalloc(mycs->num_vf_pp * sizeof(struct ia_css_binary),
+                                            GFP_KERNEL);
+               if (!mycs->vf_pp_binary)
+               {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+                       goto ERR;
                }
-               mycs->num_vf_pp = 1;
-       }
-       mycs->vf_pp_binary = kzalloc(mycs->num_vf_pp * sizeof(struct ia_css_binary),
-                                               GFP_KERNEL);
-       if (!mycs->vf_pp_binary) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               goto ERR;
-       }
 
-       {
-               struct ia_css_binary_descr vf_pp_descr;
+               {
+                       struct ia_css_binary_descr vf_pp_descr;
 
-               for (i = 0; i < mycs->num_vf_pp; i++) {
-                       if (pipe->vf_output_info[i].res.width != 0) {
-                               ia_css_pipe_get_vfpp_binarydesc(pipe,
-                                       &vf_pp_descr, vf_pp_in_info[i], &pipe->vf_output_info[i]);
-                               err = ia_css_binary_find(&vf_pp_descr, &mycs->vf_pp_binary[i]);
-                               if (err != IA_CSS_SUCCESS)
-                                       goto ERR;
+                       for (i = 0; i < mycs->num_vf_pp; i++)
+                       {
+                               if (pipe->vf_output_info[i].res.width != 0) {
+                                       ia_css_pipe_get_vfpp_binarydesc(pipe,
+                                                                       &vf_pp_descr, vf_pp_in_info[i], &pipe->vf_output_info[i]);
+                                       err = ia_css_binary_find(&vf_pp_descr, &mycs->vf_pp_binary[i]);
+                                       if (err != IA_CSS_SUCCESS)
+                                               goto ERR;
+                               }
                        }
                }
-       }
 
-       if (err != IA_CSS_SUCCESS)
-               goto ERR;
+               if (err != IA_CSS_SUCCESS)
+                       goto ERR;
 
 ERR:
-       if (need_scaler) {
-               ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);
+               if (need_scaler)
+               {
+                       ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);
+               }
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "load_yuvpp_binaries() leave, err=%d\n",
+                                   err);
+               return err;
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "load_yuvpp_binaries() leave, err=%d\n",
-                       err);
-       return err;
-}
 
-static enum ia_css_err
-unload_yuvpp_binaries(struct ia_css_pipe *pipe)
-{
-       unsigned int i;
+       static enum ia_css_err
+       unload_yuvpp_binaries(struct ia_css_pipe *pipe) {
+               unsigned int i;
 
-       IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+               IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
 
-       if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
-       ia_css_binary_unload(&pipe->pipe_settings.yuvpp.copy_binary);
-       for (i = 0; i < pipe->pipe_settings.yuvpp.num_yuv_scaler; i++) {
-               ia_css_binary_unload(&pipe->pipe_settings.yuvpp.yuv_scaler_binary[i]);
-       }
-       for (i = 0; i < pipe->pipe_settings.yuvpp.num_vf_pp; i++) {
-               ia_css_binary_unload(&pipe->pipe_settings.yuvpp.vf_pp_binary[i]);
-       }
-       kfree(pipe->pipe_settings.yuvpp.is_output_stage);
-       pipe->pipe_settings.yuvpp.is_output_stage = NULL;
-       kfree(pipe->pipe_settings.yuvpp.yuv_scaler_binary);
-       pipe->pipe_settings.yuvpp.yuv_scaler_binary = NULL;
-       kfree(pipe->pipe_settings.yuvpp.vf_pp_binary);
-       pipe->pipe_settings.yuvpp.vf_pp_binary = NULL;
+               if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP))
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
+               ia_css_binary_unload(&pipe->pipe_settings.yuvpp.copy_binary);
+               for (i = 0; i < pipe->pipe_settings.yuvpp.num_yuv_scaler; i++)
+               {
+                       ia_css_binary_unload(&pipe->pipe_settings.yuvpp.yuv_scaler_binary[i]);
+               }
+               for (i = 0; i < pipe->pipe_settings.yuvpp.num_vf_pp; i++)
+               {
+                       ia_css_binary_unload(&pipe->pipe_settings.yuvpp.vf_pp_binary[i]);
+               }
+               kfree(pipe->pipe_settings.yuvpp.is_output_stage);
+               pipe->pipe_settings.yuvpp.is_output_stage = NULL;
+               kfree(pipe->pipe_settings.yuvpp.yuv_scaler_binary);
+               pipe->pipe_settings.yuvpp.yuv_scaler_binary = NULL;
+               kfree(pipe->pipe_settings.yuvpp.vf_pp_binary);
+               pipe->pipe_settings.yuvpp.vf_pp_binary = NULL;
 
-       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
-       return IA_CSS_SUCCESS;
-}
+               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+               return IA_CSS_SUCCESS;
+       }
 
-static enum ia_css_err yuvpp_start(struct ia_css_pipe *pipe)
-{
-       struct ia_css_binary *copy_binary;
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       enum sh_css_pipe_config_override copy_ovrd;
-       enum ia_css_input_mode yuvpp_pipe_input_mode;
+       static enum ia_css_err yuvpp_start(struct ia_css_pipe *pipe) {
+               struct ia_css_binary *copy_binary;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               enum sh_css_pipe_config_override copy_ovrd;
+               enum ia_css_input_mode yuvpp_pipe_input_mode;
 
-       IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
+               IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+               if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       yuvpp_pipe_input_mode = pipe->stream->config.mode;
+               yuvpp_pipe_input_mode = pipe->stream->config.mode;
 
-       copy_binary  = &pipe->pipe_settings.yuvpp.copy_binary;
+               copy_binary  = &pipe->pipe_settings.yuvpp.copy_binary;
 
-       sh_css_metrics_start_frame();
+               sh_css_metrics_start_frame();
 
-       /* multi stream video needs mipi buffers */
+               /* multi stream video needs mipi buffers */
 
 #if !defined(HAS_NO_INPUT_SYSTEM) && (defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401))
-       err = send_mipi_frames(pipe);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
+               err = send_mipi_frames(pipe);
+               if (err != IA_CSS_SUCCESS) {
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
 #endif
 
-       {
-               unsigned int thread_id;
+               {
+                       unsigned int thread_id;
 
-               ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
-               copy_ovrd = 1 << thread_id;
-       }
+                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+                       copy_ovrd = 1 << thread_id;
+               }
 
-       start_pipe(pipe, copy_ovrd, yuvpp_pipe_input_mode);
+               start_pipe(pipe, copy_ovrd, yuvpp_pipe_input_mode);
 
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
-       return err;
-}
+               IA_CSS_LEAVE_ERR_PRIVATE(err);
+               return err;
+       }
 
-static enum ia_css_err
-sh_css_pipe_unload_binaries(struct ia_css_pipe *pipe)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       static enum ia_css_err
+       sh_css_pipe_unload_binaries(struct ia_css_pipe *pipe) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+               IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
 
-       if (!pipe) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
-       /* PIPE_MODE_COPY has no binaries, but has output frames to outside*/
-       if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
-               return IA_CSS_SUCCESS;
-       }
+               if (!pipe)
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
+               /* PIPE_MODE_COPY has no binaries, but has output frames to outside*/
+               if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+                       return IA_CSS_SUCCESS;
+               }
 
-       switch (pipe->mode) {
-       case IA_CSS_PIPE_ID_PREVIEW:
-               err = unload_preview_binaries(pipe);
-               break;
-       case IA_CSS_PIPE_ID_VIDEO:
-               err = unload_video_binaries(pipe);
-               break;
-       case IA_CSS_PIPE_ID_CAPTURE:
-               err = unload_capture_binaries(pipe);
-               break;
-       case IA_CSS_PIPE_ID_YUVPP:
-               err = unload_yuvpp_binaries(pipe);
-               break;
-       default:
-               break;
+               switch (pipe->mode)
+               {
+               case IA_CSS_PIPE_ID_PREVIEW:
+                       err = unload_preview_binaries(pipe);
+                       break;
+               case IA_CSS_PIPE_ID_VIDEO:
+                       err = unload_video_binaries(pipe);
+                       break;
+               case IA_CSS_PIPE_ID_CAPTURE:
+                       err = unload_capture_binaries(pipe);
+                       break;
+               case IA_CSS_PIPE_ID_YUVPP:
+                       err = unload_yuvpp_binaries(pipe);
+                       break;
+               default:
+                       break;
+               }
+               IA_CSS_LEAVE_ERR_PRIVATE(err);
+               return err;
        }
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
-       return err;
-}
 
-static enum ia_css_err
-sh_css_pipe_load_binaries(struct ia_css_pipe *pipe)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       static enum ia_css_err
+       sh_css_pipe_load_binaries(struct ia_css_pipe *pipe) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       assert(pipe);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "sh_css_pipe_load_binaries() enter:\n");
+               assert(pipe);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "sh_css_pipe_load_binaries() enter:\n");
 
-       /* PIPE_MODE_COPY has no binaries, but has output frames to outside*/
-       if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
-               return err;
+               /* PIPE_MODE_COPY has no binaries, but has output frames to outside*/
+               if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
+                       return err;
 
-       switch (pipe->mode) {
-       case IA_CSS_PIPE_ID_PREVIEW:
-               err = load_preview_binaries(pipe);
-               break;
-       case IA_CSS_PIPE_ID_VIDEO:
-               err = load_video_binaries(pipe);
-               break;
-       case IA_CSS_PIPE_ID_CAPTURE:
-               err = load_capture_binaries(pipe);
-               break;
-       case IA_CSS_PIPE_ID_YUVPP:
-               err = load_yuvpp_binaries(pipe);
-               break;
-       case IA_CSS_PIPE_ID_ACC:
-               break;
-       default:
-               err = IA_CSS_ERR_INTERNAL_ERROR;
-               break;
-       }
-       if (err != IA_CSS_SUCCESS) {
-               if (sh_css_pipe_unload_binaries(pipe) != IA_CSS_SUCCESS) {
-                       /* currently css does not support multiple error returns in a single function,
-                        * using IA_CSS_ERR_INTERNAL_ERROR in this case */
+               switch (pipe->mode)
+               {
+               case IA_CSS_PIPE_ID_PREVIEW:
+                       err = load_preview_binaries(pipe);
+                       break;
+               case IA_CSS_PIPE_ID_VIDEO:
+                       err = load_video_binaries(pipe);
+                       break;
+               case IA_CSS_PIPE_ID_CAPTURE:
+                       err = load_capture_binaries(pipe);
+                       break;
+               case IA_CSS_PIPE_ID_YUVPP:
+                       err = load_yuvpp_binaries(pipe);
+                       break;
+               case IA_CSS_PIPE_ID_ACC:
+                       break;
+               default:
                        err = IA_CSS_ERR_INTERNAL_ERROR;
+                       break;
+               }
+               if (err != IA_CSS_SUCCESS)
+               {
+                       if (sh_css_pipe_unload_binaries(pipe) != IA_CSS_SUCCESS) {
+                               /* currently css does not support multiple error returns in a single function,
+                                * using IA_CSS_ERR_INTERNAL_ERROR in this case */
+                               err = IA_CSS_ERR_INTERNAL_ERROR;
+                       }
                }
+               return err;
        }
-       return err;
-}
-
-static enum ia_css_err
-create_host_yuvpp_pipeline(struct ia_css_pipe *pipe)
-{
-       struct ia_css_pipeline *me;
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       struct ia_css_pipeline_stage *vf_pp_stage = NULL,
-                                    *copy_stage = NULL,
-                                    *yuv_scaler_stage = NULL;
-       struct ia_css_binary *copy_binary,
-                            *vf_pp_binary,
-                            *yuv_scaler_binary;
-       bool need_scaler = false;
-       unsigned int num_stage, num_vf_pp_stage, num_output_stage;
-       unsigned int i, j;
 
-       struct ia_css_frame *in_frame = NULL;
-       struct ia_css_frame *out_frame[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
-       struct ia_css_frame *bin_out_frame[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
-       struct ia_css_frame *vf_frame[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
-       struct ia_css_pipeline_stage_desc stage_desc;
-       bool need_in_frameinfo_memory = false;
+       static enum ia_css_err
+       create_host_yuvpp_pipeline(struct ia_css_pipe *pipe) {
+               struct ia_css_pipeline *me;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               struct ia_css_pipeline_stage *vf_pp_stage = NULL,
+                       *copy_stage = NULL,
+                       *yuv_scaler_stage = NULL;
+               struct ia_css_binary *copy_binary,
+                       *vf_pp_binary,
+                       *yuv_scaler_binary;
+               bool need_scaler = false;
+               unsigned int num_stage, num_vf_pp_stage, num_output_stage;
+               unsigned int i, j;
+
+               struct ia_css_frame *in_frame = NULL;
+               struct ia_css_frame *out_frame[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
+               struct ia_css_frame *bin_out_frame[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
+               struct ia_css_frame *vf_frame[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
+               struct ia_css_pipeline_stage_desc stage_desc;
+               bool need_in_frameinfo_memory = false;
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       bool sensor = false;
-       bool buffered_sensor = false;
-       bool online = false;
-       bool continuous = false;
+               bool sensor = false;
+               bool buffered_sensor = false;
+               bool online = false;
+               bool continuous = false;
 #endif
 
-       IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
-       me = &pipe->pipeline;
-       ia_css_pipeline_clean(me);
-       for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
-               out_frame[i] = NULL;
-               vf_frame[i] = NULL;
-       }
-       ia_css_pipe_util_create_output_frames(bin_out_frame);
-       num_stage  = pipe->pipe_settings.yuvpp.num_yuv_scaler;
-       num_vf_pp_stage   = pipe->pipe_settings.yuvpp.num_vf_pp;
-       num_output_stage   = pipe->pipe_settings.yuvpp.num_output;
+               IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+               if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP))
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
+               me = &pipe->pipeline;
+               ia_css_pipeline_clean(me);
+               for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++)
+               {
+                       out_frame[i] = NULL;
+                       vf_frame[i] = NULL;
+               }
+               ia_css_pipe_util_create_output_frames(bin_out_frame);
+               num_stage  = pipe->pipe_settings.yuvpp.num_yuv_scaler;
+               num_vf_pp_stage   = pipe->pipe_settings.yuvpp.num_vf_pp;
+               num_output_stage   = pipe->pipe_settings.yuvpp.num_output;
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       /* When the input system is 2401, always enable 'in_frameinfo_memory'
-        * except for the following:
-        * - Direct Sensor Mode Online Capture
-        * - Direct Sensor Mode Continuous Capture
-        * - Buffered Sensor Mode Continuous Capture
-        */
-       sensor = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
-       buffered_sensor = pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR;
-       online = pipe->stream->config.online;
-       continuous = pipe->stream->config.continuous;
-       need_in_frameinfo_memory =
+               /* When the input system is 2401, always enable 'in_frameinfo_memory'
+                * except for the following:
+                * - Direct Sensor Mode Online Capture
+                * - Direct Sensor Mode Continuous Capture
+                * - Buffered Sensor Mode Continuous Capture
+                */
+               sensor = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
+               buffered_sensor = pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR;
+               online = pipe->stream->config.online;
+               continuous = pipe->stream->config.continuous;
+               need_in_frameinfo_memory =
                !((sensor && (online || continuous)) || (buffered_sensor && continuous));
 #else
-       /* Construct in_frame info (only in case we have dynamic input */
-       need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
+               /* Construct in_frame info (only in case we have dynamic input */
+               need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
 #endif
-       /* the input frame can come from:
-        *  a) memory: connect yuvscaler to me->in_frame
-        *  b) sensor, via copy binary: connect yuvscaler to copy binary later on */
-       if (need_in_frameinfo_memory) {
-               /* TODO: improve for different input formats. */
-
-               /*
-                * "pipe->stream->config.input_config.format" represents the sensor output
-                * frame format, e.g. YUV422 8-bit.
-                *
-                * "in_frame_format" represents the imaging pipe's input frame format, e.g.
-                * Bayer-Quad RAW.
-                */
-               int in_frame_format;
+               /* the input frame can come from:
+                *  a) memory: connect yuvscaler to me->in_frame
+                *  b) sensor, via copy binary: connect yuvscaler to copy binary later on */
+               if (need_in_frameinfo_memory)
+               {
+                       /* TODO: improve for different input formats. */
 
-               if (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) {
-                       in_frame_format = IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8;
-               } else if (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV422_8) {
                        /*
-                        * When the sensor output frame format is "ATOMISP_INPUT_FORMAT_YUV422_8",
-                        * the "isp_copy_var" binary is selected as the first stage in the yuvpp
-                        * pipe.
-                        *
-                        * For the "isp_copy_var" binary, it reads the YUV422-8 pixels from
-                        * the frame buffer (at DDR) to the frame-line buffer (at VMEM).
-                        *
-                        * By now, the "isp_copy_var" binary does NOT provide a separated
-                        * frame-line buffer to store the YUV422-8 pixels. Instead, it stores
-                        * the YUV422-8 pixels in the frame-line buffer which is designed to
-                        * store the Bayer-Quad RAW pixels.
+                        * "pipe->stream->config.input_config.format" represents the sensor output
+                        * frame format, e.g. YUV422 8-bit.
                         *
-                        * To direct the "isp_copy_var" binary reading from the RAW frame-line
-                        * buffer, its input frame format must be specified as "IA_CSS_FRAME_
-                        * FORMAT_RAW".
+                        * "in_frame_format" represents the imaging pipe's input frame format, e.g.
+                        * Bayer-Quad RAW.
                         */
-                       in_frame_format = IA_CSS_FRAME_FORMAT_RAW;
-               } else {
-                       in_frame_format = IA_CSS_FRAME_FORMAT_NV12;
-               }
-
-               err = init_in_frameinfo_memory_defaults(pipe,
-                       &me->in_frame,
-                       in_frame_format);
-
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
-               }
+                       int in_frame_format;
+
+                       if (pipe->stream->config.input_config.format ==
+                           ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) {
+                               in_frame_format = IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8;
+                       } else if (pipe->stream->config.input_config.format ==
+                                  ATOMISP_INPUT_FORMAT_YUV422_8) {
+                               /*
+                                * When the sensor output frame format is "ATOMISP_INPUT_FORMAT_YUV422_8",
+                                * the "isp_copy_var" binary is selected as the first stage in the yuvpp
+                                * pipe.
+                                *
+                                * For the "isp_copy_var" binary, it reads the YUV422-8 pixels from
+                                * the frame buffer (at DDR) to the frame-line buffer (at VMEM).
+                                *
+                                * By now, the "isp_copy_var" binary does NOT provide a separated
+                                * frame-line buffer to store the YUV422-8 pixels. Instead, it stores
+                                * the YUV422-8 pixels in the frame-line buffer which is designed to
+                                * store the Bayer-Quad RAW pixels.
+                                *
+                                * To direct the "isp_copy_var" binary reading from the RAW frame-line
+                                * buffer, its input frame format must be specified as "IA_CSS_FRAME_
+                                * FORMAT_RAW".
+                                */
+                               in_frame_format = IA_CSS_FRAME_FORMAT_RAW;
+                       } else {
+                               in_frame_format = IA_CSS_FRAME_FORMAT_NV12;
+                       }
 
-               in_frame = &me->in_frame;
-       } else {
-               in_frame = NULL;
-       }
+                       err = init_in_frameinfo_memory_defaults(pipe,
+                                                               &me->in_frame,
+                                                               in_frame_format);
 
-       for (i = 0; i < num_output_stage; i++) {
-               assert(i < IA_CSS_PIPE_MAX_OUTPUT_STAGE);
-               if (pipe->output_info[i].res.width != 0) {
-                       err = init_out_frameinfo_defaults(pipe, &me->out_frame[i], i);
                        if (err != IA_CSS_SUCCESS) {
                                IA_CSS_LEAVE_ERR_PRIVATE(err);
                                return err;
                        }
-                       out_frame[i] = &me->out_frame[i];
+
+                       in_frame = &me->in_frame;
+               } else
+               {
+                       in_frame = NULL;
                }
 
-               /* Construct vf_frame info (only in case we have VF) */
-               if (pipe->vf_output_info[i].res.width != 0) {
-                       err = init_vf_frameinfo_defaults(pipe, &me->vf_frame[i], i);
-                       if (err != IA_CSS_SUCCESS) {
-                               IA_CSS_LEAVE_ERR_PRIVATE(err);
-                               return err;
+               for (i = 0; i < num_output_stage; i++)
+               {
+                       assert(i < IA_CSS_PIPE_MAX_OUTPUT_STAGE);
+                       if (pipe->output_info[i].res.width != 0) {
+                               err = init_out_frameinfo_defaults(pipe, &me->out_frame[i], i);
+                               if (err != IA_CSS_SUCCESS) {
+                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                                       return err;
+                               }
+                               out_frame[i] = &me->out_frame[i];
+                       }
+
+                       /* Construct vf_frame info (only in case we have VF) */
+                       if (pipe->vf_output_info[i].res.width != 0) {
+                               err = init_vf_frameinfo_defaults(pipe, &me->vf_frame[i], i);
+                               if (err != IA_CSS_SUCCESS) {
+                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                                       return err;
+                               }
+                               vf_frame[i] = &me->vf_frame[i];
                        }
-                       vf_frame[i] = &me->vf_frame[i];
                }
-       }
 
-       copy_binary       = &pipe->pipe_settings.yuvpp.copy_binary;
-       vf_pp_binary      = pipe->pipe_settings.yuvpp.vf_pp_binary;
-       yuv_scaler_binary = pipe->pipe_settings.yuvpp.yuv_scaler_binary;
-       need_scaler = need_yuv_scaler_stage(pipe);
+               copy_binary       = &pipe->pipe_settings.yuvpp.copy_binary;
+               vf_pp_binary      = pipe->pipe_settings.yuvpp.vf_pp_binary;
+               yuv_scaler_binary = pipe->pipe_settings.yuvpp.yuv_scaler_binary;
+               need_scaler = need_yuv_scaler_stage(pipe);
 
-       if (pipe->pipe_settings.yuvpp.copy_binary.info) {
-               struct ia_css_frame *in_frame_local = NULL;
+               if (pipe->pipe_settings.yuvpp.copy_binary.info)
+               {
+                       struct ia_css_frame *in_frame_local = NULL;
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-               /* After isp copy is enabled in_frame needs to be passed. */
-               if (!online)
-                       in_frame_local = in_frame;
+                       /* After isp copy is enabled in_frame needs to be passed. */
+                       if (!online)
+                               in_frame_local = in_frame;
 #endif
 
-               if (need_scaler) {
-                       ia_css_pipe_util_set_output_frames(bin_out_frame, 0, NULL);
-                       ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
-                               bin_out_frame, in_frame_local, NULL);
-               } else {
-                       ia_css_pipe_util_set_output_frames(bin_out_frame, 0, out_frame[0]);
-                       ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
-                               bin_out_frame, in_frame_local, NULL);
-               }
-
-               err = ia_css_pipeline_create_and_add_stage(me,
-                       &stage_desc,
-                       &copy_stage);
-
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
-               }
-
-               if (copy_stage) {
-                       /* if we use yuv scaler binary, vf output should be from there */
-                       copy_stage->args.copy_vf = !need_scaler;
-                       /* for yuvpp pipe, it should always be enabled */
-                       copy_stage->args.copy_output = true;
-                       /* connect output of copy binary to input of yuv scaler */
-                       in_frame = copy_stage->args.out_frame[0];
-               }
-       }
-
-       if (need_scaler) {
-               struct ia_css_frame *tmp_out_frame = NULL;
-               struct ia_css_frame *tmp_vf_frame = NULL;
-               struct ia_css_frame *tmp_in_frame = in_frame;
-
-               for (i = 0, j = 0; i < num_stage; i++) {
-                       assert(j < num_output_stage);
-                       if (pipe->pipe_settings.yuvpp.is_output_stage[i]) {
-                               tmp_out_frame = out_frame[j];
-                               tmp_vf_frame = vf_frame[j];
+                       if (need_scaler) {
+                               ia_css_pipe_util_set_output_frames(bin_out_frame, 0, NULL);
+                               ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
+                                                                  bin_out_frame, in_frame_local, NULL);
                        } else {
-                               tmp_out_frame = NULL;
-                               tmp_vf_frame = NULL;
+                               ia_css_pipe_util_set_output_frames(bin_out_frame, 0, out_frame[0]);
+                               ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
+                                                                  bin_out_frame, in_frame_local, NULL);
                        }
 
-                       err = add_yuv_scaler_stage(pipe, me, tmp_in_frame, tmp_out_frame,
-                                                  NULL,
-                                                  &yuv_scaler_binary[i],
-                                                  &yuv_scaler_stage);
+                       err = ia_css_pipeline_create_and_add_stage(me,
+                               &stage_desc,
+                               &copy_stage);
 
                        if (err != IA_CSS_SUCCESS) {
                                IA_CSS_LEAVE_ERR_PRIVATE(err);
                                return err;
                        }
-                       /* we use output port 1 as internal output port */
-                       tmp_in_frame = yuv_scaler_stage->args.out_frame[1];
-                       if (pipe->pipe_settings.yuvpp.is_output_stage[i]) {
-                               if (tmp_vf_frame && (tmp_vf_frame->info.res.width != 0)) {
-                                       in_frame = yuv_scaler_stage->args.out_vf_frame;
-                                       err = add_vf_pp_stage(pipe, in_frame, tmp_vf_frame, &vf_pp_binary[j],
-                                                     &vf_pp_stage);
 
-                                       if (err != IA_CSS_SUCCESS) {
-                                               IA_CSS_LEAVE_ERR_PRIVATE(err);
-                                               return err;
-                                       }
-                               }
-                               j++;
+                       if (copy_stage) {
+                               /* if we use yuv scaler binary, vf output should be from there */
+                               copy_stage->args.copy_vf = !need_scaler;
+                               /* for yuvpp pipe, it should always be enabled */
+                               copy_stage->args.copy_output = true;
+                               /* connect output of copy binary to input of yuv scaler */
+                               in_frame = copy_stage->args.out_frame[0];
                        }
                }
-       } else if (copy_stage) {
-               if (vf_frame[0] && vf_frame[0]->info.res.width != 0) {
-                       in_frame = copy_stage->args.out_vf_frame;
-                       err = add_vf_pp_stage(pipe, in_frame, vf_frame[0], &vf_pp_binary[0],
-                                     &vf_pp_stage);
-               }
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
-               }
-       }
 
-       ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
+               if (need_scaler)
+               {
+                       struct ia_css_frame *tmp_out_frame = NULL;
+                       struct ia_css_frame *tmp_vf_frame = NULL;
+                       struct ia_css_frame *tmp_in_frame = in_frame;
+
+                       for (i = 0, j = 0; i < num_stage; i++) {
+                               assert(j < num_output_stage);
+                               if (pipe->pipe_settings.yuvpp.is_output_stage[i]) {
+                                       tmp_out_frame = out_frame[j];
+                                       tmp_vf_frame = vf_frame[j];
+                               } else {
+                                       tmp_out_frame = NULL;
+                                       tmp_vf_frame = NULL;
+                               }
 
-       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+                               err = add_yuv_scaler_stage(pipe, me, tmp_in_frame, tmp_out_frame,
+                                                          NULL,
+                                                          &yuv_scaler_binary[i],
+                                                          &yuv_scaler_stage);
 
-       return IA_CSS_SUCCESS;
-}
+                               if (err != IA_CSS_SUCCESS) {
+                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                                       return err;
+                               }
+                               /* we use output port 1 as internal output port */
+                               tmp_in_frame = yuv_scaler_stage->args.out_frame[1];
+                               if (pipe->pipe_settings.yuvpp.is_output_stage[i]) {
+                                       if (tmp_vf_frame && (tmp_vf_frame->info.res.width != 0)) {
+                                               in_frame = yuv_scaler_stage->args.out_vf_frame;
+                                               err = add_vf_pp_stage(pipe, in_frame, tmp_vf_frame, &vf_pp_binary[j],
+                                                                     &vf_pp_stage);
+
+                                               if (err != IA_CSS_SUCCESS) {
+                                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                                                       return err;
+                                               }
+                                       }
+                                       j++;
+                               }
+                       }
+               } else if (copy_stage)
+               {
+                       if (vf_frame[0] && vf_frame[0]->info.res.width != 0) {
+                               in_frame = copy_stage->args.out_vf_frame;
+                               err = add_vf_pp_stage(pipe, in_frame, vf_frame[0], &vf_pp_binary[0],
+                                                     &vf_pp_stage);
+                       }
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
+               }
 
-static enum ia_css_err
-create_host_copy_pipeline(struct ia_css_pipe *pipe,
-    unsigned int max_input_width,
-    struct ia_css_frame *out_frame)
-{
-       struct ia_css_pipeline *me;
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       struct ia_css_pipeline_stage_desc stage_desc;
+               ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "create_host_copy_pipeline() enter:\n");
+               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
 
-       /* pipeline already created as part of create_host_pipeline_structure */
-       me = &pipe->pipeline;
-       ia_css_pipeline_clean(me);
+               return IA_CSS_SUCCESS;
+       }
 
-       /* Construct out_frame info */
-       out_frame->contiguous = false;
-       out_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
+       static enum ia_css_err
+       create_host_copy_pipeline(struct ia_css_pipe *pipe,
+                                 unsigned int max_input_width,
+                                 struct ia_css_frame *out_frame) {
+               struct ia_css_pipeline *me;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               struct ia_css_pipeline_stage_desc stage_desc;
 
-       if (copy_on_sp(pipe) &&
-           pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
-               ia_css_frame_info_init(
-                       &out_frame->info,
-                       JPEG_BYTES,
-                       1,
-                       IA_CSS_FRAME_FORMAT_BINARY_8,
-                       0);
-       } else if (out_frame->info.format == IA_CSS_FRAME_FORMAT_RAW) {
-               out_frame->info.raw_bit_depth =
-                       ia_css_pipe_util_pipe_input_format_bpp(pipe);
-       }
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "create_host_copy_pipeline() enter:\n");
 
-       me->num_stages = 1;
-       me->pipe_id = IA_CSS_PIPE_ID_COPY;
-       pipe->mode  = IA_CSS_PIPE_ID_COPY;
+               /* pipeline already created as part of create_host_pipeline_structure */
+               me = &pipe->pipeline;
+               ia_css_pipeline_clean(me);
 
-       ia_css_pipe_get_sp_func_stage_desc(&stage_desc, out_frame,
-               IA_CSS_PIPELINE_RAW_COPY, max_input_width);
-       err = ia_css_pipeline_create_and_add_stage(me,
-               &stage_desc,
-               NULL);
+               /* Construct out_frame info */
+               out_frame->contiguous = false;
+               out_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
 
-       ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
+               if (copy_on_sp(pipe) &&
+                   pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8)
+               {
+                       ia_css_frame_info_init(
+                           &out_frame->info,
+                           JPEG_BYTES,
+                           1,
+                           IA_CSS_FRAME_FORMAT_BINARY_8,
+                           0);
+               } else if (out_frame->info.format == IA_CSS_FRAME_FORMAT_RAW)
+               {
+                       out_frame->info.raw_bit_depth =
+                       ia_css_pipe_util_pipe_input_format_bpp(pipe);
+               }
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "create_host_copy_pipeline() leave:\n");
+               me->num_stages = 1;
+               me->pipe_id = IA_CSS_PIPE_ID_COPY;
+               pipe->mode  = IA_CSS_PIPE_ID_COPY;
 
-       return err;
-}
+               ia_css_pipe_get_sp_func_stage_desc(&stage_desc, out_frame,
+                                                  IA_CSS_PIPELINE_RAW_COPY, max_input_width);
+               err = ia_css_pipeline_create_and_add_stage(me,
+                       &stage_desc,
+                       NULL);
 
-static enum ia_css_err
-create_host_isyscopy_capture_pipeline(struct ia_css_pipe *pipe)
-{
-       struct ia_css_pipeline *me = &pipe->pipeline;
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       struct ia_css_pipeline_stage_desc stage_desc;
-       struct ia_css_frame *out_frame = &me->out_frame[0];
-       struct ia_css_pipeline_stage *out_stage = NULL;
-       unsigned int thread_id;
-       enum sh_css_queue_id queue_id;
-       unsigned int max_input_width = MAX_VECTORS_PER_INPUT_LINE_CONT * ISP_VEC_NELEMS;
+               ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "create_host_isyscopy_capture_pipeline() enter:\n");
-       ia_css_pipeline_clean(me);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "create_host_copy_pipeline() leave:\n");
 
-       /* Construct out_frame info */
-       err = sh_css_pipe_get_output_frame_info(pipe, &out_frame->info, 0);
-       if (err != IA_CSS_SUCCESS)
                return err;
-       out_frame->contiguous = false;
-       out_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
-       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
-       ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, thread_id, &queue_id);
-       out_frame->dynamic_queue_id = queue_id;
-       out_frame->buf_type = IA_CSS_BUFFER_TYPE_OUTPUT_FRAME;
+       }
 
-       me->num_stages = 1;
-       me->pipe_id = IA_CSS_PIPE_ID_CAPTURE;
-       pipe->mode  = IA_CSS_PIPE_ID_CAPTURE;
-       ia_css_pipe_get_sp_func_stage_desc(&stage_desc, out_frame,
-               IA_CSS_PIPELINE_ISYS_COPY, max_input_width);
-       err = ia_css_pipeline_create_and_add_stage(me,
-               &stage_desc, &out_stage);
-       if (err != IA_CSS_SUCCESS)
-               return err;
+       static enum ia_css_err
+       create_host_isyscopy_capture_pipeline(struct ia_css_pipe *pipe) {
+               struct ia_css_pipeline *me = &pipe->pipeline;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               struct ia_css_pipeline_stage_desc stage_desc;
+               struct ia_css_frame *out_frame = &me->out_frame[0];
+               struct ia_css_pipeline_stage *out_stage = NULL;
+               unsigned int thread_id;
+               enum sh_css_queue_id queue_id;
+               unsigned int max_input_width = MAX_VECTORS_PER_INPUT_LINE_CONT * ISP_VEC_NELEMS;
 
-       ia_css_pipeline_finalize_stages(me, pipe->stream->config.continuous);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "create_host_isyscopy_capture_pipeline() enter:\n");
+               ia_css_pipeline_clean(me);
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "create_host_isyscopy_capture_pipeline() leave:\n");
+               /* Construct out_frame info */
+               err = sh_css_pipe_get_output_frame_info(pipe, &out_frame->info, 0);
+               if (err != IA_CSS_SUCCESS)
+                       return err;
+               out_frame->contiguous = false;
+               out_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
+               ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, thread_id, &queue_id);
+               out_frame->dynamic_queue_id = queue_id;
+               out_frame->buf_type = IA_CSS_BUFFER_TYPE_OUTPUT_FRAME;
+
+               me->num_stages = 1;
+               me->pipe_id = IA_CSS_PIPE_ID_CAPTURE;
+               pipe->mode  = IA_CSS_PIPE_ID_CAPTURE;
+               ia_css_pipe_get_sp_func_stage_desc(&stage_desc, out_frame,
+                                                  IA_CSS_PIPELINE_ISYS_COPY, max_input_width);
+               err = ia_css_pipeline_create_and_add_stage(me,
+                       &stage_desc, &out_stage);
+               if (err != IA_CSS_SUCCESS)
+                       return err;
 
-       return err;
-}
+               ia_css_pipeline_finalize_stages(me, pipe->stream->config.continuous);
 
-static enum ia_css_err
-create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
-{
-       struct ia_css_pipeline *me;
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       enum ia_css_capture_mode mode;
-       struct ia_css_pipeline_stage *current_stage = NULL;
-       struct ia_css_pipeline_stage *yuv_scaler_stage = NULL;
-       struct ia_css_binary *copy_binary,
-                            *primary_binary[MAX_NUM_PRIMARY_STAGES],
-                            *vf_pp_binary,
-                            *pre_isp_binary,
-                            *anr_gdc_binary,
-                            *post_isp_binary,
-                            *yuv_scaler_binary,
-                            *capture_pp_binary,
-                            *capture_ldc_binary;
-       bool need_pp = false;
-       bool raw;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "create_host_isyscopy_capture_pipeline() leave:\n");
 
-       struct ia_css_frame *in_frame;
-       struct ia_css_frame *out_frame;
-       struct ia_css_frame *out_frames[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
-       struct ia_css_frame *vf_frame;
-       struct ia_css_pipeline_stage_desc stage_desc;
-       bool need_in_frameinfo_memory = false;
+               return err;
+       }
+
+       static enum ia_css_err
+       create_host_regular_capture_pipeline(struct ia_css_pipe *pipe) {
+               struct ia_css_pipeline *me;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               enum ia_css_capture_mode mode;
+               struct ia_css_pipeline_stage *current_stage = NULL;
+               struct ia_css_pipeline_stage *yuv_scaler_stage = NULL;
+               struct ia_css_binary *copy_binary,
+                       *primary_binary[MAX_NUM_PRIMARY_STAGES],
+                       *vf_pp_binary,
+                       *pre_isp_binary,
+                       *anr_gdc_binary,
+                       *post_isp_binary,
+                       *yuv_scaler_binary,
+                       *capture_pp_binary,
+                       *capture_ldc_binary;
+               bool need_pp = false;
+               bool raw;
+
+               struct ia_css_frame *in_frame;
+               struct ia_css_frame *out_frame;
+               struct ia_css_frame *out_frames[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
+               struct ia_css_frame *vf_frame;
+               struct ia_css_pipeline_stage_desc stage_desc;
+               bool need_in_frameinfo_memory = false;
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       bool sensor = false;
-       bool buffered_sensor = false;
-       bool online = false;
-       bool continuous = false;
+               bool sensor = false;
+               bool buffered_sensor = false;
+               bool online = false;
+               bool continuous = false;
 #endif
-       unsigned int i, num_yuv_scaler, num_primary_stage;
-       bool need_yuv_pp = false;
-       bool *is_output_stage = NULL;
-       bool need_ldc = false;
+               unsigned int i, num_yuv_scaler, num_primary_stage;
+               bool need_yuv_pp = false;
+               bool *is_output_stage = NULL;
+               bool need_ldc = false;
 
-       IA_CSS_ENTER_PRIVATE("");
-       assert(pipe);
-       assert(pipe->stream);
-       assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
+               IA_CSS_ENTER_PRIVATE("");
+               assert(pipe);
+               assert(pipe->stream);
+               assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
 
-       me = &pipe->pipeline;
-       mode = pipe->config.default_capture_config.mode;
-       raw = (mode == IA_CSS_CAPTURE_MODE_RAW);
-       ia_css_pipeline_clean(me);
-       ia_css_pipe_util_create_output_frames(out_frames);
+               me = &pipe->pipeline;
+               mode = pipe->config.default_capture_config.mode;
+               raw = (mode == IA_CSS_CAPTURE_MODE_RAW);
+               ia_css_pipeline_clean(me);
+               ia_css_pipe_util_create_output_frames(out_frames);
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       /* When the input system is 2401, always enable 'in_frameinfo_memory'
-        * except for the following:
-        * - Direct Sensor Mode Online Capture
-        * - Direct Sensor Mode Online Capture
-        * - Direct Sensor Mode Continuous Capture
-        * - Buffered Sensor Mode Continuous Capture
-        */
-       sensor = (pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR);
-       buffered_sensor = (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR);
-       online = pipe->stream->config.online;
-       continuous = pipe->stream->config.continuous;
-       need_in_frameinfo_memory =
+               /* When the input system is 2401, always enable 'in_frameinfo_memory'
+                * except for the following:
+                * - Direct Sensor Mode Online Capture
+                * - Direct Sensor Mode Online Capture
+                * - Direct Sensor Mode Continuous Capture
+                * - Buffered Sensor Mode Continuous Capture
+                */
+               sensor = (pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR);
+               buffered_sensor = (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR);
+               online = pipe->stream->config.online;
+               continuous = pipe->stream->config.continuous;
+               need_in_frameinfo_memory =
                !((sensor && (online || continuous)) || (buffered_sensor && (online || continuous)));
 #else
-       /* Construct in_frame info (only in case we have dynamic input */
-       need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
+               /* Construct in_frame info (only in case we have dynamic input */
+               need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
 #endif
-       if (need_in_frameinfo_memory) {
-               err = init_in_frameinfo_memory_defaults(pipe, &me->in_frame, IA_CSS_FRAME_FORMAT_RAW);
-               if (err != IA_CSS_SUCCESS) {
+               if (need_in_frameinfo_memory)
+               {
+                       err = init_in_frameinfo_memory_defaults(pipe, &me->in_frame,
+                                                               IA_CSS_FRAME_FORMAT_RAW);
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
+
+                       in_frame = &me->in_frame;
+               } else
+               {
+                       in_frame = NULL;
+               }
+
+               err = init_out_frameinfo_defaults(pipe, &me->out_frame[0], 0);
+               if (err != IA_CSS_SUCCESS)
+               {
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
                        return err;
                }
+               out_frame = &me->out_frame[0];
 
-               in_frame = &me->in_frame;
-       } else {
-               in_frame = NULL;
-       }
-
-       err = init_out_frameinfo_defaults(pipe, &me->out_frame[0], 0);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
-       out_frame = &me->out_frame[0];
-
-       /* Construct vf_frame info (only in case we have VF) */
-       if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0]) {
-               if (mode == IA_CSS_CAPTURE_MODE_RAW || mode == IA_CSS_CAPTURE_MODE_BAYER) {
-                       /* These modes don't support viewfinder output */
+               /* Construct vf_frame info (only in case we have VF) */
+               if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0])
+               {
+                       if (mode == IA_CSS_CAPTURE_MODE_RAW || mode == IA_CSS_CAPTURE_MODE_BAYER) {
+                               /* These modes don't support viewfinder output */
+                               vf_frame = NULL;
+                       } else {
+                               init_vf_frameinfo_defaults(pipe, &me->vf_frame[0], 0);
+                               vf_frame = &me->vf_frame[0];
+                       }
+               } else
+               {
                        vf_frame = NULL;
-               } else {
-                       init_vf_frameinfo_defaults(pipe, &me->vf_frame[0], 0);
-                       vf_frame = &me->vf_frame[0];
                }
-       } else {
-               vf_frame = NULL;
-       }
 
-       copy_binary       = &pipe->pipe_settings.capture.copy_binary;
-       num_primary_stage = pipe->pipe_settings.capture.num_primary_stage;
-       if ((num_primary_stage == 0) && (mode == IA_CSS_CAPTURE_MODE_PRIMARY)) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
-               return IA_CSS_ERR_INTERNAL_ERROR;
-       }
-       for (i = 0; i < num_primary_stage; i++) {
-               primary_binary[i] = &pipe->pipe_settings.capture.primary_binary[i];
-       }
-       vf_pp_binary      = &pipe->pipe_settings.capture.vf_pp_binary;
-       pre_isp_binary    = &pipe->pipe_settings.capture.pre_isp_binary;
-       anr_gdc_binary    = &pipe->pipe_settings.capture.anr_gdc_binary;
-       post_isp_binary   = &pipe->pipe_settings.capture.post_isp_binary;
-       capture_pp_binary = &pipe->pipe_settings.capture.capture_pp_binary;
-       yuv_scaler_binary = pipe->pipe_settings.capture.yuv_scaler_binary;
-       num_yuv_scaler    = pipe->pipe_settings.capture.num_yuv_scaler;
-       is_output_stage   = pipe->pipe_settings.capture.is_output_stage;
-       capture_ldc_binary = &pipe->pipe_settings.capture.capture_ldc_binary;
-
-       need_pp = (need_capture_pp(pipe) || pipe->output_stage) &&
-                 mode != IA_CSS_CAPTURE_MODE_RAW &&
-                 mode != IA_CSS_CAPTURE_MODE_BAYER;
-       need_yuv_pp = (yuv_scaler_binary && yuv_scaler_binary->info);
-       need_ldc = (capture_ldc_binary && capture_ldc_binary->info);
-
-       if (pipe->pipe_settings.capture.copy_binary.info) {
-               if (raw) {
-                       ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
+               copy_binary       = &pipe->pipe_settings.capture.copy_binary;
+               num_primary_stage = pipe->pipe_settings.capture.num_primary_stage;
+               if ((num_primary_stage == 0) && (mode == IA_CSS_CAPTURE_MODE_PRIMARY))
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
+                       return IA_CSS_ERR_INTERNAL_ERROR;
+               }
+               for (i = 0; i < num_primary_stage; i++)
+               {
+                       primary_binary[i] = &pipe->pipe_settings.capture.primary_binary[i];
+               }
+               vf_pp_binary      = &pipe->pipe_settings.capture.vf_pp_binary;
+               pre_isp_binary    = &pipe->pipe_settings.capture.pre_isp_binary;
+               anr_gdc_binary    = &pipe->pipe_settings.capture.anr_gdc_binary;
+               post_isp_binary   = &pipe->pipe_settings.capture.post_isp_binary;
+               capture_pp_binary = &pipe->pipe_settings.capture.capture_pp_binary;
+               yuv_scaler_binary = pipe->pipe_settings.capture.yuv_scaler_binary;
+               num_yuv_scaler    = pipe->pipe_settings.capture.num_yuv_scaler;
+               is_output_stage   = pipe->pipe_settings.capture.is_output_stage;
+               capture_ldc_binary = &pipe->pipe_settings.capture.capture_ldc_binary;
+
+               need_pp = (need_capture_pp(pipe) || pipe->output_stage) &&
+                         mode != IA_CSS_CAPTURE_MODE_RAW &&
+                         mode != IA_CSS_CAPTURE_MODE_BAYER;
+               need_yuv_pp = (yuv_scaler_binary && yuv_scaler_binary->info);
+               need_ldc = (capture_ldc_binary && capture_ldc_binary->info);
+
+               if (pipe->pipe_settings.capture.copy_binary.info)
+               {
+                       if (raw) {
+                               ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2401)
-                       if (!continuous) {
+                               if (!continuous) {
+                                       ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
+                                                                          out_frames, in_frame, NULL);
+                               } else {
+                                       in_frame = pipe->stream->last_pipe->continuous_frames[0];
+                                       ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
+                                                                          out_frames, in_frame, NULL);
+                               }
+#else
                                ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
-                                       out_frames, in_frame, NULL);
+                                                                  out_frames, NULL, NULL);
+#endif
                        } else {
-                               in_frame = pipe->stream->last_pipe->continuous_frames[0];
+                               ia_css_pipe_util_set_output_frames(out_frames, 0, in_frame);
                                ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
-                                       out_frames, in_frame, NULL);
+                                                                  out_frames, NULL, NULL);
                        }
-#else
-                       ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
-                               out_frames, NULL, NULL);
-#endif
-               } else {
-                       ia_css_pipe_util_set_output_frames(out_frames, 0, in_frame);
-                       ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
-                               out_frames, NULL, NULL);
-               }
 
-               err = ia_css_pipeline_create_and_add_stage(me,
-                       &stage_desc,
-                       &current_stage);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
+                       err = ia_css_pipeline_create_and_add_stage(me,
+                               &stage_desc,
+                               &current_stage);
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
+               } else if (pipe->stream->config.continuous)
+               {
+                       in_frame = pipe->stream->last_pipe->continuous_frames[0];
                }
-       } else if (pipe->stream->config.continuous) {
-               in_frame = pipe->stream->last_pipe->continuous_frames[0];
-       }
 
-       if (mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
-               struct ia_css_frame *local_in_frame = NULL;
-               struct ia_css_frame *local_out_frame = NULL;
+               if (mode == IA_CSS_CAPTURE_MODE_PRIMARY)
+               {
+                       struct ia_css_frame *local_in_frame = NULL;
+                       struct ia_css_frame *local_out_frame = NULL;
 
-               for (i = 0; i < num_primary_stage; i++) {
-                       if (i == 0)
-                               local_in_frame = in_frame;
-                       else
-                               local_in_frame = NULL;
+                       for (i = 0; i < num_primary_stage; i++) {
+                               if (i == 0)
+                                       local_in_frame = in_frame;
+                               else
+                                       local_in_frame = NULL;
 #ifndef ISP2401
-                       if (!need_pp && (i == num_primary_stage - 1))
+                               if (!need_pp && (i == num_primary_stage - 1))
 #else
-                       if (!need_pp && (i == num_primary_stage - 1) && !need_ldc)
+                               if (!need_pp && (i == num_primary_stage - 1) && !need_ldc)
 #endif
-                               local_out_frame = out_frame;
-                       else
-                               local_out_frame = NULL;
-                       ia_css_pipe_util_set_output_frames(out_frames, 0, local_out_frame);
-/*
- * WARNING: The #if def flag has been added below as a
- * temporary solution to solve the problem of enabling the
- * view finder in a single binary in a capture flow. The
- * vf-pp stage has been removed from Skycam in the solution
- * provided. The vf-pp stage should be re-introduced when
- * required. This  * should not be considered as a clean solution.
- * Proper investigation should be done to come up with the clean
- * solution.
- * */
-                       ia_css_pipe_get_generic_stage_desc(&stage_desc, primary_binary[i],
-                               out_frames, local_in_frame, NULL);
+                                       local_out_frame = out_frame;
+                               else
+                                       local_out_frame = NULL;
+                               ia_css_pipe_util_set_output_frames(out_frames, 0, local_out_frame);
+                               /*
+                                * WARNING: The #if def flag has been added below as a
+                                * temporary solution to solve the problem of enabling the
+                                * view finder in a single binary in a capture flow. The
+                                * vf-pp stage has been removed from Skycam in the solution
+                                * provided. The vf-pp stage should be re-introduced when
+                                * required. This  * should not be considered as a clean solution.
+                                * Proper investigation should be done to come up with the clean
+                                * solution.
+                                * */
+                               ia_css_pipe_get_generic_stage_desc(&stage_desc, primary_binary[i],
+                                                                  out_frames, local_in_frame, NULL);
+                               err = ia_css_pipeline_create_and_add_stage(me,
+                                       &stage_desc,
+                                       &current_stage);
+                               if (err != IA_CSS_SUCCESS) {
+                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                                       return err;
+                               }
+                       }
+                       /* If we use copy iso primary,
+                          the input must be yuv iso raw */
+                       current_stage->args.copy_vf =
+                           primary_binary[0]->info->sp.pipeline.mode ==
+                           IA_CSS_BINARY_MODE_COPY;
+                       current_stage->args.copy_output = current_stage->args.copy_vf;
+               } else if (mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
+                          mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT)
+               {
+                       ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
+                       ia_css_pipe_get_generic_stage_desc(&stage_desc, pre_isp_binary,
+                                                          out_frames, in_frame, NULL);
                        err = ia_css_pipeline_create_and_add_stage(me,
-                               &stage_desc,
-                               &current_stage);
+                               &stage_desc, NULL);
                        if (err != IA_CSS_SUCCESS) {
                                IA_CSS_LEAVE_ERR_PRIVATE(err);
                                return err;
                        }
-               }
-               /* If we use copy iso primary,
-                  the input must be yuv iso raw */
-               current_stage->args.copy_vf =
-                       primary_binary[0]->info->sp.pipeline.mode ==
-                       IA_CSS_BINARY_MODE_COPY;
-               current_stage->args.copy_output = current_stage->args.copy_vf;
-       } else if (mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
-                  mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT) {
-               ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
-               ia_css_pipe_get_generic_stage_desc(&stage_desc, pre_isp_binary,
-                       out_frames, in_frame, NULL);
-               err = ia_css_pipeline_create_and_add_stage(me,
-                               &stage_desc, NULL);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
-               }
-               ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
-               ia_css_pipe_get_generic_stage_desc(&stage_desc, anr_gdc_binary,
-                       out_frames, NULL, NULL);
-               err = ia_css_pipeline_create_and_add_stage(me,
+                       ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
+                       ia_css_pipe_get_generic_stage_desc(&stage_desc, anr_gdc_binary,
+                                                          out_frames, NULL, NULL);
+                       err = ia_css_pipeline_create_and_add_stage(me,
                                &stage_desc, NULL);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
-               }
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
 
-               if (need_pp) {
-                       ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
-                       ia_css_pipe_get_generic_stage_desc(&stage_desc, post_isp_binary,
-                               out_frames, NULL, NULL);
-               } else {
-                       ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
-                       ia_css_pipe_get_generic_stage_desc(&stage_desc, post_isp_binary,
-                               out_frames, NULL, NULL);
-               }
+                       if (need_pp) {
+                               ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
+                               ia_css_pipe_get_generic_stage_desc(&stage_desc, post_isp_binary,
+                                                                  out_frames, NULL, NULL);
+                       } else {
+                               ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
+                               ia_css_pipe_get_generic_stage_desc(&stage_desc, post_isp_binary,
+                                                                  out_frames, NULL, NULL);
+                       }
 
-               err = ia_css_pipeline_create_and_add_stage(me,
+                       err = ia_css_pipeline_create_and_add_stage(me,
                                &stage_desc, &current_stage);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
-               }
-       } else if (mode == IA_CSS_CAPTURE_MODE_BAYER) {
-               ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
-               ia_css_pipe_get_generic_stage_desc(&stage_desc, pre_isp_binary,
-                       out_frames, in_frame, NULL);
-               err = ia_css_pipeline_create_and_add_stage(me,
-                       &stage_desc,
-                       NULL);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
+               } else if (mode == IA_CSS_CAPTURE_MODE_BAYER)
+               {
+                       ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
+                       ia_css_pipe_get_generic_stage_desc(&stage_desc, pre_isp_binary,
+                                                          out_frames, in_frame, NULL);
+                       err = ia_css_pipeline_create_and_add_stage(me,
+                               &stage_desc,
+                               NULL);
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
                }
-       }
 
 #ifndef ISP2401
-       if (need_pp && current_stage) {
-               struct ia_css_frame *local_in_frame = NULL;
+               if (need_pp && current_stage)
+               {
+                       struct ia_css_frame *local_in_frame = NULL;
 
-               local_in_frame = current_stage->args.out_frame[0];
+                       local_in_frame = current_stage->args.out_frame[0];
 
-               if (need_ldc) {
-                       ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
+                       if (need_ldc) {
+                               ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
+                               ia_css_pipe_get_generic_stage_desc(&stage_desc, capture_ldc_binary,
+                                                                  out_frames, local_in_frame, NULL);
+                               err = ia_css_pipeline_create_and_add_stage(me,
+                                       &stage_desc,
+                                       &current_stage);
+                               local_in_frame = current_stage->args.out_frame[0];
+                       }
+                       err = add_capture_pp_stage(pipe, me, local_in_frame,
+                                                  need_yuv_pp ? NULL : out_frame,
+#else
+               /* ldc and capture_pp not supported in same pipeline */
+               if (need_ldc && current_stage)
+               {
+                       in_frame = current_stage->args.out_frame[0];
+                       ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
                        ia_css_pipe_get_generic_stage_desc(&stage_desc, capture_ldc_binary,
-                               out_frames, local_in_frame, NULL);
+                                                          out_frames, in_frame, NULL);
                        err = ia_css_pipeline_create_and_add_stage(me,
                                &stage_desc,
-                               &current_stage);
-                       local_in_frame = current_stage->args.out_frame[0];
-               }
-               err = add_capture_pp_stage(pipe, me, local_in_frame, need_yuv_pp ? NULL : out_frame,
-#else
-       /* ldc and capture_pp not supported in same pipeline */
-       if (need_ldc && current_stage) {
-               in_frame = current_stage->args.out_frame[0];
-               ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
-               ia_css_pipe_get_generic_stage_desc(&stage_desc, capture_ldc_binary,
-                       out_frames, in_frame, NULL);
-               err = ia_css_pipeline_create_and_add_stage(me,
-                       &stage_desc,
-                       NULL);
-       } else if (need_pp && current_stage) {
-               in_frame = current_stage->args.out_frame[0];
-               err = add_capture_pp_stage(pipe, me, in_frame, need_yuv_pp ? NULL : out_frame,
+                               NULL);
+               } else if (need_pp && current_stage)
+               {
+                       in_frame = current_stage->args.out_frame[0];
+                       err = add_capture_pp_stage(pipe, me, in_frame, need_yuv_pp ? NULL : out_frame,
 #endif
-                                          capture_pp_binary,
-                                          &current_stage);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
-               }
-       }
-
-       if (need_yuv_pp && current_stage) {
-               struct ia_css_frame *tmp_in_frame = current_stage->args.out_frame[0];
-               struct ia_css_frame *tmp_out_frame = NULL;
-
-               for (i = 0; i < num_yuv_scaler; i++) {
-                       if (is_output_stage[i] == true)
-                               tmp_out_frame = out_frame;
-                       else
-                               tmp_out_frame = NULL;
-
-                       err = add_yuv_scaler_stage(pipe, me, tmp_in_frame, tmp_out_frame,
-                                                  NULL,
-                                                  &yuv_scaler_binary[i],
-                                                  &yuv_scaler_stage);
+                                                  capture_pp_binary,
+                                                  &current_stage);
                        if (err != IA_CSS_SUCCESS) {
                                IA_CSS_LEAVE_ERR_PRIVATE(err);
                                return err;
                        }
-                       /* we use output port 1 as internal output port */
-                       tmp_in_frame = yuv_scaler_stage->args.out_frame[1];
                }
-       }
-
-/*
- * WARNING: The #if def flag has been added below as a
- * temporary solution to solve the problem of enabling the
- * view finder in a single binary in a capture flow. The vf-pp
- * stage has been removed from Skycam in the solution provided.
- * The vf-pp stage should be re-introduced when required. This
- * should not be considered as a clean solution. Proper
- * investigation should be done to come up with the clean solution.
- * */
-       if (mode != IA_CSS_CAPTURE_MODE_RAW && mode != IA_CSS_CAPTURE_MODE_BAYER && current_stage && vf_frame) {
-               in_frame = current_stage->args.out_vf_frame;
-               err = add_vf_pp_stage(pipe, in_frame, vf_frame, vf_pp_binary,
-                                     &current_stage);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
-               }
-       }
-       ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "create_host_regular_capture_pipeline() leave:\n");
-
-       return IA_CSS_SUCCESS;
-}
-
-static enum ia_css_err
-create_host_capture_pipeline(struct ia_css_pipe *pipe)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
-
-       IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-
-       if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
-               err = create_host_isyscopy_capture_pipeline(pipe);
-       else
-               err = create_host_regular_capture_pipeline(pipe);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
-
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
-
-       return err;
-}
-
-static enum ia_css_err capture_start(
-       struct ia_css_pipe *pipe)
-{
-       struct ia_css_pipeline *me;
-
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       enum sh_css_pipe_config_override copy_ovrd;
-
-       IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if (!pipe) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
-
-       me = &pipe->pipeline;
+               if (need_yuv_pp && current_stage)
+               {
+                       struct ia_css_frame *tmp_in_frame = current_stage->args.out_frame[0];
+                       struct ia_css_frame *tmp_out_frame = NULL;
 
-       if ((pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW   ||
-            pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER) &&
-               (pipe->config.mode != IA_CSS_PIPE_MODE_COPY)) {
-               if (copy_on_sp(pipe)) {
-                       err = start_copy_on_sp(pipe, &me->out_frame[0]);
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
+                       for (i = 0; i < num_yuv_scaler; i++) {
+                               if (is_output_stage[i] == true)
+                                       tmp_out_frame = out_frame;
+                               else
+                                       tmp_out_frame = NULL;
+
+                               err = add_yuv_scaler_stage(pipe, me, tmp_in_frame, tmp_out_frame,
+                                                          NULL,
+                                                          &yuv_scaler_binary[i],
+                                                          &yuv_scaler_stage);
+                               if (err != IA_CSS_SUCCESS) {
+                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                                       return err;
+                               }
+                               /* we use output port 1 as internal output port */
+                               tmp_in_frame = yuv_scaler_stage->args.out_frame[1];
+                       }
                }
-       }
 
-#if defined(USE_INPUT_SYSTEM_VERSION_2)
-       /* old isys: need to send_mipi_frames() in all pipe modes */
-       err = send_mipi_frames(pipe);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
-#elif defined(USE_INPUT_SYSTEM_VERSION_2401)
-       if (pipe->config.mode != IA_CSS_PIPE_MODE_COPY) {
-               err = send_mipi_frames(pipe);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
+               /*
+                * WARNING: The #if def flag has been added below as a
+                * temporary solution to solve the problem of enabling the
+                * view finder in a single binary in a capture flow. The vf-pp
+                * stage has been removed from Skycam in the solution provided.
+                * The vf-pp stage should be re-introduced when required. This
+                * should not be considered as a clean solution. Proper
+                * investigation should be done to come up with the clean solution.
+                * */
+               if (mode != IA_CSS_CAPTURE_MODE_RAW && mode != IA_CSS_CAPTURE_MODE_BAYER && current_stage && vf_frame)
+               {
+                       in_frame = current_stage->args.out_vf_frame;
+                       err = add_vf_pp_stage(pipe, in_frame, vf_frame, vf_pp_binary,
+                                             &current_stage);
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
                }
-       }
-
-#endif
+               ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
 
-       {
-               unsigned int thread_id;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "create_host_regular_capture_pipeline() leave:\n");
 
-               ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
-               copy_ovrd = 1 << thread_id;
+               return IA_CSS_SUCCESS;
        }
-       start_pipe(pipe, copy_ovrd, pipe->stream->config.mode);
 
-#if !defined(HAS_NO_INPUT_SYSTEM) && !defined(USE_INPUT_SYSTEM_VERSION_2401)
-       /*
-        * old isys: for IA_CSS_PIPE_MODE_COPY pipe, isys rx has to be configured,
-        * which is currently done in start_binary(); but COPY pipe contains no binary,
-        * and does not call start_binary(); so we need to configure the rx here.
-        */
-       if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY && pipe->stream->reconfigure_css_rx) {
-               ia_css_isys_rx_configure(&pipe->stream->csi_rx_config, pipe->stream->config.mode);
-               pipe->stream->reconfigure_css_rx = false;
-       }
-#endif
+       static enum ia_css_err
+       create_host_capture_pipeline(struct ia_css_pipe *pipe) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
-       return err;
-}
+               IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
 
-static enum ia_css_err
-sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
-                                 struct ia_css_frame_info *info,
-                                 unsigned int idx)
-{
-       assert(pipe);
-       assert(info);
+               if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
+                       err = create_host_isyscopy_capture_pipeline(pipe);
+               else
+                       err = create_host_regular_capture_pipeline(pipe);
+               if (err != IA_CSS_SUCCESS)
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                               "sh_css_pipe_get_output_frame_info() enter:\n");
+               IA_CSS_LEAVE_ERR_PRIVATE(err);
 
-       *info = pipe->output_info[idx];
-       if (copy_on_sp(pipe) &&
-           pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
-               ia_css_frame_info_init(
-                       info,
-                       JPEG_BYTES,
-                       1,
-                       IA_CSS_FRAME_FORMAT_BINARY_8,
-                       0);
-       } else if (info->format == IA_CSS_FRAME_FORMAT_RAW ||
-                  info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED) {
-       info->raw_bit_depth =
-           ia_css_pipe_util_pipe_input_format_bpp(pipe);
+               return err;
        }
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                               "sh_css_pipe_get_output_frame_info() leave:\n");
-       return IA_CSS_SUCCESS;
-}
+       static enum ia_css_err capture_start(
+           struct ia_css_pipe *pipe) {
+               struct ia_css_pipeline *me;
 
-#if !defined(HAS_NO_INPUT_SYSTEM)
-void
-ia_css_stream_send_input_frame(const struct ia_css_stream *stream,
-                              const unsigned short *data,
-                              unsigned int width,
-                              unsigned int height)
-{
-       assert(stream);
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               enum sh_css_pipe_config_override copy_ovrd;
 
-       ia_css_inputfifo_send_input_frame(
-                       data, width, height,
-                       stream->config.channel_id,
-                       stream->config.input_config.format,
-                       stream->config.pixels_per_clock == 2);
-}
+               IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+               if (!pipe) {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-void
-ia_css_stream_start_input_frame(const struct ia_css_stream *stream)
-{
-       assert(stream);
+               me = &pipe->pipeline;
 
-       ia_css_inputfifo_start_frame(
-                       stream->config.channel_id,
-                       stream->config.input_config.format,
-                       stream->config.pixels_per_clock == 2);
-}
+               if ((pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW   ||
+                    pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER) &&
+                   (pipe->config.mode != IA_CSS_PIPE_MODE_COPY)) {
+                       if (copy_on_sp(pipe)) {
+                               err = start_copy_on_sp(pipe, &me->out_frame[0]);
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
+               }
 
-void
-ia_css_stream_send_input_line(const struct ia_css_stream *stream,
-                             const unsigned short *data,
-                             unsigned int width,
-                             const unsigned short *data2,
-                             unsigned int width2)
-{
-       assert(stream);
+#if defined(USE_INPUT_SYSTEM_VERSION_2)
+               /* old isys: need to send_mipi_frames() in all pipe modes */
+               err = send_mipi_frames(pipe);
+               if (err != IA_CSS_SUCCESS) {
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
+#elif defined(USE_INPUT_SYSTEM_VERSION_2401)
+               if (pipe->config.mode != IA_CSS_PIPE_MODE_COPY) {
+                       err = send_mipi_frames(pipe);
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
+               }
 
-       ia_css_inputfifo_send_line(stream->config.channel_id,
-                                              data, width, data2, width2);
-}
+#endif
 
-void
-ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
-               enum atomisp_input_format format,
-               const unsigned short *data,
-               unsigned int width)
-{
-       assert(stream);
-       if (!data || width == 0)
-               return;
-       ia_css_inputfifo_send_embedded_line(stream->config.channel_id,
-                       format, data, width);
-}
+               {
+                       unsigned int thread_id;
 
-void
-ia_css_stream_end_input_frame(const struct ia_css_stream *stream)
-{
-       assert(stream);
+                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+                       copy_ovrd = 1 << thread_id;
+               }
+               start_pipe(pipe, copy_ovrd, pipe->stream->config.mode);
 
-       ia_css_inputfifo_end_frame(stream->config.channel_id);
-}
+#if !defined(HAS_NO_INPUT_SYSTEM) && !defined(USE_INPUT_SYSTEM_VERSION_2401)
+               /*
+                * old isys: for IA_CSS_PIPE_MODE_COPY pipe, isys rx has to be configured,
+                * which is currently done in start_binary(); but COPY pipe contains no binary,
+                * and does not call start_binary(); so we need to configure the rx here.
+                */
+               if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY &&
+                   pipe->stream->reconfigure_css_rx) {
+                       ia_css_isys_rx_configure(&pipe->stream->csi_rx_config,
+                                                pipe->stream->config.mode);
+                       pipe->stream->reconfigure_css_rx = false;
+               }
 #endif
 
-static void
-append_firmware(struct ia_css_fw_info **l, struct ia_css_fw_info *firmware)
-{
-       IA_CSS_ENTER_PRIVATE("l = %p, firmware = %p", l, firmware);
-       if (!l) {
-               IA_CSS_ERROR("NULL fw_info");
-               IA_CSS_LEAVE_PRIVATE("");
-               return;
+               IA_CSS_LEAVE_ERR_PRIVATE(err);
+               return err;
        }
-       while (*l)
-               l = &(*l)->next;
-       *l = firmware;
-       /*firmware->next = NULL;*/ /* when multiple acc extensions are loaded, 'next' can be not NULL */
-       IA_CSS_LEAVE_PRIVATE("");
-}
-
-static void
-remove_firmware(struct ia_css_fw_info **l, struct ia_css_fw_info *firmware)
-{
-       assert(*l);
-       assert(firmware);
-       (void)l;
-       (void)firmware;
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "remove_firmware() enter:\n");
-
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "remove_firmware() leave:\n");
-       return; /* removing single and multiple firmware is handled in acc_unload_extension() */
-}
 
-static enum ia_css_err upload_isp_code(struct ia_css_fw_info *firmware)
-{
-       hrt_vaddress binary;
+       static enum ia_css_err
+       sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
+                                         struct ia_css_frame_info *info,
+                                         unsigned int idx) {
+               assert(pipe);
+               assert(info);
 
-       if (!firmware) {
-               IA_CSS_ERROR("NULL input parameter");
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
-       binary = firmware->info.isp.xmem_addr;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "sh_css_pipe_get_output_frame_info() enter:\n");
 
-       if (!binary) {
-               unsigned int size = firmware->blob.size;
-               const unsigned char *blob;
-               const unsigned char *binary_name;
+               *info = pipe->output_info[idx];
+               if (copy_on_sp(pipe) &&
+                   pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8)
+               {
+                       ia_css_frame_info_init(
+                           info,
+                           JPEG_BYTES,
+                           1,
+                           IA_CSS_FRAME_FORMAT_BINARY_8,
+                           0);
+               } else if (info->format == IA_CSS_FRAME_FORMAT_RAW ||
+                          info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED)
+               {
+                       info->raw_bit_depth =
+                       ia_css_pipe_util_pipe_input_format_bpp(pipe);
+               }
 
-               binary_name =
-                       (const unsigned char *)(IA_CSS_EXT_ISP_PROG_NAME(
-                                               firmware));
-               blob = binary_name +
-                       strlen((const char *)binary_name) +
-                       1;
-               binary = sh_css_load_blob(blob, size);
-               firmware->info.isp.xmem_addr = binary;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "sh_css_pipe_get_output_frame_info() leave:\n");
+               return IA_CSS_SUCCESS;
        }
 
-       if (!binary)
-               return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-       return IA_CSS_SUCCESS;
-}
+#if !defined(HAS_NO_INPUT_SYSTEM)
+       void
+       ia_css_stream_send_input_frame(const struct ia_css_stream *stream,
+                                      const unsigned short *data,
+                                      unsigned int width,
+                                      unsigned int height) {
+               assert(stream);
+
+               ia_css_inputfifo_send_input_frame(
+                   data, width, height,
+                   stream->config.channel_id,
+                   stream->config.input_config.format,
+                   stream->config.pixels_per_clock == 2);
+       }
+
+       void
+       ia_css_stream_start_input_frame(const struct ia_css_stream *stream) {
+               assert(stream);
+
+               ia_css_inputfifo_start_frame(
+                   stream->config.channel_id,
+                   stream->config.input_config.format,
+                   stream->config.pixels_per_clock == 2);
+       }
+
+       void
+       ia_css_stream_send_input_line(const struct ia_css_stream *stream,
+                                     const unsigned short *data,
+                                     unsigned int width,
+                                     const unsigned short *data2,
+                                     unsigned int width2) {
+               assert(stream);
+
+               ia_css_inputfifo_send_line(stream->config.channel_id,
+                                          data, width, data2, width2);
+       }
+
+       void
+       ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
+                                              enum atomisp_input_format format,
+                                              const unsigned short *data,
+                                              unsigned int width) {
+               assert(stream);
+               if (!data || width == 0)
+                       return;
+               ia_css_inputfifo_send_embedded_line(stream->config.channel_id,
+                                                   format, data, width);
+       }
+
+       void
+       ia_css_stream_end_input_frame(const struct ia_css_stream *stream) {
+               assert(stream);
+
+               ia_css_inputfifo_end_frame(stream->config.channel_id);
+       }
+#endif
+
+       static void
+       append_firmware(struct ia_css_fw_info **l, struct ia_css_fw_info *firmware) {
+               IA_CSS_ENTER_PRIVATE("l = %p, firmware = %p", l, firmware);
+               if (!l) {
+                       IA_CSS_ERROR("NULL fw_info");
+                       IA_CSS_LEAVE_PRIVATE("");
+                       return;
+               }
+               while (*l)
+                       l = &(*l)->next;
+               *l = firmware;
+               /*firmware->next = NULL;*/ /* when multiple acc extensions are loaded, 'next' can be not NULL */
+               IA_CSS_LEAVE_PRIVATE("");
+       }
 
-static enum ia_css_err
-acc_load_extension(struct ia_css_fw_info *firmware)
-{
-       enum ia_css_err err;
-       struct ia_css_fw_info *hd = firmware;
+       static void
+       remove_firmware(struct ia_css_fw_info **l, struct ia_css_fw_info *firmware) {
+               assert(*l);
+               assert(firmware);
+               (void)l;
+               (void)firmware;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "remove_firmware() enter:\n");
 
-       while (hd) {
-               err = upload_isp_code(hd);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-               hd = hd->next;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "remove_firmware() leave:\n");
+               return; /* removing single and multiple firmware is handled in acc_unload_extension() */
        }
 
-       if (!firmware)
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       firmware->loaded = true;
-       return IA_CSS_SUCCESS;
-}
-
-static void
-acc_unload_extension(struct ia_css_fw_info *firmware)
-{
-       struct ia_css_fw_info *hd = firmware;
-       struct ia_css_fw_info *hdn = NULL;
+       static enum ia_css_err upload_isp_code(struct ia_css_fw_info *firmware) {
+               hrt_vaddress binary;
 
-       if (!firmware) /* should not happen */
-               return;
-       /* unload and remove multiple firmwares */
-       while (hd) {
-               hdn = (hd->next) ? &(*hd->next) : NULL;
-               if (hd->info.isp.xmem_addr) {
-                       hmm_free(hd->info.isp.xmem_addr);
-                       hd->info.isp.xmem_addr = mmgr_NULL;
+               if (!firmware) {
+                       IA_CSS_ERROR("NULL input parameter");
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
                }
-               hd->isp_code = NULL;
-               hd->next = NULL;
-               hd = hdn;
-       }
+               binary = firmware->info.isp.xmem_addr;
 
-       firmware->loaded = false;
-}
-
-/* Load firmware for extension */
-static enum ia_css_err
-ia_css_pipe_load_extension(struct ia_css_pipe *pipe,
-                          struct ia_css_fw_info *firmware)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
+               if (!binary) {
+                       unsigned int size = firmware->blob.size;
+                       const unsigned char *blob;
+                       const unsigned char *binary_name;
 
-       IA_CSS_ENTER_PRIVATE("fw = %p pipe = %p", firmware, pipe);
+                       binary_name =
+                           (const unsigned char *)(IA_CSS_EXT_ISP_PROG_NAME(
+                                                       firmware));
+                       blob = binary_name +
+                              strlen((const char *)binary_name) +
+                              1;
+                       binary = sh_css_load_blob(blob, size);
+                       firmware->info.isp.xmem_addr = binary;
+               }
 
-       if ((!firmware) || (!pipe)) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+               if (!binary)
+                       return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+               return IA_CSS_SUCCESS;
        }
 
-       if (firmware->info.isp.type == IA_CSS_ACC_OUTPUT) {
-               if (&pipe->output_stage)
-                       append_firmware(&pipe->output_stage, firmware);
-               else {
-                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
-                       return IA_CSS_ERR_INTERNAL_ERROR;
-               }
-       } else if (firmware->info.isp.type == IA_CSS_ACC_VIEWFINDER) {
-               if (&pipe->vf_stage)
-                       append_firmware(&pipe->vf_stage, firmware);
-               else {
-                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
-                       return IA_CSS_ERR_INTERNAL_ERROR;
+       static enum ia_css_err
+       acc_load_extension(struct ia_css_fw_info *firmware) {
+               enum ia_css_err err;
+               struct ia_css_fw_info *hd = firmware;
+
+               while (hd)
+               {
+                       err = upload_isp_code(hd);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+                       hd = hd->next;
                }
+
+               if (!firmware)
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               firmware->loaded = true;
+               return IA_CSS_SUCCESS;
        }
-       err = acc_load_extension(firmware);
 
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
-       return err;
-}
+       static void
+       acc_unload_extension(struct ia_css_fw_info *firmware) {
+               struct ia_css_fw_info *hd = firmware;
+               struct ia_css_fw_info *hdn = NULL;
 
-/* Unload firmware for extension */
-static void
-ia_css_pipe_unload_extension(struct ia_css_pipe *pipe,
-                            struct ia_css_fw_info *firmware)
-{
-       IA_CSS_ENTER_PRIVATE("fw = %p pipe = %p", firmware, pipe);
+               if (!firmware) /* should not happen */
+                       return;
+               /* unload and remove multiple firmwares */
+               while (hd) {
+                       hdn = (hd->next) ? &(*hd->next) : NULL;
+                       if (hd->info.isp.xmem_addr) {
+                               hmm_free(hd->info.isp.xmem_addr);
+                               hd->info.isp.xmem_addr = mmgr_NULL;
+                       }
+                       hd->isp_code = NULL;
+                       hd->next = NULL;
+                       hd = hdn;
+               }
 
-       if ((!firmware) || (!pipe)) {
-               IA_CSS_ERROR("NULL input parameters");
-               IA_CSS_LEAVE_PRIVATE("");
-               return;
+               firmware->loaded = false;
        }
 
-       if (firmware->info.isp.type == IA_CSS_ACC_OUTPUT)
-               remove_firmware(&pipe->output_stage, firmware);
-       else if (firmware->info.isp.type == IA_CSS_ACC_VIEWFINDER)
-               remove_firmware(&pipe->vf_stage, firmware);
-       acc_unload_extension(firmware);
+       /* Load firmware for extension */
+       static enum ia_css_err
+       ia_css_pipe_load_extension(struct ia_css_pipe *pipe,
+                                  struct ia_css_fw_info *firmware) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_LEAVE_PRIVATE("");
-}
+               IA_CSS_ENTER_PRIVATE("fw = %p pipe = %p", firmware, pipe);
 
-bool
-ia_css_pipeline_uses_params(struct ia_css_pipeline *me)
-{
-       struct ia_css_pipeline_stage *stage;
+               if ((!firmware) || (!pipe))
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       assert(me);
+               if (firmware->info.isp.type == IA_CSS_ACC_OUTPUT)
+               {
+                       if (&pipe->output_stage)
+                               append_firmware(&pipe->output_stage, firmware);
+                       else {
+                               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
+                               return IA_CSS_ERR_INTERNAL_ERROR;
+                       }
+               } else if (firmware->info.isp.type == IA_CSS_ACC_VIEWFINDER)
+               {
+                       if (&pipe->vf_stage)
+                               append_firmware(&pipe->vf_stage, firmware);
+                       else {
+                               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
+                               return IA_CSS_ERR_INTERNAL_ERROR;
+                       }
+               }
+               err = acc_load_extension(firmware);
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_pipeline_uses_params() enter: me=%p\n", me);
+               IA_CSS_LEAVE_ERR_PRIVATE(err);
+               return err;
+       }
 
-       for (stage = me->stages; stage; stage = stage->next)
-               if (stage->binary_info && stage->binary_info->enable.params) {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_pipeline_uses_params() leave: return_bool=true\n");
-                       return true;
+       /* Unload firmware for extension */
+       static void
+       ia_css_pipe_unload_extension(struct ia_css_pipe *pipe,
+                                    struct ia_css_fw_info *firmware) {
+               IA_CSS_ENTER_PRIVATE("fw = %p pipe = %p", firmware, pipe);
+
+               if ((!firmware) || (!pipe)) {
+                       IA_CSS_ERROR("NULL input parameters");
+                       IA_CSS_LEAVE_PRIVATE("");
+                       return;
                }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_pipeline_uses_params() leave: return_bool=false\n");
-       return false;
-}
 
-static enum ia_css_err
-sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline,
-                             const void *acc_fw)
-{
-       struct ia_css_fw_info *fw = (struct ia_css_fw_info *)acc_fw;
-       /* In QoS case, load_extension already called, so skipping */
-       enum ia_css_err err = IA_CSS_SUCCESS;
+               if (firmware->info.isp.type == IA_CSS_ACC_OUTPUT)
+                       remove_firmware(&pipe->output_stage, firmware);
+               else if (firmware->info.isp.type == IA_CSS_ACC_VIEWFINDER)
+                       remove_firmware(&pipe->vf_stage, firmware);
+               acc_unload_extension(firmware);
+
+               IA_CSS_LEAVE_PRIVATE("");
+       }
 
-       if (fw->loaded == false)
-               err = acc_load_extension(fw);
+       bool
+       ia_css_pipeline_uses_params(struct ia_css_pipeline *me) {
+               struct ia_css_pipeline_stage *stage;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "sh_css_pipeline_add_acc_stage() enter: pipeline=%p, acc_fw=%p\n",
-               pipeline, acc_fw);
+               assert(me);
 
-       if (err == IA_CSS_SUCCESS) {
-               struct ia_css_pipeline_stage_desc stage_desc;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "ia_css_pipeline_uses_params() enter: me=%p\n", me);
 
-               ia_css_pipe_get_acc_stage_desc(&stage_desc, NULL, fw);
-               err = ia_css_pipeline_create_and_add_stage(pipeline,
-                       &stage_desc,
-                       NULL);
+               for (stage = me->stages; stage; stage = stage->next)
+                       if (stage->binary_info && stage->binary_info->enable.params) {
+                               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                                   "ia_css_pipeline_uses_params() leave: return_bool=true\n");
+                               return true;
+                       }
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "ia_css_pipeline_uses_params() leave: return_bool=false\n");
+               return false;
        }
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "sh_css_pipeline_add_acc_stage() leave: return_err=%d\n", err);
-       return err;
-}
+       static enum ia_css_err
+       sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline,
+                                     const void *acc_fw) {
+               struct ia_css_fw_info *fw = (struct ia_css_fw_info *)acc_fw;
+               /* In QoS case, load_extension already called, so skipping */
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-/*
- * @brief Tag a specific frame in continuous capture.
- * Refer to "sh_css_internal.h" for details.
- */
-enum ia_css_err ia_css_stream_capture_frame(struct ia_css_stream *stream,
-                               unsigned int exp_id)
-{
-       struct sh_css_tag_descr tag_descr;
-       u32 encoded_tag_descr;
-       enum ia_css_err err;
+               if (fw->loaded == false)
+                       err = acc_load_extension(fw);
 
-       assert(stream);
-       IA_CSS_ENTER("exp_id=%d", exp_id);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "sh_css_pipeline_add_acc_stage() enter: pipeline=%p, acc_fw=%p\n",
+                                   pipeline, acc_fw);
 
-       /* Only continuous streams have a tagger */
-       if (exp_id == 0 || !stream->config.continuous) {
-               IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
+               if (err == IA_CSS_SUCCESS)
+               {
+                       struct ia_css_pipeline_stage_desc stage_desc;
 
-       if (!sh_css_sp_is_running()) {
-               /* SP is not running. The queues are not valid */
-               IA_CSS_LEAVE_ERR(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
-               return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+                       ia_css_pipe_get_acc_stage_desc(&stage_desc, NULL, fw);
+                       err = ia_css_pipeline_create_and_add_stage(pipeline,
+                               &stage_desc,
+                               NULL);
+               }
+
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "sh_css_pipeline_add_acc_stage() leave: return_err=%d\n", err);
+               return err;
        }
 
-       /* Create the tag descriptor from the parameters */
-       sh_css_create_tag_descr(0, 0, 0, exp_id, &tag_descr);
-       /* Encode the tag descriptor into a 32-bit value */
-       encoded_tag_descr = sh_css_encode_tag_descr(&tag_descr);
-       /* Enqueue the encoded tag to the host2sp queue.
-        * Note: The pipe and stage IDs for tag_cmd queue are hard-coded to 0
-        * on both host and the SP side.
-        * It is mainly because it is enough to have only one tag_cmd queue */
-       err = ia_css_bufq_enqueue_tag_cmd(encoded_tag_descr);
+       /*
+        * @brief Tag a specific frame in continuous capture.
+        * Refer to "sh_css_internal.h" for details.
+        */
+       enum ia_css_err ia_css_stream_capture_frame(struct ia_css_stream *stream,
+               unsigned int exp_id) {
+               struct sh_css_tag_descr tag_descr;
+               u32 encoded_tag_descr;
+               enum ia_css_err err;
 
-       IA_CSS_LEAVE_ERR(err);
-       return err;
-}
+               assert(stream);
+               IA_CSS_ENTER("exp_id=%d", exp_id);
 
-/*
- * @brief Configure the continuous capture.
- * Refer to "sh_css_internal.h" for details.
- */
-enum ia_css_err ia_css_stream_capture(
-       struct ia_css_stream *stream,
-       int num_captures,
-       unsigned int skip,
-       int offset)
-{
-       struct sh_css_tag_descr tag_descr;
-       unsigned int encoded_tag_descr;
-       enum ia_css_err return_err;
+               /* Only continuous streams have a tagger */
+               if (exp_id == 0 || !stream->config.continuous) {
+                       IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       if (!stream)
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+               if (!sh_css_sp_is_running()) {
+                       /* SP is not running. The queues are not valid */
+                       IA_CSS_LEAVE_ERR(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
+                       return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+               }
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_stream_capture() enter: num_captures=%d, skip=%d, offset=%d\n",
-               num_captures, skip, offset);
+               /* Create the tag descriptor from the parameters */
+               sh_css_create_tag_descr(0, 0, 0, exp_id, &tag_descr);
+               /* Encode the tag descriptor into a 32-bit value */
+               encoded_tag_descr = sh_css_encode_tag_descr(&tag_descr);
+               /* Enqueue the encoded tag to the host2sp queue.
+                * Note: The pipe and stage IDs for tag_cmd queue are hard-coded to 0
+                * on both host and the SP side.
+                * It is mainly because it is enough to have only one tag_cmd queue */
+               err = ia_css_bufq_enqueue_tag_cmd(encoded_tag_descr);
 
-       /* Check if the tag descriptor is valid */
-       if (num_captures < SH_CSS_MINIMUM_TAG_ID) {
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                                   "ia_css_stream_capture() leave: return_err=%d\n",
-                                   IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+               IA_CSS_LEAVE_ERR(err);
+               return err;
        }
 
-       /* Create the tag descriptor from the parameters */
-       sh_css_create_tag_descr(num_captures, skip, offset, 0, &tag_descr);
-
-       /* Encode the tag descriptor into a 32-bit value */
-       encoded_tag_descr = sh_css_encode_tag_descr(&tag_descr);
+       /*
+        * @brief Configure the continuous capture.
+        * Refer to "sh_css_internal.h" for details.
+        */
+       enum ia_css_err ia_css_stream_capture(
+           struct ia_css_stream *stream,
+           int num_captures,
+           unsigned int skip,
+           int offset) {
+               struct sh_css_tag_descr tag_descr;
+               unsigned int encoded_tag_descr;
+               enum ia_css_err return_err;
+
+               if (!stream)
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       if (!sh_css_sp_is_running()) {
-               /* SP is not running. The queues are not valid */
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                       "ia_css_stream_capture() leaving:queues unavailable\n");
-               return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
-       }
+                                   "ia_css_stream_capture() enter: num_captures=%d, skip=%d, offset=%d\n",
+                                   num_captures, skip, offset);
+
+               /* Check if the tag descriptor is valid */
+               if (num_captures < SH_CSS_MINIMUM_TAG_ID) {
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                           "ia_css_stream_capture() leave: return_err=%d\n",
+                                           IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       /* Enqueue the encoded tag to the host2sp queue.
-        * Note: The pipe and stage IDs for tag_cmd queue are hard-coded to 0
-        * on both host and the SP side.
-        * It is mainly because it is enough to have only one tag_cmd queue */
-       return_err = ia_css_bufq_enqueue_tag_cmd((uint32_t)encoded_tag_descr);
+               /* Create the tag descriptor from the parameters */
+               sh_css_create_tag_descr(num_captures, skip, offset, 0, &tag_descr);
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_stream_capture() leave: return_err=%d\n",
-               return_err);
+               /* Encode the tag descriptor into a 32-bit value */
+               encoded_tag_descr = sh_css_encode_tag_descr(&tag_descr);
 
-       return return_err;
-}
+               if (!sh_css_sp_is_running()) {
+                       /* SP is not running. The queues are not valid */
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                           "ia_css_stream_capture() leaving:queues unavailable\n");
+                       return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+               }
 
-void ia_css_stream_request_flash(struct ia_css_stream *stream)
-{
-       (void)stream;
+               /* Enqueue the encoded tag to the host2sp queue.
+                * Note: The pipe and stage IDs for tag_cmd queue are hard-coded to 0
+                * on both host and the SP side.
+                * It is mainly because it is enough to have only one tag_cmd queue */
+               return_err = ia_css_bufq_enqueue_tag_cmd((uint32_t)encoded_tag_descr);
+
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "ia_css_stream_capture() leave: return_err=%d\n",
+                                   return_err);
+
+               return return_err;
+       }
 
-       assert(stream);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_request_flash() enter: void\n");
+       void ia_css_stream_request_flash(struct ia_css_stream *stream) {
+               (void)stream;
+
+               assert(stream);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "ia_css_stream_request_flash() enter: void\n");
 
 #ifndef ISP2401
-       sh_css_write_host2sp_command(host2sp_cmd_start_flash);
+               sh_css_write_host2sp_command(host2sp_cmd_start_flash);
 #else
-       if (sh_css_sp_is_running()) {
-               if (!sh_css_write_host2sp_command(host2sp_cmd_start_flash)) {
-                       IA_CSS_ERROR("Call to 'sh-css_write_host2sp_command()' failed");
-                       ia_css_debug_dump_sp_sw_debug_info();
-                       ia_css_debug_dump_debug_info(NULL);
-               }
-       } else
-               IA_CSS_LOG("SP is not running!");
+               if (sh_css_sp_is_running()) {
+                       if (!sh_css_write_host2sp_command(host2sp_cmd_start_flash)) {
+                               IA_CSS_ERROR("Call to 'sh-css_write_host2sp_command()' failed");
+                               ia_css_debug_dump_sp_sw_debug_info();
+                               ia_css_debug_dump_debug_info(NULL);
+                       }
+               } else
+                       IA_CSS_LOG("SP is not running!");
 
 #endif
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_stream_request_flash() leave: return_void\n");
-}
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "ia_css_stream_request_flash() leave: return_void\n");
+       }
 
-static void
-sh_css_init_host_sp_control_vars(void)
-{
-       const struct ia_css_fw_info *fw;
-       unsigned int HIVE_ADDR_ia_css_ispctrl_sp_isp_started;
+       static void
+       sh_css_init_host_sp_control_vars(void) {
+               const struct ia_css_fw_info *fw;
+               unsigned int HIVE_ADDR_ia_css_ispctrl_sp_isp_started;
 
-       unsigned int HIVE_ADDR_host_sp_queues_initialized;
-       unsigned int HIVE_ADDR_sp_sleep_mode;
-       unsigned int HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
+               unsigned int HIVE_ADDR_host_sp_queues_initialized;
+               unsigned int HIVE_ADDR_sp_sleep_mode;
+               unsigned int HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
 #ifndef ISP2401
-       unsigned int HIVE_ADDR_sp_stop_copy_preview;
+               unsigned int HIVE_ADDR_sp_stop_copy_preview;
 #endif
-       unsigned int HIVE_ADDR_host_sp_com;
-       unsigned int o = offsetof(struct host_sp_communication, host2sp_command)
-                               / sizeof(int);
+               unsigned int HIVE_ADDR_host_sp_com;
+               unsigned int o = offsetof(struct host_sp_communication, host2sp_command)
+                                / sizeof(int);
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
-       unsigned int i;
+               unsigned int i;
 #endif
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_init_host_sp_control_vars() enter: void\n");
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "sh_css_init_host_sp_control_vars() enter: void\n");
 
-       fw = &sh_css_sp_fw;
-       HIVE_ADDR_ia_css_ispctrl_sp_isp_started = fw->info.sp.isp_started;
+               fw = &sh_css_sp_fw;
+               HIVE_ADDR_ia_css_ispctrl_sp_isp_started = fw->info.sp.isp_started;
 
-       HIVE_ADDR_host_sp_queues_initialized =
-               fw->info.sp.host_sp_queues_initialized;
-       HIVE_ADDR_sp_sleep_mode = fw->info.sp.sleep_mode;
-       HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb = fw->info.sp.invalidate_tlb;
+               HIVE_ADDR_host_sp_queues_initialized =
+                   fw->info.sp.host_sp_queues_initialized;
+               HIVE_ADDR_sp_sleep_mode = fw->info.sp.sleep_mode;
+               HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb = fw->info.sp.invalidate_tlb;
 #ifndef ISP2401
-       HIVE_ADDR_sp_stop_copy_preview = fw->info.sp.stop_copy_preview;
+               HIVE_ADDR_sp_stop_copy_preview = fw->info.sp.stop_copy_preview;
 #endif
-       HIVE_ADDR_host_sp_com = fw->info.sp.host_sp_com;
+               HIVE_ADDR_host_sp_com = fw->info.sp.host_sp_com;
 
-       (void)HIVE_ADDR_ia_css_ispctrl_sp_isp_started; /* Suppres warnings in CRUN */
+               (void)HIVE_ADDR_ia_css_ispctrl_sp_isp_started; /* Suppres warnings in CRUN */
 
-       (void)HIVE_ADDR_sp_sleep_mode;
-       (void)HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
+               (void)HIVE_ADDR_sp_sleep_mode;
+               (void)HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
 #ifndef ISP2401
-       (void)HIVE_ADDR_sp_stop_copy_preview;
-#endif
-       (void)HIVE_ADDR_host_sp_com;
-
-       sp_dmem_store_uint32(SP0_ID,
-               (unsigned int)sp_address_of(ia_css_ispctrl_sp_isp_started),
-               (uint32_t)(0));
-
-       sp_dmem_store_uint32(SP0_ID,
-               (unsigned int)sp_address_of(host_sp_queues_initialized),
-               (uint32_t)(0));
-       sp_dmem_store_uint32(SP0_ID,
-               (unsigned int)sp_address_of(sp_sleep_mode),
-               (uint32_t)(0));
-       sp_dmem_store_uint32(SP0_ID,
-               (unsigned int)sp_address_of(ia_css_dmaproxy_sp_invalidate_tlb),
-               (uint32_t)(false));
+               (void)HIVE_ADDR_sp_stop_copy_preview;
+#endif
+               (void)HIVE_ADDR_host_sp_com;
+
+               sp_dmem_store_uint32(SP0_ID,
+                                    (unsigned int)sp_address_of(ia_css_ispctrl_sp_isp_started),
+                                    (uint32_t)(0));
+
+               sp_dmem_store_uint32(SP0_ID,
+                                    (unsigned int)sp_address_of(host_sp_queues_initialized),
+                                    (uint32_t)(0));
+               sp_dmem_store_uint32(SP0_ID,
+                                    (unsigned int)sp_address_of(sp_sleep_mode),
+                                    (uint32_t)(0));
+               sp_dmem_store_uint32(SP0_ID,
+                                    (unsigned int)sp_address_of(ia_css_dmaproxy_sp_invalidate_tlb),
+                                    (uint32_t)(false));
 #ifndef ISP2401
-       sp_dmem_store_uint32(SP0_ID,
-               (unsigned int)sp_address_of(sp_stop_copy_preview),
-               my_css.stop_copy_preview ? (uint32_t)(1) : (uint32_t)(0));
+               sp_dmem_store_uint32(SP0_ID,
+                                    (unsigned int)sp_address_of(sp_stop_copy_preview),
+                                    my_css.stop_copy_preview ? (uint32_t)(1) : (uint32_t)(0));
 #endif
-       store_sp_array_uint(host_sp_com, o, host2sp_cmd_ready);
+               store_sp_array_uint(host_sp_com, o, host2sp_cmd_ready);
 
 #if !defined(HAS_NO_INPUT_SYSTEM)
-       for (i = 0; i < N_CSI_PORTS; i++) {
-               sh_css_update_host2sp_num_mipi_frames
+               for (i = 0; i < N_CSI_PORTS; i++) {
+                       sh_css_update_host2sp_num_mipi_frames
                        (my_css.num_mipi_frames[i]);
-       }
+               }
 #endif
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_init_host_sp_control_vars() leave: return_void\n");
-}
-
-/*
- * create the internal structures and fill in the configuration data
- */
-void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config)
-{
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_config_defaults()\n");
-       *pipe_config = DEFAULT_PIPE_CONFIG;
-}
-
-void
-ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config *extra_config)
-{
-       if (!extra_config) {
-               IA_CSS_ERROR("NULL input parameter");
-               return;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+                                   "sh_css_init_host_sp_control_vars() leave: return_void\n");
        }
 
-       extra_config->enable_raw_binning = false;
-       extra_config->enable_yuv_ds = false;
-       extra_config->enable_high_speed = false;
-       extra_config->enable_dvs_6axis = false;
-       extra_config->enable_reduced_pipe = false;
-       extra_config->disable_vf_pp = false;
-       extra_config->enable_fractional_ds = false;
-}
-
-void ia_css_stream_config_defaults(struct ia_css_stream_config *stream_config)
-{
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_config_defaults()\n");
-       assert(stream_config);
-       memset(stream_config, 0, sizeof(*stream_config));
-       stream_config->online = true;
-       stream_config->left_padding = -1;
-       stream_config->pixels_per_clock = 1;
-       /* temporary default value for backwards compatibility.
-        * This field used to be hardcoded within CSS but this has now
-        * been moved to the stream_config struct. */
-       stream_config->source.port.rxcount = 0x04040404;
-}
-
-static enum ia_css_err
-ia_css_acc_pipe_create(struct ia_css_pipe *pipe)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       /*
+        * create the internal structures and fill in the configuration data
+        */
+       void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config) {
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_config_defaults()\n");
+               *pipe_config = DEFAULT_PIPE_CONFIG;
+       }
+
+       void
+       ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config
+                                         *extra_config) {
+               if (!extra_config) {
+                       IA_CSS_ERROR("NULL input parameter");
+                       return;
+               }
+
+               extra_config->enable_raw_binning = false;
+               extra_config->enable_yuv_ds = false;
+               extra_config->enable_high_speed = false;
+               extra_config->enable_dvs_6axis = false;
+               extra_config->enable_reduced_pipe = false;
+               extra_config->disable_vf_pp = false;
+               extra_config->enable_fractional_ds = false;
+       }
+
+       void ia_css_stream_config_defaults(struct ia_css_stream_config *stream_config) {
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_config_defaults()\n");
+               assert(stream_config);
+               memset(stream_config, 0, sizeof(*stream_config));
+               stream_config->online = true;
+               stream_config->left_padding = -1;
+               stream_config->pixels_per_clock = 1;
+               /* temporary default value for backwards compatibility.
+                * This field used to be hardcoded within CSS but this has now
+                * been moved to the stream_config struct. */
+               stream_config->source.port.rxcount = 0x04040404;
+       }
+
+       static enum ia_css_err
+       ia_css_acc_pipe_create(struct ia_css_pipe *pipe) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
+
+               if (!pipe)
+               {
+                       IA_CSS_ERROR("NULL input parameter");
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       if (!pipe) {
-               IA_CSS_ERROR("NULL input parameter");
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
+               /* There is not meaning for num_execs = 0 semantically. Run atleast once. */
+               if (pipe->config.acc_num_execs == 0)
+                       pipe->config.acc_num_execs = 1;
 
-       /* There is not meaning for num_execs = 0 semantically. Run atleast once. */
-       if (pipe->config.acc_num_execs == 0)
-               pipe->config.acc_num_execs = 1;
+               if (pipe->config.acc_extension)
+               {
+                       err = ia_css_pipe_load_extension(pipe, pipe->config.acc_extension);
+               }
 
-       if (pipe->config.acc_extension) {
-               err = ia_css_pipe_load_extension(pipe, pipe->config.acc_extension);
+               return err;
        }
 
-       return err;
-}
-
-enum ia_css_err
-ia_css_pipe_create(const struct ia_css_pipe_config *config,
-                  struct ia_css_pipe **pipe)
-{
+       enum ia_css_err
+       ia_css_pipe_create(const struct ia_css_pipe_config *config,
+                          struct ia_css_pipe **pipe) {
 #ifndef ISP2401
-       if (!config)
+               if (!config)
 #else
-       enum ia_css_err err = IA_CSS_SUCCESS;
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_ENTER_PRIVATE("config = %p, pipe = %p", config, pipe);
+               IA_CSS_ENTER_PRIVATE("config = %p, pipe = %p", config, pipe);
 
-       if (!config) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+               if (!config)
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
 #endif
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
 #ifndef ISP2401
-       if (!pipe)
+               if (!pipe)
 #else
        }
-       if (!pipe) {
+       if (!pipe)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
 #endif
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
 #ifndef ISP2401
-       return ia_css_pipe_create_extra(config, NULL, pipe);
+               return ia_css_pipe_create_extra(config, NULL, pipe);
 #else
        }
 
        err = ia_css_pipe_create_extra(config, NULL, pipe);
 
-       if (err == IA_CSS_SUCCESS) {
+       if (err == IA_CSS_SUCCESS)
+       {
                IA_CSS_LOG("pipe created successfully = %p", *pipe);
        }
 
@@ -8912,1390 +9156,1434 @@ ia_css_pipe_create(const struct ia_css_pipe_config *config,
 
        return err;
 #endif
-}
-
-enum ia_css_err
-ia_css_pipe_create_extra(const struct ia_css_pipe_config *config,
-                        const struct ia_css_pipe_extra_config *extra_config,
-                        struct ia_css_pipe **pipe)
-{
-       enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
-       struct ia_css_pipe *internal_pipe = NULL;
-       unsigned int i;
-
-       IA_CSS_ENTER_PRIVATE("config = %p, extra_config = %p and pipe = %p", config, extra_config, pipe);
-
-       /* do not allow to create more than the maximum limit */
-       if (my_css.pipe_counter >= IA_CSS_PIPELINE_NUM_MAX) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_RESOURCE_EXHAUSTED);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if ((!pipe) || (!config)) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
+       enum ia_css_err
+       ia_css_pipe_create_extra(const struct ia_css_pipe_config *config,
+                                const struct ia_css_pipe_extra_config *extra_config,
+                                struct ia_css_pipe **pipe) {
+               enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
+               struct ia_css_pipe *internal_pipe = NULL;
+               unsigned int i;
 
-       ia_css_debug_dump_pipe_config(config);
-       ia_css_debug_dump_pipe_extra_config(extra_config);
+               IA_CSS_ENTER_PRIVATE("config = %p, extra_config = %p and pipe = %p", config, extra_config, pipe);
 
-       err = create_pipe(config->mode, &internal_pipe, false);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
+               /* do not allow to create more than the maximum limit */
+               if (my_css.pipe_counter >= IA_CSS_PIPELINE_NUM_MAX)
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_RESOURCE_EXHAUSTED);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       /* now we have a pipe structure to fill */
-       internal_pipe->config = *config;
-       if (extra_config)
-               internal_pipe->extra_config = *extra_config;
-       else
-               ia_css_pipe_extra_config_defaults(&internal_pipe->extra_config);
+               if ((!pipe) || (!config))
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       if (config->mode == IA_CSS_PIPE_MODE_ACC) {
-               /* Temporary hack to migrate acceleration to CSS 2.0.
-                * In the future the code for all pipe types should be
-                * unified. */
-               *pipe = internal_pipe;
-               if (!internal_pipe->config.acc_extension &&
-                       internal_pipe->config.num_acc_stages == 0){ /* if no acc binary and no standalone stage */
-                       *pipe = NULL;
-                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
-                       return IA_CSS_SUCCESS;
+               ia_css_debug_dump_pipe_config(config);
+               ia_css_debug_dump_pipe_extra_config(extra_config);
+
+               err = create_pipe(config->mode, &internal_pipe, false);
+               if (err != IA_CSS_SUCCESS)
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
                }
-               return ia_css_acc_pipe_create(internal_pipe);
-       }
 
-       /* Use config value when dvs_frame_delay setting equal to 2, otherwise always 1 by default */
-       if (internal_pipe->config.dvs_frame_delay == IA_CSS_FRAME_DELAY_2)
-               internal_pipe->dvs_frame_delay = 2;
-       else
-               internal_pipe->dvs_frame_delay = 1;
+               /* now we have a pipe structure to fill */
+               internal_pipe->config = *config;
+               if (extra_config)
+                       internal_pipe->extra_config = *extra_config;
+               else
+                       ia_css_pipe_extra_config_defaults(&internal_pipe->extra_config);
 
-       /* we still keep enable_raw_binning for backward compatibility, for any new
-          fractional bayer downscaling, we should use bayer_ds_out_res. if both are
-          specified, bayer_ds_out_res will take precedence.if none is specified, we
-          set bayer_ds_out_res equal to IF output resolution(IF may do cropping on
-          sensor output) or use default decimation factor 1. */
-       if (internal_pipe->extra_config.enable_raw_binning &&
-                internal_pipe->config.bayer_ds_out_res.width) {
-               /* fill some code here, if no code is needed, please remove it during integration */
-       }
+               if (config->mode == IA_CSS_PIPE_MODE_ACC)
+               {
+                       /* Temporary hack to migrate acceleration to CSS 2.0.
+                        * In the future the code for all pipe types should be
+                        * unified. */
+                       *pipe = internal_pipe;
+                       if (!internal_pipe->config.acc_extension &&
+                           internal_pipe->config.num_acc_stages ==
+                           0) { /* if no acc binary and no standalone stage */
+                               *pipe = NULL;
+                               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+                               return IA_CSS_SUCCESS;
+                       }
+                       return ia_css_acc_pipe_create(internal_pipe);
+               }
 
-       /* YUV downscaling */
-       if ((internal_pipe->config.vf_pp_in_res.width ||
-                internal_pipe->config.capt_pp_in_res.width)) {
-               enum ia_css_frame_format format;
+               /* Use config value when dvs_frame_delay setting equal to 2, otherwise always 1 by default */
+               if (internal_pipe->config.dvs_frame_delay == IA_CSS_FRAME_DELAY_2)
+                       internal_pipe->dvs_frame_delay = 2;
+               else
+                       internal_pipe->dvs_frame_delay = 1;
+
+               /* we still keep enable_raw_binning for backward compatibility, for any new
+                  fractional bayer downscaling, we should use bayer_ds_out_res. if both are
+                  specified, bayer_ds_out_res will take precedence.if none is specified, we
+                  set bayer_ds_out_res equal to IF output resolution(IF may do cropping on
+                  sensor output) or use default decimation factor 1. */
+               if (internal_pipe->extra_config.enable_raw_binning &&
+                   internal_pipe->config.bayer_ds_out_res.width)
+               {
+                       /* fill some code here, if no code is needed, please remove it during integration */
+               }
 
-               if (internal_pipe->config.vf_pp_in_res.width) {
-                       format = IA_CSS_FRAME_FORMAT_YUV_LINE;
-                       ia_css_frame_info_init(
-                               &internal_pipe->vf_yuv_ds_input_info,
-                               internal_pipe->config.vf_pp_in_res.width,
-                               internal_pipe->config.vf_pp_in_res.height,
-                               format, 0);
+               /* YUV downscaling */
+               if ((internal_pipe->config.vf_pp_in_res.width ||
+                    internal_pipe->config.capt_pp_in_res.width))
+               {
+                       enum ia_css_frame_format format;
+
+                       if (internal_pipe->config.vf_pp_in_res.width) {
+                               format = IA_CSS_FRAME_FORMAT_YUV_LINE;
+                               ia_css_frame_info_init(
+                                   &internal_pipe->vf_yuv_ds_input_info,
+                                   internal_pipe->config.vf_pp_in_res.width,
+                                   internal_pipe->config.vf_pp_in_res.height,
+                                   format, 0);
+                       }
+                       if (internal_pipe->config.capt_pp_in_res.width) {
+                               format = IA_CSS_FRAME_FORMAT_YUV420;
+                               ia_css_frame_info_init(
+                                   &internal_pipe->out_yuv_ds_input_info,
+                                   internal_pipe->config.capt_pp_in_res.width,
+                                   internal_pipe->config.capt_pp_in_res.height,
+                                   format, 0);
+                       }
                }
-               if (internal_pipe->config.capt_pp_in_res.width) {
-                       format = IA_CSS_FRAME_FORMAT_YUV420;
+               if (internal_pipe->config.vf_pp_in_res.width &&
+                   internal_pipe->config.mode == IA_CSS_PIPE_MODE_PREVIEW)
+               {
                        ia_css_frame_info_init(
-                               &internal_pipe->out_yuv_ds_input_info,
-                               internal_pipe->config.capt_pp_in_res.width,
-                               internal_pipe->config.capt_pp_in_res.height,
-                               format, 0);
+                           &internal_pipe->vf_yuv_ds_input_info,
+                           internal_pipe->config.vf_pp_in_res.width,
+                           internal_pipe->config.vf_pp_in_res.height,
+                           IA_CSS_FRAME_FORMAT_YUV_LINE, 0);
                }
-       }
-       if (internal_pipe->config.vf_pp_in_res.width &&
-           internal_pipe->config.mode == IA_CSS_PIPE_MODE_PREVIEW) {
-               ia_css_frame_info_init(
-                               &internal_pipe->vf_yuv_ds_input_info,
-                               internal_pipe->config.vf_pp_in_res.width,
-                               internal_pipe->config.vf_pp_in_res.height,
-                               IA_CSS_FRAME_FORMAT_YUV_LINE, 0);
-       }
-       /* handle bayer downscaling output info */
-       if (internal_pipe->config.bayer_ds_out_res.width) {
+               /* handle bayer downscaling output info */
+               if (internal_pipe->config.bayer_ds_out_res.width)
+               {
                        ia_css_frame_info_init(
-                               &internal_pipe->bds_output_info,
-                               internal_pipe->config.bayer_ds_out_res.width,
-                               internal_pipe->config.bayer_ds_out_res.height,
-                               IA_CSS_FRAME_FORMAT_RAW, 0);
-       }
-
-       /* handle output info, assume always needed */
-       for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
-               if (internal_pipe->config.output_info[i].res.width) {
-                       err = sh_css_pipe_configure_output(
-                                       internal_pipe,
-                                       internal_pipe->config.output_info[i].res.width,
-                                       internal_pipe->config.output_info[i].res.height,
-                                       internal_pipe->config.output_info[i].padded_width,
-                                       internal_pipe->config.output_info[i].format,
-                                       i);
-                       if (err != IA_CSS_SUCCESS) {
-                               IA_CSS_LEAVE_ERR_PRIVATE(err);
-                               sh_css_free(internal_pipe);
-                               internal_pipe = NULL;
-                               return err;
-                       }
+                           &internal_pipe->bds_output_info,
+                           internal_pipe->config.bayer_ds_out_res.width,
+                           internal_pipe->config.bayer_ds_out_res.height,
+                           IA_CSS_FRAME_FORMAT_RAW, 0);
                }
 
-               /* handle vf output info, when configured */
-               internal_pipe->enable_viewfinder[i] = (internal_pipe->config.vf_output_info[i].res.width != 0);
-               if (internal_pipe->config.vf_output_info[i].res.width) {
-                       err = sh_css_pipe_configure_viewfinder(
-                                       internal_pipe,
-                                       internal_pipe->config.vf_output_info[i].res.width,
-                                       internal_pipe->config.vf_output_info[i].res.height,
-                                       internal_pipe->config.vf_output_info[i].padded_width,
-                                       internal_pipe->config.vf_output_info[i].format,
-                                       i);
+               /* handle output info, assume always needed */
+               for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++)
+               {
+                       if (internal_pipe->config.output_info[i].res.width) {
+                               err = sh_css_pipe_configure_output(
+                                         internal_pipe,
+                                         internal_pipe->config.output_info[i].res.width,
+                                         internal_pipe->config.output_info[i].res.height,
+                                         internal_pipe->config.output_info[i].padded_width,
+                                         internal_pipe->config.output_info[i].format,
+                                         i);
+                               if (err != IA_CSS_SUCCESS) {
+                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                                       sh_css_free(internal_pipe);
+                                       internal_pipe = NULL;
+                                       return err;
+                               }
+                       }
+
+                       /* handle vf output info, when configured */
+                       internal_pipe->enable_viewfinder[i] =
+                           (internal_pipe->config.vf_output_info[i].res.width != 0);
+                       if (internal_pipe->config.vf_output_info[i].res.width) {
+                               err = sh_css_pipe_configure_viewfinder(
+                                         internal_pipe,
+                                         internal_pipe->config.vf_output_info[i].res.width,
+                                         internal_pipe->config.vf_output_info[i].res.height,
+                                         internal_pipe->config.vf_output_info[i].padded_width,
+                                         internal_pipe->config.vf_output_info[i].format,
+                                         i);
+                               if (err != IA_CSS_SUCCESS) {
+                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                                       sh_css_free(internal_pipe);
+                                       internal_pipe = NULL;
+                                       return err;
+                               }
+                       }
+               }
+               if (internal_pipe->config.acc_extension)
+               {
+                       err = ia_css_pipe_load_extension(internal_pipe,
+                                                        internal_pipe->config.acc_extension);
                        if (err != IA_CSS_SUCCESS) {
                                IA_CSS_LEAVE_ERR_PRIVATE(err);
                                sh_css_free(internal_pipe);
-                               internal_pipe = NULL;
                                return err;
                        }
                }
-       }
-       if (internal_pipe->config.acc_extension) {
-               err = ia_css_pipe_load_extension(internal_pipe,
-                       internal_pipe->config.acc_extension);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       sh_css_free(internal_pipe);
-                       return err;
-               }
-       }
-       /* set all info to zeroes first */
-       memset(&internal_pipe->info, 0, sizeof(internal_pipe->info));
+               /* set all info to zeroes first */
+               memset(&internal_pipe->info, 0, sizeof(internal_pipe->info));
 
-       /* all went well, return the pipe */
-       *pipe = internal_pipe;
-       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
-       return IA_CSS_SUCCESS;
-}
-
-enum ia_css_err
-ia_css_pipe_get_info(const struct ia_css_pipe *pipe,
-                    struct ia_css_pipe_info *pipe_info)
-{
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "ia_css_pipe_get_info()\n");
-       assert(pipe_info);
-       if (!pipe_info) {
-               ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
-                       "ia_css_pipe_get_info: pipe_info cannot be NULL\n");
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+               /* all went well, return the pipe */
+               *pipe = internal_pipe;
+               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+               return IA_CSS_SUCCESS;
        }
-       if (!pipe || !pipe->stream) {
-               ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
-                       "ia_css_pipe_get_info: ia_css_stream_create needs to be called before ia_css_[stream/pipe]_get_info\n");
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+
+       enum ia_css_err
+       ia_css_pipe_get_info(const struct ia_css_pipe *pipe,
+                            struct ia_css_pipe_info *pipe_info) {
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "ia_css_pipe_get_info()\n");
+               assert(pipe_info);
+               if (!pipe_info)
+               {
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
+                                           "ia_css_pipe_get_info: pipe_info cannot be NULL\n");
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
+               if (!pipe || !pipe->stream)
+               {
+                       ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
+                                           "ia_css_pipe_get_info: ia_css_stream_create needs to be called before ia_css_[stream/pipe]_get_info\n");
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
+               /* we succeeded return the info */
+               *pipe_info = pipe->info;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_get_info() leave\n");
+               return IA_CSS_SUCCESS;
        }
-       /* we succeeded return the info */
-       *pipe_info = pipe->info;
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_get_info() leave\n");
-       return IA_CSS_SUCCESS;
-}
 
-bool ia_css_pipe_has_dvs_stats(struct ia_css_pipe_info *pipe_info)
-{
-       unsigned int i;
+       bool ia_css_pipe_has_dvs_stats(struct ia_css_pipe_info *pipe_info) {
+               unsigned int i;
 
-       if (pipe_info) {
-               for (i = 0; i < IA_CSS_DVS_STAT_NUM_OF_LEVELS; i++) {
-                       if (pipe_info->grid_info.dvs_grid.dvs_stat_grid_info.grd_cfg[i].grd_start.enable)
-                               return true;
+               if (pipe_info) {
+                       for (i = 0; i < IA_CSS_DVS_STAT_NUM_OF_LEVELS; i++) {
+                               if (pipe_info->grid_info.dvs_grid.dvs_stat_grid_info.grd_cfg[i].grd_start.enable)
+                                       return true;
+                       }
                }
-       }
 
-       return false;
-}
+               return false;
+       }
 
 #ifdef ISP2401
-enum ia_css_err
-ia_css_pipe_override_frame_format(struct ia_css_pipe *pipe,
-                               int pin_index,
-                               enum ia_css_frame_format new_format)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       enum ia_css_err
+       ia_css_pipe_override_frame_format(struct ia_css_pipe *pipe,
+                                         int pin_index,
+                                         enum ia_css_frame_format new_format) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_ENTER_PRIVATE("pipe = %p, pin_index = %d, new_formats = %d", pipe, pin_index, new_format);
+               IA_CSS_ENTER_PRIVATE("pipe = %p, pin_index = %d, new_formats = %d", pipe, pin_index, new_format);
 
-       if (!pipe) {
-               IA_CSS_ERROR("pipe is not set");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
-       if (0 != pin_index && 1 != pin_index) {
-               IA_CSS_ERROR("pin index is not valid");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
-       if (new_format != IA_CSS_FRAME_FORMAT_NV12_TILEY) {
-               IA_CSS_ERROR("new format is not valid");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       } else {
-               err = ia_css_pipe_check_format(pipe, new_format);
-               if (err == IA_CSS_SUCCESS) {
-                       if (pin_index == 0) {
-                               pipe->output_info[0].format = new_format;
-                       } else {
-                               pipe->vf_output_info[0].format = new_format;
+               if (!pipe)
+               {
+                       IA_CSS_ERROR("pipe is not set");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
+               if (0 != pin_index && 1 != pin_index)
+               {
+                       IA_CSS_ERROR("pin index is not valid");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
+               if (new_format != IA_CSS_FRAME_FORMAT_NV12_TILEY)
+               {
+                       IA_CSS_ERROR("new format is not valid");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               } else
+               {
+                       err = ia_css_pipe_check_format(pipe, new_format);
+                       if (err == IA_CSS_SUCCESS) {
+                               if (pin_index == 0) {
+                                       pipe->output_info[0].format = new_format;
+                               } else {
+                                       pipe->vf_output_info[0].format = new_format;
+                               }
                        }
                }
+               IA_CSS_LEAVE_ERR_PRIVATE(err);
+               return err;
        }
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
-       return err;
-}
 
 #endif
 #if defined(USE_INPUT_SYSTEM_VERSION_2)
-/* Configuration of INPUT_SYSTEM_VERSION_2401 is done on SP */
-static enum ia_css_err
-ia_css_stream_configure_rx(struct ia_css_stream *stream)
-{
-       struct ia_css_input_port *config;
-
-       assert(stream);
-
-       config = &stream->config.source.port;
-/* AM: this code is not reliable, especially for 2400 */
-       if (config->num_lanes == 1)
-               stream->csi_rx_config.mode = MONO_1L_1L_0L;
-       else if (config->num_lanes == 2)
-               stream->csi_rx_config.mode = MONO_2L_1L_0L;
-       else if (config->num_lanes == 3)
-               stream->csi_rx_config.mode = MONO_3L_1L_0L;
-       else if (config->num_lanes == 4)
-               stream->csi_rx_config.mode = MONO_4L_1L_0L;
-       else if (config->num_lanes != 0)
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+       /* Configuration of INPUT_SYSTEM_VERSION_2401 is done on SP */
+       static enum ia_css_err
+       ia_css_stream_configure_rx(struct ia_css_stream *stream) {
+               struct ia_css_input_port *config;
+
+               assert(stream);
+
+               config = &stream->config.source.port;
+               /* AM: this code is not reliable, especially for 2400 */
+               if (config->num_lanes == 1)
+                       stream->csi_rx_config.mode = MONO_1L_1L_0L;
+               else if (config->num_lanes == 2)
+                       stream->csi_rx_config.mode = MONO_2L_1L_0L;
+               else if (config->num_lanes == 3)
+                       stream->csi_rx_config.mode = MONO_3L_1L_0L;
+               else if (config->num_lanes == 4)
+                       stream->csi_rx_config.mode = MONO_4L_1L_0L;
+               else if (config->num_lanes != 0)
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       if (config->port > MIPI_PORT2_ID)
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       stream->csi_rx_config.port =
+               if (config->port > MIPI_PORT2_ID)
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               stream->csi_rx_config.port =
                ia_css_isys_port_to_mipi_port(config->port);
-       stream->csi_rx_config.timeout    = config->timeout;
-       stream->csi_rx_config.initcount  = 0;
-       stream->csi_rx_config.synccount  = 0x28282828;
-       stream->csi_rx_config.rxcount    = config->rxcount;
-       if (config->compression.type == IA_CSS_CSI2_COMPRESSION_TYPE_NONE)
-               stream->csi_rx_config.comp = MIPI_PREDICTOR_NONE;
-       else {
-               /* not implemented yet, requires extension of the rx_cfg_t
-                * struct */
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
-       stream->csi_rx_config.is_two_ppc = (stream->config.pixels_per_clock == 2);
-       stream->reconfigure_css_rx = true;
-       return IA_CSS_SUCCESS;
-}
-#endif
-
-static struct ia_css_pipe *
-find_pipe(struct ia_css_pipe *pipes[],
-               unsigned int num_pipes,
-               enum ia_css_pipe_mode mode,
-               bool copy_pipe)
-{
-       unsigned int i;
-
-       assert(pipes);
-       for (i = 0; i < num_pipes; i++) {
-               assert(pipes[i]);
-               if (pipes[i]->config.mode != mode)
-                       continue;
-               if (copy_pipe && pipes[i]->mode != IA_CSS_PIPE_ID_COPY)
-                       continue;
-               return pipes[i];
+               stream->csi_rx_config.timeout    = config->timeout;
+               stream->csi_rx_config.initcount  = 0;
+               stream->csi_rx_config.synccount  = 0x28282828;
+               stream->csi_rx_config.rxcount    = config->rxcount;
+               if (config->compression.type == IA_CSS_CSI2_COMPRESSION_TYPE_NONE)
+                       stream->csi_rx_config.comp = MIPI_PREDICTOR_NONE;
+               else
+               {
+                       /* not implemented yet, requires extension of the rx_cfg_t
+                        * struct */
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
+               stream->csi_rx_config.is_two_ppc = (stream->config.pixels_per_clock == 2);
+               stream->reconfigure_css_rx = true;
+               return IA_CSS_SUCCESS;
        }
-       return NULL;
-}
-
-static enum ia_css_err
-ia_css_acc_stream_create(struct ia_css_stream *stream)
-{
-       int i;
-       enum ia_css_err err = IA_CSS_SUCCESS;
+#endif
 
-       assert(stream);
-       IA_CSS_ENTER_PRIVATE("stream = %p", stream);
+       static struct ia_css_pipe *
+       find_pipe(struct ia_css_pipe *pipes[],
+                 unsigned int num_pipes,
+                 enum ia_css_pipe_mode mode,
+                 bool copy_pipe) {
+               unsigned int i;
 
-       if (!stream) {
-               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+               assert(pipes);
+               for (i = 0; i < num_pipes; i++) {
+                       assert(pipes[i]);
+                       if (pipes[i]->config.mode != mode)
+                               continue;
+                       if (copy_pipe && pipes[i]->mode != IA_CSS_PIPE_ID_COPY)
+                               continue;
+                       return pipes[i];
+               }
+               return NULL;
        }
 
-       for (i = 0;  i < stream->num_pipes; i++) {
-               struct ia_css_pipe *pipe = stream->pipes[i];
+       static enum ia_css_err
+       ia_css_acc_stream_create(struct ia_css_stream *stream) {
+               int i;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+
+               assert(stream);
+               IA_CSS_ENTER_PRIVATE("stream = %p", stream);
 
-               assert(pipe);
-               if (!pipe) {
+               if (!stream)
+               {
                        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
                }
 
-               pipe->stream = stream;
-       }
+               for (i = 0;  i < stream->num_pipes; i++)
+               {
+                       struct ia_css_pipe *pipe = stream->pipes[i];
 
-       /* Map SP threads before doing anything. */
-       err = map_sp_threads(stream, true);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
+                       assert(pipe);
+                       if (!pipe) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+                               return IA_CSS_ERR_INVALID_ARGUMENTS;
+                       }
+
+                       pipe->stream = stream;
+               }
 
-       for (i = 0;  i < stream->num_pipes; i++) {
-               struct ia_css_pipe *pipe = stream->pipes[i];
+               /* Map SP threads before doing anything. */
+               err = map_sp_threads(stream, true);
+               if (err != IA_CSS_SUCCESS)
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
 
-               assert(pipe);
-               ia_css_pipe_map_queue(pipe, true);
-       }
+               for (i = 0;  i < stream->num_pipes; i++)
+               {
+                       struct ia_css_pipe *pipe = stream->pipes[i];
 
-       err = create_host_pipeline_structure(stream);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
+                       assert(pipe);
+                       ia_css_pipe_map_queue(pipe, true);
+               }
+
+               err = create_host_pipeline_structure(stream);
+               if (err != IA_CSS_SUCCESS)
+               {
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
 
-       stream->started = false;
+               stream->started = false;
 
-       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
 
-       return IA_CSS_SUCCESS;
-}
+               return IA_CSS_SUCCESS;
+       }
 
-static enum ia_css_err
-metadata_info_init(const struct ia_css_metadata_config *mdc,
-                  struct ia_css_metadata_info *md)
-{
-       /* Either both width and height should be set or neither */
-       if ((mdc->resolution.height > 0) ^ (mdc->resolution.width > 0))
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
+       static enum ia_css_err
+       metadata_info_init(const struct ia_css_metadata_config *mdc,
+                          struct ia_css_metadata_info *md) {
+               /* Either both width and height should be set or neither */
+               if ((mdc->resolution.height > 0) ^ (mdc->resolution.width > 0))
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       md->resolution = mdc->resolution;
-       /* We round up the stride to a multiple of the width
-        * of the port going to DDR, this is a HW requirements (DMA). */
-       md->stride = CEIL_MUL(mdc->resolution.width, HIVE_ISP_DDR_WORD_BYTES);
-       md->size = mdc->resolution.height * md->stride;
-       return IA_CSS_SUCCESS;
-}
+               md->resolution = mdc->resolution;
+               /* We round up the stride to a multiple of the width
+                * of the port going to DDR, this is a HW requirements (DMA). */
+               md->stride = CEIL_MUL(mdc->resolution.width, HIVE_ISP_DDR_WORD_BYTES);
+               md->size = mdc->resolution.height * md->stride;
+               return IA_CSS_SUCCESS;
+       }
 
 #ifdef ISP2401
-static enum ia_css_err check_pipe_resolutions(const struct ia_css_pipe *pipe)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       static enum ia_css_err check_pipe_resolutions(const struct ia_css_pipe *pipe) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_ENTER_PRIVATE("");
+               IA_CSS_ENTER_PRIVATE("");
 
-       if (!pipe || !pipe->stream) {
-               IA_CSS_ERROR("null arguments");
-               err = IA_CSS_ERR_INTERNAL_ERROR;
-               goto EXIT;
-       }
+               if (!pipe || !pipe->stream) {
+                       IA_CSS_ERROR("null arguments");
+                       err = IA_CSS_ERR_INTERNAL_ERROR;
+                       goto EXIT;
+               }
 
-       if (ia_css_util_check_res(pipe->config.input_effective_res.width,
-                               pipe->config.input_effective_res.height) != IA_CSS_SUCCESS) {
-               IA_CSS_ERROR("effective resolution not supported");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               goto EXIT;
-       }
-       if (!ia_css_util_resolution_is_zero(pipe->stream->config.input_config.input_res)) {
-               if (!ia_css_util_res_leq(pipe->config.input_effective_res,
-                                               pipe->stream->config.input_config.input_res)) {
-                       IA_CSS_ERROR("effective resolution is larger than input resolution");
+               if (ia_css_util_check_res(pipe->config.input_effective_res.width,
+                                         pipe->config.input_effective_res.height) != IA_CSS_SUCCESS) {
+                       IA_CSS_ERROR("effective resolution not supported");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       goto EXIT;
+               }
+               if (!ia_css_util_resolution_is_zero(
+                       pipe->stream->config.input_config.input_res)) {
+                       if (!ia_css_util_res_leq(pipe->config.input_effective_res,
+                                                pipe->stream->config.input_config.input_res)) {
+                               IA_CSS_ERROR("effective resolution is larger than input resolution");
+                               err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                               goto EXIT;
+                       }
+               }
+               if (!ia_css_util_resolution_is_even(pipe->config.output_info[0].res)) {
+                       IA_CSS_ERROR("output resolution must be even");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       goto EXIT;
+               }
+               if (!ia_css_util_resolution_is_even(pipe->config.vf_output_info[0].res)) {
+                       IA_CSS_ERROR("VF resolution must be even");
                        err = IA_CSS_ERR_INVALID_ARGUMENTS;
                        goto EXIT;
                }
-       }
-       if (!ia_css_util_resolution_is_even(pipe->config.output_info[0].res)) {
-               IA_CSS_ERROR("output resolution must be even");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               goto EXIT;
-       }
-       if (!ia_css_util_resolution_is_even(pipe->config.vf_output_info[0].res)) {
-               IA_CSS_ERROR("VF resolution must be even");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               goto EXIT;
-       }
 EXIT:
-       IA_CSS_LEAVE_ERR_PRIVATE(err);
-       return err;
-}
+               IA_CSS_LEAVE_ERR_PRIVATE(err);
+               return err;
+       }
 
 #endif
 
-enum ia_css_err
-ia_css_stream_create(const struct ia_css_stream_config *stream_config,
-                                        int num_pipes,
-                                        struct ia_css_pipe *pipes[],
-                                        struct ia_css_stream **stream)
-{
-       struct ia_css_pipe *curr_pipe;
-       struct ia_css_stream *curr_stream = NULL;
-       bool spcopyonly;
-       bool sensor_binning_changed;
-       int i, j;
-       enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
-       struct ia_css_metadata_info md_info;
+       enum ia_css_err
+       ia_css_stream_create(const struct ia_css_stream_config *stream_config,
+                            int num_pipes,
+                            struct ia_css_pipe *pipes[],
+                            struct ia_css_stream **stream) {
+               struct ia_css_pipe *curr_pipe;
+               struct ia_css_stream *curr_stream = NULL;
+               bool spcopyonly;
+               bool sensor_binning_changed;
+               int i, j;
+               enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
+               struct ia_css_metadata_info md_info;
 #ifndef ISP2401
-       struct ia_css_resolution effective_res;
+               struct ia_css_resolution effective_res;
 #else
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       bool aspect_ratio_crop_enabled = false;
+               bool aspect_ratio_crop_enabled = false;
 #endif
 #endif
 
-       IA_CSS_ENTER("num_pipes=%d", num_pipes);
-       ia_css_debug_dump_stream_config(stream_config, num_pipes);
+               IA_CSS_ENTER("num_pipes=%d", num_pipes);
+               ia_css_debug_dump_stream_config(stream_config, num_pipes);
 
-       /* some checks */
-       if (num_pipes == 0 ||
-               !stream ||
-               !pipes) {
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
+               /* some checks */
+               if (num_pipes == 0 ||
+                   !stream ||
+                   !pipes)
+               {
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE_ERR(err);
+                       return err;
+               }
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2)
-       /* We don't support metadata for JPEG stream, since they both use str2mem */
-       if (stream_config->input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8 &&
-           stream_config->metadata_config.resolution.height > 0) {
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
+               /* We don't support metadata for JPEG stream, since they both use str2mem */
+               if (stream_config->input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8 &&
+                   stream_config->metadata_config.resolution.height > 0)
+               {
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE_ERR(err);
+                       return err;
+               }
 #endif
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       if (stream_config->online && stream_config->pack_raw_pixels) {
-               IA_CSS_LOG("online and pack raw is invalid on input system 2401");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
+               if (stream_config->online && stream_config->pack_raw_pixels)
+               {
+                       IA_CSS_LOG("online and pack raw is invalid on input system 2401");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE_ERR(err);
+                       return err;
+               }
 #endif
 
 #if !defined(HAS_NO_INPUT_SYSTEM)
-       ia_css_debug_pipe_graph_dump_stream_config(stream_config);
+               ia_css_debug_pipe_graph_dump_stream_config(stream_config);
 
-       /* check if mipi size specified */
-       if (stream_config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+               /* check if mipi size specified */
+               if (stream_config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       if (!stream_config->online)
+                       if (!stream_config->online)
 #endif
-       {
-               unsigned int port = (unsigned int)stream_config->source.port.port;
+                       {
+                               unsigned int port = (unsigned int)stream_config->source.port.port;
 
-               if (port >= N_MIPI_PORT_ID) {
-                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                               if (port >= N_MIPI_PORT_ID) {
+                                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                                       IA_CSS_LEAVE_ERR(err);
+                                       return err;
+                               }
+
+                               if (my_css.size_mem_words != 0) {
+                                       my_css.mipi_frame_size[port] = my_css.size_mem_words;
+                               } else if (stream_config->mipi_buffer_config.size_mem_words != 0) {
+                                       my_css.mipi_frame_size[port] = stream_config->mipi_buffer_config.size_mem_words;
+                               } else {
+                                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                                           "ia_css_stream_create() exit: error, need to set mipi frame size.\n");
+                                       assert(stream_config->mipi_buffer_config.size_mem_words != 0);
+                                       err = IA_CSS_ERR_INTERNAL_ERROR;
+                                       IA_CSS_LEAVE_ERR(err);
+                                       return err;
+                               }
+
+                               if (my_css.size_mem_words != 0) {
+                                       my_css.num_mipi_frames[port] =
+                                           2; /* Temp change: Default for backwards compatibility. */
+                               } else if (stream_config->mipi_buffer_config.nof_mipi_buffers != 0) {
+                                       my_css.num_mipi_frames[port] =
+                                           stream_config->mipi_buffer_config.nof_mipi_buffers;
+                               } else {
+                                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                                           "ia_css_stream_create() exit: error, need to set number of mipi frames.\n");
+                                       assert(stream_config->mipi_buffer_config.nof_mipi_buffers != 0);
+                                       err = IA_CSS_ERR_INTERNAL_ERROR;
+                                       IA_CSS_LEAVE_ERR(err);
+                                       return err;
+                               }
+                       }
+#endif
+
+               /* Currently we only supported metadata up to a certain size. */
+               err = metadata_info_init(&stream_config->metadata_config, &md_info);
+               if (err != IA_CSS_SUCCESS)
+               {
                        IA_CSS_LEAVE_ERR(err);
                        return err;
                }
 
-               if (my_css.size_mem_words != 0) {
-                       my_css.mipi_frame_size[port] = my_css.size_mem_words;
-               } else if (stream_config->mipi_buffer_config.size_mem_words != 0) {
-                       my_css.mipi_frame_size[port] = stream_config->mipi_buffer_config.size_mem_words;
-               } else {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_stream_create() exit: error, need to set mipi frame size.\n");
-                       assert(stream_config->mipi_buffer_config.size_mem_words != 0);
-                       err = IA_CSS_ERR_INTERNAL_ERROR;
+               /* allocate the stream instance */
+               curr_stream = kmalloc(sizeof(struct ia_css_stream), GFP_KERNEL);
+               if (!curr_stream)
+               {
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                        IA_CSS_LEAVE_ERR(err);
                        return err;
                }
+               /* default all to 0 */
+               memset(curr_stream, 0, sizeof(struct ia_css_stream));
+               curr_stream->info.metadata_info = md_info;
 
-               if (my_css.size_mem_words != 0) {
-                       my_css.num_mipi_frames[port] = 2; /* Temp change: Default for backwards compatibility. */
-               } else if (stream_config->mipi_buffer_config.nof_mipi_buffers != 0) {
-                       my_css.num_mipi_frames[port] = stream_config->mipi_buffer_config.nof_mipi_buffers;
-               } else {
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                               "ia_css_stream_create() exit: error, need to set number of mipi frames.\n");
-                       assert(stream_config->mipi_buffer_config.nof_mipi_buffers != 0);
-                       err = IA_CSS_ERR_INTERNAL_ERROR;
+               /* allocate pipes */
+               curr_stream->num_pipes = num_pipes;
+               curr_stream->pipes = kcalloc(num_pipes, sizeof(struct ia_css_pipe *), GFP_KERNEL);
+               if (!curr_stream->pipes)
+               {
+                       curr_stream->num_pipes = 0;
+                       kfree(curr_stream);
+                       curr_stream = NULL;
+                       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                        IA_CSS_LEAVE_ERR(err);
                        return err;
                }
-       }
-#endif
-
-       /* Currently we only supported metadata up to a certain size. */
-       err = metadata_info_init(&stream_config->metadata_config, &md_info);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
-
-       /* allocate the stream instance */
-       curr_stream = kmalloc(sizeof(struct ia_css_stream), GFP_KERNEL);
-       if (!curr_stream) {
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
-       /* default all to 0 */
-       memset(curr_stream, 0, sizeof(struct ia_css_stream));
-       curr_stream->info.metadata_info = md_info;
-
-       /* allocate pipes */
-       curr_stream->num_pipes = num_pipes;
-       curr_stream->pipes = kcalloc(num_pipes, sizeof(struct ia_css_pipe *), GFP_KERNEL);
-       if (!curr_stream->pipes) {
-               curr_stream->num_pipes = 0;
-               kfree(curr_stream);
-               curr_stream = NULL;
-               err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
-       /* store pipes */
-       spcopyonly = (num_pipes == 1) && (pipes[0]->config.mode == IA_CSS_PIPE_MODE_COPY);
-       for (i = 0; i < num_pipes; i++)
-               curr_stream->pipes[i] = pipes[i];
-       curr_stream->last_pipe = curr_stream->pipes[0];
-       /* take over stream config */
-       curr_stream->config = *stream_config;
+               /* store pipes */
+               spcopyonly = (num_pipes == 1) && (pipes[0]->config.mode == IA_CSS_PIPE_MODE_COPY);
+               for (i = 0; i < num_pipes; i++)
+                       curr_stream->pipes[i] = pipes[i];
+               curr_stream->last_pipe = curr_stream->pipes[0];
+               /* take over stream config */
+               curr_stream->config = *stream_config;
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2401) && defined(CSI2P_DISABLE_ISYS2401_ONLINE_MODE)
-       if (stream_config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR &&
-               stream_config->online)
-               curr_stream->config.online = false;
+               if (stream_config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR &&
+                   stream_config->online)
+                       curr_stream->config.online = false;
 #endif
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       if (curr_stream->config.online) {
-               curr_stream->config.source.port.num_lanes = stream_config->source.port.num_lanes;
-               curr_stream->config.mode =  IA_CSS_INPUT_MODE_BUFFERED_SENSOR;
-       }
+               if (curr_stream->config.online)
+               {
+                       curr_stream->config.source.port.num_lanes =
+                           stream_config->source.port.num_lanes;
+                       curr_stream->config.mode =  IA_CSS_INPUT_MODE_BUFFERED_SENSOR;
+               }
 #endif
-       /* in case driver doesn't configure init number of raw buffers, configure it here */
-       if (curr_stream->config.target_num_cont_raw_buf == 0)
-               curr_stream->config.target_num_cont_raw_buf = NUM_CONTINUOUS_FRAMES;
-       if (curr_stream->config.init_num_cont_raw_buf == 0)
-               curr_stream->config.init_num_cont_raw_buf = curr_stream->config.target_num_cont_raw_buf;
+               /* in case driver doesn't configure init number of raw buffers, configure it here */
+               if (curr_stream->config.target_num_cont_raw_buf == 0)
+                       curr_stream->config.target_num_cont_raw_buf = NUM_CONTINUOUS_FRAMES;
+               if (curr_stream->config.init_num_cont_raw_buf == 0)
+                       curr_stream->config.init_num_cont_raw_buf = curr_stream->config.target_num_cont_raw_buf;
 
-       /* Enable locking & unlocking of buffers in RAW buffer pool */
-       if (curr_stream->config.ia_css_enable_raw_buffer_locking)
-               sh_css_sp_configure_enable_raw_pool_locking(
-                                       curr_stream->config.lock_all);
+               /* Enable locking & unlocking of buffers in RAW buffer pool */
+               if (curr_stream->config.ia_css_enable_raw_buffer_locking)
+                       sh_css_sp_configure_enable_raw_pool_locking(
+                           curr_stream->config.lock_all);
 
-       /* copy mode specific stuff */
-       switch (curr_stream->config.mode) {
+               /* copy mode specific stuff */
+               switch (curr_stream->config.mode)
+               {
                case IA_CSS_INPUT_MODE_SENSOR:
                case IA_CSS_INPUT_MODE_BUFFERED_SENSOR:
 #if defined(USE_INPUT_SYSTEM_VERSION_2)
-               ia_css_stream_configure_rx(curr_stream);
+                       ia_css_stream_configure_rx(curr_stream);
 #endif
-               break;
-       case IA_CSS_INPUT_MODE_TPG:
+                       break;
+               case IA_CSS_INPUT_MODE_TPG:
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
-               IA_CSS_LOG("tpg_configuration: x_mask=%d, y_mask=%d, x_delta=%d, y_delta=%d, xy_mask=%d",
-                       curr_stream->config.source.tpg.x_mask,
-                       curr_stream->config.source.tpg.y_mask,
-                       curr_stream->config.source.tpg.x_delta,
-                       curr_stream->config.source.tpg.y_delta,
-                       curr_stream->config.source.tpg.xy_mask);
-
-               sh_css_sp_configure_tpg(
-                       curr_stream->config.source.tpg.x_mask,
-                       curr_stream->config.source.tpg.y_mask,
-                       curr_stream->config.source.tpg.x_delta,
-                       curr_stream->config.source.tpg.y_delta,
-                       curr_stream->config.source.tpg.xy_mask);
+                       IA_CSS_LOG("tpg_configuration: x_mask=%d, y_mask=%d, x_delta=%d, y_delta=%d, xy_mask=%d",
+                                  curr_stream->config.source.tpg.x_mask,
+                                  curr_stream->config.source.tpg.y_mask,
+                                  curr_stream->config.source.tpg.x_delta,
+                                  curr_stream->config.source.tpg.y_delta,
+                                  curr_stream->config.source.tpg.xy_mask);
+
+                       sh_css_sp_configure_tpg(
+                           curr_stream->config.source.tpg.x_mask,
+                           curr_stream->config.source.tpg.y_mask,
+                           curr_stream->config.source.tpg.x_delta,
+                           curr_stream->config.source.tpg.y_delta,
+                           curr_stream->config.source.tpg.xy_mask);
 #endif
-               break;
-       case IA_CSS_INPUT_MODE_PRBS:
+                       break;
+               case IA_CSS_INPUT_MODE_PRBS:
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
-               IA_CSS_LOG("mode prbs");
-               sh_css_sp_configure_prbs(curr_stream->config.source.prbs.seed);
+                       IA_CSS_LOG("mode prbs");
+                       sh_css_sp_configure_prbs(curr_stream->config.source.prbs.seed);
 #endif
-               break;
-       case IA_CSS_INPUT_MODE_MEMORY:
-               IA_CSS_LOG("mode memory");
-               curr_stream->reconfigure_css_rx = false;
-               break;
-       default:
-               IA_CSS_LOG("mode sensor/default");
-       }
+                       break;
+               case IA_CSS_INPUT_MODE_MEMORY:
+                       IA_CSS_LOG("mode memory");
+                       curr_stream->reconfigure_css_rx = false;
+                       break;
+               default:
+                       IA_CSS_LOG("mode sensor/default");
+               }
 
 #ifdef ISP2401
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       err = aspect_ratio_crop_init(curr_stream,
-                               pipes,
-                               &aspect_ratio_crop_enabled);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
+               err = aspect_ratio_crop_init(curr_stream,
+                                            pipes,
+                                            &aspect_ratio_crop_enabled);
+               if (err != IA_CSS_SUCCESS)
+               {
+                       IA_CSS_LEAVE_ERR(err);
+                       return err;
+               }
 #endif
 
 #endif
-       for (i = 0; i < num_pipes; i++) {
+               for (i = 0; i < num_pipes; i++)
+               {
 #ifdef ISP2401
-               struct ia_css_resolution effective_res;
+                       struct ia_css_resolution effective_res;
 #endif
-               curr_pipe = pipes[i];
-               /* set current stream */
-               curr_pipe->stream = curr_stream;
-               /* take over effective info */
+                       curr_pipe = pipes[i];
+                       /* set current stream */
+                       curr_pipe->stream = curr_stream;
+                       /* take over effective info */
 
-               effective_res = curr_pipe->config.input_effective_res;
-               if (effective_res.height == 0 || effective_res.width == 0) {
-                       effective_res = curr_pipe->stream->config.input_config.effective_res;
+                       effective_res = curr_pipe->config.input_effective_res;
+                       if (effective_res.height == 0 || effective_res.width == 0) {
+                               effective_res = curr_pipe->stream->config.input_config.effective_res;
 #ifdef ISP2401
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
-                       /* The aspect ratio cropping is currently only
-                        * supported on the new input system. */
-                       if (aspect_ratio_crop_check(aspect_ratio_crop_enabled, curr_pipe)) {
-                               struct ia_css_resolution crop_res;
-
-                               err = aspect_ratio_crop(curr_pipe, &crop_res);
-                               if (err == IA_CSS_SUCCESS) {
-                                       effective_res = crop_res;
-                               } else {
-                                       /* in case of error fallback to default
-                                        * effective resolution from driver. */
-                                       IA_CSS_LOG("aspect_ratio_crop() failed with err(%d)", err);
+                               /* The aspect ratio cropping is currently only
+                                * supported on the new input system. */
+                               if (aspect_ratio_crop_check(aspect_ratio_crop_enabled, curr_pipe)) {
+                                       struct ia_css_resolution crop_res;
+
+                                       err = aspect_ratio_crop(curr_pipe, &crop_res);
+                                       if (err == IA_CSS_SUCCESS) {
+                                               effective_res = crop_res;
+                                       } else {
+                                               /* in case of error fallback to default
+                                                * effective resolution from driver. */
+                                               IA_CSS_LOG("aspect_ratio_crop() failed with err(%d)", err);
+                                       }
                                }
-                       }
 #endif
 #endif
-                       curr_pipe->config.input_effective_res = effective_res;
+                               curr_pipe->config.input_effective_res = effective_res;
+                       }
+                       IA_CSS_LOG("effective_res=%dx%d",
+                                  effective_res.width,
+                                  effective_res.height);
                }
-               IA_CSS_LOG("effective_res=%dx%d",
-                                       effective_res.width,
-                                       effective_res.height);
-       }
 
 #ifdef ISP2401
-       for (i = 0; i < num_pipes; i++) {
-               if (pipes[i]->config.mode != IA_CSS_PIPE_MODE_ACC &&
-                       pipes[i]->config.mode != IA_CSS_PIPE_MODE_COPY) {
-                       err = check_pipe_resolutions(pipes[i]);
-                       if (err != IA_CSS_SUCCESS) {
-                               goto ERR;
+               for (i = 0; i < num_pipes; i++)
+               {
+                       if (pipes[i]->config.mode != IA_CSS_PIPE_MODE_ACC &&
+                           pipes[i]->config.mode != IA_CSS_PIPE_MODE_COPY) {
+                               err = check_pipe_resolutions(pipes[i]);
+                               if (err != IA_CSS_SUCCESS) {
+                                       goto ERR;
+                               }
                        }
                }
-       }
 
 #endif
-       err = ia_css_stream_isp_parameters_init(curr_stream);
-       if (err != IA_CSS_SUCCESS)
-               goto ERR;
-       IA_CSS_LOG("isp_params_configs: %p", curr_stream->isp_params_configs);
+               err = ia_css_stream_isp_parameters_init(curr_stream);
+               if (err != IA_CSS_SUCCESS)
+                       goto ERR;
+               IA_CSS_LOG("isp_params_configs: %p", curr_stream->isp_params_configs);
 
-       if (num_pipes == 1 && pipes[0]->config.mode == IA_CSS_PIPE_MODE_ACC) {
-               *stream = curr_stream;
-               err = ia_css_acc_stream_create(curr_stream);
-               goto ERR;
-       }
-       /* sensor binning */
-       if (!spcopyonly) {
-               sensor_binning_changed =
-                       sh_css_params_set_binning_factor(curr_stream, curr_stream->config.sensor_binning_factor);
-       } else {
-               sensor_binning_changed = false;
-       }
-
-       IA_CSS_LOG("sensor_binning=%d, changed=%d",
-               curr_stream->config.sensor_binning_factor, sensor_binning_changed);
-       /* loop over pipes */
-       IA_CSS_LOG("num_pipes=%d", num_pipes);
-       curr_stream->cont_capt = false;
-       /* Temporary hack: we give the preview pipe a reference to the capture
-        * pipe in continuous capture mode. */
-       if (curr_stream->config.continuous) {
-               /* Search for the preview pipe and create the copy pipe */
-               struct ia_css_pipe *preview_pipe;
-               struct ia_css_pipe *video_pipe;
-               struct ia_css_pipe *acc_pipe;
-               struct ia_css_pipe *capture_pipe = NULL;
-               struct ia_css_pipe *copy_pipe = NULL;
+               if (num_pipes == 1 && pipes[0]->config.mode == IA_CSS_PIPE_MODE_ACC)
+               {
+                       *stream = curr_stream;
+                       err = ia_css_acc_stream_create(curr_stream);
+                       goto ERR;
+               }
+               /* sensor binning */
+               if (!spcopyonly)
+               {
+                       sensor_binning_changed =
+                           sh_css_params_set_binning_factor(curr_stream,
+                                                            curr_stream->config.sensor_binning_factor);
+               } else
+               {
+                       sensor_binning_changed = false;
+               }
 
-               if (num_pipes >= 2) {
-                       curr_stream->cont_capt = true;
-                       curr_stream->disable_cont_vf = curr_stream->config.disable_cont_viewfinder;
+               IA_CSS_LOG("sensor_binning=%d, changed=%d",
+                          curr_stream->config.sensor_binning_factor, sensor_binning_changed);
+               /* loop over pipes */
+               IA_CSS_LOG("num_pipes=%d", num_pipes);
+               curr_stream->cont_capt = false;
+               /* Temporary hack: we give the preview pipe a reference to the capture
+                * pipe in continuous capture mode. */
+               if (curr_stream->config.continuous)
+               {
+                       /* Search for the preview pipe and create the copy pipe */
+                       struct ia_css_pipe *preview_pipe;
+                       struct ia_css_pipe *video_pipe;
+                       struct ia_css_pipe *acc_pipe;
+                       struct ia_css_pipe *capture_pipe = NULL;
+                       struct ia_css_pipe *copy_pipe = NULL;
+
+                       if (num_pipes >= 2) {
+                               curr_stream->cont_capt = true;
+                               curr_stream->disable_cont_vf = curr_stream->config.disable_cont_viewfinder;
 #ifndef ISP2401
-                       curr_stream->stop_copy_preview = my_css.stop_copy_preview;
-#endif
-               }
-
-               /* Create copy pipe here, since it may not be exposed to the driver */
-               preview_pipe = find_pipe(pipes, num_pipes,
-                                               IA_CSS_PIPE_MODE_PREVIEW, false);
-               video_pipe = find_pipe(pipes, num_pipes,
-                                               IA_CSS_PIPE_MODE_VIDEO, false);
-               acc_pipe = find_pipe(pipes, num_pipes,
-                                               IA_CSS_PIPE_MODE_ACC, false);
-               if (acc_pipe && num_pipes == 2 && curr_stream->cont_capt == true)
-                       curr_stream->cont_capt = false; /* preview + QoS case will not need cont_capt switch */
-               if (curr_stream->cont_capt == true) {
-                       capture_pipe = find_pipe(pipes, num_pipes,
-                                               IA_CSS_PIPE_MODE_CAPTURE, false);
-                       if (!capture_pipe) {
-                               err = IA_CSS_ERR_INTERNAL_ERROR;
-                               goto ERR;
+                               curr_stream->stop_copy_preview = my_css.stop_copy_preview;
+#endif
                        }
-               }
-               /* We do not support preview and video pipe at the same time */
-               if (preview_pipe && video_pipe) {
-                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
-                       goto ERR;
-               }
 
-               if (preview_pipe && !preview_pipe->pipe_settings.preview.copy_pipe) {
-                       err = create_pipe(IA_CSS_PIPE_MODE_CAPTURE, &copy_pipe, true);
-                       if (err != IA_CSS_SUCCESS)
-                               goto ERR;
-                       ia_css_pipe_config_defaults(&copy_pipe->config);
-                       preview_pipe->pipe_settings.preview.copy_pipe = copy_pipe;
-                       copy_pipe->stream = curr_stream;
-               }
-               if (preview_pipe && (curr_stream->cont_capt == true)) {
-                       preview_pipe->pipe_settings.preview.capture_pipe = capture_pipe;
-               }
-               if (video_pipe && !video_pipe->pipe_settings.video.copy_pipe) {
-                       err = create_pipe(IA_CSS_PIPE_MODE_CAPTURE, &copy_pipe, true);
-                       if (err != IA_CSS_SUCCESS)
+                       /* Create copy pipe here, since it may not be exposed to the driver */
+                       preview_pipe = find_pipe(pipes, num_pipes,
+                                                IA_CSS_PIPE_MODE_PREVIEW, false);
+                       video_pipe = find_pipe(pipes, num_pipes,
+                                              IA_CSS_PIPE_MODE_VIDEO, false);
+                       acc_pipe = find_pipe(pipes, num_pipes,
+                                            IA_CSS_PIPE_MODE_ACC, false);
+                       if (acc_pipe && num_pipes == 2 && curr_stream->cont_capt == true)
+                               curr_stream->cont_capt =
+                                   false; /* preview + QoS case will not need cont_capt switch */
+                       if (curr_stream->cont_capt == true) {
+                               capture_pipe = find_pipe(pipes, num_pipes,
+                                                        IA_CSS_PIPE_MODE_CAPTURE, false);
+                               if (!capture_pipe) {
+                                       err = IA_CSS_ERR_INTERNAL_ERROR;
+                                       goto ERR;
+                               }
+                       }
+                       /* We do not support preview and video pipe at the same time */
+                       if (preview_pipe && video_pipe) {
+                               err = IA_CSS_ERR_INVALID_ARGUMENTS;
                                goto ERR;
-                       ia_css_pipe_config_defaults(&copy_pipe->config);
-                       video_pipe->pipe_settings.video.copy_pipe = copy_pipe;
-                       copy_pipe->stream = curr_stream;
-               }
-               if (video_pipe && (curr_stream->cont_capt == true)) {
-                       video_pipe->pipe_settings.video.capture_pipe = capture_pipe;
-               }
-               if (preview_pipe && acc_pipe) {
-                       preview_pipe->pipe_settings.preview.acc_pipe = acc_pipe;
+                       }
+
+                       if (preview_pipe && !preview_pipe->pipe_settings.preview.copy_pipe) {
+                               err = create_pipe(IA_CSS_PIPE_MODE_CAPTURE, &copy_pipe, true);
+                               if (err != IA_CSS_SUCCESS)
+                                       goto ERR;
+                               ia_css_pipe_config_defaults(&copy_pipe->config);
+                               preview_pipe->pipe_settings.preview.copy_pipe = copy_pipe;
+                               copy_pipe->stream = curr_stream;
+                       }
+                       if (preview_pipe && (curr_stream->cont_capt == true)) {
+                               preview_pipe->pipe_settings.preview.capture_pipe = capture_pipe;
+                       }
+                       if (video_pipe && !video_pipe->pipe_settings.video.copy_pipe) {
+                               err = create_pipe(IA_CSS_PIPE_MODE_CAPTURE, &copy_pipe, true);
+                               if (err != IA_CSS_SUCCESS)
+                                       goto ERR;
+                               ia_css_pipe_config_defaults(&copy_pipe->config);
+                               video_pipe->pipe_settings.video.copy_pipe = copy_pipe;
+                               copy_pipe->stream = curr_stream;
+                       }
+                       if (video_pipe && (curr_stream->cont_capt == true)) {
+                               video_pipe->pipe_settings.video.capture_pipe = capture_pipe;
+                       }
+                       if (preview_pipe && acc_pipe) {
+                               preview_pipe->pipe_settings.preview.acc_pipe = acc_pipe;
+                       }
                }
-       }
-       for (i = 0; i < num_pipes; i++) {
-               curr_pipe = pipes[i];
-               /* set current stream */
-               curr_pipe->stream = curr_stream;
+               for (i = 0; i < num_pipes; i++)
+               {
+                       curr_pipe = pipes[i];
+                       /* set current stream */
+                       curr_pipe->stream = curr_stream;
 #ifndef ISP2401
-               /* take over effective info */
+                       /* take over effective info */
 
-               effective_res = curr_pipe->config.input_effective_res;
-               err = ia_css_util_check_res(
-                                       effective_res.width,
-                                       effective_res.height);
-               if (err != IA_CSS_SUCCESS)
-                       goto ERR;
+                       effective_res = curr_pipe->config.input_effective_res;
+                       err = ia_css_util_check_res(
+                                 effective_res.width,
+                                 effective_res.height);
+                       if (err != IA_CSS_SUCCESS)
+                               goto ERR;
 #endif
-               /* sensor binning per pipe */
-               if (sensor_binning_changed)
-                       sh_css_pipe_free_shading_table(curr_pipe);
-       }
-
-       /* now pipes have been configured, info should be available */
-       for (i = 0; i < num_pipes; i++) {
-               struct ia_css_pipe_info *pipe_info = NULL;
+                       /* sensor binning per pipe */
+                       if (sensor_binning_changed)
+                               sh_css_pipe_free_shading_table(curr_pipe);
+               }
 
-               curr_pipe = pipes[i];
+               /* now pipes have been configured, info should be available */
+               for (i = 0; i < num_pipes; i++)
+               {
+                       struct ia_css_pipe_info *pipe_info = NULL;
 
-               err = sh_css_pipe_load_binaries(curr_pipe);
-               if (err != IA_CSS_SUCCESS)
-                       goto ERR;
+                       curr_pipe = pipes[i];
 
-               /* handle each pipe */
-               pipe_info = &curr_pipe->info;
-               for (j = 0; j < IA_CSS_PIPE_MAX_OUTPUT_STAGE; j++) {
-                       err = sh_css_pipe_get_output_frame_info(curr_pipe,
-                                       &pipe_info->output_info[j], j);
+                       err = sh_css_pipe_load_binaries(curr_pipe);
                        if (err != IA_CSS_SUCCESS)
                                goto ERR;
-               }
+
+                       /* handle each pipe */
+                       pipe_info = &curr_pipe->info;
+                       for (j = 0; j < IA_CSS_PIPE_MAX_OUTPUT_STAGE; j++) {
+                               err = sh_css_pipe_get_output_frame_info(curr_pipe,
+                                                                       &pipe_info->output_info[j], j);
+                               if (err != IA_CSS_SUCCESS)
+                                       goto ERR;
+                       }
 #ifdef ISP2401
-               pipe_info->output_system_in_res_info = curr_pipe->config.output_system_in_res;
+                       pipe_info->output_system_in_res_info = curr_pipe->config.output_system_in_res;
 #endif
-               if (!spcopyonly) {
-                       err = sh_css_pipe_get_shading_info(curr_pipe,
+                       if (!spcopyonly) {
+                               err = sh_css_pipe_get_shading_info(curr_pipe,
 #ifndef ISP2401
-                                               &pipe_info->shading_info);
+                                                                  &pipe_info->shading_info);
 #else
- & pipe_info->shading_info, &curr_pipe->config);
                                                                 & pipe_info->shading_info, &curr_pipe->config);
 #endif
-                       if (err != IA_CSS_SUCCESS)
-                               goto ERR;
-                       err = sh_css_pipe_get_grid_info(curr_pipe,
-                                               &pipe_info->grid_info);
-                       if (err != IA_CSS_SUCCESS)
-                               goto ERR;
-                       for (j = 0; j < IA_CSS_PIPE_MAX_OUTPUT_STAGE; j++) {
-                               sh_css_pipe_get_viewfinder_frame_info(curr_pipe,
-                                               &pipe_info->vf_output_info[j], j);
                                if (err != IA_CSS_SUCCESS)
                                        goto ERR;
+                               err = sh_css_pipe_get_grid_info(curr_pipe,
+                                                               &pipe_info->grid_info);
+                               if (err != IA_CSS_SUCCESS)
+                                       goto ERR;
+                               for (j = 0; j < IA_CSS_PIPE_MAX_OUTPUT_STAGE; j++) {
+                                       sh_css_pipe_get_viewfinder_frame_info(curr_pipe,
+                                                                             &pipe_info->vf_output_info[j], j);
+                                       if (err != IA_CSS_SUCCESS)
+                                               goto ERR;
+                               }
                        }
-               }
 
-               my_css.active_pipes[ia_css_pipe_get_pipe_num(curr_pipe)] = curr_pipe;
-       }
+                       my_css.active_pipes[ia_css_pipe_get_pipe_num(curr_pipe)] = curr_pipe;
+               }
 
-       curr_stream->started = false;
+               curr_stream->started = false;
 
-       /* Map SP threads before doing anything. */
-       err = map_sp_threads(curr_stream, true);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LOG("map_sp_threads: return_err=%d", err);
-               goto ERR;
-       }
+               /* Map SP threads before doing anything. */
+               err = map_sp_threads(curr_stream, true);
+               if (err != IA_CSS_SUCCESS)
+               {
+                       IA_CSS_LOG("map_sp_threads: return_err=%d", err);
+                       goto ERR;
+               }
 
-       for (i = 0; i < num_pipes; i++) {
-               curr_pipe = pipes[i];
-               ia_css_pipe_map_queue(curr_pipe, true);
-       }
+               for (i = 0; i < num_pipes; i++)
+               {
+                       curr_pipe = pipes[i];
+                       ia_css_pipe_map_queue(curr_pipe, true);
+               }
 
-       /* Create host side pipeline objects without stages */
-       err = create_host_pipeline_structure(curr_stream);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LOG("create_host_pipeline_structure: return_err=%d", err);
-               goto ERR;
-       }
+               /* Create host side pipeline objects without stages */
+               err = create_host_pipeline_structure(curr_stream);
+               if (err != IA_CSS_SUCCESS)
+               {
+                       IA_CSS_LOG("create_host_pipeline_structure: return_err=%d", err);
+                       goto ERR;
+               }
 
-       /* assign curr_stream */
-       *stream = curr_stream;
+               /* assign curr_stream */
+               *stream = curr_stream;
 
 ERR:
 #ifndef ISP2401
-       if (err == IA_CSS_SUCCESS)
-       {
-               /* working mode: enter into the seed list */
-               if (my_css_save.mode == sh_css_mode_working) {
-                       for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
-                               if (!my_css_save.stream_seeds[i].stream) {
-                                       IA_CSS_LOG("entered stream into loc=%d", i);
-                                       my_css_save.stream_seeds[i].orig_stream = stream;
-                                       my_css_save.stream_seeds[i].stream = curr_stream;
-                                       my_css_save.stream_seeds[i].num_pipes = num_pipes;
-                                       my_css_save.stream_seeds[i].stream_config = *stream_config;
-                                       for (j = 0; j < num_pipes; j++) {
-                                               my_css_save.stream_seeds[i].pipe_config[j] = pipes[j]->config;
-                                               my_css_save.stream_seeds[i].pipes[j] = pipes[j];
-                                               my_css_save.stream_seeds[i].orig_pipes[j] = &pipes[j];
+               if (err == IA_CSS_SUCCESS)
+               {
+                       /* working mode: enter into the seed list */
+                       if (my_css_save.mode == sh_css_mode_working) {
+                               for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
+                                       if (!my_css_save.stream_seeds[i].stream) {
+                                               IA_CSS_LOG("entered stream into loc=%d", i);
+                                               my_css_save.stream_seeds[i].orig_stream = stream;
+                                               my_css_save.stream_seeds[i].stream = curr_stream;
+                                               my_css_save.stream_seeds[i].num_pipes = num_pipes;
+                                               my_css_save.stream_seeds[i].stream_config = *stream_config;
+                                               for (j = 0; j < num_pipes; j++) {
+                                                       my_css_save.stream_seeds[i].pipe_config[j] = pipes[j]->config;
+                                                       my_css_save.stream_seeds[i].pipes[j] = pipes[j];
+                                                       my_css_save.stream_seeds[i].orig_pipes[j] = &pipes[j];
+                                               }
+                                               break;
                                        }
-                                       break;
                        }
-               }
 #else
-       if (err == IA_CSS_SUCCESS) {
-               err = ia_css_save_stream(curr_stream);
+               if (err == IA_CSS_SUCCESS)
+               {
+                       err = ia_css_save_stream(curr_stream);
 #endif
-       } else {
-               ia_css_stream_destroy(curr_stream);
-       }
+               } else
+               {
+                       ia_css_stream_destroy(curr_stream);
+               }
 #ifndef ISP2401
-       IA_CSS_LEAVE("return_err=%d mode=%d", err, my_css_save.mode);
+               IA_CSS_LEAVE("return_err=%d mode=%d", err, my_css_save.mode);
 #else
-       IA_CSS_LEAVE("return_err=%d", err);
+               IA_CSS_LEAVE("return_err=%d", err);
 #endif
-       return err;
-}
+               return err;
+       }
 
-enum ia_css_err
-ia_css_stream_destroy(struct ia_css_stream *stream)
-{
-       int i;
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       enum ia_css_err
+       ia_css_stream_destroy(struct ia_css_stream *stream) {
+               int i;
+               enum ia_css_err err = IA_CSS_SUCCESS;
 #ifdef ISP2401
-       enum ia_css_err err1 = IA_CSS_SUCCESS;
-       enum ia_css_err err2 = IA_CSS_SUCCESS;
+               enum ia_css_err err1 = IA_CSS_SUCCESS;
+               enum ia_css_err err2 = IA_CSS_SUCCESS;
 #endif
 
-       IA_CSS_ENTER_PRIVATE("stream = %p", stream);
-       if (!stream) {
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE_ERR_PRIVATE(err);
-               return err;
-       }
+               IA_CSS_ENTER_PRIVATE("stream = %p", stream);
+               if (!stream)
+               {
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
 
-       ia_css_stream_isp_parameters_uninit(stream);
+               ia_css_stream_isp_parameters_uninit(stream);
 
-       if ((stream->last_pipe) &&
-               ia_css_pipeline_is_mapped(stream->last_pipe->pipe_num)) {
+               if ((stream->last_pipe) &&
+                   ia_css_pipeline_is_mapped(stream->last_pipe->pipe_num))
+               {
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
-               for (i = 0; i < stream->num_pipes; i++) {
-                       struct ia_css_pipe *entry = stream->pipes[i];
-                       unsigned int sp_thread_id;
-                       struct sh_css_sp_pipeline_terminal *sp_pipeline_input_terminal;
-
-                       assert(entry);
-                       if (entry) {
-                               /* get the SP thread id */
-                               if (ia_css_pipeline_get_sp_thread_id(
-                                       ia_css_pipe_get_pipe_num(entry), &sp_thread_id) != true)
-                                       return IA_CSS_ERR_INTERNAL_ERROR;
-                               /* get the target input terminal */
-                               sp_pipeline_input_terminal =
+                       for (i = 0; i < stream->num_pipes; i++) {
+                               struct ia_css_pipe *entry = stream->pipes[i];
+                               unsigned int sp_thread_id;
+                               struct sh_css_sp_pipeline_terminal *sp_pipeline_input_terminal;
+
+                               assert(entry);
+                               if (entry) {
+                                       /* get the SP thread id */
+                                       if (ia_css_pipeline_get_sp_thread_id(
+                                               ia_css_pipe_get_pipe_num(entry), &sp_thread_id) != true)
+                                               return IA_CSS_ERR_INTERNAL_ERROR;
+                                       /* get the target input terminal */
+                                       sp_pipeline_input_terminal =
                                        &sh_css_sp_group.pipe_io[sp_thread_id].input;
 
-                               for (i = 0; i < IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH; i++) {
-                                       ia_css_isys_stream_h isys_stream =
+                                       for (i = 0; i < IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH; i++) {
+                                               ia_css_isys_stream_h isys_stream =
                                                &sp_pipeline_input_terminal->context.virtual_input_system_stream[i];
-                                       if (stream->config.isys_config[i].valid && isys_stream->valid)
-                                               ia_css_isys_stream_destroy(isys_stream);
+                                               if (stream->config.isys_config[i].valid && isys_stream->valid)
+                                                       ia_css_isys_stream_destroy(isys_stream);
+                                       }
                                }
                        }
-               }
 #ifndef ISP2401
-               if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
+                       if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
 #else
-               if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
-                       stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
-                       stream->config.mode == IA_CSS_INPUT_MODE_PRBS) {
-#endif
-                       for (i = 0; i < stream->num_pipes; i++) {
-                               struct ia_css_pipe *entry = stream->pipes[i];
-                               /* free any mipi frames that are remaining:
-                                * some test stream create-destroy cycles do not generate output frames
-                                * and the mipi buffer is not freed in the deque function
-                                */
-                               if (entry)
-                                       free_mipi_frames(entry);
+                       if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
+                           stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
+                           stream->config.mode == IA_CSS_INPUT_MODE_PRBS) {
+#endif
+                               for (i = 0; i < stream->num_pipes; i++) {
+                                       struct ia_css_pipe *entry = stream->pipes[i];
+                                       /* free any mipi frames that are remaining:
+                                        * some test stream create-destroy cycles do not generate output frames
+                                        * and the mipi buffer is not freed in the deque function
+                                        */
+                                       if (entry)
+                                               free_mipi_frames(entry);
+                               }
                        }
-               }
-               stream_unregister_with_csi_rx(stream);
+                       stream_unregister_with_csi_rx(stream);
 #endif
 
-               for (i = 0; i < stream->num_pipes; i++) {
-                       struct ia_css_pipe *curr_pipe = stream->pipes[i];
+                       for (i = 0; i < stream->num_pipes; i++) {
+                               struct ia_css_pipe *curr_pipe = stream->pipes[i];
 
-                       assert(curr_pipe);
-                       ia_css_pipe_map_queue(curr_pipe, false);
-               }
+                               assert(curr_pipe);
+                               ia_css_pipe_map_queue(curr_pipe, false);
+                       }
 
-               err = map_sp_threads(stream, false);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
+                       err = map_sp_threads(stream, false);
+                       if (err != IA_CSS_SUCCESS) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(err);
+                               return err;
+                       }
                }
-       }
 
-       /* remove references from pipes to stream */
-       for (i = 0; i < stream->num_pipes; i++) {
-               struct ia_css_pipe *entry = stream->pipes[i];
-
-               assert(entry);
-               if (entry) {
-                       /* clear reference to stream */
-                       entry->stream = NULL;
-                       /* check internal copy pipe */
-                       if (entry->mode == IA_CSS_PIPE_ID_PREVIEW &&
-                           entry->pipe_settings.preview.copy_pipe) {
-                               IA_CSS_LOG("clearing stream on internal preview copy pipe");
-                               entry->pipe_settings.preview.copy_pipe->stream = NULL;
-                       }
-                       if (entry->mode == IA_CSS_PIPE_ID_VIDEO &&
-                               entry->pipe_settings.video.copy_pipe) {
-                               IA_CSS_LOG("clearing stream on internal video copy pipe");
-                               entry->pipe_settings.video.copy_pipe->stream = NULL;
+               /* remove references from pipes to stream */
+               for (i = 0; i < stream->num_pipes; i++)
+               {
+                       struct ia_css_pipe *entry = stream->pipes[i];
+
+                       assert(entry);
+                       if (entry) {
+                               /* clear reference to stream */
+                               entry->stream = NULL;
+                               /* check internal copy pipe */
+                               if (entry->mode == IA_CSS_PIPE_ID_PREVIEW &&
+                                   entry->pipe_settings.preview.copy_pipe) {
+                                       IA_CSS_LOG("clearing stream on internal preview copy pipe");
+                                       entry->pipe_settings.preview.copy_pipe->stream = NULL;
+                               }
+                               if (entry->mode == IA_CSS_PIPE_ID_VIDEO &&
+                                   entry->pipe_settings.video.copy_pipe) {
+                                       IA_CSS_LOG("clearing stream on internal video copy pipe");
+                                       entry->pipe_settings.video.copy_pipe->stream = NULL;
+                               }
+                               err = sh_css_pipe_unload_binaries(entry);
                        }
-                       err = sh_css_pipe_unload_binaries(entry);
                }
-       }
-       /* free associated memory of stream struct */
-       kfree(stream->pipes);
-       stream->pipes = NULL;
-       stream->num_pipes = 0;
+               /* free associated memory of stream struct */
+               kfree(stream->pipes);
+               stream->pipes = NULL;
+               stream->num_pipes = 0;
 #ifndef ISP2401
-       /* working mode: take out of the seed list */
-       if (my_css_save.mode == sh_css_mode_working)
-               for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
-                       if (my_css_save.stream_seeds[i].stream == stream)
-                       {
-                               IA_CSS_LOG("took out stream %d", i);
-                               my_css_save.stream_seeds[i].stream = NULL;
-                               break;
-                       }
+               /* working mode: take out of the seed list */
+               if (my_css_save.mode == sh_css_mode_working)
+                       for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
+                               if (my_css_save.stream_seeds[i].stream == stream)
+                               {
+                                       IA_CSS_LOG("took out stream %d", i);
+                                       my_css_save.stream_seeds[i].stream = NULL;
+                                       break;
+                               }
 #else
-       err2 = ia_css_save_restore_remove_stream(stream);
+               err2 = ia_css_save_restore_remove_stream(stream);
 
-       err1 = (err != IA_CSS_SUCCESS) ? err : err2;
+               err1 = (err != IA_CSS_SUCCESS) ? err : err2;
 #endif
-       kfree(stream);
+               kfree(stream);
 #ifndef ISP2401
-       IA_CSS_LEAVE_ERR(err);
+               IA_CSS_LEAVE_ERR(err);
 #else
-       IA_CSS_LEAVE_ERR(err1);
+               IA_CSS_LEAVE_ERR(err1);
 #endif
 
 #ifndef ISP2401
-       return err;
+               return err;
 #else
-       return err1;
+               return err1;
 #endif
-}
+       }
 
-enum ia_css_err
-ia_css_stream_get_info(const struct ia_css_stream *stream,
-                      struct ia_css_stream_info *stream_info)
-{
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_info: enter/exit\n");
-       assert(stream);
-       assert(stream_info);
+       enum ia_css_err
+       ia_css_stream_get_info(const struct ia_css_stream *stream,
+                              struct ia_css_stream_info *stream_info) {
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_info: enter/exit\n");
+               assert(stream);
+               assert(stream_info);
 
-       *stream_info = stream->info;
-       return IA_CSS_SUCCESS;
-}
+               *stream_info = stream->info;
+               return IA_CSS_SUCCESS;
+       }
 
-/*
- * Rebuild a stream, including allocating structs, setting configuration and
- * building the required pipes.
- * The data is taken from the css_save struct updated upon stream creation.
- * The stream handle is used to identify the correct entry in the css_save struct
- */
-enum ia_css_err
-ia_css_stream_load(struct ia_css_stream *stream)
-{
+       /*
+        * Rebuild a stream, including allocating structs, setting configuration and
+        * building the required pipes.
+        * The data is taken from the css_save struct updated upon stream creation.
+        * The stream handle is used to identify the correct entry in the css_save struct
+        */
+       enum ia_css_err
+       ia_css_stream_load(struct ia_css_stream *stream) {
 #ifndef ISP2401
-       int i;
-       enum ia_css_err err;
+               int i;
+               enum ia_css_err err;
 
-       assert(stream);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() enter,\n");
-       for (i = 0; i < MAX_ACTIVE_STREAMS; i++) {
-               if (my_css_save.stream_seeds[i].stream == stream) {
-                       int j;
-
-                       for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++) {
-                               if ((err = ia_css_pipe_create(&my_css_save.stream_seeds[i].pipe_config[j], &my_css_save.stream_seeds[i].pipes[j])) != IA_CSS_SUCCESS) {
-                                       if (j) {
-                                               int k;
-
-                                               for (k = 0; k < j; k++)
-                                                       ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[k]);
+               assert(stream);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() enter,\n");
+               for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
+               {
+                       if (my_css_save.stream_seeds[i].stream == stream) {
+                               int j;
+
+                               for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++) {
+                                       if ((err = ia_css_pipe_create(&my_css_save.stream_seeds[i].pipe_config[j],
+                                                                     &my_css_save.stream_seeds[i].pipes[j])) != IA_CSS_SUCCESS) {
+                                               if (j) {
+                                                       int k;
+
+                                                       for (k = 0; k < j; k++)
+                                                               ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[k]);
+                                               }
+                                               return err;
                                        }
+                               }
+                               err = ia_css_stream_create(&my_css_save.stream_seeds[i].stream_config,
+                                                          my_css_save.stream_seeds[i].num_pipes,
+                                                          my_css_save.stream_seeds[i].pipes,
+                                                          &my_css_save.stream_seeds[i].stream);
+                               if (err != IA_CSS_SUCCESS) {
+                                       ia_css_stream_destroy(stream);
+                                       for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
+                                               ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[j]);
                                        return err;
                                }
+                               break;
                        }
-                       err = ia_css_stream_create(&my_css_save.stream_seeds[i].stream_config,
-                                                  my_css_save.stream_seeds[i].num_pipes,
-                                                  my_css_save.stream_seeds[i].pipes,
-                                                  &my_css_save.stream_seeds[i].stream);
-                       if (err != IA_CSS_SUCCESS) {
-                               ia_css_stream_destroy(stream);
-                               for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
-                                       ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[j]);
-                               return err;
-                       }
-                       break;
                }
-       }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() exit,\n");
-       return IA_CSS_SUCCESS;
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() exit,\n");
+               return IA_CSS_SUCCESS;
 #else
-       /* TODO remove function - DEPRECATED */
-       (void)stream;
-       return IA_CSS_ERR_NOT_SUPPORTED;
+               /* TODO remove function - DEPRECATED */
+               (void)stream;
+               return IA_CSS_ERR_NOT_SUPPORTED;
 #endif
-}
+       }
 
-enum ia_css_err
-ia_css_stream_start(struct ia_css_stream *stream)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       enum ia_css_err
+       ia_css_stream_start(struct ia_css_stream *stream) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_ENTER("stream = %p", stream);
-       if ((!stream) || (!stream->last_pipe)) {
-               IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
-       IA_CSS_LOG("starting %d", stream->last_pipe->mode);
+               IA_CSS_ENTER("stream = %p", stream);
+               if ((!stream) || (!stream->last_pipe))
+               {
+                       IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
+               IA_CSS_LOG("starting %d", stream->last_pipe->mode);
 
-       sh_css_sp_set_disable_continuous_viewfinder(stream->disable_cont_vf);
+               sh_css_sp_set_disable_continuous_viewfinder(stream->disable_cont_vf);
 
-       /* Create host side pipeline. */
-       err = create_host_pipeline(stream);
-       if (err != IA_CSS_SUCCESS) {
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
+               /* Create host side pipeline. */
+               err = create_host_pipeline(stream);
+               if (err != IA_CSS_SUCCESS)
+               {
+                       IA_CSS_LEAVE_ERR(err);
+                       return err;
+               }
 
 #if !defined(HAS_NO_INPUT_SYSTEM)
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
-       if ((stream->config.mode == IA_CSS_INPUT_MODE_SENSOR) ||
-          (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR))
-               stream_register_with_csi_rx(stream);
+               if ((stream->config.mode == IA_CSS_INPUT_MODE_SENSOR) ||
+                   (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR))
+                       stream_register_with_csi_rx(stream);
 #endif
 #endif
 
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
-       /* Initialize mipi size checks */
-       if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
-       {
-               unsigned int idx;
-               unsigned int port = (unsigned int)(stream->config.source.port.port);
+               /* Initialize mipi size checks */
+               if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+               {
+                       unsigned int idx;
+                       unsigned int port = (unsigned int)(stream->config.source.port.port);
 
-               for (idx = 0; idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT; idx++) {
-                       sh_css_sp_group.config.mipi_sizes_for_check[port][idx] =  sh_css_get_mipi_sizes_for_check(port, idx);
+                       for (idx = 0; idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT; idx++) {
+                               sh_css_sp_group.config.mipi_sizes_for_check[port][idx] =
+                               sh_css_get_mipi_sizes_for_check(port, idx);
+                       }
                }
-       }
 #endif
 
 #if !defined(HAS_NO_INPUT_SYSTEM)
-       if (stream->config.mode != IA_CSS_INPUT_MODE_MEMORY) {
-               err = sh_css_config_input_network(stream);
-               if (err != IA_CSS_SUCCESS)
-                       return err;
-       }
+               if (stream->config.mode != IA_CSS_INPUT_MODE_MEMORY)
+               {
+                       err = sh_css_config_input_network(stream);
+                       if (err != IA_CSS_SUCCESS)
+                               return err;
+               }
 #endif /* !HAS_NO_INPUT_SYSTEM */
 
-       err = sh_css_pipe_start(stream);
-       IA_CSS_LEAVE_ERR(err);
-       return err;
-}
+               err = sh_css_pipe_start(stream);
+               IA_CSS_LEAVE_ERR(err);
+               return err;
+       }
 
-enum ia_css_err
-ia_css_stream_stop(struct ia_css_stream *stream)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       enum ia_css_err
+       ia_css_stream_stop(struct ia_css_stream *stream) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_stop() enter/exit\n");
-       assert(stream);
-       assert(stream->last_pipe);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_stop: stopping %d\n",
-               stream->last_pipe->mode);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_stop() enter/exit\n");
+               assert(stream);
+               assert(stream->last_pipe);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_stop: stopping %d\n",
+                                   stream->last_pipe->mode);
 
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
-       /* De-initialize mipi size checks */
-       if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
-       {
-               unsigned int idx;
-               unsigned int port = (unsigned int)(stream->config.source.port.port);
+               /* De-initialize mipi size checks */
+               if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+               {
+                       unsigned int idx;
+                       unsigned int port = (unsigned int)(stream->config.source.port.port);
 
-               for (idx = 0; idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT; idx++) {
-                       sh_css_sp_group.config.mipi_sizes_for_check[port][idx] = 0;
+                       for (idx = 0; idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT; idx++) {
+                               sh_css_sp_group.config.mipi_sizes_for_check[port][idx] = 0;
+                       }
                }
-       }
 #endif
 #ifndef ISP2401
-       err = ia_css_pipeline_request_stop(&stream->last_pipe->pipeline);
+               err = ia_css_pipeline_request_stop(&stream->last_pipe->pipeline);
 #else
 
-       err = sh_css_pipes_stop(stream);
+               err = sh_css_pipes_stop(stream);
 #endif
-       if (err != IA_CSS_SUCCESS)
-               return err;
+               if (err != IA_CSS_SUCCESS)
+                       return err;
 
-       /* Ideally, unmapping should happen after pipeline_stop, but current
-        * semantics do not allow that. */
-       /* err = map_sp_threads(stream, false); */
+               /* Ideally, unmapping should happen after pipeline_stop, but current
+                * semantics do not allow that. */
+               /* err = map_sp_threads(stream, false); */
 
-       return err;
-}
+               return err;
+       }
 
-bool
-ia_css_stream_has_stopped(struct ia_css_stream *stream)
-{
-       bool stopped;
+       bool
+       ia_css_stream_has_stopped(struct ia_css_stream *stream) {
+               bool stopped;
 
-       assert(stream);
+               assert(stream);
 
 #ifndef ISP2401
-       stopped = ia_css_pipeline_has_stopped(&stream->last_pipe->pipeline);
+               stopped = ia_css_pipeline_has_stopped(&stream->last_pipe->pipeline);
 #else
-       stopped = sh_css_pipes_have_stopped(stream);
+               stopped = sh_css_pipes_have_stopped(stream);
 #endif
 
-       return stopped;
-}
+               return stopped;
+       }
 
 #ifndef ISP2401
-/*
- * Destroy the stream and all the pipes related to it.
- * The stream handle is used to identify the correct entry in the css_save struct
- */
-enum ia_css_err
-ia_css_stream_unload(struct ia_css_stream *stream)
-{
-       int i;
+       /*
+        * Destroy the stream and all the pipes related to it.
+        * The stream handle is used to identify the correct entry in the css_save struct
+        */
+       enum ia_css_err
+       ia_css_stream_unload(struct ia_css_stream *stream) {
+               int i;
 
-       assert(stream);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() enter,\n");
-       /* some checks */
-       assert(stream);
-       for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
-               if (my_css_save.stream_seeds[i].stream == stream)
-               {
-                       int j;
+               assert(stream);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() enter,\n");
+               /* some checks */
+               assert(stream);
+               for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
+                       if (my_css_save.stream_seeds[i].stream == stream)
+                       {
+                               int j;
 
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload(): unloading %d (%p)\n", i, my_css_save.stream_seeds[i].stream);
-                       ia_css_stream_destroy(stream);
-                       for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
-                               ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[j]);
-                       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload(): after unloading %d (%p)\n", i, my_css_save.stream_seeds[i].stream);
-                       break;
-               }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() exit,\n");
-       return IA_CSS_SUCCESS;
-}
+                               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                                   "ia_css_stream_unload(): unloading %d (%p)\n", i,
+                                                   my_css_save.stream_seeds[i].stream);
+                               ia_css_stream_destroy(stream);
+                               for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
+                                       ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[j]);
+                               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                                   "ia_css_stream_unload(): after unloading %d (%p)\n", i,
+                                                   my_css_save.stream_seeds[i].stream);
+                               break;
+                       }
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() exit,\n");
+               return IA_CSS_SUCCESS;
+       }
 
 #endif
-enum ia_css_err
-ia_css_temp_pipe_to_pipe_id(const struct ia_css_pipe *pipe, enum ia_css_pipe_id *pipe_id)
-{
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_temp_pipe_to_pipe_id() enter/exit\n");
-       if (pipe)
-               *pipe_id = pipe->mode;
-       else
-               *pipe_id = IA_CSS_PIPE_ID_COPY;
+       enum ia_css_err
+       ia_css_temp_pipe_to_pipe_id(const struct ia_css_pipe *pipe,
+                                   enum ia_css_pipe_id *pipe_id) {
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_temp_pipe_to_pipe_id() enter/exit\n");
+               if (pipe)
+                       *pipe_id = pipe->mode;
+               else
+                       *pipe_id = IA_CSS_PIPE_ID_COPY;
 
-       return IA_CSS_SUCCESS;
-}
+               return IA_CSS_SUCCESS;
+       }
 
-enum atomisp_input_format
-ia_css_stream_get_format(const struct ia_css_stream *stream)
-{
-       return stream->config.input_config.format;
-}
+       enum atomisp_input_format
+       ia_css_stream_get_format(const struct ia_css_stream *stream) {
+               return stream->config.input_config.format;
+       }
 
-bool
-ia_css_stream_get_two_pixels_per_clock(const struct ia_css_stream *stream)
-{
-       return (stream->config.pixels_per_clock == 2);
-}
+       bool
+       ia_css_stream_get_two_pixels_per_clock(const struct ia_css_stream *stream) {
+               return (stream->config.pixels_per_clock == 2);
+       }
 
-struct ia_css_binary *
-ia_css_stream_get_shading_correction_binary(const struct ia_css_stream *stream)
-{
-       struct ia_css_pipe *pipe;
+       struct ia_css_binary *
+       ia_css_stream_get_shading_correction_binary(const struct ia_css_stream
+               *stream) {
+               struct ia_css_pipe *pipe;
 
-       assert(stream);
+               assert(stream);
 
-       pipe = stream->pipes[0];
+               pipe = stream->pipes[0];
 
-       if (stream->num_pipes == 2) {
-               assert(stream->pipes[1]);
-               if (stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_VIDEO ||
-                   stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_PREVIEW)
-                       pipe = stream->pipes[1];
-       }
+               if (stream->num_pipes == 2) {
+                       assert(stream->pipes[1]);
+                       if (stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_VIDEO ||
+                           stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_PREVIEW)
+                               pipe = stream->pipes[1];
+               }
 
-       return ia_css_pipe_get_shading_correction_binary(pipe);
-}
+               return ia_css_pipe_get_shading_correction_binary(pipe);
+       }
 
-struct ia_css_binary *
-ia_css_stream_get_dvs_binary(const struct ia_css_stream *stream)
-{
-       int i;
-       struct ia_css_pipe *video_pipe = NULL;
+       struct ia_css_binary *
+       ia_css_stream_get_dvs_binary(const struct ia_css_stream *stream) {
+               int i;
+               struct ia_css_pipe *video_pipe = NULL;
 
-       /* First we find the video pipe */
-       for (i = 0; i < stream->num_pipes; i++) {
-               struct ia_css_pipe *pipe = stream->pipes[i];
+               /* First we find the video pipe */
+               for (i = 0; i < stream->num_pipes; i++) {
+                       struct ia_css_pipe *pipe = stream->pipes[i];
 
-               if (pipe->config.mode == IA_CSS_PIPE_MODE_VIDEO) {
-                       video_pipe = pipe;
-                       break;
+                       if (pipe->config.mode == IA_CSS_PIPE_MODE_VIDEO) {
+                               video_pipe = pipe;
+                               break;
+                       }
                }
+               if (video_pipe)
+                       return &video_pipe->pipe_settings.video.video_binary;
+               return NULL;
        }
-       if (video_pipe)
-               return &video_pipe->pipe_settings.video.video_binary;
-       return NULL;
-}
 
-struct ia_css_binary *
-ia_css_stream_get_3a_binary(const struct ia_css_stream *stream)
-{
-       struct ia_css_pipe *pipe;
-       struct ia_css_binary *s3a_binary = NULL;
+       struct ia_css_binary *
+       ia_css_stream_get_3a_binary(const struct ia_css_stream *stream) {
+               struct ia_css_pipe *pipe;
+               struct ia_css_binary *s3a_binary = NULL;
 
-       assert(stream);
+               assert(stream);
 
-       pipe = stream->pipes[0];
+               pipe = stream->pipes[0];
 
-       if (stream->num_pipes == 2) {
-               assert(stream->pipes[1]);
-               if (stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_VIDEO ||
-                   stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_PREVIEW)
-                       pipe = stream->pipes[1];
-       }
+               if (stream->num_pipes == 2) {
+                       assert(stream->pipes[1]);
+                       if (stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_VIDEO ||
+                           stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_PREVIEW)
+                               pipe = stream->pipes[1];
+               }
 
-       s3a_binary = ia_css_pipe_get_s3a_binary(pipe);
+               s3a_binary = ia_css_pipe_get_s3a_binary(pipe);
 
-       return s3a_binary;
-}
+               return s3a_binary;
+       }
 
-enum ia_css_err
-ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int output_padded_width)
-{
-       struct ia_css_pipe *pipe;
+       enum ia_css_err
+       ia_css_stream_set_output_padded_width(struct ia_css_stream *stream,
+                                             unsigned int output_padded_width) {
+               struct ia_css_pipe *pipe;
 
-       assert(stream);
+               assert(stream);
 
-       pipe = stream->last_pipe;
+               pipe = stream->last_pipe;
 
-       assert(pipe);
+               assert(pipe);
 
-       /* set the config also just in case (redundant info? why do we save config in pipe?) */
-       pipe->config.output_info[IA_CSS_PIPE_OUTPUT_STAGE_0].padded_width = output_padded_width;
-       pipe->output_info[IA_CSS_PIPE_OUTPUT_STAGE_0].padded_width = output_padded_width;
+               /* set the config also just in case (redundant info? why do we save config in pipe?) */
+               pipe->config.output_info[IA_CSS_PIPE_OUTPUT_STAGE_0].padded_width = output_padded_width;
+               pipe->output_info[IA_CSS_PIPE_OUTPUT_STAGE_0].padded_width = output_padded_width;
 
-       return IA_CSS_SUCCESS;
-}
+               return IA_CSS_SUCCESS;
+       }
 
-static struct ia_css_binary *
-ia_css_pipe_get_shading_correction_binary(const struct ia_css_pipe *pipe)
-{
-       struct ia_css_binary *binary = NULL;
+       static struct ia_css_binary *
+       ia_css_pipe_get_shading_correction_binary(const struct ia_css_pipe *pipe) {
+               struct ia_css_binary *binary = NULL;
 
-       assert(pipe);
+               assert(pipe);
 
-       switch (pipe->config.mode) {
-       case IA_CSS_PIPE_MODE_PREVIEW:
-               binary = (struct ia_css_binary *)&pipe->pipe_settings.preview.preview_binary;
-               break;
-       case IA_CSS_PIPE_MODE_VIDEO:
-               binary = (struct ia_css_binary *)&pipe->pipe_settings.video.video_binary;
-               break;
-       case IA_CSS_PIPE_MODE_CAPTURE:
-               if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
-                       unsigned int i;
+               switch (pipe->config.mode) {
+               case IA_CSS_PIPE_MODE_PREVIEW:
+                       binary = (struct ia_css_binary *)&pipe->pipe_settings.preview.preview_binary;
+                       break;
+               case IA_CSS_PIPE_MODE_VIDEO:
+                       binary = (struct ia_css_binary *)&pipe->pipe_settings.video.video_binary;
+                       break;
+               case IA_CSS_PIPE_MODE_CAPTURE:
+                       if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
+                               unsigned int i;
 
-                       for (i = 0; i < pipe->pipe_settings.capture.num_primary_stage; i++) {
-                               if (pipe->pipe_settings.capture.primary_binary[i].info->sp.enable.sc) {
-                                       binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.primary_binary[i];
-                                       break;
+                               for (i = 0; i < pipe->pipe_settings.capture.num_primary_stage; i++) {
+                                       if (pipe->pipe_settings.capture.primary_binary[i].info->sp.enable.sc) {
+                                               binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.primary_binary[i];
+                                               break;
+                                       }
                                }
-                       }
-               } else if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER)
-                       binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.pre_isp_binary;
-               else if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
-                        pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT) {
-                       if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_1)
+                       } else if (pipe->config.default_capture_config.mode ==
+                                  IA_CSS_CAPTURE_MODE_BAYER)
                                binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.pre_isp_binary;
-                       else if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_2_2)
-                               binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.post_isp_binary;
+                       else if (pipe->config.default_capture_config.mode ==
+                                IA_CSS_CAPTURE_MODE_ADVANCED ||
+                                pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT) {
+                               if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_1)
+                                       binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.pre_isp_binary;
+                               else if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_2_2)
+                                       binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.post_isp_binary;
+                       }
+                       break;
+               default:
+                       break;
                }
-               break;
-       default:
-               break;
-       }
 
-       if (binary && binary->info->sp.enable.sc)
-               return binary;
+               if (binary && binary->info->sp.enable.sc)
+                       return binary;
 
-       return NULL;
-}
+               return NULL;
+       }
 
-static struct ia_css_binary *
-ia_css_pipe_get_s3a_binary(const struct ia_css_pipe *pipe)
-{
-       struct ia_css_binary *binary = NULL;
+       static struct ia_css_binary *
+       ia_css_pipe_get_s3a_binary(const struct ia_css_pipe *pipe) {
+               struct ia_css_binary *binary = NULL;
 
-       assert(pipe);
+               assert(pipe);
 
-       switch (pipe->config.mode) {
+               switch (pipe->config.mode) {
                case IA_CSS_PIPE_MODE_PREVIEW:
                        binary = (struct ia_css_binary *)&pipe->pipe_settings.preview.preview_binary;
                        break;
@@ -10312,9 +10600,11 @@ ia_css_pipe_get_s3a_binary(const struct ia_css_pipe *pipe)
                                                break;
                                        }
                                }
-                       } else if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER)
+                       } else if (pipe->config.default_capture_config.mode ==
+                                  IA_CSS_CAPTURE_MODE_BAYER)
                                binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.pre_isp_binary;
-                       else if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
+                       else if (pipe->config.default_capture_config.mode ==
+                                IA_CSS_CAPTURE_MODE_ADVANCED ||
                                 pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT) {
                                if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_1)
                                        binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.pre_isp_binary;
@@ -10326,782 +10616,806 @@ ia_css_pipe_get_s3a_binary(const struct ia_css_pipe *pipe)
                        break;
                default:
                        break;
-       }
+               }
 
-       if (binary && !binary->info->sp.enable.s3a)
-               binary = NULL;
+               if (binary && !binary->info->sp.enable.s3a)
+                       binary = NULL;
 
-       return binary;
-}
+               return binary;
+       }
 
-static struct ia_css_binary *
-ia_css_pipe_get_sdis_binary(const struct ia_css_pipe *pipe)
-{
-       struct ia_css_binary *binary = NULL;
+       static struct ia_css_binary *
+       ia_css_pipe_get_sdis_binary(const struct ia_css_pipe *pipe) {
+               struct ia_css_binary *binary = NULL;
 
-       assert(pipe);
+               assert(pipe);
 
-       switch (pipe->config.mode) {
+               switch (pipe->config.mode) {
                case IA_CSS_PIPE_MODE_VIDEO:
                        binary = (struct ia_css_binary *)&pipe->pipe_settings.video.video_binary;
                        break;
                default:
                        break;
-       }
+               }
 
-       if (binary && !binary->info->sp.enable.dis)
-               binary = NULL;
+               if (binary && !binary->info->sp.enable.dis)
+                       binary = NULL;
 
-       return binary;
-}
+               return binary;
+       }
 
-struct ia_css_pipeline *
-ia_css_pipe_get_pipeline(const struct ia_css_pipe *pipe)
-{
-       assert(pipe);
+       struct ia_css_pipeline *
+       ia_css_pipe_get_pipeline(const struct ia_css_pipe *pipe) {
+               assert(pipe);
 
-       return (struct ia_css_pipeline *)&pipe->pipeline;
-}
+               return (struct ia_css_pipeline *)&pipe->pipeline;
+       }
 
-unsigned int
-ia_css_pipe_get_pipe_num(const struct ia_css_pipe *pipe)
-{
-       assert(pipe);
+       unsigned int
+       ia_css_pipe_get_pipe_num(const struct ia_css_pipe *pipe) {
+               assert(pipe);
 
-       /* KW was not sure this function was not returning a value
-          that was out of range; so added an assert, and, for the
-          case when asserts are not enabled, clip to the largest
-          value; pipe_num is unsigned so the value cannot be too small
-       */
-       assert(pipe->pipe_num < IA_CSS_PIPELINE_NUM_MAX);
+               /* KW was not sure this function was not returning a value
+                  that was out of range; so added an assert, and, for the
+                  case when asserts are not enabled, clip to the largest
+                  value; pipe_num is unsigned so the value cannot be too small
+               */
+               assert(pipe->pipe_num < IA_CSS_PIPELINE_NUM_MAX);
 
-       if (pipe->pipe_num >= IA_CSS_PIPELINE_NUM_MAX)
-               return (IA_CSS_PIPELINE_NUM_MAX - 1);
+               if (pipe->pipe_num >= IA_CSS_PIPELINE_NUM_MAX)
+                       return (IA_CSS_PIPELINE_NUM_MAX - 1);
 
-       return pipe->pipe_num;
-}
+               return pipe->pipe_num;
+       }
 
-unsigned int
-ia_css_pipe_get_isp_pipe_version(const struct ia_css_pipe *pipe)
-{
-       assert(pipe);
+       unsigned int
+       ia_css_pipe_get_isp_pipe_version(const struct ia_css_pipe *pipe) {
+               assert(pipe);
 
-       return (unsigned int)pipe->config.isp_pipe_version;
-}
+               return (unsigned int)pipe->config.isp_pipe_version;
+       }
 
 #define SP_START_TIMEOUT_US 30000000
 
-enum ia_css_err
-ia_css_start_sp(void)
-{
-       unsigned long timeout;
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       enum ia_css_err
+       ia_css_start_sp(void) {
+               unsigned long timeout;
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_ENTER("");
-       sh_css_sp_start_isp();
+               IA_CSS_ENTER("");
+               sh_css_sp_start_isp();
 
-       /* waiting for the SP is completely started */
-       timeout = SP_START_TIMEOUT_US;
-       while ((ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_INITIALIZED) && timeout) {
-               timeout--;
-               hrt_sleep();
-       }
-       if (timeout == 0) {
-               IA_CSS_ERROR("timeout during SP initialization");
-               return IA_CSS_ERR_INTERNAL_ERROR;
-       }
+               /* waiting for the SP is completely started */
+               timeout = SP_START_TIMEOUT_US;
+               while ((ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_INITIALIZED) && timeout)
+               {
+                       timeout--;
+                       hrt_sleep();
+               }
+               if (timeout == 0)
+               {
+                       IA_CSS_ERROR("timeout during SP initialization");
+                       return IA_CSS_ERR_INTERNAL_ERROR;
+               }
 
-       /* Workaround, in order to run two streams in parallel. See TASK 4271*/
-       /* TODO: Fix this. */
+               /* Workaround, in order to run two streams in parallel. See TASK 4271*/
+               /* TODO: Fix this. */
 
-       sh_css_init_host_sp_control_vars();
+               sh_css_init_host_sp_control_vars();
 
-       /* buffers should be initialized only when sp is started */
-       /* AM: At the moment it will be done only when there is no stream active. */
+               /* buffers should be initialized only when sp is started */
+               /* AM: At the moment it will be done only when there is no stream active. */
 
-       sh_css_setup_queues();
-       ia_css_bufq_dump_queue_info();
+               sh_css_setup_queues();
+               ia_css_bufq_dump_queue_info();
 
 #ifdef ISP2401
-       if (ia_css_is_system_mode_suspend_or_resume() == false) { /* skip in suspend/resume flow */
-               ia_css_set_system_mode(IA_CSS_SYS_MODE_WORKING);
-       }
+               if (ia_css_is_system_mode_suspend_or_resume() == false)   /* skip in suspend/resume flow */
+               {
+                       ia_css_set_system_mode(IA_CSS_SYS_MODE_WORKING);
+               }
 #endif
-       IA_CSS_LEAVE_ERR(err);
-       return err;
-}
+               IA_CSS_LEAVE_ERR(err);
+               return err;
+       }
 
-/*
*     Time to wait SP for termincate. Only condition when this can happen
*     is a fatal hw failure, but we must be able to detect this and emit
*     a proper error trace.
- */
+       /*
       *      Time to wait SP for termincate. Only condition when this can happen
       *      is a fatal hw failure, but we must be able to detect this and emit
       *      a proper error trace.
       */
 #define SP_SHUTDOWN_TIMEOUT_US 200000
 
-enum ia_css_err
-ia_css_stop_sp(void)
-{
-       unsigned long timeout;
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       enum ia_css_err
+       ia_css_stop_sp(void) {
+               unsigned long timeout;
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_ENTER("void");
+               IA_CSS_ENTER("void");
 
-       if (!sh_css_sp_is_running()) {
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE("SP already stopped : return_err=%d", err);
+               if (!sh_css_sp_is_running())
+               {
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE("SP already stopped : return_err=%d", err);
 
-               /* Return an error - stop SP should not have been called by driver */
-               return err;
-       }
+                       /* Return an error - stop SP should not have been called by driver */
+                       return err;
+               }
 
-       /* For now, stop whole SP */
+               /* For now, stop whole SP */
 #ifndef ISP2401
-       sh_css_write_host2sp_command(host2sp_cmd_terminate);
+               sh_css_write_host2sp_command(host2sp_cmd_terminate);
 #else
-       if (!sh_css_write_host2sp_command(host2sp_cmd_terminate)) {
-               IA_CSS_ERROR("Call to 'sh-css_write_host2sp_command()' failed");
-               ia_css_debug_dump_sp_sw_debug_info();
-               ia_css_debug_dump_debug_info(NULL);
-       }
+               if (!sh_css_write_host2sp_command(host2sp_cmd_terminate))
+               {
+                       IA_CSS_ERROR("Call to 'sh-css_write_host2sp_command()' failed");
+                       ia_css_debug_dump_sp_sw_debug_info();
+                       ia_css_debug_dump_debug_info(NULL);
+               }
 #endif
-       sh_css_sp_set_sp_running(false);
+               sh_css_sp_set_sp_running(false);
 
-       timeout = SP_SHUTDOWN_TIMEOUT_US;
-       while (!ia_css_spctrl_is_idle(SP0_ID) && timeout) {
-               timeout--;
-               hrt_sleep();
-       }
-       if ((ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_TERMINATED))
-               IA_CSS_WARNING("SP has not terminated (SW)");
+               timeout = SP_SHUTDOWN_TIMEOUT_US;
+               while (!ia_css_spctrl_is_idle(SP0_ID) && timeout)
+               {
+                       timeout--;
+                       hrt_sleep();
+               }
+               if ((ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_TERMINATED))
+                       IA_CSS_WARNING("SP has not terminated (SW)");
 
-       if (timeout == 0) {
-               IA_CSS_WARNING("SP is not idle");
-               ia_css_debug_dump_sp_sw_debug_info();
-       }
-       timeout = SP_SHUTDOWN_TIMEOUT_US;
-       while (!isp_ctrl_getbit(ISP0_ID, ISP_SC_REG, ISP_IDLE_BIT) && timeout) {
-               timeout--;
-               hrt_sleep();
-       }
-       if (timeout == 0) {
-               IA_CSS_WARNING("ISP is not idle");
-               ia_css_debug_dump_sp_sw_debug_info();
-       }
+               if (timeout == 0)
+               {
+                       IA_CSS_WARNING("SP is not idle");
+                       ia_css_debug_dump_sp_sw_debug_info();
+               }
+               timeout = SP_SHUTDOWN_TIMEOUT_US;
+               while (!isp_ctrl_getbit(ISP0_ID, ISP_SC_REG, ISP_IDLE_BIT) && timeout)
+               {
+                       timeout--;
+                       hrt_sleep();
+               }
+               if (timeout == 0)
+               {
+                       IA_CSS_WARNING("ISP is not idle");
+                       ia_css_debug_dump_sp_sw_debug_info();
+               }
 
-       sh_css_hmm_buffer_record_uninit();
+               sh_css_hmm_buffer_record_uninit();
 
 #ifndef ISP2401
-       /* clear pending param sets from refcount */
-       sh_css_param_clear_param_sets();
-#else
-       if (ia_css_is_system_mode_suspend_or_resume() == false) { /* skip in suspend/resume flow */
                /* clear pending param sets from refcount */
                sh_css_param_clear_param_sets();
-               ia_css_set_system_mode(IA_CSS_SYS_MODE_INIT);  /* System is initialized but not 'running' */
-       }
+#else
+               if (ia_css_is_system_mode_suspend_or_resume() == false)   /* skip in suspend/resume flow */
+               {
+                       /* clear pending param sets from refcount */
+                       sh_css_param_clear_param_sets();
+                       ia_css_set_system_mode(
+                           IA_CSS_SYS_MODE_INIT);  /* System is initialized but not 'running' */
+               }
 #endif
 
-       IA_CSS_LEAVE_ERR(err);
-       return err;
-}
-
-enum ia_css_err
-ia_css_update_continuous_frames(struct ia_css_stream *stream)
-{
-       struct ia_css_pipe *pipe;
-       unsigned int i;
+               IA_CSS_LEAVE_ERR(err);
+               return err;
+       }
 
-       ia_css_debug_dtrace(
-           IA_CSS_DEBUG_TRACE,
-           "sh_css_update_continuous_frames() enter:\n");
+       enum ia_css_err
+       ia_css_update_continuous_frames(struct ia_css_stream *stream) {
+               struct ia_css_pipe *pipe;
+               unsigned int i;
 
-       if (!stream) {
                ia_css_debug_dtrace(
-                       IA_CSS_DEBUG_TRACE,
-                       "sh_css_update_continuous_frames() leave: invalid stream, return_void\n");
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
+                   IA_CSS_DEBUG_TRACE,
+                   "sh_css_update_continuous_frames() enter:\n");
 
-       pipe = stream->continuous_pipe;
+               if (!stream)
+               {
+                       ia_css_debug_dtrace(
+                           IA_CSS_DEBUG_TRACE,
+                           "sh_css_update_continuous_frames() leave: invalid stream, return_void\n");
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       for (i = stream->config.init_num_cont_raw_buf;
-                               i < stream->config.target_num_cont_raw_buf; i++) {
-               sh_css_update_host2sp_offline_frame(i,
-                               pipe->continuous_frames[i], pipe->cont_md_buffers[i]);
-       }
-       sh_css_update_host2sp_cont_num_raw_frames
-                       (stream->config.target_num_cont_raw_buf, true);
-       ia_css_debug_dtrace(
-           IA_CSS_DEBUG_TRACE,
-           "sh_css_update_continuous_frames() leave: return_void\n");
+               pipe = stream->continuous_pipe;
 
-       return IA_CSS_SUCCESS;
-}
+               for (i = stream->config.init_num_cont_raw_buf;
+                    i < stream->config.target_num_cont_raw_buf; i++)
+               {
+                       sh_css_update_host2sp_offline_frame(i,
+                                                           pipe->continuous_frames[i], pipe->cont_md_buffers[i]);
+               }
+               sh_css_update_host2sp_cont_num_raw_frames
+               (stream->config.target_num_cont_raw_buf, true);
+               ia_css_debug_dtrace(
+                   IA_CSS_DEBUG_TRACE,
+                   "sh_css_update_continuous_frames() leave: return_void\n");
 
-void ia_css_pipe_map_queue(struct ia_css_pipe *pipe, bool map)
-{
-       unsigned int thread_id;
-       enum ia_css_pipe_id pipe_id;
-       unsigned int pipe_num;
-       bool need_input_queue;
+               return IA_CSS_SUCCESS;
+       }
 
-       IA_CSS_ENTER("");
-       assert(pipe);
+       void ia_css_pipe_map_queue(struct ia_css_pipe *pipe, bool map) {
+               unsigned int thread_id;
+               enum ia_css_pipe_id pipe_id;
+               unsigned int pipe_num;
+               bool need_input_queue;
 
-       pipe_id = pipe->mode;
-       pipe_num = pipe->pipe_num;
+               IA_CSS_ENTER("");
+               assert(pipe);
 
-       ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
+               pipe_id = pipe->mode;
+               pipe_num = pipe->pipe_num;
+
+               ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
 
 #if defined(HAS_NO_INPUT_SYSTEM) || defined(USE_INPUT_SYSTEM_VERSION_2401)
-       need_input_queue = true;
+               need_input_queue = true;
 #else
-       need_input_queue = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
+               need_input_queue = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
 #endif
 
-       /* map required buffer queues to resources */
-       /* TODO: to be improved */
-       if (pipe->mode == IA_CSS_PIPE_ID_PREVIEW) {
-               if (need_input_queue)
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
+               /* map required buffer queues to resources */
+               /* TODO: to be improved */
+               if (pipe->mode == IA_CSS_PIPE_ID_PREVIEW) {
+                       if (need_input_queue)
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
 #if defined SH_CSS_ENABLE_METADATA
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
 #endif
-               if (pipe->pipe_settings.preview.preview_binary.info &&
-                       pipe->pipe_settings.preview.preview_binary.info->sp.enable.s3a)
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
-       } else if (pipe->mode == IA_CSS_PIPE_ID_CAPTURE) {
-               unsigned int i;
+                       if (pipe->pipe_settings.preview.preview_binary.info &&
+                           pipe->pipe_settings.preview.preview_binary.info->sp.enable.s3a)
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
+               } else if (pipe->mode == IA_CSS_PIPE_ID_CAPTURE) {
+                       unsigned int i;
 
-               if (need_input_queue)
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
+                       if (need_input_queue)
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
 #if defined SH_CSS_ENABLE_METADATA
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
 #endif
-               if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
-                       for (i = 0; i < pipe->pipe_settings.capture.num_primary_stage; i++) {
-                               if (pipe->pipe_settings.capture.primary_binary[i].info &&
-                                       pipe->pipe_settings.capture.primary_binary[i].info->sp.enable.s3a) {
-                                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
-                                       break;
+                       if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
+                               for (i = 0; i < pipe->pipe_settings.capture.num_primary_stage; i++) {
+                                       if (pipe->pipe_settings.capture.primary_binary[i].info &&
+                                           pipe->pipe_settings.capture.primary_binary[i].info->sp.enable.s3a) {
+                                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
+                                               break;
+                                       }
                                }
+                       } else if (pipe->config.default_capture_config.mode ==
+                                  IA_CSS_CAPTURE_MODE_ADVANCED ||
+                                  pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT ||
+                                  pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER) {
+                               if (pipe->pipe_settings.capture.pre_isp_binary.info &&
+                                   pipe->pipe_settings.capture.pre_isp_binary.info->sp.enable.s3a)
+                                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
                        }
-               } else if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
-                                pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT ||
-                                pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER) {
-                       if (pipe->pipe_settings.capture.pre_isp_binary.info &&
-                               pipe->pipe_settings.capture.pre_isp_binary.info->sp.enable.s3a)
-                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
-               }
-       } else if (pipe->mode == IA_CSS_PIPE_ID_VIDEO) {
-               if (need_input_queue)
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
-               if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0])
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
+               } else if (pipe->mode == IA_CSS_PIPE_ID_VIDEO) {
+                       if (need_input_queue)
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
+                       if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0])
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
+#if defined SH_CSS_ENABLE_METADATA
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+#endif
+                       if (pipe->pipe_settings.video.video_binary.info &&
+                           pipe->pipe_settings.video.video_binary.info->sp.enable.s3a)
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
+                       if (pipe->pipe_settings.video.video_binary.info &&
+                           (pipe->pipe_settings.video.video_binary.info->sp.enable.dis
+                           ))
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_DIS_STATISTICS, map);
+               } else if (pipe->mode == IA_CSS_PIPE_ID_COPY) {
+                       if (need_input_queue)
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
+                       if (!pipe->stream->config.continuous)
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
 #if defined SH_CSS_ENABLE_METADATA
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
-#endif
-               if (pipe->pipe_settings.video.video_binary.info &&
-                       pipe->pipe_settings.video.video_binary.info->sp.enable.s3a)
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
-               if (pipe->pipe_settings.video.video_binary.info &&
-                       (pipe->pipe_settings.video.video_binary.info->sp.enable.dis
-                       ))
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_DIS_STATISTICS, map);
-       } else if (pipe->mode == IA_CSS_PIPE_ID_COPY) {
-               if (need_input_queue)
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
-               if (!pipe->stream->config.continuous)
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+#endif
+               } else if (pipe->mode == IA_CSS_PIPE_ID_ACC) {
+                       if (need_input_queue)
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
                        ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
 #if defined SH_CSS_ENABLE_METADATA
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
-#endif
-       } else if (pipe->mode == IA_CSS_PIPE_ID_ACC) {
-               if (need_input_queue)
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
-#if defined SH_CSS_ENABLE_METADATA
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
 #endif
-       } else if (pipe->mode == IA_CSS_PIPE_ID_YUVPP) {
-               unsigned int idx;
+               } else if (pipe->mode == IA_CSS_PIPE_ID_YUVPP) {
+                       unsigned int idx;
 
-               for (idx = 0; idx < IA_CSS_PIPE_MAX_OUTPUT_STAGE; idx++) {
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME + idx, map);
-                       if (pipe->enable_viewfinder[idx])
-                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME + idx, map);
-               }
-               if (need_input_queue)
-                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
+                       for (idx = 0; idx < IA_CSS_PIPE_MAX_OUTPUT_STAGE; idx++) {
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME + idx, map);
+                               if (pipe->enable_viewfinder[idx])
+                                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME + idx, map);
+                       }
+                       if (need_input_queue)
+                               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
 #if defined SH_CSS_ENABLE_METADATA
-               ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+                       ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
 #endif
+               }
+               IA_CSS_LEAVE("");
        }
-       IA_CSS_LEAVE("");
-}
 
 #if CONFIG_ON_FRAME_ENQUEUE()
-static enum ia_css_err set_config_on_frame_enqueue(struct ia_css_frame_info *info, struct frame_data_wrapper *frame)
-{
-       frame->config_on_frame_enqueue.padded_width = 0;
-
-       /* currently we support configuration on frame enqueue only on YUV formats */
-       /* on other formats the padded_width is zeroed for no configuration override */
-       switch (info->format) {
-       case IA_CSS_FRAME_FORMAT_YUV420:
-       case IA_CSS_FRAME_FORMAT_NV12:
-               if (info->padded_width > info->res.width)
-               {
-                       frame->config_on_frame_enqueue.padded_width = info->padded_width;
-               } else if ((info->padded_width < info->res.width) && (info->padded_width > 0))
-               {
-                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+       static enum ia_css_err set_config_on_frame_enqueue(struct ia_css_frame_info
+               *info, struct frame_data_wrapper *frame) {
+               frame->config_on_frame_enqueue.padded_width = 0;
+
+               /* currently we support configuration on frame enqueue only on YUV formats */
+               /* on other formats the padded_width is zeroed for no configuration override */
+               switch (info->format) {
+               case IA_CSS_FRAME_FORMAT_YUV420:
+               case IA_CSS_FRAME_FORMAT_NV12:
+                       if (info->padded_width > info->res.width) {
+                               frame->config_on_frame_enqueue.padded_width = info->padded_width;
+                       } else if ((info->padded_width < info->res.width) && (info->padded_width > 0)) {
+                               return IA_CSS_ERR_INVALID_ARGUMENTS;
+                       }
+                       /* nothing to do if width == padded width or padded width is zeroed (the same) */
+                       break;
+               default:
+                       break;
                }
-               /* nothing to do if width == padded width or padded width is zeroed (the same) */
-               break;
-       default:
-               break;
-       }
 
-       return IA_CSS_SUCCESS;
-}
+               return IA_CSS_SUCCESS;
+       }
 #endif
 
-enum ia_css_err
-ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id)
-{
-       enum ia_css_err ret;
+       enum ia_css_err
+       ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id) {
+               enum ia_css_err ret;
 
-       IA_CSS_ENTER("");
+               IA_CSS_ENTER("");
 
-       /* Only continuous streams have a tagger to which we can send the
-        * unlock message. */
-       if (!stream || !stream->config.continuous) {
-               IA_CSS_ERROR("invalid stream pointer");
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
+               /* Only continuous streams have a tagger to which we can send the
+                * unlock message. */
+               if (!stream || !stream->config.continuous)
+               {
+                       IA_CSS_ERROR("invalid stream pointer");
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       if (exp_id > IA_CSS_ISYS_MAX_EXPOSURE_ID ||
-           exp_id < IA_CSS_ISYS_MIN_EXPOSURE_ID) {
-               IA_CSS_ERROR("invalid expsure ID: %d\n", exp_id);
-               return IA_CSS_ERR_INVALID_ARGUMENTS;
-       }
+               if (exp_id > IA_CSS_ISYS_MAX_EXPOSURE_ID ||
+                   exp_id < IA_CSS_ISYS_MIN_EXPOSURE_ID)
+               {
+                       IA_CSS_ERROR("invalid expsure ID: %d\n", exp_id);
+                       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               }
 
-       /* Send the event. Since we verified that the exp_id is valid,
-        * we can safely assign it to an 8-bit argument here. */
-       ret = ia_css_bufq_enqueue_psys_event(
-                       IA_CSS_PSYS_SW_EVENT_UNLOCK_RAW_BUFFER, exp_id, 0, 0);
+               /* Send the event. Since we verified that the exp_id is valid,
+                * we can safely assign it to an 8-bit argument here. */
+               ret = ia_css_bufq_enqueue_psys_event(
+                   IA_CSS_PSYS_SW_EVENT_UNLOCK_RAW_BUFFER, exp_id, 0, 0);
 
-       IA_CSS_LEAVE_ERR(ret);
-       return ret;
-}
+               IA_CSS_LEAVE_ERR(ret);
+               return ret;
+       }
 
-/* @brief      Set the state (Enable or Disable) of the Extension stage in the
*             given pipe.
- */
-enum ia_css_err
-ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool enable)
-{
-       unsigned int thread_id;
-       struct ia_css_pipeline_stage *stage;
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       /* @brief       Set the state (Enable or Disable) of the Extension stage in the
       *              given pipe.
       */
+       enum ia_css_err
+       ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle,
+                                     bool enable) {
+               unsigned int thread_id;
+               struct ia_css_pipeline_stage *stage;
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_ENTER("");
+               IA_CSS_ENTER("");
 
-       /* Parameter Check */
-       if (!pipe || !pipe->stream) {
-               IA_CSS_ERROR("Invalid Pipe.");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-       } else if (!(pipe->config.acc_extension)) {
-               IA_CSS_ERROR("Invalid Pipe(No Extension Firmware)");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-       } else if (!sh_css_sp_is_running()) {
-               IA_CSS_ERROR("Leaving: queue unavailable.");
-               err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
-       } else {
-               /* Query the threadid and stage_num for the Extension firmware*/
-               ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
-               err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
-               if (err == IA_CSS_SUCCESS) {
-                       /* Set the Extension State;. TODO: Add check for stage firmware.type (QOS)*/
-                       err = ia_css_bufq_enqueue_psys_event(
-                               (uint8_t)IA_CSS_PSYS_SW_EVENT_STAGE_ENABLE_DISABLE,
-                               (uint8_t)thread_id,
-                               (uint8_t)stage->stage_num,
-                               enable ? 1 : 0);
+               /* Parameter Check */
+               if (!pipe || !pipe->stream)
+               {
+                       IA_CSS_ERROR("Invalid Pipe.");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+               } else if (!(pipe->config.acc_extension))
+               {
+                       IA_CSS_ERROR("Invalid Pipe(No Extension Firmware)");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+               } else if (!sh_css_sp_is_running())
+               {
+                       IA_CSS_ERROR("Leaving: queue unavailable.");
+                       err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+               } else
+               {
+                       /* Query the threadid and stage_num for the Extension firmware*/
+                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+                       err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
                        if (err == IA_CSS_SUCCESS) {
-                               if (enable)
-                                       SH_CSS_QOS_STAGE_ENABLE(&sh_css_sp_group.pipe[thread_id], stage->stage_num);
-                               else
-                                       SH_CSS_QOS_STAGE_DISABLE(&sh_css_sp_group.pipe[thread_id], stage->stage_num);
+                               /* Set the Extension State;. TODO: Add check for stage firmware.type (QOS)*/
+                               err = ia_css_bufq_enqueue_psys_event(
+                                   (uint8_t)IA_CSS_PSYS_SW_EVENT_STAGE_ENABLE_DISABLE,
+                                   (uint8_t)thread_id,
+                                   (uint8_t)stage->stage_num,
+                                   enable ? 1 : 0);
+                               if (err == IA_CSS_SUCCESS) {
+                                       if (enable)
+                                               SH_CSS_QOS_STAGE_ENABLE(&sh_css_sp_group.pipe[thread_id], stage->stage_num);
+                                       else
+                                               SH_CSS_QOS_STAGE_DISABLE(&sh_css_sp_group.pipe[thread_id], stage->stage_num);
+                               }
                        }
                }
+               IA_CSS_LEAVE("err:%d handle:%u enable:%d", err, fw_handle, enable);
+               return err;
        }
-       IA_CSS_LEAVE("err:%d handle:%u enable:%d", err, fw_handle, enable);
-       return err;
-}
 
-/*     @brief  Get the state (Enable or Disable) of the Extension stage in the
*     given pipe.
- */
-enum ia_css_err
-ia_css_pipe_get_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool *enable)
-{
-       struct ia_css_pipeline_stage *stage;
-       unsigned int thread_id;
-       enum ia_css_err err = IA_CSS_SUCCESS;
+       /*      @brief  Get the state (Enable or Disable) of the Extension stage in the
       *      given pipe.
       */
+       enum ia_css_err
+       ia_css_pipe_get_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle,
+                                     bool *enable) {
+               struct ia_css_pipeline_stage *stage;
+               unsigned int thread_id;
+               enum ia_css_err err = IA_CSS_SUCCESS;
 
-       IA_CSS_ENTER("");
+               IA_CSS_ENTER("");
 
-       /* Parameter Check */
-       if (!pipe || !pipe->stream) {
-               IA_CSS_ERROR("Invalid Pipe.");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-       } else if (!(pipe->config.acc_extension)) {
-               IA_CSS_ERROR("Invalid Pipe (No Extension Firmware).");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-       } else if (!sh_css_sp_is_running()) {
-               IA_CSS_ERROR("Leaving: queue unavailable.");
-               err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
-       } else {
-               /* Query the threadid and stage_num corresponding to the Extension firmware*/
-               ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
-               err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
+               /* Parameter Check */
+               if (!pipe || !pipe->stream)
+               {
+                       IA_CSS_ERROR("Invalid Pipe.");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+               } else if (!(pipe->config.acc_extension))
+               {
+                       IA_CSS_ERROR("Invalid Pipe (No Extension Firmware).");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+               } else if (!sh_css_sp_is_running())
+               {
+                       IA_CSS_ERROR("Leaving: queue unavailable.");
+                       err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+               } else
+               {
+                       /* Query the threadid and stage_num corresponding to the Extension firmware*/
+                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+                       err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
 
-               if (err == IA_CSS_SUCCESS) {
-                       /* Get the Extension State */
-                       *enable = (SH_CSS_QOS_STAGE_IS_ENABLED(&sh_css_sp_group.pipe[thread_id], stage->stage_num)) ? true : false;
+                       if (err == IA_CSS_SUCCESS) {
+                               /* Get the Extension State */
+                               *enable = (SH_CSS_QOS_STAGE_IS_ENABLED(&sh_css_sp_group.pipe[thread_id],
+                                                                      stage->stage_num)) ? true : false;
+                       }
                }
+               IA_CSS_LEAVE("err:%d handle:%u enable:%d", err, fw_handle, *enable);
+               return err;
        }
-       IA_CSS_LEAVE("err:%d handle:%u enable:%d", err, fw_handle, *enable);
-       return err;
-}
 
 #ifdef ISP2401
-enum ia_css_err
-ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe, uint32_t fw_handle,
-       struct ia_css_isp_param_css_segments *css_seg, struct ia_css_isp_param_isp_segments *isp_seg)
-{
-       unsigned int HIVE_ADDR_sp_group;
-       static struct sh_css_sp_group sp_group;
-       static struct sh_css_sp_stage sp_stage;
-       static struct sh_css_isp_stage isp_stage;
-       const struct ia_css_fw_info *fw;
-       unsigned int thread_id;
-       struct ia_css_pipeline_stage *stage;
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       int stage_num = 0;
-       enum ia_css_isp_memories mem;
-       bool enabled;
+       enum ia_css_err
+       ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe,
+                                             uint32_t fw_handle,
+                                             struct ia_css_isp_param_css_segments *css_seg,
+                                             struct ia_css_isp_param_isp_segments *isp_seg) {
+               unsigned int HIVE_ADDR_sp_group;
+               static struct sh_css_sp_group sp_group;
+               static struct sh_css_sp_stage sp_stage;
+               static struct sh_css_isp_stage isp_stage;
+               const struct ia_css_fw_info *fw;
+               unsigned int thread_id;
+               struct ia_css_pipeline_stage *stage;
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               int stage_num = 0;
+               enum ia_css_isp_memories mem;
+               bool enabled;
 
-       IA_CSS_ENTER("");
+               IA_CSS_ENTER("");
 
-       fw = &sh_css_sp_fw;
+               fw = &sh_css_sp_fw;
 
-       /* Parameter Check */
-       if (!pipe || !pipe->stream) {
-               IA_CSS_ERROR("Invalid Pipe.");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-       } else if (!(pipe->config.acc_extension)) {
-               IA_CSS_ERROR("Invalid Pipe (No Extension Firmware).");
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-       } else if (!sh_css_sp_is_running()) {
-               IA_CSS_ERROR("Leaving: queue unavailable.");
-               err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
-       } else {
-               /* Query the thread_id and stage_num corresponding to the Extension firmware */
-               ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
-               err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
-               if (err == IA_CSS_SUCCESS) {
-                       /* Get the Extension State */
-                       enabled = (SH_CSS_QOS_STAGE_IS_ENABLED(&sh_css_sp_group.pipe[thread_id], stage->stage_num)) ? true : false;
-                       /* Update mapped arg only when extension stage is not enabled */
-                       if (enabled) {
-                               IA_CSS_ERROR("Leaving: cannot update when stage is enabled.");
-                               err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
-                       } else {
-                               stage_num = stage->stage_num;
-
-                               HIVE_ADDR_sp_group = fw->info.sp.group;
-                               sp_dmem_load(SP0_ID,
-                                       (unsigned int)sp_address_of(sp_group),
-                                       &sp_group, sizeof(struct sh_css_sp_group));
-                               mmgr_load(sp_group.pipe[thread_id].sp_stage_addr[stage_num],
-                                       &sp_stage, sizeof(struct sh_css_sp_stage));
-
-                               mmgr_load(sp_stage.isp_stage_addr,
-                                       &isp_stage, sizeof(struct sh_css_isp_stage));
-
-                               for (mem = 0; mem < N_IA_CSS_ISP_MEMORIES; mem++) {
-                                       isp_stage.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].address =
-                                               css_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].address;
-                                       isp_stage.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].size =
-                                               css_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].size;
-                                       isp_stage.binary_info.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].address =
-                                               isp_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].address;
-                                       isp_stage.binary_info.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].size =
-                                               isp_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].size;
-                               }
+               /* Parameter Check */
+               if (!pipe || !pipe->stream)
+               {
+                       IA_CSS_ERROR("Invalid Pipe.");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+               } else if (!(pipe->config.acc_extension))
+               {
+                       IA_CSS_ERROR("Invalid Pipe (No Extension Firmware).");
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+               } else if (!sh_css_sp_is_running())
+               {
+                       IA_CSS_ERROR("Leaving: queue unavailable.");
+                       err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+               } else
+               {
+                       /* Query the thread_id and stage_num corresponding to the Extension firmware */
+                       ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+                       err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
+                       if (err == IA_CSS_SUCCESS) {
+                               /* Get the Extension State */
+                               enabled = (SH_CSS_QOS_STAGE_IS_ENABLED(&sh_css_sp_group.pipe[thread_id],
+                                                                      stage->stage_num)) ? true : false;
+                               /* Update mapped arg only when extension stage is not enabled */
+                               if (enabled) {
+                                       IA_CSS_ERROR("Leaving: cannot update when stage is enabled.");
+                                       err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+                               } else {
+                                       stage_num = stage->stage_num;
+
+                                       HIVE_ADDR_sp_group = fw->info.sp.group;
+                                       sp_dmem_load(SP0_ID,
+                                                    (unsigned int)sp_address_of(sp_group),
+                                                    &sp_group, sizeof(struct sh_css_sp_group));
+                                       mmgr_load(sp_group.pipe[thread_id].sp_stage_addr[stage_num],
+                                                 &sp_stage, sizeof(struct sh_css_sp_stage));
+
+                                       mmgr_load(sp_stage.isp_stage_addr,
+                                                 &isp_stage, sizeof(struct sh_css_isp_stage));
+
+                                       for (mem = 0; mem < N_IA_CSS_ISP_MEMORIES; mem++) {
+                                               isp_stage.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].address =
+                                                   css_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].address;
+                                               isp_stage.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].size =
+                                                   css_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].size;
+                                               isp_stage.binary_info.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].address
+                                                   =
+                                                       isp_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].address;
+                                               isp_stage.binary_info.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].size
+                                                   =
+                                                       isp_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].size;
+                                       }
 
-                               mmgr_store(sp_stage.isp_stage_addr,
-                                       &isp_stage, sizeof(struct sh_css_isp_stage));
+                                       mmgr_store(sp_stage.isp_stage_addr,
+                                                  &isp_stage, sizeof(struct sh_css_isp_stage));
+                               }
                        }
                }
+               IA_CSS_LEAVE("err:%d handle:%u", err, fw_handle);
+               return err;
        }
-       IA_CSS_LEAVE("err:%d handle:%u", err, fw_handle);
-       return err;
-}
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-static enum ia_css_err
-aspect_ratio_crop_init(struct ia_css_stream *curr_stream,
-               struct ia_css_pipe *pipes[],
-               bool *do_crop_status)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       int i;
-       struct ia_css_pipe *curr_pipe;
-       u32 pipe_mask = 0;
+       static enum ia_css_err
+       aspect_ratio_crop_init(struct ia_css_stream *curr_stream,
+                              struct ia_css_pipe *pipes[],
+                              bool *do_crop_status) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               int i;
+               struct ia_css_pipe *curr_pipe;
+               u32 pipe_mask = 0;
 
-       if ((!curr_stream) ||
-           (curr_stream->num_pipes == 0) ||
-           (!pipes) ||
-           (!do_crop_status)) {
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
+               if ((!curr_stream) ||
+                   (curr_stream->num_pipes == 0) ||
+                   (!pipes) ||
+                   (!do_crop_status))
+               {
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE_ERR(err);
+                       return err;
+               }
 
-       for (i = 0; i < curr_stream->num_pipes; i++) {
-               curr_pipe = pipes[i];
-               pipe_mask |= (1 << curr_pipe->config.mode);
-       }
+               for (i = 0; i < curr_stream->num_pipes; i++)
+               {
+                       curr_pipe = pipes[i];
+                       pipe_mask |= (1 << curr_pipe->config.mode);
+               }
 
-       *do_crop_status =
+               *do_crop_status =
                (((pipe_mask & (1 << IA_CSS_PIPE_MODE_PREVIEW)) ||
                  (pipe_mask & (1 << IA_CSS_PIPE_MODE_VIDEO))) &&
-                 (pipe_mask & (1 << IA_CSS_PIPE_MODE_CAPTURE)) &&
-                 curr_stream->config.continuous);
-       return IA_CSS_SUCCESS;
-}
+                (pipe_mask & (1 << IA_CSS_PIPE_MODE_CAPTURE)) &&
+                curr_stream->config.continuous);
+               return IA_CSS_SUCCESS;
+       }
 
-static bool
-aspect_ratio_crop_check(bool enabled, struct ia_css_pipe *curr_pipe)
-{
-       bool status = false;
+       static bool
+       aspect_ratio_crop_check(bool enabled, struct ia_css_pipe *curr_pipe) {
+               bool status = false;
+
+               if ((curr_pipe) && enabled) {
+                       if ((curr_pipe->config.mode == IA_CSS_PIPE_MODE_PREVIEW) ||
+                           (curr_pipe->config.mode == IA_CSS_PIPE_MODE_VIDEO) ||
+                           (curr_pipe->config.mode == IA_CSS_PIPE_MODE_CAPTURE))
+                               status = true;
+               }
 
-       if ((curr_pipe) && enabled) {
-               if ((curr_pipe->config.mode == IA_CSS_PIPE_MODE_PREVIEW) ||
-                   (curr_pipe->config.mode == IA_CSS_PIPE_MODE_VIDEO) ||
-                   (curr_pipe->config.mode == IA_CSS_PIPE_MODE_CAPTURE))
-                       status = true;
+               return status;
        }
 
-       return status;
-}
+       static enum ia_css_err
+       aspect_ratio_crop(struct ia_css_pipe *curr_pipe,
+                         struct ia_css_resolution *effective_res) {
+               enum ia_css_err err = IA_CSS_SUCCESS;
+               struct ia_css_resolution crop_res;
+               struct ia_css_resolution *in_res = NULL;
+               struct ia_css_resolution *out_res = NULL;
+               bool use_bds_output_info = false;
+               bool use_vf_pp_in_res = false;
+               bool use_capt_pp_in_res = false;
 
-static enum ia_css_err
-aspect_ratio_crop(struct ia_css_pipe *curr_pipe,
-               struct ia_css_resolution *effective_res)
-{
-       enum ia_css_err err = IA_CSS_SUCCESS;
-       struct ia_css_resolution crop_res;
-       struct ia_css_resolution *in_res = NULL;
-       struct ia_css_resolution *out_res = NULL;
-       bool use_bds_output_info = false;
-       bool use_vf_pp_in_res = false;
-       bool use_capt_pp_in_res = false;
-
-       if ((!curr_pipe) ||
-           (!effective_res)) {
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
+               if ((!curr_pipe) ||
+                   (!effective_res))
+               {
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE_ERR(err);
+                       return err;
+               }
 
-       if ((curr_pipe->config.mode != IA_CSS_PIPE_MODE_PREVIEW) &&
-           (curr_pipe->config.mode != IA_CSS_PIPE_MODE_VIDEO) &&
-           (curr_pipe->config.mode != IA_CSS_PIPE_MODE_CAPTURE)) {
-               err = IA_CSS_ERR_INVALID_ARGUMENTS;
-               IA_CSS_LEAVE_ERR(err);
-               return err;
-       }
+               if ((curr_pipe->config.mode != IA_CSS_PIPE_MODE_PREVIEW) &&
+                   (curr_pipe->config.mode != IA_CSS_PIPE_MODE_VIDEO) &&
+                   (curr_pipe->config.mode != IA_CSS_PIPE_MODE_CAPTURE))
+               {
+                       err = IA_CSS_ERR_INVALID_ARGUMENTS;
+                       IA_CSS_LEAVE_ERR(err);
+                       return err;
+               }
 
-       use_bds_output_info =
+               use_bds_output_info =
                ((curr_pipe->bds_output_info.res.width != 0) &&
                 (curr_pipe->bds_output_info.res.height != 0));
 
-       use_vf_pp_in_res =
+               use_vf_pp_in_res =
                ((curr_pipe->config.vf_pp_in_res.width != 0) &&
                 (curr_pipe->config.vf_pp_in_res.height != 0));
 
-       use_capt_pp_in_res =
+               use_capt_pp_in_res =
                ((curr_pipe->config.capt_pp_in_res.width != 0) &&
                 (curr_pipe->config.capt_pp_in_res.height != 0));
 
-       in_res = &curr_pipe->stream->config.input_config.effective_res;
-       out_res = &curr_pipe->output_info[0].res;
+               in_res = &curr_pipe->stream->config.input_config.effective_res;
+               out_res = &curr_pipe->output_info[0].res;
 
-       switch (curr_pipe->config.mode) {
-       case IA_CSS_PIPE_MODE_PREVIEW:
-               if (use_bds_output_info)
-                       out_res = &curr_pipe->bds_output_info.res;
-               else if (use_vf_pp_in_res)
-                       out_res = &curr_pipe->config.vf_pp_in_res;
-               break;
-       case IA_CSS_PIPE_MODE_VIDEO:
-               if (use_bds_output_info)
-                       out_res = &curr_pipe->bds_output_info.res;
-               break;
-       case IA_CSS_PIPE_MODE_CAPTURE:
-               if (use_capt_pp_in_res)
-                       out_res = &curr_pipe->config.capt_pp_in_res;
-               break;
-       case IA_CSS_PIPE_MODE_ACC:
-       case IA_CSS_PIPE_MODE_COPY:
-       case IA_CSS_PIPE_MODE_YUVPP:
-       default:
-               IA_CSS_ERROR("aspect ratio cropping invalid args: mode[%d]\n",
-                       curr_pipe->config.mode);
-               assert(0);
-               break;
-       }
+               switch (curr_pipe->config.mode)
+               {
+               case IA_CSS_PIPE_MODE_PREVIEW:
+                       if (use_bds_output_info)
+                               out_res = &curr_pipe->bds_output_info.res;
+                       else if (use_vf_pp_in_res)
+                               out_res = &curr_pipe->config.vf_pp_in_res;
+                       break;
+               case IA_CSS_PIPE_MODE_VIDEO:
+                       if (use_bds_output_info)
+                               out_res = &curr_pipe->bds_output_info.res;
+                       break;
+               case IA_CSS_PIPE_MODE_CAPTURE:
+                       if (use_capt_pp_in_res)
+                               out_res = &curr_pipe->config.capt_pp_in_res;
+                       break;
+               case IA_CSS_PIPE_MODE_ACC:
+               case IA_CSS_PIPE_MODE_COPY:
+               case IA_CSS_PIPE_MODE_YUVPP:
+               default:
+                       IA_CSS_ERROR("aspect ratio cropping invalid args: mode[%d]\n",
+                                    curr_pipe->config.mode);
+                       assert(0);
+                       break;
+               }
 
-       err = ia_css_frame_find_crop_resolution(in_res, out_res, &crop_res);
-       if (err == IA_CSS_SUCCESS) {
-               *effective_res = crop_res;
-       } else {
-               /* in case of error fallback to default
-                * effective resolution from driver. */
-               IA_CSS_LOG("ia_css_frame_find_crop_resolution() failed with err(%d)", err);
+               err = ia_css_frame_find_crop_resolution(in_res, out_res, &crop_res);
+               if (err == IA_CSS_SUCCESS)
+               {
+                       *effective_res = crop_res;
+               } else
+               {
+                       /* in case of error fallback to default
+                        * effective resolution from driver. */
+                       IA_CSS_LOG("ia_css_frame_find_crop_resolution() failed with err(%d)", err);
+               }
+               return err;
        }
-       return err;
-}
 #endif
 
 #endif
-static void
-sh_css_hmm_buffer_record_init(void)
-{
-       int i;
+       static void
+       sh_css_hmm_buffer_record_init(void) {
+               int i;
 
 #ifndef ISP2401
-       for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
-               sh_css_hmm_buffer_record_reset(&hmm_buffer_record[i]);
-#else
-       if (ia_css_is_system_mode_suspend_or_resume() == false) { /* skip in suspend/resume flow */
                for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
                        sh_css_hmm_buffer_record_reset(&hmm_buffer_record[i]);
-               }
+#else
+               if (ia_css_is_system_mode_suspend_or_resume() ==
+                   false) { /* skip in suspend/resume flow */
+                       for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
+                               sh_css_hmm_buffer_record_reset(&hmm_buffer_record[i]);
+                       }
 #endif
+               }
        }
-}
 
-static void
-sh_css_hmm_buffer_record_uninit(void)
-{
-       int i;
-       struct sh_css_hmm_buffer_record *buffer_record = NULL;
+       static void
+       sh_css_hmm_buffer_record_uninit(void) {
+               int i;
+               struct sh_css_hmm_buffer_record *buffer_record = NULL;
 
 #ifndef ISP2401
-       buffer_record = &hmm_buffer_record[0];
-       for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
-               if (buffer_record->in_use) {
-                       if (buffer_record->h_vbuf)
-                               ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &buffer_record->h_vbuf);
-                       sh_css_hmm_buffer_record_reset(buffer_record);
-#else
-       if (ia_css_is_system_mode_suspend_or_resume() == false) { /* skip in suspend/resume flow */
                buffer_record = &hmm_buffer_record[0];
                for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
                        if (buffer_record->in_use) {
                                if (buffer_record->h_vbuf)
                                        ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &buffer_record->h_vbuf);
                                sh_css_hmm_buffer_record_reset(buffer_record);
+#else
+               if (ia_css_is_system_mode_suspend_or_resume() ==
+                   false) { /* skip in suspend/resume flow */
+                       buffer_record = &hmm_buffer_record[0];
+                       for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
+                               if (buffer_record->in_use) {
+                                       if (buffer_record->h_vbuf)
+                                               ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &buffer_record->h_vbuf);
+                                       sh_css_hmm_buffer_record_reset(buffer_record);
+                               }
+                               buffer_record++;
+#endif
                        }
+#ifndef ISP2401
                        buffer_record++;
 #endif
                }
-#ifndef ISP2401
-               buffer_record++;
-#endif
        }
-}
 
-static void
-sh_css_hmm_buffer_record_reset(struct sh_css_hmm_buffer_record *buffer_record)
-{
-       assert(buffer_record);
-       buffer_record->in_use = false;
-       buffer_record->type = IA_CSS_BUFFER_TYPE_INVALID;
-       buffer_record->h_vbuf = NULL;
-       buffer_record->kernel_ptr = 0;
-}
+       static void
+       sh_css_hmm_buffer_record_reset(struct sh_css_hmm_buffer_record *buffer_record) {
+               assert(buffer_record);
+               buffer_record->in_use = false;
+               buffer_record->type = IA_CSS_BUFFER_TYPE_INVALID;
+               buffer_record->h_vbuf = NULL;
+               buffer_record->kernel_ptr = 0;
+       }
 
-static struct sh_css_hmm_buffer_record
-*sh_css_hmm_buffer_record_acquire(struct ia_css_rmgr_vbuf_handle *h_vbuf,
-                       enum ia_css_buffer_type type,
-                       hrt_address kernel_ptr)
-{
-       int i;
-       struct sh_css_hmm_buffer_record *buffer_record = NULL;
-       struct sh_css_hmm_buffer_record *out_buffer_record = NULL;
+       static struct sh_css_hmm_buffer_record
+       *sh_css_hmm_buffer_record_acquire(struct ia_css_rmgr_vbuf_handle *h_vbuf,
+                                         enum ia_css_buffer_type type,
+                                         hrt_address kernel_ptr) {
+               int i;
+               struct sh_css_hmm_buffer_record *buffer_record = NULL;
+               struct sh_css_hmm_buffer_record *out_buffer_record = NULL;
 
-       assert(h_vbuf);
-       assert((type > IA_CSS_BUFFER_TYPE_INVALID) && (type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE));
-       assert(kernel_ptr != 0);
-
-       buffer_record = &hmm_buffer_record[0];
-       for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
-               if (!buffer_record->in_use) {
-                       buffer_record->in_use = true;
-                       buffer_record->type = type;
-                       buffer_record->h_vbuf = h_vbuf;
-                       buffer_record->kernel_ptr = kernel_ptr;
-                       out_buffer_record = buffer_record;
-                       break;
+               assert(h_vbuf);
+               assert((type > IA_CSS_BUFFER_TYPE_INVALID) &&
+                      (type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE));
+               assert(kernel_ptr != 0);
+
+               buffer_record = &hmm_buffer_record[0];
+               for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
+                       if (!buffer_record->in_use) {
+                               buffer_record->in_use = true;
+                               buffer_record->type = type;
+                               buffer_record->h_vbuf = h_vbuf;
+                               buffer_record->kernel_ptr = kernel_ptr;
+                               out_buffer_record = buffer_record;
+                               break;
+                       }
+                       buffer_record++;
                }
-               buffer_record++;
+
+               return out_buffer_record;
        }
 
-       return out_buffer_record;
-}
+       static struct sh_css_hmm_buffer_record
+       *sh_css_hmm_buffer_record_validate(hrt_vaddress ddr_buffer_addr,
+                                          enum ia_css_buffer_type type) {
+               int i;
+               struct sh_css_hmm_buffer_record *buffer_record = NULL;
+               bool found_record = false;
 
-static struct sh_css_hmm_buffer_record
-*sh_css_hmm_buffer_record_validate(hrt_vaddress ddr_buffer_addr,
-               enum ia_css_buffer_type type)
-{
-       int i;
-       struct sh_css_hmm_buffer_record *buffer_record = NULL;
-       bool found_record = false;
-
-       buffer_record = &hmm_buffer_record[0];
-       for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
-               if ((buffer_record->in_use) &&
-                   (buffer_record->type == type) &&
-                   (buffer_record->h_vbuf) &&
-                   (buffer_record->h_vbuf->vptr == ddr_buffer_addr)) {
-                       found_record = true;
-                       break;
+               buffer_record = &hmm_buffer_record[0];
+               for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
+                       if ((buffer_record->in_use) &&
+                           (buffer_record->type == type) &&
+                           (buffer_record->h_vbuf) &&
+                           (buffer_record->h_vbuf->vptr == ddr_buffer_addr)) {
+                               found_record = true;
+                               break;
+                       }
+                       buffer_record++;
                }
-               buffer_record++;
-       }
 
-       if (found_record)
-               return buffer_record;
-       else
-               return NULL;
-}
+               if (found_record)
+                       return buffer_record;
+               else
+                       return NULL;
+       }
index 87a6b4a7efdd55bddfc45a2f7dfa5a198d086b98..f93272bf0e2a4555caba423ffd5860adfca9eccd 100644 (file)
@@ -68,7 +68,7 @@
 #define SH_CSS_BDS_FACTOR_5_00 (9)
 #define SH_CSS_BDS_FACTOR_6_00 (10)
 #define SH_CSS_BDS_FACTOR_8_00 (11)
-#define NUM_BDS_FACTORS                (12)
+#define NUM_BDS_FACTORS                (12)
 
 #define PACK_BDS_FACTOR(factor)        (1 << (factor))
 
index 2be1d0904336d06b8ba15d7345c6f06f7912fd70..7c0216533e661ac3241213eaf71239893ce313cb 100644 (file)
@@ -54,7 +54,8 @@ static struct firmware_header *firmware_header;
  * which will be replaced with the actual RELEASE_VERSION
  * during package generation. Please do not modify  */
 #ifndef ISP2401
-static const char *release_version = STR(irci_stable_candrpv_0415_20150521_0458);
+static const char *release_version = STR(
+       irci_stable_candrpv_0415_20150521_0458);
 #else
 static const char *release_version = STR(irci_ecr - master_20150911_0724);
 #endif
@@ -79,8 +80,8 @@ char *sh_css_get_fw_version(void)
 
 /* Setup sp/sp1 binary */
 static enum ia_css_err
-setup_binary(struct ia_css_fw_info *fw, const char *fw_data, struct ia_css_fw_info *sh_css_fw, unsigned int binary_id)
-{
+setup_binary(struct ia_css_fw_info *fw, const char *fw_data,
+            struct ia_css_fw_info *sh_css_fw, unsigned int binary_id) {
        const char *blob_data;
 
        if ((!fw) || (!fw_data))
@@ -102,8 +103,9 @@ setup_binary(struct ia_css_fw_info *fw, const char *fw_data, struct ia_css_fw_in
 }
 
 enum ia_css_err
-sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, struct ia_css_blob_descr *bd, unsigned int index)
-{
+sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi,
+                     struct ia_css_blob_descr *bd,
+                     unsigned int index) {
        const char *name;
        const unsigned char *blob;
 
@@ -117,7 +119,8 @@ sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, struct ia
        blob = (const unsigned char *)fw + bi->blob.offset;
 
        /* sanity check */
-       if (bi->blob.size != bi->blob.text_size + bi->blob.icache_size + bi->blob.data_size + bi->blob.padding_size) {
+       if (bi->blob.size != bi->blob.text_size + bi->blob.icache_size + bi->blob.data_size + bi->blob.padding_size)
+       {
                /* sanity check, note the padding bytes added for section to DDR alignment */
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -128,23 +131,27 @@ sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, struct ia
        bd->blob = blob;
        bd->header = *bi;
 
-       if (bi->type == ia_css_isp_firmware || bi->type == ia_css_sp_firmware) {
+       if (bi->type == ia_css_isp_firmware || bi->type == ia_css_sp_firmware)
+       {
                char *namebuffer;
 
                namebuffer = kstrdup(name, GFP_KERNEL);
                if (!namebuffer)
                        return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                bd->name = fw_minibuffer[index].name = namebuffer;
-       } else {
+       } else
+       {
                bd->name = name;
        }
 
-       if (bi->type == ia_css_isp_firmware) {
+       if (bi->type == ia_css_isp_firmware)
+       {
                size_t paramstruct_size = sizeof(struct ia_css_memory_offsets);
                size_t configstruct_size = sizeof(struct ia_css_config_memory_offsets);
                size_t statestruct_size = sizeof(struct ia_css_state_memory_offsets);
 
-               char *parambuf = kmalloc(paramstruct_size + configstruct_size + statestruct_size,
+               char *parambuf = kmalloc(paramstruct_size + configstruct_size +
+                                        statestruct_size,
                                         GFP_KERNEL);
                if (!parambuf)
                        return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
@@ -156,21 +163,24 @@ sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, struct ia
                fw_minibuffer[index].buffer = parambuf;
 
                /* copy ia_css_memory_offsets */
-               memcpy(parambuf, (void *)(fw + bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_PARAM]),
-                       paramstruct_size);
+               memcpy(parambuf, (void *)(fw +
+                                         bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_PARAM]),
+                      paramstruct_size);
                bd->mem_offsets.array[IA_CSS_PARAM_CLASS_PARAM].ptr = parambuf;
 
                /* copy ia_css_config_memory_offsets */
                memcpy(parambuf + paramstruct_size,
-                               (void *)(fw + bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_CONFIG]),
-                               configstruct_size);
-               bd->mem_offsets.array[IA_CSS_PARAM_CLASS_CONFIG].ptr = parambuf + paramstruct_size;
+                      (void *)(fw + bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_CONFIG]),
+                      configstruct_size);
+               bd->mem_offsets.array[IA_CSS_PARAM_CLASS_CONFIG].ptr = parambuf +
+               paramstruct_size;
 
                /* copy ia_css_state_memory_offsets */
                memcpy(parambuf + paramstruct_size + configstruct_size,
-                               (void *)(fw + bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_STATE]),
-                               statestruct_size);
-               bd->mem_offsets.array[IA_CSS_PARAM_CLASS_STATE].ptr = parambuf + paramstruct_size + configstruct_size;
+                      (void *)(fw + bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_STATE]),
+                      statestruct_size);
+               bd->mem_offsets.array[IA_CSS_PARAM_CLASS_STATE].ptr = parambuf +
+               paramstruct_size + configstruct_size;
        }
        return IA_CSS_SUCCESS;
 }
@@ -193,8 +203,7 @@ sh_css_check_firmware_version(const char *fw_data)
 
 enum ia_css_err
 sh_css_load_firmware(const char *fw_data,
-                    unsigned int fw_size)
-{
+                    unsigned int fw_size) {
        unsigned int i;
        struct ia_css_fw_info *binaries;
        struct sh_css_fw_bi_file_h *file_header;
@@ -205,13 +214,15 @@ sh_css_load_firmware(const char *fw_data,
        binaries = &firmware_header->binary_header;
        strncpy(FW_rel_ver_name, file_header->version, min(sizeof(FW_rel_ver_name), sizeof(file_header->version)) - 1);
        valid_firmware = sh_css_check_firmware_version(fw_data);
-       if (!valid_firmware) {
+       if (!valid_firmware)
+       {
 #if !defined(HRT_RTL)
                IA_CSS_ERROR("CSS code version (%s) and firmware version (%s) mismatch!",
-                               file_header->version, release_version);
+                            file_header->version, release_version);
                return IA_CSS_ERR_VERSION_MISMATCH;
 #endif
-       } else {
+       } else
+       {
                IA_CSS_LOG("successfully load firmware version %s", release_version);
        }
 
@@ -224,13 +235,15 @@ sh_css_load_firmware(const char *fw_data,
 
        sh_css_num_binaries = file_header->binary_nr;
        /* Only allocate memory for ISP blob info */
-       if (sh_css_num_binaries > NUM_OF_SPS) {
+       if (sh_css_num_binaries > NUM_OF_SPS)
+       {
                sh_css_blob_info = kmalloc(
-                                       (sh_css_num_binaries - NUM_OF_SPS) *
-                                       sizeof(*sh_css_blob_info), GFP_KERNEL);
+                   (sh_css_num_binaries - NUM_OF_SPS) *
+                   sizeof(*sh_css_blob_info), GFP_KERNEL);
                if (!sh_css_blob_info)
                        return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-       } else {
+       } else
+       {
                sh_css_blob_info = NULL;
        }
 
@@ -239,7 +252,8 @@ sh_css_load_firmware(const char *fw_data,
        if (!fw_minibuffer)
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 
-       for (i = 0; i < sh_css_num_binaries; i++) {
+       for (i = 0; i < sh_css_num_binaries; i++)
+       {
                struct ia_css_fw_info *bi = &binaries[i];
                /* note: the var below is made static as it is quite large;
                   if it is not static it ends up on the stack which could
index 55d94f268b2a35bcfb1988207fc2fa8cc54c1862..090758d6f00ada1678443d259e67ca501754e419 100644 (file)
@@ -49,6 +49,7 @@ void sh_css_unload_firmware(void);
 hrt_vaddress sh_css_load_blob(const unsigned char *blob, unsigned int size);
 
 enum ia_css_err
-sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, struct ia_css_blob_descr *bd, unsigned int i);
+sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi,
+                     struct ia_css_blob_descr *bd, unsigned int i);
 
 #endif /* _SH_CSS_FIRMWARE_H_ */
index fb4598341408cde4cc66a546a82ce9f5fa7e5fcc..94b2de5b5ef4bacf3765eb02d41dc01f9c948668 100644 (file)
@@ -75,9 +75,9 @@ enum ia_css_err sh_css_hrt_sp_wait(void)
         * (e.g. frame_done)
         */
        while (!sp_ctrl_getbit(SP0_ID, SP_SC_REG, SP_IDLE_BIT) &&
-               ((irq_reg_load(IRQ0_ID,
-                       _HRT_IRQ_CONTROLLER_STATUS_REG_IDX) &
-                       (1U << (irq_id + IRQ_SW_CHANNEL_OFFSET))) == 0)) {
+              ((irq_reg_load(IRQ0_ID,
+                             _HRT_IRQ_CONTROLLER_STATUS_REG_IDX) &
+                (1U << (irq_id + IRQ_SW_CHANNEL_OFFSET))) == 0)) {
                hrt_sleep();
        }
 
index 5daa0e1660edcfe61a7b00b544d52617cf339a2e..244111aad6961ac6a9fdf5008045940c1850e8ab 100644 (file)
 #define SH_CSS_ENABLE_METADATA_THREAD
 #endif
 
- /*
 * SH_CSS_MAX_SP_THREADS:
 *     sp threads visible to host with connected communication queues
 *     these threads are capable of running an image pipe
 * SH_CSS_MAX_SP_INTERNAL_THREADS:
 *     internal sp service threads, no communication queues to host
 *     these threads can't be used as image pipe
 */
+/*
+ * SH_CSS_MAX_SP_THREADS:
     sp threads visible to host with connected communication queues
     these threads are capable of running an image pipe
+ * SH_CSS_MAX_SP_INTERNAL_THREADS:
     internal sp service threads, no communication queues to host
     these threads can't be used as image pipe
+ */
 
 #if defined(SH_CSS_ENABLE_METADATA_THREAD)
 #define SH_CSS_SP_INTERNAL_METADATA_THREAD     1
 #define SH_CSS_SP_INTERNAL_SERVICE_THREAD              1
 
 #ifdef __DISABLE_UNUSED_THREAD__
-       #define SH_CSS_MAX_SP_THREADS                   0
+#define SH_CSS_MAX_SP_THREADS                  0
 #else
-       #define SH_CSS_MAX_SP_THREADS           5
+#define SH_CSS_MAX_SP_THREADS          5
 #endif
 
 #define SH_CSS_MAX_SP_INTERNAL_THREADS (\
@@ -161,10 +161,10 @@ enum sh_css_order_binaries {
        ISP_FIRMWARE
 };
 
- /*
- * JB: keep next enum in sync with thread id's
- * and pipe id's
- */
+/*
+* JB: keep next enum in sync with thread id's
+* and pipe id's
+*/
 enum sh_css_pipe_config_override {
        SH_CSS_PIPE_CONFIG_OVRD_NONE     = 0,
        SH_CSS_PIPE_CONFIG_OVRD_NO_OVRD  = 0xffff
@@ -274,23 +274,28 @@ struct sh_css_ddr_address_map_compound {
 };
 
 struct ia_css_isp_parameter_set_info {
-       struct sh_css_ddr_address_map  mem_map;/** pointers to Parameters in ISP format IMPT:
+       struct sh_css_ddr_address_map
+               mem_map;/** pointers to Parameters in ISP format IMPT:
                                                    This should be first member of this struct */
-       u32                       isp_parameters_id;/** Unique ID to track which config was actually applied to a particular frame */
-       ia_css_ptr                     output_frame_ptr;/** Output frame to which this config has to be applied (optional) */
+       u32
+       isp_parameters_id;/** Unique ID to track which config was actually applied to a particular frame */
+       ia_css_ptr
+       output_frame_ptr;/** Output frame to which this config has to be applied (optional) */
 };
 
 /* this struct contains all arguments that can be passed to
    a binary. It depends on the binary which ones are used. */
 struct sh_css_binary_args {
        struct ia_css_frame *in_frame;       /* input frame */
-       struct ia_css_frame *delay_frames[MAX_NUM_VIDEO_DELAY_FRAMES];   /* reference input frame */
+       struct ia_css_frame
+               *delay_frames[MAX_NUM_VIDEO_DELAY_FRAMES];   /* reference input frame */
 #ifndef ISP2401
        struct ia_css_frame *tnr_frames[NUM_VIDEO_TNR_FRAMES];   /* tnr frames */
 #else
        struct ia_css_frame *tnr_frames[NUM_TNR_FRAMES];   /* tnr frames */
 #endif
-       struct ia_css_frame *out_frame[IA_CSS_BINARY_MAX_OUTPUT_PORTS];      /* output frame */
+       struct ia_css_frame
+               *out_frame[IA_CSS_BINARY_MAX_OUTPUT_PORTS];      /* output frame */
        struct ia_css_frame *out_vf_frame;   /* viewfinder output frame */
        bool                 copy_vf;
        bool                 copy_output;
@@ -408,7 +413,8 @@ struct sh_css_sp_config {
                u8                                      a_changed;
                u8                                      b_changed;
                u8                                      isp_2ppc;
-               struct sh_css_sp_input_formatter_set    set[SH_CSS_MAX_IF_CONFIGS]; /* CSI-2 port is used as index. */
+               struct sh_css_sp_input_formatter_set
+                       set[SH_CSS_MAX_IF_CONFIGS]; /* CSI-2 port is used as index. */
        } input_formatter;
 #endif
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
@@ -440,7 +446,8 @@ enum sh_css_stage_type {
 struct sh_css_sp_pipeline_terminal {
        union {
                /* Input System 2401 */
-               virtual_input_system_stream_t virtual_input_system_stream[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
+               virtual_input_system_stream_t
+               virtual_input_system_stream[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
        } context;
        /*
         * TODO
@@ -448,7 +455,8 @@ struct sh_css_sp_pipeline_terminal {
         */
        union {
                /* Input System 2401 */
-               virtual_input_system_stream_cfg_t virtual_input_system_stream_cfg[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
+               virtual_input_system_stream_cfg_t
+               virtual_input_system_stream_cfg[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
        } ctrl;
 };
 
@@ -508,7 +516,8 @@ enum sh_css_port_type {
  * This function frees an array of metadata buffers.
  */
 void
-ia_css_metadata_free_multiple(unsigned int num_bufs, struct ia_css_metadata **bufs);
+ia_css_metadata_free_multiple(unsigned int num_bufs,
+                             struct ia_css_metadata **bufs);
 
 /* Macro for handling pipe_qos_config */
 #define QOS_INVALID                  (~0U)
@@ -639,13 +648,13 @@ struct sh_css_sp_stage {
        u8                      isp_deci_log_factor;
        u8                      isp_vf_downscale_bits;
        u8                      deinterleaved;
-/*
- * NOTE: Programming the input circuit can only be done at the
- * start of a session. It is illegal to program it during execution
- * The input circuit defines the connectivity
- */
+       /*
       * NOTE: Programming the input circuit can only be done at the
       * start of a session. It is illegal to program it during execution
       * The input circuit defines the connectivity
       */
        u8                      program_input_circuit;
-/* enum ia_css_pipeline_stage_sp_func  func; */
+       /* enum ia_css_pipeline_stage_sp_func   func; */
        u8                      func;
        /* The type of the pipe-stage */
        /* enum sh_css_stage_type       stage_type; */
@@ -782,8 +791,11 @@ struct sh_css_hmm_buffer {
        CSS_ALIGN(u64 cookie_ptr, 8); /* TODO: check if this alignment is needed */
        u64 kernel_ptr;
 #else
-       CSS_ALIGN(struct { u32 a[2]; } cookie_ptr, 8); /* TODO: check if this alignment is needed */
-       struct { u32 a[2]; } kernel_ptr;
+       CSS_ALIGN(struct { u32 a[2]; } cookie_ptr,
+                 8); /* TODO: check if this alignment is needed */
+       struct {
+               u32 a[2];
+       } kernel_ptr;
 #endif
        struct ia_css_time_meas timing_data;
        clock_value_t isys_eof_clock_tick;
@@ -893,14 +905,14 @@ struct host_sp_queues {
         * buffer and the "vf_out_frame" buffer.
         */
        ia_css_circbuf_desc_t host2sp_buffer_queues_desc
-               [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
+       [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
        ia_css_circbuf_elem_t host2sp_buffer_queues_elems
-               [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES]
-               [IA_CSS_NUM_ELEMS_HOST2SP_BUFFER_QUEUE];
+       [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES]
+       [IA_CSS_NUM_ELEMS_HOST2SP_BUFFER_QUEUE];
        ia_css_circbuf_desc_t sp2host_buffer_queues_desc
-               [SH_CSS_MAX_NUM_QUEUES];
+       [SH_CSS_MAX_NUM_QUEUES];
        ia_css_circbuf_elem_t sp2host_buffer_queues_elems
-               [SH_CSS_MAX_NUM_QUEUES][IA_CSS_NUM_ELEMS_SP2HOST_BUFFER_QUEUE];
+       [SH_CSS_MAX_NUM_QUEUES][IA_CSS_NUM_ELEMS_SP2HOST_BUFFER_QUEUE];
 
        /*
         * The queues for the events.
@@ -908,11 +920,11 @@ struct host_sp_queues {
        ia_css_circbuf_desc_t host2sp_psys_event_queue_desc;
 
        ia_css_circbuf_elem_t host2sp_psys_event_queue_elems
-               [IA_CSS_NUM_ELEMS_HOST2SP_PSYS_EVENT_QUEUE];
+       [IA_CSS_NUM_ELEMS_HOST2SP_PSYS_EVENT_QUEUE];
        ia_css_circbuf_desc_t sp2host_psys_event_queue_desc;
 
        ia_css_circbuf_elem_t sp2host_psys_event_queue_elems
-               [IA_CSS_NUM_ELEMS_SP2HOST_PSYS_EVENT_QUEUE];
+       [IA_CSS_NUM_ELEMS_SP2HOST_PSYS_EVENT_QUEUE];
 
 #if !defined(HAS_NO_INPUT_SYSTEM)
        /*
@@ -921,11 +933,11 @@ struct host_sp_queues {
        ia_css_circbuf_desc_t host2sp_isys_event_queue_desc;
 
        ia_css_circbuf_elem_t host2sp_isys_event_queue_elems
-               [IA_CSS_NUM_ELEMS_HOST2SP_ISYS_EVENT_QUEUE];
+       [IA_CSS_NUM_ELEMS_HOST2SP_ISYS_EVENT_QUEUE];
        ia_css_circbuf_desc_t sp2host_isys_event_queue_desc;
 
        ia_css_circbuf_elem_t sp2host_isys_event_queue_elems
-               [IA_CSS_NUM_ELEMS_SP2HOST_ISYS_EVENT_QUEUE];
+       [IA_CSS_NUM_ELEMS_SP2HOST_ISYS_EVENT_QUEUE];
        /*
         * The queue for the tagger commands.
         * CHECK: are these last two present on the 2401 ?
@@ -933,7 +945,7 @@ struct host_sp_queues {
        ia_css_circbuf_desc_t host2sp_tag_cmd_queue_desc;
 
        ia_css_circbuf_elem_t host2sp_tag_cmd_queue_elems
-               [IA_CSS_NUM_ELEMS_HOST2SP_TAG_CMD_QUEUE];
+       [IA_CSS_NUM_ELEMS_HOST2SP_TAG_CMD_QUEUE];
 #endif
 };
 
@@ -1039,7 +1051,8 @@ sh_css_frame_info_set_width(struct ia_css_frame_info *info,
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
 
 unsigned int
-sh_css_get_mipi_sizes_for_check(const unsigned int port, const unsigned int idx);
+sh_css_get_mipi_sizes_for_check(const unsigned int port,
+                               const unsigned int idx);
 
 #endif
 
@@ -1054,17 +1067,17 @@ sh_css_store_isp_stage_to_ddr(unsigned int pipe, unsigned int stage);
 
 void
 sh_css_update_uds_and_crop_info(
-               const struct ia_css_binary_info *info,
-               const struct ia_css_frame_info *in_frame_info,
-               const struct ia_css_frame_info *out_frame_info,
-               const struct ia_css_resolution *dvs_env,
-               const struct ia_css_dz_config *zoom,
-               const struct ia_css_vector *motion_vector,
-               struct sh_css_uds_info *uds,            /* out */
-               struct sh_css_crop_pos *sp_out_crop_pos,        /* out */
-
-               bool enable_zoom
-               );
+    const struct ia_css_binary_info *info,
+    const struct ia_css_frame_info *in_frame_info,
+    const struct ia_css_frame_info *out_frame_info,
+    const struct ia_css_resolution *dvs_env,
+    const struct ia_css_dz_config *zoom,
+    const struct ia_css_vector *motion_vector,
+    struct sh_css_uds_info *uds,               /* out */
+    struct sh_css_crop_pos *sp_out_crop_pos,   /* out */
+
+    bool enable_zoom
+);
 
 void
 sh_css_invalidate_shading_tables(struct ia_css_stream *stream);
@@ -1087,8 +1100,8 @@ find_pipe_by_num(uint32_t pipe_num);
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
 void
 ia_css_get_crop_offsets(
-               struct ia_css_pipe *pipe,
-               struct ia_css_frame_info *in_frame);
+    struct ia_css_pipe *pipe,
+    struct ia_css_frame_info *in_frame);
 #endif
 #endif /* !defined(__ISP) */
 
index eeb0b44c9305857c576c2c89c120e092f65ce9d1..110b2912042c51bb9e74b97a6add0aa5758573f9 100644 (file)
@@ -59,7 +59,8 @@ ia_css_pipe_create_extra(const struct ia_css_pipe_config *config,
                         struct ia_css_pipe **pipe);
 
 void
-ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config *extra_config);
+ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config
+                                 *extra_config);
 
 enum ia_css_err
 ia_css_temp_pipe_to_pipe_id(const struct ia_css_pipe *pipe,
@@ -68,7 +69,7 @@ ia_css_temp_pipe_to_pipe_id(const struct ia_css_pipe *pipe,
 /* DEPRECATED. FPN is not supported. */
 enum ia_css_err
 sh_css_set_black_frame(struct ia_css_stream *stream,
-                       const struct ia_css_frame *raw_black_frame);
+                      const struct ia_css_frame *raw_black_frame);
 
 #ifndef ISP2401
 void
index 4a640eb36271ae779204ae63b14cb937ce3f0ea7..17f6dd9afab4ef0c9ffee2051ccba076a961bcd2 100644 (file)
@@ -83,7 +83,7 @@ make_histogram(struct sh_css_pc_histogram *histogram, unsigned int length)
 
 static void
 insert_binary_metrics(struct sh_css_binary_metrics **l,
-                       struct sh_css_binary_metrics *metrics)
+                     struct sh_css_binary_metrics *metrics)
 {
        assert(l);
        assert(*l);
index 2713fc042dcd42f3e51fcfa82f4220db825107c7..ef9360d72b04ef8b7b20c19d65f9ed62c1578e50 100644 (file)
 #include "sw_event_global.h" /* IA_CSS_PSYS_SW_EVENT_MIPI_BUFFERS_READY */
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
-static u32 ref_count_mipi_allocation[N_CSI_PORTS]; /* Initialized in mipi_init */
+static u32
+ref_count_mipi_allocation[N_CSI_PORTS]; /* Initialized in mipi_init */
 #endif
 
 enum ia_css_err
 ia_css_mipi_frame_specify(const unsigned int size_mem_words,
-                               const bool contiguous)
-{
+                         const bool contiguous) {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        my_css.size_mem_words = size_mem_words;
@@ -51,7 +51,7 @@ ia_css_mipi_frame_specify(const unsigned int size_mem_words,
  * Check if a source port or TPG/PRBS ID is valid
  */
 static bool ia_css_mipi_is_source_port_valid(struct ia_css_pipe *pipe,
-                                               unsigned int *pport)
+       unsigned int *pport)
 {
        bool ret = true;
        unsigned int port = 0;
@@ -103,12 +103,11 @@ static bool ia_css_mipi_is_source_port_valid(struct ia_css_pipe *pipe,
  */
 enum ia_css_err
 ia_css_mipi_frame_calculate_size(const unsigned int width,
-                               const unsigned int height,
-                               const enum atomisp_input_format format,
-                               const bool hasSOLandEOL,
-                               const unsigned int embedded_data_size_words,
-                               unsigned int *size_mem_words)
-{
+                                const unsigned int height,
+                                const enum atomisp_input_format format,
+                                const bool hasSOLandEOL,
+                                const unsigned int embedded_data_size_words,
+                                unsigned int *size_mem_words) {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        unsigned int bits_per_pixel = 0;
@@ -135,15 +134,19 @@ ia_css_mipi_frame_calculate_size(const unsigned int width,
        IA_CSS_ENTER("padded_width=%d, height=%d, format=%d, hasSOLandEOL=%d, embedded_data_size_words=%d\n",
                     width_padded, height, format, hasSOLandEOL, embedded_data_size_words);
 
-       switch (format) {
+       switch (format)
+       {
        case ATOMISP_INPUT_FORMAT_RAW_6:                /* 4p, 3B, 24bits */
-               bits_per_pixel = 6;     break;
+               bits_per_pixel = 6;
+               break;
        case ATOMISP_INPUT_FORMAT_RAW_7:                /* 8p, 7B, 56bits */
-               bits_per_pixel = 7;             break;
+               bits_per_pixel = 7;
+               break;
        case ATOMISP_INPUT_FORMAT_RAW_8:                /* 1p, 1B, 8bits */
        case ATOMISP_INPUT_FORMAT_BINARY_8:             /*  8bits, TODO: check. */
        case ATOMISP_INPUT_FORMAT_YUV420_8:             /* odd 2p, 2B, 16bits, even 2p, 4B, 32bits */
-               bits_per_pixel = 8;             break;
+               bits_per_pixel = 8;
+               break;
        case ATOMISP_INPUT_FORMAT_YUV420_10:            /* odd 4p, 5B, 40bits, even 4p, 10B, 80bits */
        case ATOMISP_INPUT_FORMAT_RAW_10:               /* 4p, 5B, 40bits */
 #if !defined(HAS_NO_PACKED_RAW_PIXELS)
@@ -158,20 +161,26 @@ ia_css_mipi_frame_calculate_size(const unsigned int width,
                break;
        case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:      /* 2p, 3B, 24bits */
        case ATOMISP_INPUT_FORMAT_RAW_12:               /* 2p, 3B, 24bits */
-               bits_per_pixel = 12;    break;
+               bits_per_pixel = 12;
+               break;
        case ATOMISP_INPUT_FORMAT_RAW_14:               /* 4p, 7B, 56bits */
-               bits_per_pixel = 14;    break;
+               bits_per_pixel = 14;
+               break;
        case ATOMISP_INPUT_FORMAT_RGB_444:              /* 1p, 2B, 16bits */
        case ATOMISP_INPUT_FORMAT_RGB_555:              /* 1p, 2B, 16bits */
        case ATOMISP_INPUT_FORMAT_RGB_565:              /* 1p, 2B, 16bits */
        case ATOMISP_INPUT_FORMAT_YUV422_8:             /* 2p, 4B, 32bits */
-               bits_per_pixel = 16;    break;
+               bits_per_pixel = 16;
+               break;
        case ATOMISP_INPUT_FORMAT_RGB_666:              /* 4p, 9B, 72bits */
-               bits_per_pixel = 18;    break;
+               bits_per_pixel = 18;
+               break;
        case ATOMISP_INPUT_FORMAT_YUV422_10:            /* 2p, 5B, 40bits */
-               bits_per_pixel = 20;    break;
+               bits_per_pixel = 20;
+               break;
        case ATOMISP_INPUT_FORMAT_RGB_888:              /* 1p, 3B, 24bits */
-               bits_per_pixel = 24;    break;
+               bits_per_pixel = 24;
+               break;
 
        case ATOMISP_INPUT_FORMAT_YUV420_16:            /* Not supported */
        case ATOMISP_INPUT_FORMAT_YUV422_16:            /* Not supported */
@@ -184,14 +193,17 @@ ia_css_mipi_frame_calculate_size(const unsigned int width,
 
        /* Even lines for YUV420 formats are double in bits_per_pixel. */
        if (format == ATOMISP_INPUT_FORMAT_YUV420_8
-                       || format == ATOMISP_INPUT_FORMAT_YUV420_10
-                       || format == ATOMISP_INPUT_FORMAT_YUV420_16) {
-               even_line_bytes = (width_padded * 2 * bits_per_pixel + 7) >> 3; /* ceil ( bits per line / 8) */
-       } else {
+           || format == ATOMISP_INPUT_FORMAT_YUV420_10
+           || format == ATOMISP_INPUT_FORMAT_YUV420_16)
+       {
+               even_line_bytes = (width_padded * 2 * bits_per_pixel + 7) >>
+                       3; /* ceil ( bits per line / 8) */
+       } else
+       {
                even_line_bytes = odd_line_bytes;
        }
 
-   /*  a frame represented in memory:  ()- optional; data - payload words.
+       /*  a frame represented in memory:  ()- optional; data - payload words.
        *  addr         0       1       2       3       4       5       6       7:
        *  first        SOF     (SOL)   PACK_H  data    data    data    data    data
        *               data    data    data    data    data    data    data    data
@@ -209,26 +221,26 @@ ia_css_mipi_frame_calculate_size(const unsigned int width,
        */
 
        words_per_odd_line = (odd_line_bytes + 3) >> 2;
-               /* ceil(odd_line_bytes/4); word = 4 bytes */
+       /* ceil(odd_line_bytes/4); word = 4 bytes */
        words_per_even_line  = (even_line_bytes  + 3) >> 2;
        words_for_first_line = words_per_odd_line + 2 + (hasSOLandEOL ? 1 : 0);
-               /* + SOF +packet header + optionally (SOL), but (EOL) is not in the first line */
+       /* + SOF +packet header + optionally (SOL), but (EOL) is not in the first line */
        words_per_odd_line      += (1 + (hasSOLandEOL ? 2 : 0));
-               /* each non-first line has format header, and optionally (SOL) and (EOL). */
+       /* each non-first line has format header, and optionally (SOL) and (EOL). */
        words_per_even_line += (1 + (hasSOLandEOL ? 2 : 0));
 
        mem_words_per_odd_line   = (words_per_odd_line + 7) >> 3;
-               /* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
+       /* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
        mem_words_for_first_line = (words_for_first_line + 7) >> 3;
        mem_words_per_even_line  = (words_per_even_line + 7) >> 3;
        mem_words_for_EOF        = 1; /* last line consisit of the optional (EOL) and EOF */
 
        mem_words = ((embedded_data_size_words + 7) >> 3) +
-               mem_words_for_first_line +
-                               (((height + 1) >> 1) - 1) * mem_words_per_odd_line +
-                               /* ceil (height/2) - 1 (first line is calculated separatelly) */
-                                 (height      >> 1) * mem_words_per_even_line + /* floor(height/2) */
-                               mem_words_for_EOF;
+       mem_words_for_first_line +
+       (((height + 1) >> 1) - 1) * mem_words_per_odd_line +
+       /* ceil (height/2) - 1 (first line is calculated separatelly) */
+       (height      >> 1) * mem_words_per_even_line + /* floor(height/2) */
+       mem_words_for_EOF;
 
        *size_mem_words = mem_words; /* ceil(words/8); mem word is 32B = 8words. */
        /* Check if the above is still needed. */
@@ -240,8 +252,7 @@ ia_css_mipi_frame_calculate_size(const unsigned int width,
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
 enum ia_css_err
 ia_css_mipi_frame_enable_check_on_size(const enum mipi_port_id port,
-                               const unsigned int      size_mem_words)
-{
+                                      const unsigned int       size_mem_words) {
        u32 idx;
 
        enum ia_css_err err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
@@ -250,10 +261,12 @@ ia_css_mipi_frame_enable_check_on_size(const enum mipi_port_id port,
        OP___assert(size_mem_words != 0);
 
        for (idx = 0; idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT &&
-               my_css.mipi_sizes_for_check[port][idx] != 0;
-               idx++) { /* do nothing */
+            my_css.mipi_sizes_for_check[port][idx] != 0;
+            idx++)   /* do nothing */
+       {
        }
-       if (idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT) {
+       if (idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT)
+       {
                my_css.mipi_sizes_for_check[port][idx] = size_mem_words;
                err = IA_CSS_SUCCESS;
        }
@@ -275,9 +288,8 @@ mipi_init(void)
 
 enum ia_css_err
 calculate_mipi_buff_size(
-               struct ia_css_stream_config *stream_cfg,
-               unsigned int *size_mem_words)
-{
+    struct ia_css_stream_config *stream_cfg,
+    unsigned int *size_mem_words) {
 #if !defined(USE_INPUT_SYSTEM_VERSION_2401)
        enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
        (void)stream_cfg;
@@ -348,7 +360,7 @@ calculate_mipi_buff_size(
 
        bits_per_pixel = sh_css_stream_format_2_bits_per_subpixel(format);
        bits_per_pixel =
-               (format == ATOMISP_INPUT_FORMAT_RAW_10 && pack_raw_pixels) ? bits_per_pixel : 16;
+       (format == ATOMISP_INPUT_FORMAT_RAW_10 && pack_raw_pixels) ? bits_per_pixel : 16;
        if (bits_per_pixel == 0)
                return IA_CSS_ERR_INTERNAL_ERROR;
 
@@ -356,22 +368,25 @@ calculate_mipi_buff_size(
 
        /* Even lines for YUV420 formats are double in bits_per_pixel. */
        if (format == ATOMISP_INPUT_FORMAT_YUV420_8
-               || format == ATOMISP_INPUT_FORMAT_YUV420_10) {
-               even_line_bytes = (width_padded * 2 * bits_per_pixel + 7) >> 3; /* ceil ( bits per line / 8) */
-       } else {
+           || format == ATOMISP_INPUT_FORMAT_YUV420_10)
+       {
+               even_line_bytes = (width_padded * 2 * bits_per_pixel + 7) >>
+                       3; /* ceil ( bits per line / 8) */
+       } else
+       {
                even_line_bytes = odd_line_bytes;
        }
 
        words_per_odd_line       = (odd_line_bytes   + 3) >> 2;
-               /* ceil(odd_line_bytes/4); word = 4 bytes */
+       /* ceil(odd_line_bytes/4); word = 4 bytes */
        words_per_even_line  = (even_line_bytes  + 3) >> 2;
 
        mem_words_per_odd_line   = (words_per_odd_line + 7) >> 3;
-               /* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
+       /* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
        mem_words_per_even_line  = (words_per_even_line + 7) >> 3;
 
        mem_words_per_buff_line =
-               (mem_words_per_odd_line > mem_words_per_even_line) ? mem_words_per_odd_line : mem_words_per_even_line;
+       (mem_words_per_odd_line > mem_words_per_even_line) ? mem_words_per_odd_line : mem_words_per_even_line;
        mem_words_per_buff = mem_words_per_buff_line * height;
 
        *size_mem_words = mem_words_per_buff;
@@ -382,8 +397,8 @@ calculate_mipi_buff_size(
 }
 
 enum ia_css_err
-allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
-{
+allocate_mipi_frames(struct ia_css_pipe *pipe,
+                    struct ia_css_stream_info *info) {
 #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
        enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
 #ifndef ISP2401
@@ -394,63 +409,70 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
        struct ia_css_frame_info mipi_intermediate_info;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "allocate_mipi_frames(%p) enter:\n", pipe);
+                           "allocate_mipi_frames(%p) enter:\n", pipe);
 
        assert(pipe);
        assert(pipe->stream);
-       if ((!pipe) || (!pipe->stream)) {
+       if ((!pipe) || (!pipe->stream))
+       {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                       "allocate_mipi_frames(%p) exit: pipe or stream is null.\n",
-                       pipe);
+                                   "allocate_mipi_frames(%p) exit: pipe or stream is null.\n",
+                                   pipe);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
-       if (pipe->stream->config.online) {
+       if (pipe->stream->config.online)
+       {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                       "allocate_mipi_frames(%p) exit: no buffers needed for 2401 pipe mode.\n",
-                       pipe);
+                                   "allocate_mipi_frames(%p) exit: no buffers needed for 2401 pipe mode.\n",
+                                   pipe);
                return IA_CSS_SUCCESS;
        }
 
 #endif
 #ifndef ISP2401
-       if (pipe->stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
+       if (pipe->stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+       {
 #else
        if (!(pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
-               pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
-               pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS)) {
+             pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
+             pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS))
+       {
 #endif
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                       "allocate_mipi_frames(%p) exit: no buffers needed for pipe mode.\n",
-                       pipe);
+                                   "allocate_mipi_frames(%p) exit: no buffers needed for pipe mode.\n",
+                                   pipe);
                return IA_CSS_SUCCESS; /* AM TODO: Check  */
        }
 
 #ifndef ISP2401
        port = (unsigned int)pipe->stream->config.source.port.port;
        assert(port < N_CSI_PORTS);
-       if (port >= N_CSI_PORTS) {
+       if (port >= N_CSI_PORTS)
+       {
 #else
-       if (!ia_css_mipi_is_source_port_valid(pipe, &port)) {
+       if (!ia_css_mipi_is_source_port_valid(pipe, &port))
+       {
 #endif
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                       "allocate_mipi_frames(%p) exit: error: port is not correct (port=%d).\n",
-                       pipe, port);
+                                   "allocate_mipi_frames(%p) exit: error: port is not correct (port=%d).\n",
+                                   pipe, port);
                return IA_CSS_ERR_INTERNAL_ERROR;
        }
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
        err = calculate_mipi_buff_size(
-                       &pipe->stream->config,
-                       &my_css.mipi_frame_size[port]);
+           &pipe->stream->config,
+           &my_css.mipi_frame_size[port]);
 #endif
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2)
-       if (ref_count_mipi_allocation[port] != 0) {
+       if (ref_count_mipi_allocation[port] != 0)
+       {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                       "allocate_mipi_frames(%p) exit: already allocated for this port (port=%d).\n",
-                       pipe, port);
+                                   "allocate_mipi_frames(%p) exit: already allocated for this port (port=%d).\n",
+                                   pipe, port);
                return IA_CSS_SUCCESS;
        }
 #else
@@ -459,11 +481,12 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
         * TODO AM: Once that is changed (removed) this code should be removed as well.
         * In that case only 2400 related code should remain.
         */
-       if (ref_count_mipi_allocation[port] != 0) {
+       if (ref_count_mipi_allocation[port] != 0)
+       {
                ref_count_mipi_allocation[port]++;
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                       "allocate_mipi_frames(%p) leave: nothing to do, already allocated for this port (port=%d).\n",
-                       pipe, port);
+                                   "allocate_mipi_frames(%p) leave: nothing to do, already allocated for this port (port=%d).\n",
+                                   pipe, port);
                return IA_CSS_SUCCESS;
        }
 #endif
@@ -488,7 +511,8 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
        { /* limit the scope of i,j */
                unsigned int i, j;
 
-               for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
+               for (i = 0; i < my_css.num_mipi_frames[port]; i++)
+               {
                        /* free previous frame */
                        if (my_css.mipi_frames[port][i]) {
                                ia_css_frame_free(my_css.mipi_frames[port][i]);
@@ -498,9 +522,9 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
                        if (i < my_css.num_mipi_frames[port]) {
                                /* allocate new frame */
                                err = ia_css_frame_allocate_with_buffer_size(
-                                       &my_css.mipi_frames[port][i],
-                                       my_css.mipi_frame_size[port] * HIVE_ISP_DDR_WORD_BYTES,
-                                       false);
+                                         &my_css.mipi_frames[port][i],
+                                         my_css.mipi_frame_size[port] * HIVE_ISP_DDR_WORD_BYTES,
+                                         false);
                                if (err != IA_CSS_SUCCESS) {
                                        for (j = 0; j < i; j++) {
                                                if (my_css.mipi_frames[port][j]) {
@@ -509,8 +533,8 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
                                                }
                                        }
                                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                               "allocate_mipi_frames(%p, %d) exit: error: allocation failed.\n",
-                                               pipe, port);
+                                                           "allocate_mipi_frames(%p, %d) exit: error: allocation failed.\n",
+                                                           pipe, port);
                                        return err;
                                }
                        }
@@ -526,8 +550,8 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
                                        my_css.mipi_metadata[port][i] = ia_css_metadata_allocate(&info->metadata_info);
                                        if (!my_css.mipi_metadata[port][i]) {
                                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                                       "allocate_mipi_metadata(%p, %d) failed.\n",
-                                                       pipe, port);
+                                                                   "allocate_mipi_metadata(%p, %d) failed.\n",
+                                                                   pipe, port);
                                                return err;
                                        }
                                }
@@ -535,7 +559,7 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
                }
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "allocate_mipi_frames(%p) exit:\n", pipe);
+                           "allocate_mipi_frames(%p) exit:\n", pipe);
 
        return err;
 #else
@@ -546,8 +570,7 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
 }
 
 enum ia_css_err
-free_mipi_frames(struct ia_css_pipe *pipe)
-{
+free_mipi_frames(struct ia_css_pipe *pipe) {
 #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
        enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
 #ifndef ISP2401
@@ -556,15 +579,16 @@ free_mipi_frames(struct ia_css_pipe *pipe)
        unsigned int port = 0;
 #endif
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "free_mipi_frames(%p) enter:\n", pipe);
+                           "free_mipi_frames(%p) enter:\n", pipe);
 
        /* assert(pipe != NULL); TEMP: TODO: Should be assert only. */
-       if (pipe) {
+       if (pipe)
+       {
                assert(pipe->stream);
                if ((!pipe) || (!pipe->stream)) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                               "free_mipi_frames(%p) exit: error: pipe or stream is null.\n",
-                               pipe);
+                                           "free_mipi_frames(%p) exit: error: pipe or stream is null.\n",
+                                           pipe);
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
                }
 
@@ -572,12 +596,12 @@ free_mipi_frames(struct ia_css_pipe *pipe)
                if (pipe->stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
 #else
                if (!(pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
-                       pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
-                       pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS)) {
+                     pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
+                     pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS)) {
 #endif
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                               "free_mipi_frames(%p) exit: error: wrong mode.\n",
-                               pipe);
+                                           "free_mipi_frames(%p) exit: error: wrong mode.\n",
+                                           pipe);
                        return err;
                }
 
@@ -590,11 +614,11 @@ free_mipi_frames(struct ia_css_pipe *pipe)
 #endif
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
 #ifndef ISP2401
-                               "free_mipi_frames(%p, %d) exit: error: pipe port is not correct.\n",
+                                           "free_mipi_frames(%p, %d) exit: error: pipe port is not correct.\n",
 #else
-                               "free_mipi_frames(%p) exit: error: pipe port is not correct (port=%d).\n",
+                                           "free_mipi_frames(%p) exit: error: pipe port is not correct (port=%d).\n",
 #endif
-                               pipe, port);
+                                           pipe, port);
                        return err;
                }
 #ifdef ISP2401
@@ -605,8 +629,8 @@ free_mipi_frames(struct ia_css_pipe *pipe)
                        assert(ref_count_mipi_allocation[port] == 1);
                        if (ref_count_mipi_allocation[port] != 1) {
                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                       "free_mipi_frames(%p) exit: error: wrong ref_count (ref_count=%d).\n",
-                                       pipe, ref_count_mipi_allocation[port]);
+                                                   "free_mipi_frames(%p) exit: error: wrong ref_count (ref_count=%d).\n",
+                                                   pipe, ref_count_mipi_allocation[port]);
                                return err;
                        }
 #endif
@@ -620,7 +644,7 @@ free_mipi_frames(struct ia_css_pipe *pipe)
                                for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
                                        if (my_css.mipi_frames[port][i]) {
                                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                                       "free_mipi_frames(port=%d, num=%d).\n", port, i);
+                                                                   "free_mipi_frames(port=%d, num=%d).\n", port, i);
                                                ia_css_frame_free(my_css.mipi_frames[port][i]);
                                                my_css.mipi_frames[port][i] = NULL;
                                        }
@@ -631,7 +655,7 @@ free_mipi_frames(struct ia_css_pipe *pipe)
                                }
 
                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                       "free_mipi_frames(%p) exit (deallocated).\n", pipe);
+                                                   "free_mipi_frames(%p) exit (deallocated).\n", pipe);
                        }
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
                        else {
@@ -641,12 +665,13 @@ free_mipi_frames(struct ia_css_pipe *pipe)
                                 * In that case only 2400 related code should remain.
                                 */
                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                       "free_mipi_frames(%p) leave: nothing to do, other streams still use this port (port=%d).\n",
-                                       pipe, port);
+                                                   "free_mipi_frames(%p) leave: nothing to do, other streams still use this port (port=%d).\n",
+                                                   pipe, port);
                        }
 #endif
                }
-       } else { /* pipe ==NULL */
+       } else   /* pipe ==NULL */
+       {
                /* AM TEMP: free-ing all mipi buffers just like a legacy code. */
                for (port = CSI_PORT0_ID; port < N_CSI_PORTS; port++) {
                        unsigned int i;
@@ -654,7 +679,7 @@ free_mipi_frames(struct ia_css_pipe *pipe)
                        for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
                                if (my_css.mipi_frames[port][i]) {
                                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                               "free_mipi_frames(port=%d, num=%d).\n", port, i);
+                                                           "free_mipi_frames(port=%d, num=%d).\n", port, i);
                                        ia_css_frame_free(my_css.mipi_frames[port][i]);
                                        my_css.mipi_frames[port][i] = NULL;
                                }
@@ -673,8 +698,7 @@ free_mipi_frames(struct ia_css_pipe *pipe)
 }
 
 enum ia_css_err
-send_mipi_frames(struct ia_css_pipe *pipe)
-{
+send_mipi_frames(struct ia_css_pipe *pipe) {
 #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
        enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
        unsigned int i;
@@ -688,7 +712,8 @@ send_mipi_frames(struct ia_css_pipe *pipe)
 
        assert(pipe);
        assert(pipe->stream);
-       if (!pipe || !pipe->stream) {
+       if (!pipe || !pipe->stream)
+       {
                IA_CSS_ERROR("pipe or stream is null");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -696,11 +721,13 @@ send_mipi_frames(struct ia_css_pipe *pipe)
        /* multi stream video needs mipi buffers */
        /* nothing to be done in other cases. */
 #ifndef ISP2401
-       if (pipe->stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
+       if (pipe->stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+       {
 #else
        if (!(pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
-               pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
-               pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS)) {
+             pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
+             pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS))
+       {
 #endif
                IA_CSS_LOG("nothing to be done for this mode");
                return IA_CSS_SUCCESS;
@@ -710,22 +737,26 @@ send_mipi_frames(struct ia_css_pipe *pipe)
 #ifndef ISP2401
        port = (unsigned int)pipe->stream->config.source.port.port;
        assert(port < N_CSI_PORTS);
-       if (port >= N_CSI_PORTS) {
+       if (port >= N_CSI_PORTS)
+       {
                IA_CSS_ERROR("invalid port specified (%d)", port);
 #else
-       if (!ia_css_mipi_is_source_port_valid(pipe, &port)) {
-               IA_CSS_ERROR("send_mipi_frames(%p) exit: invalid port specified (port=%d).\n", pipe, port);
+       if (!ia_css_mipi_is_source_port_valid(pipe, &port))
+       {
+               IA_CSS_ERROR("send_mipi_frames(%p) exit: invalid port specified (port=%d).\n",
+                            pipe, port);
 #endif
                return err;
        }
 
        /* Hand-over the SP-internal mipi buffers */
-       for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
+       for (i = 0; i < my_css.num_mipi_frames[port]; i++)
+       {
                /* Need to include the ofset for port. */
                sh_css_update_host2sp_mipi_frame(port * NUM_MIPI_FRAMES_PER_STREAM + i,
-                       my_css.mipi_frames[port][i]);
+                                                my_css.mipi_frames[port][i]);
                sh_css_update_host2sp_mipi_metadata(port * NUM_MIPI_FRAMES_PER_STREAM + i,
-                       my_css.mipi_metadata[port][i]);
+                                                   my_css.mipi_metadata[port][i]);
        }
        sh_css_update_host2sp_num_mipi_frames(my_css.num_mipi_frames[port]);
 
@@ -733,17 +764,18 @@ send_mipi_frames(struct ia_css_pipe *pipe)
         * Send an event to inform the SP
         * that all MIPI frames are passed.
         **********************************/
-       if (!sh_css_sp_is_running()) {
+       if (!sh_css_sp_is_running())
+       {
                /* SP is not running. The queues are not valid */
                IA_CSS_ERROR("sp is not running");
                return err;
        }
 
        ia_css_bufq_enqueue_psys_event(
-                       IA_CSS_PSYS_SW_EVENT_MIPI_BUFFERS_READY,
-                       (uint8_t)port,
-                       (uint8_t)my_css.num_mipi_frames[port],
-                       0 /* not used */);
+           IA_CSS_PSYS_SW_EVENT_MIPI_BUFFERS_READY,
+           (uint8_t)port,
+           (uint8_t)my_css.num_mipi_frames[port],
+           0 /* not used */);
        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
 #else
        (void)pipe;
index 990f678422fd2b2e30327d4ffe1091a0c5124e45..ab38589d64573315f2bde2c46278b79438e5cfc6 100644 (file)
@@ -43,7 +43,7 @@ send_mipi_frames(struct ia_css_pipe *pipe);
  */
 enum ia_css_err
 calculate_mipi_buff_size(
-               struct ia_css_stream_config *stream_cfg,
-               unsigned int *size_mem_words);
+    struct ia_css_stream_config *stream_cfg,
+    unsigned int *size_mem_words);
 
 #endif /* __SH_CSS_MIPI_H */
index ccd5bd4c965e04247c6e939658f3e91c9daad46f..179b6f40be49423b55504565062caea824237f90 100644 (file)
@@ -26,7 +26,8 @@ ia_css_mmu_invalidate_cache(void)
        const struct ia_css_fw_info *fw = &sh_css_sp_fw;
        unsigned int HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_mmu_invalidate_cache() enter\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_mmu_invalidate_cache() enter\n");
 
        /* if the SP is not running we should not access its dmem */
        if (sh_css_sp_is_running()) {
@@ -35,10 +36,11 @@ ia_css_mmu_invalidate_cache(void)
                (void)HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb; /* Suppres warnings in CRUN */
 
                sp_dmem_store_uint32(SP0_ID,
-                       (unsigned int)sp_address_of(ia_css_dmaproxy_sp_invalidate_tlb),
-                       true);
+                                    (unsigned int)sp_address_of(ia_css_dmaproxy_sp_invalidate_tlb),
+                                    true);
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_mmu_invalidate_cache() leave\n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                           "ia_css_mmu_invalidate_cache() leave\n");
 }
 
 /* Deprecated, this is an HRT backend function (memory_access.h) */
index 0b92f7b0746dadfb245173f9c3f4d819a04ff68f..52e29161cb355231c5d02a8e9c6d03c689d916c0 100644 (file)
@@ -21,7 +21,8 @@
 #include "memory_access.h"
 
 static struct ia_css_dvs_6axis_config *
-alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res, struct ia_css_dvs_6axis_config  *dvs_config_src)
+alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res,
+                     struct ia_css_dvs_6axis_config  *dvs_config_src)
 {
        unsigned int width_y = 0;
        unsigned int height_y = 0;
@@ -30,12 +31,13 @@ alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res, struct ia_css_d
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_dvs_6axis_config  *dvs_config = NULL;
 
-       dvs_config = (struct ia_css_dvs_6axis_config *)sh_css_malloc(sizeof(struct ia_css_dvs_6axis_config));
+       dvs_config = (struct ia_css_dvs_6axis_config *)sh_css_malloc(sizeof(
+                        struct ia_css_dvs_6axis_config));
        if (!dvs_config)        {
                IA_CSS_ERROR("out of memory");
                err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-       } else
-       {       /*Initialize new struct with latest config settings*/
+       } else {
+               /*Initialize new struct with latest config settings*/
                if (dvs_config_src) {
                        dvs_config->width_y = width_y = dvs_config_src->width_y;
                        dvs_config->height_y = height_y = dvs_config_src->height_y;
@@ -44,21 +46,28 @@ alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res, struct ia_css_d
                        IA_CSS_LOG("alloc_dvs_6axis_table Y: W %d H %d", width_y, height_y);
                } else if (frame_res) {
                        dvs_config->width_y = width_y = DVS_TABLE_IN_BLOCKDIM_X_LUMA(frame_res->width);
-                       dvs_config->height_y = height_y = DVS_TABLE_IN_BLOCKDIM_Y_LUMA(frame_res->height);
-                       dvs_config->width_uv = width_uv = DVS_TABLE_IN_BLOCKDIM_X_CHROMA(frame_res->width / 2); /* UV = Y/2, depens on colour format YUV 4.2.0*/
-                       dvs_config->height_uv = height_uv = DVS_TABLE_IN_BLOCKDIM_Y_CHROMA(frame_res->height / 2);/* UV = Y/2, depens on colour format YUV 4.2.0*/
+                       dvs_config->height_y = height_y = DVS_TABLE_IN_BLOCKDIM_Y_LUMA(
+                                                             frame_res->height);
+                       dvs_config->width_uv = width_uv = DVS_TABLE_IN_BLOCKDIM_X_CHROMA(
+                                                             frame_res->width /
+                                                             2); /* UV = Y/2, depens on colour format YUV 4.2.0*/
+                       dvs_config->height_uv = height_uv = DVS_TABLE_IN_BLOCKDIM_Y_CHROMA(
+                                                               frame_res->height /
+                                                               2);/* UV = Y/2, depens on colour format YUV 4.2.0*/
                        IA_CSS_LOG("alloc_dvs_6axis_table Y: W %d H %d", width_y, height_y);
                }
 
                /* Generate Y buffers  */
-               dvs_config->xcoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(uint32_t));
+               dvs_config->xcoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(
+                                           uint32_t));
                if (!dvs_config->xcoords_y) {
                        IA_CSS_ERROR("out of memory");
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                        goto exit;
                }
 
-               dvs_config->ycoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(uint32_t));
+               dvs_config->ycoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(
+                                           uint32_t));
                if (!dvs_config->ycoords_y) {
                        IA_CSS_ERROR("out of memory");
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
@@ -68,21 +77,24 @@ alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res, struct ia_css_d
                /* Generate UV buffers  */
                IA_CSS_LOG("UV W %d H %d", width_uv, height_uv);
 
-               dvs_config->xcoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv * sizeof(uint32_t));
+               dvs_config->xcoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv *
+                                        sizeof(uint32_t));
                if (!dvs_config->xcoords_uv) {
                        IA_CSS_ERROR("out of memory");
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                        goto exit;
                }
 
-               dvs_config->ycoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv * sizeof(uint32_t));
+               dvs_config->ycoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv *
+                                        sizeof(uint32_t));
                if (!dvs_config->ycoords_uv) {
                        IA_CSS_ERROR("out of memory");
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                }
 exit:
                if (err != IA_CSS_SUCCESS) {
-                       free_dvs_6axis_table(&dvs_config); /* we might have allocated some memory, release this */
+                       free_dvs_6axis_table(
+                           &dvs_config); /* we might have allocated some memory, release this */
                        dvs_config = NULL;
                }
        }
@@ -92,7 +104,8 @@ exit:
 }
 
 static void
-init_dvs_6axis_table_from_default(struct ia_css_dvs_6axis_config *dvs_config, const struct ia_css_resolution *dvs_offset)
+init_dvs_6axis_table_from_default(struct ia_css_dvs_6axis_config *dvs_config,
+                                 const struct ia_css_resolution *dvs_offset)
 {
        unsigned int x, y;
        unsigned int width_y = dvs_config->width_y;
@@ -101,48 +114,61 @@ init_dvs_6axis_table_from_default(struct ia_css_dvs_6axis_config *dvs_config, co
        unsigned int height_uv = dvs_config->height_uv;
 
        IA_CSS_LOG("Env_X=%d, Env_Y=%d, width_y=%d, height_y=%d",
-                          dvs_offset->width, dvs_offset->height, width_y, height_y);
+                  dvs_offset->width, dvs_offset->height, width_y, height_y);
        for (y = 0; y < height_y; y++) {
                for (x = 0; x < width_y; x++) {
-                       dvs_config->xcoords_y[y * width_y + x] =  (dvs_offset->width + x * DVS_BLOCKDIM_X) << DVS_COORD_FRAC_BITS;
+                       dvs_config->xcoords_y[y * width_y + x] =  (dvs_offset->width + x *
+                               DVS_BLOCKDIM_X) << DVS_COORD_FRAC_BITS;
                }
        }
 
        for (y = 0; y < height_y; y++) {
                for (x = 0; x < width_y; x++) {
-                       dvs_config->ycoords_y[y * width_y + x] =  (dvs_offset->height + y * DVS_BLOCKDIM_Y_LUMA) << DVS_COORD_FRAC_BITS;
+                       dvs_config->ycoords_y[y * width_y + x] =  (dvs_offset->height + y *
+                               DVS_BLOCKDIM_Y_LUMA) << DVS_COORD_FRAC_BITS;
                }
        }
 
        for (y = 0; y < height_uv; y++) {
-               for (x = 0; x < width_uv; x++) { /* Envelope dimensions set in Ypixels hence offset UV = offset Y/2 */
-                       dvs_config->xcoords_uv[y * width_uv + x] =  ((dvs_offset->width / 2) + x * DVS_BLOCKDIM_X) << DVS_COORD_FRAC_BITS;
+               for (x = 0; x < width_uv;
+                    x++) { /* Envelope dimensions set in Ypixels hence offset UV = offset Y/2 */
+                       dvs_config->xcoords_uv[y * width_uv + x] =  ((dvs_offset->width / 2) + x *
+                               DVS_BLOCKDIM_X) << DVS_COORD_FRAC_BITS;
                }
        }
 
        for (y = 0; y < height_uv; y++) {
-               for (x = 0; x < width_uv; x++) { /* Envelope dimensions set in Ypixels hence offset UV = offset Y/2 */
-                       dvs_config->ycoords_uv[y * width_uv + x] =  ((dvs_offset->height / 2) + y * DVS_BLOCKDIM_Y_CHROMA) << DVS_COORD_FRAC_BITS;
+               for (x = 0; x < width_uv;
+                    x++) { /* Envelope dimensions set in Ypixels hence offset UV = offset Y/2 */
+                       dvs_config->ycoords_uv[y * width_uv + x] =  ((dvs_offset->height / 2) + y *
+                               DVS_BLOCKDIM_Y_CHROMA) <<
+                               DVS_COORD_FRAC_BITS;
                }
        }
 }
 
 static void
-init_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config *dvs_config, struct ia_css_dvs_6axis_config  *dvs_config_src)
+init_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config *dvs_config,
+                                struct ia_css_dvs_6axis_config  *dvs_config_src)
 {
        unsigned int width_y = dvs_config->width_y;
        unsigned int height_y = dvs_config->height_y;
        unsigned int width_uv = dvs_config->width_uv;
        unsigned int height_uv = dvs_config->height_uv;
 
-       memcpy(dvs_config->xcoords_y, dvs_config_src->xcoords_y, (width_y * height_y * sizeof(uint32_t)));
-       memcpy(dvs_config->ycoords_y, dvs_config_src->ycoords_y, (width_y * height_y * sizeof(uint32_t)));
-       memcpy(dvs_config->xcoords_uv, dvs_config_src->xcoords_uv, (width_uv * height_uv * sizeof(uint32_t)));
-       memcpy(dvs_config->ycoords_uv, dvs_config_src->ycoords_uv, (width_uv * height_uv * sizeof(uint32_t)));
+       memcpy(dvs_config->xcoords_y, dvs_config_src->xcoords_y,
+              (width_y * height_y * sizeof(uint32_t)));
+       memcpy(dvs_config->ycoords_y, dvs_config_src->ycoords_y,
+              (width_y * height_y * sizeof(uint32_t)));
+       memcpy(dvs_config->xcoords_uv, dvs_config_src->xcoords_uv,
+              (width_uv * height_uv * sizeof(uint32_t)));
+       memcpy(dvs_config->ycoords_uv, dvs_config_src->ycoords_uv,
+              (width_uv * height_uv * sizeof(uint32_t)));
 }
 
 struct ia_css_dvs_6axis_config *
-generate_dvs_6axis_table(const struct ia_css_resolution *frame_res, const struct ia_css_resolution *dvs_offset)
+generate_dvs_6axis_table(const struct ia_css_resolution *frame_res,
+                        const struct ia_css_resolution *dvs_offset)
 {
        struct ia_css_dvs_6axis_config *dvs_6axis_table;
 
@@ -158,7 +184,8 @@ generate_dvs_6axis_table(const struct ia_css_resolution *frame_res, const struct
 }
 
 struct ia_css_dvs_6axis_config *
-generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config  *dvs_config_src)
+generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config
+                                    *dvs_config_src)
 {
        struct ia_css_dvs_6axis_config *dvs_6axis_table;
 
@@ -178,30 +205,25 @@ free_dvs_6axis_table(struct ia_css_dvs_6axis_config  **dvs_6axis_config)
        assert(dvs_6axis_config);
        assert(*dvs_6axis_config);
 
-       if ((dvs_6axis_config) && (*dvs_6axis_config))
-       {
+       if ((dvs_6axis_config) && (*dvs_6axis_config)) {
                IA_CSS_ENTER_PRIVATE("dvs_6axis_config %p", (*dvs_6axis_config));
-               if ((*dvs_6axis_config)->xcoords_y)
-               {
+               if ((*dvs_6axis_config)->xcoords_y) {
                        sh_css_free((*dvs_6axis_config)->xcoords_y);
                        (*dvs_6axis_config)->xcoords_y = NULL;
                }
 
-               if ((*dvs_6axis_config)->ycoords_y)
-               {
+               if ((*dvs_6axis_config)->ycoords_y) {
                        sh_css_free((*dvs_6axis_config)->ycoords_y);
                        (*dvs_6axis_config)->ycoords_y = NULL;
                }
 
                /* Free up UV buffers */
-               if ((*dvs_6axis_config)->xcoords_uv)
-               {
+               if ((*dvs_6axis_config)->xcoords_uv) {
                        sh_css_free((*dvs_6axis_config)->xcoords_uv);
                        (*dvs_6axis_config)->xcoords_uv = NULL;
                }
 
-               if ((*dvs_6axis_config)->ycoords_uv)
-               {
+               if ((*dvs_6axis_config)->ycoords_uv) {
                        sh_css_free((*dvs_6axis_config)->ycoords_uv);
                        (*dvs_6axis_config)->ycoords_uv = NULL;
                }
@@ -213,7 +235,7 @@ free_dvs_6axis_table(struct ia_css_dvs_6axis_config  **dvs_6axis_config)
 }
 
 void copy_dvs_6axis_table(struct ia_css_dvs_6axis_config *dvs_config_dst,
-                       const struct ia_css_dvs_6axis_config *dvs_config_src)
+                         const struct ia_css_dvs_6axis_config *dvs_config_src)
 {
        unsigned int width_y;
        unsigned int height_y;
@@ -233,14 +255,19 @@ void copy_dvs_6axis_table(struct ia_css_dvs_6axis_config *dvs_config_dst,
 
        width_y = dvs_config_src->width_y;
        height_y = dvs_config_src->height_y;
-       width_uv = dvs_config_src->width_uv; /* = Y/2, depens on colour format YUV 4.2.0*/
+       width_uv =
+           dvs_config_src->width_uv; /* = Y/2, depens on colour format YUV 4.2.0*/
        height_uv = dvs_config_src->height_uv;
 
-       memcpy(dvs_config_dst->xcoords_y, dvs_config_src->xcoords_y, (width_y * height_y * sizeof(uint32_t)));
-       memcpy(dvs_config_dst->ycoords_y, dvs_config_src->ycoords_y, (width_y * height_y * sizeof(uint32_t)));
+       memcpy(dvs_config_dst->xcoords_y, dvs_config_src->xcoords_y,
+              (width_y * height_y * sizeof(uint32_t)));
+       memcpy(dvs_config_dst->ycoords_y, dvs_config_src->ycoords_y,
+              (width_y * height_y * sizeof(uint32_t)));
 
-       memcpy(dvs_config_dst->xcoords_uv, dvs_config_src->xcoords_uv, (width_uv * height_uv * sizeof(uint32_t)));
-       memcpy(dvs_config_dst->ycoords_uv, dvs_config_src->ycoords_uv, (width_uv * height_uv * sizeof(uint32_t)));
+       memcpy(dvs_config_dst->xcoords_uv, dvs_config_src->xcoords_uv,
+              (width_uv * height_uv * sizeof(uint32_t)));
+       memcpy(dvs_config_dst->ycoords_uv, dvs_config_src->ycoords_uv,
+              (width_uv * height_uv * sizeof(uint32_t)));
 }
 
 void
@@ -248,14 +275,12 @@ ia_css_dvs_statistics_get(enum dvs_statistics_type type,
                          union ia_css_dvs_statistics_host  *host_stats,
                          const union ia_css_dvs_statistics_isp *isp_stats)
 {
-       if (type == DVS_STATISTICS)
-       {
+       if (type == DVS_STATISTICS) {
                ia_css_get_dvs_statistics(host_stats->p_dvs_statistics_host,
-                       isp_stats->p_dvs_statistics_isp);
-       } else if (type == DVS2_STATISTICS)
-       {
+                                         isp_stats->p_dvs_statistics_isp);
+       } else if (type == DVS2_STATISTICS) {
                ia_css_get_dvs2_statistics(host_stats->p_dvs2_statistics_host,
-                       isp_stats->p_dvs_statistics_isp);
+                                          isp_stats->p_dvs_statistics_isp);
        }
        return;
 }
index 04389a7dbcb060acd88cce14c366977475a72611..89ae14b963cc61609bc648bd8057176ee6b6a6b7 100644 (file)
 
 #endif
 struct ia_css_dvs_6axis_config *
-generate_dvs_6axis_table(const struct ia_css_resolution        *frame_res, const struct ia_css_resolution *dvs_offset);
+generate_dvs_6axis_table(const struct ia_css_resolution        *frame_res,
+                        const struct ia_css_resolution *dvs_offset);
 
 struct ia_css_dvs_6axis_config *
-generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config  *dvs_config_src);
+generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config
+                                    *dvs_config_src);
 
 void
 free_dvs_6axis_table(struct ia_css_dvs_6axis_config  **dvs_6axis_config);
 
 void
 copy_dvs_6axis_table(struct ia_css_dvs_6axis_config *dvs_config_dst,
-                        const struct ia_css_dvs_6axis_config *dvs_config_src);
+                    const struct ia_css_dvs_6axis_config *dvs_config_src);
 
 #endif
index f5cfd4cbe41c6fceed10b982053c8fe9626bce53..1d3129dd8feda3a872848599bf01956b823fb5f3 100644 (file)
@@ -80,19 +80,19 @@ crop_and_interpolate(unsigned int cropped_width,
                     enum ia_css_sc_color color)
 {
        unsigned int i, j,
-                    sensor_width,
-                    sensor_height,
-                    table_width,
-                    table_height,
-                    table_cell_h,
-                    out_cell_size,
-                    in_cell_size,
-                    out_start_row,
-                    padded_width;
+                sensor_width,
+                sensor_height,
+                table_width,
+                table_height,
+                table_cell_h,
+                out_cell_size,
+                in_cell_size,
+                out_start_row,
+                padded_width;
        int out_start_col, /* can be negative to indicate padded space */
            table_cell_w;
        unsigned short *in_ptr,
-                      *out_ptr;
+                *out_ptr;
 
        assert(in_table);
        assert(out_table);
@@ -131,7 +131,7 @@ crop_and_interpolate(unsigned int cropped_width,
                src_y0 = clamp(src_y0, 0, (int)table_height - 1);
                src_y1 = clamp(src_y1, 0, (int)table_height - 1);
                ty = min(clamp(ty, 0, (int)sensor_height - 1),
-                                (int)table_cell_h);
+                        (int)table_cell_h);
 
                /* calculate closest source points for distance computation */
                sy0 = min(src_y0 * in_cell_size, sensor_height - 1);
@@ -189,20 +189,21 @@ crop_and_interpolate(unsigned int cropped_width,
                        s_ll = in_ptr[(table_width * src_y1) + src_x0];
                        s_lr = in_ptr[(table_width * src_y1) + src_x1];
 
-                       *out_ptr = (unsigned short)((dx0 * dy0 * s_lr + dx0 * dy1 * s_ur + dx1 * dy0 * s_ll + dx1 * dy1 * s_ul) /
-                                       (divx * divy));
+                       *out_ptr = (unsigned short)((dx0 * dy0 * s_lr + dx0 * dy1 * s_ur + dx1 * dy0 *
+                                                    s_ll + dx1 * dy1 * s_ul) /
+                                                   (divx * divy));
                }
        }
 }
 
 void
 sh_css_params_shading_id_table_generate(
-       struct ia_css_shading_table **target_table,
+    struct ia_css_shading_table **target_table,
 #ifndef ISP2401
-       const struct ia_css_binary *binary)
+    const struct ia_css_binary *binary)
 #else
-       unsigned int table_width,
-       unsigned int table_height)
+    unsigned int table_width,
+    unsigned int table_height)
 #endif
 {
        /* initialize table with ones, shift becomes zero */
@@ -244,14 +245,14 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
                      unsigned int bds_factor)
 {
        unsigned int input_width,
-                    input_height,
-                    table_width,
-                    table_height,
-                    left_padding,
-                    top_padding,
-                    padded_width,
-                    left_cropping,
-                    i;
+                input_height,
+                table_width,
+                table_height,
+                left_padding,
+                top_padding,
+                padded_width,
+                left_cropping,
+                i;
        unsigned int bds_numerator, bds_denominator;
        int right_padding;
 
@@ -265,7 +266,7 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
                sh_css_params_shading_id_table_generate(target_table, binary);
 #else
                sh_css_params_shading_id_table_generate(target_table,
-                       binary->sctbl_legacy_width_per_color, binary->sctbl_legacy_height);
+                                                       binary->sctbl_legacy_width_per_color, binary->sctbl_legacy_height);
 #endif
                return;
        }
@@ -275,8 +276,9 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
           shading correction is performed in the bayer domain (before bayer
           down scaling). */
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
-       padded_width = CEIL_MUL(binary->effective_in_frame_res.width + 2 * ISP_VEC_NELEMS,
-                                       2 * ISP_VEC_NELEMS);
+       padded_width = CEIL_MUL(binary->effective_in_frame_res.width + 2 *
+                               ISP_VEC_NELEMS,
+                               2 * ISP_VEC_NELEMS);
 #endif
        input_height  = binary->in_frame_info.res.height;
        input_width   = binary->in_frame_info.res.width;
@@ -285,11 +287,17 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
                        binary->dvs_envelope.width : 2 * ISP_VEC_NELEMS;
 
        sh_css_bds_factor_get_numerator_denominator
-               (bds_factor, &bds_numerator, &bds_denominator);
-
-       left_padding  = (left_padding + binary->info->sp.pipeline.left_cropping) * bds_numerator / bds_denominator - binary->info->sp.pipeline.left_cropping;
-       right_padding = (binary->internal_frame_info.res.width - binary->effective_in_frame_res.width * bds_denominator / bds_numerator - left_cropping) * bds_numerator / bds_denominator;
-       top_padding = binary->info->sp.pipeline.top_cropping * bds_numerator / bds_denominator - binary->info->sp.pipeline.top_cropping;
+       (bds_factor, &bds_numerator, &bds_denominator);
+
+       left_padding  = (left_padding + binary->info->sp.pipeline.left_cropping) *
+                       bds_numerator / bds_denominator -
+                       binary->info->sp.pipeline.left_cropping;
+       right_padding = (binary->internal_frame_info.res.width -
+                        binary->effective_in_frame_res.width * bds_denominator /
+                        bds_numerator - left_cropping) * bds_numerator / bds_denominator;
+       top_padding = binary->info->sp.pipeline.top_cropping * bds_numerator /
+                     bds_denominator -
+                     binary->info->sp.pipeline.top_cropping;
 
 #if !defined(USE_WINDOWS_BINNING_FACTOR)
        /* @deprecated{This part of the code will be replaced by the code
@@ -356,8 +364,8 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
 
 struct ia_css_shading_table *
 ia_css_shading_table_alloc(
-       unsigned int width,
-       unsigned int height)
+    unsigned int width,
+    unsigned int height)
 {
        unsigned int i;
        struct ia_css_shading_table *me;
index 2521f622d7502adc5a6ad601b8de20ca66986186..3b044acb2a73f939f6c5dc4541cbff4bc9d8f505 100644 (file)
 
 void
 sh_css_params_shading_id_table_generate(
-       struct ia_css_shading_table **target_table,
+    struct ia_css_shading_table **target_table,
 #ifndef ISP2401
-       const struct ia_css_binary *binary);
+    const struct ia_css_binary *binary);
 #else
-       unsigned int table_width,
-       unsigned int table_height);
+    unsigned int table_width,
+    unsigned int table_height);
 #endif
 
 void
index 2a2bb27bdc1c514f0a21025eaa24e9c0cfc14313..7dd82fa322354058956c49fa2e5acb0d1851cf60 100644 (file)
@@ -138,9 +138,9 @@ static hrt_vaddress sp_ddr_ptrs;
 static hrt_vaddress xmem_sp_group_ptrs;
 
 static hrt_vaddress xmem_sp_stage_ptrs[IA_CSS_PIPE_ID_NUM]
-                                               [SH_CSS_MAX_STAGES];
+[SH_CSS_MAX_STAGES];
 static hrt_vaddress xmem_isp_stage_ptrs[IA_CSS_PIPE_ID_NUM]
-                                               [SH_CSS_MAX_STAGES];
+[SH_CSS_MAX_STAGES];
 
 static hrt_vaddress default_gdc_lut;
 static int interleaved_lut_temp[4][HRT_GDC_N];
@@ -158,39 +158,40 @@ static int interleaved_lut_temp[4][HRT_GDC_N];
  */
 
 static const int zoom_table[4][HRT_GDC_N] = {
-       {          0,    0,    0,    0,    0,    0,    0,    0,
-                  0,    0,    0,    0,    0,    0,    0,    0,
-                  0,    0,    0,    0,    0,    0,    0,   -1,
-                 -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
-                 -1,   -2,   -2,   -2,   -2,   -2,   -2,   -2,
-                 -3,   -3,   -3,   -3,   -3,   -3,   -3,   -4,
-                 -4,   -4,   -4,   -4,   -5,   -5,   -5,   -5,
-                 -5,   -5,   -6,   -6,   -6,   -6,   -7,   -7,
-                 -7,   -7,   -7,   -8,   -8,   -8,   -8,   -9,
-                 -9,   -9,   -9,  -10,  -10,  -10,  -10,  -11,
-                -11,  -11,  -12,  -12,  -12,  -12,  -13,  -13,
-                -13,  -14,  -14,  -14,  -15,  -15,  -15,  -15,
-                -16,  -16,  -16,  -17,  -17,  -17,  -18,  -18,
-                -18,  -19,  -19,  -20,  -20,  -20,  -21,  -21,
-                -21,  -22,  -22,  -22,  -23,  -23,  -24,  -24,
-                -24,  -25,  -25,  -25,  -26,  -26,  -27,  -27,
-                -28,  -28,  -28,  -29,  -29,  -30,  -30,  -30,
-                -31,  -31,  -32,  -32,  -33,  -33,  -33,  -34,
-                -34,  -35,  -35,  -36,  -36,  -37,  -37,  -37,
-                -38,  -38,  -39,  -39,  -40,  -40,  -41,  -41,
-                -42,  -42,  -43,  -43,  -44,  -44,  -45,  -45,
-                -46,  -46,  -47,  -47,  -48,  -48,  -49,  -49,
-                -50,  -50,  -51,  -51,  -52,  -52,  -53,  -53,
-                -54,  -54,  -55,  -55,  -56,  -56,  -57,  -57,
-                -58,  -59,  -59,  -60,  -60,  -61,  -61,  -62,
-                -62,  -63,  -63,  -64,  -65,  -65,  -66,  -66,
-                -67,  -67,  -68,  -69,  -69,  -70,  -70,  -71,
-                -71,  -72,  -73,  -73,  -74,  -74,  -75,  -75,
-                -76,  -77,  -77,  -78,  -78,  -79,  -80,  -80,
-                -81,  -81,  -82,  -83,  -83,  -84,  -84,  -85,
-                -86,  -86,  -87,  -87,  -88,  -89,  -89,  -90,
-                -91,  -91,  -92,  -92,  -93,  -94,  -94,  -95,
-                -96,  -96,  -97,  -97,  -98,  -99,  -99, -100,
+       {
+               0,    0,    0,    0,    0,    0,    0,    0,
+               0,    0,    0,    0,    0,    0,    0,    0,
+               0,    0,    0,    0,    0,    0,    0,   -1,
+               -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
+               -1,   -2,   -2,   -2,   -2,   -2,   -2,   -2,
+               -3,   -3,   -3,   -3,   -3,   -3,   -3,   -4,
+               -4,   -4,   -4,   -4,   -5,   -5,   -5,   -5,
+               -5,   -5,   -6,   -6,   -6,   -6,   -7,   -7,
+               -7,   -7,   -7,   -8,   -8,   -8,   -8,   -9,
+               -9,   -9,   -9,  -10,  -10,  -10,  -10,  -11,
+               -11,  -11,  -12,  -12,  -12,  -12,  -13,  -13,
+               -13,  -14,  -14,  -14,  -15,  -15,  -15,  -15,
+               -16,  -16,  -16,  -17,  -17,  -17,  -18,  -18,
+               -18,  -19,  -19,  -20,  -20,  -20,  -21,  -21,
+               -21,  -22,  -22,  -22,  -23,  -23,  -24,  -24,
+               -24,  -25,  -25,  -25,  -26,  -26,  -27,  -27,
+               -28,  -28,  -28,  -29,  -29,  -30,  -30,  -30,
+               -31,  -31,  -32,  -32,  -33,  -33,  -33,  -34,
+               -34,  -35,  -35,  -36,  -36,  -37,  -37,  -37,
+               -38,  -38,  -39,  -39,  -40,  -40,  -41,  -41,
+               -42,  -42,  -43,  -43,  -44,  -44,  -45,  -45,
+               -46,  -46,  -47,  -47,  -48,  -48,  -49,  -49,
+               -50,  -50,  -51,  -51,  -52,  -52,  -53,  -53,
+               -54,  -54,  -55,  -55,  -56,  -56,  -57,  -57,
+               -58,  -59,  -59,  -60,  -60,  -61,  -61,  -62,
+               -62,  -63,  -63,  -64,  -65,  -65,  -66,  -66,
+               -67,  -67,  -68,  -69,  -69,  -70,  -70,  -71,
+               -71,  -72,  -73,  -73,  -74,  -74,  -75,  -75,
+               -76,  -77,  -77,  -78,  -78,  -79,  -80,  -80,
+               -81,  -81,  -82,  -83,  -83,  -84,  -84,  -85,
+               -86,  -86,  -87,  -87,  -88,  -89,  -89,  -90,
+               -91,  -91,  -92,  -92,  -93,  -94,  -94,  -95,
+               -96,  -96,  -97,  -97,  -98,  -99,  -99, -100,
                -101, -101, -102, -102, -103, -104, -104, -105,
                -106, -106, -107, -108, -108, -109, -109, -110,
                -111, -111, -112, -113, -113, -114, -115, -115,
@@ -280,47 +281,48 @@ static const int zoom_table[4][HRT_GDC_N] = {
                -124, -122, -121, -120, -118, -117, -115, -114,
                -112, -110, -109, -107, -106, -104, -103, -101,
                -100,  -98,  -96,  -95,  -93,  -92,  -90,  -88,
-                -87,  -85,  -83,  -82,  -80,  -78,  -77,  -75,
-                -73,  -72,  -70,  -68,  -67,  -65,  -63,  -61,
-                -60,  -58,  -56,  -54,  -52,  -51,  -49,  -47,
-                -45,  -43,  -42,  -40,  -38,  -36,  -34,  -32,
-                -31,  -29,  -27,  -25,  -23,  -21,  -19,  -17,
-                -15,  -13,  -11,   -9,   -7,   -5,   -3,   -1
+               -87,  -85,  -83,  -82,  -80,  -78,  -77,  -75,
+               -73,  -72,  -70,  -68,  -67,  -65,  -63,  -61,
+               -60,  -58,  -56,  -54,  -52,  -51,  -49,  -47,
+               -45,  -43,  -42,  -40,  -38,  -36,  -34,  -32,
+               -31,  -29,  -27,  -25,  -23,  -21,  -19,  -17,
+               -15,  -13,  -11,   -9,   -7,   -5,   -3,   -1
        },
-       {          0,    2,    4,    6,    8,   10,   12,   14,
-                 16,   18,   20,   22,   25,   27,   29,   31,
-                 33,   36,   38,   40,   43,   45,   47,   50,
-                 52,   54,   57,   59,   61,   64,   66,   69,
-                 71,   74,   76,   79,   81,   84,   86,   89,
-                 92,   94,   97,   99,  102,  105,  107,  110,
-                113,  116,  118,  121,  124,  127,  129,  132,
-                135,  138,  141,  144,  146,  149,  152,  155,
-                158,  161,  164,  167,  170,  173,  176,  179,
-                182,  185,  188,  191,  194,  197,  200,  203,
-                207,  210,  213,  216,  219,  222,  226,  229,
-                232,  235,  239,  242,  245,  248,  252,  255,
-                258,  262,  265,  269,  272,  275,  279,  282,
-                286,  289,  292,  296,  299,  303,  306,  310,
-                313,  317,  321,  324,  328,  331,  335,  338,
-                342,  346,  349,  353,  357,  360,  364,  368,
-                372,  375,  379,  383,  386,  390,  394,  398,
-                402,  405,  409,  413,  417,  421,  425,  429,
-                432,  436,  440,  444,  448,  452,  456,  460,
-                464,  468,  472,  476,  480,  484,  488,  492,
-                496,  500,  504,  508,  512,  516,  521,  525,
-                529,  533,  537,  541,  546,  550,  554,  558,
-                562,  567,  571,  575,  579,  584,  588,  592,
-                596,  601,  605,  609,  614,  618,  622,  627,
-                631,  635,  640,  644,  649,  653,  657,  662,
-                666,  671,  675,  680,  684,  689,  693,  698,
-                702,  707,  711,  716,  720,  725,  729,  734,
-                738,  743,  747,  752,  757,  761,  766,  771,
-                775,  780,  784,  789,  794,  798,  803,  808,
-                813,  817,  822,  827,  831,  836,  841,  846,
-                850,  855,  860,  865,  870,  874,  879,  884,
-                889,  894,  898,  903,  908,  913,  918,  923,
-                928,  932,  937,  942,  947,  952,  957,  962,
-                967,  972,  977,  982,  986,  991,  996, 1001,
+       {
+               0,    2,    4,    6,    8,   10,   12,   14,
+               16,   18,   20,   22,   25,   27,   29,   31,
+               33,   36,   38,   40,   43,   45,   47,   50,
+               52,   54,   57,   59,   61,   64,   66,   69,
+               71,   74,   76,   79,   81,   84,   86,   89,
+               92,   94,   97,   99,  102,  105,  107,  110,
+               113,  116,  118,  121,  124,  127,  129,  132,
+               135,  138,  141,  144,  146,  149,  152,  155,
+               158,  161,  164,  167,  170,  173,  176,  179,
+               182,  185,  188,  191,  194,  197,  200,  203,
+               207,  210,  213,  216,  219,  222,  226,  229,
+               232,  235,  239,  242,  245,  248,  252,  255,
+               258,  262,  265,  269,  272,  275,  279,  282,
+               286,  289,  292,  296,  299,  303,  306,  310,
+               313,  317,  321,  324,  328,  331,  335,  338,
+               342,  346,  349,  353,  357,  360,  364,  368,
+               372,  375,  379,  383,  386,  390,  394,  398,
+               402,  405,  409,  413,  417,  421,  425,  429,
+               432,  436,  440,  444,  448,  452,  456,  460,
+               464,  468,  472,  476,  480,  484,  488,  492,
+               496,  500,  504,  508,  512,  516,  521,  525,
+               529,  533,  537,  541,  546,  550,  554,  558,
+               562,  567,  571,  575,  579,  584,  588,  592,
+               596,  601,  605,  609,  614,  618,  622,  627,
+               631,  635,  640,  644,  649,  653,  657,  662,
+               666,  671,  675,  680,  684,  689,  693,  698,
+               702,  707,  711,  716,  720,  725,  729,  734,
+               738,  743,  747,  752,  757,  761,  766,  771,
+               775,  780,  784,  789,  794,  798,  803,  808,
+               813,  817,  822,  827,  831,  836,  841,  846,
+               850,  855,  860,  865,  870,  874,  879,  884,
+               889,  894,  898,  903,  908,  913,  918,  923,
+               928,  932,  937,  942,  947,  952,  957,  962,
+               967,  972,  977,  982,  986,  991,  996, 1001,
                1006, 1011, 1016, 1021, 1026, 1031, 1036, 1041,
                1046, 1051, 1056, 1062, 1067, 1072, 1077, 1082,
                1087, 1092, 1097, 1102, 1107, 1112, 1117, 1122,
@@ -416,7 +418,8 @@ static const int zoom_table[4][HRT_GDC_N] = {
                4093, 4093, 4094, 4094, 4094, 4094, 4095, 4095,
                4095, 4095, 4095, 4095, 4095, 4095, 4095, 4095
        },
-       {       4096, 4095, 4095, 4095, 4095, 4095, 4095, 4095,
+       {
+               4096, 4095, 4095, 4095, 4095, 4095, 4095, 4095,
                4095, 4095, 4095, 4094, 4094, 4094, 4094, 4093,
                4093, 4093, 4092, 4092, 4092, 4091, 4091, 4090,
                4090, 4089, 4089, 4088, 4088, 4087, 4087, 4086,
@@ -511,47 +514,48 @@ static const int zoom_table[4][HRT_GDC_N] = {
                1087, 1082, 1077, 1072, 1067, 1062, 1056, 1051,
                1046, 1041, 1036, 1031, 1026, 1021, 1016, 1011,
                1006, 1001,  996,  991,  986,  982,  977,  972,
-                967,  962,  957,  952,  947,  942,  937,  932,
-                928,  923,  918,  913,  908,  903,  898,  894,
-                889,  884,  879,  874,  870,  865,  860,  855,
-                850,  846,  841,  836,  831,  827,  822,  817,
-                813,  808,  803,  798,  794,  789,  784,  780,
-                775,  771,  766,  761,  757,  752,  747,  743,
-                738,  734,  729,  725,  720,  716,  711,  707,
-                702,  698,  693,  689,  684,  680,  675,  671,
-                666,  662,  657,  653,  649,  644,  640,  635,
-                631,  627,  622,  618,  614,  609,  605,  601,
-                596,  592,  588,  584,  579,  575,  571,  567,
-                562,  558,  554,  550,  546,  541,  537,  533,
-                529,  525,  521,  516,  512,  508,  504,  500,
-                496,  492,  488,  484,  480,  476,  472,  468,
-                464,  460,  456,  452,  448,  444,  440,  436,
-                432,  429,  425,  421,  417,  413,  409,  405,
-                402,  398,  394,  390,  386,  383,  379,  375,
-                372,  368,  364,  360,  357,  353,  349,  346,
-                342,  338,  335,  331,  328,  324,  321,  317,
-                313,  310,  306,  303,  299,  296,  292,  289,
-                286,  282,  279,  275,  272,  269,  265,  262,
-                258,  255,  252,  248,  245,  242,  239,  235,
-                232,  229,  226,  222,  219,  216,  213,  210,
-                207,  203,  200,  197,  194,  191,  188,  185,
-                182,  179,  176,  173,  170,  167,  164,  161,
-                158,  155,  152,  149,  146,  144,  141,  138,
-                135,  132,  129,  127,  124,  121,  118,  116,
-                113,  110,  107,  105,  102,   99,   97,   94,
-                 92,   89,   86,   84,   81,   79,   76,   74,
-                 71,   69,   66,   64,   61,   59,   57,   54,
-                 52,   50,   47,   45,   43,   40,   38,   36,
-                 33,   31,   29,   27,   25,   22,   20,   18,
-                 16,   14,   12,   10,    8,    6,    4,    2
+               967,  962,  957,  952,  947,  942,  937,  932,
+               928,  923,  918,  913,  908,  903,  898,  894,
+               889,  884,  879,  874,  870,  865,  860,  855,
+               850,  846,  841,  836,  831,  827,  822,  817,
+               813,  808,  803,  798,  794,  789,  784,  780,
+               775,  771,  766,  761,  757,  752,  747,  743,
+               738,  734,  729,  725,  720,  716,  711,  707,
+               702,  698,  693,  689,  684,  680,  675,  671,
+               666,  662,  657,  653,  649,  644,  640,  635,
+               631,  627,  622,  618,  614,  609,  605,  601,
+               596,  592,  588,  584,  579,  575,  571,  567,
+               562,  558,  554,  550,  546,  541,  537,  533,
+               529,  525,  521,  516,  512,  508,  504,  500,
+               496,  492,  488,  484,  480,  476,  472,  468,
+               464,  460,  456,  452,  448,  444,  440,  436,
+               432,  429,  425,  421,  417,  413,  409,  405,
+               402,  398,  394,  390,  386,  383,  379,  375,
+               372,  368,  364,  360,  357,  353,  349,  346,
+               342,  338,  335,  331,  328,  324,  321,  317,
+               313,  310,  306,  303,  299,  296,  292,  289,
+               286,  282,  279,  275,  272,  269,  265,  262,
+               258,  255,  252,  248,  245,  242,  239,  235,
+               232,  229,  226,  222,  219,  216,  213,  210,
+               207,  203,  200,  197,  194,  191,  188,  185,
+               182,  179,  176,  173,  170,  167,  164,  161,
+               158,  155,  152,  149,  146,  144,  141,  138,
+               135,  132,  129,  127,  124,  121,  118,  116,
+               113,  110,  107,  105,  102,   99,   97,   94,
+               92,   89,   86,   84,   81,   79,   76,   74,
+               71,   69,   66,   64,   61,   59,   57,   54,
+               52,   50,   47,   45,   43,   40,   38,   36,
+               33,   31,   29,   27,   25,   22,   20,   18,
+               16,   14,   12,   10,    8,    6,    4,    2
        },
-       {          0,   -1,   -3,   -5,   -7,   -9,  -11,  -13,
-                -15,  -17,  -19,  -20,  -23,  -25,  -27,  -28,
-                -30,  -33,  -34,  -36,  -39,  -40,  -42,  -43,
-                -45,  -46,  -49,  -50,  -52,  -54,  -56,  -58,
-                -60,  -61,  -62,  -65,  -66,  -68,  -70,  -72,
-                -73,  -74,  -77,  -78,  -80,  -82,  -83,  -85,
-                -87,  -89,  -90,  -92,  -93,  -95,  -96,  -98,
+       {
+               0,   -1,   -3,   -5,   -7,   -9,  -11,  -13,
+               -15,  -17,  -19,  -20,  -23,  -25,  -27,  -28,
+               -30,  -33,  -34,  -36,  -39,  -40,  -42,  -43,
+               -45,  -46,  -49,  -50,  -52,  -54,  -56,  -58,
+               -60,  -61,  -62,  -65,  -66,  -68,  -70,  -72,
+               -73,  -74,  -77,  -78,  -80,  -82,  -83,  -85,
+               -87,  -89,  -90,  -92,  -93,  -95,  -96,  -98,
                -100, -102, -103, -105, -106, -107, -108, -110,
                -112, -114, -116, -116, -118, -120, -122, -122,
                -124, -126, -127, -128, -130, -131, -133, -133,
@@ -641,43 +645,44 @@ static const int zoom_table[4][HRT_GDC_N] = {
                -110, -110, -109, -109, -108, -107, -107, -106,
                -105, -104, -104, -103, -102, -103, -102, -101,
                -101, -100,  -99,  -99,  -98,  -97,  -97,  -96,
-                -96,  -95,  -94,  -94,  -93,  -92,  -92,  -91,
-                -91,  -90,  -89,  -88,  -88,  -88,  -87,  -86,
-                -85,  -86,  -84,  -84,  -83,  -82,  -82,  -81,
-                -81,  -80,  -80,  -78,  -79,  -77,  -77,  -77,
-                -76,  -76,  -75,  -74,  -74,  -73,  -72,  -72,
-                -72,  -71,  -70,  -70,  -69,  -68,  -68,  -68,
-                -66,  -67,  -66,  -65,  -65,  -65,  -63,  -63,
-                -62,  -62,  -61,  -61,  -60,  -60,  -60,  -58,
-                -58,  -58,  -56,  -56,  -56,  -55,  -54,  -55,
-                -54,  -54,  -53,  -52,  -51,  -51,  -51,  -50,
-                -49,  -49,  -49,  -49,  -48,  -47,  -46,  -46,
-                -46,  -46,  -45,  -43,  -43,  -43,  -43,  -42,
-                -42,  -42,  -40,  -40,  -40,  -39,  -39,  -38,
-                -38,  -38,  -37,  -37,  -36,  -36,  -35,  -35,
-                -34,  -35,  -34,  -33,  -33,  -32,  -32,  -31,
-                -31,  -31,  -30,  -29,  -29,  -29,  -28,  -27,
-                -28,  -28,  -27,  -26,  -26,  -25,  -25,  -25,
-                -24,  -24,  -24,  -23,  -23,  -22,  -22,  -22,
-                -21,  -21,  -20,  -20,  -20,  -20,  -19,  -18,
-                -19,  -18,  -18,  -17,  -18,  -17,  -16,  -17,
-                -16,  -15,  -15,  -15,  -14,  -14,  -15,  -13,
-                -13,  -13,  -13,  -12,  -12,  -11,  -12,  -11,
-                -12,  -10,  -10,  -10,  -10,  -10,   -9,  -10,
-                 -9,   -9,   -9,   -8,   -8,   -7,   -8,   -7,
-                 -7,   -7,   -6,   -6,   -6,   -7,   -6,   -6,
-                 -5,   -5,   -5,   -5,   -5,   -4,   -4,   -5,
-                 -4,   -4,   -3,   -3,   -3,   -3,   -3,   -2,
-                 -3,   -2,   -2,   -2,   -1,   -2,   -1,   -2,
-                 -1,   -1,   -1,   -1,   -1,    0,   -1,    0,
-                 -1,   -1,    0,    0,   -1,    0,    0,   -1,
-                  1,    1,    0,    0,    0,    1,    0,    0,
-                  0,    0,    0,    0,    0,    0,    0,    0
+               -96,  -95,  -94,  -94,  -93,  -92,  -92,  -91,
+               -91,  -90,  -89,  -88,  -88,  -88,  -87,  -86,
+               -85,  -86,  -84,  -84,  -83,  -82,  -82,  -81,
+               -81,  -80,  -80,  -78,  -79,  -77,  -77,  -77,
+               -76,  -76,  -75,  -74,  -74,  -73,  -72,  -72,
+               -72,  -71,  -70,  -70,  -69,  -68,  -68,  -68,
+               -66,  -67,  -66,  -65,  -65,  -65,  -63,  -63,
+               -62,  -62,  -61,  -61,  -60,  -60,  -60,  -58,
+               -58,  -58,  -56,  -56,  -56,  -55,  -54,  -55,
+               -54,  -54,  -53,  -52,  -51,  -51,  -51,  -50,
+               -49,  -49,  -49,  -49,  -48,  -47,  -46,  -46,
+               -46,  -46,  -45,  -43,  -43,  -43,  -43,  -42,
+               -42,  -42,  -40,  -40,  -40,  -39,  -39,  -38,
+               -38,  -38,  -37,  -37,  -36,  -36,  -35,  -35,
+               -34,  -35,  -34,  -33,  -33,  -32,  -32,  -31,
+               -31,  -31,  -30,  -29,  -29,  -29,  -28,  -27,
+               -28,  -28,  -27,  -26,  -26,  -25,  -25,  -25,
+               -24,  -24,  -24,  -23,  -23,  -22,  -22,  -22,
+               -21,  -21,  -20,  -20,  -20,  -20,  -19,  -18,
+               -19,  -18,  -18,  -17,  -18,  -17,  -16,  -17,
+               -16,  -15,  -15,  -15,  -14,  -14,  -15,  -13,
+               -13,  -13,  -13,  -12,  -12,  -11,  -12,  -11,
+               -12,  -10,  -10,  -10,  -10,  -10,   -9,  -10,
+               -9,   -9,   -9,   -8,   -8,   -7,   -8,   -7,
+               -7,   -7,   -6,   -6,   -6,   -7,   -6,   -6,
+               -5,   -5,   -5,   -5,   -5,   -4,   -4,   -5,
+               -4,   -4,   -3,   -3,   -3,   -3,   -3,   -2,
+               -3,   -2,   -2,   -2,   -1,   -2,   -1,   -2,
+               -1,   -1,   -1,   -1,   -1,    0,   -1,    0,
+               -1,   -1,    0,    0,   -1,    0,    0,   -1,
+               1,    1,    0,    0,    0,    1,    0,    0,
+               0,    0,    0,    0,    0,    0,    0,    0
        }
 };
 #else   /* defined(CONFIG_CSI2_PLUS) */
 static const int zoom_table[4][HRT_GDC_N] = {
-       {         0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
+       {
+               0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
@@ -689,124 +694,125 @@ static const int zoom_table[4][HRT_GDC_N] = {
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
-                -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
-                -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
-                -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
-                -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
-                -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
-                -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
-                -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
-                -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
-                -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
-                -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
-                -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
-                -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
-                -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-               -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
-               -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
-               -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
-               -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
-               -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
-               -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
-               -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
-               -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
-               -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
-               -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
-               -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
-                -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
-                -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
-                -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
-                -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
-                -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
+                 -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
+                 -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
+                 -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
+                 -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
+                 -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
+                 -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
+                 -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
+                 -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
+                 -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
+                 -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
+                 -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
+                 -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
+                 -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
+                 -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
+                 -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+                 -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+                 -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+                 -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+                 -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+                 -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+                 -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+                 -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+                 -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
+                 -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
+                 -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
+                 -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,  -7 << 4,
+                 -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
+                 -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4
        },
-       {         0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
+       {
+               0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,
                  2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,
@@ -856,332 +862,334 @@ static const int zoom_table[4][HRT_GDC_N] = {
                  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,
                  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,
                  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,
-                105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
-                105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
-                110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
-                110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
-                116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
-                116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
-                121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
-                121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
-                127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
-                127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
-                132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
-                132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
-                138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
-                138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
-                144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
-                144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
-                149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
-                149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
-                154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
-                154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
-                160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
-                160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
-                165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
-                165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
-                170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
-                170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
-                176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
-                176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
-                181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
-                181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
-                186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
-                186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
-                191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
-                191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
-                195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
-                195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
-                200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
-                200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
-                205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
-                205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
-                209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
-                209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
-                213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
-                213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
-                218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
-                218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
-                222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
-                222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
-                225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
-                225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
-                229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
-                229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
-                232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
-                232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
-                236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
-                236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
-                239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
-                239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
-                241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
-                241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
-                244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
-                244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
-                246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
-                246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
-                248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
-                248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
-                250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
-                250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
-                252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
-                252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
-                253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
-                253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
-                254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
-                254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
-                255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
-                255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
-                255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
-                255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4
+                 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
+                 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
+                 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
+                 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
+                 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
+                 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
+                 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
+                 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
+                 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
+                 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
+                 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
+                 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
+                 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
+                 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
+                 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
+                 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
+                 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
+                 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
+                 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
+                 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
+                 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
+                 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
+                 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
+                 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
+                 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
+                 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
+                 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
+                 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
+                 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
+                 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
+                 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
+                 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
+                 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
+                 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
+                 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
+                 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
+                 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
+                 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
+                 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
+                 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
+                 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
+                 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
+                 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
+                 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
+                 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
+                 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
+                 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
+                 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
+                 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
+                 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
+                 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
+                 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
+                 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
+                 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
+                 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
+                 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
+                 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
+                 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
+                 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
+                 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
+                 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
+                 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
+                 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
+                 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
+                 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
+                 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
+                 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
+                 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
+                 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
+                 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
+                 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
+                 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
+                 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
+                 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
+                 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+                 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+                 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+                 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4
        },
-       {        256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4,
-                256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4,
-                255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
-                255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
-                255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
-                255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
-                254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
-                254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
-                253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
-                253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
-                252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
-                252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
-                250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
-                250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
-                248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
-                248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
-                246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
-                246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
-                244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
-                244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
-                241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
-                241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
-                239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
-                239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
-                236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
-                236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
-                232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
-                232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
-                229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
-                229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
-                225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
-                225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
-                222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
-                222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
-                218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
-                218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
-                213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
-                213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
-                209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
-                209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
-                205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
-                205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
-                200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
-                200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
-                195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
-                195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
-                191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
-                191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
-                186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
-                186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
-                181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
-                181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
-                176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
-                176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
-                170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
-                170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
-                165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
-                165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
-                160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
-                160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
-                154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
-                154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
-                149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
-                149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
-                144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
-                144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
-                138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
-                138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
-                132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
-                132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
-                127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
-                127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
-                121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
-                121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
-                116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
-                116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
-                110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
-                110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
-                105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
-                105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
-                 99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,
-                 99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,
-                 94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,
-                 94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,
-                 88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,
-                 88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,
-                 83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,
-                 83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,
-                 78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,
-                 78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,
-                 73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,
-                 73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,
-                 67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,
-                 67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,
-                 62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,
-                 62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,
-                 58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,
-                 58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,
-                 53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,
-                 53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,
-                 48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,
-                 48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,
-                 43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,
-                 43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,
-                 39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,
-                 39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,
-                 35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,
-                 35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,
-                 31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,
-                 31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,
-                 27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,
-                 27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,
-                 23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,
-                 23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,
-                 19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,
-                 19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,
-                 16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,
-                 16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,
-                 12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,
-                 12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,
-                 9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,
-                 9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,
-                 7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,
-                 7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,
-                 4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,
-                 4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,
-                 2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,
-                 2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4
+       {
+               256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4,
+                   256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4,
+                   255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+                   255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+                   255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+                   255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+                   254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
+                   254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
+                   253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
+                   253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
+                   252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
+                   252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
+                   250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
+                   250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
+                   248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
+                   248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
+                   246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
+                   246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
+                   244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
+                   244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
+                   241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
+                   241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
+                   239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
+                   239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
+                   236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
+                   236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
+                   232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
+                   232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
+                   229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
+                   229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
+                   225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
+                   225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
+                   222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
+                   222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
+                   218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
+                   218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
+                   213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
+                   213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
+                   209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
+                   209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
+                   205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
+                   205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
+                   200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
+                   200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
+                   195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
+                   195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
+                   191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
+                   191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
+                   186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
+                   186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
+                   181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
+                   181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
+                   176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
+                   176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
+                   170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
+                   170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
+                   165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
+                   165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
+                   160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
+                   160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
+                   154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
+                   154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
+                   149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
+                   149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
+                   144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
+                   144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
+                   138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
+                   138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
+                   132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
+                   132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
+                   127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
+                   127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
+                   121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
+                   121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
+                   116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
+                   116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
+                   110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
+                   110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
+                   105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
+                   105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
+                   99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,
+                   99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,  99 << 4,
+                   94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,
+                   94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,  94 << 4,
+                   88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,
+                   88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,  88 << 4,
+                   83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,
+                   83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,  83 << 4,
+                   78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,
+                   78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,  78 << 4,
+                   73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,
+                   73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,  73 << 4,
+                   67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,
+                   67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,  67 << 4,
+                   62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,
+                   62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,  62 << 4,
+                   58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,
+                   58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,  58 << 4,
+                   53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,
+                   53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,  53 << 4,
+                   48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,
+                   48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,  48 << 4,
+                   43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,
+                   43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,  43 << 4,
+                   39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,
+                   39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,  39 << 4,
+                   35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,
+                   35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,  35 << 4,
+                   31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,
+                   31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,  31 << 4,
+                   27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,
+                   27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,  27 << 4,
+                   23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,
+                   23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,  23 << 4,
+                   19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,
+                   19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,  19 << 4,
+                   16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,
+                   16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,  16 << 4,
+                   12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,
+                   12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,  12 << 4,
+                   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,
+                   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,   9 << 4,
+                   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,
+                   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,   7 << 4,
+                   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,
+                   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,   4 << 4,
+                   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,
+                   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4,   2 << 4
        },
-       {         0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
+       {
+               0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
-                -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
-                -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-               -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
-               -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
-               -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
-               -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
-               -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
-               -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
-               -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
-               -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
-               -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
-               -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
-               -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
-               -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
-               -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
-               -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
-                -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
-                -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
-                -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
-                -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
-                -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
-                -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
-                -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
-                -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
-                -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
-                -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
-                -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
+                 -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
+                 -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
+                 -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+                 -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+                 -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+                 -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+                 -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+                 -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+                 -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+                 -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+                 -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+                 -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+                 -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+                 -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+                 -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,  -9 << 4,
+                 -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
+                 -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,  -8 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,  -6 << 4,
+                 -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
+                 -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,  -5 << 4,
+                 -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
+                 -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
+                 -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,  -4 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,  -3 << 4,
+                 -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
+                 -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
+                 -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
+                 -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,  -2 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
-                -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
+                 -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,  -1 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,
                  1 << 4,   1 << 4,   1 << 4,   1 << 4,   1 << 4,   1 << 4,   1 << 4,   1 << 4,
@@ -1197,13 +1205,14 @@ static const int zoom_table[4][HRT_GDC_N] = {
 #endif
 #else
 #error "sh_css_params.c: GDC version must be \
-       one of {GDC_VERSION_2}"
+one of {GDC_VERSION_2}"
 #endif
 
 static const struct ia_css_dz_config default_dz_config = {
        HRT_GDC_N,
        HRT_GDC_N,
-       { \
+       {
+               \
                {0, 0}, \
                {0, 0}, \
        }
@@ -1228,25 +1237,25 @@ struct ia_css_isp_skc_dvs_statistics {
 
 static enum ia_css_err
 ref_sh_css_ddr_address_map(
-               struct sh_css_ddr_address_map *map,
-               struct sh_css_ddr_address_map *out);
+    struct sh_css_ddr_address_map *map,
+    struct sh_css_ddr_address_map *out);
 
 static enum ia_css_err
 write_ia_css_isp_parameter_set_info_to_ddr(
-       struct ia_css_isp_parameter_set_info *me,
-       hrt_vaddress *out);
+    struct ia_css_isp_parameter_set_info *me,
+    hrt_vaddress *out);
 
 static enum ia_css_err
 free_ia_css_isp_parameter_set_info(hrt_vaddress ptr);
 
 static enum ia_css_err
 sh_css_params_write_to_ddr_internal(
-               struct ia_css_pipe *pipe,
-               unsigned int pipe_id,
-               struct ia_css_isp_parameters *params,
-               const struct ia_css_pipeline_stage *stage,
-               struct sh_css_ddr_address_map *ddr_map,
-               struct sh_css_ddr_address_map_size *ddr_map_size);
+    struct ia_css_pipe *pipe,
+    unsigned int pipe_id,
+    struct ia_css_isp_parameters *params,
+    const struct ia_css_pipeline_stage *stage,
+    struct sh_css_ddr_address_map *ddr_map,
+    struct sh_css_ddr_address_map_size *ddr_map_size);
 
 static enum ia_css_err
 sh_css_create_isp_params(struct ia_css_stream *stream,
@@ -1254,42 +1263,42 @@ sh_css_create_isp_params(struct ia_css_stream *stream,
 
 static bool
 sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
-               struct ia_css_isp_parameters *params,
-               bool use_default_config,
-               struct ia_css_pipe *pipe_in);
+                                  struct ia_css_isp_parameters *params,
+                                  bool use_default_config,
+                                  struct ia_css_pipe *pipe_in);
 
 static enum ia_css_err
 sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
-               struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config,
-               struct ia_css_pipe *pipe_in);
+                                  struct ia_css_isp_parameters *params,
+                                  const struct ia_css_isp_config *config,
+                                  struct ia_css_pipe *pipe_in);
 
 static enum ia_css_err
 sh_css_set_global_isp_config_on_pipe(
-       struct ia_css_pipe *curr_pipe,
-       const struct ia_css_isp_config *config,
-       struct ia_css_pipe *pipe);
+    struct ia_css_pipe *curr_pipe,
+    const struct ia_css_isp_config *config,
+    struct ia_css_pipe *pipe);
 
 #if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
 static enum ia_css_err
 sh_css_set_per_frame_isp_config_on_pipe(
-       struct ia_css_stream *stream,
-       const struct ia_css_isp_config *config,
-       struct ia_css_pipe *pipe);
+    struct ia_css_stream *stream,
+    const struct ia_css_isp_config *config,
+    struct ia_css_pipe *pipe);
 #endif
 
 static enum ia_css_err
 sh_css_update_uds_and_crop_info_based_on_zoom_region(
-       const struct ia_css_binary_info *info,
-       const struct ia_css_frame_info *in_frame_info,
-       const struct ia_css_frame_info *out_frame_info,
-       const struct ia_css_resolution *dvs_env,
-       const struct ia_css_dz_config *zoom,
-       const struct ia_css_vector *motion_vector,
-       struct sh_css_uds_info *uds,            /* out */
-       struct sh_css_crop_pos *sp_out_crop_pos,        /* out */
-       struct ia_css_resolution pipe_in_res,
-       bool enable_zoom);
+    const struct ia_css_binary_info *info,
+    const struct ia_css_frame_info *in_frame_info,
+    const struct ia_css_frame_info *out_frame_info,
+    const struct ia_css_resolution *dvs_env,
+    const struct ia_css_dz_config *zoom,
+    const struct ia_css_vector *motion_vector,
+    struct sh_css_uds_info *uds,               /* out */
+    struct sh_css_crop_pos *sp_out_crop_pos,   /* out */
+    struct ia_css_resolution pipe_in_res,
+    bool enable_zoom);
 
 hrt_vaddress
 sh_css_params_ddr_address_map(void)
@@ -1324,7 +1333,8 @@ convert_allocate_fpntbl(struct ia_css_isp_parameters *params)
        assert(params);
 
        data_ptr = params->fpn_config.data;
-       isp_format_data_size = params->fpn_config.height * params->fpn_config.width * sizeof(uint32_t);
+       isp_format_data_size = params->fpn_config.height * params->fpn_config.width *
+                              sizeof(uint32_t);
 
        me = ia_css_host_data_allocate(isp_format_data_size);
 
@@ -1348,15 +1358,15 @@ convert_allocate_fpntbl(struct ia_css_isp_parameters *params)
 }
 
 static enum ia_css_err
-store_fpntbl(struct ia_css_isp_parameters *params, hrt_vaddress ptr)
-{
+store_fpntbl(struct ia_css_isp_parameters *params, hrt_vaddress ptr) {
        struct ia_css_host_data *isp_data;
 
        assert(params);
        assert(ptr != mmgr_NULL);
 
        isp_data = convert_allocate_fpntbl(params);
-       if (!isp_data) {
+       if (!isp_data)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
        }
@@ -1382,11 +1392,11 @@ convert_raw_to_fpn(struct ia_css_isp_parameters *params)
                 * depends on precision of input frame data.
                 */
                if (val < 0) {
-/* Checkpatch patch */
+                       /* Checkpatch patch */
                        val = 0;
                } else if (val >= (1 << 13)) {
-/* Checkpatch patch */
-/* MW: BUG, is "13" a system or application property */
+                       /* Checkpatch patch */
+                       /* MW: BUG, is "13" a system or application property */
                        val = (1 << 13) - 1;
                }
                maxval = max(maxval, val);
@@ -1396,7 +1406,7 @@ convert_raw_to_fpn(struct ia_css_isp_parameters *params)
         */
        params->fpn_config.shift = 0;
        while (maxval > 63) {
-/* MW: BUG, is "63" a system or application property */
+               /* MW: BUG, is "63" a system or application property */
                maxval >>= 1;
                params->fpn_config.shift++;
        }
@@ -1428,7 +1438,8 @@ ia_css_process_kernel(struct ia_css_stream *stream,
 }
 
 static enum ia_css_err
-sh_css_select_dp_10bpp_config(const struct ia_css_pipe *pipe, bool *is_dp_10bpp) {
+sh_css_select_dp_10bpp_config(const struct ia_css_pipe *pipe,
+                             bool *is_dp_10bpp) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        /* Currently we check if 10bpp DPC configuration is required based
         * on the use case,i.e. if BDS and DPC is both enabled. The more cleaner
@@ -1437,10 +1448,12 @@ sh_css_select_dp_10bpp_config(const struct ia_css_pipe *pipe, bool *is_dp_10bpp)
         * implementation. (This is because the configuration is set before a
         * binary is selected, and the binary info is not available)
         */
-       if ((!pipe) || (!is_dp_10bpp)) {
+       if ((!pipe) || (!is_dp_10bpp))
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
                err = IA_CSS_ERR_INTERNAL_ERROR;
-       } else {
+       } else
+       {
                *is_dp_10bpp = false;
 
                /* check if DPC is enabled from the host */
@@ -1449,7 +1462,7 @@ sh_css_select_dp_10bpp_config(const struct ia_css_pipe *pipe, bool *is_dp_10bpp)
                        unsigned int required_bds_factor = SH_CSS_BDS_FACTOR_1_00;
 
                        if ((pipe->config.bayer_ds_out_res.width != 0) &&
-                         (pipe->config.bayer_ds_out_res.height != 0)) {
+                           (pipe->config.bayer_ds_out_res.height != 0)) {
                                if (IA_CSS_SUCCESS == binarydesc_calculate_bds_factor(
                                        pipe->config.input_effective_res,
                                        pipe->config.bayer_ds_out_res,
@@ -1468,8 +1481,7 @@ sh_css_select_dp_10bpp_config(const struct ia_css_pipe *pipe, bool *is_dp_10bpp)
 
 enum ia_css_err
 sh_css_set_black_frame(struct ia_css_stream *stream,
-       const struct ia_css_frame *raw_black_frame)
-{
+                      const struct ia_css_frame *raw_black_frame) {
        struct ia_css_isp_parameters *params;
        /* this function desperately needs to be moved to the ISP or SP such
         * that it can use the DMA.
@@ -1485,16 +1497,18 @@ sh_css_set_black_frame(struct ia_css_stream *stream,
        width = raw_black_frame->info.padded_width,
 
        ptr = raw_black_frame->data
-               + raw_black_frame->planes.raw.offset;
+       + raw_black_frame->planes.raw.offset;
 
        IA_CSS_ENTER_PRIVATE("black_frame=%p", raw_black_frame);
 
        if (params->fpn_config.data &&
-           (params->fpn_config.width != width || params->fpn_config.height != height)) {
+           (params->fpn_config.width != width || params->fpn_config.height != height))
+       {
                sh_css_free(params->fpn_config.data);
                params->fpn_config.data = NULL;
        }
-       if (!params->fpn_config.data) {
+       if (!params->fpn_config.data)
+       {
                params->fpn_config.data = sh_css_malloc(height * width * sizeof(short));
                if (!params->fpn_config.data) {
                        IA_CSS_ERROR("out of memory");
@@ -1507,7 +1521,8 @@ sh_css_set_black_frame(struct ia_css_stream *stream,
        }
 
        /* store raw to fpntbl */
-       for (y = 0; y < height; y++) {
+       for (y = 0; y < height; y++)
+       {
                for (x = 0; x < width; x += (ISP_VEC_NELEMS * 2)) {
                        int ofs = y * width + x;
 
@@ -1542,7 +1557,8 @@ sh_css_set_black_frame(struct ia_css_stream *stream,
 }
 
 bool
-sh_css_params_set_binning_factor(struct ia_css_stream *stream, unsigned int binning_fact)
+sh_css_params_set_binning_factor(struct ia_css_stream *stream,
+                                unsigned int binning_fact)
 {
        struct ia_css_isp_parameters *params;
 
@@ -1563,7 +1579,7 @@ sh_css_params_set_binning_factor(struct ia_css_stream *stream, unsigned int binn
 
 static void
 sh_css_update_shading_table_status(struct ia_css_pipe *pipe,
-                       struct ia_css_isp_parameters *params)
+                                  struct ia_css_isp_parameters *params)
 {
        if (params && pipe && (pipe->pipe_num != params->sc_table_last_pipe_num)) {
                params->sc_table_dirty = true;
@@ -1601,8 +1617,8 @@ sh_css_set_shading_table(struct ia_css_stream *stream,
 
 void
 ia_css_params_store_ia_css_host_data(
-       hrt_vaddress ddr_addr,
-       struct ia_css_host_data *data)
+    hrt_vaddress ddr_addr,
+    struct ia_css_host_data *data)
 {
        assert(data);
        assert(data->address);
@@ -1611,16 +1627,16 @@ ia_css_params_store_ia_css_host_data(
        IA_CSS_ENTER_PRIVATE("");
 
        mmgr_store(ddr_addr,
-          (void *)(data->address),
-          (size_t)data->size);
+                  (void *)(data->address),
+                  (size_t)data->size);
 
        IA_CSS_LEAVE_PRIVATE("void");
 }
 
 struct ia_css_host_data *
 ia_css_params_alloc_convert_sctbl(
-           const struct ia_css_pipeline_stage *stage,
-           const struct ia_css_shading_table *shading_table)
+    const struct ia_css_pipeline_stage *stage,
+    const struct ia_css_shading_table *shading_table)
 {
        const struct ia_css_binary *binary = stage->binary;
        struct ia_css_host_data    *sctbl;
@@ -1640,7 +1656,8 @@ ia_css_params_alloc_convert_sctbl(
 
        aligned_width = binary->sctbl_aligned_width_per_color;
        row_padding = aligned_width - shading_table->width;
-       sctbl_size = shading_table->height * IA_CSS_SC_NUM_COLORS * aligned_width * sizeof(short);
+       sctbl_size = shading_table->height * IA_CSS_SC_NUM_COLORS * aligned_width *
+                    sizeof(short);
 
        sctbl = ia_css_host_data_allocate((size_t)sctbl_size);
 
@@ -1648,15 +1665,15 @@ ia_css_params_alloc_convert_sctbl(
                return NULL;
        ptr = (short int *)sctbl->address;
        memset(ptr,
-               0,
-               sctbl_size);
+              0,
+              sctbl_size);
 
        for (i = 0; i < shading_table->height; i++) {
                for (j = 0; j < IA_CSS_SC_NUM_COLORS; j++) {
                        memcpy(ptr,
-                                  &shading_table->data[j]
-                                       [i * shading_table->width],
-                                  shading_table->width * sizeof(short));
+                              &shading_table->data[j]
+                              [i * shading_table->width],
+                              shading_table->width * sizeof(short));
                        ptr += aligned_width;
                }
        }
@@ -1666,9 +1683,9 @@ ia_css_params_alloc_convert_sctbl(
 }
 
 enum ia_css_err ia_css_params_store_sctbl(
-       const struct ia_css_pipeline_stage *stage,
-       hrt_vaddress sc_tbl,
-       const struct ia_css_shading_table  *sc_config)
+    const struct ia_css_pipeline_stage *stage,
+    hrt_vaddress sc_tbl,
+    const struct ia_css_shading_table  *sc_config)
 {
        struct ia_css_host_data *isp_sc_tbl;
 
@@ -1708,9 +1725,8 @@ sh_css_enable_pipeline(const struct ia_css_binary *binary)
 
 static enum ia_css_err
 ia_css_process_zoom_and_motion(
-       struct ia_css_isp_parameters *params,
-       const struct ia_css_pipeline_stage *first_stage)
-{
+    struct ia_css_isp_parameters *params,
+    const struct ia_css_pipeline_stage *first_stage) {
        /* first_stage can be  NULL */
        const struct ia_css_pipeline_stage *stage;
        enum ia_css_err err = IA_CSS_SUCCESS;
@@ -1724,7 +1740,8 @@ ia_css_process_zoom_and_motion(
        IA_CSS_ENTER_PRIVATE("");
 
        /* Go through all stages to udate uds and cropping */
-       for (stage = first_stage; stage; stage = stage->next) {
+       for (stage = first_stage; stage; stage = stage->next)
+       {
                struct ia_css_binary *binary;
                /* note: the var below is made static as it is quite large;
                   if it is not static it ends up on the stack which could
@@ -1745,15 +1762,15 @@ ia_css_process_zoom_and_motion(
                                out_infos[0] = &args->out_frame[0]->info;
                        info = &stage->firmware->info.isp;
                        ia_css_binary_fill_info(info, false, false,
-                               ATOMISP_INPUT_FORMAT_RAW_10,
-                               args->in_frame  ? &args->in_frame->info  : NULL,
-                               NULL,
-                               out_infos,
-                               args->out_vf_frame ? &args->out_vf_frame->info
-                                                                       : NULL,
-                               &tmp_binary,
-                               NULL,
-                               -1, true);
+                                               ATOMISP_INPUT_FORMAT_RAW_10,
+                                               args->in_frame  ? &args->in_frame->info  : NULL,
+                                               NULL,
+                                               out_infos,
+                                               args->out_vf_frame ? &args->out_vf_frame->info
+                                               : NULL,
+                                               &tmp_binary,
+                                               NULL,
+                                               -1, true);
                        binary = &tmp_binary;
                        binary->info = info;
                }
@@ -1767,29 +1784,29 @@ ia_css_process_zoom_and_motion(
                if (params->dz_config.zoom_region.resolution.width == 0 &&
                    params->dz_config.zoom_region.resolution.height == 0) {
                        sh_css_update_uds_and_crop_info(
-                               &info->sp,
-                               &binary->in_frame_info,
-                               &binary->out_frame_info[0],
-                               &binary->dvs_envelope,
-                               &params->dz_config,
-                               &params->motion_config,
-                               &params->uds[stage->stage_num].uds,
-                               &params->uds[stage->stage_num].crop_pos,
-                               stage->enable_zoom);
+                           &info->sp,
+                           &binary->in_frame_info,
+                           &binary->out_frame_info[0],
+                           &binary->dvs_envelope,
+                           &params->dz_config,
+                           &params->motion_config,
+                           &params->uds[stage->stage_num].uds,
+                           &params->uds[stage->stage_num].crop_pos,
+                           stage->enable_zoom);
                } else {
                        err = sh_css_update_uds_and_crop_info_based_on_zoom_region(
-                               &info->sp,
-                               &binary->in_frame_info,
-                               &binary->out_frame_info[0],
-                               &binary->dvs_envelope,
-                               &params->dz_config,
-                               &params->motion_config,
-                               &params->uds[stage->stage_num].uds,
-                               &params->uds[stage->stage_num].crop_pos,
-                               pipe_in_res,
-                               stage->enable_zoom);
+                                 &info->sp,
+                                 &binary->in_frame_info,
+                                 &binary->out_frame_info[0],
+                                 &binary->dvs_envelope,
+                                 &params->dz_config,
+                                 &params->motion_config,
+                                 &params->uds[stage->stage_num].uds,
+                                 &params->uds[stage->stage_num].crop_pos,
+                                 pipe_in_res,
+                                 stage->enable_zoom);
                        if (err != IA_CSS_SUCCESS)
-                       return err;
+                               return err;
                }
        }
        params->isp_params_changed = true;
@@ -1800,7 +1817,7 @@ ia_css_process_zoom_and_motion(
 
 static void
 sh_css_set_gamma_table(struct ia_css_isp_parameters *params,
-                       const struct ia_css_gamma_table *table)
+                      const struct ia_css_gamma_table *table)
 {
        if (!table)
                return;
@@ -1815,7 +1832,7 @@ sh_css_set_gamma_table(struct ia_css_isp_parameters *params,
 
 static void
 sh_css_get_gamma_table(const struct ia_css_isp_parameters *params,
-                       struct ia_css_gamma_table *table)
+                      struct ia_css_gamma_table *table)
 {
        if (!table)
                return;
@@ -1829,7 +1846,7 @@ sh_css_get_gamma_table(const struct ia_css_isp_parameters *params,
 
 static void
 sh_css_set_ctc_table(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ctc_table *table)
+                    const struct ia_css_ctc_table *table)
 {
        if (!table)
                return;
@@ -1845,7 +1862,7 @@ sh_css_set_ctc_table(struct ia_css_isp_parameters *params,
 
 static void
 sh_css_get_ctc_table(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ctc_table *table)
+                    struct ia_css_ctc_table *table)
 {
        if (!table)
                return;
@@ -1860,7 +1877,7 @@ sh_css_get_ctc_table(const struct ia_css_isp_parameters *params,
 
 static void
 sh_css_set_macc_table(struct ia_css_isp_parameters *params,
-                       const struct ia_css_macc_table *table)
+                     const struct ia_css_macc_table *table)
 {
        if (!table)
                return;
@@ -1876,7 +1893,7 @@ sh_css_set_macc_table(struct ia_css_isp_parameters *params,
 
 static void
 sh_css_get_macc_table(const struct ia_css_isp_parameters *params,
-                       struct ia_css_macc_table *table)
+                     struct ia_css_macc_table *table)
 {
        if (!table)
                return;
@@ -1890,7 +1907,7 @@ sh_css_get_macc_table(const struct ia_css_isp_parameters *params,
 }
 
 void ia_css_morph_table_free(
-       struct ia_css_morph_table *me)
+    struct ia_css_morph_table *me)
 {
        unsigned int i;
 
@@ -1915,8 +1932,8 @@ void ia_css_morph_table_free(
 }
 
 struct ia_css_morph_table *ia_css_morph_table_allocate(
-       unsigned int width,
-       unsigned int height)
+    unsigned int width,
+    unsigned int height)
 {
        unsigned int i;
        struct ia_css_morph_table *me;
@@ -1943,7 +1960,7 @@ struct ia_css_morph_table *ia_css_morph_table_allocate(
                                  sizeof(*me->coordinates_y[i]));
 
                if ((!me->coordinates_x[i]) ||
-                       (!me->coordinates_y[i])) {
+                   (!me->coordinates_y[i])) {
                        ia_css_morph_table_free(me);
                        me = NULL;
                        return me;
@@ -1956,13 +1973,13 @@ struct ia_css_morph_table *ia_css_morph_table_allocate(
 }
 
 static enum ia_css_err sh_css_params_default_morph_table(
-       struct ia_css_morph_table **table,
-       const struct ia_css_binary *binary)
+    struct ia_css_morph_table **table,
+    const struct ia_css_binary *binary)
 {
        /* MW 2400 advanced requires different scaling */
        unsigned int i, j, k, step, width, height;
        short start_x[IA_CSS_MORPH_TABLE_NUM_PLANES] = { -8, 0, -8, 0, 0, -8 },
-             start_y[IA_CSS_MORPH_TABLE_NUM_PLANES] = { 0, 0, -8, -8, -8, 0 };
+               start_y[IA_CSS_MORPH_TABLE_NUM_PLANES] = { 0, 0, -8, -8, -8, 0 };
        struct ia_css_morph_table *tab;
 
        assert(table);
@@ -2012,7 +2029,7 @@ static enum ia_css_err sh_css_params_default_morph_table(
 
 static void
 sh_css_set_morph_table(struct ia_css_isp_parameters *params,
-                       const struct ia_css_morph_table *table)
+                      const struct ia_css_morph_table *table)
 {
        if (!table)
                return;
@@ -2029,8 +2046,8 @@ sh_css_set_morph_table(struct ia_css_isp_parameters *params,
 
 void
 ia_css_translate_3a_statistics(
-               struct ia_css_3a_statistics               *host_stats,
-               const struct ia_css_isp_3a_statistics_map *isp_stats)
+    struct ia_css_3a_statistics               *host_stats,
+    const struct ia_css_isp_3a_statistics_map *isp_stats)
 {
        IA_CSS_ENTER("");
        if (host_stats->grid.use_dmem) {
@@ -2064,8 +2081,8 @@ ia_css_isp_3a_statistics_map_free(struct ia_css_isp_3a_statistics_map *me)
 
 struct ia_css_isp_3a_statistics_map *
 ia_css_isp_3a_statistics_map_allocate(
-       const struct ia_css_isp_3a_statistics *isp_stats,
-       void *data_ptr)
+    const struct ia_css_isp_3a_statistics *isp_stats,
+    void *data_ptr)
 {
        struct ia_css_isp_3a_statistics_map *me;
        /* Windows compiler does not like adding sizes to a void *
@@ -2095,9 +2112,9 @@ ia_css_isp_3a_statistics_map_allocate(
        me->dmem_stats    = (void *)base_ptr;
        me->vmem_stats_hi = (void *)(base_ptr + isp_stats->dmem_size);
        me->vmem_stats_lo = (void *)(base_ptr + isp_stats->dmem_size +
-                                   isp_stats->vmem_size);
+                                    isp_stats->vmem_size);
        me->hmem_stats    = (void *)(base_ptr + isp_stats->dmem_size +
-                                   2 * isp_stats->vmem_size);
+                                    2 * isp_stats->vmem_size);
 
        IA_CSS_LEAVE("map=%p", me);
        return me;
@@ -2110,8 +2127,7 @@ err:
 
 enum ia_css_err
 ia_css_get_3a_statistics(struct ia_css_3a_statistics           *host_stats,
-                        const struct ia_css_isp_3a_statistics *isp_stats)
-{
+                        const struct ia_css_isp_3a_statistics *isp_stats) {
        struct ia_css_isp_3a_statistics_map *map;
        enum ia_css_err ret = IA_CSS_SUCCESS;
 
@@ -2121,11 +2137,13 @@ ia_css_get_3a_statistics(struct ia_css_3a_statistics           *host_stats,
        assert(isp_stats);
 
        map = ia_css_isp_3a_statistics_map_allocate(isp_stats, NULL);
-       if (map) {
+       if (map)
+       {
                mmgr_load(isp_stats->data_ptr, map->data_ptr, isp_stats->size);
                ia_css_translate_3a_statistics(host_stats, map);
                ia_css_isp_3a_statistics_map_free(map);
-       } else {
+       } else
+       {
                IA_CSS_ERROR("out of memory");
                ret = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
        }
@@ -2139,7 +2157,7 @@ ia_css_get_3a_statistics(struct ia_css_3a_statistics           *host_stats,
 */
 static void
 ia_css_set_param_exceptions(const struct ia_css_pipe *pipe,
-                               struct ia_css_isp_parameters *params)
+                           struct ia_css_isp_parameters *params)
 {
        assert(params);
 
@@ -2164,8 +2182,8 @@ ia_css_set_param_exceptions(const struct ia_css_pipe *pipe,
 #ifdef ISP2401
 static void
 sh_css_set_dp_config(const struct ia_css_pipe *pipe,
-                       struct ia_css_isp_parameters *params,
-                       const struct ia_css_dp_config *config)
+                    struct ia_css_isp_parameters *params,
+                    const struct ia_css_dp_config *config)
 {
        if (!config)
                return;
@@ -2186,8 +2204,8 @@ sh_css_set_dp_config(const struct ia_css_pipe *pipe,
 
 static void
 sh_css_get_dp_config(const struct ia_css_pipe *pipe,
-                       const struct ia_css_isp_parameters *params,
-                       struct ia_css_dp_config *config)
+                    const struct ia_css_isp_parameters *params,
+                    struct ia_css_dp_config *config)
 {
        if (!config)
                return;
@@ -2203,7 +2221,7 @@ sh_css_get_dp_config(const struct ia_css_pipe *pipe,
 
 static void
 sh_css_set_nr_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_nr_config *config)
+                    const struct ia_css_nr_config *config)
 {
        if (!config)
                return;
@@ -2223,7 +2241,7 @@ sh_css_set_nr_config(struct ia_css_isp_parameters *params,
 
 static void
 sh_css_set_ee_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_ee_config *config)
+                    const struct ia_css_ee_config *config)
 {
        if (!config)
                return;
@@ -2241,7 +2259,7 @@ sh_css_set_ee_config(struct ia_css_isp_parameters *params,
 
 static void
 sh_css_get_ee_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_ee_config *config)
+                    struct ia_css_ee_config *config)
 {
        if (!config)
                return;
@@ -2257,8 +2275,8 @@ sh_css_get_ee_config(const struct ia_css_isp_parameters *params,
 
 static void
 sh_css_set_pipe_dvs_6axis_config(const struct ia_css_pipe *pipe,
-                                                       struct ia_css_isp_parameters *params,
-                                                       const struct ia_css_dvs_6axis_config  *dvs_config)
+                                struct ia_css_isp_parameters *params,
+                                const struct ia_css_dvs_6axis_config  *dvs_config)
 {
        if (!dvs_config)
                return;
@@ -2281,8 +2299,8 @@ sh_css_set_pipe_dvs_6axis_config(const struct ia_css_pipe *pipe,
 
 static void
 sh_css_get_pipe_dvs_6axis_config(const struct ia_css_pipe *pipe,
-                               const struct ia_css_isp_parameters *params,
-                               struct ia_css_dvs_6axis_config *dvs_config)
+                                const struct ia_css_isp_parameters *params,
+                                struct ia_css_dvs_6axis_config *dvs_config)
 {
        if (!dvs_config)
                return;
@@ -2297,12 +2315,12 @@ sh_css_get_pipe_dvs_6axis_config(const struct ia_css_pipe *pipe,
            (dvs_config->width_y == params->pipe_dvs_6axis_config[pipe->mode]->width_y) &&
            (dvs_config->height_y == params->pipe_dvs_6axis_config[pipe->mode]->height_y) &&
            (dvs_config->width_uv == params->pipe_dvs_6axis_config[pipe->mode]->width_uv) &&
-           (dvs_config->height_uv == params->pipe_dvs_6axis_config[pipe->mode]->height_uv) &&
-            dvs_config->xcoords_y &&
-            dvs_config->ycoords_y &&
-            dvs_config->xcoords_uv &&
-            dvs_config->ycoords_uv)
-       {
+           (dvs_config->height_uv == params->pipe_dvs_6axis_config[pipe->mode]->height_uv)
+           &&
+           dvs_config->xcoords_y &&
+           dvs_config->ycoords_y &&
+           dvs_config->xcoords_uv &&
+           dvs_config->ycoords_uv) {
                copy_dvs_6axis_table(dvs_config, params->pipe_dvs_6axis_config[pipe->mode]);
        }
 
@@ -2311,7 +2329,7 @@ sh_css_get_pipe_dvs_6axis_config(const struct ia_css_pipe *pipe,
 
 static void
 sh_css_set_baa_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_aa_config *config)
+                     const struct ia_css_aa_config *config)
 {
        if (!config)
                return;
@@ -2327,7 +2345,7 @@ sh_css_set_baa_config(struct ia_css_isp_parameters *params,
 
 static void
 sh_css_get_baa_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_aa_config *config)
+                     struct ia_css_aa_config *config)
 {
        if (!config)
                return;
@@ -2342,7 +2360,7 @@ sh_css_get_baa_config(const struct ia_css_isp_parameters *params,
 
 static void
 sh_css_set_dz_config(struct ia_css_isp_parameters *params,
-                       const struct ia_css_dz_config *config)
+                    const struct ia_css_dz_config *config)
 {
        if (!config)
                return;
@@ -2363,7 +2381,7 @@ sh_css_set_dz_config(struct ia_css_isp_parameters *params,
 
 static void
 sh_css_get_dz_config(const struct ia_css_isp_parameters *params,
-                       struct ia_css_dz_config *config)
+                    struct ia_css_dz_config *config)
 {
        if (!config)
                return;
@@ -2378,7 +2396,7 @@ sh_css_get_dz_config(const struct ia_css_isp_parameters *params,
 
 static void
 sh_css_set_motion_vector(struct ia_css_isp_parameters *params,
-                       const struct ia_css_vector *motion)
+                        const struct ia_css_vector *motion)
 {
        if (!motion)
                return;
@@ -2396,7 +2414,7 @@ sh_css_set_motion_vector(struct ia_css_isp_parameters *params,
 
 static void
 sh_css_get_motion_vector(const struct ia_css_isp_parameters *params,
-                       struct ia_css_vector *motion)
+                        struct ia_css_vector *motion)
 {
        if (!motion)
                return;
@@ -2412,8 +2430,7 @@ sh_css_get_motion_vector(const struct ia_css_isp_parameters *params,
 struct ia_css_isp_config *
 sh_css_pipe_isp_config_get(struct ia_css_pipe *pipe)
 {
-       if (!pipe)
-       {
+       if (!pipe) {
                IA_CSS_ERROR("pipe=%p", NULL);
                return NULL;
        }
@@ -2422,18 +2439,16 @@ sh_css_pipe_isp_config_get(struct ia_css_pipe *pipe)
 
 enum ia_css_err
 ia_css_stream_set_isp_config(
-       struct ia_css_stream *stream,
-       const struct ia_css_isp_config *config)
-{
+    struct ia_css_stream *stream,
+    const struct ia_css_isp_config *config) {
        return ia_css_stream_set_isp_config_on_pipe(stream, config, NULL);
 }
 
 enum ia_css_err
 ia_css_stream_set_isp_config_on_pipe(
-       struct ia_css_stream *stream,
-       const struct ia_css_isp_config *config,
-       struct ia_css_pipe *pipe)
-{
+    struct ia_css_stream *stream,
+    const struct ia_css_isp_config *config,
+    struct ia_css_pipe *pipe) {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        if ((!stream) || (!config))
@@ -2454,8 +2469,7 @@ ia_css_stream_set_isp_config_on_pipe(
 
 enum ia_css_err
 ia_css_pipe_set_isp_config(struct ia_css_pipe *pipe,
-       struct ia_css_isp_config *config)
-{
+                          struct ia_css_isp_config *config) {
        struct ia_css_pipe *pipe_in = pipe;
        enum ia_css_err err = IA_CSS_SUCCESS;
 
@@ -2478,10 +2492,9 @@ ia_css_pipe_set_isp_config(struct ia_css_pipe *pipe,
 
 static enum ia_css_err
 sh_css_set_global_isp_config_on_pipe(
-       struct ia_css_pipe *curr_pipe,
-       const struct ia_css_isp_config *config,
-       struct ia_css_pipe *pipe)
-{
+    struct ia_css_pipe *curr_pipe,
+    const struct ia_css_isp_config *config,
+    struct ia_css_pipe *pipe) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        enum ia_css_err err1 = IA_CSS_SUCCESS;
        enum ia_css_err err2 = IA_CSS_SUCCESS;
@@ -2508,10 +2521,9 @@ sh_css_set_global_isp_config_on_pipe(
 #if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
 static enum ia_css_err
 sh_css_set_per_frame_isp_config_on_pipe(
-       struct ia_css_stream *stream,
-       const struct ia_css_isp_config *config,
-       struct ia_css_pipe *pipe)
-{
+    struct ia_css_stream *stream,
+    const struct ia_css_isp_config *config,
+    struct ia_css_pipe *pipe) {
        unsigned int i;
        bool per_frame_config_created = false;
        enum ia_css_err err = IA_CSS_SUCCESS;
@@ -2525,7 +2537,8 @@ sh_css_set_per_frame_isp_config_on_pipe(
 
        IA_CSS_ENTER_PRIVATE("stream=%p, config=%p, pipe=%p", stream, config, pipe);
 
-       if (!pipe) {
+       if (!pipe)
+       {
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
                goto exit;
        }
@@ -2545,7 +2558,8 @@ sh_css_set_per_frame_isp_config_on_pipe(
        params = stream->per_frame_isp_params_configs;
 
        /* update new ISP params object with the new config */
-       if (!sh_css_init_isp_params_from_global(stream, params, false, pipe)) {
+       if (!sh_css_init_isp_params_from_global(stream, params, false, pipe))
+       {
                err1 = IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
@@ -2571,8 +2585,8 @@ sh_css_set_per_frame_isp_config_on_pipe(
         * We do not return this error immediately, but instead continue with updating the ISP params
         *  to enable testing of features which are currently in TR phase. */
        err = (err1 != IA_CSS_SUCCESS) ? err1 :
-               (err2 != IA_CSS_SUCCESS) ? err2 :
-               (err3 != IA_CSS_SUCCESS) ? err3 : err;
+             (err2 != IA_CSS_SUCCESS) ? err2 :
+             (err3 != IA_CSS_SUCCESS) ? err3 : err;
 exit:
        IA_CSS_LEAVE_ERR_PRIVATE(err);
        return err;
@@ -2581,10 +2595,9 @@ exit:
 
 static enum ia_css_err
 sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
-               struct ia_css_isp_parameters *params,
-               const struct ia_css_isp_config *config,
-               struct ia_css_pipe *pipe_in)
-{
+                                  struct ia_css_isp_parameters *params,
+                                  const struct ia_css_isp_config *config,
+                                  struct ia_css_pipe *pipe_in) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        bool is_dp_10bpp = true;
 
@@ -2598,8 +2611,8 @@ sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
        sh_css_set_ee_config(params, config->ee_config);
        sh_css_set_baa_config(params, config->baa_config);
        if ((pipe->mode < IA_CSS_PIPE_ID_NUM) &&
-                       (params->pipe_dvs_6axis_config[pipe->mode]))
-                       sh_css_set_pipe_dvs_6axis_config(pipe, params, config->dvs_6axis_config);
+           (params->pipe_dvs_6axis_config[pipe->mode]))
+               sh_css_set_pipe_dvs_6axis_config(pipe, params, config->dvs_6axis_config);
        sh_css_set_dz_config(params, config->dz_config);
        sh_css_set_motion_vector(params, config->motion_vector);
        sh_css_update_shading_table_status(pipe_in, params);
@@ -2608,9 +2621,9 @@ sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
        sh_css_set_macc_table(params, config->macc_table);
        sh_css_set_gamma_table(params, config->gamma_table);
        sh_css_set_ctc_table(params, config->ctc_table);
-/* ------ deprecated(bz675) : from ------ */
+       /* ------ deprecated(bz675) : from ------ */
        sh_css_set_shading_settings(params, config->shading_settings);
-/* ------ deprecated(bz675) : to ------ */
+       /* ------ deprecated(bz675) : to ------ */
 
        params->dis_coef_table_changed = (config->dvs_coefs);
        params->dvs2_coef_table_changed = (config->dvs2_coefs);
@@ -2628,7 +2641,8 @@ sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
 #endif
 
        if (IA_CSS_SUCCESS ==
-               sh_css_select_dp_10bpp_config(pipe, &is_dp_10bpp)) {
+           sh_css_select_dp_10bpp_config(pipe, &is_dp_10bpp))
+       {
                /* return an error when both DPC and BDS is enabled by the
                 * user. */
                /* we do not exit from this point immediately to allow internal
@@ -2636,7 +2650,8 @@ sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
                if (is_dp_10bpp) {
                        err = IA_CSS_ERR_INVALID_ARGUMENTS;
                }
-       } else {
+       } else
+       {
                err = IA_CSS_ERR_INTERNAL_ERROR;
                goto exit;
        }
@@ -2651,8 +2666,8 @@ exit:
 
 void
 ia_css_stream_get_isp_config(
-       const struct ia_css_stream *stream,
-       struct ia_css_isp_config *config)
+    const struct ia_css_stream *stream,
+    struct ia_css_isp_config *config)
 {
        IA_CSS_ENTER("void");
        ia_css_pipe_get_isp_config(stream->pipes[0], config);
@@ -2661,7 +2676,7 @@ ia_css_stream_get_isp_config(
 
 void
 ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
-                                                  struct ia_css_isp_config *config)
+                          struct ia_css_isp_config *config)
 {
        struct ia_css_isp_parameters *params = NULL;
 
@@ -2683,9 +2698,9 @@ ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
        sh_css_get_ctc_table(params, config->ctc_table);
        sh_css_get_dz_config(params, config->dz_config);
        sh_css_get_motion_vector(params, config->motion_vector);
-/* ------ deprecated(bz675) : from ------ */
+       /* ------ deprecated(bz675) : from ------ */
        sh_css_get_shading_settings(params, config->shading_settings);
-/* ------ deprecated(bz675) : to ------ */
+       /* ------ deprecated(bz675) : to ------ */
 
        config->output_frame = params->output_frame;
        config->isp_config_id = params->isp_parameters_id;
@@ -2700,12 +2715,12 @@ ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
  * Deprecated: Implement mmgr_realloc()
  */
 static bool realloc_isp_css_mm_buf(
-       hrt_vaddress *curr_buf,
-       size_t *curr_size,
-       size_t needed_size,
-       bool force,
-       enum ia_css_err *err,
-       uint16_t mmgr_attribute)
+    hrt_vaddress *curr_buf,
+    size_t *curr_size,
+    size_t needed_size,
+    bool force,
+    enum ia_css_err *err,
+    uint16_t mmgr_attribute)
 {
        s32 id;
 
@@ -2728,7 +2743,7 @@ static bool realloc_isp_css_mm_buf(
        id = IA_CSS_REFCOUNT_PARAM_BUFFER;
        ia_css_refcount_decrement(id, *curr_buf);
        *curr_buf = ia_css_refcount_increment(id, mmgr_alloc_attr(needed_size,
-                                                       mmgr_attribute));
+                                             mmgr_attribute));
 
        if (!*curr_buf) {
                *err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
@@ -2741,11 +2756,11 @@ static bool realloc_isp_css_mm_buf(
 }
 
 static bool reallocate_buffer(
-       hrt_vaddress *curr_buf,
-       size_t *curr_size,
-       size_t needed_size,
-       bool force,
-       enum ia_css_err *err)
+    hrt_vaddress *curr_buf,
+    size_t *curr_size,
+    size_t needed_size,
+    bool force,
+    enum ia_css_err *err)
 {
        bool ret;
        u16     mmgr_attribute = MMGR_ATTRIBUTE_DEFAULT;
@@ -2753,7 +2768,7 @@ static bool reallocate_buffer(
        IA_CSS_ENTER_PRIVATE("void");
 
        ret = realloc_isp_css_mm_buf(curr_buf,
-               curr_size, needed_size, force, err, mmgr_attribute);
+                                    curr_size, needed_size, force, err, mmgr_attribute);
 
        IA_CSS_LEAVE_PRIVATE("ret=%d", ret);
        return ret;
@@ -2780,8 +2795,8 @@ ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
 
        if (grid->use_dmem) {
                me->dmem_size = sizeof(struct ia_css_3a_output) *
-                                      grid->aligned_width *
-                                      grid->aligned_height;
+                               grid->aligned_width *
+                               grid->aligned_height;
        } else {
                me->vmem_size = ISP_S3ATBL_HI_LO_STRIDE_BYTES *
                                grid->aligned_height;
@@ -2876,7 +2891,8 @@ ia_css_metadata_free(struct ia_css_metadata *me)
 }
 
 void
-ia_css_metadata_free_multiple(unsigned int num_bufs, struct ia_css_metadata **bufs)
+ia_css_metadata_free_multiple(unsigned int num_bufs,
+                             struct ia_css_metadata **bufs)
 {
        unsigned int i;
 
@@ -2890,8 +2906,7 @@ static unsigned int g_param_buffer_dequeue_count;
 static unsigned int g_param_buffer_enqueue_count;
 
 enum ia_css_err
-ia_css_stream_isp_parameters_init(struct ia_css_stream *stream)
-{
+ia_css_stream_isp_parameters_init(struct ia_css_stream *stream) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        unsigned int i;
        struct sh_css_ddr_address_map *ddr_ptrs;
@@ -2901,7 +2916,8 @@ ia_css_stream_isp_parameters_init(struct ia_css_stream *stream)
        assert(stream);
        IA_CSS_ENTER_PRIVATE("void");
 
-       if (!stream) {
+       if (!stream)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2916,7 +2932,8 @@ ia_css_stream_isp_parameters_init(struct ia_css_stream *stream)
                goto ERR;
 
        params = stream->isp_params_configs;
-       if (!sh_css_init_isp_params_from_global(stream, params, true, NULL)) {
+       if (!sh_css_init_isp_params_from_global(stream, params, true, NULL))
+       {
                /* we do not return the error immediately to enable internal
                 * firmware feature testing */
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -2926,7 +2943,8 @@ ia_css_stream_isp_parameters_init(struct ia_css_stream *stream)
        ddr_ptrs_size = &params->ddr_ptrs_size;
 
        /* create per pipe reference to general ddr_ptrs */
-       for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++) {
+       for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++)
+       {
                ref_sh_css_ddr_address_map(ddr_ptrs, &params->pipe_ddr_ptrs[i]);
                params->pipe_ddr_ptrs_size[i] = *ddr_ptrs_size;
        }
@@ -2938,8 +2956,8 @@ ERR:
 
 static void
 ia_css_set_sdis_config(
-       struct ia_css_isp_parameters *params,
-       const struct ia_css_dvs_coefficients *dvs_coefs)
+    struct ia_css_isp_parameters *params,
+    const struct ia_css_dvs_coefficients *dvs_coefs)
 {
        ia_css_set_sdis_horicoef_config(params, dvs_coefs);
        ia_css_set_sdis_vertcoef_config(params, dvs_coefs);
@@ -2949,8 +2967,8 @@ ia_css_set_sdis_config(
 
 static void
 ia_css_set_sdis2_config(
-       struct ia_css_isp_parameters *params,
-       const struct ia_css_dvs2_coefficients *dvs2_coefs)
+    struct ia_css_isp_parameters *params,
+    const struct ia_css_dvs2_coefficients *dvs2_coefs)
 {
        ia_css_set_sdis2_horicoef_config(params, dvs2_coefs);
        ia_css_set_sdis2_vertcoef_config(params, dvs2_coefs);
@@ -2960,8 +2978,7 @@ ia_css_set_sdis2_config(
 
 static enum ia_css_err
 sh_css_create_isp_params(struct ia_css_stream *stream,
-                        struct ia_css_isp_parameters **isp_params_out)
-{
+                        struct ia_css_isp_parameters **isp_params_out) {
        bool succ = true;
        unsigned int i;
        struct sh_css_ddr_address_map *ddr_ptrs;
@@ -2969,7 +2986,7 @@ sh_css_create_isp_params(struct ia_css_stream *stream,
        enum ia_css_err err = IA_CSS_SUCCESS;
        size_t params_size;
        struct ia_css_isp_parameters *params =
-                               sh_css_malloc(sizeof(struct ia_css_isp_parameters));
+       sh_css_malloc(sizeof(struct ia_css_isp_parameters));
 
        if (!params)
        {
@@ -2978,18 +2995,20 @@ sh_css_create_isp_params(struct ia_css_stream *stream,
                IA_CSS_ERROR("%s:%d error: cannot allocate memory", __FILE__, __LINE__);
                IA_CSS_LEAVE_ERR_PRIVATE(err);
                return err;
-       } else {
+       } else
+       {
                memset(params, 0, sizeof(struct ia_css_isp_parameters));
        }
 
        ddr_ptrs = &params->ddr_ptrs;
        ddr_ptrs_size = &params->ddr_ptrs_size;
 
-       for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++) {
+       for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++)
+       {
                memset(&params->pipe_ddr_ptrs[i], 0,
-                       sizeof(params->pipe_ddr_ptrs[i]));
+                      sizeof(params->pipe_ddr_ptrs[i]));
                memset(&params->pipe_ddr_ptrs_size[i], 0,
-                       sizeof(params->pipe_ddr_ptrs_size[i]));
+                      sizeof(params->pipe_ddr_ptrs_size[i]));
        }
 
        memset(ddr_ptrs, 0, sizeof(*ddr_ptrs));
@@ -2998,14 +3017,14 @@ sh_css_create_isp_params(struct ia_css_stream *stream,
        params_size = sizeof(params->uds);
        ddr_ptrs_size->isp_param = params_size;
        ddr_ptrs->isp_param =
-                               ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER,
-                                       mmgr_malloc(params_size));
+       ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER,
+                                 mmgr_malloc(params_size));
        succ &= (ddr_ptrs->isp_param != mmgr_NULL);
 
        ddr_ptrs_size->macc_tbl = sizeof(struct ia_css_macc_table);
        ddr_ptrs->macc_tbl =
-                               ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER,
-                                       mmgr_malloc(sizeof(struct ia_css_macc_table)));
+       ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER,
+                                 mmgr_malloc(sizeof(struct ia_css_macc_table)));
        succ &= (ddr_ptrs->macc_tbl != mmgr_NULL);
 
        *isp_params_out = params;
@@ -3014,14 +3033,15 @@ sh_css_create_isp_params(struct ia_css_stream *stream,
 
 static bool
 sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
-               struct ia_css_isp_parameters *params,
-               bool use_default_config,
-               struct ia_css_pipe *pipe_in)
+                                  struct ia_css_isp_parameters *params,
+                                  bool use_default_config,
+                                  struct ia_css_pipe *pipe_in)
 {
        bool retval = true;
        int i = 0;
        bool is_dp_10bpp = true;
-       unsigned int isp_pipe_version = ia_css_pipe_get_isp_pipe_version(stream->pipes[0]);
+       unsigned int isp_pipe_version = ia_css_pipe_get_isp_pipe_version(
+                                           stream->pipes[0]);
        struct ia_css_isp_parameters *stream_params = stream->isp_params_configs;
 
        if (!use_default_config && !stream_params) {
@@ -3032,8 +3052,7 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
        params->output_frame = NULL;
        params->isp_parameters_id = 0;
 
-       if (use_default_config)
-       {
+       if (use_default_config) {
                ia_css_set_xnr3_config(params, &default_xnr3_config);
 
                sh_css_set_nr_config(params, &default_nr_config);
@@ -3046,9 +3065,9 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
                sh_css_set_ctc_table(params, &default_ctc_table);
                sh_css_set_baa_config(params, &default_baa_config);
                sh_css_set_dz_config(params, &default_dz_config);
-/* ------ deprecated(bz675) : from ------ */
+               /* ------ deprecated(bz675) : from ------ */
                sh_css_set_shading_settings(params, &default_shading_settings);
-/* ------ deprecated(bz675) : to ------ */
+               /* ------ deprecated(bz675) : to ------ */
 
                ia_css_set_s3a_config(params, &default_3a_config);
                ia_css_set_wb_config(params, &default_wb_config);
@@ -3061,7 +3080,8 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
 #else
 
                for (i = 0; i < stream->num_pipes; i++) {
-                       if (sh_css_select_dp_10bpp_config(stream->pipes[i], &is_dp_10bpp) == IA_CSS_SUCCESS) {
+                       if (sh_css_select_dp_10bpp_config(stream->pipes[i],
+                                                         &is_dp_10bpp) == IA_CSS_SUCCESS) {
                                /* set the return value as false if both DPC and
                                 * BDS is enabled by the user. But we do not return
                                 * the value immediately to enable internal firmware
@@ -3126,8 +3146,7 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
 #ifdef ISP2401
                ia_css_tnr3_set_default_config(&params->tnr3_config);
 #endif
-       } else
-       {
+       } else {
                ia_css_set_xnr3_config(params, &stream_params->xnr3_config);
 
                sh_css_set_nr_config(params, &stream_params->nr_config);
@@ -3140,9 +3159,9 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
                sh_css_set_ctc_table(params, &stream_params->ctc_table);
                sh_css_set_baa_config(params, &stream_params->bds_config);
                sh_css_set_dz_config(params, &stream_params->dz_config);
-/* ------ deprecated(bz675) : from ------ */
+               /* ------ deprecated(bz675) : from ------ */
                sh_css_set_shading_settings(params, &stream_params->shading_settings);
-/* ------ deprecated(bz675) : to ------ */
+               /* ------ deprecated(bz675) : to ------ */
 
                ia_css_set_s3a_config(params, &stream_params->s3a_config);
                ia_css_set_wb_config(params, &stream_params->wb_config);
@@ -3173,7 +3192,7 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
 
                for (i = 0; i < stream->num_pipes; i++) {
                        if (IA_CSS_SUCCESS ==
-                               sh_css_select_dp_10bpp_config(stream->pipes[i], &is_dp_10bpp)) {
+                           sh_css_select_dp_10bpp_config(stream->pipes[i], &is_dp_10bpp)) {
                                /* set the return value as false if both DPC and
                                 * BDS is enabled by the user. But we do not return
                                 * the value immediately to enable internal firmware
@@ -3190,7 +3209,7 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
                        }
                        if (stream->pipes[i]->mode < IA_CSS_PIPE_ID_NUM) {
                                sh_css_set_dp_config(stream->pipes[i], params,
-                                       &stream_params->pipe_dp_config[stream->pipes[i]->mode]);
+                                                    &stream_params->pipe_dp_config[stream->pipes[i]->mode]);
                                ia_css_set_param_exceptions(stream->pipes[i], params);
 #endif
                        } else {
@@ -3204,7 +3223,8 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
 
 #endif
                params->fpn_config.data = stream_params->fpn_config.data;
-               params->config_changed[IA_CSS_FPN_ID] = stream_params->config_changed[IA_CSS_FPN_ID];
+               params->config_changed[IA_CSS_FPN_ID] =
+                   stream_params->config_changed[IA_CSS_FPN_ID];
                params->fpn_config.enabled = stream_params->fpn_config.enabled;
 
                sh_css_set_motion_vector(params, &stream_params->motion_config);
@@ -3225,10 +3245,10 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
                        if (stream_params->pipe_dvs_6axis_config[i]) {
                                if (params->pipe_dvs_6axis_config[i]) {
                                        copy_dvs_6axis_table(params->pipe_dvs_6axis_config[i],
-                                                               stream_params->pipe_dvs_6axis_config[i]);
+                                                            stream_params->pipe_dvs_6axis_config[i]);
                                } else {
                                        params->pipe_dvs_6axis_config[i] =
-                                               generate_dvs_6axis_table_from_config(stream_params->pipe_dvs_6axis_config[i]);
+                                           generate_dvs_6axis_table_from_config(stream_params->pipe_dvs_6axis_config[i]);
                                }
                        }
                }
@@ -3245,8 +3265,7 @@ exit:
 }
 
 enum ia_css_err
-sh_css_params_init(void)
-{
+sh_css_params_init(void) {
        int i, p;
 
        IA_CSS_ENTER_PRIVATE("void");
@@ -3255,16 +3274,17 @@ sh_css_params_init(void)
        g_param_buffer_dequeue_count = 0;
        g_param_buffer_enqueue_count = 0;
 
-       for (p = 0; p < IA_CSS_PIPE_ID_NUM; p++) {
+       for (p = 0; p < IA_CSS_PIPE_ID_NUM; p++)
+       {
                for (i = 0; i < SH_CSS_MAX_STAGES; i++) {
                        xmem_sp_stage_ptrs[p][i] =
-                                       ia_css_refcount_increment(-1,
-                                           mmgr_calloc(1,
-                                           sizeof(struct sh_css_sp_stage)));
+                       ia_css_refcount_increment(-1,
+                                                 mmgr_calloc(1,
+                                                             sizeof(struct sh_css_sp_stage)));
                        xmem_isp_stage_ptrs[p][i] =
-                                       ia_css_refcount_increment(-1,
-                                           mmgr_calloc(1,
-                                           sizeof(struct sh_css_isp_stage)));
+                       ia_css_refcount_increment(-1,
+                                                 mmgr_calloc(1,
+                                                             sizeof(struct sh_css_isp_stage)));
 
                        if ((xmem_sp_stage_ptrs[p][i] == mmgr_NULL) ||
                            (xmem_isp_stage_ptrs[p][i] == mmgr_NULL)) {
@@ -3281,13 +3301,14 @@ sh_css_params_init(void)
        ia_css_config_xnr_table();
 
        sp_ddr_ptrs = ia_css_refcount_increment(-1, mmgr_calloc(1,
-               CEIL_MUL(sizeof(struct sh_css_ddr_address_map),
-                        HIVE_ISP_DDR_WORD_BYTES)));
+                                               CEIL_MUL(sizeof(struct sh_css_ddr_address_map),
+                                                       HIVE_ISP_DDR_WORD_BYTES)));
        xmem_sp_group_ptrs = ia_css_refcount_increment(-1, mmgr_calloc(1,
-               sizeof(struct sh_css_sp_group)));
+                            sizeof(struct sh_css_sp_group)));
 
        if ((sp_ddr_ptrs == mmgr_NULL) ||
-           (xmem_sp_group_ptrs == mmgr_NULL)) {
+           (xmem_sp_group_ptrs == mmgr_NULL))
+       {
                ia_css_uninit();
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
@@ -3339,7 +3360,7 @@ enum ia_css_err ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe,
         * ia_css_init() has been called. */
        if (pipe->stream && pipe->stream->started) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
-                       "unable to set scaler lut since stream has started\n");
+                                   "unable to set scaler lut since stream has started\n");
 #ifndef ISP2401
                store = false;
 #else
@@ -3365,21 +3386,22 @@ enum ia_css_err ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe,
                        return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 #else
                        ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
-                               "unable to allocate scaler_pp_lut\n");
+                                           "unable to allocate scaler_pp_lut\n");
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                } else {
                        gdc_lut_convert_to_isp_format((const int(*)[HRT_GDC_N])lut,
-                               interleaved_lut_temp);
+                                                     interleaved_lut_temp);
                        mmgr_store(pipe->scaler_pp_lut,
-                               (int *)interleaved_lut_temp,
-                               sizeof(zoom_table));
+                                  (int *)interleaved_lut_temp,
+                                  sizeof(zoom_table));
 #endif
                }
 #ifndef ISP2401
 
-               gdc_lut_convert_to_isp_format((const int(*)[HRT_GDC_N])lut, interleaved_lut_temp);
+               gdc_lut_convert_to_isp_format((const int(*)[HRT_GDC_N])lut,
+                                             interleaved_lut_temp);
                mmgr_store(pipe->scaler_pp_lut, (int *)interleaved_lut_temp,
-                       sizeof(zoom_table));
+                          sizeof(zoom_table));
 #endif
        }
 
@@ -3419,9 +3441,9 @@ enum ia_css_err sh_css_params_map_and_store_default_gdc_lut(void)
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 
        gdc_lut_convert_to_isp_format((const int(*)[HRT_GDC_N])zoom_table,
-               interleaved_lut_temp);
+                                     interleaved_lut_temp);
        mmgr_store(default_gdc_lut, (int *)interleaved_lut_temp,
-               sizeof(zoom_table));
+                  sizeof(zoom_table));
 
        IA_CSS_LEAVE_PRIVATE("lut(%u) err=%d", default_gdc_lut, err);
        return err;
@@ -3443,7 +3465,7 @@ hrt_vaddress sh_css_params_get_default_gdc_lut(void)
 }
 
 static void free_param_set_callback(
-       hrt_vaddress ptr)
+    hrt_vaddress ptr)
 {
        IA_CSS_ENTER_PRIVATE("void");
 
@@ -3453,7 +3475,7 @@ static void free_param_set_callback(
 }
 
 static void free_buffer_callback(
-       hrt_vaddress ptr)
+    hrt_vaddress ptr)
 {
        IA_CSS_ENTER_PRIVATE("void");
 
@@ -3492,7 +3514,7 @@ static void free_map(struct sh_css_ddr_address_map *map)
 
        /* free buffers */
        for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size) /
-                                               sizeof(size_t)); i++) {
+                        sizeof(size_t)); i++) {
                if (addrs[i] == mmgr_NULL)
                        continue;
                safe_free(IA_CSS_REFCOUNT_PARAM_BUFFER, addrs[i]);
@@ -3507,7 +3529,7 @@ ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream)
        int i;
        struct ia_css_isp_parameters *params = stream->isp_params_configs;
        struct ia_css_isp_parameters *per_frame_params =
-                                               stream->per_frame_isp_params_configs;
+                   stream->per_frame_isp_params_configs;
 
        IA_CSS_ENTER_PRIVATE("void");
        if (!params) {
@@ -3516,8 +3538,7 @@ ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream)
        }
 
        /* free existing ddr_ptr maps */
-       for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++)
-       {
+       for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++) {
                free_map(&params->pipe_ddr_ptrs[i]);
                if (per_frame_params)
                        free_map(&per_frame_params->pipe_ddr_ptrs[i]);
@@ -3587,10 +3608,10 @@ sh_css_params_uninit(void)
 
 static struct ia_css_host_data *
 convert_allocate_morph_plane(
-       unsigned short *data,
-       unsigned int width,
-       unsigned int height,
-       unsigned int aligned_width)
+    unsigned short *data,
+    unsigned int width,
+    unsigned int height,
+    unsigned int aligned_width)
 {
        unsigned int i, j, padding, w;
        struct ia_css_host_data *me;
@@ -3635,18 +3656,18 @@ convert_allocate_morph_plane(
 
 static enum ia_css_err
 store_morph_plane(
-       unsigned short *data,
-       unsigned int width,
-       unsigned int height,
-       hrt_vaddress dest,
-       unsigned int aligned_width)
-{
+    unsigned short *data,
+    unsigned int width,
+    unsigned int height,
+    hrt_vaddress dest,
+    unsigned int aligned_width) {
        struct ia_css_host_data *isp_data;
 
        assert(dest != mmgr_NULL);
 
        isp_data = convert_allocate_morph_plane(data, width, height, aligned_width);
-       if (!isp_data) {
+       if (!isp_data)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
        }
@@ -3657,8 +3678,8 @@ store_morph_plane(
 }
 
 static void sh_css_update_isp_params_to_ddr(
-       struct ia_css_isp_parameters *params,
-       hrt_vaddress ddr_ptr)
+    struct ia_css_isp_parameters *params,
+    hrt_vaddress ddr_ptr)
 {
        size_t size = sizeof(params->uds);
 
@@ -3671,16 +3692,17 @@ static void sh_css_update_isp_params_to_ddr(
 }
 
 static void sh_css_update_isp_mem_params_to_ddr(
-       const struct ia_css_binary *binary,
-       hrt_vaddress ddr_mem_ptr,
-       size_t size,
-       enum ia_css_isp_memories mem)
+    const struct ia_css_binary *binary,
+    hrt_vaddress ddr_mem_ptr,
+    size_t size,
+    enum ia_css_isp_memories mem)
 {
        const struct ia_css_host_data *params;
 
        IA_CSS_ENTER_PRIVATE("void");
 
-       params = ia_css_isp_param_get_mem_init(&binary->mem_params, IA_CSS_PARAM_CLASS_PARAM, mem);
+       params = ia_css_isp_param_get_mem_init(&binary->mem_params,
+                                              IA_CSS_PARAM_CLASS_PARAM, mem);
        mmgr_store(ddr_mem_ptr, params->address, size);
 
        IA_CSS_LEAVE_PRIVATE("void");
@@ -3691,8 +3713,9 @@ void ia_css_dequeue_param_buffers(/*unsigned int pipe_num*/ void)
        unsigned int i;
        hrt_vaddress cpy;
        enum sh_css_queue_id param_queue_ids[3] = {     IA_CSS_PARAMETER_SET_QUEUE_ID,
-                                                       IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID,
-                                                       SH_CSS_INVALID_QUEUE_ID};
+                                                   IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID,
+                                                   SH_CSS_INVALID_QUEUE_ID
+                                                 };
 
        IA_CSS_ENTER_PRIVATE("void");
 
@@ -3705,15 +3728,16 @@ void ia_css_dequeue_param_buffers(/*unsigned int pipe_num*/ void)
        for (i = 0; SH_CSS_INVALID_QUEUE_ID != param_queue_ids[i]; i++) {
                cpy = (hrt_vaddress)0;
                /* clean-up old copy */
-               while (ia_css_bufq_dequeue_buffer(param_queue_ids[i], (uint32_t *)&cpy) == IA_CSS_SUCCESS) {
+               while (ia_css_bufq_dequeue_buffer(param_queue_ids[i],
+                                                 (uint32_t *)&cpy) == IA_CSS_SUCCESS) {
                        /* TMP: keep track of dequeued param set count
                         */
                        g_param_buffer_dequeue_count++;
                        ia_css_bufq_enqueue_psys_event(
-                                       IA_CSS_PSYS_SW_EVENT_BUFFER_DEQUEUED,
-                                       0,
-                                       param_queue_ids[i],
-                                       0);
+                           IA_CSS_PSYS_SW_EVENT_BUFFER_DEQUEUED,
+                           0,
+                           param_queue_ids[i],
+                           0);
 
                        IA_CSS_LOG("dequeued param set %x from %d, release ref", cpy, 0);
                        free_ia_css_isp_parameter_set_info(cpy);
@@ -3740,7 +3764,7 @@ process_kernel_parameters(unsigned int pipe_id,
 
        if (params->config_changed[IA_CSS_OB_ID]) {
                ia_css_ob_configure(&params->stream_configs.ob,
-                           isp_pipe_version, raw_bit_depth);
+                                   isp_pipe_version, raw_bit_depth);
        }
        if (params->config_changed[IA_CSS_S3A_ID]) {
                ia_css_s3a_configure(raw_bit_depth);
@@ -3761,10 +3785,9 @@ process_kernel_parameters(unsigned int pipe_id,
 
 enum ia_css_err
 sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
-       struct ia_css_isp_parameters *params,
-       bool commit,
-       struct ia_css_pipe *pipe_in)
-{
+                              struct ia_css_isp_parameters *params,
+                              bool commit,
+                              struct ia_css_pipe *pipe_in) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        hrt_vaddress cpy;
        int i;
@@ -3781,13 +3804,15 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
        raw_bit_depth = ia_css_stream_input_format_bits_per_pixel(curr_pipe->stream);
 
        /* now make the map available to the sp */
-       if (!commit) {
+       if (!commit)
+       {
                IA_CSS_LEAVE_ERR_PRIVATE(err);
                return err;
        }
        /* enqueue a copies of the mem_map to
           the designated pipelines */
-       for (i = 0; i < curr_pipe->stream->num_pipes; i++) {
+       for (i = 0; i < curr_pipe->stream->num_pipes; i++)
+       {
                struct ia_css_pipe *pipe;
                struct sh_css_ddr_address_map *cur_map;
                struct sh_css_ddr_address_map_size *cur_map_size;
@@ -3805,11 +3830,12 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
 
 #if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
                ia_css_query_internal_queue_id(params->output_frame
-                                               ? IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET
-                                               : IA_CSS_BUFFER_TYPE_PARAMETER_SET,
-                                               thread_id, &queue_id);
+                                              ? IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET
+                                              : IA_CSS_BUFFER_TYPE_PARAMETER_SET,
+                                              thread_id, &queue_id);
 #else
-               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_PARAMETER_SET, thread_id, &queue_id);
+               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_PARAMETER_SET, thread_id,
+                                              &queue_id);
 #endif
                if (!sh_css_sp_is_running()) {
                        /* SP is not running. The queues are not valid */
@@ -3828,9 +3854,9 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
                        /* we have to do this per pipeline because */
                        /* the processing is a.o. resolution dependent */
                        err = ia_css_process_zoom_and_motion(params,
-                                       pipeline->stages);
+                                                            pipeline->stages);
                        if (err != IA_CSS_SUCCESS)
-                       return err;
+                               return err;
                }
                /* check if to actually update the parameters for this pipe */
                /* When API change is implemented making good distinction between
@@ -3849,16 +3875,16 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
                                continue;
 
                        process_kernel_parameters(pipeline->pipe_id,
-                                       stage, params,
-                                       isp_pipe_version, raw_bit_depth);
+                                                 stage, params,
+                                                 isp_pipe_version, raw_bit_depth);
 
                        err = sh_css_params_write_to_ddr_internal(
-                                       pipe,
-                                       pipeline->pipe_id,
-                                       params,
-                                       stage,
-                                       cur_map,
-                                       cur_map_size);
+                                 pipe,
+                                 pipeline->pipe_id,
+                                 params,
+                                 stage,
+                                 cur_map,
+                                 cur_map_size);
 
                        if (err != IA_CSS_SUCCESS)
                                break;
@@ -3872,10 +3898,10 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
                /* update isp_params to pipe specific copies */
                if (params->isp_params_changed) {
                        reallocate_buffer(&cur_map->isp_param,
-                                       &cur_map_size->isp_param,
-                                       cur_map_size->isp_param,
-                                       true,
-                                       &err);
+                                         &cur_map_size->isp_param,
+                                         cur_map_size->isp_param,
+                                         true,
+                                         &err);
                        if (err != IA_CSS_SUCCESS)
                                break;
                        sh_css_update_isp_params_to_ddr(params, cur_map->isp_param);
@@ -3883,8 +3909,8 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
 
                /* last make referenced copy */
                err = ref_sh_css_ddr_address_map(
-                               cur_map,
-                               &isp_params_info.mem_map);
+                         cur_map,
+                         &isp_params_info.mem_map);
                if (err != IA_CSS_SUCCESS)
                        break;
 
@@ -3893,7 +3919,7 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
 
                /* Update output frame pointer */
                isp_params_info.output_frame_ptr =
-                               (params->output_frame) ? params->output_frame->data : mmgr_NULL;
+                   (params->output_frame) ? params->output_frame->data : mmgr_NULL;
 
                /* now write the copy to ddr */
                err = write_ia_css_isp_parameter_set_info_to_ddr(&isp_params_info, &cpy);
@@ -3908,9 +3934,9 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
                        free_ia_css_isp_parameter_set_info(cpy);
 #if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
                        IA_CSS_LOG("pfp: FAILED to add config id %d for OF %d to q %d on thread %d",
-                               isp_params_info.isp_parameters_id,
-                               isp_params_info.output_frame_ptr,
-                               queue_id, thread_id);
+                                  isp_params_info.isp_parameters_id,
+                                  isp_params_info.output_frame_ptr,
+                                  queue_id, thread_id);
 #endif
                        break;
                } else {
@@ -3932,15 +3958,15 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
                                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
                        }
                        ia_css_bufq_enqueue_psys_event(
-                                       IA_CSS_PSYS_SW_EVENT_BUFFER_ENQUEUED,
-                                       (uint8_t)thread_id,
-                                       (uint8_t)queue_id,
-                                       0);
+                           IA_CSS_PSYS_SW_EVENT_BUFFER_ENQUEUED,
+                           (uint8_t)thread_id,
+                           (uint8_t)queue_id,
+                           0);
 #if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
                        IA_CSS_LOG("pfp: added config id %d for OF %d to q %d on thread %d",
-                               isp_params_info.isp_parameters_id,
-                               isp_params_info.output_frame_ptr,
-                               queue_id, thread_id);
+                                  isp_params_info.isp_parameters_id,
+                                  isp_params_info.output_frame_ptr,
+                                  queue_id, thread_id);
 #endif
                }
                /* clean-up old copy */
@@ -3956,9 +3982,9 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
        params->morph_table_changed = false;
        params->dz_config_changed = false;
        params->motion_config_changed = false;
-/* ------ deprecated(bz675) : from ------ */
+       /* ------ deprecated(bz675) : from ------ */
        params->shading_settings_changed = false;
-/* ------ deprecated(bz675) : to ------ */
+       /* ------ deprecated(bz675) : to ------ */
 
        memset(&params->config_changed[0], 0, sizeof(params->config_changed));
 
@@ -3968,13 +3994,12 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
 
 static enum ia_css_err
 sh_css_params_write_to_ddr_internal(
-       struct ia_css_pipe *pipe,
-       unsigned int pipe_id,
-       struct ia_css_isp_parameters *params,
-       const struct ia_css_pipeline_stage *stage,
-       struct sh_css_ddr_address_map *ddr_map,
-       struct sh_css_ddr_address_map_size *ddr_map_size)
-{
+    struct ia_css_pipe *pipe,
+    unsigned int pipe_id,
+    struct ia_css_isp_parameters *params,
+    const struct ia_css_pipeline_stage *stage,
+    struct sh_css_ddr_address_map *ddr_map,
+    struct sh_css_ddr_address_map_size *ddr_map_size) {
        enum ia_css_err err;
        const struct ia_css_binary *binary;
 
@@ -3996,12 +4021,13 @@ sh_css_params_write_to_ddr_internal(
 
        stage_num = stage->stage_num;
 
-       if (binary->info->sp.enable.fpnr) {
+       if (binary->info->sp.enable.fpnr)
+       {
                buff_realloced = reallocate_buffer(&ddr_map->fpn_tbl,
-                       &ddr_map_size->fpn_tbl,
-                       (size_t)(FPNTBL_BYTES(binary)),
-                       params->config_changed[IA_CSS_FPN_ID],
-                       &err);
+                                                  &ddr_map_size->fpn_tbl,
+                                                  (size_t)(FPNTBL_BYTES(binary)),
+                                                  params->config_changed[IA_CSS_FPN_ID],
+                                                  &err);
                if (err != IA_CSS_SUCCESS) {
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
                        return err;
@@ -4017,15 +4043,16 @@ sh_css_params_write_to_ddr_internal(
                }
        }
 
-       if (binary->info->sp.enable.sc) {
+       if (binary->info->sp.enable.sc)
+       {
                u32 enable_conv = params->
-                       shading_settings.enable_shading_table_conversion;
+                                 shading_settings.enable_shading_table_conversion;
 
                buff_realloced = reallocate_buffer(&ddr_map->sc_tbl,
-                       &ddr_map_size->sc_tbl,
-                       (size_t)(SCTBL_BYTES(binary)),
-                       params->sc_table_changed,
-                       &err);
+                                                  &ddr_map_size->sc_tbl,
+                                                  (size_t)(SCTBL_BYTES(binary)),
+                                                  params->sc_table_changed,
+                                                  &err);
                if (err != IA_CSS_SUCCESS) {
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
                        return err;
@@ -4055,7 +4082,7 @@ sh_css_params_write_to_ddr_internal(
                                        sh_css_params_shading_id_table_generate(&params->sc_config, binary);
 #else
                                        sh_css_params_shading_id_table_generate(&params->sc_config,
-                                               binary->sctbl_width_per_color, binary->sctbl_height);
+                                                                               binary->sctbl_width_per_color, binary->sctbl_height);
 #endif
                                        if (!params->sc_config) {
                                                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
@@ -4077,17 +4104,17 @@ sh_css_params_write_to_ddr_internal(
                                        params->sc_config = NULL;
                                }
                        } else { /* legacy */
-/* ------ deprecated(bz675) : from ------ */
+                               /* ------ deprecated(bz675) : from ------ */
                                /* shading table is full resolution, reduce */
                                if (params->sc_config) {
                                        ia_css_shading_table_free(params->sc_config);
                                        params->sc_config = NULL;
                                }
                                prepare_shading_table(
-                                       (const struct ia_css_shading_table *)params->sc_table,
-                                       params->sensor_binning,
-                                       &params->sc_config,
-                                       binary, pipe->required_bds_factor);
+                                   (const struct ia_css_shading_table *)params->sc_table,
+                                   params->sensor_binning,
+                                   &params->sc_config,
+                                   binary, pipe->required_bds_factor);
                                if (!params->sc_config) {
                                        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
                                        return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
@@ -4106,7 +4133,7 @@ sh_css_params_write_to_ddr_internal(
                                /* free the shading table */
                                ia_css_shading_table_free(params->sc_config);
                                params->sc_config = NULL;
-/* ------ deprecated(bz675) : to ------ */
+                               /* ------ deprecated(bz675) : to ------ */
                        }
                }
        }
@@ -4114,27 +4141,33 @@ sh_css_params_write_to_ddr_internal(
        /* DPC configuration is made pipe specific to allow flexibility in positioning of the
         * DPC kernel. The code below sets the pipe specific configuration to
         * individual binaries. */
-       if (params->pipe_dpc_config_changed[pipe_id] && binary->info->sp.enable.dpc) {
-               unsigned int size   = stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
+       if (params->pipe_dpc_config_changed[pipe_id] && binary->info->sp.enable.dpc)
+       {
+               unsigned int size   =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
 
-               unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
+               unsigned int offset =
+                   stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
 
                if (size) {
                        ia_css_dp_encode((struct sh_css_isp_dp_params *)
-                               &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
-                               &params->pipe_dp_config[pipe_id], size);
+                                        &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+                                        &params->pipe_dp_config[pipe_id], size);
 #endif
 
 #ifdef ISP2401
                        params->isp_params_changed = true;
-                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+                       params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+                           true;
                }
        }
 #endif
-       if (params->config_changed[IA_CSS_MACC_ID] && binary->info->sp.enable.macc) {
+       if (params->config_changed[IA_CSS_MACC_ID] && binary->info->sp.enable.macc)
+       {
                unsigned int i, j, idx;
                unsigned int idx_map[] = {
-                       0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8};
+                       0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8
+               };
 
                for (i = 0; i < IA_CSS_MACC_NUM_AXES; i++) {
                        idx = 4 * idx_map[i];
@@ -4142,26 +4175,27 @@ sh_css_params_write_to_ddr_internal(
 
                        if (binary->info->sp.pipeline.isp_pipe_version == SH_CSS_ISP_PIPE_VERSION_1) {
                                converted_macc_table.data[idx] =
-                                 (int16_t)sDIGIT_FITTING(params->macc_table.data[j],
-                                 13, SH_CSS_MACC_COEF_SHIFT);
+                                   (int16_t)sDIGIT_FITTING(params->macc_table.data[j],
+                                                           13, SH_CSS_MACC_COEF_SHIFT);
                                converted_macc_table.data[idx + 1] =
-                                 (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 1],
-                                 13, SH_CSS_MACC_COEF_SHIFT);
+                                   (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 1],
+                                                           13, SH_CSS_MACC_COEF_SHIFT);
                                converted_macc_table.data[idx + 2] =
-                                 (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 2],
-                                 13, SH_CSS_MACC_COEF_SHIFT);
+                                   (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 2],
+                                                           13, SH_CSS_MACC_COEF_SHIFT);
                                converted_macc_table.data[idx + 3] =
-                                 (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 3],
-                                 13, SH_CSS_MACC_COEF_SHIFT);
-                       } else if (binary->info->sp.pipeline.isp_pipe_version == SH_CSS_ISP_PIPE_VERSION_2_2) {
+                                   (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 3],
+                                                           13, SH_CSS_MACC_COEF_SHIFT);
+                       } else if (binary->info->sp.pipeline.isp_pipe_version ==
+                                  SH_CSS_ISP_PIPE_VERSION_2_2) {
                                converted_macc_table.data[idx] =
-                                       params->macc_table.data[j];
+                                   params->macc_table.data[j];
                                converted_macc_table.data[idx + 1] =
-                                       params->macc_table.data[j + 1];
+                                   params->macc_table.data[j + 1];
                                converted_macc_table.data[idx + 2] =
-                                       params->macc_table.data[j + 2];
+                                   params->macc_table.data[j + 2];
                                converted_macc_table.data[idx + 3] =
-                                       params->macc_table.data[j + 3];
+                                   params->macc_table.data[j + 3];
                        }
                }
                reallocate_buffer(&ddr_map->macc_tbl,
@@ -4174,21 +4208,22 @@ sh_css_params_write_to_ddr_internal(
                        return err;
                }
                mmgr_store(ddr_map->macc_tbl,
-                                    converted_macc_table.data,
-                                    sizeof(converted_macc_table.data));
+                          converted_macc_table.data,
+                          sizeof(converted_macc_table.data));
        }
 
-       if (binary->info->sp.enable.dvs_6axis) {
+       if (binary->info->sp.enable.dvs_6axis)
+       {
                /* because UV is packed into the Y plane, calc total
                 * YYU size = /2 gives size of UV-only,
                 * total YYU size = UV-only * 3.
                 */
                buff_realloced = reallocate_buffer(
-                               &ddr_map->dvs_6axis_params_y,
-                               &ddr_map_size->dvs_6axis_params_y,
-                               (size_t)((DVS_6AXIS_BYTES(binary) / 2) * 3),
-                               params->pipe_dvs_6axis_config_changed[pipe_id],
-                               &err);
+                                    &ddr_map->dvs_6axis_params_y,
+                                    &ddr_map_size->dvs_6axis_params_y,
+                                    (size_t)((DVS_6AXIS_BYTES(binary) / 2) * 3),
+                                    params->pipe_dvs_6axis_config_changed[pipe_id],
+                                    &err);
                if (err != IA_CSS_SUCCESS) {
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
                        return err;
@@ -4218,162 +4253,166 @@ sh_css_params_write_to_ddr_internal(
                                if (binary->dvs_envelope.width || binary->dvs_envelope.height) {
                                        dvs_offset.width  =
 #endif
-                                               (PIX_SHIFT_FILTER_RUN_IN_X + binary->dvs_envelope.width) / 2;
+                                   (PIX_SHIFT_FILTER_RUN_IN_X + binary->dvs_envelope.width) / 2;
 #ifndef ISP2401
                                dvs_offset.height =
 #else
-                                       dvs_offset.height =
+                               dvs_offset.height =
 #endif
-                                               (PIX_SHIFT_FILTER_RUN_IN_Y + binary->dvs_envelope.height) / 2;
+                                   (PIX_SHIFT_FILTER_RUN_IN_Y + binary->dvs_envelope.height) / 2;
 #ifdef ISP2401
-                               }
+                       }
 #endif
 
-                               params->pipe_dvs_6axis_config[pipe_id] =
-                                               generate_dvs_6axis_table(&binary->out_frame_info[0].res, &dvs_offset);
-                               if (!params->pipe_dvs_6axis_config[pipe_id]) {
-                                       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
-                                       return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-                               }
-                               params->pipe_dvs_6axis_config_changed[pipe_id] = true;
+                       params->pipe_dvs_6axis_config[pipe_id] =
+                           generate_dvs_6axis_table(&binary->out_frame_info[0].res, &dvs_offset);
+                       if (!params->pipe_dvs_6axis_config[pipe_id]) {
+                               IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
+                               return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                        }
-
-                       store_dvs_6axis_config(params->pipe_dvs_6axis_config[pipe_id],
-                               binary,
-                               dvs_in_frame_info,
-                               ddr_map->dvs_6axis_params_y);
-                       params->isp_params_changed = true;
+                       params->pipe_dvs_6axis_config_changed[pipe_id] = true;
                }
+
+               store_dvs_6axis_config(params->pipe_dvs_6axis_config[pipe_id],
+                                      binary,
+                                      dvs_in_frame_info,
+                                      ddr_map->dvs_6axis_params_y);
+               params->isp_params_changed = true;
        }
+}
 
-       if (binary->info->sp.enable.ca_gdc) {
-               unsigned int i;
-               hrt_vaddress *virt_addr_tetra_x[
-                       IA_CSS_MORPH_TABLE_NUM_PLANES];
-               size_t *virt_size_tetra_x[
-                       IA_CSS_MORPH_TABLE_NUM_PLANES];
-               hrt_vaddress *virt_addr_tetra_y[
-                       IA_CSS_MORPH_TABLE_NUM_PLANES];
-               size_t *virt_size_tetra_y[
-                       IA_CSS_MORPH_TABLE_NUM_PLANES];
-
-               virt_addr_tetra_x[0] = &ddr_map->tetra_r_x;
-               virt_addr_tetra_x[1] = &ddr_map->tetra_gr_x;
-               virt_addr_tetra_x[2] = &ddr_map->tetra_gb_x;
-               virt_addr_tetra_x[3] = &ddr_map->tetra_b_x;
-               virt_addr_tetra_x[4] = &ddr_map->tetra_ratb_x;
-               virt_addr_tetra_x[5] = &ddr_map->tetra_batr_x;
-
-               virt_size_tetra_x[0] = &ddr_map_size->tetra_r_x;
-               virt_size_tetra_x[1] = &ddr_map_size->tetra_gr_x;
-               virt_size_tetra_x[2] = &ddr_map_size->tetra_gb_x;
-               virt_size_tetra_x[3] = &ddr_map_size->tetra_b_x;
-               virt_size_tetra_x[4] = &ddr_map_size->tetra_ratb_x;
-               virt_size_tetra_x[5] = &ddr_map_size->tetra_batr_x;
-
-               virt_addr_tetra_y[0] = &ddr_map->tetra_r_y;
-               virt_addr_tetra_y[1] = &ddr_map->tetra_gr_y;
-               virt_addr_tetra_y[2] = &ddr_map->tetra_gb_y;
-               virt_addr_tetra_y[3] = &ddr_map->tetra_b_y;
-               virt_addr_tetra_y[4] = &ddr_map->tetra_ratb_y;
-               virt_addr_tetra_y[5] = &ddr_map->tetra_batr_y;
-
-               virt_size_tetra_y[0] = &ddr_map_size->tetra_r_y;
-               virt_size_tetra_y[1] = &ddr_map_size->tetra_gr_y;
-               virt_size_tetra_y[2] = &ddr_map_size->tetra_gb_y;
-               virt_size_tetra_y[3] = &ddr_map_size->tetra_b_y;
-               virt_size_tetra_y[4] = &ddr_map_size->tetra_ratb_y;
-               virt_size_tetra_y[5] = &ddr_map_size->tetra_batr_y;
-
-               buff_realloced = false;
-               for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
-                       buff_realloced |=
-                                       reallocate_buffer(virt_addr_tetra_x[i],
-                                               virt_size_tetra_x[i],
-                                               (size_t)
-                                                 (MORPH_PLANE_BYTES(binary)),
-                                               params->morph_table_changed,
-                                               &err);
-                       if (err != IA_CSS_SUCCESS) {
-                               IA_CSS_LEAVE_ERR_PRIVATE(err);
-                               return err;
-                       }
-                       buff_realloced |=
-                                       reallocate_buffer(virt_addr_tetra_y[i],
-                                               virt_size_tetra_y[i],
-                                               (size_t)
-                                                 (MORPH_PLANE_BYTES(binary)),
-                                               params->morph_table_changed,
-                                               &err);
+if (binary->info->sp.enable.ca_gdc)
+{
+       unsigned int i;
+       hrt_vaddress *virt_addr_tetra_x[
+        IA_CSS_MORPH_TABLE_NUM_PLANES];
+       size_t *virt_size_tetra_x[
+        IA_CSS_MORPH_TABLE_NUM_PLANES];
+       hrt_vaddress *virt_addr_tetra_y[
+        IA_CSS_MORPH_TABLE_NUM_PLANES];
+       size_t *virt_size_tetra_y[
+        IA_CSS_MORPH_TABLE_NUM_PLANES];
+
+       virt_addr_tetra_x[0] = &ddr_map->tetra_r_x;
+       virt_addr_tetra_x[1] = &ddr_map->tetra_gr_x;
+       virt_addr_tetra_x[2] = &ddr_map->tetra_gb_x;
+       virt_addr_tetra_x[3] = &ddr_map->tetra_b_x;
+       virt_addr_tetra_x[4] = &ddr_map->tetra_ratb_x;
+       virt_addr_tetra_x[5] = &ddr_map->tetra_batr_x;
+
+       virt_size_tetra_x[0] = &ddr_map_size->tetra_r_x;
+       virt_size_tetra_x[1] = &ddr_map_size->tetra_gr_x;
+       virt_size_tetra_x[2] = &ddr_map_size->tetra_gb_x;
+       virt_size_tetra_x[3] = &ddr_map_size->tetra_b_x;
+       virt_size_tetra_x[4] = &ddr_map_size->tetra_ratb_x;
+       virt_size_tetra_x[5] = &ddr_map_size->tetra_batr_x;
+
+       virt_addr_tetra_y[0] = &ddr_map->tetra_r_y;
+       virt_addr_tetra_y[1] = &ddr_map->tetra_gr_y;
+       virt_addr_tetra_y[2] = &ddr_map->tetra_gb_y;
+       virt_addr_tetra_y[3] = &ddr_map->tetra_b_y;
+       virt_addr_tetra_y[4] = &ddr_map->tetra_ratb_y;
+       virt_addr_tetra_y[5] = &ddr_map->tetra_batr_y;
+
+       virt_size_tetra_y[0] = &ddr_map_size->tetra_r_y;
+       virt_size_tetra_y[1] = &ddr_map_size->tetra_gr_y;
+       virt_size_tetra_y[2] = &ddr_map_size->tetra_gb_y;
+       virt_size_tetra_y[3] = &ddr_map_size->tetra_b_y;
+       virt_size_tetra_y[4] = &ddr_map_size->tetra_ratb_y;
+       virt_size_tetra_y[5] = &ddr_map_size->tetra_batr_y;
+
+       buff_realloced = false;
+       for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
+               buff_realloced |=
+                   reallocate_buffer(virt_addr_tetra_x[i],
+                                     virt_size_tetra_x[i],
+                                     (size_t)
+                                     (MORPH_PLANE_BYTES(binary)),
+                                     params->morph_table_changed,
+                                     &err);
+               if (err != IA_CSS_SUCCESS) {
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
+               buff_realloced |=
+                   reallocate_buffer(virt_addr_tetra_y[i],
+                                     virt_size_tetra_y[i],
+                                     (size_t)
+                                     (MORPH_PLANE_BYTES(binary)),
+                                     params->morph_table_changed,
+                                     &err);
+               if (err != IA_CSS_SUCCESS) {
+                       IA_CSS_LEAVE_ERR_PRIVATE(err);
+                       return err;
+               }
+       }
+       if (params->morph_table_changed || buff_realloced) {
+               const struct ia_css_morph_table *table = params->morph_table;
+               struct ia_css_morph_table *id_table = NULL;
+
+               if ((table) &&
+                   (table->width < binary->morph_tbl_width ||
+                    table->height < binary->morph_tbl_height)) {
+                       table = NULL;
+               }
+               if (!table) {
+                       err = sh_css_params_default_morph_table(&id_table,
+                                                               binary);
                        if (err != IA_CSS_SUCCESS) {
                                IA_CSS_LEAVE_ERR_PRIVATE(err);
                                return err;
                        }
+                       table = id_table;
                }
-               if (params->morph_table_changed || buff_realloced) {
-                       const struct ia_css_morph_table *table = params->morph_table;
-                       struct ia_css_morph_table *id_table = NULL;
-
-                       if ((table) &&
-                           (table->width < binary->morph_tbl_width ||
-                            table->height < binary->morph_tbl_height)) {
-                               table = NULL;
-                       }
-                       if (!table) {
-                               err = sh_css_params_default_morph_table(&id_table,
-                                                                 binary);
-                               if (err != IA_CSS_SUCCESS) {
-                                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                                       return err;
-                               }
-                               table = id_table;
-                       }
 
-                       for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
-                               store_morph_plane(table->coordinates_x[i],
-                                       table->width,
-                                       table->height,
-                                       *virt_addr_tetra_x[i],
-                                       binary->morph_tbl_aligned_width);
-                               store_morph_plane(table->coordinates_y[i],
-                                       table->width,
-                                       table->height,
-                                       *virt_addr_tetra_y[i],
-                                       binary->morph_tbl_aligned_width);
-                       }
-                       if (id_table)
-                               ia_css_morph_table_free(id_table);
+               for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
+                       store_morph_plane(table->coordinates_x[i],
+                                         table->width,
+                                         table->height,
+                                         *virt_addr_tetra_x[i],
+                                         binary->morph_tbl_aligned_width);
+                       store_morph_plane(table->coordinates_y[i],
+                                         table->width,
+                                         table->height,
+                                         *virt_addr_tetra_y[i],
+                                         binary->morph_tbl_aligned_width);
                }
+               if (id_table)
+                       ia_css_morph_table_free(id_table);
        }
+}
 
-       /* After special cases like SC, FPN since they may change parameters */
-       for (mem = 0; mem < N_IA_CSS_MEMORIES; mem++) {
-               const struct ia_css_isp_data *isp_data =
-                       ia_css_isp_param_get_isp_mem_init(&binary->info->sp.mem_initializers, IA_CSS_PARAM_CLASS_PARAM, mem);
-               size_t size = isp_data->size;
-
-               if (!size) continue;
-               buff_realloced = reallocate_buffer(&ddr_map->isp_mem_param[stage_num][mem],
-                       &ddr_map_size->isp_mem_param[stage_num][mem],
-                       size,
-                       params->isp_mem_params_changed[pipe_id][stage_num][mem],
-                       &err);
-               if (err != IA_CSS_SUCCESS) {
-                       IA_CSS_LEAVE_ERR_PRIVATE(err);
-                       return err;
-               }
-               if (params->isp_mem_params_changed[pipe_id][stage_num][mem] || buff_realloced) {
-                       sh_css_update_isp_mem_params_to_ddr(binary,
-                               ddr_map->isp_mem_param[stage_num][mem],
-                               ddr_map_size->isp_mem_param[stage_num][mem], mem);
-               }
+/* After special cases like SC, FPN since they may change parameters */
+for (mem = 0; mem < N_IA_CSS_MEMORIES; mem++)
+{
+       const struct ia_css_isp_data *isp_data =
+           ia_css_isp_param_get_isp_mem_init(&binary->info->sp.mem_initializers,
+                                             IA_CSS_PARAM_CLASS_PARAM, mem);
+       size_t size = isp_data->size;
+
+       if (!size) continue;
+       buff_realloced = reallocate_buffer(&ddr_map->isp_mem_param[stage_num][mem],
+                                          &ddr_map_size->isp_mem_param[stage_num][mem],
+                                          size,
+                                          params->isp_mem_params_changed[pipe_id][stage_num][mem],
+                                          &err);
+       if (err != IA_CSS_SUCCESS) {
+               IA_CSS_LEAVE_ERR_PRIVATE(err);
+               return err;
+       }
+       if (params->isp_mem_params_changed[pipe_id][stage_num][mem] || buff_realloced) {
+               sh_css_update_isp_mem_params_to_ddr(binary,
+                                                   ddr_map->isp_mem_param[stage_num][mem],
+                                                   ddr_map_size->isp_mem_param[stage_num][mem], mem);
        }
+}
 
-       IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
-       return IA_CSS_SUCCESS;
+IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+return IA_CSS_SUCCESS;
 }
 
-const struct ia_css_fpn_table *ia_css_get_fpn_table(struct ia_css_stream *stream)
+const struct ia_css_fpn_table *ia_css_get_fpn_table(struct ia_css_stream
+       *stream)
 {
        struct ia_css_isp_parameters *params;
 
@@ -4385,7 +4424,8 @@ const struct ia_css_fpn_table *ia_css_get_fpn_table(struct ia_css_stream *stream
        return &params->fpn_config;
 }
 
-struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream *stream)
+struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream
+       *stream)
 {
        struct ia_css_shading_table *table = NULL;
        struct ia_css_isp_parameters *params;
@@ -4403,7 +4443,7 @@ struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream *stre
                        table = (struct ia_css_shading_table *)params->sc_table;
                } else {
                        const struct ia_css_binary *binary
-                               = ia_css_stream_get_shading_correction_binary(stream);
+                           = ia_css_stream_get_shading_correction_binary(stream);
                        if (binary) {
                                /* generate the identical shading table */
                                if (params->sc_config) {
@@ -4415,7 +4455,7 @@ struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream *stre
 
 #else
                                sh_css_params_shading_id_table_generate(&params->sc_config,
-                                       binary->sctbl_width_per_color, binary->sctbl_height);
+                                                                       binary->sctbl_width_per_color, binary->sctbl_height);
 #endif
                                table = params->sc_config;
                                /* The sc_config will be freed in the
@@ -4423,9 +4463,9 @@ struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream *stre
                        }
                }
        } else {
-/* ------ deprecated(bz675) : from ------ */
+               /* ------ deprecated(bz675) : from ------ */
                const struct ia_css_binary *binary
-                       = ia_css_stream_get_shading_correction_binary(stream);
+                   = ia_css_stream_get_shading_correction_binary(stream);
                struct ia_css_pipe *pipe;
 
                /**********************************************************************/
@@ -4446,16 +4486,16 @@ struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream *stre
                                params->sc_config = NULL;
                        }
                        prepare_shading_table(
-                               (const struct ia_css_shading_table *)params->sc_table,
-                               params->sensor_binning,
-                               &params->sc_config,
-                               binary, pipe->required_bds_factor);
+                           (const struct ia_css_shading_table *)params->sc_table,
+                           params->sensor_binning,
+                           &params->sc_config,
+                           binary, pipe->required_bds_factor);
 
                        table = params->sc_config;
                        /* The sc_config will be freed in the
                         * ia_css_stream_isp_parameters_uninit function. */
                }
-/* ------ deprecated(bz675) : to ------ */
+               /* ------ deprecated(bz675) : to ------ */
        }
 
        IA_CSS_LEAVE("table=%p", table);
@@ -4467,36 +4507,36 @@ hrt_vaddress sh_css_store_sp_group_to_ddr(void)
 {
        IA_CSS_ENTER_LEAVE_PRIVATE("void");
        mmgr_store(xmem_sp_group_ptrs,
-                            &sh_css_sp_group,
-                            sizeof(struct sh_css_sp_group));
+                  &sh_css_sp_group,
+                  sizeof(struct sh_css_sp_group));
        return xmem_sp_group_ptrs;
 }
 
 hrt_vaddress sh_css_store_sp_stage_to_ddr(
-       unsigned int pipe,
-       unsigned int stage)
+    unsigned int pipe,
+    unsigned int stage)
 {
        IA_CSS_ENTER_LEAVE_PRIVATE("void");
        mmgr_store(xmem_sp_stage_ptrs[pipe][stage],
-                            &sh_css_sp_stage,
-                            sizeof(struct sh_css_sp_stage));
+                  &sh_css_sp_stage,
+                  sizeof(struct sh_css_sp_stage));
        return xmem_sp_stage_ptrs[pipe][stage];
 }
 
 hrt_vaddress sh_css_store_isp_stage_to_ddr(
-       unsigned int pipe,
-       unsigned int stage)
+    unsigned int pipe,
+    unsigned int stage)
 {
        IA_CSS_ENTER_LEAVE_PRIVATE("void");
        mmgr_store(xmem_isp_stage_ptrs[pipe][stage],
-                            &sh_css_isp_stage,
-                            sizeof(struct sh_css_isp_stage));
+                  &sh_css_isp_stage,
+                  sizeof(struct sh_css_isp_stage));
        return xmem_isp_stage_ptrs[pipe][stage];
 }
 
 static enum ia_css_err ref_sh_css_ddr_address_map(
-       struct sh_css_ddr_address_map *map,
-       struct sh_css_ddr_address_map *out)
+    struct sh_css_ddr_address_map *map,
+    struct sh_css_ddr_address_map *out)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
        unsigned int i;
@@ -4522,11 +4562,12 @@ static enum ia_css_err ref_sh_css_ddr_address_map(
 
        /* copy map using size info */
        for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size) /
-                                               sizeof(size_t)); i++) {
+                        sizeof(size_t)); i++) {
                if (in_addrs.addrs[i] == mmgr_NULL)
                        to_addrs.addrs[i] = mmgr_NULL;
                else
-                       to_addrs.addrs[i] = ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER, in_addrs.addrs[i]);
+                       to_addrs.addrs[i] = ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER,
+                                           in_addrs.addrs[i]);
        }
 
        IA_CSS_LEAVE_ERR_PRIVATE(err);
@@ -4534,8 +4575,8 @@ static enum ia_css_err ref_sh_css_ddr_address_map(
 }
 
 static enum ia_css_err write_ia_css_isp_parameter_set_info_to_ddr(
-       struct ia_css_isp_parameter_set_info *me,
-       hrt_vaddress *out)
+    struct ia_css_isp_parameter_set_info *me,
+    hrt_vaddress *out)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
        bool succ;
@@ -4546,11 +4587,11 @@ static enum ia_css_err write_ia_css_isp_parameter_set_info_to_ddr(
        assert(out);
 
        *out = ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_SET_POOL, mmgr_malloc(
-                               sizeof(struct ia_css_isp_parameter_set_info)));
+                                            sizeof(struct ia_css_isp_parameter_set_info)));
        succ = (*out != mmgr_NULL);
        if (succ)
                mmgr_store(*out,
-                       me, sizeof(struct ia_css_isp_parameter_set_info));
+                          me, sizeof(struct ia_css_isp_parameter_set_info));
        else
                err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 
@@ -4560,18 +4601,19 @@ static enum ia_css_err write_ia_css_isp_parameter_set_info_to_ddr(
 
 static enum ia_css_err
 free_ia_css_isp_parameter_set_info(
-       hrt_vaddress ptr)
-{
+    hrt_vaddress ptr) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_isp_parameter_set_info isp_params_info;
        unsigned int i;
-       hrt_vaddress *addrs = (hrt_vaddress *)&isp_params_info.mem_map;
+       hrt_vaddress *addrs = (hrt_vaddress *) &isp_params_info.mem_map;
 
        IA_CSS_ENTER_PRIVATE("ptr = %u", ptr);
 
        /* sanity check - ptr must be valid */
-       if (!ia_css_refcount_is_valid(ptr)) {
-               IA_CSS_ERROR("%s: IA_CSS_REFCOUNT_PARAM_SET_POOL(0x%x) invalid arg", __func__, ptr);
+       if (!ia_css_refcount_is_valid(ptr))
+       {
+               IA_CSS_ERROR("%s: IA_CSS_REFCOUNT_PARAM_SET_POOL(0x%x) invalid arg", __func__,
+                            ptr);
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
                IA_CSS_LEAVE_ERR_PRIVATE(err);
                return err;
@@ -4580,7 +4622,8 @@ free_ia_css_isp_parameter_set_info(
        mmgr_load(ptr, &isp_params_info.mem_map, sizeof(struct sh_css_ddr_address_map));
        /* copy map using size info */
        for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size) /
-                                               sizeof(size_t)); i++) {
+                        sizeof(size_t)); i++)
+       {
                if (addrs[i] == mmgr_NULL)
                        continue;
 
@@ -4592,7 +4635,8 @@ free_ia_css_isp_parameter_set_info(
                        ia_css_refcount_decrement(IA_CSS_REFCOUNT_PARAM_BUFFER, addrs[i]);
                } else {
 #endif
-                       IA_CSS_ERROR("%s: IA_CSS_REFCOUNT_PARAM_BUFFER(0x%x) invalid arg", __func__, ptr);
+                       IA_CSS_ERROR("%s: IA_CSS_REFCOUNT_PARAM_BUFFER(0x%x) invalid arg", __func__,
+                                    ptr);
                        err = IA_CSS_ERR_INVALID_ARGUMENTS;
                        continue;
                }
@@ -4648,16 +4692,16 @@ sh_css_invalidate_params(struct ia_css_stream *stream)
 
 void
 sh_css_update_uds_and_crop_info(
-       const struct ia_css_binary_info *info,
-       const struct ia_css_frame_info *in_frame_info,
-       const struct ia_css_frame_info *out_frame_info,
-       const struct ia_css_resolution *dvs_env,
-       const struct ia_css_dz_config *zoom,
-       const struct ia_css_vector *motion_vector,
-       struct sh_css_uds_info *uds,            /* out */
-       struct sh_css_crop_pos *sp_out_crop_pos,        /* out */
-
-       bool enable_zoom)
+    const struct ia_css_binary_info *info,
+    const struct ia_css_frame_info *in_frame_info,
+    const struct ia_css_frame_info *out_frame_info,
+    const struct ia_css_resolution *dvs_env,
+    const struct ia_css_dz_config *zoom,
+    const struct ia_css_vector *motion_vector,
+    struct sh_css_uds_info *uds,               /* out */
+    struct sh_css_crop_pos *sp_out_crop_pos,   /* out */
+
+    bool enable_zoom)
 {
        IA_CSS_ENTER_PRIVATE("void");
 
@@ -4692,9 +4736,9 @@ sh_css_update_uds_and_crop_info(
                         * initialization.
                         */
                        env_width  = dvs_env->width -
-                                       SH_CSS_MIN_DVS_ENVELOPE;
+                                    SH_CSS_MIN_DVS_ENVELOPE;
                        env_height = dvs_env->height -
-                                       SH_CSS_MIN_DVS_ENVELOPE;
+                                    SH_CSS_MIN_DVS_ENVELOPE;
                        half_env_x = env_width / 2;
                        half_env_y = env_height / 2;
                        /**
@@ -4704,21 +4748,21 @@ sh_css_update_uds_and_crop_info(
                         */
                        if (upscale_x) {
                                uds_xc = (in_frame_info->res.width
-                                       + env_width
-                                       + SH_CSS_MIN_DVS_ENVELOPE) / 2;
+                                         + env_width
+                                         + SH_CSS_MIN_DVS_ENVELOPE) / 2;
                        } else {
                                uds_xc = (out_frame_info->res.width
-                                                       + env_width) / 2
-                                       + SH_CSS_MIN_DVS_ENVELOPE;
+                                         + env_width) / 2
+                                        + SH_CSS_MIN_DVS_ENVELOPE;
                        }
                        if (upscale_y) {
                                uds_yc = (in_frame_info->res.height
-                                       + env_height
-                                       + SH_CSS_MIN_DVS_ENVELOPE) / 2;
+                                         + env_height
+                                         + SH_CSS_MIN_DVS_ENVELOPE) / 2;
                        } else {
                                uds_yc = (out_frame_info->res.height
-                                                       + env_height) / 2
-                                       + SH_CSS_MIN_DVS_ENVELOPE;
+                                         + env_height) / 2
+                                        + SH_CSS_MIN_DVS_ENVELOPE;
                        }
                        /* clip the motion vector to +/- half the envelope */
                        motion_x = clamp(motion_x, -half_env_x, half_env_x);
@@ -4750,17 +4794,17 @@ sh_css_update_uds_and_crop_info(
                        /* video nodz: here we can only crop. We make sure we
                           crop at least the first 8x8 pixels away. */
                        env_width  = dvs_env->width -
-                                       SH_CSS_MIN_DVS_ENVELOPE;
+                                    SH_CSS_MIN_DVS_ENVELOPE;
                        env_height = dvs_env->height -
-                                       SH_CSS_MIN_DVS_ENVELOPE;
+                                    SH_CSS_MIN_DVS_ENVELOPE;
                        half_env_x = env_width / 2;
                        half_env_y = env_height / 2;
                        motion_x = clamp(motion_x, -half_env_x, half_env_x);
                        motion_y = clamp(motion_y, -half_env_y, half_env_y);
                        crop_x = SH_CSS_MIN_DVS_ENVELOPE
-                                               + half_env_x + motion_x;
+                                + half_env_x + motion_x;
                        crop_y = SH_CSS_MIN_DVS_ENVELOPE
-                                               + half_env_y + motion_y;
+                                + half_env_y + motion_y;
                }
 
                /* Must enforce that the crop position is even */
@@ -4785,17 +4829,16 @@ sh_css_update_uds_and_crop_info(
 
 static enum ia_css_err
 sh_css_update_uds_and_crop_info_based_on_zoom_region(
-       const struct ia_css_binary_info *info,
-       const struct ia_css_frame_info *in_frame_info,
-       const struct ia_css_frame_info *out_frame_info,
-       const struct ia_css_resolution *dvs_env,
-       const struct ia_css_dz_config *zoom,
-       const struct ia_css_vector *motion_vector,
-       struct sh_css_uds_info *uds,            /* out */
-       struct sh_css_crop_pos *sp_out_crop_pos,        /* out */
-       struct ia_css_resolution pipe_in_res,
-       bool enable_zoom)
-{
+    const struct ia_css_binary_info *info,
+    const struct ia_css_frame_info *in_frame_info,
+    const struct ia_css_frame_info *out_frame_info,
+    const struct ia_css_resolution *dvs_env,
+    const struct ia_css_dz_config *zoom,
+    const struct ia_css_vector *motion_vector,
+    struct sh_css_uds_info *uds,               /* out */
+    struct sh_css_crop_pos *sp_out_crop_pos,   /* out */
+    struct ia_css_resolution pipe_in_res,
+    bool enable_zoom) {
        unsigned int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
        enum ia_css_err err = IA_CSS_SUCCESS;
        /* Note:
@@ -4824,18 +4867,21 @@ sh_css_update_uds_and_crop_info_based_on_zoom_region(
        y1 = zoom->zoom_region.resolution.height + y0;
 
        if ((x0 > x1) || (y0 > y1) || (x1 > pipe_in_res.width) || (y1 > pipe_in_res.height))
-       return IA_CSS_ERR_INVALID_ARGUMENTS;
+               return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       if (!enable_zoom) {
-           uds->curr_dx = HRT_GDC_N;
-           uds->curr_dy = HRT_GDC_N;
+       if (!enable_zoom)
+       {
+               uds->curr_dx = HRT_GDC_N;
+               uds->curr_dy = HRT_GDC_N;
        }
 
-       if (info->enable.dvs_envelope) {
+       if (info->enable.dvs_envelope)
+       {
                /* Zoom region is only supported by the UDS module on ISP
                 * 2 and higher. It is not supported in video mode on ISP 1 */
                return IA_CSS_ERR_INVALID_ARGUMENTS;
-       } else {
+       } else
+       {
                if (enable_zoom) {
                        /* A. Calculate dx/dy based on crop region using in_frame_info
                        * Scale the crop region if in_frame_info to the stage is not same as
@@ -4849,9 +4895,9 @@ sh_css_update_uds_and_crop_info_based_on_zoom_region(
                                y1 = (y1 * in_frame_info->res.height) / (pipe_in_res.height);
                        }
                        uds->curr_dx =
-                               ((x1 - x0 - filter_envelope) * HRT_GDC_N) / in_frame_info->res.width;
+                           ((x1 - x0 - filter_envelope) * HRT_GDC_N) / in_frame_info->res.width;
                        uds->curr_dy =
-                               ((y1 - y0 - filter_envelope) * HRT_GDC_N) / in_frame_info->res.height;
+                           ((y1 - y0 - filter_envelope) * HRT_GDC_N) / in_frame_info->res.height;
 
                        /* B. Calculate xc/yc based on crop region */
                        uds->xc = (uint16_t)x0 + (((x1) - (x0)) / 2);
@@ -4861,10 +4907,11 @@ sh_css_update_uds_and_crop_info_based_on_zoom_region(
                        uds->yc = (uint16_t)in_frame_info->res.height / 2;
                }
 
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "uds->curr_dx=%d, uds->xc=%d, uds->yc=%d\n",
-                               uds->curr_dx, uds->xc, uds->yc);
+               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+                                   "uds->curr_dx=%d, uds->xc=%d, uds->yc=%d\n",
+                                   uds->curr_dx, uds->xc, uds->yc);
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "x0=%d, y0=%d, x1=%d, y1=%d\n",
-                               x0, y0, x1, y1);
+                                   x0, y0, x1, y1);
                sp_out_crop_pos->x = (uint16_t)info->pipeline.left_cropping;
                sp_out_crop_pos->y = (uint16_t)info->pipeline.top_cropping;
        }
@@ -4893,7 +4940,8 @@ ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
                goto err;
 #if !defined(HAS_NO_HMEM)
        /* No weighted histogram, no structure, treat the histogram data as a byte dump in a byte array */
-       me->rgby_data = (struct ia_css_3a_rgby_output *)sh_css_malloc(sizeof_hmem(HMEM0_ID));
+       me->rgby_data = (struct ia_css_3a_rgby_output *)sh_css_malloc(sizeof_hmem(
+                           HMEM0_ID));
 #else
        me->rgby_data = NULL;
 #endif
@@ -4931,12 +4979,12 @@ ia_css_dvs_statistics_allocate(const struct ia_css_dvs_grid_info *grid)
 
        me->grid = *grid;
        me->hor_proj = sh_css_malloc(grid->height * IA_CSS_DVS_NUM_COEF_TYPES *
-                                       sizeof(*me->hor_proj));
+                                    sizeof(*me->hor_proj));
        if (!me->hor_proj)
                goto err;
 
        me->ver_proj = sh_css_malloc(grid->width * IA_CSS_DVS_NUM_COEF_TYPES *
-                                       sizeof(*me->ver_proj));
+                                    sizeof(*me->ver_proj));
        if (!me->ver_proj)
                goto err;
 
@@ -4971,14 +5019,14 @@ ia_css_dvs_coefficients_allocate(const struct ia_css_dvs_grid_info *grid)
        me->grid = *grid;
 
        me->hor_coefs = sh_css_malloc(grid->num_hor_coefs *
-                               IA_CSS_DVS_NUM_COEF_TYPES *
-                               sizeof(*me->hor_coefs));
+                                     IA_CSS_DVS_NUM_COEF_TYPES *
+                                     sizeof(*me->hor_coefs));
        if (!me->hor_coefs)
                goto err;
 
        me->ver_coefs = sh_css_malloc(grid->num_ver_coefs *
-                               IA_CSS_DVS_NUM_COEF_TYPES *
-                               sizeof(*me->ver_coefs));
+                                     IA_CSS_DVS_NUM_COEF_TYPES *
+                                     sizeof(*me->ver_coefs));
        if (!me->ver_coefs)
                goto err;
 
@@ -5013,42 +5061,42 @@ ia_css_dvs2_statistics_allocate(const struct ia_css_dvs_grid_info *grid)
        me->grid = *grid;
 
        me->hor_prod.odd_real = sh_css_malloc(grid->aligned_width *
-               grid->aligned_height * sizeof(*me->hor_prod.odd_real));
+                                             grid->aligned_height * sizeof(*me->hor_prod.odd_real));
        if (!me->hor_prod.odd_real)
                goto err;
 
        me->hor_prod.odd_imag = sh_css_malloc(grid->aligned_width *
-               grid->aligned_height * sizeof(*me->hor_prod.odd_imag));
+                                             grid->aligned_height * sizeof(*me->hor_prod.odd_imag));
        if (!me->hor_prod.odd_imag)
                goto err;
 
        me->hor_prod.even_real = sh_css_malloc(grid->aligned_width *
-               grid->aligned_height * sizeof(*me->hor_prod.even_real));
+                                              grid->aligned_height * sizeof(*me->hor_prod.even_real));
        if (!me->hor_prod.even_real)
                goto err;
 
        me->hor_prod.even_imag = sh_css_malloc(grid->aligned_width *
-               grid->aligned_height * sizeof(*me->hor_prod.even_imag));
+                                              grid->aligned_height * sizeof(*me->hor_prod.even_imag));
        if (!me->hor_prod.even_imag)
                goto err;
 
        me->ver_prod.odd_real = sh_css_malloc(grid->aligned_width *
-               grid->aligned_height * sizeof(*me->ver_prod.odd_real));
+                                             grid->aligned_height * sizeof(*me->ver_prod.odd_real));
        if (!me->ver_prod.odd_real)
                goto err;
 
        me->ver_prod.odd_imag = sh_css_malloc(grid->aligned_width *
-               grid->aligned_height * sizeof(*me->ver_prod.odd_imag));
+                                             grid->aligned_height * sizeof(*me->ver_prod.odd_imag));
        if (!me->ver_prod.odd_imag)
                goto err;
 
        me->ver_prod.even_real = sh_css_malloc(grid->aligned_width *
-               grid->aligned_height * sizeof(*me->ver_prod.even_real));
+                                              grid->aligned_height * sizeof(*me->ver_prod.even_real));
        if (!me->ver_prod.even_real)
                goto err;
 
        me->ver_prod.even_imag = sh_css_malloc(grid->aligned_width *
-               grid->aligned_height * sizeof(*me->ver_prod.even_imag));
+                                              grid->aligned_height * sizeof(*me->ver_prod.even_imag));
        if (!me->ver_prod.even_imag)
                goto err;
 
@@ -5089,42 +5137,42 @@ ia_css_dvs2_coefficients_allocate(const struct ia_css_dvs_grid_info *grid)
        me->grid = *grid;
 
        me->hor_coefs.odd_real = sh_css_malloc(grid->num_hor_coefs *
-               sizeof(*me->hor_coefs.odd_real));
+                                              sizeof(*me->hor_coefs.odd_real));
        if (!me->hor_coefs.odd_real)
                goto err;
 
        me->hor_coefs.odd_imag = sh_css_malloc(grid->num_hor_coefs *
-               sizeof(*me->hor_coefs.odd_imag));
+                                              sizeof(*me->hor_coefs.odd_imag));
        if (!me->hor_coefs.odd_imag)
                goto err;
 
        me->hor_coefs.even_real = sh_css_malloc(grid->num_hor_coefs *
-               sizeof(*me->hor_coefs.even_real));
+                                               sizeof(*me->hor_coefs.even_real));
        if (!me->hor_coefs.even_real)
                goto err;
 
        me->hor_coefs.even_imag = sh_css_malloc(grid->num_hor_coefs *
-               sizeof(*me->hor_coefs.even_imag));
+                                               sizeof(*me->hor_coefs.even_imag));
        if (!me->hor_coefs.even_imag)
                goto err;
 
        me->ver_coefs.odd_real = sh_css_malloc(grid->num_ver_coefs *
-               sizeof(*me->ver_coefs.odd_real));
+                                              sizeof(*me->ver_coefs.odd_real));
        if (!me->ver_coefs.odd_real)
                goto err;
 
        me->ver_coefs.odd_imag = sh_css_malloc(grid->num_ver_coefs *
-               sizeof(*me->ver_coefs.odd_imag));
+                                              sizeof(*me->ver_coefs.odd_imag));
        if (!me->ver_coefs.odd_imag)
                goto err;
 
        me->ver_coefs.even_real = sh_css_malloc(grid->num_ver_coefs *
-               sizeof(*me->ver_coefs.even_real));
+                                               sizeof(*me->ver_coefs.even_real));
        if (!me->ver_coefs.even_real)
                goto err;
 
        me->ver_coefs.even_imag = sh_css_malloc(grid->num_ver_coefs *
-               sizeof(*me->ver_coefs.even_imag));
+                                               sizeof(*me->ver_coefs.even_imag));
        if (!me->ver_coefs.even_imag)
                goto err;
 
@@ -5165,33 +5213,43 @@ ia_css_dvs2_6axis_config_allocate(const struct ia_css_stream *stream)
        params = stream->isp_params_configs;
 
        /* Backward compatibility by default consider pipe as Video*/
-       if (!params || (params && !params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO])) {
+       if (!params || (params &&
+                       !params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO])) {
                goto err;
        }
 
-       dvs_config = (struct ia_css_dvs_6axis_config *)sh_css_calloc(1, sizeof(struct ia_css_dvs_6axis_config));
+       dvs_config = (struct ia_css_dvs_6axis_config *)sh_css_calloc(1,
+                    sizeof(struct ia_css_dvs_6axis_config));
        if (!dvs_config)
                goto err;
 
-       dvs_config->width_y = width_y = params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->width_y;
-       dvs_config->height_y = height_y = params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->height_y;
-       dvs_config->width_uv = width_uv = params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->width_uv;
-       dvs_config->height_uv = height_uv = params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->height_uv;
+       dvs_config->width_y = width_y =
+                                 params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->width_y;
+       dvs_config->height_y = height_y =
+                                  params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->height_y;
+       dvs_config->width_uv = width_uv =
+                                  params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->width_uv;
+       dvs_config->height_uv = height_uv =
+                                   params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->height_uv;
        IA_CSS_LOG("table Y: W %d H %d", width_y, height_y);
        IA_CSS_LOG("table UV: W %d H %d", width_uv, height_uv);
-       dvs_config->xcoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(uint32_t));
+       dvs_config->xcoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(
+                                   uint32_t));
        if (!dvs_config->xcoords_y)
                goto err;
 
-       dvs_config->ycoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(uint32_t));
+       dvs_config->ycoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(
+                                   uint32_t));
        if (!dvs_config->ycoords_y)
                goto err;
 
-       dvs_config->xcoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv * sizeof(uint32_t));
+       dvs_config->xcoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv *
+                                sizeof(uint32_t));
        if (!dvs_config->xcoords_uv)
                goto err;
 
-       dvs_config->ycoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv * sizeof(uint32_t));
+       dvs_config->ycoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv *
+                                sizeof(uint32_t));
        if (!dvs_config->ycoords_uv)
                goto err;
 
@@ -5233,7 +5291,8 @@ ia_css_en_dz_capt_pipe(struct ia_css_stream *stream, bool enable)
                pipe_id = pipeline->pipe_id;
 
                if (pipe_id == IA_CSS_PIPE_ID_CAPTURE) {
-                       err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP, &stage);
+                       err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP,
+                                                       &stage);
                        if (err == IA_CSS_SUCCESS)
                                stage->enable_zoom = enable;
                        break;
index 7a37d728563656a1974bfa6d34c51dee63232724..96d503967fd1a3466bfaf698b3f78d8950b3b0a5 100644 (file)
@@ -82,7 +82,7 @@ struct ia_css_isp_parameters {
        struct ia_css_anr_config    anr_config;
        struct ia_css_ce_config     ce_config;
        struct ia_css_formats_config     formats_config;
-/* ---- deprecated: replaced with pipe_dvs_6axis_config---- */
+       /* ---- deprecated: replaced with pipe_dvs_6axis_config---- */
        struct ia_css_dvs_6axis_config  *dvs_6axis_config;
        struct ia_css_ecd_config    ecd_config;
        struct ia_css_ynr_config    ynr_config;
@@ -104,16 +104,16 @@ struct ia_css_isp_parameters {
        struct ia_css_crop_config   crop_config;
        struct ia_css_output_config output_config;
        struct ia_css_dvs_6axis_config  *pipe_dvs_6axis_config[IA_CSS_PIPE_ID_NUM];
-/* ------ deprecated(bz675) : from ------ */
+       /* ------ deprecated(bz675) : from ------ */
        struct ia_css_shading_settings shading_settings;
-/* ------ deprecated(bz675) : to ------ */
+       /* ------ deprecated(bz675) : to ------ */
        struct ia_css_dvs_coefficients  dvs_coefs;
        struct ia_css_dvs2_coefficients dvs2_coefs;
 
        bool isp_params_changed;
 
        bool isp_mem_params_changed
-               [IA_CSS_PIPE_ID_NUM][SH_CSS_MAX_STAGES][IA_CSS_NUM_MEMORIES];
+       [IA_CSS_PIPE_ID_NUM][SH_CSS_MAX_STAGES][IA_CSS_NUM_MEMORIES];
        bool dz_config_changed;
        bool motion_config_changed;
        bool dis_coef_table_changed;
@@ -123,16 +123,16 @@ struct ia_css_isp_parameters {
        bool sc_table_dirty;
        unsigned int sc_table_last_pipe_num;
        bool anr_thres_changed;
-/* ---- deprecated: replaced with pipe_dvs_6axis_config_changed ---- */
+       /* ---- deprecated: replaced with pipe_dvs_6axis_config_changed ---- */
        bool dvs_6axis_config_changed;
        /* ------ pipe specific DPC configuration ------ */
        /* Please note that this implementation is a temporary solution and
         * should be replaced by CSS per pipe configuration when the support
         * is ready (HSD 1303967698) */
        bool pipe_dpc_config_changed[IA_CSS_PIPE_ID_NUM];
-/* ------ deprecated(bz675) : from ------ */
+       /* ------ deprecated(bz675) : from ------ */
        bool shading_settings_changed;
-/* ------ deprecated(bz675) : to ------ */
+       /* ------ deprecated(bz675) : to ------ */
        bool pipe_dvs_6axis_config_changed[IA_CSS_PIPE_ID_NUM];
 
        bool config_changed[IA_CSS_NUM_PARAMETER_IDS];
@@ -143,25 +143,26 @@ struct ia_css_isp_parameters {
        struct sh_css_ddr_address_map_size pipe_ddr_ptrs_size[IA_CSS_PIPE_ID_NUM];
        struct sh_css_ddr_address_map ddr_ptrs;
        struct sh_css_ddr_address_map_size ddr_ptrs_size;
-       struct ia_css_frame *output_frame; /** Output frame the config is to be applied to (optional) */
+       struct ia_css_frame
+               *output_frame; /** Output frame the config is to be applied to (optional) */
        u32 isp_parameters_id; /** Unique ID to track which config was actually applied to a particular frame */
 };
 
 void
 ia_css_params_store_ia_css_host_data(
-       hrt_vaddress ddr_addr,
-       struct ia_css_host_data *data);
+    hrt_vaddress ddr_addr,
+    struct ia_css_host_data *data);
 
 enum ia_css_err
 ia_css_params_store_sctbl(
-           const struct ia_css_pipeline_stage *stage,
-           hrt_vaddress ddr_addr,
-           const struct ia_css_shading_table *shading_table);
+    const struct ia_css_pipeline_stage *stage,
+    hrt_vaddress ddr_addr,
+    const struct ia_css_shading_table *shading_table);
 
 struct ia_css_host_data *
 ia_css_params_alloc_convert_sctbl(
-           const struct ia_css_pipeline_stage *stage,
-           const struct ia_css_shading_table *shading_table);
+    const struct ia_css_pipeline_stage *stage,
+    const struct ia_css_shading_table *shading_table);
 
 struct ia_css_isp_config *
 sh_css_pipe_isp_config_get(struct ia_css_pipe *pipe);
index 2f19ee14d6e84872ad14372104be66a88e736bda..50f99c53c3d45c37c40899a37d49a59d5849528f 100644 (file)
@@ -22,10 +22,10 @@ ia_css_get_properties(struct ia_css_properties *properties)
 {
        assert(properties);
 #if defined(HAS_GDC_VERSION_2) || defined(HAS_GDC_VERSION_3)
-/*
- * MW: We don't want to store the coordinates
- * full range in memory: Truncate
- */
+       /*
       * MW: We don't want to store the coordinates
       * full range in memory: Truncate
       */
        properties->gdc_coord_one = gdc_get_unity(GDC0_ID) / HRT_GDC_COORD_SCALE;
 #else
 #error "Unknown GDC version"
index d603f6aee4fc1a657a0816d3b09bd377403bd055..25c46265b70d48530e73d6f8c2cf9ea0bdbf564b 100644 (file)
@@ -85,9 +85,9 @@ set_output_frame_buffer(const struct ia_css_frame *frame,
 
 static void
 sh_css_copy_buffer_attr_to_spbuffer(struct ia_css_buffer_sp *dest_buf,
-                               const enum sh_css_queue_id queue_id,
-                               const hrt_vaddress xmem_addr,
-                               const enum ia_css_buffer_type buf_type);
+                                   const enum sh_css_queue_id queue_id,
+                                   const hrt_vaddress xmem_addr,
+                                   const enum ia_css_buffer_type buf_type);
 
 static void
 initialize_frame_buffer_attribute(struct ia_css_buffer_sp *buf_attr);
@@ -106,10 +106,14 @@ static void
 copy_isp_stage_to_sp_stage(void)
 {
        /* [WW07.5]type casting will cause potential issues */
-       sh_css_sp_stage.num_stripes = (uint8_t)sh_css_isp_stage.binary_info.iterator.num_stripes;
-       sh_css_sp_stage.row_stripes_height = (uint16_t)sh_css_isp_stage.binary_info.iterator.row_stripes_height;
-       sh_css_sp_stage.row_stripes_overlap_lines = (uint16_t)sh_css_isp_stage.binary_info.iterator.row_stripes_overlap_lines;
-       sh_css_sp_stage.top_cropping = (uint16_t)sh_css_isp_stage.binary_info.pipeline.top_cropping;
+       sh_css_sp_stage.num_stripes = (uint8_t)
+                                     sh_css_isp_stage.binary_info.iterator.num_stripes;
+       sh_css_sp_stage.row_stripes_height = (uint16_t)
+                                            sh_css_isp_stage.binary_info.iterator.row_stripes_height;
+       sh_css_sp_stage.row_stripes_overlap_lines = (uint16_t)
+               sh_css_isp_stage.binary_info.iterator.row_stripes_overlap_lines;
+       sh_css_sp_stage.top_cropping = (uint16_t)
+                                      sh_css_isp_stage.binary_info.pipeline.top_cropping;
        /* moved to sh_css_sp_init_stage
           sh_css_sp_stage.enable.vf_output =
           sh_css_isp_stage.binary_info.enable.vf_veceven ||
@@ -118,12 +122,14 @@ copy_isp_stage_to_sp_stage(void)
        sh_css_sp_stage.enable.sdis = sh_css_isp_stage.binary_info.enable.dis;
        sh_css_sp_stage.enable.s3a = sh_css_isp_stage.binary_info.enable.s3a;
 #ifdef ISP2401
-       sh_css_sp_stage.enable.lace_stats = sh_css_isp_stage.binary_info.enable.lace_stats;
+       sh_css_sp_stage.enable.lace_stats =
+           sh_css_isp_stage.binary_info.enable.lace_stats;
 #endif
 }
 
 void
-store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num, unsigned int stage)
+store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num,
+                   unsigned int stage)
 {
        unsigned int thread_id;
 
@@ -131,9 +137,9 @@ store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num, unsigned int
        copy_isp_stage_to_sp_stage();
        if (id != IA_CSS_PIPE_ID_COPY)
                sh_css_sp_stage.isp_stage_addr =
-                       sh_css_store_isp_stage_to_ddr(pipe_num, stage);
+                   sh_css_store_isp_stage_to_ddr(pipe_num, stage);
        sh_css_sp_group.pipe[thread_id].sp_stage_addr[stage] =
-               sh_css_store_sp_stage_to_ddr(pipe_num, stage);
+           sh_css_store_sp_stage_to_ddr(pipe_num, stage);
 
        /* Clear for next frame */
        sh_css_sp_stage.program_input_circuit = false;
@@ -158,14 +164,14 @@ store_sp_per_frame_data(const struct ia_css_fw_info *fw)
        }
 
        sp_dmem_store(SP0_ID,
-               (unsigned int)sp_address_of(sp_per_frame_data),
-               &per_frame_data,
-                       sizeof(per_frame_data));
+                     (unsigned int)sp_address_of(sp_per_frame_data),
+                     &per_frame_data,
+                     sizeof(per_frame_data));
 }
 
 static void
 sh_css_store_sp_per_frame_data(enum ia_css_pipe_id pipe_id,
-                                  unsigned int pipe_num,
+                              unsigned int pipe_num,
                               const struct ia_css_fw_info *sp_fw)
 {
        if (!sp_fw)
@@ -184,7 +190,8 @@ sh_css_sp_get_debug_state(struct sh_css_sp_debug_state *state)
        const struct ia_css_fw_info *fw = &sh_css_sp_fw;
        unsigned int HIVE_ADDR_sp_output = fw->info.sp.output;
        unsigned int i;
-       unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output, debug) / sizeof(int);
+       unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output,
+                             debug) / sizeof(int);
 
        assert(state);
 
@@ -196,7 +203,8 @@ sh_css_sp_get_debug_state(struct sh_css_sp_debug_state *state)
 #endif
 
 void
-sh_css_sp_start_binary_copy(unsigned int pipe_num, struct ia_css_frame *out_frame,
+sh_css_sp_start_binary_copy(unsigned int pipe_num,
+                           struct ia_css_frame *out_frame,
                            unsigned int two_ppc)
 {
        enum ia_css_pipe_id pipe_id;
@@ -219,11 +227,11 @@ sh_css_sp_start_binary_copy(unsigned int pipe_num, struct ia_css_frame *out_fram
 
        if (pipe->inout_port_config == 0) {
                SH_CSS_PIPE_PORT_CONFIG_SET(pipe->inout_port_config,
-                                               (uint8_t)SH_CSS_PORT_INPUT,
-                                               (uint8_t)SH_CSS_HOST_TYPE, 1);
+                                           (uint8_t)SH_CSS_PORT_INPUT,
+                                           (uint8_t)SH_CSS_HOST_TYPE, 1);
                SH_CSS_PIPE_PORT_CONFIG_SET(pipe->inout_port_config,
-                                               (uint8_t)SH_CSS_PORT_OUTPUT,
-                                               (uint8_t)SH_CSS_HOST_TYPE, 1);
+                                           (uint8_t)SH_CSS_PORT_OUTPUT,
+                                           (uint8_t)SH_CSS_HOST_TYPE, 1);
        }
        IA_CSS_LOG("pipe_id %d port_config %08x",
                   pipe->pipe_id, pipe->inout_port_config);
@@ -237,7 +245,7 @@ sh_css_sp_start_binary_copy(unsigned int pipe_num, struct ia_css_frame *out_fram
        sh_css_sp_stage.num = stage_num;
        sh_css_sp_stage.stage_type = SH_CSS_SP_STAGE_TYPE;
        sh_css_sp_stage.func =
-               (unsigned int)IA_CSS_PIPELINE_BIN_COPY;
+           (unsigned int)IA_CSS_PIPELINE_BIN_COPY;
 
        set_output_frame_buffer(out_frame, 0);
 
@@ -289,7 +297,7 @@ sh_css_sp_start_raw_copy(struct ia_css_frame *out_frame,
                 sampled, needs checking/improvement */
        if (pipe_conf_override == SH_CSS_PIPE_CONFIG_OVRD_NO_OVRD)
                pipe->pipe_config =
-                       (SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS << thread_id);
+                   (SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS << thread_id);
        else
                pipe->pipe_config = pipe_conf_override;
 
@@ -297,11 +305,11 @@ sh_css_sp_start_raw_copy(struct ia_css_frame *out_frame,
 
        if (pipe->inout_port_config == 0) {
                SH_CSS_PIPE_PORT_CONFIG_SET(pipe->inout_port_config,
-                                               (uint8_t)SH_CSS_PORT_INPUT,
-                                               (uint8_t)SH_CSS_HOST_TYPE, 1);
+                                           (uint8_t)SH_CSS_PORT_INPUT,
+                                           (uint8_t)SH_CSS_HOST_TYPE, 1);
                SH_CSS_PIPE_PORT_CONFIG_SET(pipe->inout_port_config,
-                                               (uint8_t)SH_CSS_PORT_OUTPUT,
-                                               (uint8_t)SH_CSS_HOST_TYPE, 1);
+                                           (uint8_t)SH_CSS_PORT_OUTPUT,
+                                           (uint8_t)SH_CSS_HOST_TYPE, 1);
        }
        IA_CSS_LOG("pipe_id %d port_config %08x",
                   pipe->pipe_id, pipe->inout_port_config);
@@ -324,7 +332,8 @@ sh_css_sp_start_raw_copy(struct ia_css_frame *out_frame,
 
 static void
 sh_css_sp_start_isys_copy(struct ia_css_frame *out_frame,
-       unsigned int pipe_num, unsigned int max_input_width, unsigned int if_config_index)
+                         unsigned int pipe_num, unsigned int max_input_width,
+                         unsigned int if_config_index)
 {
        enum ia_css_pipe_id pipe_id;
        unsigned int thread_id;
@@ -374,8 +383,11 @@ sh_css_sp_start_isys_copy(struct ia_css_frame *out_frame,
 
 #if defined SH_CSS_ENABLE_METADATA
        if (pipe->metadata.height > 0) {
-               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_METADATA, thread_id, &queue_id);
-               sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.metadata_buf, queue_id, mmgr_EXCEPTION, IA_CSS_BUFFER_TYPE_METADATA);
+               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_METADATA, thread_id,
+                                              &queue_id);
+               sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.metadata_buf,
+                                                   queue_id, mmgr_EXCEPTION,
+                                                   IA_CSS_BUFFER_TYPE_METADATA);
        }
 #endif
 
@@ -388,7 +400,7 @@ sh_css_sp_get_binary_copy_size(void)
        const struct ia_css_fw_info *fw = &sh_css_sp_fw;
        unsigned int HIVE_ADDR_sp_output = fw->info.sp.output;
        unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output,
-                               bin_copy_bytes_copied) / sizeof(int);
+                             bin_copy_bytes_copied) / sizeof(int);
        (void)HIVE_ADDR_sp_output; /* To get rid of warning in CRUN */
        return load_sp_array_uint(sp_output, offset);
 }
@@ -398,17 +410,18 @@ sh_css_sp_get_sw_interrupt_value(unsigned int irq)
 {
        const struct ia_css_fw_info *fw = &sh_css_sp_fw;
        unsigned int HIVE_ADDR_sp_output = fw->info.sp.output;
-       unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output, sw_interrupt_value)
-                               / sizeof(int);
+       unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output,
+                             sw_interrupt_value)
+                             / sizeof(int);
        (void)HIVE_ADDR_sp_output; /* To get rid of warning in CRUN */
        return load_sp_array_uint(sp_output, offset + irq);
 }
 
 static void
 sh_css_copy_buffer_attr_to_spbuffer(struct ia_css_buffer_sp *dest_buf,
-                               const enum sh_css_queue_id queue_id,
-                               const hrt_vaddress xmem_addr,
-                               const enum ia_css_buffer_type buf_type)
+                                   const enum sh_css_queue_id queue_id,
+                                   const hrt_vaddress xmem_addr,
+                                   const enum ia_css_buffer_type buf_type)
 {
        assert(buf_type < IA_CSS_NUM_BUFFER_TYPE);
        if (queue_id > SH_CSS_INVALID_QUEUE_ID) {
@@ -427,8 +440,7 @@ sh_css_copy_buffer_attr_to_spbuffer(struct ia_css_buffer_sp *dest_buf,
                   lines below. In order to satisfy KW an additional if
                   has been added. This one will always yield true.
                 */
-               if ((queue_id < SH_CSS_MAX_NUM_QUEUES))
-               {
+               if ((queue_id < SH_CSS_MAX_NUM_QUEUES)) {
                        dest_buf->buf_src.queue_id = queue_id;
                }
        } else {
@@ -440,17 +452,17 @@ sh_css_copy_buffer_attr_to_spbuffer(struct ia_css_buffer_sp *dest_buf,
 
 static void
 sh_css_copy_frame_to_spframe(struct ia_css_frame_sp *sp_frame_out,
-                               const struct ia_css_frame *frame_in)
+                            const struct ia_css_frame *frame_in)
 {
        assert(frame_in);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-               "sh_css_copy_frame_to_spframe():\n");
+                           "sh_css_copy_frame_to_spframe():\n");
 
        sh_css_copy_buffer_attr_to_spbuffer(&sp_frame_out->buf_attr,
-                                       frame_in->dynamic_queue_id,
-                                       frame_in->data,
-                                       frame_in->buf_type);
+                                           frame_in->dynamic_queue_id,
+                                           frame_in->data,
+                                           frame_in->buf_type);
 
        ia_css_frame_info_to_frame_sp_info(&sp_frame_out->info, &frame_in->info);
 
@@ -465,11 +477,11 @@ sh_css_copy_frame_to_spframe(struct ia_css_frame_sp *sp_frame_out,
                break;
        case IA_CSS_FRAME_FORMAT_PLANAR_RGB888:
                sp_frame_out->planes.planar_rgb.r.offset =
-                       frame_in->planes.planar_rgb.r.offset;
+                   frame_in->planes.planar_rgb.r.offset;
                sp_frame_out->planes.planar_rgb.g.offset =
-                       frame_in->planes.planar_rgb.g.offset;
+                   frame_in->planes.planar_rgb.g.offset;
                sp_frame_out->planes.planar_rgb.b.offset =
-                       frame_in->planes.planar_rgb.b.offset;
+                   frame_in->planes.planar_rgb.b.offset;
                break;
        case IA_CSS_FRAME_FORMAT_YUYV:
        case IA_CSS_FRAME_FORMAT_UYVY:
@@ -486,9 +498,9 @@ sh_css_copy_frame_to_spframe(struct ia_css_frame_sp *sp_frame_out,
        case IA_CSS_FRAME_FORMAT_NV16:
        case IA_CSS_FRAME_FORMAT_NV61:
                sp_frame_out->planes.nv.y.offset =
-                       frame_in->planes.nv.y.offset;
+                   frame_in->planes.nv.y.offset;
                sp_frame_out->planes.nv.uv.offset =
-                       frame_in->planes.nv.uv.offset;
+                   frame_in->planes.nv.uv.offset;
                break;
        case IA_CSS_FRAME_FORMAT_YUV420:
        case IA_CSS_FRAME_FORMAT_YUV422:
@@ -498,29 +510,29 @@ sh_css_copy_frame_to_spframe(struct ia_css_frame_sp *sp_frame_out,
        case IA_CSS_FRAME_FORMAT_YV12:
        case IA_CSS_FRAME_FORMAT_YV16:
                sp_frame_out->planes.yuv.y.offset =
-                       frame_in->planes.yuv.y.offset;
+                   frame_in->planes.yuv.y.offset;
                sp_frame_out->planes.yuv.u.offset =
-                       frame_in->planes.yuv.u.offset;
+                   frame_in->planes.yuv.u.offset;
                sp_frame_out->planes.yuv.v.offset =
-                       frame_in->planes.yuv.v.offset;
+                   frame_in->planes.yuv.v.offset;
                break;
        case IA_CSS_FRAME_FORMAT_QPLANE6:
                sp_frame_out->planes.plane6.r.offset =
-                       frame_in->planes.plane6.r.offset;
+                   frame_in->planes.plane6.r.offset;
                sp_frame_out->planes.plane6.r_at_b.offset =
-                       frame_in->planes.plane6.r_at_b.offset;
+                   frame_in->planes.plane6.r_at_b.offset;
                sp_frame_out->planes.plane6.gr.offset =
-                       frame_in->planes.plane6.gr.offset;
+                   frame_in->planes.plane6.gr.offset;
                sp_frame_out->planes.plane6.gb.offset =
-                       frame_in->planes.plane6.gb.offset;
+                   frame_in->planes.plane6.gb.offset;
                sp_frame_out->planes.plane6.b.offset =
-                       frame_in->planes.plane6.b.offset;
+                   frame_in->planes.plane6.b.offset;
                sp_frame_out->planes.plane6.b_at_r.offset =
-                       frame_in->planes.plane6.b_at_r.offset;
+                   frame_in->planes.plane6.b_at_r.offset;
                break;
        case IA_CSS_FRAME_FORMAT_BINARY_8:
                sp_frame_out->planes.binary.data.offset =
-                       frame_in->planes.binary.data.offset;
+                   frame_in->planes.binary.data.offset;
                break;
        default:
                /* This should not happen, but in case it does,
@@ -532,12 +544,12 @@ sh_css_copy_frame_to_spframe(struct ia_css_frame_sp *sp_frame_out,
 }
 
 static enum ia_css_err
-set_input_frame_buffer(const struct ia_css_frame *frame)
-{
+set_input_frame_buffer(const struct ia_css_frame *frame) {
        if (!frame)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       switch (frame->info.format) {
+       switch (frame->info.format)
+       {
        case IA_CSS_FRAME_FORMAT_QPLANE6:
        case IA_CSS_FRAME_FORMAT_YUV420_16:
        case IA_CSS_FRAME_FORMAT_RAW_PACKED:
@@ -563,12 +575,12 @@ set_input_frame_buffer(const struct ia_css_frame *frame)
 
 static enum ia_css_err
 set_output_frame_buffer(const struct ia_css_frame *frame,
-                       unsigned int idx)
-{
+                       unsigned int idx) {
        if (!frame)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       switch (frame->info.format) {
+       switch (frame->info.format)
+       {
        case IA_CSS_FRAME_FORMAT_YUV420:
        case IA_CSS_FRAME_FORMAT_YUV422:
        case IA_CSS_FRAME_FORMAT_YUV444:
@@ -604,12 +616,12 @@ set_output_frame_buffer(const struct ia_css_frame *frame,
 }
 
 static enum ia_css_err
-set_view_finder_buffer(const struct ia_css_frame *frame)
-{
+set_view_finder_buffer(const struct ia_css_frame *frame) {
        if (!frame)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
-       switch (frame->info.format) {
+       switch (frame->info.format)
+       {
        /* the dual output pin */
        case IA_CSS_FRAME_FORMAT_NV12:
        case IA_CSS_FRAME_FORMAT_NV12_16:
@@ -635,19 +647,21 @@ set_view_finder_buffer(const struct ia_css_frame *frame)
 
 #if !defined(HAS_NO_INPUT_FORMATTER)
 void sh_css_sp_set_if_configs(
-       const input_formatter_cfg_t     *config_a,
-       const input_formatter_cfg_t     *config_b,
-       const uint8_t           if_config_index
-       )
+    const input_formatter_cfg_t        *config_a,
+    const input_formatter_cfg_t        *config_b,
+    const uint8_t              if_config_index
+)
 {
        assert(if_config_index < SH_CSS_MAX_IF_CONFIGS);
        assert(config_a);
 
-       sh_css_sp_group.config.input_formatter.set[if_config_index].config_a = *config_a;
+       sh_css_sp_group.config.input_formatter.set[if_config_index].config_a =
+           *config_a;
        sh_css_sp_group.config.input_formatter.a_changed = true;
 
        if (config_b) {
-               sh_css_sp_group.config.input_formatter.set[if_config_index].config_b = *config_b;
+               sh_css_sp_group.config.input_formatter.set[if_config_index].config_b =
+                   *config_b;
                sh_css_sp_group.config.input_formatter.b_changed = true;
        }
 
@@ -665,10 +679,10 @@ sh_css_sp_program_input_circuit(int fmt_type,
        sh_css_sp_group.config.input_circuit.fmt_type     = fmt_type;
        sh_css_sp_group.config.input_circuit.ch_id            = ch_id;
        sh_css_sp_group.config.input_circuit.input_mode   = input_mode;
-/*
- * The SP group is only loaded at SP boot time and is read once
- * change flags as "input_circuit_cfg_changed" must be reset on the SP
- */
+       /*
       * The SP group is only loaded at SP boot time and is read once
       * change flags as "input_circuit_cfg_changed" must be reset on the SP
       */
        sh_css_sp_group.config.input_circuit_cfg_changed = true;
        sh_css_sp_stage.program_input_circuit = true;
 }
@@ -731,8 +745,7 @@ sh_css_sp_set_disable_continuous_viewfinder(bool flag)
 }
 
 static enum ia_css_err
-sh_css_sp_write_frame_pointers(const struct sh_css_binary_args *args)
-{
+sh_css_sp_write_frame_pointers(const struct sh_css_binary_args *args) {
        enum ia_css_err err = IA_CSS_SUCCESS;
        int i;
 
@@ -742,7 +755,8 @@ sh_css_sp_write_frame_pointers(const struct sh_css_binary_args *args)
                err = set_input_frame_buffer(args->in_frame);
        if (err == IA_CSS_SUCCESS && args->out_vf_frame)
                err = set_view_finder_buffer(args->out_vf_frame);
-       for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
+       for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++)
+       {
                if (err == IA_CSS_SUCCESS && args->out_frame[i])
                        err = set_output_frame_buffer(args->out_frame[i], i);
        }
@@ -770,7 +784,8 @@ sh_css_sp_init_group(bool two_ppc,
        if (if_config_index == SH_CSS_IF_CONFIG_NOT_NEEDED) return;
 #if !defined(HAS_NO_INPUT_FORMATTER)
        assert(if_config_index < SH_CSS_MAX_IF_CONFIGS);
-       sh_css_sp_group.config.input_formatter.set[if_config_index].stream_format = input_format;
+       sh_css_sp_group.config.input_formatter.set[if_config_index].stream_format =
+           input_format;
 #else
        (void)input_format;
 #endif
@@ -784,20 +799,19 @@ sh_css_stage_write_binary_info(struct ia_css_binary_info *info)
 }
 
 static enum ia_css_err
-copy_isp_mem_if_to_ddr(struct ia_css_binary *binary)
-{
+copy_isp_mem_if_to_ddr(struct ia_css_binary *binary) {
        enum ia_css_err err;
 
        err = ia_css_isp_param_copy_isp_mem_if_to_ddr(
-               &binary->css_params,
-               &binary->mem_params,
-               IA_CSS_PARAM_CLASS_CONFIG);
+           &binary->css_params,
+           &binary->mem_params,
+           IA_CSS_PARAM_CLASS_CONFIG);
        if (err != IA_CSS_SUCCESS)
                return err;
        err = ia_css_isp_param_copy_isp_mem_if_to_ddr(
-               &binary->css_params,
-               &binary->mem_params,
-               IA_CSS_PARAM_CLASS_STATE);
+           &binary->css_params,
+           &binary->mem_params,
+           IA_CSS_PARAM_CLASS_STATE);
        if (err != IA_CSS_SUCCESS)
                return err;
        return IA_CSS_SUCCESS;
@@ -812,12 +826,11 @@ is_sp_stage(struct ia_css_pipeline_stage *stage)
 
 static enum ia_css_err
 configure_isp_from_args(
-       const struct sh_css_sp_pipeline *pipeline,
-       const struct ia_css_binary      *binary,
-       const struct sh_css_binary_args *args,
-       bool two_ppc,
-       bool deinterleaved)
-{
+    const struct sh_css_sp_pipeline *pipeline,
+    const struct ia_css_binary      *binary,
+    const struct sh_css_binary_args *args,
+    bool two_ppc,
+    bool deinterleaved) {
 #ifdef ISP2401
        struct ia_css_pipe *pipe = find_pipe_by_num(pipeline->pipe_num);
        const struct ia_css_resolution *res;
@@ -832,7 +845,7 @@ configure_isp_from_args(
        ia_css_output0_configure(binary, &args->out_frame[0]->info);
 #ifdef ISP2401
        ia_css_sc_configure(binary, pipeline->shading.internal_frame_origin_x_bqs_on_sctbl,
-                                   pipeline->shading.internal_frame_origin_y_bqs_on_sctbl);
+                           pipeline->shading.internal_frame_origin_y_bqs_on_sctbl);
 #endif
        ia_css_iterator_configure(binary, &args->in_frame->info);
        ia_css_dvs_configure(binary, &args->out_frame[0]->info);
@@ -882,16 +895,15 @@ initialize_stage_frames(struct ia_css_frames_sp *frames)
 
 static enum ia_css_err
 sh_css_sp_init_stage(struct ia_css_binary *binary,
-                   const char *binary_name,
-                   const struct ia_css_blob_info *blob_info,
-                   const struct sh_css_binary_args *args,
-                   unsigned int pipe_num,
-                   unsigned int stage,
-                   bool xnr,
-                   const struct ia_css_isp_param_css_segments *isp_mem_if,
-                   unsigned int if_config_index,
-                   bool two_ppc)
-{
+                    const char *binary_name,
+                    const struct ia_css_blob_info *blob_info,
+                    const struct sh_css_binary_args *args,
+                    unsigned int pipe_num,
+                    unsigned int stage,
+                    bool xnr,
+                    const struct ia_css_isp_param_css_segments *isp_mem_if,
+                    unsigned int if_config_index,
+                    bool two_ppc) {
        const struct ia_css_binary_xinfo *xinfo;
        const struct ia_css_binary_info  *info;
        enum ia_css_err err = IA_CSS_SUCCESS;
@@ -923,7 +935,8 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
 
        ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
 
-       if (!info) {
+       if (!info)
+       {
                sh_css_sp_group.pipe[thread_id].sp_stage_addr[stage] = mmgr_NULL;
                return IA_CSS_SUCCESS;
        }
@@ -954,13 +967,14 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
        sh_css_sp_stage.frames.effective_in_res.height = binary->effective_in_frame_res.height;
 
        ia_css_frame_info_to_frame_sp_info(&sh_css_sp_stage.frames.in.info,
-                               &binary->in_frame_info);
-       for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
+                                          &binary->in_frame_info);
+       for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++)
+       {
                ia_css_frame_info_to_frame_sp_info(&sh_css_sp_stage.frames.out[i].info,
-                                       &binary->out_frame_info[i]);
+                                                  &binary->out_frame_info[i]);
        }
        ia_css_frame_info_to_frame_sp_info(&sh_css_sp_stage.frames.internal_frame_info,
-                               &binary->internal_frame_info);
+                                          &binary->internal_frame_info);
        sh_css_sp_stage.dvs_envelope.width    = binary->dvs_envelope.width;
        sh_css_sp_stage.dvs_envelope.height   = binary->dvs_envelope.height;
        sh_css_sp_stage.isp_pipe_version      = (uint8_t)info->pipeline.isp_pipe_version;
@@ -990,13 +1004,21 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
 
        err = sh_css_sp_write_frame_pointers(args);
        /* TODO: move it to a better place */
-       if (binary->info->sp.enable.s3a) {
-               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_3A_STATISTICS, thread_id, &queue_id);
-               sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.s3a_buf, queue_id, mmgr_EXCEPTION, IA_CSS_BUFFER_TYPE_3A_STATISTICS);
+       if (binary->info->sp.enable.s3a)
+       {
+               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_3A_STATISTICS, thread_id,
+                                              &queue_id);
+               sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.s3a_buf, queue_id,
+                                                   mmgr_EXCEPTION,
+                                                   IA_CSS_BUFFER_TYPE_3A_STATISTICS);
        }
-       if (binary->info->sp.enable.dis) {
-               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_DIS_STATISTICS, thread_id, &queue_id);
-               sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.dvs_buf, queue_id, mmgr_EXCEPTION, IA_CSS_BUFFER_TYPE_DIS_STATISTICS);
+       if (binary->info->sp.enable.dis)
+       {
+               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_DIS_STATISTICS, thread_id,
+                                              &queue_id);
+               sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.dvs_buf, queue_id,
+                                                   mmgr_EXCEPTION,
+                                                   IA_CSS_BUFFER_TYPE_DIS_STATISTICS);
        }
 #if defined SH_CSS_ENABLE_METADATA
        ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_METADATA, thread_id, &queue_id);
@@ -1007,18 +1029,21 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
 #ifndef ISP2401
-       if (args->in_frame) {
+       if (args->in_frame)
+       {
                pipe = find_pipe_by_num(sh_css_sp_group.pipe[thread_id].pipe_num);
                if (!pipe)
                        return IA_CSS_ERR_INTERNAL_ERROR;
                ia_css_get_crop_offsets(pipe, &args->in_frame->info);
-       } else if (&binary->in_frame_info) {
+       } else if (&binary->in_frame_info)
+       {
                pipe = find_pipe_by_num(sh_css_sp_group.pipe[thread_id].pipe_num);
                if (!pipe)
                        return IA_CSS_ERR_INTERNAL_ERROR;
                ia_css_get_crop_offsets(pipe, &binary->in_frame_info);
 #else
-       if (stage == 0) {
+       if (stage == 0)
+       {
                if (args->in_frame) {
                        pipe = find_pipe_by_num(sh_css_sp_group.pipe[thread_id].pipe_num);
                        if (!pipe)
@@ -1037,7 +1062,7 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
 #endif
 
        err = configure_isp_from_args(&sh_css_sp_group.pipe[thread_id],
-                       binary, args, two_ppc, sh_css_sp_stage.deinterleaved);
+                                     binary, args, two_ppc, sh_css_sp_stage.deinterleaved);
        if (err != IA_CSS_SUCCESS)
                return err;
 
@@ -1048,15 +1073,16 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
         * the original out res. for video pipe, it has two output pins --- out and
         * vf_out, so it can keep these two resolutions already. */
        if (binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_PREVIEW &&
-               (binary->vf_downscale_log2 > 0)) {
+           (binary->vf_downscale_log2 > 0))
+       {
                /* TODO: Remove this after preview output decimation is fixed
                 * by configuring out&vf info fiels properly */
                sh_css_sp_stage.frames.out[0].info.padded_width
-                       <<= binary->vf_downscale_log2;
+               <<= binary->vf_downscale_log2;
                sh_css_sp_stage.frames.out[0].info.res.width
-                       <<= binary->vf_downscale_log2;
+               <<= binary->vf_downscale_log2;
                sh_css_sp_stage.frames.out[0].info.res.height
-                       <<= binary->vf_downscale_log2;
+               <<= binary->vf_downscale_log2;
        }
        err = copy_isp_mem_if_to_ddr(binary);
        if (err != IA_CSS_SUCCESS)
@@ -1070,16 +1096,15 @@ sp_init_stage(struct ia_css_pipeline_stage *stage,
              unsigned int pipe_num,
              bool xnr,
              unsigned int if_config_index,
-             bool two_ppc)
-{
+             bool two_ppc) {
        struct ia_css_binary *binary;
        const struct ia_css_fw_info *firmware;
        const struct sh_css_binary_args *args;
        unsigned int stage_num;
-/*
- * Initialiser required because of the "else" path below.
- * Is this a valid path ?
- */
+       /*
       * Initialiser required because of the "else" path below.
       * Is this a valid path ?
       */
        const char *binary_name = "";
        const struct ia_css_binary_xinfo *info = NULL;
        /* note: the var below is made static as it is quite large;
@@ -1107,35 +1132,38 @@ sp_init_stage(struct ia_css_pipeline_stage *stage,
        args = &stage->args;
        stage_num = stage->stage_num;
 
-       if (binary) {
+       if (binary)
+       {
                info = binary->info;
                binary_name = (const char *)(info->blob->name);
                blob_info = &info->blob->header.blob;
                ia_css_init_memory_interface(mem_if, &binary->mem_params, &binary->css_params);
-       } else if (firmware) {
+       } else if (firmware)
+       {
                const struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS] = {NULL};
 
                if (args->out_frame[0])
                        out_infos[0] = &args->out_frame[0]->info;
                info = &firmware->info.isp;
                ia_css_binary_fill_info(info, false, false,
-                           ATOMISP_INPUT_FORMAT_RAW_10,
-                           args->in_frame  ? &args->in_frame->info  : NULL,
-                           NULL,
-                               out_infos,
-                           args->out_vf_frame ? &args->out_vf_frame->info
-                                               : NULL,
-                           &tmp_binary,
-                           NULL,
-                           -1, true);
+                                       ATOMISP_INPUT_FORMAT_RAW_10,
+                                       args->in_frame  ? &args->in_frame->info  : NULL,
+                                       NULL,
+                                       out_infos,
+                                       args->out_vf_frame ? &args->out_vf_frame->info
+                                       : NULL,
+                                       &tmp_binary,
+                                       NULL,
+                                       -1, true);
                binary = &tmp_binary;
                binary->info = info;
                binary_name = IA_CSS_EXT_ISP_PROG_NAME(firmware);
                blob_info = &firmware->blob;
                mem_if = (struct ia_css_isp_param_css_segments *)&firmware->mem_initializers;
-       } else {
-           /* SP stage */
-           assert(stage->sp_func != IA_CSS_PIPELINE_NO_FUNC);
+       } else
+       {
+               /* SP stage */
+               assert(stage->sp_func != IA_CSS_PIPELINE_NO_FUNC);
                /* binary and blob_info are now NULL.
                   These will be passed to sh_css_sp_init_stage
                   and dereferenced there, so passing a NULL
@@ -1144,15 +1172,15 @@ sp_init_stage(struct ia_css_pipeline_stage *stage,
        }
 
        err = sh_css_sp_init_stage(binary,
-                            (const char *)binary_name,
-                            blob_info,
-                            args,
-                            pipe_num,
-                            stage_num,
-                            xnr,
-                            mem_if,
-                            if_config_index,
-                            two_ppc);
+                                  (const char *)binary_name,
+                                  blob_info,
+                                  args,
+                                  pipe_num,
+                                  stage_num,
+                                  xnr,
+                                  mem_if,
+                                  if_config_index,
+                                  two_ppc);
        return err;
 }
 
@@ -1169,15 +1197,15 @@ sp_init_sp_stage(struct ia_css_pipeline_stage *stage,
        switch (stage->sp_func) {
        case IA_CSS_PIPELINE_RAW_COPY:
                sh_css_sp_start_raw_copy(args->out_frame[0],
-                               pipe_num, two_ppc,
-                               stage->max_input_width,
-                               copy_ovrd, if_config_index);
+                                        pipe_num, two_ppc,
+                                        stage->max_input_width,
+                                        copy_ovrd, if_config_index);
                break;
        case IA_CSS_PIPELINE_BIN_COPY:
                assert(false); /* TBI */
        case IA_CSS_PIPELINE_ISYS_COPY:
                sh_css_sp_start_isys_copy(args->out_frame[0],
-                               pipe_num, stage->max_input_width, if_config_index);
+                                         pipe_num, stage->max_input_width, if_config_index);
                break;
        case IA_CSS_PIPELINE_NO_FUNC:
                assert(false);
@@ -1202,12 +1230,12 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
 #endif
 #ifdef ISP2401
                        ,
-                       const struct ia_css_coordinate *internal_frame_origin_bqs_on_sctbl, /* Origin of internal frame
+                       const struct ia_css_coordinate
+                       *internal_frame_origin_bqs_on_sctbl, /* Origin of internal frame
                                                        positioned on shading table at shading correction in ISP. */
                        const struct ia_css_isp_parameters *params
 #endif
-       )
-{
+                      ) {
        /* Get first stage */
        struct ia_css_pipeline_stage *stage        = NULL;
        struct ia_css_binary         *first_binary = NULL;
@@ -1226,14 +1254,17 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
        first_binary = me->stages->binary;
 
        if (input_mode == IA_CSS_INPUT_MODE_SENSOR ||
-           input_mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
+           input_mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+       {
                assert(port_id < N_MIPI_PORT_ID);
                if (port_id >= N_MIPI_PORT_ID) /* should not happen but KW does not know */
                        return; /* we should be able to return an error */
                if_config_index  = (uint8_t)(port_id - MIPI_PORT0_ID);
-       } else if (input_mode == IA_CSS_INPUT_MODE_MEMORY) {
+       } else if (input_mode == IA_CSS_INPUT_MODE_MEMORY)
+       {
                if_config_index = SH_CSS_IF_CONFIG_NOT_NEEDED;
-       } else {
+       } else
+       {
                if_config_index = 0x0;
        }
 #else
@@ -1245,13 +1276,15 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
        memset(&sh_css_sp_group.pipe[thread_id], 0, sizeof(struct sh_css_sp_pipeline));
 
        /* Count stages */
-       for (stage = me->stages, num = 0; stage; stage = stage->next, num++) {
+       for (stage = me->stages, num = 0; stage; stage = stage->next, num++)
+       {
                stage->stage_num = num;
                ia_css_debug_pipe_graph_dump_stage(stage, id);
        }
        me->num_stages = num;
 
-       if (first_binary) {
+       if (first_binary)
+       {
                /* Init pipeline data */
                sh_css_sp_init_group(two_ppc, first_binary->input_format,
                                     offline, if_config_index);
@@ -1276,16 +1309,17 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
        sh_css_sp_group.pipe[thread_id].required_bds_factor = required_bds_factor;
 #if !defined(HAS_NO_INPUT_SYSTEM)
        sh_css_sp_group.pipe[thread_id].input_system_mode
-                                               = (uint32_t)input_mode;
+       = (uint32_t)input_mode;
        sh_css_sp_group.pipe[thread_id].port_id = port_id;
 #endif
        sh_css_sp_group.pipe[thread_id].dvs_frame_delay = (uint32_t)me->dvs_frame_delay;
 
        /* TODO: next indicates from which queues parameters need to be
                 sampled, needs checking/improvement */
-       if (ia_css_pipeline_uses_params(me)) {
+       if (ia_css_pipeline_uses_params(me))
+       {
                sh_css_sp_group.pipe[thread_id].pipe_config =
-                       SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS << thread_id;
+               SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS << thread_id;
        }
 
        /* For continuous use-cases, SP copy is responsible for sampling the
@@ -1297,20 +1331,22 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
 
        pipe = find_pipe_by_num(pipe_num);
        assert(pipe);
-       if (!pipe) {
+       if (!pipe)
+       {
                return;
        }
        sh_css_sp_group.pipe[thread_id].scaler_pp_lut = sh_css_pipe_get_pp_gdc_lut(pipe);
 
 #if defined(SH_CSS_ENABLE_METADATA)
-       if (md_info && md_info->size > 0) {
+       if (md_info && md_info->size > 0)
+       {
                sh_css_sp_group.pipe[thread_id].metadata.width  = md_info->resolution.width;
                sh_css_sp_group.pipe[thread_id].metadata.height = md_info->resolution.height;
                sh_css_sp_group.pipe[thread_id].metadata.stride = md_info->stride;
                sh_css_sp_group.pipe[thread_id].metadata.size   = md_info->size;
                ia_css_isys_convert_stream_format_to_mipi_format(
-                               md_config->data_type, MIPI_PREDICTOR_NONE,
-                               &sh_css_sp_group.pipe[thread_id].metadata.format);
+                   md_config->data_type, MIPI_PREDICTOR_NONE,
+                   &sh_css_sp_group.pipe[thread_id].metadata.format);
        }
 #else
        (void)md_config;
@@ -1319,8 +1355,11 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
 
 #if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
        sh_css_sp_group.pipe[thread_id].output_frame_queue_id = (uint32_t)SH_CSS_INVALID_QUEUE_ID;
-       if (pipe_id != IA_CSS_PIPE_ID_COPY) {
-               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, thread_id, (enum sh_css_queue_id *)(&sh_css_sp_group.pipe[thread_id].output_frame_queue_id));
+       if (pipe_id != IA_CSS_PIPE_ID_COPY)
+       {
+               ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, thread_id,
+                                              (enum sh_css_queue_id *)(
+                                                  &sh_css_sp_group.pipe[thread_id].output_frame_queue_id));
        }
 #endif
 
@@ -1329,27 +1368,33 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
         * the parameters are passed to the isp for the shading table centering.
         */
        if (internal_frame_origin_bqs_on_sctbl &&
-                       params && params->shading_settings.enable_shading_table_conversion == 0) {
+           params && params->shading_settings.enable_shading_table_conversion == 0)
+       {
                sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_x_bqs_on_sctbl
-                                                               = (uint32_t)internal_frame_origin_bqs_on_sctbl->x;
+               = (uint32_t)internal_frame_origin_bqs_on_sctbl->x;
                sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_y_bqs_on_sctbl
-                                                               = (uint32_t)internal_frame_origin_bqs_on_sctbl->y;
-       } else {
-               sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_x_bqs_on_sctbl = 0;
-               sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_y_bqs_on_sctbl = 0;
+               = (uint32_t)internal_frame_origin_bqs_on_sctbl->y;
+       } else
+       {
+               sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_x_bqs_on_sctbl =
+               0;
+               sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_y_bqs_on_sctbl =
+               0;
        }
 
 #endif
        IA_CSS_LOG("pipe_id %d port_config %08x",
                   pipe_id, sh_css_sp_group.pipe[thread_id].inout_port_config);
 
-       for (stage = me->stages, num = 0; stage; stage = stage->next, num++) {
+       for (stage = me->stages, num = 0; stage; stage = stage->next, num++)
+       {
                sh_css_sp_group.pipe[thread_id].num_stages++;
                if (is_sp_stage(stage)) {
                        sp_init_sp_stage(stage, pipe_num, two_ppc,
-                               copy_ovrd, if_config_index);
+                                        copy_ovrd, if_config_index);
                } else {
-                       if ((stage->stage_num != 0) || SH_CSS_PIPE_PORT_CONFIG_IS_CONTINUOUS(me->inout_port_config))
+                       if ((stage->stage_num != 0) ||
+                           SH_CSS_PIPE_PORT_CONFIG_IS_CONTINUOUS(me->inout_port_config))
                                tmp_if_config_index = SH_CSS_IF_CONFIG_NOT_NEEDED;
                        else
                                tmp_if_config_index = if_config_index;
@@ -1377,8 +1422,9 @@ sh_css_sp_uninit_pipeline(unsigned int pipe_num)
 bool sh_css_write_host2sp_command(enum host2sp_commands host2sp_command)
 {
        unsigned int HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
-       unsigned int offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_command)
-                               / sizeof(int);
+       unsigned int offset = (unsigned int)offsetof(struct host_sp_communication,
+                             host2sp_command)
+                             / sizeof(int);
        enum host2sp_commands last_cmd = host2sp_cmd_error;
        (void)HIVE_ADDR_host_sp_com; /* Suppres warnings in CRUN */
 
@@ -1393,11 +1439,10 @@ bool sh_css_write_host2sp_command(enum host2sp_commands host2sp_command)
 }
 
 enum host2sp_commands
-sh_css_read_host2sp_command(void)
-{
+sh_css_read_host2sp_command(void) {
        unsigned int HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
        unsigned int offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_command)
-                               / sizeof(int);
+       / sizeof(int);
        (void)HIVE_ADDR_host_sp_com; /* Suppres warnings in CRUN */
        return (enum host2sp_commands)load_sp_array_uint(host_sp_com, offset);
 }
@@ -1434,9 +1479,9 @@ sh_css_init_host2sp_frame_data(void)
  */
 void
 sh_css_update_host2sp_offline_frame(
-                               unsigned int frame_num,
-                               struct ia_css_frame *frame,
-                               struct ia_css_metadata *metadata)
+    unsigned int frame_num,
+    struct ia_css_frame *frame,
+    struct ia_css_metadata *metadata)
 {
        unsigned int HIVE_ADDR_host_sp_com;
        unsigned int offset;
@@ -1445,14 +1490,16 @@ sh_css_update_host2sp_offline_frame(
 
        /* Write new frame data into SP DMEM */
        HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
-       offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_offline_frames)
-               / sizeof(int);
+       offset = (unsigned int)offsetof(struct host_sp_communication,
+                                       host2sp_offline_frames)
+                / sizeof(int);
        offset += frame_num;
        store_sp_array_uint(host_sp_com, offset, frame ? frame->data : 0);
 
        /* Write metadata buffer into SP DMEM */
-       offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_offline_metadata)
-               / sizeof(int);
+       offset = (unsigned int)offsetof(struct host_sp_communication,
+                                       host2sp_offline_metadata)
+                / sizeof(int);
        offset += frame_num;
        store_sp_array_uint(host_sp_com, offset, metadata ? metadata->address : 0);
 }
@@ -1464,8 +1511,8 @@ sh_css_update_host2sp_offline_frame(
  */
 void
 sh_css_update_host2sp_mipi_frame(
-                               unsigned int frame_num,
-                               struct ia_css_frame *frame)
+    unsigned int frame_num,
+    struct ia_css_frame *frame)
 {
        unsigned int HIVE_ADDR_host_sp_com;
        unsigned int offset;
@@ -1475,12 +1522,13 @@ sh_css_update_host2sp_mipi_frame(
 
        /* Write new frame data into SP DMEM */
        HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
-       offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_mipi_frames)
-               / sizeof(int);
+       offset = (unsigned int)offsetof(struct host_sp_communication,
+                                       host2sp_mipi_frames)
+                / sizeof(int);
        offset += frame_num;
 
        store_sp_array_uint(host_sp_com, offset,
-                               frame ? frame->data : 0);
+                           frame ? frame->data : 0);
 }
 
 /*
@@ -1489,8 +1537,8 @@ sh_css_update_host2sp_mipi_frame(
  */
 void
 sh_css_update_host2sp_mipi_metadata(
-                               unsigned int frame_num,
-                               struct ia_css_metadata *metadata)
+    unsigned int frame_num,
+    struct ia_css_metadata *metadata)
 {
        unsigned int HIVE_ADDR_host_sp_com;
        unsigned int o;
@@ -1501,10 +1549,10 @@ sh_css_update_host2sp_mipi_metadata(
        /* Write new frame data into SP DMEM */
        HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
        o = offsetof(struct host_sp_communication, host2sp_mipi_metadata)
-               / sizeof(int);
+           / sizeof(int);
        o += frame_num;
        store_sp_array_uint(host_sp_com, o,
-                               metadata ? metadata->address : 0);
+                           metadata ? metadata->address : 0);
 }
 
 void
@@ -1515,15 +1563,17 @@ sh_css_update_host2sp_num_mipi_frames(unsigned int num_frames)
 
        /* Write new frame data into SP DMEM */
        HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
-       offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_num_mipi_frames)
-               / sizeof(int);
+       offset = (unsigned int)offsetof(struct host_sp_communication,
+                                       host2sp_num_mipi_frames)
+                / sizeof(int);
 
        store_sp_array_uint(host_sp_com, offset, num_frames);
 }
 #endif
 
 void
-sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames, bool set_avail)
+sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames,
+       bool set_avail)
 {
        const struct ia_css_fw_info *fw;
        unsigned int HIVE_ADDR_host_sp_com;
@@ -1534,16 +1584,19 @@ sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames, bool set_avai
        fw = &sh_css_sp_fw;
        HIVE_ADDR_host_sp_com = fw->info.sp.host_sp_com;
        if (set_avail) {
-               offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_cont_avail_num_raw_frames)
-                       / sizeof(int);
+               offset = (unsigned int)offsetof(struct host_sp_communication,
+                                               host2sp_cont_avail_num_raw_frames)
+                        / sizeof(int);
                avail_num_frames = load_sp_array_uint(host_sp_com, offset);
                extra_num_frames = num_frames - avail_num_frames;
-               offset_extra = (unsigned int)offsetof(struct host_sp_communication, host2sp_cont_extra_num_raw_frames)
-                       / sizeof(int);
+               offset_extra = (unsigned int)offsetof(struct host_sp_communication,
+                                                     host2sp_cont_extra_num_raw_frames)
+                              / sizeof(int);
                store_sp_array_uint(host_sp_com, offset_extra, extra_num_frames);
        } else
-               offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_cont_target_num_raw_frames)
-                       / sizeof(int);
+               offset = (unsigned int)offsetof(struct host_sp_communication,
+                                               host2sp_cont_target_num_raw_frames)
+                        / sizeof(int);
 
        store_sp_array_uint(host_sp_com, offset, num_frames);
 }
@@ -1566,16 +1619,15 @@ sh_css_event_init_irq_mask(void)
                                                host2sp_event_irq_mask[i]);
                assert(offset % HRT_BUS_BYTES == 0);
                sp_dmem_store(SP0_ID,
-                       (unsigned int)sp_address_of(host_sp_com) + offset,
-                       &event_irq_mask_init, sizeof(event_irq_mask_init));
+                             (unsigned int)sp_address_of(host_sp_com) + offset,
+                             &event_irq_mask_init, sizeof(event_irq_mask_init));
        }
 }
 
 enum ia_css_err
 ia_css_pipe_set_irq_mask(struct ia_css_pipe *pipe,
                         unsigned int or_mask,
-                        unsigned int and_mask)
-{
+                        unsigned int and_mask) {
        unsigned int HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
        unsigned int offset;
        struct sh_css_event_irq_mask event_irq_mask;
@@ -1605,8 +1657,8 @@ ia_css_pipe_set_irq_mask(struct ia_css_pipe *pipe,
                                        host2sp_event_irq_mask[pipe_num]);
        assert(offset % HRT_BUS_BYTES == 0);
        sp_dmem_store(SP0_ID,
-               (unsigned int)sp_address_of(host_sp_com) + offset,
-               &event_irq_mask, sizeof(event_irq_mask));
+                     (unsigned int)sp_address_of(host_sp_com) + offset,
+                     &event_irq_mask, sizeof(event_irq_mask));
 
        return IA_CSS_SUCCESS;
 }
@@ -1614,8 +1666,7 @@ ia_css_pipe_set_irq_mask(struct ia_css_pipe *pipe,
 enum ia_css_err
 ia_css_event_get_irq_mask(const struct ia_css_pipe *pipe,
                          unsigned int *or_mask,
-                         unsigned int *and_mask)
-{
+                         unsigned int *and_mask) {
        unsigned int HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
        unsigned int offset;
        struct sh_css_event_irq_mask event_irq_mask;
@@ -1635,8 +1686,8 @@ ia_css_event_get_irq_mask(const struct ia_css_pipe *pipe,
                                        host2sp_event_irq_mask[pipe_num]);
        assert(offset % HRT_BUS_BYTES == 0);
        sp_dmem_load(SP0_ID,
-               (unsigned int)sp_address_of(host_sp_com) + offset,
-               &event_irq_mask, sizeof(event_irq_mask));
+                    (unsigned int)sp_address_of(host_sp_com) + offset,
+                    &event_irq_mask, sizeof(event_irq_mask));
 
        if (or_mask)
                *or_mask = event_irq_mask.or_mask;
@@ -1680,8 +1731,8 @@ sh_css_sp_start_isp(void)
        store_sp_per_frame_data(fw);
 
        sp_dmem_store_uint32(SP0_ID,
-               (unsigned int)sp_address_of(sp_sw_state),
-               (uint32_t)(IA_CSS_SP_SW_TERMINATED));
+                            (unsigned int)sp_address_of(sp_sw_state),
+                            (uint32_t)(IA_CSS_SP_SW_TERMINATED));
 
        /* Note 1: The sp_start_isp function contains a wait till
         * the input network is configured by the SP.
@@ -1728,14 +1779,14 @@ sh_css_sp_init_dma_sw_reg(int dma_id)
        for (i = 0; i < N_DMA_CHANNEL_ID; i++) {
                /* enable the writing request */
                sh_css_sp_set_dma_sw_reg(dma_id,
-                               i,
-                               0,
-                               true);
+                                        i,
+                                        0,
+                                        true);
                /* enable the reading request */
                sh_css_sp_set_dma_sw_reg(dma_id,
-                               i,
-                               1,
-                               true);
+                                        i,
+                                        1,
+                                        true);
        }
 
        return true;
@@ -1747,9 +1798,9 @@ sh_css_sp_init_dma_sw_reg(int dma_id)
  */
 bool
 sh_css_sp_set_dma_sw_reg(int dma_id,
-               int channel_id,
-               int request_type,
-               bool enable)
+                        int channel_id,
+                        int request_type,
+                        bool enable)
 {
        u32 sw_reg;
        u32 bit_val;
@@ -1763,7 +1814,7 @@ sh_css_sp_set_dma_sw_reg(int dma_id,
 
        /* get the software-mask */
        sw_reg =
-               sh_css_sp_group.debug.dma_sw_reg;
+           sh_css_sp_group.debug.dma_sw_reg;
 
        /* get the offest of the target bit */
        bit_offset = (8 * request_type) + channel_id;
index d2e8dcb00c0ee32061d0a1af432b15fd3668541c..88d7d404cc7a4dabc354ca3657515b6c8004c1c0 100644 (file)
@@ -30,7 +30,8 @@ void
 sh_css_sp_store_init_dmem(const struct ia_css_fw_info *fw);
 
 void
-store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num, unsigned int stage);
+store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num,
+                   unsigned int stage);
 
 void
 sh_css_stage_write_binary_info(struct ia_css_binary_info *info);
@@ -40,7 +41,8 @@ store_sp_group_data(void);
 
 /* Start binary (jpeg) copy on the SP */
 void
-sh_css_sp_start_binary_copy(unsigned int pipe_num, struct ia_css_frame *out_frame,
+sh_css_sp_start_binary_copy(unsigned int pipe_num,
+                           struct ia_css_frame *out_frame,
                            unsigned int two_ppc);
 
 unsigned int
@@ -68,11 +70,12 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
 #endif
 #ifdef ISP2401
                        ,
-                       const struct ia_css_coordinate *internal_frame_origin_bqs_on_sctbl, /* Origin of internal frame
+                       const struct ia_css_coordinate
+                       *internal_frame_origin_bqs_on_sctbl, /* Origin of internal frame
                                                        positioned on shading table at shading correction in ISP. */
                        const struct ia_css_isp_parameters *params
 #endif
-                       );
+                      );
 
 void
 sh_css_sp_uninit_pipeline(unsigned int pipe_num);
@@ -93,9 +96,9 @@ sh_css_init_host2sp_frame_data(void);
  */
 void
 sh_css_update_host2sp_offline_frame(
-                               unsigned int frame_num,
-                               struct ia_css_frame *frame,
-                               struct ia_css_metadata *metadata);
+    unsigned int frame_num,
+    struct ia_css_frame *frame,
+    struct ia_css_metadata *metadata);
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
 /**
@@ -106,8 +109,8 @@ sh_css_update_host2sp_offline_frame(
  */
 void
 sh_css_update_host2sp_mipi_frame(
-                               unsigned int frame_num,
-                               struct ia_css_frame *frame);
+    unsigned int frame_num,
+    struct ia_css_frame *frame);
 
 /**
  * @brief Update the mipi metadata information in host_sp_communication.
@@ -117,8 +120,8 @@ sh_css_update_host2sp_mipi_frame(
  */
 void
 sh_css_update_host2sp_mipi_metadata(
-                               unsigned int frame_num,
-                               struct ia_css_metadata *metadata);
+    unsigned int frame_num,
+    struct ia_css_metadata *metadata);
 
 /**
  * @brief Update the nr of mipi frames to use in host_sp_communication.
@@ -135,7 +138,8 @@ sh_css_update_host2sp_num_mipi_frames(unsigned int num_frames);
  * @param[in] num_frames The number of raw frames to use.
  */
 void
-sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames, bool set_avail);
+sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames,
+       bool set_avail);
 
 void
 sh_css_event_init_irq_mask(void);
@@ -159,9 +163,9 @@ sh_css_sp_get_debug_state(struct sh_css_sp_debug_state *state);
 #if !defined(HAS_NO_INPUT_FORMATTER)
 void
 sh_css_sp_set_if_configs(
-       const input_formatter_cfg_t     *config_a,
-       const input_formatter_cfg_t     *config_b,
-       const uint8_t           if_config_index);
+    const input_formatter_cfg_t        *config_a,
+    const input_formatter_cfg_t        *config_b,
+    const uint8_t              if_config_index);
 #endif
 
 void
@@ -236,9 +240,9 @@ sh_css_sp_init_dma_sw_reg(int dma_id);
  */
 bool
 sh_css_sp_set_dma_sw_reg(int dma_id,
-               int channel_id,
-               int request_type,
-               bool enable);
+                        int channel_id,
+                        int request_type,
+                        bool enable);
 
 extern struct sh_css_sp_group sh_css_sp_group;
 extern struct sh_css_sp_stage sh_css_sp_stage;
index 77f135e7dc3c2786e3156c8ebbd679cc103bfca3..548d4a3567b29602079b184a8d5a11cf03e2a2eb 100644 (file)
@@ -16,7 +16,7 @@
 #include <ia_css_stream_format.h>
 
 unsigned int sh_css_stream_format_2_bits_per_subpixel(
-               enum atomisp_input_format format)
+    enum atomisp_input_format format)
 {
        unsigned int rval;
 
index b699f538e0ddb7e97c00a372970df527645ce54b..32ebd6e0f344b14e7327a611a41621bef2089e7d 100644 (file)
@@ -18,6 +18,6 @@
 #include <ia_css_stream_format.h>
 
 unsigned int sh_css_stream_format_2_bits_per_subpixel(
-               enum atomisp_input_format format);
+    enum atomisp_input_format format);
 
 #endif /* __SH_CSS_STREAM_FORMAT_H */
index cfca3520e8ccd2169ea6239b2a8f1035ac0f67ff..482c99b14ba95fed7306c47596c4dcfad0b188b0 100644 (file)
@@ -40,10 +40,11 @@ struct sh_css {
         * possibility. Also, active_pipes[] should be able to hold only
         * SH_CSS_MAX_SP_THREADS objects. Anything else is misleading. */
        struct ia_css_pipe            *all_pipes[IA_CSS_PIPELINE_NUM_MAX];
-       void * (*malloc)(size_t bytes, bool zero_mem);
+       void *(*malloc)(size_t bytes, bool zero_mem);
        void (*free)(void *ptr);
 #ifdef ISP2401
-       void * (*malloc_ex)(size_t bytes, bool zero_mem, const char *caller_func, int caller_line);
+       void *(*malloc_ex)(size_t bytes, bool zero_mem, const char *caller_func,
+                          int caller_line);
        void (*free_ex)(void *ptr, const char *caller_func, int caller_line);
 #endif
        void (*flush)(struct ia_css_acc_fw *fw);
@@ -54,14 +55,18 @@ struct sh_css {
        unsigned int                   num_cont_raw_frames;
 #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
        unsigned int                   num_mipi_frames[N_CSI_PORTS];
-       struct ia_css_frame           *mipi_frames[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
-       struct ia_css_metadata        *mipi_metadata[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
-       unsigned int                   mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
+       struct ia_css_frame
+               *mipi_frames[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
+       struct ia_css_metadata
+               *mipi_metadata[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
+       unsigned int
+       mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
        unsigned int                   mipi_frame_size[N_CSI_PORTS];
 #endif
        hrt_vaddress                   sp_bin_addr;
        hrt_data                       page_table_base_index;
-       unsigned int                   size_mem_words; /* \deprecated{Use ia_css_mipi_buffer_config instead.}*/
+       unsigned int
+       size_mem_words; /* \deprecated{Use ia_css_mipi_buffer_config instead.}*/
        enum ia_css_irq_type           irq_type;
        unsigned int                   pipe_counter;
 
index 6e0c5e7f8620d04237cd6e19d4dcb7dd9e5ca210..3c7cadd837da8252cdc5bcf54a158d004d2c96cf 100644 (file)
@@ -18,8 +18,7 @@
 #include "sh_css_firmware.h"
 
 enum ia_css_err
-ia_css_get_version(char *version, int max_size)
-{
+ia_css_get_version(char *version, int max_size) {
        if (max_size <= (int)strlen(CSS_VERSION_STRING) + (int)strlen(sh_css_get_fw_version()) + 5)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        strcpy(version, CSS_VERSION_STRING);
index d9c7d8012b897d20eefc10c1a75a70dc364c73ce..986396904fe038bfca0c71c6eddbd35545ceb1de 100644 (file)
@@ -66,11 +66,11 @@ static struct hmm_buffer_object *__bo_alloc(struct kmem_cache *bo_cache)
 }
 
 static int __bo_init(struct hmm_bo_device *bdev, struct hmm_buffer_object *bo,
-                                       unsigned int pgnr)
+                    unsigned int pgnr)
 {
        check_bodev_null_return(bdev, -EINVAL);
        var_equal_return(hmm_bo_device_inited(bdev), 0, -EINVAL,
-                       "hmm_bo_device not inited yet.\n");
+                        "hmm_bo_device not inited yet.\n");
        /* prevent zero size buffer object */
        if (pgnr == 0) {
                dev_err(atomisp_dev, "0 size buffer is not allowed.\n");
@@ -96,23 +96,23 @@ static int __bo_init(struct hmm_bo_device *bdev, struct hmm_buffer_object *bo,
 }
 
 static struct hmm_buffer_object *__bo_search_and_remove_from_free_rbtree(
-                               struct rb_node *node, unsigned int pgnr)
+    struct rb_node *node, unsigned int pgnr)
 {
        struct hmm_buffer_object *this, *ret_bo, *temp_bo;
 
        this = rb_entry(node, struct hmm_buffer_object, node);
        if (this->pgnr == pgnr ||
-               (this->pgnr > pgnr && !this->node.rb_left)) {
+           (this->pgnr > pgnr && !this->node.rb_left)) {
                goto remove_bo_and_return;
        } else {
                if (this->pgnr < pgnr) {
                        if (!this->node.rb_right)
                                return NULL;
                        ret_bo = __bo_search_and_remove_from_free_rbtree(
-                               this->node.rb_right, pgnr);
+                                    this->node.rb_right, pgnr);
                } else {
                        ret_bo = __bo_search_and_remove_from_free_rbtree(
-                               this->node.rb_left, pgnr);
+                                    this->node.rb_left, pgnr);
                }
                if (!ret_bo) {
                        if (this->pgnr > pgnr)
@@ -147,7 +147,7 @@ remove_bo_and_return:
 }
 
 static struct hmm_buffer_object *__bo_search_by_addr(struct rb_root *root,
-                                                       ia_css_ptr start)
+       ia_css_ptr start)
 {
        struct rb_node *n = root->rb_node;
        struct hmm_buffer_object *bo;
@@ -172,7 +172,7 @@ static struct hmm_buffer_object *__bo_search_by_addr(struct rb_root *root,
 }
 
 static struct hmm_buffer_object *__bo_search_by_addr_in_range(
-               struct rb_root *root, unsigned int start)
+    struct rb_root *root, unsigned int start)
 {
        struct rb_node *n = root->rb_node;
        struct hmm_buffer_object *bo;
@@ -197,7 +197,7 @@ static struct hmm_buffer_object *__bo_search_by_addr_in_range(
 }
 
 static void __bo_insert_to_free_rbtree(struct rb_root *root,
-                                       struct hmm_buffer_object *bo)
+                                      struct hmm_buffer_object *bo)
 {
        struct rb_node **new = &root->rb_node;
        struct rb_node *parent = NULL;
@@ -255,8 +255,8 @@ static void __bo_insert_to_alloc_rbtree(struct rb_root *root,
 }
 
 static struct hmm_buffer_object *__bo_break_up(struct hmm_bo_device *bdev,
-                                       struct hmm_buffer_object *bo,
-                                       unsigned int pgnr)
+       struct hmm_buffer_object *bo,
+       unsigned int pgnr)
 {
        struct hmm_buffer_object *new_bo;
        unsigned long flags;
@@ -296,29 +296,29 @@ static void __bo_take_off_handling(struct hmm_buffer_object *bo)
         */
        if (!bo->prev && !bo->next) {
                rb_erase(&bo->node, &bdev->free_rbtree);
-       /* 2. when bo->next != NULL && bo->prev == NULL, bo is a rbtree node,
-        *      and has a linked list,to take off this bo we need erase bo
-        *      first, then, insert bo->next into free rbtree and rebalance
-        *      the free rbtree
-        */
+               /* 2. when bo->next != NULL && bo->prev == NULL, bo is a rbtree node,
+                *      and has a linked list,to take off this bo we need erase bo
+                *      first, then, insert bo->next into free rbtree and rebalance
+                *      the free rbtree
+                */
        } else if (!bo->prev && bo->next) {
                bo->next->prev = NULL;
                rb_erase(&bo->node, &bdev->free_rbtree);
                __bo_insert_to_free_rbtree(&bdev->free_rbtree, bo->next);
                bo->next = NULL;
-       /* 3. when bo->prev != NULL && bo->next == NULL, bo is not a rbtree
-        *      node, bo is the last element of the linked list after rbtree
-        *      node, to take off this bo, we just need set the "prev/next"
-        *      pointers to NULL, the free rbtree stays unchaged
-        */
+               /* 3. when bo->prev != NULL && bo->next == NULL, bo is not a rbtree
+                *      node, bo is the last element of the linked list after rbtree
+                *      node, to take off this bo, we just need set the "prev/next"
+                *      pointers to NULL, the free rbtree stays unchaged
+                */
        } else if (bo->prev && !bo->next) {
                bo->prev->next = NULL;
                bo->prev = NULL;
-       /* 4. when bo->prev != NULL && bo->next != NULL ,bo is not a rbtree
-        *      node, bo is in the middle of the linked list after rbtree node,
-        *      to take off this bo, we just set take the "prev/next" pointers
-        *      to NULL, the free rbtree stays unchaged
-        */
+               /* 4. when bo->prev != NULL && bo->next != NULL ,bo is not a rbtree
+                *      node, bo is in the middle of the linked list after rbtree node,
+                *      to take off this bo, we just set take the "prev/next" pointers
+                *      to NULL, the free rbtree stays unchaged
+                */
        } else if (bo->prev && bo->next) {
                bo->next->prev = bo->prev;
                bo->prev->next = bo->next;
@@ -328,7 +328,7 @@ static void __bo_take_off_handling(struct hmm_buffer_object *bo)
 }
 
 static struct hmm_buffer_object *__bo_merge(struct hmm_buffer_object *bo,
-                                       struct hmm_buffer_object *next_bo)
+       struct hmm_buffer_object *next_bo)
 {
        struct hmm_bo_device *bdev;
        unsigned long flags;
@@ -350,9 +350,9 @@ static struct hmm_buffer_object *__bo_merge(struct hmm_buffer_object *bo,
  * hmm_bo_device functions.
  */
 int hmm_bo_device_init(struct hmm_bo_device *bdev,
-                               struct isp_mmu_client *mmu_driver,
-                               unsigned int vaddr_start,
-                               unsigned int size)
+                      struct isp_mmu_client *mmu_driver,
+                      unsigned int vaddr_start,
+                      unsigned int size)
 {
        struct hmm_buffer_object *bo;
        unsigned long flags;
@@ -380,7 +380,7 @@ int hmm_bo_device_init(struct hmm_bo_device *bdev,
        bdev->free_rbtree = RB_ROOT;
 
        bdev->bo_cache = kmem_cache_create("bo_cache",
-                               sizeof(struct hmm_buffer_object), 0, 0, NULL);
+                                          sizeof(struct hmm_buffer_object), 0, 0, NULL);
        if (!bdev->bo_cache) {
                dev_err(atomisp_dev, "%s: create cache failed!\n", __func__);
                isp_mmu_exit(&bdev->mmu);
@@ -412,14 +412,14 @@ int hmm_bo_device_init(struct hmm_bo_device *bdev,
 }
 
 struct hmm_buffer_object *hmm_bo_alloc(struct hmm_bo_device *bdev,
-                                       unsigned int pgnr)
+                                      unsigned int pgnr)
 {
        struct hmm_buffer_object *bo, *new_bo;
        struct rb_root *root = &bdev->free_rbtree;
 
        check_bodev_null_return(bdev, NULL);
        var_equal_return(hmm_bo_device_inited(bdev), 0, NULL,
-                       "hmm_bo_device not inited yet.\n");
+                        "hmm_bo_device not inited yet.\n");
 
        if (pgnr == 0) {
                dev_err(atomisp_dev, "0 size buffer is not allowed.\n");
@@ -500,15 +500,15 @@ void hmm_bo_release(struct hmm_buffer_object *bo)
        next_bo = list_entry(bo->list.next, struct hmm_buffer_object, list);
 
        if (bo->list.prev != &bdev->entire_bo_list &&
-               prev_bo->end == bo->start &&
-               (prev_bo->status & HMM_BO_MASK) == HMM_BO_FREE) {
+           prev_bo->end == bo->start &&
+           (prev_bo->status & HMM_BO_MASK) == HMM_BO_FREE) {
                __bo_take_off_handling(prev_bo);
                bo = __bo_merge(prev_bo, bo);
        }
 
        if (bo->list.next != &bdev->entire_bo_list &&
-               next_bo->start == bo->end &&
-               (next_bo->status & HMM_BO_MASK) == HMM_BO_FREE) {
+           next_bo->start == bo->end &&
+           (next_bo->status & HMM_BO_MASK) == HMM_BO_FREE) {
                __bo_take_off_handling(next_bo);
                bo = __bo_merge(bo, next_bo);
        }
@@ -534,7 +534,7 @@ void hmm_bo_device_exit(struct hmm_bo_device *bdev)
         */
        while (!RB_EMPTY_ROOT(&bdev->allocated_rbtree))
                hmm_bo_release(
-                       rbtree_node_to_hmm_bo(bdev->allocated_rbtree.rb_node));
+                   rbtree_node_to_hmm_bo(bdev->allocated_rbtree.rb_node));
 
        dev_dbg(atomisp_dev, "%s: finished releasing all allocated bos!\n",
                __func__);
@@ -572,7 +572,7 @@ int hmm_bo_allocated(struct hmm_buffer_object *bo)
 }
 
 struct hmm_buffer_object *hmm_bo_device_search_start(
-       struct hmm_bo_device *bdev, ia_css_ptr vaddr)
+    struct hmm_bo_device *bdev, ia_css_ptr vaddr)
 {
        struct hmm_buffer_object *bo;
 
@@ -592,7 +592,7 @@ struct hmm_buffer_object *hmm_bo_device_search_start(
 }
 
 struct hmm_buffer_object *hmm_bo_device_search_in_range(
-       struct hmm_bo_device *bdev, unsigned int vaddr)
+    struct hmm_bo_device *bdev, unsigned int vaddr)
 {
        struct hmm_buffer_object *bo;
 
@@ -612,7 +612,7 @@ struct hmm_buffer_object *hmm_bo_device_search_in_range(
 }
 
 struct hmm_buffer_object *hmm_bo_device_search_vmap_start(
-       struct hmm_bo_device *bdev, const void *vaddr)
+    struct hmm_bo_device *bdev, const void *vaddr)
 {
        struct list_head *pos;
        struct hmm_buffer_object *bo;
@@ -637,9 +637,9 @@ found:
 }
 
 static void free_private_bo_pages(struct hmm_buffer_object *bo,
-                               struct hmm_pool *dypool,
-                               struct hmm_pool *repool,
-                               int free_pgnr)
+                                 struct hmm_pool *dypool,
+                                 struct hmm_pool *repool,
+                                 int free_pgnr)
 {
        int i, ret;
 
@@ -649,7 +649,7 @@ static void free_private_bo_pages(struct hmm_buffer_object *bo,
                        if (repool->pops
                            && repool->pops->pool_free_pages) {
                                repool->pops->pool_free_pages(repool->pool_info,
-                                                       &bo->page_obj[i]);
+                                                             &bo->page_obj[i]);
                                hmm_mem_stat.res_cnt--;
                        }
                        break;
@@ -665,21 +665,21 @@ static void free_private_bo_pages(struct hmm_buffer_object *bo,
                            && dypool->pops->pool_inited(dypool->pool_info)) {
                                if (dypool->pops->pool_free_pages)
                                        dypool->pops->pool_free_pages(
-                                                             dypool->pool_info,
-                                                             &bo->page_obj[i]);
+                                           dypool->pool_info,
+                                           &bo->page_obj[i]);
                                break;
                        }
 
-                       /*
-                        * if dynamic memory pool doesn't exist, need to free
-                        * pages to system directly.
-                        */
+               /*
+                * if dynamic memory pool doesn't exist, need to free
+                * pages to system directly.
+                */
                default:
                        ret = set_pages_wb(bo->page_obj[i].page, 1);
                        if (ret)
                                dev_err(atomisp_dev,
-                                               "set page to WB err ...ret = %d\n",
-                                                       ret);
+                                       "set page to WB err ...ret = %d\n",
+                                       ret);
                        /*
                        W/A: set_pages_wb seldom return value = -EFAULT
                        indicate that address of page is not in valid
@@ -700,10 +700,10 @@ static void free_private_bo_pages(struct hmm_buffer_object *bo,
 
 /*Allocate pages which will be used only by ISP*/
 static int alloc_private_pages(struct hmm_buffer_object *bo,
-                               int from_highmem,
-                               bool cached,
-                               struct hmm_pool *dypool,
-                               struct hmm_pool *repool)
+                              int from_highmem,
+                              bool cached,
+                              struct hmm_pool *dypool,
+                              struct hmm_pool *repool)
 {
        int ret;
        unsigned int pgnr, order, blk_pgnr, alloc_pgnr;
@@ -720,7 +720,7 @@ static int alloc_private_pages(struct hmm_buffer_object *bo,
        pgnr = bo->pgnr;
 
        bo->page_obj = kmalloc_array(pgnr, sizeof(struct hmm_page_object),
-                               GFP_KERNEL);
+                                    GFP_KERNEL);
        if (unlikely(!bo->page_obj))
                return -ENOMEM;
 
@@ -732,8 +732,8 @@ static int alloc_private_pages(struct hmm_buffer_object *bo,
         */
        if (dypool->pops && dypool->pops->pool_alloc_pages) {
                alloc_pgnr = dypool->pops->pool_alloc_pages(dypool->pool_info,
-                                                       bo->page_obj, pgnr,
-                                                       cached);
+                            bo->page_obj, pgnr,
+                            cached);
                hmm_mem_stat.dyc_size -= alloc_pgnr;
 
                if (alloc_pgnr == pgnr)
@@ -748,8 +748,8 @@ static int alloc_private_pages(struct hmm_buffer_object *bo,
         */
        if (repool->pops && repool->pops->pool_alloc_pages) {
                alloc_pgnr = repool->pops->pool_alloc_pages(repool->pool_info,
-                                                       &bo->page_obj[i], pgnr,
-                                                       cached);
+                            &bo->page_obj[i], pgnr,
+                            cached);
                hmm_mem_stat.res_cnt += alloc_pgnr;
                if (alloc_pgnr == pgnr)
                        return 0;
@@ -794,7 +794,7 @@ retry:
                        if (order == HMM_MIN_ORDER) {
                                dev_err(atomisp_dev,
                                        "%s: cannot allocate pages\n",
-                                        __func__);
+                                       __func__);
                                goto cleanup;
                        }
                        order = HMM_MIN_ORDER;
@@ -819,7 +819,7 @@ retry:
                                ret = set_pages_uc(pages, blk_pgnr);
                                if (ret) {
                                        dev_err(atomisp_dev,
-                                                    "set page uncacheablefailed.\n");
+                                               "set page uncacheablefailed.\n");
 
                                        __free_pages(pages, order);
 
@@ -857,8 +857,8 @@ cleanup:
 }
 
 static void free_private_pages(struct hmm_buffer_object *bo,
-                               struct hmm_pool *dypool,
-                               struct hmm_pool *repool)
+                              struct hmm_pool *dypool,
+                              struct hmm_pool *repool)
 {
        free_private_bo_pages(bo, dypool, repool, bo->pgnr);
 
@@ -891,9 +891,9 @@ static int __get_pfnmap_pages(struct task_struct *tsk, struct mm_struct *mm,
         * If FOLL_FORCE is set, we only require the "MAY" flags.
         */
        vm_flags  = (gup_flags & FOLL_WRITE) ?
-                       (VM_WRITE | VM_MAYWRITE) : (VM_READ | VM_MAYREAD);
+                   (VM_WRITE | VM_MAYWRITE) : (VM_READ | VM_MAYREAD);
        vm_flags &= (gup_flags & FOLL_FORCE) ?
-                       (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE);
+                   (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE);
        i = 0;
 
        do {
@@ -955,8 +955,8 @@ static int __get_pfnmap_pages(struct task_struct *tsk, struct mm_struct *mm,
 }
 
 static int get_pfnmap_pages(struct task_struct *tsk, struct mm_struct *mm,
-                    unsigned long start, int nr_pages, int write, int force,
-                    struct page **pages, struct vm_area_struct **vmas)
+                           unsigned long start, int nr_pages, int write, int force,
+                           struct page **pages, struct vm_area_struct **vmas)
 {
        int flags = FOLL_TOUCH;
 
@@ -986,7 +986,7 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,
                return -ENOMEM;
 
        bo->page_obj = kmalloc_array(bo->pgnr, sizeof(struct hmm_page_object),
-               GFP_KERNEL);
+                                    GFP_KERNEL);
        if (unlikely(!bo->page_obj)) {
                kfree(pages);
                return -ENOMEM;
@@ -1018,7 +1018,7 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,
                /*Handle frame buffer allocated in user space*/
                mutex_unlock(&bo->mutex);
                page_nr = get_user_pages_fast((unsigned long)userptr,
-                                        (int)(bo->pgnr), 1, pages);
+                                             (int)(bo->pgnr), 1, pages);
                mutex_lock(&bo->mutex);
                bo->mem_type = HMM_BO_MEM_TYPE_USER;
        }
@@ -1026,8 +1026,8 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,
        /* can be written by caller, not forced */
        if (page_nr != bo->pgnr) {
                dev_err(atomisp_dev,
-                               "get_user_pages err: bo->pgnr = %d, pgnr actually pinned = %d.\n",
-                               bo->pgnr, page_nr);
+                       "get_user_pages err: bo->pgnr = %d, pgnr actually pinned = %d.\n",
+                       bo->pgnr, page_nr);
                goto out_of_mem;
        }
 
@@ -1092,7 +1092,7 @@ int hmm_bo_alloc_pages(struct hmm_buffer_object *bo,
         */
        if (type == HMM_BO_PRIVATE) {
                ret = alloc_private_pages(bo, from_highmem,
-                               cached, &dynamic_pool, &reserved_pool);
+                                         cached, &dynamic_pool, &reserved_pool);
        } else if (type == HMM_BO_USER) {
                ret = alloc_user_pages(bo, userptr, cached);
        } else {
@@ -1117,7 +1117,7 @@ alloc_err:
 status_err:
        mutex_unlock(&bo->mutex);
        dev_err(atomisp_dev,
-                       "buffer object has already page allocated.\n");
+               "buffer object has already page allocated.\n");
        return -EINVAL;
 }
 
@@ -1148,7 +1148,7 @@ void hmm_bo_free_pages(struct hmm_buffer_object *bo)
 status_err2:
        mutex_unlock(&bo->mutex);
        dev_err(atomisp_dev,
-                       "buffer object not page allocated yet.\n");
+               "buffer object not page allocated yet.\n");
 }
 
 int hmm_bo_page_allocated(struct hmm_buffer_object *bo)
@@ -1179,7 +1179,7 @@ int hmm_bo_get_page_info(struct hmm_buffer_object *bo,
 
 status_err:
        dev_err(atomisp_dev,
-                       "buffer object not page allocated yet.\n");
+               "buffer object not page allocated yet.\n");
        mutex_unlock(&bo->mutex);
        return -EINVAL;
 }
@@ -1199,8 +1199,8 @@ int hmm_bo_bind(struct hmm_buffer_object *bo)
        mutex_lock(&bo->mutex);
 
        check_bo_status_yes_goto(bo,
-                                  HMM_BO_PAGE_ALLOCED | HMM_BO_ALLOCED,
-                                  status_err1);
+                                HMM_BO_PAGE_ALLOCED | HMM_BO_ALLOCED,
+                                status_err1);
 
        check_bo_status_no_goto(bo, HMM_BO_BINDED, status_err2);
 
@@ -1230,7 +1230,7 @@ int hmm_bo_bind(struct hmm_buffer_object *bo)
         */
        if (bo->start != 0x0)
                isp_mmu_flush_tlb_range(&bdev->mmu, bo->start,
-                                               (bo->pgnr << PAGE_SHIFT));
+                                       (bo->pgnr << PAGE_SHIFT));
 
        bo->status |= HMM_BO_BINDED;
 
@@ -1248,7 +1248,7 @@ map_err:
 
        mutex_unlock(&bo->mutex);
        dev_err(atomisp_dev,
-                       "setup MMU address mapping failed.\n");
+               "setup MMU address mapping failed.\n");
        return ret;
 
 status_err2:
@@ -1258,7 +1258,7 @@ status_err2:
 status_err1:
        mutex_unlock(&bo->mutex);
        dev_err(atomisp_dev,
-                    "buffer object vm_node or page not allocated.\n");
+               "buffer object vm_node or page not allocated.\n");
        return -EINVAL;
 }
 
@@ -1276,9 +1276,9 @@ void hmm_bo_unbind(struct hmm_buffer_object *bo)
        mutex_lock(&bo->mutex);
 
        check_bo_status_yes_goto(bo,
-                                  HMM_BO_PAGE_ALLOCED |
-                                  HMM_BO_ALLOCED |
-                                  HMM_BO_BINDED, status_err);
+                                HMM_BO_PAGE_ALLOCED |
+                                HMM_BO_ALLOCED |
+                                HMM_BO_BINDED, status_err);
 
        bdev = bo->bdev;
 
@@ -1305,7 +1305,7 @@ void hmm_bo_unbind(struct hmm_buffer_object *bo)
 status_err:
        mutex_unlock(&bo->mutex);
        dev_err(atomisp_dev,
-                    "buffer vm or page not allocated or not binded yet.\n");
+               "buffer vm or page not allocated or not binded yet.\n");
 }
 
 int hmm_bo_binded(struct hmm_buffer_object *bo)
@@ -1354,7 +1354,7 @@ void *hmm_bo_vmap(struct hmm_buffer_object *bo, bool cached)
                pages[i] = bo->page_obj[i].page;
 
        bo->vmap_addr = vmap(pages, bo->pgnr, VM_MAP,
-               cached ? PAGE_KERNEL : PAGE_KERNEL_NOCACHE);
+                            cached ? PAGE_KERNEL : PAGE_KERNEL_NOCACHE);
        if (unlikely(!bo->vmap_addr)) {
                kfree(pages);
                mutex_unlock(&bo->mutex);
@@ -1488,7 +1488,7 @@ int hmm_bo_mmap(struct vm_area_struct *vma, struct hmm_buffer_object *bo)
         */
        if ((start + pgnr_to_size(pgnr)) != end) {
                dev_warn(atomisp_dev,
-                            "vma's address space size not equal to buffer object's size");
+                        "vma's address space size not equal to buffer object's size");
                return -EINVAL;
        }
 
@@ -1497,8 +1497,8 @@ int hmm_bo_mmap(struct vm_area_struct *vma, struct hmm_buffer_object *bo)
                pfn = page_to_pfn(bo->page_obj[i].page);
                if (remap_pfn_range(vma, virt, pfn, PAGE_SIZE, PAGE_SHARED)) {
                        dev_warn(atomisp_dev,
-                                       "remap_pfn_range failed: virt = 0x%x, pfn = 0x%x, mapped_pgnr = %d\n",
-                                       virt, pfn, 1);
+                                "remap_pfn_range failed: virt = 0x%x, pfn = 0x%x, mapped_pgnr = %d\n",
+                                virt, pfn, 1);
                        return -EINVAL;
                }
                virt += PAGE_SIZE;
index f59fd9908257080f77dd493db8d8b475a7c574cb..1a87af68a9244203c04a152f8c3e301049d11198 100644 (file)
@@ -33,8 +33,8 @@
  * dynamic memory pool ops.
  */
 static unsigned int get_pages_from_dynamic_pool(void *pool,
-                                       struct hmm_page_object *page_obj,
-                                       unsigned int size, bool cached)
+       struct hmm_page_object *page_obj,
+       unsigned int size, bool cached)
 {
        struct hmm_page *hmm_page;
        unsigned long flags;
@@ -48,7 +48,7 @@ static unsigned int get_pages_from_dynamic_pool(void *pool,
        if (dypool_info->initialized) {
                while (!list_empty(&dypool_info->pages_list)) {
                        hmm_page = list_entry(dypool_info->pages_list.next,
-                                               struct hmm_page, list);
+                                             struct hmm_page, list);
 
                        list_del(&hmm_page->list);
                        dypool_info->pgnr--;
@@ -70,7 +70,7 @@ static unsigned int get_pages_from_dynamic_pool(void *pool,
 }
 
 static void free_pages_to_dynamic_pool(void *pool,
-                                       struct hmm_page_object *page_obj)
+                                      struct hmm_page_object *page_obj)
 {
        struct hmm_page *hmm_page;
        unsigned long flags;
@@ -110,7 +110,7 @@ static void free_pages_to_dynamic_pool(void *pool,
                return;
        }
        hmm_page = kmem_cache_zalloc(dypool_info->pgptr_cache,
-                                               GFP_KERNEL);
+                                    GFP_KERNEL);
        if (!hmm_page) {
                /* free page directly */
                ret = set_pages_wb(page_obj->page, 1);
@@ -144,13 +144,13 @@ static int hmm_dynamic_pool_init(void **pool, unsigned int pool_size)
                return 0;
 
        dypool_info = kmalloc(sizeof(struct hmm_dynamic_pool_info),
-               GFP_KERNEL);
+                             GFP_KERNEL);
        if (unlikely(!dypool_info))
                return -ENOMEM;
 
        dypool_info->pgptr_cache = kmem_cache_create("pgptr_cache",
-                                               sizeof(struct hmm_page), 0,
-                                               SLAB_HWCACHE_ALIGN, NULL);
+                                  sizeof(struct hmm_page), 0,
+                                  SLAB_HWCACHE_ALIGN, NULL);
        if (!dypool_info->pgptr_cache) {
                kfree(dypool_info);
                return -ENOMEM;
@@ -186,7 +186,7 @@ static void hmm_dynamic_pool_exit(void **pool)
 
        while (!list_empty(&dypool_info->pages_list)) {
                hmm_page = list_entry(dypool_info->pages_list.next,
-                                       struct hmm_page, list);
+                                     struct hmm_page, list);
 
                list_del(&hmm_page->list);
                spin_unlock_irqrestore(&dypool_info->list_lock, flags);
index 12d3839149c9413317252ccb1422d28e3ab51bc9..d739ed914d652a8143ca2154668225a5bda23e39 100644 (file)
@@ -32,8 +32,8 @@
  * reserved memory pool ops.
  */
 static unsigned int get_pages_from_reserved_pool(void *pool,
-                                       struct hmm_page_object *page_obj,
-                                       unsigned int size, bool cached)
+       struct hmm_page_object *page_obj,
+       unsigned int size, bool cached)
 {
        unsigned long flags;
        unsigned int i = 0;
@@ -82,17 +82,17 @@ static void free_pages_to_reserved_pool(void *pool,
 }
 
 static int hmm_reserved_pool_setup(struct hmm_reserved_pool_info **repool_info,
-                                       unsigned int pool_size)
+                                  unsigned int pool_size)
 {
        struct hmm_reserved_pool_info *pool_info;
 
        pool_info = kmalloc(sizeof(struct hmm_reserved_pool_info),
-                               GFP_KERNEL);
+                           GFP_KERNEL);
        if (unlikely(!pool_info))
                return -ENOMEM;
 
        pool_info->pages = kmalloc(sizeof(struct page *) * pool_size,
-                       GFP_KERNEL);
+                                  GFP_KERNEL);
        if (unlikely(!pool_info->pages)) {
                kfree(pool_info);
                return -ENOMEM;
@@ -147,7 +147,7 @@ static int hmm_reserved_pool_init(void **pool, unsigned int pool_size)
                        if (order == 0) {
                                fail_number++;
                                dev_err(atomisp_dev, "%s: alloc_pages failed: %d\n",
-                                               __func__, fail_number);
+                                       __func__, fail_number);
                                /* if fail five times, will goto end */
 
                                /* FIXME: whether is the mechanism is ok? */
@@ -162,7 +162,7 @@ static int hmm_reserved_pool_init(void **pool, unsigned int pool_size)
                        ret = set_pages_uc(pages, blk_pgnr);
                        if (ret) {
                                dev_err(atomisp_dev,
-                                               "set pages uncached failed\n");
+                                       "set pages uncached failed\n");
                                __free_pages(pages, order);
                                goto end;
                        }
@@ -185,8 +185,8 @@ end:
        *pool = repool_info;
 
        dev_info(atomisp_dev,
-                       "hmm_reserved_pool init successfully,hmm_reserved_pool is with %d pages.\n",
-                       repool_info->pgnr);
+                "hmm_reserved_pool init successfully,hmm_reserved_pool is with %d pages.\n",
+                repool_info->pgnr);
        return 0;
 }
 
index 8885d52166f3bfae24a38aeab1b012f6f0cabc3d..976a2cb5135492dc62aaf41cdd4433d183cb4e25 100644 (file)
@@ -36,7 +36,7 @@ static unsigned int vm_node_end(unsigned int start, unsigned int pgnr)
 }
 
 static int addr_in_vm_node(unsigned int addr,
-               struct hmm_vm_node *node)
+                          struct hmm_vm_node *node)
 {
        return (addr >= node->start) && (addr < (node->start + node->size));
 }
@@ -80,7 +80,7 @@ void hmm_vm_clean(struct hmm_vm *vm)
 }
 
 static struct hmm_vm_node *alloc_hmm_vm_node(unsigned int pgnr,
-                                            struct hmm_vm *vm)
+       struct hmm_vm *vm)
 {
        struct hmm_vm_node *node;
 
@@ -134,7 +134,7 @@ struct hmm_vm_node *hmm_vm_alloc_node(struct hmm_vm *vm, unsigned int pgnr)
                                spin_unlock(&vm->lock);
                                kmem_cache_free(vm->cache, node);
                                dev_err(atomisp_dev,
-                                         "no enough virtual address space.\n");
+                                       "no enough virtual address space.\n");
                                return NULL;
                        }
 
@@ -191,7 +191,7 @@ struct hmm_vm_node *hmm_vm_find_node_start(struct hmm_vm *vm, unsigned int addr)
 }
 
 struct hmm_vm_node *hmm_vm_find_node_in_range(struct hmm_vm *vm,
-                                             unsigned int addr)
+       unsigned int addr)
 {
        struct hmm_vm_node *node;
 
index a1861410bf75e9fef6e3a150337bacbc8421c40d..236f27b503862de915c62d88419f0c9264eace9e 100644 (file)
@@ -38,32 +38,32 @@ void hrt_isp_css_mm_set_user_ptr(void __user *userptr,
 }
 
 static ia_css_ptr __hrt_isp_css_mm_alloc(size_t bytes,
-                                        const void __user *userptr,
-                                        unsigned int num_pages,
-                                        enum hrt_userptr_type type,
-                                        bool cached)
+       const void __user *userptr,
+       unsigned int num_pages,
+       enum hrt_userptr_type type,
+       bool cached)
 {
 #ifdef CONFIG_ION
        if (type == HRT_USR_ION)
                return hmm_alloc(bytes, HMM_BO_ION, 0,
-                                        userptr, cached);
+                                userptr, cached);
 
 #endif
        if (type == HRT_USR_PTR) {
                if (!userptr)
                        return hmm_alloc(bytes, HMM_BO_PRIVATE, 0,
-                                                NULL, cached);
+                                        NULL, cached);
                else {
                        if (num_pages < ((__page_align(bytes)) >> PAGE_SHIFT))
                                dev_err(atomisp_dev,
-                                        "user space memory size is less than the expected size..\n");
+                                       "user space memory size is less than the expected size..\n");
                        else if (num_pages > ((__page_align(bytes))
                                              >> PAGE_SHIFT))
                                dev_err(atomisp_dev,
-                                        "user space memory size is large than the expected size..\n");
+                                       "user space memory size is large than the expected size..\n");
 
                        return hmm_alloc(bytes, HMM_BO_USER, 0,
-                                                userptr, cached);
+                                        userptr, cached);
                }
        } else {
                dev_err(atomisp_dev, "user ptr type is incorrect.\n");
@@ -78,10 +78,10 @@ ia_css_ptr hrt_isp_css_mm_alloc(size_t bytes)
 }
 
 ia_css_ptr hrt_isp_css_mm_alloc_user_ptr(size_t bytes,
-                                        const void __user *userptr,
-                                        unsigned int num_pages,
-                                        enum hrt_userptr_type type,
-                                        bool cached)
+       const void __user *userptr,
+       unsigned int num_pages,
+       enum hrt_userptr_type type,
+       bool cached)
 {
        return __hrt_isp_css_mm_alloc(bytes, userptr, num_pages,
                                      type, cached);
@@ -91,17 +91,17 @@ ia_css_ptr hrt_isp_css_mm_alloc_cached(size_t bytes)
 {
        if (!my_userptr)
                return hmm_alloc(bytes, HMM_BO_PRIVATE, 0, NULL,
-                                               HMM_CACHED);
+                                HMM_CACHED);
        else {
                if (my_num_pages < ((__page_align(bytes)) >> PAGE_SHIFT))
                        dev_err(atomisp_dev,
-                                       "user space memory size is less than the expected size..\n");
+                               "user space memory size is less than the expected size..\n");
                else if (my_num_pages > ((__page_align(bytes)) >> PAGE_SHIFT))
                        dev_err(atomisp_dev,
-                                       "user space memory size is large than the expected size..\n");
+                               "user space memory size is large than the expected size..\n");
 
                return hmm_alloc(bytes, HMM_BO_USER, 0,
-                                               my_userptr, HMM_CACHED);
+                                my_userptr, HMM_CACHED);
        }
 }
 
index a7a2775aa6f51cf4757ce27098a5820252158120..818ecf90b1f5aecc149fbbecfd2513ef8acfc5cc 100644 (file)
@@ -38,15 +38,15 @@ struct hrt_userbuffer_attr {
 };
 
 void hrt_isp_css_mm_set_user_ptr(void __user *userptr,
-                               unsigned int num_pages, enum hrt_userptr_type);
+                                unsigned int num_pages, enum hrt_userptr_type);
 
 /* Allocate memory, returns a virtual address */
 ia_css_ptr hrt_isp_css_mm_alloc(size_t bytes);
 ia_css_ptr hrt_isp_css_mm_alloc_user_ptr(size_t bytes,
-                                        const void __user *userptr,
-                                        unsigned int num_pages,
-                                        enum hrt_userptr_type,
-                                        bool cached);
+       const void __user *userptr,
+       unsigned int num_pages,
+       enum hrt_userptr_type,
+       bool cached);
 ia_css_ptr hrt_isp_css_mm_alloc_cached(size_t bytes);
 
 /* allocate memory and initialize with zeros,
index 7dcc73c9f49d47bb2b88a16473ecb8497e7a9115..254a71442451051d39407f9ababab74683dcd00f 100644 (file)
@@ -38,7 +38,7 @@ int hmm_init(void);
 void hmm_cleanup(void);
 
 ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type,
-               int from_highmem, const void __user *userptr, bool cached);
+                    int from_highmem, const void __user *userptr, bool cached);
 void hmm_free(ia_css_ptr ptr);
 int hmm_load(ia_css_ptr virt, void *data, unsigned int bytes);
 int hmm_store(ia_css_ptr virt, const void *data, unsigned int bytes);
index 3e7b1ed4ef5ba45e7f45443e1ce37583e9c62690..f847d1de860ef45d0c7835330e5a86dc2a14b2b0 100644 (file)
@@ -166,13 +166,13 @@ struct hmm_buffer_object {
 };
 
 struct hmm_buffer_object *hmm_bo_alloc(struct hmm_bo_device *bdev,
-                               unsigned int pgnr);
+                                      unsigned int pgnr);
 
 void hmm_bo_release(struct hmm_buffer_object *bo);
 
 int hmm_bo_device_init(struct hmm_bo_device *bdev,
-                               struct isp_mmu_client *mmu_driver,
-                               unsigned int vaddr_start, unsigned int size);
+                      struct isp_mmu_client *mmu_driver,
+                      unsigned int vaddr_start, unsigned int size);
 
 /*
  * clean up all hmm_bo_device related things.
@@ -240,8 +240,8 @@ int hmm_bo_allocated(struct hmm_buffer_object *bo);
  * or by ISP driver itself.
  */
 int hmm_bo_alloc_pages(struct hmm_buffer_object *bo,
-               enum hmm_bo_type type, int from_highmem,
-               const void __user *userptr, bool cached);
+                      enum hmm_bo_type type, int from_highmem,
+                      const void __user *userptr, bool cached);
 void hmm_bo_free_pages(struct hmm_buffer_object *bo);
 int hmm_bo_page_allocated(struct hmm_buffer_object *bo);
 
@@ -249,7 +249,7 @@ int hmm_bo_page_allocated(struct hmm_buffer_object *bo);
  * get physical page info of the bo.
  */
 int hmm_bo_get_page_info(struct hmm_buffer_object *bo,
-               struct hmm_page_object **page_obj, int *pgnr);
+                        struct hmm_page_object **page_obj, int *pgnr);
 
 /*
  * bind/unbind the physical pages to a virtual address space.
@@ -294,7 +294,7 @@ extern struct hmm_pool      reserved_pool;
  * return NULL if no such buffer object found.
  */
 struct hmm_buffer_object *hmm_bo_device_search_start(
-               struct hmm_bo_device *bdev, ia_css_ptr vaddr);
+    struct hmm_bo_device *bdev, ia_css_ptr vaddr);
 
 /*
  * find the buffer object by its virtual address.
@@ -303,13 +303,13 @@ struct hmm_buffer_object *hmm_bo_device_search_start(
  * return NULL if no such buffer object found.
  */
 struct hmm_buffer_object *hmm_bo_device_search_in_range(
-               struct hmm_bo_device *bdev, ia_css_ptr vaddr);
+    struct hmm_bo_device *bdev, ia_css_ptr vaddr);
 
 /*
  * find the buffer object with kernel virtual address vaddr.
  * return NULL if no such buffer object found.
  */
 struct hmm_buffer_object *hmm_bo_device_search_vmap_start(
-               struct hmm_bo_device *bdev, const void *vaddr);
+    struct hmm_bo_device *bdev, const void *vaddr);
 
 #endif
index bf24e44462bca18a8f702c9e74c0aac28d4912f4..8caf00502d748ca6e2e232ea161b9c08cd2c25cf 100644 (file)
@@ -48,8 +48,8 @@ struct hmm_pool_ops {
        int (*pool_init)(void **pool, unsigned int pool_size);
        void (*pool_exit)(void **pool);
        unsigned int (*pool_alloc_pages)(void *pool,
-                                       struct hmm_page_object *page_obj,
-                                       unsigned int size, bool cached);
+                                        struct hmm_page_object *page_obj,
+                                        unsigned int size, bool cached);
        void (*pool_free_pages)(void *pool,
                                struct hmm_page_object *page_obj);
        int (*pool_inited)(void *pool);
index 816a61a190678fdc73ce9d271e2cac1ee817665d..93ac5e4451370b3f1ff90642764c5101fea229ee 100644 (file)
@@ -52,14 +52,14 @@ int hmm_vm_init(struct hmm_vm *vm, unsigned int start,
 void hmm_vm_clean(struct hmm_vm *vm);
 
 struct hmm_vm_node *hmm_vm_alloc_node(struct hmm_vm *vm,
-               unsigned int pgnr);
+                                     unsigned int pgnr);
 
 void hmm_vm_free_node(struct hmm_vm_node *node);
 
 struct hmm_vm_node *hmm_vm_find_node_start(struct hmm_vm *vm,
-               unsigned int addr);
+       unsigned int addr);
 
 struct hmm_vm_node *hmm_vm_find_node_in_range(struct hmm_vm *vm,
-               unsigned int addr);
+       unsigned int addr);
 
 #endif
index e52a3ed5992b5ce7976f4e2cd5e7a13c1c483c28..c94df9012ac73c016db14036a7936523e6a2ef77 100644 (file)
@@ -97,12 +97,12 @@ struct isp_mmu_client {
         * not valid, it will set to tlb_flush_all by default.
         */
        void (*tlb_flush_range)(struct isp_mmu *mmu,
-                                unsigned int addr, unsigned int size);
+                               unsigned int addr, unsigned int size);
        void (*tlb_flush_all)(struct isp_mmu *mmu);
        unsigned int (*phys_to_pte)(struct isp_mmu *mmu,
-                                    phys_addr_t phys);
+                                   phys_addr_t phys);
        phys_addr_t (*pte_to_phys)(struct isp_mmu *mmu,
-                                   unsigned int pte);
+                                  unsigned int pte);
 
 };
 
@@ -160,7 +160,7 @@ static inline void isp_mmu_flush_tlb_all(struct isp_mmu *mmu)
 #define isp_mmu_flush_tlb isp_mmu_flush_tlb_all
 
 static inline void isp_mmu_flush_tlb_range(struct isp_mmu *mmu,
-               unsigned int start, unsigned int size)
+       unsigned int start, unsigned int size)
 {
        if (mmu->driver && mmu->driver->tlb_flush_range)
                mmu->driver->tlb_flush_range(mmu, start, size);
index 775f446bbf6f982f05100f3da9789d4d15178609..90365375534d135fcaf3611b551630afc1003a57 100644 (file)
@@ -54,7 +54,7 @@
 #define NR_PAGES_2GB   (SZ_2G / PAGE_SIZE)
 
 static void free_mmu_map(struct isp_mmu *mmu, unsigned int start_isp_virt,
-                               unsigned int end_isp_virt);
+                        unsigned int end_isp_virt);
 
 static unsigned int atomisp_get_pte(phys_addr_t pt, unsigned int idx)
 {
@@ -82,7 +82,7 @@ static phys_addr_t isp_pte_to_pgaddr(struct isp_mmu *mmu,
 }
 
 static unsigned int isp_pgaddr_to_pte_valid(struct isp_mmu *mmu,
-                                           phys_addr_t phys)
+       phys_addr_t phys)
 {
        unsigned int pte = mmu->driver->phys_to_pte(mmu, phys);
 
@@ -152,16 +152,16 @@ static void mmu_remap_error(struct isp_mmu *mmu,
                            phys_addr_t new_phys)
 {
        dev_err(atomisp_dev, "address remap:\n\n"
-                    "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
-                    "\tL2 PT: virt = %p, phys = 0x%llx, idx = %d\n"
-                    "\told: isp_virt = 0x%x, phys = 0x%llx\n"
-                    "\tnew: isp_virt = 0x%x, phys = 0x%llx\n",
-                    isp_pt_phys_to_virt(l1_pt),
-                    (u64)l1_pt, l1_idx,
-                    isp_pt_phys_to_virt(l2_pt),
-                    (u64)l2_pt, l2_idx, isp_virt,
-                    (u64)old_phys, isp_virt,
-                    (u64)new_phys);
+               "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
+               "\tL2 PT: virt = %p, phys = 0x%llx, idx = %d\n"
+               "\told: isp_virt = 0x%x, phys = 0x%llx\n"
+               "\tnew: isp_virt = 0x%x, phys = 0x%llx\n",
+               isp_pt_phys_to_virt(l1_pt),
+               (u64)l1_pt, l1_idx,
+               isp_pt_phys_to_virt(l2_pt),
+               (u64)l2_pt, l2_idx, isp_virt,
+               (u64)old_phys, isp_virt,
+               (u64)new_phys);
 }
 
 static void mmu_unmap_l2_pte_error(struct isp_mmu *mmu,
@@ -170,14 +170,14 @@ static void mmu_unmap_l2_pte_error(struct isp_mmu *mmu,
                                   unsigned int isp_virt, unsigned int pte)
 {
        dev_err(atomisp_dev, "unmap invalid L2 pte:\n\n"
-                    "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
-                    "\tL2 PT: virt = %p, phys = 0x%llx, idx = %d\n"
-                    "\tisp_virt = 0x%x, pte(page phys) = 0x%x\n",
-                    isp_pt_phys_to_virt(l1_pt),
-                    (u64)l1_pt, l1_idx,
-                    isp_pt_phys_to_virt(l2_pt),
-                    (u64)l2_pt, l2_idx, isp_virt,
-                    pte);
+               "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
+               "\tL2 PT: virt = %p, phys = 0x%llx, idx = %d\n"
+               "\tisp_virt = 0x%x, pte(page phys) = 0x%x\n",
+               isp_pt_phys_to_virt(l1_pt),
+               (u64)l1_pt, l1_idx,
+               isp_pt_phys_to_virt(l2_pt),
+               (u64)l2_pt, l2_idx, isp_virt,
+               pte);
 }
 
 static void mmu_unmap_l1_pte_error(struct isp_mmu *mmu,
@@ -185,17 +185,17 @@ static void mmu_unmap_l1_pte_error(struct isp_mmu *mmu,
                                   unsigned int isp_virt, unsigned int pte)
 {
        dev_err(atomisp_dev, "unmap invalid L1 pte (L2 PT):\n\n"
-                    "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
-                    "\tisp_virt = 0x%x, l1_pte(L2 PT) = 0x%x\n",
-                    isp_pt_phys_to_virt(l1_pt),
-                    (u64)l1_pt, l1_idx, (unsigned int)isp_virt,
-                    pte);
+               "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
+               "\tisp_virt = 0x%x, l1_pte(L2 PT) = 0x%x\n",
+               isp_pt_phys_to_virt(l1_pt),
+               (u64)l1_pt, l1_idx, (unsigned int)isp_virt,
+               pte);
 }
 
 static void mmu_unmap_l1_pt_error(struct isp_mmu *mmu, unsigned int pte)
 {
        dev_err(atomisp_dev, "unmap invalid L1PT:\n\n"
-                    "L1PT = 0x%x\n", (unsigned int)pte);
+               "L1PT = 0x%x\n", (unsigned int)pte);
 }
 
 /*
@@ -224,7 +224,7 @@ static int mmu_l2_map(struct isp_mmu *mmu, phys_addr_t l1_pt,
 
                if (ISP_PTE_VALID(mmu, pte)) {
                        mmu_remap_error(mmu, l1_pt, l1_idx,
-                                         l2_pt, idx, ptr, pte, phys);
+                                       l2_pt, idx, ptr, pte, phys);
 
                        /* free all mapped pages */
                        free_mmu_map(mmu, start, ptr);
@@ -273,7 +273,7 @@ static int mmu_l1_map(struct isp_mmu *mmu, phys_addr_t l1_pt,
                        l2_pt = alloc_page_table(mmu);
                        if (l2_pt == NULL_PAGE) {
                                dev_err(atomisp_dev,
-                                            "alloc page table fail.\n");
+                                       "alloc page table fail.\n");
 
                                /* free all mapped pages */
                                free_mmu_map(mmu, start, ptr);
@@ -293,12 +293,12 @@ static int mmu_l1_map(struct isp_mmu *mmu, phys_addr_t l1_pt,
 
                if (l1_aligned < end) {
                        ret = mmu_l2_map(mmu, l1_pt, idx,
-                                          l2_pt, ptr, l1_aligned, phys);
+                                        l2_pt, ptr, l1_aligned, phys);
                        phys += (l1_aligned - ptr);
                        ptr = l1_aligned;
                } else {
                        ret = mmu_l2_map(mmu, l1_pt, idx,
-                                          l2_pt, ptr, end, phys);
+                                        l2_pt, ptr, end, phys);
                        phys += (end - ptr);
                        ptr = end;
                }
@@ -367,8 +367,8 @@ static int mmu_map(struct isp_mmu *mmu, unsigned int isp_virt,
  * address
  */
 static void mmu_l2_unmap(struct isp_mmu *mmu, phys_addr_t l1_pt,
-                          unsigned int l1_idx, phys_addr_t l2_pt,
-                          unsigned int start, unsigned int end)
+                        unsigned int l1_idx, phys_addr_t l2_pt,
+                        unsigned int start, unsigned int end)
 {
        unsigned int ptr;
        unsigned int idx;
@@ -387,7 +387,7 @@ static void mmu_l2_unmap(struct isp_mmu *mmu, phys_addr_t l1_pt,
 
                if (!ISP_PTE_VALID(mmu, pte))
                        mmu_unmap_l2_pte_error(mmu, l1_pt, l1_idx,
-                                                l2_pt, idx, ptr, pte);
+                                              l2_pt, idx, ptr, pte);
 
                atomisp_set_pte(l2_pt, idx, mmu->driver->null_pte);
                mmu->l2_pgt_refcount[l1_idx]--;
@@ -405,7 +405,7 @@ static void mmu_l2_unmap(struct isp_mmu *mmu, phys_addr_t l1_pt,
  * address
  */
 static void mmu_l1_unmap(struct isp_mmu *mmu, phys_addr_t l1_pt,
-                          unsigned int start, unsigned int end)
+                        unsigned int start, unsigned int end)
 {
        phys_addr_t l2_pt;
        unsigned int ptr, l1_aligned;
@@ -452,7 +452,7 @@ static void mmu_l1_unmap(struct isp_mmu *mmu, phys_addr_t l1_pt,
  * address
  */
 static void mmu_unmap(struct isp_mmu *mmu, unsigned int isp_virt,
-                       unsigned int pgnr)
+                     unsigned int pgnr)
 {
        unsigned int start, end;
        phys_addr_t l1_pt;
@@ -478,7 +478,7 @@ static void mmu_unmap(struct isp_mmu *mmu, unsigned int isp_virt,
  * address.
  */
 static void free_mmu_map(struct isp_mmu *mmu, unsigned int start_isp_virt,
-                               unsigned int end_isp_virt)
+                        unsigned int end_isp_virt)
 {
        unsigned int pgnr;
        unsigned int start, end;
@@ -502,8 +502,8 @@ void isp_mmu_unmap(struct isp_mmu *mmu, unsigned int isp_virt,
 }
 
 static void isp_mmu_flush_tlb_range_default(struct isp_mmu *mmu,
-                                             unsigned int start,
-                                             unsigned int size)
+       unsigned int start,
+       unsigned int size)
 {
        isp_mmu_flush_tlb(mmu);
 }
@@ -559,7 +559,7 @@ void isp_mmu_exit(struct isp_mmu *mmu)
 
        if (!ISP_PTE_VALID(mmu, mmu->l1_pte)) {
                dev_warn(atomisp_dev, "invalid L1PT: pte = 0x%x\n",
-                           (unsigned int)mmu->l1_pte);
+                        (unsigned int)mmu->l1_pte);
                return;
        }
 
index d0b427539b6d3df9d5f61439281f88e52547f958..4f1500ef0990caac96ce4f9e4431623a304d6434 100644 (file)
@@ -50,7 +50,8 @@ struct gmin_subdev {
 static struct gmin_subdev gmin_subdevs[MAX_SUBDEVS];
 
 static enum { PMIC_UNSET = 0, PMIC_REGULATOR, PMIC_AXP, PMIC_TI,
-       PMIC_CRYSTALCOVE } pmic_id;
+             PMIC_CRYSTALCOVE
+           } pmic_id;
 
 /* The atomisp uses type==0 for the end-of-list marker, so leave space. */
 static struct intel_v4l2_subdev_table pdata_subdevs[MAX_SUBDEVS + 1];
@@ -158,7 +159,7 @@ int atomisp_register_i2c_module(struct v4l2_subdev *subdev,
 EXPORT_SYMBOL_GPL(atomisp_register_i2c_module);
 
 struct v4l2_subdev *atomisp_gmin_find_subdev(struct i2c_adapter *adapter,
-                                            struct i2c_board_info *board_info)
+       struct i2c_board_info *board_info)
 {
        int i;
 
@@ -337,14 +338,14 @@ static struct gmin_subdev *gmin_subdev_add(struct v4l2_subdev *subdev)
                return NULL;
 
        dev_info(dev,
-               "gmin: initializing atomisp module subdev data.PMIC ID %d\n",
-               pmic_id);
+                "gmin: initializing atomisp module subdev data.PMIC ID %d\n",
+                pmic_id);
 
        gmin_subdevs[i].subdev = subdev;
        gmin_subdevs[i].clock_num = gmin_get_var_int(dev, "CamClk", 0);
        /*WA:CHT requires XTAL clock as PLL is not stable.*/
        gmin_subdevs[i].clock_src = gmin_get_var_int(dev, "ClkSrc",
-                                                       VLV2_CLK_PLL_19P2MHZ);
+                                   VLV2_CLK_PLL_19P2MHZ);
        gmin_subdevs[i].csi_port = gmin_get_var_int(dev, "CsiPort", 0);
        gmin_subdevs[i].csi_lanes = gmin_get_var_int(dev, "CsiLanes", 1);
 
@@ -569,7 +570,7 @@ static int gmin_csi_cfg(struct v4l2_subdev *sd, int flag)
 }
 
 static struct camera_vcm_control *gmin_get_vcm_ctrl(struct v4l2_subdev *subdev,
-                                               char *camera_module)
+       char *camera_module)
 {
        struct i2c_client *client = v4l2_get_subdevdata(subdev);
        struct gmin_subdev *gs = find_gmin_subdev(subdev);
@@ -605,9 +606,9 @@ static struct camera_sensor_platform_data gmin_plat = {
 };
 
 struct camera_sensor_platform_data *gmin_camera_platform_data(
-               struct v4l2_subdev *subdev,
-               enum atomisp_input_format csi_format,
-               enum atomisp_bayer_order csi_bayer)
+    struct v4l2_subdev *subdev,
+    enum atomisp_input_format csi_format,
+    enum atomisp_bayer_order csi_bayer)
 {
        struct gmin_subdev *gs = find_gmin_subdev(subdev);