media: atomisp: fix several coding style issues
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Apr 2020 14:06:45 +0000 (16:06 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 10:32:15 +0000 (12:32 +0200)
Use checkpatch.pl --fix-inplace --strict to solve several
coding style issues, manually reviewing the produced code and
fixing some troubles caused by checkpatch.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
586 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/gc0310.h
drivers/staging/media/atomisp/i2c/gc2235.h
drivers/staging/media/atomisp/i2c/mt9m114.h
drivers/staging/media/atomisp/i2c/ov2680.h
drivers/staging/media/atomisp/i2c/ov2722.h
drivers/staging/media/atomisp/i2c/ov5693/ad5823.h
drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c
drivers/staging/media/atomisp/i2c/ov5693/ov5693.h
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/include/media/lm3554.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.h
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_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_dfs_tables.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_fops.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_helper.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_subdev.c
drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c
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/css2400/base/circbuf/interface/ia_css_circbuf.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/interface/ia_css_circbuf_comm.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_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/hrt/bits.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/cell_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/css_receiver_2400_common_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/css_receiver_2400_defs.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/gp_timer_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_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/hive_isp_css_host_ids_hrt.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/hive_isp_css_streaming_to_mipi_types_hrt.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/hive_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/input_formatter_subsystem_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/input_selector_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/input_switch_2400_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/input_system_ctrl_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/irq_controller_defs.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/isp_acquisition_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/isp_capture_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/timed_controller_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/var.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/spmem_dump.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/csi_rx_global.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_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/host/csi_rx.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_local.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.c
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_private.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_local.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/PixelGen_SysBlock_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/bits.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/cell_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/css_receiver_2400_common_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/css_receiver_2400_defs.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/gp_timer_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/hive_isp_css_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/hive_isp_css_host_ids_hrt.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/hive_isp_css_streaming_to_mipi_types_hrt.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/hive_types.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/input_formatter_subsystem_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/input_selector_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/input_switch_2400_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/input_system_ctrl_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/irq_controller_defs.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/isp_acquisition_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/isp_capture_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/mipi_backend_common_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/mipi_backend_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/rx_csi_defs.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/hrt/timed_controller_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/hrt/var.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/ibuf_ctrl_global.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_csi2p_system/isys_stream2mmio_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/pixelgen_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/spmem_dump.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/system_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_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/hrt/bits.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/cell_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/css_receiver_2400_common_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/css_receiver_2400_defs.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/gp_timer_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/hive_isp_css_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/hive_isp_css_host_ids_hrt.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/hive_isp_css_streaming_to_mipi_types_hrt.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/hive_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/input_formatter_subsystem_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/input_selector_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/input_switch_2400_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/input_system_ctrl_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/irq_controller_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/isp2401_mamoiada_params.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/isp_acquisition_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/isp_capture_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/timed_controller_defs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/hrt/var.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_system/spmem_dump.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_trace.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/debug_global.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/gdc_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/gp_device_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/hmem_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_local.h
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_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_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/gp_timer_local.h
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_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_local.h
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_local.h
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_local.h
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_formatter_global.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/isp_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/system_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/timed_ctrl_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/vamem_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/assert_support.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/bitop_support.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/csi_rx.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/debug.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/dma.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/error_support.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/event_fifo.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/fifo_monitor.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/gdc_device.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/gp_device.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/gp_timer.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/gpio.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/hmem.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/gp_timer_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/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/mmu_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/tag_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/host/vamem_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/ibuf_ctrl.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/input_formatter.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/input_system.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/irq.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/isp.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/isys_dma.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/isys_stream2mmio.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.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/mmu_device.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/pixelgen.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/print_support.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/queue.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/resource.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/socket.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/sp.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_include/system_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/tag.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/timed_ctrl.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/vamem.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/vmem.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/queue_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/sw_event_global.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/tag_global.h
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.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_event_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frac.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_host_data.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_pipe.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_prbs.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_tpg.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_version_data.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_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_1.0/ia_css_anr_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr_types.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_anr2_types.h
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/bh/bh_2/ia_css_bh_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh_types.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/bnlm/ia_css_bnlm_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm_types.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/bnr2_2/ia_css_bnr2_2_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.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/bnr/bnr_1.0/ia_css_bnr_param.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/cnr/cnr_2/ia_css_cnr2_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2_types.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/conversion/conversion_1.0/ia_css_conversion_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion_types.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/copy_output/copy_output_1.0/ia_css_copy_output_param.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/crop/crop_1.0/ia_css_crop_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_types.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/csc/csc_1.0/ia_css_csc_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc_types.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/ctc1_5/ia_css_ctc1_5_param.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_param.h
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_param.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/ctc/ctc_1.0/ia_css_ctc_types.h
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_param.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_1.0/ia_css_de_types.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/de/de_2/ia_css_de2_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/de/de_2/ia_css_de2_types.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/dp/dp_1.0/ia_css_dp_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dp/dp_1.0/ia_css_dp_types.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/dpc2/ia_css_dpc2_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dpc2/ia_css_dpc2_types.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/dvs/dvs_1.0/ia_css_dvs_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/dvs/dvs_1.0/ia_css_dvs_types.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_param.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/fc/fc_1.0/ia_css_formats_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fc/fc_1.0/ia_css_formats_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fixedbds/fixedbds_1.0/ia_css_fixedbds_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fixedbds/fixedbds_1.0/ia_css_fixedbds_types.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/fpn/fpn_1.0/ia_css_fpn_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.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_param.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_1.0/ia_css_gc_types.h
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_param.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/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/io_ls/common/ia_css_common_io_types.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/common/ia_css_common_io_types.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_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5_types.h
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_param.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/macc/macc_1.0/ia_css_macc_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/norm/norm_1.0/ia_css_norm.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/norm/norm_1.0/ia_css_norm_param.h
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/ob2/ia_css_ob2_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob2/ia_css_ob2_types.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/ob/ob_1.0/ia_css_ob_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ob/ob_1.0/ia_css_ob_types.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/output/output_1.0/ia_css_output_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/output/output_1.0/ia_css_output_types.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/qplane/qplane_2/ia_css_qplane_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/qplane/qplane_2/ia_css_qplane_types.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/raw_1.0/ia_css_raw_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw_types.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/ref/ref_1.0/ia_css_ref_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_state.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_types.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_param.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_param.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/tdf/tdf_1.0/ia_css_tdf_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_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/tnr/tnr_1.0/ia_css_tnr_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_state.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.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/vf/vf_1.0/ia_css_vf_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_types.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/wb/wb_1.0/ia_css_wb_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb_types.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_param.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/xnr/xnr_3.0/ia_css_xnr3_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.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_param.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_1.0/ia_css_ynr_types.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/kernels/ynr/ynr_2/ia_css_ynr2_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ynr/ynr_2/ia_css_ynr2_types.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/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/interface/ia_css_bufq_comm.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_comm.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c
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/interface/ia_css_isp_param_types.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/csi_rx_rmgr.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.h
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_dma_rmgr.h
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/isys_stream2mmio_rmgr.h
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/isys/src/virtual_isys.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline_common.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/interface/ia_css_queue_comm.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/interface/ia_css_spctrl_comm.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/src/spctrl.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/tagger/interface/ia_css_tagger_common.h
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_frac.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_metrics.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c
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_struct.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_uds.h
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c
drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.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_custom_host_hrt.h
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_bo.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/pci/atomisp2/mmu/sh_mmu_mrfld.c
drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c

index f2991fbcb1d608f4199ac21a5fda613a2df24043..404dc5187749c7a958b4ee215f4b360cd77bcf74 100644 (file)
@@ -239,6 +239,7 @@ static int gc0310_write_reg_array(struct i2c_client *client,
 
        return __gc0310_flush_reg_array(client, &ctrl);
 }
+
 static int gc0310_g_focal(struct v4l2_subdev *sd, s32 *val)
 {
        *val = (GC0310_FOCAL_LENGTH_NUM << 16) | GC0310_FOCAL_LENGTH_DEM;
@@ -499,6 +500,7 @@ static long gc0310_s_exposure(struct v4l2_subdev *sd,
        /* we should not accept the invalid value below. */
        if (gain == 0) {
                struct i2c_client *client = v4l2_get_subdevdata(sd);
+
                v4l2_err(client, "%s: invalid value\n", __func__);
                return -EINVAL;
        }
@@ -520,7 +522,6 @@ static int gc0310_h_flip(struct v4l2_subdev *sd, s32 value)
 
 static long gc0310_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
 {
-
        switch (cmd) {
        case ATOMISP_IOC_S_EXPOSURE:
                return gc0310_s_exposure(sd, arg);
@@ -734,6 +735,7 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag)
 {
        int ret = 0;
        struct gc0310_device *dev = to_gc0310_sensor(sd);
+
        if (!dev || !dev->platform_data)
                return -ENODEV;
 
@@ -783,7 +785,6 @@ static int gpio_ctrl(struct v4l2_subdev *sd, bool flag)
        return ret;
 }
 
-
 static int power_down(struct v4l2_subdev *sd);
 
 static int power_up(struct v4l2_subdev *sd)
@@ -867,6 +868,7 @@ static int power_down(struct v4l2_subdev *sd)
 static int gc0310_s_power(struct v4l2_subdev *sd, int on)
 {
        int ret;
+
        if (on == 0)
                return power_down(sd);
        else {
@@ -899,9 +901,9 @@ static int distance(struct gc0310_resolution *res, u32 w, u32 h)
        h_ratio = (res->height << 13) / h;
        if (h_ratio == 0)
                return -1;
-       match   = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
+       match   = abs(((w_ratio << 13) / h_ratio) - 8192);
 
-       if ((w_ratio < (int)8192) || (h_ratio < (int)8192)  ||
+       if ((w_ratio < 8192) || (h_ratio < 8192)  ||
                (match > LARGEST_ALLOWED_RATIO_MISMATCH))
                return -1;
 
@@ -947,7 +949,6 @@ static int get_resolution_index(int w, int h)
        return -1;
 }
 
-
 /* TODO: remove it. */
 static int startup(struct v4l2_subdev *sd)
 {
@@ -977,6 +978,7 @@ static int gc0310_set_fmt(struct v4l2_subdev *sd,
        struct camera_mipi_info *gc0310_info = NULL;
        int ret = 0;
        int idx = 0;
+
        pr_info("%s S\n", __func__);
 
        if (format->pad)
@@ -1015,7 +1017,7 @@ static int gc0310_set_fmt(struct v4l2_subdev *sd,
                return -EINVAL;
        }
 
-       printk("%s: before gc0310_write_reg_array %s\n", __FUNCTION__,
+       printk("%s: before gc0310_write_reg_array %s\n", __func__,
               gc0310_res[dev->fmt_idx].desc);
        ret = startup(sd);
        if (ret) {
@@ -1079,7 +1081,7 @@ static int gc0310_detect(struct i2c_client *client)
                dev_err(&client->dev, "read sensor_id_low failed\n");
                return -ENODEV;
        }
-       id = ((((u16) high) << 8) | (u16) low);
+       id = ((((u16)high) << 8) | (u16)low);
        pr_info("sensor ID = 0x%x\n", id);
 
        if (id != GC0310_ID) {
@@ -1140,7 +1142,6 @@ static int gc0310_s_stream(struct v4l2_subdev *sd, int enable)
        return ret;
 }
 
-
 static int gc0310_s_config(struct v4l2_subdev *sd,
                           int irq, void *platform_data)
 {
@@ -1241,10 +1242,8 @@ static int gc0310_enum_frame_size(struct v4l2_subdev *sd,
        fse->max_height = gc0310_res[index].height;
 
        return 0;
-
 }
 
-
 static int gc0310_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
 {
        struct gc0310_device *dev = to_gc0310_sensor(sd);
@@ -1288,6 +1287,7 @@ static int gc0310_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct gc0310_device *dev = to_gc0310_sensor(sd);
+
        dev_dbg(&client->dev, "gc0310_remove...\n");
 
        dev->platform_data->csi_cfg(sd, 0);
@@ -1315,7 +1315,7 @@ static int gc0310_probe(struct i2c_client *client)
        mutex_init(&dev->input_lock);
 
        dev->fmt_idx = 0;
-       v4l2_i2c_subdev_init(&(dev->sd), client, &gc0310_ops);
+       v4l2_i2c_subdev_init(&dev->sd, client, &gc0310_ops);
 
        pdata = gmin_camera_platform_data(&dev->sd,
                                          ATOMISP_INPUT_FORMAT_RAW_8,
index 4b6b6568b3cf352fc9dfe7e52849be324c0fc35d..b7f2e7b494bbdbc138f912aef42f406297f3f0f3 100644 (file)
@@ -168,6 +168,7 @@ static int __gc2235_buf_reg_array(struct i2c_client *client,
 
        return 0;
 }
+
 static int __gc2235_write_reg_is_consecutive(struct i2c_client *client,
                                             struct gc2235_write_ctrl *ctrl,
                                             const struct gc2235_reg *next)
@@ -177,6 +178,7 @@ static int __gc2235_write_reg_is_consecutive(struct i2c_client *client,
 
        return ctrl->buffer.addr + ctrl->index == next->reg;
 }
+
 static int gc2235_write_reg_array(struct i2c_client *client,
                                  const struct gc2235_reg *reglist)
 {
@@ -238,7 +240,6 @@ static int gc2235_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
        return 0;
 }
 
-
 static int gc2235_get_intg_factor(struct i2c_client *client,
                                struct camera_mipi_info *info,
                                const struct gc2235_resolution *res)
@@ -355,6 +356,7 @@ static long __gc2235_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        u16 coarse_integration = (u16)coarse_itg;
        int ret = 0;
        u16 expo_coarse_h, expo_coarse_l, gain_val = 0xF0, gain_val2 = 0xF0;
+
        expo_coarse_h = coarse_integration >> 8;
        expo_coarse_l = coarse_integration & 0xff;
 
@@ -382,7 +384,6 @@ static long __gc2235_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        return ret;
 }
 
-
 static int gc2235_set_exposure(struct v4l2_subdev *sd, int exposure,
        int gain, int digitgain)
 {
@@ -406,12 +407,14 @@ static long gc2235_s_exposure(struct v4l2_subdev *sd,
        /* we should not accept the invalid value below. */
        if (gain == 0) {
                struct i2c_client *client = v4l2_get_subdevdata(sd);
+
                v4l2_err(client, "%s: invalid value\n", __func__);
                return -EINVAL;
        }
 
        return gc2235_set_exposure(sd, exp, gain, digitgain);
 }
+
 static long gc2235_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
 {
        switch (cmd) {
@@ -422,6 +425,7 @@ static long gc2235_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
        }
        return 0;
 }
+
 /* This returns the exposure time being used. This should only be used
  * for filling in EXIF data, not for actual image processing.
  */
@@ -739,6 +743,7 @@ static int startup(struct v4l2_subdev *sd)
        struct gc2235_device *dev = to_gc2235_sensor(sd);
        struct i2c_client *client = v4l2_get_subdevdata(sd);
        int ret = 0;
+
        if (is_init == 0) {
                /* force gc2235 to do a reset in res change, otherwise it
                * can not output normal after switching res. and it is not
@@ -764,7 +769,6 @@ static int gc2235_set_fmt(struct v4l2_subdev *sd,
                          struct v4l2_subdev_pad_config *cfg,
                          struct v4l2_subdev_format *format)
 {
-
        struct v4l2_mbus_framefmt *fmt = &format->format;
        struct gc2235_device *dev = to_gc2235_sensor(sd);
        struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -873,6 +877,7 @@ static int gc2235_s_stream(struct v4l2_subdev *sd, int enable)
        struct gc2235_device *dev = to_gc2235_sensor(sd);
        struct i2c_client *client = v4l2_get_subdevdata(sd);
        int ret;
+
        mutex_lock(&dev->input_lock);
 
        if (enable)
@@ -884,7 +889,6 @@ static int gc2235_s_stream(struct v4l2_subdev *sd, int enable)
        return ret;
 }
 
-
 static int gc2235_s_config(struct v4l2_subdev *sd,
                           int irq, void *platform_data)
 {
@@ -983,7 +987,6 @@ static int gc2235_enum_frame_size(struct v4l2_subdev *sd,
        fse->max_height = gc2235_res[index].height;
 
        return 0;
-
 }
 
 static int gc2235_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
@@ -1029,6 +1032,7 @@ static int gc2235_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct gc2235_device *dev = to_gc2235_sensor(sd);
+
        dev_dbg(&client->dev, "gc2235_remove...\n");
 
        dev->platform_data->csi_cfg(sd, 0);
@@ -1055,7 +1059,7 @@ static int gc2235_probe(struct i2c_client *client)
        mutex_init(&dev->input_lock);
 
        dev->fmt_idx = 0;
-       v4l2_i2c_subdev_init(&(dev->sd), client, &gc2235_ops);
+       v4l2_i2c_subdev_init(&dev->sd, client, &gc2235_ops);
 
        gcpdev = gmin_camera_platform_data(&dev->sd,
                                   ATOMISP_INPUT_FORMAT_RAW_10,
index 81e5ec0c2b64ca65558ff8cbc85eb274a3f7c485..1d8db57812aceb1367bc5327f26805390a418c50 100644 (file)
 
 /* Tagged binary data container structure definitions. */
 struct tbd_header {
-       uint32_t tag;          /*!< Tag identifier, also checks endianness */
-       uint32_t size;         /*!< Container size including this header */
-       uint32_t version;      /*!< Version, format 0xYYMMDDVV */
-       uint32_t revision;     /*!< Revision, format 0xYYMMDDVV */
-       uint32_t config_bits;  /*!< Configuration flag bits set */
-       uint32_t checksum;     /*!< Global checksum, header included */
+       u32 tag;          /*!< Tag identifier, also checks endianness */
+       u32 size;         /*!< Container size including this header */
+       u32 version;      /*!< Version, format 0xYYMMDDVV */
+       u32 revision;     /*!< Revision, format 0xYYMMDDVV */
+       u32 config_bits;  /*!< Configuration flag bits set */
+       u32 checksum;     /*!< Global checksum, header included */
 } __packed;
 
 struct tbd_record_header {
-       uint32_t size;        /*!< Size of record including header */
-       uint8_t format_id;    /*!< tbd_format_t enumeration values used */
-       uint8_t packing_key;  /*!< Packing method; 0 = no packing */
-       uint16_t class_id;    /*!< tbd_class_t enumeration values used */
+       u32 size;        /*!< Size of record including header */
+       u8 format_id;    /*!< tbd_format_t enumeration values used */
+       u8 packing_key;  /*!< Packing method; 0 = no packing */
+       u16 class_id;    /*!< tbd_class_t enumeration values used */
 } __packed;
 
 struct tbd_data_record_header {
-       uint16_t next_offset;
-       uint16_t flags;
-       uint16_t data_offset;
-       uint16_t data_size;
+       u16 next_offset;
+       u16 flags;
+       u16 data_offset;
+       u16 data_size;
 } __packed;
 
 #define TBD_CLASS_DRV_ID 2
@@ -58,7 +58,8 @@ static int set_msr_configuration(struct i2c_client *client, uint8_t *bufptr,
         * followed by lobyte) where the remaining data in the sequence
         * will be written. */
 
-       uint8_t *ptr = bufptr;
+       u8 *ptr = bufptr;
+
        while (ptr < bufptr + size) {
                struct i2c_msg msg = {
                        .addr = client->addr,
@@ -88,7 +89,7 @@ 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)
 {
-       uint8_t *endptr8 = buffer + size;
+       u8 *endptr8 = buffer + size;
        struct tbd_data_record_header *header =
                (struct tbd_data_record_header *)buffer;
 
@@ -170,6 +171,7 @@ int load_msr_list(struct i2c_client *client, char *name,
                const struct firmware **fw)
 {
        int ret = request_firmware(fw, name, &client->dev);
+
        if (ret) {
                dev_err(&client->dev,
                        "Error %d while requesting firmware %s\n",
index 7098bf317f16420449610ad587f4048269362fb8..7edaf50a6febdc94f36bbf6f1d8c83b82f61352d 100644 (file)
 #define LM3554_CURRENT_LIMIT_SHIFT     5
 
 #define LM3554_FLAGS_REG               0xD0
-#define LM3554_FLAG_TIMEOUT            (1 << 0)
-#define LM3554_FLAG_THERMAL_SHUTDOWN   (1 << 1)
-#define LM3554_FLAG_LED_FAULT          (1 << 2)
-#define LM3554_FLAG_TX1_INTERRUPT      (1 << 3)
-#define LM3554_FLAG_TX2_INTERRUPT      (1 << 4)
-#define LM3554_FLAG_LED_THERMAL_FAULT  (1 << 5)
-#define LM3554_FLAG_UNUSED             (1 << 6)
-#define LM3554_FLAG_INPUT_VOLTAGE_LOW  (1 << 7)
+#define LM3554_FLAG_TIMEOUT            BIT(0)
+#define LM3554_FLAG_THERMAL_SHUTDOWN   BIT(1)
+#define LM3554_FLAG_LED_FAULT          BIT(2)
+#define LM3554_FLAG_TX1_INTERRUPT      BIT(3)
+#define LM3554_FLAG_TX2_INTERRUPT      BIT(4)
+#define LM3554_FLAG_LED_THERMAL_FAULT  BIT(5)
+#define LM3554_FLAG_UNUSED             BIT(6)
+#define LM3554_FLAG_INPUT_VOLTAGE_LOW  BIT(7)
 
 #define LM3554_CONFIG_REG_1            0xE0
 #define LM3554_ENVM_TX2_SHIFT          5
@@ -881,7 +881,6 @@ static int lm3554_probe(struct i2c_client *client)
                                     NULL);
 
        if (flash->ctrl_handler.error) {
-
                dev_err(&client->dev, "ctrl_handler error.\n");
                goto fail2;
        }
index 8e180f903335962215abf92534034df027fd3f57..56e5ac0c5fa8f7e60ab8a31d6025e5654519a1ce 100644 (file)
@@ -73,8 +73,8 @@ mt9m114_read_reg(struct i2c_client *client, u16 data_length, u32 reg, u32 *val)
        msg[0].buf = data;
 
        /* high byte goes out first */
-       data[0] = (u16) (reg >> 8);
-       data[1] = (u16) (reg & 0xff);
+       data[0] = (u16)(reg >> 8);
+       data[1] = (u16)(reg & 0xff);
 
        msg[1].addr = client->addr;
        msg[1].len = data_length;
@@ -239,7 +239,6 @@ misensor_rmw_reg(struct i2c_client *client, u16 data_length, u16 reg,
        return 0;
 }
 
-
 static int __mt9m114_flush_reg_array(struct i2c_client *client,
                                     struct mt9m114_write_ctrl *ctrl)
 {
@@ -428,12 +427,12 @@ static int mt9m114_wait_state(struct i2c_client *client, int timeout)
        }
 
        return -EINVAL;
-
 }
 
 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);
 }
@@ -499,7 +498,7 @@ static int power_up(struct v4l2_subdev *sd)
        struct i2c_client *client = v4l2_get_subdevdata(sd);
        int ret;
 
-       if (NULL == dev->platform_data) {
+       if (!dev->platform_data) {
                dev_err(&client->dev, "no camera_sensor_platform_data");
                return -ENODEV;
        }
@@ -541,7 +540,7 @@ static int power_down(struct v4l2_subdev *sd)
        struct i2c_client *client = v4l2_get_subdevdata(sd);
        int ret;
 
-       if (NULL == dev->platform_data) {
+       if (!dev->platform_data) {
                dev_err(&client->dev, "no camera_sensor_platform_data");
                return -ENODEV;
        }
@@ -704,9 +703,9 @@ static int mt9m114_res2size(struct v4l2_subdev *sd, int *h_size, int *v_size)
                return -EINVAL;
        }
 
-       if (h_size != NULL)
+       if (h_size)
                *h_size = hsize;
-       if (v_size != NULL)
+       if (v_size)
                *v_size = vsize;
 
        return 0;
@@ -720,7 +719,7 @@ static int mt9m114_get_intg_factor(struct i2c_client *client,
        u32 reg_val;
        int ret;
 
-       if (info == NULL)
+       if (!info)
                return -EINVAL;
 
        ret =  mt9m114_read_reg(client, MISENSOR_32BIT,
@@ -807,6 +806,7 @@ static int mt9m114_get_fmt(struct v4l2_subdev *sd,
        struct v4l2_mbus_framefmt *fmt = &format->format;
        int width, height;
        int ret;
+
        if (format->pad)
                return -EINVAL;
        fmt->code = MEDIA_BUS_FMT_SGRBG10_1X10;
@@ -833,13 +833,14 @@ static int mt9m114_set_fmt(struct v4l2_subdev *sd,
        struct camera_mipi_info *mt9m114_info = NULL;
 
        int ret;
+
        if (format->pad)
                return -EINVAL;
        dev->streamon = 0;
        dev->first_exp = MT9M114_DEFAULT_FIRST_EXP;
 
        mt9m114_info = v4l2_get_subdev_hostdata(sd);
-       if (mt9m114_info == NULL)
+       if (!mt9m114_info)
                return -EINVAL;
 
        mt9m114_try_res(&width, &height);
@@ -964,6 +965,7 @@ static int mt9m114_g_hflip(struct v4l2_subdev *sd, s32 *val)
        struct i2c_client *c = v4l2_get_subdevdata(sd);
        int ret;
        u32 data;
+
        ret = mt9m114_read_reg(c, MISENSOR_16BIT,
                        (u32)MISENSOR_READ_MODE, &data);
        if (ret)
@@ -1082,7 +1084,6 @@ static long mt9m114_s_exposure(struct v4l2_subdev *sd,
 
 static long mt9m114_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
 {
-
        switch (cmd) {
        case ATOMISP_IOC_S_EXPOSURE:
                return mt9m114_s_exposure(sd, arg);
@@ -1110,6 +1111,7 @@ static int mt9m114_g_exposure(struct v4l2_subdev *sd, s32 *value)
        *value = coarse;
        return 0;
 }
+
 #ifndef CSS15
 /*
  * This function will return the sensor supported max exposure zone number.
@@ -1563,7 +1565,7 @@ mt9m114_s_config(struct v4l2_subdev *sd, int irq, void *platform_data)
        struct i2c_client *client = v4l2_get_subdevdata(sd);
        int ret;
 
-       if (NULL == platform_data)
+       if (!platform_data)
                return -ENODEV;
 
        dev->platform_data =
@@ -1738,7 +1740,6 @@ static int mt9m114_enum_frame_size(struct v4l2_subdev *sd,
                                   struct v4l2_subdev_pad_config *cfg,
                                   struct v4l2_subdev_frame_size_enum *fse)
 {
-
        unsigned int index = fse->index;
 
        if (index >= N_RES)
@@ -1757,7 +1758,7 @@ static int mt9m114_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
        int index;
        struct mt9m114_device *snr = to_mt9m114_sensor(sd);
 
-       if (frames == NULL)
+       if (!frames)
                return -EINVAL;
 
        for (index = 0; index < N_RES; index++) {
index bba3d17459084c7b15714150318568a8107f8ba8..89169da512346ccda956374207b353b7a6c4e1ae 100644 (file)
@@ -34,8 +34,8 @@
 
 #include "ov2680.h"
 
-static int h_flag = 0;
-static int v_flag = 0;
+static int h_flag;
+static int v_flag;
 static enum atomisp_bayer_order ov2680_bayer_order_mapping[] = {
        atomisp_bayer_order_bggr,
        atomisp_bayer_order_grbg,
@@ -64,7 +64,7 @@ static int ov2680_read_reg(struct i2c_client *client,
                return -EINVAL;
        }
 
-       memset(msg, 0 , sizeof(msg));
+       memset(msg, 0, sizeof(msg));
 
        msg[0].addr = client->addr;
        msg[0].flags = 0;
@@ -235,6 +235,7 @@ static int ov2680_write_reg_array(struct i2c_client *client,
        const struct ov2680_reg *next = reglist;
        struct ov2680_write_ctrl ctrl;
        int err;
+
        dev_dbg(&client->dev,  "++++write reg array\n");
        ctrl.index = 0;
        for (; next->type != OV2680_TOK_TERM; next++) {
@@ -250,7 +251,7 @@ 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)) {
                                err = __ov2680_flush_reg_array(client, &ctrl);
@@ -269,9 +270,9 @@ static int ov2680_write_reg_array(struct i2c_client *client,
 
        return __ov2680_flush_reg_array(client, &ctrl);
 }
+
 static int ov2680_g_focal(struct v4l2_subdev *sd, s32 *val)
 {
-
        *val = (OV2680_FOCAL_LENGTH_NUM << 16) | OV2680_FOCAL_LENGTH_DEM;
        return 0;
 }
@@ -296,6 +297,7 @@ static int ov2680_g_bin_factor_x(struct v4l2_subdev *sd, s32 *val)
 {
        struct ov2680_device *dev = to_ov2680_sensor(sd);
        struct i2c_client *client = v4l2_get_subdevdata(sd);
+
        dev_dbg(&client->dev,  "++++ov2680_g_bin_factor_x\n");
        *val = ov2680_res[dev->fmt_idx].bin_factor_x;
 
@@ -312,7 +314,6 @@ static int ov2680_g_bin_factor_y(struct v4l2_subdev *sd, s32 *val)
        return 0;
 }
 
-
 static int ov2680_get_intg_factor(struct i2c_client *client,
                                struct camera_mipi_info *info,
                                const struct ov2680_resolution *res)
@@ -323,6 +324,7 @@ static int ov2680_get_intg_factor(struct i2c_client *client,
        unsigned int pix_clk_freq_hz;
        u16 reg_val;
        int ret;
+
        dev_dbg(&client->dev,  "++++ov2680_get_intg_factor\n");
        if (!info)
                return -EINVAL;
@@ -398,7 +400,7 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        struct i2c_client *client = v4l2_get_subdevdata(sd);
        struct ov2680_device *dev = to_ov2680_sensor(sd);
        u16 vts;
-       int ret,exp_val;
+       int ret, exp_val;
 
        dev_dbg(&client->dev,
                "+++++++__ov2680_set_exposure coarse_itg %d, gain %d, digitgain %d++\n",
@@ -408,7 +410,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);
@@ -417,7 +419,7 @@ static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
 
        /* Increase the VTS to match exposure + MARGIN */
        if (coarse_itg > vts - OV2680_INTEGRATION_TIME_MARGIN)
-               vts = (u16) coarse_itg + OV2680_INTEGRATION_TIME_MARGIN;
+               vts = (u16)coarse_itg + OV2680_INTEGRATION_TIME_MARGIN;
 
        ret = ov2680_write_reg(client, OV2680_16BIT, OV2680_TIMING_VTS_H, vts);
        if (ret) {
@@ -525,6 +527,7 @@ static long ov2680_s_exposure(struct v4l2_subdev *sd,
        /* we should not accept the invalid value below */
        if (analog_gain == 0) {
                struct i2c_client *client = v4l2_get_subdevdata(sd);
+
                v4l2_err(client, "%s: invalid value\n", __func__);
                return -EINVAL;
        }
@@ -533,13 +536,8 @@ static long ov2680_s_exposure(struct v4l2_subdev *sd,
        return ov2680_set_exposure(sd, coarse_itg, analog_gain, digital_gain);
 }
 
-
-
-
-
 static long ov2680_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
 {
-
        switch (cmd) {
        case ATOMISP_IOC_S_EXPOSURE:
                return ov2680_s_exposure(sd, arg);
@@ -607,6 +605,7 @@ static int ov2680_v_flip(struct v4l2_subdev *sd, s32 value)
        int ret;
        u16 val;
        u8 index;
+
        dev_dbg(&client->dev, "@%s: value:%d\n", __func__, value);
        ret = ov2680_read_reg(client, OV2680_8BIT, OV2680_FLIP_REG, &val);
        if (ret)
@@ -620,7 +619,7 @@ static int ov2680_v_flip(struct v4l2_subdev *sd, s32 value)
                        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];
@@ -638,6 +637,7 @@ static int ov2680_h_flip(struct v4l2_subdev *sd, s32 value)
        int ret;
        u16 val;
        u8 index;
+
        dev_dbg(&client->dev, "@%s: value:%d\n", __func__, value);
 
        ret = ov2680_read_reg(client, OV2680_8BIT, OV2680_MIRROR_REG, &val);
@@ -652,7 +652,7 @@ static int ov2680_h_flip(struct v4l2_subdev *sd, s32 value)
                        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];
@@ -846,6 +846,7 @@ static int power_ctrl(struct v4l2_subdev *sd, bool flag)
 {
        int ret = 0;
        struct ov2680_device *dev = to_ov2680_sensor(sd);
+
        if (!dev || !dev->platform_data)
                return -ENODEV;
 
@@ -973,7 +974,7 @@ static int ov2680_s_power(struct v4l2_subdev *sd, int on)
 {
        int ret;
 
-       if (on == 0){
+       if (on == 0) {
                ret = power_down(sd);
        } else {
                ret = power_up(sd);
@@ -1005,10 +1006,9 @@ static int distance(struct ov2680_resolution *res, u32 w, u32 h)
        h_ratio = (res->height << 13) / h;
        if (h_ratio == 0)
                return -1;
-       match   = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
-
+       match   = abs(((w_ratio << 13) / h_ratio) - 8192);
 
-       if ((w_ratio < (int)8192) || (h_ratio < (int)8192)  ||
+       if ((w_ratio < 8192) || (h_ratio < 8192)  ||
                (match > LARGEST_ALLOWED_RATIO_MISMATCH))
                return -1;
 
@@ -1064,6 +1064,7 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
        struct camera_mipi_info *ov2680_info = NULL;
        int ret = 0;
        int idx = 0;
+
        dev_dbg(&client->dev, "+++++ov2680_s_mbus_fmt+++++l\n");
        if (format->pad)
                return -EINVAL;
@@ -1123,7 +1124,7 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
        if (v_flag)
                ov2680_v_flip(sd, v_flag);
 
-       v4l2_info(client, "\n%s idx %d \n", __func__, dev->fmt_idx);
+       v4l2_info(client, "\n%s idx %d\n", __func__, dev->fmt_idx);
 
        /*ret = startup(sd);
         * if (ret)
@@ -1173,7 +1174,7 @@ static int ov2680_detect(struct i2c_client *client)
        }
        ret = ov2680_read_reg(client, OV2680_8BIT,
                                        OV2680_SC_CMMN_CHIP_ID_L, &low);
-       id = ((((u16) high) << 8) | (u16) low);
+       id = ((((u16)high) << 8) | (u16)low);
 
        if (id != OV2680_ID) {
                dev_err(&client->dev, "sensor ID error 0x%x\n", id);
@@ -1182,7 +1183,7 @@ static int ov2680_detect(struct i2c_client *client)
 
        ret = ov2680_read_reg(client, OV2680_8BIT,
                                        OV2680_SC_CMMN_SUB_ID, &high);
-       revision = (u8) high & 0x0f;
+       revision = (u8)high & 0x0f;
 
        dev_info(&client->dev, "sensor_revision id = 0x%x, rev= %d\n",
                 id, revision);
@@ -1197,10 +1198,10 @@ static int ov2680_s_stream(struct v4l2_subdev *sd, int enable)
        int ret;
 
        mutex_lock(&dev->input_lock);
-       if(enable )
-               dev_dbg(&client->dev, "ov2680_s_stream one \n");
+       if (enable)
+               dev_dbg(&client->dev, "ov2680_s_stream one\n");
        else
-               dev_dbg(&client->dev, "ov2680_s_stream off \n");
+               dev_dbg(&client->dev, "ov2680_s_stream off\n");
 
        ret = ov2680_write_reg(client, OV2680_8BIT, OV2680_SW_STREAM,
                                enable ? OV2680_START_STREAMING :
@@ -1220,7 +1221,6 @@ static int ov2680_s_stream(struct v4l2_subdev *sd, int enable)
        return ret;
 }
 
-
 static int ov2680_s_config(struct v4l2_subdev *sd,
                           int irq, void *platform_data)
 {
@@ -1319,7 +1319,6 @@ static int ov2680_enum_frame_size(struct v4l2_subdev *sd,
        fse->max_height = ov2680_res[index].height;
 
        return 0;
-
 }
 
 static int ov2680_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
@@ -1365,6 +1364,7 @@ static int ov2680_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov2680_device *dev = to_ov2680_sensor(sd);
+
        dev_dbg(&client->dev, "ov2680_remove...\n");
 
        dev->platform_data->csi_cfg(sd, 0);
@@ -1391,7 +1391,7 @@ static int ov2680_probe(struct i2c_client *client)
        mutex_init(&dev->input_lock);
 
        dev->fmt_idx = 0;
-       v4l2_i2c_subdev_init(&(dev->sd), client, &ov2680_ops);
+       v4l2_i2c_subdev_init(&dev->sd, client, &ov2680_ops);
 
        pdata = gmin_camera_platform_data(&dev->sd,
                                          ATOMISP_INPUT_FORMAT_RAW_10,
@@ -1399,7 +1399,7 @@ static int ov2680_probe(struct i2c_client *client)
        if (!pdata) {
                ret = -EINVAL;
                goto out_free;
-        }
+       }
 
        ret = ov2680_s_config(&dev->sd, client->irq, pdata);
        if (ret)
@@ -1438,11 +1438,11 @@ static int ov2680_probe(struct i2c_client *client)
        if (ret)
        {
                ov2680_remove(client);
-               dev_dbg(&client->dev, "+++ remove ov2680 \n");
+               dev_dbg(&client->dev, "+++ remove ov2680\n");
        }
        return ret;
 out_free:
-       dev_dbg(&client->dev, "+++ out free \n");
+       dev_dbg(&client->dev, "+++ out free\n");
        v4l2_device_unregister_subdev(&dev->sd);
        kfree(dev);
        return ret;
index a362eebd882f7b7b9c1252c5e37d60bbe8b5bf44..a85bbd02331de410b939001f85f25e459440e6e6 100644 (file)
@@ -55,7 +55,7 @@ static int ov2722_read_reg(struct i2c_client *client,
                return -EINVAL;
        }
 
-       memset(msg, 0 , sizeof(msg));
+       memset(msg, 0, sizeof(msg));
 
        msg[0].addr = client->addr;
        msg[0].flags = 0;
@@ -259,6 +259,7 @@ static int ov2722_write_reg_array(struct i2c_client *client,
 
        return __ov2722_flush_reg_array(client, &ctrl);
 }
+
 static int ov2722_g_focal(struct v4l2_subdev *sd, s32 *val)
 {
        *val = (OV2722_FOCAL_LENGTH_NUM << 16) | OV2722_FOCAL_LENGTH_DEM;
@@ -318,7 +319,7 @@ static int ov2722_get_intg_factor(struct i2c_client *client,
                return ret;
 
        pre_pll_clk_div = (pre_pll_clk_div & 0x70) >> 4;
-       if (0 == pre_pll_clk_div)
+       if (!pre_pll_clk_div)
                return -EINVAL;
 
        pll_multiplier = pll_multiplier & 0x7f;
@@ -481,6 +482,7 @@ static long ov2722_s_exposure(struct v4l2_subdev *sd,
        /* we should not accept the invalid value below. */
        if (gain == 0) {
                struct i2c_client *client = v4l2_get_subdevdata(sd);
+
                v4l2_err(client, "%s: invalid value\n", __func__);
                return -EINVAL;
        }
@@ -490,7 +492,6 @@ static long ov2722_s_exposure(struct v4l2_subdev *sd,
 
 static long ov2722_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
 {
-
        switch (cmd) {
        case ATOMISP_IOC_S_EXPOSURE:
                return ov2722_s_exposure(sd, arg);
@@ -540,6 +541,7 @@ static int ov2722_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
            container_of(ctrl->handler, struct ov2722_device, ctrl_handler);
        int ret = 0;
        unsigned int val;
+
        switch (ctrl->id) {
        case V4L2_CID_EXPOSURE_ABSOLUTE:
                ret = ov2722_q_exposure(&dev->sd, &ctrl->val);
@@ -768,6 +770,7 @@ static int power_down(struct v4l2_subdev *sd)
 static int ov2722_s_power(struct v4l2_subdev *sd, int on)
 {
        int ret;
+
        if (on == 0)
                return power_down(sd);
        else {
@@ -881,6 +884,7 @@ static int ov2722_set_fmt(struct v4l2_subdev *sd,
        struct camera_mipi_info *ov2722_info = NULL;
        int ret = 0;
        int idx;
+
        if (format->pad)
                return -EINVAL;
        if (!fmt)
@@ -919,6 +923,7 @@ static int ov2722_set_fmt(struct v4l2_subdev *sd,
        ret = startup(sd);
        if (ret) {
                int i = 0;
+
                dev_err(&client->dev, "ov2722 startup err, retry to power up\n");
                for (i = 0; i < OV2722_POWER_UP_RETRY_NUM; i++) {
                        dev_err(&client->dev,
@@ -953,6 +958,7 @@ err:
        mutex_unlock(&dev->input_lock);
        return ret;
 }
+
 static int ov2722_get_fmt(struct v4l2_subdev *sd,
                          struct v4l2_subdev_pad_config *cfg,
                          struct v4l2_subdev_format *format)
@@ -1000,7 +1006,7 @@ static int ov2722_detect(struct i2c_client *client)
 
        ret = ov2722_read_reg(client, OV2722_8BIT,
                                        OV2722_SC_CMMN_SUB_ID, &high);
-       revision = (u8) high & 0x0f;
+       revision = (u8)high & 0x0f;
 
        dev_dbg(&client->dev, "sensor_revision = 0x%x\n", revision);
        dev_dbg(&client->dev, "detect ov2722 success\n");
@@ -1122,10 +1128,8 @@ static int ov2722_enum_frame_size(struct v4l2_subdev *sd,
        fse->max_height = ov2722_res[index].height;
 
        return 0;
-
 }
 
-
 static int ov2722_g_skip_frames(struct v4l2_subdev *sd, u32 *frames)
 {
        struct ov2722_device *dev = to_ov2722_sensor(sd);
@@ -1169,6 +1173,7 @@ static int ov2722_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov2722_device *dev = to_ov2722_sensor(sd);
+
        dev_dbg(&client->dev, "ov2722_remove...\n");
 
        dev->platform_data->csi_cfg(sd, 0);
@@ -1187,6 +1192,7 @@ static int __ov2722_init_ctrl_handler(struct ov2722_device *dev)
 {
        struct v4l2_ctrl_handler *hdl;
        unsigned int i;
+
        hdl = &dev->ctrl_handler;
        v4l2_ctrl_handler_init(&dev->ctrl_handler, ARRAY_SIZE(ov2722_controls));
        for (i = 0; i < ARRAY_SIZE(ov2722_controls); i++)
@@ -1216,7 +1222,7 @@ static int ov2722_probe(struct i2c_client *client)
        mutex_init(&dev->input_lock);
 
        dev->fmt_idx = 0;
-       v4l2_i2c_subdev_init(&(dev->sd), client, &ov2722_ops);
+       v4l2_i2c_subdev_init(&dev->sd, client, &ov2722_ops);
 
        ovpdev = gmin_camera_platform_data(&dev->sd,
                                           ATOMISP_INPUT_FORMAT_RAW_10,
index 0743b3b2ea6657e3a1e992df5cb0847d0fecf05e..12f746e7828bbd885cb0ab7aab2a92ae864e9b23 100644 (file)
@@ -396,9 +396,9 @@ static struct gc0310_resolution gc0310_res_preview[] = {
                .regs = gc0310_VGA_30fps,
        },
 };
+
 #define N_RES_PREVIEW (ARRAY_SIZE(gc0310_res_preview))
 
 static struct gc0310_resolution *gc0310_res = gc0310_res_preview;
 static unsigned long N_RES = N_RES_PREVIEW;
 #endif
-
index 54bf7812b27a067b0a9ac71e0c8960719a019a65..bb104de61af9980c67df87a1d1c6e73fe23d342a 100644 (file)
@@ -286,6 +286,7 @@ static struct gc2235_reg const gc2235_init_settings[] = {
        { GC2235_8BIT, 0xfe, 0x00 }, /* switch to P0 */
        { GC2235_TOK_TERM, 0, 0 }
 };
+
 /*
  * Register settings for various resolution
  */
@@ -530,7 +531,6 @@ static struct gc2235_reg const gc2235_1616_1216_30fps[] = {
 };
 
 static struct gc2235_resolution gc2235_res_preview[] = {
-
        {
                .desc = "gc2235_1600_900_30fps",
                .width = 1600,
@@ -579,6 +579,7 @@ static struct gc2235_resolution gc2235_res_preview[] = {
        },
 
 };
+
 #define N_RES_PREVIEW (ARRAY_SIZE(gc2235_res_preview))
 
 /*
@@ -634,6 +635,7 @@ static struct gc2235_resolution gc2235_res_still[] = {
        },
 
 };
+
 #define N_RES_STILL (ARRAY_SIZE(gc2235_res_still))
 
 static struct gc2235_resolution gc2235_res_video[] = {
@@ -669,6 +671,7 @@ static struct gc2235_resolution gc2235_res_video[] = {
        },
 
 };
+
 #define N_RES_VIDEO (ARRAY_SIZE(gc2235_res_video))
 #endif
 
index c317214122dcc321d3f5c5d6863adb6bc2c61e7d..4283447fd76f1b661c5fbc11ccccbefd8ac96c8a 100644 (file)
@@ -53,8 +53,8 @@
 #define MISENSOR_TOK_POLL      0xfc00  /* token indicating poll instruction */
 #define MISENSOR_TOK_RMW       0x0010  /* RMW operation */
 #define MISENSOR_TOK_MASK      0xfff0
-#define MISENSOR_AWB_STEADY    (1<<0)  /* awb steady */
-#define MISENSOR_AE_READY      (1<<3)  /* ae status ready */
+#define MISENSOR_AWB_STEADY    BIT(0)  /* awb steady */
+#define MISENSOR_AE_READY      BIT(3)  /* ae status ready */
 
 /* mask to set sensor read_mode via misensor_rmw_reg */
 #define MISENSOR_R_MODE_MASK   0x0330
 #define MT9M114_COARSE_INTG_TIME_MIN 1
 #define MT9M114_COARSE_INTG_TIME_MAX_MARGIN 6
 
-
 /* ulBPat; */
 
-#define MT9M114_BPAT_RGRGGBGB  (1 << 0)
-#define MT9M114_BPAT_GRGRBGBG  (1 << 1)
-#define MT9M114_BPAT_GBGBRGRG  (1 << 2)
-#define MT9M114_BPAT_BGBGGRGR  (1 << 3)
+#define MT9M114_BPAT_RGRGGBGB  BIT(0)
+#define MT9M114_BPAT_GRGRBGBG  BIT(1)
+#define MT9M114_BPAT_GBGBRGRG  BIT(2)
+#define MT9M114_BPAT_BGBGGRGR  BIT(3)
 
 #define MT9M114_FOCAL_LENGTH_NUM       208     /*2.08mm*/
 #define MT9M114_FOCAL_LENGTH_DEM       100
@@ -169,6 +168,7 @@ enum {
        MT9M114_RES_864P,
        MT9M114_RES_960P,
 };
+
 #define MT9M114_RES_960P_SIZE_H                1296
 #define MT9M114_RES_960P_SIZE_V                976
 #define MT9M114_RES_720P_SIZE_H                1280
@@ -204,6 +204,7 @@ enum poll_reg {
        PRE_POLLING,
        POST_POLLING,
 };
+
 /*
  * struct misensor_reg - MI sensor  register format
  * @length: length of the register
@@ -388,6 +389,7 @@ static struct mt9m114_res_struct mt9m114_res[] = {
        .bin_mode = 0,
        },
 };
+
 #define N_RES (ARRAY_SIZE(mt9m114_res))
 
 #if 0 /* Currently unused */
@@ -795,6 +797,7 @@ static struct misensor_reg const mt9m114_common[] = {
        {MISENSOR_TOK_TERM, 0, 0},
 
 };
+
 #if 0 /* Currently unused */
 static struct misensor_reg const mt9m114_antiflicker_50hz[] = {
         {MISENSOR_16BIT,  0x098E, 0xC88B},
index bde2f148184dc753da6f61631bf61c6ad35e97a5..d216d827e573cfca578b27ce023533386a502401 100644 (file)
 #define OV2680_START_STREAMING                 0x01
 #define OV2680_STOP_STREAMING                  0x00
 
-
 #define OV2680_INVALID_CONFIG  0xffffffff
 
-
 struct regval_list {
        u16 reg_num;
        u8 value;
@@ -294,7 +292,6 @@ struct ov2680_format {
                {OV2680_TOK_TERM, 0, 0}
        };
 
-
 #if 0 /* None of the definitions below are used currently */
        /*
         * 176x144 30fps  VBlanking 1lane 10Bit (binning)
@@ -427,7 +424,6 @@ struct ov2680_format {
                {OV2680_TOK_TERM, 0, 0}
        };
 
-
        /*
         * 656x496 30fps  VBlanking 1lane 10Bit (binning)
         */
@@ -641,12 +637,12 @@ struct ov2680_format {
                {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[]= {
+       static struct ov2680_reg const ov2680_1456x1096_30fps[] = {
                {OV2680_8BIT, 0x3086, 0x00},
                {OV2680_8BIT, 0x3501, 0x48},
                {OV2680_8BIT, 0x3502, 0xe0},
@@ -773,7 +769,7 @@ struct ov2680_format {
                {OV2680_8BIT, 0x4009, 0x09},
                {OV2680_8BIT, 0x5081, 0x41},
                {OV2680_TOK_TERM, 0, 0}
-        };
+       };
 #endif
        /*
         * 1616x1216 30fps VBlanking 1lane 10Bit
@@ -821,7 +817,7 @@ struct ov2680_format {
        static struct ov2680_resolution ov2680_res_preview[] = {
        {
                .desc = "ov2680_1616x1216_30fps",
-               .width = 1616,
+               .width = 1616,
                .height = 1216,
                .pix_clk_freq = 66,
                .fps = 30,
@@ -834,7 +830,7 @@ struct ov2680_format {
                .skip_frames = 3,
                .regs = ov2680_1616x1216_30fps,
        },
-       {
+       {
                .desc = "ov2680_1616x916_30fps",
                .width = 1616,
                .height = 916,
@@ -850,6 +846,7 @@ struct ov2680_format {
                .regs = ov2680_1616x916_30fps,
        },
 };
+
 #define N_RES_PREVIEW (ARRAY_SIZE(ov2680_res_preview))
 
 static struct ov2680_resolution *ov2680_res = ov2680_res_preview;
index d99188a5c9d07f135348c4757c4ead946da5c605..1110d723968e8c6c4c24931046cbeef1fd2fb87d 100644 (file)
@@ -786,6 +786,7 @@ static struct ov2722_reg const ov2722_1452_1092_30fps[] = {
        {OV2722_8BIT, 0x3509, 0x00},
        {OV2722_TOK_TERM, 0, 0}
 };
+
 #if 0
 static struct ov2722_reg const ov2722_1M3_30fps[] = {
        {OV2722_8BIT, 0x3718, 0x10},
@@ -1152,6 +1153,7 @@ static struct ov2722_resolution ov2722_res_preview[] = {
                .mipi_freq = 345600,
        },
 };
+
 #define N_RES_PREVIEW (ARRAY_SIZE(ov2722_res_preview))
 
 /*
@@ -1209,6 +1211,7 @@ struct ov2722_resolution ov2722_res_still[] = {
                .mipi_freq = 345600,
        },
 };
+
 #define N_RES_STILL (ARRAY_SIZE(ov2722_res_still))
 
 struct ov2722_resolution ov2722_res_video[] = {
@@ -1260,6 +1263,7 @@ struct ov2722_resolution ov2722_res_video[] = {
                .mipi_freq = 345600,
        },
 };
+
 #define N_RES_VIDEO (ARRAY_SIZE(ov2722_res_video))
 #endif
 
index 4de44569fe542d79939fba68e5057e9a8e7e5cb6..c97ab24c5d2bd1220309570274cf0e4e42273c7e 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <linux/types.h>
 
-
 #define AD5823_VCM_ADDR        0x0c
 
 #define AD5823_REG_RESET               0x01
index 714297c36b3e97da463b6eba3c21c8c0e80a74fe..4a184400c7d7b5d99d3bc14912cec4499ddac2ac 100644 (file)
@@ -119,8 +119,7 @@ static int ad5823_i2c_read(struct i2c_client *client, u8 reg, u8 *val)
        return 0;
 }
 
-
-static const uint32_t ov5693_embedded_effective_size = 28;
+static const u32 ov5693_embedded_effective_size = 28;
 
 /* i2c read/write stuff */
 static int ov5693_read_reg(struct i2c_client *client,
@@ -413,6 +412,7 @@ static int ov5693_write_reg_array(struct i2c_client *client,
 
        return __ov5693_flush_reg_array(client, &ctrl);
 }
+
 static int ov5693_g_focal(struct v4l2_subdev *sd, s32 *val)
 {
        *val = (OV5693_FOCAL_LENGTH_NUM << 16) | OV5693_FOCAL_LENGTH_DEM;
@@ -463,7 +463,7 @@ static int ov5693_get_intg_factor(struct i2c_client *client,
        u16 reg_val;
        int ret;
 
-       if (info == NULL)
+       if (!info)
                return -EINVAL;
 
        /* pixel clock */
@@ -576,7 +576,7 @@ static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
        }
        /* Increase the VTS to match exposure + MARGIN */
        if (coarse_itg > vts - OV5693_INTEGRATION_TIME_MARGIN)
-               vts = (u16) coarse_itg + OV5693_INTEGRATION_TIME_MARGIN;
+               vts = (u16)coarse_itg + OV5693_INTEGRATION_TIME_MARGIN;
 
        ret = ov5693_write_reg(client, OV5693_8BIT,
                                OV5693_TIMING_VTS_H, (vts >> 8) & 0xFF);
@@ -718,7 +718,7 @@ static int ov5693_read_otp_reg_array(struct i2c_client *client, u16 size,
        u16 *pVal = NULL;
 
        for (index = 0; index <= size; index++) {
-               pVal = (u16 *) (buf + index);
+               pVal = (u16 *)(buf + index);
                ret =
                        ov5693_read_reg(client, OV5693_8BIT, addr + index,
                                    pVal);
@@ -873,12 +873,10 @@ out:
        priv->size = dev->otp_size;
 
        return 0;
-
 }
 
 static long ov5693_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
 {
-
        switch (cmd) {
        case ATOMISP_IOC_S_EXPOSURE:
                return ov5693_s_exposure(sd, arg);
@@ -1588,7 +1586,7 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd,
        if (!fmt)
                return -EINVAL;
        ov5693_info = v4l2_get_subdev_hostdata(sd);
-       if (ov5693_info == NULL)
+       if (!ov5693_info)
                return -EINVAL;
 
        mutex_lock(&dev->input_lock);
@@ -1624,7 +1622,7 @@ static int ov5693_set_fmt(struct v4l2_subdev *sd,
                for (i = 0; i < OV5693_POWER_UP_RETRY_NUM; i++) {
                        dev_err(&client->dev,
                                "ov5693 retry to power up %d/%d times, result: ",
-                               i+1, OV5693_POWER_UP_RETRY_NUM);
+                               i + 1, OV5693_POWER_UP_RETRY_NUM);
                        power_down(sd);
                        ret = power_up(sd);
                        if (!ret) {
@@ -1670,6 +1668,7 @@ err:
        mutex_unlock(&dev->input_lock);
        return ret;
 }
+
 static int ov5693_get_fmt(struct v4l2_subdev *sd,
                          struct v4l2_subdev_pad_config *cfg,
                          struct v4l2_subdev_format *format)
@@ -1709,7 +1708,7 @@ static int ov5693_detect(struct i2c_client *client)
        }
        ret = ov5693_read_reg(client, OV5693_8BIT,
                                        OV5693_SC_CMMN_CHIP_ID_L, &low);
-       id = ((((u16) high) << 8) | (u16) low);
+       id = ((((u16)high) << 8) | (u16)low);
 
        if (id != OV5693_ID) {
                dev_err(&client->dev, "sensor ID error 0x%x\n", id);
@@ -1718,7 +1717,7 @@ static int ov5693_detect(struct i2c_client *client)
 
        ret = ov5693_read_reg(client, OV5693_8BIT,
                                        OV5693_SC_CMMN_SUB_ID, &high);
-       revision = (u8) high & 0x0f;
+       revision = (u8)high & 0x0f;
 
        dev_dbg(&client->dev, "sensor_revision = 0x%x\n", revision);
        dev_dbg(&client->dev, "detect ov5693 success\n");
@@ -1742,7 +1741,6 @@ static int ov5693_s_stream(struct v4l2_subdev *sd, int enable)
        return ret;
 }
 
-
 static int ov5693_s_config(struct v4l2_subdev *sd,
                           int irq, void *platform_data)
 {
@@ -1750,7 +1748,7 @@ static int ov5693_s_config(struct v4l2_subdev *sd,
        struct i2c_client *client = v4l2_get_subdevdata(sd);
        int ret = 0;
 
-       if (platform_data == NULL)
+       if (!platform_data)
                return -ENODEV;
 
        dev->platform_data =
@@ -1846,7 +1844,6 @@ static int ov5693_enum_frame_size(struct v4l2_subdev *sd,
        fse->max_height = ov5693_res[index].height;
 
        return 0;
-
 }
 
 static const struct v4l2_subdev_video_ops ov5693_video_ops = {
@@ -1921,7 +1918,7 @@ static int ov5693_probe(struct i2c_client *client)
        mutex_init(&dev->input_lock);
 
        dev->fmt_idx = 0;
-       v4l2_i2c_subdev_init(&(dev->sd), client, &ov5693_ops);
+       v4l2_i2c_subdev_init(&dev->sd, client, &ov5693_ops);
 
        pdata = gmin_camera_platform_data(&dev->sd,
                                          ATOMISP_INPUT_FORMAT_RAW_10,
index bba99406785e35cb0a883b7f8a3e42cdf234a373..0189907969c6df3539b8bbb7166594061451788b 100644 (file)
@@ -36,7 +36,6 @@
  */
 #define ENABLE_NON_PREVIEW     0
 
-
 #define OV5693_POWER_UP_RETRY_NUM 5
 
 /* Defines for register writes and register array processing */
 #define OV5693_OTP_START_ADDR          0x3D00
 #define OV5693_OTP_END_ADDR            0x3D0F
 #define OV5693_OTP_DATA_SIZE           320
-#define OV5693_OTP_PROGRAM_REG         0x3D80
+#define OV5693_OTP_PROGRAM_REG         0x3D80
 #define OV5693_OTP_READ_REG            0x3D81  // 1:Enable 0:disable
 #define OV5693_OTP_BANK_REG            0x3D84  //otp bank and mode
 #define OV5693_OTP_READY_REG_DONE      1
@@ -586,7 +585,6 @@ static struct ov5693_reg const ov5693_1296x976[] = {
 
 };
 
-
 /*
  * 336x256 30fps 17ms VBlanking 2lane 10Bit (Scaling)
  DS from 2564x1956
@@ -675,7 +673,6 @@ static struct ov5693_reg const ov5693_192x160[] = {
        {OV5693_TOK_TERM, 0, 0}
 };
 
-
 static struct ov5693_reg const ov5693_736x496[] = {
        {OV5693_8BIT, 0x3501, 0x3d},
        {OV5693_8BIT, 0x3502, 0x00},
@@ -865,7 +862,6 @@ static struct ov5693_reg const ov5693_1616x1216_30fps[] = {
        {OV5693_TOK_TERM, 0, 0}
 };
 
-
 /*
  * 1940x1096 30fps 8.8ms VBlanking 2lane 10bit (Scaling)
  */
@@ -1161,6 +1157,7 @@ static struct ov5693_resolution ov5693_res_preview[] = {
                .regs = ov5693_2576x1936_30fps,
        },
 };
+
 #define N_RES_PREVIEW (ARRAY_SIZE(ov5693_res_preview))
 
 /*
@@ -1240,6 +1237,7 @@ struct ov5693_resolution ov5693_res_still[] = {
                .regs = ov5693_2592x1944_30fps,
        },
 };
+
 #define N_RES_STILL (ARRAY_SIZE(ov5693_res_still))
 
 struct ov5693_resolution ov5693_res_video[] = {
@@ -1384,6 +1382,7 @@ struct ov5693_resolution ov5693_res_video[] = {
                .regs = ov5693_2592x1944_30fps,
        },
 };
+
 #define N_RES_VIDEO (ARRAY_SIZE(ov5693_res_video))
 #endif
 
index ebe193ba3871ce063dfc614852fb77e66e570cfb..e78e8a5cfb8688e8764873d39038de7b71fccd5f 100644 (file)
@@ -176,14 +176,14 @@ struct atomisp_3a_config {
 };
 
 struct atomisp_dvs_grid_info {
-       uint32_t enable;
-       uint32_t width;
-       uint32_t aligned_width;
-       uint32_t height;
-       uint32_t aligned_height;
-       uint32_t bqs_per_grid_cell;
-       uint32_t num_hor_coefs;
-       uint32_t num_ver_coefs;
+       u32 enable;
+       u32 width;
+       u32 aligned_width;
+       u32 height;
+       u32 aligned_height;
+       u32 bqs_per_grid_cell;
+       u32 num_hor_coefs;
+       u32 num_ver_coefs;
 };
 
 struct atomisp_dvs_envelop {
@@ -192,16 +192,16 @@ struct atomisp_dvs_envelop {
 };
 
 struct atomisp_grid_info {
-       uint32_t enable;
-       uint32_t use_dmem;
-       uint32_t has_histogram;
-       uint32_t s3a_width;
-       uint32_t s3a_height;
-       uint32_t aligned_width;
-       uint32_t aligned_height;
-       uint32_t s3a_bqs_per_grid_cell;
-       uint32_t deci_factor_log2;
-       uint32_t elem_bit_depth;
+       u32 enable;
+       u32 use_dmem;
+       u32 has_histogram;
+       u32 s3a_width;
+       u32 s3a_height;
+       u32 aligned_width;
+       u32 aligned_height;
+       u32 s3a_bqs_per_grid_cell;
+       u32 deci_factor_log2;
+       u32 elem_bit_depth;
 };
 
 struct atomisp_dis_vector {
@@ -209,7 +209,6 @@ struct atomisp_dis_vector {
        int y;
 };
 
-
 /* DVS 2.0 Coefficient types. This structure contains 4 pointers to
  *  arrays that contain the coeffients for each type.
  */
@@ -245,14 +244,14 @@ struct atomisp_dvs2_statistics {
 
 struct atomisp_dis_statistics {
        struct atomisp_dvs2_statistics dvs2_stat;
-       uint32_t exp_id;
+       u32 exp_id;
 };
 
 struct atomisp_3a_rgby_output {
-       uint32_t r;
-       uint32_t g;
-       uint32_t b;
-       uint32_t y;
+       u32 r;
+       u32 g;
+       u32 b;
+       u32 y;
 };
 
 /*
@@ -273,33 +272,33 @@ struct atomisp_metadata_with_type {
        /* to specify which type of metadata to get */
        enum atomisp_metadata_type type;
        void __user *data;
-       uint32_t width;
-       uint32_t height;
-       uint32_t stride; /* in bytes */
-       uint32_t exp_id; /* exposure ID */
-       uint32_t *effective_width; /* mipi packets valid data size */
+       u32 width;
+       u32 height;
+       u32 stride; /* in bytes */
+       u32 exp_id; /* exposure ID */
+       u32 *effective_width; /* mipi packets valid data size */
 };
 
 struct atomisp_metadata {
        void __user *data;
-       uint32_t width;
-       uint32_t height;
-       uint32_t stride; /* in bytes */
-       uint32_t exp_id; /* exposure ID */
-       uint32_t *effective_width; /* mipi packets valid data size */
+       u32 width;
+       u32 height;
+       u32 stride; /* in bytes */
+       u32 exp_id; /* exposure ID */
+       u32 *effective_width; /* mipi packets valid data size */
 };
 
 struct atomisp_ext_isp_ctrl {
-       uint32_t id;
-       uint32_t data;
+       u32 id;
+       u32 data;
 };
 
 struct atomisp_3a_statistics {
        struct atomisp_grid_info  grid_info;
        struct atomisp_3a_output __user *data;
        struct atomisp_3a_rgby_output __user *rgby_data;
-       uint32_t exp_id; /* exposure ID */
-       uint32_t isp_config_id; /* isp config ID */
+       u32 exp_id; /* exposure ID */
+       u32 isp_config_id; /* isp config ID */
 };
 
 /**
@@ -384,24 +383,24 @@ struct atomisp_xnr_config {
 
 /* metadata config */
 struct atomisp_metadata_config {
-       uint32_t metadata_height;
-       uint32_t metadata_stride;
+       u32 metadata_height;
+       u32 metadata_stride;
 };
 
 /*
  * Generic resolution structure.
  */
 struct atomisp_resolution {
-       uint32_t width;  /** Width */
-       uint32_t height; /** Height */
+       u32 width;  /** Width */
+       u32 height; /** Height */
 };
 
 /*
  * This specifies the coordinates (x,y)
  */
 struct atomisp_zoom_point {
-       int32_t x; /** x coordinate */
-       int32_t y; /** y coordinate */
+       s32 x; /** x coordinate */
+       s32 y; /** y coordinate */
 };
 
 /*
@@ -413,8 +412,8 @@ struct atomisp_zoom_region {
 };
 
 struct atomisp_dz_config {
-       uint32_t dx; /** Horizontal zoom factor */
-       uint32_t dy; /** Vertical zoom factor */
+       u32 dx; /** Horizontal zoom factor */
+       u32 dy; /** Vertical zoom factor */
        struct atomisp_zoom_region zoom_region; /** region for zoom */
 };
 
@@ -454,19 +453,19 @@ struct atomisp_dvs2_bq_resolutions {
 };
 
 struct atomisp_dvs_6axis_config {
-       uint32_t exp_id;
-       uint32_t width_y;
-       uint32_t height_y;
-       uint32_t width_uv;
-       uint32_t height_uv;
-       uint32_t *xcoords_y;
-       uint32_t *ycoords_y;
-       uint32_t *xcoords_uv;
-       uint32_t *ycoords_uv;
+       u32 exp_id;
+       u32 width_y;
+       u32 height_y;
+       u32 width_uv;
+       u32 height_uv;
+       u32 *xcoords_y;
+       u32 *ycoords_y;
+       u32 *xcoords_uv;
+       u32 *ycoords_uv;
 };
 
 struct atomisp_formats_config {
-       uint32_t video_full_range_flag;
+       u32 video_full_range_flag;
 };
 
 struct atomisp_parameters {
@@ -543,7 +542,7 @@ struct atomisp_parameters {
         * Unique ID to track which config was actually applied to a particular
         * frame, driver will send this id back with output frame together.
         */
-       uint32_t        isp_config_id;
+       u32     isp_config_id;
 
        /*
         * Switch to control per_frame setting:
@@ -551,7 +550,7 @@ struct atomisp_parameters {
         * 1: this is a per_frame setting
         * PLEASE KEEP THIS AT THE END OF THE STRUCTURE!!
         */
-       uint32_t        per_frame_setting;
+       u32     per_frame_setting;
 };
 
 #define ATOMISP_GAMMA_TABLE_SIZE        1024
@@ -574,7 +573,7 @@ struct atomisp_morph_table {
 };
 
 #define ATOMISP_NUM_SC_COLORS  4
-#define ATOMISP_SC_FLAG_QUERY  (1 << 0)
+#define ATOMISP_SC_FLAG_QUERY  BIT(0)
 
 struct atomisp_shading_table {
        __u32 enable;
@@ -669,9 +668,9 @@ struct atomisp_sensor_mode_data {
        unsigned int crop_vertical_end;
        unsigned int output_width; /* input size to ISP after binning/scaling */
        unsigned int output_height;
-       uint8_t binning_factor_x; /* horizontal binning factor used */
-       uint8_t binning_factor_y; /* vertical binning factor used */
-       uint16_t hts;
+       u8 binning_factor_x; /* horizontal binning factor used */
+       u8 binning_factor_y; /* vertical binning factor used */
+       u16 hts;
 };
 
 struct atomisp_exposure {
@@ -696,8 +695,8 @@ enum atomisp_focus_hp {
 };
 
 /* Masks */
-#define ATOMISP_FOCUS_STATUS_MOVING           (1U << 0)
-#define ATOMISP_FOCUS_STATUS_ACCEPTS_NEW_MOVE (1U << 1)
+#define ATOMISP_FOCUS_STATUS_MOVING           BIT(0)
+#define ATOMISP_FOCUS_STATUS_ACCEPTS_NEW_MOVE BIT(1)
 #define ATOMISP_FOCUS_STATUS_HOME_POSITION    (3U << 2)
 
 enum atomisp_camera_port {
@@ -887,6 +886,7 @@ struct atomisp_acc_fw_load_to_pipe {
        __u32 type;                     /* Binary type */
        __u32 reserved[3];              /* Set to zero */
 };
+
 /*
  * Set Senor run mode
  */
@@ -894,12 +894,12 @@ struct atomisp_s_runmode {
        __u32 mode;
 };
 
-#define ATOMISP_ACC_FW_LOAD_FL_PREVIEW         (1 << 0)
-#define ATOMISP_ACC_FW_LOAD_FL_COPY            (1 << 1)
-#define ATOMISP_ACC_FW_LOAD_FL_VIDEO           (1 << 2)
-#define ATOMISP_ACC_FW_LOAD_FL_CAPTURE         (1 << 3)
-#define ATOMISP_ACC_FW_LOAD_FL_ACC             (1 << 4)
-#define ATOMISP_ACC_FW_LOAD_FL_ENABLE          (1 << 16)
+#define ATOMISP_ACC_FW_LOAD_FL_PREVIEW         BIT(0)
+#define ATOMISP_ACC_FW_LOAD_FL_COPY            BIT(1)
+#define ATOMISP_ACC_FW_LOAD_FL_VIDEO           BIT(2)
+#define ATOMISP_ACC_FW_LOAD_FL_CAPTURE         BIT(3)
+#define ATOMISP_ACC_FW_LOAD_FL_ACC             BIT(4)
+#define ATOMISP_ACC_FW_LOAD_FL_ENABLE          BIT(16)
 
 #define ATOMISP_ACC_FW_LOAD_TYPE_NONE          0 /* Normal binary: don't use */
 #define ATOMISP_ACC_FW_LOAD_TYPE_OUTPUT                1 /* Stage on output */
@@ -1285,8 +1285,8 @@ struct atomisp_sensor_ae_bracketing_lut {
 
 /* Query sensor's 2A status */
 #define V4L2_CID_2A_STATUS                 (V4L2_CID_CAMERA_LASTP1 + 18)
-#define V4L2_2A_STATUS_AE_READY            (1 << 0)
-#define V4L2_2A_STATUS_AWB_READY           (1 << 1)
+#define V4L2_2A_STATUS_AE_READY            BIT(0)
+#define V4L2_2A_STATUS_AWB_READY           BIT(1)
 
 #define V4L2_CID_FMT_AUTO                      (V4L2_CID_CAMERA_LASTP1 + 19)
 
index c52c56a17e17e135fbc706ed66021a4656e1a530..e701eac26e3cf7e21d7bd9f90e5bf7d3235e00cf 100644 (file)
 #include "atomisp_platform.h"
 
 int atomisp_register_i2c_module(struct v4l2_subdev *subdev,
-                                struct camera_sensor_platform_data *plat_data,
-                                enum intel_v4l2_subdev_type type);
+                               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);
 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);
+                     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,
index aa5e294e7b7dc5429c7e1867a99a0bd4df22ff1c..f363a7e2968d3ccdc018c609b836687bcaf68bb9 100644 (file)
@@ -106,8 +106,6 @@ enum atomisp_input_format {
 
 #define N_ATOMISP_INPUT_FORMAT (ATOMISP_INPUT_FORMAT_USER_DEF8 + 1)
 
-
-
 enum intel_v4l2_subdev_type {
        RAW_CAMERA = 1,
        SOC_CAMERA = 2,
@@ -228,13 +226,13 @@ struct camera_mipi_info {
        enum atomisp_bayer_order        raw_bayer_order;
        struct atomisp_sensor_mode_data data;
        enum atomisp_input_format       metadata_format;
-       uint32_t                        metadata_width;
-       uint32_t                        metadata_height;
-       const uint32_t                  *metadata_effective_width;
+       u32                             metadata_width;
+       u32                             metadata_height;
+       const u32                       *metadata_effective_width;
 };
 
-extern const struct atomisp_platform_data *atomisp_get_platform_data(void);
-extern const struct atomisp_camera_caps *atomisp_get_default_camera_caps(void);
+const struct atomisp_platform_data *atomisp_get_platform_data(void);
+const struct atomisp_camera_caps *atomisp_get_default_camera_caps(void);
 
 /* API from old platform_camera.h, new CPUID implementation */
 #define __IS_SOC(x) (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && \
index 8988b37943b3ab8df019f628246b39b30b477074..431b059e65f43f60a7744eb593cf3eef624a1745 100644 (file)
 struct i2c_client;
 struct firmware;
 
-extern int load_msr_list(struct i2c_client *client, char *path,
+int load_msr_list(struct i2c_client *client, char *path,
                const struct firmware **fw);
-extern int apply_msr_data(struct i2c_client *client, const struct firmware *fw);
-extern void release_msr_list(struct i2c_client *client,
+int apply_msr_data(struct i2c_client *client, const struct firmware *fw);
+void release_msr_list(struct i2c_client *client,
                const struct firmware *fw);
 
-
 #endif /* ifndef __LIBMSRLISTHELPER_H__ */
index 9276ce44d90706e72dcc0cfa8e7d4b666a0f4188..03a916ade531e17e8f9c9235aef7384098e30a52 100644 (file)
@@ -91,8 +91,8 @@
 #define LM3554_CLAMP_PERCENTAGE(val) \
        clamp(val, LM3554_MIN_PERCENT, LM3554_MAX_PERCENT)
 
-#define LM3554_VALUE_TO_PERCENT(v, step)     (((((unsigned long)(v))*(step))+50)/100)
-#define LM3554_PERCENT_TO_VALUE(p, step)     (((((unsigned long)(p))*100)+(step>>1))/(step))
+#define LM3554_VALUE_TO_PERCENT(v, step)     (((((unsigned long)(v)) * (step)) + 50) / 100)
+#define LM3554_PERCENT_TO_VALUE(p, step)     (((((unsigned long)(p)) * 100) + (step >> 1)) / (step))
 
 /* Product specific limits
  * TODO: get these from platform data */
 
 /* Flash brightness, input is percentage, output is [0..15] */
 #define LM3554_FLASH_STEP      \
-       ((100ul*(LM3554_MAX_PERCENT)+((LM3554_FLASH_MAX_LVL)>>1))/((LM3554_FLASH_MAX_LVL)))
+       ((100ul * (LM3554_MAX_PERCENT) + ((LM3554_FLASH_MAX_LVL) >> 1)) / ((LM3554_FLASH_MAX_LVL)))
 #define LM3554_FLASH_DEFAULT_BRIGHTNESS \
        LM3554_VALUE_TO_PERCENT(13, LM3554_FLASH_STEP)
 
@@ -128,4 +128,3 @@ struct lm3554_platform_data {
 };
 
 #endif /* _LM3554_H_ */
-
index 56386154643b248c234d723ee113ef866b5559cc..ba14181962f85141688b5e1464c4f9afe9cfb536 100644 (file)
@@ -70,7 +70,6 @@ int atomisp_acc_unmap(struct atomisp_sub_device *asd,
 int atomisp_acc_s_mapped_arg(struct atomisp_sub_device *asd,
                             struct atomisp_acc_s_mapped_arg *arg);
 
-
 /*
  * Start acceleration.
  * Return immediately, acceleration is left running in background.
index 275b8dba5bdb014c2c537788f988ff8a8810fd55..2aba72bce260fb8c3cda535e66c4aedcfc5b873b 100644 (file)
@@ -60,7 +60,6 @@
 #include "error_support.h"
 #include "hrt/bits.h"
 
-
 /* We should never need to run the flash for more than 2 frames.
  * At 15fps this means 133ms. We set the timeout a bit longer.
  * Each flash driver is supposed to set its own timeout, but
@@ -200,6 +199,7 @@ static int write_target_freq_to_hw(struct atomisp_device *isp,
 
        return 0;
 }
+
 int atomisp_freq_scaling(struct atomisp_device *isp,
                         enum atomisp_dfs_mode mode,
                         bool force)
@@ -436,7 +436,6 @@ static void atomisp_reset_event(struct atomisp_sub_device *asd)
        v4l2_event_queue(asd->subdev.devnode, &event);
 }
 
-
 static void print_csi_rx_errors(enum mipi_port_id port,
                                struct atomisp_device *isp)
 {
@@ -475,6 +474,7 @@ static void print_csi_rx_errors(enum mipi_port_id port,
 static void clear_irq_reg(struct atomisp_device *isp)
 {
        u32 msg_ret;
+
        pci_read_config_dword(isp->pdev, PCI_INTERRUPT_CTRL, &msg_ret);
        msg_ret |= 1 << INTR_IIR;
        pci_write_config_dword(isp->pdev, PCI_INTERRUPT_CTRL, msg_ret);
@@ -581,7 +581,7 @@ irqreturn_t atomisp_isr(int irq, void *dev)
        }
 
        if (irq_infos & IA_CSS_IRQ_INFO_ISYS_EVENTS_READY) {
-               while (ia_css_dequeue_isys_event(&(eof_event.event)) ==
+               while (ia_css_dequeue_isys_event(&eof_event.event) ==
                       IA_CSS_SUCCESS) {
                        /* EOF Event does not have the css_pipe returned */
                        asd = __get_asd_from_port(isp, eof_event.event.port);
@@ -614,6 +614,7 @@ out_nowake:
 void atomisp_clear_css_buffer_counters(struct atomisp_sub_device *asd)
 {
        int i;
+
        memset(asd->s3a_bufs_in_css, 0, sizeof(asd->s3a_bufs_in_css));
        for (i = 0; i < ATOMISP_INPUT_STREAM_NUM; i++)
                memset(asd->metadata_bufs_in_css[i], 0,
@@ -915,7 +916,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
 
        /* need to know the atomisp pipe for frame buffers */
        pipe = __atomisp_get_pipe(asd, stream_id, css_pipe_id, buf_type);
-       if (pipe == NULL) {
+       if (!pipe) {
                dev_err(isp->dev, "error getting atomisp pipe\n");
                return;
        }
@@ -1296,13 +1297,15 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
                * HAL will be unblocked.
                */
                acc_pipe = asd->stream_env[i].pipes[CSS_PIPE_ID_ACC];
-               if (acc_pipe != NULL) {
+               if (acc_pipe) {
                        acc_pipeline = ia_css_pipe_get_pipeline(acc_pipe);
                        if (acc_pipeline) {
                                struct ia_css_pipeline_stage *stage;
+
                                for (stage = acc_pipeline->stages; stage;
                                        stage = stage->next) {
                                        const struct ia_css_fw_info *fw;
+
                                        fw = stage->firmware;
                                        atomisp_acc_done(asd, fw->handle);
                                }
@@ -1435,7 +1438,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
                if (ret)
                        dev_warn(isp->dev,
                                 "can't start streaming on sensor!\n");
-
        }
 
        if (depth_mode) {
@@ -1469,6 +1471,7 @@ void atomisp_wdt_work(struct work_struct *work)
 #else
        for (i = 0; i < isp->num_of_streams; i++) {
                struct atomisp_sub_device *asd = &isp->asd[i];
+
                pipe_wdt_cnt[i][0] +=
                        atomic_read(&asd->video_out_capture.wdt_count);
                pipe_wdt_cnt[i][1] +=
@@ -1497,6 +1500,7 @@ void atomisp_wdt_work(struct work_struct *work)
        if (css_recover) {
 #endif
                unsigned int old_dbglevel = dbg_level;
+
                atomisp_css_debug_dump_sp_sw_debug_info();
                atomisp_css_debug_dump_debug_info(__func__);
                dbg_level = old_dbglevel;
@@ -1566,7 +1570,7 @@ void atomisp_wdt_work(struct work_struct *work)
 
                                dev_err(isp->dev, "%s, raw_buffer_locked_count %d\n",
                                        __func__, asd->raw_buffer_locked_count);
-                               for (j = 0; j <= ATOMISP_MAX_EXP_ID/32; j++)
+                               for (j = 0; j <= ATOMISP_MAX_EXP_ID / 32; j++)
                                        dev_err(isp->dev, "%s, raw_buffer_bitmap[%d]: 0x%x\n",
                                                __func__, j,
                                                asd->raw_buffer_bitmap[j]);
@@ -1578,6 +1582,7 @@ void atomisp_wdt_work(struct work_struct *work)
        } else {
                for (i = 0; i < isp->num_of_streams; i++) {
                        struct atomisp_sub_device *asd = &isp->asd[i];
+
                        if (asd->streaming ==
                            ATOMISP_DEVICE_STREAMING_ENABLED) {
                                atomisp_clear_css_buffer_counters(asd);
@@ -1603,6 +1608,7 @@ void atomisp_wdt_work(struct work_struct *work)
 #ifdef ISP2401
        for (i = 0; i < isp->num_of_streams; i++) {
                struct atomisp_sub_device *asd = &isp->asd[i];
+
                if (asd->streaming ==
                        ATOMISP_DEVICE_STREAMING_ENABLED) {
                        atomisp_wdt_refresh(asd,
@@ -1628,6 +1634,7 @@ void atomisp_css_flush(struct atomisp_device *isp)
        /* Disable wdt */
        for (i = 0; i < isp->num_of_streams; i++) {
                struct atomisp_sub_device *asd = &isp->asd[i];
+
                atomisp_wdt_stop(asd, true);
        }
 
@@ -1753,7 +1760,6 @@ void atomisp_wdt_refresh(struct atomisp_sub_device *asd, unsigned int delay)
                atomisp_wdt_refresh_pipe(&asd->video_out_video_capture, delay);
 }
 
-
 void atomisp_wdt_stop_pipe(struct atomisp_video_pipe *pipe, bool sync)
 #endif
 {
@@ -1811,7 +1817,7 @@ void atomisp_setup_flash(struct atomisp_sub_device *asd)
        struct atomisp_device *isp = asd->isp;
        struct v4l2_control ctrl;
 
-       if (isp->flash == NULL)
+       if (!isp->flash)
                return;
 
        if (asd->params.flash_state != ATOMISP_FLASH_REQUESTED &&
@@ -1889,7 +1895,6 @@ irqreturn_t atomisp_isr_thread(int irq, void *isp_ptr)
                if (asd->streaming != ATOMISP_DEVICE_STREAMING_ENABLED)
                        continue;
                atomisp_setup_flash(asd);
-
        }
 out:
        rt_mutex_unlock(&isp->mutex);
@@ -1979,6 +1984,7 @@ v4l2_fmt_to_sh_fmt(u32 fmt)
                return -EINVAL;
        }
 }
+
 /*
  * raw format match between SH format and V4L2 format
  */
@@ -2343,7 +2349,7 @@ static void atomisp_update_grid_info(struct atomisp_sub_device *asd,
 {
        struct atomisp_device *isp = asd->isp;
        int err;
-       uint16_t stream_id = atomisp_source_pad_to_stream_id(asd, source_pad);
+       u16 stream_id = atomisp_source_pad_to_stream_id(asd, source_pad);
 
        if (atomisp_css_get_grid_info(asd, pipe_id, source_pad))
                return;
@@ -2415,6 +2421,7 @@ int atomisp_gdc_cac_table(struct atomisp_sub_device *asd, int flag,
        if (flag == 0) {
                /* Get gdc table from current setup */
                struct atomisp_css_morph_table tab = {0};
+
                atomisp_css_get_morph_table(asd, &tab);
 
                config->width = tab.width;
@@ -2643,7 +2650,6 @@ int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
                         pipe_cfg->bayer_ds_out_res.height /
                         input_config->effective_res.height + 1) / 2;
 
-
                if (!asd->params.video_dis_en) {
                        /*
                         * We adjust the ispfilter_bq to:
@@ -2681,7 +2687,7 @@ int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
                                w_padding = w_padding *
                                        pipe_cfg->bayer_ds_out_res.width /
                                        input_config->effective_res.width + 1;
-                               w_padding = roundup(w_padding/2, 1);
+                               w_padding = roundup(w_padding / 2, 1);
 
                                bq_res->gdc_shift_bq.width_bq = bq_res->ispfilter_bq.width_bq / 2
                                        + w_padding;
@@ -2842,10 +2848,10 @@ int atomisp_get_metadata(struct atomisp_sub_device *asd, int flag,
 
        mipi_info = atomisp_to_sensor_mipi_info(
                isp->inputs[asd->input_curr].camera);
-       if (mipi_info == NULL)
+       if (!mipi_info)
                return -EINVAL;
 
-       if (mipi_info->metadata_effective_width != NULL) {
+       if (mipi_info->metadata_effective_width) {
                for (i = 0; i < md->height; i++)
                        md->effective_width[i] =
                                mipi_info->metadata_effective_width[i];
@@ -2925,10 +2931,10 @@ 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);
-       if (mipi_info == NULL)
+       if (!mipi_info)
                return -EINVAL;
 
-       if (mipi_info->metadata_effective_width != NULL) {
+       if (mipi_info->metadata_effective_width) {
                for (i = 0; i < md->height; i++)
                        md->effective_width[i] =
                                mipi_info->metadata_effective_width[i];
@@ -3127,7 +3133,6 @@ int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
                        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) ||
@@ -3139,7 +3144,6 @@ int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
        return 0;
 }
 
-
 /*
  * Function to check the zoom region whether is effective
  */
@@ -3149,7 +3153,7 @@ static bool atomisp_check_zoom_region(
 {
        struct atomisp_resolution  config;
        bool flag = false;
-       unsigned int w , h;
+       unsigned int w, h;
 
        memset(&config, 0, sizeof(struct atomisp_resolution));
 
@@ -3313,7 +3317,7 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                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)) {
@@ -3322,7 +3326,7 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                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)) {
@@ -3331,7 +3335,7 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                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) {
@@ -3358,7 +3362,7 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                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)) {
@@ -3367,7 +3371,7 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                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)) {
@@ -3388,7 +3392,7 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                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)) {
@@ -3442,7 +3446,7 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                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)) {
@@ -3462,7 +3466,7 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                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)) {
@@ -3529,7 +3533,7 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                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)) {
@@ -3571,7 +3575,7 @@ int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
                                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)
@@ -3697,7 +3701,6 @@ int atomisp_cp_lsc_table(struct atomisp_sub_device *asd,
                        atomisp_css_shading_table_free(shading_table);
                        return -EFAULT;
                }
-
        }
 #ifndef ISP2401
        shading_table->sensor_width = source_st->sensor_width;
@@ -3712,7 +3715,7 @@ int atomisp_cp_lsc_table(struct atomisp_sub_device *asd,
 #endif
 
        /* No need to update shading table if it is the same */
-       if (old_table != NULL &&
+       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 &&
@@ -3739,8 +3742,8 @@ 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 != NULL;
+               (struct atomisp_shading_table *)shading_table;
+       asd->params.sc_en = shading_table;
 
        if (old_table)
                atomisp_css_shading_table_free(old_table);
@@ -3788,23 +3791,23 @@ int atomisp_css_cp_dvs2_coefs(struct atomisp_sub_device *asd,
        }
 
 #ifndef ISP2401
-       if (coefs->hor_coefs.odd_real == NULL ||
-           coefs->hor_coefs.odd_imag == NULL ||
-           coefs->hor_coefs.even_real == NULL ||
-           coefs->hor_coefs.even_imag == NULL ||
-           coefs->ver_coefs.odd_real == NULL ||
-           coefs->ver_coefs.odd_imag == NULL ||
-           coefs->ver_coefs.even_real == NULL ||
-           coefs->ver_coefs.even_imag == NULL)
+       if (!coefs->hor_coefs.odd_real ||
+           !coefs->hor_coefs.odd_imag ||
+           !coefs->hor_coefs.even_real ||
+           !coefs->hor_coefs.even_imag ||
+           !coefs->ver_coefs.odd_real ||
+           !coefs->ver_coefs.odd_imag ||
+           !coefs->ver_coefs.even_real ||
+           !coefs->ver_coefs.even_imag)
 #else
-       if (dvs2_coefs.hor_coefs.odd_real == NULL ||
-           dvs2_coefs.hor_coefs.odd_imag == NULL ||
-           dvs2_coefs.hor_coefs.even_real == NULL ||
-           dvs2_coefs.hor_coefs.even_imag == NULL ||
-           dvs2_coefs.ver_coefs.odd_real == NULL ||
-           dvs2_coefs.ver_coefs.odd_imag == NULL ||
-           dvs2_coefs.ver_coefs.even_real == NULL ||
-           dvs2_coefs.ver_coefs.even_imag == NULL)
+       if (!dvs2_coefs.hor_coefs.odd_real ||
+           !dvs2_coefs.hor_coefs.odd_imag ||
+           !dvs2_coefs.hor_coefs.even_real ||
+           !dvs2_coefs.hor_coefs.even_imag ||
+           !dvs2_coefs.ver_coefs.odd_real ||
+           !dvs2_coefs.ver_coefs.odd_imag ||
+           !dvs2_coefs.ver_coefs.even_real ||
+           !dvs2_coefs.ver_coefs.even_imag)
 #endif
                return -EINVAL;
 
@@ -3891,7 +3894,7 @@ int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
                atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
        int ret = -EFAULT;
 
-       if (stream == NULL) {
+       if (!stream) {
                dev_err(asd->isp->dev, "%s: internal error!", __func__);
                return -EINVAL;
        }
@@ -4007,7 +4010,7 @@ int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
 
        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:
@@ -4087,7 +4090,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:
@@ -4112,7 +4115,7 @@ 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,
+               (struct ia_css_dvs2_coefficients *)arg->dvs2_coefs,
                css_param, false);
        if (ret)
                return ret;
@@ -4242,7 +4245,7 @@ int atomisp_set_parameters(struct video_device *vdev,
        struct atomisp_css_params *css_param = &asd->params.css_param;
        int ret;
 
-       if (asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream == NULL) {
+       if (!asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream) {
                dev_err(asd->isp->dev, "%s: internal error!\n", __func__);
                return -EINVAL;
        }
@@ -4288,7 +4291,7 @@ 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,
+               (struct ia_css_dvs2_coefficients *)arg->dvs2_coefs,
                css_param, true);
        if (ret)
                goto apply_parameter_failed;
@@ -4334,7 +4337,7 @@ int atomisp_param(struct atomisp_sub_device *asd, int flag,
                        atomisp_css_get_dvs_grid_info(
                                &asd->params.curr_grid_info);
 
-               if (&config->info == NULL) {
+               if (!&config->info) {
                        dev_err(isp->dev, "ERROR: NULL pointer in grid_info\n");
                        return -EINVAL;
                }
@@ -4455,7 +4458,6 @@ int atomisp_color_effect(struct atomisp_sub_device *asd, int flag,
                return 0;
        }
 
-
        control.id = V4L2_CID_COLORFX;
        control.value = *effect;
        ret =
@@ -4537,7 +4539,6 @@ int atomisp_color_effect(struct atomisp_sub_device *asd, int flag,
 int atomisp_bad_pixel(struct atomisp_sub_device *asd, int flag,
                      __s32 *value)
 {
-
        if (flag == 0) {
                *value = asd->params.bad_pixel_en;
                return 0;
@@ -4588,7 +4589,6 @@ int atomisp_video_stable(struct atomisp_sub_device *asd, int flag,
 int atomisp_fixed_pattern(struct atomisp_sub_device *asd, int flag,
                          __s32 *value)
 {
-
        if (flag == 0) {
                *value = asd->params.fpn_en;
                return 0;
@@ -4612,9 +4612,9 @@ atomisp_bytesperline_to_padded_width(unsigned int bytesperline,
        case CSS_FRAME_FORMAT_YUYV:
        case CSS_FRAME_FORMAT_RAW:
        case CSS_FRAME_FORMAT_RGB565:
-               return bytesperline/2;
+               return bytesperline / 2;
        case CSS_FRAME_FORMAT_RGBA888:
-               return bytesperline/4;
+               return bytesperline / 4;
        /* The following cases could be removed, but we leave them
           in to document the formats that are included. */
        case CSS_FRAME_FORMAT_NV11:
@@ -4696,7 +4696,7 @@ int atomisp_fixed_pattern_table(struct atomisp_sub_device *asd,
        struct atomisp_css_frame *raw_black_frame = NULL;
        int ret;
 
-       if (arg == NULL)
+       if (!arg)
                return -EINVAL;
 
        ret = atomisp_v4l2_framebuffer_to_css_frame(arg, &raw_black_frame);
@@ -4838,7 +4838,7 @@ int atomisp_get_sensor_mode_data(struct atomisp_sub_device *asd,
 
        mipi_info = atomisp_to_sensor_mipi_info(
                isp->inputs[asd->input_curr].camera);
-       if (mipi_info == NULL)
+       if (!mipi_info)
                return -EINVAL;
 
        memcpy(config, &mipi_info->data, sizeof(*config));
@@ -4855,7 +4855,7 @@ int atomisp_get_fmt(struct video_device *vdev, struct v4l2_format *f)
 }
 
 static void __atomisp_update_stream_env(struct atomisp_sub_device *asd,
-       uint16_t stream_index, struct atomisp_input_stream_info *stream_info)
+       u16 stream_index, struct atomisp_input_stream_info *stream_info)
 {
        int i;
 
@@ -4874,7 +4874,7 @@ static void __atomisp_update_stream_env(struct atomisp_sub_device *asd,
        }
 }
 
-static void __atomisp_init_stream_info(uint16_t stream_index,
+static void __atomisp_init_stream_info(u16 stream_index,
                struct atomisp_input_stream_info *stream_info)
 {
        int i;
@@ -4905,16 +4905,16 @@ int atomisp_try_fmt(struct video_device *vdev, struct v4l2_format *f,
        const struct atomisp_format_bridge *fmt;
        struct atomisp_input_stream_info *stream_info =
            (struct atomisp_input_stream_info *)snr_mbus_fmt->reserved;
-       uint16_t stream_index;
+       u16 stream_index;
        int source_pad = atomisp_subdev_source_pad(vdev);
        int ret;
 
-       if (isp->inputs[asd->input_curr].camera == NULL)
+       if (!isp->inputs[asd->input_curr].camera)
                return -EINVAL;
 
        stream_index = atomisp_source_pad_to_stream_id(asd, source_pad);
        fmt = atomisp_get_format_bridge(f->fmt.pix.pixelformat);
-       if (fmt == NULL) {
+       if (!fmt) {
                dev_err(isp->dev, "unsupported pixelformat!\n");
                fmt = atomisp_output_fmts;
        }
@@ -4942,7 +4942,7 @@ int atomisp_try_fmt(struct video_device *vdev, struct v4l2_format *f,
                snr_mbus_fmt->width, snr_mbus_fmt->height);
 
        fmt = atomisp_get_format_bridge_from_mbus(snr_mbus_fmt->code);
-       if (fmt == NULL) {
+       if (!fmt) {
                dev_err(isp->dev, "unknown sensor format 0x%8.8x\n",
                        snr_mbus_fmt->code);
                return -EINVAL;
@@ -4970,7 +4970,7 @@ int atomisp_try_fmt(struct video_device *vdev, struct v4l2_format *f,
                /* Set the flag when resolution requested is
                 * beyond the max value supported by sensor
                 */
-               if (res_overflow != NULL)
+               if (res_overflow)
                        *res_overflow = true;
        }
 
@@ -5087,6 +5087,7 @@ static inline int atomisp_set_sensor_mipi_to_isp(
                input_format = fc->css_stream_fmt;
        } else {
                struct v4l2_mbus_framefmt *sink;
+
                sink = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
                                               V4L2_SUBDEV_FORMAT_ACTIVE,
                                               ATOMISP_SUBDEV_PAD_SINK);
@@ -5251,7 +5252,7 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
        int (*configure_pp_input)(struct atomisp_sub_device *asd,
                                  unsigned int width, unsigned int height) =
                                                        configure_pp_input_nop;
-       uint16_t stream_index = atomisp_source_pad_to_stream_id(asd, source_pad);
+       u16 stream_index = atomisp_source_pad_to_stream_id(asd, source_pad);
        const struct atomisp_in_fmt_conv *fc;
        int ret;
 
@@ -5262,7 +5263,7 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
                ATOMISP_SUBDEV_PAD_SINK, V4L2_SEL_TGT_CROP);
 
        format = atomisp_get_format_bridge(pix->pixelformat);
-       if (format == NULL)
+       if (!format)
                return -EINVAL;
 
        if (isp->inputs[asd->input_curr].type != TEST_PATTERN &&
@@ -5557,7 +5558,6 @@ static void atomisp_check_copy_mode(struct atomisp_sub_device *asd,
                asd->copy_mode = false;
 
        dev_dbg(asd->isp->dev, "copy_mode: %d\n", asd->copy_mode);
-
 }
 
 static int atomisp_set_fmt_to_snr(struct video_device *vdev,
@@ -5576,7 +5576,7 @@ static int atomisp_set_fmt_to_snr(struct video_device *vdev,
        struct atomisp_device *isp = asd->isp;
        struct atomisp_input_stream_info *stream_info =
            (struct atomisp_input_stream_info *)ffmt->reserved;
-       uint16_t stream_index = ATOMISP_INPUT_STREAM_GENERAL;
+       u16 stream_index = ATOMISP_INPUT_STREAM_GENERAL;
        int source_pad = atomisp_subdev_source_pad(vdev);
        struct v4l2_subdev_fh fh;
        int ret;
@@ -5586,7 +5586,7 @@ static int atomisp_set_fmt_to_snr(struct video_device *vdev,
        stream_index = atomisp_source_pad_to_stream_id(asd, source_pad);
 
        format = atomisp_get_format_bridge(pixelformat);
-       if (format == NULL)
+       if (!format)
                return -EINVAL;
 
        v4l2_fill_mbus_format(ffmt, &f->fmt.pix, format->mbus_code);
@@ -5667,7 +5667,7 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
        struct v4l2_mbus_framefmt isp_sink_fmt;
        struct v4l2_mbus_framefmt isp_source_fmt = {0};
        struct v4l2_rect isp_sink_crop;
-       uint16_t source_pad = atomisp_subdev_source_pad(vdev);
+       u16 source_pad = atomisp_subdev_source_pad(vdev);
        struct v4l2_subdev_fh fh;
        int ret;
 
@@ -5687,7 +5687,7 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
        v4l2_fh_init(&fh.vfh, vdev);
 
        format_bridge = atomisp_get_format_bridge(f->fmt.pix.pixelformat);
-       if (format_bridge == NULL)
+       if (!format_bridge)
                return -EINVAL;
 
        pipe->sh_fmt = format_bridge->sh_fmt;
@@ -5736,7 +5736,7 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
                    (asd->isp->inputs[asd->input_curr].camera_caps->
                    sensor[asd->sensor_curr].stream_num > 1)) {
                        /* For M10MO outputing YUV preview images. */
-                       uint16_t video_index =
+                       u16 video_index =
                                atomisp_source_pad_to_stream_id(asd,
                                        ATOMISP_SUBDEV_PAD_SOURCE_VIDEO);
 
@@ -6064,7 +6064,6 @@ done:
                                     output_info.padded_width, 8);
                pipe->pix.sizeimage =
                        PAGE_ALIGN(f->fmt.pix.height * pipe->pix.bytesperline);
-
        }
        if (f->fmt.pix.field == V4L2_FIELD_ANY)
                f->fmt.pix.field = V4L2_FIELD_NONE;
@@ -6109,7 +6108,7 @@ 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 == NULL) {
+       if (!format_bridge) {
                dev_dbg(isp->dev, "atomisp_get_format_bridge err! fmt:0x%x\n",
                                f->fmt.pix.pixelformat);
                return -EINVAL;
@@ -6186,7 +6185,7 @@ int atomisp_set_shading_table(struct atomisp_sub_device *asd,
        asd->params.sc_en = true;
 
 out:
-       if (free_table != NULL)
+       if (free_table)
                atomisp_css_shading_table_free(free_table);
 
        return ret;
@@ -6226,6 +6225,7 @@ done:
 int atomisp_ospm_dphy_up(struct atomisp_device *isp)
 {
        unsigned long flags;
+
        dev_dbg(isp->dev, "%s\n", __func__);
 
        spin_lock_irqsave(&isp->lock, flags);
@@ -6235,7 +6235,6 @@ int atomisp_ospm_dphy_up(struct atomisp_device *isp)
        return 0;
 }
 
-
 int atomisp_exif_makernote(struct atomisp_sub_device *asd,
                           struct atomisp_makernote_info *config)
 {
@@ -6286,6 +6285,7 @@ int atomisp_offline_capture_configure(struct atomisp_sub_device *asd,
                V4L2_CID_START_ZSL_CAPTURE);
        if (c) {
                int ret;
+
                dev_dbg(asd->isp->dev, "%s trigger ZSL capture request\n",
                        __func__);
                /* TODO: use the cvf_config */
@@ -6447,6 +6447,7 @@ static int __checking_exp_id(struct atomisp_sub_device *asd, int exp_id)
 void atomisp_init_raw_buffer_bitmap(struct atomisp_sub_device *asd)
 {
        unsigned long flags;
+
        spin_lock_irqsave(&asd->raw_buffer_bitmap_lock, flags);
        memset(asd->raw_buffer_bitmap, 0, sizeof(asd->raw_buffer_bitmap));
        asd->raw_buffer_locked_count = 0;
@@ -6582,7 +6583,7 @@ int atomisp_enable_dz_capt_pipe(struct atomisp_sub_device *asd,
 {
        bool value;
 
-       if (enable == NULL)
+       if (!enable)
                return -EINVAL;
 
        value = *enable > 0 ? true : false;
index 79d493dba40375202137cc720659b7158d768703..a403ff95a2a99b369a8bc9faf8d3e2284d726b27 100644 (file)
@@ -344,7 +344,6 @@ int atomisp_get_sensor_mode_data(struct atomisp_sub_device *asd,
 
 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);
index aac0eccee7983a96d286f9e5cf770f17d89bf6d2..e74b205a9537e07be76041722c4c02ea6f48e7e7 100644 (file)
@@ -202,7 +202,7 @@ int atomisp_css_dequeue_buffer(struct atomisp_sub_device *asd,
                                struct atomisp_css_buffer *isp_css_buffer);
 
 int atomisp_css_allocate_stat_buffers(struct atomisp_sub_device *asd,
-                                     uint16_t stream_id,
+                                     u16 stream_id,
                                      struct atomisp_s3a_buf *s3a_buf,
                                      struct atomisp_dis_buf *dis_buf,
                                      struct atomisp_metadata_buf *md_buf);
@@ -422,7 +422,7 @@ int atomisp_css_video_configure_output(struct atomisp_sub_device *asd,
                                enum atomisp_css_frame_format format);
 
 int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
-                               uint16_t source_pad,
+                               u16 source_pad,
                                struct atomisp_css_frame_info *frame_info);
 
 int atomisp_css_video_configure_viewfinder(struct atomisp_sub_device *asd,
index 7d202db04808afd395b1053f1a53db98b969b4b1..56c69b473898729f4c6901fcd116abf8ce42ce85 100644 (file)
@@ -118,7 +118,7 @@ static void atomisp_css2_hw_store_32(hrt_address addr, uint32_t data)
 static uint8_t atomisp_css2_hw_load_8(hrt_address addr)
 {
        unsigned long flags;
-       uint8_t ret;
+       u8 ret;
 
        spin_lock_irqsave(&mmio_lock, flags);
        ret = _hrt_master_port_load_8(addr);
@@ -129,7 +129,7 @@ static uint8_t atomisp_css2_hw_load_8(hrt_address addr)
 static uint16_t atomisp_css2_hw_load_16(hrt_address addr)
 {
        unsigned long flags;
-       uint16_t ret;
+       u16 ret;
 
        spin_lock_irqsave(&mmio_lock, flags);
        ret = _hrt_master_port_load_16(addr);
@@ -140,7 +140,7 @@ static uint16_t atomisp_css2_hw_load_16(hrt_address addr)
 static uint32_t atomisp_css2_hw_load_32(hrt_address addr)
 {
        unsigned long flags;
-       uint32_t ret;
+       u32 ret;
 
        spin_lock_irqsave(&mmio_lock, flags);
        ret = _hrt_master_port_load_32(addr);
@@ -158,7 +158,7 @@ static void atomisp_css2_hw_store(hrt_address addr,
 
        spin_lock_irqsave(&mmio_lock, flags);
        for (i = 0; i < n; i++, _to++, _from++)
-               _hrt_master_port_store_8(_to , *_from);
+               _hrt_master_port_store_8(_to, *_from);
        spin_unlock_irqrestore(&mmio_lock, flags);
 }
 
@@ -202,9 +202,10 @@ void atomisp_load_uint32(hrt_address addr, uint32_t *data)
 {
        *data = atomisp_css2_hw_load_32(addr);
 }
+
 static int hmm_get_mmu_base_addr(unsigned int *mmu_base_addr)
 {
-       if (sh_mmu_mrfld.get_pd_base == NULL) {
+       if (!sh_mmu_mrfld.get_pd_base) {
                dev_err(atomisp_dev, "get mmu base address failed.\n");
                return -EINVAL;
        }
@@ -515,6 +516,7 @@ static int __destroy_streams(struct atomisp_sub_device *asd, bool force)
        asd->stream_prepared = false;
        return 0;
 }
+
 static int __create_stream(struct atomisp_sub_device *asd,
                           struct atomisp_stream_env *stream_env)
 {
@@ -598,7 +600,6 @@ static int __destroy_pipes(struct atomisp_sub_device *asd, bool force)
 
        for (i = 0; i < ATOMISP_INPUT_STREAM_NUM; i++) {
                if (asd->stream_env[i].stream) {
-
                        dev_err(isp->dev,
                                "cannot destroy css pipes for stream[%d].\n",
                                i);
@@ -1286,7 +1287,6 @@ void atomisp_css_update_isp_params(struct atomisp_sub_device *asd)
        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)
 {
@@ -1347,7 +1347,7 @@ int atomisp_css_dequeue_buffer(struct atomisp_sub_device *asd,
 }
 
 int atomisp_css_allocate_stat_buffers(struct atomisp_sub_device   *asd,
-                                     uint16_t stream_id,
+                                     u16 stream_id,
                                      struct atomisp_s3a_buf      *s3a_buf,
                                      struct atomisp_dis_buf      *dis_buf,
                                      struct atomisp_metadata_buf *md_buf)
@@ -1566,8 +1566,7 @@ int atomisp_css_get_grid_info(struct atomisp_sub_device *asd,
            || 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",
+                       "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,
@@ -1687,7 +1686,6 @@ void atomisp_css_get_dis_statistics(struct atomisp_sub_device *asd,
                else
                        ia_css_get_dvs2_statistics(asd->params.dvs_stat,
                                isp_css_buffer->css_buffer.data.stats_dvs);
-
        }
 }
 
@@ -1787,7 +1785,6 @@ void atomisp_css_isys_set_format(struct atomisp_sub_device *asd,
                                 enum atomisp_input_format format,
                                 int isys_stream)
 {
-
        struct ia_css_stream_config *s_config =
                        &asd->stream_env[stream_id].stream_config;
 
@@ -1798,7 +1795,6 @@ void atomisp_css_input_set_format(struct atomisp_sub_device *asd,
                                        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;
 
@@ -2026,8 +2022,7 @@ void atomisp_css_input_set_mode(struct atomisp_sub_device *asd,
                        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",
+                               "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;
@@ -2390,7 +2385,6 @@ static enum ia_css_pipe_mode __pipe_id_to_pipe_mode(
                WARN_ON(1);
                return IA_CSS_PIPE_MODE_PREVIEW;
        }
-
 }
 
 static void __configure_output(struct atomisp_sub_device *asd,
@@ -2912,7 +2906,7 @@ static unsigned int atomisp_get_pipe_index(struct atomisp_sub_device *asd,
 }
 
 int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
-                               uint16_t source_pad,
+                               u16 source_pad,
                                struct atomisp_css_frame_info *frame_info)
 {
        struct ia_css_pipe_info info;
@@ -3555,7 +3549,7 @@ void atomisp_css_set_ctc_table(struct atomisp_sub_device *asd,
                        struct atomisp_css_ctc_table *ctc_table)
 {
        int i;
-       uint16_t *vamem_ptr = ctc_table->data.vamem_1;
+       u16 *vamem_ptr = ctc_table->data.vamem_1;
        int data_size = IA_CSS_VAMEM_1_CTC_TABLE_SIZE;
        bool valid = false;
 
@@ -3653,22 +3647,22 @@ int atomisp_css_set_dis_coefs(struct atomisp_sub_device *asd,
                   try again. */
                return -EAGAIN;
 
-       if (coefs->hor_coefs.odd_real == NULL ||
-           coefs->hor_coefs.odd_imag == NULL ||
-           coefs->hor_coefs.even_real == NULL ||
-           coefs->hor_coefs.even_imag == NULL ||
-           coefs->ver_coefs.odd_real == NULL ||
-           coefs->ver_coefs.odd_imag == NULL ||
-           coefs->ver_coefs.even_real == NULL ||
-           coefs->ver_coefs.even_imag == NULL ||
-           asd->params.css_param.dvs2_coeff->hor_coefs.odd_real == NULL ||
-           asd->params.css_param.dvs2_coeff->hor_coefs.odd_imag == NULL ||
-           asd->params.css_param.dvs2_coeff->hor_coefs.even_real == NULL ||
-           asd->params.css_param.dvs2_coeff->hor_coefs.even_imag == NULL ||
-           asd->params.css_param.dvs2_coeff->ver_coefs.odd_real == NULL ||
-           asd->params.css_param.dvs2_coeff->ver_coefs.odd_imag == NULL ||
-           asd->params.css_param.dvs2_coeff->ver_coefs.even_real == NULL ||
-           asd->params.css_param.dvs2_coeff->ver_coefs.even_imag == NULL)
+       if (!coefs->hor_coefs.odd_real ||
+           !coefs->hor_coefs.odd_imag ||
+           !coefs->hor_coefs.even_real ||
+           !coefs->hor_coefs.even_imag ||
+           !coefs->ver_coefs.odd_real ||
+           !coefs->ver_coefs.odd_imag ||
+           !coefs->ver_coefs.even_real ||
+           !coefs->ver_coefs.even_imag ||
+           !asd->params.css_param.dvs2_coeff->hor_coefs.odd_real ||
+           !asd->params.css_param.dvs2_coeff->hor_coefs.odd_imag ||
+           !asd->params.css_param.dvs2_coeff->hor_coefs.even_real ||
+           !asd->params.css_param.dvs2_coeff->hor_coefs.even_imag ||
+           !asd->params.css_param.dvs2_coeff->ver_coefs.odd_real ||
+           !asd->params.css_param.dvs2_coeff->ver_coefs.odd_imag ||
+           !asd->params.css_param.dvs2_coeff->ver_coefs.even_real ||
+           !asd->params.css_param.dvs2_coeff->ver_coefs.even_imag)
                return -EINVAL;
 
        if (copy_from_user(asd->params.css_param.dvs2_coeff->hor_coefs.odd_real,
@@ -3724,7 +3718,7 @@ void atomisp_css_set_zoom_factor(struct atomisp_sub_device *asd,
        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;
 }
 
@@ -4047,7 +4041,6 @@ int atomisp_css_get_zoom_factor(struct atomisp_sub_device *asd,
        return 0;
 }
 
-
 /*
  * Function to set/get image stablization statistics
  */
@@ -4058,14 +4051,14 @@ int atomisp_css_get_dis_stat(struct atomisp_sub_device *asd,
        struct atomisp_dis_buf *dis_buf;
        unsigned long flags;
 
-       if (asd->params.dvs_stat->hor_prod.odd_real == NULL ||
-           asd->params.dvs_stat->hor_prod.odd_imag == NULL ||
-           asd->params.dvs_stat->hor_prod.even_real == NULL ||
-           asd->params.dvs_stat->hor_prod.even_imag == NULL ||
-           asd->params.dvs_stat->ver_prod.odd_real == NULL ||
-           asd->params.dvs_stat->ver_prod.odd_imag == NULL ||
-           asd->params.dvs_stat->ver_prod.even_real == NULL ||
-           asd->params.dvs_stat->ver_prod.even_imag == NULL)
+       if (!asd->params.dvs_stat->hor_prod.odd_real ||
+           !asd->params.dvs_stat->hor_prod.odd_imag ||
+           !asd->params.dvs_stat->hor_prod.even_real ||
+           !asd->params.dvs_stat->hor_prod.even_imag ||
+           !asd->params.dvs_stat->ver_prod.odd_real ||
+           !asd->params.dvs_stat->ver_prod.odd_imag ||
+           !asd->params.dvs_stat->ver_prod.even_real ||
+           !asd->params.dvs_stat->ver_prod.even_imag)
                return -EINVAL;
 
        /* isp needs to be streaming to get DIS statistics */
@@ -4646,12 +4639,12 @@ int atomisp_css_dump_blob_infor(void)
 
        if (nm == 0)
                return -EPERM;
-       if (bd == NULL)
+       if (!bd)
                return -EPERM;
 
        for (i = 1; i < sh_css_num_binaries; i++)
                dev_dbg(atomisp_dev, "Num%d binary id is %d, name is %s\n", i,
-                       bd[i-1].header.info.isp.sp.id, bd[i-1].name);
+                       bd[i - 1].header.info.isp.sp.id, bd[i - 1].name);
 
        return 0;
 }
@@ -4683,6 +4676,7 @@ int atomisp_set_css_dbgfunc(struct atomisp_device *isp, int opt)
 
        return ret;
 }
+
 void atomisp_en_dz_capt_pipe(struct atomisp_sub_device *asd, bool enable)
 {
        ia_css_en_dz_capt_pipe(
index fd535502ddaede3c2920a5a26e566a8431ed22cd..fb06dcbc96ed52c743bd8805df4f409b2528dbc0 100644 (file)
@@ -253,7 +253,6 @@ static int put_atomisp_3a_statistics32(struct atomisp_3a_statistics *kp,
        return 0;
 }
 
-
 static int get_atomisp_metadata_stat32(struct atomisp_metadata *kp,
                                struct atomisp_metadata32 __user *up)
 {
@@ -274,7 +273,6 @@ static int get_atomisp_metadata_stat32(struct atomisp_metadata *kp,
        return 0;
 }
 
-
 static int put_atomisp_metadata_stat32(struct atomisp_metadata *kp,
                                struct atomisp_metadata32 __user *up)
 {
@@ -387,6 +385,7 @@ static int get_atomisp_overlay32(struct atomisp_overlay *kp,
                                        struct atomisp_overlay32 __user *up)
 {
        compat_uptr_t frame;
+
        if (!access_ok(up, sizeof(struct atomisp_overlay32)) ||
            get_user(frame, &up->frame) ||
            get_user(kp->bg_y, &up->bg_y) ||
@@ -761,6 +760,7 @@ static int get_atomisp_acc_fw_load_to_pipe32(
                        struct atomisp_acc_fw_load_to_pipe32 __user *up)
 {
        compat_uptr_t data;
+
        if (!access_ok(up, sizeof(struct atomisp_acc_fw_load_to_pipe32)) ||
            get_user(kp->flags, &up->flags) ||
            get_user(kp->fw_handle, &up->fw_handle) ||
@@ -781,6 +781,7 @@ static int put_atomisp_acc_fw_load_to_pipe32(
                        struct atomisp_acc_fw_load_to_pipe32 __user *up)
 {
        compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
+
        if (!access_ok(up, sizeof(struct atomisp_acc_fw_load_to_pipe32)) ||
            put_user(kp->flags, &up->flags) ||
            put_user(kp->fw_handle, &up->fw_handle) ||
@@ -800,6 +801,7 @@ static int get_atomisp_sensor_ae_bracketing_lut(
                        struct atomisp_sensor_ae_bracketing_lut32 __user *up)
 {
        compat_uptr_t lut;
+
        if (!access_ok(up, sizeof(struct atomisp_sensor_ae_bracketing_lut32)) ||
            get_user(kp->lut_size, &up->lut_size) ||
            get_user(lut, &up->lut))
@@ -1066,7 +1068,6 @@ static long atomisp_do_compat_ioctl(struct file *file,
 long atomisp_compat_ioctl32(struct file *file,
                            unsigned int cmd, unsigned long arg)
 {
-
        struct video_device *vdev = video_devdata(file);
        struct atomisp_device *isp = video_get_drvdata(vdev);
        long ret = -ENOIOCTLCMD;
index 95669eedaad1121ddba9885e425cf9d3c65c781f..6091ac58b0063615c06419836cd91eb2b1f86445 100644 (file)
@@ -49,7 +49,7 @@ struct atomisp_dvs2_statistics32 {
 
 struct atomisp_dis_statistics32 {
        struct atomisp_dvs2_statistics32 dvs2_stat;
-       uint32_t exp_id;
+       u32 exp_id;
 };
 
 struct atomisp_dis_coefficients32 {
@@ -62,27 +62,27 @@ struct atomisp_3a_statistics32 {
        struct atomisp_grid_info  grid_info;
        compat_uptr_t data;
        compat_uptr_t rgby_data;
-       uint32_t exp_id;
-       uint32_t isp_config_id;
+       u32 exp_id;
+       u32 isp_config_id;
 };
 
 struct atomisp_metadata_with_type32 {
        /* to specify which type of metadata to get */
        enum atomisp_metadata_type type;
        compat_uptr_t data;
-       uint32_t width;
-       uint32_t height;
-       uint32_t stride; /* in bytes */
-       uint32_t exp_id; /* exposure ID */
+       u32 width;
+       u32 height;
+       u32 stride; /* in bytes */
+       u32 exp_id; /* exposure ID */
        compat_uptr_t effective_width;
 };
 
 struct atomisp_metadata32 {
        compat_uptr_t data;
-       uint32_t width;
-       uint32_t height;
-       uint32_t stride;
-       uint32_t exp_id;
+       u32 width;
+       u32 height;
+       u32 stride;
+       u32 exp_id;
        compat_uptr_t effective_width;
 };
 
@@ -258,8 +258,8 @@ struct atomisp_parameters32 {
         * Unique ID to track which config was actually applied to a particular
         * frame, driver will send this id back with output frame together.
         */
-       uint32_t        isp_config_id;
-       uint32_t        per_frame_setting;
+       u32     isp_config_id;
+       u32     per_frame_setting;
 };
 
 struct atomisp_acc_fw_load_to_pipe32 {
@@ -272,11 +272,11 @@ struct atomisp_acc_fw_load_to_pipe32 {
 };
 
 struct atomisp_dvs_6axis_config32 {
-       uint32_t exp_id;
-       uint32_t width_y;
-       uint32_t height_y;
-       uint32_t width_uv;
-       uint32_t height_uv;
+       u32 exp_id;
+       u32 width_y;
+       u32 height_y;
+       u32 width_uv;
+       u32 height_uv;
        compat_uptr_t xcoords_y;
        compat_uptr_t ycoords_y;
        compat_uptr_t xcoords_uv;
index 760b29ec546c0a41b56b57814db21ef889855d7d..0fce3d6bfdd36829c4912c0eafb33ff3ba0e6e5d 100644 (file)
@@ -23,9 +23,9 @@
 
 static struct v4l2_mbus_framefmt *__csi2_get_format(struct
                                                    atomisp_mipi_csi2_device
                                                  *csi2,
csi2,
                                                    struct
-                                                   v4l2_subdev_pad_config *cfg,
+                                                   v4l2_subdev_pad_config * cfg,
                                                    enum
                                                    v4l2_subdev_format_whence
                                                    which, unsigned int pad)
@@ -155,7 +155,7 @@ static int csi2_set_format(struct v4l2_subdev *sd,
 */
 static int csi2_set_stream(struct v4l2_subdev *sd, int enable)
 {
-        return 0;
+       return 0;
 }
 
 /* subdev core operations */
@@ -345,6 +345,7 @@ static void atomisp_csi2_configure_isp2401(struct atomisp_sub_device *asd)
        static const short int coeff_dat_settle[] = { 85, -2 };
        static const int TERMEN_DEFAULT           = 0 * 0;
        static const int SETTLE_DEFAULT           = 0x480;
+
        static const hrt_address csi2_port_base[] = {
                [ATOMISP_CAMERA_PORT_PRIMARY]     = CSI2_PORT_A_BASE,
                [ATOMISP_CAMERA_PORT_SECONDARY]   = CSI2_PORT_B_BASE,
@@ -396,6 +397,7 @@ static void atomisp_csi2_configure_isp2401(struct atomisp_sub_device *asd)
                                                 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];
+
                atomisp_store_uint32(base + CSI2_REG_RX_CSI_DLY_CNT_TERMEN,
                                     n == 0 ? clk_termen : dat_termen);
                atomisp_store_uint32(base + CSI2_REG_RX_CSI_DLY_CNT_SETTLE,
@@ -439,4 +441,3 @@ fail:
        atomisp_mipi_csi2_cleanup(isp);
        return ret;
 }
-
index 0191d28a55bca289a82ee7c8136eedf6efa9f3a2..ccd5f08f7575f35644886e146296c4abd1944163 100644 (file)
@@ -24,8 +24,8 @@
 #define CSI2_PAD_SOURCE                1
 #define CSI2_PADS_NUM          2
 
-#define CSI2_OUTPUT_ISP_SUBDEV (1 << 0)
-#define CSI2_OUTPUT_MEMORY     (1 << 1)
+#define CSI2_OUTPUT_ISP_SUBDEV BIT(0)
+#define CSI2_OUTPUT_MEMORY     BIT(1)
 
 struct atomisp_device;
 struct v4l2_device;
index 54e28605b5de7397f285588aac15355115aa562a..e3acf788162752e7a9db2b80afd917e049d3a4ab 100644 (file)
@@ -27,7 +27,6 @@ struct atomisp_freq_scaling_rule {
        unsigned int run_mode;
 };
 
-
 struct atomisp_dfs_config {
        unsigned int lowest_freq;
        unsigned int max_freq_at_vmin;
index a815c768bda945256e58c71f1c152d67e2845784..a431cc472bdfaba710bd82e753826ca9c80e05d1 100644 (file)
@@ -41,9 +41,9 @@ struct _iunit_debug {
        unsigned int            dbgopt;
 };
 
-#define OPTION_BIN_LIST                        (1<<0)
-#define OPTION_BIN_RUN                 (1<<1)
-#define OPTION_MEM_STAT                        (1<<2)
+#define OPTION_BIN_LIST                        BIT(0)
+#define OPTION_BIN_RUN                 BIT(1)
+#define OPTION_MEM_STAT                        BIT(2)
 #define OPTION_VALID                   (OPTION_BIN_LIST \
                                        | OPTION_BIN_RUN \
                                        | OPTION_MEM_STAT)
index c6d96987561db39c34fc85ebec7c8adc7c8f6098..354a28ef129ae3532d2b71c553621f54e02eeabd 100644 (file)
@@ -87,6 +87,7 @@ static int file_input_get_fmt(struct v4l2_subdev *sd,
        /* only support file injection on subdev0 */
        struct atomisp_sub_device *asd = &isp->asd[0];
        struct v4l2_mbus_framefmt *isp_sink_fmt;
+
        if (format->pad)
                return -EINVAL;
        isp_sink_fmt = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
@@ -105,6 +106,7 @@ static int file_input_set_fmt(struct v4l2_subdev *sd,
                              struct v4l2_subdev_format *format)
 {
        struct v4l2_mbus_framefmt *fmt = &format->format;
+
        if (format->pad)
                return -EINVAL;
        file_input_get_fmt(sd, cfg, format);
@@ -206,7 +208,7 @@ int atomisp_file_input_init(struct atomisp_device *isp)
 
        file_dev->isp = isp;
        file_dev->work_queue = alloc_workqueue(isp->v4l2_dev.name, 0, 1);
-       if (file_dev->work_queue == NULL) {
+       if (!file_dev->work_queue) {
                dev_err(isp->dev, "Failed to initialize file inject workq\n");
                return -ENOMEM;
        }
index 09b47edc690b7173ad0bf8913492fad5e1c3417d..4271a5cc8f662f928aa62b9bc3835afbe5fbca90 100644 (file)
@@ -410,7 +410,6 @@ static int atomisp_qbuffers_to_css_for_all_pipes(struct atomisp_sub_device *asd)
        return 0;
 }
 
-
 /* queue all available buffers to css */
 int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 {
@@ -737,6 +736,7 @@ static void atomisp_subdev_init_struct(struct atomisp_sub_device *asd)
        asd->sensor_array_res.width = 0;
        atomisp_css_init_struct(asd);
 }
+
 /*
  * file operation functions
  */
@@ -753,6 +753,7 @@ static unsigned int atomisp_subdev_users(struct atomisp_sub_device *asd)
 unsigned int atomisp_dev_users(struct atomisp_device *isp)
 {
        unsigned int i, sum;
+
        for (i = 0, sum = 0; i < isp->num_of_streams; i++)
                sum += atomisp_subdev_users(&isp->asd[i]);
 
@@ -902,7 +903,7 @@ static int atomisp_release(struct file *file)
        v4l2_fh_init(&fh.vfh, vdev);
 
        req.count = 0;
-       if (isp == NULL)
+       if (!isp)
                return -EBADF;
 
        mutex_lock(&isp->streamoff_mutex);
@@ -960,6 +961,7 @@ static int atomisp_release(struct file *file)
         */
        if (!isp->sw_contex.file_input && asd->fmt_auto->val) {
                struct v4l2_mbus_framefmt isp_sink_fmt = { 0 };
+
                atomisp_subdev_set_ffmt(&asd->subdev, fh.pad,
                                        V4L2_SUBDEV_FORMAT_ACTIVE,
                                        ATOMISP_SUBDEV_PAD_SINK, &isp_sink_fmt);
@@ -971,6 +973,7 @@ subdev_uninit:
        /* clear the sink pad for file input */
        if (isp->sw_contex.file_input && asd->fmt_auto->val) {
                struct v4l2_mbus_framefmt isp_sink_fmt = { 0 };
+
                atomisp_subdev_set_ffmt(&asd->subdev, fh.pad,
                                        V4L2_SUBDEV_FORMAT_ACTIVE,
                                        ATOMISP_SUBDEV_PAD_SINK, &isp_sink_fmt);
@@ -1090,7 +1093,8 @@ int atomisp_videobuf_mmap_mapper(struct videobuf_queue *q,
        mutex_lock(&q->vb_lock);
        for (i = 0; i < VIDEO_MAX_FRAME; i++) {
                struct videobuf_buffer *buf = q->bufs[i];
-               if (buf == NULL)
+
+               if (!buf)
                        continue;
 
                map = kzalloc(sizeof(struct videobuf_mapping), GFP_KERNEL);
@@ -1108,7 +1112,7 @@ int atomisp_videobuf_mmap_mapper(struct videobuf_queue *q,
                    buf->boff == offset) {
                        vm_mem = buf->priv;
                        ret = frame_mmap(isp, vm_mem->vaddr, vma);
-                       vma->vm_flags |= VM_IO|VM_DONTEXPAND|VM_DONTDUMP;
+                       vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;
                        break;
                }
        }
@@ -1130,17 +1134,17 @@ static int remove_pad_from_frame(struct atomisp_device *isp,
        ia_css_ptr load = in_frame->data;
        ia_css_ptr store = load;
 
-       buffer = kmalloc(width*sizeof(load), GFP_KERNEL);
+       buffer = kmalloc_array(width, sizeof(load), GFP_KERNEL);
        if (!buffer)
                return -ENOMEM;
 
        load += ISP_LEFT_PAD;
        for (i = 0; i < height; i++) {
-               ret = hmm_load(load, buffer, width*sizeof(load));
+               ret = hmm_load(load, buffer, width * sizeof(load));
                if (ret < 0)
                        goto remove_pad_error;
 
-               ret = hmm_store(store, buffer, width*sizeof(store));
+               ret = hmm_store(store, buffer, width * sizeof(store));
                if (ret < 0)
                        goto remove_pad_error;
 
@@ -1194,7 +1198,7 @@ static int atomisp_mmap(struct file *file, struct vm_area_struct *vma)
                        goto error;
                }
                raw_virt_addr = asd->raw_output_frame;
-               if (raw_virt_addr == NULL) {
+               if (!raw_virt_addr) {
                        dev_err(isp->dev, "Failed to request RAW frame\n");
                        ret = -EINVAL;
                        goto error;
@@ -1222,7 +1226,7 @@ static int atomisp_mmap(struct file *file, struct vm_area_struct *vma)
                        goto error;
                }
                raw_virt_addr->data_bytes = origin_size;
-               vma->vm_flags |= VM_IO|VM_DONTEXPAND|VM_DONTDUMP;
+               vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;
                rt_mutex_unlock(&isp->mutex);
                return 0;
        }
@@ -1299,4 +1303,3 @@ const struct v4l2_file_operations atomisp_file_fops = {
 #endif
        .poll = atomisp_poll,
 };
-
index 55ba185b43a0835a5bf481ba13939e465cf8172b..56035063f81d7572eb5c277fb9202698e5581f7e 100644 (file)
@@ -26,4 +26,3 @@ static inline void __iomem *atomisp_get_io_virt_addr(unsigned int address)
        return ret;
 }
 #endif
-
index a2a15725cd488ab16beb44cea56fc052778385af..a5412433835dd241c0d8832c9fcfb4851a10283b 100644 (file)
 
 #endif
 #define DIV_NEAREST_STEP(n, d, step) \
-       round_down((2 * (n) + (d) * (step))/(2 * (d)), (step))
+       round_down((2 * (n) + (d) * (step)) / (2 * (d)), (step))
 
 struct atomisp_input_subdev {
        unsigned int type;
@@ -212,7 +212,6 @@ struct atomisp_sw_contex {
        int running_freq;
 };
 
-
 #define ATOMISP_DEVICE_STREAMING_DISABLED      0
 #define ATOMISP_DEVICE_STREAMING_ENABLED       1
 #define ATOMISP_DEVICE_STREAMING_STOPPING      2
@@ -295,16 +294,16 @@ extern struct device *atomisp_dev;
 
 #define atomisp_is_wdt_running(a) timer_pending(&(a)->wdt)
 #ifdef ISP2401
-extern void atomisp_wdt_refresh_pipe(struct atomisp_video_pipe *pipe,
+void atomisp_wdt_refresh_pipe(struct atomisp_video_pipe *pipe,
                                        unsigned int delay);
 #endif
-extern void atomisp_wdt_refresh(struct atomisp_sub_device *asd, unsigned int delay);
+void atomisp_wdt_refresh(struct atomisp_sub_device *asd, unsigned int delay);
 #ifndef ISP2401
-extern void atomisp_wdt_start(struct atomisp_sub_device *asd);
+void atomisp_wdt_start(struct atomisp_sub_device *asd);
 #else
-extern void atomisp_wdt_start(struct atomisp_video_pipe *pipe);
-extern void atomisp_wdt_stop_pipe(struct atomisp_video_pipe *pipe, bool sync);
+void atomisp_wdt_start(struct atomisp_video_pipe *pipe);
+void atomisp_wdt_stop_pipe(struct atomisp_video_pipe *pipe, bool sync);
 #endif
-extern void atomisp_wdt_stop(struct atomisp_sub_device *asd, bool sync);
+void atomisp_wdt_stop(struct atomisp_sub_device *asd, bool sync);
 
 #endif /* __ATOMISP_INTERNAL_H__ */
index 712408eee3e6606f81907786518eee489091afd3..d4eef9f76e6aa1ea3630587e1b483fce84071d14 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/delay.h>
 #include <linux/pci.h>
 
-
 #include <media/v4l2-ioctl.h>
 #include <media/v4l2-event.h>
 #include <media/videobuf-vmalloc.h>
@@ -333,6 +332,7 @@ static struct v4l2_queryctrl ci_v4l2_controls[] = {
                .default_value = 0,
        },
 };
+
 static const u32 ctrls_num = ARRAY_SIZE(ci_v4l2_controls);
 
 /*
@@ -651,6 +651,7 @@ unsigned int atomisp_is_acc_enabled(struct atomisp_device *isp)
 
        return 0;
 }
+
 /*
  * get input are used to get current primary/secondary camera
  */
@@ -666,6 +667,7 @@ static int atomisp_g_input(struct file *file, void *fh, unsigned int *input)
 
        return 0;
 }
+
 /*
  * set input are used to set current primary/secondary camera
  */
@@ -689,7 +691,7 @@ static int atomisp_s_input(struct file *file, void *fh, unsigned int input)
         * 1: already in use
         * 2: if in use, whether it is used by other streams
         */
-       if (isp->inputs[input].asd != NULL && isp->inputs[input].asd != asd) {
+       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);
@@ -898,7 +900,7 @@ void atomisp_videobuf_free_buf(struct videobuf_buffer *vb)
 {
        struct videobuf_vmalloc_memory *vm_mem;
 
-       if (vb == NULL)
+       if (!vb)
                return;
 
        vm_mem = vb->priv;
@@ -1037,8 +1039,8 @@ int __atomisp_reqbufs(struct file *file, void *fh,
        struct atomisp_css_frame_info frame_info;
        struct atomisp_css_frame *frame;
        struct videobuf_vmalloc_memory *vm_mem;
-       uint16_t source_pad = atomisp_subdev_source_pad(vdev);
-       uint16_t stream_id = atomisp_source_pad_to_stream_id(asd, source_pad);
+       u16 source_pad = atomisp_subdev_source_pad(vdev);
+       u16 stream_id = atomisp_source_pad_to_stream_id(asd, source_pad);
        int ret = 0, i = 0;
 
        if (req->count == 0) {
@@ -1194,6 +1196,7 @@ static int atomisp_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
         */
        if (buf->memory == V4L2_MEMORY_USERPTR) {
                struct hrt_userbuffer_attr attributes;
+
                vb = pipe->capq.bufs[buf->index];
                vm_mem = vb->priv;
                if (!vm_mem) {
@@ -1338,7 +1341,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,
@@ -1347,11 +1350,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);
@@ -1557,6 +1560,7 @@ int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp,
         */
        for (i = 0; i < isp->num_of_streams; i++) {
                int sensor_index = isp->asd[i].input_curr;
+
                if (isp->inputs[sensor_index].camera_caps->
                                sensor[isp->asd[i].sensor_curr].is_slave)
                        slave = sensor_index;
@@ -1643,6 +1647,7 @@ static void atomisp_pause_buffer_event(struct atomisp_device *isp)
 
        for (i = 0; i < isp->num_of_streams; i++) {
                int sensor_index = isp->asd[i].input_curr;
+
                if (isp->inputs[sensor_index].camera_caps->
                                sensor[isp->asd[i].sensor_curr].is_slave) {
                        v4l2_event_queue(isp->asd[i].subdev.devnode, &event);
@@ -1657,13 +1662,13 @@ static void atomisp_pause_buffer_event(struct atomisp_device *isp)
 /* manually to 128 in case of 13MPx snapshot and to 1 otherwise. */
 static void atomisp_dma_burst_len_cfg(struct atomisp_sub_device *asd)
 {
-
        struct v4l2_mbus_framefmt *sink;
+
        sink = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
                                       V4L2_SUBDEV_FORMAT_ACTIVE,
                                       ATOMISP_SUBDEV_PAD_SINK);
 
-       if (sink->width * sink->height >= 4096*3072)
+       if (sink->width * sink->height >= 4096 * 3072)
                atomisp_store_uint32(DMA_BURST_SIZE_REG, 0x7F);
        else
                atomisp_store_uint32(DMA_BURST_SIZE_REG, 0x00);
@@ -1717,7 +1722,7 @@ static int atomisp_streamon(struct file *file, void *fh,
        sensor_start_stream = atomisp_sensor_start_stream(asd);
 
        spin_lock_irqsave(&pipe->irq_lock, irqflags);
-       if (list_empty(&(pipe->capq.stream))) {
+       if (list_empty(&pipe->capq.stream)) {
                spin_unlock_irqrestore(&pipe->irq_lock, irqflags);
                dev_dbg(isp->dev, "no buffer in the queue\n");
                ret = -EINVAL;
@@ -1971,7 +1976,6 @@ int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type)
                ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW &&
            atomisp_subdev_source_pad(vdev) !=
                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);
@@ -2138,6 +2142,7 @@ stopsensor:
        if (isp->sw_contex.power_state == ATOM_ISP_POWER_UP) {
                unsigned int i;
                bool recreate_streams[MAX_STREAM_NUM] = {0};
+
                if (isp->isp_timeout)
                        dev_err(isp->dev, "%s: Resetting with WA activated",
                                __func__);
@@ -2345,6 +2350,7 @@ static int atomisp_s_ctrl(struct file *file, void *fh,
        rt_mutex_unlock(&isp->mutex);
        return ret;
 }
+
 /*
  * To query the attributes of a control.
  * applications set the id field of a struct v4l2_queryctrl and call the
index 673b9a25f601359d6c9954693d9d3b4803d57310..b92d3bf593a00fa5d533ae31b1b061e43056825d 100644 (file)
@@ -127,10 +127,11 @@ bool atomisp_subdev_format_conversion(struct atomisp_sub_device *asd,
                && !atomisp_is_mbuscode_raw(src->code);
 }
 
-uint16_t atomisp_subdev_source_pad(struct video_device * vdev)
+uint16_t atomisp_subdev_source_pad(struct video_device *vdev)
 {
        struct media_link *link;
-       uint16_t ret = 0;
+       u16 ret = 0;
+
        list_for_each_entry(link, &vdev->entity.links, list) {
                if (link->source) {
                        ret = link->source->index;
@@ -243,7 +244,7 @@ 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,
-                                         uint32_t which, uint32_t pad,
+                                         u32 which, uint32_t pad,
                                          uint32_t target)
 {
        struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
@@ -299,7 +300,7 @@ static void isp_get_fmt_rect(struct v4l2_subdev *sd,
 
 static void isp_subdev_propagate(struct v4l2_subdev *sd,
                                 struct v4l2_subdev_pad_config *cfg,
-                                uint32_t which, uint32_t pad, uint32_t target,
+                                u32 which, uint32_t pad, uint32_t target,
                                 uint32_t flags)
 {
        struct v4l2_mbus_framefmt *ffmt[ATOMISP_SUBDEV_PADS_NUM];
@@ -353,13 +354,13 @@ static char *atomisp_pad_str[] = { "ATOMISP_SUBDEV_PAD_SINK",
 
 int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
                                 struct v4l2_subdev_pad_config *cfg,
-                                uint32_t which, uint32_t pad, uint32_t target,
-                                uint32_t flags, struct v4l2_rect *r)
+                                u32 which, uint32_t pad, uint32_t target,
+                                u32 flags, struct v4l2_rect *r)
 {
        struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
        struct atomisp_device *isp = isp_sd->isp;
        struct v4l2_mbus_framefmt *ffmt[ATOMISP_SUBDEV_PADS_NUM];
-       uint16_t vdev_pad = atomisp_subdev_source_pad(sd->devnode);
+       u16 vdev_pad = atomisp_subdev_source_pad(sd->devnode);
        struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM],
                *comp[ATOMISP_SUBDEV_PADS_NUM];
        enum atomisp_input_stream_id stream_id;
@@ -551,6 +552,7 @@ static int isp_subdev_set_selection(struct v4l2_subdev *sd,
                                    struct v4l2_subdev_selection *sel)
 {
        int rval = isp_subdev_validate_rect(sd, sel->pad, sel->target);
+
        if (rval)
                return rval;
 
@@ -594,13 +596,13 @@ static int atomisp_get_sensor_bin_factor(struct atomisp_sub_device *asd)
 
 void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
                             struct v4l2_subdev_pad_config *cfg, uint32_t which,
-                            uint32_t pad, struct v4l2_mbus_framefmt *ffmt)
+                            u32 pad, struct v4l2_mbus_framefmt *ffmt)
 {
        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);
-       uint16_t vdev_pad = atomisp_subdev_source_pad(sd->devnode);
+       u16 vdev_pad = atomisp_subdev_source_pad(sd->devnode);
        enum atomisp_input_stream_id stream_id;
 
        dev_dbg(isp->dev, "ffmt: pad %s w %d h %d code 0x%8.8x which %s\n",
@@ -1240,6 +1242,7 @@ int atomisp_create_pads_links(struct atomisp_device *isp)
 {
        struct atomisp_sub_device *asd;
        int i, j, ret = 0;
+
        isp->num_of_streams = 2;
        for (i = 0; i < ATOMISP_CAMERA_NR_PORTS; i++) {
                for (j = 0; j < isp->num_of_streams; j++) {
index 59ff8723c182781f38c54407a7633b30f57885c0..6eb2661c3dece35a48f83f028ce470f470964523 100644 (file)
@@ -56,8 +56,8 @@ enum atomisp_subdev_input_entity {
 
 struct atomisp_in_fmt_conv {
        u32     code;
-       uint8_t bpp; /* bits per pixel */
-       uint8_t depth; /* uncompressed */
+       u8 bpp; /* bits per pixel */
+       u8 depth; /* uncompressed */
        enum atomisp_input_format atomisp_in_fmt;
        enum atomisp_css_bayer_order bayer_order;
        enum atomisp_input_format css_stream_fmt;
@@ -91,7 +91,7 @@ struct atomisp_video_pipe {
 
        struct atomisp_device *isp;
        struct v4l2_pix_format pix;
-       uint32_t sh_fmt;
+       u32 sh_fmt;
 
        struct atomisp_sub_device *asd;
 
@@ -192,7 +192,7 @@ struct atomisp_css_params {
         * translate to ia_css_frame * and then set to CSS.
         */
        void            *output_frame;
-       uint32_t        isp_config_id;
+       u32     isp_config_id;
 
        /* Indicates which parameters need to be updated. */
        struct atomisp_parameters update_flag;
@@ -238,11 +238,11 @@ struct atomisp_subdev_params {
        struct ia_css_3a_statistics *s3a_user_stat;
 
        void *metadata_user[ATOMISP_METADATA_TYPE_NUM];
-       uint32_t metadata_width_size;
+       u32 metadata_width_size;
 
        struct ia_css_dvs2_statistics *dvs_stat;
        struct atomisp_css_dvs_6axis *dvs_6axis;
-       uint32_t exp_id;
+       u32 exp_id;
        int  dvs_hor_coef_bytes;
        int  dvs_ver_coef_bytes;
        int  dvs_ver_proj_bytes;
@@ -291,7 +291,7 @@ struct atomisp_sub_device {
        struct v4l2_subdev subdev;
        struct media_pad pads[ATOMISP_SUBDEV_PADS_NUM];
        struct atomisp_pad_format fmt[ATOMISP_SUBDEV_PADS_NUM];
-       uint16_t capture_pad; /* main capture pad; defines much of isp config */
+       u16 capture_pad; /* main capture pad; defines much of isp config */
 
        enum atomisp_subdev_input_entity input;
        unsigned int output;
@@ -395,7 +395,7 @@ 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;
 
@@ -442,16 +442,16 @@ struct v4l2_mbus_framefmt
                         uint32_t pad);
 struct v4l2_rect *atomisp_subdev_get_rect(struct v4l2_subdev *sd,
                                          struct v4l2_subdev_pad_config *cfg,
-                                         uint32_t which, uint32_t pad,
+                                         u32 which, uint32_t pad,
                                          uint32_t target);
 int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
                                 struct v4l2_subdev_pad_config *cfg,
-                                uint32_t which, uint32_t pad, uint32_t target,
-                                uint32_t flags, struct v4l2_rect *r);
+                                u32 which, uint32_t pad, uint32_t target,
+                                u32 flags, struct v4l2_rect *r);
 /* Actually set the format */
 void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
                             struct v4l2_subdev_pad_config *cfg, uint32_t which,
-                            uint32_t pad, struct v4l2_mbus_framefmt *ffmt);
+                            u32 pad, struct v4l2_mbus_framefmt *ffmt);
 
 int atomisp_update_run_mode(struct atomisp_sub_device *asd);
 
index adc900272f6fba9727d78f4e64daab7a633c34f2..1d233f2a69fdd2db020366462de2c7d051f17198 100644 (file)
@@ -134,7 +134,6 @@ error:
 
 void atomisp_tpg_cleanup(struct atomisp_device *isp)
 {
-
 }
 
 int atomisp_tpg_init(struct atomisp_device *isp)
index 462b296554c7badb2c7cbbbcabe83e11e2d0fe59..13cdfc4f0976b0caef99d7bdd8b2342bdbea0b87 100644 (file)
@@ -54,9 +54,7 @@ TRACE_EVENT(camera_meminfo,
        ),
 
        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",
+               "<%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)
index 9156e253d5bf2d830b79ee9c702d078cf2d37b7d..5a68967d15c4a2ddca173415b2510ffde4e66a0f 100644 (file)
@@ -376,7 +376,6 @@ done:
        return 0;
 }
 
-
  /*
  * WA for DDR DVFS enable/disable
  * By default, ISP will force DDR DVFS 1600MHz before disable DVFS
@@ -448,7 +447,6 @@ int atomisp_mrfld_power_down(struct atomisp_device *isp)
        }
 }
 
-
 /* Workaround for pmu_nc_set_power_state not ready in MRFLD */
 int atomisp_mrfld_power_up(struct atomisp_device *isp)
 {
@@ -735,7 +733,7 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
        int ret, raw_index = -1;
 
        pdata = atomisp_get_platform_data();
-       if (pdata == NULL) {
+       if (!pdata) {
                dev_err(isp->dev, "no platform data available\n");
                return 0;
        }
@@ -748,7 +746,7 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
                        i2c_get_adapter(subdevs->v4l2_subdev.i2c_adapter_id);
                int sensor_num, i;
 
-               if (adapter == NULL) {
+               if (!adapter) {
                        dev_err(isp->dev,
                                "Failed to find i2c adapter for subdev %s\n",
                                board_info->type);
@@ -766,7 +764,7 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
                        continue;
                }
 
-               if (subdev == NULL) {
+               if (!subdev) {
                        dev_warn(isp->dev, "Subdev %s detection fail\n",
                                 board_info->type);
                        continue;
@@ -825,7 +823,6 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
                        dev_dbg(isp->dev, "unknown subdev probed\n");
                        break;
                }
-
        }
 
        /*
@@ -937,7 +934,7 @@ static int atomisp_register_entities(struct atomisp_device *isp)
                asd->delayed_init_workq =
                        alloc_workqueue(isp->v4l2_dev.name, WQ_CPU_INTENSIVE,
                                        1);
-               if (asd->delayed_init_workq == NULL) {
+               if (!asd->delayed_init_workq) {
                        dev_err(isp->dev,
                                        "Failed to initialize delayed init workq\n");
                        ret = -ENOMEM;
@@ -1037,7 +1034,6 @@ static int atomisp_initialize_modules(struct atomisp_device *isp)
                goto error_isp_subdev;
        }
 
-
        return 0;
 
 error_isp_subdev:
@@ -1128,7 +1124,7 @@ static int init_atomisp_wdts(struct atomisp_device *isp)
 
        atomic_set(&isp->wdt_work_queued, 0);
        isp->wdt_work_queue = alloc_workqueue(isp->v4l2_dev.name, 0, 1);
-       if (isp->wdt_work_queue == NULL) {
+       if (!isp->wdt_work_queue) {
                dev_err(isp->dev, "Failed to initialize wdt work queue\n");
                err = -ENOMEM;
                goto alloc_fail;
@@ -1174,7 +1170,7 @@ static int atomisp_pci_probe(struct pci_dev *dev,
        atomisp_dev = &dev->dev;
 
        pdata = atomisp_get_platform_data();
-       if (pdata == NULL)
+       if (!pdata)
                dev_warn(&dev->dev, "no platform data available\n");
 
        err = pcim_enable_device(dev);
@@ -1243,13 +1239,13 @@ static int atomisp_pci_probe(struct pci_dev *dev,
                        (ATOMISP_HW_REVISION_ISP2400
                         << ATOMISP_HW_REVISION_SHIFT) |
                        ATOMISP_HW_STEPPING_B0;
-#ifdef FIXME                   
+#ifdef FIXME
                if (INTEL_MID_BOARD(3, TABLET, BYT, BLK, PRO, CRV2) ||
                        INTEL_MID_BOARD(3, TABLET, BYT, BLK, ENG, CRV2)) {
                        isp->dfs = &dfs_config_byt_cr;
                        isp->hpll_freq = HPLL_FREQ_2000MHZ;
                } else
-#endif         
+#endif
                {
                        isp->dfs = &dfs_config_byt;
                        isp->hpll_freq = HPLL_FREQ_1600MHZ;
index 564be8ea751d698b7511ae59ec47026c110e5496..55fe4b7011c273b4f4a4ba50a7d965f876ef0399 100644 (file)
@@ -44,7 +44,7 @@ struct ia_css_circbuf_s {
  * @param elems        An array of elements.
  * @param desc The descriptor set to the size using ia_css_circbuf_desc_init().
  */
-extern void ia_css_circbuf_create(
+void ia_css_circbuf_create(
        ia_css_circbuf_t *cb,
        ia_css_circbuf_elem_t *elems,
        ia_css_circbuf_desc_t *desc);
@@ -54,7 +54,7 @@ extern void ia_css_circbuf_create(
  *
  * @param cb The pointer to the circular buffer.
  */
-extern void ia_css_circbuf_destroy(
+void ia_css_circbuf_destroy(
                ia_css_circbuf_t *cb);
 
 /**
@@ -67,7 +67,7 @@ extern void ia_css_circbuf_destroy(
  *
  * @return the pop-out value.
  */
-extern uint32_t ia_css_circbuf_pop(
+uint32_t ia_css_circbuf_pop(
                ia_css_circbuf_t *cb);
 
 /**
@@ -81,7 +81,7 @@ extern uint32_t ia_css_circbuf_pop(
  *
  * @return the extracted value.
  */
-extern uint32_t ia_css_circbuf_extract(
+uint32_t ia_css_circbuf_extract(
        ia_css_circbuf_t *cb,
        int offset);
 
@@ -100,7 +100,7 @@ static inline void ia_css_circbuf_elem_set_val(
        ia_css_circbuf_elem_t *elem,
        uint32_t val)
 {
-       OP___assert(elem != NULL);
+       OP___assert(elem);
 
        elem->val = val;
 }
@@ -113,7 +113,7 @@ static inline void ia_css_circbuf_elem_set_val(
 static inline void ia_css_circbuf_elem_init(
                ia_css_circbuf_elem_t *elem)
 {
-       OP___assert(elem != NULL);
+       OP___assert(elem);
        ia_css_circbuf_elem_set_val(elem, 0);
 }
 
@@ -127,8 +127,8 @@ static inline void ia_css_circbuf_elem_cpy(
        ia_css_circbuf_elem_t *src,
        ia_css_circbuf_elem_t *dest)
 {
-       OP___assert(src != NULL);
-       OP___assert(dest != NULL);
+       OP___assert(src);
+       OP___assert(dest);
 
        ia_css_circbuf_elem_set_val(dest, src->val);
 }
@@ -144,13 +144,13 @@ static inline void ia_css_circbuf_elem_cpy(
  */
 static inline uint8_t ia_css_circbuf_get_pos_at_offset(
        ia_css_circbuf_t *cb,
-       uint32_t base,
+       u32 base,
        int offset)
 {
-       uint8_t dest;
+       u8 dest;
 
-       OP___assert(cb != NULL);
-       OP___assert(cb->desc != NULL);
+       OP___assert(cb);
+       OP___assert(cb->desc);
        OP___assert(cb->desc->size > 0);
 
        /* step 1: adjudst the offset  */
@@ -177,13 +177,13 @@ static inline uint8_t ia_css_circbuf_get_pos_at_offset(
  */
 static inline int ia_css_circbuf_get_offset(
        ia_css_circbuf_t *cb,
-       uint32_t src_pos,
+       u32 src_pos,
        uint32_t dest_pos)
 {
        int offset;
 
-       OP___assert(cb != NULL);
-       OP___assert(cb->desc != NULL);
+       OP___assert(cb);
+       OP___assert(cb->desc);
 
        offset = (int)(dest_pos - src_pos);
        offset += (offset < 0) ? cb->desc->size : 0;
@@ -203,8 +203,8 @@ static inline int ia_css_circbuf_get_offset(
 static inline uint32_t ia_css_circbuf_get_size(
                ia_css_circbuf_t *cb)
 {
-       OP___assert(cb != NULL);
-       OP___assert(cb->desc != NULL);
+       OP___assert(cb);
+       OP___assert(cb->desc);
 
        return cb->desc->size;
 }
@@ -221,8 +221,8 @@ static inline uint32_t ia_css_circbuf_get_num_elems(
 {
        int num;
 
-       OP___assert(cb != NULL);
-       OP___assert(cb->desc != NULL);
+       OP___assert(cb);
+       OP___assert(cb->desc);
 
        num = ia_css_circbuf_get_offset(cb, cb->desc->start, cb->desc->end);
 
@@ -241,8 +241,8 @@ static inline uint32_t ia_css_circbuf_get_num_elems(
 static inline bool ia_css_circbuf_is_empty(
                ia_css_circbuf_t *cb)
 {
-       OP___assert(cb != NULL);
-       OP___assert(cb->desc != NULL);
+       OP___assert(cb);
+       OP___assert(cb->desc);
 
        return ia_css_circbuf_desc_is_empty(cb->desc);
 }
@@ -258,8 +258,8 @@ static inline bool ia_css_circbuf_is_empty(
  */
 static inline bool ia_css_circbuf_is_full(ia_css_circbuf_t *cb)
 {
-       OP___assert(cb != NULL);
-       OP___assert(cb->desc != NULL);
+       OP___assert(cb);
+       OP___assert(cb->desc);
 
        return ia_css_circbuf_desc_is_full(cb->desc);
 }
@@ -277,8 +277,8 @@ static inline void ia_css_circbuf_write(
        ia_css_circbuf_t *cb,
        ia_css_circbuf_elem_t elem)
 {
-       OP___assert(cb != NULL);
-       OP___assert(cb->desc != NULL);
+       OP___assert(cb);
+       OP___assert(cb->desc);
 
        /* Cannot continue as the queue is full*/
        assert(!ia_css_circbuf_is_full(cb));
@@ -303,7 +303,7 @@ static inline void ia_css_circbuf_push(
 {
        ia_css_circbuf_elem_t elem;
 
-       OP___assert(cb != NULL);
+       OP___assert(cb);
 
        /* set up an element */
        ia_css_circbuf_elem_init(&elem);
@@ -323,8 +323,8 @@ static inline void ia_css_circbuf_push(
 static inline uint32_t ia_css_circbuf_get_free_elems(
                ia_css_circbuf_t *cb)
 {
-       OP___assert(cb != NULL);
-       OP___assert(cb->desc != NULL);
+       OP___assert(cb);
+       OP___assert(cb->desc);
 
        return ia_css_circbuf_desc_get_free_elems(cb->desc);
 }
@@ -337,7 +337,7 @@ static inline uint32_t ia_css_circbuf_get_free_elems(
  *
  * @return the elements value.
  */
-extern uint32_t ia_css_circbuf_peek(
+uint32_t ia_css_circbuf_peek(
        ia_css_circbuf_t *cb,
        int offset);
 
@@ -349,7 +349,7 @@ extern uint32_t ia_css_circbuf_peek(
  *
  * @return the elements value.
  */
-extern uint32_t ia_css_circbuf_peek_from_start(
+uint32_t ia_css_circbuf_peek_from_start(
        ia_css_circbuf_t *cb,
        int offset);
 
@@ -362,13 +362,13 @@ extern uint32_t ia_css_circbuf_peek_from_start(
  * @param sz_delta delta increase for new size
  * @param elems (optional) pointers to new additional elements
  *             cb element array size will not be increased dynamically,
- *             but new elements should be added at the end to existing
- *             cb element array which if of max_size >= new size
+ *             but new elements should be added at the end to existing
+ *             cb element array which if of max_size >= new size
  *
  * @return     true on successfully increasing the size
- *                     false on failure
+ *                     false on failure
  */
-extern bool ia_css_circbuf_increase_size(
+bool ia_css_circbuf_increase_size(
                ia_css_circbuf_t *cb,
                unsigned int sz_delta,
                ia_css_circbuf_elem_t *elems);
index 3fc0330b9526d12fc3ad9c1995f96d729bbe91ea..09b049b3bd15a8f2c63bfc2edcefd2665979a040 100644 (file)
  */
 typedef struct ia_css_circbuf_desc_s ia_css_circbuf_desc_t;
 struct ia_css_circbuf_desc_s {
-       uint8_t size;   /* the maximum number of elements*/
-       uint8_t step;   /* number of bytes per element */
-       uint8_t start;  /* index of the oldest element */
-       uint8_t end;    /* index at which to write the new element */
+       u8 size;        /* the maximum number of elements*/
+       u8 step;   /* number of bytes per element */
+       u8 start;       /* index of the oldest element */
+       u8 end; /* index at which to write the new element */
 };
+
 #define SIZE_OF_IA_CSS_CIRCBUF_DESC_S_STRUCT                           \
        (4 * sizeof(uint8_t))
 
@@ -48,8 +49,9 @@ struct ia_css_circbuf_desc_s {
  */
 typedef struct ia_css_circbuf_elem_s ia_css_circbuf_elem_t;
 struct ia_css_circbuf_elem_s {
-       uint32_t val;   /* the value stored in the element */
+       u32 val;        /* the value stored in the element */
 };
+
 #define SIZE_OF_IA_CSS_CIRCBUF_ELEM_S_STRUCT                           \
        (sizeof(uint32_t))
 
index 8dd7cd6cd3d83d9c889ecf4e9180c1d20fb9eacb..8724e6098287978348c3cc3afc324902c3e5d1c7 100644 (file)
@@ -37,7 +37,7 @@
 static inline bool ia_css_circbuf_desc_is_empty(
                ia_css_circbuf_desc_t *cb_desc)
 {
-       OP___assert(cb_desc != NULL);
+       OP___assert(cb_desc);
        return (cb_desc->end == cb_desc->start);
 }
 
@@ -54,7 +54,7 @@ static inline bool ia_css_circbuf_desc_is_empty(
 static inline bool ia_css_circbuf_desc_is_full(
                ia_css_circbuf_desc_t *cb_desc)
 {
-       OP___assert(cb_desc != NULL);
+       OP___assert(cb_desc);
        return (OP_std_modadd(cb_desc->end, 1, cb_desc->size) == cb_desc->start);
 }
 
@@ -68,7 +68,7 @@ static inline void ia_css_circbuf_desc_init(
        ia_css_circbuf_desc_t *cb_desc,
        int8_t size)
 {
-       OP___assert(cb_desc != NULL);
+       OP___assert(cb_desc);
        cb_desc->size = size;
 }
 
@@ -83,11 +83,12 @@ static inline void ia_css_circbuf_desc_init(
  */
 static inline uint8_t ia_css_circbuf_desc_get_pos_at_offset(
        ia_css_circbuf_desc_t *cb_desc,
-       uint32_t base,
+       u32 base,
        int offset)
 {
-       uint8_t dest;
-       OP___assert(cb_desc != NULL);
+       u8 dest;
+
+       OP___assert(cb_desc);
        OP___assert(cb_desc->size > 0);
 
        /* step 1: adjust the offset  */
@@ -115,11 +116,12 @@ static inline uint8_t ia_css_circbuf_desc_get_pos_at_offset(
  */
 static inline int ia_css_circbuf_desc_get_offset(
        ia_css_circbuf_desc_t *cb_desc,
-       uint32_t src_pos,
+       u32 src_pos,
        uint32_t dest_pos)
 {
        int offset;
-       OP___assert(cb_desc != NULL);
+
+       OP___assert(cb_desc);
 
        offset = (int)(dest_pos - src_pos);
        offset += (offset < 0) ? cb_desc->size : 0;
@@ -138,7 +140,8 @@ static inline uint32_t ia_css_circbuf_desc_get_num_elems(
                ia_css_circbuf_desc_t *cb_desc)
 {
        int num;
-       OP___assert(cb_desc != NULL);
+
+       OP___assert(cb_desc);
 
        num = ia_css_circbuf_desc_get_offset(cb_desc,
                                cb_desc->start,
@@ -157,8 +160,9 @@ static inline uint32_t ia_css_circbuf_desc_get_num_elems(
 static inline uint32_t ia_css_circbuf_desc_get_free_elems(
                ia_css_circbuf_desc_t *cb_desc)
 {
-       uint32_t num;
-       OP___assert(cb_desc != NULL);
+       u32 num;
+
+       OP___assert(cb_desc);
 
        num = ia_css_circbuf_desc_get_offset(cb_desc,
                                cb_desc->start,
index 050d60f0894f7641e3307a6e73997ad824dfcf72..1c48ceea72061ee0754e5cf2f37057d41cccb220 100644 (file)
@@ -45,7 +45,7 @@ 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,
-                                                  uint32_t chunk_src,
+                                                  u32 chunk_src,
                                                   uint32_t chunk_dest);
 
 /*
@@ -72,7 +72,7 @@ ia_css_circbuf_create(ia_css_circbuf_t *cb,
                           ia_css_circbuf_elem_t *elems,
                           ia_css_circbuf_desc_t *desc)
 {
-       uint32_t i;
+       u32 i;
 
        OP___assert(desc);
 
@@ -105,7 +105,7 @@ void ia_css_circbuf_destroy(ia_css_circbuf_t *cb)
  */
 uint32_t ia_css_circbuf_pop(ia_css_circbuf_t *cb)
 {
-       uint32_t ret;
+       u32 ret;
        ia_css_circbuf_elem_t elem;
 
        assert(!ia_css_circbuf_is_empty(cb));
@@ -123,10 +123,10 @@ uint32_t ia_css_circbuf_pop(ia_css_circbuf_t *cb)
 uint32_t ia_css_circbuf_extract(ia_css_circbuf_t *cb, int offset)
 {
        int max_offset;
-       uint32_t val;
-       uint32_t pos;
-       uint32_t src_pos;
-       uint32_t dest_pos;
+       u32 val;
+       u32 pos;
+       u32 src_pos;
+       u32 dest_pos;
 
        /* get the maximum offest */
        max_offset = ia_css_circbuf_get_offset(cb, cb->desc->start, cb->desc->end);
@@ -204,8 +204,8 @@ bool ia_css_circbuf_increase_size(
                                unsigned int sz_delta,
                                ia_css_circbuf_elem_t *elems)
 {
-       uint8_t curr_size;
-       uint8_t curr_end;
+       u8 curr_size;
+       u8 curr_end;
        unsigned int i = 0;
 
        if (!cb || sz_delta == 0)
@@ -288,7 +288,7 @@ ia_css_circbuf_read(ia_css_circbuf_t *cb)
  */
 static inline void
 ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb,
-                               uint32_t chunk_src, uint32_t chunk_dest)
+                               u32 chunk_src, uint32_t chunk_dest)
 {
        int chunk_offset;
        int chunk_sz;
@@ -301,7 +301,6 @@ ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb,
 
        /* 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]);
@@ -312,10 +311,8 @@ ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb,
                /* adjust the source/terminal positions */
                chunk_src = ia_css_circbuf_get_pos_at_offset(cb, chunk_src, -1);
                chunk_dest = ia_css_circbuf_get_pos_at_offset(cb, chunk_dest, -1);
-
        }
 
        /* adjust the index "start" */
        cb->desc->start = ia_css_circbuf_get_pos_at_offset(cb, cb->desc->start, chunk_offset);
 }
-
index 20db4de6beeb66f0008ff6a52dcc628ebe618603..7a0a03e7b988646ab7cff3f68add64441026b802 100644 (file)
@@ -26,13 +26,13 @@ typedef void (*clear_func)(hrt_vaddress ptr);
  * \param[in]  size            Size of the refcount list.
  * \return                             ia_css_err
  */
-extern enum ia_css_err ia_css_refcount_init(uint32_t size);
+enum ia_css_err ia_css_refcount_init(uint32_t size);
 
 /*! \brief Function for de-initializing refcount list
  *
  * \return                             None
  */
-extern void ia_css_refcount_uninit(void);
+void ia_css_refcount_uninit(void);
 
 /*! \brief Function for increasing reference by 1.
  *
@@ -40,7 +40,7 @@ extern void ia_css_refcount_uninit(void);
  * \param[in]  ptr             Data of the object (ptr).
  * \return                             hrt_vaddress (saved address)
  */
-extern hrt_vaddress ia_css_refcount_increment(int32_t id, hrt_vaddress ptr);
+hrt_vaddress ia_css_refcount_increment(s32 id, hrt_vaddress ptr);
 
 /*! \brief Function for decrease reference by 1.
  *
@@ -50,7 +50,7 @@ extern hrt_vaddress ia_css_refcount_increment(int32_t id, hrt_vaddress ptr);
  *     - true, if it is successful.
  *     - false, otherwise.
  */
-extern bool ia_css_refcount_decrement(int32_t id, hrt_vaddress ptr);
+bool ia_css_refcount_decrement(s32 id, hrt_vaddress ptr);
 
 /*! \brief Function to check if reference count is 1.
  *
@@ -59,7 +59,7 @@ extern bool ia_css_refcount_decrement(int32_t id, hrt_vaddress ptr);
  *     - true, if it is successful.
  *     - false, otherwise.
  */
-extern bool ia_css_refcount_is_single(hrt_vaddress ptr);
+bool ia_css_refcount_is_single(hrt_vaddress ptr);
 
 /*! \brief Function to clear reference list objects.
  *
@@ -68,7 +68,7 @@ extern bool ia_css_refcount_is_single(hrt_vaddress ptr);
  *
  *  return                             None
  */
-extern void ia_css_refcount_clear(int32_t id,
+void ia_css_refcount_clear(s32 id,
                                  clear_func clear_func_ptr);
 
 /*! \brief Function to verify if object is valid
@@ -78,6 +78,6 @@ extern void ia_css_refcount_clear(int32_t id,
  *      - true, if valid
  *      - false, if invalid
  */
-extern bool ia_css_refcount_is_valid(hrt_vaddress ptr);
+bool ia_css_refcount_is_valid(hrt_vaddress ptr);
 
 #endif /* _IA_CSS_REFCOUNT_H_ */
index 6e3bd773ee4c1a140b33370aaab2de5e16e476e1..6fca1554dd0202fa1a34523047386c35a93e2798 100644 (file)
 /* TODO: enable for other memory aswell
         now only for hrt_vaddress */
 struct ia_css_refcount_entry {
-       uint32_t count;
+       u32 count;
        hrt_vaddress data;
-       int32_t id;
+       s32 id;
 };
 
 struct ia_css_refcount_list {
-       uint32_t size;
+       u32 size;
        struct ia_css_refcount_entry *items;
 };
 
@@ -40,18 +40,17 @@ static struct ia_css_refcount_list myrefcount;
 static struct ia_css_refcount_entry *refcount_find_entry(hrt_vaddress ptr,
                                                         bool firstfree)
 {
-       uint32_t i;
+       u32 i;
 
        if (ptr == 0)
                return NULL;
-       if (myrefcount.items == NULL) {
+       if (!myrefcount.items) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
                                    "refcount_find_entry(): Ref count not initiliazed!\n");
                return NULL;
        }
 
        for (i = 0; i < myrefcount.size; i++) {
-
                if ((&myrefcount.items[i])->data == 0) {
                        if (firstfree) {
                                /* for new entry */
@@ -75,7 +74,7 @@ enum ia_css_err ia_css_refcount_init(uint32_t size)
                                    "ia_css_refcount_init(): Size of 0 for Ref count init!\n");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
-       if (myrefcount.items != NULL) {
+       if (myrefcount.items) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                                    "ia_css_refcount_init(): Ref count is already initialized\n");
                return IA_CSS_ERR_INTERNAL_ERROR;
@@ -95,7 +94,8 @@ enum ia_css_err ia_css_refcount_init(uint32_t size)
 void ia_css_refcount_uninit(void)
 {
        struct ia_css_refcount_entry *entry;
-       uint32_t i;
+       u32 i;
+
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                            "ia_css_refcount_uninit() entry\n");
        for (i = 0; i < myrefcount.size; i++) {
@@ -121,7 +121,7 @@ void ia_css_refcount_uninit(void)
                            "ia_css_refcount_uninit() leave\n");
 }
 
-hrt_vaddress ia_css_refcount_increment(int32_t id, hrt_vaddress ptr)
+hrt_vaddress ia_css_refcount_increment(s32 id, hrt_vaddress ptr)
 {
        struct ia_css_refcount_entry *entry;
 
@@ -135,8 +135,8 @@ hrt_vaddress ia_css_refcount_increment(int32_t id, hrt_vaddress ptr)
 
        if (!entry) {
                entry = refcount_find_entry(ptr, true);
-               assert(entry != NULL);
-               if (entry == NULL)
+               assert(entry);
+               if (!entry)
                        return mmgr_NULL;
                entry->id = id;
        }
@@ -158,7 +158,7 @@ hrt_vaddress ia_css_refcount_increment(int32_t id, hrt_vaddress ptr)
        return ptr;
 }
 
-bool ia_css_refcount_decrement(int32_t id, hrt_vaddress ptr)
+bool ia_css_refcount_decrement(s32 id, hrt_vaddress ptr)
 {
        struct ia_css_refcount_entry *entry;
 
@@ -218,13 +218,13 @@ bool ia_css_refcount_is_single(hrt_vaddress ptr)
        return true;
 }
 
-void ia_css_refcount_clear(int32_t id, clear_func clear_func_ptr)
+void ia_css_refcount_clear(s32 id, clear_func clear_func_ptr)
 {
        struct ia_css_refcount_entry *entry;
-       uint32_t i;
-       uint32_t count = 0;
+       u32 i;
+       u32 count = 0;
 
-       assert(clear_func_ptr != NULL);
+       assert(clear_func_ptr);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_refcount_clear(%x)\n",
                            id);
 
@@ -236,16 +236,14 @@ void ia_css_refcount_clear(int32_t id, clear_func clear_func_ptr)
                entry = myrefcount.items + i;
                if ((entry->data != mmgr_NULL) && (entry->id == id)) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                                           "ia_css_refcount_clear:"
-                                           " %x: 0x%x\n", id, entry->data);
+                                           "ia_css_refcount_clear: %x: 0x%x\n",
+                                           id, entry->data);
                        if (clear_func_ptr) {
                                /* clear using provided function */
                                clear_func_ptr(entry->data);
                        } else {
                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-                                                   "ia_css_refcount_clear: "
-                                                   "using hmm_free: "
-                                                   "no clear_func\n");
+                                                   "ia_css_refcount_clear: using hmm_free: no clear_func\n");
                                hmm_free(entry->data);
                        }
 #ifndef ISP2401
@@ -276,6 +274,5 @@ bool ia_css_refcount_is_valid(hrt_vaddress ptr)
 
        entry = refcount_find_entry(ptr, false);
 
-       return entry != NULL;
+       return entry;
 }
-
index a6d650a9a1f4232042d6d0594dec6c7bf1cc2c7f..ba152c1e081248e7c257c76f747fd945c1736533 100644 (file)
@@ -29,7 +29,7 @@
  * @return    None
  *
  */
-extern void ia_css_pipe_get_copy_binarydesc(
+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,
@@ -45,7 +45,7 @@ extern void ia_css_pipe_get_copy_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_vfpp_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,
@@ -62,7 +62,7 @@ extern void ia_css_pipe_get_vfpp_binarydesc(
  * @return     IA_CSS_SUCCESS or error code upon error.
  *
  */
-extern enum ia_css_err sh_css_bds_factor_get_numerator_denominator(
+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);
@@ -78,7 +78,7 @@ extern enum ia_css_err sh_css_bds_factor_get_numerator_denominator(
  * @return     IA_CSS_SUCCESS or error code upon error.
  *
  */
-extern enum ia_css_err ia_css_pipe_get_preview_binarydesc(
+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,
@@ -96,7 +96,7 @@ extern enum ia_css_err ia_css_pipe_get_preview_binarydesc(
  * @return     IA_CSS_SUCCESS or error code upon error.
  *
  */
-extern enum ia_css_err ia_css_pipe_get_video_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,
@@ -133,7 +133,7 @@ void ia_css_pipe_get_yuvscaler_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_capturepp_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,
@@ -150,7 +150,7 @@ extern void ia_css_pipe_get_capturepp_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_primary_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,
@@ -167,7 +167,7 @@ extern void ia_css_pipe_get_primary_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_pre_gdc_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,
@@ -182,7 +182,7 @@ extern void ia_css_pipe_get_pre_gdc_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_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,
@@ -198,7 +198,7 @@ extern void ia_css_pipe_get_gdc_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_post_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,
@@ -214,7 +214,7 @@ extern void ia_css_pipe_get_post_gdc_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_pre_de_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,
@@ -229,7 +229,7 @@ extern void ia_css_pipe_get_pre_de_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_pre_anr_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,
@@ -244,7 +244,7 @@ extern void ia_css_pipe_get_pre_anr_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_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,
@@ -260,7 +260,7 @@ extern void ia_css_pipe_get_anr_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_post_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,
@@ -276,7 +276,7 @@ extern void ia_css_pipe_get_post_anr_binarydesc(
  * @return    None
  *
  */
-extern void ia_css_pipe_get_ldc_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,
index 38690ea093c2879bbfaa97a6df67b839ad6d4f51..92008ece64bafc0342ae527164a8ec1530b42cd2 100644 (file)
 #include "ia_css_pipeline.h"
 #include "ia_css_pipeline_common.h"
 
-extern void ia_css_pipe_get_generic_stage_desc(
+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);
 
-extern void ia_css_pipe_get_firmwares_stage_desc(
+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[],
@@ -37,16 +37,15 @@ extern void ia_css_pipe_get_firmwares_stage_desc(
        const struct ia_css_fw_info *fw,
        unsigned int mode);
 
-extern void ia_css_pipe_get_acc_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);
 
-extern void ia_css_pipe_get_sp_func_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 max_input_width);
+       unsigned int max_input_width);
 
 #endif /*__IA_CSS_PIPE_STAGEDESC__H__ */
-
index 155b6fb4722bafb5d49d5905ea137f46be47ef29..d5035824f64fa8c90bb1e5d2d0e372ee207626c9 100644 (file)
  * @return   bits per pixel for the underlying stream
  *
  */
-extern unsigned int ia_css_pipe_util_pipe_input_format_bpp(
+unsigned int ia_css_pipe_util_pipe_input_format_bpp(
        const struct ia_css_pipe * const pipe);
 
-extern void ia_css_pipe_util_create_output_frames(
+void ia_css_pipe_util_create_output_frames(
        struct ia_css_frame *frames[]);
 
-extern void ia_css_pipe_util_set_output_frames(
+void ia_css_pipe_util_set_output_frames(
        struct ia_css_frame *frames[],
        unsigned int idx,
        struct ia_css_frame *frame);
index 98a2a3e9b3e674f74e57c3e7607af33ff8480afa..46c23caea40f9535afe70c41788f993eaa37c0ce 100644 (file)
@@ -40,8 +40,8 @@ static void pipe_binarydesc_get_offline(
 {
        unsigned int i;
        /* in_info, out_info, vf_info can be NULL */
-       assert(pipe != NULL);
-       assert(descr != NULL);
+       assert(pipe);
+       assert(descr);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                            "pipe_binarydesc_get_offline() enter:\n");
 
@@ -86,8 +86,8 @@ void ia_css_pipe_get_copy_binarydesc(
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
        unsigned int i;
        /* out_info can be NULL */
-       assert(pipe != NULL);
-       assert(in_info != NULL);
+       assert(pipe);
+       assert(in_info);
        IA_CSS_ENTER_PRIVATE("");
 
        *in_info = *out_info;
@@ -103,6 +103,7 @@ void ia_css_pipe_get_copy_binarydesc(
        copy_descr->isp_pipe_version = IA_CSS_PIPE_VERSION_1;
        IA_CSS_LEAVE_PRIVATE("");
 }
+
 void ia_css_pipe_get_vfpp_binarydesc(
        struct ia_css_pipe const * const pipe,
        struct ia_css_binary_descr *vf_pp_descr,
@@ -112,8 +113,8 @@ void ia_css_pipe_get_vfpp_binarydesc(
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
        unsigned int i;
        /* out_info can be NULL ??? */
-       assert(pipe != NULL);
-       assert(in_info != NULL);
+       assert(pipe);
+       assert(in_info);
        IA_CSS_ENTER_PRIVATE("");
 
        in_info->raw_bit_depth = 0;
@@ -184,8 +185,8 @@ enum ia_css_err binarydesc_calculate_bds_factor(
 
        /* Loop over all bds factors until a match is found */
        for (i = 0; i < ARRAY_SIZE(bds_factors_list); i++) {
-               unsigned num = bds_factors_list[i].numerator;
-               unsigned den = bds_factors_list[i].denominator;
+               unsigned int num = bds_factors_list[i].numerator;
+               unsigned int den = bds_factors_list[i].denominator;
 
                /* See width-wise and height-wise if this bds_factor
                 * satisfies the condition */
@@ -217,10 +218,10 @@ enum ia_css_err ia_css_pipe_get_preview_binarydesc(
        int mode = IA_CSS_BINARY_MODE_PREVIEW;
        unsigned int i;
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(out_info != NULL);
-       assert(vf_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(out_info);
+       assert(vf_info);
        IA_CSS_ENTER_PRIVATE("");
 
        /*
@@ -339,8 +340,8 @@ enum ia_css_err ia_css_pipe_get_video_binarydesc(
        bool stream_dz_config = false;
 
        /* vf_info can be NULL */
-       assert(pipe != NULL);
-       assert(in_info != NULL);
+       assert(pipe);
+       assert(in_info);
        /* assert(vf_info != NULL); */
        IA_CSS_ENTER_PRIVATE("");
 
@@ -459,8 +460,8 @@ void ia_css_pipe_get_yuvscaler_binarydesc(
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
        struct ia_css_frame_info *this_vf_info = NULL;
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
+       assert(pipe);
+       assert(in_info);
        /* Note: if the following assert fails, the number of ports has been
         * changed; in that case an additional initializer must be added
         * a few lines below after which this assert can be updated.
@@ -502,12 +503,11 @@ void ia_css_pipe_get_capturepp_binarydesc(
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(vf_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(vf_info);
        IA_CSS_ENTER_PRIVATE("");
 
-
        /* the in_info is only used for resolution to enable
           bayer down scaling. */
        if (pipe->out_yuv_ds_input_info.res.width)
@@ -536,8 +536,7 @@ void ia_css_pipe_get_capturepp_binarydesc(
 }
 
 /* lookup table for high quality primary binaries */
-static unsigned int primary_hq_binary_modes[NUM_PRIMARY_HQ_STAGES] =
-{
+static unsigned int primary_hq_binary_modes[NUM_PRIMARY_HQ_STAGES] = {
        IA_CSS_BINARY_MODE_PRIMARY_HQ_STAGE0,
        IA_CSS_BINARY_MODE_PRIMARY_HQ_STAGE1,
        IA_CSS_BINARY_MODE_PRIMARY_HQ_STAGE2,
@@ -559,9 +558,9 @@ void ia_css_pipe_get_primary_binarydesc(
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(out_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(out_info);
        assert(stage_idx < NUM_PRIMARY_HQ_STAGES);
        /* vf_info can be NULL - example video_binarydescr */
        /*assert(vf_info != NULL);*/
@@ -637,9 +636,9 @@ void ia_css_pipe_get_pre_gdc_binarydesc(
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(out_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(out_info);
        IA_CSS_ENTER_PRIVATE("");
 
        *in_info = *out_info;
@@ -664,9 +663,9 @@ void ia_css_pipe_get_gdc_binarydesc(
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(out_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(out_info);
        IA_CSS_ENTER_PRIVATE("");
 
        *in_info = *out_info;
@@ -690,10 +689,10 @@ void ia_css_pipe_get_post_gdc_binarydesc(
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(out_info != NULL);
-       assert(vf_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(out_info);
+       assert(vf_info);
        IA_CSS_ENTER_PRIVATE("");
 
        *in_info = *out_info;
@@ -719,9 +718,9 @@ void ia_css_pipe_get_pre_de_binarydesc(
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(out_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(out_info);
        IA_CSS_ENTER_PRIVATE("");
 
        *in_info = *out_info;
@@ -758,9 +757,9 @@ void ia_css_pipe_get_pre_anr_binarydesc(
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(out_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(out_info);
        IA_CSS_ENTER_PRIVATE("");
 
        *in_info = *out_info;
@@ -792,9 +791,9 @@ void ia_css_pipe_get_anr_binarydesc(
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(out_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(out_info);
        IA_CSS_ENTER_PRIVATE("");
 
        *in_info = *out_info;
@@ -811,7 +810,6 @@ void ia_css_pipe_get_anr_binarydesc(
        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,
@@ -822,10 +820,10 @@ void ia_css_pipe_get_post_anr_binarydesc(
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(out_info != NULL);
-       assert(vf_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(out_info);
+       assert(vf_info);
        IA_CSS_ENTER_PRIVATE("");
 
        *in_info = *out_info;
@@ -851,9 +849,9 @@ void ia_css_pipe_get_ldc_binarydesc(
        unsigned int i;
        struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
 
-       assert(pipe != NULL);
-       assert(in_info != NULL);
-       assert(out_info != NULL);
+       assert(pipe);
+       assert(in_info);
+       assert(out_info);
        IA_CSS_ENTER_PRIVATE("");
 
 #ifndef ISP2401
index 40af8daf5ad96bae7d873bf84b4c2edcc087b259..8b42e86dd9a2b0226b28820221690a52f0fb2aa0 100644 (file)
@@ -24,11 +24,12 @@ void ia_css_pipe_get_generic_stage_desc(
        struct ia_css_frame *vf_frame)
 {
        unsigned int i;
+
        IA_CSS_ENTER_PRIVATE("stage_desc = %p, binary = %p, out_frame = %p, in_frame = %p, vf_frame = %p",
                             stage_desc, binary, out_frame, in_frame, vf_frame);
 
-       assert(stage_desc != NULL && binary != NULL && binary->info != NULL);
-       if (stage_desc == NULL || binary == NULL || binary->info == NULL) {
+       assert(stage_desc && binary && binary->info);
+       if (!stage_desc || !binary || !binary->info) {
                IA_CSS_ERROR("invalid arguments");
                goto ERR;
        }
@@ -95,7 +96,7 @@ 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 max_input_width)
+       unsigned int max_input_width)
 {
        unsigned int i;
 
@@ -112,4 +113,3 @@ void ia_css_pipe_get_sp_func_stage_desc(
        }
        stage_desc->vf_frame = NULL;
 }
-
index 5fc1718cb2bd0cb03ff0803350723650fec03274..32bddb326ab8388cbb96cf934ce5b0261b042aea 100644 (file)
@@ -21,8 +21,8 @@
 unsigned int ia_css_pipe_util_pipe_input_format_bpp(
        const struct ia_css_pipe * const pipe)
 {
-       assert(pipe != NULL);
-       assert(pipe->stream != NULL);
+       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);
@@ -33,7 +33,7 @@ void ia_css_pipe_util_create_output_frames(
 {
        unsigned int i;
 
-       assert(frames != NULL);
+       assert(frames);
        for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
                frames[i] = NULL;
        }
@@ -48,4 +48,3 @@ void ia_css_pipe_util_set_output_frames(
 
        frames[idx] = frame;
 }
-
index 5ab48f346790b3d7d45e2b7a6e82da8f5a306b60..f7cebf085dca52e71b194d0a5ad1c39eac75435e 100644 (file)
@@ -37,7 +37,7 @@ enum ia_css_err ia_css_convert_errno(
  * @return     IA_CSS_SUCCESS or error code upon error.
  *
  */
-extern enum ia_css_err ia_css_util_check_vf_info(
+enum ia_css_err ia_css_util_check_vf_info(
        const struct ia_css_frame_info * const info);
 
 /* @brief check input configuration.
@@ -47,7 +47,7 @@ extern enum ia_css_err ia_css_util_check_vf_info(
  * @return     IA_CSS_SUCCESS or error code upon error.
  *
  */
-extern enum ia_css_err ia_css_util_check_input(
+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);
@@ -59,7 +59,7 @@ extern enum ia_css_err ia_css_util_check_input(
  * @return     IA_CSS_SUCCESS or error code upon error.
  *
  */
-extern enum ia_css_err ia_css_util_check_vf_out_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);
 
@@ -70,7 +70,7 @@ extern enum ia_css_err ia_css_util_check_vf_out_info(
  * @return     IA_CSS_SUCCESS or error code upon error.
  *
  */
-extern enum ia_css_err ia_css_util_check_res(
+enum ia_css_err ia_css_util_check_res(
        unsigned int width,
        unsigned int height);
 
@@ -83,7 +83,7 @@ extern enum ia_css_err ia_css_util_check_res(
  *            equal than those of b, false otherwise
  *
  */
-extern bool ia_css_util_res_leq(
+bool ia_css_util_res_leq(
        struct ia_css_resolution a,
        struct ia_css_resolution b);
 
@@ -94,7 +94,7 @@ extern bool ia_css_util_res_leq(
  *
  * @returns true if resolution is zero
  */
-extern bool ia_css_util_resolution_is_zero(
+bool ia_css_util_resolution_is_zero(
                const struct ia_css_resolution resolution);
 
 /**
@@ -104,7 +104,7 @@ extern bool ia_css_util_resolution_is_zero(
  *
  * @returns true if resolution is even
  */
-extern bool ia_css_util_resolution_is_even(
+bool ia_css_util_resolution_is_even(
                const struct ia_css_resolution resolution);
 
 #endif
@@ -115,7 +115,7 @@ extern bool ia_css_util_resolution_is_even(
  * @return bits per pixel based on given parameters.
  *
  */
-extern unsigned int ia_css_util_input_format_bpp(
+unsigned int ia_css_util_input_format_bpp(
        enum atomisp_input_format stream_format,
        bool two_ppc);
 
@@ -125,7 +125,7 @@ extern unsigned int ia_css_util_input_format_bpp(
  * @return true if the input format is raw or false otherwise
  *
  */
-extern bool ia_css_util_is_input_format_raw(
+bool ia_css_util_is_input_format_raw(
        enum atomisp_input_format stream_format);
 
 /* @brief check if input format it yuv
@@ -134,8 +134,7 @@ extern bool ia_css_util_is_input_format_raw(
  * @return true if the input format is yuv or false otherwise
  *
  */
-extern bool ia_css_util_is_input_format_yuv(
+bool ia_css_util_is_input_format_yuv(
        enum atomisp_input_format stream_format);
 
 #endif /* __IA_CSS_UTIL_H__ */
-
index 91e586112332903ba9757c430f64e6db5153d5c3..f50198b32888f898b84c14a9037618292fb1e1ab 100644 (file)
@@ -20,7 +20,6 @@
 /* for ia_css_binary_max_vf_width() */
 #include "ia_css_binary.h"
 
-
 enum ia_css_err ia_css_convert_errno(
                                int in_err)
 {
@@ -56,6 +55,7 @@ unsigned int ia_css_util_input_format_bpp(
        bool two_ppc)
 {
        unsigned int rval = 0;
+
        switch (format) {
        case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
        case ATOMISP_INPUT_FORMAT_YUV420_8:
@@ -109,7 +109,6 @@ unsigned int ia_css_util_input_format_bpp(
        default:
                rval = 0;
                break;
-
        }
        return rval;
 }
@@ -119,12 +118,13 @@ enum ia_css_err ia_css_util_check_vf_info(
 {
        enum ia_css_err err;
        unsigned int max_vf_width;
-       assert(info != NULL);
+
+       assert(info);
        err = ia_css_frame_check_info(info);
        if (err != IA_CSS_SUCCESS)
                return err;
        max_vf_width = ia_css_binary_max_vf_width();
-       if (max_vf_width != 0 && info->res.width > max_vf_width*2)
+       if (max_vf_width != 0 && info->res.width > max_vf_width * 2)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        return IA_CSS_SUCCESS;
 }
@@ -135,8 +135,8 @@ enum ia_css_err ia_css_util_check_vf_out_info(
 {
        enum ia_css_err err;
 
-       assert(out_info != NULL);
-       assert(vf_info != NULL);
+       assert(out_info);
+       assert(vf_info);
 
        err = ia_css_frame_check_info(out_info);
        if (err != IA_CSS_SUCCESS)
@@ -204,9 +204,9 @@ enum ia_css_err ia_css_util_check_input(
        bool must_be_raw,
        bool must_be_yuv)
 {
-       assert(stream_config != NULL);
+       assert(stream_config);
 
-       if (stream_config == NULL)
+       if (!stream_config)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
 #ifdef IS_ISP_2400_SYSTEM
@@ -224,4 +224,3 @@ enum ia_css_err ia_css_util_check_input(
 
        return IA_CSS_SUCCESS;
 }
-
index 325b821f276cf504f5f2cf1b87ad48a9d7c9fc77..de99359a0fbcbe3bc1af0dc96e1a5e3e85714489 100644 (file)
@@ -30,8 +30,9 @@ ia_css_configure_iterator(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.iterator.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.iterator.offset;
@@ -54,8 +55,9 @@ ia_css_configure_copy_output(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.copy_output.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.copy_output.offset;
@@ -78,8 +80,9 @@ ia_css_configure_crop(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.crop.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.crop.offset;
@@ -102,8 +105,9 @@ ia_css_configure_fpn(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.fpn.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.fpn.offset;
@@ -126,8 +130,9 @@ ia_css_configure_dvs(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.dvs.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.dvs.offset;
@@ -150,8 +155,9 @@ ia_css_configure_qplane(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.qplane.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.qplane.offset;
@@ -174,8 +180,9 @@ ia_css_configure_output0(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.output0.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.output0.offset;
@@ -198,8 +205,9 @@ ia_css_configure_output1(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.output1.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.output1.offset;
@@ -222,8 +230,9 @@ ia_css_configure_output(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.output.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.output.offset;
@@ -247,8 +256,9 @@ ia_css_configure_sc(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.sc.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.sc.offset;
@@ -272,8 +282,9 @@ ia_css_configure_raw(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.raw.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.raw.offset;
@@ -296,8 +307,9 @@ ia_css_configure_tnr(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.tnr.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.tnr.offset;
@@ -320,8 +332,9 @@ ia_css_configure_ref(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.ref.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.ref.offset;
@@ -344,8 +357,9 @@ ia_css_configure_vf(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.vf.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.vf.offset;
@@ -357,4 +371,3 @@ ia_css_configure_vf(
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() leave:\n");
 }
-
index d418e763b7552e5f01f56f47d80a3769b1100384..ebf69c43e645c15502adba6bbc38e441fbb90de6 100644 (file)
 
 static void
 ia_css_process_aa(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       unsigned size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
-       unsigned 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 *)
@@ -86,16 +86,16 @@ ia_css_process_aa(
 
 static void
 ia_css_process_anr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -109,7 +109,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() leave:\n");
                }
-
        }
 }
 
@@ -117,16 +116,16 @@ size);
 
 static void
 ia_css_process_anr2(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -140,7 +139,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() leave:\n");
                }
-
        }
 }
 
@@ -148,16 +146,16 @@ size);
 
 static void
 ia_css_process_bh(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -171,10 +169,9 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
-
        }
        {
-               unsigned 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");
@@ -184,7 +181,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
-
        }
 }
 
@@ -192,16 +188,16 @@ size);
 
 static void
 ia_css_process_cnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -215,7 +211,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() leave:\n");
                }
-
        }
 }
 
@@ -223,16 +218,16 @@ size);
 
 static void
 ia_css_process_crop(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -246,7 +241,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() leave:\n");
                }
-
        }
 }
 
@@ -254,16 +248,16 @@ size);
 
 static void
 ia_css_process_csc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -277,7 +271,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() leave:\n");
                }
-
        }
 }
 
@@ -285,16 +278,16 @@ size);
 
 static void
 ia_css_process_dp(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -308,7 +301,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() leave:\n");
                }
-
        }
 }
 
@@ -316,16 +308,16 @@ size);
 
 static void
 ia_css_process_bnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -339,7 +331,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() leave:\n");
                }
-
        }
 }
 
@@ -347,16 +338,16 @@ size);
 
 static void
 ia_css_process_de(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -370,7 +361,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() leave:\n");
                }
-
        }
 }
 
@@ -378,16 +368,16 @@ size);
 
 static void
 ia_css_process_ecd(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -401,7 +391,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() leave:\n");
                }
-
        }
 }
 
@@ -409,16 +398,16 @@ size);
 
 static void
 ia_css_process_formats(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -432,7 +421,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() leave:\n");
                }
-
        }
 }
 
@@ -440,16 +428,16 @@ size);
 
 static void
 ia_css_process_fpn(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -463,7 +451,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() leave:\n");
                }
-
        }
 }
 
@@ -471,16 +458,16 @@ size);
 
 static void
 ia_css_process_gc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -494,12 +481,11 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
-
        }
        {
-               unsigned 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 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");
@@ -513,7 +499,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
-
        }
 }
 
@@ -521,16 +506,16 @@ size);
 
 static void
 ia_css_process_ce(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -544,7 +529,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() leave:\n");
                }
-
        }
 }
 
@@ -552,16 +536,16 @@ size);
 
 static void
 ia_css_process_yuv2rgb(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -575,7 +559,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() leave:\n");
                }
-
        }
 }
 
@@ -583,16 +566,16 @@ size);
 
 static void
 ia_css_process_rgb2yuv(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -606,7 +589,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() leave:\n");
                }
-
        }
 }
 
@@ -614,16 +596,16 @@ size);
 
 static void
 ia_css_process_r_gamma(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -637,7 +619,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() leave:\n");
                }
-
        }
 }
 
@@ -645,16 +626,16 @@ size);
 
 static void
 ia_css_process_g_gamma(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -668,7 +649,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() leave:\n");
                }
-
        }
 }
 
@@ -676,16 +656,16 @@ size);
 
 static void
 ia_css_process_b_gamma(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -699,7 +679,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() leave:\n");
                }
-
        }
 }
 
@@ -707,19 +686,20 @@ size);
 
 static void
 ia_css_process_uds(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
 
                        p = (struct sh_css_sp_uds_params *)
@@ -732,7 +712,6 @@ ia_css_process_uds(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() leave:\n");
                }
-
        }
 }
 
@@ -740,16 +719,16 @@ ia_css_process_uds(
 
 static void
 ia_css_process_raa(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -763,7 +742,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() leave:\n");
                }
-
        }
 }
 
@@ -771,16 +749,16 @@ size);
 
 static void
 ia_css_process_s3a(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -794,7 +772,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() leave:\n");
                }
-
        }
 }
 
@@ -802,16 +779,16 @@ size);
 
 static void
 ia_css_process_ob(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -825,12 +802,11 @@ ia_css_process_ob(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
-
        }
        {
-               unsigned 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 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");
@@ -844,7 +820,6 @@ ia_css_process_ob(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
-
        }
 }
 
@@ -852,16 +827,16 @@ ia_css_process_ob(
 
 static void
 ia_css_process_output(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -875,7 +850,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() leave:\n");
                }
-
        }
 }
 
@@ -883,16 +857,16 @@ size);
 
 static void
 ia_css_process_sc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -906,7 +880,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() leave:\n");
                }
-
        }
 }
 
@@ -914,19 +887,20 @@ size);
 
 static void
 ia_css_process_bds(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
 
                        p = (struct sh_css_isp_bds_params *)
@@ -938,7 +912,6 @@ ia_css_process_bds(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() leave:\n");
                }
-
        }
 }
 
@@ -946,16 +919,16 @@ ia_css_process_bds(
 
 static void
 ia_css_process_tnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -969,7 +942,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() leave:\n");
                }
-
        }
 }
 
@@ -977,16 +949,16 @@ size);
 
 static void
 ia_css_process_macc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1000,7 +972,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() leave:\n");
                }
-
        }
 }
 
@@ -1008,16 +979,16 @@ size);
 
 static void
 ia_css_process_sdis_horicoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1031,7 +1002,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() leave:\n");
                }
-
        }
 }
 
@@ -1039,16 +1009,16 @@ size);
 
 static void
 ia_css_process_sdis_vertcoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1062,7 +1032,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() leave:\n");
                }
-
        }
 }
 
@@ -1070,16 +1039,16 @@ size);
 
 static void
 ia_css_process_sdis_horiproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1093,7 +1062,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() leave:\n");
                }
-
        }
 }
 
@@ -1101,16 +1069,16 @@ size);
 
 static void
 ia_css_process_sdis_vertproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1124,7 +1092,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() leave:\n");
                }
-
        }
 }
 
@@ -1132,16 +1099,16 @@ size);
 
 static void
 ia_css_process_sdis2_horicoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1155,7 +1122,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() leave:\n");
                }
-
        }
 }
 
@@ -1163,16 +1129,16 @@ size);
 
 static void
 ia_css_process_sdis2_vertcoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1186,7 +1152,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() leave:\n");
                }
-
        }
 }
 
@@ -1194,16 +1159,16 @@ size);
 
 static void
 ia_css_process_sdis2_horiproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1217,7 +1182,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() leave:\n");
                }
-
        }
 }
 
@@ -1225,16 +1189,16 @@ size);
 
 static void
 ia_css_process_sdis2_vertproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1248,7 +1212,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() leave:\n");
                }
-
        }
 }
 
@@ -1256,16 +1219,16 @@ size);
 
 static void
 ia_css_process_wb(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1279,7 +1242,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() leave:\n");
                }
-
        }
 }
 
@@ -1287,16 +1249,16 @@ size);
 
 static void
 ia_css_process_nr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1310,7 +1272,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() leave:\n");
                }
-
        }
 }
 
@@ -1318,16 +1279,16 @@ size);
 
 static void
 ia_css_process_yee(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1341,7 +1302,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() leave:\n");
                }
-
        }
 }
 
@@ -1349,16 +1309,16 @@ size);
 
 static void
 ia_css_process_ynr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1372,7 +1332,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() leave:\n");
                }
-
        }
 }
 
@@ -1380,16 +1339,16 @@ size);
 
 static void
 ia_css_process_fc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1403,7 +1362,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() leave:\n");
                }
-
        }
 }
 
@@ -1411,16 +1369,16 @@ size);
 
 static void
 ia_css_process_ctc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1434,12 +1392,11 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
                }
-
        }
        {
-               unsigned 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 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");
@@ -1453,7 +1410,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
                }
-
        }
 }
 
@@ -1461,16 +1417,16 @@ size);
 
 static void
 ia_css_process_xnr_table(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1484,7 +1440,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() leave:\n");
                }
-
        }
 }
 
@@ -1492,16 +1447,16 @@ size);
 
 static void
 ia_css_process_xnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1515,7 +1470,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() leave:\n");
                }
-
        }
 }
 
@@ -1523,16 +1477,16 @@ size);
 
 static void
 ia_css_process_xnr3(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1546,13 +1500,12 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
                }
-
        }
 #ifdef ISP2401
        {
-               unsigned 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 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");
@@ -1566,15 +1519,14 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
                }
-
        }
 #endif
 }
 
 /* Code generated by genparam/gencode.c:gen_param_process_table() */
 
-void (* ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
-                       unsigned pipe_id,
+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) = {
        ia_css_process_aa,
@@ -1630,12 +1582,12 @@ 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){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: config=%p\n",
+               config);
 
        *config = params->dp_config;
 
@@ -1649,10 +1601,10 @@ void
 ia_css_set_dp_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dp_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_dp_config() enter:\n");
        ia_css_dp_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dp_config = *config;
@@ -1661,8 +1613,7 @@ 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() */
@@ -1670,12 +1621,12 @@ ia_css_set_dp_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_wb_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: config=%p\n",
+               config);
 
        *config = params->wb_config;
 
@@ -1689,10 +1640,10 @@ void
 ia_css_set_wb_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_wb_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_wb_config() enter:\n");
        ia_css_wb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->wb_config = *config;
@@ -1701,8 +1652,7 @@ 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() */
@@ -1710,12 +1660,12 @@ ia_css_set_wb_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_tnr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: config=%p\n",
+               config);
 
        *config = params->tnr_config;
 
@@ -1729,10 +1679,10 @@ void
 ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_tnr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_tnr_config() enter:\n");
        ia_css_tnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->tnr_config = *config;
@@ -1741,8 +1691,7 @@ 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() */
@@ -1750,12 +1699,12 @@ ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ob_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: config=%p\n",
+               config);
 
        *config = params->ob_config;
 
@@ -1769,10 +1718,10 @@ void
 ia_css_set_ob_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ob_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ob_config() enter:\n");
        ia_css_ob_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ob_config = *config;
@@ -1781,8 +1730,7 @@ 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() */
@@ -1790,12 +1738,12 @@ ia_css_set_ob_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_de_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_de_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: config=%p\n",
+               config);
 
        *config = params->de_config;
 
@@ -1809,10 +1757,10 @@ void
 ia_css_set_de_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_de_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_de_config() enter:\n");
        ia_css_de_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->de_config = *config;
@@ -1821,8 +1769,7 @@ 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() */
@@ -1830,12 +1777,12 @@ ia_css_set_de_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_anr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: config=%p\n",
+               config);
 
        *config = params->anr_config;
 
@@ -1849,10 +1796,10 @@ void
 ia_css_set_anr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_anr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_anr_config() enter:\n");
        ia_css_anr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->anr_config = *config;
@@ -1861,8 +1808,7 @@ 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() */
@@ -1870,12 +1816,12 @@ ia_css_set_anr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_anr_thres *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: config=%p\n",
+               config);
 
        *config = params->anr_thres;
 
@@ -1889,10 +1835,10 @@ void
 ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_anr_thres *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_anr2_config() enter:\n");
        ia_css_anr2_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->anr_thres = *config;
@@ -1901,8 +1847,7 @@ 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() */
@@ -1910,12 +1855,12 @@ ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ce_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: config=%p\n",
+               config);
 
        *config = params->ce_config;
 
@@ -1929,10 +1874,10 @@ void
 ia_css_set_ce_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ce_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ce_config() enter:\n");
        ia_css_ce_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ce_config = *config;
@@ -1941,8 +1886,7 @@ 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() */
@@ -1950,12 +1894,12 @@ ia_css_set_ce_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ecd_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: config=%p\n",
+               config);
 
        *config = params->ecd_config;
 
@@ -1969,10 +1913,10 @@ void
 ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ecd_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ecd_config() enter:\n");
        ia_css_ecd_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ecd_config = *config;
@@ -1981,8 +1925,7 @@ 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() */
@@ -1990,12 +1933,12 @@ ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ynr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: config=%p\n",
+               config);
 
        *config = params->ynr_config;
 
@@ -2009,10 +1952,10 @@ void
 ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ynr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ynr_config() enter:\n");
        ia_css_ynr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ynr_config = *config;
@@ -2021,8 +1964,7 @@ 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() */
@@ -2030,12 +1972,12 @@ ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_fc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: config=%p\n",
+               config);
 
        *config = params->fc_config;
 
@@ -2049,10 +1991,10 @@ void
 ia_css_set_fc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_fc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_fc_config() enter:\n");
        ia_css_fc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->fc_config = *config;
@@ -2061,8 +2003,7 @@ 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() */
@@ -2070,12 +2011,12 @@ ia_css_set_fc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cnr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: config=%p\n",
+               config);
 
        *config = params->cnr_config;
 
@@ -2089,10 +2030,10 @@ void
 ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cnr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_cnr_config() enter:\n");
        ia_css_cnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->cnr_config = *config;
@@ -2101,8 +2042,7 @@ 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() */
@@ -2110,12 +2050,12 @@ ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_macc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: config=%p\n",
+               config);
 
        *config = params->macc_config;
 
@@ -2129,10 +2069,10 @@ void
 ia_css_set_macc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_macc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_macc_config() enter:\n");
        ia_css_macc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->macc_config = *config;
@@ -2141,8 +2081,7 @@ 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() */
@@ -2150,12 +2089,12 @@ ia_css_set_macc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ctc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: config=%p\n",
+               config);
 
        *config = params->ctc_config;
 
@@ -2169,10 +2108,10 @@ void
 ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ctc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ctc_config() enter:\n");
        ia_css_ctc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ctc_config = *config;
@@ -2181,8 +2120,7 @@ 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() */
@@ -2190,12 +2128,12 @@ ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_aa_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: config=%p\n",
+               config);
 
        *config = params->aa_config;
 
@@ -2208,10 +2146,10 @@ void
 ia_css_set_aa_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_aa_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_aa_config() enter:\n");
        params->aa_config = *config;
        params->config_changed[IA_CSS_AA_ID] = true;
@@ -2219,8 +2157,7 @@ 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() */
@@ -2228,12 +2165,12 @@ ia_css_set_aa_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: config=%p\n",
+               config);
 
        *config = params->yuv2rgb_cc_config;
 
@@ -2247,10 +2184,10 @@ void
 ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_yuv2rgb_config() enter:\n");
        ia_css_yuv2rgb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->yuv2rgb_cc_config = *config;
@@ -2259,8 +2196,7 @@ 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() */
@@ -2268,12 +2204,12 @@ ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: config=%p\n",
+               config);
 
        *config = params->rgb2yuv_cc_config;
 
@@ -2287,10 +2223,10 @@ void
 ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_rgb2yuv_config() enter:\n");
        ia_css_rgb2yuv_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->rgb2yuv_cc_config = *config;
@@ -2299,8 +2235,7 @@ 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() */
@@ -2308,12 +2243,12 @@ ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: config=%p\n",
+               config);
 
        *config = params->cc_config;
 
@@ -2327,10 +2262,10 @@ void
 ia_css_set_csc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_csc_config() enter:\n");
        ia_css_csc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->cc_config = *config;
@@ -2339,8 +2274,7 @@ 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() */
@@ -2348,12 +2282,12 @@ ia_css_set_csc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_nr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: config=%p\n",
+               config);
 
        *config = params->nr_config;
 
@@ -2367,10 +2301,10 @@ void
 ia_css_set_nr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_nr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_nr_config() enter:\n");
        ia_css_nr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->nr_config = *config;
@@ -2380,8 +2314,7 @@ 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() */
@@ -2389,12 +2322,12 @@ ia_css_set_nr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_gc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: config=%p\n",
+               config);
 
        *config = params->gc_config;
 
@@ -2408,10 +2341,10 @@ void
 ia_css_set_gc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_gc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_gc_config() enter:\n");
        ia_css_gc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->gc_config = *config;
@@ -2420,8 +2353,7 @@ 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() */
@@ -2429,12 +2361,12 @@ ia_css_set_gc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2448,10 +2380,10 @@ void
 ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2463,8 +2395,7 @@ 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() */
@@ -2472,12 +2403,12 @@ ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2491,10 +2422,10 @@ void
 ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2506,8 +2437,7 @@ 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() */
@@ -2515,12 +2445,12 @@ ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2534,10 +2464,10 @@ void
 ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2549,8 +2479,7 @@ 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() */
@@ -2558,12 +2487,12 @@ ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2577,10 +2506,10 @@ void
 ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2592,8 +2521,7 @@ 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() */
@@ -2601,12 +2529,12 @@ ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2620,10 +2548,10 @@ void
 ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2635,8 +2563,7 @@ 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() */
@@ -2644,12 +2571,12 @@ ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2663,10 +2590,10 @@ void
 ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2678,8 +2605,7 @@ 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() */
@@ -2687,12 +2613,12 @@ ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2706,10 +2632,10 @@ void
 ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2721,8 +2647,7 @@ 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() */
@@ -2730,12 +2655,12 @@ ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2749,10 +2674,10 @@ void
 ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2764,8 +2689,7 @@ 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() */
@@ -2773,12 +2697,12 @@ ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_rgb_gamma_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       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;
 
@@ -2792,10 +2716,10 @@ void
 ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_rgb_gamma_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_r_gamma_config() enter:\n");
        ia_css_r_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->r_gamma_table = *config;
@@ -2804,8 +2728,7 @@ 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() */
@@ -2813,12 +2736,12 @@ ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_rgb_gamma_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       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;
 
@@ -2832,10 +2755,10 @@ void
 ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_rgb_gamma_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_g_gamma_config() enter:\n");
        ia_css_g_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->g_gamma_table = *config;
@@ -2844,8 +2767,7 @@ 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() */
@@ -2853,12 +2775,12 @@ ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_rgb_gamma_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       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;
 
@@ -2872,10 +2794,10 @@ void
 ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_rgb_gamma_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_b_gamma_config() enter:\n");
        ia_css_b_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->b_gamma_table = *config;
@@ -2884,8 +2806,7 @@ 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() */
@@ -2893,12 +2814,12 @@ ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_xnr_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: config=%p\n",
+               config);
 
        *config = params->xnr_table;
 
@@ -2912,10 +2833,10 @@ void
 ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_xnr_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2924,8 +2845,7 @@ 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() */
@@ -2933,12 +2853,12 @@ ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_formats_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: config=%p\n",
+               config);
 
        *config = params->formats_config;
 
@@ -2952,10 +2872,10 @@ void
 ia_css_set_formats_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_formats_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_formats_config() enter:\n");
        ia_css_formats_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->formats_config = *config;
@@ -2964,8 +2884,7 @@ 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() */
@@ -2973,12 +2892,12 @@ ia_css_set_formats_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_xnr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: config=%p\n",
+               config);
 
        *config = params->xnr_config;
 
@@ -2992,10 +2911,10 @@ void
 ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_xnr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr_config() enter:\n");
        ia_css_xnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->xnr_config = *config;
@@ -3004,8 +2923,7 @@ 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() */
@@ -3013,12 +2931,12 @@ ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_xnr3_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: config=%p\n",
+               config);
 
        *config = params->xnr3_config;
 
@@ -3032,10 +2950,10 @@ void
 ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_xnr3_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr3_config() enter:\n");
        ia_css_xnr3_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->xnr3_config = *config;
@@ -3044,8 +2962,7 @@ 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() */
@@ -3053,12 +2970,12 @@ ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_3a_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: config=%p\n",
+               config);
 
        *config = params->s3a_config;
 
@@ -3072,10 +2989,10 @@ void
 ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_3a_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_s3a_config() enter:\n");
        ia_css_s3a_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->s3a_config = *config;
@@ -3085,8 +3002,7 @@ 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() */
@@ -3094,12 +3010,12 @@ ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_output_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_output_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: config=%p\n",
+               config);
 
        *config = params->output_config;
 
@@ -3113,10 +3029,10 @@ void
 ia_css_set_output_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_output_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_output_config() enter:\n");
        ia_css_output_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->output_config = *config;
@@ -3125,8 +3041,7 @@ 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() */
@@ -3218,4 +3133,3 @@ ia_css_set_configs(struct ia_css_isp_parameters *params,
        ia_css_set_s3a_config(params, config->s3a_config);
        ia_css_set_output_config(params, config->output_config);
 }
-
index 5b3deb7f74aecf1de25749111f2cc7c81d6cd3e2..b5175c253c61d02ed224fe86a9743d1da5e87e4e 100644 (file)
@@ -149,8 +149,8 @@ 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 pipe_id,
+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);
 
index fb3ba08f69c1e0d6452d06e3eff9f8e47d5e459e..c14323224d1269763844f068fae57e9e792e8785 100644 (file)
@@ -27,13 +27,12 @@ ia_css_initialize_aa_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.aa.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.aa.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
+               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);
-
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
 }
@@ -47,16 +46,15 @@ ia_css_initialize_cnr_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.cnr.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.cnr.offset;
 
                if (size) {
                        ia_css_init_cnr_state(
                                &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");
 }
@@ -70,16 +68,15 @@ ia_css_initialize_cnr2_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.cnr2.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.cnr2.offset;
 
                if (size) {
                        ia_css_init_cnr2_state(
                                &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");
 }
@@ -93,16 +90,15 @@ ia_css_initialize_dp_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.dp.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.dp.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.dp.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.dp.offset;
 
                if (size) {
                        ia_css_init_dp_state(
                                &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");
 }
@@ -116,16 +112,15 @@ ia_css_initialize_de_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.de.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.de.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.de.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.de.offset;
 
                if (size) {
                        ia_css_init_de_state(
                                &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");
 }
@@ -139,16 +134,15 @@ ia_css_initialize_tnr_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->dmem.tnr.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->dmem.tnr.offset;
 
                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);
                }
-
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() leave:\n");
 }
@@ -162,16 +156,15 @@ ia_css_initialize_ref_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->dmem.ref.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.ref.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->dmem.ref.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->dmem.ref.offset;
 
                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);
                }
-
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() leave:\n");
 }
@@ -185,16 +178,15 @@ ia_css_initialize_ynr_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.ynr.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.ynr.offset;
 
                if (size) {
                        ia_css_init_ynr_state(
                                &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");
 }
@@ -211,4 +203,3 @@ void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_bina
        ia_css_initialize_ref_state,
        ia_css_initialize_ynr_state,
 };
-
index e71e33d9d1434c91cd8317ea40d5719c02b86172..c6d2a5cba21341135539597ae187f216c3c80945 100644 (file)
@@ -95,7 +95,7 @@
 #define _hrt_get_bit(w, b) \
   (((w) >> (b)) & 1)
 #define _hrt_set_bit(w, b, v) \
-  (((w) & (~(1 << (b)))) | (((v)&1) << (b)))
+  (((w) & (~(1 << (b)))) | (((v) & 1) << (b)))
 #define _hrt_set_lower_half(w, v) \
   _hrt_set_bits(w, 0, 16, v)
 #define _hrt_set_upper_half(w, v) \
index b5756bfe8eb6b1e10c7f70659bc20e6537e8df1c..0eabc59ff5afb50123552d9b978f7257f733a23b 100644 (file)
@@ -22,9 +22,9 @@
 #define SP_ICACHE_BLOCK_ADDRESS_BITS     11 /* 2048 lines capacity*/
 
 #define SP_ICACHE_ADDRESS_BITS \
-                           (SP_ICACHE_TAG_BITS+SP_ICACHE_BLOCK_ADDRESS_BITS)
+                           (SP_ICACHE_TAG_BITS + SP_ICACHE_BLOCK_ADDRESS_BITS)
 
-#define SP_PMEM_DEPTH        (1<<SP_ICACHE_ADDRESS_BITS)
+#define SP_PMEM_DEPTH        BIT(SP_ICACHE_ADDRESS_BITS)
 
 #define SP_FIFO_0_DEPTH      0
 #define SP_FIFO_1_DEPTH      0
@@ -35,8 +35,6 @@
 #define SP_FIFO_6_DEPTH      0
 #define SP_FIFO_7_DEPTH      0
 
-
 #define SP_SLV_BUS_MAXBURSTSIZE        1
 
 #endif /* _cell_params_h */
-
index 89ff5313065fcd3e853ab60caf17112615738305..99d292164efcae86c729e6e6c50019459c88e6d8 100644 (file)
@@ -21,7 +21,7 @@
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_CH_ID_WIDTH     2
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_FMT_TYPE_WIDTH  3
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_REAL_WIDTH (_HRT_CSS_RECEIVER_2400_GEN_SHORT_DATA_WIDTH + _HRT_CSS_RECEIVER_2400_GEN_SHORT_CH_ID_WIDTH + _HRT_CSS_RECEIVER_2400_GEN_SHORT_FMT_TYPE_WIDTH)
-#define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_WIDTH      32 /* use 32 to be compatibel with streaming monitor !, MSB's of interface are tied to '0' */ 
+#define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_WIDTH      32 /* use 32 to be compatibel with streaming monitor !, MSB's of interface are tied to '0' */
 
 /* Definition of data format ID at the interface CSS_receiver capture/acquisition units */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_8          24   /* 01 1000 YUV420 8-bit                                        */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_8_CSPS     28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_10_CSPS    29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
 /* used reserved mipi positions for these */
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW16             46 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18             47 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_2           37 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_3           38 
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW16             46
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18             47
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_2           37
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_3           38
 
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_WIDTH              6
 
@@ -78,7 +78,7 @@
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB444           2  // 32
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB565           3  // 34
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB666           4  // 35
-#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW8             5  // 42 
+#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW8             5  // 42
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW10            6  // 43
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW6             7  // 40
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW7             8  // 41
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18           28  // ?
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18_2         29  // ? Option 2 for depacketiser
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18_3         30  // ? Option 3 for depacketiser
-#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_CUSTOM          31  // to signal custom decoding 
+#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_CUSTOM          31  // to signal custom decoding
 
 /* definition for state machine of data FIFO for decode different type of data */
-#define _HRT_CSS_RECEIVER_2400_YUV420_8_REPEAT_PTN                 1  
+#define _HRT_CSS_RECEIVER_2400_YUV420_8_REPEAT_PTN                 1
 #define _HRT_CSS_RECEIVER_2400_YUV420_10_REPEAT_PTN                5
 #define _HRT_CSS_RECEIVER_2400_YUV420_8L_REPEAT_PTN                1
 #define _HRT_CSS_RECEIVER_2400_YUV422_8_REPEAT_PTN                 1
 #define _HRT_CSS_RECEIVER_2400_YUV422_10_REPEAT_PTN                5
-#define _HRT_CSS_RECEIVER_2400_RGB444_REPEAT_PTN                   2 
+#define _HRT_CSS_RECEIVER_2400_RGB444_REPEAT_PTN                   2
 #define _HRT_CSS_RECEIVER_2400_RGB555_REPEAT_PTN                   2
 #define _HRT_CSS_RECEIVER_2400_RGB565_REPEAT_PTN                   2
-#define _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN                   9                       
+#define _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN                   9
 #define _HRT_CSS_RECEIVER_2400_RGB888_REPEAT_PTN                   3
 #define _HRT_CSS_RECEIVER_2400_RAW6_REPEAT_PTN                     3
 #define _HRT_CSS_RECEIVER_2400_RAW7_REPEAT_PTN                     7
 #define _HRT_CSS_RECEIVER_2400_RAW8_REPEAT_PTN                     1
 #define _HRT_CSS_RECEIVER_2400_RAW10_REPEAT_PTN                    5
-#define _HRT_CSS_RECEIVER_2400_RAW12_REPEAT_PTN                    3        
+#define _HRT_CSS_RECEIVER_2400_RAW12_REPEAT_PTN                    3
 #define _HRT_CSS_RECEIVER_2400_RAW14_REPEAT_PTN                    7
 
 #define _HRT_CSS_RECEIVER_2400_MAX_REPEAT_PTN                      _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN
 #define _HRT_CSS_RECEIVER_2400_BE_COMP_12_7_12                     5
 #define _HRT_CSS_RECEIVER_2400_BE_COMP_12_8_12                     6
 
-
 /* packet bit definition */
 #define _HRT_CSS_RECEIVER_2400_PKT_SOP_IDX                        32
 #define _HRT_CSS_RECEIVER_2400_PKT_SOP_BITS                        1
 #define _HRT_CSS_RECEIVER_2400_PKT_PAYLOAD_IDX                     0
 #define _HRT_CSS_RECEIVER_2400_PKT_PAYLOAD_BITS                   32
 
-
 /*************************************************************************************************/
 /* Custom Decoding                                                                               */
 /* These Custom Defs are defined based on design-time config in "csi_be_pixel_formatter.chdl" !! */
 /*************************************************************************************************/
 #define BE_CUST_EN_IDX                     0     /* 2bits */
-#define BE_CUST_EN_DATAID_IDX              2     /* 6bits MIPI DATA ID */ 
-#define BE_CUST_EN_WIDTH                   8     
+#define BE_CUST_EN_DATAID_IDX              2     /* 6bits MIPI DATA ID */
+#define BE_CUST_EN_WIDTH                   8
 #define BE_CUST_MODE_ALL                   1     /* Enable Custom Decoding for all DATA IDs */
 #define BE_CUST_MODE_ONE                   3     /* Enable Custom Decoding for ONE DATA ID, programmed in CUST_EN_DATA_ID */
 
 /* Data State config = {get_bits(6bits), valid(1bit)}  */
-#define BE_CUST_DATA_STATE_S0_IDX          0     /* 7bits */ 
-#define BE_CUST_DATA_STATE_S1_IDX          7     /* 7bits */ 
+#define BE_CUST_DATA_STATE_S0_IDX          0     /* 7bits */
+#define BE_CUST_DATA_STATE_S1_IDX          7     /* 7bits */
 #define BE_CUST_DATA_STATE_S2_IDX          14    /* 7bits */
-#define BE_CUST_DATA_STATE_WIDTH           21    
+#define BE_CUST_DATA_STATE_WIDTH           21
 #define BE_CUST_DATA_STATE_VALID_IDX       0     /* 1bits */
 #define BE_CUST_DATA_STATE_GETBITS_IDX     1     /* 6bits */
 
 #define BE_CUST_PIX_EXT_PIX_ALIGN_IDX      5     /* 5bits */
 #define BE_CUST_PIX_EXT_PIX_MASK_IDX       10    /* 18bits */
 #define BE_CUST_PIX_EXT_PIX_EN_IDX         28    /* 1bits */
-#define BE_CUST_PIX_EXT_WIDTH              29    
+#define BE_CUST_PIX_EXT_WIDTH              29
 
 /* Pixel Valid & EoP config = {[eop,valid](especial), [eop,valid](normal)} */
 #define BE_CUST_PIX_VALID_EOP_P0_IDX        0    /* 4bits */
 #define BE_CUST_PIX_VALID_EOP_P1_IDX        4    /* 4bits */
 #define BE_CUST_PIX_VALID_EOP_P2_IDX        8    /* 4bits */
 #define BE_CUST_PIX_VALID_EOP_P3_IDX        12   /* 4bits */
-#define BE_CUST_PIX_VALID_EOP_WIDTH         16 
+#define BE_CUST_PIX_VALID_EOP_WIDTH         16
 #define BE_CUST_PIX_VALID_EOP_NOR_VALID_IDX 0    /* Normal (NO less get_bits case) Valid - 1bits */
 #define BE_CUST_PIX_VALID_EOP_NOR_EOP_IDX   1    /* Normal (NO less get_bits case) EoP - 1bits */
 #define BE_CUST_PIX_VALID_EOP_ESP_VALID_IDX 2    /* Especial (less get_bits case) Valid - 1bits */
 #define BE_CUST_PIX_VALID_EOP_ESP_EOP_IDX   3    /* Especial (less get_bits case) EoP - 1bits */
 
 #endif /* _mipi_backend_common_defs_h_ */
-#endif /* _css_receiver_2400_common_defs_h_ */ 
+#endif /* _css_receiver_2400_common_defs_h_ */
index 6f5b7d3d3715e905f55265a2774be86cc5eb9f08..f4b2b41b6d94370d83d45cfde754c9d7224752ce 100644 (file)
 #define _HRT_CSS_RECEIVER_2400_CSI2_MASK_ECC_TWO_BIT_ERR_IDX                  6
 #define _HRT_CSS_RECEIVER_2400_CSI2_MASK_DATA_ID_ERR_IDX                      7
 
-                                  
 /* Bits for CSI2_FUNC_PROG register */
 #define _HRT_CSS_RECEIVER_2400_CSI2_DATA_TIMEOUT_IDX    0
 #define _HRT_CSS_RECEIVER_2400_CSI2_DATA_TIMEOUT_BITS   19
 #define _HRT_CSS_RECEIVER_2400_COMP_SCHEME_USD_PRED_BITS_IDX  3
 #define _HRT_CSS_RECEIVER_2400_COMP_SCHEME_USD_PRED_BITS_BITS 2
 
-
 /* BITS for backend RAW16 and RAW 18 registers */
 
 #define _HRT_CSS_RECEIVER_2400_RAW18_DATAID_IDX    0
 #define _HRT_CSS_RECEIVER_2400_RAW16_EN_BITS       1
 
 /* These hsync and vsync values are for HSS simulation only */
-#define _HRT_CSS_RECEIVER_2400_HSYNC_VAL (1<<16)
-#define _HRT_CSS_RECEIVER_2400_VSYNC_VAL (1<<17)
+#define _HRT_CSS_RECEIVER_2400_HSYNC_VAL BIT(16)
+#define _HRT_CSS_RECEIVER_2400_VSYNC_VAL BIT(17)
 
 #define _HRT_CSS_RECEIVER_2400_BE_STREAMING_WIDTH                 28
 #define _HRT_CSS_RECEIVER_2400_BE_STREAMING_PIX_A_LSB              0
index d184a8b313c91c6978c70b10c42f32231cc65cb9..ba43562f12874cac152d4149eb53d9ad1436d96f 100644 (file)
@@ -51,7 +51,7 @@
 #define _DMA_V2_SPEC_DEV_B_XB_IDX  (_DMA_V2_SPEC_DEV_A_XB_IDX + _DMA_V2_SPEC_DEV_A_XB_BITS)
 #define _DMA_V2_SPEC_DEV_B_XB_BITS 8
 #define _DMA_V2_SPEC_YB_IDX        (_DMA_V2_SPEC_DEV_B_XB_IDX + _DMA_V2_SPEC_DEV_B_XB_BITS)
-#define _DMA_V2_SPEC_YB_BITS       (32-_DMA_V2_SPEC_DEV_B_XB_BITS-_DMA_V2_SPEC_DEV_A_XB_BITS-_DMA_V2_CMD_BITS-_DMA_V2_CHANNEL_BITS)
+#define _DMA_V2_SPEC_YB_BITS       (32 - _DMA_V2_SPEC_DEV_B_XB_BITS - _DMA_V2_SPEC_DEV_A_XB_BITS - _DMA_V2_CMD_BITS - _DMA_V2_CHANNEL_BITS)
 
 /* */
 #define _DMA_V2_CMD_CTRL_IDX       4
 #define _DMA_V2_STRIDE_BITS        32
 
 /* Command IDs */
-#define _DMA_V2_MOVE_B2A_COMMAND                             0      
-#define _DMA_V2_MOVE_B2A_BLOCK_COMMAND                       1      
-#define _DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND                 2      
-#define _DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND           3      
-#define _DMA_V2_MOVE_A2B_COMMAND                             4      
-#define _DMA_V2_MOVE_A2B_BLOCK_COMMAND                       5      
-#define _DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND                 6      
-#define _DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND           7      
-#define _DMA_V2_INIT_A_COMMAND                               8      
-#define _DMA_V2_INIT_A_BLOCK_COMMAND                         9      
-#define _DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND                  10      
-#define _DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND            11      
-#define _DMA_V2_INIT_B_COMMAND                              12      
-#define _DMA_V2_INIT_B_BLOCK_COMMAND                        13      
-#define _DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND                  14      
-#define _DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND            15      
-#define _DMA_V2_NO_ACK_MOVE_B2A_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND       + 16) 
-#define _DMA_V2_NO_ACK_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND + 16) 
-#define _DMA_V2_NO_ACK_MOVE_A2B_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND       + 16) 
-#define _DMA_V2_NO_ACK_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND + 16) 
-#define _DMA_V2_NO_ACK_INIT_A_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND         + 16) 
-#define _DMA_V2_NO_ACK_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND   + 16) 
-#define _DMA_V2_NO_ACK_INIT_B_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND         + 16) 
-#define _DMA_V2_NO_ACK_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND   + 16) 
-#define _DMA_V2_CONFIG_CHANNEL_COMMAND                      32   
-#define _DMA_V2_SET_CHANNEL_PARAM_COMMAND                   33   
-#define _DMA_V2_SET_CRUN_COMMAND                            62   
+#define _DMA_V2_MOVE_B2A_COMMAND                             0
+#define _DMA_V2_MOVE_B2A_BLOCK_COMMAND                       1
+#define _DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND                 2
+#define _DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND           3
+#define _DMA_V2_MOVE_A2B_COMMAND                             4
+#define _DMA_V2_MOVE_A2B_BLOCK_COMMAND                       5
+#define _DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND                 6
+#define _DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND           7
+#define _DMA_V2_INIT_A_COMMAND                               8
+#define _DMA_V2_INIT_A_BLOCK_COMMAND                         9
+#define _DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND                  10
+#define _DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND            11
+#define _DMA_V2_INIT_B_COMMAND                              12
+#define _DMA_V2_INIT_B_BLOCK_COMMAND                        13
+#define _DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND                  14
+#define _DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND            15
+#define _DMA_V2_NO_ACK_MOVE_B2A_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND       + 16)
+#define _DMA_V2_NO_ACK_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND + 16)
+#define _DMA_V2_NO_ACK_MOVE_A2B_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND       + 16)
+#define _DMA_V2_NO_ACK_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND + 16)
+#define _DMA_V2_NO_ACK_INIT_A_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND         + 16)
+#define _DMA_V2_NO_ACK_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND   + 16)
+#define _DMA_V2_NO_ACK_INIT_B_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND         + 16)
+#define _DMA_V2_NO_ACK_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND   + 16)
+#define _DMA_V2_CONFIG_CHANNEL_COMMAND                      32
+#define _DMA_V2_SET_CHANNEL_PARAM_COMMAND                   33
+#define _DMA_V2_SET_CRUN_COMMAND                            62
 
 /* Channel Parameter IDs */
-#define _DMA_V2_PACKING_SETUP_PARAM                     0  
-#define _DMA_V2_STRIDE_A_PARAM                          1  
-#define _DMA_V2_ELEM_CROPPING_A_PARAM                   2  
-#define _DMA_V2_WIDTH_A_PARAM                           3  
-#define _DMA_V2_STRIDE_B_PARAM                          4  
-#define _DMA_V2_ELEM_CROPPING_B_PARAM                   5  
-#define _DMA_V2_WIDTH_B_PARAM                           6  
-#define _DMA_V2_HEIGHT_PARAM                            7  
-#define _DMA_V2_QUEUED_CMDS                             8  
+#define _DMA_V2_PACKING_SETUP_PARAM                     0
+#define _DMA_V2_STRIDE_A_PARAM                          1
+#define _DMA_V2_ELEM_CROPPING_A_PARAM                   2
+#define _DMA_V2_WIDTH_A_PARAM                           3
+#define _DMA_V2_STRIDE_B_PARAM                          4
+#define _DMA_V2_ELEM_CROPPING_B_PARAM                   5
+#define _DMA_V2_WIDTH_B_PARAM                           6
+#define _DMA_V2_HEIGHT_PARAM                            7
+#define _DMA_V2_QUEUED_CMDS                             8
 
 /* Parameter Constants */
 #define _DMA_V2_ZERO_EXTEND                             0
 #define _DMA_V2_ADDR_SEL_COMP_BITS                      4
 #define _DMA_V2_ADDR_SEL_CH_REG_IDX                     2
 #define _DMA_V2_ADDR_SEL_CH_REG_BITS                    6
-#define _DMA_V2_ADDR_SEL_PARAM_IDX                      (_DMA_V2_ADDR_SEL_CH_REG_BITS+_DMA_V2_ADDR_SEL_CH_REG_IDX)
+#define _DMA_V2_ADDR_SEL_PARAM_IDX                      (_DMA_V2_ADDR_SEL_CH_REG_BITS + _DMA_V2_ADDR_SEL_CH_REG_IDX)
 #define _DMA_V2_ADDR_SEL_PARAM_BITS                     4
 
 #define _DMA_V2_ADDR_SEL_GROUP_COMP_IDX                 2
 
 #define _DMA_V2_ADDR_SEL_DEV_INTERF_IDX_IDX             2
 #define _DMA_V2_ADDR_SEL_DEV_INTERF_IDX_BITS            6
-#define _DMA_V2_ADDR_SEL_DEV_INTERF_INFO_IDX            (_DMA_V2_ADDR_SEL_DEV_INTERF_IDX_IDX+_DMA_V2_ADDR_SEL_DEV_INTERF_IDX_BITS)
+#define _DMA_V2_ADDR_SEL_DEV_INTERF_INFO_IDX            (_DMA_V2_ADDR_SEL_DEV_INTERF_IDX_IDX + _DMA_V2_ADDR_SEL_DEV_INTERF_IDX_BITS)
 #define _DMA_V2_ADDR_SEL_DEV_INTERF_INFO_BITS           4
 
 #define _DMA_V2_FSM_GROUP_CMD_IDX                       0
 #define _DMA_V2_FSM_GROUP_FSM_PACK_IDX                  5
 #define _DMA_V2_FSM_GROUP_FSM_REQ_IDX                   6
 #define _DMA_V2_FSM_GROUP_FSM_WR_IDX                    7
-  
+
 #define _DMA_V2_FSM_GROUP_FSM_CTRL_STATE_IDX            0
 #define _DMA_V2_FSM_GROUP_FSM_CTRL_REQ_DEV_IDX          1
 #define _DMA_V2_FSM_GROUP_FSM_CTRL_REQ_ADDR_IDX         2
index 77722d20570108c94c8258640f679564ef0e40dc..33f8b5ce9ba3e09ec08ae2d95bb145a8431b2813 100644 (file)
 #define HRT_GDC_FRAC_BITS               10 /* Number of fractional bits in the GDC block, driven by the size of the LUT */
 
 #define HRT_GDC_BLI_FRAC_BITS            4 /* Number of fractional bits for the bi-linear interpolation type            */
-#define HRT_GDC_BLI_COEF_ONE             (1 << HRT_GDC_BLI_FRAC_BITS)
+#define HRT_GDC_BLI_COEF_ONE             BIT(HRT_GDC_BLI_FRAC_BITS)
 
 #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.              */
-#define HRT_GDC_BCI_COEF_MASK            ((1 << HRT_GDC_BCI_COEF_BITS) - 1) 
+#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.              */
+#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                      */
+#define HRT_GDC_LUT_BYTES                (HRT_GDC_N * 4 * 2)                /* 1024 addresses, 4 coefficients per address,  */
+                                                                       /* 2 bytes per coefficient                      */
 
-#define _HRT_GDC_REG_ALIGN               4                              
+#define _HRT_GDC_REG_ALIGN               4
 
   //     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    
-  
+  // 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.
 
   // Reg_ID - Address of the register to be configured
-  
+
   // 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
-  
+
 #define HRT_GDC_CONFIG_CMD             1
 #define HRT_GDC_DATA_CMD               0
 
-
 #define HRT_GDC_CMD_POS               31
 #define HRT_GDC_CMD_BITS               1
 #define HRT_GDC_CRUN_POS              30
 #define HRT_GDC_FRYIPXFRX_BITS        26
 #define HRT_GDC_P0X_BITS              23
 
-
-#define HRT_GDC_MAX_OXDIM           (8192-64)
+#define HRT_GDC_MAX_OXDIM           (8192 - 64)
 #define HRT_GDC_MAX_OYDIM           4095
-#define HRT_GDC_MAX_IXDIM           (8192-64)
+#define HRT_GDC_MAX_IXDIM           (8192 - 64)
 #define HRT_GDC_MAX_IYDIM           4095
 #define HRT_GDC_MAX_DS_FAC            16
-#define HRT_GDC_MAX_DX                 (HRT_GDC_MAX_DS_FAC*HRT_GDC_N - 1)
+#define HRT_GDC_MAX_DX                 (HRT_GDC_MAX_DS_FAC * HRT_GDC_N - 1)
 #define HRT_GDC_MAX_DY                 HRT_GDC_MAX_DX
 
-
 /* GDC lookup tables entries are 10 bits values, but they're
    stored 2 by 2 as 32 bit values, yielding 16 bits per entry.
    A GDC lookup table contains 64 * 4 elements */
 #define HRT_GDC_MODE_SCALING          0
 #define HRT_GDC_MODE_TETRAGON         1
 
-#define HRT_GDC_LUT_COEFF_OFFSET     16 
-#define HRT_GDC_FRY_BIT_OFFSET       16 
-// FRYIPXFRX is the only register where we store two values in one field, 
-// to save one token in the scaling protocol. 
-// Like this, we have three tokens in the scaling protocol, 
+#define HRT_GDC_LUT_COEFF_OFFSET     16
+#define HRT_GDC_FRY_BIT_OFFSET       16
+// FRYIPXFRX is the only register where we store two values in one field,
+// to save one token in the scaling protocol.
+// Like this, we have three tokens in the scaling protocol,
 // Otherwise, we would have had four.
 // The register bit-map is:
 //   31  26 25      16 15  10 9        0
 //  |------|----------|------|----------|
 //  | XXXX |   FRY    |  IPX |   FRX    |
 
-
 #define HRT_GDC_CE_FSM0_POS           0
 #define HRT_GDC_CE_FSM0_LEN           2
 #define HRT_GDC_CE_OPY_POS            2
 //   31            16 15        2 1  0
 //  |----------------|-----------|----|
 //  |      OPX       |    OPY    |FSM0|
-// However, for the time being at least, 
+// However, for the time being at least,
 // this implementation is meaningless in hss model,
 // So, we just return 0
 
-
 #define HRT_GDC_CHK_ENGINE_IDX        0
 #define HRT_GDC_WOIX_IDX              1
 #define HRT_GDC_WOIY_IDX              2
 
 #define HRT_GDC_LUT_IDX              32
 
-
 #endif /* HRT_GDC_v2_defs_h_ */
index 3082e2f5e014117ccd1548cceae21fd5eb2bd430..ffd7b38fce9d3b8dd6bb645a4ba47e60b6957582 100644 (file)
 #define HIVE_GP_TIMER_RESET_REG_IDX                              0
 #define HIVE_GP_TIMER_OVERALL_ENABLE_REG_IDX                     1
 #define HIVE_GP_TIMER_ENABLE_REG_IDX(timer)                     (HIVE_GP_TIMER_OVERALL_ENABLE_REG_IDX + 1 + timer)
-#define HIVE_GP_TIMER_VALUE_REG_IDX(timer,timers)               (HIVE_GP_TIMER_ENABLE_REG_IDX(timers) + timer)
-#define HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timer,timers)          (HIVE_GP_TIMER_VALUE_REG_IDX(timers, timers) + timer)
-#define HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timer,timers)       (HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timers, timers) + timer)
-#define HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irq,timers)     (HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timers, timers) + irq)
-#define HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irq,timers,irqs) (HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irqs, timers) + irq)
-#define HIVE_GP_TIMER_IRQ_ENABLE_REG_IDX(irq,timers,irqs)       (HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irqs, timers, irqs) + irq)
+#define HIVE_GP_TIMER_VALUE_REG_IDX(timer, timers)               (HIVE_GP_TIMER_ENABLE_REG_IDX(timers) + timer)
+#define HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timer, timers)          (HIVE_GP_TIMER_VALUE_REG_IDX(timers, timers) + timer)
+#define HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timer, timers)       (HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timers, timers) + timer)
+#define HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irq, timers)     (HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timers, timers) + irq)
+#define HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irq, timers, irqs) (HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irqs, timers) + irq)
+#define HIVE_GP_TIMER_IRQ_ENABLE_REG_IDX(irq, timers, irqs)       (HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irqs, timers, irqs) + irq)
 
 #define HIVE_GP_TIMER_COUNT_TYPE_HIGH                            0
 #define HIVE_GP_TIMER_COUNT_TYPE_LOW                             1
@@ -33,4 +33,4 @@
 #define HIVE_GP_TIMER_COUNT_TYPE_NEGEDGE                         3
 #define HIVE_GP_TIMER_COUNT_TYPES                                4
 
-#endif /* _gp_timer_defs_h */   
+#endif /* _gp_timer_defs_h */
index a807d4c990414af50c61c4e20075d385db25862f..d02435a3ec5a1e23fafae4a89505b7e66d48ed03 100644 (file)
@@ -35,7 +35,6 @@
 #define _gpio_block_reg_di_debounce_cnt_3      14
 #define _gpio_block_reg_di_active_level          15
 
-
 /* read-only registers */
 #define _gpio_block_reg_di                               16
 
index 39584996092e5d76e5c3da100d87189f7b8c941b..7c4e284cc1571415d726fcc59167333038ee8665 100644 (file)
    and in the DMA parameter list */
 #define HIVE_ISP_DDR_DMA_SPECS {{32,  8}, {16, 16}, {18, 14}, {25, 10}, {21, 12}}
 #define HIVE_ISP_DDR_WORD_BITS 256
-#define HIVE_ISP_DDR_WORD_BYTES  (HIVE_ISP_DDR_WORD_BITS/8)
+#define HIVE_ISP_DDR_WORD_BYTES  (HIVE_ISP_DDR_WORD_BITS / 8)
 #define HIVE_ISP_DDR_BYTES       (512 * 1024 * 1024) /* hss only */
 #define HIVE_ISP_DDR_BYTES_RTL   (127 * 1024 * 1024) /* RTL only */
 #define HIVE_ISP_DDR_SMALL_BYTES (128 * 256 / 8)
 #define HIVE_ISP_PAGE_SHIFT    12
-#define HIVE_ISP_PAGE_SIZE     (1<<HIVE_ISP_PAGE_SHIFT)
+#define HIVE_ISP_PAGE_SIZE     BIT(HIVE_ISP_PAGE_SHIFT)
 
 #define CSS_DDR_WORD_BITS        HIVE_ISP_DDR_WORD_BITS
 #define CSS_DDR_WORD_BYTES       HIVE_ISP_DDR_WORD_BYTES
 #define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I4_I0        51
 #define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I5_I0        52
 #define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I6_I0        53
-#define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I7_I0        54                                                         
+#define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I7_I0        54
 #define HIVE_GP_TIMER_MIPI_SOL_BIT_ID                          55
 #define HIVE_GP_TIMER_MIPI_EOL_BIT_ID                          56
 #define HIVE_GP_TIMER_MIPI_SOF_BIT_ID                          57
 /* port definititions SP streaming monitor, monitors the status of streaming ports at the SP side of the streaming FIFO's */
 #define SP_STR_MON_PORT_SP2SIF            0
 #define SP_STR_MON_PORT_SIF2SP            1
-#define SP_STR_MON_PORT_SP2MC             2 
+#define SP_STR_MON_PORT_SP2MC             2
 #define SP_STR_MON_PORT_MC2SP             3
-#define SP_STR_MON_PORT_SP2DMA            4 
+#define SP_STR_MON_PORT_SP2DMA            4
 #define SP_STR_MON_PORT_DMA2SP            5
-#define SP_STR_MON_PORT_SP2ISP            6 
+#define SP_STR_MON_PORT_SP2ISP            6
 #define SP_STR_MON_PORT_ISP2SP            7
 #define SP_STR_MON_PORT_SP2GPD            8
 #define SP_STR_MON_PORT_FA2SP             9
-#define SP_STR_MON_PORT_SP2ISYS          10 
+#define SP_STR_MON_PORT_SP2ISYS          10
 #define SP_STR_MON_PORT_ISYS2SP          11
 #define SP_STR_MON_PORT_SP2PIFA          12
 #define SP_STR_MON_PORT_PIFA2SP          13
 /* port definititions ISP streaming monitor, monitors the status of streaming ports at the ISP side of the streaming FIFO's */
 #define ISP_STR_MON_PORT_ISP2PIFA         0
 #define ISP_STR_MON_PORT_PIFA2ISP         1
-#define ISP_STR_MON_PORT_ISP2PIFB         2 
+#define ISP_STR_MON_PORT_ISP2PIFB         2
 #define ISP_STR_MON_PORT_PIFB2ISP         3
-#define ISP_STR_MON_PORT_ISP2DMA          4 
+#define ISP_STR_MON_PORT_ISP2DMA          4
 #define ISP_STR_MON_PORT_DMA2ISP          5
-#define ISP_STR_MON_PORT_ISP2GDC1         6 
+#define ISP_STR_MON_PORT_ISP2GDC1         6
 #define ISP_STR_MON_PORT_GDC12ISP         7
-#define ISP_STR_MON_PORT_ISP2GDC2         8 
+#define ISP_STR_MON_PORT_ISP2GDC2         8
 #define ISP_STR_MON_PORT_GDC22ISP         9
-#define ISP_STR_MON_PORT_ISP2GPD         10 
+#define ISP_STR_MON_PORT_ISP2GPD         10
 #define ISP_STR_MON_PORT_FA2ISP          11
-#define ISP_STR_MON_PORT_ISP2SP          12 
+#define ISP_STR_MON_PORT_ISP2SP          12
 #define ISP_STR_MON_PORT_SP2ISP          13
 
 /* previously used ISP streaming monitor port identifiers, kept for backward compatibility */
 #define ISP_STR_MON_PORT_SND_PIF_A       ISP_STR_MON_PORT_ISP2PIFA
 #define ISP_STR_MON_PORT_RCV_PIF_A       ISP_STR_MON_PORT_PIFA2ISP
-#define ISP_STR_MON_PORT_SND_PIF_B       ISP_STR_MON_PORT_ISP2PIFB 
+#define ISP_STR_MON_PORT_SND_PIF_B       ISP_STR_MON_PORT_ISP2PIFB
 #define ISP_STR_MON_PORT_RCV_PIF_B       ISP_STR_MON_PORT_PIFB2ISP
-#define ISP_STR_MON_PORT_SND_DMA         ISP_STR_MON_PORT_ISP2DMA  
-#define ISP_STR_MON_PORT_RCV_DMA         ISP_STR_MON_PORT_DMA2ISP 
-#define ISP_STR_MON_PORT_SND_GDC         ISP_STR_MON_PORT_ISP2GDC1 
+#define ISP_STR_MON_PORT_SND_DMA         ISP_STR_MON_PORT_ISP2DMA
+#define ISP_STR_MON_PORT_RCV_DMA         ISP_STR_MON_PORT_DMA2ISP
+#define ISP_STR_MON_PORT_SND_GDC         ISP_STR_MON_PORT_ISP2GDC1
 #define ISP_STR_MON_PORT_RCV_GDC         ISP_STR_MON_PORT_GDC12ISP
-#define ISP_STR_MON_PORT_SND_GPD         ISP_STR_MON_PORT_ISP2GPD 
+#define ISP_STR_MON_PORT_SND_GPD         ISP_STR_MON_PORT_ISP2GPD
 #define ISP_STR_MON_PORT_RCV_GPD         ISP_STR_MON_PORT_FA2ISP
 #define ISP_STR_MON_PORT_SND_SP          ISP_STR_MON_PORT_ISP2SP
 #define ISP_STR_MON_PORT_RCV_SP          ISP_STR_MON_PORT_SP2ISP
-                                           
+
 /* port definititions MOD streaming monitor, monitors the status of streaming ports at the module side of the streaming FIFO's */
 
 #define MOD_STR_MON_PORT_PIFA2CELLS       0
 #define MOD_STR_MON_PORT_SND_GDC         12
 #define MOD_STR_MON_PORT_RCV_GDC         13
 
-
 /* testbench signals:       */
 
 /* testbench GP adapter register ids  */
 #define HIVE_TESTBENCH_IDLE_REG_IDX                             4
 #define HIVE_TESTBENCH_GPIO_DATA_IN_REG_IDX                     5
 #define HIVE_TESTBENCH_MIPI_BFM_EN_REG_IDX                      6
-#define HIVE_TESTBENCH_CSI_CONFIG_REG_IDX                       7 
+#define HIVE_TESTBENCH_CSI_CONFIG_REG_IDX                       7
 #define HIVE_TESTBENCH_DDR_STALL_EN_REG_IDX                     8
 
 #define HIVE_TESTBENCH_ISP_PMEM_ERROR_IRQ_REG_IDX               9
index f4d033e221cc1787121ded0e6af1ebf4eb5d52bc..564140ca92f62792c84ec1a321bed839ad650290 100644 (file)
@@ -29,7 +29,7 @@
 #define ISP           testbench_isp_isp
 #define SP            testbench_isp_scp
 
-#define IF_PRIM       testbench_isp_ifmt_ift_prim  
+#define IF_PRIM       testbench_isp_ifmt_ift_prim
 #define IF_PRIM_B     testbench_isp_ifmt_ift_prim_b
 #define IF_SEC        testbench_isp_ifmt_ift_sec
 #define IF_SEC_MASTER testbench_isp_ifmt_ift_sec_mt_out
index 04c237083835b8b8da695eaf49f4c9122a28d284..b366dbf5019dfa9cb7af839db3580566eab9462e 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     ,
+  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;
index b4211a0c631a2b150ee025de86841f3aa1bac062..a22b771f61f2e8e727d0f1ec626978d4209478d6 100644 (file)
 
 #include <streaming_to_mipi_defs.h>
 
-#define _HIVE_ISP_CH_ID_MASK    ((1U << HIVE_ISP_CH_ID_BITS)-1)
-#define _HIVE_ISP_FMT_TYPE_MASK ((1U << HIVE_ISP_FMT_TYPE_BITS)-1)
+#define _HIVE_ISP_CH_ID_MASK    ((1U << HIVE_ISP_CH_ID_BITS) - 1)
+#define _HIVE_ISP_FMT_TYPE_MASK ((1U << HIVE_ISP_FMT_TYPE_BITS) - 1)
 
 #define _HIVE_STR_TO_MIPI_FMT_TYPE_LSB (HIVE_STR_TO_MIPI_CH_ID_LSB + HIVE_ISP_CH_ID_BITS)
 #define _HIVE_STR_TO_MIPI_DATA_B_LSB   (HIVE_STR_TO_MIPI_DATA_A_LSB + HIVE_IF_PIXEL_WIDTH)
+
 #endif /* _hive_isp_css_streaming_to_mipi_types_hrt_h_ */
index 58b0e6effbd068fe9f2d175072bb1e66c921428a..9715893c8a3605b977e5e7976df36a6f3501a577 100644 (file)
  * more details.
  */
 
-#ifndef _HRT_HIVE_TYPES_H 
-#define _HRT_HIVE_TYPES_H 
+#ifndef _HRT_HIVE_TYPES_H
+#define _HRT_HIVE_TYPES_H
 
 #include "version.h"
 #include "defs.h"
 
 #ifndef HRTCAT3
-#define _HRTCAT3(m,n,o)     m##n##o
-#define HRTCAT3(m,n,o)      _HRTCAT3(m,n,o)
+#define _HRTCAT3(m, n, o)     m##n##o
+#define HRTCAT3(m, n, o)      _HRTCAT3(m, n, o)
 #endif
 
 #ifndef HRTCAT4
-#define _HRTCAT4(m,n,o,p)     m##n##o##p
-#define HRTCAT4(m,n,o,p)      _HRTCAT4(m,n,o,p)
+#define _HRTCAT4(m, n, o, p)     m##n##o##p
+#define HRTCAT4(m, n, o, p)      _HRTCAT4(m, n, o, p)
 #endif
 
 #ifndef HRTMIN
-#define HRTMIN(a,b) (((a)<(b))?(a):(b))
+#define HRTMIN(a, b) (((a) < (b)) ? (a) : (b))
 #endif
-                                 
+
 #ifndef HRTMAX
-#define HRTMAX(a,b) (((a)>(b))?(a):(b))
+#define HRTMAX(a, b) (((a) > (b)) ? (a) : (b))
 #endif
 
 /* boolean data type */
@@ -59,8 +59,8 @@ typedef unsigned long long   hive_uint64;
 #define HRT_ADDRESS_WIDTH 32
 #endif
 
-#define HRT_DATA_BYTES    (HRT_DATA_WIDTH/8)
-#define HRT_ADDRESS_BYTES (HRT_ADDRESS_WIDTH/8)
+#define HRT_DATA_BYTES    (HRT_DATA_WIDTH / 8)
+#define HRT_ADDRESS_BYTES (HRT_ADDRESS_WIDTH / 8)
 
 #if HRT_DATA_WIDTH == 64
 typedef hive_uint64 hrt_data;
@@ -71,7 +71,7 @@ typedef hive_uint32 hrt_data;
 #endif
 
 #if HRT_ADDRESS_WIDTH == 64
-typedef hive_uint64 hrt_address; 
+typedef hive_uint64 hrt_address;
 #elif HRT_ADDRESS_WIDTH == 32
 typedef hive_uint32 hrt_address;
 #else
@@ -95,7 +95,7 @@ typedef hive_address hive_mem_address;
 typedef hive_uint    hive_mmio_id;
 typedef hive_mmio_id hive_slave_id;
 typedef hive_mmio_id hive_port_id;
-typedef hive_mmio_id hive_master_id; 
+typedef hive_mmio_id hive_master_id;
 typedef hive_mmio_id hive_mem_id;
 typedef hive_mmio_id hive_dev_id;
 typedef hive_mmio_id hive_fifo_id;
@@ -122,7 +122,7 @@ typedef hive_uint hive_inport_id;
 typedef hive_uint hive_msink_id;
 
 /* HRT specific */
-typedef charhive_program;
-typedef charhive_function;
+typedef char *hive_program;
+typedef char *hive_function;
 
 #endif /* _HRT_HIVE_TYPES_H */
index 7766f78cd12308f6fbbc14ae8e63c2c7e7f82242..176456da961f7307df5dca87c6388d7bbac5777b 100644 (file)
@@ -22,7 +22,7 @@
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_4            4
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_5            5
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_6            6
-#define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_7            7 
+#define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_7            7
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_FSYNC_LUT_REG        8
 #define HIVE_IFMT_GP_REGS_SRST_IDX                          9
 #define HIVE_IFMT_GP_REGS_SLV_REG_SRST_IDX                 10
index 87fbf82edb5bc44d6c5ca761c06aa57a8606fc97..1dd8ea3cd6d4763ba9a9e412b8f4a28e0e5b2510 100644 (file)
 #define HIVE_ISEL_GP_REGS_SYNCGEN_ENABLE_IDX                    0
 #define HIVE_ISEL_GP_REGS_SYNCGEN_FREE_RUNNING_IDX              1
 #define HIVE_ISEL_GP_REGS_SYNCGEN_PAUSE_IDX                     2
-#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_FRAMES_IDX                 3 
-#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_PIX_IDX                    4      
-#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_LINES_IDX                  5      
-#define HIVE_ISEL_GP_REGS_SYNCGEN_HBLANK_CYCLES_IDX             6      
-#define HIVE_ISEL_GP_REGS_SYNCGEN_VBLANK_CYCLES_IDX             7      
+#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_FRAMES_IDX                 3
+#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_PIX_IDX                    4
+#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_LINES_IDX                  5
+#define HIVE_ISEL_GP_REGS_SYNCGEN_HBLANK_CYCLES_IDX             6
+#define HIVE_ISEL_GP_REGS_SYNCGEN_VBLANK_CYCLES_IDX             7
 
-#define HIVE_ISEL_GP_REGS_SOF_IDX                               8 
-#define HIVE_ISEL_GP_REGS_EOF_IDX                               9 
-#define HIVE_ISEL_GP_REGS_SOL_IDX                              10 
-#define HIVE_ISEL_GP_REGS_EOL_IDX                              11 
+#define HIVE_ISEL_GP_REGS_SOF_IDX                               8
+#define HIVE_ISEL_GP_REGS_EOF_IDX                               9
+#define HIVE_ISEL_GP_REGS_SOL_IDX                              10
+#define HIVE_ISEL_GP_REGS_EOL_IDX                              11
 
-#define HIVE_ISEL_GP_REGS_PRBS_ENABLE                          12      
-#define HIVE_ISEL_GP_REGS_PRBS_ENABLE_PORT_B                   13      
-#define HIVE_ISEL_GP_REGS_PRBS_LFSR_RESET_VALUE                14      
+#define HIVE_ISEL_GP_REGS_PRBS_ENABLE                          12
+#define HIVE_ISEL_GP_REGS_PRBS_ENABLE_PORT_B                   13
+#define HIVE_ISEL_GP_REGS_PRBS_LFSR_RESET_VALUE                14
 
-#define HIVE_ISEL_GP_REGS_TPG_ENABLE                           15      
-#define HIVE_ISEL_GP_REGS_TPG_ENABLE_PORT_B                    16      
-#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_MASK_IDX                 17      
-#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_MASK_IDX                 18      
-#define HIVE_ISEL_GP_REGS_TPG_XY_CNT_MASK_IDX                  19      
-#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_DELTA_IDX                20      
-#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_DELTA_IDX                21      
-#define HIVE_ISEL_GP_REGS_TPG_MODE_IDX                         22     
-#define HIVE_ISEL_GP_REGS_TPG_R1_IDX                           23 
+#define HIVE_ISEL_GP_REGS_TPG_ENABLE                           15
+#define HIVE_ISEL_GP_REGS_TPG_ENABLE_PORT_B                    16
+#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_MASK_IDX                 17
+#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_MASK_IDX                 18
+#define HIVE_ISEL_GP_REGS_TPG_XY_CNT_MASK_IDX                  19
+#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_DELTA_IDX                20
+#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_DELTA_IDX                21
+#define HIVE_ISEL_GP_REGS_TPG_MODE_IDX                         22
+#define HIVE_ISEL_GP_REGS_TPG_R1_IDX                           23
 #define HIVE_ISEL_GP_REGS_TPG_G1_IDX                           24
 #define HIVE_ISEL_GP_REGS_TPG_B1_IDX                           25
 #define HIVE_ISEL_GP_REGS_TPG_R2_IDX                           26
 #define HIVE_ISEL_GP_REGS_TPG_G2_IDX                           27
 #define HIVE_ISEL_GP_REGS_TPG_B2_IDX                           28
 
-
 #define HIVE_ISEL_GP_REGS_CH_ID_IDX                            29
 #define HIVE_ISEL_GP_REGS_FMT_TYPE_IDX                         30
 #define HIVE_ISEL_GP_REGS_DATA_SEL_IDX                         31
index 20a13c4cdb562fc8773992317d0b9b4a06a149cb..2d5baae305220c25cfbe956cf514355f197ae181 100644 (file)
@@ -15,8 +15,8 @@
 #ifndef _input_switch_2400_defs_h
 #define _input_switch_2400_defs_h
 
-#define _HIVE_INPUT_SWITCH_GET_LUT_REG_ID(ch_id, fmt_type) (((ch_id)*2) + ((fmt_type)>=16))
-#define _HIVE_INPUT_SWITCH_GET_LUT_REG_LSB(fmt_type)        (((fmt_type)%16) * 2)
+#define _HIVE_INPUT_SWITCH_GET_LUT_REG_ID(ch_id, fmt_type) (((ch_id) * 2) + ((fmt_type) >= 16))
+#define _HIVE_INPUT_SWITCH_GET_LUT_REG_LSB(fmt_type)        (((fmt_type) % 16) * 2)
 
 #define HIVE_INPUT_SWITCH_SELECT_NO_OUTPUT   0
 #define HIVE_INPUT_SWITCH_SELECT_IF_PRIM     1
index a7f0ca80bc9be0afed16a0726fdd068946aef12a..fcfa8c4971befd98c0f1884b5068fc155b728eb2 100644 (file)
@@ -50,7 +50,6 @@
 #define ISYS_CTRL_CAPT_C_FSM_STATE_INFO_REG_ID          20
 #define ISYS_CTRL_ACQ_FSM_STATE_INFO_REG_ID             21
 #define ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID    22
 
 /* register reset value */
 #define ISYS_CTRL_CAPT_START_ADDR_A_REG_RSTVAL           0
 #define ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_RSTVAL      128
 #define ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_RSTVAL      128
 #define ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_RSTVAL      128
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_RSTVAL      3 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_RSTVAL      3 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_RSTVAL      3 
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_RSTVAL      3
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_RSTVAL      3
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_RSTVAL      3
 #define ISYS_CTRL_ACQ_START_ADDR_REG_RSTVAL              0
-#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_RSTVAL         128 
-#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_RSTVAL         3 
+#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_RSTVAL         128
+#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_RSTVAL         3
 #define ISYS_CTRL_INIT_REG_RSTVAL                        0
-#define ISYS_CTRL_LAST_COMMAND_REG_RSTVAL                15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)  
+#define ISYS_CTRL_LAST_COMMAND_REG_RSTVAL                15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_NEXT_COMMAND_REG_RSTVAL                15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_LAST_ACKNOWLEDGE_REG_RSTVAL            15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_NEXT_ACKNOWLEDGE_REG_RSTVAL            15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_FSM_STATE_INFO_REG_RSTVAL              0
-#define ISYS_CTRL_CAPT_A_FSM_STATE_INFO_REG_RSTVAL       0 
+#define ISYS_CTRL_CAPT_A_FSM_STATE_INFO_REG_RSTVAL       0
 #define ISYS_CTRL_CAPT_B_FSM_STATE_INFO_REG_RSTVAL       0
 #define ISYS_CTRL_CAPT_C_FSM_STATE_INFO_REG_RSTVAL       0
 #define ISYS_CTRL_ACQ_FSM_STATE_INFO_REG_RSTVAL          0
 #define ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_RSTVAL 0
 
 /* register width value */
-#define ISYS_CTRL_CAPT_START_ADDR_A_REG_WIDTH            9 
-#define ISYS_CTRL_CAPT_START_ADDR_B_REG_WIDTH            9 
-#define ISYS_CTRL_CAPT_START_ADDR_C_REG_WIDTH            9 
-#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_WIDTH       9 
-#define ISYS_CTRL_ACQ_START_ADDR_REG_WIDTH               9 
-#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_WIDTH          9 
-#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_WIDTH          9 
-#define ISYS_CTRL_INIT_REG_WIDTH                         3 
+#define ISYS_CTRL_CAPT_START_ADDR_A_REG_WIDTH            9
+#define ISYS_CTRL_CAPT_START_ADDR_B_REG_WIDTH            9
+#define ISYS_CTRL_CAPT_START_ADDR_C_REG_WIDTH            9
+#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_WIDTH       9
+#define ISYS_CTRL_ACQ_START_ADDR_REG_WIDTH               9
+#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_WIDTH          9
+#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_WIDTH          9
+#define ISYS_CTRL_INIT_REG_WIDTH                         3
 #define ISYS_CTRL_LAST_COMMAND_REG_WIDTH                 32    /* slave data width */
 #define ISYS_CTRL_NEXT_COMMAND_REG_WIDTH                 32
 #define ISYS_CTRL_LAST_ACKNOWLEDGE_REG_WIDTH             32
 /*
 InpSysCaptFramesAcq  1/0  [3:0] - 'b0000
 [7:4] - CaptPortId,
-           CaptA-'b0000
-           CaptB-'b0001
-           CaptC-'b0010
+          CaptA-'b0000
+          CaptB-'b0001
+          CaptC-'b0010
 [31:16] - NOF_frames
 InpSysCaptFrameExt  2/0  [3:0] - 'b0001'
 [7:4] - CaptPortId,
-           'b0000 - CaptA 
-           'b0001 - CaptB
-           'b0010 - CaptC
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
 
   2/1  [31:0] - external capture address
-InpSysAcqFrame  2/0  [3:0] - 'b0010, 
+InpSysAcqFrame  2/0  [3:0] - 'b0010,
 [31:4] - NOF_ext_mem_words
   2/1  [31:0] - external memory read start address
-InpSysOverruleON  1/0  [3:0] - 'b0011, 
+InpSysOverruleON  1/0  [3:0] - 'b0011,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-
-InpSysOverruleOFF  1/0  [3:0] - 'b0100, 
+InpSysOverruleOFF  1/0  [3:0] - 'b0100,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-InpSysOverruleCmd  2/0  [3:0] - 'b0101, 
+InpSysOverruleCmd  2/0  [3:0] - 'b0101,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
   2/1  [31:0] - command token value for port opid
 
-
 acknowledge tokens:
 
 InpSysAckCFA  1/0   [3:0] - 'b0000
  [7:4] - CaptPortId,
-           CaptA-'b0000
-           CaptB- 'b0001
-           CaptC-'b0010
+          CaptA-'b0000
+          CaptB- 'b0001
+          CaptC-'b0010
  [31:16] - NOF_frames
 InpSysAckCFE  1/0  [3:0] - 'b0001'
 [7:4] - CaptPortId,
-           'b0000 - CaptA 
-           'b0001 - CaptB
-           'b0010 - CaptC
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
 
 InpSysAckAF  1/0  [3:0] - 'b0010
-InpSysAckOverruleON  1/0  [3:0] - 'b0011, 
+InpSysAckOverruleON  1/0  [3:0] - 'b0011,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-InpSysAckOverruleOFF  1/0  [3:0] - 'b0100, 
+InpSysAckOverruleOFF  1/0  [3:0] - 'b0100,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-
-InpSysAckOverrule  2/0  [3:0] - 'b0101, 
+InpSysAckOverrule  2/0  [3:0] - 'b0101,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
   2/1  [31:0] - acknowledge token value from port opid
 
-
-
 */
 
-
 /* Command and acknowledge tokens IDs */
 #define ISYS_CTRL_CAPT_FRAMES_ACQ_TOKEN_ID        0 /* 0000b */
 #define ISYS_CTRL_CAPT_FRAME_EXT_TOKEN_ID         1 /* 0001b */
@@ -232,10 +221,10 @@ InpSysAckOverrule  2/0  [3:0] - 'b0101,
 #define ISYS_CTRL_TOKEN_ID_IDX                    0
 #define ISYS_CTRL_TOKEN_ID_BITS                   (ISYS_CTRL_TOKEN_ID_MSB - ISYS_CTRL_TOKEN_ID_LSB + 1)
 #define ISYS_CTRL_PORT_ID_IDX                     (ISYS_CTRL_TOKEN_ID_IDX + ISYS_CTRL_TOKEN_ID_BITS)
-#define ISYS_CTRL_PORT_ID_BITS                    (ISYS_CTRL_PORT_ID_TOKEN_MSB - ISYS_CTRL_PORT_ID_TOKEN_LSB +1)
-#define ISYS_CTRL_NOF_CAPT_IDX                    ISYS_CTRL_NOF_CAPT_TOKEN_LSB    
+#define ISYS_CTRL_PORT_ID_BITS                    (ISYS_CTRL_PORT_ID_TOKEN_MSB - ISYS_CTRL_PORT_ID_TOKEN_LSB + 1)
+#define ISYS_CTRL_NOF_CAPT_IDX                    ISYS_CTRL_NOF_CAPT_TOKEN_LSB
 #define ISYS_CTRL_NOF_CAPT_BITS                   (ISYS_CTRL_NOF_CAPT_TOKEN_MSB - ISYS_CTRL_NOF_CAPT_TOKEN_LSB + 1)
-#define ISYS_CTRL_NOF_EXT_IDX                     ISYS_CTRL_NOF_EXT_TOKEN_LSB    
+#define ISYS_CTRL_NOF_EXT_IDX                     ISYS_CTRL_NOF_EXT_TOKEN_LSB
 #define ISYS_CTRL_NOF_EXT_BITS                    (ISYS_CTRL_NOF_EXT_TOKEN_MSB - ISYS_CTRL_NOF_EXT_TOKEN_LSB + 1)
 
 #define ISYS_CTRL_PORT_ID_CAPT_A                  0 /* device ID for capture unit A      */
@@ -248,7 +237,7 @@ InpSysAckOverrule  2/0  [3:0] - 'b0101,
 #define ISYS_CTRL_PORT_ID_DMA_ACQ                 7 /* device ID for dma unit            */
 
 #define ISYS_CTRL_NO_ACQ_ACK                      16 /* no ack from acquisition unit */
-#define ISYS_CTRL_NO_DMA_ACK                      0 
+#define ISYS_CTRL_NO_DMA_ACK                      0
 #define ISYS_CTRL_NO_CAPT_ACK                     16
 
-#endif /* _input_system_ctrl_defs_h */ 
+#endif /* _input_system_ctrl_defs_h */
index ec6dd4487158e4fabf4e587684e4290ffdd23ed2..efb3d7e135bdd503945cb52ba76c34bb30aa38e0 100644 (file)
@@ -25,4 +25,4 @@
 
 #define _HRT_IRQ_CONTROLLER_REG_ALIGN 4
 
-#endif /* _irq_controller_defs_h */   
+#endif /* _irq_controller_defs_h */
index 669060d17c4fc1b806ed4d0490f8554d2e1392de..ebebb38624cb0bbb82e0551edbb22943b8fbd6b5 100644 (file)
 #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_NWAY                               ISP_VEC_NELEMS
 #define NBITS                                  ISP_VEC_ELEMBITS
 
-#define _isp_ceil_div(a,b)                     (((a)+(b)-1)/(b))
+#define _isp_ceil_div(a, b)                     (((a) + (b) - 1) / (b))
 
 #define ISP_VEC_ALIGN                          ISP_VMEM_ALIGN
 
index 59362072162710fbc0d5a5a47c11c48dd38b6861..5bdc16c71e82c74c286f516e93aa8788c10cd640 100644 (file)
@@ -16,7 +16,7 @@
 #define _isp_acquisition_defs_h
 
 #define _ISP_ACQUISITION_REG_ALIGN                4  /* assuming 32 bit control bus width */
-#define _ISP_ACQUISITION_BYTES_PER_ELEM           4            
+#define _ISP_ACQUISITION_BYTES_PER_ELEM           4
 
 /* --------------------------------------------------*/
 
 /* REGISTER INFO */
 /* --------------------------------------------------*/
 
-#define NOF_ACQ_REGS                              12      
+#define NOF_ACQ_REGS                              12
 
 // Register id's of MMIO slave accesible registers
-#define ACQ_START_ADDR_REG_ID                     0              
+#define ACQ_START_ADDR_REG_ID                     0
 #define ACQ_MEM_REGION_SIZE_REG_ID                1
 #define ACQ_NUM_MEM_REGIONS_REG_ID                2
-#define ACQ_INIT_REG_ID                           3 
+#define ACQ_INIT_REG_ID                           3
 #define ACQ_RECEIVED_SHORT_PACKETS_REG_ID         4
 #define ACQ_RECEIVED_LONG_PACKETS_REG_ID          5
 #define ACQ_LAST_COMMAND_REG_ID                   6
 #define ACQ_NEXT_ACKNOWLEDGE_REG_ID               9
 #define ACQ_FSM_STATE_INFO_REG_ID                 10
 #define ACQ_INT_CNTR_INFO_REG_ID                  11
+
 // Register width
-#define ACQ_START_ADDR_REG_WIDTH                  9               
-#define ACQ_MEM_REGION_SIZE_REG_WIDTH             9  
-#define ACQ_NUM_MEM_REGIONS_REG_WIDTH             9  
-#define ACQ_INIT_REG_WIDTH                        3  
-#define ACQ_RECEIVED_SHORT_PACKETS_REG_WIDTH      32 
-#define ACQ_RECEIVED_LONG_PACKETS_REG_WIDTH       32  
-#define ACQ_LAST_COMMAND_REG_WIDTH                32  
-#define ACQ_NEXT_COMMAND_REG_WIDTH                32  
-#define ACQ_LAST_ACKNOWLEDGE_REG_WIDTH            32  
-#define ACQ_NEXT_ACKNOWLEDGE_REG_WIDTH            32  
-#define ACQ_FSM_STATE_INFO_REG_WIDTH              ((MEM2STREAM_FSM_STATE_BITS * 3) + (ACQ_SYNCHRONIZER_FSM_STATE_BITS *3))
+#define ACQ_START_ADDR_REG_WIDTH                  9
+#define ACQ_MEM_REGION_SIZE_REG_WIDTH             9
+#define ACQ_NUM_MEM_REGIONS_REG_WIDTH             9
+#define ACQ_INIT_REG_WIDTH                        3
+#define ACQ_RECEIVED_SHORT_PACKETS_REG_WIDTH      32
+#define ACQ_RECEIVED_LONG_PACKETS_REG_WIDTH       32
+#define ACQ_LAST_COMMAND_REG_WIDTH                32
+#define ACQ_NEXT_COMMAND_REG_WIDTH                32
+#define ACQ_LAST_ACKNOWLEDGE_REG_WIDTH            32
+#define ACQ_NEXT_ACKNOWLEDGE_REG_WIDTH            32
+#define ACQ_FSM_STATE_INFO_REG_WIDTH              ((MEM2STREAM_FSM_STATE_BITS * 3) + (ACQ_SYNCHRONIZER_FSM_STATE_BITS * 3))
 #define ACQ_INT_CNTR_INFO_REG_WIDTH               32
 
 /* register reset value */
-#define ACQ_START_ADDR_REG_RSTVAL                 0              
+#define ACQ_START_ADDR_REG_RSTVAL                 0
 #define ACQ_MEM_REGION_SIZE_REG_RSTVAL            128
 #define ACQ_NUM_MEM_REGIONS_REG_RSTVAL            3
-#define ACQ_INIT_REG_RSTVAL                       0                           
+#define ACQ_INIT_REG_RSTVAL                       0
 #define ACQ_RECEIVED_SHORT_PACKETS_REG_RSTVAL     0
 #define ACQ_RECEIVED_LONG_PACKETS_REG_RSTVAL      0
 #define ACQ_LAST_COMMAND_REG_RSTVAL               0
 #define ACQ_NEXT_COMMAND_REG_RSTVAL               0
 #define ACQ_LAST_ACKNOWLEDGE_REG_RSTVAL           0
-#define ACQ_NEXT_ACKNOWLEDGE_REG_RSTVAL           0 
+#define ACQ_NEXT_ACKNOWLEDGE_REG_RSTVAL           0
 #define ACQ_FSM_STATE_INFO_REG_RSTVAL             0
-#define ACQ_INT_CNTR_INFO_REG_RSTVAL              0 
+#define ACQ_INT_CNTR_INFO_REG_RSTVAL              0
 
 /* bit definitions */
 #define ACQ_INIT_RST_REG_BIT                      0
@@ -88,7 +88,7 @@
 /* TOKEN INFO */
 /* --------------------------------------------------*/
 #define ACQ_TOKEN_ID_LSB                          0
-#define ACQ_TOKEN_ID_MSB                          3            
+#define ACQ_TOKEN_ID_MSB                          3
 #define ACQ_TOKEN_WIDTH                           (ACQ_TOKEN_ID_MSB - ACQ_TOKEN_ID_LSB  + 1) // 4
 #define ACQ_TOKEN_ID_IDX                          0
 #define ACQ_TOKEN_ID_BITS                         ACQ_TOKEN_WIDTH
@@ -97,9 +97,9 @@
 #define ACQ_CMD_START_ADDR_IDX                    4
 #define ACQ_CMD_START_ADDR_BITS                   9
 #define ACQ_CMD_NOFWORDS_IDX                      13
-#define ACQ_CMD_NOFWORDS_BITS                     9  
+#define ACQ_CMD_NOFWORDS_BITS                     9
 #define ACQ_MEM_REGION_ID_IDX                     22
-#define ACQ_MEM_REGION_ID_BITS                    9 
+#define ACQ_MEM_REGION_ID_BITS                    9
 #define ACQ_PACKET_LENGTH_TOKEN_MSB               21
 #define ACQ_PACKET_LENGTH_TOKEN_LSB               13
 #define ACQ_PACKET_DATA_FORMAT_ID_TOKEN_MSB       9
 #define ACQ_PACKET_MEM_REGION_ID_TOKEN_MSB        12           /* only for capt_end_of_packet_written */
 #define ACQ_PACKET_MEM_REGION_ID_TOKEN_LSB        4            /* only for capt_end_of_packet_written */
 
-
 /* Command tokens IDs */
 #define ACQ_READ_REGION_AUTO_INCR_TOKEN_ID        0 //0000b
 #define ACQ_READ_REGION_TOKEN_ID                  1 //0001b
-#define ACQ_READ_REGION_SOP_TOKEN_ID              2 //0010b  
+#define ACQ_READ_REGION_SOP_TOKEN_ID              2 //0010b
 #define ACQ_INIT_TOKEN_ID                         8 //1000b
 
 /* Acknowledge token IDs */
 #define ACQ_TOKEN_NOFWORDS_MSB                    21
 #define ACQ_TOKEN_NOFWORDS_LSB                    13
 #define ACQ_TOKEN_STARTADDR_MSB                   12
-#define ACQ_TOKEN_STARTADDR_LSB                   4  
-
+#define ACQ_TOKEN_STARTADDR_LSB                   4
 
 /* --------------------------------------------------*/
 /* MIPI */
 /* --------------------------------------------------*/
 
 #define WORD_COUNT_WIDTH                          16
-#define PKT_CODE_WIDTH                            6            
-#define CHN_NO_WIDTH                              2  
+#define PKT_CODE_WIDTH                            6
+#define CHN_NO_WIDTH                              2
 #define ERROR_INFO_WIDTH                          8
-  
+
 #define LONG_PKTCODE_MAX                          63
 #define LONG_PKTCODE_MIN                          16
 #define SHORT_PKTCODE_MAX                         15
 #define ACQ_LINE_PAYLOAD                          4
 #define ACQ_GEN_SH_PKT                            5
 
-
 /* bit definition */
 #define ACQ_PKT_TYPE_IDX                          16
 #define ACQ_PKT_TYPE_BITS                         6
 #define ACQ_ACK_PKT_LEN_IDX                       4
 #define ACQ_ACK_PKT_LEN_BITS                      16
 
-
 /* --------------------------------------------------*/
 /* Packet Data Type */
 /* --------------------------------------------------*/
 
-
 #define ACQ_YUV420_8_DATA                       24   /* 01 1000 YUV420 8-bit                                        */
 #define ACQ_YUV420_10_DATA                      25   /* 01 1001  YUV420 10-bit                                      */
 #define ACQ_YUV420_8L_DATA                      26   /* 01 1010   YUV420 8-bit legacy                               */
 #define ACQ_YUV422_8_DATA                       30   /* 01 1110   YUV422 8-bit                                      */
 #define ACQ_YUV422_10_DATA                      31   /* 01 1111   YUV422 10-bit                                     */
 #define ACQ_RGB444_DATA                         32   /* 10 0000   RGB444                                            */
-#define ACQ_RGB555_DATA                                                 33   /* 10 0001   RGB555                                            */
-#define ACQ_RGB565_DATA                                                 34   /* 10 0010   RGB565                                            */
-#define ACQ_RGB666_DATA                                                 35   /* 10 0011   RGB666                                            */
-#define ACQ_RGB888_DATA                                                 36   /* 10 0100   RGB888                                            */
-#define ACQ_RAW6_DATA                                                   40   /* 10 1000   RAW6                                              */
-#define ACQ_RAW7_DATA                                                   41   /* 10 1001   RAW7                                              */
-#define ACQ_RAW8_DATA                                                   42   /* 10 1010   RAW8                                              */
-#define ACQ_RAW10_DATA                                                  43   /* 10 1011   RAW10                                             */
-#define ACQ_RAW12_DATA                                                  44   /* 10 1100   RAW12                                             */
-#define ACQ_RAW14_DATA                                                  45   /* 10 1101   RAW14                                             */
-#define ACQ_USR_DEF_1_DATA                                              48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
-#define ACQ_USR_DEF_2_DATA                                              49   /* 11 0001    User Defined 8-bit Data Type 2                   */
-#define ACQ_USR_DEF_3_DATA                                              50   /* 11 0010    User Defined 8-bit Data Type 3                   */
-#define ACQ_USR_DEF_4_DATA                                              51   /* 11 0011    User Defined 8-bit Data Type 4                   */
-#define ACQ_USR_DEF_5_DATA                                              52   /* 11 0100    User Defined 8-bit Data Type 5                   */
-#define ACQ_USR_DEF_6_DATA                                              53   /* 11 0101    User Defined 8-bit Data Type 6                   */
-#define ACQ_USR_DEF_7_DATA                                              54   /* 11 0110    User Defined 8-bit Data Type 7                   */
-#define ACQ_USR_DEF_8_DATA                                              55   /* 11 0111    User Defined 8-bit Data Type 8                   */
-#define ACQ_Emb_DATA                                                    18   /* 01 0010    embedded eight bit non image data                */
-#define ACQ_SOF_DATA                                                    0   /* 00 0000    frame start                                      */
-#define ACQ_EOF_DATA                                                    1   /* 00 0001    frame end                                        */
-#define ACQ_SOL_DATA                                                    2   /* 00 0010    line start                                       */
-#define ACQ_EOL_DATA                                                    3   /* 00 0011    line end                                         */
-#define ACQ_GEN_SH1_DATA                                                8   /* 00 1000  Generic Short Packet Code 1                        */
-#define ACQ_GEN_SH2_DATA                                                9   /* 00 1001    Generic Short Packet Code 2                      */
-#define ACQ_GEN_SH3_DATA                                                10   /* 00 1010    Generic Short Packet Code 3                      */
-#define ACQ_GEN_SH4_DATA                                                11   /* 00 1011    Generic Short Packet Code 4                      */
-#define ACQ_GEN_SH5_DATA                                                12   /* 00 1100    Generic Short Packet Code 5                      */
-#define ACQ_GEN_SH6_DATA                                                13   /* 00 1101    Generic Short Packet Code 6                      */
-#define ACQ_GEN_SH7_DATA                                                14   /* 00 1110    Generic Short Packet Code 7                      */
-#define ACQ_GEN_SH8_DATA                                                15   /* 00 1111    Generic Short Packet Code 8                      */
-#define ACQ_YUV420_8_CSPS_DATA                                          28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
-#define ACQ_YUV420_10_CSPS_DATA                                         29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
+#define ACQ_RGB555_DATA                                                 33   /* 10 0001   RGB555                                            */
+#define ACQ_RGB565_DATA                                                 34   /* 10 0010   RGB565                                            */
+#define ACQ_RGB666_DATA                                                 35   /* 10 0011   RGB666                                            */
+#define ACQ_RGB888_DATA                                                 36   /* 10 0100   RGB888                                            */
+#define ACQ_RAW6_DATA                                                   40   /* 10 1000   RAW6                                              */
+#define ACQ_RAW7_DATA                                                   41   /* 10 1001   RAW7                                              */
+#define ACQ_RAW8_DATA                                                   42   /* 10 1010   RAW8                                              */
+#define ACQ_RAW10_DATA                                          43   /* 10 1011   RAW10                                             */
+#define ACQ_RAW12_DATA                                          44   /* 10 1100   RAW12                                             */
+#define ACQ_RAW14_DATA                                          45   /* 10 1101   RAW14                                             */
+#define ACQ_USR_DEF_1_DATA                                              48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
+#define ACQ_USR_DEF_2_DATA                                              49   /* 11 0001    User Defined 8-bit Data Type 2                   */
+#define ACQ_USR_DEF_3_DATA                                              50   /* 11 0010    User Defined 8-bit Data Type 3                   */
+#define ACQ_USR_DEF_4_DATA                                              51   /* 11 0011    User Defined 8-bit Data Type 4                   */
+#define ACQ_USR_DEF_5_DATA                                              52   /* 11 0100    User Defined 8-bit Data Type 5                   */
+#define ACQ_USR_DEF_6_DATA                                              53   /* 11 0101    User Defined 8-bit Data Type 6                   */
+#define ACQ_USR_DEF_7_DATA                                              54   /* 11 0110    User Defined 8-bit Data Type 7                   */
+#define ACQ_USR_DEF_8_DATA                                              55   /* 11 0111    User Defined 8-bit Data Type 8                   */
+#define ACQ_Emb_DATA                                                    18   /* 01 0010    embedded eight bit non image data                */
+#define ACQ_SOF_DATA                                                    0   /* 00 0000    frame start                                      */
+#define ACQ_EOF_DATA                                                    1   /* 00 0001    frame end                                        */
+#define ACQ_SOL_DATA                                                    2   /* 00 0010    line start                                       */
+#define ACQ_EOL_DATA                                                    3   /* 00 0011    line end                                         */
+#define ACQ_GEN_SH1_DATA                                                8   /* 00 1000  Generic Short Packet Code 1                        */
+#define ACQ_GEN_SH2_DATA                                                9   /* 00 1001    Generic Short Packet Code 2                      */
+#define ACQ_GEN_SH3_DATA                                                10   /* 00 1010    Generic Short Packet Code 3                      */
+#define ACQ_GEN_SH4_DATA                                                11   /* 00 1011    Generic Short Packet Code 4                      */
+#define ACQ_GEN_SH5_DATA                                                12   /* 00 1100    Generic Short Packet Code 5                      */
+#define ACQ_GEN_SH6_DATA                                                13   /* 00 1101    Generic Short Packet Code 6                      */
+#define ACQ_GEN_SH7_DATA                                                14   /* 00 1110    Generic Short Packet Code 7                      */
+#define ACQ_GEN_SH8_DATA                                                15   /* 00 1111    Generic Short Packet Code 8                      */
+#define ACQ_YUV420_8_CSPS_DATA                                  28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
+#define ACQ_YUV420_10_CSPS_DATA                                         29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
 #define ACQ_RESERVED_DATA_TYPE_MIN              56
 #define ACQ_RESERVED_DATA_TYPE_MAX              63
 #define ACQ_GEN_LONG_RESERVED_DATA_TYPE_MIN     19
 
 /* --------------------------------------------------*/
 
-#endif /* _isp_acquisition_defs_h */ 
+#endif /* _isp_acquisition_defs_h */
index 0a249ce3e5897d00d64254de6e1957c38b516a38..8ac20604522209594fc9a645d0fc554e726f971e 100644 (file)
 #define _isp_capture_defs_h
 
 #define _ISP_CAPTURE_REG_ALIGN                    4  /* assuming 32 bit control bus width */
-#define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */                                                        
-#define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM/8        )                                          
-#define _ISP_CAPTURE_BYTES_PER_WORD               32           /* 256/8 */     
-#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM                       
+#define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */
+#define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM / 8)
+#define _ISP_CAPTURE_BYTES_PER_WORD               32           /* 256/8 */
+#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM
 
 //#define CAPT_RCV_ACK                              1
-//#define CAPT_WRT_ACK                              2               
-//#define CAPT_IRQ_ACK                              3                        
+//#define CAPT_WRT_ACK                              2
+//#define CAPT_IRQ_ACK                              3
 
 /* --------------------------------------------------*/
 
 
 // Register id's of MMIO slave accesible registers
 #define CAPT_START_MODE_REG_ID                    0
-#define CAPT_START_ADDR_REG_ID                    1 
-#define CAPT_MEM_REGION_SIZE_REG_ID               2 
-#define CAPT_NUM_MEM_REGIONS_REG_ID               3 
-#define CAPT_INIT_REG_ID                          4 
+#define CAPT_START_ADDR_REG_ID                    1
+#define CAPT_MEM_REGION_SIZE_REG_ID               2
+#define CAPT_NUM_MEM_REGIONS_REG_ID               3
+#define CAPT_INIT_REG_ID                          4
 #define CAPT_START_REG_ID                         5
-#define CAPT_STOP_REG_ID                          6  
+#define CAPT_STOP_REG_ID                          6
 
 #define CAPT_PACKET_LENGTH_REG_ID                 7
-#define CAPT_RECEIVED_LENGTH_REG_ID               8 
-#define CAPT_RECEIVED_SHORT_PACKETS_REG_ID        9 
-#define CAPT_RECEIVED_LONG_PACKETS_REG_ID         10 
-#define CAPT_LAST_COMMAND_REG_ID                  11        
+#define CAPT_RECEIVED_LENGTH_REG_ID               8
+#define CAPT_RECEIVED_SHORT_PACKETS_REG_ID        9
+#define CAPT_RECEIVED_LONG_PACKETS_REG_ID         10
+#define CAPT_LAST_COMMAND_REG_ID                  11
 #define CAPT_NEXT_COMMAND_REG_ID                  12
 #define CAPT_LAST_ACKNOWLEDGE_REG_ID              13
 #define CAPT_NEXT_ACKNOWLEDGE_REG_ID              14
 #define CAPT_FSM_STATE_INFO_REG_ID                15
 
 // Register width
-#define CAPT_START_MODE_REG_WIDTH                 1 
+#define CAPT_START_MODE_REG_WIDTH                 1
 #define CAPT_START_ADDR_REG_WIDTH                 9
 #define CAPT_MEM_REGION_SIZE_REG_WIDTH            9
 #define CAPT_NUM_MEM_REGIONS_REG_WIDTH            9
 #define CAPT_WRITE2MEM_FSM_STATE_BITS             2
 #define CAPT_SYNCHRONIZER_FSM_STATE_BITS          3
 
-
 #define CAPT_PACKET_LENGTH_REG_WIDTH              17
-#define CAPT_RECEIVED_LENGTH_REG_WIDTH            17   
+#define CAPT_RECEIVED_LENGTH_REG_WIDTH            17
 #define CAPT_RECEIVED_SHORT_PACKETS_REG_WIDTH     32
 #define CAPT_RECEIVED_LONG_PACKETS_REG_WIDTH      32
 #define CAPT_LAST_COMMAND_REG_WIDTH               32
-/* #define CAPT_NEXT_COMMAND_REG_WIDTH               32 */  
+/* #define CAPT_NEXT_COMMAND_REG_WIDTH               32 */
 #define CAPT_LAST_ACKNOWLEDGE_REG_WIDTH           32
 #define CAPT_NEXT_ACKNOWLEDGE_REG_WIDTH           32
 #define CAPT_FSM_STATE_INFO_REG_WIDTH             ((CAPT_WRITE2MEM_FSM_STATE_BITS * 3) + (CAPT_SYNCHRONIZER_FSM_STATE_BITS * 3))
 
-#define CAPT_INIT_RESTART_MEM_ADDR_WIDTH          9   
-#define CAPT_INIT_RESTART_MEM_REGION_WIDTH        9 
+#define CAPT_INIT_RESTART_MEM_ADDR_WIDTH          9
+#define CAPT_INIT_RESTART_MEM_REGION_WIDTH        9
 
 /* register reset value */
-#define CAPT_START_MODE_REG_RSTVAL                0   
+#define CAPT_START_MODE_REG_RSTVAL                0
 #define CAPT_START_ADDR_REG_RSTVAL                0
 #define CAPT_MEM_REGION_SIZE_REG_RSTVAL           128
-#define CAPT_NUM_MEM_REGIONS_REG_RSTVAL           3 
+#define CAPT_NUM_MEM_REGIONS_REG_RSTVAL           3
 #define CAPT_INIT_REG_RSTVAL                      0
 
 #define CAPT_START_REG_RSTVAL                     0
 #define CAPT_INIT_RESTART_MEM_REGION_LSB          13
 #define CAPT_INIT_RESTART_MEM_REGION_MSB          21
 
-
 #define CAPT_INIT_RST_REG_IDX                     CAPT_INIT_RST_REG_BIT
 #define CAPT_INIT_RST_REG_BITS                    1
 #define CAPT_INIT_FLUSH_IDX                       CAPT_INIT_FLUSH_BIT
 #define CAPT_INIT_RESYNC_IDX                      CAPT_INIT_RESYNC_BIT
 #define CAPT_INIT_RESYNC_BITS                     1
 #define CAPT_INIT_RESTART_IDX                     CAPT_INIT_RESTART_BIT
-#define CAPT_INIT_RESTART_BITS                                                                 1
+#define CAPT_INIT_RESTART_BITS                                                                 1
 #define CAPT_INIT_RESTART_MEM_ADDR_IDX            CAPT_INIT_RESTART_MEM_ADDR_LSB
 #define CAPT_INIT_RESTART_MEM_ADDR_BITS           (CAPT_INIT_RESTART_MEM_ADDR_MSB - CAPT_INIT_RESTART_MEM_ADDR_LSB + 1)
 #define CAPT_INIT_RESTART_MEM_REGION_IDX          CAPT_INIT_RESTART_MEM_REGION_LSB
 #define CAPT_INIT_RESTART_MEM_REGION_BITS         (CAPT_INIT_RESTART_MEM_REGION_MSB - CAPT_INIT_RESTART_MEM_REGION_LSB + 1)
 
-
-
 /* --------------------------------------------------*/
 /* TOKEN INFO */
 /* --------------------------------------------------*/
 #define CAPT_TOKEN_ID_LSB                         0
-#define CAPT_TOKEN_ID_MSB                         3            
+#define CAPT_TOKEN_ID_MSB                         3
 #define CAPT_TOKEN_WIDTH                         (CAPT_TOKEN_ID_MSB - CAPT_TOKEN_ID_LSB  + 1) /* 4 */
 
 /* Command tokens IDs */
 #define CAPT_START_TOKEN_ID                       0 /* 0000b */
 #define CAPT_STOP_TOKEN_ID                        1 /* 0001b */
-#define CAPT_FREEZE_TOKEN_ID                      2 /* 0010b */  
+#define CAPT_FREEZE_TOKEN_ID                      2 /* 0010b */
 #define CAPT_RESUME_TOKEN_ID                      3 /* 0011b */
 #define CAPT_INIT_TOKEN_ID                        8 /* 1000b */
 
-#define CAPT_START_TOKEN_BIT                      0      
+#define CAPT_START_TOKEN_BIT                      0
 #define CAPT_STOP_TOKEN_BIT                       0
 #define CAPT_FREEZE_TOKEN_BIT                     0
 #define CAPT_RESUME_TOKEN_BIT                     0
 #define CAPT_PACKET_DATA_FORMAT_ID_TOKEN_LSB     20
 #define CAPT_PACKET_CH_ID_TOKEN_MSB              27
 #define CAPT_PACKET_CH_ID_TOKEN_LSB              26
-#define CAPT_PACKET_MEM_REGION_ID_TOKEN_MSB      29            
-#define CAPT_PACKET_MEM_REGION_ID_TOKEN_LSB      21            
+#define CAPT_PACKET_MEM_REGION_ID_TOKEN_MSB      29
+#define CAPT_PACKET_MEM_REGION_ID_TOKEN_LSB      21
 
 /*  bit definition */
 #define CAPT_CMD_IDX                              CAPT_TOKEN_ID_LSB
 #define CAPT_INIT_TOKEN_INIT_IDX                  4
 #define CAPT_INIT_TOKEN_INIT_BITS                 22
 
-
 /* --------------------------------------------------*/
 /* MIPI */
 /* --------------------------------------------------*/
 
-#define CAPT_WORD_COUNT_WIDTH                     16      
-#define CAPT_PKT_CODE_WIDTH                       6                  
-#define CAPT_CHN_NO_WIDTH                         2        
-#define CAPT_ERROR_INFO_WIDTH                     8       
+#define CAPT_WORD_COUNT_WIDTH                     16
+#define CAPT_PKT_CODE_WIDTH                       6
+#define CAPT_CHN_NO_WIDTH                         2
+#define CAPT_ERROR_INFO_WIDTH                     8
 
 #define LONG_PKTCODE_MAX                          63
 #define LONG_PKTCODE_MIN                          16
 #define SHORT_PKTCODE_MAX                         15
 
-
 /* --------------------------------------------------*/
 /* Packet Info */
 /* --------------------------------------------------*/
 #define CAPT_LINE_PAYLOAD                         4
 #define CAPT_GEN_SH_PKT                           5
 
-
 /* --------------------------------------------------*/
 /* Packet Data Type */
 /* --------------------------------------------------*/
 #define CAPT_YUV422_8_DATA                       30   /* 01 1110   YUV422 8-bit                                      */
 #define CAPT_YUV422_10_DATA                      31   /* 01 1111   YUV422 10-bit                                     */
 #define CAPT_RGB444_DATA                         32   /* 10 0000   RGB444                                            */
-#define CAPT_RGB555_DATA                                                33   /* 10 0001   RGB555                                            */
-#define CAPT_RGB565_DATA                                                34   /* 10 0010   RGB565                                            */
-#define CAPT_RGB666_DATA                                                35   /* 10 0011   RGB666                                            */
-#define CAPT_RGB888_DATA                                                36   /* 10 0100   RGB888                                            */
-#define CAPT_RAW6_DATA                                                  40   /* 10 1000   RAW6                                              */
-#define CAPT_RAW7_DATA                                                  41   /* 10 1001   RAW7                                              */
-#define CAPT_RAW8_DATA                                                  42   /* 10 1010   RAW8                                              */
-#define CAPT_RAW10_DATA                                                 43   /* 10 1011   RAW10                                             */
-#define CAPT_RAW12_DATA                                                 44   /* 10 1100   RAW12                                             */
-#define CAPT_RAW14_DATA                                                 45   /* 10 1101   RAW14                                             */
-#define CAPT_USR_DEF_1_DATA                                             48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
-#define CAPT_USR_DEF_2_DATA                                             49   /* 11 0001    User Defined 8-bit Data Type 2                   */
-#define CAPT_USR_DEF_3_DATA                                             50   /* 11 0010    User Defined 8-bit Data Type 3                   */
-#define CAPT_USR_DEF_4_DATA                                             51   /* 11 0011    User Defined 8-bit Data Type 4                   */
-#define CAPT_USR_DEF_5_DATA                                             52   /* 11 0100    User Defined 8-bit Data Type 5                   */
-#define CAPT_USR_DEF_6_DATA                                             53   /* 11 0101    User Defined 8-bit Data Type 6                   */
-#define CAPT_USR_DEF_7_DATA                                             54   /* 11 0110    User Defined 8-bit Data Type 7                   */
-#define CAPT_USR_DEF_8_DATA                                             55   /* 11 0111    User Defined 8-bit Data Type 8                   */
-#define CAPT_Emb_DATA                                                   18   /* 01 0010    embedded eight bit non image data                */
-#define CAPT_SOF_DATA                                                   0   /* 00 0000    frame start                                      */
-#define CAPT_EOF_DATA                                                   1   /* 00 0001    frame end                                        */
-#define CAPT_SOL_DATA                                                   2   /* 00 0010    line start                                       */
-#define CAPT_EOL_DATA                                                   3   /* 00 0011    line end                                         */
-#define CAPT_GEN_SH1_DATA                                               8   /* 00 1000  Generic Short Packet Code 1                        */
-#define CAPT_GEN_SH2_DATA                                               9   /* 00 1001    Generic Short Packet Code 2                      */
-#define CAPT_GEN_SH3_DATA                                               10   /* 00 1010    Generic Short Packet Code 3                      */
-#define CAPT_GEN_SH4_DATA                                               11   /* 00 1011    Generic Short Packet Code 4                      */
-#define CAPT_GEN_SH5_DATA                                               12   /* 00 1100    Generic Short Packet Code 5                      */
-#define CAPT_GEN_SH6_DATA                                               13   /* 00 1101    Generic Short Packet Code 6                      */
-#define CAPT_GEN_SH7_DATA                                               14   /* 00 1110    Generic Short Packet Code 7                      */
-#define CAPT_GEN_SH8_DATA                                               15   /* 00 1111    Generic Short Packet Code 8                      */
-#define CAPT_YUV420_8_CSPS_DATA                                         28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
-#define CAPT_YUV420_10_CSPS_DATA                                        29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
+#define CAPT_RGB555_DATA                                                33   /* 10 0001   RGB555                                            */
+#define CAPT_RGB565_DATA                                                34   /* 10 0010   RGB565                                            */
+#define CAPT_RGB666_DATA                                                35   /* 10 0011   RGB666                                            */
+#define CAPT_RGB888_DATA                                                36   /* 10 0100   RGB888                                            */
+#define CAPT_RAW6_DATA                                                  40   /* 10 1000   RAW6                                              */
+#define CAPT_RAW7_DATA                                                  41   /* 10 1001   RAW7                                              */
+#define CAPT_RAW8_DATA                                                  42   /* 10 1010   RAW8                                              */
+#define CAPT_RAW10_DATA                                                 43   /* 10 1011   RAW10                                             */
+#define CAPT_RAW12_DATA                                                 44   /* 10 1100   RAW12                                             */
+#define CAPT_RAW14_DATA                                                 45   /* 10 1101   RAW14                                             */
+#define CAPT_USR_DEF_1_DATA                                             48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
+#define CAPT_USR_DEF_2_DATA                                             49   /* 11 0001    User Defined 8-bit Data Type 2                   */
+#define CAPT_USR_DEF_3_DATA                                             50   /* 11 0010    User Defined 8-bit Data Type 3                   */
+#define CAPT_USR_DEF_4_DATA                                             51   /* 11 0011    User Defined 8-bit Data Type 4                   */
+#define CAPT_USR_DEF_5_DATA                                             52   /* 11 0100    User Defined 8-bit Data Type 5                   */
+#define CAPT_USR_DEF_6_DATA                                             53   /* 11 0101    User Defined 8-bit Data Type 6                   */
+#define CAPT_USR_DEF_7_DATA                                             54   /* 11 0110    User Defined 8-bit Data Type 7                   */
+#define CAPT_USR_DEF_8_DATA                                             55   /* 11 0111    User Defined 8-bit Data Type 8                   */
+#define CAPT_Emb_DATA                                                   18   /* 01 0010    embedded eight bit non image data                */
+#define CAPT_SOF_DATA                                                   0   /* 00 0000    frame start                                      */
+#define CAPT_EOF_DATA                                                   1   /* 00 0001    frame end                                        */
+#define CAPT_SOL_DATA                                                   2   /* 00 0010    line start                                       */
+#define CAPT_EOL_DATA                                                   3   /* 00 0011    line end                                         */
+#define CAPT_GEN_SH1_DATA                                               8   /* 00 1000  Generic Short Packet Code 1                        */
+#define CAPT_GEN_SH2_DATA                                               9   /* 00 1001    Generic Short Packet Code 2                      */
+#define CAPT_GEN_SH3_DATA                                               10   /* 00 1010    Generic Short Packet Code 3                      */
+#define CAPT_GEN_SH4_DATA                                               11   /* 00 1011    Generic Short Packet Code 4                      */
+#define CAPT_GEN_SH5_DATA                                               12   /* 00 1100    Generic Short Packet Code 5                      */
+#define CAPT_GEN_SH6_DATA                                               13   /* 00 1101    Generic Short Packet Code 6                      */
+#define CAPT_GEN_SH7_DATA                                               14   /* 00 1110    Generic Short Packet Code 7                      */
+#define CAPT_GEN_SH8_DATA                                               15   /* 00 1111    Generic Short Packet Code 8                      */
+#define CAPT_YUV420_8_CSPS_DATA                                         28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
+#define CAPT_YUV420_10_CSPS_DATA                                        29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
 #define CAPT_RESERVED_DATA_TYPE_MIN              56
 #define CAPT_RESERVED_DATA_TYPE_MAX              63
 #define CAPT_GEN_LONG_RESERVED_DATA_TYPE_MIN     19
 #define CAPT_RAW_RESERVED_DATA_TYPE_MIN          46
 #define CAPT_RAW_RESERVED_DATA_TYPE_MAX          47
 
-
 /* --------------------------------------------------*/
 /* Capture Unit State */
 /* --------------------------------------------------*/
 #define CAPT_FREEZE                               5
 #define CAPT_RUN                                  6
 
-
 /* --------------------------------------------------*/
 
-#endif /* _isp_capture_defs_h */ 
-
-
-
-
-
+#endif /* _isp_capture_defs_h */
index d2b8972b0d9ec64ae887e8c6f96d586262737b0f..75451e090f4ffc40f760d5f70c31cc604d32cb91 100644 (file)
@@ -19,4 +19,4 @@
 
 #define _HRT_TIMED_CONTROLLER_REG_ALIGN 4
 
-#endif /* _timed_controller_defs_h */   
+#endif /* _timed_controller_defs_h */
index 5bc0ad34616e6e630a1b9e3c6c90cec9ffde8deb..0446916d21f6174b12198fe898664d7f0b4023f0 100644 (file)
 #define hrt_host_type_of_ulong  unsigned long
 #define hrt_host_type_of_ptr    void*
 
-#define HRT_TYPE_BYTES(cell, type) (HRT_TYPE_BITS(cell, type)/8)
+#define HRT_TYPE_BYTES(cell, type) (HRT_TYPE_BITS(cell, type) / 8)
 #define HRT_HOST_TYPE(cell_type)   HRTCAT(hrt_host_type_of_, cell_type)
 #define HRT_INT_TYPE(type)         HRTCAT(hrt_int_type_of_, type)
 
 #define hrt_scalar_store(cell, type, var, data) \
-  HRTCAT(hrt_mem_store_,HRT_TYPE_BITS(cell, type))(\
+  HRTCAT(hrt_mem_store_, HRT_TYPE_BITS(cell, type))(\
               cell, \
-              HRTCAT(HIVE_MEM_,var), \
-              HRTCAT(HIVE_ADDR_,var), \
+              HRTCAT(HIVE_MEM_, var), \
+              HRTCAT(HIVE_ADDR_, var), \
               (HRT_INT_TYPE(type))(data))
 
 #define hrt_scalar_load(cell, type, var) \
-  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_,HRT_PROC_TYPE(cell),_,type) ( \
+  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_, HRT_PROC_TYPE(cell), _, type) ( \
               cell, \
-              HRTCAT(HIVE_MEM_,var), \
-              HRTCAT(HIVE_ADDR_,var)))
+              HRTCAT(HIVE_MEM_, var), \
+              HRTCAT(HIVE_ADDR_, var)))
 
 #define hrt_indexed_store(cell, type, array, index, data) \
-  HRTCAT(hrt_mem_store_,HRT_TYPE_BITS(cell, type))(\
+  HRTCAT(hrt_mem_store_, HRT_TYPE_BITS(cell, type))(\
               cell, \
-              HRTCAT(HIVE_MEM_,array), \
-              (HRTCAT(HIVE_ADDR_,array))+((index)*HRT_TYPE_BYTES(cell, type)), \
+              HRTCAT(HIVE_MEM_, array), \
+              (HRTCAT(HIVE_ADDR_, array)) + ((index) * HRT_TYPE_BYTES(cell, type)), \
               (HRT_INT_TYPE(type))(data))
 
 #define hrt_indexed_load(cell, type, array, index) \
-  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_,HRT_PROC_TYPE(cell),_,type) ( \
-         cell, \
-              HRTCAT(HIVE_MEM_,array), \
-              (HRTCAT(HIVE_ADDR_,array))+((index)*HRT_TYPE_BYTES(cell, type))))
+  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_, HRT_PROC_TYPE(cell), _, type) ( \
+        cell, \
+              HRTCAT(HIVE_MEM_, array), \
+              (HRTCAT(HIVE_ADDR_, array)) + ((index) * HRT_TYPE_BYTES(cell, type))))
 
 #endif /* _HRT_VAR_H */
 #endif
index ddc7a8f051536d6b57953681a297b0d3f07f2693..a7bbb31b46077ade8407ddee0f06dfe4e4d271c0 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef _sp_map_h_
 #define _sp_map_h_
 
-
 #ifndef _hrt_dummy_use_blob_sp
 #define _hrt_dummy_use_blob_sp()
 #endif
index 146a578b7c74c699d1b05a394283f3225648045f..4de5bb81bd238a349cdbcaec3878cc53ee8a6a76 100644 (file)
@@ -27,8 +27,8 @@ typedef enum {
 
 typedef struct csi_rx_backend_lut_entry_s      csi_rx_backend_lut_entry_t;
 struct csi_rx_backend_lut_entry_s {
-       uint32_t        long_packet_entry;
-       uint32_t        short_packet_entry;
+       u32     long_packet_entry;
+       u32     short_packet_entry;
 };
 
 typedef struct csi_rx_backend_cfg_s csi_rx_backend_cfg_t;
@@ -41,23 +41,23 @@ struct csi_rx_backend_cfg_s {
 
        struct {
                bool     comp_enable;
-               uint32_t virtual_channel;
-               uint32_t data_type;
-               uint32_t comp_scheme;
-               uint32_t comp_predictor;
-               uint32_t comp_bit_idx;
+               u32 virtual_channel;
+               u32 data_type;
+               u32 comp_scheme;
+               u32 comp_predictor;
+               u32 comp_bit_idx;
        } csi_mipi_cfg;
 };
 
 typedef struct csi_rx_frontend_cfg_s csi_rx_frontend_cfg_t;
 struct csi_rx_frontend_cfg_s {
-       uint32_t active_lanes;
+       u32 active_lanes;
 };
 
-extern const uint32_t N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID];
-extern const uint32_t N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID];
-extern const uint32_t N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID];
+extern const u32 N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID];
+extern const u32 N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID];
+extern const u32 N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID];
 /* sid_width for CSI_RX_BACKEND<N>_ID */
-extern const uint32_t N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID];
+extern const u32 N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID];
 
 #endif /* __CSI_RX_GLOBAL_H_INCLUDED__ */
index 325b821f276cf504f5f2cf1b87ad48a9d7c9fc77..de99359a0fbcbe3bc1af0dc96e1a5e3e85714489 100644 (file)
@@ -30,8 +30,9 @@ ia_css_configure_iterator(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.iterator.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.iterator.offset;
@@ -54,8 +55,9 @@ ia_css_configure_copy_output(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.copy_output.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.copy_output.offset;
@@ -78,8 +80,9 @@ ia_css_configure_crop(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.crop.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.crop.offset;
@@ -102,8 +105,9 @@ ia_css_configure_fpn(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.fpn.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.fpn.offset;
@@ -126,8 +130,9 @@ ia_css_configure_dvs(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.dvs.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.dvs.offset;
@@ -150,8 +155,9 @@ ia_css_configure_qplane(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.qplane.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.qplane.offset;
@@ -174,8 +180,9 @@ ia_css_configure_output0(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.output0.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.output0.offset;
@@ -198,8 +205,9 @@ ia_css_configure_output1(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.output1.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.output1.offset;
@@ -222,8 +230,9 @@ ia_css_configure_output(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.output.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.output.offset;
@@ -247,8 +256,9 @@ ia_css_configure_sc(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.sc.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.sc.offset;
@@ -272,8 +282,9 @@ ia_css_configure_raw(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.raw.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.raw.offset;
@@ -296,8 +307,9 @@ ia_css_configure_tnr(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.tnr.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.tnr.offset;
@@ -320,8 +332,9 @@ ia_css_configure_ref(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.ref.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.ref.offset;
@@ -344,8 +357,9 @@ ia_css_configure_vf(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.vf.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.vf.offset;
@@ -357,4 +371,3 @@ ia_css_configure_vf(
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() leave:\n");
 }
-
index 11e4463ebb50620e5013eded106c628c4cfac0a7..3afe861b709efda47cf2272cf8b93f94532a20dd 100644 (file)
 
 static void
 ia_css_process_aa(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       unsigned size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
-       unsigned 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 *)
@@ -85,16 +85,16 @@ ia_css_process_aa(
 
 static void
 ia_css_process_anr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -108,7 +108,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() leave:\n");
                }
-
        }
 }
 
@@ -116,16 +115,16 @@ size);
 
 static void
 ia_css_process_anr2(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -139,7 +138,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() leave:\n");
                }
-
        }
 }
 
@@ -147,16 +145,16 @@ size);
 
 static void
 ia_css_process_bh(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -170,10 +168,9 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
-
        }
        {
-               unsigned 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");
@@ -183,7 +180,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
-
        }
 }
 
@@ -191,16 +187,16 @@ size);
 
 static void
 ia_css_process_cnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -214,7 +210,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() leave:\n");
                }
-
        }
 }
 
@@ -222,16 +217,16 @@ size);
 
 static void
 ia_css_process_crop(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -245,7 +240,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() leave:\n");
                }
-
        }
 }
 
@@ -253,16 +247,16 @@ size);
 
 static void
 ia_css_process_csc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -276,7 +270,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() leave:\n");
                }
-
        }
 }
 
@@ -284,16 +277,16 @@ size);
 
 static void
 ia_css_process_dp(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -307,7 +300,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() leave:\n");
                }
-
        }
 }
 
@@ -315,16 +307,16 @@ size);
 
 static void
 ia_css_process_bnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -338,7 +330,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() leave:\n");
                }
-
        }
 }
 
@@ -346,16 +337,16 @@ size);
 
 static void
 ia_css_process_de(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -369,7 +360,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() leave:\n");
                }
-
        }
 }
 
@@ -377,16 +367,16 @@ size);
 
 static void
 ia_css_process_ecd(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -400,7 +390,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() leave:\n");
                }
-
        }
 }
 
@@ -408,16 +397,16 @@ size);
 
 static void
 ia_css_process_formats(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -431,7 +420,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() leave:\n");
                }
-
        }
 }
 
@@ -439,16 +427,16 @@ size);
 
 static void
 ia_css_process_fpn(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -462,7 +450,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() leave:\n");
                }
-
        }
 }
 
@@ -470,16 +457,16 @@ size);
 
 static void
 ia_css_process_gc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -493,12 +480,11 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
-
        }
        {
-               unsigned 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 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");
@@ -512,7 +498,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
-
        }
 }
 
@@ -520,16 +505,16 @@ size);
 
 static void
 ia_css_process_ce(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -543,7 +528,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() leave:\n");
                }
-
        }
 }
 
@@ -551,16 +535,16 @@ size);
 
 static void
 ia_css_process_yuv2rgb(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -574,7 +558,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() leave:\n");
                }
-
        }
 }
 
@@ -582,16 +565,16 @@ size);
 
 static void
 ia_css_process_rgb2yuv(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -605,7 +588,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() leave:\n");
                }
-
        }
 }
 
@@ -613,16 +595,16 @@ size);
 
 static void
 ia_css_process_r_gamma(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -636,7 +618,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() leave:\n");
                }
-
        }
 }
 
@@ -644,16 +625,16 @@ size);
 
 static void
 ia_css_process_g_gamma(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -667,7 +648,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() leave:\n");
                }
-
        }
 }
 
@@ -675,16 +655,16 @@ size);
 
 static void
 ia_css_process_b_gamma(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -698,7 +678,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() leave:\n");
                }
-
        }
 }
 
@@ -706,19 +685,20 @@ size);
 
 static void
 ia_css_process_uds(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
 
                        p = (struct sh_css_sp_uds_params *)
@@ -731,7 +711,6 @@ ia_css_process_uds(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() leave:\n");
                }
-
        }
 }
 
@@ -739,16 +718,16 @@ ia_css_process_uds(
 
 static void
 ia_css_process_raa(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -762,7 +741,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() leave:\n");
                }
-
        }
 }
 
@@ -770,16 +748,16 @@ size);
 
 static void
 ia_css_process_s3a(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -793,7 +771,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() leave:\n");
                }
-
        }
 }
 
@@ -801,16 +778,16 @@ size);
 
 static void
 ia_css_process_ob(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -824,12 +801,11 @@ ia_css_process_ob(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
-
        }
        {
-               unsigned 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 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");
@@ -843,7 +819,6 @@ ia_css_process_ob(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
-
        }
 }
 
@@ -851,16 +826,16 @@ ia_css_process_ob(
 
 static void
 ia_css_process_output(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -874,7 +849,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() leave:\n");
                }
-
        }
 }
 
@@ -882,16 +856,16 @@ size);
 
 static void
 ia_css_process_sc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -905,7 +879,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() leave:\n");
                }
-
        }
 }
 
@@ -913,19 +886,20 @@ size);
 
 static void
 ia_css_process_bds(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
 
                        p = (struct sh_css_isp_bds_params *)
@@ -937,7 +911,6 @@ ia_css_process_bds(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() leave:\n");
                }
-
        }
 }
 
@@ -945,16 +918,16 @@ ia_css_process_bds(
 
 static void
 ia_css_process_tnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -968,7 +941,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() leave:\n");
                }
-
        }
 }
 
@@ -976,16 +948,16 @@ size);
 
 static void
 ia_css_process_macc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -999,7 +971,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() leave:\n");
                }
-
        }
 }
 
@@ -1007,16 +978,16 @@ size);
 
 static void
 ia_css_process_sdis_horicoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1030,7 +1001,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() leave:\n");
                }
-
        }
 }
 
@@ -1038,16 +1008,16 @@ size);
 
 static void
 ia_css_process_sdis_vertcoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1061,7 +1031,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() leave:\n");
                }
-
        }
 }
 
@@ -1069,16 +1038,16 @@ size);
 
 static void
 ia_css_process_sdis_horiproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1092,7 +1061,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() leave:\n");
                }
-
        }
 }
 
@@ -1100,16 +1068,16 @@ size);
 
 static void
 ia_css_process_sdis_vertproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1123,7 +1091,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() leave:\n");
                }
-
        }
 }
 
@@ -1131,16 +1098,16 @@ size);
 
 static void
 ia_css_process_sdis2_horicoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1154,7 +1121,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() leave:\n");
                }
-
        }
 }
 
@@ -1162,16 +1128,16 @@ size);
 
 static void
 ia_css_process_sdis2_vertcoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1185,7 +1151,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() leave:\n");
                }
-
        }
 }
 
@@ -1193,16 +1158,16 @@ size);
 
 static void
 ia_css_process_sdis2_horiproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1216,7 +1181,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() leave:\n");
                }
-
        }
 }
 
@@ -1224,16 +1188,16 @@ size);
 
 static void
 ia_css_process_sdis2_vertproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1247,7 +1211,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() leave:\n");
                }
-
        }
 }
 
@@ -1255,16 +1218,16 @@ size);
 
 static void
 ia_css_process_wb(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1278,7 +1241,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() leave:\n");
                }
-
        }
 }
 
@@ -1286,16 +1248,16 @@ size);
 
 static void
 ia_css_process_nr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1309,7 +1271,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() leave:\n");
                }
-
        }
 }
 
@@ -1317,16 +1278,16 @@ size);
 
 static void
 ia_css_process_yee(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1340,7 +1301,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() leave:\n");
                }
-
        }
 }
 
@@ -1348,16 +1308,16 @@ size);
 
 static void
 ia_css_process_ynr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1371,7 +1331,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() leave:\n");
                }
-
        }
 }
 
@@ -1379,16 +1338,16 @@ size);
 
 static void
 ia_css_process_fc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1402,7 +1361,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() leave:\n");
                }
-
        }
 }
 
@@ -1410,16 +1368,16 @@ size);
 
 static void
 ia_css_process_ctc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1433,12 +1391,11 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
                }
-
        }
        {
-               unsigned 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 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");
@@ -1452,7 +1409,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
                }
-
        }
 }
 
@@ -1460,16 +1416,16 @@ size);
 
 static void
 ia_css_process_xnr_table(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1483,7 +1439,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() leave:\n");
                }
-
        }
 }
 
@@ -1491,16 +1446,16 @@ size);
 
 static void
 ia_css_process_xnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1514,7 +1469,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() leave:\n");
                }
-
        }
 }
 
@@ -1522,16 +1476,16 @@ size);
 
 static void
 ia_css_process_xnr3(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1545,13 +1499,12 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
                }
-
        }
 #ifdef ISP2401
        {
-               unsigned 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 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");
@@ -1565,15 +1518,14 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
                }
-
        }
 #endif
 }
 
 /* Code generated by genparam/gencode.c:gen_param_process_table() */
 
-void (* ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
-                       unsigned pipe_id,
+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) = {
        ia_css_process_aa,
@@ -1629,12 +1581,12 @@ 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){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: config=%p\n",
+               config);
 
        *config = params->dp_config;
 
@@ -1648,10 +1600,10 @@ void
 ia_css_set_dp_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dp_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_dp_config() enter:\n");
        ia_css_dp_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dp_config = *config;
@@ -1660,8 +1612,7 @@ 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() */
@@ -1669,12 +1620,12 @@ ia_css_set_dp_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_wb_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: config=%p\n",
+               config);
 
        *config = params->wb_config;
 
@@ -1688,10 +1639,10 @@ void
 ia_css_set_wb_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_wb_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_wb_config() enter:\n");
        ia_css_wb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->wb_config = *config;
@@ -1700,8 +1651,7 @@ 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() */
@@ -1709,12 +1659,12 @@ ia_css_set_wb_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_tnr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: config=%p\n",
+               config);
 
        *config = params->tnr_config;
 
@@ -1728,10 +1678,10 @@ void
 ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_tnr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_tnr_config() enter:\n");
        ia_css_tnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->tnr_config = *config;
@@ -1740,8 +1690,7 @@ 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() */
@@ -1749,12 +1698,12 @@ ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ob_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: config=%p\n",
+               config);
 
        *config = params->ob_config;
 
@@ -1768,10 +1717,10 @@ void
 ia_css_set_ob_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ob_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ob_config() enter:\n");
        ia_css_ob_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ob_config = *config;
@@ -1780,8 +1729,7 @@ 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() */
@@ -1789,12 +1737,12 @@ ia_css_set_ob_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_de_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_de_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: config=%p\n",
+               config);
 
        *config = params->de_config;
 
@@ -1808,10 +1756,10 @@ void
 ia_css_set_de_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_de_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_de_config() enter:\n");
        ia_css_de_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->de_config = *config;
@@ -1820,8 +1768,7 @@ 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() */
@@ -1829,12 +1776,12 @@ ia_css_set_de_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_anr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: config=%p\n",
+               config);
 
        *config = params->anr_config;
 
@@ -1848,10 +1795,10 @@ void
 ia_css_set_anr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_anr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_anr_config() enter:\n");
        ia_css_anr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->anr_config = *config;
@@ -1860,8 +1807,7 @@ 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() */
@@ -1869,12 +1815,12 @@ ia_css_set_anr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_anr_thres *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: config=%p\n",
+               config);
 
        *config = params->anr_thres;
 
@@ -1888,10 +1834,10 @@ void
 ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_anr_thres *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_anr2_config() enter:\n");
        ia_css_anr2_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->anr_thres = *config;
@@ -1900,8 +1846,7 @@ 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() */
@@ -1909,12 +1854,12 @@ ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ce_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: config=%p\n",
+               config);
 
        *config = params->ce_config;
 
@@ -1928,10 +1873,10 @@ void
 ia_css_set_ce_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ce_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ce_config() enter:\n");
        ia_css_ce_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ce_config = *config;
@@ -1940,8 +1885,7 @@ 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() */
@@ -1949,12 +1893,12 @@ ia_css_set_ce_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ecd_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: config=%p\n",
+               config);
 
        *config = params->ecd_config;
 
@@ -1968,10 +1912,10 @@ void
 ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ecd_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ecd_config() enter:\n");
        ia_css_ecd_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ecd_config = *config;
@@ -1980,8 +1924,7 @@ 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() */
@@ -1989,12 +1932,12 @@ ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ynr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: config=%p\n",
+               config);
 
        *config = params->ynr_config;
 
@@ -2008,10 +1951,10 @@ void
 ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ynr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ynr_config() enter:\n");
        ia_css_ynr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ynr_config = *config;
@@ -2020,8 +1963,7 @@ 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() */
@@ -2029,12 +1971,12 @@ ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_fc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: config=%p\n",
+               config);
 
        *config = params->fc_config;
 
@@ -2048,10 +1990,10 @@ void
 ia_css_set_fc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_fc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_fc_config() enter:\n");
        ia_css_fc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->fc_config = *config;
@@ -2060,8 +2002,7 @@ 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() */
@@ -2069,12 +2010,12 @@ ia_css_set_fc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cnr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: config=%p\n",
+               config);
 
        *config = params->cnr_config;
 
@@ -2088,10 +2029,10 @@ void
 ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cnr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_cnr_config() enter:\n");
        ia_css_cnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->cnr_config = *config;
@@ -2100,8 +2041,7 @@ 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() */
@@ -2109,12 +2049,12 @@ ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_macc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: config=%p\n",
+               config);
 
        *config = params->macc_config;
 
@@ -2128,10 +2068,10 @@ void
 ia_css_set_macc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_macc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_macc_config() enter:\n");
        ia_css_macc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->macc_config = *config;
@@ -2140,8 +2080,7 @@ 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() */
@@ -2149,12 +2088,12 @@ ia_css_set_macc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ctc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: config=%p\n",
+               config);
 
        *config = params->ctc_config;
 
@@ -2168,10 +2107,10 @@ void
 ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ctc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ctc_config() enter:\n");
        ia_css_ctc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ctc_config = *config;
@@ -2180,8 +2119,7 @@ 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() */
@@ -2189,12 +2127,12 @@ ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_aa_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: config=%p\n",
+               config);
 
        *config = params->aa_config;
 
@@ -2207,10 +2145,10 @@ void
 ia_css_set_aa_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_aa_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_aa_config() enter:\n");
        params->aa_config = *config;
        params->config_changed[IA_CSS_AA_ID] = true;
@@ -2218,8 +2156,7 @@ 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() */
@@ -2227,12 +2164,12 @@ ia_css_set_aa_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: config=%p\n",
+               config);
 
        *config = params->yuv2rgb_cc_config;
 
@@ -2246,10 +2183,10 @@ void
 ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_yuv2rgb_config() enter:\n");
        ia_css_yuv2rgb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->yuv2rgb_cc_config = *config;
@@ -2258,8 +2195,7 @@ 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() */
@@ -2267,12 +2203,12 @@ ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: config=%p\n",
+               config);
 
        *config = params->rgb2yuv_cc_config;
 
@@ -2286,10 +2222,10 @@ void
 ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_rgb2yuv_config() enter:\n");
        ia_css_rgb2yuv_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->rgb2yuv_cc_config = *config;
@@ -2298,8 +2234,7 @@ 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() */
@@ -2307,12 +2242,12 @@ ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: config=%p\n",
+               config);
 
        *config = params->cc_config;
 
@@ -2326,10 +2261,10 @@ void
 ia_css_set_csc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_csc_config() enter:\n");
        ia_css_csc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->cc_config = *config;
@@ -2338,8 +2273,7 @@ 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() */
@@ -2347,12 +2281,12 @@ ia_css_set_csc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_nr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: config=%p\n",
+               config);
 
        *config = params->nr_config;
 
@@ -2366,10 +2300,10 @@ void
 ia_css_set_nr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_nr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_nr_config() enter:\n");
        ia_css_nr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->nr_config = *config;
@@ -2379,8 +2313,7 @@ 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() */
@@ -2388,12 +2321,12 @@ ia_css_set_nr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_gc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: config=%p\n",
+               config);
 
        *config = params->gc_config;
 
@@ -2407,10 +2340,10 @@ void
 ia_css_set_gc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_gc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_gc_config() enter:\n");
        ia_css_gc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->gc_config = *config;
@@ -2419,8 +2352,7 @@ 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() */
@@ -2428,12 +2360,12 @@ ia_css_set_gc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2447,10 +2379,10 @@ void
 ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2462,8 +2394,7 @@ 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() */
@@ -2471,12 +2402,12 @@ ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2490,10 +2421,10 @@ void
 ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2505,8 +2436,7 @@ 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() */
@@ -2514,12 +2444,12 @@ ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2533,10 +2463,10 @@ void
 ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2548,8 +2478,7 @@ 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() */
@@ -2557,12 +2486,12 @@ ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2576,10 +2505,10 @@ void
 ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2591,8 +2520,7 @@ 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() */
@@ -2600,12 +2528,12 @@ ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2619,10 +2547,10 @@ void
 ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2634,8 +2562,7 @@ 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() */
@@ -2643,12 +2570,12 @@ ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2662,10 +2589,10 @@ void
 ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2677,8 +2604,7 @@ 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() */
@@ -2686,12 +2612,12 @@ ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2705,10 +2631,10 @@ void
 ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2720,8 +2646,7 @@ 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() */
@@ -2729,12 +2654,12 @@ ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2748,10 +2673,10 @@ void
 ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2763,8 +2688,7 @@ 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() */
@@ -2772,12 +2696,12 @@ ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_rgb_gamma_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       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;
 
@@ -2791,10 +2715,10 @@ void
 ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_rgb_gamma_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_r_gamma_config() enter:\n");
        ia_css_r_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->r_gamma_table = *config;
@@ -2803,8 +2727,7 @@ 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() */
@@ -2812,12 +2735,12 @@ ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_rgb_gamma_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       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;
 
@@ -2831,10 +2754,10 @@ void
 ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_rgb_gamma_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_g_gamma_config() enter:\n");
        ia_css_g_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->g_gamma_table = *config;
@@ -2843,8 +2766,7 @@ 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() */
@@ -2852,12 +2774,12 @@ ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_rgb_gamma_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       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;
 
@@ -2871,10 +2793,10 @@ void
 ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_rgb_gamma_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_b_gamma_config() enter:\n");
        ia_css_b_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->b_gamma_table = *config;
@@ -2883,8 +2805,7 @@ 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() */
@@ -2892,12 +2813,12 @@ ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_xnr_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: config=%p\n",
+               config);
 
        *config = params->xnr_table;
 
@@ -2911,10 +2832,10 @@ void
 ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_xnr_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2923,8 +2844,7 @@ 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() */
@@ -2932,12 +2852,12 @@ ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_formats_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: config=%p\n",
+               config);
 
        *config = params->formats_config;
 
@@ -2951,10 +2871,10 @@ void
 ia_css_set_formats_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_formats_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_formats_config() enter:\n");
        ia_css_formats_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->formats_config = *config;
@@ -2963,8 +2883,7 @@ 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() */
@@ -2972,12 +2891,12 @@ ia_css_set_formats_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_xnr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: config=%p\n",
+               config);
 
        *config = params->xnr_config;
 
@@ -2991,10 +2910,10 @@ void
 ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_xnr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr_config() enter:\n");
        ia_css_xnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->xnr_config = *config;
@@ -3003,8 +2922,7 @@ 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() */
@@ -3012,12 +2930,12 @@ ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_xnr3_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: config=%p\n",
+               config);
 
        *config = params->xnr3_config;
 
@@ -3031,10 +2949,10 @@ void
 ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_xnr3_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr3_config() enter:\n");
        ia_css_xnr3_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->xnr3_config = *config;
@@ -3043,8 +2961,7 @@ 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() */
@@ -3052,12 +2969,12 @@ ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_3a_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: config=%p\n",
+               config);
 
        *config = params->s3a_config;
 
@@ -3071,10 +2988,10 @@ void
 ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_3a_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_s3a_config() enter:\n");
        ia_css_s3a_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->s3a_config = *config;
@@ -3084,8 +3001,7 @@ 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() */
@@ -3093,12 +3009,12 @@ ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_output_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_output_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: config=%p\n",
+               config);
 
        *config = params->output_config;
 
@@ -3112,10 +3028,10 @@ void
 ia_css_set_output_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_output_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_output_config() enter:\n");
        ia_css_output_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->output_config = *config;
@@ -3124,8 +3040,7 @@ 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() */
@@ -3217,4 +3132,3 @@ ia_css_set_configs(struct ia_css_isp_parameters *params,
        ia_css_set_s3a_config(params, config->s3a_config);
        ia_css_set_output_config(params, config->output_config);
 }
-
index 5b3deb7f74aecf1de25749111f2cc7c81d6cd3e2..b5175c253c61d02ed224fe86a9743d1da5e87e4e 100644 (file)
@@ -149,8 +149,8 @@ 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 pipe_id,
+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);
 
index e87d05bc73ae893a7ecc269c824c904190015623..dcc42c1ce94ef2f19b9026dc14017c21ebd8319c 100644 (file)
@@ -28,12 +28,11 @@ ia_css_initialize_aa_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.aa.size;
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
+               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);
-
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
 }
@@ -47,16 +46,15 @@ ia_css_initialize_cnr_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.cnr.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.cnr.offset;
 
                if (size) {
                        ia_css_init_cnr_state(
                                &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");
 }
@@ -70,16 +68,15 @@ ia_css_initialize_cnr2_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.cnr2.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.cnr2.offset;
 
                if (size) {
                        ia_css_init_cnr2_state(
                                &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");
 }
@@ -93,16 +90,15 @@ ia_css_initialize_dp_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.dp.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.dp.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.dp.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.dp.offset;
 
                if (size) {
                        ia_css_init_dp_state(
                                &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");
 }
@@ -116,16 +112,15 @@ ia_css_initialize_de_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.de.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.de.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.de.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.de.offset;
 
                if (size) {
                        ia_css_init_de_state(
                                &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");
 }
@@ -139,16 +134,15 @@ ia_css_initialize_tnr_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->dmem.tnr.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->dmem.tnr.offset;
 
                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);
                }
-
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() leave:\n");
 }
@@ -162,16 +156,15 @@ ia_css_initialize_ref_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->dmem.ref.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.ref.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->dmem.ref.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->dmem.ref.offset;
 
                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);
                }
-
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() leave:\n");
 }
@@ -185,16 +178,15 @@ ia_css_initialize_ynr_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.ynr.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.ynr.offset;
 
                if (size) {
                        ia_css_init_ynr_state(
                                &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");
 }
@@ -211,4 +203,3 @@ void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_bina
        ia_css_initialize_ref_state,
        ia_css_initialize_ynr_state,
 };
-
index 505e2b600beb9539a23fa4cfd879b935169851ce..50080565d0d6d479c8fdbcba5ed697357ed0bc2f 100644 (file)
  * more details.
  */
 
-
 #include "system_global.h"
 
-const uint32_t N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
+const u32 N_SHORT_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
        4,      /* 4 entries at CSI_RX_BACKEND0_ID*/
        4,      /* 4 entries at CSI_RX_BACKEND1_ID*/
        4       /* 4 entries at CSI_RX_BACKEND2_ID*/
 };
 
-const uint32_t N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
+const u32 N_LONG_PACKET_LUT_ENTRIES[N_CSI_RX_BACKEND_ID] = {
        8,      /* 8 entries at CSI_RX_BACKEND0_ID*/
        4,      /* 4 entries at CSI_RX_BACKEND1_ID*/
        4       /* 4 entries at CSI_RX_BACKEND2_ID*/
 };
 
-const uint32_t N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID] = {
+const u32 N_CSI_RX_FE_CTRL_DLANES[N_CSI_RX_FRONTEND_ID] = {
        N_CSI_RX_DLANE_ID,      /* 4 dlanes for CSI_RX_FR0NTEND0_ID */
        N_CSI_RX_DLANE_ID,      /* 4 dlanes for CSI_RX_FR0NTEND1_ID */
        N_CSI_RX_DLANE_ID       /* 4 dlanes for CSI_RX_FR0NTEND2_ID */
 };
 
 /* sid_width for CSI_RX_BACKEND<N>_ID */
-const uint32_t N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID] = {
+const u32 N_CSI_RX_BE_SID_WIDTH[N_CSI_RX_BACKEND_ID] = {
        3,
        2,
        2
index a2e9d54a4a37638e736fd0137fc75e0116c7f134..a86de89b2cfc4e0e3e223f7d931fe6841b726ffd 100644 (file)
@@ -16,7 +16,7 @@
 #define __CSI_RX_LOCAL_H_INCLUDED__
 
 #include "csi_rx_global.h"
-#define N_CSI_RX_BE_MIPI_COMP_FMT_REG          4
+#define N_CSI_RX_BE_MIPI_COMP_FMT_REG          4
 #define N_CSI_RX_BE_MIPI_CUSTOM_PEC            12
 #define N_CSI_RX_BE_SHORT_PKT_LUT              4
 #define N_CSI_RX_BE_LONG_PKT_LUT               8
@@ -26,36 +26,37 @@ typedef struct csi_rx_be_ctrl_state_s               csi_rx_be_ctrl_state_t;
 /*mipi_backend_custom_mode_pixel_extraction_config*/
 typedef struct csi_rx_be_ctrl_pec_s            csi_rx_be_ctrl_pec_t;
 
-
 struct csi_rx_fe_ctrl_lane_s {
        hrt_data        termen;
        hrt_data        settle;
 };
+
 struct csi_rx_fe_ctrl_state_s {
-       hrt_data                enable;
-       hrt_data                nof_enable_lanes;
-       hrt_data                error_handling;
-       hrt_data                status;
-       hrt_data                status_dlane_hs;
-       hrt_data                status_dlane_lp;
-       csi_rx_fe_ctrl_lane_t   clane;
-       csi_rx_fe_ctrl_lane_t   dlane[N_CSI_RX_DLANE_ID];
+       hrt_data                enable;
+       hrt_data                nof_enable_lanes;
+       hrt_data                error_handling;
+       hrt_data                status;
+       hrt_data                status_dlane_hs;
+       hrt_data                status_dlane_lp;
+       csi_rx_fe_ctrl_lane_t   clane;
+       csi_rx_fe_ctrl_lane_t   dlane[N_CSI_RX_DLANE_ID];
 };
+
 struct csi_rx_be_ctrl_state_s {
-       hrt_data                enable;
-       hrt_data                status;
-       hrt_data                comp_format_reg[N_CSI_RX_BE_MIPI_COMP_FMT_REG];
-       hrt_data                raw16;
-       hrt_data                raw18;
-       hrt_data                force_raw8;
-       hrt_data                irq_status;
-       hrt_data                custom_mode_enable;
-       hrt_data                custom_mode_data_state;
-       hrt_data                pec[N_CSI_RX_BE_MIPI_CUSTOM_PEC];
-       hrt_data                custom_mode_valid_eop_config;
-       hrt_data                global_lut_disregard_reg;
-       hrt_data                packet_status_stall;
-       hrt_data                short_packet_lut_entry[N_CSI_RX_BE_SHORT_PKT_LUT];
-       hrt_data                long_packet_lut_entry[N_CSI_RX_BE_LONG_PKT_LUT];
+       hrt_data                enable;
+       hrt_data                status;
+       hrt_data                comp_format_reg[N_CSI_RX_BE_MIPI_COMP_FMT_REG];
+       hrt_data                raw16;
+       hrt_data                raw18;
+       hrt_data                force_raw8;
+       hrt_data                irq_status;
+       hrt_data                custom_mode_enable;
+       hrt_data                custom_mode_data_state;
+       hrt_data                pec[N_CSI_RX_BE_MIPI_CUSTOM_PEC];
+       hrt_data                custom_mode_valid_eop_config;
+       hrt_data                global_lut_disregard_reg;
+       hrt_data                packet_status_stall;
+       hrt_data                short_packet_lut_entry[N_CSI_RX_BE_SHORT_PKT_LUT];
+       hrt_data                long_packet_lut_entry[N_CSI_RX_BE_LONG_PKT_LUT];
 };
 #endif /* __CSI_RX_LOCAL_H_INCLUDED__ */
index 4fa74e7a96e622c498b7f7433270acb16144f63e..c8bcef24d7c28b2e9a0680ab021ee4bd1ea112f3 100644 (file)
@@ -24,7 +24,6 @@
 #include "assert_support.h" /* assert */
 #include "print_support.h" /* print */
 
-
 /*****************************************************
  *
  * Native command interface (NCI).
@@ -38,7 +37,7 @@ static inline void csi_rx_fe_ctrl_get_state(
                const csi_rx_frontend_ID_t ID,
                csi_rx_fe_ctrl_state_t *state)
 {
-       uint32_t i;
+       u32 i;
 
        state->enable =
                csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_ENABLE_REG_IDX);
@@ -65,7 +64,7 @@ static inline void csi_rx_fe_ctrl_get_state(
                csi_rx_fe_ctrl_get_dlane_state(
                                ID,
                                i,
-                               &(state->dlane[i]));
+                               &state->dlane[i]);
        }
 }
 
@@ -75,16 +74,15 @@ static inline void csi_rx_fe_ctrl_get_state(
  */
 static inline void csi_rx_fe_ctrl_get_dlane_state(
                const csi_rx_frontend_ID_t ID,
-               const uint32_t lane,
+               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));
        dlane_state->settle =
                csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_SETTLE_DLANE_REG_IDX(lane));
-
 }
+
 /**
  * @brief dump the csi rx fe state.
  * Refer to "csi_rx_public.h" for details.
@@ -93,24 +91,24 @@ static inline void csi_rx_fe_ctrl_dump_state(
                const csi_rx_frontend_ID_t ID,
                csi_rx_fe_ctrl_state_t *state)
 {
-       uint32_t i;
+       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 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 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);
 
        /*
         * 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);
        }
 }
 
@@ -122,7 +120,7 @@ static inline void csi_rx_be_ctrl_get_state(
                const csi_rx_backend_ID_t ID,
                csi_rx_be_ctrl_state_t *state)
 {
-       uint32_t i;
+       u32 i;
 
        state->enable =
                csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_ENABLE_REG_IDX);
@@ -130,10 +128,10 @@ static inline void csi_rx_be_ctrl_get_state(
        state->status =
                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++) {
+       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 =
@@ -152,8 +150,8 @@ static inline void csi_rx_be_ctrl_get_state(
 
        state->custom_mode_data_state =
                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] = 
+       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);
        }
        state->custom_mode_valid_eop_config =
@@ -185,36 +183,37 @@ static inline void csi_rx_be_ctrl_dump_state(
                const csi_rx_backend_ID_t ID,
                csi_rx_be_ctrl_state_t *state)
 {
-       uint32_t i;
+       u32 i;
 
-       ia_css_print("CSI RX BE STATE Controller %d Enable 0x%x \n", ID, state->enable);
-       ia_css_print("CSI RX BE STATE Controller %d Status 0x%x \n", ID, state->status);
+       ia_css_print("CSI RX BE STATE Controller %d Enable 0x%x\n", ID, state->enable);
+       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);
+       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 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 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);
 #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]);
+       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]);
        }
 #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]);
        }
 }
+
 /* end of NCI */
 /*****************************************************
  *
@@ -231,10 +230,9 @@ static inline hrt_data csi_rx_fe_ctrl_reg_load(
 {
        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));
 }
 
-
 /**
  * @brief Store a value to the register.
  * Refer to "ibuf_ctrl_public.h" for details.
@@ -247,8 +245,9 @@ static inline void csi_rx_fe_ctrl_reg_store(
        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);
 }
+
 /**
  * @brief Load the register value.
  * Refer to "csi_rx_public.h" for details.
@@ -259,10 +258,9 @@ static inline hrt_data csi_rx_be_ctrl_reg_load(
 {
        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));
 }
 
-
 /**
  * @brief Store a value to the register.
  * Refer to "ibuf_ctrl_public.h" for details.
@@ -275,8 +273,9 @@ static inline void csi_rx_be_ctrl_reg_store(
        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 */
 
 #endif /* __CSI_RX_PRIVATE_H_INCLUDED__ */
index 14973d1c27560a70539b28ad52fd0d3c4e825652..8b06b2410d1d236be4ed1d9fec7341522bcb63fa 100644 (file)
@@ -15,7 +15,7 @@
 #include <type_support.h>
 #include "system_global.h"
 
-const uint32_t N_IBUF_CTRL_PROCS[N_IBUF_CTRL_ID] = {
+const u32 N_IBUF_CTRL_PROCS[N_IBUF_CTRL_ID] = {
        8,      /* IBUF_CTRL0_ID supports at most 8 processes */
        4,      /* IBUF_CTRL1_ID supports at most 4 processes */
        4       /* IBUF_CTRL2_ID supports at most 4 processes */
index 4d07c2fe14696d344d7dc60091bb810531e83c92..5fda64313935db0c54fce41fffeb3a001ee5b8e0 100644 (file)
@@ -22,7 +22,6 @@
 #include "assert_support.h" /* assert */
 #include "print_support.h" /* print */
 
-
 /*****************************************************
  *
  * Native command interface (NCI).
@@ -36,7 +35,7 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_state(
                const ibuf_ctrl_ID_t ID,
                ibuf_ctrl_state_t *state)
 {
-       uint32_t i;
+       u32 i;
 
        state->recalc_words =
                ibuf_ctrl_reg_load(ID, _IBUF_CNTRL_RECALC_WORDS_STATUS);
@@ -51,7 +50,7 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_state(
                ibuf_ctrl_get_proc_state(
                                ID,
                                i,
-                               &(state->proc_state[i]));
+                               &state->proc_state[i]);
        }
 }
 
@@ -61,7 +60,7 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_state(
  */
 STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_proc_state(
                const ibuf_ctrl_ID_t ID,
-               const uint32_t proc_id,
+               const u32 proc_id,
                ibuf_ctrl_proc_state_t  *state)
 {
        hrt_address reg_bank_offset;
@@ -147,6 +146,7 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_proc_state(
        state->isp_sync_state =
                ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ISP_SYNC_STATE);
 }
+
 /**
  * @brief Dump the ibuf-controller state.
  * Refer to "ibuf_ctrl_public.h" for details.
@@ -155,7 +155,8 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_dump_state(
                const ibuf_ctrl_ID_t ID,
                ibuf_ctrl_state_t *state)
 {
-       uint32_t i;
+       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 arbiters 0x%x\n", ID, state->arbiters);
 
@@ -192,6 +193,7 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_dump_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);
        }
 }
+
 /* end of NCI */
 
 /*****************************************************
@@ -209,10 +211,9 @@ STORAGE_CLASS_IBUF_CTRL_C hrt_data ibuf_ctrl_reg_load(
 {
        assert(ID < N_IBUF_CTRL_ID);
        assert(IBUF_CTRL_BASE[ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(IBUF_CTRL_BASE[ID] + reg*sizeof(hrt_data));
+       return ia_css_device_load_uint32(IBUF_CTRL_BASE[ID] + reg * sizeof(hrt_data));
 }
 
-
 /**
  * @brief Store a value to the register.
  * Refer to "ibuf_ctrl_public.h" for details.
@@ -225,9 +226,9 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_reg_store(
        assert(ID < N_IBUF_CTRL_ID);
        assert(IBUF_CTRL_BASE[ID] != (hrt_address)-1);
 
-       ia_css_device_store_uint32(IBUF_CTRL_BASE[ID] + reg*sizeof(hrt_data), value);
+       ia_css_device_store_uint32(IBUF_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
 }
-/* end of DLI */
 
+/* end of DLI */
 
 #endif /* __IBUF_CTRL_PRIVATE_H_INCLUDED__ */
index 97505e436047fb57f3f3a78bb2ed887b3e058285..361f6fb25395ede1e34323de21023b87bacfee67 100644 (file)
@@ -21,7 +21,7 @@ STORAGE_CLASS_INPUT_SYSTEM_C input_system_err_t input_system_get_state(
        const input_system_ID_t ID,
        input_system_state_t *state)
 {
-       uint32_t i;
+       u32 i;
 
        (void)(ID);
 
@@ -29,40 +29,40 @@ STORAGE_CLASS_INPUT_SYSTEM_C input_system_err_t input_system_get_state(
        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]));
+                               &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]));
+                               &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]));
+                               &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]));
+                               &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]));
+                               &state->ibuf_ctrl_state[i]);
        }
 
        /* get the states of all isys irq controllers */
        for (i = 0; i < N_ISYS_IRQ_ID; i++) {
-               isys_irqc_state_get((isys_irq_ID_t)i, &(state->isys_irqc_state[i]));
+               isys_irqc_state_get((isys_irq_ID_t)i, &state->isys_irqc_state[i]);
        }
 
        /* TODO: get the states of all ISYS2401 DMA devices  */
@@ -71,11 +71,12 @@ STORAGE_CLASS_INPUT_SYSTEM_C input_system_err_t input_system_get_state(
 
        return INPUT_SYSTEM_ERR_NO_ERROR;
 }
+
 STORAGE_CLASS_INPUT_SYSTEM_C void input_system_dump_state(
        const input_system_ID_t ID,
        input_system_state_t *state)
 {
-       uint32_t i;
+       u32 i;
 
        (void)(ID);
 
@@ -83,40 +84,40 @@ STORAGE_CLASS_INPUT_SYSTEM_C void input_system_dump_state(
        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]));
+                               &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]));
+                               &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]));
+                               &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]));
+                               &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]));
+                               &state->ibuf_ctrl_state[i]);
        }
 
        /* dump the states of all isys irq controllers */
        for (i = 0; i < N_ISYS_IRQ_ID; i++) {
-               isys_irqc_state_dump((isys_irq_ID_t)i, &(state->isys_irqc_state[i]));
+               isys_irqc_state_dump((isys_irq_ID_t)i, &state->isys_irqc_state[i]);
        }
 
        /* TODO: dump the states of all ISYS2401 DMA devices  */
index 2cd1aeecf617b17b47415d366b1fb54fa99dce78..6cb9dd69e96f9a55de3b5b9c1629396cb29e1477 100644 (file)
@@ -22,7 +22,6 @@
 #include "dma_v2_defs.h"
 #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,
@@ -31,7 +30,7 @@ STORAGE_CLASS_ISYS2401_DMA_C void isys2401_dma_reg_store(
        unsigned int reg_loc;
 
        assert(dma_id < N_ISYS2401_DMA_ID);
-       assert(ISYS2401_DMA_BASE[dma_id] != (hrt_address)-1);
+       assert(ISYS2401_DMA_BASE[dma_id] != (hrt_address) - 1);
 
        reg_loc = ISYS2401_DMA_BASE[dma_id] + (reg * sizeof(hrt_data));
 
@@ -47,7 +46,7 @@ STORAGE_CLASS_ISYS2401_DMA_C hrt_data isys2401_dma_reg_load(
        hrt_data value;
 
        assert(dma_id < N_ISYS2401_DMA_ID);
-       assert(ISYS2401_DMA_BASE[dma_id] != (hrt_address)-1);
+       assert(ISYS2401_DMA_BASE[dma_id] != (hrt_address) - 1);
 
        reg_loc = ISYS2401_DMA_BASE[dma_id] + (reg * sizeof(hrt_data));
 
index e69f39893bd2eab56fc61c9ffb5d7a7be311c714..c2f34e45d84be376e819af2d8522e0cb83e65240 100644 (file)
@@ -52,9 +52,7 @@ STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_state_dump(
        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 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);
 }
index 801523977e1d4b10eb0643f7bdc0256c32c43c7d..1449c19abc8628f8099dfb69c95de71c5dccf2ba 100644 (file)
@@ -31,6 +31,6 @@ struct stream2mmio_sid_state_s {
 };
 
 struct stream2mmio_state_s {
-       stream2mmio_sid_state_t         sid_state[N_STREAM2MMIO_SID_ID];
+       stream2mmio_sid_state_t sid_state[N_STREAM2MMIO_SID_ID];
 };
 #endif /* __ISYS_STREAM2MMIO_LOCAL_H_INCLUDED__ */
index f946105ddf43acbeb4e97c09a5d1e898369ad9a3..71743a8b940e6e170f96bba4afd016cda4d6c205 100644 (file)
@@ -50,7 +50,7 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_get_state(
         * stream2mmio-controller sids.
         */
        for (i = STREAM2MMIO_SID0_ID; i < N_STREAM2MMIO_SID_PROCS[ID]; i++) {
-               stream2mmio_get_sid_state(ID, i, &(state->sid_state[i]));
+               stream2mmio_get_sid_state(ID, i, &state->sid_state[i]);
        }
 }
 
@@ -63,7 +63,6 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_get_sid_state(
                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);
 
@@ -84,7 +83,6 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_get_sid_state(
 
        state->block_when_no_cmd =
                stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_BLOCK_WHEN_NO_CMD_REG_ID);
-
 }
 
 /**
@@ -101,8 +99,8 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_print_sid_state(
        ia_css_print("\t \t Strides 0x%x\n", state->strides);
        ia_css_print("\t \t Num Items 0x%x\n", state->num_items);
        ia_css_print("\t \t block when no cmd 0x%x\n", state->block_when_no_cmd);
-
 }
+
 /**
  * @brief Dump the ibuf-controller state.
  * Refer to "stream2mmio_public.h" for details.
@@ -119,9 +117,10 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_dump_state(
         */
        for (i = STREAM2MMIO_SID0_ID; i < N_STREAM2MMIO_SID_PROCS[ID]; i++) {
                ia_css_print("StREAM2MMIO ID %d SID %d\n", ID, i);
-               stream2mmio_print_sid_state(&(state->sid_state[i]));
+               stream2mmio_print_sid_state(&state->sid_state[i]);
        }
 }
+
 /* end of NCI */
 
 /*****************************************************
@@ -138,7 +137,7 @@ STORAGE_CLASS_STREAM2MMIO_C hrt_data stream2mmio_reg_load(
                const stream2mmio_sid_ID_t sid_id,
                const uint32_t reg_idx)
 {
-       uint32_t reg_bank_offset;
+       u32 reg_bank_offset;
 
        assert(ID < N_STREAM2MMIO_ID);
 
@@ -147,7 +146,6 @@ STORAGE_CLASS_STREAM2MMIO_C hrt_data stream2mmio_reg_load(
                        (reg_bank_offset + reg_idx) * sizeof(hrt_data));
 }
 
-
 /**
  * @brief Store a value to the register.
  * Refer to "stream2mmio_public.h" for details.
@@ -163,6 +161,7 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_reg_store(
        ia_css_device_store_uint32(STREAM2MMIO_CTRL_BASE[ID] +
                reg * sizeof(hrt_data), value);
 }
+
 /* end of DLI */
 
 #endif /* __ISYS_STREAM2MMIO_PRIVATE_H_INCLUDED__ */
index c5bf540eadf1120084237819688009428155ff1e..3aa7e29d0e7d91600694c57d87e16d86db13cdc7 100644 (file)
@@ -20,7 +20,6 @@
 #include "device_access.h"     /* ia_css_device_load_uint32 */
 #include "assert_support.h" /* assert */
 
-
 /*****************************************************
  *
  * Native command interface (NCI).
@@ -34,7 +33,6 @@ STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_get_state(
                const pixelgen_ID_t ID,
                pixelgen_ctrl_state_t *state)
 {
-
        state->com_enable =
                pixelgen_ctrl_reg_load(ID, _PXG_COM_ENABLE_REG_IDX);
        state->prbs_rstval0 =
@@ -90,6 +88,7 @@ STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_get_state(
        state->tpg_b2 =
                pixelgen_ctrl_reg_load(ID, _PXG_TPG_B2_REG_IDX);
 }
+
 /**
  * @brief Dump the pixelgen state.
  * Refer to "pixelgen_public.h" for details.
@@ -98,34 +97,35 @@ STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_dump_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 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 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 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 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);
-       ia_css_print("Pixel Generator ID %d tpg r2 0x%x \n", ID, state->tpg_r2);
-       ia_css_print("Pixel Generator ID %d tpg g2 0x%x \n", ID, state->tpg_g2);
-       ia_css_print("Pixel Generator ID %d tpg b2 0x%x \n", ID, state->tpg_b2);
+       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 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 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 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 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);
+       ia_css_print("Pixel Generator ID %d tpg r2 0x%x\n", ID, state->tpg_r2);
+       ia_css_print("Pixel Generator ID %d tpg g2 0x%x\n", ID, state->tpg_g2);
+       ia_css_print("Pixel Generator ID %d tpg b2 0x%x\n", ID, state->tpg_b2);
 }
+
 /* end of NCI */
 /*****************************************************
  *
@@ -141,11 +141,10 @@ STORAGE_CLASS_PIXELGEN_C hrt_data pixelgen_ctrl_reg_load(
        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));
+       assert(PIXELGEN_CTRL_BASE[ID] != (hrt_address) - 1);
+       return ia_css_device_load_uint32(PIXELGEN_CTRL_BASE[ID] + reg * sizeof(hrt_data));
 }
 
-
 /**
  * @brief Store a value to the register.
  * Refer to "pixelgen_ctrl_public.h" for details.
@@ -158,7 +157,8 @@ STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_reg_store(
        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 */
 #endif /* __PIXELGEN_PRIVATE_H_INCLUDED__ */
index 5600b32e29f4e1c536b0cf1b8ba95f4f1d8b0d82..3d394b623731d39bdfaa7a1bbf7010c52cca1b12 100644 (file)
@@ -135,7 +135,6 @@ static const hrt_address GPIO_BASE[N_GPIO_ID] = {
 static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
        0x0000000000000100ULL};
 
-
 /* INPUT_FORMATTER */
 static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
        0x0000000000030000ULL,
@@ -180,18 +179,21 @@ static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = {
        0x00000000000C2400ULL,  /* csi fe controller B */
        0x00000000000C4400ULL   /* csi fe controller C */
 };
+
 /* CSI BE, part of the Input System 2401 */
 static const hrt_address CSI_RX_BE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = {
        0x00000000000C0800ULL,  /* csi be controller A */
        0x00000000000C2800ULL,  /* csi be controller B */
        0x00000000000C4800ULL   /* csi be controller C */
 };
+
 /* PIXEL Generator, part of the Input System 2401 */
 static const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = {
        0x00000000000C1000ULL,  /* pixel gen controller A */
        0x00000000000C3000ULL,  /* pixel gen controller B */
        0x00000000000C5000ULL   /* pixel gen controller C */
 };
+
 /* Stream2MMIO, part of the Input System 2401 */
 static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
        0x00000000000C0C00ULL,  /* stream2mmio controller A */
@@ -295,7 +297,6 @@ static const hrt_address GPIO_BASE[N_GPIO_ID] = {
 static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
        0x00000100UL};
 
-
 /* INPUT_FORMATTER */
 static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
        0x00030000UL,
@@ -340,18 +341,21 @@ static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = {
        0x000C2400UL,   /* csi fe controller B */
        0x000C4400UL    /* csi fe controller C */
 };
+
 /* CSI BE, part of the Input System 2401 */
 static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = {
        0x000C0800UL,   /* csi be controller A */
        0x000C2800UL,   /* csi be controller B */
        0x000C4800UL    /* csi be controller C */
 };
+
 /* PIXEL Generator, part of the Input System 2401 */
 static const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = {
        0x000C1000UL,   /* pixel gen controller A */
        0x000C3000UL,   /* pixel gen controller B */
        0x000C5000UL    /* pixel gen controller C */
 };
+
 /* Stream2MMIO, part of the Input System 2401 */
 static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
        0x000C0C00UL,   /* stream2mmio controller A */
index b5be610c50596c3e1ca3401adb26faa3f95cf6c0..bbc692363009d7e9df6a4f4f21b807c5da2372fc 100644 (file)
 #define _PXG_INVALID_FLAG              0xDEADBEEF
 #define _PXG_CAFE_FLAG                 0xCAFEBABE
 
-
 #endif /* _PixelGen_SysBlock_defs_h */
-
index e71e33d9d1434c91cd8317ea40d5719c02b86172..c6d2a5cba21341135539597ae187f216c3c80945 100644 (file)
@@ -95,7 +95,7 @@
 #define _hrt_get_bit(w, b) \
   (((w) >> (b)) & 1)
 #define _hrt_set_bit(w, b, v) \
-  (((w) & (~(1 << (b)))) | (((v)&1) << (b)))
+  (((w) & (~(1 << (b)))) | (((v) & 1) << (b)))
 #define _hrt_set_lower_half(w, v) \
   _hrt_set_bits(w, 0, 16, v)
 #define _hrt_set_upper_half(w, v) \
index b5756bfe8eb6b1e10c7f70659bc20e6537e8df1c..0eabc59ff5afb50123552d9b978f7257f733a23b 100644 (file)
@@ -22,9 +22,9 @@
 #define SP_ICACHE_BLOCK_ADDRESS_BITS     11 /* 2048 lines capacity*/
 
 #define SP_ICACHE_ADDRESS_BITS \
-                           (SP_ICACHE_TAG_BITS+SP_ICACHE_BLOCK_ADDRESS_BITS)
+                           (SP_ICACHE_TAG_BITS + SP_ICACHE_BLOCK_ADDRESS_BITS)
 
-#define SP_PMEM_DEPTH        (1<<SP_ICACHE_ADDRESS_BITS)
+#define SP_PMEM_DEPTH        BIT(SP_ICACHE_ADDRESS_BITS)
 
 #define SP_FIFO_0_DEPTH      0
 #define SP_FIFO_1_DEPTH      0
@@ -35,8 +35,6 @@
 #define SP_FIFO_6_DEPTH      0
 #define SP_FIFO_7_DEPTH      0
 
-
 #define SP_SLV_BUS_MAXBURSTSIZE        1
 
 #endif /* _cell_params_h */
-
index 89ff5313065fcd3e853ab60caf17112615738305..99d292164efcae86c729e6e6c50019459c88e6d8 100644 (file)
@@ -21,7 +21,7 @@
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_CH_ID_WIDTH     2
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_FMT_TYPE_WIDTH  3
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_REAL_WIDTH (_HRT_CSS_RECEIVER_2400_GEN_SHORT_DATA_WIDTH + _HRT_CSS_RECEIVER_2400_GEN_SHORT_CH_ID_WIDTH + _HRT_CSS_RECEIVER_2400_GEN_SHORT_FMT_TYPE_WIDTH)
-#define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_WIDTH      32 /* use 32 to be compatibel with streaming monitor !, MSB's of interface are tied to '0' */ 
+#define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_WIDTH      32 /* use 32 to be compatibel with streaming monitor !, MSB's of interface are tied to '0' */
 
 /* Definition of data format ID at the interface CSS_receiver capture/acquisition units */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_8          24   /* 01 1000 YUV420 8-bit                                        */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_8_CSPS     28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_10_CSPS    29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
 /* used reserved mipi positions for these */
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW16             46 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18             47 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_2           37 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_3           38 
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW16             46
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18             47
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_2           37
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_3           38
 
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_WIDTH              6
 
@@ -78,7 +78,7 @@
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB444           2  // 32
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB565           3  // 34
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB666           4  // 35
-#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW8             5  // 42 
+#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW8             5  // 42
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW10            6  // 43
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW6             7  // 40
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW7             8  // 41
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18           28  // ?
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18_2         29  // ? Option 2 for depacketiser
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18_3         30  // ? Option 3 for depacketiser
-#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_CUSTOM          31  // to signal custom decoding 
+#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_CUSTOM          31  // to signal custom decoding
 
 /* definition for state machine of data FIFO for decode different type of data */
-#define _HRT_CSS_RECEIVER_2400_YUV420_8_REPEAT_PTN                 1  
+#define _HRT_CSS_RECEIVER_2400_YUV420_8_REPEAT_PTN                 1
 #define _HRT_CSS_RECEIVER_2400_YUV420_10_REPEAT_PTN                5
 #define _HRT_CSS_RECEIVER_2400_YUV420_8L_REPEAT_PTN                1
 #define _HRT_CSS_RECEIVER_2400_YUV422_8_REPEAT_PTN                 1
 #define _HRT_CSS_RECEIVER_2400_YUV422_10_REPEAT_PTN                5
-#define _HRT_CSS_RECEIVER_2400_RGB444_REPEAT_PTN                   2 
+#define _HRT_CSS_RECEIVER_2400_RGB444_REPEAT_PTN                   2
 #define _HRT_CSS_RECEIVER_2400_RGB555_REPEAT_PTN                   2
 #define _HRT_CSS_RECEIVER_2400_RGB565_REPEAT_PTN                   2
-#define _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN                   9                       
+#define _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN                   9
 #define _HRT_CSS_RECEIVER_2400_RGB888_REPEAT_PTN                   3
 #define _HRT_CSS_RECEIVER_2400_RAW6_REPEAT_PTN                     3
 #define _HRT_CSS_RECEIVER_2400_RAW7_REPEAT_PTN                     7
 #define _HRT_CSS_RECEIVER_2400_RAW8_REPEAT_PTN                     1
 #define _HRT_CSS_RECEIVER_2400_RAW10_REPEAT_PTN                    5
-#define _HRT_CSS_RECEIVER_2400_RAW12_REPEAT_PTN                    3        
+#define _HRT_CSS_RECEIVER_2400_RAW12_REPEAT_PTN                    3
 #define _HRT_CSS_RECEIVER_2400_RAW14_REPEAT_PTN                    7
 
 #define _HRT_CSS_RECEIVER_2400_MAX_REPEAT_PTN                      _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN
 #define _HRT_CSS_RECEIVER_2400_BE_COMP_12_7_12                     5
 #define _HRT_CSS_RECEIVER_2400_BE_COMP_12_8_12                     6
 
-
 /* packet bit definition */
 #define _HRT_CSS_RECEIVER_2400_PKT_SOP_IDX                        32
 #define _HRT_CSS_RECEIVER_2400_PKT_SOP_BITS                        1
 #define _HRT_CSS_RECEIVER_2400_PKT_PAYLOAD_IDX                     0
 #define _HRT_CSS_RECEIVER_2400_PKT_PAYLOAD_BITS                   32
 
-
 /*************************************************************************************************/
 /* Custom Decoding                                                                               */
 /* These Custom Defs are defined based on design-time config in "csi_be_pixel_formatter.chdl" !! */
 /*************************************************************************************************/
 #define BE_CUST_EN_IDX                     0     /* 2bits */
-#define BE_CUST_EN_DATAID_IDX              2     /* 6bits MIPI DATA ID */ 
-#define BE_CUST_EN_WIDTH                   8     
+#define BE_CUST_EN_DATAID_IDX              2     /* 6bits MIPI DATA ID */
+#define BE_CUST_EN_WIDTH                   8
 #define BE_CUST_MODE_ALL                   1     /* Enable Custom Decoding for all DATA IDs */
 #define BE_CUST_MODE_ONE                   3     /* Enable Custom Decoding for ONE DATA ID, programmed in CUST_EN_DATA_ID */
 
 /* Data State config = {get_bits(6bits), valid(1bit)}  */
-#define BE_CUST_DATA_STATE_S0_IDX          0     /* 7bits */ 
-#define BE_CUST_DATA_STATE_S1_IDX          7     /* 7bits */ 
+#define BE_CUST_DATA_STATE_S0_IDX          0     /* 7bits */
+#define BE_CUST_DATA_STATE_S1_IDX          7     /* 7bits */
 #define BE_CUST_DATA_STATE_S2_IDX          14    /* 7bits */
-#define BE_CUST_DATA_STATE_WIDTH           21    
+#define BE_CUST_DATA_STATE_WIDTH           21
 #define BE_CUST_DATA_STATE_VALID_IDX       0     /* 1bits */
 #define BE_CUST_DATA_STATE_GETBITS_IDX     1     /* 6bits */
 
 #define BE_CUST_PIX_EXT_PIX_ALIGN_IDX      5     /* 5bits */
 #define BE_CUST_PIX_EXT_PIX_MASK_IDX       10    /* 18bits */
 #define BE_CUST_PIX_EXT_PIX_EN_IDX         28    /* 1bits */
-#define BE_CUST_PIX_EXT_WIDTH              29    
+#define BE_CUST_PIX_EXT_WIDTH              29
 
 /* Pixel Valid & EoP config = {[eop,valid](especial), [eop,valid](normal)} */
 #define BE_CUST_PIX_VALID_EOP_P0_IDX        0    /* 4bits */
 #define BE_CUST_PIX_VALID_EOP_P1_IDX        4    /* 4bits */
 #define BE_CUST_PIX_VALID_EOP_P2_IDX        8    /* 4bits */
 #define BE_CUST_PIX_VALID_EOP_P3_IDX        12   /* 4bits */
-#define BE_CUST_PIX_VALID_EOP_WIDTH         16 
+#define BE_CUST_PIX_VALID_EOP_WIDTH         16
 #define BE_CUST_PIX_VALID_EOP_NOR_VALID_IDX 0    /* Normal (NO less get_bits case) Valid - 1bits */
 #define BE_CUST_PIX_VALID_EOP_NOR_EOP_IDX   1    /* Normal (NO less get_bits case) EoP - 1bits */
 #define BE_CUST_PIX_VALID_EOP_ESP_VALID_IDX 2    /* Especial (less get_bits case) Valid - 1bits */
 #define BE_CUST_PIX_VALID_EOP_ESP_EOP_IDX   3    /* Especial (less get_bits case) EoP - 1bits */
 
 #endif /* _mipi_backend_common_defs_h_ */
-#endif /* _css_receiver_2400_common_defs_h_ */ 
+#endif /* _css_receiver_2400_common_defs_h_ */
index 6f5b7d3d3715e905f55265a2774be86cc5eb9f08..f4b2b41b6d94370d83d45cfde754c9d7224752ce 100644 (file)
 #define _HRT_CSS_RECEIVER_2400_CSI2_MASK_ECC_TWO_BIT_ERR_IDX                  6
 #define _HRT_CSS_RECEIVER_2400_CSI2_MASK_DATA_ID_ERR_IDX                      7
 
-                                  
 /* Bits for CSI2_FUNC_PROG register */
 #define _HRT_CSS_RECEIVER_2400_CSI2_DATA_TIMEOUT_IDX    0
 #define _HRT_CSS_RECEIVER_2400_CSI2_DATA_TIMEOUT_BITS   19
 #define _HRT_CSS_RECEIVER_2400_COMP_SCHEME_USD_PRED_BITS_IDX  3
 #define _HRT_CSS_RECEIVER_2400_COMP_SCHEME_USD_PRED_BITS_BITS 2
 
-
 /* BITS for backend RAW16 and RAW 18 registers */
 
 #define _HRT_CSS_RECEIVER_2400_RAW18_DATAID_IDX    0
 #define _HRT_CSS_RECEIVER_2400_RAW16_EN_BITS       1
 
 /* These hsync and vsync values are for HSS simulation only */
-#define _HRT_CSS_RECEIVER_2400_HSYNC_VAL (1<<16)
-#define _HRT_CSS_RECEIVER_2400_VSYNC_VAL (1<<17)
+#define _HRT_CSS_RECEIVER_2400_HSYNC_VAL BIT(16)
+#define _HRT_CSS_RECEIVER_2400_VSYNC_VAL BIT(17)
 
 #define _HRT_CSS_RECEIVER_2400_BE_STREAMING_WIDTH                 28
 #define _HRT_CSS_RECEIVER_2400_BE_STREAMING_PIX_A_LSB              0
index d184a8b313c91c6978c70b10c42f32231cc65cb9..ba43562f12874cac152d4149eb53d9ad1436d96f 100644 (file)
@@ -51,7 +51,7 @@
 #define _DMA_V2_SPEC_DEV_B_XB_IDX  (_DMA_V2_SPEC_DEV_A_XB_IDX + _DMA_V2_SPEC_DEV_A_XB_BITS)
 #define _DMA_V2_SPEC_DEV_B_XB_BITS 8
 #define _DMA_V2_SPEC_YB_IDX        (_DMA_V2_SPEC_DEV_B_XB_IDX + _DMA_V2_SPEC_DEV_B_XB_BITS)
-#define _DMA_V2_SPEC_YB_BITS       (32-_DMA_V2_SPEC_DEV_B_XB_BITS-_DMA_V2_SPEC_DEV_A_XB_BITS-_DMA_V2_CMD_BITS-_DMA_V2_CHANNEL_BITS)
+#define _DMA_V2_SPEC_YB_BITS       (32 - _DMA_V2_SPEC_DEV_B_XB_BITS - _DMA_V2_SPEC_DEV_A_XB_BITS - _DMA_V2_CMD_BITS - _DMA_V2_CHANNEL_BITS)
 
 /* */
 #define _DMA_V2_CMD_CTRL_IDX       4
 #define _DMA_V2_STRIDE_BITS        32
 
 /* Command IDs */
-#define _DMA_V2_MOVE_B2A_COMMAND                             0      
-#define _DMA_V2_MOVE_B2A_BLOCK_COMMAND                       1      
-#define _DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND                 2      
-#define _DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND           3      
-#define _DMA_V2_MOVE_A2B_COMMAND                             4      
-#define _DMA_V2_MOVE_A2B_BLOCK_COMMAND                       5      
-#define _DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND                 6      
-#define _DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND           7      
-#define _DMA_V2_INIT_A_COMMAND                               8      
-#define _DMA_V2_INIT_A_BLOCK_COMMAND                         9      
-#define _DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND                  10      
-#define _DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND            11      
-#define _DMA_V2_INIT_B_COMMAND                              12      
-#define _DMA_V2_INIT_B_BLOCK_COMMAND                        13      
-#define _DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND                  14      
-#define _DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND            15      
-#define _DMA_V2_NO_ACK_MOVE_B2A_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND       + 16) 
-#define _DMA_V2_NO_ACK_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND + 16) 
-#define _DMA_V2_NO_ACK_MOVE_A2B_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND       + 16) 
-#define _DMA_V2_NO_ACK_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND + 16) 
-#define _DMA_V2_NO_ACK_INIT_A_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND         + 16) 
-#define _DMA_V2_NO_ACK_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND   + 16) 
-#define _DMA_V2_NO_ACK_INIT_B_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND         + 16) 
-#define _DMA_V2_NO_ACK_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND   + 16) 
-#define _DMA_V2_CONFIG_CHANNEL_COMMAND                      32   
-#define _DMA_V2_SET_CHANNEL_PARAM_COMMAND                   33   
-#define _DMA_V2_SET_CRUN_COMMAND                            62   
+#define _DMA_V2_MOVE_B2A_COMMAND                             0
+#define _DMA_V2_MOVE_B2A_BLOCK_COMMAND                       1
+#define _DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND                 2
+#define _DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND           3
+#define _DMA_V2_MOVE_A2B_COMMAND                             4
+#define _DMA_V2_MOVE_A2B_BLOCK_COMMAND                       5
+#define _DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND                 6
+#define _DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND           7
+#define _DMA_V2_INIT_A_COMMAND                               8
+#define _DMA_V2_INIT_A_BLOCK_COMMAND                         9
+#define _DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND                  10
+#define _DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND            11
+#define _DMA_V2_INIT_B_COMMAND                              12
+#define _DMA_V2_INIT_B_BLOCK_COMMAND                        13
+#define _DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND                  14
+#define _DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND            15
+#define _DMA_V2_NO_ACK_MOVE_B2A_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND       + 16)
+#define _DMA_V2_NO_ACK_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND + 16)
+#define _DMA_V2_NO_ACK_MOVE_A2B_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND       + 16)
+#define _DMA_V2_NO_ACK_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND + 16)
+#define _DMA_V2_NO_ACK_INIT_A_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND         + 16)
+#define _DMA_V2_NO_ACK_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND   + 16)
+#define _DMA_V2_NO_ACK_INIT_B_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND         + 16)
+#define _DMA_V2_NO_ACK_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND   + 16)
+#define _DMA_V2_CONFIG_CHANNEL_COMMAND                      32
+#define _DMA_V2_SET_CHANNEL_PARAM_COMMAND                   33
+#define _DMA_V2_SET_CRUN_COMMAND                            62
 
 /* Channel Parameter IDs */
-#define _DMA_V2_PACKING_SETUP_PARAM                     0  
-#define _DMA_V2_STRIDE_A_PARAM                          1  
-#define _DMA_V2_ELEM_CROPPING_A_PARAM                   2  
-#define _DMA_V2_WIDTH_A_PARAM                           3  
-#define _DMA_V2_STRIDE_B_PARAM                          4  
-#define _DMA_V2_ELEM_CROPPING_B_PARAM                   5  
-#define _DMA_V2_WIDTH_B_PARAM                           6  
-#define _DMA_V2_HEIGHT_PARAM                            7  
-#define _DMA_V2_QUEUED_CMDS                             8  
+#define _DMA_V2_PACKING_SETUP_PARAM                     0
+#define _DMA_V2_STRIDE_A_PARAM                          1
+#define _DMA_V2_ELEM_CROPPING_A_PARAM                   2
+#define _DMA_V2_WIDTH_A_PARAM                           3
+#define _DMA_V2_STRIDE_B_PARAM                          4
+#define _DMA_V2_ELEM_CROPPING_B_PARAM                   5
+#define _DMA_V2_WIDTH_B_PARAM                           6
+#define _DMA_V2_HEIGHT_PARAM                            7
+#define _DMA_V2_QUEUED_CMDS                             8
 
 /* Parameter Constants */
 #define _DMA_V2_ZERO_EXTEND                             0
 #define _DMA_V2_ADDR_SEL_COMP_BITS                      4
 #define _DMA_V2_ADDR_SEL_CH_REG_IDX                     2
 #define _DMA_V2_ADDR_SEL_CH_REG_BITS                    6
-#define _DMA_V2_ADDR_SEL_PARAM_IDX                      (_DMA_V2_ADDR_SEL_CH_REG_BITS+_DMA_V2_ADDR_SEL_CH_REG_IDX)
+#define _DMA_V2_ADDR_SEL_PARAM_IDX                      (_DMA_V2_ADDR_SEL_CH_REG_BITS + _DMA_V2_ADDR_SEL_CH_REG_IDX)
 #define _DMA_V2_ADDR_SEL_PARAM_BITS                     4
 
 #define _DMA_V2_ADDR_SEL_GROUP_COMP_IDX                 2
 
 #define _DMA_V2_ADDR_SEL_DEV_INTERF_IDX_IDX             2
 #define _DMA_V2_ADDR_SEL_DEV_INTERF_IDX_BITS            6
-#define _DMA_V2_ADDR_SEL_DEV_INTERF_INFO_IDX            (_DMA_V2_ADDR_SEL_DEV_INTERF_IDX_IDX+_DMA_V2_ADDR_SEL_DEV_INTERF_IDX_BITS)
+#define _DMA_V2_ADDR_SEL_DEV_INTERF_INFO_IDX            (_DMA_V2_ADDR_SEL_DEV_INTERF_IDX_IDX + _DMA_V2_ADDR_SEL_DEV_INTERF_IDX_BITS)
 #define _DMA_V2_ADDR_SEL_DEV_INTERF_INFO_BITS           4
 
 #define _DMA_V2_FSM_GROUP_CMD_IDX                       0
 #define _DMA_V2_FSM_GROUP_FSM_PACK_IDX                  5
 #define _DMA_V2_FSM_GROUP_FSM_REQ_IDX                   6
 #define _DMA_V2_FSM_GROUP_FSM_WR_IDX                    7
-  
+
 #define _DMA_V2_FSM_GROUP_FSM_CTRL_STATE_IDX            0
 #define _DMA_V2_FSM_GROUP_FSM_CTRL_REQ_DEV_IDX          1
 #define _DMA_V2_FSM_GROUP_FSM_CTRL_REQ_ADDR_IDX         2
index 77722d20570108c94c8258640f679564ef0e40dc..33f8b5ce9ba3e09ec08ae2d95bb145a8431b2813 100644 (file)
 #define HRT_GDC_FRAC_BITS               10 /* Number of fractional bits in the GDC block, driven by the size of the LUT */
 
 #define HRT_GDC_BLI_FRAC_BITS            4 /* Number of fractional bits for the bi-linear interpolation type            */
-#define HRT_GDC_BLI_COEF_ONE             (1 << HRT_GDC_BLI_FRAC_BITS)
+#define HRT_GDC_BLI_COEF_ONE             BIT(HRT_GDC_BLI_FRAC_BITS)
 
 #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.              */
-#define HRT_GDC_BCI_COEF_MASK            ((1 << HRT_GDC_BCI_COEF_BITS) - 1) 
+#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.              */
+#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                      */
+#define HRT_GDC_LUT_BYTES                (HRT_GDC_N * 4 * 2)                /* 1024 addresses, 4 coefficients per address,  */
+                                                                       /* 2 bytes per coefficient                      */
 
-#define _HRT_GDC_REG_ALIGN               4                              
+#define _HRT_GDC_REG_ALIGN               4
 
   //     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    
-  
+  // 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.
 
   // Reg_ID - Address of the register to be configured
-  
+
   // 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
-  
+
 #define HRT_GDC_CONFIG_CMD             1
 #define HRT_GDC_DATA_CMD               0
 
-
 #define HRT_GDC_CMD_POS               31
 #define HRT_GDC_CMD_BITS               1
 #define HRT_GDC_CRUN_POS              30
 #define HRT_GDC_FRYIPXFRX_BITS        26
 #define HRT_GDC_P0X_BITS              23
 
-
-#define HRT_GDC_MAX_OXDIM           (8192-64)
+#define HRT_GDC_MAX_OXDIM           (8192 - 64)
 #define HRT_GDC_MAX_OYDIM           4095
-#define HRT_GDC_MAX_IXDIM           (8192-64)
+#define HRT_GDC_MAX_IXDIM           (8192 - 64)
 #define HRT_GDC_MAX_IYDIM           4095
 #define HRT_GDC_MAX_DS_FAC            16
-#define HRT_GDC_MAX_DX                 (HRT_GDC_MAX_DS_FAC*HRT_GDC_N - 1)
+#define HRT_GDC_MAX_DX                 (HRT_GDC_MAX_DS_FAC * HRT_GDC_N - 1)
 #define HRT_GDC_MAX_DY                 HRT_GDC_MAX_DX
 
-
 /* GDC lookup tables entries are 10 bits values, but they're
    stored 2 by 2 as 32 bit values, yielding 16 bits per entry.
    A GDC lookup table contains 64 * 4 elements */
 #define HRT_GDC_MODE_SCALING          0
 #define HRT_GDC_MODE_TETRAGON         1
 
-#define HRT_GDC_LUT_COEFF_OFFSET     16 
-#define HRT_GDC_FRY_BIT_OFFSET       16 
-// FRYIPXFRX is the only register where we store two values in one field, 
-// to save one token in the scaling protocol. 
-// Like this, we have three tokens in the scaling protocol, 
+#define HRT_GDC_LUT_COEFF_OFFSET     16
+#define HRT_GDC_FRY_BIT_OFFSET       16
+// FRYIPXFRX is the only register where we store two values in one field,
+// to save one token in the scaling protocol.
+// Like this, we have three tokens in the scaling protocol,
 // Otherwise, we would have had four.
 // The register bit-map is:
 //   31  26 25      16 15  10 9        0
 //  |------|----------|------|----------|
 //  | XXXX |   FRY    |  IPX |   FRX    |
 
-
 #define HRT_GDC_CE_FSM0_POS           0
 #define HRT_GDC_CE_FSM0_LEN           2
 #define HRT_GDC_CE_OPY_POS            2
 //   31            16 15        2 1  0
 //  |----------------|-----------|----|
 //  |      OPX       |    OPY    |FSM0|
-// However, for the time being at least, 
+// However, for the time being at least,
 // this implementation is meaningless in hss model,
 // So, we just return 0
 
-
 #define HRT_GDC_CHK_ENGINE_IDX        0
 #define HRT_GDC_WOIX_IDX              1
 #define HRT_GDC_WOIY_IDX              2
 
 #define HRT_GDC_LUT_IDX              32
 
-
 #endif /* HRT_GDC_v2_defs_h_ */
index 3082e2f5e014117ccd1548cceae21fd5eb2bd430..ffd7b38fce9d3b8dd6bb645a4ba47e60b6957582 100644 (file)
 #define HIVE_GP_TIMER_RESET_REG_IDX                              0
 #define HIVE_GP_TIMER_OVERALL_ENABLE_REG_IDX                     1
 #define HIVE_GP_TIMER_ENABLE_REG_IDX(timer)                     (HIVE_GP_TIMER_OVERALL_ENABLE_REG_IDX + 1 + timer)
-#define HIVE_GP_TIMER_VALUE_REG_IDX(timer,timers)               (HIVE_GP_TIMER_ENABLE_REG_IDX(timers) + timer)
-#define HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timer,timers)          (HIVE_GP_TIMER_VALUE_REG_IDX(timers, timers) + timer)
-#define HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timer,timers)       (HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timers, timers) + timer)
-#define HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irq,timers)     (HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timers, timers) + irq)
-#define HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irq,timers,irqs) (HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irqs, timers) + irq)
-#define HIVE_GP_TIMER_IRQ_ENABLE_REG_IDX(irq,timers,irqs)       (HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irqs, timers, irqs) + irq)
+#define HIVE_GP_TIMER_VALUE_REG_IDX(timer, timers)               (HIVE_GP_TIMER_ENABLE_REG_IDX(timers) + timer)
+#define HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timer, timers)          (HIVE_GP_TIMER_VALUE_REG_IDX(timers, timers) + timer)
+#define HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timer, timers)       (HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timers, timers) + timer)
+#define HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irq, timers)     (HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timers, timers) + irq)
+#define HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irq, timers, irqs) (HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irqs, timers) + irq)
+#define HIVE_GP_TIMER_IRQ_ENABLE_REG_IDX(irq, timers, irqs)       (HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irqs, timers, irqs) + irq)
 
 #define HIVE_GP_TIMER_COUNT_TYPE_HIGH                            0
 #define HIVE_GP_TIMER_COUNT_TYPE_LOW                             1
@@ -33,4 +33,4 @@
 #define HIVE_GP_TIMER_COUNT_TYPE_NEGEDGE                         3
 #define HIVE_GP_TIMER_COUNT_TYPES                                4
 
-#endif /* _gp_timer_defs_h */   
+#endif /* _gp_timer_defs_h */
index a807d4c990414af50c61c4e20075d385db25862f..d02435a3ec5a1e23fafae4a89505b7e66d48ed03 100644 (file)
@@ -35,7 +35,6 @@
 #define _gpio_block_reg_di_debounce_cnt_3      14
 #define _gpio_block_reg_di_active_level          15
 
-
 /* read-only registers */
 #define _gpio_block_reg_di                               16
 
index 2f7cb2dff0e9be416ed5b578a780f928ae668e2d..3037484d206b7a326c5692ce79f80a047ca32549 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     ,
+  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;
index 5a2ce9108ae4968221b5690d3d641d579732e631..be492eb9353da743e940f4249b9b81b39c7cd453 100644 (file)
    and in the DMA parameter list */
 #define HIVE_ISP_DDR_DMA_SPECS {{32,  8}, {16, 16}, {18, 14}, {25, 10}, {21, 12}}
 #define HIVE_ISP_DDR_WORD_BITS 256
-#define HIVE_ISP_DDR_WORD_BYTES  (HIVE_ISP_DDR_WORD_BITS/8)
+#define HIVE_ISP_DDR_WORD_BYTES  (HIVE_ISP_DDR_WORD_BITS / 8)
 #define HIVE_ISP_DDR_BYTES       (512 * 1024 * 1024)
 #define HIVE_ISP_DDR_BYTES_RTL   (127 * 1024 * 1024)
 #define HIVE_ISP_DDR_SMALL_BYTES (128 * 256 / 8)
 #define HIVE_ISP_PAGE_SHIFT    12
-#define HIVE_ISP_PAGE_SIZE     (1<<HIVE_ISP_PAGE_SHIFT)
+#define HIVE_ISP_PAGE_SIZE     BIT(HIVE_ISP_PAGE_SHIFT)
 
 #define CSS_DDR_WORD_BITS        HIVE_ISP_DDR_WORD_BITS
 #define CSS_DDR_WORD_BYTES       HIVE_ISP_DDR_WORD_BYTES
 #define HIVE_VMEM_VECTOR_ELEMENTS  64
 #define HIVE_VMEM_ELEMENT_BITS     14
 #define HIVE_XMEM_ELEMENT_BITS     16
-#define HIVE_VMEM_VECTOR_BYTES (HIVE_VMEM_VECTOR_ELEMENTS*HIVE_XMEM_ELEMENT_BITS/8) /* used for # addr bytes for one vector */
-#define HIVE_XMEM_PACKED_WORD_VMEM_ELEMENTS (HIVE_XMEM_WIDTH/HIVE_VMEM_ELEMENT_BITS)
-#define HIVE_XMEM_WORD_VMEM_ELEMENTS        (HIVE_XMEM_WIDTH/HIVE_XMEM_ELEMENT_BITS)
+#define HIVE_VMEM_VECTOR_BYTES (HIVE_VMEM_VECTOR_ELEMENTS * HIVE_XMEM_ELEMENT_BITS / 8) /* used for # addr bytes for one vector */
+#define HIVE_XMEM_PACKED_WORD_VMEM_ELEMENTS (HIVE_XMEM_WIDTH / HIVE_VMEM_ELEMENT_BITS)
+#define HIVE_XMEM_WORD_VMEM_ELEMENTS        (HIVE_XMEM_WIDTH / HIVE_XMEM_ELEMENT_BITS)
 #define XMEM_INT_SIZE              4
 
-
-
-#define HIVE_ISYS_INP_BUFFER_BYTES (64*1024)  /* 64 kByte = 2k words (of 256 bits) */
+#define HIVE_ISYS_INP_BUFFER_BYTES (64 * 1024)  /* 64 kByte = 2k words (of 256 bits) */
 
 /* If HIVE_ISP_DDR_BASE_OFFSET is set to a non-zero value, the wide bus just before the DDRAM gets an extra dummy port where         */
 /* address range 0 .. HIVE_ISP_DDR_BASE_OFFSET-1 maps onto. This effectively creates an offset for the DDRAM from system perspective */
 #define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I4_I0        51
 #define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I5_I0        52
 #define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I6_I0        53
-#define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I7_I0        54                                                         
+#define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I7_I0        54
 #define HIVE_GP_TIMER_MIPI_SOL_BIT_ID                          55
 #define HIVE_GP_TIMER_MIPI_EOL_BIT_ID                          56
 #define HIVE_GP_TIMER_MIPI_SOF_BIT_ID                          57
 /* port definititions SP streaming monitor, monitors the status of streaming ports at the SP side of the streaming FIFO's */
 #define SP_STR_MON_PORT_SP2SIF            0
 #define SP_STR_MON_PORT_SIF2SP            1
-#define SP_STR_MON_PORT_SP2MC             2 
+#define SP_STR_MON_PORT_SP2MC             2
 #define SP_STR_MON_PORT_MC2SP             3
-#define SP_STR_MON_PORT_SP2DMA            4 
+#define SP_STR_MON_PORT_SP2DMA            4
 #define SP_STR_MON_PORT_DMA2SP            5
-#define SP_STR_MON_PORT_SP2ISP            6 
+#define SP_STR_MON_PORT_SP2ISP            6
 #define SP_STR_MON_PORT_ISP2SP            7
 #define SP_STR_MON_PORT_SP2GPD            8
 #define SP_STR_MON_PORT_FA2SP             9
-#define SP_STR_MON_PORT_SP2ISYS          10 
+#define SP_STR_MON_PORT_SP2ISYS          10
 #define SP_STR_MON_PORT_ISYS2SP          11
 #define SP_STR_MON_PORT_SP2PIFA          12
 #define SP_STR_MON_PORT_PIFA2SP          13
 /* port definititions ISP streaming monitor, monitors the status of streaming ports at the ISP side of the streaming FIFO's */
 #define ISP_STR_MON_PORT_ISP2PIFA         0
 #define ISP_STR_MON_PORT_PIFA2ISP         1
-#define ISP_STR_MON_PORT_ISP2PIFB         2 
+#define ISP_STR_MON_PORT_ISP2PIFB         2
 #define ISP_STR_MON_PORT_PIFB2ISP         3
-#define ISP_STR_MON_PORT_ISP2DMA          4 
+#define ISP_STR_MON_PORT_ISP2DMA          4
 #define ISP_STR_MON_PORT_DMA2ISP          5
-#define ISP_STR_MON_PORT_ISP2GDC1         6 
+#define ISP_STR_MON_PORT_ISP2GDC1         6
 #define ISP_STR_MON_PORT_GDC12ISP         7
-#define ISP_STR_MON_PORT_ISP2GDC2         8 
+#define ISP_STR_MON_PORT_ISP2GDC2         8
 #define ISP_STR_MON_PORT_GDC22ISP         9
-#define ISP_STR_MON_PORT_ISP2GPD         10 
+#define ISP_STR_MON_PORT_ISP2GPD         10
 #define ISP_STR_MON_PORT_FA2ISP          11
-#define ISP_STR_MON_PORT_ISP2SP          12 
+#define ISP_STR_MON_PORT_ISP2SP          12
 #define ISP_STR_MON_PORT_SP2ISP          13
 
 /* previously used ISP streaming monitor port identifiers, kept for backward compatibility */
 #define ISP_STR_MON_PORT_SND_PIF_A       ISP_STR_MON_PORT_ISP2PIFA
 #define ISP_STR_MON_PORT_RCV_PIF_A       ISP_STR_MON_PORT_PIFA2ISP
-#define ISP_STR_MON_PORT_SND_PIF_B       ISP_STR_MON_PORT_ISP2PIFB 
+#define ISP_STR_MON_PORT_SND_PIF_B       ISP_STR_MON_PORT_ISP2PIFB
 #define ISP_STR_MON_PORT_RCV_PIF_B       ISP_STR_MON_PORT_PIFB2ISP
-#define ISP_STR_MON_PORT_SND_DMA         ISP_STR_MON_PORT_ISP2DMA  
-#define ISP_STR_MON_PORT_RCV_DMA         ISP_STR_MON_PORT_DMA2ISP 
-#define ISP_STR_MON_PORT_SND_GDC         ISP_STR_MON_PORT_ISP2GDC1 
+#define ISP_STR_MON_PORT_SND_DMA         ISP_STR_MON_PORT_ISP2DMA
+#define ISP_STR_MON_PORT_RCV_DMA         ISP_STR_MON_PORT_DMA2ISP
+#define ISP_STR_MON_PORT_SND_GDC         ISP_STR_MON_PORT_ISP2GDC1
 #define ISP_STR_MON_PORT_RCV_GDC         ISP_STR_MON_PORT_GDC12ISP
-#define ISP_STR_MON_PORT_SND_GPD         ISP_STR_MON_PORT_ISP2GPD 
+#define ISP_STR_MON_PORT_SND_GPD         ISP_STR_MON_PORT_ISP2GPD
 #define ISP_STR_MON_PORT_RCV_GPD         ISP_STR_MON_PORT_FA2ISP
 #define ISP_STR_MON_PORT_SND_SP          ISP_STR_MON_PORT_ISP2SP
 #define ISP_STR_MON_PORT_RCV_SP          ISP_STR_MON_PORT_SP2ISP
-                                           
+
 /* port definititions MOD streaming monitor, monitors the status of streaming ports at the module side of the streaming FIFO's */
 
 #define MOD_STR_MON_PORT_PIFA2CELLS       0
 #define MOD_STR_MON_PORT_SND_GDC         12
 #define MOD_STR_MON_PORT_RCV_GDC         13
 
-
 /* testbench signals:       */
 
 /* testbench GP adapter register ids  */
index 8d4c9d67c0e24dd99d4ff9bc019007a1365bd560..2c5ba6fda83873baecbae5e121e897ddc636b88d 100644 (file)
@@ -29,7 +29,7 @@
 #define ISP           testbench_isp_isp_css_sec_part_isp
 #define SP            testbench_isp_isp_css_sec_part_scp
 
-#define IF_PRIM       testbench_isp_isp_css_part_is_2400_ifmt_ift_prim  
+#define IF_PRIM       testbench_isp_isp_css_part_is_2400_ifmt_ift_prim
 #define IF_PRIM_B     testbench_isp_isp_css_part_is_2400_ifmt_ift_prim_b
 #define IF_SEC        testbench_isp_isp_css_part_is_2400_ifmt_ift_sec
 #define IF_SEC_MASTER testbench_isp_isp_css_part_is_2400_ifmt_ift_sec_mt_out
@@ -96,7 +96,6 @@
 #define ISYS2401_IBUF_CNTRL_C testbench_isp_isp_css_part_is_2401_is_pipe_c_ibuf_ctrl
 #define ISYS2401_IRQ_CTRL_C   testbench_isp_isp_css_part_is_2401_is_pipe_c_irq_ctrl_pipe
 
-
 /* Testbench identifiers */
 #define DDR             testbench_ddram
 #define DDR_SMALL       testbench_ddram_small
index b4211a0c631a2b150ee025de86841f3aa1bac062..a22b771f61f2e8e727d0f1ec626978d4209478d6 100644 (file)
 
 #include <streaming_to_mipi_defs.h>
 
-#define _HIVE_ISP_CH_ID_MASK    ((1U << HIVE_ISP_CH_ID_BITS)-1)
-#define _HIVE_ISP_FMT_TYPE_MASK ((1U << HIVE_ISP_FMT_TYPE_BITS)-1)
+#define _HIVE_ISP_CH_ID_MASK    ((1U << HIVE_ISP_CH_ID_BITS) - 1)
+#define _HIVE_ISP_FMT_TYPE_MASK ((1U << HIVE_ISP_FMT_TYPE_BITS) - 1)
 
 #define _HIVE_STR_TO_MIPI_FMT_TYPE_LSB (HIVE_STR_TO_MIPI_CH_ID_LSB + HIVE_ISP_CH_ID_BITS)
 #define _HIVE_STR_TO_MIPI_DATA_B_LSB   (HIVE_STR_TO_MIPI_DATA_A_LSB + HIVE_IF_PIXEL_WIDTH)
+
 #endif /* _hive_isp_css_streaming_to_mipi_types_hrt_h_ */
index 58b0e6effbd068fe9f2d175072bb1e66c921428a..9715893c8a3605b977e5e7976df36a6f3501a577 100644 (file)
  * more details.
  */
 
-#ifndef _HRT_HIVE_TYPES_H 
-#define _HRT_HIVE_TYPES_H 
+#ifndef _HRT_HIVE_TYPES_H
+#define _HRT_HIVE_TYPES_H
 
 #include "version.h"
 #include "defs.h"
 
 #ifndef HRTCAT3
-#define _HRTCAT3(m,n,o)     m##n##o
-#define HRTCAT3(m,n,o)      _HRTCAT3(m,n,o)
+#define _HRTCAT3(m, n, o)     m##n##o
+#define HRTCAT3(m, n, o)      _HRTCAT3(m, n, o)
 #endif
 
 #ifndef HRTCAT4
-#define _HRTCAT4(m,n,o,p)     m##n##o##p
-#define HRTCAT4(m,n,o,p)      _HRTCAT4(m,n,o,p)
+#define _HRTCAT4(m, n, o, p)     m##n##o##p
+#define HRTCAT4(m, n, o, p)      _HRTCAT4(m, n, o, p)
 #endif
 
 #ifndef HRTMIN
-#define HRTMIN(a,b) (((a)<(b))?(a):(b))
+#define HRTMIN(a, b) (((a) < (b)) ? (a) : (b))
 #endif
-                                 
+
 #ifndef HRTMAX
-#define HRTMAX(a,b) (((a)>(b))?(a):(b))
+#define HRTMAX(a, b) (((a) > (b)) ? (a) : (b))
 #endif
 
 /* boolean data type */
@@ -59,8 +59,8 @@ typedef unsigned long long   hive_uint64;
 #define HRT_ADDRESS_WIDTH 32
 #endif
 
-#define HRT_DATA_BYTES    (HRT_DATA_WIDTH/8)
-#define HRT_ADDRESS_BYTES (HRT_ADDRESS_WIDTH/8)
+#define HRT_DATA_BYTES    (HRT_DATA_WIDTH / 8)
+#define HRT_ADDRESS_BYTES (HRT_ADDRESS_WIDTH / 8)
 
 #if HRT_DATA_WIDTH == 64
 typedef hive_uint64 hrt_data;
@@ -71,7 +71,7 @@ typedef hive_uint32 hrt_data;
 #endif
 
 #if HRT_ADDRESS_WIDTH == 64
-typedef hive_uint64 hrt_address; 
+typedef hive_uint64 hrt_address;
 #elif HRT_ADDRESS_WIDTH == 32
 typedef hive_uint32 hrt_address;
 #else
@@ -95,7 +95,7 @@ typedef hive_address hive_mem_address;
 typedef hive_uint    hive_mmio_id;
 typedef hive_mmio_id hive_slave_id;
 typedef hive_mmio_id hive_port_id;
-typedef hive_mmio_id hive_master_id; 
+typedef hive_mmio_id hive_master_id;
 typedef hive_mmio_id hive_mem_id;
 typedef hive_mmio_id hive_dev_id;
 typedef hive_mmio_id hive_fifo_id;
@@ -122,7 +122,7 @@ typedef hive_uint hive_inport_id;
 typedef hive_uint hive_msink_id;
 
 /* HRT specific */
-typedef charhive_program;
-typedef charhive_function;
+typedef char *hive_program;
+typedef char *hive_function;
 
 #endif /* _HRT_HIVE_TYPES_H */
index f82bb79785cfc6bac7c96fee897b1fd526df09a1..0d1b65db83cde7f3d979a74fb7ce7c6a25c6f246 100644 (file)
 #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_RECALC_WORDS_STATUS     0
 #define _IBUF_CNTRL_ARBITERS_STATUS         1
 
 #define _IBUF_CNTRL_SET_CRUN                2 /* NO PHYSICAL REGISTER!! Only used in HSS model */
 
-
 /*register addresses for each proc: */
 #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 */
+       /* 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_DMA_SYNC_STATE        26
 #define _IBUF_CNTRL_ISP_SYNC_STATE        27
 
-
 /*Commands: */
 #define _IBUF_CNTRL_CMD_STORE_FRAME_IDX     0
 #define _IBUF_CNTRL_CMD_ONLINE_IDX          1
 #define _IBUF_CNTRL_CMD_INITIALIZE          0
 
   /* 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))
+#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: */
-#define _IBUF_CNTRL_CMD_STORE_OFFLINE_FRAME  (1<<_IBUF_CNTRL_CMD_STORE_FRAME_IDX)
+#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: */
 #define _IBUF_CNTRL_FALSE_ACK               2
index 7766f78cd12308f6fbbc14ae8e63c2c7e7f82242..176456da961f7307df5dca87c6388d7bbac5777b 100644 (file)
@@ -22,7 +22,7 @@
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_4            4
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_5            5
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_6            6
-#define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_7            7 
+#define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_7            7
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_FSYNC_LUT_REG        8
 #define HIVE_IFMT_GP_REGS_SRST_IDX                          9
 #define HIVE_IFMT_GP_REGS_SLV_REG_SRST_IDX                 10
index 87fbf82edb5bc44d6c5ca761c06aa57a8606fc97..1dd8ea3cd6d4763ba9a9e412b8f4a28e0e5b2510 100644 (file)
 #define HIVE_ISEL_GP_REGS_SYNCGEN_ENABLE_IDX                    0
 #define HIVE_ISEL_GP_REGS_SYNCGEN_FREE_RUNNING_IDX              1
 #define HIVE_ISEL_GP_REGS_SYNCGEN_PAUSE_IDX                     2
-#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_FRAMES_IDX                 3 
-#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_PIX_IDX                    4      
-#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_LINES_IDX                  5      
-#define HIVE_ISEL_GP_REGS_SYNCGEN_HBLANK_CYCLES_IDX             6      
-#define HIVE_ISEL_GP_REGS_SYNCGEN_VBLANK_CYCLES_IDX             7      
+#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_FRAMES_IDX                 3
+#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_PIX_IDX                    4
+#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_LINES_IDX                  5
+#define HIVE_ISEL_GP_REGS_SYNCGEN_HBLANK_CYCLES_IDX             6
+#define HIVE_ISEL_GP_REGS_SYNCGEN_VBLANK_CYCLES_IDX             7
 
-#define HIVE_ISEL_GP_REGS_SOF_IDX                               8 
-#define HIVE_ISEL_GP_REGS_EOF_IDX                               9 
-#define HIVE_ISEL_GP_REGS_SOL_IDX                              10 
-#define HIVE_ISEL_GP_REGS_EOL_IDX                              11 
+#define HIVE_ISEL_GP_REGS_SOF_IDX                               8
+#define HIVE_ISEL_GP_REGS_EOF_IDX                               9
+#define HIVE_ISEL_GP_REGS_SOL_IDX                              10
+#define HIVE_ISEL_GP_REGS_EOL_IDX                              11
 
-#define HIVE_ISEL_GP_REGS_PRBS_ENABLE                          12      
-#define HIVE_ISEL_GP_REGS_PRBS_ENABLE_PORT_B                   13      
-#define HIVE_ISEL_GP_REGS_PRBS_LFSR_RESET_VALUE                14      
+#define HIVE_ISEL_GP_REGS_PRBS_ENABLE                          12
+#define HIVE_ISEL_GP_REGS_PRBS_ENABLE_PORT_B                   13
+#define HIVE_ISEL_GP_REGS_PRBS_LFSR_RESET_VALUE                14
 
-#define HIVE_ISEL_GP_REGS_TPG_ENABLE                           15      
-#define HIVE_ISEL_GP_REGS_TPG_ENABLE_PORT_B                    16      
-#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_MASK_IDX                 17      
-#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_MASK_IDX                 18      
-#define HIVE_ISEL_GP_REGS_TPG_XY_CNT_MASK_IDX                  19      
-#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_DELTA_IDX                20      
-#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_DELTA_IDX                21      
-#define HIVE_ISEL_GP_REGS_TPG_MODE_IDX                         22     
-#define HIVE_ISEL_GP_REGS_TPG_R1_IDX                           23 
+#define HIVE_ISEL_GP_REGS_TPG_ENABLE                           15
+#define HIVE_ISEL_GP_REGS_TPG_ENABLE_PORT_B                    16
+#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_MASK_IDX                 17
+#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_MASK_IDX                 18
+#define HIVE_ISEL_GP_REGS_TPG_XY_CNT_MASK_IDX                  19
+#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_DELTA_IDX                20
+#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_DELTA_IDX                21
+#define HIVE_ISEL_GP_REGS_TPG_MODE_IDX                         22
+#define HIVE_ISEL_GP_REGS_TPG_R1_IDX                           23
 #define HIVE_ISEL_GP_REGS_TPG_G1_IDX                           24
 #define HIVE_ISEL_GP_REGS_TPG_B1_IDX                           25
 #define HIVE_ISEL_GP_REGS_TPG_R2_IDX                           26
 #define HIVE_ISEL_GP_REGS_TPG_G2_IDX                           27
 #define HIVE_ISEL_GP_REGS_TPG_B2_IDX                           28
 
-
 #define HIVE_ISEL_GP_REGS_CH_ID_IDX                            29
 #define HIVE_ISEL_GP_REGS_FMT_TYPE_IDX                         30
 #define HIVE_ISEL_GP_REGS_DATA_SEL_IDX                         31
index 20a13c4cdb562fc8773992317d0b9b4a06a149cb..2d5baae305220c25cfbe956cf514355f197ae181 100644 (file)
@@ -15,8 +15,8 @@
 #ifndef _input_switch_2400_defs_h
 #define _input_switch_2400_defs_h
 
-#define _HIVE_INPUT_SWITCH_GET_LUT_REG_ID(ch_id, fmt_type) (((ch_id)*2) + ((fmt_type)>=16))
-#define _HIVE_INPUT_SWITCH_GET_LUT_REG_LSB(fmt_type)        (((fmt_type)%16) * 2)
+#define _HIVE_INPUT_SWITCH_GET_LUT_REG_ID(ch_id, fmt_type) (((ch_id) * 2) + ((fmt_type) >= 16))
+#define _HIVE_INPUT_SWITCH_GET_LUT_REG_LSB(fmt_type)        (((fmt_type) % 16) * 2)
 
 #define HIVE_INPUT_SWITCH_SELECT_NO_OUTPUT   0
 #define HIVE_INPUT_SWITCH_SELECT_IF_PRIM     1
index a7f0ca80bc9be0afed16a0726fdd068946aef12a..fcfa8c4971befd98c0f1884b5068fc155b728eb2 100644 (file)
@@ -50,7 +50,6 @@
 #define ISYS_CTRL_CAPT_C_FSM_STATE_INFO_REG_ID          20
 #define ISYS_CTRL_ACQ_FSM_STATE_INFO_REG_ID             21
 #define ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID    22
 
 /* register reset value */
 #define ISYS_CTRL_CAPT_START_ADDR_A_REG_RSTVAL           0
 #define ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_RSTVAL      128
 #define ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_RSTVAL      128
 #define ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_RSTVAL      128
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_RSTVAL      3 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_RSTVAL      3 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_RSTVAL      3 
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_RSTVAL      3
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_RSTVAL      3
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_RSTVAL      3
 #define ISYS_CTRL_ACQ_START_ADDR_REG_RSTVAL              0
-#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_RSTVAL         128 
-#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_RSTVAL         3 
+#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_RSTVAL         128
+#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_RSTVAL         3
 #define ISYS_CTRL_INIT_REG_RSTVAL                        0
-#define ISYS_CTRL_LAST_COMMAND_REG_RSTVAL                15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)  
+#define ISYS_CTRL_LAST_COMMAND_REG_RSTVAL                15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_NEXT_COMMAND_REG_RSTVAL                15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_LAST_ACKNOWLEDGE_REG_RSTVAL            15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_NEXT_ACKNOWLEDGE_REG_RSTVAL            15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_FSM_STATE_INFO_REG_RSTVAL              0
-#define ISYS_CTRL_CAPT_A_FSM_STATE_INFO_REG_RSTVAL       0 
+#define ISYS_CTRL_CAPT_A_FSM_STATE_INFO_REG_RSTVAL       0
 #define ISYS_CTRL_CAPT_B_FSM_STATE_INFO_REG_RSTVAL       0
 #define ISYS_CTRL_CAPT_C_FSM_STATE_INFO_REG_RSTVAL       0
 #define ISYS_CTRL_ACQ_FSM_STATE_INFO_REG_RSTVAL          0
 #define ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_RSTVAL 0
 
 /* register width value */
-#define ISYS_CTRL_CAPT_START_ADDR_A_REG_WIDTH            9 
-#define ISYS_CTRL_CAPT_START_ADDR_B_REG_WIDTH            9 
-#define ISYS_CTRL_CAPT_START_ADDR_C_REG_WIDTH            9 
-#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_WIDTH       9 
-#define ISYS_CTRL_ACQ_START_ADDR_REG_WIDTH               9 
-#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_WIDTH          9 
-#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_WIDTH          9 
-#define ISYS_CTRL_INIT_REG_WIDTH                         3 
+#define ISYS_CTRL_CAPT_START_ADDR_A_REG_WIDTH            9
+#define ISYS_CTRL_CAPT_START_ADDR_B_REG_WIDTH            9
+#define ISYS_CTRL_CAPT_START_ADDR_C_REG_WIDTH            9
+#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_WIDTH       9
+#define ISYS_CTRL_ACQ_START_ADDR_REG_WIDTH               9
+#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_WIDTH          9
+#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_WIDTH          9
+#define ISYS_CTRL_INIT_REG_WIDTH                         3
 #define ISYS_CTRL_LAST_COMMAND_REG_WIDTH                 32    /* slave data width */
 #define ISYS_CTRL_NEXT_COMMAND_REG_WIDTH                 32
 #define ISYS_CTRL_LAST_ACKNOWLEDGE_REG_WIDTH             32
 /*
 InpSysCaptFramesAcq  1/0  [3:0] - 'b0000
 [7:4] - CaptPortId,
-           CaptA-'b0000
-           CaptB-'b0001
-           CaptC-'b0010
+          CaptA-'b0000
+          CaptB-'b0001
+          CaptC-'b0010
 [31:16] - NOF_frames
 InpSysCaptFrameExt  2/0  [3:0] - 'b0001'
 [7:4] - CaptPortId,
-           'b0000 - CaptA 
-           'b0001 - CaptB
-           'b0010 - CaptC
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
 
   2/1  [31:0] - external capture address
-InpSysAcqFrame  2/0  [3:0] - 'b0010, 
+InpSysAcqFrame  2/0  [3:0] - 'b0010,
 [31:4] - NOF_ext_mem_words
   2/1  [31:0] - external memory read start address
-InpSysOverruleON  1/0  [3:0] - 'b0011, 
+InpSysOverruleON  1/0  [3:0] - 'b0011,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-
-InpSysOverruleOFF  1/0  [3:0] - 'b0100, 
+InpSysOverruleOFF  1/0  [3:0] - 'b0100,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-InpSysOverruleCmd  2/0  [3:0] - 'b0101, 
+InpSysOverruleCmd  2/0  [3:0] - 'b0101,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
   2/1  [31:0] - command token value for port opid
 
-
 acknowledge tokens:
 
 InpSysAckCFA  1/0   [3:0] - 'b0000
  [7:4] - CaptPortId,
-           CaptA-'b0000
-           CaptB- 'b0001
-           CaptC-'b0010
+          CaptA-'b0000
+          CaptB- 'b0001
+          CaptC-'b0010
  [31:16] - NOF_frames
 InpSysAckCFE  1/0  [3:0] - 'b0001'
 [7:4] - CaptPortId,
-           'b0000 - CaptA 
-           'b0001 - CaptB
-           'b0010 - CaptC
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
 
 InpSysAckAF  1/0  [3:0] - 'b0010
-InpSysAckOverruleON  1/0  [3:0] - 'b0011, 
+InpSysAckOverruleON  1/0  [3:0] - 'b0011,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-InpSysAckOverruleOFF  1/0  [3:0] - 'b0100, 
+InpSysAckOverruleOFF  1/0  [3:0] - 'b0100,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-
-InpSysAckOverrule  2/0  [3:0] - 'b0101, 
+InpSysAckOverrule  2/0  [3:0] - 'b0101,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
   2/1  [31:0] - acknowledge token value from port opid
 
-
-
 */
 
-
 /* Command and acknowledge tokens IDs */
 #define ISYS_CTRL_CAPT_FRAMES_ACQ_TOKEN_ID        0 /* 0000b */
 #define ISYS_CTRL_CAPT_FRAME_EXT_TOKEN_ID         1 /* 0001b */
@@ -232,10 +221,10 @@ InpSysAckOverrule  2/0  [3:0] - 'b0101,
 #define ISYS_CTRL_TOKEN_ID_IDX                    0
 #define ISYS_CTRL_TOKEN_ID_BITS                   (ISYS_CTRL_TOKEN_ID_MSB - ISYS_CTRL_TOKEN_ID_LSB + 1)
 #define ISYS_CTRL_PORT_ID_IDX                     (ISYS_CTRL_TOKEN_ID_IDX + ISYS_CTRL_TOKEN_ID_BITS)
-#define ISYS_CTRL_PORT_ID_BITS                    (ISYS_CTRL_PORT_ID_TOKEN_MSB - ISYS_CTRL_PORT_ID_TOKEN_LSB +1)
-#define ISYS_CTRL_NOF_CAPT_IDX                    ISYS_CTRL_NOF_CAPT_TOKEN_LSB    
+#define ISYS_CTRL_PORT_ID_BITS                    (ISYS_CTRL_PORT_ID_TOKEN_MSB - ISYS_CTRL_PORT_ID_TOKEN_LSB + 1)
+#define ISYS_CTRL_NOF_CAPT_IDX                    ISYS_CTRL_NOF_CAPT_TOKEN_LSB
 #define ISYS_CTRL_NOF_CAPT_BITS                   (ISYS_CTRL_NOF_CAPT_TOKEN_MSB - ISYS_CTRL_NOF_CAPT_TOKEN_LSB + 1)
-#define ISYS_CTRL_NOF_EXT_IDX                     ISYS_CTRL_NOF_EXT_TOKEN_LSB    
+#define ISYS_CTRL_NOF_EXT_IDX                     ISYS_CTRL_NOF_EXT_TOKEN_LSB
 #define ISYS_CTRL_NOF_EXT_BITS                    (ISYS_CTRL_NOF_EXT_TOKEN_MSB - ISYS_CTRL_NOF_EXT_TOKEN_LSB + 1)
 
 #define ISYS_CTRL_PORT_ID_CAPT_A                  0 /* device ID for capture unit A      */
@@ -248,7 +237,7 @@ InpSysAckOverrule  2/0  [3:0] - 'b0101,
 #define ISYS_CTRL_PORT_ID_DMA_ACQ                 7 /* device ID for dma unit            */
 
 #define ISYS_CTRL_NO_ACQ_ACK                      16 /* no ack from acquisition unit */
-#define ISYS_CTRL_NO_DMA_ACK                      0 
+#define ISYS_CTRL_NO_DMA_ACK                      0
 #define ISYS_CTRL_NO_CAPT_ACK                     16
 
-#endif /* _input_system_ctrl_defs_h */ 
+#endif /* _input_system_ctrl_defs_h */
index ec6dd4487158e4fabf4e587684e4290ffdd23ed2..efb3d7e135bdd503945cb52ba76c34bb30aa38e0 100644 (file)
@@ -25,4 +25,4 @@
 
 #define _HRT_IRQ_CONTROLLER_REG_ALIGN 4
 
-#endif /* _irq_controller_defs_h */   
+#endif /* _irq_controller_defs_h */
index 033e23bcf672ae5ddfabeec7b2978d7b9f1f05b8..7e79e3c611ee4edac16692271947d8f1d673a7bb 100644 (file)
 #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_NWAY                               ISP_VEC_NELEMS
 #define NBITS                                  ISP_VEC_ELEMBITS
 
-#define _isp_ceil_div(a,b)                     (((a)+(b)-1)/(b))
+#define _isp_ceil_div(a, b)                     (((a) + (b) - 1) / (b))
 
 #ifdef C_RUN
-#define ISP_VEC_ALIGN                          (_isp_ceil_div(ISP_VEC_WIDTH, 64)*8)
+#define ISP_VEC_ALIGN                          (_isp_ceil_div(ISP_VEC_WIDTH, 64) * 8)
 #else
 #define ISP_VEC_ALIGN                          ISP_VMEM_ALIGN
 #endif
index 59362072162710fbc0d5a5a47c11c48dd38b6861..5bdc16c71e82c74c286f516e93aa8788c10cd640 100644 (file)
@@ -16,7 +16,7 @@
 #define _isp_acquisition_defs_h
 
 #define _ISP_ACQUISITION_REG_ALIGN                4  /* assuming 32 bit control bus width */
-#define _ISP_ACQUISITION_BYTES_PER_ELEM           4            
+#define _ISP_ACQUISITION_BYTES_PER_ELEM           4
 
 /* --------------------------------------------------*/
 
 /* REGISTER INFO */
 /* --------------------------------------------------*/
 
-#define NOF_ACQ_REGS                              12      
+#define NOF_ACQ_REGS                              12
 
 // Register id's of MMIO slave accesible registers
-#define ACQ_START_ADDR_REG_ID                     0              
+#define ACQ_START_ADDR_REG_ID                     0
 #define ACQ_MEM_REGION_SIZE_REG_ID                1
 #define ACQ_NUM_MEM_REGIONS_REG_ID                2
-#define ACQ_INIT_REG_ID                           3 
+#define ACQ_INIT_REG_ID                           3
 #define ACQ_RECEIVED_SHORT_PACKETS_REG_ID         4
 #define ACQ_RECEIVED_LONG_PACKETS_REG_ID          5
 #define ACQ_LAST_COMMAND_REG_ID                   6
 #define ACQ_NEXT_ACKNOWLEDGE_REG_ID               9
 #define ACQ_FSM_STATE_INFO_REG_ID                 10
 #define ACQ_INT_CNTR_INFO_REG_ID                  11
+
 // Register width
-#define ACQ_START_ADDR_REG_WIDTH                  9               
-#define ACQ_MEM_REGION_SIZE_REG_WIDTH             9  
-#define ACQ_NUM_MEM_REGIONS_REG_WIDTH             9  
-#define ACQ_INIT_REG_WIDTH                        3  
-#define ACQ_RECEIVED_SHORT_PACKETS_REG_WIDTH      32 
-#define ACQ_RECEIVED_LONG_PACKETS_REG_WIDTH       32  
-#define ACQ_LAST_COMMAND_REG_WIDTH                32  
-#define ACQ_NEXT_COMMAND_REG_WIDTH                32  
-#define ACQ_LAST_ACKNOWLEDGE_REG_WIDTH            32  
-#define ACQ_NEXT_ACKNOWLEDGE_REG_WIDTH            32  
-#define ACQ_FSM_STATE_INFO_REG_WIDTH              ((MEM2STREAM_FSM_STATE_BITS * 3) + (ACQ_SYNCHRONIZER_FSM_STATE_BITS *3))
+#define ACQ_START_ADDR_REG_WIDTH                  9
+#define ACQ_MEM_REGION_SIZE_REG_WIDTH             9
+#define ACQ_NUM_MEM_REGIONS_REG_WIDTH             9
+#define ACQ_INIT_REG_WIDTH                        3
+#define ACQ_RECEIVED_SHORT_PACKETS_REG_WIDTH      32
+#define ACQ_RECEIVED_LONG_PACKETS_REG_WIDTH       32
+#define ACQ_LAST_COMMAND_REG_WIDTH                32
+#define ACQ_NEXT_COMMAND_REG_WIDTH                32
+#define ACQ_LAST_ACKNOWLEDGE_REG_WIDTH            32
+#define ACQ_NEXT_ACKNOWLEDGE_REG_WIDTH            32
+#define ACQ_FSM_STATE_INFO_REG_WIDTH              ((MEM2STREAM_FSM_STATE_BITS * 3) + (ACQ_SYNCHRONIZER_FSM_STATE_BITS * 3))
 #define ACQ_INT_CNTR_INFO_REG_WIDTH               32
 
 /* register reset value */
-#define ACQ_START_ADDR_REG_RSTVAL                 0              
+#define ACQ_START_ADDR_REG_RSTVAL                 0
 #define ACQ_MEM_REGION_SIZE_REG_RSTVAL            128
 #define ACQ_NUM_MEM_REGIONS_REG_RSTVAL            3
-#define ACQ_INIT_REG_RSTVAL                       0                           
+#define ACQ_INIT_REG_RSTVAL                       0
 #define ACQ_RECEIVED_SHORT_PACKETS_REG_RSTVAL     0
 #define ACQ_RECEIVED_LONG_PACKETS_REG_RSTVAL      0
 #define ACQ_LAST_COMMAND_REG_RSTVAL               0
 #define ACQ_NEXT_COMMAND_REG_RSTVAL               0
 #define ACQ_LAST_ACKNOWLEDGE_REG_RSTVAL           0
-#define ACQ_NEXT_ACKNOWLEDGE_REG_RSTVAL           0 
+#define ACQ_NEXT_ACKNOWLEDGE_REG_RSTVAL           0
 #define ACQ_FSM_STATE_INFO_REG_RSTVAL             0
-#define ACQ_INT_CNTR_INFO_REG_RSTVAL              0 
+#define ACQ_INT_CNTR_INFO_REG_RSTVAL              0
 
 /* bit definitions */
 #define ACQ_INIT_RST_REG_BIT                      0
@@ -88,7 +88,7 @@
 /* TOKEN INFO */
 /* --------------------------------------------------*/
 #define ACQ_TOKEN_ID_LSB                          0
-#define ACQ_TOKEN_ID_MSB                          3            
+#define ACQ_TOKEN_ID_MSB                          3
 #define ACQ_TOKEN_WIDTH                           (ACQ_TOKEN_ID_MSB - ACQ_TOKEN_ID_LSB  + 1) // 4
 #define ACQ_TOKEN_ID_IDX                          0
 #define ACQ_TOKEN_ID_BITS                         ACQ_TOKEN_WIDTH
@@ -97,9 +97,9 @@
 #define ACQ_CMD_START_ADDR_IDX                    4
 #define ACQ_CMD_START_ADDR_BITS                   9
 #define ACQ_CMD_NOFWORDS_IDX                      13
-#define ACQ_CMD_NOFWORDS_BITS                     9  
+#define ACQ_CMD_NOFWORDS_BITS                     9
 #define ACQ_MEM_REGION_ID_IDX                     22
-#define ACQ_MEM_REGION_ID_BITS                    9 
+#define ACQ_MEM_REGION_ID_BITS                    9
 #define ACQ_PACKET_LENGTH_TOKEN_MSB               21
 #define ACQ_PACKET_LENGTH_TOKEN_LSB               13
 #define ACQ_PACKET_DATA_FORMAT_ID_TOKEN_MSB       9
 #define ACQ_PACKET_MEM_REGION_ID_TOKEN_MSB        12           /* only for capt_end_of_packet_written */
 #define ACQ_PACKET_MEM_REGION_ID_TOKEN_LSB        4            /* only for capt_end_of_packet_written */
 
-
 /* Command tokens IDs */
 #define ACQ_READ_REGION_AUTO_INCR_TOKEN_ID        0 //0000b
 #define ACQ_READ_REGION_TOKEN_ID                  1 //0001b
-#define ACQ_READ_REGION_SOP_TOKEN_ID              2 //0010b  
+#define ACQ_READ_REGION_SOP_TOKEN_ID              2 //0010b
 #define ACQ_INIT_TOKEN_ID                         8 //1000b
 
 /* Acknowledge token IDs */
 #define ACQ_TOKEN_NOFWORDS_MSB                    21
 #define ACQ_TOKEN_NOFWORDS_LSB                    13
 #define ACQ_TOKEN_STARTADDR_MSB                   12
-#define ACQ_TOKEN_STARTADDR_LSB                   4  
-
+#define ACQ_TOKEN_STARTADDR_LSB                   4
 
 /* --------------------------------------------------*/
 /* MIPI */
 /* --------------------------------------------------*/
 
 #define WORD_COUNT_WIDTH                          16
-#define PKT_CODE_WIDTH                            6            
-#define CHN_NO_WIDTH                              2  
+#define PKT_CODE_WIDTH                            6
+#define CHN_NO_WIDTH                              2
 #define ERROR_INFO_WIDTH                          8
-  
+
 #define LONG_PKTCODE_MAX                          63
 #define LONG_PKTCODE_MIN                          16
 #define SHORT_PKTCODE_MAX                         15
 #define ACQ_LINE_PAYLOAD                          4
 #define ACQ_GEN_SH_PKT                            5
 
-
 /* bit definition */
 #define ACQ_PKT_TYPE_IDX                          16
 #define ACQ_PKT_TYPE_BITS                         6
 #define ACQ_ACK_PKT_LEN_IDX                       4
 #define ACQ_ACK_PKT_LEN_BITS                      16
 
-
 /* --------------------------------------------------*/
 /* Packet Data Type */
 /* --------------------------------------------------*/
 
-
 #define ACQ_YUV420_8_DATA                       24   /* 01 1000 YUV420 8-bit                                        */
 #define ACQ_YUV420_10_DATA                      25   /* 01 1001  YUV420 10-bit                                      */
 #define ACQ_YUV420_8L_DATA                      26   /* 01 1010   YUV420 8-bit legacy                               */
 #define ACQ_YUV422_8_DATA                       30   /* 01 1110   YUV422 8-bit                                      */
 #define ACQ_YUV422_10_DATA                      31   /* 01 1111   YUV422 10-bit                                     */
 #define ACQ_RGB444_DATA                         32   /* 10 0000   RGB444                                            */
-#define ACQ_RGB555_DATA                                                 33   /* 10 0001   RGB555                                            */
-#define ACQ_RGB565_DATA                                                 34   /* 10 0010   RGB565                                            */
-#define ACQ_RGB666_DATA                                                 35   /* 10 0011   RGB666                                            */
-#define ACQ_RGB888_DATA                                                 36   /* 10 0100   RGB888                                            */
-#define ACQ_RAW6_DATA                                                   40   /* 10 1000   RAW6                                              */
-#define ACQ_RAW7_DATA                                                   41   /* 10 1001   RAW7                                              */
-#define ACQ_RAW8_DATA                                                   42   /* 10 1010   RAW8                                              */
-#define ACQ_RAW10_DATA                                                  43   /* 10 1011   RAW10                                             */
-#define ACQ_RAW12_DATA                                                  44   /* 10 1100   RAW12                                             */
-#define ACQ_RAW14_DATA                                                  45   /* 10 1101   RAW14                                             */
-#define ACQ_USR_DEF_1_DATA                                              48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
-#define ACQ_USR_DEF_2_DATA                                              49   /* 11 0001    User Defined 8-bit Data Type 2                   */
-#define ACQ_USR_DEF_3_DATA                                              50   /* 11 0010    User Defined 8-bit Data Type 3                   */
-#define ACQ_USR_DEF_4_DATA                                              51   /* 11 0011    User Defined 8-bit Data Type 4                   */
-#define ACQ_USR_DEF_5_DATA                                              52   /* 11 0100    User Defined 8-bit Data Type 5                   */
-#define ACQ_USR_DEF_6_DATA                                              53   /* 11 0101    User Defined 8-bit Data Type 6                   */
-#define ACQ_USR_DEF_7_DATA                                              54   /* 11 0110    User Defined 8-bit Data Type 7                   */
-#define ACQ_USR_DEF_8_DATA                                              55   /* 11 0111    User Defined 8-bit Data Type 8                   */
-#define ACQ_Emb_DATA                                                    18   /* 01 0010    embedded eight bit non image data                */
-#define ACQ_SOF_DATA                                                    0   /* 00 0000    frame start                                      */
-#define ACQ_EOF_DATA                                                    1   /* 00 0001    frame end                                        */
-#define ACQ_SOL_DATA                                                    2   /* 00 0010    line start                                       */
-#define ACQ_EOL_DATA                                                    3   /* 00 0011    line end                                         */
-#define ACQ_GEN_SH1_DATA                                                8   /* 00 1000  Generic Short Packet Code 1                        */
-#define ACQ_GEN_SH2_DATA                                                9   /* 00 1001    Generic Short Packet Code 2                      */
-#define ACQ_GEN_SH3_DATA                                                10   /* 00 1010    Generic Short Packet Code 3                      */
-#define ACQ_GEN_SH4_DATA                                                11   /* 00 1011    Generic Short Packet Code 4                      */
-#define ACQ_GEN_SH5_DATA                                                12   /* 00 1100    Generic Short Packet Code 5                      */
-#define ACQ_GEN_SH6_DATA                                                13   /* 00 1101    Generic Short Packet Code 6                      */
-#define ACQ_GEN_SH7_DATA                                                14   /* 00 1110    Generic Short Packet Code 7                      */
-#define ACQ_GEN_SH8_DATA                                                15   /* 00 1111    Generic Short Packet Code 8                      */
-#define ACQ_YUV420_8_CSPS_DATA                                          28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
-#define ACQ_YUV420_10_CSPS_DATA                                         29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
+#define ACQ_RGB555_DATA                                                 33   /* 10 0001   RGB555                                            */
+#define ACQ_RGB565_DATA                                                 34   /* 10 0010   RGB565                                            */
+#define ACQ_RGB666_DATA                                                 35   /* 10 0011   RGB666                                            */
+#define ACQ_RGB888_DATA                                                 36   /* 10 0100   RGB888                                            */
+#define ACQ_RAW6_DATA                                                   40   /* 10 1000   RAW6                                              */
+#define ACQ_RAW7_DATA                                                   41   /* 10 1001   RAW7                                              */
+#define ACQ_RAW8_DATA                                                   42   /* 10 1010   RAW8                                              */
+#define ACQ_RAW10_DATA                                          43   /* 10 1011   RAW10                                             */
+#define ACQ_RAW12_DATA                                          44   /* 10 1100   RAW12                                             */
+#define ACQ_RAW14_DATA                                          45   /* 10 1101   RAW14                                             */
+#define ACQ_USR_DEF_1_DATA                                              48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
+#define ACQ_USR_DEF_2_DATA                                              49   /* 11 0001    User Defined 8-bit Data Type 2                   */
+#define ACQ_USR_DEF_3_DATA                                              50   /* 11 0010    User Defined 8-bit Data Type 3                   */
+#define ACQ_USR_DEF_4_DATA                                              51   /* 11 0011    User Defined 8-bit Data Type 4                   */
+#define ACQ_USR_DEF_5_DATA                                              52   /* 11 0100    User Defined 8-bit Data Type 5                   */
+#define ACQ_USR_DEF_6_DATA                                              53   /* 11 0101    User Defined 8-bit Data Type 6                   */
+#define ACQ_USR_DEF_7_DATA                                              54   /* 11 0110    User Defined 8-bit Data Type 7                   */
+#define ACQ_USR_DEF_8_DATA                                              55   /* 11 0111    User Defined 8-bit Data Type 8                   */
+#define ACQ_Emb_DATA                                                    18   /* 01 0010    embedded eight bit non image data                */
+#define ACQ_SOF_DATA                                                    0   /* 00 0000    frame start                                      */
+#define ACQ_EOF_DATA                                                    1   /* 00 0001    frame end                                        */
+#define ACQ_SOL_DATA                                                    2   /* 00 0010    line start                                       */
+#define ACQ_EOL_DATA                                                    3   /* 00 0011    line end                                         */
+#define ACQ_GEN_SH1_DATA                                                8   /* 00 1000  Generic Short Packet Code 1                        */
+#define ACQ_GEN_SH2_DATA                                                9   /* 00 1001    Generic Short Packet Code 2                      */
+#define ACQ_GEN_SH3_DATA                                                10   /* 00 1010    Generic Short Packet Code 3                      */
+#define ACQ_GEN_SH4_DATA                                                11   /* 00 1011    Generic Short Packet Code 4                      */
+#define ACQ_GEN_SH5_DATA                                                12   /* 00 1100    Generic Short Packet Code 5                      */
+#define ACQ_GEN_SH6_DATA                                                13   /* 00 1101    Generic Short Packet Code 6                      */
+#define ACQ_GEN_SH7_DATA                                                14   /* 00 1110    Generic Short Packet Code 7                      */
+#define ACQ_GEN_SH8_DATA                                                15   /* 00 1111    Generic Short Packet Code 8                      */
+#define ACQ_YUV420_8_CSPS_DATA                                  28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
+#define ACQ_YUV420_10_CSPS_DATA                                         29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
 #define ACQ_RESERVED_DATA_TYPE_MIN              56
 #define ACQ_RESERVED_DATA_TYPE_MAX              63
 #define ACQ_GEN_LONG_RESERVED_DATA_TYPE_MIN     19
 
 /* --------------------------------------------------*/
 
-#endif /* _isp_acquisition_defs_h */ 
+#endif /* _isp_acquisition_defs_h */
index aa413df022f2ed197fbec302d14b465b7deea48b..6c36d3b6f68108af194425f2a07de271ffa89951 100644 (file)
 #define _isp_capture_defs_h
 
 #define _ISP_CAPTURE_REG_ALIGN                    4  /* assuming 32 bit control bus width */
-#define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */                                                        
-#define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM/8        )                                          
-#define _ISP_CAPTURE_BYTES_PER_WORD               32           /* 256/8 */     
-#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM                       
+#define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */
+#define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM / 8)
+#define _ISP_CAPTURE_BYTES_PER_WORD               32           /* 256/8 */
+#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM
 
 //#define CAPT_RCV_ACK                              1
-//#define CAPT_WRT_ACK                              2               
-//#define CAPT_IRQ_ACK                              3                        
+//#define CAPT_WRT_ACK                              2
+//#define CAPT_IRQ_ACK                              3
 
 /* --------------------------------------------------*/
 
 
 // Register id's of MMIO slave accesible registers
 #define CAPT_START_MODE_REG_ID                    0
-#define CAPT_START_ADDR_REG_ID                    1 
-#define CAPT_MEM_REGION_SIZE_REG_ID               2 
-#define CAPT_NUM_MEM_REGIONS_REG_ID               3 
-#define CAPT_INIT_REG_ID                          4 
+#define CAPT_START_ADDR_REG_ID                    1
+#define CAPT_MEM_REGION_SIZE_REG_ID               2
+#define CAPT_NUM_MEM_REGIONS_REG_ID               3
+#define CAPT_INIT_REG_ID                          4
 #define CAPT_START_REG_ID                         5
-#define CAPT_STOP_REG_ID                          6  
+#define CAPT_STOP_REG_ID                          6
 
 #define CAPT_PACKET_LENGTH_REG_ID                 7
-#define CAPT_RECEIVED_LENGTH_REG_ID               8 
-#define CAPT_RECEIVED_SHORT_PACKETS_REG_ID        9 
-#define CAPT_RECEIVED_LONG_PACKETS_REG_ID         10 
-#define CAPT_LAST_COMMAND_REG_ID                  11        
+#define CAPT_RECEIVED_LENGTH_REG_ID               8
+#define CAPT_RECEIVED_SHORT_PACKETS_REG_ID        9
+#define CAPT_RECEIVED_LONG_PACKETS_REG_ID         10
+#define CAPT_LAST_COMMAND_REG_ID                  11
 #define CAPT_NEXT_COMMAND_REG_ID                  12
 #define CAPT_LAST_ACKNOWLEDGE_REG_ID              13
 #define CAPT_NEXT_ACKNOWLEDGE_REG_ID              14
 #define CAPT_FSM_STATE_INFO_REG_ID                15
 
 // Register width
-#define CAPT_START_MODE_REG_WIDTH                 1 
+#define CAPT_START_MODE_REG_WIDTH                 1
 //#define CAPT_START_ADDR_REG_WIDTH                 9
 //#define CAPT_MEM_REGION_SIZE_REG_WIDTH            9
 //#define CAPT_NUM_MEM_REGIONS_REG_WIDTH            9
 #define CAPT_WRITE2MEM_FSM_STATE_BITS             2
 #define CAPT_SYNCHRONIZER_FSM_STATE_BITS          3
 
-
 #define CAPT_PACKET_LENGTH_REG_WIDTH              17
-#define CAPT_RECEIVED_LENGTH_REG_WIDTH            17   
+#define CAPT_RECEIVED_LENGTH_REG_WIDTH            17
 #define CAPT_RECEIVED_SHORT_PACKETS_REG_WIDTH     32
 #define CAPT_RECEIVED_LONG_PACKETS_REG_WIDTH      32
 #define CAPT_LAST_COMMAND_REG_WIDTH               32
-/* #define CAPT_NEXT_COMMAND_REG_WIDTH               32 */  
+/* #define CAPT_NEXT_COMMAND_REG_WIDTH               32 */
 #define CAPT_LAST_ACKNOWLEDGE_REG_WIDTH           32
 #define CAPT_NEXT_ACKNOWLEDGE_REG_WIDTH           32
 #define CAPT_FSM_STATE_INFO_REG_WIDTH             ((CAPT_WRITE2MEM_FSM_STATE_BITS * 3) + (CAPT_SYNCHRONIZER_FSM_STATE_BITS * 3))
 
-//#define CAPT_INIT_RESTART_MEM_ADDR_WIDTH          9   
-//#define CAPT_INIT_RESTART_MEM_REGION_WIDTH        9 
+//#define CAPT_INIT_RESTART_MEM_ADDR_WIDTH          9
+//#define CAPT_INIT_RESTART_MEM_REGION_WIDTH        9
 
 /* register reset value */
-#define CAPT_START_MODE_REG_RSTVAL                0   
+#define CAPT_START_MODE_REG_RSTVAL                0
 #define CAPT_START_ADDR_REG_RSTVAL                0
 #define CAPT_MEM_REGION_SIZE_REG_RSTVAL           128
-#define CAPT_NUM_MEM_REGIONS_REG_RSTVAL           3 
+#define CAPT_NUM_MEM_REGIONS_REG_RSTVAL           3
 #define CAPT_INIT_REG_RSTVAL                      0
 
 #define CAPT_START_REG_RSTVAL                     0
 #define CAPT_INIT_RESTART_MEM_REGION_LSB          15
 #define CAPT_INIT_RESTART_MEM_REGION_MSB          25
 
-
 #define CAPT_INIT_RST_REG_IDX                     CAPT_INIT_RST_REG_BIT
 #define CAPT_INIT_RST_REG_BITS                    1
 #define CAPT_INIT_FLUSH_IDX                       CAPT_INIT_FLUSH_BIT
 #define CAPT_INIT_RESYNC_IDX                      CAPT_INIT_RESYNC_BIT
 #define CAPT_INIT_RESYNC_BITS                     1
 #define CAPT_INIT_RESTART_IDX                     CAPT_INIT_RESTART_BIT
-#define CAPT_INIT_RESTART_BITS                                                                 1
+#define CAPT_INIT_RESTART_BITS                                                                 1
 #define CAPT_INIT_RESTART_MEM_ADDR_IDX            CAPT_INIT_RESTART_MEM_ADDR_LSB
 #define CAPT_INIT_RESTART_MEM_ADDR_BITS           (CAPT_INIT_RESTART_MEM_ADDR_MSB - CAPT_INIT_RESTART_MEM_ADDR_LSB + 1)
 #define CAPT_INIT_RESTART_MEM_REGION_IDX          CAPT_INIT_RESTART_MEM_REGION_LSB
 #define CAPT_INIT_RESTART_MEM_REGION_BITS         (CAPT_INIT_RESTART_MEM_REGION_MSB - CAPT_INIT_RESTART_MEM_REGION_LSB + 1)
 
-
-
 /* --------------------------------------------------*/
 /* TOKEN INFO */
 /* --------------------------------------------------*/
 #define CAPT_TOKEN_ID_LSB                         0
-#define CAPT_TOKEN_ID_MSB                         3            
+#define CAPT_TOKEN_ID_MSB                         3
 #define CAPT_TOKEN_WIDTH                         (CAPT_TOKEN_ID_MSB - CAPT_TOKEN_ID_LSB  + 1) /* 4 */
 
 /* Command tokens IDs */
 #define CAPT_START_TOKEN_ID                       0 /* 0000b */
 #define CAPT_STOP_TOKEN_ID                        1 /* 0001b */
-#define CAPT_FREEZE_TOKEN_ID                      2 /* 0010b */  
+#define CAPT_FREEZE_TOKEN_ID                      2 /* 0010b */
 #define CAPT_RESUME_TOKEN_ID                      3 /* 0011b */
 #define CAPT_INIT_TOKEN_ID                        8 /* 1000b */
 
-#define CAPT_START_TOKEN_BIT                      0      
+#define CAPT_START_TOKEN_BIT                      0
 #define CAPT_STOP_TOKEN_BIT                       0
 #define CAPT_FREEZE_TOKEN_BIT                     0
 #define CAPT_RESUME_TOKEN_BIT                     0
 #define CAPT_PACKET_DATA_FORMAT_ID_TOKEN_LSB     20
 #define CAPT_PACKET_CH_ID_TOKEN_MSB              27
 #define CAPT_PACKET_CH_ID_TOKEN_LSB              26
-#define CAPT_PACKET_MEM_REGION_ID_TOKEN_MSB      29            
-#define CAPT_PACKET_MEM_REGION_ID_TOKEN_LSB      21            
+#define CAPT_PACKET_MEM_REGION_ID_TOKEN_MSB      29
+#define CAPT_PACKET_MEM_REGION_ID_TOKEN_LSB      21
 
 /*  bit definition */
 #define CAPT_CMD_IDX                              CAPT_TOKEN_ID_LSB
 #define CAPT_INIT_TOKEN_INIT_IDX                  4
 #define CAPT_INIT_TOKEN_INIT_BITS                 22
 
-
 /* --------------------------------------------------*/
 /* MIPI */
 /* --------------------------------------------------*/
 
-#define CAPT_WORD_COUNT_WIDTH                     16      
-#define CAPT_PKT_CODE_WIDTH                       6                  
-#define CAPT_CHN_NO_WIDTH                         2        
-#define CAPT_ERROR_INFO_WIDTH                     8       
+#define CAPT_WORD_COUNT_WIDTH                     16
+#define CAPT_PKT_CODE_WIDTH                       6
+#define CAPT_CHN_NO_WIDTH                         2
+#define CAPT_ERROR_INFO_WIDTH                     8
 
 #define LONG_PKTCODE_MAX                          63
 #define LONG_PKTCODE_MIN                          16
 #define SHORT_PKTCODE_MAX                         15
 
-
 /* --------------------------------------------------*/
 /* Packet Info */
 /* --------------------------------------------------*/
 #define CAPT_LINE_PAYLOAD                         4
 #define CAPT_GEN_SH_PKT                           5
 
-
 /* --------------------------------------------------*/
 /* Packet Data Type */
 /* --------------------------------------------------*/
 #define CAPT_YUV422_8_DATA                       30   /* 01 1110   YUV422 8-bit                                      */
 #define CAPT_YUV422_10_DATA                      31   /* 01 1111   YUV422 10-bit                                     */
 #define CAPT_RGB444_DATA                         32   /* 10 0000   RGB444                                            */
-#define CAPT_RGB555_DATA                                                33   /* 10 0001   RGB555                                            */
-#define CAPT_RGB565_DATA                                                34   /* 10 0010   RGB565                                            */
-#define CAPT_RGB666_DATA                                                35   /* 10 0011   RGB666                                            */
-#define CAPT_RGB888_DATA                                                36   /* 10 0100   RGB888                                            */
-#define CAPT_RAW6_DATA                                                  40   /* 10 1000   RAW6                                              */
-#define CAPT_RAW7_DATA                                                  41   /* 10 1001   RAW7                                              */
-#define CAPT_RAW8_DATA                                                  42   /* 10 1010   RAW8                                              */
-#define CAPT_RAW10_DATA                                                 43   /* 10 1011   RAW10                                             */
-#define CAPT_RAW12_DATA                                                 44   /* 10 1100   RAW12                                             */
-#define CAPT_RAW14_DATA                                                 45   /* 10 1101   RAW14                                             */
-#define CAPT_USR_DEF_1_DATA                                             48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
-#define CAPT_USR_DEF_2_DATA                                             49   /* 11 0001    User Defined 8-bit Data Type 2                   */
-#define CAPT_USR_DEF_3_DATA                                             50   /* 11 0010    User Defined 8-bit Data Type 3                   */
-#define CAPT_USR_DEF_4_DATA                                             51   /* 11 0011    User Defined 8-bit Data Type 4                   */
-#define CAPT_USR_DEF_5_DATA                                             52   /* 11 0100    User Defined 8-bit Data Type 5                   */
-#define CAPT_USR_DEF_6_DATA                                             53   /* 11 0101    User Defined 8-bit Data Type 6                   */
-#define CAPT_USR_DEF_7_DATA                                             54   /* 11 0110    User Defined 8-bit Data Type 7                   */
-#define CAPT_USR_DEF_8_DATA                                             55   /* 11 0111    User Defined 8-bit Data Type 8                   */
-#define CAPT_Emb_DATA                                                   18   /* 01 0010    embedded eight bit non image data                */
-#define CAPT_SOF_DATA                                                   0   /* 00 0000    frame start                                      */
-#define CAPT_EOF_DATA                                                   1   /* 00 0001    frame end                                        */
-#define CAPT_SOL_DATA                                                   2   /* 00 0010    line start                                       */
-#define CAPT_EOL_DATA                                                   3   /* 00 0011    line end                                         */
-#define CAPT_GEN_SH1_DATA                                               8   /* 00 1000  Generic Short Packet Code 1                        */
-#define CAPT_GEN_SH2_DATA                                               9   /* 00 1001    Generic Short Packet Code 2                      */
-#define CAPT_GEN_SH3_DATA                                               10   /* 00 1010    Generic Short Packet Code 3                      */
-#define CAPT_GEN_SH4_DATA                                               11   /* 00 1011    Generic Short Packet Code 4                      */
-#define CAPT_GEN_SH5_DATA                                               12   /* 00 1100    Generic Short Packet Code 5                      */
-#define CAPT_GEN_SH6_DATA                                               13   /* 00 1101    Generic Short Packet Code 6                      */
-#define CAPT_GEN_SH7_DATA                                               14   /* 00 1110    Generic Short Packet Code 7                      */
-#define CAPT_GEN_SH8_DATA                                               15   /* 00 1111    Generic Short Packet Code 8                      */
-#define CAPT_YUV420_8_CSPS_DATA                                         28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
-#define CAPT_YUV420_10_CSPS_DATA                                        29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
+#define CAPT_RGB555_DATA                                                33   /* 10 0001   RGB555                                            */
+#define CAPT_RGB565_DATA                                                34   /* 10 0010   RGB565                                            */
+#define CAPT_RGB666_DATA                                                35   /* 10 0011   RGB666                                            */
+#define CAPT_RGB888_DATA                                                36   /* 10 0100   RGB888                                            */
+#define CAPT_RAW6_DATA                                                  40   /* 10 1000   RAW6                                              */
+#define CAPT_RAW7_DATA                                                  41   /* 10 1001   RAW7                                              */
+#define CAPT_RAW8_DATA                                                  42   /* 10 1010   RAW8                                              */
+#define CAPT_RAW10_DATA                                                 43   /* 10 1011   RAW10                                             */
+#define CAPT_RAW12_DATA                                                 44   /* 10 1100   RAW12                                             */
+#define CAPT_RAW14_DATA                                                 45   /* 10 1101   RAW14                                             */
+#define CAPT_USR_DEF_1_DATA                                             48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
+#define CAPT_USR_DEF_2_DATA                                             49   /* 11 0001    User Defined 8-bit Data Type 2                   */
+#define CAPT_USR_DEF_3_DATA                                             50   /* 11 0010    User Defined 8-bit Data Type 3                   */
+#define CAPT_USR_DEF_4_DATA                                             51   /* 11 0011    User Defined 8-bit Data Type 4                   */
+#define CAPT_USR_DEF_5_DATA                                             52   /* 11 0100    User Defined 8-bit Data Type 5                   */
+#define CAPT_USR_DEF_6_DATA                                             53   /* 11 0101    User Defined 8-bit Data Type 6                   */
+#define CAPT_USR_DEF_7_DATA                                             54   /* 11 0110    User Defined 8-bit Data Type 7                   */
+#define CAPT_USR_DEF_8_DATA                                             55   /* 11 0111    User Defined 8-bit Data Type 8                   */
+#define CAPT_Emb_DATA                                                   18   /* 01 0010    embedded eight bit non image data                */
+#define CAPT_SOF_DATA                                                   0   /* 00 0000    frame start                                      */
+#define CAPT_EOF_DATA                                                   1   /* 00 0001    frame end                                        */
+#define CAPT_SOL_DATA                                                   2   /* 00 0010    line start                                       */
+#define CAPT_EOL_DATA                                                   3   /* 00 0011    line end                                         */
+#define CAPT_GEN_SH1_DATA                                               8   /* 00 1000  Generic Short Packet Code 1                        */
+#define CAPT_GEN_SH2_DATA                                               9   /* 00 1001    Generic Short Packet Code 2                      */
+#define CAPT_GEN_SH3_DATA                                               10   /* 00 1010    Generic Short Packet Code 3                      */
+#define CAPT_GEN_SH4_DATA                                               11   /* 00 1011    Generic Short Packet Code 4                      */
+#define CAPT_GEN_SH5_DATA                                               12   /* 00 1100    Generic Short Packet Code 5                      */
+#define CAPT_GEN_SH6_DATA                                               13   /* 00 1101    Generic Short Packet Code 6                      */
+#define CAPT_GEN_SH7_DATA                                               14   /* 00 1110    Generic Short Packet Code 7                      */
+#define CAPT_GEN_SH8_DATA                                               15   /* 00 1111    Generic Short Packet Code 8                      */
+#define CAPT_YUV420_8_CSPS_DATA                                         28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
+#define CAPT_YUV420_10_CSPS_DATA                                        29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
 #define CAPT_RESERVED_DATA_TYPE_MIN              56
 #define CAPT_RESERVED_DATA_TYPE_MAX              63
 #define CAPT_GEN_LONG_RESERVED_DATA_TYPE_MIN     19
 #define CAPT_RAW_RESERVED_DATA_TYPE_MIN          46
 #define CAPT_RAW_RESERVED_DATA_TYPE_MAX          47
 
-
 /* --------------------------------------------------*/
 /* Capture Unit State */
 /* --------------------------------------------------*/
 #define CAPT_FREEZE                               5
 #define CAPT_RUN                                  6
 
-
 /* --------------------------------------------------*/
 
-#endif /* _isp_capture_defs_h */ 
-
-
-
-
-
+#endif /* _isp_capture_defs_h */
index 67f68f1a65d79252d5921948e0329bca9b77ae99..84fe95c1640418690fb497006fd8b4e4f7c0269b 100644 (file)
@@ -21,7 +21,7 @@
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_CH_ID_WIDTH     2
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_FMT_TYPE_WIDTH  3
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_REAL_WIDTH (_HRT_CSS_RECEIVER_2400_GEN_SHORT_DATA_WIDTH + _HRT_CSS_RECEIVER_2400_GEN_SHORT_CH_ID_WIDTH + _HRT_CSS_RECEIVER_2400_GEN_SHORT_FMT_TYPE_WIDTH)
-#define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_WIDTH      32 /* use 32 to be compatibel with streaming monitor !, MSB's of interface are tied to '0' */ 
+#define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_WIDTH      32 /* use 32 to be compatibel with streaming monitor !, MSB's of interface are tied to '0' */
 
 /* Definition of data format ID at the interface CSS_receiver capture/acquisition units */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_8          24   /* 01 1000 YUV420 8-bit                                        */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_8_CSPS     28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_10_CSPS    29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
 /* used reserved mipi positions for these */
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW16             46 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18             47 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_2           37 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_3           38 
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW16             46
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18             47
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_2           37
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_3           38
 
 //_HRT_CSS_RECEIVER_2400_FMT_TYPE_CUSTOM 63
 #define _HRT_MIPI_BACKEND_FMT_TYPE_CUSTOM                       63
@@ -81,7 +81,7 @@
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB444           2  // 32
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB565           3  // 34
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB666           4  // 35
-#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW8             5  // 42 
+#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW8             5  // 42
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW10            6  // 43
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW6             7  // 40
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW7             8  // 41
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18           28  // ?
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18_2         29  // ? Option 2 for depacketiser
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18_3         30  // ? Option 3 for depacketiser
-#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_CUSTOM          31  // to signal custom decoding 
+#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_CUSTOM          31  // to signal custom decoding
 
 /* definition for state machine of data FIFO for decode different type of data */
-#define _HRT_CSS_RECEIVER_2400_YUV420_8_REPEAT_PTN                 1  
+#define _HRT_CSS_RECEIVER_2400_YUV420_8_REPEAT_PTN                 1
 #define _HRT_CSS_RECEIVER_2400_YUV420_10_REPEAT_PTN                5
 #define _HRT_CSS_RECEIVER_2400_YUV420_8L_REPEAT_PTN                1
 #define _HRT_CSS_RECEIVER_2400_YUV422_8_REPEAT_PTN                 1
 #define _HRT_CSS_RECEIVER_2400_YUV422_10_REPEAT_PTN                5
-#define _HRT_CSS_RECEIVER_2400_RGB444_REPEAT_PTN                   2 
+#define _HRT_CSS_RECEIVER_2400_RGB444_REPEAT_PTN                   2
 #define _HRT_CSS_RECEIVER_2400_RGB555_REPEAT_PTN                   2
 #define _HRT_CSS_RECEIVER_2400_RGB565_REPEAT_PTN                   2
-#define _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN                   9                       
+#define _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN                   9
 #define _HRT_CSS_RECEIVER_2400_RGB888_REPEAT_PTN                   3
 #define _HRT_CSS_RECEIVER_2400_RAW6_REPEAT_PTN                     3
 #define _HRT_CSS_RECEIVER_2400_RAW7_REPEAT_PTN                     7
 #define _HRT_CSS_RECEIVER_2400_RAW8_REPEAT_PTN                     1
 #define _HRT_CSS_RECEIVER_2400_RAW10_REPEAT_PTN                    5
-#define _HRT_CSS_RECEIVER_2400_RAW12_REPEAT_PTN                    3        
+#define _HRT_CSS_RECEIVER_2400_RAW12_REPEAT_PTN                    3
 #define _HRT_CSS_RECEIVER_2400_RAW14_REPEAT_PTN                    7
 
 #define _HRT_CSS_RECEIVER_2400_MAX_REPEAT_PTN                      _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN
 #define _HRT_CSS_RECEIVER_2400_BE_COMP_12_7_12                     5
 #define _HRT_CSS_RECEIVER_2400_BE_COMP_12_8_12                     6
 
-
 /* packet bit definition */
 #define _HRT_CSS_RECEIVER_2400_PKT_SOP_IDX                        32
 #define _HRT_CSS_RECEIVER_2400_PKT_SOP_BITS                        1
 #define _HRT_CSS_RECEIVER_2400_PKT_PAYLOAD_IDX                     0
 #define _HRT_CSS_RECEIVER_2400_PKT_PAYLOAD_BITS                   32
 
-
 /*************************************************************************************************/
 /* Custom Decoding                                                                               */
 /* These Custom Defs are defined based on design-time config in "mipi_backend_pixel_formatter.chdl" !! */
 /*************************************************************************************************/
 /*
-#define BE_CUST_EN_IDX                     0     // 2bits 
-#define BE_CUST_EN_DATAID_IDX              2     // 6bits MIPI DATA ID 
-#define BE_CUST_EN_WIDTH                   8     
-#define BE_CUST_MODE_ALL                   1     // Enable Custom Decoding for all DATA IDs 
-#define BE_CUST_MODE_ONE                   3     // Enable Custom Decoding for ONE DATA ID, programmed in CUST_EN_DATA_ID 
+#define BE_CUST_EN_IDX                     0     // 2bits
+#define BE_CUST_EN_DATAID_IDX              2     // 6bits MIPI DATA ID
+#define BE_CUST_EN_WIDTH                   8
+#define BE_CUST_MODE_ALL                   1     // Enable Custom Decoding for all DATA IDs
+#define BE_CUST_MODE_ONE                   3     // Enable Custom Decoding for ONE DATA ID, programmed in CUST_EN_DATA_ID
 
 // Data State config = {get_bits(6bits), valid(1bit)}  //
 #define BE_CUST_DATA_STATE_S0_IDX          0     // 7bits
-#define BE_CUST_DATA_STATE_S1_IDX          8 //7      // 7bits 
+#define BE_CUST_DATA_STATE_S1_IDX          8 //7      // 7bits
 #define BE_CUST_DATA_STATE_S2_IDX          16//14    // 7bits /
-#define BE_CUST_DATA_STATE_WIDTH           24//21    
-#define BE_CUST_DATA_STATE_VALID_IDX       0     // 1bits 
-#define BE_CUST_DATA_STATE_GETBITS_IDX     1     // 6bits 
-
-
-
+#define BE_CUST_DATA_STATE_WIDTH           24//21
+#define BE_CUST_DATA_STATE_VALID_IDX       0     // 1bits
+#define BE_CUST_DATA_STATE_GETBITS_IDX     1     // 6bits
 
-// Pixel Extractor config 
-#define BE_CUST_PIX_EXT_DATA_ALIGN_IDX     0     // 6bits 
-#define BE_CUST_PIX_EXT_PIX_ALIGN_IDX      6//5     // 5bits 
+// Pixel Extractor config
+#define BE_CUST_PIX_EXT_DATA_ALIGN_IDX     0     // 6bits
+#define BE_CUST_PIX_EXT_PIX_ALIGN_IDX      6//5     // 5bits
 #define BE_CUST_PIX_EXT_PIX_MASK_IDX       11//10    // 18bits
 #define BE_CUST_PIX_EXT_PIX_EN_IDX         29 //28    // 1bits
 
-#define BE_CUST_PIX_EXT_WIDTH              30//29    
+#define BE_CUST_PIX_EXT_WIDTH              30//29
 
-// Pixel Valid & EoP config = {[eop,valid](especial), [eop,valid](normal)} 
-#define BE_CUST_PIX_VALID_EOP_P0_IDX        0    // 4bits 
-#define BE_CUST_PIX_VALID_EOP_P1_IDX        4    // 4bits 
-#define BE_CUST_PIX_VALID_EOP_P2_IDX        8    // 4bits 
-#define BE_CUST_PIX_VALID_EOP_P3_IDX        12   // 4bits 
-#define BE_CUST_PIX_VALID_EOP_WIDTH         16 
+// Pixel Valid & EoP config = {[eop,valid](especial), [eop,valid](normal)}
+#define BE_CUST_PIX_VALID_EOP_P0_IDX        0    // 4bits
+#define BE_CUST_PIX_VALID_EOP_P1_IDX        4    // 4bits
+#define BE_CUST_PIX_VALID_EOP_P2_IDX        8    // 4bits
+#define BE_CUST_PIX_VALID_EOP_P3_IDX        12   // 4bits
+#define BE_CUST_PIX_VALID_EOP_WIDTH         16
 #define BE_CUST_PIX_VALID_EOP_NOR_VALID_IDX 0    // Normal (NO less get_bits case) Valid - 1bits
-#define BE_CUST_PIX_VALID_EOP_NOR_EOP_IDX   1    // Normal (NO less get_bits case) EoP - 1bits 
-#define BE_CUST_PIX_VALID_EOP_ESP_VALID_IDX 2    // Especial (less get_bits case) Valid - 1bits 
+#define BE_CUST_PIX_VALID_EOP_NOR_EOP_IDX   1    // Normal (NO less get_bits case) EoP - 1bits
+#define BE_CUST_PIX_VALID_EOP_ESP_VALID_IDX 2    // Especial (less get_bits case) Valid - 1bits
 #define BE_CUST_PIX_VALID_EOP_ESP_EOP_IDX   3    // Especial (less get_bits case) EoP - 1bits
 
 */
 
 #endif /* _mipi_backend_common_defs_h_ */
-#endif /* _css_receiver_2400_common_defs_h_ */ 
+#endif /* _css_receiver_2400_common_defs_h_ */
index db5a1d2caba0b754e81e14b2daa182ae7b16f1e9..45f20b5243683b1a27a7215031739fa81007a6d3 100644 (file)
 
 #include "mipi_backend_common_defs.h"
 
-#define MIPI_BACKEND_REG_ALIGN                    4 // assuming 32 bit control bus width 
+#define MIPI_BACKEND_REG_ALIGN                    4 // assuming 32 bit control bus width
 
-#define _HRT_MIPI_BACKEND_NOF_IRQS                         3 // sid_lut     
+#define _HRT_MIPI_BACKEND_NOF_IRQS                         3 // sid_lut
 
 // SH Backend Register IDs
-#define _HRT_MIPI_BACKEND_ENABLE_REG_IDX                   0  
-#define _HRT_MIPI_BACKEND_STATUS_REG_IDX                   1  
+#define _HRT_MIPI_BACKEND_ENABLE_REG_IDX                   0
+#define _HRT_MIPI_BACKEND_STATUS_REG_IDX                   1
 //#define _HRT_MIPI_BACKEND_HIGH_PREC_REG_IDX                2
 #define _HRT_MIPI_BACKEND_COMP_FORMAT_REG0_IDX             2
 #define _HRT_MIPI_BACKEND_COMP_FORMAT_REG1_IDX             3
@@ -35,7 +35,7 @@
 #define _HRT_MIPI_BACKEND_IRQ_STATUS_REG_IDX               9
 #define _HRT_MIPI_BACKEND_IRQ_CLEAR_REG_IDX               10
 ////
-#define _HRT_MIPI_BACKEND_CUST_EN_REG_IDX                 11        
+#define _HRT_MIPI_BACKEND_CUST_EN_REG_IDX                 11
 #define _HRT_MIPI_BACKEND_CUST_DATA_STATE_REG_IDX         12
 #define _HRT_MIPI_BACKEND_CUST_PIX_EXT_S0P0_REG_IDX       13
 #define _HRT_MIPI_BACKEND_CUST_PIX_EXT_S0P1_REG_IDX       14
 #define _HRT_MIPI_BACKEND_GLOBAL_LUT_DISREGARD_REG_IDX    26
 #define _HRT_MIPI_BACKEND_PKT_STALL_STATUS_REG_IDX        27
 //#define _HRT_MIPI_BACKEND_SP_LUT_ENABLE_REG_IDX           28
-#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_0_REG_IDX          28 
-#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_1_REG_IDX          29 
-#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_2_REG_IDX          30  
-#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_3_REG_IDX          31 
+#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_0_REG_IDX          28
+#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_1_REG_IDX          29
+#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_2_REG_IDX          30
+#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_3_REG_IDX          31
 
 #define _HRT_MIPI_BACKEND_NOF_REGISTERS                   32 // excluding the LP LUT entries
 
 #define _HRT_MIPI_BACKEND_LP_LUT_ENTRY_0_REG_IDX          32
 
-
 /////////////////////////////////////////////////////////////////////////////////////////////////////
-#define _HRT_MIPI_BACKEND_ENABLE_REG_WIDTH                 1  
-#define _HRT_MIPI_BACKEND_STATUS_REG_WIDTH                 1  
+#define _HRT_MIPI_BACKEND_ENABLE_REG_WIDTH                 1
+#define _HRT_MIPI_BACKEND_STATUS_REG_WIDTH                 1
 //#define _HRT_MIPI_BACKEND_HIGH_PREC_REG_WIDTH              1
 #define _HRT_MIPI_BACKEND_COMP_FORMAT_REG_WIDTH           32
-#define _HRT_MIPI_BACKEND_RAW16_CONFIG_REG_WIDTH           7 
+#define _HRT_MIPI_BACKEND_RAW16_CONFIG_REG_WIDTH           7
 #define _HRT_MIPI_BACKEND_RAW18_CONFIG_REG_WIDTH           9
 #define _HRT_MIPI_BACKEND_FORCE_RAW8_REG_WIDTH             8
 #define _HRT_MIPI_BACKEND_IRQ_STATUS_REG_WIDTH            _HRT_MIPI_BACKEND_NOF_IRQS
-#define _HRT_MIPI_BACKEND_IRQ_CLEAR_REG_WIDTH              0 
+#define _HRT_MIPI_BACKEND_IRQ_CLEAR_REG_WIDTH              0
 #define _HRT_MIPI_BACKEND_GLOBAL_LUT_DISREGARD_REG_WIDTH   1
-#define _HRT_MIPI_BACKEND_PKT_STALL_STATUS_REG_WIDTH       1+2+6
+#define _HRT_MIPI_BACKEND_PKT_STALL_STATUS_REG_WIDTH       1 + 2 + 6
 //#define _HRT_MIPI_BACKEND_SP_LUT_ENABLE_REG_WIDTH          1
-//#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_0_REG_WIDTH         7 
-//#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_1_REG_WIDTH         7 
-//#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_2_REG_WIDTH         7 
-//#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_3_REG_WIDTH         7 
+//#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_0_REG_WIDTH         7
+//#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_1_REG_WIDTH         7
+//#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_2_REG_WIDTH         7
+//#define _HRT_MIPI_BACKEND_SP_LUT_ENTRY_3_REG_WIDTH         7
 
 /////////////////////////////////////////////////////////////////////////////////////////////////////
 
 #define _HRT_MIPI_BACKEND_NOF_SP_LUT_ENTRIES               4
 
 //#define _HRT_MIPI_BACKEND_MAX_NOF_LP_LUT_ENTRIES           16  // to satisfy hss model static array declaration
 
 #define _HRT_MIPI_BACKEND_CHANNEL_ID_WIDTH                 2
 #define _HRT_MIPI_BACKEND_FORMAT_TYPE_WIDTH                6
 /* These Custom Defs are defined based on design-time config in "mipi_backend_pixel_formatter.chdl" !! */
 /*************************************************************************************************/
 #define _HRT_MIPI_BACKEND_CUST_EN_IDX                     0     /* 2bits */
-#define _HRT_MIPI_BACKEND_CUST_EN_DATAID_IDX              2     /* 6bits MIPI DATA ID */ 
+#define _HRT_MIPI_BACKEND_CUST_EN_DATAID_IDX              2     /* 6bits MIPI DATA ID */
 #define _HRT_MIPI_BACKEND_CUST_EN_HIGH_PREC_IDX           8     // 1 bit
-#define _HRT_MIPI_BACKEND_CUST_EN_WIDTH                   9     
+#define _HRT_MIPI_BACKEND_CUST_EN_WIDTH                   9
 #define _HRT_MIPI_BACKEND_CUST_MODE_ALL                   1     /* Enable Custom Decoding for all DATA IDs */
 #define _HRT_MIPI_BACKEND_CUST_MODE_ONE                   3     /* Enable Custom Decoding for ONE DATA ID, programmed in CUST_EN_DATA_ID */
 
-#define _HRT_MIPI_BACKEND_CUST_EN_OPTION_IDX              1    
+#define _HRT_MIPI_BACKEND_CUST_EN_OPTION_IDX              1
 
 /* Data State config = {get_bits(6bits), valid(1bit)}  */
-#define _HRT_MIPI_BACKEND_CUST_DATA_STATE_S0_IDX          0     /* 7bits */ 
-#define _HRT_MIPI_BACKEND_CUST_DATA_STATE_S1_IDX          8     /* 7bits */ 
+#define _HRT_MIPI_BACKEND_CUST_DATA_STATE_S0_IDX          0     /* 7bits */
+#define _HRT_MIPI_BACKEND_CUST_DATA_STATE_S1_IDX          8     /* 7bits */
 #define _HRT_MIPI_BACKEND_CUST_DATA_STATE_S2_IDX          16    /* was 14 7bits */
 #define _HRT_MIPI_BACKEND_CUST_DATA_STATE_WIDTH           24    /* was 21*/
 #define _HRT_MIPI_BACKEND_CUST_DATA_STATE_VALID_IDX       0     /* 1bits */
 #define _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_P1_IDX        4    /* 4bits */
 #define _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_P2_IDX        8    /* 4bits */
 #define _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_P3_IDX        12   /* 4bits */
-#define _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_WIDTH         16 
+#define _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_WIDTH         16
 #define _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_NOR_VALID_IDX 0    /* Normal (NO less get_bits case) Valid - 1bits */
 #define _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_NOR_EOP_IDX   1    /* Normal (NO less get_bits case) EoP - 1bits */
 #define _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_ESP_VALID_IDX 2    /* Especial (less get_bits case) Valid - 1bits */
 #define HRT_MIPI_BACKEND_STREAM_EOF_BIT                      2
 #define HRT_MIPI_BACKEND_STREAM_SOF_BIT                      3
 #define HRT_MIPI_BACKEND_STREAM_CHID_LS_BIT                  4
-#define HRT_MIPI_BACKEND_STREAM_CHID_MS_BIT(sid_width)      (HRT_MIPI_BACKEND_STREAM_CHID_LS_BIT+(sid_width)-1)
-#define HRT_MIPI_BACKEND_STREAM_PIX_VAL_BIT(sid_width,p)    (HRT_MIPI_BACKEND_STREAM_CHID_MS_BIT(sid_width)+1+p)
+#define HRT_MIPI_BACKEND_STREAM_CHID_MS_BIT(sid_width)      (HRT_MIPI_BACKEND_STREAM_CHID_LS_BIT + (sid_width) - 1)
+#define HRT_MIPI_BACKEND_STREAM_PIX_VAL_BIT(sid_width, p)    (HRT_MIPI_BACKEND_STREAM_CHID_MS_BIT(sid_width) + 1 + p)
 
-#define HRT_MIPI_BACKEND_STREAM_PIX_LS_BIT(sid_width,ppc,pix_width,p) (HRT_MIPI_BACKEND_STREAM_PIX_VAL_BIT(sid_width,ppc)+ ((pix_width)*p))
-#define HRT_MIPI_BACKEND_STREAM_PIX_MS_BIT(sid_width,ppc,pix_width,p) (HRT_MIPI_BACKEND_STREAM_PIX_LS_BIT(sid_width,ppc,pix_width,p) + (pix_width) - 1)
+#define HRT_MIPI_BACKEND_STREAM_PIX_LS_BIT(sid_width, ppc, pix_width, p) (HRT_MIPI_BACKEND_STREAM_PIX_VAL_BIT(sid_width, ppc) + ((pix_width) * p))
+#define HRT_MIPI_BACKEND_STREAM_PIX_MS_BIT(sid_width, ppc, pix_width, p) (HRT_MIPI_BACKEND_STREAM_PIX_LS_BIT(sid_width, ppc, pix_width, p) + (pix_width) - 1)
 
 #if 0
 //#define HRT_MIPI_BACKEND_STREAM_PIX_BITS                    14
 //#define HRT_MIPI_BACKEND_STREAM_PPC                          4
 #endif
 
-#define HRT_MIPI_BACKEND_STREAM_BITS(sid_width,ppc,pix_width)         (HRT_MIPI_BACKEND_STREAM_PIX_MS_BIT(sid_width,ppc,pix_width,(ppc-1))+1)
-
+#define HRT_MIPI_BACKEND_STREAM_BITS(sid_width, ppc, pix_width)         (HRT_MIPI_BACKEND_STREAM_PIX_MS_BIT(sid_width, ppc, pix_width, (ppc - 1)) + 1)
 
 /* SP and LP LUT BIT POSITIONS */
-#define HRT_MIPI_BACKEND_LUT_PKT_DISREGARD_BIT              0                                                                                           // 0    
-#define HRT_MIPI_BACKEND_LUT_SID_LS_BIT                     HRT_MIPI_BACKEND_LUT_PKT_DISREGARD_BIT + 1                                                  // 1    
-#define HRT_MIPI_BACKEND_LUT_SID_MS_BIT(sid_width)          (HRT_MIPI_BACKEND_LUT_SID_LS_BIT+(sid_width)-1)                                             // 1 + (4) - 1 = 4  
+#define HRT_MIPI_BACKEND_LUT_PKT_DISREGARD_BIT              0                                                                                           // 0
+#define HRT_MIPI_BACKEND_LUT_SID_LS_BIT                     HRT_MIPI_BACKEND_LUT_PKT_DISREGARD_BIT + 1                                                  // 1
+#define HRT_MIPI_BACKEND_LUT_SID_MS_BIT(sid_width)          (HRT_MIPI_BACKEND_LUT_SID_LS_BIT + (sid_width) - 1)                                             // 1 + (4) - 1 = 4
 #define HRT_MIPI_BACKEND_LUT_MIPI_CH_ID_LS_BIT(sid_width)   HRT_MIPI_BACKEND_LUT_SID_MS_BIT(sid_width) + 1                                              // 5
 #define HRT_MIPI_BACKEND_LUT_MIPI_CH_ID_MS_BIT(sid_width)   HRT_MIPI_BACKEND_LUT_MIPI_CH_ID_LS_BIT(sid_width) + _HRT_MIPI_BACKEND_CHANNEL_ID_WIDTH - 1  // 6
 #define HRT_MIPI_BACKEND_LUT_MIPI_FMT_LS_BIT(sid_width)     HRT_MIPI_BACKEND_LUT_MIPI_CH_ID_MS_BIT(sid_width) + 1                                       // 7
-#define HRT_MIPI_BACKEND_LUT_MIPI_FMT_MS_BIT(sid_width)     HRT_MIPI_BACKEND_LUT_MIPI_FMT_LS_BIT(sid_width) + _HRT_MIPI_BACKEND_FORMAT_TYPE_WIDTH - 1   // 12    
+#define HRT_MIPI_BACKEND_LUT_MIPI_FMT_MS_BIT(sid_width)     HRT_MIPI_BACKEND_LUT_MIPI_FMT_LS_BIT(sid_width) + _HRT_MIPI_BACKEND_FORMAT_TYPE_WIDTH - 1   // 12
 
 /* #define HRT_MIPI_BACKEND_SP_LUT_BITS(sid_width)             HRT_MIPI_BACKEND_LUT_MIPI_CH_ID_MS_BIT(sid_width) + 1                                       // 7          */
 
-#define HRT_MIPI_BACKEND_SP_LUT_BITS(sid_width)             HRT_MIPI_BACKEND_LUT_SID_MS_BIT(sid_width) + 1  
+#define HRT_MIPI_BACKEND_SP_LUT_BITS(sid_width)             HRT_MIPI_BACKEND_LUT_SID_MS_BIT(sid_width) + 1
 #define HRT_MIPI_BACKEND_LP_LUT_BITS(sid_width)             HRT_MIPI_BACKEND_LUT_MIPI_FMT_MS_BIT(sid_width) + 1                                         // 13
 
-
 // temp solution
-//#define HRT_MIPI_BACKEND_STREAM_PIXA_VAL_BIT                HRT_MIPI_BACKEND_STREAM_CHID_MS_BIT  + 1                                    // 8                     
+//#define HRT_MIPI_BACKEND_STREAM_PIXA_VAL_BIT                HRT_MIPI_BACKEND_STREAM_CHID_MS_BIT  + 1                                    // 8
 //#define HRT_MIPI_BACKEND_STREAM_PIXB_VAL_BIT                HRT_MIPI_BACKEND_STREAM_PIXA_VAL_BIT + 1                                    // 9
 //#define HRT_MIPI_BACKEND_STREAM_PIXC_VAL_BIT                HRT_MIPI_BACKEND_STREAM_PIXB_VAL_BIT + 1                                    // 10
 //#define HRT_MIPI_BACKEND_STREAM_PIXD_VAL_BIT                HRT_MIPI_BACKEND_STREAM_PIXC_VAL_BIT + 1                                    // 11
 //#define HRT_MIPI_BACKEND_STREAM_PIXC_MS_BIT                 HRT_MIPI_BACKEND_STREAM_PIXC_LS_BIT  + HRT_MIPI_BACKEND_STREAM_PIX_BITS - 1 // 53
 //#define HRT_MIPI_BACKEND_STREAM_PIXD_LS_BIT                 HRT_MIPI_BACKEND_STREAM_PIXC_MS_BIT + 1                                     // 54
 //#define HRT_MIPI_BACKEND_STREAM_PIXD_MS_BIT                 HRT_MIPI_BACKEND_STREAM_PIXD_LS_BIT  + HRT_MIPI_BACKEND_STREAM_PIX_BITS - 1 // 67
-// vc hidden in pixb data (passed as raw12 the pipe)
-#define HRT_MIPI_BACKEND_STREAM_VC_LS_BIT(sid_width,ppc,pix_width)  HRT_MIPI_BACKEND_STREAM_PIX_LS_BIT(sid_width,ppc,pix_width,1) + 10  //HRT_MIPI_BACKEND_STREAM_PIXB_LS_BIT + 10 // 36 
-#define HRT_MIPI_BACKEND_STREAM_VC_MS_BIT(sid_width,ppc,pix_width)  HRT_MIPI_BACKEND_STREAM_VC_LS_BIT(sid_width,ppc,pix_width) + 1    // 37
-
-
 
+// vc hidden in pixb data (passed as raw12 the pipe)
+#define HRT_MIPI_BACKEND_STREAM_VC_LS_BIT(sid_width, ppc, pix_width)  HRT_MIPI_BACKEND_STREAM_PIX_LS_BIT(sid_width, ppc, pix_width, 1) + 10  //HRT_MIPI_BACKEND_STREAM_PIXB_LS_BIT + 10 // 36
+#define HRT_MIPI_BACKEND_STREAM_VC_MS_BIT(sid_width, ppc, pix_width)  HRT_MIPI_BACKEND_STREAM_VC_LS_BIT(sid_width, ppc, pix_width) + 1    // 37
 
 #endif /* _mipi_backend_defs_h */
index 0aad86e2e9145b5ee7ce7d37ec8673245b4d0337..a8d0dbd7f6d72c61eaaa3f164ec9b1beceebb7f5 100644 (file)
@@ -17,8 +17,6 @@
 
 //#include "rx_csi_common_defs.h"
 
-
-
 #define MIPI_PKT_DATA_WIDTH                         32
 //#define CLK_CROSSING_FIFO_DEPTH                     16
 #define _CSI_RX_REG_ALIGN                            4
 // REGISTER DESCRIPTION
 //#define _HRT_CSI_RX_SOFTRESET_REG_IDX                0
 #define _HRT_CSI_RX_ENABLE_REG_IDX                   0
-#define _HRT_CSI_RX_NOF_ENABLED_LANES_REG_IDX        1  
+#define _HRT_CSI_RX_NOF_ENABLED_LANES_REG_IDX        1
 #define _HRT_CSI_RX_ERROR_HANDLING_REG_IDX           2
-#define _HRT_CSI_RX_STATUS_REG_IDX                   3  
-#define _HRT_CSI_RX_STATUS_DLANE_HS_REG_IDX          4  
-#define _HRT_CSI_RX_STATUS_DLANE_LP_REG_IDX          5  
-//#define _HRT_CSI_RX_IRQ_CONFIG_REG_IDX               6  
+#define _HRT_CSI_RX_STATUS_REG_IDX                   3
+#define _HRT_CSI_RX_STATUS_DLANE_HS_REG_IDX          4
+#define _HRT_CSI_RX_STATUS_DLANE_LP_REG_IDX          5
+//#define _HRT_CSI_RX_IRQ_CONFIG_REG_IDX               6
 #define _HRT_CSI_RX_DLY_CNT_TERMEN_CLANE_REG_IDX     6
 #define _HRT_CSI_RX_DLY_CNT_SETTLE_CLANE_REG_IDX     7
-#define _HRT_CSI_RX_DLY_CNT_TERMEN_DLANE_REG_IDX(lane_idx)    (8+(2*lane_idx))
-#define _HRT_CSI_RX_DLY_CNT_SETTLE_DLANE_REG_IDX(lane_idx)    (8+(2*lane_idx)+1)
-
-#define _HRT_CSI_RX_NOF_REGISTERS(nof_dlanes)      (8+2*(nof_dlanes))
+#define _HRT_CSI_RX_DLY_CNT_TERMEN_DLANE_REG_IDX(lane_idx)    (8 + (2 * lane_idx))
+#define _HRT_CSI_RX_DLY_CNT_SETTLE_DLANE_REG_IDX(lane_idx)    (8 + (2 * lane_idx) + 1)
 
+#define _HRT_CSI_RX_NOF_REGISTERS(nof_dlanes)      (8 + 2 * (nof_dlanes))
 
 //#define _HRT_CSI_RX_SOFTRESET_REG_WIDTH              1
 #define _HRT_CSI_RX_ENABLE_REG_WIDTH                 1
 #define _HRT_CSI_RX_NOF_ENABLED_LANES_REG_WIDTH      3
-#define _HRT_CSI_RX_ERROR_HANDLING_REG_WIDTH         4 
-#define _HRT_CSI_RX_STATUS_REG_WIDTH                 1   
-#define _HRT_CSI_RX_STATUS_DLANE_HS_REG_WIDTH        8  
+#define _HRT_CSI_RX_ERROR_HANDLING_REG_WIDTH         4
+#define _HRT_CSI_RX_STATUS_REG_WIDTH                 1
+#define _HRT_CSI_RX_STATUS_DLANE_HS_REG_WIDTH        8
 #define _HRT_CSI_RX_STATUS_DLANE_LP_REG_WIDTH        24
 #define _HRT_CSI_RX_IRQ_CONFIG_REG_WIDTH             (CSI_RX_NOF_IRQS_ISP_DOMAIN)
 #define _HRT_CSI_RX_DLY_CNT_REG_WIDTH                24
-//#define _HRT_CSI_RX_IRQ_STATUS_REG_WIDTH            NOF_IRQS 
+//#define _HRT_CSI_RX_IRQ_STATUS_REG_WIDTH            NOF_IRQS
 //#define _HRT_CSI_RX_IRQ_CLEAR_REG_WIDTH             0
 
-
 #define ONE_LANE_ENABLED                             0
 #define TWO_LANES_ENABLED                            1
-#define THREE_LANES_ENABLED                          2    
+#define THREE_LANES_ENABLED                          2
 #define FOUR_LANES_ENABLED                           3
 
 // Error handling reg bit positions
@@ -71,7 +67,7 @@
 #define _HRT_CSI_RX_IRQ_CONFIG_REG_VAL_POSEDGE      0
 #define _HRT_CSI_RX_IRQ_CONFIG_REG_VAL_ORIGINAL     1
 
-// Interrupt bits 
+// Interrupt bits
 #define _HRT_RX_CSI_IRQ_SINGLE_PH_ERROR_CORRECTED   0
 #define _HRT_RX_CSI_IRQ_MULTIPLE_PH_ERROR_DETECTED  1
 #define _HRT_RX_CSI_IRQ_PAYLOAD_CHECKSUM_ERROR      2
 #define _HRT_RX_CSI_IRQ_ERR_LINE_SYNC_BIT         16
 */
 
-
 ////Bit Description for reg _HRT_CSI_RX_STATUS_DLANE_HS_REG_IDX
 #define _HRT_CSI_RX_STATUS_DLANE_HS_SOT_ERR_LANE0        0
 #define _HRT_CSI_RX_STATUS_DLANE_HS_SOT_ERR_LANE1        1
 #define _HRT_RX_CSI_DATA_FORMAT_ID_SOL                2   /* 00 0010    line start                                       */
 #define _HRT_RX_CSI_DATA_FORMAT_ID_EOL                3   /* 00 0011    line end                                         */
 
-
-#endif /* _csi_rx_defs_h */ 
+#endif /* _csi_rx_defs_h */
index 46b52fe5ae995900f6d75019a28681ba43efca4a..988b3ebc953da035f546d8e56ba7795e641011cc 100644 (file)
@@ -25,7 +25,7 @@
 #define _STREAM2MMIO_START_ADDR_REG_ID          3      /* master port address,NOT Byte */
 #define _STREAM2MMIO_END_ADDR_REG_ID            4      /* master port address,NOT Byte */
 #define _STREAM2MMIO_STRIDE_REG_ID              5      /* stride in master port words, increment is per packet for long sids, stride is not used for short sid's*/
-#define _STREAM2MMIO_NUM_ITEMS_REG_ID           6      /* number of packets for store packets cmd, number of words for store_words cmd */ 
+#define _STREAM2MMIO_NUM_ITEMS_REG_ID           6      /* number of packets for store packets cmd, number of words for store_words cmd */
 #define _STREAM2MMIO_BLOCK_WHEN_NO_CMD_REG_ID   7      /* if this register is 1, input will be stalled if there is no pending command for this sid */
 #define _STREAM2MMIO_REGS_PER_SID               8
 
@@ -36,7 +36,7 @@
 #define _STREAM2MMIO_CMD_TOKEN_CMD_LSB          0      /* bits 1-0 is for the command field */
 #define _STREAM2MMIO_CMD_TOKEN_CMD_MSB          1
 
-#define _STREAM2MMIO_CMD_TOKEN_WIDTH           (_STREAM2MMIO_CMD_TOKEN_CMD_MSB+1-_STREAM2MMIO_CMD_TOKEN_CMD_LSB)
+#define _STREAM2MMIO_CMD_TOKEN_WIDTH           (_STREAM2MMIO_CMD_TOKEN_CMD_MSB + 1 - _STREAM2MMIO_CMD_TOKEN_CMD_LSB)
 
 #define _STREAM2MMIO_CMD_TOKEN_STORE_WORDS              0      /* command for storing a number of output words indicated by reg _STREAM2MMIO_NUM_ITEMS */
 #define _STREAM2MMIO_CMD_TOKEN_STORE_PACKETS            1      /* command for storing a number of packets indicated by reg _STREAM2MMIO_NUM_ITEMS      */
 /*         count - indicates number of words stored */
 #define _STREAM2MMIO_PACK_NUM_ITEMS_BITS        16
 #define _STREAM2MMIO_PACK_ACK_EOP_BIT           _STREAM2MMIO_PACK_NUM_ITEMS_BITS
-#define _STREAM2MMIO_PACK_ACK_EOF_BIT           (_STREAM2MMIO_PACK_ACK_EOP_BIT+1)
+#define _STREAM2MMIO_PACK_ACK_EOF_BIT           (_STREAM2MMIO_PACK_ACK_EOP_BIT + 1)
 
 /* acknowledge token definition */
 #define _STREAM2MMIO_ACK_TOKEN_NUM_ITEMS_LSB    0      /* bits 3-0 is for the command field */
-#define _STREAM2MMIO_ACK_TOKEN_NUM_ITEMS_MSB   (_STREAM2MMIO_PACK_NUM_ITEMS_BITS-1)
+#define _STREAM2MMIO_ACK_TOKEN_NUM_ITEMS_MSB   (_STREAM2MMIO_PACK_NUM_ITEMS_BITS - 1)
 #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     */
-#define _STREAM2MMIO_ACK_TOKEN_WIDTH           (_STREAM2MMIO_ACK_TOKEN_VALID_BIT+1)
+#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     */
+#define _STREAM2MMIO_ACK_TOKEN_WIDTH           (_STREAM2MMIO_ACK_TOKEN_VALID_BIT + 1)
 
 /* commands for packer module */
 #define _STREAM2MMIO_PACK_CMD_STORE_WORDS        0
 #define _STREAM2MMIO_PACK_CMD_STORE_LONG_PACKET  1
 #define _STREAM2MMIO_PACK_CMD_STORE_SHORT_PACKET 2
 
-
-
-
 #endif /* _STREAM2MMIO_DEFS_H */
index d2b8972b0d9ec64ae887e8c6f96d586262737b0f..75451e090f4ffc40f760d5f70c31cc604d32cb91 100644 (file)
@@ -19,4 +19,4 @@
 
 #define _HRT_TIMED_CONTROLLER_REG_ALIGN 4
 
-#endif /* _timed_controller_defs_h */   
+#endif /* _timed_controller_defs_h */
index 19b19ef484f953867e311a95df2e48c418ffa156..d3df4e1649c97da8031eee4418e4b34a6ff4b055 100644 (file)
 #define hrt_host_type_of_ulong  unsigned long
 #define hrt_host_type_of_ptr    void*
 
-#define HRT_TYPE_BYTES(cell, type) (HRT_TYPE_BITS(cell, type)/8)
+#define HRT_TYPE_BYTES(cell, type) (HRT_TYPE_BITS(cell, type) / 8)
 #define HRT_HOST_TYPE(cell_type)   HRTCAT(hrt_host_type_of_, cell_type)
 #define HRT_INT_TYPE(type)         HRTCAT(hrt_int_type_of_, type)
 
 #ifdef C_RUN
 
 #ifdef C_RUN_DYNAMIC_LINK_PROGRAMS
-extern void *csim_processor_get_crun_symbol(hive_proc_id p, const char *sym);
-#define _hrt_cell_get_crun_symbol(cell,sym)          csim_processor_get_crun_symbol(cell,HRTSTR(sym))
-#define _hrt_cell_get_crun_indexed_symbol(cell,sym)  csim_processor_get_crun_symbol(cell,HRTSTR(sym))
+void *csim_processor_get_crun_symbol(hive_proc_id p, const char *sym);
+#define _hrt_cell_get_crun_symbol(cell, sym)          csim_processor_get_crun_symbol(cell, HRTSTR(sym))
+#define _hrt_cell_get_crun_indexed_symbol(cell, sym)  csim_processor_get_crun_symbol(cell, HRTSTR(sym))
 #else
-#define _hrt_cell_get_crun_symbol(cell,sym)         (&sym)
-#define _hrt_cell_get_crun_indexed_symbol(cell,sym) (sym)
+#define _hrt_cell_get_crun_symbol(cell, sym)         (&sym)
+#define _hrt_cell_get_crun_indexed_symbol(cell, sym) (sym)
 #endif //  C_RUN_DYNAMIC_LINK_PROGRAMS
 
 #define hrt_scalar_store(cell, type, var, data) \
-       ((*(HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_symbol(cell,var)) = (data))
+       ((*(HRT_HOST_TYPE(type) *)_hrt_cell_get_crun_symbol(cell, var)) = (data))
 #define hrt_scalar_load(cell, type, var) \
-       ((*(HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_symbol(cell,var)))
+       ((*(HRT_HOST_TYPE(type) *)_hrt_cell_get_crun_symbol(cell, var)))
 
 #define hrt_indexed_store(cell, type, array, index, data) \
-       ((((HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_indexed_symbol(cell,array))[index]) = (data))
+       ((((HRT_HOST_TYPE(type) *)_hrt_cell_get_crun_indexed_symbol(cell, array))[index]) = (data))
 #define hrt_indexed_load(cell, type, array, index) \
-       (((HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_indexed_symbol(cell,array))[index])
+       (((HRT_HOST_TYPE(type) *)_hrt_cell_get_crun_indexed_symbol(cell, array))[index])
 
 #else /* C_RUN */
 
 #define hrt_scalar_store(cell, type, var, data) \
-  HRTCAT(hrt_mem_store_,HRT_TYPE_BITS(cell, type))(\
+  HRTCAT(hrt_mem_store_, HRT_TYPE_BITS(cell, type))(\
               cell, \
-              HRTCAT(HIVE_MEM_,var), \
-              HRTCAT(HIVE_ADDR_,var), \
+              HRTCAT(HIVE_MEM_, var), \
+              HRTCAT(HIVE_ADDR_, var), \
               (HRT_INT_TYPE(type))(data))
 
 #define hrt_scalar_load(cell, type, var) \
-  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_,HRT_PROC_TYPE(cell),_,type) ( \
+  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_, HRT_PROC_TYPE(cell), _, type) ( \
               cell, \
-              HRTCAT(HIVE_MEM_,var), \
-              HRTCAT(HIVE_ADDR_,var)))
+              HRTCAT(HIVE_MEM_, var), \
+              HRTCAT(HIVE_ADDR_, var)))
 
 #define hrt_indexed_store(cell, type, array, index, data) \
-  HRTCAT(hrt_mem_store_,HRT_TYPE_BITS(cell, type))(\
+  HRTCAT(hrt_mem_store_, HRT_TYPE_BITS(cell, type))(\
               cell, \
-              HRTCAT(HIVE_MEM_,array), \
-              (HRTCAT(HIVE_ADDR_,array))+((index)*HRT_TYPE_BYTES(cell, type)), \
+              HRTCAT(HIVE_MEM_, array), \
+              (HRTCAT(HIVE_ADDR_, array)) + ((index) * HRT_TYPE_BYTES(cell, type)), \
               (HRT_INT_TYPE(type))(data))
 
 #define hrt_indexed_load(cell, type, array, index) \
-  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_,HRT_PROC_TYPE(cell),_,type) ( \
-         cell, \
-              HRTCAT(HIVE_MEM_,array), \
-              (HRTCAT(HIVE_ADDR_,array))+((index)*HRT_TYPE_BYTES(cell, type))))
+  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_, HRT_PROC_TYPE(cell), _, type) ( \
+        cell, \
+              HRTCAT(HIVE_MEM_, array), \
+              (HRTCAT(HIVE_ADDR_, array)) + ((index) * HRT_TYPE_BYTES(cell, type))))
 
 #endif /* C_RUN */
 
index edb23252c48ea61eb53a5d9319365fe6bc0ac067..dc8d091c676901045c05b309911330fd0e6e7f42 100644 (file)
  */
 #define _IBUF_CNTRL_MAIN_CNTRL_FSM_MASK                        0xf
 #define _IBUF_CNTRL_MAIN_CNTRL_FSM_NEXT_COMMAND_CHECK  0x9
-#define _IBUF_CNTRL_MAIN_CNTRL_MEM_INP_BUF_ALLOC       (1 << 8)
+#define _IBUF_CNTRL_MAIN_CNTRL_MEM_INP_BUF_ALLOC       BIT(8)
 #define _IBUF_CNTRL_DMA_SYNC_WAIT_FOR_SYNC             1
 #define _IBUF_CNTRL_DMA_SYNC_FSM_WAIT_FOR_ACK          (0x3 << 1)
 
 typedef struct ib_buffer_s     ib_buffer_t;
 struct ib_buffer_s {
-       uint32_t        start_addr;     /* start address of the buffer in the
+       u32     start_addr;     /* start address of the buffer in the
                                         * "input-buffer hardware block"
                                         */
 
-       uint32_t        stride;         /* stride per buffer line (in bytes) */
-       uint32_t        lines;          /* lines in the buffer */
+       u32     stride;         /* stride per buffer line (in bytes) */
+       u32     lines;          /* lines in the buffer */
 };
 
 typedef struct ibuf_ctrl_cfg_s ibuf_ctrl_cfg_t;
 struct ibuf_ctrl_cfg_s {
-
        bool online;
 
        struct {
                /* DMA configuration */
-               uint32_t channel;
-               uint32_t cmd; /* must be _DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND */
+               u32 channel;
+               u32 cmd; /* must be _DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND */
 
                /* DMA reconfiguration */
-               uint32_t shift_returned_items;
-               uint32_t elems_per_word_in_ibuf;
-               uint32_t elems_per_word_in_dest;
+               u32 shift_returned_items;
+               u32 elems_per_word_in_ibuf;
+               u32 elems_per_word_in_dest;
        } dma_cfg;
 
        ib_buffer_t ib_buffer;
 
        struct {
-               uint32_t stride;
-               uint32_t start_addr;
-               uint32_t lines;
+               u32 stride;
+               u32 start_addr;
+               u32 lines;
        } dest_buf_cfg;
 
-       uint32_t items_per_store;
-       uint32_t stores_per_frame;
+       u32 items_per_store;
+       u32 stores_per_frame;
 
        struct {
-               uint32_t sync_cmd;      /* must be _STREAM2MMIO_CMD_TOKEN_SYNC_FRAME */
-               uint32_t store_cmd;     /* must be _STREAM2MMIO_CMD_TOKEN_STORE_PACKETS */
+               u32 sync_cmd;   /* must be _STREAM2MMIO_CMD_TOKEN_SYNC_FRAME */
+               u32 store_cmd;  /* must be _STREAM2MMIO_CMD_TOKEN_STORE_PACKETS */
        } stream2mmio_cfg;
 };
 
-extern const uint32_t N_IBUF_CTRL_PROCS[N_IBUF_CTRL_ID];
+extern const u32 N_IBUF_CTRL_PROCS[N_IBUF_CTRL_ID];
 
 #endif /* __IBUF_CTRL_GLOBAL_H_INCLUDED__ */
index 25e3f04f374baabcb91cc7c23777fa1de3277fac..7a68f03c6c5c095627b160594f9b00df3f37c254 100644 (file)
@@ -36,7 +36,6 @@
                                 */
 #include "pixelgen.h"
 
-
 #define INPUT_SYSTEM_N_STREAM_ID  6    /* maximum number of simultaneous
                                        virtual channels supported*/
 
@@ -132,15 +131,15 @@ struct input_system_cfg_s {
 
        bool online;
        bool raw_packed;
-       int8_t linked_isys_stream_id;
+       s8 linked_isys_stream_id;
 
        struct {
                bool    comp_enable;
-               int32_t active_lanes;
-               int32_t fmt_type;
-               int32_t ch_id;
-               int32_t comp_predictor;
-               int32_t comp_scheme;
+               s32     active_lanes;
+               s32     fmt_type;
+               s32     ch_id;
+               s32 comp_predictor;
+               s32 comp_scheme;
        } csi_port_attr;
 
        pixelgen_tpg_cfg_t      tpg_port_attr;
@@ -148,52 +147,52 @@ struct input_system_cfg_s {
        pixelgen_prbs_cfg_t prbs_port_attr;
 
        struct {
-               int32_t align_req_in_bytes;
-               int32_t bits_per_pixel;
-               int32_t pixels_per_line;
-               int32_t lines_per_frame;
+               s32 align_req_in_bytes;
+               s32 bits_per_pixel;
+               s32 pixels_per_line;
+               s32 lines_per_frame;
        } input_port_resolution;
 
        struct {
-               int32_t left_padding;
-               int32_t max_isp_input_width;
+               s32 left_padding;
+               s32 max_isp_input_width;
        } output_port_attr;
 
        struct {
                bool    enable;
-               int32_t fmt_type;
-               int32_t align_req_in_bytes;
-               int32_t bits_per_pixel;
-               int32_t pixels_per_line;
-               int32_t lines_per_frame;
+               s32 fmt_type;
+               s32 align_req_in_bytes;
+               s32 bits_per_pixel;
+               s32 pixels_per_line;
+               s32 lines_per_frame;
        } metadata;
 };
 
 typedef struct virtual_input_system_stream_s virtual_input_system_stream_t;
 struct virtual_input_system_stream_s {
-       uint32_t id;                            /*Used when multiple MIPI data types and/or virtual channels are used.
+       u32 id;                         /*Used when multiple MIPI data types and/or virtual channels are used.
                                                                Must be unique within one CSI RX
                                                                and lower than SH_CSS_MAX_ISYS_CHANNEL_NODES */
-       uint8_t enable_metadata;
+       u8 enable_metadata;
        input_system_input_port_t       input_port;
        input_system_channel_t          channel;
        input_system_channel_t          md_channel; /* metadata channel */
-       uint8_t online;
-       int8_t linked_isys_stream_id;
-       uint8_t valid;
+       u8 online;
+       s8 linked_isys_stream_id;
+       u8 valid;
 #ifdef ISP2401
        input_system_polling_mode_t     polling_mode;
-       int32_t subscr_index;
+       s32 subscr_index;
 #endif
 };
 
 typedef struct virtual_input_system_stream_cfg_s virtual_input_system_stream_cfg_t;
 struct virtual_input_system_stream_cfg_s {
-       uint8_t enable_metadata;
+       u8 enable_metadata;
        input_system_input_port_cfg_t   input_port_cfg;
        input_system_channel_cfg_t      channel_cfg;
        input_system_channel_cfg_t      md_channel_cfg;
-       uint8_t valid;
+       u8 valid;
 };
 
 #define ISP_INPUT_BUF_START_ADDR       0
@@ -202,5 +201,4 @@ struct virtual_input_system_stream_cfg_s {
 #define LINES_OF_ISP_INPUT_BUF         (NUM_OF_INPUT_BUF * NUM_OF_LINES_PER_BUF)
 #define ISP_INPUT_BUF_STRIDE           SH_CSS_MAX_SENSOR_WIDTH
 
-
 #endif /* __INPUT_SYSTEM_GLOBAL_H_INCLUDED__ */
index e0be59ccb821d95bf3dfd2f9ad655eb633083710..cc057d8b93cf93f0f2c7f7ed9dc5b8cc088909e4 100644 (file)
  ********************************************************/
 typedef struct isys2401_dma_port_cfg_s isys2401_dma_port_cfg_t;
 struct isys2401_dma_port_cfg_s {
-       uint32_t stride;
-       uint32_t elements;
-       uint32_t cropping;
-       uint32_t width;
+       u32 stride;
+       u32 elements;
+       u32 cropping;
+       u32 width;
  };
 /* end of DMA Port */
 
@@ -77,8 +77,9 @@ struct isys2401_dma_cfg_s {
        isys2401_dma_channel    channel;
        isys2401_dma_connection connection;
        isys2401_dma_extension  extension;
-       uint32_t                height;
+       u32             height;
 };
+
 /* end of DMA Device */
 
 /* isys2401_dma_channel limits per DMA ID */
index 649f44fd240862ebc77f651803d99450dee33c40..bcb46b293b6a56dd9393649da000d80b8788c558 100644 (file)
@@ -19,8 +19,8 @@
 
 typedef struct stream2mmio_cfg_s stream2mmio_cfg_t;
 struct stream2mmio_cfg_s {
-       uint32_t                                bits_per_pixel;
-       uint32_t                                enable_blocking;
+       u32                             bits_per_pixel;
+       u32                             enable_blocking;
 };
 
 /* Stream2MMIO limits  per ID*/
index 0bf2feb8bbfb420f890f4eadf69c7ab9f188ef79..cde599c5d0d2d1e93482bece0d4ec3950ea94b80 100644 (file)
  */
 typedef struct sync_generator_cfg_s sync_generator_cfg_t;
 struct sync_generator_cfg_s {
-       uint32_t        hblank_cycles;
-       uint32_t        vblank_cycles;
-       uint32_t        pixels_per_clock;
-       uint32_t        nr_of_frames;
-       uint32_t        pixels_per_line;
-       uint32_t        lines_per_frame;
+       u32     hblank_cycles;
+       u32     vblank_cycles;
+       u32     pixels_per_clock;
+       u32     nr_of_frames;
+       u32     pixels_per_line;
+       u32     lines_per_frame;
 };
 
 typedef enum {
@@ -50,25 +50,25 @@ struct pixelgen_tpg_cfg_s {
 
        struct {
                /* be used by CHBO and MON */
-               uint32_t R1;
-               uint32_t G1;
-               uint32_t B1;
+               u32 R1;
+               u32 G1;
+               u32 B1;
 
                /* be used by CHBO only */
-               uint32_t R2;
-               uint32_t G2;
-               uint32_t B2;
+               u32 R2;
+               u32 G2;
+               u32 B2;
        } color_cfg;
 
        struct {
-               uint32_t        h_mask;         /* horizontal mask */
-               uint32_t        v_mask;         /* vertical mask */
-               uint32_t        hv_mask;        /* horizontal+vertical mask? */
+               u32     h_mask;         /* horizontal mask */
+               u32     v_mask;         /* vertical mask */
+               u32     hv_mask;        /* horizontal+vertical mask? */
        } mask_cfg;
 
        struct {
-               int32_t h_delta;        /* horizontal delta? */
-               int32_t v_delta;        /* vertical delta? */
+               s32     h_delta;        /* horizontal delta? */
+               s32     v_delta;        /* vertical delta? */
        } delta_cfg;
 
        sync_generator_cfg_t     sync_gen_cfg;
@@ -80,12 +80,11 @@ struct pixelgen_tpg_cfg_s {
  */
 typedef struct pixelgen_prbs_cfg_s pixelgen_prbs_cfg_t;
 struct pixelgen_prbs_cfg_s {
-       int32_t seed0;
-       int32_t seed1;
+       s32     seed0;
+       s32     seed1;
 
        sync_generator_cfg_t    sync_gen_cfg;
 };
 
 /* end of Pixel-generator: TPG. ("pixelgen_global.h") */
 #endif /* __PIXELGEN_GLOBAL_H_INCLUDED__ */
-
index d733a3503a209996bf2a864c6576f1b5a0f28ae2..895d4f171caf3ef07682a22e74691a79a8bdde43 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef _sp_map_h_
 #define _sp_map_h_
 
-
 #ifndef _hrt_dummy_use_blob_sp
 #define _hrt_dummy_use_blob_sp()
 #endif
index 8d65927289330b3e68bdccee9884819c4d515b88..9c948cc175be51dff712a1c6d1558390709a06ef 100644 (file)
 #define DMA_DDR_TO_VAMEM_WORKAROUND
 #define DMA_DDR_TO_HMEM_WORKAROUND
 
-
 /*
  * Semi global. "HRT" is accessible from SP, but
  * the HRT types do not fully apply
 /*#define HRT_ADDRESS_WIDTH    64 */
 #define HRT_DATA_WIDTH         32
 
-#define SIZEOF_HRT_REG         (HRT_DATA_WIDTH>>3)
-#define HIVE_ISP_CTRL_DATA_BYTES (HIVE_ISP_CTRL_DATA_WIDTH/8)
+#define SIZEOF_HRT_REG         (HRT_DATA_WIDTH >> 3)
+#define HIVE_ISP_CTRL_DATA_BYTES (HIVE_ISP_CTRL_DATA_WIDTH / 8)
 
 /* The main bus connecting all devices */
 #define HRT_BUS_WIDTH          HIVE_ISP_CTRL_DATA_WIDTH
 /* per-frame parameter handling support */
 #define SH_CSS_ENABLE_PER_FRAME_PARAMS
 
-typedef uint32_t                       hrt_bus_align_t;
+typedef u32                    hrt_bus_align_t;
 
 /*
  * Enumerate the devices, device access through the API is by ID,
@@ -380,7 +379,7 @@ typedef enum {
        CSI_RX_FRONTEND0_ID = 0,        /* map to ISYS2401_CSI_RX_A */
        CSI_RX_FRONTEND1_ID,            /* map to ISYS2401_CSI_RX_B */
        CSI_RX_FRONTEND2_ID,            /* map to ISYS2401_CSI_RX_C */
-#define N_CSI_RX_FRONTEND_ID (CSI_RX_FRONTEND2_ID+1)
+#define N_CSI_RX_FRONTEND_ID (CSI_RX_FRONTEND2_ID + 1)
 } csi_rx_frontend_ID_t;
 
 typedef enum {
@@ -450,6 +449,7 @@ enum ia_css_isp_memories {
        IA_CSS_DDR,
        N_IA_CSS_MEMORIES
 };
+
 #define IA_CSS_NUM_MEMORIES 9
 /* For driver compatibility */
 #define N_IA_CSS_ISP_MEMORIES   IA_CSS_NUM_MEMORIES
index 325b821f276cf504f5f2cf1b87ad48a9d7c9fc77..de99359a0fbcbe3bc1af0dc96e1a5e3e85714489 100644 (file)
@@ -30,8 +30,9 @@ ia_css_configure_iterator(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.iterator.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.iterator.offset;
@@ -54,8 +55,9 @@ ia_css_configure_copy_output(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.copy_output.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.copy_output.offset;
@@ -78,8 +80,9 @@ ia_css_configure_crop(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.crop.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.crop.offset;
@@ -102,8 +105,9 @@ ia_css_configure_fpn(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.fpn.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.fpn.offset;
@@ -126,8 +130,9 @@ ia_css_configure_dvs(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.dvs.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.dvs.offset;
@@ -150,8 +155,9 @@ ia_css_configure_qplane(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.qplane.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.qplane.offset;
@@ -174,8 +180,9 @@ ia_css_configure_output0(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.output0.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.output0.offset;
@@ -198,8 +205,9 @@ ia_css_configure_output1(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.output1.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.output1.offset;
@@ -222,8 +230,9 @@ ia_css_configure_output(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.output.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.output.offset;
@@ -247,8 +256,9 @@ ia_css_configure_sc(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.sc.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.sc.offset;
@@ -272,8 +282,9 @@ ia_css_configure_raw(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.raw.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.raw.offset;
@@ -296,8 +307,9 @@ ia_css_configure_tnr(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.tnr.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.tnr.offset;
@@ -320,8 +332,9 @@ ia_css_configure_ref(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.ref.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.ref.offset;
@@ -344,8 +357,9 @@ ia_css_configure_vf(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() enter:\n");
 
        {
-               unsigned offset = 0;
-               unsigned size   = 0;
+               unsigned int offset = 0;
+               unsigned int size   = 0;
+
                if (binary->info->mem_offsets.offsets.config) {
                        size   = binary->info->mem_offsets.offsets.config->dmem.vf.size;
                        offset = binary->info->mem_offsets.offsets.config->dmem.vf.offset;
@@ -357,4 +371,3 @@ ia_css_configure_vf(
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() leave:\n");
 }
-
index 11e4463ebb50620e5013eded106c628c4cfac0a7..3afe861b709efda47cf2272cf8b93f94532a20dd 100644 (file)
 
 static void
 ia_css_process_aa(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       unsigned size   = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
-       unsigned 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 *)
@@ -85,16 +85,16 @@ ia_css_process_aa(
 
 static void
 ia_css_process_anr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -108,7 +108,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() leave:\n");
                }
-
        }
 }
 
@@ -116,16 +115,16 @@ size);
 
 static void
 ia_css_process_anr2(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -139,7 +138,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() leave:\n");
                }
-
        }
 }
 
@@ -147,16 +145,16 @@ size);
 
 static void
 ia_css_process_bh(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -170,10 +168,9 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
-
        }
        {
-               unsigned 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");
@@ -183,7 +180,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
                }
-
        }
 }
 
@@ -191,16 +187,16 @@ size);
 
 static void
 ia_css_process_cnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -214,7 +210,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() leave:\n");
                }
-
        }
 }
 
@@ -222,16 +217,16 @@ size);
 
 static void
 ia_css_process_crop(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -245,7 +240,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() leave:\n");
                }
-
        }
 }
 
@@ -253,16 +247,16 @@ size);
 
 static void
 ia_css_process_csc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -276,7 +270,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() leave:\n");
                }
-
        }
 }
 
@@ -284,16 +277,16 @@ size);
 
 static void
 ia_css_process_dp(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -307,7 +300,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() leave:\n");
                }
-
        }
 }
 
@@ -315,16 +307,16 @@ size);
 
 static void
 ia_css_process_bnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -338,7 +330,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() leave:\n");
                }
-
        }
 }
 
@@ -346,16 +337,16 @@ size);
 
 static void
 ia_css_process_de(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -369,7 +360,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() leave:\n");
                }
-
        }
 }
 
@@ -377,16 +367,16 @@ size);
 
 static void
 ia_css_process_ecd(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -400,7 +390,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() leave:\n");
                }
-
        }
 }
 
@@ -408,16 +397,16 @@ size);
 
 static void
 ia_css_process_formats(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -431,7 +420,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() leave:\n");
                }
-
        }
 }
 
@@ -439,16 +427,16 @@ size);
 
 static void
 ia_css_process_fpn(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -462,7 +450,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() leave:\n");
                }
-
        }
 }
 
@@ -470,16 +457,16 @@ size);
 
 static void
 ia_css_process_gc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -493,12 +480,11 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
-
        }
        {
-               unsigned 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 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");
@@ -512,7 +498,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
                }
-
        }
 }
 
@@ -520,16 +505,16 @@ size);
 
 static void
 ia_css_process_ce(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -543,7 +528,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() leave:\n");
                }
-
        }
 }
 
@@ -551,16 +535,16 @@ size);
 
 static void
 ia_css_process_yuv2rgb(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -574,7 +558,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() leave:\n");
                }
-
        }
 }
 
@@ -582,16 +565,16 @@ size);
 
 static void
 ia_css_process_rgb2yuv(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -605,7 +588,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() leave:\n");
                }
-
        }
 }
 
@@ -613,16 +595,16 @@ size);
 
 static void
 ia_css_process_r_gamma(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -636,7 +618,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() leave:\n");
                }
-
        }
 }
 
@@ -644,16 +625,16 @@ size);
 
 static void
 ia_css_process_g_gamma(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -667,7 +648,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() leave:\n");
                }
-
        }
 }
 
@@ -675,16 +655,16 @@ size);
 
 static void
 ia_css_process_b_gamma(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -698,7 +678,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() leave:\n");
                }
-
        }
 }
 
@@ -706,19 +685,20 @@ size);
 
 static void
 ia_css_process_uds(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
 
                        p = (struct sh_css_sp_uds_params *)
@@ -731,7 +711,6 @@ ia_css_process_uds(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() leave:\n");
                }
-
        }
 }
 
@@ -739,16 +718,16 @@ ia_css_process_uds(
 
 static void
 ia_css_process_raa(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -762,7 +741,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() leave:\n");
                }
-
        }
 }
 
@@ -770,16 +748,16 @@ size);
 
 static void
 ia_css_process_s3a(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -793,7 +771,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() leave:\n");
                }
-
        }
 }
 
@@ -801,16 +778,16 @@ size);
 
 static void
 ia_css_process_ob(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -824,12 +801,11 @@ ia_css_process_ob(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
-
        }
        {
-               unsigned 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 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");
@@ -843,7 +819,6 @@ ia_css_process_ob(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
                }
-
        }
 }
 
@@ -851,16 +826,16 @@ ia_css_process_ob(
 
 static void
 ia_css_process_output(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -874,7 +849,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() leave:\n");
                }
-
        }
 }
 
@@ -882,16 +856,16 @@ size);
 
 static void
 ia_css_process_sc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -905,7 +879,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() leave:\n");
                }
-
        }
 }
 
@@ -913,19 +886,20 @@ size);
 
 static void
 ia_css_process_bds(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
 
                        p = (struct sh_css_isp_bds_params *)
@@ -937,7 +911,6 @@ ia_css_process_bds(
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() leave:\n");
                }
-
        }
 }
 
@@ -945,16 +918,16 @@ ia_css_process_bds(
 
 static void
 ia_css_process_tnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -968,7 +941,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() leave:\n");
                }
-
        }
 }
 
@@ -976,16 +948,16 @@ size);
 
 static void
 ia_css_process_macc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -999,7 +971,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() leave:\n");
                }
-
        }
 }
 
@@ -1007,16 +978,16 @@ size);
 
 static void
 ia_css_process_sdis_horicoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1030,7 +1001,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() leave:\n");
                }
-
        }
 }
 
@@ -1038,16 +1008,16 @@ size);
 
 static void
 ia_css_process_sdis_vertcoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1061,7 +1031,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() leave:\n");
                }
-
        }
 }
 
@@ -1069,16 +1038,16 @@ size);
 
 static void
 ia_css_process_sdis_horiproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1092,7 +1061,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() leave:\n");
                }
-
        }
 }
 
@@ -1100,16 +1068,16 @@ size);
 
 static void
 ia_css_process_sdis_vertproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1123,7 +1091,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() leave:\n");
                }
-
        }
 }
 
@@ -1131,16 +1098,16 @@ size);
 
 static void
 ia_css_process_sdis2_horicoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1154,7 +1121,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() leave:\n");
                }
-
        }
 }
 
@@ -1162,16 +1128,16 @@ size);
 
 static void
 ia_css_process_sdis2_vertcoef(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1185,7 +1151,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() leave:\n");
                }
-
        }
 }
 
@@ -1193,16 +1158,16 @@ size);
 
 static void
 ia_css_process_sdis2_horiproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1216,7 +1181,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() leave:\n");
                }
-
        }
 }
 
@@ -1224,16 +1188,16 @@ size);
 
 static void
 ia_css_process_sdis2_vertproj(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1247,7 +1211,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() leave:\n");
                }
-
        }
 }
 
@@ -1255,16 +1218,16 @@ size);
 
 static void
 ia_css_process_wb(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1278,7 +1241,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() leave:\n");
                }
-
        }
 }
 
@@ -1286,16 +1248,16 @@ size);
 
 static void
 ia_css_process_nr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1309,7 +1271,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() leave:\n");
                }
-
        }
 }
 
@@ -1317,16 +1278,16 @@ size);
 
 static void
 ia_css_process_yee(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1340,7 +1301,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() leave:\n");
                }
-
        }
 }
 
@@ -1348,16 +1308,16 @@ size);
 
 static void
 ia_css_process_ynr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1371,7 +1331,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() leave:\n");
                }
-
        }
 }
 
@@ -1379,16 +1338,16 @@ size);
 
 static void
 ia_css_process_fc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1402,7 +1361,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() leave:\n");
                }
-
        }
 }
 
@@ -1410,16 +1368,16 @@ size);
 
 static void
 ia_css_process_ctc(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1433,12 +1391,11 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
                }
-
        }
        {
-               unsigned 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 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");
@@ -1452,7 +1409,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
                }
-
        }
 }
 
@@ -1460,16 +1416,16 @@ size);
 
 static void
 ia_css_process_xnr_table(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1483,7 +1439,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() leave:\n");
                }
-
        }
 }
 
@@ -1491,16 +1446,16 @@ size);
 
 static void
 ia_css_process_xnr(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1514,7 +1469,6 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() leave:\n");
                }
-
        }
 }
 
@@ -1522,16 +1476,16 @@ size);
 
 static void
 ia_css_process_xnr3(
-       unsigned pipe_id,
+       unsigned int pipe_id,
        const struct ia_css_pipeline_stage *stage,
        struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        {
-               unsigned 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 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");
@@ -1545,13 +1499,12 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
                }
-
        }
 #ifdef ISP2401
        {
-               unsigned 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 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");
@@ -1565,15 +1518,14 @@ size);
 
                        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
                }
-
        }
 #endif
 }
 
 /* Code generated by genparam/gencode.c:gen_param_process_table() */
 
-void (* ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
-                       unsigned pipe_id,
+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) = {
        ia_css_process_aa,
@@ -1629,12 +1581,12 @@ 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){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: config=%p\n",
+               config);
 
        *config = params->dp_config;
 
@@ -1648,10 +1600,10 @@ void
 ia_css_set_dp_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dp_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_dp_config() enter:\n");
        ia_css_dp_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->dp_config = *config;
@@ -1660,8 +1612,7 @@ 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() */
@@ -1669,12 +1620,12 @@ ia_css_set_dp_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_wb_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: config=%p\n",
+               config);
 
        *config = params->wb_config;
 
@@ -1688,10 +1639,10 @@ void
 ia_css_set_wb_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_wb_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_wb_config() enter:\n");
        ia_css_wb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->wb_config = *config;
@@ -1700,8 +1651,7 @@ 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() */
@@ -1709,12 +1659,12 @@ ia_css_set_wb_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_tnr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: config=%p\n",
+               config);
 
        *config = params->tnr_config;
 
@@ -1728,10 +1678,10 @@ void
 ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_tnr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_tnr_config() enter:\n");
        ia_css_tnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->tnr_config = *config;
@@ -1740,8 +1690,7 @@ 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() */
@@ -1749,12 +1698,12 @@ ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ob_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: config=%p\n",
+               config);
 
        *config = params->ob_config;
 
@@ -1768,10 +1717,10 @@ void
 ia_css_set_ob_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ob_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ob_config() enter:\n");
        ia_css_ob_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ob_config = *config;
@@ -1780,8 +1729,7 @@ 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() */
@@ -1789,12 +1737,12 @@ ia_css_set_ob_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_de_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_de_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: config=%p\n",
+               config);
 
        *config = params->de_config;
 
@@ -1808,10 +1756,10 @@ void
 ia_css_set_de_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_de_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_de_config() enter:\n");
        ia_css_de_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->de_config = *config;
@@ -1820,8 +1768,7 @@ 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() */
@@ -1829,12 +1776,12 @@ ia_css_set_de_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_anr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: config=%p\n",
+               config);
 
        *config = params->anr_config;
 
@@ -1848,10 +1795,10 @@ void
 ia_css_set_anr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_anr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_anr_config() enter:\n");
        ia_css_anr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->anr_config = *config;
@@ -1860,8 +1807,7 @@ 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() */
@@ -1869,12 +1815,12 @@ ia_css_set_anr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_anr_thres *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: config=%p\n",
+               config);
 
        *config = params->anr_thres;
 
@@ -1888,10 +1834,10 @@ void
 ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_anr_thres *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_anr2_config() enter:\n");
        ia_css_anr2_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->anr_thres = *config;
@@ -1900,8 +1846,7 @@ 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() */
@@ -1909,12 +1854,12 @@ ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ce_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: config=%p\n",
+               config);
 
        *config = params->ce_config;
 
@@ -1928,10 +1873,10 @@ void
 ia_css_set_ce_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ce_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ce_config() enter:\n");
        ia_css_ce_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ce_config = *config;
@@ -1940,8 +1885,7 @@ 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() */
@@ -1949,12 +1893,12 @@ ia_css_set_ce_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ecd_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: config=%p\n",
+               config);
 
        *config = params->ecd_config;
 
@@ -1968,10 +1912,10 @@ void
 ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ecd_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ecd_config() enter:\n");
        ia_css_ecd_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ecd_config = *config;
@@ -1980,8 +1924,7 @@ 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() */
@@ -1989,12 +1932,12 @@ ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ynr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: config=%p\n",
+               config);
 
        *config = params->ynr_config;
 
@@ -2008,10 +1951,10 @@ void
 ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ynr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ynr_config() enter:\n");
        ia_css_ynr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ynr_config = *config;
@@ -2020,8 +1963,7 @@ 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() */
@@ -2029,12 +1971,12 @@ ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_fc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: config=%p\n",
+               config);
 
        *config = params->fc_config;
 
@@ -2048,10 +1990,10 @@ void
 ia_css_set_fc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_fc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_fc_config() enter:\n");
        ia_css_fc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->fc_config = *config;
@@ -2060,8 +2002,7 @@ 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() */
@@ -2069,12 +2010,12 @@ ia_css_set_fc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cnr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: config=%p\n",
+               config);
 
        *config = params->cnr_config;
 
@@ -2088,10 +2029,10 @@ void
 ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cnr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_cnr_config() enter:\n");
        ia_css_cnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->cnr_config = *config;
@@ -2100,8 +2041,7 @@ 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() */
@@ -2109,12 +2049,12 @@ ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_macc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: config=%p\n",
+               config);
 
        *config = params->macc_config;
 
@@ -2128,10 +2068,10 @@ void
 ia_css_set_macc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_macc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_macc_config() enter:\n");
        ia_css_macc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->macc_config = *config;
@@ -2140,8 +2080,7 @@ 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() */
@@ -2149,12 +2088,12 @@ ia_css_set_macc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ctc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: config=%p\n",
+               config);
 
        *config = params->ctc_config;
 
@@ -2168,10 +2107,10 @@ void
 ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ctc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_ctc_config() enter:\n");
        ia_css_ctc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->ctc_config = *config;
@@ -2180,8 +2119,7 @@ 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() */
@@ -2189,12 +2127,12 @@ ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_aa_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: config=%p\n",
+               config);
 
        *config = params->aa_config;
 
@@ -2207,10 +2145,10 @@ void
 ia_css_set_aa_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_aa_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_aa_config() enter:\n");
        params->aa_config = *config;
        params->config_changed[IA_CSS_AA_ID] = true;
@@ -2218,8 +2156,7 @@ 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() */
@@ -2227,12 +2164,12 @@ ia_css_set_aa_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: config=%p\n",
+               config);
 
        *config = params->yuv2rgb_cc_config;
 
@@ -2246,10 +2183,10 @@ void
 ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_yuv2rgb_config() enter:\n");
        ia_css_yuv2rgb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->yuv2rgb_cc_config = *config;
@@ -2258,8 +2195,7 @@ 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() */
@@ -2267,12 +2203,12 @@ ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: config=%p\n",
+               config);
 
        *config = params->rgb2yuv_cc_config;
 
@@ -2286,10 +2222,10 @@ void
 ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_rgb2yuv_config() enter:\n");
        ia_css_rgb2yuv_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->rgb2yuv_cc_config = *config;
@@ -2298,8 +2234,7 @@ 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() */
@@ -2307,12 +2242,12 @@ ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_cc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: config=%p\n",
+               config);
 
        *config = params->cc_config;
 
@@ -2326,10 +2261,10 @@ void
 ia_css_set_csc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_cc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_csc_config() enter:\n");
        ia_css_csc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->cc_config = *config;
@@ -2338,8 +2273,7 @@ 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() */
@@ -2347,12 +2281,12 @@ ia_css_set_csc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_nr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: config=%p\n",
+               config);
 
        *config = params->nr_config;
 
@@ -2366,10 +2300,10 @@ void
 ia_css_set_nr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_nr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_nr_config() enter:\n");
        ia_css_nr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->nr_config = *config;
@@ -2379,8 +2313,7 @@ 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() */
@@ -2388,12 +2321,12 @@ ia_css_set_nr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_gc_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: config=%p\n",
+               config);
 
        *config = params->gc_config;
 
@@ -2407,10 +2340,10 @@ void
 ia_css_set_gc_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_gc_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_gc_config() enter:\n");
        ia_css_gc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->gc_config = *config;
@@ -2419,8 +2352,7 @@ 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() */
@@ -2428,12 +2360,12 @@ ia_css_set_gc_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2447,10 +2379,10 @@ void
 ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2462,8 +2394,7 @@ 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() */
@@ -2471,12 +2402,12 @@ ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2490,10 +2421,10 @@ void
 ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2505,8 +2436,7 @@ 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() */
@@ -2514,12 +2444,12 @@ ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2533,10 +2463,10 @@ void
 ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2548,8 +2478,7 @@ 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() */
@@ -2557,12 +2486,12 @@ ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs_coefs;
 
@@ -2576,10 +2505,10 @@ void
 ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2591,8 +2520,7 @@ 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() */
@@ -2600,12 +2528,12 @@ ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2619,10 +2547,10 @@ void
 ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2634,8 +2562,7 @@ 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() */
@@ -2643,12 +2570,12 @@ ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2662,10 +2589,10 @@ void
 ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2677,8 +2604,7 @@ 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() */
@@ -2686,12 +2612,12 @@ ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2705,10 +2631,10 @@ void
 ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2720,8 +2646,7 @@ 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() */
@@ -2729,12 +2654,12 @@ ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dvs2_coefficients *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
+               config);
 
        *config = params->dvs2_coefs;
 
@@ -2748,10 +2673,10 @@ void
 ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dvs2_coefficients *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2763,8 +2688,7 @@ 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() */
@@ -2772,12 +2696,12 @@ ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_rgb_gamma_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       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;
 
@@ -2791,10 +2715,10 @@ void
 ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_rgb_gamma_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_r_gamma_config() enter:\n");
        ia_css_r_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->r_gamma_table = *config;
@@ -2803,8 +2727,7 @@ 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() */
@@ -2812,12 +2735,12 @@ ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_rgb_gamma_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       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;
 
@@ -2831,10 +2754,10 @@ void
 ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_rgb_gamma_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_g_gamma_config() enter:\n");
        ia_css_g_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->g_gamma_table = *config;
@@ -2843,8 +2766,7 @@ 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() */
@@ -2852,12 +2774,12 @@ ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_rgb_gamma_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       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;
 
@@ -2871,10 +2793,10 @@ void
 ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_rgb_gamma_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_b_gamma_config() enter:\n");
        ia_css_b_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->b_gamma_table = *config;
@@ -2883,8 +2805,7 @@ 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() */
@@ -2892,12 +2813,12 @@ ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_xnr_table *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: config=%p\n",
+               config);
 
        *config = params->xnr_table;
 
@@ -2911,10 +2832,10 @@ void
 ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_xnr_table *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        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;
@@ -2923,8 +2844,7 @@ 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() */
@@ -2932,12 +2852,12 @@ ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_formats_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: config=%p\n",
+               config);
 
        *config = params->formats_config;
 
@@ -2951,10 +2871,10 @@ void
 ia_css_set_formats_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_formats_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_formats_config() enter:\n");
        ia_css_formats_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->formats_config = *config;
@@ -2963,8 +2883,7 @@ 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() */
@@ -2972,12 +2891,12 @@ ia_css_set_formats_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_xnr_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: config=%p\n",
+               config);
 
        *config = params->xnr_config;
 
@@ -2991,10 +2910,10 @@ void
 ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_xnr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr_config() enter:\n");
        ia_css_xnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->xnr_config = *config;
@@ -3003,8 +2922,7 @@ 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() */
@@ -3012,12 +2930,12 @@ ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_xnr3_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: config=%p\n",
+               config);
 
        *config = params->xnr3_config;
 
@@ -3031,10 +2949,10 @@ void
 ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_xnr3_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr3_config() enter:\n");
        ia_css_xnr3_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->xnr3_config = *config;
@@ -3043,8 +2961,7 @@ 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() */
@@ -3052,12 +2969,12 @@ ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_3a_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: config=%p\n",
+               config);
 
        *config = params->s3a_config;
 
@@ -3071,10 +2988,10 @@ void
 ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_3a_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_s3a_config() enter:\n");
        ia_css_s3a_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->s3a_config = *config;
@@ -3084,8 +3001,7 @@ 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() */
@@ -3093,12 +3009,12 @@ ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
 static void
 ia_css_get_output_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_output_config *config){
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: "
-               "config=%p\n",config);
+       assert(params);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: config=%p\n",
+               config);
 
        *config = params->output_config;
 
@@ -3112,10 +3028,10 @@ void
 ia_css_set_output_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_output_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
+       assert(params);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_output_config() enter:\n");
        ia_css_output_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
        params->output_config = *config;
@@ -3124,8 +3040,7 @@ 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() */
@@ -3217,4 +3132,3 @@ ia_css_set_configs(struct ia_css_isp_parameters *params,
        ia_css_set_s3a_config(params, config->s3a_config);
        ia_css_set_output_config(params, config->output_config);
 }
-
index 5b3deb7f74aecf1de25749111f2cc7c81d6cd3e2..b5175c253c61d02ed224fe86a9743d1da5e87e4e 100644 (file)
@@ -149,8 +149,8 @@ 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 pipe_id,
+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);
 
index e87d05bc73ae893a7ecc269c824c904190015623..dcc42c1ce94ef2f19b9026dc14017c21ebd8319c 100644 (file)
@@ -28,12 +28,11 @@ ia_css_initialize_aa_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.aa.size;
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
+               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);
-
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
 }
@@ -47,16 +46,15 @@ ia_css_initialize_cnr_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.cnr.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.cnr.offset;
 
                if (size) {
                        ia_css_init_cnr_state(
                                &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");
 }
@@ -70,16 +68,15 @@ ia_css_initialize_cnr2_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.cnr2.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.cnr2.offset;
 
                if (size) {
                        ia_css_init_cnr2_state(
                                &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");
 }
@@ -93,16 +90,15 @@ ia_css_initialize_dp_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.dp.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.dp.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.dp.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.dp.offset;
 
                if (size) {
                        ia_css_init_dp_state(
                                &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");
 }
@@ -116,16 +112,15 @@ ia_css_initialize_de_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.de.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.de.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.de.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.de.offset;
 
                if (size) {
                        ia_css_init_de_state(
                                &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");
 }
@@ -139,16 +134,15 @@ ia_css_initialize_tnr_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->dmem.tnr.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->dmem.tnr.offset;
 
                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);
                }
-
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() leave:\n");
 }
@@ -162,16 +156,15 @@ ia_css_initialize_ref_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->dmem.ref.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->dmem.ref.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->dmem.ref.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->dmem.ref.offset;
 
                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);
                }
-
        }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() leave:\n");
 }
@@ -185,16 +178,15 @@ ia_css_initialize_ynr_state(
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() enter:\n");
 
        {
-               unsigned size   = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
+               unsigned int size   = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
 
-               unsigned offset = binary->info->mem_offsets.offsets.state->vmem.ynr.offset;
+               unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.ynr.offset;
 
                if (size) {
                        ia_css_init_ynr_state(
                                &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");
 }
@@ -211,4 +203,3 @@ void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_bina
        ia_css_initialize_ref_state,
        ia_css_initialize_ynr_state,
 };
-
index e71e33d9d1434c91cd8317ea40d5719c02b86172..c6d2a5cba21341135539597ae187f216c3c80945 100644 (file)
@@ -95,7 +95,7 @@
 #define _hrt_get_bit(w, b) \
   (((w) >> (b)) & 1)
 #define _hrt_set_bit(w, b, v) \
-  (((w) & (~(1 << (b)))) | (((v)&1) << (b)))
+  (((w) & (~(1 << (b)))) | (((v) & 1) << (b)))
 #define _hrt_set_lower_half(w, v) \
   _hrt_set_bits(w, 0, 16, v)
 #define _hrt_set_upper_half(w, v) \
index b5756bfe8eb6b1e10c7f70659bc20e6537e8df1c..0eabc59ff5afb50123552d9b978f7257f733a23b 100644 (file)
@@ -22,9 +22,9 @@
 #define SP_ICACHE_BLOCK_ADDRESS_BITS     11 /* 2048 lines capacity*/
 
 #define SP_ICACHE_ADDRESS_BITS \
-                           (SP_ICACHE_TAG_BITS+SP_ICACHE_BLOCK_ADDRESS_BITS)
+                           (SP_ICACHE_TAG_BITS + SP_ICACHE_BLOCK_ADDRESS_BITS)
 
-#define SP_PMEM_DEPTH        (1<<SP_ICACHE_ADDRESS_BITS)
+#define SP_PMEM_DEPTH        BIT(SP_ICACHE_ADDRESS_BITS)
 
 #define SP_FIFO_0_DEPTH      0
 #define SP_FIFO_1_DEPTH      0
@@ -35,8 +35,6 @@
 #define SP_FIFO_6_DEPTH      0
 #define SP_FIFO_7_DEPTH      0
 
-
 #define SP_SLV_BUS_MAXBURSTSIZE        1
 
 #endif /* _cell_params_h */
-
index 89ff5313065fcd3e853ab60caf17112615738305..99d292164efcae86c729e6e6c50019459c88e6d8 100644 (file)
@@ -21,7 +21,7 @@
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_CH_ID_WIDTH     2
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_FMT_TYPE_WIDTH  3
 #define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_REAL_WIDTH (_HRT_CSS_RECEIVER_2400_GEN_SHORT_DATA_WIDTH + _HRT_CSS_RECEIVER_2400_GEN_SHORT_CH_ID_WIDTH + _HRT_CSS_RECEIVER_2400_GEN_SHORT_FMT_TYPE_WIDTH)
-#define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_WIDTH      32 /* use 32 to be compatibel with streaming monitor !, MSB's of interface are tied to '0' */ 
+#define _HRT_CSS_RECEIVER_2400_GEN_SHORT_STR_WIDTH      32 /* use 32 to be compatibel with streaming monitor !, MSB's of interface are tied to '0' */
 
 /* Definition of data format ID at the interface CSS_receiver capture/acquisition units */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_8          24   /* 01 1000 YUV420 8-bit                                        */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_8_CSPS     28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_YUV420_10_CSPS    29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
 /* used reserved mipi positions for these */
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW16             46 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18             47 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_2           37 
-#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_3           38 
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW16             46
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18             47
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_2           37
+#define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_RAW18_3           38
 
 #define _HRT_CSS_RECEIVER_2400_DATA_FORMAT_ID_WIDTH              6
 
@@ -78,7 +78,7 @@
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB444           2  // 32
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB565           3  // 34
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RGB666           4  // 35
-#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW8             5  // 42 
+#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW8             5  // 42
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW10            6  // 43
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW6             7  // 40
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW7             8  // 41
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18           28  // ?
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18_2         29  // ? Option 2 for depacketiser
 #define _HRT_CSS_RECEIVER_2400_FMT_TYPE_RAW18_3         30  // ? Option 3 for depacketiser
-#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_CUSTOM          31  // to signal custom decoding 
+#define _HRT_CSS_RECEIVER_2400_FMT_TYPE_CUSTOM          31  // to signal custom decoding
 
 /* definition for state machine of data FIFO for decode different type of data */
-#define _HRT_CSS_RECEIVER_2400_YUV420_8_REPEAT_PTN                 1  
+#define _HRT_CSS_RECEIVER_2400_YUV420_8_REPEAT_PTN                 1
 #define _HRT_CSS_RECEIVER_2400_YUV420_10_REPEAT_PTN                5
 #define _HRT_CSS_RECEIVER_2400_YUV420_8L_REPEAT_PTN                1
 #define _HRT_CSS_RECEIVER_2400_YUV422_8_REPEAT_PTN                 1
 #define _HRT_CSS_RECEIVER_2400_YUV422_10_REPEAT_PTN                5
-#define _HRT_CSS_RECEIVER_2400_RGB444_REPEAT_PTN                   2 
+#define _HRT_CSS_RECEIVER_2400_RGB444_REPEAT_PTN                   2
 #define _HRT_CSS_RECEIVER_2400_RGB555_REPEAT_PTN                   2
 #define _HRT_CSS_RECEIVER_2400_RGB565_REPEAT_PTN                   2
-#define _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN                   9                       
+#define _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN                   9
 #define _HRT_CSS_RECEIVER_2400_RGB888_REPEAT_PTN                   3
 #define _HRT_CSS_RECEIVER_2400_RAW6_REPEAT_PTN                     3
 #define _HRT_CSS_RECEIVER_2400_RAW7_REPEAT_PTN                     7
 #define _HRT_CSS_RECEIVER_2400_RAW8_REPEAT_PTN                     1
 #define _HRT_CSS_RECEIVER_2400_RAW10_REPEAT_PTN                    5
-#define _HRT_CSS_RECEIVER_2400_RAW12_REPEAT_PTN                    3        
+#define _HRT_CSS_RECEIVER_2400_RAW12_REPEAT_PTN                    3
 #define _HRT_CSS_RECEIVER_2400_RAW14_REPEAT_PTN                    7
 
 #define _HRT_CSS_RECEIVER_2400_MAX_REPEAT_PTN                      _HRT_CSS_RECEIVER_2400_RGB666_REPEAT_PTN
 #define _HRT_CSS_RECEIVER_2400_BE_COMP_12_7_12                     5
 #define _HRT_CSS_RECEIVER_2400_BE_COMP_12_8_12                     6
 
-
 /* packet bit definition */
 #define _HRT_CSS_RECEIVER_2400_PKT_SOP_IDX                        32
 #define _HRT_CSS_RECEIVER_2400_PKT_SOP_BITS                        1
 #define _HRT_CSS_RECEIVER_2400_PKT_PAYLOAD_IDX                     0
 #define _HRT_CSS_RECEIVER_2400_PKT_PAYLOAD_BITS                   32
 
-
 /*************************************************************************************************/
 /* Custom Decoding                                                                               */
 /* These Custom Defs are defined based on design-time config in "csi_be_pixel_formatter.chdl" !! */
 /*************************************************************************************************/
 #define BE_CUST_EN_IDX                     0     /* 2bits */
-#define BE_CUST_EN_DATAID_IDX              2     /* 6bits MIPI DATA ID */ 
-#define BE_CUST_EN_WIDTH                   8     
+#define BE_CUST_EN_DATAID_IDX              2     /* 6bits MIPI DATA ID */
+#define BE_CUST_EN_WIDTH                   8
 #define BE_CUST_MODE_ALL                   1     /* Enable Custom Decoding for all DATA IDs */
 #define BE_CUST_MODE_ONE                   3     /* Enable Custom Decoding for ONE DATA ID, programmed in CUST_EN_DATA_ID */
 
 /* Data State config = {get_bits(6bits), valid(1bit)}  */
-#define BE_CUST_DATA_STATE_S0_IDX          0     /* 7bits */ 
-#define BE_CUST_DATA_STATE_S1_IDX          7     /* 7bits */ 
+#define BE_CUST_DATA_STATE_S0_IDX          0     /* 7bits */
+#define BE_CUST_DATA_STATE_S1_IDX          7     /* 7bits */
 #define BE_CUST_DATA_STATE_S2_IDX          14    /* 7bits */
-#define BE_CUST_DATA_STATE_WIDTH           21    
+#define BE_CUST_DATA_STATE_WIDTH           21
 #define BE_CUST_DATA_STATE_VALID_IDX       0     /* 1bits */
 #define BE_CUST_DATA_STATE_GETBITS_IDX     1     /* 6bits */
 
 #define BE_CUST_PIX_EXT_PIX_ALIGN_IDX      5     /* 5bits */
 #define BE_CUST_PIX_EXT_PIX_MASK_IDX       10    /* 18bits */
 #define BE_CUST_PIX_EXT_PIX_EN_IDX         28    /* 1bits */
-#define BE_CUST_PIX_EXT_WIDTH              29    
+#define BE_CUST_PIX_EXT_WIDTH              29
 
 /* Pixel Valid & EoP config = {[eop,valid](especial), [eop,valid](normal)} */
 #define BE_CUST_PIX_VALID_EOP_P0_IDX        0    /* 4bits */
 #define BE_CUST_PIX_VALID_EOP_P1_IDX        4    /* 4bits */
 #define BE_CUST_PIX_VALID_EOP_P2_IDX        8    /* 4bits */
 #define BE_CUST_PIX_VALID_EOP_P3_IDX        12   /* 4bits */
-#define BE_CUST_PIX_VALID_EOP_WIDTH         16 
+#define BE_CUST_PIX_VALID_EOP_WIDTH         16
 #define BE_CUST_PIX_VALID_EOP_NOR_VALID_IDX 0    /* Normal (NO less get_bits case) Valid - 1bits */
 #define BE_CUST_PIX_VALID_EOP_NOR_EOP_IDX   1    /* Normal (NO less get_bits case) EoP - 1bits */
 #define BE_CUST_PIX_VALID_EOP_ESP_VALID_IDX 2    /* Especial (less get_bits case) Valid - 1bits */
 #define BE_CUST_PIX_VALID_EOP_ESP_EOP_IDX   3    /* Especial (less get_bits case) EoP - 1bits */
 
 #endif /* _mipi_backend_common_defs_h_ */
-#endif /* _css_receiver_2400_common_defs_h_ */ 
+#endif /* _css_receiver_2400_common_defs_h_ */
index 6f5b7d3d3715e905f55265a2774be86cc5eb9f08..f4b2b41b6d94370d83d45cfde754c9d7224752ce 100644 (file)
 #define _HRT_CSS_RECEIVER_2400_CSI2_MASK_ECC_TWO_BIT_ERR_IDX                  6
 #define _HRT_CSS_RECEIVER_2400_CSI2_MASK_DATA_ID_ERR_IDX                      7
 
-                                  
 /* Bits for CSI2_FUNC_PROG register */
 #define _HRT_CSS_RECEIVER_2400_CSI2_DATA_TIMEOUT_IDX    0
 #define _HRT_CSS_RECEIVER_2400_CSI2_DATA_TIMEOUT_BITS   19
 #define _HRT_CSS_RECEIVER_2400_COMP_SCHEME_USD_PRED_BITS_IDX  3
 #define _HRT_CSS_RECEIVER_2400_COMP_SCHEME_USD_PRED_BITS_BITS 2
 
-
 /* BITS for backend RAW16 and RAW 18 registers */
 
 #define _HRT_CSS_RECEIVER_2400_RAW18_DATAID_IDX    0
 #define _HRT_CSS_RECEIVER_2400_RAW16_EN_BITS       1
 
 /* These hsync and vsync values are for HSS simulation only */
-#define _HRT_CSS_RECEIVER_2400_HSYNC_VAL (1<<16)
-#define _HRT_CSS_RECEIVER_2400_VSYNC_VAL (1<<17)
+#define _HRT_CSS_RECEIVER_2400_HSYNC_VAL BIT(16)
+#define _HRT_CSS_RECEIVER_2400_VSYNC_VAL BIT(17)
 
 #define _HRT_CSS_RECEIVER_2400_BE_STREAMING_WIDTH                 28
 #define _HRT_CSS_RECEIVER_2400_BE_STREAMING_PIX_A_LSB              0
index d184a8b313c91c6978c70b10c42f32231cc65cb9..ba43562f12874cac152d4149eb53d9ad1436d96f 100644 (file)
@@ -51,7 +51,7 @@
 #define _DMA_V2_SPEC_DEV_B_XB_IDX  (_DMA_V2_SPEC_DEV_A_XB_IDX + _DMA_V2_SPEC_DEV_A_XB_BITS)
 #define _DMA_V2_SPEC_DEV_B_XB_BITS 8
 #define _DMA_V2_SPEC_YB_IDX        (_DMA_V2_SPEC_DEV_B_XB_IDX + _DMA_V2_SPEC_DEV_B_XB_BITS)
-#define _DMA_V2_SPEC_YB_BITS       (32-_DMA_V2_SPEC_DEV_B_XB_BITS-_DMA_V2_SPEC_DEV_A_XB_BITS-_DMA_V2_CMD_BITS-_DMA_V2_CHANNEL_BITS)
+#define _DMA_V2_SPEC_YB_BITS       (32 - _DMA_V2_SPEC_DEV_B_XB_BITS - _DMA_V2_SPEC_DEV_A_XB_BITS - _DMA_V2_CMD_BITS - _DMA_V2_CHANNEL_BITS)
 
 /* */
 #define _DMA_V2_CMD_CTRL_IDX       4
 #define _DMA_V2_STRIDE_BITS        32
 
 /* Command IDs */
-#define _DMA_V2_MOVE_B2A_COMMAND                             0      
-#define _DMA_V2_MOVE_B2A_BLOCK_COMMAND                       1      
-#define _DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND                 2      
-#define _DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND           3      
-#define _DMA_V2_MOVE_A2B_COMMAND                             4      
-#define _DMA_V2_MOVE_A2B_BLOCK_COMMAND                       5      
-#define _DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND                 6      
-#define _DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND           7      
-#define _DMA_V2_INIT_A_COMMAND                               8      
-#define _DMA_V2_INIT_A_BLOCK_COMMAND                         9      
-#define _DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND                  10      
-#define _DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND            11      
-#define _DMA_V2_INIT_B_COMMAND                              12      
-#define _DMA_V2_INIT_B_BLOCK_COMMAND                        13      
-#define _DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND                  14      
-#define _DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND            15      
-#define _DMA_V2_NO_ACK_MOVE_B2A_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND       + 16) 
-#define _DMA_V2_NO_ACK_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND + 16) 
-#define _DMA_V2_NO_ACK_MOVE_A2B_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND       + 16) 
-#define _DMA_V2_NO_ACK_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND + 16) 
-#define _DMA_V2_NO_ACK_INIT_A_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND         + 16) 
-#define _DMA_V2_NO_ACK_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND   + 16) 
-#define _DMA_V2_NO_ACK_INIT_B_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND         + 16) 
-#define _DMA_V2_NO_ACK_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND   + 16) 
-#define _DMA_V2_CONFIG_CHANNEL_COMMAND                      32   
-#define _DMA_V2_SET_CHANNEL_PARAM_COMMAND                   33   
-#define _DMA_V2_SET_CRUN_COMMAND                            62   
+#define _DMA_V2_MOVE_B2A_COMMAND                             0
+#define _DMA_V2_MOVE_B2A_BLOCK_COMMAND                       1
+#define _DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND                 2
+#define _DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND           3
+#define _DMA_V2_MOVE_A2B_COMMAND                             4
+#define _DMA_V2_MOVE_A2B_BLOCK_COMMAND                       5
+#define _DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND                 6
+#define _DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND           7
+#define _DMA_V2_INIT_A_COMMAND                               8
+#define _DMA_V2_INIT_A_BLOCK_COMMAND                         9
+#define _DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND                  10
+#define _DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND            11
+#define _DMA_V2_INIT_B_COMMAND                              12
+#define _DMA_V2_INIT_B_BLOCK_COMMAND                        13
+#define _DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND                  14
+#define _DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND            15
+#define _DMA_V2_NO_ACK_MOVE_B2A_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_B2A_NO_SYNC_CHK_COMMAND       + 16)
+#define _DMA_V2_NO_ACK_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_B2A_BLOCK_NO_SYNC_CHK_COMMAND + 16)
+#define _DMA_V2_NO_ACK_MOVE_A2B_NO_SYNC_CHK_COMMAND         (_DMA_V2_MOVE_A2B_NO_SYNC_CHK_COMMAND       + 16)
+#define _DMA_V2_NO_ACK_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND   (_DMA_V2_MOVE_A2B_BLOCK_NO_SYNC_CHK_COMMAND + 16)
+#define _DMA_V2_NO_ACK_INIT_A_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_A_NO_SYNC_CHK_COMMAND         + 16)
+#define _DMA_V2_NO_ACK_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_A_BLOCK_NO_SYNC_CHK_COMMAND   + 16)
+#define _DMA_V2_NO_ACK_INIT_B_NO_SYNC_CHK_COMMAND           (_DMA_V2_INIT_B_NO_SYNC_CHK_COMMAND         + 16)
+#define _DMA_V2_NO_ACK_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND     (_DMA_V2_INIT_B_BLOCK_NO_SYNC_CHK_COMMAND   + 16)
+#define _DMA_V2_CONFIG_CHANNEL_COMMAND                      32
+#define _DMA_V2_SET_CHANNEL_PARAM_COMMAND                   33
+#define _DMA_V2_SET_CRUN_COMMAND                            62
 
 /* Channel Parameter IDs */
-#define _DMA_V2_PACKING_SETUP_PARAM                     0  
-#define _DMA_V2_STRIDE_A_PARAM                          1  
-#define _DMA_V2_ELEM_CROPPING_A_PARAM                   2  
-#define _DMA_V2_WIDTH_A_PARAM                           3  
-#define _DMA_V2_STRIDE_B_PARAM                          4  
-#define _DMA_V2_ELEM_CROPPING_B_PARAM                   5  
-#define _DMA_V2_WIDTH_B_PARAM                           6  
-#define _DMA_V2_HEIGHT_PARAM                            7  
-#define _DMA_V2_QUEUED_CMDS                             8  
+#define _DMA_V2_PACKING_SETUP_PARAM                     0
+#define _DMA_V2_STRIDE_A_PARAM                          1
+#define _DMA_V2_ELEM_CROPPING_A_PARAM                   2
+#define _DMA_V2_WIDTH_A_PARAM                           3
+#define _DMA_V2_STRIDE_B_PARAM                          4
+#define _DMA_V2_ELEM_CROPPING_B_PARAM                   5
+#define _DMA_V2_WIDTH_B_PARAM                           6
+#define _DMA_V2_HEIGHT_PARAM                            7
+#define _DMA_V2_QUEUED_CMDS                             8
 
 /* Parameter Constants */
 #define _DMA_V2_ZERO_EXTEND                             0
 #define _DMA_V2_ADDR_SEL_COMP_BITS                      4
 #define _DMA_V2_ADDR_SEL_CH_REG_IDX                     2
 #define _DMA_V2_ADDR_SEL_CH_REG_BITS                    6
-#define _DMA_V2_ADDR_SEL_PARAM_IDX                      (_DMA_V2_ADDR_SEL_CH_REG_BITS+_DMA_V2_ADDR_SEL_CH_REG_IDX)
+#define _DMA_V2_ADDR_SEL_PARAM_IDX                      (_DMA_V2_ADDR_SEL_CH_REG_BITS + _DMA_V2_ADDR_SEL_CH_REG_IDX)
 #define _DMA_V2_ADDR_SEL_PARAM_BITS                     4
 
 #define _DMA_V2_ADDR_SEL_GROUP_COMP_IDX                 2
 
 #define _DMA_V2_ADDR_SEL_DEV_INTERF_IDX_IDX             2
 #define _DMA_V2_ADDR_SEL_DEV_INTERF_IDX_BITS            6
-#define _DMA_V2_ADDR_SEL_DEV_INTERF_INFO_IDX            (_DMA_V2_ADDR_SEL_DEV_INTERF_IDX_IDX+_DMA_V2_ADDR_SEL_DEV_INTERF_IDX_BITS)
+#define _DMA_V2_ADDR_SEL_DEV_INTERF_INFO_IDX            (_DMA_V2_ADDR_SEL_DEV_INTERF_IDX_IDX + _DMA_V2_ADDR_SEL_DEV_INTERF_IDX_BITS)
 #define _DMA_V2_ADDR_SEL_DEV_INTERF_INFO_BITS           4
 
 #define _DMA_V2_FSM_GROUP_CMD_IDX                       0
 #define _DMA_V2_FSM_GROUP_FSM_PACK_IDX                  5
 #define _DMA_V2_FSM_GROUP_FSM_REQ_IDX                   6
 #define _DMA_V2_FSM_GROUP_FSM_WR_IDX                    7
-  
+
 #define _DMA_V2_FSM_GROUP_FSM_CTRL_STATE_IDX            0
 #define _DMA_V2_FSM_GROUP_FSM_CTRL_REQ_DEV_IDX          1
 #define _DMA_V2_FSM_GROUP_FSM_CTRL_REQ_ADDR_IDX         2
index 77722d20570108c94c8258640f679564ef0e40dc..33f8b5ce9ba3e09ec08ae2d95bb145a8431b2813 100644 (file)
 #define HRT_GDC_FRAC_BITS               10 /* Number of fractional bits in the GDC block, driven by the size of the LUT */
 
 #define HRT_GDC_BLI_FRAC_BITS            4 /* Number of fractional bits for the bi-linear interpolation type            */
-#define HRT_GDC_BLI_COEF_ONE             (1 << HRT_GDC_BLI_FRAC_BITS)
+#define HRT_GDC_BLI_COEF_ONE             BIT(HRT_GDC_BLI_FRAC_BITS)
 
 #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.              */
-#define HRT_GDC_BCI_COEF_MASK            ((1 << HRT_GDC_BCI_COEF_BITS) - 1) 
+#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.              */
+#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                      */
+#define HRT_GDC_LUT_BYTES                (HRT_GDC_N * 4 * 2)                /* 1024 addresses, 4 coefficients per address,  */
+                                                                       /* 2 bytes per coefficient                      */
 
-#define _HRT_GDC_REG_ALIGN               4                              
+#define _HRT_GDC_REG_ALIGN               4
 
   //     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    
-  
+  // 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.
 
   // Reg_ID - Address of the register to be configured
-  
+
   // 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
-  
+
 #define HRT_GDC_CONFIG_CMD             1
 #define HRT_GDC_DATA_CMD               0
 
-
 #define HRT_GDC_CMD_POS               31
 #define HRT_GDC_CMD_BITS               1
 #define HRT_GDC_CRUN_POS              30
 #define HRT_GDC_FRYIPXFRX_BITS        26
 #define HRT_GDC_P0X_BITS              23
 
-
-#define HRT_GDC_MAX_OXDIM           (8192-64)
+#define HRT_GDC_MAX_OXDIM           (8192 - 64)
 #define HRT_GDC_MAX_OYDIM           4095
-#define HRT_GDC_MAX_IXDIM           (8192-64)
+#define HRT_GDC_MAX_IXDIM           (8192 - 64)
 #define HRT_GDC_MAX_IYDIM           4095
 #define HRT_GDC_MAX_DS_FAC            16
-#define HRT_GDC_MAX_DX                 (HRT_GDC_MAX_DS_FAC*HRT_GDC_N - 1)
+#define HRT_GDC_MAX_DX                 (HRT_GDC_MAX_DS_FAC * HRT_GDC_N - 1)
 #define HRT_GDC_MAX_DY                 HRT_GDC_MAX_DX
 
-
 /* GDC lookup tables entries are 10 bits values, but they're
    stored 2 by 2 as 32 bit values, yielding 16 bits per entry.
    A GDC lookup table contains 64 * 4 elements */
 #define HRT_GDC_MODE_SCALING          0
 #define HRT_GDC_MODE_TETRAGON         1
 
-#define HRT_GDC_LUT_COEFF_OFFSET     16 
-#define HRT_GDC_FRY_BIT_OFFSET       16 
-// FRYIPXFRX is the only register where we store two values in one field, 
-// to save one token in the scaling protocol. 
-// Like this, we have three tokens in the scaling protocol, 
+#define HRT_GDC_LUT_COEFF_OFFSET     16
+#define HRT_GDC_FRY_BIT_OFFSET       16
+// FRYIPXFRX is the only register where we store two values in one field,
+// to save one token in the scaling protocol.
+// Like this, we have three tokens in the scaling protocol,
 // Otherwise, we would have had four.
 // The register bit-map is:
 //   31  26 25      16 15  10 9        0
 //  |------|----------|------|----------|
 //  | XXXX |   FRY    |  IPX |   FRX    |
 
-
 #define HRT_GDC_CE_FSM0_POS           0
 #define HRT_GDC_CE_FSM0_LEN           2
 #define HRT_GDC_CE_OPY_POS            2
 //   31            16 15        2 1  0
 //  |----------------|-----------|----|
 //  |      OPX       |    OPY    |FSM0|
-// However, for the time being at least, 
+// However, for the time being at least,
 // this implementation is meaningless in hss model,
 // So, we just return 0
 
-
 #define HRT_GDC_CHK_ENGINE_IDX        0
 #define HRT_GDC_WOIX_IDX              1
 #define HRT_GDC_WOIY_IDX              2
 
 #define HRT_GDC_LUT_IDX              32
 
-
 #endif /* HRT_GDC_v2_defs_h_ */
index 3082e2f5e014117ccd1548cceae21fd5eb2bd430..ffd7b38fce9d3b8dd6bb645a4ba47e60b6957582 100644 (file)
 #define HIVE_GP_TIMER_RESET_REG_IDX                              0
 #define HIVE_GP_TIMER_OVERALL_ENABLE_REG_IDX                     1
 #define HIVE_GP_TIMER_ENABLE_REG_IDX(timer)                     (HIVE_GP_TIMER_OVERALL_ENABLE_REG_IDX + 1 + timer)
-#define HIVE_GP_TIMER_VALUE_REG_IDX(timer,timers)               (HIVE_GP_TIMER_ENABLE_REG_IDX(timers) + timer)
-#define HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timer,timers)          (HIVE_GP_TIMER_VALUE_REG_IDX(timers, timers) + timer)
-#define HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timer,timers)       (HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timers, timers) + timer)
-#define HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irq,timers)     (HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timers, timers) + irq)
-#define HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irq,timers,irqs) (HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irqs, timers) + irq)
-#define HIVE_GP_TIMER_IRQ_ENABLE_REG_IDX(irq,timers,irqs)       (HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irqs, timers, irqs) + irq)
+#define HIVE_GP_TIMER_VALUE_REG_IDX(timer, timers)               (HIVE_GP_TIMER_ENABLE_REG_IDX(timers) + timer)
+#define HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timer, timers)          (HIVE_GP_TIMER_VALUE_REG_IDX(timers, timers) + timer)
+#define HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timer, timers)       (HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timers, timers) + timer)
+#define HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irq, timers)     (HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timers, timers) + irq)
+#define HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irq, timers, irqs) (HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irqs, timers) + irq)
+#define HIVE_GP_TIMER_IRQ_ENABLE_REG_IDX(irq, timers, irqs)       (HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irqs, timers, irqs) + irq)
 
 #define HIVE_GP_TIMER_COUNT_TYPE_HIGH                            0
 #define HIVE_GP_TIMER_COUNT_TYPE_LOW                             1
@@ -33,4 +33,4 @@
 #define HIVE_GP_TIMER_COUNT_TYPE_NEGEDGE                         3
 #define HIVE_GP_TIMER_COUNT_TYPES                                4
 
-#endif /* _gp_timer_defs_h */   
+#endif /* _gp_timer_defs_h */
index a807d4c990414af50c61c4e20075d385db25862f..d02435a3ec5a1e23fafae4a89505b7e66d48ed03 100644 (file)
@@ -35,7 +35,6 @@
 #define _gpio_block_reg_di_debounce_cnt_3      14
 #define _gpio_block_reg_di_active_level          15
 
-
 /* read-only registers */
 #define _gpio_block_reg_di                               16
 
index 7a94c1d85b087ac7293e19fa15b5c4cdd06b1f0b..0b921c33a7d2cedb1993581c442560b0f5719ed3 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     ,
+  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;
index 5a2ce9108ae4968221b5690d3d641d579732e631..be492eb9353da743e940f4249b9b81b39c7cd453 100644 (file)
    and in the DMA parameter list */
 #define HIVE_ISP_DDR_DMA_SPECS {{32,  8}, {16, 16}, {18, 14}, {25, 10}, {21, 12}}
 #define HIVE_ISP_DDR_WORD_BITS 256
-#define HIVE_ISP_DDR_WORD_BYTES  (HIVE_ISP_DDR_WORD_BITS/8)
+#define HIVE_ISP_DDR_WORD_BYTES  (HIVE_ISP_DDR_WORD_BITS / 8)
 #define HIVE_ISP_DDR_BYTES       (512 * 1024 * 1024)
 #define HIVE_ISP_DDR_BYTES_RTL   (127 * 1024 * 1024)
 #define HIVE_ISP_DDR_SMALL_BYTES (128 * 256 / 8)
 #define HIVE_ISP_PAGE_SHIFT    12
-#define HIVE_ISP_PAGE_SIZE     (1<<HIVE_ISP_PAGE_SHIFT)
+#define HIVE_ISP_PAGE_SIZE     BIT(HIVE_ISP_PAGE_SHIFT)
 
 #define CSS_DDR_WORD_BITS        HIVE_ISP_DDR_WORD_BITS
 #define CSS_DDR_WORD_BYTES       HIVE_ISP_DDR_WORD_BYTES
 #define HIVE_VMEM_VECTOR_ELEMENTS  64
 #define HIVE_VMEM_ELEMENT_BITS     14
 #define HIVE_XMEM_ELEMENT_BITS     16
-#define HIVE_VMEM_VECTOR_BYTES (HIVE_VMEM_VECTOR_ELEMENTS*HIVE_XMEM_ELEMENT_BITS/8) /* used for # addr bytes for one vector */
-#define HIVE_XMEM_PACKED_WORD_VMEM_ELEMENTS (HIVE_XMEM_WIDTH/HIVE_VMEM_ELEMENT_BITS)
-#define HIVE_XMEM_WORD_VMEM_ELEMENTS        (HIVE_XMEM_WIDTH/HIVE_XMEM_ELEMENT_BITS)
+#define HIVE_VMEM_VECTOR_BYTES (HIVE_VMEM_VECTOR_ELEMENTS * HIVE_XMEM_ELEMENT_BITS / 8) /* used for # addr bytes for one vector */
+#define HIVE_XMEM_PACKED_WORD_VMEM_ELEMENTS (HIVE_XMEM_WIDTH / HIVE_VMEM_ELEMENT_BITS)
+#define HIVE_XMEM_WORD_VMEM_ELEMENTS        (HIVE_XMEM_WIDTH / HIVE_XMEM_ELEMENT_BITS)
 #define XMEM_INT_SIZE              4
 
-
-
-#define HIVE_ISYS_INP_BUFFER_BYTES (64*1024)  /* 64 kByte = 2k words (of 256 bits) */
+#define HIVE_ISYS_INP_BUFFER_BYTES (64 * 1024)  /* 64 kByte = 2k words (of 256 bits) */
 
 /* If HIVE_ISP_DDR_BASE_OFFSET is set to a non-zero value, the wide bus just before the DDRAM gets an extra dummy port where         */
 /* address range 0 .. HIVE_ISP_DDR_BASE_OFFSET-1 maps onto. This effectively creates an offset for the DDRAM from system perspective */
 #define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I4_I0        51
 #define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I5_I0        52
 #define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I6_I0        53
-#define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I7_I0        54                                                         
+#define HIVE_GP_TIMER_ISP_WIRE_DEBUG_LM_MSINK_RUN_I7_I0        54
 #define HIVE_GP_TIMER_MIPI_SOL_BIT_ID                          55
 #define HIVE_GP_TIMER_MIPI_EOL_BIT_ID                          56
 #define HIVE_GP_TIMER_MIPI_SOF_BIT_ID                          57
 /* port definititions SP streaming monitor, monitors the status of streaming ports at the SP side of the streaming FIFO's */
 #define SP_STR_MON_PORT_SP2SIF            0
 #define SP_STR_MON_PORT_SIF2SP            1
-#define SP_STR_MON_PORT_SP2MC             2 
+#define SP_STR_MON_PORT_SP2MC             2
 #define SP_STR_MON_PORT_MC2SP             3
-#define SP_STR_MON_PORT_SP2DMA            4 
+#define SP_STR_MON_PORT_SP2DMA            4
 #define SP_STR_MON_PORT_DMA2SP            5
-#define SP_STR_MON_PORT_SP2ISP            6 
+#define SP_STR_MON_PORT_SP2ISP            6
 #define SP_STR_MON_PORT_ISP2SP            7
 #define SP_STR_MON_PORT_SP2GPD            8
 #define SP_STR_MON_PORT_FA2SP             9
-#define SP_STR_MON_PORT_SP2ISYS          10 
+#define SP_STR_MON_PORT_SP2ISYS          10
 #define SP_STR_MON_PORT_ISYS2SP          11
 #define SP_STR_MON_PORT_SP2PIFA          12
 #define SP_STR_MON_PORT_PIFA2SP          13
 /* port definititions ISP streaming monitor, monitors the status of streaming ports at the ISP side of the streaming FIFO's */
 #define ISP_STR_MON_PORT_ISP2PIFA         0
 #define ISP_STR_MON_PORT_PIFA2ISP         1
-#define ISP_STR_MON_PORT_ISP2PIFB         2 
+#define ISP_STR_MON_PORT_ISP2PIFB         2
 #define ISP_STR_MON_PORT_PIFB2ISP         3
-#define ISP_STR_MON_PORT_ISP2DMA          4 
+#define ISP_STR_MON_PORT_ISP2DMA          4
 #define ISP_STR_MON_PORT_DMA2ISP          5
-#define ISP_STR_MON_PORT_ISP2GDC1         6 
+#define ISP_STR_MON_PORT_ISP2GDC1         6
 #define ISP_STR_MON_PORT_GDC12ISP         7
-#define ISP_STR_MON_PORT_ISP2GDC2         8 
+#define ISP_STR_MON_PORT_ISP2GDC2         8
 #define ISP_STR_MON_PORT_GDC22ISP         9
-#define ISP_STR_MON_PORT_ISP2GPD         10 
+#define ISP_STR_MON_PORT_ISP2GPD         10
 #define ISP_STR_MON_PORT_FA2ISP          11
-#define ISP_STR_MON_PORT_ISP2SP          12 
+#define ISP_STR_MON_PORT_ISP2SP          12
 #define ISP_STR_MON_PORT_SP2ISP          13
 
 /* previously used ISP streaming monitor port identifiers, kept for backward compatibility */
 #define ISP_STR_MON_PORT_SND_PIF_A       ISP_STR_MON_PORT_ISP2PIFA
 #define ISP_STR_MON_PORT_RCV_PIF_A       ISP_STR_MON_PORT_PIFA2ISP
-#define ISP_STR_MON_PORT_SND_PIF_B       ISP_STR_MON_PORT_ISP2PIFB 
+#define ISP_STR_MON_PORT_SND_PIF_B       ISP_STR_MON_PORT_ISP2PIFB
 #define ISP_STR_MON_PORT_RCV_PIF_B       ISP_STR_MON_PORT_PIFB2ISP
-#define ISP_STR_MON_PORT_SND_DMA         ISP_STR_MON_PORT_ISP2DMA  
-#define ISP_STR_MON_PORT_RCV_DMA         ISP_STR_MON_PORT_DMA2ISP 
-#define ISP_STR_MON_PORT_SND_GDC         ISP_STR_MON_PORT_ISP2GDC1 
+#define ISP_STR_MON_PORT_SND_DMA         ISP_STR_MON_PORT_ISP2DMA
+#define ISP_STR_MON_PORT_RCV_DMA         ISP_STR_MON_PORT_DMA2ISP
+#define ISP_STR_MON_PORT_SND_GDC         ISP_STR_MON_PORT_ISP2GDC1
 #define ISP_STR_MON_PORT_RCV_GDC         ISP_STR_MON_PORT_GDC12ISP
-#define ISP_STR_MON_PORT_SND_GPD         ISP_STR_MON_PORT_ISP2GPD 
+#define ISP_STR_MON_PORT_SND_GPD         ISP_STR_MON_PORT_ISP2GPD
 #define ISP_STR_MON_PORT_RCV_GPD         ISP_STR_MON_PORT_FA2ISP
 #define ISP_STR_MON_PORT_SND_SP          ISP_STR_MON_PORT_ISP2SP
 #define ISP_STR_MON_PORT_RCV_SP          ISP_STR_MON_PORT_SP2ISP
-                                           
+
 /* port definititions MOD streaming monitor, monitors the status of streaming ports at the module side of the streaming FIFO's */
 
 #define MOD_STR_MON_PORT_PIFA2CELLS       0
 #define MOD_STR_MON_PORT_SND_GDC         12
 #define MOD_STR_MON_PORT_RCV_GDC         13
 
-
 /* testbench signals:       */
 
 /* testbench GP adapter register ids  */
index 8d4c9d67c0e24dd99d4ff9bc019007a1365bd560..2c5ba6fda83873baecbae5e121e897ddc636b88d 100644 (file)
@@ -29,7 +29,7 @@
 #define ISP           testbench_isp_isp_css_sec_part_isp
 #define SP            testbench_isp_isp_css_sec_part_scp
 
-#define IF_PRIM       testbench_isp_isp_css_part_is_2400_ifmt_ift_prim  
+#define IF_PRIM       testbench_isp_isp_css_part_is_2400_ifmt_ift_prim
 #define IF_PRIM_B     testbench_isp_isp_css_part_is_2400_ifmt_ift_prim_b
 #define IF_SEC        testbench_isp_isp_css_part_is_2400_ifmt_ift_sec
 #define IF_SEC_MASTER testbench_isp_isp_css_part_is_2400_ifmt_ift_sec_mt_out
@@ -96,7 +96,6 @@
 #define ISYS2401_IBUF_CNTRL_C testbench_isp_isp_css_part_is_2401_is_pipe_c_ibuf_ctrl
 #define ISYS2401_IRQ_CTRL_C   testbench_isp_isp_css_part_is_2401_is_pipe_c_irq_ctrl_pipe
 
-
 /* Testbench identifiers */
 #define DDR             testbench_ddram
 #define DDR_SMALL       testbench_ddram_small
index b4211a0c631a2b150ee025de86841f3aa1bac062..a22b771f61f2e8e727d0f1ec626978d4209478d6 100644 (file)
 
 #include <streaming_to_mipi_defs.h>
 
-#define _HIVE_ISP_CH_ID_MASK    ((1U << HIVE_ISP_CH_ID_BITS)-1)
-#define _HIVE_ISP_FMT_TYPE_MASK ((1U << HIVE_ISP_FMT_TYPE_BITS)-1)
+#define _HIVE_ISP_CH_ID_MASK    ((1U << HIVE_ISP_CH_ID_BITS) - 1)
+#define _HIVE_ISP_FMT_TYPE_MASK ((1U << HIVE_ISP_FMT_TYPE_BITS) - 1)
 
 #define _HIVE_STR_TO_MIPI_FMT_TYPE_LSB (HIVE_STR_TO_MIPI_CH_ID_LSB + HIVE_ISP_CH_ID_BITS)
 #define _HIVE_STR_TO_MIPI_DATA_B_LSB   (HIVE_STR_TO_MIPI_DATA_A_LSB + HIVE_IF_PIXEL_WIDTH)
+
 #endif /* _hive_isp_css_streaming_to_mipi_types_hrt_h_ */
index 58b0e6effbd068fe9f2d175072bb1e66c921428a..9715893c8a3605b977e5e7976df36a6f3501a577 100644 (file)
  * more details.
  */
 
-#ifndef _HRT_HIVE_TYPES_H 
-#define _HRT_HIVE_TYPES_H 
+#ifndef _HRT_HIVE_TYPES_H
+#define _HRT_HIVE_TYPES_H
 
 #include "version.h"
 #include "defs.h"
 
 #ifndef HRTCAT3
-#define _HRTCAT3(m,n,o)     m##n##o
-#define HRTCAT3(m,n,o)      _HRTCAT3(m,n,o)
+#define _HRTCAT3(m, n, o)     m##n##o
+#define HRTCAT3(m, n, o)      _HRTCAT3(m, n, o)
 #endif
 
 #ifndef HRTCAT4
-#define _HRTCAT4(m,n,o,p)     m##n##o##p
-#define HRTCAT4(m,n,o,p)      _HRTCAT4(m,n,o,p)
+#define _HRTCAT4(m, n, o, p)     m##n##o##p
+#define HRTCAT4(m, n, o, p)      _HRTCAT4(m, n, o, p)
 #endif
 
 #ifndef HRTMIN
-#define HRTMIN(a,b) (((a)<(b))?(a):(b))
+#define HRTMIN(a, b) (((a) < (b)) ? (a) : (b))
 #endif
-                                 
+
 #ifndef HRTMAX
-#define HRTMAX(a,b) (((a)>(b))?(a):(b))
+#define HRTMAX(a, b) (((a) > (b)) ? (a) : (b))
 #endif
 
 /* boolean data type */
@@ -59,8 +59,8 @@ typedef unsigned long long   hive_uint64;
 #define HRT_ADDRESS_WIDTH 32
 #endif
 
-#define HRT_DATA_BYTES    (HRT_DATA_WIDTH/8)
-#define HRT_ADDRESS_BYTES (HRT_ADDRESS_WIDTH/8)
+#define HRT_DATA_BYTES    (HRT_DATA_WIDTH / 8)
+#define HRT_ADDRESS_BYTES (HRT_ADDRESS_WIDTH / 8)
 
 #if HRT_DATA_WIDTH == 64
 typedef hive_uint64 hrt_data;
@@ -71,7 +71,7 @@ typedef hive_uint32 hrt_data;
 #endif
 
 #if HRT_ADDRESS_WIDTH == 64
-typedef hive_uint64 hrt_address; 
+typedef hive_uint64 hrt_address;
 #elif HRT_ADDRESS_WIDTH == 32
 typedef hive_uint32 hrt_address;
 #else
@@ -95,7 +95,7 @@ typedef hive_address hive_mem_address;
 typedef hive_uint    hive_mmio_id;
 typedef hive_mmio_id hive_slave_id;
 typedef hive_mmio_id hive_port_id;
-typedef hive_mmio_id hive_master_id; 
+typedef hive_mmio_id hive_master_id;
 typedef hive_mmio_id hive_mem_id;
 typedef hive_mmio_id hive_dev_id;
 typedef hive_mmio_id hive_fifo_id;
@@ -122,7 +122,7 @@ typedef hive_uint hive_inport_id;
 typedef hive_uint hive_msink_id;
 
 /* HRT specific */
-typedef charhive_program;
-typedef charhive_function;
+typedef char *hive_program;
+typedef char *hive_function;
 
 #endif /* _HRT_HIVE_TYPES_H */
index 7766f78cd12308f6fbbc14ae8e63c2c7e7f82242..176456da961f7307df5dca87c6388d7bbac5777b 100644 (file)
@@ -22,7 +22,7 @@
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_4            4
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_5            5
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_6            6
-#define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_7            7 
+#define HIVE_IFMT_GP_REGS_INPUT_SWITCH_LUT_REG_7            7
 #define HIVE_IFMT_GP_REGS_INPUT_SWITCH_FSYNC_LUT_REG        8
 #define HIVE_IFMT_GP_REGS_SRST_IDX                          9
 #define HIVE_IFMT_GP_REGS_SLV_REG_SRST_IDX                 10
index 87fbf82edb5bc44d6c5ca761c06aa57a8606fc97..1dd8ea3cd6d4763ba9a9e412b8f4a28e0e5b2510 100644 (file)
 #define HIVE_ISEL_GP_REGS_SYNCGEN_ENABLE_IDX                    0
 #define HIVE_ISEL_GP_REGS_SYNCGEN_FREE_RUNNING_IDX              1
 #define HIVE_ISEL_GP_REGS_SYNCGEN_PAUSE_IDX                     2
-#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_FRAMES_IDX                 3 
-#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_PIX_IDX                    4      
-#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_LINES_IDX                  5      
-#define HIVE_ISEL_GP_REGS_SYNCGEN_HBLANK_CYCLES_IDX             6      
-#define HIVE_ISEL_GP_REGS_SYNCGEN_VBLANK_CYCLES_IDX             7      
+#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_FRAMES_IDX                 3
+#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_PIX_IDX                    4
+#define HIVE_ISEL_GP_REGS_SYNCGEN_NR_LINES_IDX                  5
+#define HIVE_ISEL_GP_REGS_SYNCGEN_HBLANK_CYCLES_IDX             6
+#define HIVE_ISEL_GP_REGS_SYNCGEN_VBLANK_CYCLES_IDX             7
 
-#define HIVE_ISEL_GP_REGS_SOF_IDX                               8 
-#define HIVE_ISEL_GP_REGS_EOF_IDX                               9 
-#define HIVE_ISEL_GP_REGS_SOL_IDX                              10 
-#define HIVE_ISEL_GP_REGS_EOL_IDX                              11 
+#define HIVE_ISEL_GP_REGS_SOF_IDX                               8
+#define HIVE_ISEL_GP_REGS_EOF_IDX                               9
+#define HIVE_ISEL_GP_REGS_SOL_IDX                              10
+#define HIVE_ISEL_GP_REGS_EOL_IDX                              11
 
-#define HIVE_ISEL_GP_REGS_PRBS_ENABLE                          12      
-#define HIVE_ISEL_GP_REGS_PRBS_ENABLE_PORT_B                   13      
-#define HIVE_ISEL_GP_REGS_PRBS_LFSR_RESET_VALUE                14      
+#define HIVE_ISEL_GP_REGS_PRBS_ENABLE                          12
+#define HIVE_ISEL_GP_REGS_PRBS_ENABLE_PORT_B                   13
+#define HIVE_ISEL_GP_REGS_PRBS_LFSR_RESET_VALUE                14
 
-#define HIVE_ISEL_GP_REGS_TPG_ENABLE                           15      
-#define HIVE_ISEL_GP_REGS_TPG_ENABLE_PORT_B                    16      
-#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_MASK_IDX                 17      
-#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_MASK_IDX                 18      
-#define HIVE_ISEL_GP_REGS_TPG_XY_CNT_MASK_IDX                  19      
-#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_DELTA_IDX                20      
-#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_DELTA_IDX                21      
-#define HIVE_ISEL_GP_REGS_TPG_MODE_IDX                         22     
-#define HIVE_ISEL_GP_REGS_TPG_R1_IDX                           23 
+#define HIVE_ISEL_GP_REGS_TPG_ENABLE                           15
+#define HIVE_ISEL_GP_REGS_TPG_ENABLE_PORT_B                    16
+#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_MASK_IDX                 17
+#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_MASK_IDX                 18
+#define HIVE_ISEL_GP_REGS_TPG_XY_CNT_MASK_IDX                  19
+#define HIVE_ISEL_GP_REGS_TPG_HOR_CNT_DELTA_IDX                20
+#define HIVE_ISEL_GP_REGS_TPG_VER_CNT_DELTA_IDX                21
+#define HIVE_ISEL_GP_REGS_TPG_MODE_IDX                         22
+#define HIVE_ISEL_GP_REGS_TPG_R1_IDX                           23
 #define HIVE_ISEL_GP_REGS_TPG_G1_IDX                           24
 #define HIVE_ISEL_GP_REGS_TPG_B1_IDX                           25
 #define HIVE_ISEL_GP_REGS_TPG_R2_IDX                           26
 #define HIVE_ISEL_GP_REGS_TPG_G2_IDX                           27
 #define HIVE_ISEL_GP_REGS_TPG_B2_IDX                           28
 
-
 #define HIVE_ISEL_GP_REGS_CH_ID_IDX                            29
 #define HIVE_ISEL_GP_REGS_FMT_TYPE_IDX                         30
 #define HIVE_ISEL_GP_REGS_DATA_SEL_IDX                         31
index 20a13c4cdb562fc8773992317d0b9b4a06a149cb..2d5baae305220c25cfbe956cf514355f197ae181 100644 (file)
@@ -15,8 +15,8 @@
 #ifndef _input_switch_2400_defs_h
 #define _input_switch_2400_defs_h
 
-#define _HIVE_INPUT_SWITCH_GET_LUT_REG_ID(ch_id, fmt_type) (((ch_id)*2) + ((fmt_type)>=16))
-#define _HIVE_INPUT_SWITCH_GET_LUT_REG_LSB(fmt_type)        (((fmt_type)%16) * 2)
+#define _HIVE_INPUT_SWITCH_GET_LUT_REG_ID(ch_id, fmt_type) (((ch_id) * 2) + ((fmt_type) >= 16))
+#define _HIVE_INPUT_SWITCH_GET_LUT_REG_LSB(fmt_type)        (((fmt_type) % 16) * 2)
 
 #define HIVE_INPUT_SWITCH_SELECT_NO_OUTPUT   0
 #define HIVE_INPUT_SWITCH_SELECT_IF_PRIM     1
index a7f0ca80bc9be0afed16a0726fdd068946aef12a..fcfa8c4971befd98c0f1884b5068fc155b728eb2 100644 (file)
@@ -50,7 +50,6 @@
 #define ISYS_CTRL_CAPT_C_FSM_STATE_INFO_REG_ID          20
 #define ISYS_CTRL_ACQ_FSM_STATE_INFO_REG_ID             21
 #define ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID    22
 
 /* register reset value */
 #define ISYS_CTRL_CAPT_START_ADDR_A_REG_RSTVAL           0
 #define ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_RSTVAL      128
 #define ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_RSTVAL      128
 #define ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_RSTVAL      128
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_RSTVAL      3 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_RSTVAL      3 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_RSTVAL      3 
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_RSTVAL      3
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_RSTVAL      3
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_RSTVAL      3
 #define ISYS_CTRL_ACQ_START_ADDR_REG_RSTVAL              0
-#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_RSTVAL         128 
-#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_RSTVAL         3 
+#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_RSTVAL         128
+#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_RSTVAL         3
 #define ISYS_CTRL_INIT_REG_RSTVAL                        0
-#define ISYS_CTRL_LAST_COMMAND_REG_RSTVAL                15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)  
+#define ISYS_CTRL_LAST_COMMAND_REG_RSTVAL                15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_NEXT_COMMAND_REG_RSTVAL                15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_LAST_ACKNOWLEDGE_REG_RSTVAL            15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_NEXT_ACKNOWLEDGE_REG_RSTVAL            15    //0x0000_000F (to signal non-valid cmd/ack after reset/soft-reset)
 #define ISYS_CTRL_FSM_STATE_INFO_REG_RSTVAL              0
-#define ISYS_CTRL_CAPT_A_FSM_STATE_INFO_REG_RSTVAL       0 
+#define ISYS_CTRL_CAPT_A_FSM_STATE_INFO_REG_RSTVAL       0
 #define ISYS_CTRL_CAPT_B_FSM_STATE_INFO_REG_RSTVAL       0
 #define ISYS_CTRL_CAPT_C_FSM_STATE_INFO_REG_RSTVAL       0
 #define ISYS_CTRL_ACQ_FSM_STATE_INFO_REG_RSTVAL          0
 #define ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_RSTVAL 0
 
 /* register width value */
-#define ISYS_CTRL_CAPT_START_ADDR_A_REG_WIDTH            9 
-#define ISYS_CTRL_CAPT_START_ADDR_B_REG_WIDTH            9 
-#define ISYS_CTRL_CAPT_START_ADDR_C_REG_WIDTH            9 
-#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_WIDTH       9 
-#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_WIDTH       9 
-#define ISYS_CTRL_ACQ_START_ADDR_REG_WIDTH               9 
-#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_WIDTH          9 
-#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_WIDTH          9 
-#define ISYS_CTRL_INIT_REG_WIDTH                         3 
+#define ISYS_CTRL_CAPT_START_ADDR_A_REG_WIDTH            9
+#define ISYS_CTRL_CAPT_START_ADDR_B_REG_WIDTH            9
+#define ISYS_CTRL_CAPT_START_ADDR_C_REG_WIDTH            9
+#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_WIDTH       9
+#define ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_WIDTH       9
+#define ISYS_CTRL_ACQ_START_ADDR_REG_WIDTH               9
+#define ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_WIDTH          9
+#define ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_WIDTH          9
+#define ISYS_CTRL_INIT_REG_WIDTH                         3
 #define ISYS_CTRL_LAST_COMMAND_REG_WIDTH                 32    /* slave data width */
 #define ISYS_CTRL_NEXT_COMMAND_REG_WIDTH                 32
 #define ISYS_CTRL_LAST_ACKNOWLEDGE_REG_WIDTH             32
 /*
 InpSysCaptFramesAcq  1/0  [3:0] - 'b0000
 [7:4] - CaptPortId,
-           CaptA-'b0000
-           CaptB-'b0001
-           CaptC-'b0010
+          CaptA-'b0000
+          CaptB-'b0001
+          CaptC-'b0010
 [31:16] - NOF_frames
 InpSysCaptFrameExt  2/0  [3:0] - 'b0001'
 [7:4] - CaptPortId,
-           'b0000 - CaptA 
-           'b0001 - CaptB
-           'b0010 - CaptC
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
 
   2/1  [31:0] - external capture address
-InpSysAcqFrame  2/0  [3:0] - 'b0010, 
+InpSysAcqFrame  2/0  [3:0] - 'b0010,
 [31:4] - NOF_ext_mem_words
   2/1  [31:0] - external memory read start address
-InpSysOverruleON  1/0  [3:0] - 'b0011, 
+InpSysOverruleON  1/0  [3:0] - 'b0011,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-
-InpSysOverruleOFF  1/0  [3:0] - 'b0100, 
+InpSysOverruleOFF  1/0  [3:0] - 'b0100,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-InpSysOverruleCmd  2/0  [3:0] - 'b0101, 
+InpSysOverruleCmd  2/0  [3:0] - 'b0101,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
   2/1  [31:0] - command token value for port opid
 
-
 acknowledge tokens:
 
 InpSysAckCFA  1/0   [3:0] - 'b0000
  [7:4] - CaptPortId,
-           CaptA-'b0000
-           CaptB- 'b0001
-           CaptC-'b0010
+          CaptA-'b0000
+          CaptB- 'b0001
+          CaptC-'b0010
  [31:16] - NOF_frames
 InpSysAckCFE  1/0  [3:0] - 'b0001'
 [7:4] - CaptPortId,
-           'b0000 - CaptA 
-           'b0001 - CaptB
-           'b0010 - CaptC
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
 
 InpSysAckAF  1/0  [3:0] - 'b0010
-InpSysAckOverruleON  1/0  [3:0] - 'b0011, 
+InpSysAckOverruleON  1/0  [3:0] - 'b0011,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-InpSysAckOverruleOFF  1/0  [3:0] - 'b0100, 
+InpSysAckOverruleOFF  1/0  [3:0] - 'b0100,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
-
-InpSysAckOverrule  2/0  [3:0] - 'b0101, 
+InpSysAckOverrule  2/0  [3:0] - 'b0101,
 [7:4] - overrule port id (opid)
-           'b0000 - CaptA
-           'b0001 - CaptB
-           'b0010 - CaptC
-           'b0011 - Acq
-           'b0100 - DMA
-
+          'b0000 - CaptA
+          'b0001 - CaptB
+          'b0010 - CaptC
+          'b0011 - Acq
+          'b0100 - DMA
 
   2/1  [31:0] - acknowledge token value from port opid
 
-
-
 */
 
-
 /* Command and acknowledge tokens IDs */
 #define ISYS_CTRL_CAPT_FRAMES_ACQ_TOKEN_ID        0 /* 0000b */
 #define ISYS_CTRL_CAPT_FRAME_EXT_TOKEN_ID         1 /* 0001b */
@@ -232,10 +221,10 @@ InpSysAckOverrule  2/0  [3:0] - 'b0101,
 #define ISYS_CTRL_TOKEN_ID_IDX                    0
 #define ISYS_CTRL_TOKEN_ID_BITS                   (ISYS_CTRL_TOKEN_ID_MSB - ISYS_CTRL_TOKEN_ID_LSB + 1)
 #define ISYS_CTRL_PORT_ID_IDX                     (ISYS_CTRL_TOKEN_ID_IDX + ISYS_CTRL_TOKEN_ID_BITS)
-#define ISYS_CTRL_PORT_ID_BITS                    (ISYS_CTRL_PORT_ID_TOKEN_MSB - ISYS_CTRL_PORT_ID_TOKEN_LSB +1)
-#define ISYS_CTRL_NOF_CAPT_IDX                    ISYS_CTRL_NOF_CAPT_TOKEN_LSB    
+#define ISYS_CTRL_PORT_ID_BITS                    (ISYS_CTRL_PORT_ID_TOKEN_MSB - ISYS_CTRL_PORT_ID_TOKEN_LSB + 1)
+#define ISYS_CTRL_NOF_CAPT_IDX                    ISYS_CTRL_NOF_CAPT_TOKEN_LSB
 #define ISYS_CTRL_NOF_CAPT_BITS                   (ISYS_CTRL_NOF_CAPT_TOKEN_MSB - ISYS_CTRL_NOF_CAPT_TOKEN_LSB + 1)
-#define ISYS_CTRL_NOF_EXT_IDX                     ISYS_CTRL_NOF_EXT_TOKEN_LSB    
+#define ISYS_CTRL_NOF_EXT_IDX                     ISYS_CTRL_NOF_EXT_TOKEN_LSB
 #define ISYS_CTRL_NOF_EXT_BITS                    (ISYS_CTRL_NOF_EXT_TOKEN_MSB - ISYS_CTRL_NOF_EXT_TOKEN_LSB + 1)
 
 #define ISYS_CTRL_PORT_ID_CAPT_A                  0 /* device ID for capture unit A      */
@@ -248,7 +237,7 @@ InpSysAckOverrule  2/0  [3:0] - 'b0101,
 #define ISYS_CTRL_PORT_ID_DMA_ACQ                 7 /* device ID for dma unit            */
 
 #define ISYS_CTRL_NO_ACQ_ACK                      16 /* no ack from acquisition unit */
-#define ISYS_CTRL_NO_DMA_ACK                      0 
+#define ISYS_CTRL_NO_DMA_ACK                      0
 #define ISYS_CTRL_NO_CAPT_ACK                     16
 
-#endif /* _input_system_ctrl_defs_h */ 
+#endif /* _input_system_ctrl_defs_h */
index ec6dd4487158e4fabf4e587684e4290ffdd23ed2..efb3d7e135bdd503945cb52ba76c34bb30aa38e0 100644 (file)
@@ -25,4 +25,4 @@
 
 #define _HRT_IRQ_CONTROLLER_REG_ALIGN 4
 
-#endif /* _irq_controller_defs_h */   
+#endif /* _irq_controller_defs_h */
index 033e23bcf672ae5ddfabeec7b2978d7b9f1f05b8..7e79e3c611ee4edac16692271947d8f1d673a7bb 100644 (file)
 #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_NWAY                               ISP_VEC_NELEMS
 #define NBITS                                  ISP_VEC_ELEMBITS
 
-#define _isp_ceil_div(a,b)                     (((a)+(b)-1)/(b))
+#define _isp_ceil_div(a, b)                     (((a) + (b) - 1) / (b))
 
 #ifdef C_RUN
-#define ISP_VEC_ALIGN                          (_isp_ceil_div(ISP_VEC_WIDTH, 64)*8)
+#define ISP_VEC_ALIGN                          (_isp_ceil_div(ISP_VEC_WIDTH, 64) * 8)
 #else
 #define ISP_VEC_ALIGN                          ISP_VMEM_ALIGN
 #endif
index 59362072162710fbc0d5a5a47c11c48dd38b6861..5bdc16c71e82c74c286f516e93aa8788c10cd640 100644 (file)
@@ -16,7 +16,7 @@
 #define _isp_acquisition_defs_h
 
 #define _ISP_ACQUISITION_REG_ALIGN                4  /* assuming 32 bit control bus width */
-#define _ISP_ACQUISITION_BYTES_PER_ELEM           4            
+#define _ISP_ACQUISITION_BYTES_PER_ELEM           4
 
 /* --------------------------------------------------*/
 
 /* REGISTER INFO */
 /* --------------------------------------------------*/
 
-#define NOF_ACQ_REGS                              12      
+#define NOF_ACQ_REGS                              12
 
 // Register id's of MMIO slave accesible registers
-#define ACQ_START_ADDR_REG_ID                     0              
+#define ACQ_START_ADDR_REG_ID                     0
 #define ACQ_MEM_REGION_SIZE_REG_ID                1
 #define ACQ_NUM_MEM_REGIONS_REG_ID                2
-#define ACQ_INIT_REG_ID                           3 
+#define ACQ_INIT_REG_ID                           3
 #define ACQ_RECEIVED_SHORT_PACKETS_REG_ID         4
 #define ACQ_RECEIVED_LONG_PACKETS_REG_ID          5
 #define ACQ_LAST_COMMAND_REG_ID                   6
 #define ACQ_NEXT_ACKNOWLEDGE_REG_ID               9
 #define ACQ_FSM_STATE_INFO_REG_ID                 10
 #define ACQ_INT_CNTR_INFO_REG_ID                  11
+
 // Register width
-#define ACQ_START_ADDR_REG_WIDTH                  9               
-#define ACQ_MEM_REGION_SIZE_REG_WIDTH             9  
-#define ACQ_NUM_MEM_REGIONS_REG_WIDTH             9  
-#define ACQ_INIT_REG_WIDTH                        3  
-#define ACQ_RECEIVED_SHORT_PACKETS_REG_WIDTH      32 
-#define ACQ_RECEIVED_LONG_PACKETS_REG_WIDTH       32  
-#define ACQ_LAST_COMMAND_REG_WIDTH                32  
-#define ACQ_NEXT_COMMAND_REG_WIDTH                32  
-#define ACQ_LAST_ACKNOWLEDGE_REG_WIDTH            32  
-#define ACQ_NEXT_ACKNOWLEDGE_REG_WIDTH            32  
-#define ACQ_FSM_STATE_INFO_REG_WIDTH              ((MEM2STREAM_FSM_STATE_BITS * 3) + (ACQ_SYNCHRONIZER_FSM_STATE_BITS *3))
+#define ACQ_START_ADDR_REG_WIDTH                  9
+#define ACQ_MEM_REGION_SIZE_REG_WIDTH             9
+#define ACQ_NUM_MEM_REGIONS_REG_WIDTH             9
+#define ACQ_INIT_REG_WIDTH                        3
+#define ACQ_RECEIVED_SHORT_PACKETS_REG_WIDTH      32
+#define ACQ_RECEIVED_LONG_PACKETS_REG_WIDTH       32
+#define ACQ_LAST_COMMAND_REG_WIDTH                32
+#define ACQ_NEXT_COMMAND_REG_WIDTH                32
+#define ACQ_LAST_ACKNOWLEDGE_REG_WIDTH            32
+#define ACQ_NEXT_ACKNOWLEDGE_REG_WIDTH            32
+#define ACQ_FSM_STATE_INFO_REG_WIDTH              ((MEM2STREAM_FSM_STATE_BITS * 3) + (ACQ_SYNCHRONIZER_FSM_STATE_BITS * 3))
 #define ACQ_INT_CNTR_INFO_REG_WIDTH               32
 
 /* register reset value */
-#define ACQ_START_ADDR_REG_RSTVAL                 0              
+#define ACQ_START_ADDR_REG_RSTVAL                 0
 #define ACQ_MEM_REGION_SIZE_REG_RSTVAL            128
 #define ACQ_NUM_MEM_REGIONS_REG_RSTVAL            3
-#define ACQ_INIT_REG_RSTVAL                       0                           
+#define ACQ_INIT_REG_RSTVAL                       0
 #define ACQ_RECEIVED_SHORT_PACKETS_REG_RSTVAL     0
 #define ACQ_RECEIVED_LONG_PACKETS_REG_RSTVAL      0
 #define ACQ_LAST_COMMAND_REG_RSTVAL               0
 #define ACQ_NEXT_COMMAND_REG_RSTVAL               0
 #define ACQ_LAST_ACKNOWLEDGE_REG_RSTVAL           0
-#define ACQ_NEXT_ACKNOWLEDGE_REG_RSTVAL           0 
+#define ACQ_NEXT_ACKNOWLEDGE_REG_RSTVAL           0
 #define ACQ_FSM_STATE_INFO_REG_RSTVAL             0
-#define ACQ_INT_CNTR_INFO_REG_RSTVAL              0 
+#define ACQ_INT_CNTR_INFO_REG_RSTVAL              0
 
 /* bit definitions */
 #define ACQ_INIT_RST_REG_BIT                      0
@@ -88,7 +88,7 @@
 /* TOKEN INFO */
 /* --------------------------------------------------*/
 #define ACQ_TOKEN_ID_LSB                          0
-#define ACQ_TOKEN_ID_MSB                          3            
+#define ACQ_TOKEN_ID_MSB                          3
 #define ACQ_TOKEN_WIDTH                           (ACQ_TOKEN_ID_MSB - ACQ_TOKEN_ID_LSB  + 1) // 4
 #define ACQ_TOKEN_ID_IDX                          0
 #define ACQ_TOKEN_ID_BITS                         ACQ_TOKEN_WIDTH
@@ -97,9 +97,9 @@
 #define ACQ_CMD_START_ADDR_IDX                    4
 #define ACQ_CMD_START_ADDR_BITS                   9
 #define ACQ_CMD_NOFWORDS_IDX                      13
-#define ACQ_CMD_NOFWORDS_BITS                     9  
+#define ACQ_CMD_NOFWORDS_BITS                     9
 #define ACQ_MEM_REGION_ID_IDX                     22
-#define ACQ_MEM_REGION_ID_BITS                    9 
+#define ACQ_MEM_REGION_ID_BITS                    9
 #define ACQ_PACKET_LENGTH_TOKEN_MSB               21
 #define ACQ_PACKET_LENGTH_TOKEN_LSB               13
 #define ACQ_PACKET_DATA_FORMAT_ID_TOKEN_MSB       9
 #define ACQ_PACKET_MEM_REGION_ID_TOKEN_MSB        12           /* only for capt_end_of_packet_written */
 #define ACQ_PACKET_MEM_REGION_ID_TOKEN_LSB        4            /* only for capt_end_of_packet_written */
 
-
 /* Command tokens IDs */
 #define ACQ_READ_REGION_AUTO_INCR_TOKEN_ID        0 //0000b
 #define ACQ_READ_REGION_TOKEN_ID                  1 //0001b
-#define ACQ_READ_REGION_SOP_TOKEN_ID              2 //0010b  
+#define ACQ_READ_REGION_SOP_TOKEN_ID              2 //0010b
 #define ACQ_INIT_TOKEN_ID                         8 //1000b
 
 /* Acknowledge token IDs */
 #define ACQ_TOKEN_NOFWORDS_MSB                    21
 #define ACQ_TOKEN_NOFWORDS_LSB                    13
 #define ACQ_TOKEN_STARTADDR_MSB                   12
-#define ACQ_TOKEN_STARTADDR_LSB                   4  
-
+#define ACQ_TOKEN_STARTADDR_LSB                   4
 
 /* --------------------------------------------------*/
 /* MIPI */
 /* --------------------------------------------------*/
 
 #define WORD_COUNT_WIDTH                          16
-#define PKT_CODE_WIDTH                            6            
-#define CHN_NO_WIDTH                              2  
+#define PKT_CODE_WIDTH                            6
+#define CHN_NO_WIDTH                              2
 #define ERROR_INFO_WIDTH                          8
-  
+
 #define LONG_PKTCODE_MAX                          63
 #define LONG_PKTCODE_MIN                          16
 #define SHORT_PKTCODE_MAX                         15
 #define ACQ_LINE_PAYLOAD                          4
 #define ACQ_GEN_SH_PKT                            5
 
-
 /* bit definition */
 #define ACQ_PKT_TYPE_IDX                          16
 #define ACQ_PKT_TYPE_BITS                         6
 #define ACQ_ACK_PKT_LEN_IDX                       4
 #define ACQ_ACK_PKT_LEN_BITS                      16
 
-
 /* --------------------------------------------------*/
 /* Packet Data Type */
 /* --------------------------------------------------*/
 
-
 #define ACQ_YUV420_8_DATA                       24   /* 01 1000 YUV420 8-bit                                        */
 #define ACQ_YUV420_10_DATA                      25   /* 01 1001  YUV420 10-bit                                      */
 #define ACQ_YUV420_8L_DATA                      26   /* 01 1010   YUV420 8-bit legacy                               */
 #define ACQ_YUV422_8_DATA                       30   /* 01 1110   YUV422 8-bit                                      */
 #define ACQ_YUV422_10_DATA                      31   /* 01 1111   YUV422 10-bit                                     */
 #define ACQ_RGB444_DATA                         32   /* 10 0000   RGB444                                            */
-#define ACQ_RGB555_DATA                                                 33   /* 10 0001   RGB555                                            */
-#define ACQ_RGB565_DATA                                                 34   /* 10 0010   RGB565                                            */
-#define ACQ_RGB666_DATA                                                 35   /* 10 0011   RGB666                                            */
-#define ACQ_RGB888_DATA                                                 36   /* 10 0100   RGB888                                            */
-#define ACQ_RAW6_DATA                                                   40   /* 10 1000   RAW6                                              */
-#define ACQ_RAW7_DATA                                                   41   /* 10 1001   RAW7                                              */
-#define ACQ_RAW8_DATA                                                   42   /* 10 1010   RAW8                                              */
-#define ACQ_RAW10_DATA                                                  43   /* 10 1011   RAW10                                             */
-#define ACQ_RAW12_DATA                                                  44   /* 10 1100   RAW12                                             */
-#define ACQ_RAW14_DATA                                                  45   /* 10 1101   RAW14                                             */
-#define ACQ_USR_DEF_1_DATA                                              48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
-#define ACQ_USR_DEF_2_DATA                                              49   /* 11 0001    User Defined 8-bit Data Type 2                   */
-#define ACQ_USR_DEF_3_DATA                                              50   /* 11 0010    User Defined 8-bit Data Type 3                   */
-#define ACQ_USR_DEF_4_DATA                                              51   /* 11 0011    User Defined 8-bit Data Type 4                   */
-#define ACQ_USR_DEF_5_DATA                                              52   /* 11 0100    User Defined 8-bit Data Type 5                   */
-#define ACQ_USR_DEF_6_DATA                                              53   /* 11 0101    User Defined 8-bit Data Type 6                   */
-#define ACQ_USR_DEF_7_DATA                                              54   /* 11 0110    User Defined 8-bit Data Type 7                   */
-#define ACQ_USR_DEF_8_DATA                                              55   /* 11 0111    User Defined 8-bit Data Type 8                   */
-#define ACQ_Emb_DATA                                                    18   /* 01 0010    embedded eight bit non image data                */
-#define ACQ_SOF_DATA                                                    0   /* 00 0000    frame start                                      */
-#define ACQ_EOF_DATA                                                    1   /* 00 0001    frame end                                        */
-#define ACQ_SOL_DATA                                                    2   /* 00 0010    line start                                       */
-#define ACQ_EOL_DATA                                                    3   /* 00 0011    line end                                         */
-#define ACQ_GEN_SH1_DATA                                                8   /* 00 1000  Generic Short Packet Code 1                        */
-#define ACQ_GEN_SH2_DATA                                                9   /* 00 1001    Generic Short Packet Code 2                      */
-#define ACQ_GEN_SH3_DATA                                                10   /* 00 1010    Generic Short Packet Code 3                      */
-#define ACQ_GEN_SH4_DATA                                                11   /* 00 1011    Generic Short Packet Code 4                      */
-#define ACQ_GEN_SH5_DATA                                                12   /* 00 1100    Generic Short Packet Code 5                      */
-#define ACQ_GEN_SH6_DATA                                                13   /* 00 1101    Generic Short Packet Code 6                      */
-#define ACQ_GEN_SH7_DATA                                                14   /* 00 1110    Generic Short Packet Code 7                      */
-#define ACQ_GEN_SH8_DATA                                                15   /* 00 1111    Generic Short Packet Code 8                      */
-#define ACQ_YUV420_8_CSPS_DATA                                          28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
-#define ACQ_YUV420_10_CSPS_DATA                                         29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
+#define ACQ_RGB555_DATA                                                 33   /* 10 0001   RGB555                                            */
+#define ACQ_RGB565_DATA                                                 34   /* 10 0010   RGB565                                            */
+#define ACQ_RGB666_DATA                                                 35   /* 10 0011   RGB666                                            */
+#define ACQ_RGB888_DATA                                                 36   /* 10 0100   RGB888                                            */
+#define ACQ_RAW6_DATA                                                   40   /* 10 1000   RAW6                                              */
+#define ACQ_RAW7_DATA                                                   41   /* 10 1001   RAW7                                              */
+#define ACQ_RAW8_DATA                                                   42   /* 10 1010   RAW8                                              */
+#define ACQ_RAW10_DATA                                          43   /* 10 1011   RAW10                                             */
+#define ACQ_RAW12_DATA                                          44   /* 10 1100   RAW12                                             */
+#define ACQ_RAW14_DATA                                          45   /* 10 1101   RAW14                                             */
+#define ACQ_USR_DEF_1_DATA                                              48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
+#define ACQ_USR_DEF_2_DATA                                              49   /* 11 0001    User Defined 8-bit Data Type 2                   */
+#define ACQ_USR_DEF_3_DATA                                              50   /* 11 0010    User Defined 8-bit Data Type 3                   */
+#define ACQ_USR_DEF_4_DATA                                              51   /* 11 0011    User Defined 8-bit Data Type 4                   */
+#define ACQ_USR_DEF_5_DATA                                              52   /* 11 0100    User Defined 8-bit Data Type 5                   */
+#define ACQ_USR_DEF_6_DATA                                              53   /* 11 0101    User Defined 8-bit Data Type 6                   */
+#define ACQ_USR_DEF_7_DATA                                              54   /* 11 0110    User Defined 8-bit Data Type 7                   */
+#define ACQ_USR_DEF_8_DATA                                              55   /* 11 0111    User Defined 8-bit Data Type 8                   */
+#define ACQ_Emb_DATA                                                    18   /* 01 0010    embedded eight bit non image data                */
+#define ACQ_SOF_DATA                                                    0   /* 00 0000    frame start                                      */
+#define ACQ_EOF_DATA                                                    1   /* 00 0001    frame end                                        */
+#define ACQ_SOL_DATA                                                    2   /* 00 0010    line start                                       */
+#define ACQ_EOL_DATA                                                    3   /* 00 0011    line end                                         */
+#define ACQ_GEN_SH1_DATA                                                8   /* 00 1000  Generic Short Packet Code 1                        */
+#define ACQ_GEN_SH2_DATA                                                9   /* 00 1001    Generic Short Packet Code 2                      */
+#define ACQ_GEN_SH3_DATA                                                10   /* 00 1010    Generic Short Packet Code 3                      */
+#define ACQ_GEN_SH4_DATA                                                11   /* 00 1011    Generic Short Packet Code 4                      */
+#define ACQ_GEN_SH5_DATA                                                12   /* 00 1100    Generic Short Packet Code 5                      */
+#define ACQ_GEN_SH6_DATA                                                13   /* 00 1101    Generic Short Packet Code 6                      */
+#define ACQ_GEN_SH7_DATA                                                14   /* 00 1110    Generic Short Packet Code 7                      */
+#define ACQ_GEN_SH8_DATA                                                15   /* 00 1111    Generic Short Packet Code 8                      */
+#define ACQ_YUV420_8_CSPS_DATA                                  28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
+#define ACQ_YUV420_10_CSPS_DATA                                         29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
 #define ACQ_RESERVED_DATA_TYPE_MIN              56
 #define ACQ_RESERVED_DATA_TYPE_MAX              63
 #define ACQ_GEN_LONG_RESERVED_DATA_TYPE_MIN     19
 
 /* --------------------------------------------------*/
 
-#endif /* _isp_acquisition_defs_h */ 
+#endif /* _isp_acquisition_defs_h */
index aa413df022f2ed197fbec302d14b465b7deea48b..6c36d3b6f68108af194425f2a07de271ffa89951 100644 (file)
 #define _isp_capture_defs_h
 
 #define _ISP_CAPTURE_REG_ALIGN                    4  /* assuming 32 bit control bus width */
-#define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */                                                        
-#define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM/8        )                                          
-#define _ISP_CAPTURE_BYTES_PER_WORD               32           /* 256/8 */     
-#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM                       
+#define _ISP_CAPTURE_BITS_PER_ELEM                32  /* only for data, not SOP */
+#define _ISP_CAPTURE_BYTES_PER_ELEM               (_ISP_CAPTURE_BITS_PER_ELEM / 8)
+#define _ISP_CAPTURE_BYTES_PER_WORD               32           /* 256/8 */
+#define _ISP_CAPTURE_ELEM_PER_WORD                _ISP_CAPTURE_BYTES_PER_WORD / _ISP_CAPTURE_BYTES_PER_ELEM
 
 //#define CAPT_RCV_ACK                              1
-//#define CAPT_WRT_ACK                              2               
-//#define CAPT_IRQ_ACK                              3                        
+//#define CAPT_WRT_ACK                              2
+//#define CAPT_IRQ_ACK                              3
 
 /* --------------------------------------------------*/
 
 
 // Register id's of MMIO slave accesible registers
 #define CAPT_START_MODE_REG_ID                    0
-#define CAPT_START_ADDR_REG_ID                    1 
-#define CAPT_MEM_REGION_SIZE_REG_ID               2 
-#define CAPT_NUM_MEM_REGIONS_REG_ID               3 
-#define CAPT_INIT_REG_ID                          4 
+#define CAPT_START_ADDR_REG_ID                    1
+#define CAPT_MEM_REGION_SIZE_REG_ID               2
+#define CAPT_NUM_MEM_REGIONS_REG_ID               3
+#define CAPT_INIT_REG_ID                          4
 #define CAPT_START_REG_ID                         5
-#define CAPT_STOP_REG_ID                          6  
+#define CAPT_STOP_REG_ID                          6
 
 #define CAPT_PACKET_LENGTH_REG_ID                 7
-#define CAPT_RECEIVED_LENGTH_REG_ID               8 
-#define CAPT_RECEIVED_SHORT_PACKETS_REG_ID        9 
-#define CAPT_RECEIVED_LONG_PACKETS_REG_ID         10 
-#define CAPT_LAST_COMMAND_REG_ID                  11        
+#define CAPT_RECEIVED_LENGTH_REG_ID               8
+#define CAPT_RECEIVED_SHORT_PACKETS_REG_ID        9
+#define CAPT_RECEIVED_LONG_PACKETS_REG_ID         10
+#define CAPT_LAST_COMMAND_REG_ID                  11
 #define CAPT_NEXT_COMMAND_REG_ID                  12
 #define CAPT_LAST_ACKNOWLEDGE_REG_ID              13
 #define CAPT_NEXT_ACKNOWLEDGE_REG_ID              14
 #define CAPT_FSM_STATE_INFO_REG_ID                15
 
 // Register width
-#define CAPT_START_MODE_REG_WIDTH                 1 
+#define CAPT_START_MODE_REG_WIDTH                 1
 //#define CAPT_START_ADDR_REG_WIDTH                 9
 //#define CAPT_MEM_REGION_SIZE_REG_WIDTH            9
 //#define CAPT_NUM_MEM_REGIONS_REG_WIDTH            9
 #define CAPT_WRITE2MEM_FSM_STATE_BITS             2
 #define CAPT_SYNCHRONIZER_FSM_STATE_BITS          3
 
-
 #define CAPT_PACKET_LENGTH_REG_WIDTH              17
-#define CAPT_RECEIVED_LENGTH_REG_WIDTH            17   
+#define CAPT_RECEIVED_LENGTH_REG_WIDTH            17
 #define CAPT_RECEIVED_SHORT_PACKETS_REG_WIDTH     32
 #define CAPT_RECEIVED_LONG_PACKETS_REG_WIDTH      32
 #define CAPT_LAST_COMMAND_REG_WIDTH               32
-/* #define CAPT_NEXT_COMMAND_REG_WIDTH               32 */  
+/* #define CAPT_NEXT_COMMAND_REG_WIDTH               32 */
 #define CAPT_LAST_ACKNOWLEDGE_REG_WIDTH           32
 #define CAPT_NEXT_ACKNOWLEDGE_REG_WIDTH           32
 #define CAPT_FSM_STATE_INFO_REG_WIDTH             ((CAPT_WRITE2MEM_FSM_STATE_BITS * 3) + (CAPT_SYNCHRONIZER_FSM_STATE_BITS * 3))
 
-//#define CAPT_INIT_RESTART_MEM_ADDR_WIDTH          9   
-//#define CAPT_INIT_RESTART_MEM_REGION_WIDTH        9 
+//#define CAPT_INIT_RESTART_MEM_ADDR_WIDTH          9
+//#define CAPT_INIT_RESTART_MEM_REGION_WIDTH        9
 
 /* register reset value */
-#define CAPT_START_MODE_REG_RSTVAL                0   
+#define CAPT_START_MODE_REG_RSTVAL                0
 #define CAPT_START_ADDR_REG_RSTVAL                0
 #define CAPT_MEM_REGION_SIZE_REG_RSTVAL           128
-#define CAPT_NUM_MEM_REGIONS_REG_RSTVAL           3 
+#define CAPT_NUM_MEM_REGIONS_REG_RSTVAL           3
 #define CAPT_INIT_REG_RSTVAL                      0
 
 #define CAPT_START_REG_RSTVAL                     0
 #define CAPT_INIT_RESTART_MEM_REGION_LSB          15
 #define CAPT_INIT_RESTART_MEM_REGION_MSB          25
 
-
 #define CAPT_INIT_RST_REG_IDX                     CAPT_INIT_RST_REG_BIT
 #define CAPT_INIT_RST_REG_BITS                    1
 #define CAPT_INIT_FLUSH_IDX                       CAPT_INIT_FLUSH_BIT
 #define CAPT_INIT_RESYNC_IDX                      CAPT_INIT_RESYNC_BIT
 #define CAPT_INIT_RESYNC_BITS                     1
 #define CAPT_INIT_RESTART_IDX                     CAPT_INIT_RESTART_BIT
-#define CAPT_INIT_RESTART_BITS                                                                 1
+#define CAPT_INIT_RESTART_BITS                                                                 1
 #define CAPT_INIT_RESTART_MEM_ADDR_IDX            CAPT_INIT_RESTART_MEM_ADDR_LSB
 #define CAPT_INIT_RESTART_MEM_ADDR_BITS           (CAPT_INIT_RESTART_MEM_ADDR_MSB - CAPT_INIT_RESTART_MEM_ADDR_LSB + 1)
 #define CAPT_INIT_RESTART_MEM_REGION_IDX          CAPT_INIT_RESTART_MEM_REGION_LSB
 #define CAPT_INIT_RESTART_MEM_REGION_BITS         (CAPT_INIT_RESTART_MEM_REGION_MSB - CAPT_INIT_RESTART_MEM_REGION_LSB + 1)
 
-
-
 /* --------------------------------------------------*/
 /* TOKEN INFO */
 /* --------------------------------------------------*/
 #define CAPT_TOKEN_ID_LSB                         0
-#define CAPT_TOKEN_ID_MSB                         3            
+#define CAPT_TOKEN_ID_MSB                         3
 #define CAPT_TOKEN_WIDTH                         (CAPT_TOKEN_ID_MSB - CAPT_TOKEN_ID_LSB  + 1) /* 4 */
 
 /* Command tokens IDs */
 #define CAPT_START_TOKEN_ID                       0 /* 0000b */
 #define CAPT_STOP_TOKEN_ID                        1 /* 0001b */
-#define CAPT_FREEZE_TOKEN_ID                      2 /* 0010b */  
+#define CAPT_FREEZE_TOKEN_ID                      2 /* 0010b */
 #define CAPT_RESUME_TOKEN_ID                      3 /* 0011b */
 #define CAPT_INIT_TOKEN_ID                        8 /* 1000b */
 
-#define CAPT_START_TOKEN_BIT                      0      
+#define CAPT_START_TOKEN_BIT                      0
 #define CAPT_STOP_TOKEN_BIT                       0
 #define CAPT_FREEZE_TOKEN_BIT                     0
 #define CAPT_RESUME_TOKEN_BIT                     0
 #define CAPT_PACKET_DATA_FORMAT_ID_TOKEN_LSB     20
 #define CAPT_PACKET_CH_ID_TOKEN_MSB              27
 #define CAPT_PACKET_CH_ID_TOKEN_LSB              26
-#define CAPT_PACKET_MEM_REGION_ID_TOKEN_MSB      29            
-#define CAPT_PACKET_MEM_REGION_ID_TOKEN_LSB      21            
+#define CAPT_PACKET_MEM_REGION_ID_TOKEN_MSB      29
+#define CAPT_PACKET_MEM_REGION_ID_TOKEN_LSB      21
 
 /*  bit definition */
 #define CAPT_CMD_IDX                              CAPT_TOKEN_ID_LSB
 #define CAPT_INIT_TOKEN_INIT_IDX                  4
 #define CAPT_INIT_TOKEN_INIT_BITS                 22
 
-
 /* --------------------------------------------------*/
 /* MIPI */
 /* --------------------------------------------------*/
 
-#define CAPT_WORD_COUNT_WIDTH                     16      
-#define CAPT_PKT_CODE_WIDTH                       6                  
-#define CAPT_CHN_NO_WIDTH                         2        
-#define CAPT_ERROR_INFO_WIDTH                     8       
+#define CAPT_WORD_COUNT_WIDTH                     16
+#define CAPT_PKT_CODE_WIDTH                       6
+#define CAPT_CHN_NO_WIDTH                         2
+#define CAPT_ERROR_INFO_WIDTH                     8
 
 #define LONG_PKTCODE_MAX                          63
 #define LONG_PKTCODE_MIN                          16
 #define SHORT_PKTCODE_MAX                         15
 
-
 /* --------------------------------------------------*/
 /* Packet Info */
 /* --------------------------------------------------*/
 #define CAPT_LINE_PAYLOAD                         4
 #define CAPT_GEN_SH_PKT                           5
 
-
 /* --------------------------------------------------*/
 /* Packet Data Type */
 /* --------------------------------------------------*/
 #define CAPT_YUV422_8_DATA                       30   /* 01 1110   YUV422 8-bit                                      */
 #define CAPT_YUV422_10_DATA                      31   /* 01 1111   YUV422 10-bit                                     */
 #define CAPT_RGB444_DATA                         32   /* 10 0000   RGB444                                            */
-#define CAPT_RGB555_DATA                                                33   /* 10 0001   RGB555                                            */
-#define CAPT_RGB565_DATA                                                34   /* 10 0010   RGB565                                            */
-#define CAPT_RGB666_DATA                                                35   /* 10 0011   RGB666                                            */
-#define CAPT_RGB888_DATA                                                36   /* 10 0100   RGB888                                            */
-#define CAPT_RAW6_DATA                                                  40   /* 10 1000   RAW6                                              */
-#define CAPT_RAW7_DATA                                                  41   /* 10 1001   RAW7                                              */
-#define CAPT_RAW8_DATA                                                  42   /* 10 1010   RAW8                                              */
-#define CAPT_RAW10_DATA                                                 43   /* 10 1011   RAW10                                             */
-#define CAPT_RAW12_DATA                                                 44   /* 10 1100   RAW12                                             */
-#define CAPT_RAW14_DATA                                                 45   /* 10 1101   RAW14                                             */
-#define CAPT_USR_DEF_1_DATA                                             48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
-#define CAPT_USR_DEF_2_DATA                                             49   /* 11 0001    User Defined 8-bit Data Type 2                   */
-#define CAPT_USR_DEF_3_DATA                                             50   /* 11 0010    User Defined 8-bit Data Type 3                   */
-#define CAPT_USR_DEF_4_DATA                                             51   /* 11 0011    User Defined 8-bit Data Type 4                   */
-#define CAPT_USR_DEF_5_DATA                                             52   /* 11 0100    User Defined 8-bit Data Type 5                   */
-#define CAPT_USR_DEF_6_DATA                                             53   /* 11 0101    User Defined 8-bit Data Type 6                   */
-#define CAPT_USR_DEF_7_DATA                                             54   /* 11 0110    User Defined 8-bit Data Type 7                   */
-#define CAPT_USR_DEF_8_DATA                                             55   /* 11 0111    User Defined 8-bit Data Type 8                   */
-#define CAPT_Emb_DATA                                                   18   /* 01 0010    embedded eight bit non image data                */
-#define CAPT_SOF_DATA                                                   0   /* 00 0000    frame start                                      */
-#define CAPT_EOF_DATA                                                   1   /* 00 0001    frame end                                        */
-#define CAPT_SOL_DATA                                                   2   /* 00 0010    line start                                       */
-#define CAPT_EOL_DATA                                                   3   /* 00 0011    line end                                         */
-#define CAPT_GEN_SH1_DATA                                               8   /* 00 1000  Generic Short Packet Code 1                        */
-#define CAPT_GEN_SH2_DATA                                               9   /* 00 1001    Generic Short Packet Code 2                      */
-#define CAPT_GEN_SH3_DATA                                               10   /* 00 1010    Generic Short Packet Code 3                      */
-#define CAPT_GEN_SH4_DATA                                               11   /* 00 1011    Generic Short Packet Code 4                      */
-#define CAPT_GEN_SH5_DATA                                               12   /* 00 1100    Generic Short Packet Code 5                      */
-#define CAPT_GEN_SH6_DATA                                               13   /* 00 1101    Generic Short Packet Code 6                      */
-#define CAPT_GEN_SH7_DATA                                               14   /* 00 1110    Generic Short Packet Code 7                      */
-#define CAPT_GEN_SH8_DATA                                               15   /* 00 1111    Generic Short Packet Code 8                      */
-#define CAPT_YUV420_8_CSPS_DATA                                         28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
-#define CAPT_YUV420_10_CSPS_DATA                                        29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
+#define CAPT_RGB555_DATA                                                33   /* 10 0001   RGB555                                            */
+#define CAPT_RGB565_DATA                                                34   /* 10 0010   RGB565                                            */
+#define CAPT_RGB666_DATA                                                35   /* 10 0011   RGB666                                            */
+#define CAPT_RGB888_DATA                                                36   /* 10 0100   RGB888                                            */
+#define CAPT_RAW6_DATA                                                  40   /* 10 1000   RAW6                                              */
+#define CAPT_RAW7_DATA                                                  41   /* 10 1001   RAW7                                              */
+#define CAPT_RAW8_DATA                                                  42   /* 10 1010   RAW8                                              */
+#define CAPT_RAW10_DATA                                                 43   /* 10 1011   RAW10                                             */
+#define CAPT_RAW12_DATA                                                 44   /* 10 1100   RAW12                                             */
+#define CAPT_RAW14_DATA                                                 45   /* 10 1101   RAW14                                             */
+#define CAPT_USR_DEF_1_DATA                                             48   /* 11 0000    JPEG [User Defined 8-bit Data Type 1]            */
+#define CAPT_USR_DEF_2_DATA                                             49   /* 11 0001    User Defined 8-bit Data Type 2                   */
+#define CAPT_USR_DEF_3_DATA                                             50   /* 11 0010    User Defined 8-bit Data Type 3                   */
+#define CAPT_USR_DEF_4_DATA                                             51   /* 11 0011    User Defined 8-bit Data Type 4                   */
+#define CAPT_USR_DEF_5_DATA                                             52   /* 11 0100    User Defined 8-bit Data Type 5                   */
+#define CAPT_USR_DEF_6_DATA                                             53   /* 11 0101    User Defined 8-bit Data Type 6                   */
+#define CAPT_USR_DEF_7_DATA                                             54   /* 11 0110    User Defined 8-bit Data Type 7                   */
+#define CAPT_USR_DEF_8_DATA                                             55   /* 11 0111    User Defined 8-bit Data Type 8                   */
+#define CAPT_Emb_DATA                                                   18   /* 01 0010    embedded eight bit non image data                */
+#define CAPT_SOF_DATA                                                   0   /* 00 0000    frame start                                      */
+#define CAPT_EOF_DATA                                                   1   /* 00 0001    frame end                                        */
+#define CAPT_SOL_DATA                                                   2   /* 00 0010    line start                                       */
+#define CAPT_EOL_DATA                                                   3   /* 00 0011    line end                                         */
+#define CAPT_GEN_SH1_DATA                                               8   /* 00 1000  Generic Short Packet Code 1                        */
+#define CAPT_GEN_SH2_DATA                                               9   /* 00 1001    Generic Short Packet Code 2                      */
+#define CAPT_GEN_SH3_DATA                                               10   /* 00 1010    Generic Short Packet Code 3                      */
+#define CAPT_GEN_SH4_DATA                                               11   /* 00 1011    Generic Short Packet Code 4                      */
+#define CAPT_GEN_SH5_DATA                                               12   /* 00 1100    Generic Short Packet Code 5                      */
+#define CAPT_GEN_SH6_DATA                                               13   /* 00 1101    Generic Short Packet Code 6                      */
+#define CAPT_GEN_SH7_DATA                                               14   /* 00 1110    Generic Short Packet Code 7                      */
+#define CAPT_GEN_SH8_DATA                                               15   /* 00 1111    Generic Short Packet Code 8                      */
+#define CAPT_YUV420_8_CSPS_DATA                                         28   /* 01 1100   YUV420 8-bit (Chroma Shifted Pixel Sampling)      */
+#define CAPT_YUV420_10_CSPS_DATA                                        29   /* 01 1101   YUV420 10-bit (Chroma Shifted Pixel Sampling)     */
 #define CAPT_RESERVED_DATA_TYPE_MIN              56
 #define CAPT_RESERVED_DATA_TYPE_MAX              63
 #define CAPT_GEN_LONG_RESERVED_DATA_TYPE_MIN     19
 #define CAPT_RAW_RESERVED_DATA_TYPE_MIN          46
 #define CAPT_RAW_RESERVED_DATA_TYPE_MAX          47
 
-
 /* --------------------------------------------------*/
 /* Capture Unit State */
 /* --------------------------------------------------*/
 #define CAPT_FREEZE                               5
 #define CAPT_RUN                                  6
 
-
 /* --------------------------------------------------*/
 
-#endif /* _isp_capture_defs_h */ 
-
-
-
-
-
+#endif /* _isp_capture_defs_h */
index d2b8972b0d9ec64ae887e8c6f96d586262737b0f..75451e090f4ffc40f760d5f70c31cc604d32cb91 100644 (file)
@@ -19,4 +19,4 @@
 
 #define _HRT_TIMED_CONTROLLER_REG_ALIGN 4
 
-#endif /* _timed_controller_defs_h */   
+#endif /* _timed_controller_defs_h */
index 19b19ef484f953867e311a95df2e48c418ffa156..d3df4e1649c97da8031eee4418e4b34a6ff4b055 100644 (file)
 #define hrt_host_type_of_ulong  unsigned long
 #define hrt_host_type_of_ptr    void*
 
-#define HRT_TYPE_BYTES(cell, type) (HRT_TYPE_BITS(cell, type)/8)
+#define HRT_TYPE_BYTES(cell, type) (HRT_TYPE_BITS(cell, type) / 8)
 #define HRT_HOST_TYPE(cell_type)   HRTCAT(hrt_host_type_of_, cell_type)
 #define HRT_INT_TYPE(type)         HRTCAT(hrt_int_type_of_, type)
 
 #ifdef C_RUN
 
 #ifdef C_RUN_DYNAMIC_LINK_PROGRAMS
-extern void *csim_processor_get_crun_symbol(hive_proc_id p, const char *sym);
-#define _hrt_cell_get_crun_symbol(cell,sym)          csim_processor_get_crun_symbol(cell,HRTSTR(sym))
-#define _hrt_cell_get_crun_indexed_symbol(cell,sym)  csim_processor_get_crun_symbol(cell,HRTSTR(sym))
+void *csim_processor_get_crun_symbol(hive_proc_id p, const char *sym);
+#define _hrt_cell_get_crun_symbol(cell, sym)          csim_processor_get_crun_symbol(cell, HRTSTR(sym))
+#define _hrt_cell_get_crun_indexed_symbol(cell, sym)  csim_processor_get_crun_symbol(cell, HRTSTR(sym))
 #else
-#define _hrt_cell_get_crun_symbol(cell,sym)         (&sym)
-#define _hrt_cell_get_crun_indexed_symbol(cell,sym) (sym)
+#define _hrt_cell_get_crun_symbol(cell, sym)         (&sym)
+#define _hrt_cell_get_crun_indexed_symbol(cell, sym) (sym)
 #endif //  C_RUN_DYNAMIC_LINK_PROGRAMS
 
 #define hrt_scalar_store(cell, type, var, data) \
-       ((*(HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_symbol(cell,var)) = (data))
+       ((*(HRT_HOST_TYPE(type) *)_hrt_cell_get_crun_symbol(cell, var)) = (data))
 #define hrt_scalar_load(cell, type, var) \
-       ((*(HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_symbol(cell,var)))
+       ((*(HRT_HOST_TYPE(type) *)_hrt_cell_get_crun_symbol(cell, var)))
 
 #define hrt_indexed_store(cell, type, array, index, data) \
-       ((((HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_indexed_symbol(cell,array))[index]) = (data))
+       ((((HRT_HOST_TYPE(type) *)_hrt_cell_get_crun_indexed_symbol(cell, array))[index]) = (data))
 #define hrt_indexed_load(cell, type, array, index) \
-       (((HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_indexed_symbol(cell,array))[index])
+       (((HRT_HOST_TYPE(type) *)_hrt_cell_get_crun_indexed_symbol(cell, array))[index])
 
 #else /* C_RUN */
 
 #define hrt_scalar_store(cell, type, var, data) \
-  HRTCAT(hrt_mem_store_,HRT_TYPE_BITS(cell, type))(\
+  HRTCAT(hrt_mem_store_, HRT_TYPE_BITS(cell, type))(\
               cell, \
-              HRTCAT(HIVE_MEM_,var), \
-              HRTCAT(HIVE_ADDR_,var), \
+              HRTCAT(HIVE_MEM_, var), \
+              HRTCAT(HIVE_ADDR_, var), \
               (HRT_INT_TYPE(type))(data))
 
 #define hrt_scalar_load(cell, type, var) \
-  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_,HRT_PROC_TYPE(cell),_,type) ( \
+  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_, HRT_PROC_TYPE(cell), _, type) ( \
               cell, \
-              HRTCAT(HIVE_MEM_,var), \
-              HRTCAT(HIVE_ADDR_,var)))
+              HRTCAT(HIVE_MEM_, var), \
+              HRTCAT(HIVE_ADDR_, var)))
 
 #define hrt_indexed_store(cell, type, array, index, data) \
-  HRTCAT(hrt_mem_store_,HRT_TYPE_BITS(cell, type))(\
+  HRTCAT(hrt_mem_store_, HRT_TYPE_BITS(cell, type))(\
               cell, \
-              HRTCAT(HIVE_MEM_,array), \
-              (HRTCAT(HIVE_ADDR_,array))+((index)*HRT_TYPE_BYTES(cell, type)), \
+              HRTCAT(HIVE_MEM_, array), \
+              (HRTCAT(HIVE_ADDR_, array)) + ((index) * HRT_TYPE_BYTES(cell, type)), \
               (HRT_INT_TYPE(type))(data))
 
 #define hrt_indexed_load(cell, type, array, index) \
-  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_,HRT_PROC_TYPE(cell),_,type) ( \
-         cell, \
-              HRTCAT(HIVE_MEM_,array), \
-              (HRTCAT(HIVE_ADDR_,array))+((index)*HRT_TYPE_BYTES(cell, type))))
+  (HRT_HOST_TYPE(type))(HRTCAT4(_hrt_mem_load_, HRT_PROC_TYPE(cell), _, type) ( \
+        cell, \
+              HRTCAT(HIVE_MEM_, array), \
+              (HRTCAT(HIVE_ADDR_, array)) + ((index) * HRT_TYPE_BYTES(cell, type))))
 
 #endif /* C_RUN */
 
index 09f0780f0c8002e5b630ece5204fbb9dce2794a3..4c44b89e47e9571ba0f5fc126fe233fb582ba96f 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef _sp_map_h_
 #define _sp_map_h_
 
-
 #ifndef _hrt_dummy_use_blob_sp
 #define _hrt_dummy_use_blob_sp()
 #endif
index 01f7c33b5b407b8e535f3166a4adbc4619eccf8a..1b0854c1f77dedbb40516b2c0d3033b6eb3139ff 100644 (file)
@@ -26,9 +26,9 @@
 
 /* one tracer item: major, minor and counter. The counter value can be used for GP data */
 struct trace_item_t {
-       uint8_t   major;
-       uint8_t   minor;
-       uint16_t  counter;
+       u8   major;
+       u8   minor;
+       u16  counter;
 };
 
 #ifdef ISP2401
@@ -43,30 +43,30 @@ struct trace_header_t {
 #else
        /* 1st dword: descriptor */
 #endif
-       uint8_t   version;
-       uint8_t   max_threads;
-       uint16_t  max_tracer_points;
+       u8   version;
+       u8   max_threads;
+       u16  max_tracer_points;
 #ifdef ISP2401
        /* 2nd field: command + data */
 #endif
        /* 2nd dword */
-       uint32_t  command;
+       u32  command;
        /* 3rd & 4th dword */
 #ifndef ISP2401
-       uint32_t  data[2];
+       u32  data[2];
 #else
-       uint32_t  data[MAX_CMD_DATA];
+       u32  data[MAX_CMD_DATA];
        /* 3rd field: debug pointer */
 #endif
        /* 5th & 6th dword: debug pointer mechanism */
-       uint32_t  debug_ptr_signature;
-       uint32_t  debug_ptr_value;
+       u32  debug_ptr_signature;
+       u32  debug_ptr_value;
 #ifdef ISP2401
        /* Rest of the header: status & scratch data */
-       uint8_t   thr_status_byte[SH_CSS_MAX_SP_THREADS];
-       uint16_t  thr_status_word[SH_CSS_MAX_SP_THREADS];
-       uint32_t  thr_status_dword[SH_CSS_MAX_SP_THREADS];
-       uint32_t  scratch_debug[MAX_SCRATCH_DATA];
+       u8   thr_status_byte[SH_CSS_MAX_SP_THREADS];
+       u16  thr_status_word[SH_CSS_MAX_SP_THREADS];
+       u32  thr_status_dword[SH_CSS_MAX_SP_THREADS];
+       u32  scratch_debug[MAX_SCRATCH_DATA];
 #endif
 };
 
@@ -137,26 +137,25 @@ enum TRACE_DUMP_FORMAT {
 };
 #endif
 
-
 /* currently divided as follows:*/
 #if (TRACE_ENABLE_SP0 + TRACE_ENABLE_SP1 + TRACE_ENABLE_ISP == 3)
 /* can be divided as needed */
-#define TRACE_SP0_SIZE (TRACE_BUFF_SIZE/4)
-#define TRACE_SP1_SIZE (TRACE_BUFF_SIZE/4)
-#define TRACE_ISP_SIZE (TRACE_BUFF_SIZE/2)
+#define TRACE_SP0_SIZE (TRACE_BUFF_SIZE / 4)
+#define TRACE_SP1_SIZE (TRACE_BUFF_SIZE / 4)
+#define TRACE_ISP_SIZE (TRACE_BUFF_SIZE / 2)
 #elif (TRACE_ENABLE_SP0 + TRACE_ENABLE_SP1 + TRACE_ENABLE_ISP == 2)
 #if TRACE_ENABLE_SP0
-#define TRACE_SP0_SIZE (TRACE_BUFF_SIZE/2)
+#define TRACE_SP0_SIZE (TRACE_BUFF_SIZE / 2)
 #else
 #define TRACE_SP0_SIZE (0)
 #endif
 #if TRACE_ENABLE_SP1
-#define TRACE_SP1_SIZE (TRACE_BUFF_SIZE/2)
+#define TRACE_SP1_SIZE (TRACE_BUFF_SIZE / 2)
 #else
 #define TRACE_SP1_SIZE (0)
 #endif
 #if TRACE_ENABLE_ISP
-#define TRACE_ISP_SIZE (TRACE_BUFF_SIZE/2)
+#define TRACE_ISP_SIZE (TRACE_BUFF_SIZE / 2)
 #else
 #define TRACE_ISP_SIZE (0)
 #endif
@@ -278,55 +277,54 @@ typedef enum {
 
 /* shared macros in traces infrastructure */
 /* increment the pointer cyclicly */
-#define DBG_NEXT_ITEM(x, max_items) (((x+1) >= max_items) ? 0 : x+1)
-#define DBG_PREV_ITEM(x, max_items) ((x) ? x-1 : max_items-1)
+#define DBG_NEXT_ITEM(x, max_items) (((x + 1) >= max_items) ? 0 : x + 1)
+#define DBG_PREV_ITEM(x, max_items) ((x) ? x - 1 : max_items - 1)
 
 #define FIELD_MASK(width) (((1 << (width)) - 1))
-#define FIELD_PACK(value,mask,offset) (((value) & (mask)) << (offset))
-#define FIELD_UNPACK(value,mask,offset) (((value) >> (offset)) & (mask))
-
+#define FIELD_PACK(value, mask, offset) (((value) & (mask)) << (offset))
+#define FIELD_UNPACK(value, mask, offset) (((value) >> (offset)) & (mask))
 
 #define FIELD_VALUE_OFFSET             (0)
 #define FIELD_VALUE_WIDTH              (16)
 #define FIELD_VALUE_MASK               FIELD_MASK(FIELD_VALUE_WIDTH)
-#define FIELD_VALUE_PACK(f)            FIELD_PACK(f,FIELD_VALUE_MASK,FIELD_VALUE_OFFSET)
+#define FIELD_VALUE_PACK(f)            FIELD_PACK(f, FIELD_VALUE_MASK, FIELD_VALUE_OFFSET)
 #ifndef ISP2401
-#define FIELD_VALUE_UNPACK(f)  FIELD_UNPACK(f,FIELD_VALUE_MASK,FIELD_VALUE_OFFSET)
+#define FIELD_VALUE_UNPACK(f)  FIELD_UNPACK(f, FIELD_VALUE_MASK, FIELD_VALUE_OFFSET)
 #else
-#define FIELD_VALUE_UNPACK(f)          FIELD_UNPACK(f,FIELD_VALUE_MASK,FIELD_VALUE_OFFSET)
+#define FIELD_VALUE_UNPACK(f)          FIELD_UNPACK(f, FIELD_VALUE_MASK, FIELD_VALUE_OFFSET)
 #endif
 
 #define FIELD_MINOR_OFFSET             (FIELD_VALUE_OFFSET + FIELD_VALUE_WIDTH)
 #define FIELD_MINOR_WIDTH              (8)
 #define FIELD_MINOR_MASK               FIELD_MASK(FIELD_MINOR_WIDTH)
-#define FIELD_MINOR_PACK(f)            FIELD_PACK(f,FIELD_MINOR_MASK,FIELD_MINOR_OFFSET)
+#define FIELD_MINOR_PACK(f)            FIELD_PACK(f, FIELD_MINOR_MASK, FIELD_MINOR_OFFSET)
 #ifndef ISP2401
-#define FIELD_MINOR_UNPACK(f)  FIELD_UNPACK(f,FIELD_MINOR_MASK,FIELD_MINOR_OFFSET)
+#define FIELD_MINOR_UNPACK(f)  FIELD_UNPACK(f, FIELD_MINOR_MASK, FIELD_MINOR_OFFSET)
 #else
-#define FIELD_MINOR_UNPACK(f)          FIELD_UNPACK(f,FIELD_MINOR_MASK,FIELD_MINOR_OFFSET)
+#define FIELD_MINOR_UNPACK(f)          FIELD_UNPACK(f, FIELD_MINOR_MASK, FIELD_MINOR_OFFSET)
 #endif
 
 #define FIELD_MAJOR_OFFSET             (FIELD_MINOR_OFFSET + FIELD_MINOR_WIDTH)
 #define FIELD_MAJOR_WIDTH              (5)
 #define FIELD_MAJOR_MASK               FIELD_MASK(FIELD_MAJOR_WIDTH)
-#define FIELD_MAJOR_PACK(f)            FIELD_PACK(f,FIELD_MAJOR_MASK,FIELD_MAJOR_OFFSET)
+#define FIELD_MAJOR_PACK(f)            FIELD_PACK(f, FIELD_MAJOR_MASK, FIELD_MAJOR_OFFSET)
 #ifndef ISP2401
-#define FIELD_MAJOR_UNPACK(f)  FIELD_UNPACK(f,FIELD_MAJOR_MASK,FIELD_MAJOR_OFFSET)
+#define FIELD_MAJOR_UNPACK(f)  FIELD_UNPACK(f, FIELD_MAJOR_MASK, FIELD_MAJOR_OFFSET)
 #else
-#define FIELD_MAJOR_UNPACK(f)          FIELD_UNPACK(f,FIELD_MAJOR_MASK,FIELD_MAJOR_OFFSET)
+#define FIELD_MAJOR_UNPACK(f)          FIELD_UNPACK(f, FIELD_MAJOR_MASK, FIELD_MAJOR_OFFSET)
 #endif
 
 #ifndef ISP2401
 #define FIELD_FORMAT_OFFSET            (FIELD_MAJOR_OFFSET + FIELD_MAJOR_WIDTH)
-#define FIELD_FORMAT_WIDTH             (3)
-#define FIELD_FORMAT_MASK              FIELD_MASK(FIELD_FORMAT_WIDTH)
-#define FIELD_FORMAT_PACK(f)   FIELD_PACK(f,FIELD_FORMAT_MASK,FIELD_FORMAT_OFFSET)
-#define FIELD_FORMAT_UNPACK(f) FIELD_UNPACK(f,FIELD_FORMAT_MASK,FIELD_FORMAT_OFFSET)
+#define FIELD_FORMAT_WIDTH             (3)
+#define FIELD_FORMAT_MASK              FIELD_MASK(FIELD_FORMAT_WIDTH)
+#define FIELD_FORMAT_PACK(f)   FIELD_PACK(f, FIELD_FORMAT_MASK, FIELD_FORMAT_OFFSET)
+#define FIELD_FORMAT_UNPACK(f) FIELD_UNPACK(f, FIELD_FORMAT_MASK, FIELD_FORMAT_OFFSET)
 #else
 /* for quick traces - only insertion, compatible with the regular point */
 #define FIELD_FULL_MAJOR_WIDTH         (8)
 #define FIELD_FULL_MAJOR_MASK          FIELD_MASK(FIELD_FULL_MAJOR_WIDTH)
-#define FIELD_FULL_MAJOR_PACK(f)       FIELD_PACK(f,FIELD_FULL_MAJOR_MASK,FIELD_MAJOR_OFFSET)
+#define FIELD_FULL_MAJOR_PACK(f)       FIELD_PACK(f, FIELD_FULL_MAJOR_MASK, FIELD_MAJOR_OFFSET)
 
 /* The following 2 fields are used only when FIELD_TID value is 111b.
  * it means we don't want to use thread id, but format. In this case,
@@ -335,22 +333,22 @@ typedef enum {
 #define FIELD_MAJOR_W_FMT_OFFSET       FIELD_MAJOR_OFFSET
 #define FIELD_MAJOR_W_FMT_WIDTH                (3)
 #define FIELD_MAJOR_W_FMT_MASK         FIELD_MASK(FIELD_MAJOR_W_FMT_WIDTH)
-#define FIELD_MAJOR_W_FMT_PACK(f)      FIELD_PACK(f,FIELD_MAJOR_W_FMT_MASK,FIELD_MAJOR_W_FMT_OFFSET)
-#define FIELD_MAJOR_W_FMT_UNPACK(f)    FIELD_UNPACK(f,FIELD_MAJOR_W_FMT_MASK,FIELD_MAJOR_W_FMT_OFFSET)
+#define FIELD_MAJOR_W_FMT_PACK(f)      FIELD_PACK(f, FIELD_MAJOR_W_FMT_MASK, FIELD_MAJOR_W_FMT_OFFSET)
+#define FIELD_MAJOR_W_FMT_UNPACK(f)    FIELD_UNPACK(f, FIELD_MAJOR_W_FMT_MASK, FIELD_MAJOR_W_FMT_OFFSET)
 
 #define FIELD_FORMAT_OFFSET            (FIELD_MAJOR_OFFSET + FIELD_MAJOR_W_FMT_WIDTH)
-#define FIELD_FORMAT_WIDTH             (2)
-#define FIELD_FORMAT_MASK              FIELD_MASK(FIELD_MAJOR_W_FMT_WIDTH)
-#define FIELD_FORMAT_PACK(f)           FIELD_PACK(f,FIELD_FORMAT_MASK,FIELD_FORMAT_OFFSET)
-#define FIELD_FORMAT_UNPACK(f)         FIELD_UNPACK(f,FIELD_FORMAT_MASK,FIELD_FORMAT_OFFSET)
+#define FIELD_FORMAT_WIDTH             (2)
+#define FIELD_FORMAT_MASK              FIELD_MASK(FIELD_MAJOR_W_FMT_WIDTH)
+#define FIELD_FORMAT_PACK(f)           FIELD_PACK(f, FIELD_FORMAT_MASK, FIELD_FORMAT_OFFSET)
+#define FIELD_FORMAT_UNPACK(f)         FIELD_UNPACK(f, FIELD_FORMAT_MASK, FIELD_FORMAT_OFFSET)
 
 #define FIELD_TID_SEL_FORMAT_PAT       (7)
 
 #define FIELD_TID_OFFSET               (FIELD_MAJOR_OFFSET + FIELD_MAJOR_WIDTH)
 #define FIELD_TID_WIDTH                        (3)
 #define FIELD_TID_MASK                 FIELD_MASK(FIELD_TID_WIDTH)
-#define FIELD_TID_PACK(f)              FIELD_PACK(f,FIELD_TID_MASK,FIELD_TID_OFFSET)
-#define FIELD_TID_UNPACK(f)            FIELD_UNPACK(f,FIELD_TID_MASK,FIELD_TID_OFFSET)
+#define FIELD_TID_PACK(f)              FIELD_PACK(f, FIELD_TID_MASK, FIELD_TID_OFFSET)
+#define FIELD_TID_UNPACK(f)            FIELD_UNPACK(f, FIELD_TID_MASK, FIELD_TID_OFFSET)
 #endif
 
 #define FIELD_VALUE_24_OFFSET          (0)
@@ -360,11 +358,11 @@ typedef enum {
 #else
 #define FIELD_VALUE_24_MASK            FIELD_MASK(FIELD_VALUE_24_WIDTH)
 #endif
-#define FIELD_VALUE_24_PACK(f)         FIELD_PACK(f,FIELD_VALUE_24_MASK,FIELD_VALUE_24_OFFSET)
-#define FIELD_VALUE_24_UNPACK(f)       FIELD_UNPACK(f,FIELD_VALUE_24_MASK,FIELD_VALUE_24_OFFSET)
+#define FIELD_VALUE_24_PACK(f)         FIELD_PACK(f, FIELD_VALUE_24_MASK, FIELD_VALUE_24_OFFSET)
+#define FIELD_VALUE_24_UNPACK(f)       FIELD_UNPACK(f, FIELD_VALUE_24_MASK, FIELD_VALUE_24_OFFSET)
 
 #ifndef ISP2401
-#define PACK_TRACEPOINT(format,major, minor, value)    \
+#define PACK_TRACEPOINT(format, major, minor, value)   \
        (FIELD_FORMAT_PACK(format) | FIELD_MAJOR_PACK(major) | FIELD_MINOR_PACK(minor) | FIELD_VALUE_PACK(value))
 #else
 #define PACK_TRACEPOINT(tid, major, minor, value)      \
index 076c4ba761753b619ba7aba117afd9a43eb69cc7..7580cf5c962421ba1bb78587479bf49c3a5e5894 100644 (file)
@@ -41,7 +41,6 @@
  * #define HAS_WATCHDOG_SP_THREAD_DEBUG
  */
 
-
 /*
  * The linear buffer mode will accept data until the first
  * overflow and then stop accepting new data
@@ -55,11 +54,11 @@ typedef enum {
 } debug_buf_mode_t;
 
 struct debug_data_s {
-       uint32_t                        enable;
-       uint32_t                        bufmode;
-       uint32_t                        head;
-       uint32_t                        tail;
-       uint32_t                        buf[DEBUG_BUF_SIZE];
+       u32                     enable;
+       u32                     bufmode;
+       u32                     head;
+       u32                     tail;
+       u32                     buf[DEBUG_BUF_SIZE];
 };
 
 /* thread.sp.c doesn't have a notion of HIVE_ISP_DDR_WORD_BYTES
@@ -67,17 +66,16 @@ struct debug_data_s {
 
 #ifdef HIVE_ISP_DDR_WORD_BYTES
 struct debug_data_ddr_s {
-       uint32_t                        enable;
-       int8_t                          padding1[HIVE_ISP_DDR_WORD_BYTES-sizeof(uint32_t)];
-       uint32_t                        bufmode;
-       int8_t                          padding2[HIVE_ISP_DDR_WORD_BYTES-sizeof(uint32_t)];
-       uint32_t                        head;
-       int8_t                          padding3[HIVE_ISP_DDR_WORD_BYTES-sizeof(uint32_t)];
-       uint32_t                        tail;
-       int8_t                          padding4[HIVE_ISP_DDR_WORD_BYTES-sizeof(uint32_t)];
-       uint32_t                        buf[DEBUG_BUF_SIZE];
+       u32                     enable;
+       s8                              padding1[HIVE_ISP_DDR_WORD_BYTES - sizeof(uint32_t)];
+       u32                     bufmode;
+       s8                              padding2[HIVE_ISP_DDR_WORD_BYTES - sizeof(uint32_t)];
+       u32                     head;
+       s8                              padding3[HIVE_ISP_DDR_WORD_BYTES - sizeof(uint32_t)];
+       u32                     tail;
+       s8                              padding4[HIVE_ISP_DDR_WORD_BYTES - sizeof(uint32_t)];
+       u32                     buf[DEBUG_BUF_SIZE];
 };
 #endif
 
 #endif /* __DEBUG_GLOBAL_H_INCLUDED__ */
-
index 60d6de1332cd6fe563db7dfb66a6ebfd934fa5a7..d897fc943da4f3cbc7ca2e74ec18146f7a136fc9 100644 (file)
@@ -52,7 +52,6 @@
 #define _DMA_ZERO_EXTEND     _DMA_V2_ZERO_EXTEND
 #define _DMA_SIGN_EXTEND     _DMA_V2_SIGN_EXTEND
 
-
 typedef unsigned int dma_channel;
 
 typedef enum {
@@ -66,9 +65,8 @@ typedef enum {
   dma_sign_extension = _DMA_SIGN_EXTEND
 } dma_extension;
 
-
 #define DMA_PROP_SHIFT(val, param)       ((val) << _DMA_V2_ ## param ## _IDX)
-#define DMA_PROP_MASK(param)             ((1U << _DMA_V2_ ## param ## _BITS)-1)
+#define DMA_PROP_MASK(param)             ((1U << _DMA_V2_ ## param ## _BITS) - 1)
 #define DMA_PACK(val, param)             DMA_PROP_SHIFT((val) & DMA_PROP_MASK(param), param)
 
 #define DMA_PACK_COMMAND(cmd)            DMA_PACK(cmd, CMD)
@@ -96,18 +94,19 @@ typedef enum {
 #define hive_dma_move_data(dma_id, read, channel, addr_a, addr_b, to_is_var, from_is_var) \
 { \
   hive_dma_snd(dma_id, DMA_PACK(_DMA_V2_SET_CRUN_COMMAND, CMD)); \
-  hive_dma_snd(dma_id, DMA_PACK_CMD_CHANNEL(read?_DMA_V2_MOVE_B2A_COMMAND:_DMA_V2_MOVE_A2B_COMMAND, channel)); \
-  hive_dma_snd(dma_id, read?(unsigned)(addr_b):(unsigned)(addr_a)); \
-  hive_dma_snd(dma_id, read?(unsigned)(addr_a):(unsigned)(addr_b)); \
+  hive_dma_snd(dma_id, DMA_PACK_CMD_CHANNEL(read ? _DMA_V2_MOVE_B2A_COMMAND : _DMA_V2_MOVE_A2B_COMMAND, channel)); \
+  hive_dma_snd(dma_id, read ? (unsigned int)(addr_b) : (unsigned int)(addr_a)); \
+  hive_dma_snd(dma_id, read ? (unsigned int)(addr_a) : (unsigned int)(addr_b)); \
   hive_dma_snd(dma_id, to_is_var); \
   hive_dma_snd(dma_id, from_is_var); \
 }
+
 #define hive_dma_move_data_no_ack(dma_id, read, channel, addr_a, addr_b, to_is_var, from_is_var) \
 { \
   hive_dma_snd(dma_id, DMA_PACK(_DMA_V2_SET_CRUN_COMMAND, CMD)); \
-  hive_dma_snd(dma_id, DMA_PACK_CMD_CHANNEL(read?_DMA_V2_NO_ACK_MOVE_B2A_NO_SYNC_CHK_COMMAND:_DMA_V2_NO_ACK_MOVE_A2B_NO_SYNC_CHK_COMMAND, channel)); \
-  hive_dma_snd(dma_id, read?(unsigned)(addr_b):(unsigned)(addr_a)); \
-  hive_dma_snd(dma_id, read?(unsigned)(addr_a):(unsigned)(addr_b)); \
+  hive_dma_snd(dma_id, DMA_PACK_CMD_CHANNEL(read ? _DMA_V2_NO_ACK_MOVE_B2A_NO_SYNC_CHK_COMMAND : _DMA_V2_NO_ACK_MOVE_A2B_NO_SYNC_CHK_COMMAND, channel)); \
+  hive_dma_snd(dma_id, read ? (unsigned int)(addr_b) : (unsigned int)(addr_a)); \
+  hive_dma_snd(dma_id, read ? (unsigned int)(addr_a) : (unsigned int)(addr_b)); \
   hive_dma_snd(dma_id, to_is_var); \
   hive_dma_snd(dma_id, from_is_var); \
 }
@@ -239,16 +238,16 @@ typedef enum {
 } dma_config_type_t;
 
 struct dma_port_config {
-       uint8_t  crop, elems;
-       uint16_t width;
-       uint32_t stride;
+       u8  crop, elems;
+       u16 width;
+       u32 stride;
 };
 
 /* Descriptor for dma configuration */
 struct dma_channel_config {
-       uint8_t  connection;
-       uint8_t  extension;
-       uint8_t  height;
+       u8  connection;
+       u8  extension;
+       u8  height;
        struct dma_port_config a, b;
 };
 
index 4505775b224c9e811cb0f0193c9d23d519cbd448..f3ce9e9f1ad4413ed54a326f0a90221bad6bd1fb 100644 (file)
@@ -48,7 +48,7 @@
 
 /* The GDC is capable of higher internal precision than the parameter data structures */
 #define HRT_GDC_COORD_SCALE_BITS       6
-#define HRT_GDC_COORD_SCALE                    (1 << HRT_GDC_COORD_SCALE_BITS)
+#define HRT_GDC_COORD_SCALE                    BIT(HRT_GDC_COORD_SCALE_BITS)
 
 typedef enum {
        GDC_CH0_ID = 0,
@@ -63,28 +63,27 @@ typedef enum {
 } gdc_bits_per_pixel_t;
 
 typedef struct gdc_scale_param_mem_s {
-       uint16_t  params[N_GDC_PARAM];
-       uint16_t  ipx_start_array[N_GDC_PARAM];
-       uint16_t  ibuf_offset[N_GDC_PARAM];
-       uint16_t  obuf_offset[N_GDC_PARAM];
+       u16  params[N_GDC_PARAM];
+       u16  ipx_start_array[N_GDC_PARAM];
+       u16  ibuf_offset[N_GDC_PARAM];
+       u16  obuf_offset[N_GDC_PARAM];
 } gdc_scale_param_mem_t;
 
 typedef struct gdc_warp_param_mem_s {
-       uint32_t      origin_x;
-       uint32_t      origin_y;
-       uint32_t      in_addr_offset;
-       uint32_t      in_block_width;
-       uint32_t      in_block_height;
-       uint32_t      p0_x;
-       uint32_t      p0_y;
-       uint32_t      p1_x;
-       uint32_t      p1_y;
-       uint32_t      p2_x;
-       uint32_t      p2_y;
-       uint32_t      p3_x;
-       uint32_t      p3_y;
-       uint32_t      padding[3];
+       u32      origin_x;
+       u32      origin_y;
+       u32      in_addr_offset;
+       u32      in_block_width;
+       u32      in_block_height;
+       u32      p0_x;
+       u32      p0_y;
+       u32      p1_x;
+       u32      p1_y;
+       u32      p2_x;
+       u32      p2_y;
+       u32      p3_x;
+       u32      p3_y;
+       u32      padding[3];
 } gdc_warp_param_mem_t;
 
-
 #endif /* __GDC_GLOBAL_H_INCLUDED__ */
index 30ad77059d93c33e443e7663f05a3bb769617a25..1c1b0667a53bfa3427687b02cfab2281706f8e13 100644 (file)
@@ -81,5 +81,4 @@
 #define _REG_GP_SYNCGEN_FRAME_CNT_ADDR                         0x00090090
 #define _REG_GP_SOFT_RESET_ADDR                                                0x00090094
 
-
 #endif /* __GP_DEVICE_GLOBAL_H_INCLUDED__ */
index 7e05d7d880d155ad2f6d0ff6beb8be615b4e8e01..e4b9daa2d062ac7be8a570c54dfa94f9805159d5 100644 (file)
 */
 #define ISP_HIST_ALIGNMENT_LOG2                2
 
-#define HMEM_SIZE_LOG2         (ISP_HIST_ADDRESS_BITS-ISP_HIST_ALIGNMENT_LOG2)
+#define HMEM_SIZE_LOG2         (ISP_HIST_ADDRESS_BITS - ISP_HIST_ALIGNMENT_LOG2)
 #define HMEM_SIZE                      ISP_HIST_DEPTH
 
-#define HMEM_UNIT_SIZE         (HMEM_SIZE/ISP_HIST_COMPONENTS)
+#define HMEM_UNIT_SIZE         (HMEM_SIZE / ISP_HIST_COMPONENTS)
 #define HMEM_UNIT_COUNT                ISP_HIST_COMPONENTS
 
 #define HMEM_RANGE_LOG2                ISP_HIST_WIDTH
-#define HMEM_RANGE                     (1UL<<HMEM_RANGE_LOG2)
+#define HMEM_RANGE                     BIT(HMEM_RANGE_LOG2)
 
-typedef uint32_t                       hmem_data_t;
+typedef u32                    hmem_data_t;
 
 #endif /* __HMEM_GLOBAL_H_INCLUDED__ */
index dcb9a3127cfe0733fcf7b5ec6ab732d8d3d66f7e..92e7b70c17384b89018ace255b586e7405398a8a 100644 (file)
@@ -26,7 +26,7 @@
 #include "assert_support.h"
 
 /* The address of the remote copy */
-hrt_address    debug_buffer_address = (hrt_address)-1;
+hrt_address    debug_buffer_address = (hrt_address) - 1;
 hrt_vaddress   debug_buffer_ddr_address = (hrt_vaddress)-1;
 /* The local copy */
 static debug_data_t            debug_data;
@@ -43,9 +43,9 @@ void debug_buffer_init(const hrt_address addr)
 void debug_buffer_ddr_init(const hrt_vaddress addr)
 {
        debug_buf_mode_t mode = DEBUG_BUFFER_MODE_LINEAR;
-       uint32_t enable = 1;
-       uint32_t head = 0;
-       uint32_t tail = 0;
+       u32 enable = 1;
+       u32 head = 0;
+       u32 tail = 0;
        /* set the ddr queue */
        debug_buffer_ddr_address = addr;
        mmgr_store(addr + DEBUG_DATA_BUF_MODE_DDR_ADDR,
@@ -69,4 +69,3 @@ void debug_buffer_setmode(const debug_buf_mode_t mode)
        sp_dmem_store_uint32(SP0_ID,
                debug_buffer_address + DEBUG_DATA_BUF_MODE_ADDR, mode);
 }
-
index a047aadc6619d7ce73397c350601b4c706755041..9bc0a7cdd9afb332dce0a854c2d573bca1577e40 100644 (file)
@@ -35,7 +35,7 @@ STORAGE_CLASS_DEBUG_C hrt_data debug_dequeue(void)
 {
        hrt_data value = 0;
 
-       assert(debug_buffer_address != ((hrt_address)-1));
+       assert(debug_buffer_address != ((hrt_address) - 1));
 
        debug_synch_queue();
 
@@ -50,50 +50,55 @@ STORAGE_CLASS_DEBUG_C hrt_data debug_dequeue(void)
 
 STORAGE_CLASS_DEBUG_C void debug_synch_queue(void)
 {
-       uint32_t remote_tail = sp_dmem_load_uint32(SP0_ID, debug_buffer_address + DEBUG_DATA_TAIL_ADDR);
+       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)
 {
-       uint32_t remote_tail = isp_dmem_load_uint32(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_TAIL_ADDR);
+       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;
 }
 
 STORAGE_CLASS_DEBUG_C void debug_synch_queue_ddr(void)
 {
-       uint32_t        remote_tail;
+       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 */
        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;
 }
 
 #endif /* __DEBUG_PRIVATE_H_INCLUDED__ */
-
index 770db7dff5d3b331edab3efae642d9373f01bd3d..265dfdd653c6ffe473ba95985bcaf65be624c3b3 100644 (file)
@@ -28,7 +28,7 @@ void dma_get_state(const dma_ID_t ID, dma_state_t *state)
        hrt_data        tmp;
 
        assert(ID < N_DMA_ID);
-       assert(state != NULL);
+       assert(state);
 
        tmp = dma_reg_load(ID, DMA_COMMAND_FSM_REG_IDX);
        //reg  [3:0] : flags error [3], stall, run, idle [0]
@@ -39,9 +39,9 @@ void dma_get_state(const dma_ID_t ID, dma_state_t *state)
        state->fsm_command_run = tmp & 0x2;
        state->fsm_command_stalling = tmp & 0x4;
        state->fsm_command_error    = tmp & 0x8;
-       state->last_command_channel = (tmp>>10 & 0x1F);
-       state->last_command_param =  (tmp>>15 & 0x0F);
-       tmp = (tmp>>4) & 0x3F;
+       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 */
        /* AM: the list below does not cover all the cases*/
@@ -225,7 +225,7 @@ void dma_get_state(const dma_ID_t ID, dma_state_t *state)
                _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]);
+               dma_port_state_t *port = &state->port_states[i];
 
                tmp = dma_reg_load(ID, DMA_DEV_INFO_REG_IDX(0, i));
                port->req_cs   = ((tmp & 0x1) != 0);
@@ -250,7 +250,7 @@ void dma_get_state(const dma_ID_t ID, dma_state_t *state)
        }
 
        for (i = 0; i < HIVE_DMA_NUM_CHANNELS; i++) {
-               dma_channel_state_t *ch = &(state->channel_states[i]);
+               dma_channel_state_t *ch = &state->channel_states[i];
 
                ch->connection = DMA_GET_CONNECTION(dma_reg_load(ID,
                        DMA_CHANNEL_PARAM_REG_IDX(i,
index ab631e6f64b505575b1c174978626d907b2f0a6f..2c30925c8f514ae02fec68bcce586012be837d86 100644 (file)
@@ -189,7 +189,7 @@ struct dma_state_s {
        int                        fsm_ctrl_pack_extension;
        int                                                pack_idle;
        int                            pack_run;
-       int                                pack_stalling;
+       int                                pack_stalling;
        int                                pack_error;
        int                        pack_cnt_height;
        int                        pack_src_cnt_width;
index ba54b1f0467b74d84b6ed1d0c30ab5b199160e71..5b4d7c02f1baecfa559ee48c0d36ee34380426e1 100644 (file)
@@ -26,16 +26,16 @@ STORAGE_CLASS_DMA_C void dma_reg_store(const dma_ID_t ID,
                        const hrt_data value)
 {
        assert(ID < N_DMA_ID);
-       assert(DMA_BASE[ID] != (hrt_address)-1);
-       ia_css_device_store_uint32(DMA_BASE[ID] + reg*sizeof(hrt_data), value);
+       assert(DMA_BASE[ID] != (hrt_address) - 1);
+       ia_css_device_store_uint32(DMA_BASE[ID] + reg * sizeof(hrt_data), value);
 }
 
 STORAGE_CLASS_DMA_C hrt_data dma_reg_load(const dma_ID_t ID,
                                          const unsigned int reg)
 {
        assert(ID < N_DMA_ID);
-       assert(DMA_BASE[ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(DMA_BASE[ID] + reg*sizeof(hrt_data));
+       assert(DMA_BASE[ID] != (hrt_address) - 1);
+       return ia_css_device_load_uint32(DMA_BASE[ID] + reg * sizeof(hrt_data));
 }
 
 #endif /* __DMA_PRIVATE_H_INCLUDED__ */
index bcfb734c2ed34f41637ff6950492dabbeddbfab5..9af2d46b559706a7e997b764f38c8e94a3838d9a 100644 (file)
@@ -26,7 +26,7 @@
 STORAGE_CLASS_EVENT_C void event_wait_for(const event_ID_t ID)
 {
        assert(ID < N_EVENT_ID);
-       assert(event_source_addr[ID] != ((hrt_address)-1));
+       assert(event_source_addr[ID] != ((hrt_address) - 1));
        (void)ia_css_device_load_uint32(event_source_addr[ID]);
        return;
 }
@@ -42,7 +42,7 @@ STORAGE_CLASS_EVENT_C void cnd_event_wait_for(const event_ID_t ID,
 STORAGE_CLASS_EVENT_C hrt_data event_receive_token(const event_ID_t ID)
 {
        assert(ID < N_EVENT_ID);
-       assert(event_source_addr[ID] != ((hrt_address)-1));
+       assert(event_source_addr[ID] != ((hrt_address) - 1));
        return ia_css_device_load_uint32(event_source_addr[ID]);
 }
 
@@ -50,15 +50,16 @@ STORAGE_CLASS_EVENT_C void event_send_token(const event_ID_t ID,
                                            const hrt_data token)
 {
        assert(ID < N_EVENT_ID);
-       assert(event_sink_addr[ID] != ((hrt_address)-1));
+       assert(event_sink_addr[ID] != ((hrt_address) - 1));
        ia_css_device_store_uint32(event_sink_addr[ID], token);
 }
 
 STORAGE_CLASS_EVENT_C bool is_event_pending(const event_ID_t ID)
 {
        hrt_data        value;
+
        assert(ID < N_EVENT_ID);
-       assert(event_source_query_addr[ID] != ((hrt_address)-1));
+       assert(event_source_query_addr[ID] != ((hrt_address) - 1));
        value = ia_css_device_load_uint32(event_source_query_addr[ID]);
        return !_hrt_get_bit(value, EVENT_QUERY_BIT);
 }
@@ -66,8 +67,9 @@ STORAGE_CLASS_EVENT_C bool is_event_pending(const event_ID_t ID)
 STORAGE_CLASS_EVENT_C bool can_event_send_token(const event_ID_t ID)
 {
        hrt_data        value;
+
        assert(ID < N_EVENT_ID);
-       assert(event_sink_query_addr[ID] != ((hrt_address)-1));
+       assert(event_sink_query_addr[ID] != ((hrt_address) - 1));
        value = ia_css_device_load_uint32(event_sink_query_addr[ID]);
        return !_hrt_get_bit(value, EVENT_QUERY_BIT);
 }
index 1bf292401adc1a79b98a838f71fef89de9c9a7f4..bc84a4b298499e44c0b1fcd27aefe26c5fc045f9 100644 (file)
@@ -38,7 +38,7 @@ STORAGE_CLASS_FIFO_MONITOR_DATA unsigned int FIFO_SWITCH_ADDR[N_FIFO_SWITCH] = {
 #include "fifo_monitor_private.h"
 #endif /* __INLINE_FIFO_MONITOR__ */
 
-static inline bool fifo_monitor_status_valid (
+static inline bool fifo_monitor_status_valid(
        const fifo_monitor_ID_t         ID,
        const unsigned int                      reg,
        const unsigned int                      port_id);
@@ -48,14 +48,13 @@ static inline bool fifo_monitor_status_accept(
        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)
 {
        assert(channel_id < N_FIFO_CHANNEL);
-       assert(state != NULL);
+       assert(state);
 
        switch (channel_id) {
        case FIFO_CHANNEL_ISP0_TO_SP0:
@@ -235,6 +234,7 @@ void fifo_channel_get_state(
                        ISP_STR_MON_PORT_SND_GPD);
                {
                hrt_data        value = ia_css_device_load_uint32(0x0000000000380014ULL);
+
                state->fifo_valid  = !_hrt_get_bit(value, 0);
                state->sink_accept = false; /* no monitor connected */
                }
@@ -242,6 +242,7 @@ void fifo_channel_get_state(
        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);
                }
@@ -429,6 +430,7 @@ void fifo_channel_get_state(
                        SP_STR_MON_PORT_SND_GPD);
                {
                hrt_data        value = ia_css_device_load_uint32(0x0000000000380010ULL);
+
                state->fifo_valid  = !_hrt_get_bit(value, 0);
                state->sink_accept = false; /* no monitor connected */
                }
@@ -436,6 +438,7 @@ void fifo_channel_get_state(
        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);
                }
@@ -511,7 +514,7 @@ void fifo_switch_get_state(
 
        assert(ID == FIFO_MONITOR0_ID);
        assert(switch_id < N_FIFO_SWITCH);
-       assert(state != NULL);
+       assert(state);
 
        (void)ID;
 
@@ -532,21 +535,21 @@ void fifo_monitor_get_state(
        fifo_switch_t   sw_id;
 
        assert(ID < N_FIFO_MONITOR_ID);
-       assert(state != NULL);
+       assert(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 (
+static inline bool fifo_monitor_status_valid(
        const fifo_monitor_ID_t         ID,
        const unsigned int                      reg,
        const unsigned int                      port_id)
index d58cd7d1828d29f6b94f689510075142d20d6c32..a85da30e476ef452e2036d61ad7cc2066dda3adf 100644 (file)
@@ -34,7 +34,7 @@ STORAGE_CLASS_FIFO_MONITOR_C void fifo_switch_set(
        const hrt_data                          sel)
 {
        assert(ID == FIFO_MONITOR0_ID);
-       assert(FIFO_MONITOR_BASE[ID] != (hrt_address)-1);
+       assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
        assert(switch_id < N_FIFO_SWITCH);
        (void)ID;
 
@@ -48,22 +48,21 @@ STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_switch_get(
        const fifo_switch_t                     switch_id)
 {
        assert(ID == FIFO_MONITOR0_ID);
-       assert(FIFO_MONITOR_BASE[ID] != (hrt_address)-1);
+       assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
        assert(switch_id < N_FIFO_SWITCH);
        (void)ID;
 
        return gp_device_reg_load(GP_DEVICE0_ID, FIFO_SWITCH_ADDR[switch_id]);
 }
 
-
 STORAGE_CLASS_FIFO_MONITOR_C void fifo_monitor_reg_store(
        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);
+       assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
+       ia_css_device_store_uint32(FIFO_MONITOR_BASE[ID] + reg * sizeof(hrt_data), value);
        return;
 }
 
@@ -72,8 +71,8 @@ STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_monitor_reg_load(
        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));
+       assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
+       return ia_css_device_load_uint32(FIFO_MONITOR_BASE[ID] + reg * sizeof(hrt_data));
 }
 
 #endif /* __FIFO_MONITOR_PRIVATE_H_INCLUDED__ */
index 1966b147f8ab3887f8152d239a7673ab9782b352..83df4ac25c4ef2fe9ef7cf023d2e3f665eb7ac4d 100644 (file)
@@ -31,7 +31,6 @@ static inline hrt_data gdc_reg_load(
        const gdc_ID_t          ID,
        const unsigned int      reg);
 
-
 #ifndef __INLINE_GDC__
 #include "gdc_private.h"
 #endif /* __INLINE_GDC__ */
@@ -46,7 +45,7 @@ void gdc_lut_store(
        unsigned int i, lut_offset = HRT_GDC_LUT_IDX;
 
        assert(ID < N_GDC_ID);
-       assert(HRT_GDC_LUT_COEFF_OFFSET <= (4*sizeof(hrt_data)));
+       assert(HRT_GDC_LUT_COEFF_OFFSET <= (4 * sizeof(hrt_data)));
 
        for (i = 0; i < HRT_GDC_N; i++) {
                hrt_data        entry_0 = data[0][i] & HRT_GDC_BCI_COEF_MASK;
@@ -106,7 +105,6 @@ int gdc_get_unity(
        return (int)(1UL << HRT_GDC_FRAC_BITS);
 }
 
-
 /*
  * Local function implementations
  */
@@ -115,7 +113,7 @@ static inline void gdc_reg_store(
        const unsigned int      reg,
        const hrt_data          value)
 {
-       ia_css_device_store_uint32(GDC_BASE[ID] + reg*sizeof(hrt_data), value);
+       ia_css_device_store_uint32(GDC_BASE[ID] + reg * sizeof(hrt_data), value);
        return;
 }
 
@@ -123,5 +121,5 @@ static inline hrt_data gdc_reg_load(
        const gdc_ID_t          ID,
        const unsigned int      reg)
 {
-       return ia_css_device_load_uint32(GDC_BASE[ID] + reg*sizeof(hrt_data));
+       return ia_css_device_load_uint32(GDC_BASE[ID] + reg * sizeof(hrt_data));
 }
index da88aa3af6644e037c3ef8575ef84f209d6d6018..118839b3483207736325cab16696de634df33901 100644 (file)
@@ -24,7 +24,7 @@ void gp_device_get_state(
        gp_device_state_t                       *state)
 {
        assert(ID < N_GP_DEVICE_ID);
-       assert(state != NULL);
+       assert(state);
 
        state->syncgen_enable = gp_device_reg_load(ID,
                _REG_GP_SYNCGEN_ENABLE_ADDR);
index 7c0362c29411a312cbf1fb61dccabac0ffbd0810..0a5b15ec3510636db10dda0c27bc45013776068c 100644 (file)
@@ -27,7 +27,7 @@ STORAGE_CLASS_GP_DEVICE_C void gp_device_reg_store(
        const hrt_data                  value)
 {
        assert(ID < N_GP_DEVICE_ID);
-       assert(GP_DEVICE_BASE[ID] != (hrt_address)-1);
+       assert(GP_DEVICE_BASE[ID] != (hrt_address) - 1);
        assert((reg_addr % sizeof(hrt_data)) == 0);
        ia_css_device_store_uint32(GP_DEVICE_BASE[ID] + reg_addr, value);
        return;
index b6b1344786b15e50f2770a9dce808c26714543fe..2e205b168c17d422086b2abc753bba16013e3a58 100644 (file)
@@ -27,7 +27,7 @@ static uint32_t
 gp_timer_reg_load(uint32_t reg);
 
 static void
-gp_timer_reg_store(uint32_t reg, uint32_t value);
+gp_timer_reg_store(u32 reg, uint32_t value);
 
 static uint32_t
 gp_timer_reg_load(uint32_t reg)
@@ -38,7 +38,7 @@ gp_timer_reg_load(uint32_t reg)
 }
 
 static void
-gp_timer_reg_store(uint32_t reg, uint32_t value)
+gp_timer_reg_store(u32 reg, uint32_t value)
 {
        ia_css_device_store_uint32((GP_TIMER_BASE +
                                    (reg * sizeof(uint32_t))),
index 19ce35d87291e3a8b20910029bc1f9e2b4cacf2d..4d5961c78c168948d3280c989066449af9ddd955 100644 (file)
 /*Register offsets for timers [1,7] can be obtained
  * by adding (GP_TIMERx_ID * sizeof(uint32_t))*/
 #define _REG_GP_TIMER_ENABLE_ID(timer_id)        HIVE_GP_TIMER_ENABLE_REG_IDX(timer_id)
-#define _REG_GP_TIMER_VALUE_ID(timer_id)        HIVE_GP_TIMER_VALUE_REG_IDX(timer_id, HIVE_GP_TIMER_NUM_COUNTERS)
+#define _REG_GP_TIMER_VALUE_ID(timer_id)        HIVE_GP_TIMER_VALUE_REG_IDX(timer_id, HIVE_GP_TIMER_NUM_COUNTERS)
 #define _REG_GP_TIMER_COUNT_TYPE_ID(timer_id)    HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timer_id, HIVE_GP_TIMER_NUM_COUNTERS)
 #define _REG_GP_TIMER_SIGNAL_SELECT_ID(timer_id) HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timer_id, HIVE_GP_TIMER_NUM_COUNTERS)
 
-
 #define _REG_GP_TIMER_IRQ_TRIGGER_VALUE_ID(irq_id) HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irq_id, HIVE_GP_TIMER_NUM_COUNTERS)
 
 #define _REG_GP_TIMER_IRQ_TIMER_SELECT_ID(irq_id)   \
@@ -41,5 +40,4 @@
 #define _REG_GP_TIMER_IRQ_ENABLE_ID(irq_id) \
        HIVE_GP_TIMER_IRQ_ENABLE_REG_IDX(irq_id, HIVE_GP_TIMER_NUM_COUNTERS, HIVE_GP_TIMER_NUM_IRQS)
 
-
 #endif  /*__GP_TIMER_LOCAL_H_INCLUDED__*/
index b6ebf34eaa9df3fc4c67ad6c5d456e1848986058..f01d5833d12493ecf86801c6c9acac3072a6a92f 100644 (file)
@@ -27,8 +27,8 @@ STORAGE_CLASS_GPIO_C void gpio_reg_store(
        const hrt_data                  value)
 {
 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);
+OP___assert(GPIO_BASE[ID] != (hrt_address) - 1);
+       ia_css_device_store_uint32(GPIO_BASE[ID] + reg * sizeof(hrt_data), value);
        return;
 }
 
@@ -37,8 +37,8 @@ STORAGE_CLASS_GPIO_C hrt_data gpio_reg_load(
        const unsigned int              reg)
 {
 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));
+OP___assert(GPIO_BASE[ID] != (hrt_address) - 1);
+       return ia_css_device_load_uint32(GPIO_BASE[ID] + reg * sizeof(hrt_data));
 }
 
 #endif /* __GPIO_PRIVATE_H_INCLUDED__ */
index 32a780380e1179b1c2dc344e1adb2239ae6cf0ca..a4ffa5a8fed35a1a91e7e6649ecc29ba77462703 100644 (file)
@@ -24,7 +24,7 @@ STORAGE_CLASS_HMEM_C size_t sizeof_hmem(
 {
        assert(ID < N_HMEM_ID);
        (void)ID;
-       return HMEM_SIZE*sizeof(hmem_data_t);
+       return HMEM_SIZE * sizeof(hmem_data_t);
 }
 
 #endif /* __HMEM_PRIVATE_H_INCLUDED__ */
index 0e1ca995fb06f0d9c3be89eff1a0eea6af86f437..8efbc3afff73168ce04d82fe73a27bc6d3d2359e 100644 (file)
@@ -38,7 +38,7 @@ const hrt_data HIVE_IF_SRST_MASK[N_INPUT_FORMATTER_ID] = {
        INPUT_FORMATTER2_SRST_MASK,
        INPUT_FORMATTER3_SRST_MASK};
 
-const uint8_t HIVE_IF_SWITCH_CODE[N_INPUT_FORMATTER_ID] = {
+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,
@@ -98,7 +98,7 @@ void input_formatter_get_switch_state(
        input_formatter_switch_state_t  *state)
 {
        assert(ID < N_INPUT_FORMATTER_ID);
-       assert(state != NULL);
+       assert(state);
 
        /* We'll change this into an intelligent function to get switch info per IF */
        (void)ID;
@@ -122,7 +122,7 @@ void input_formatter_get_state(
        input_formatter_state_t                 *state)
 {
        assert(ID < N_INPUT_FORMATTER_ID);
-       assert(state != NULL);
+       assert(state);
 /*
        state->reset = input_formatter_reg_load(ID,
                HIVE_IF_RESET_ADDRESS);
@@ -203,7 +203,7 @@ void input_formatter_bin_get_state(
        input_formatter_bin_state_t             *state)
 {
        assert(ID < N_INPUT_FORMATTER_ID);
-       assert(state != NULL);
+       assert(state);
 
        state->reset = input_formatter_reg_load(ID,
                HIVE_STR2MEM_SOFT_RESET_REG_ADDRESS);
index 3e00b5e6bad7b30d6965a7af18dca6e171d4463e..0fc9f759c44e04161640f26368b50f0fee18c8fb 100644 (file)
@@ -103,15 +103,15 @@ struct input_formatter_state_s {
 };
 
 struct input_formatter_bin_state_s {
-       uint32_t        reset;
-       uint32_t        input_endianness;
-       uint32_t        output_endianness;
-       uint32_t        bitswap;
-       uint32_t        block_synch;
-       uint32_t        packet_synch;
-       uint32_t        readpostwrite_synch;
-       uint32_t        is_2ppc;
-       uint32_t        en_status_update;
+       u32     reset;
+       u32     input_endianness;
+       u32     output_endianness;
+       u32     bitswap;
+       u32     block_synch;
+       u32     packet_synch;
+       u32     readpostwrite_synch;
+       u32     is_2ppc;
+       u32     en_status_update;
 };
 
 static const unsigned int input_formatter_alignment[N_INPUT_FORMATTER_ID] = {
index 2515e162828febc35f35b33d607fc0553460e189..9202cfedd94fdb6d13fc033432e02acf6b150587 100644 (file)
@@ -29,7 +29,7 @@
 #define ZERO (0x0)
 #define ONE  (1U)
 
-static const ib_buffer_t   IB_BUFFER_NULL = {0 ,0, 0 };
+static const ib_buffer_t   IB_BUFFER_NULL = {00, 0 };
 
 static input_system_error_t input_system_configure_channel(
        const channel_cfg_t             channel);
@@ -47,39 +47,37 @@ 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 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 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 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_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,
+       input_system_multiplex_t * const lhs,
        const input_system_multiplex_t                  rhs,
-       input_system_config_flags_t* const              flags);
-
-
+       input_system_config_flags_t * const flags);
 
 static inline void capture_unit_get_state(
        const input_system_ID_t                 ID,
@@ -114,7 +112,7 @@ 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 input_switch_cfg_t * const cfg
 );
 
 void input_system_get_state(
@@ -124,7 +122,7 @@ void input_system_get_state(
        sub_system_ID_t sub_id;
 
        assert(ID < N_INPUT_SYSTEM_ID);
-       assert(state != NULL);
+       assert(state);
 
        state->str_multicastA_sel = input_system_sub_system_reg_load(ID,
                GPREGS_UNIT0_ID,
@@ -162,15 +160,15 @@ void input_system_get_state(
 
        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++) {
                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++) {
                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;
@@ -184,7 +182,7 @@ void receiver_get_state(
        unsigned int    ch_id;
 
        assert(ID < N_RX_ID);
-       assert(state != NULL);
+       assert(state);
 
        state->fs_to_ls_delay = (uint8_t)receiver_reg_load(ID,
                _HRT_CSS_RECEIVER_FS_TO_LS_DELAY_REG_IDX);
@@ -211,11 +209,11 @@ void receiver_get_state(
 
        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 = (unsigned int)0; ch_id < N_RX_CHANNEL_ID; ch_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,
@@ -283,13 +281,13 @@ 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 */
@@ -297,7 +295,7 @@ 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;
@@ -365,7 +363,7 @@ static inline void capture_unit_get_state(
        capture_unit_state_t                    *state)
 {
        assert(/*(sub_id >= CAPTURE_UNIT0_ID) &&*/ (sub_id <= CAPTURE_UNIT2_ID));
-       assert(state != NULL);
+       assert(state);
 
        state->StartMode = input_system_sub_system_reg_load(ID,
                sub_id,
@@ -427,7 +425,7 @@ static inline void acquisition_unit_get_state(
        acquisition_unit_state_t                *state)
 {
        assert(sub_id == ACQUISITION_UNIT0_ID);
-       assert(state != NULL);
+       assert(state);
 
        state->Start_Addr = input_system_sub_system_reg_load(ID,
                sub_id,
@@ -477,7 +475,7 @@ static inline void ctrl_unit_get_state(
        ctrl_unit_state_t                       *state)
 {
        assert(sub_id == CTRL_UNIT0_ID);
-       assert(state != NULL);
+       assert(state);
 
        state->captA_start_addr = input_system_sub_system_reg_load(ID,
                sub_id,
@@ -563,7 +561,7 @@ static inline void mipi_port_get_state(
 
        assert(ID < N_RX_ID);
        assert(port_ID < N_MIPI_PORT_ID);
-       assert(state != NULL);
+       assert(state);
 
        state->device_ready = receiver_port_reg_load(ID,
                port_ID, _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
@@ -583,8 +581,8 @@ static inline void mipi_port_get_state(
                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));
-               state->lane_rx_count[i] = (uint8_t)((state->rx_count)>>(i*8));
+               state->lane_sync_count[i] = (uint8_t)((state->sync_count) >> (i * 8));
+               state->lane_rx_count[i] = (uint8_t)((state->rx_count) >> (i * 8));
        }
 
        return;
@@ -599,7 +597,7 @@ static inline void rx_channel_get_state(
 
        assert(ID < N_RX_ID);
        assert(ch_id < N_RX_CHANNEL_ID);
-       assert(state != NULL);
+       assert(state);
 
        switch (ch_id) {
        case 0:
@@ -630,12 +628,14 @@ static inline void rx_channel_get_state(
 
 /* See Table 7.1.17,..., 7.1.24 */
        for (i = 0; i < 6; i++) {
-               uint8_t val = (uint8_t)((state->comp_scheme0)>>(i*5)) & 0x1f;
+               u8      val = (uint8_t)((state->comp_scheme0) >> (i * 5)) & 0x1f;
+
                state->comp[i] = (mipi_compressor_t)(val & 0x07);
                state->pred[i] = (mipi_predictor_t)((val & 0x18) >> 3);
        }
        for (i = 6; i < N_MIPI_FORMAT_CUSTOM; i++) {
-               uint8_t val = (uint8_t)((state->comp_scheme0)>>((i-6)*5)) & 0x1f;
+               u8      val = (uint8_t)((state->comp_scheme0) >> ((i - 6) * 5)) & 0x1f;
+
                state->comp[i] = (mipi_compressor_t)(val & 0x07);
                state->pred[i] = (mipi_predictor_t)((val & 0x18) >> 3);
        }
@@ -739,7 +739,6 @@ 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) {
-
                gp_device_reg_store(ID, addr, ZERO);
        }
 
@@ -753,12 +752,12 @@ 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 input_switch_cfg_t * const cfg)
 {
        int addr_offset;
 
        assert(ID < N_GP_DEVICE_ID);
-       assert(cfg != NULL);
+       assert(cfg);
 
        // Initialize the data&hsync LUT.
        for (addr_offset = 0; addr_offset < N_RX_CHANNEL_ID * 2; addr_offset++) {
@@ -776,7 +775,6 @@ static void input_switch_cfg(
        return;
 }
 
-
 static void input_system_network_rst(const input_system_ID_t ID)
 {
        unsigned int sub_id;
@@ -849,14 +847,14 @@ input_system_error_t input_system_configuration_reset(void)
        // Reset IRQ_CTRLs.
 
        // Reset configuration data structures.
-       for (i = 0; i < N_CHANNELS; i++ ) {
+       for (i = 0; i < N_CHANNELS; i++) {
                config.ch_flags[i] = INPUT_SYSTEM_CFG_FLAG_RESET;
                config.target_isp_flags[i] = INPUT_SYSTEM_CFG_FLAG_RESET;
                config.target_sp_flags[i] = INPUT_SYSTEM_CFG_FLAG_RESET;
                config.target_strm2mem_flags[i] = INPUT_SYSTEM_CFG_FLAG_RESET;
        }
 
-       for (i = 0; i < N_CSI_PORTS; i++ ) {
+       for (i = 0; i < N_CSI_PORTS; i++) {
                config.csi_buffer_flags[i]       = INPUT_SYSTEM_CFG_FLAG_RESET;
                config.multicast[i]              = INPUT_SYSTEM_CFG_FLAG_RESET;
        }
@@ -879,23 +877,23 @@ static input_system_error_t input_system_configure_channel(
 {
        input_system_error_t error = INPUT_SYSTEM_ERR_NO_ERROR;
        // Check if channel is not already configured.
-       if (config.ch_flags[channel.ch_id] & INPUT_SYSTEM_CFG_FLAG_SET){
+       if (config.ch_flags[channel.ch_id] & INPUT_SYSTEM_CFG_FLAG_SET) {
                return INPUT_SYSTEM_ERR_CHANNEL_ALREADY_SET;
        } else {
-               switch (channel.source_type){
-                       case INPUT_SYSTEM_SOURCE_SENSOR :
+               switch (channel.source_type) {
+                       case INPUT_SYSTEM_SOURCE_SENSOR:
                                error = input_system_configure_channel_sensor(channel);
                                break;
-                       case INPUT_SYSTEM_SOURCE_TPG :
+                       case INPUT_SYSTEM_SOURCE_TPG:
                                return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                                break;
-                       case INPUT_SYSTEM_SOURCE_PRBS :
+                       case INPUT_SYSTEM_SOURCE_PRBS:
                                return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                                break;
-                       case INPUT_SYSTEM_SOURCE_FIFO :
+                       case INPUT_SYSTEM_SOURCE_FIFO:
                                return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                                break;
-                       default :
+                       default:
                                return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                                break;
                }
@@ -925,40 +923,39 @@ static input_system_error_t input_system_configure_channel(
 // Function that partitions input buffer space with determining addresses.
 static input_system_error_t input_buffer_configuration(void)
 {
-       uint32_t current_address    = 0;
-       uint32_t unallocated_memory = IB_CAPACITY_IN_WORDS;
+       u32 current_address    = 0;
+       u32 unallocated_memory = IB_CAPACITY_IN_WORDS;
 
-       ib_buffer_t     candidate_buffer_acq  = IB_BUFFER_NULL;
-       uint32_t size_requested;
-       input_system_config_flags_t     acq_already_specified = INPUT_SYSTEM_CFG_FLAG_RESET;
+       ib_buffer_t     candidate_buffer_acq  = IB_BUFFER_NULL;
+       u32 size_requested;
+       input_system_config_flags_t     acq_already_specified = INPUT_SYSTEM_CFG_FLAG_RESET;
        input_system_csi_port_t port;
-       for (port = INPUT_SYSTEM_PORT_A; port < N_INPUT_SYSTEM_PORTS; port++) {
 
+       for (port = INPUT_SYSTEM_PORT_A; port < N_INPUT_SYSTEM_PORTS; port++) {
                csi_cfg_t source = config.csi_value[port];//.csi_cfg;
 
-               if ( config.csi_flags[port] & INPUT_SYSTEM_CFG_FLAG_SET) {
-
+               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 :
+                               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 :
+                               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
+                                               && 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;
+                                                       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;
@@ -966,7 +963,7 @@ static input_system_error_t input_buffer_configuration(void)
                                        }
                                        break;
 
-                               default :
+                               default:
                                        config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
                                        return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                                        break;
@@ -974,20 +971,20 @@ static input_system_error_t input_buffer_configuration(void)
 
                        // 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 :
+                               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 :
+                               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
+                                                       && source.acquisition_buffer.nof_mem_regs > 0
                                                        && size_requested <= unallocated_memory
                                                        ) {
                                                                candidate_buffer_acq = source.acquisition_buffer;
@@ -1004,7 +1001,7 @@ static input_system_error_t input_buffer_configuration(void)
                                        }
                                        break;
 
-                               default :
+                               default:
                                        return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                                        break;
                        }
@@ -1021,7 +1018,7 @@ static input_system_error_t input_buffer_configuration(void)
                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;
+               unallocated_memory      -= size_requested;
                config.acquisition_buffer_unique_flags = INPUT_SYSTEM_CFG_FLAG_SET;
 
                assert(current_address <= IB_CAPACITY_IN_WORDS);
@@ -1033,11 +1030,11 @@ 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 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(cfg != NULL);
+       assert(cfg);
 
        input_system_sub_system_reg_store(ID,
                sub_id,
@@ -1055,15 +1052,14 @@ static void capture_unit_configure(
        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 ib_buffer_t * const cfg)
 {
        assert(ID < N_INPUT_SYSTEM_ID);
        assert(sub_id == ACQUISITION_UNIT0_ID);
-       assert(cfg != NULL);
+       assert(cfg);
 
        input_system_sub_system_reg_store(ID,
                sub_id,
@@ -1081,15 +1077,14 @@ static void acquisition_unit_configure(
        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 ctrl_unit_cfg_t * const cfg)
 {
        assert(ID < N_INPUT_SYSTEM_ID);
        assert(sub_id == CTRL_UNIT0_ID);
-       assert(cfg != NULL);
+       assert(cfg);
 
        input_system_sub_system_reg_store(ID,
                sub_id,
@@ -1143,20 +1138,20 @@ static void ctrl_unit_configure(
                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,
+               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_network_cfg_t * const cfg)
 {
-       uint32_t sub_id;
+       u32 sub_id;
 
        assert(ID < N_INPUT_SYSTEM_ID);
-       assert(cfg != NULL);
+       assert(cfg);
 
        // Set all 3 multicasts.
        input_system_sub_system_reg_store(ID,
@@ -1182,14 +1177,14 @@ static void input_system_network_configure(
        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]));
+                       &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++) {
                acquisition_unit_configure(ID,
                        sub_id,
-                       &(cfg->ctrl_unit_cfg[sub_id - ACQUISITION_UNIT0_ID].buffer_acquire[sub_id - ACQUISITION_UNIT0_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.
@@ -1198,7 +1193,7 @@ static void input_system_network_configure(
        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]));
+                       &cfg->ctrl_unit_cfg[sub_id - CTRL_UNIT0_ID]);
        }
 
        return;
@@ -1212,16 +1207,14 @@ 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;
@@ -1246,7 +1239,7 @@ static input_system_error_t configuration_to_registers(void)
                                                        //break;
                                        }
                                } else {
-                                       config.multicast[i]= INPUT_SYSTEM_DISCARD_ALL;
+                                       config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
                                }
 
                                input_system_network_cfg.multicast_cfg[i] = config.multicast[i];
@@ -1268,18 +1261,18 @@ static input_system_error_t configuration_to_registers(void)
                        //...
                        break;
 
-               case INPUT_SYSTEM_SOURCE_TPG :
+               case INPUT_SYSTEM_SOURCE_TPG:
 
                        break;
 
-               case INPUT_SYSTEM_SOURCE_PRBS :
+               case INPUT_SYSTEM_SOURCE_PRBS:
 
                        break;
 
-               case INPUT_SYSTEM_SOURCE_FIFO :
+               case INPUT_SYSTEM_SOURCE_FIFO:
                        break;
 
-               default :
+               default:
                        return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                        break;
 
@@ -1296,12 +1289,12 @@ static input_system_error_t configuration_to_registers(void)
        return INPUT_SYSTEM_ERR_NO_ERROR;
 }
 
-
 // Function that applies the whole configuration.
 input_system_error_t input_system_configuration_commit(void)
 {
        // The last configuration step is to configure the input buffer.
        input_system_error_t error = input_buffer_configuration();
+
        if (error != INPUT_SYSTEM_ERR_NO_ERROR) {
                return error;
        }
@@ -1317,12 +1310,10 @@ input_system_error_t input_system_configuration_commit(void)
        return INPUT_SYSTEM_ERR_NO_ERROR;
 }
 
-
-
 // FIFO
 
 input_system_error_t   input_system_csi_fifo_channel_cfg(
-               uint32_t                ch_id,
+               u32             ch_id,
                input_system_csi_port_t port,
                backend_channel_cfg_t   backend_ch,
                target_cfg2400_t        target
@@ -1330,13 +1321,13 @@ input_system_error_t    input_system_csi_fifo_channel_cfg(
 {
        channel_cfg_t channel;
 
-       channel.ch_id   = ch_id;
-       channel.backend_ch      = backend_ch;
+       channel.ch_id   = ch_id;
+       channel.backend_ch      = backend_ch;
        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;
-       channel.source_cfg.csi_cfg.csi_buffer                   = IB_BUFFER_NULL;
+       channel.source_cfg.csi_cfg.csi_buffer                   = IB_BUFFER_NULL;
        channel.source_cfg.csi_cfg.acquisition_buffer   = IB_BUFFER_NULL;
        channel.source_cfg.csi_cfg.nof_xmem_buffers     = 0;
 
@@ -1344,27 +1335,26 @@ input_system_error_t    input_system_csi_fifo_channel_cfg(
        return input_system_configure_channel(channel);
 }
 
-
 input_system_error_t   input_system_csi_fifo_channel_with_counting_cfg(
-               uint32_t                                ch_id,
-               uint32_t                                nof_frames,
+               u32                             ch_id,
+               u32                             nof_frames,
                input_system_csi_port_t                 port,
                backend_channel_cfg_t                   backend_ch,
-               uint32_t                                csi_mem_reg_size,
-               uint32_t                                csi_nof_mem_regs,
+               u32                             csi_mem_reg_size,
+               u32                             csi_nof_mem_regs,
                target_cfg2400_t                        target
 )
 {
        channel_cfg_t channel;
 
-       channel.ch_id   = ch_id;
-       channel.backend_ch      = backend_ch;
+       channel.ch_id   = ch_id;
+       channel.backend_ch      = backend_ch;
        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.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.nof_mem_regs              = csi_nof_mem_regs;
        channel.source_cfg.csi_cfg.csi_buffer.mem_reg_addr              = 0;
        channel.source_cfg.csi_cfg.acquisition_buffer                   = IB_BUFFER_NULL;
        channel.source_cfg.csi_cfg.nof_xmem_buffers     = nof_frames;
@@ -1373,30 +1363,29 @@ input_system_error_t    input_system_csi_fifo_channel_with_counting_cfg(
        return input_system_configure_channel(channel);
 }
 
-
 // SRAM
 
 input_system_error_t   input_system_csi_sram_channel_cfg(
-               uint32_t                                ch_id,
+               u32                             ch_id,
                input_system_csi_port_t                 port,
                backend_channel_cfg_t                   backend_ch,
-               uint32_t                                csi_mem_reg_size,
-               uint32_t                                csi_nof_mem_regs,
+               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
+               target_cfg2400_t                        target
 )
 {
        channel_cfg_t channel;
 
-       channel.ch_id   = ch_id;
-       channel.backend_ch      = backend_ch;
+       channel.ch_id   = ch_id;
+       channel.backend_ch      = backend_ch;
        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_SRAM_BUFFERING;
        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.nof_mem_regs              = csi_nof_mem_regs;
        channel.source_cfg.csi_cfg.csi_buffer.mem_reg_addr              = 0;
        channel.source_cfg.csi_cfg.acquisition_buffer                   = IB_BUFFER_NULL;
        channel.source_cfg.csi_cfg.nof_xmem_buffers     = 0;
@@ -1405,35 +1394,34 @@ input_system_error_t    input_system_csi_sram_channel_cfg(
        return input_system_configure_channel(channel);
 }
 
-
 //XMEM
 
 // Collects all parameters and puts them in channel_cfg_t.
 input_system_error_t   input_system_csi_xmem_channel_cfg(
-               uint32_t                                ch_id,
+               u32                             ch_id,
                input_system_csi_port_t                 port,
                backend_channel_cfg_t                   backend_ch,
-               uint32_t                                csi_mem_reg_size,
-               uint32_t                                csi_nof_mem_regs,
-               uint32_t                                acq_mem_reg_size,
-               uint32_t                                acq_nof_mem_regs,
-               target_cfg2400_t                        target,
-               uint32_t                                nof_xmem_buffers
+               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;
 
-       channel.ch_id   = ch_id;
-       channel.backend_ch      = backend_ch;
+       channel.ch_id   = ch_id;
+       channel.backend_ch      = backend_ch;
        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_XMEM_BUFFERING;
        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.nof_mem_regs              = csi_nof_mem_regs;
        channel.source_cfg.csi_cfg.csi_buffer.mem_reg_addr              = 0;
        channel.source_cfg.csi_cfg.acquisition_buffer.mem_reg_size      = acq_mem_reg_size;
-       channel.source_cfg.csi_cfg.acquisition_buffer.nof_mem_regs      = acq_nof_mem_regs;
+       channel.source_cfg.csi_cfg.acquisition_buffer.nof_mem_regs      = acq_nof_mem_regs;
        channel.source_cfg.csi_cfg.acquisition_buffer.mem_reg_addr      = 0;
        channel.source_cfg.csi_cfg.nof_xmem_buffers     = nof_xmem_buffers;
 
@@ -1441,29 +1429,26 @@ input_system_error_t    input_system_csi_xmem_channel_cfg(
        return input_system_configure_channel(channel);
 }
 
-
-
-
 input_system_error_t   input_system_csi_xmem_acquire_only_channel_cfg(
-               uint32_t                                ch_id,
-               uint32_t                                nof_frames,
+               u32                             ch_id,
+               u32                             nof_frames,
                input_system_csi_port_t                 port,
                backend_channel_cfg_t                   backend_ch,
-               uint32_t                                acq_mem_reg_size,
-               uint32_t                                acq_nof_mem_regs,
-               target_cfg2400_t                        target)
+               u32                             acq_mem_reg_size,
+               u32                             acq_nof_mem_regs,
+               target_cfg2400_t                        target)
 {
        channel_cfg_t channel;
 
-       channel.ch_id   = ch_id;
-       channel.backend_ch      = backend_ch;
+       channel.ch_id   = ch_id;
+       channel.backend_ch      = backend_ch;
        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_XMEM_ACQUIRE;
        channel.source_cfg.csi_cfg.csi_buffer           = IB_BUFFER_NULL;
        channel.source_cfg.csi_cfg.acquisition_buffer.mem_reg_size      = acq_mem_reg_size;
-       channel.source_cfg.csi_cfg.acquisition_buffer.nof_mem_regs      = acq_nof_mem_regs;
+       channel.source_cfg.csi_cfg.acquisition_buffer.nof_mem_regs      = acq_nof_mem_regs;
        channel.source_cfg.csi_cfg.acquisition_buffer.mem_reg_addr      = 0;
        channel.source_cfg.csi_cfg.nof_xmem_buffers     = nof_frames;
 
@@ -1471,31 +1456,30 @@ input_system_error_t    input_system_csi_xmem_acquire_only_channel_cfg(
        return input_system_configure_channel(channel);
 }
 
-
 input_system_error_t   input_system_csi_xmem_capture_only_channel_cfg(
-               uint32_t                                ch_id,
-               uint32_t                                nof_frames,
+               u32                             ch_id,
+               u32                             nof_frames,
                input_system_csi_port_t                 port,
-               uint32_t                                csi_mem_reg_size,
-               uint32_t                                csi_nof_mem_regs,
-               uint32_t                                acq_mem_reg_size,
-               uint32_t                                acq_nof_mem_regs,
-               target_cfg2400_t                        target)
+               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;
 
-       channel.ch_id   = ch_id;
-       //channel.backend_ch    = backend_ch;
+       channel.ch_id   = ch_id;
+       //channel.backend_ch    = backend_ch;
        channel.source_type             = INPUT_SYSTEM_SOURCE_SENSOR;
        //channel.source
        channel.source_cfg.csi_cfg.csi_port                     = port;
-       //channel.source_cfg.csi_cfg.backend_ch                 = backend_ch;
+       //channel.source_cfg.csi_cfg.backend_ch         = backend_ch;
        channel.source_cfg.csi_cfg.buffering_mode       = INPUT_SYSTEM_XMEM_CAPTURE;
        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.nof_mem_regs              = csi_nof_mem_regs;
        channel.source_cfg.csi_cfg.csi_buffer.mem_reg_addr              = 0;
        channel.source_cfg.csi_cfg.acquisition_buffer.mem_reg_size      = acq_mem_reg_size;
-       channel.source_cfg.csi_cfg.acquisition_buffer.nof_mem_regs      = acq_nof_mem_regs;
+       channel.source_cfg.csi_cfg.acquisition_buffer.nof_mem_regs      = acq_nof_mem_regs;
        channel.source_cfg.csi_cfg.acquisition_buffer.mem_reg_addr      = 0;
        channel.source_cfg.csi_cfg.nof_xmem_buffers     = nof_frames;
 
@@ -1503,18 +1487,16 @@ input_system_error_t    input_system_csi_xmem_capture_only_channel_cfg(
        return input_system_configure_channel(channel);
 }
 
-
-
 // Non - CSI
 
 input_system_error_t   input_system_prbs_channel_cfg(
-               uint32_t                ch_id,
-               uint32_t                nof_frames,//not used yet
-               uint32_t                seed,
-               uint32_t                sync_gen_width,
-               uint32_t                sync_gen_height,
-               uint32_t                sync_gen_hblank_cycles,
-               uint32_t                sync_gen_vblank_cycles,
+               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
 )
 {
@@ -1522,34 +1504,32 @@ input_system_error_t    input_system_prbs_channel_cfg(
 
        (void)nof_frames;
 
-       channel.ch_id   = ch_id;
-       channel.source_type= INPUT_SYSTEM_SOURCE_PRBS;
+       channel.ch_id   = ch_id;
+       channel.source_type = INPUT_SYSTEM_SOURCE_PRBS;
 
        channel.source_cfg.prbs_cfg.seed = seed;
-       channel.source_cfg.prbs_cfg.sync_gen_cfg.width          = sync_gen_width;
-       channel.source_cfg.prbs_cfg.sync_gen_cfg.height         = sync_gen_height;
+       channel.source_cfg.prbs_cfg.sync_gen_cfg.width          = sync_gen_width;
+       channel.source_cfg.prbs_cfg.sync_gen_cfg.height         = sync_gen_height;
        channel.source_cfg.prbs_cfg.sync_gen_cfg.hblank_cycles  = sync_gen_hblank_cycles;
-       channel.source_cfg.prbs_cfg.sync_gen_cfg.vblank_cycles  = sync_gen_vblank_cycles;
+       channel.source_cfg.prbs_cfg.sync_gen_cfg.vblank_cycles  = sync_gen_vblank_cycles;
 
        channel.target_cfg      = target;
 
        return input_system_configure_channel(channel);
 }
 
-
-
 input_system_error_t   input_system_tpg_channel_cfg(
-               uint32_t                ch_id,
-               uint32_t                nof_frames,//not used yet
-               uint32_t                x_mask,
-               uint32_t                y_mask,
-               uint32_t                x_delta,
-               uint32_t                y_delta,
-               uint32_t                xy_mask,
-               uint32_t                sync_gen_width,
-               uint32_t                sync_gen_height,
-               uint32_t                sync_gen_hblank_cycles,
-               uint32_t                sync_gen_vblank_cycles,
+               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
 )
 {
@@ -1557,7 +1537,7 @@ input_system_error_t      input_system_tpg_channel_cfg(
 
        (void)nof_frames;
 
-       channel.ch_id   = ch_id;
+       channel.ch_id   = ch_id;
        channel.source_type             = INPUT_SYSTEM_SOURCE_TPG;
 
        channel.source_cfg.tpg_cfg.x_mask       = x_mask;
@@ -1565,10 +1545,10 @@ input_system_error_t    input_system_tpg_channel_cfg(
        channel.source_cfg.tpg_cfg.x_delta      = x_delta;
        channel.source_cfg.tpg_cfg.y_delta      = y_delta;
        channel.source_cfg.tpg_cfg.xy_mask      = xy_mask;
-       channel.source_cfg.tpg_cfg.sync_gen_cfg.width           = sync_gen_width;
-       channel.source_cfg.tpg_cfg.sync_gen_cfg.height          = sync_gen_height;
+       channel.source_cfg.tpg_cfg.sync_gen_cfg.width           = sync_gen_width;
+       channel.source_cfg.tpg_cfg.sync_gen_cfg.height          = sync_gen_height;
        channel.source_cfg.tpg_cfg.sync_gen_cfg.hblank_cycles   = sync_gen_hblank_cycles;
-       channel.source_cfg.tpg_cfg.sync_gen_cfg.vblank_cycles   = sync_gen_vblank_cycles;
+       channel.source_cfg.tpg_cfg.sync_gen_cfg.vblank_cycles   = sync_gen_vblank_cycles;
 
        channel.target_cfg      = target;
        return input_system_configure_channel(channel);
@@ -1576,15 +1556,16 @@ 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(
-               uint32_t                ch_id,
-               uint32_t                nof_frames, //not used yet
+               u32             ch_id,
+               u32             nof_frames, //not used yet
+
                target_cfg2400_t        target)
 {
        channel_cfg_t channel;
 
        (void)nof_frames;
 
-       channel.ch_id   = ch_id;
+       channel.ch_id   = ch_id;
        channel.source_type     = INPUT_SYSTEM_SOURCE_FIFO;
 
        channel.target_cfg      = target;
@@ -1601,7 +1582,7 @@ input_system_error_t      input_system_gpfifo_channel_cfg(
 static input_system_error_t input_system_configure_channel_sensor(
        const channel_cfg_t channel)
 {
-       const uint32_t port = channel.source_cfg.csi_cfg.csi_port;
+       const u32 port = channel.source_cfg.csi_cfg.csi_port;
        input_system_error_t status = INPUT_SYSTEM_ERR_NO_ERROR;
 
        input_system_multiplex_t mux;
@@ -1611,16 +1592,15 @@ 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){
+       switch (channel.source_cfg.csi_cfg.buffering_mode) {
                case INPUT_SYSTEM_FIFO_CAPTURE:
 
                        // Check for conflicts on mux.
@@ -1635,7 +1615,7 @@ static input_system_error_t input_system_configure_channel_sensor(
                        //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
 
                        break;
-               case INPUT_SYSTEM_SRAM_BUFFERING :
+               case INPUT_SYSTEM_SRAM_BUFFERING:
 
                        // Check for conflicts on mux.
                        mux = INPUT_SYSTEM_ACQUISITION_UNIT;
@@ -1649,7 +1629,7 @@ static input_system_error_t input_system_configure_channel_sensor(
                        //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
 
                        break;
-               case INPUT_SYSTEM_XMEM_BUFFERING :
+               case INPUT_SYSTEM_XMEM_BUFFERING:
 
                        // Check for conflicts on mux.
                        mux = INPUT_SYSTEM_ACQUISITION_UNIT;
@@ -1663,16 +1643,16 @@ static input_system_error_t input_system_configure_channel_sensor(
                        //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
 
                        break;
-               case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING :
+               case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
                        return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                        break;
-               case INPUT_SYSTEM_XMEM_CAPTURE :
+               case INPUT_SYSTEM_XMEM_CAPTURE:
                        return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                        break;
-               case INPUT_SYSTEM_XMEM_ACQUIRE :
+               case INPUT_SYSTEM_XMEM_ACQUIRE:
                        return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                        break;
-               default :
+               default:
                        return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
                        break;
        }
@@ -1681,13 +1661,13 @@ static input_system_error_t input_system_configure_channel_sensor(
 
 // 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 != NULL);
-       assert(flags != NULL);
+       assert(lhs);
+       assert(flags);
 
        if ((*flags) & INPUT_SYSTEM_CFG_FLAG_BLOCKED) {
                *flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
@@ -1698,8 +1678,7 @@ static input_system_error_t set_source_type(
                // Check for consistency with already set value.
                if ((*lhs) == (rhs)) {
                        return INPUT_SYSTEM_ERR_NO_ERROR;
-               }
-               else {
+               } else {
                        *flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
                        return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
                }
@@ -1716,18 +1695,17 @@ static input_system_error_t set_source_type(
        return INPUT_SYSTEM_ERR_NO_ERROR;
 }
 
-
 // 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)
 {
-       uint32_t memory_required;
-       uint32_t acq_memory_required;
+       u32 memory_required;
+       u32 acq_memory_required;
 
-       assert(lhs != NULL);
-       assert(flags != NULL);
+       assert(lhs);
+       assert(flags);
 
        if ((*flags) & INPUT_SYSTEM_CFG_FLAG_BLOCKED) {
                *flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
@@ -1745,8 +1723,7 @@ static input_system_error_t set_csi_cfg(
                        && lhs->nof_xmem_buffers  == rhs->nof_xmem_buffers
                        ) {
                        return INPUT_SYSTEM_ERR_NO_ERROR;
-               }
-               else {
+               } else {
                        *flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
                        return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
                }
@@ -1759,15 +1736,15 @@ static input_system_error_t set_csi_cfg(
        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
+               (memory_required + acq_memory_required> config.unallocated_ib_mem_words
 
                ) {
                *flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
                return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
        }
        // Set the value.
-       //lhs[port]->backend_ch                 = rhs.backend_ch;
-       lhs->buffering_mode     = rhs->buffering_mode;
+       //lhs[port]->backend_ch         = rhs.backend_ch;
+       lhs->buffering_mode     = rhs->buffering_mode;
        lhs->nof_xmem_buffers = rhs->nof_xmem_buffers;
 
        lhs->csi_buffer.mem_reg_size = rhs->csi_buffer.mem_reg_size;
@@ -1784,15 +1761,14 @@ static input_system_error_t set_csi_cfg(
        return INPUT_SYSTEM_ERR_NO_ERROR;
 }
 
-
 // Test flags and set structure.
 static input_system_error_t input_system_multiplexer_cfg(
-       input_system_multiplex_t* const         lhs,
+       input_system_multiplex_t * const lhs,
        const input_system_multiplex_t          rhs,
-       input_system_config_flags_t* const      flags)
+       input_system_config_flags_t * const flags)
 {
-       assert(lhs != NULL);
-       assert(flags != NULL);
+       assert(lhs);
+       assert(flags);
 
        if ((*flags) & INPUT_SYSTEM_CFG_FLAG_BLOCKED) {
                *flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
@@ -1803,8 +1779,7 @@ static input_system_error_t input_system_multiplexer_cfg(
                // Check for consistency with already set value.
                if ((*lhs) == (rhs)) {
                        return INPUT_SYSTEM_ERR_NO_ERROR;
-               }
-               else {
+               } else {
                        *flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
                        return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
                }
index bf9230fd08f235ca5c6e47df003ca3f9d8d0cf3b..7813cf79fef147a2e26110eb2f7faa99b4cbf30b 100644 (file)
@@ -32,7 +32,6 @@
 #include "isp_acquisition_defs.h"
 #include "input_system_ctrl_defs.h"
 
-
 typedef enum {
        INPUT_SYSTEM_ERR_NO_ERROR = 0,
        INPUT_SYSTEM_ERR_GENERIC,
@@ -51,14 +50,14 @@ typedef enum {
 
 typedef struct ctrl_unit_cfg_s                 ctrl_unit_cfg_t;
 typedef struct input_system_network_cfg_s      input_system_network_cfg_t;
-typedef struct target_cfg2400_s                target_cfg2400_t;
-typedef struct channel_cfg_s                   channel_cfg_t;
-typedef struct backend_channel_cfg_s           backend_channel_cfg_t;
-typedef struct input_system_cfg2400_s          input_system_cfg2400_t;
+typedef struct target_cfg2400_s                target_cfg2400_t;
+typedef struct channel_cfg_s                   channel_cfg_t;
+typedef struct backend_channel_cfg_s           backend_channel_cfg_t;
+typedef struct input_system_cfg2400_s          input_system_cfg2400_t;
 typedef struct mipi_port_state_s               mipi_port_state_t;
 typedef struct rx_channel_state_s              rx_channel_state_t;
-typedef struct input_switch_cfg_channel_s      input_switch_cfg_channel_t;
-typedef struct input_switch_cfg_s              input_switch_cfg_t;
+typedef struct input_switch_cfg_channel_s      input_switch_cfg_channel_t;
+typedef struct input_switch_cfg_s              input_switch_cfg_t;
 
 struct ctrl_unit_cfg_s {
        ib_buffer_t             buffer_mipi[N_CAPTURE_UNIT_ID];
@@ -73,37 +72,35 @@ struct input_system_network_cfg_s {
 
 typedef struct {
 // TBD.
-       uint32_t        dummy_parameter;
+       u32     dummy_parameter;
 } target_isp_cfg_t;
 
-
 typedef struct {
 // TBD.
-       uint32_t        dummy_parameter;
+       u32     dummy_parameter;
 } target_sp_cfg_t;
 
-
 typedef struct {
 // TBD.
-       uint32_t        dummy_parameter;
+       u32     dummy_parameter;
 } target_strm2mem_cfg_t;
 
 struct input_switch_cfg_channel_s {
-       uint32_t hsync_data_reg[2];
-       uint32_t vsync_data_reg;
+       u32 hsync_data_reg[2];
+       u32 vsync_data_reg;
 };
 
 struct target_cfg2400_s {
-       input_switch_cfg_channel_t              input_switch_channel_cfg;
+       input_switch_cfg_channel_t              input_switch_channel_cfg;
        target_isp_cfg_t        target_isp_cfg;
        target_sp_cfg_t         target_sp_cfg;
        target_strm2mem_cfg_t   target_strm2mem_cfg;
 };
 
 struct backend_channel_cfg_s {
-       uint32_t        fmt_control_word_1; // Format config.
-       uint32_t        fmt_control_word_2;
-       uint32_t        no_side_band;
+       u32     fmt_control_word_1; // Format config.
+       u32     fmt_control_word_2;
+       u32     no_side_band;
 };
 
 typedef union  {
@@ -113,25 +110,22 @@ typedef union  {
        gpfifo_cfg_t    gpfifo_cfg;
 } source_cfg_t;
 
-
 struct input_switch_cfg_s {
-       uint32_t hsync_data_reg[N_RX_CHANNEL_ID * 2];
-       uint32_t vsync_data_reg;
+       u32 hsync_data_reg[N_RX_CHANNEL_ID * 2];
+       u32 vsync_data_reg;
 };
 
 // Configuration of a channel.
 struct channel_cfg_s {
-       uint32_t                ch_id;
+       u32             ch_id;
        backend_channel_cfg_t   backend_ch;
        input_system_source_t   source_type;
        source_cfg_t            source_cfg;
        target_cfg2400_t        target_cfg;
 };
 
-
 // Complete configuration for input system.
 struct input_system_cfg2400_s {
-
        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];
@@ -142,24 +136,21 @@ struct input_system_cfg2400_s {
        // 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;
-       uint32_t                        unallocated_ib_mem_words; // Used for check.DEFAULT = IB_CAPACITY_IN_WORDS.
+       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;
 
-
        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;
 
@@ -218,7 +209,6 @@ struct input_system_cfg2400_s {
 #define _HRT_CSS_RECEIVER_BE_IRQ_STATUS_REG_IDX         (_HRT_CSS_RECEIVER_2400_BE_IRQ_STATUS_REG_IDX + _HRT_CSS_BE_OFFSET)
 #define _HRT_CSS_RECEIVER_BE_IRQ_CLEAR_REG_IDX          (_HRT_CSS_RECEIVER_2400_BE_IRQ_CLEAR_REG_IDX + _HRT_CSS_BE_OFFSET)
 
-
 #define _HRT_CSS_RECEIVER_IRQ_OVERRUN_BIT              _HRT_CSS_RECEIVER_2400_IRQ_OVERRUN_BIT
 #define _HRT_CSS_RECEIVER_IRQ_INIT_TIMEOUT_BIT         _HRT_CSS_RECEIVER_2400_IRQ_RESERVED_BIT
 #define _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_ENTRY_BIT     _HRT_CSS_RECEIVER_2400_IRQ_SLEEP_MODE_ENTRY_BIT
@@ -485,34 +475,34 @@ struct mipi_port_state_s {
        int     device_ready;
        int     irq_status;
        int     irq_enable;
-       uint32_t        timeout_count;
-       uint16_t        init_count;
-       uint16_t        raw16_18;
-       uint32_t        sync_count;             /*4 x uint8_t */
-       uint32_t        rx_count;               /*4 x uint8_t */
-       uint8_t         lane_sync_count[MIPI_4LANE_CFG];
-       uint8_t         lane_rx_count[MIPI_4LANE_CFG];
+       u32     timeout_count;
+       u16     init_count;
+       u16     raw16_18;
+       u32     sync_count;             /*4 x uint8_t */
+       u32     rx_count;               /*4 x uint8_t */
+       u8              lane_sync_count[MIPI_4LANE_CFG];
+       u8              lane_rx_count[MIPI_4LANE_CFG];
 };
 
 struct rx_channel_state_s {
-       uint32_t        comp_scheme0;
-       uint32_t        comp_scheme1;
+       u32     comp_scheme0;
+       u32     comp_scheme1;
        mipi_predictor_t                pred[N_MIPI_FORMAT_CUSTOM];
        mipi_compressor_t               comp[N_MIPI_FORMAT_CUSTOM];
 };
 
 struct receiver_state_s {
-       uint8_t fs_to_ls_delay;
-       uint8_t ls_to_data_delay;
-       uint8_t data_to_le_delay;
-       uint8_t le_to_fe_delay;
-       uint8_t fe_to_fs_delay;
-       uint8_t le_to_fs_delay;
+       u8      fs_to_ls_delay;
+       u8      ls_to_data_delay;
+       u8      data_to_le_delay;
+       u8      le_to_fe_delay;
+       u8      fe_to_fs_delay;
+       u8      le_to_fs_delay;
        bool    is_two_ppc;
        int     backend_rst;
-       uint16_t        raw18;
+       u16     raw18;
        bool            force_raw8;
-       uint16_t        raw16;
+       u16     raw16;
        struct mipi_port_state_s        mipi_port_state[N_MIPI_PORT_ID];
        struct rx_channel_state_s       rx_channel_state[N_RX_CHANNEL_ID];
        int     be_gsp_acc_ovl;
index 48876bb08b7080fb2acdf37221c9e15c5cfc4ae2..288b94fdf4caeaef5cf126c26e88343d75b721a9 100644 (file)
@@ -28,7 +28,7 @@ STORAGE_CLASS_INPUT_SYSTEM_C void input_system_reg_store(
 {
        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;
 }
 
@@ -38,7 +38,7 @@ STORAGE_CLASS_INPUT_SYSTEM_C hrt_data input_system_reg_load(
 {
        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(
@@ -48,7 +48,7 @@ STORAGE_CLASS_INPUT_SYSTEM_C void receiver_reg_store(
 {
        assert(ID < N_RX_ID);
        assert(RX_BASE[ID] != (hrt_address)-1);
-       ia_css_device_store_uint32(RX_BASE[ID] + reg*sizeof(hrt_data), value);
+       ia_css_device_store_uint32(RX_BASE[ID] + reg * sizeof(hrt_data), value);
        return;
 }
 
@@ -58,7 +58,7 @@ STORAGE_CLASS_INPUT_SYSTEM_C hrt_data receiver_reg_load(
 {
        assert(ID < N_RX_ID);
        assert(RX_BASE[ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(RX_BASE[ID] + reg*sizeof(hrt_data));
+       return ia_css_device_load_uint32(RX_BASE[ID] + reg * sizeof(hrt_data));
 }
 
 STORAGE_CLASS_INPUT_SYSTEM_C void receiver_port_reg_store(
@@ -71,7 +71,7 @@ STORAGE_CLASS_INPUT_SYSTEM_C void receiver_port_reg_store(
        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;
 }
 
@@ -84,7 +84,7 @@ STORAGE_CLASS_INPUT_SYSTEM_C hrt_data receiver_port_reg_load(
        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(
@@ -97,7 +97,7 @@ STORAGE_CLASS_INPUT_SYSTEM_C void input_system_sub_system_reg_store(
        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;
 }
 
@@ -110,7 +110,7 @@ STORAGE_CLASS_INPUT_SYSTEM_C hrt_data input_system_sub_system_reg_load(
        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 51daf76c2aea3caf2271fc1f8a0961f745e9f446..12efe29893f443a225b30a9cc102ae19a1e4d965 100644 (file)
@@ -64,7 +64,7 @@ void irq_clear_all(
        assert(IRQ_N_CHANNEL[ID] <= HRT_DATA_WIDTH);
 
        if (IRQ_N_CHANNEL[ID] < HRT_DATA_WIDTH) {
-               mask = ~((~(hrt_data)0)>>IRQ_N_CHANNEL[ID]);
+               mask = ~((~(hrt_data)0) >> IRQ_N_CHANNEL[ID]);
        }
 
        irq_reg_store(ID,
@@ -119,7 +119,7 @@ void irq_enable_channel(
 
 void irq_enable_pulse(
        const irq_ID_t  ID,
-       bool                    pulse)
+       bool                    pulse)
 {
        unsigned int edge_out = 0x0;
 
@@ -173,7 +173,7 @@ enum hrt_isp_css_irq_status irq_get_channel_id(
        enum hrt_isp_css_irq_status status = hrt_isp_css_irq_status_success;
 
        assert(ID < N_IRQ_ID);
-       assert(irq_id != NULL);
+       assert(irq_id);
 
 /* find the first irq bit */
        for (idx = 0; idx < IRQ_N_CHANNEL[ID]; idx++) {
@@ -192,7 +192,7 @@ enum hrt_isp_css_irq_status irq_get_channel_id(
 
        irq_wait_for_write_complete(ID);
 
-       if (irq_id != NULL)
+       if (irq_id)
                *irq_id = (unsigned int)idx;
 
        return status;
@@ -228,7 +228,7 @@ void irq_controller_get_state(
        irq_controller_state_t          *state)
 {
        assert(ID < N_IRQ_ID);
-       assert(state != NULL);
+       assert(state);
 
        state->irq_edge = irq_reg_load(ID,
                _HRT_IRQ_CONTROLLER_EDGE_REG_IDX);
@@ -258,10 +258,10 @@ void cnd_virq_enable_channel(
        irq_ID_t                i;
        unsigned int    channel_ID;
        irq_ID_t                ID = virq_get_irq_id(irq_ID, &channel_ID);
-       
+
        assert(ID < N_IRQ_ID);
 
-       for (i=IRQ1_ID;i<N_IRQ_ID;i++) {
+       for (i = IRQ1_ID; i < N_IRQ_ID; i++) {
        /* It is not allowed to enable the pin of a nested IRQ directly */
                assert(irq_ID != IRQ_NESTING_ID[i]);
        }
@@ -282,7 +282,6 @@ void cnd_virq_enable_channel(
        return;
 }
 
-
 void virq_clear_all(void)
 {
        irq_ID_t        irq_id;
@@ -299,7 +298,7 @@ enum hrt_isp_css_irq_status virq_get_channel_signals(
        enum hrt_isp_css_irq_status irq_status = hrt_isp_css_irq_status_error;
        irq_ID_t ID;
 
-       assert(irq_info != NULL);
+       assert(irq_info);
 
        for (ID = (irq_ID_t)0 ; ID < N_IRQ_ID; ID++) {
                if (any_irq_channel_enabled(ID)) {
@@ -328,7 +327,7 @@ void virq_clear_info(
 {
        irq_ID_t ID;
 
-       assert(irq_info != NULL);
+       assert(irq_info);
 
        for (ID = (irq_ID_t)0 ; ID < N_IRQ_ID; ID++) {
                        irq_info->irq_status_reg[ID] = 0;
@@ -345,7 +344,7 @@ enum hrt_isp_css_irq_status virq_get_channel_id(
        enum hrt_isp_css_irq_status status = hrt_isp_css_irq_status_success;
        irq_ID_t ID;
 
-       assert(irq_id != NULL);
+       assert(irq_id);
 
 /* find the first irq bit on device 0 */
        for (idx = 0; idx < IRQ_N_CHANNEL[IRQ0_ID]; idx++) {
@@ -363,7 +362,7 @@ enum hrt_isp_css_irq_status virq_get_channel_id(
        }
 
 /* Check whether we have an IRQ on one of the nested devices */
-       for (ID = N_IRQ_ID-1 ; ID > (irq_ID_t)0; ID--) {
+       for (ID = N_IRQ_ID - 1 ; ID > (irq_ID_t)0; ID--) {
                if (IRQ_NESTING_ID[ID] == (virq_id_t)idx) {
                        break;
                }
@@ -400,7 +399,7 @@ enum hrt_isp_css_irq_status virq_get_channel_id(
        irq_wait_for_write_complete(ID);
 
        idx += IRQ_N_ID_OFFSET[ID];
-       if (irq_id != NULL)
+       if (irq_id)
                *irq_id = (virq_id_t)idx;
 
        return status;
@@ -412,7 +411,7 @@ static inline void irq_wait_for_write_complete(
        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(
@@ -434,7 +433,7 @@ static inline irq_ID_t virq_get_irq_id(
 {
        irq_ID_t ID;
 
-       assert(channel_ID != NULL);
+       assert(channel_ID);
 
        for (ID = (irq_ID_t)0 ; ID < N_IRQ_ID; ID++) {
                if (irq_ID < IRQ_N_ID_OFFSET[ID + 1]) {
index f522dfd1a9f1a33c0daac921c1b5f0d6bbe92c5f..81cdaf2450bc4609f6e1287130a2a538518d3823 100644 (file)
 /* IRQ3_ID */
 #include "input_selector_defs.h"
 
-
 #define        IRQ_ID_OFFSET   32
 #define        IRQ0_ID_OFFSET  0
 #define        IRQ1_ID_OFFSET  IRQ_ID_OFFSET
-#define        IRQ2_ID_OFFSET  (2*IRQ_ID_OFFSET)
-#define        IRQ3_ID_OFFSET  (3*IRQ_ID_OFFSET)
-#define        IRQ_END_OFFSET  (4*IRQ_ID_OFFSET)
+#define        IRQ2_ID_OFFSET  (2 * IRQ_ID_OFFSET)
+#define        IRQ3_ID_OFFSET  (3 * IRQ_ID_OFFSET)
+#define        IRQ_END_OFFSET  (4 * IRQ_ID_OFFSET)
 
 #define        IRQ0_ID_N_CHANNEL       HIVE_GP_DEV_IRQ_NUM_IRQS
 #define        IRQ1_ID_N_CHANNEL       HIVE_IFMT_IRQ_NUM_IRQS
@@ -46,7 +45,6 @@
 typedef struct virq_info_s                                     virq_info_t;
 typedef struct irq_controller_state_s          irq_controller_state_t;
 
-
 typedef enum {
        virq_gpio_pin_0            = IRQ0_ID_OFFSET + HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
        virq_gpio_pin_1            = IRQ0_ID_OFFSET + HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
@@ -81,7 +79,7 @@ typedef enum {
        virq_sp_dmem_error         = IRQ0_ID_OFFSET + HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
        virq_mmu_cache_mem_error   = IRQ0_ID_OFFSET + HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
        virq_gp_timer_0            = IRQ0_ID_OFFSET + HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
-       virq_gp_timer_1            = IRQ0_ID_OFFSET + HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,              
+       virq_gp_timer_1            = IRQ0_ID_OFFSET + HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
        virq_sw_pin_0              = IRQ0_ID_OFFSET + HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
        virq_sw_pin_1              = IRQ0_ID_OFFSET + HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
        virq_dma                   = IRQ0_ID_OFFSET + HIVE_GP_DEV_IRQ_DMA_BIT_ID,
@@ -100,11 +98,11 @@ typedef enum {
        virq_isys_csi              = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CSI_RECEIVER_BIT_ID,
        virq_isys_csi_be           = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CSI_RECEIVER_BE_BIT_ID,
        virq_isys_capt0_id_no_sop  = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CAP_UNIT_A_NO_SOP,
-       virq_isys_capt0_id_late_sop= IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CAP_UNIT_A_LATE_SOP,
+       virq_isys_capt0_id_late_sop = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CAP_UNIT_A_LATE_SOP,
        virq_isys_capt1_id_no_sop  = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CAP_UNIT_B_NO_SOP,
-       virq_isys_capt1_id_late_sop= IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CAP_UNIT_B_LATE_SOP,
+       virq_isys_capt1_id_late_sop = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CAP_UNIT_B_LATE_SOP,
        virq_isys_capt2_id_no_sop  = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CAP_UNIT_C_NO_SOP,
-       virq_isys_capt2_id_late_sop= IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CAP_UNIT_C_LATE_SOP,
+       virq_isys_capt2_id_late_sop = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_CAP_UNIT_C_LATE_SOP,
        virq_isys_acq_sop_mismatch = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_ACQ_UNIT_SOP_MISMATCH,
        virq_isys_ctrl_capt0       = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_INP_CTRL_CAPA,
        virq_isys_ctrl_capt1       = IRQ2_ID_OFFSET + HIVE_ISYS_IRQ_INP_CTRL_CAPB,
index 23a13ac696c2006d372f166a4c2ee88c68cbfaf3..db3cfcba5b817b51e3730f845ed68e4a9ef380d5 100644 (file)
@@ -27,8 +27,8 @@ STORAGE_CLASS_IRQ_C void irq_reg_store(
        const hrt_data          value)
 {
        assert(ID < N_IRQ_ID);
-       assert(IRQ_BASE[ID] != (hrt_address)-1);
-       ia_css_device_store_uint32(IRQ_BASE[ID] + reg*sizeof(hrt_data), value);
+       assert(IRQ_BASE[ID] != (hrt_address) - 1);
+       ia_css_device_store_uint32(IRQ_BASE[ID] + reg * sizeof(hrt_data), value);
        return;
 }
 
@@ -37,8 +37,8 @@ STORAGE_CLASS_IRQ_C hrt_data irq_reg_load(
        const unsigned int      reg)
 {
        assert(ID < N_IRQ_ID);
-       assert(IRQ_BASE[ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(IRQ_BASE[ID] + reg*sizeof(hrt_data));
+       assert(IRQ_BASE[ID] != (hrt_address) - 1);
+       return ia_css_device_load_uint32(IRQ_BASE[ID] + reg * sizeof(hrt_data));
 }
 
 #endif /* __IRQ_PRIVATE_H_INCLUDED__ */
index 531c932a48f5df3b6ef1d9e8a8c0e2956666628e..c8ef87d7c07ada72bab88e814ada350be11edd31 100644 (file)
@@ -44,8 +44,8 @@ void isp_get_state(
 {
        hrt_data sc = isp_ctrl_load(ID, ISP_SC_REG);
 
-       assert(state != NULL);
-       assert(stall != NULL);
+       assert(state);
+       assert(stall);
 
 #if defined(_hrt_sysmem_ident_address)
        /* Patch to avoid compiler unused symbol warning in C_RUN build */
@@ -100,30 +100,29 @@ void isp_get_state(
 /* ISP functions to control the ISP state from the host, even in crun. */
 
 /* Inspect readiness of an ISP indexed by ID */
-unsigned isp_is_ready(isp_ID_t ID)
+unsigned int isp_is_ready(isp_ID_t ID)
 {
-       assert (ID < N_ISP_ID);
+       assert(ID < N_ISP_ID);
        return isp_ctrl_getbit(ID, ISP_SC_REG, ISP_IDLE_BIT);
 }
 
 /* Inspect sleeping of an ISP indexed by ID */
-unsigned isp_is_sleeping(isp_ID_t ID)
+unsigned int isp_is_sleeping(isp_ID_t ID)
 {
-       assert (ID < N_ISP_ID);
+       assert(ID < N_ISP_ID);
        return isp_ctrl_getbit(ID, ISP_SC_REG, ISP_SLEEPING_BIT);
 }
 
 /* To be called by the host immediately before starting ISP ID. */
 void isp_start(isp_ID_t ID)
 {
-       assert (ID < N_ISP_ID);
+       assert(ID < N_ISP_ID);
 }
 
 /* Wake up ISP ID. */
 void isp_wake(isp_ID_t ID)
 {
-       assert (ID < N_ISP_ID);
+       assert(ID < N_ISP_ID);
        isp_ctrl_setbit(ID, ISP_SC_REG, ISP_START_BIT);
        hrt_sleep();
 }
-
index 5dcc52dff3dd4c5c38cd0b7f4c22c6c5a49ccae8..b04da7f1f98cd7d18da3df96566b447badd2c31c 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <isp2400_support.h>
 
-#define HIVE_ISP_VMEM_MASK     ((1U<<ISP_VMEM_ELEMBITS)-1)
+#define HIVE_ISP_VMEM_MASK     ((1U << ISP_VMEM_ELEMBITS) - 1)
 
 typedef struct isp_state_s             isp_state_t;
 typedef struct isp_stall_s             isp_stall_t;
index 7f63255d3fc5ef5abd45862f3e152e0b54146908..2ba39efc9d064e464dfced0fb5a701b219bd2111 100644 (file)
@@ -32,11 +32,11 @@ STORAGE_CLASS_ISP_C void isp_ctrl_store(
        const hrt_data          value)
 {
        assert(ID < N_ISP_ID);
-       assert(ISP_CTRL_BASE[ID] != (hrt_address)-1);
+       assert(ISP_CTRL_BASE[ID] != (hrt_address) - 1);
 #if !defined(HRT_MEMORY_ACCESS)
-       ia_css_device_store_uint32(ISP_CTRL_BASE[ID] + reg*sizeof(hrt_data), value);
+       ia_css_device_store_uint32(ISP_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
 #else
-       hrt_master_port_store_32(ISP_CTRL_BASE[ID] + reg*sizeof(hrt_data), value);
+       hrt_master_port_store_32(ISP_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
 #endif
        return;
 }
@@ -46,11 +46,11 @@ STORAGE_CLASS_ISP_C hrt_data isp_ctrl_load(
        const unsigned int      reg)
 {
        assert(ID < N_ISP_ID);
-       assert(ISP_CTRL_BASE[ID] != (hrt_address)-1);
+       assert(ISP_CTRL_BASE[ID] != (hrt_address) - 1);
 #if !defined(HRT_MEMORY_ACCESS)
-       return ia_css_device_load_uint32(ISP_CTRL_BASE[ID] + reg*sizeof(hrt_data));
+       return ia_css_device_load_uint32(ISP_CTRL_BASE[ID] + reg * sizeof(hrt_data));
 #else
-       return hrt_master_port_uload_32(ISP_CTRL_BASE[ID] + reg*sizeof(hrt_data));
+       return hrt_master_port_uload_32(ISP_CTRL_BASE[ID] + reg * sizeof(hrt_data));
 #endif
 }
 
@@ -60,6 +60,7 @@ STORAGE_CLASS_ISP_C bool isp_ctrl_getbit(
        const unsigned int      bit)
 {
        hrt_data val = isp_ctrl_load(ID, reg);
+
        return (val & (1UL << bit)) != 0;
 }
 
@@ -69,6 +70,7 @@ STORAGE_CLASS_ISP_C void isp_ctrl_setbit(
        const unsigned int      bit)
 {
        hrt_data        data = isp_ctrl_load(ID, reg);
+
        isp_ctrl_store(ID, reg, (data | (1UL << bit)));
        return;
 }
@@ -79,6 +81,7 @@ STORAGE_CLASS_ISP_C void isp_ctrl_clearbit(
        const unsigned int      bit)
 {
        hrt_data        data = isp_ctrl_load(ID, reg);
+
        isp_ctrl_store(ID, reg, (data & ~(1UL << bit)));
        return;
 }
@@ -90,7 +93,7 @@ STORAGE_CLASS_ISP_C void isp_dmem_store(
        const size_t            size)
 {
        assert(ID < N_ISP_ID);
-       assert(ISP_DMEM_BASE[ID] != (hrt_address)-1);
+       assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
 #if !defined(HRT_MEMORY_ACCESS)
        ia_css_device_store(ISP_DMEM_BASE[ID] + addr, data, size);
 #else
@@ -106,7 +109,7 @@ STORAGE_CLASS_ISP_C void isp_dmem_load(
        const size_t            size)
 {
        assert(ID < N_ISP_ID);
-       assert(ISP_DMEM_BASE[ID] != (hrt_address)-1);
+       assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
 #if !defined(HRT_MEMORY_ACCESS)
        ia_css_device_load(ISP_DMEM_BASE[ID] + addr, data, size);
 #else
@@ -121,7 +124,7 @@ STORAGE_CLASS_ISP_C void isp_dmem_store_uint32(
        const uint32_t          data)
 {
        assert(ID < N_ISP_ID);
-       assert(ISP_DMEM_BASE[ID] != (hrt_address)-1);
+       assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
        (void)ID;
 #if !defined(HRT_MEMORY_ACCESS)
        ia_css_device_store_uint32(ISP_DMEM_BASE[ID] + addr, data);
@@ -136,7 +139,7 @@ STORAGE_CLASS_ISP_C uint32_t isp_dmem_load_uint32(
        const unsigned int      addr)
 {
        assert(ID < N_ISP_ID);
-       assert(ISP_DMEM_BASE[ID] != (hrt_address)-1);
+       assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
        (void)ID;
 #if !defined(HRT_MEMORY_ACCESS)
        return ia_css_device_load_uint32(ISP_DMEM_BASE[ID] + addr);
@@ -146,10 +149,10 @@ STORAGE_CLASS_ISP_C uint32_t isp_dmem_load_uint32(
 }
 
 STORAGE_CLASS_ISP_C uint32_t isp_2w_cat_1w(
-       const uint16_t          x0,
+       const u16               x0,
        const uint16_t          x1)
 {
-       uint32_t out = ((uint32_t)(x1 & HIVE_ISP_VMEM_MASK) << ISP_VMEM_ELEMBITS)
+       u32 out = ((uint32_t)(x1 & HIVE_ISP_VMEM_MASK) << ISP_VMEM_ELEMBITS)
                | (x0 & HIVE_ISP_VMEM_MASK);
        return out;
 }
index 1a1719d3e7455bffe0d2df3efe41a362d196e37f..32dd1f4411523e6ba4de446ed1fe4acc1bfc621f 100644 (file)
@@ -39,8 +39,8 @@ void mmu_invalidate_cache(
 void mmu_invalidate_cache_all(void)
 {
        mmu_ID_t        mmu_id;
-       for (mmu_id = (mmu_ID_t)0;mmu_id < N_MMU_ID; mmu_id++) {
+
+       for (mmu_id = (mmu_ID_t)0; mmu_id < N_MMU_ID; mmu_id++) {
                mmu_invalidate_cache(mmu_id);
        }
 }
-
index db694d3a6fbb60c5dacca139b480d8fb106a65e9..354b67dc738a008ff1c60a20d3ae2378e84f099e 100644 (file)
@@ -40,8 +40,8 @@ void sp_get_state(
 {
        hrt_data sc = sp_ctrl_load(ID, SP_SC_REG);
 
-       assert(state != NULL);
-       assert(stall != NULL);
+       assert(state);
+       assert(stall);
 
        state->pc = sp_ctrl_load(ID, SP_PC_REG);
        state->status_register = sc;
index 3c70b8fdb5324c86626867d6a724e03013357654..0e477b497c9880818f008f65e21f1259b2f4893a 100644 (file)
@@ -50,52 +50,52 @@ struct sp_stall_s {
  * deprecated
  */
 #define store_sp_int(var, value) \
-       sp_dmem_store_uint32(SP0_ID, (unsigned)sp_address_of(var), \
+       sp_dmem_store_uint32(SP0_ID, (unsigned int)sp_address_of(var), \
                (uint32_t)(value))
 
 #define store_sp_ptr(var, value) \
-       sp_dmem_store_uint32(SP0_ID, (unsigned)sp_address_of(var), \
+       sp_dmem_store_uint32(SP0_ID, (unsigned int)sp_address_of(var), \
                (uint32_t)(value))
 
 #define load_sp_uint(var) \
-       sp_dmem_load_uint32(SP0_ID, (unsigned)sp_address_of(var))
+       sp_dmem_load_uint32(SP0_ID, (unsigned int)sp_address_of(var))
 
 #define load_sp_array_uint8(array_name, index) \
-       sp_dmem_load_uint8(SP0_ID, (unsigned)sp_address_of(array_name) + \
-               (index)*sizeof(uint8_t))
+       sp_dmem_load_uint8(SP0_ID, (unsigned int)sp_address_of(array_name) + \
+               (index) * sizeof(uint8_t))
 
 #define load_sp_array_uint16(array_name, index) \
-       sp_dmem_load_uint16(SP0_ID, (unsigned)sp_address_of(array_name) + \
-               (index)*sizeof(uint16_t))
+       sp_dmem_load_uint16(SP0_ID, (unsigned int)sp_address_of(array_name) + \
+               (index) * sizeof(uint16_t))
 
 #define load_sp_array_uint(array_name, index) \
-       sp_dmem_load_uint32(SP0_ID, (unsigned)sp_address_of(array_name) + \
-               (index)*sizeof(uint32_t))
+       sp_dmem_load_uint32(SP0_ID, (unsigned int)sp_address_of(array_name) + \
+               (index) * sizeof(uint32_t))
 
 #define store_sp_var(var, data, bytes) \
-       sp_dmem_store(SP0_ID, (unsigned)sp_address_of(var), data, bytes)
+       sp_dmem_store(SP0_ID, (unsigned int)sp_address_of(var), data, bytes)
 
 #define store_sp_array_uint8(array_name, index, value) \
-       sp_dmem_store_uint8(SP0_ID, (unsigned)sp_address_of(array_name) + \
-               (index)*sizeof(uint8_t), value)
+       sp_dmem_store_uint8(SP0_ID, (unsigned int)sp_address_of(array_name) + \
+               (index) * sizeof(uint8_t), value)
 
 #define store_sp_array_uint16(array_name, index, value) \
-       sp_dmem_store_uint16(SP0_ID, (unsigned)sp_address_of(array_name) + \
-               (index)*sizeof(uint16_t), value)
+       sp_dmem_store_uint16(SP0_ID, (unsigned int)sp_address_of(array_name) + \
+               (index) * sizeof(uint16_t), value)
 
 #define store_sp_array_uint(array_name, index, value) \
-       sp_dmem_store_uint32(SP0_ID, (unsigned)sp_address_of(array_name) + \
-               (index)*sizeof(uint32_t), value)
+       sp_dmem_store_uint32(SP0_ID, (unsigned int)sp_address_of(array_name) + \
+               (index) * sizeof(uint32_t), value)
 
 #define store_sp_var_with_offset(var, offset, data, bytes) \
-       sp_dmem_store(SP0_ID, (unsigned)sp_address_of(var) + \
+       sp_dmem_store(SP0_ID, (unsigned int)sp_address_of(var) + \
                offset, data, bytes)
 
 #define load_sp_var(var, data, bytes) \
-       sp_dmem_load(SP0_ID, (unsigned)sp_address_of(var), data, bytes)
+       sp_dmem_load(SP0_ID, (unsigned int)sp_address_of(var), data, bytes)
 
 #define load_sp_var_with_offset(var, offset, data, bytes) \
-       sp_dmem_load(SP0_ID, (unsigned)sp_address_of(var) + offset, \
+       sp_dmem_load(SP0_ID, (unsigned int)sp_address_of(var) + offset, \
                data, bytes)
 
 #endif /* __SP_LOCAL_H_INCLUDED__ */
index 5ea81c0e82d18c08d2b05fab4ca86e27a0d87dd5..230cfcc5bfc9edf40d7c19a50b54472e1b0a4d4d 100644 (file)
@@ -28,7 +28,7 @@ STORAGE_CLASS_SP_C void sp_ctrl_store(
 {
        assert(ID < N_SP_ID);
        assert(SP_CTRL_BASE[ID] != (hrt_address)-1);
-       ia_css_device_store_uint32(SP_CTRL_BASE[ID] + reg*sizeof(hrt_data), value);
+       ia_css_device_store_uint32(SP_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
        return;
 }
 
@@ -38,7 +38,7 @@ STORAGE_CLASS_SP_C hrt_data sp_ctrl_load(
 {
        assert(ID < N_SP_ID);
        assert(SP_CTRL_BASE[ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(SP_CTRL_BASE[ID] + reg*sizeof(hrt_data));
+       return ia_css_device_load_uint32(SP_CTRL_BASE[ID] + reg * sizeof(hrt_data));
 }
 
 STORAGE_CLASS_SP_C bool sp_ctrl_getbit(
@@ -47,6 +47,7 @@ STORAGE_CLASS_SP_C bool sp_ctrl_getbit(
        const unsigned int      bit)
 {
        hrt_data val = sp_ctrl_load(ID, reg);
+
        return (val & (1UL << bit)) != 0;
 }
 
@@ -56,6 +57,7 @@ STORAGE_CLASS_SP_C void sp_ctrl_setbit(
        const unsigned int      bit)
 {
        hrt_data        data = sp_ctrl_load(ID, reg);
+
        sp_ctrl_store(ID, reg, (data | (1UL << bit)));
        return;
 }
@@ -66,6 +68,7 @@ STORAGE_CLASS_SP_C void sp_ctrl_clearbit(
        const unsigned int      bit)
 {
        hrt_data        data = sp_ctrl_load(ID, reg);
+
        sp_ctrl_store(ID, reg, (data & ~(1UL << bit)));
        return;
 }
index 8be1cd020bf459b2df3f8785f9471e629d61d370..f1430c3df301094ef87df3750869de89dcef3258 100644 (file)
@@ -39,7 +39,7 @@
 /*
  * Cell specific address maps
  */
-#if HRT_ADDRESS_WIDTH==64
+#if HRT_ADDRESS_WIDTH == 64
 
 #define GP_FIFO_BASE   ((hrt_address)0x0000000000090104)               /* This is NOT a base address */
 
@@ -76,7 +76,7 @@ static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
        (hrt_address)0x00000000000B0000ULL};
 
 /* MMU */
-#if defined (IS_ISP_2400_MAMOIADA_SYSTEM) || defined (IS_ISP_2401_MAMOIADA_SYSTEM)
+#if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
 /*
  * MMU0_ID: The data MMU
  * MMU1_ID: The icache MMU
@@ -136,7 +136,6 @@ static const hrt_address GPIO_BASE[N_GPIO_ID] = {
 static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
        (hrt_address)0x0000000000000100ULL};
 
-
 /* INPUT_FORMATTER */
 static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
        (hrt_address)0x0000000000030000ULL,
@@ -161,7 +160,7 @@ static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
 static const hrt_address RX_BASE[N_RX_ID] = {
        (hrt_address)0x0000000000080100ULL};
 
-#elif HRT_ADDRESS_WIDTH==32
+#elif HRT_ADDRESS_WIDTH == 32
 
 #define GP_FIFO_BASE   ((hrt_address)0x00090104)               /* This is NOT a base address */
 
@@ -198,7 +197,7 @@ static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
        (hrt_address)0x000B0000UL};
 
 /* MMU */
-#if defined (IS_ISP_2400_MAMOIADA_SYSTEM) || defined (IS_ISP_2401_MAMOIADA_SYSTEM)
+#if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
 /*
  * MMU0_ID: The data MMU
  * MMU1_ID: The icache MMU
@@ -259,7 +258,6 @@ static const hrt_address GPIO_BASE[N_GPIO_ID] = {
 static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
        (hrt_address)0x00000100UL};
 
-
 /* INPUT_FORMATTER */
 static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
        (hrt_address)0x00030000UL,
index cd12d74024f75f6a30c2e4fd7f00daf42758dfc1..204ea6c0925d29d2471e206488e354b83e2acd2c 100644 (file)
@@ -54,7 +54,7 @@ void timed_ctrl_snd_sp_commnd(
        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(
@@ -70,5 +70,5 @@ void timed_ctrl_snd_gpio_commnd(
        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 fb0fdbb884352c08c6172f8f9e6c51badf9ec829..ffa295c14f8f0132034387a9034cf32a797c423f 100644 (file)
@@ -27,8 +27,8 @@ STORAGE_CLASS_TIMED_CTRL_C void timed_ctrl_reg_store(
        const hrt_data                  value)
 {
 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);
+OP___assert(TIMED_CTRL_BASE[ID] != (hrt_address) - 1);
+       ia_css_device_store_uint32(TIMED_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
 }
 
 #endif /* __GP_DEVICE_PRIVATE_H_INCLUDED__ */
index 5e05258673d55d1d1f0a164f353ec7edba0b8ff1..1536cfbabd3923c292bda1c59a01517d0f941413 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "assert_support.h"
 
-
 STORAGE_CLASS_ISP_C void isp_vamem_store(
        const vamem_ID_t        ID,
        vamem_data_t            *addr,
@@ -29,9 +28,8 @@ STORAGE_CLASS_ISP_C void isp_vamem_store(
        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)addr, data, size * sizeof(vamem_data_t));
+       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));
 }
 
-
 #endif /* __VAMEM_PRIVATE_H_INCLUDED__ */
index ea22c23fc7a490d6653c09718fda9bef06b6ee5c..728f9d6072a6326090d52124cfba1c8f4a986096 100644 (file)
 #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 */
 
 /* subword bits move like this:         MSB[____xxxx____]LSB -> MSB[00000000xxxx]LSB */
-#define SUBWORD(w, start, end)     (((w) & (((1ULL << ((end)-1))-1) << 1 | 1)) >> (start))
+#define SUBWORD(w, start, end)     (((w) & (((1ULL << ((end) - 1)) - 1) << 1 | 1)) >> (start))
 
 /* inverse subword bits move like this: MSB[xxxx____xxxx]LSB -> MSB[xxxx0000xxxx]LSB */
-#define INV_SUBWORD(w, start, end) ((w) & (~(((1ULL << ((end)-1))-1) << 1 | 1) | ((1ULL << (start))-1)) )
+#define INV_SUBWORD(w, start, end) ((w) & (~(((1ULL << ((end) - 1)) - 1) << 1 | 1) | ((1ULL << (start)) - 1)))
 
-#define uedge_bits (8*sizeof(hive_uedge))
+#define uedge_bits (8 * sizeof(hive_uedge))
 #define move_lower_bits(target, target_bit, src, src_bit) move_subword(target, target_bit, src, 0, src_bit)
 #define move_upper_bits(target, target_bit, src, src_bit) move_subword(target, target_bit, src, src_bit, uedge_bits)
 #define move_word(target, target_bit, src) move_subword(target, target_bit, src, 0, uedge_bits)
 
 static void
-move_subword (
+move_subword(
        hive_uedge *target,
-       unsigned target_bit,
+       unsigned int target_bit,
        hive_uedge src,
-       unsigned src_start,
-       unsigned src_end)
+       unsigned int src_start,
+       unsigned int src_end)
 {
        unsigned int start_elem = target_bit / uedge_bits;
        unsigned int start_bit  = target_bit % uedge_bits;
-       unsigned subword_width = src_end - src_start;
+       unsigned int subword_width = src_end - src_start;
 
        hive_uedge src_subword = SUBWORD(src, src_start, src_end);
 
        if (subword_width + start_bit > uedge_bits) { /* overlap */
                hive_uedge old_val1;
                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);
-               target[start_elem+1] = old_val1 | (src_subword >> ( uedge_bits - start_bit));
+               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);
+
                target[start_elem] = old_val | (src_subword << start_bit);
        }
 }
@@ -87,13 +89,14 @@ hive_sim_wide_unpack(
                /* general case: handles edge spanning cases (includes >64bit elements) */
                unsigned int bits_written = 0;
                unsigned int i;
+
                move_upper_bits(elem, bits_written, vector[start_elem], start_bit);
                bits_written += (64 - start_bit);
-               for(i = start_elem+1; i < end_elem; i++) {
+               for (i = start_elem + 1; i < end_elem; i++) {
                        move_word(elem, bits_written, vector[i]);
                        bits_written += uedge_bits;
                }
-               move_lower_bits(elem, bits_written , vector[end_elem], end_bit);
+               move_lower_bits(elem, bits_written, vector[end_elem], end_bit);
        }
 }
 
@@ -111,10 +114,11 @@ hive_sim_wide_pack(
        if (elem_bits == uedge_bits) {
                vector[start_elem] = elem[0];
        } else if (elem_bits > uedge_bits) {
-               unsigned bits_to_write = elem_bits;
-               unsigned start_bit = elem_bits * index;
-               unsigned i = 0;
-               for(; bits_to_write > uedge_bits; bits_to_write -= uedge_bits, i++, start_bit += uedge_bits) {
+               unsigned int bits_to_write = elem_bits;
+               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) {
                        move_word(vector, start_bit, elem[i]);
                }
                move_lower_bits(vector, start_bit, elem[i], bits_to_write);
@@ -124,16 +128,17 @@ hive_sim_wide_pack(
        }
 }
 
-static void load_vector (
+static void load_vector(
        const isp_ID_t          ID,
        t_vmem_elem             *to,
        const t_vmem_elem       *from)
 {
-       unsigned i;
+       unsigned int i;
        hive_uedge *data;
-       unsigned size = sizeof(short)*ISP_NWAY;
-       VMEM_ARRAY(v, 2*ISP_NWAY); /* Need 2 vectors to work around vmem hss bug */
-       assert(ISP_BAMEM_BASE[ID] != (hrt_address)-1);
+       unsigned int size = sizeof(short) * ISP_NWAY;
+
+       VMEM_ARRAY(v, 2 * ISP_NWAY); /* Need 2 vectors to work around vmem hss bug */
+       assert(ISP_BAMEM_BASE[ID] != (hrt_address) - 1);
 #if !defined(HRT_MEMORY_ACCESS)
        ia_css_device_load(ISP_BAMEM_BASE[ID] + (unsigned long)from, &v[0][0], size);
 #else
@@ -142,26 +147,29 @@ static void load_vector (
        data = (hive_uedge *)v;
        for (i = 0; i < ISP_NWAY; i++) {
                hive_uedge elem = 0;
+
                hive_sim_wide_unpack(data, &elem, ISP_VEC_ELEMBITS, i);
                to[i] = elem;
        }
        hrt_sleep(); /* Spend at least 1 cycles per vector */
 }
 
-static void store_vector (
+static void store_vector(
        const isp_ID_t          ID,
        t_vmem_elem             *to,
        const t_vmem_elem       *from)
 {
-       unsigned i;
-       unsigned size = sizeof(short)*ISP_NWAY;
-       VMEM_ARRAY(v, 2*ISP_NWAY); /* Need 2 vectors to work around vmem hss bug */
+       unsigned int i;
+       unsigned int size = sizeof(short) * ISP_NWAY;
+
+       VMEM_ARRAY(v, 2 * ISP_NWAY); /* Need 2 vectors to work around vmem hss bug */
        //load_vector (&v[1][0], &to[ISP_NWAY]); /* Fetch the next vector, since it will be overwritten. */
        hive_uedge *data = (hive_uedge *)v;
+
        for (i = 0; i < ISP_NWAY; i++) {
                hive_sim_wide_pack(data, (hive_wide)&from[i], ISP_VEC_ELEMBITS, i);
        }
-       assert(ISP_BAMEM_BASE[ID] != (hrt_address)-1);
+       assert(ISP_BAMEM_BASE[ID] != (hrt_address) - 1);
 #if !defined(HRT_MEMORY_ACCESS)
        ia_css_device_store(ISP_BAMEM_BASE[ID] + (unsigned long)to, &v, size);
 #else
@@ -175,16 +183,17 @@ void isp_vmem_load(
        const isp_ID_t          ID,
        const t_vmem_elem       *from,
        t_vmem_elem             *to,
-       unsigned                elems) /* In t_vmem_elem */
+       unsigned int elems) /* In t_vmem_elem */
 {
-       unsigned c;
+       unsigned int c;
        const t_vmem_elem *vp = from;
+
        assert(ID < N_ISP_ID);
        assert((unsigned long)from % ISP_VEC_ALIGN == 0);
        assert(elems % ISP_NWAY == 0);
        for (c = 0; c < elems; c += ISP_NWAY) {
                load_vector(ID, &to[c], vp);
-               vp = (t_vmem_elem *)((char*)vp + ISP_VEC_ALIGN);
+               vp = (t_vmem_elem *)((char *)vp + ISP_VEC_ALIGN);
        }
 }
 
@@ -192,67 +201,72 @@ void isp_vmem_store(
        const isp_ID_t          ID,
        t_vmem_elem             *to,
        const t_vmem_elem       *from,
-       unsigned                elems) /* In t_vmem_elem */
+       unsigned int elems) /* In t_vmem_elem */
 {
-       unsigned c;
+       unsigned int c;
        t_vmem_elem *vp = to;
+
        assert(ID < N_ISP_ID);
        assert((unsigned long)to % ISP_VEC_ALIGN == 0);
        assert(elems % ISP_NWAY == 0);
        for (c = 0; c < elems; c += ISP_NWAY) {
-               store_vector (ID, vp, &from[c]);
-               vp = (t_vmem_elem *)((char*)vp + ISP_VEC_ALIGN);
+               store_vector(ID, vp, &from[c]);
+               vp = (t_vmem_elem *)((char *)vp + ISP_VEC_ALIGN);
        }
 }
 
-void isp_vmem_2d_load (
+void isp_vmem_2d_load(
        const isp_ID_t          ID,
        const t_vmem_elem       *from,
        t_vmem_elem             *to,
-       unsigned height,
-       unsigned width,
-       unsigned stride_to,  /* In t_vmem_elem */
+       unsigned int height,
+       unsigned int width,
+       unsigned int stride_to,  /* In t_vmem_elem */
+
        unsigned stride_from /* In t_vmem_elem */)
 {
-       unsigned h;
+       unsigned int h;
 
        assert(ID < N_ISP_ID);
        assert((unsigned long)from % ISP_VEC_ALIGN == 0);
        assert(width % ISP_NWAY == 0);
        assert(stride_from % ISP_NWAY == 0);
        for (h = 0; h < height; h++) {
-               unsigned c;
+               unsigned int c;
                const t_vmem_elem *vp = from;
+
                for (c = 0; c < width; c += ISP_NWAY) {
-                       load_vector(ID, &to[stride_to*h + c], vp);
-                       vp = (t_vmem_elem *)((char*)vp + ISP_VEC_ALIGN);
+                       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 (
+void isp_vmem_2d_store(
        const isp_ID_t          ID,
        t_vmem_elem             *to,
        const t_vmem_elem       *from,
-       unsigned height,
-       unsigned width,
-       unsigned stride_to,  /* In t_vmem_elem */
+       unsigned int height,
+       unsigned int width,
+       unsigned int stride_to,  /* In t_vmem_elem */
+
        unsigned stride_from /* In t_vmem_elem */)
 {
-       unsigned h;
+       unsigned int h;
 
        assert(ID < N_ISP_ID);
        assert((unsigned long)to % ISP_VEC_ALIGN == 0);
        assert(width % ISP_NWAY == 0);
        assert(stride_to % ISP_NWAY == 0);
        for (h = 0; h < height; h++) {
-               unsigned c;
+               unsigned int c;
                t_vmem_elem *vp = to;
+
                for (c = 0; c < width; c += ISP_NWAY) {
-                       store_vector (ID, vp, &from[stride_from*h + c]);
-                       vp = (t_vmem_elem *)((char*)vp + ISP_VEC_ALIGN);
+                       store_vector(ID, vp, &from[stride_from * h + c]);
+                       vp = (t_vmem_elem *)((char *)vp + ISP_VEC_ALIGN);
                }
-               to = (t_vmem_elem *)((char *)to + stride_to/ISP_NWAY*ISP_VEC_ALIGN);
+               to = (t_vmem_elem *)((char *)to + stride_to / ISP_NWAY * ISP_VEC_ALIGN);
        }
 }
index de85644b885e14f57c85a620381406de0e63c6c9..25043677448dc4dcf44cbf84c0b78ca40aa91a94 100644 (file)
 #include "type_support.h"
 #include "vmem_global.h"
 
-typedef uint16_t t_vmem_elem;
+typedef u16 t_vmem_elem;
 
-#define VMEM_ARRAY(x,s)    t_vmem_elem x[s/ISP_NWAY][ISP_NWAY]
+#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                elems); /* In t_vmem_elem */
+       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                elems); /* In t_vmem_elem */
+       unsigned int elems); /* In t_vmem_elem */
 
-void isp_vmem_2d_load (
+void isp_vmem_2d_load(
        const isp_ID_t          ID,
        const t_vmem_elem       *from,
        t_vmem_elem             *to,
-       unsigned                height,
-       unsigned                width,
-       unsigned                stride_to,  /* In t_vmem_elem */
+       unsigned int height,
+       unsigned int width,
+       unsigned int stride_to,  /* In t_vmem_elem */
+
        unsigned                stride_from /* In t_vmem_elem */);
 
-void isp_vmem_2d_store (
+void isp_vmem_2d_store(
        const isp_ID_t          ID,
        t_vmem_elem             *to,
        const t_vmem_elem       *from,
-       unsigned                height,
-       unsigned                width,
-       unsigned                stride_to,  /* In t_vmem_elem */
+       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 7558f49643135f0a237ee6dc70f893358bfe5e78..163521c53d4b47129f633b97911db0a89b4f978b 100644 (file)
 #define HIVE_SWITCH_M_FSYNC                                    0x00000007
 
 #define HIVE_SWITCH_ENCODE_FSYNC(x) \
-       (1U<<(((x)-1)&HIVE_SWITCH_M_CHANNELS))
+       (1U << (((x) - 1) & HIVE_SWITCH_M_CHANNELS))
 
 #define _HIVE_INPUT_SWITCH_GET_LUT_FIELD(reg, bit_index) \
        (((reg) >> (bit_index)) & HIVE_SWITCH_M_SWITCH_CODE)
 #define _HIVE_INPUT_SWITCH_SET_LUT_FIELD(reg, bit_index, val) \
-       (((reg) & ~(HIVE_SWITCH_M_SWITCH_CODE<<(bit_index))) | (((hrt_data)(val)&HIVE_SWITCH_M_SWITCH_CODE)<<(bit_index)))
+       (((reg) & ~(HIVE_SWITCH_M_SWITCH_CODE << (bit_index))) | (((hrt_data)(val) & HIVE_SWITCH_M_SWITCH_CODE) << (bit_index)))
 #define _HIVE_INPUT_SWITCH_GET_FSYNC_FIELD(reg, bit_index) \
        (((reg) >> (bit_index)) & HIVE_SWITCH_M_FSYNC)
 #define _HIVE_INPUT_SWITCH_SET_FSYNC_FIELD(reg, bit_index, val) \
-       (((reg) & ~(HIVE_SWITCH_M_FSYNC<<(bit_index))) | (((hrt_data)(val)&HIVE_SWITCH_M_FSYNC)<<(bit_index)))
+       (((reg) & ~(HIVE_SWITCH_M_FSYNC << (bit_index))) | (((hrt_data)(val) & HIVE_SWITCH_M_FSYNC) << (bit_index)))
 
 typedef struct input_formatter_cfg_s   input_formatter_cfg_t;
 
@@ -93,22 +93,22 @@ typedef struct input_formatter_cfg_s        input_formatter_cfg_t;
  * This data structure is shared between host and SP
  */
 struct input_formatter_cfg_s {
-       uint32_t        start_line;
-       uint32_t        start_column;
-       uint32_t        left_padding;
-       uint32_t        cropped_height;
-       uint32_t        cropped_width;
-       uint32_t        deinterleaving;
-       uint32_t        buf_vecs;
-       uint32_t        buf_start_index;
-       uint32_t        buf_increment;
-       uint32_t        buf_eol_offset;
-       uint32_t        is_yuv420_format;
-       uint32_t        block_no_reqs;
+       u32     start_line;
+       u32     start_column;
+       u32     left_padding;
+       u32     cropped_height;
+       u32     cropped_width;
+       u32     deinterleaving;
+       u32     buf_vecs;
+       u32     buf_start_index;
+       u32     buf_increment;
+       u32     buf_eol_offset;
+       u32     is_yuv420_format;
+       u32     block_no_reqs;
 };
 
 extern const hrt_address HIVE_IF_SRST_ADDRESS[N_INPUT_FORMATTER_ID];
 extern const hrt_data HIVE_IF_SRST_MASK[N_INPUT_FORMATTER_ID];
-extern const uint8_t HIVE_IF_SWITCH_CODE[N_INPUT_FORMATTER_ID];
+extern const u8 HIVE_IF_SWITCH_CODE[N_INPUT_FORMATTER_ID];
 
 #endif /* __INPUT_FORMATTER_GLOBAL_H_INCLUDED__ */
index 9ba36525e8d32ec76f9891e6ef225d91335b0291..b443b58f96089e773856ebf5b3d5f3aba4ece980 100644 (file)
@@ -24,7 +24,7 @@
 //AM: Use previous define for this.
 
 //MIPI allows upto 4 channels.
-#define                N_CHANNELS  (4) 
+#define                N_CHANNELS  (4)
 // 12KB = 256bit x 384 words
 #define                IB_CAPACITY_IN_WORDS (384)
 
@@ -49,7 +49,7 @@ typedef enum {
 typedef enum {
        INPUT_SYSTEM_DISCARD_ALL = 0,
        INPUT_SYSTEM_CSI_BACKEND = 1,
-       INPUT_SYSTEM_INPUT_BUFFER = 2, 
+       INPUT_SYSTEM_INPUT_BUFFER = 2,
        INPUT_SYSTEM_MULTICAST = 3,
        N_INPUT_SYSTEM_CONNECTION
 } input_system_connection_t;
@@ -86,31 +86,31 @@ typedef struct prbs_cfg_s                   prbs_cfg_t;
 
 /* MW: uint16_t should be sufficient */
 struct input_system_cfg_s {
-       uint32_t        no_side_band;
-       uint32_t        fmt_type;
-       uint32_t        ch_id;
-       uint32_t        input_mode;
+       u32     no_side_band;
+       u32     fmt_type;
+       u32     ch_id;
+       u32     input_mode;
 };
 
 struct sync_generator_cfg_s {
-       uint32_t        width;
-       uint32_t        height;
-       uint32_t        hblank_cycles;
-       uint32_t        vblank_cycles;
+       u32     width;
+       u32     height;
+       u32     hblank_cycles;
+       u32     vblank_cycles;
 };
 
 /* MW: tpg & prbs are exclusive */
 struct tpg_cfg_s {
-       uint32_t        x_mask;
-       uint32_t        y_mask;
-       uint32_t        x_delta;
-       uint32_t        y_delta;
-       uint32_t        xy_mask;
+       u32     x_mask;
+       u32     y_mask;
+       u32     x_delta;
+       u32     y_delta;
+       u32     xy_mask;
        sync_generator_cfg_t sync_gen_cfg;
 };
 
 struct prbs_cfg_s {
-       uint32_t        seed;
+       u32     seed;
        sync_generator_cfg_t sync_gen_cfg;
 };
 
@@ -125,19 +125,19 @@ typedef struct gpfifo_cfg_s               gpfifo_cfg_t;
 //typedef struct input_system_cfg_s input_system_cfg_t;
 
 struct ib_buffer_s {
-       uint32_t        mem_reg_size;
-       uint32_t        nof_mem_regs;
-       uint32_t        mem_reg_addr;
+       u32     mem_reg_size;
+       u32     nof_mem_regs;
+       u32     mem_reg_addr;
 };
 
 typedef struct ib_buffer_s     ib_buffer_t;
 
 struct csi_cfg_s {
-       uint32_t                        csi_port;
+       u32                     csi_port;
     buffering_mode_t   buffering_mode;
        ib_buffer_t                     csi_buffer;
        ib_buffer_t                     acquisition_buffer;
-       uint32_t                        nof_xmem_buffers;
+       u32                     nof_xmem_buffers;
 };
 
 typedef struct csi_cfg_s        csi_cfg_t;
@@ -150,6 +150,6 @@ typedef enum {
        INPUT_SYSTEM_CFG_FLAG_CONFLICT  = 1U << 3       // To mark a conflicting configuration.
 } input_system_cfg_flag_t;
 
-typedef uint32_t input_system_config_flags_t; 
+typedef u32 input_system_config_flags_t;
 
 #endif /* __INPUT_SYSTEM_GLOBAL_H_INCLUDED__ */
index 14d574849a5b1b954cbd725944801a7c0b209502..b5e4dc3a4ed359d99f68b272dd586453eb50f00a 100644 (file)
 
 #include <system_types.h>
 
-#if defined (HAS_ISP_2401_MAMOIADA)
+#if defined(HAS_ISP_2401_MAMOIADA)
 #define IS_ISP_2401_MAMOIADA
 
 #include "isp2401_mamoiada_params.h"
-#elif defined (HAS_ISP_2400_MAMOIADA)
+#elif defined(HAS_ISP_2400_MAMOIADA)
 #define IS_ISP_2400_MAMOIADA
 
 #include "isp2400_mamoiada_params.h"
 #ifdef ISP2401
 #ifdef PIPE_GENERATION
 #define PIPEMEM(x) MEM(x)
-#define ISP_NWAY   (1<<ISP_NWAY_LOG2)
+#define ISP_NWAY   BIT(ISP_NWAY_LOG2)
 #else
 #define PIPEMEM(x)
 #endif
 
 #endif
 /* The number of data bytes in a vector disregarding the reduced precision */
-#define ISP_VEC_BYTES                  (ISP_VEC_NELEMS*sizeof(uint16_t))
+#define ISP_VEC_BYTES                  (ISP_VEC_NELEMS * sizeof(uint16_t))
 
 /* ISP SC Registers */
 #define ISP_SC_REG                     0x00
index 9f1c2beefc854b3162c632d39b9970c1d7cba571..21938de974b7e812cec84fbc6d313adfe6cff9b7 100644 (file)
@@ -99,8 +99,8 @@
 //#define HRT_ADDRESS_WIDTH    64              /* Surprise, this is a local property*/
 #define HRT_DATA_WIDTH         32
 
-#define SIZEOF_HRT_REG         (HRT_DATA_WIDTH>>3)
-#define HIVE_ISP_CTRL_DATA_BYTES (HIVE_ISP_CTRL_DATA_WIDTH/8)
+#define SIZEOF_HRT_REG         (HRT_DATA_WIDTH >> 3)
+#define HIVE_ISP_CTRL_DATA_BYTES (HIVE_ISP_CTRL_DATA_WIDTH / 8)
 
 /* The main bus connecting all devices */
 #define HRT_BUS_WIDTH          HIVE_ISP_CTRL_DATA_WIDTH
 /* per-frame parameter handling support */
 #define SH_CSS_ENABLE_PER_FRAME_PARAMS
 
-typedef uint32_t                       hrt_bus_align_t;
+typedef u32                    hrt_bus_align_t;
 
 /*
  * Enumerate the devices, device access through the API is by ID, through the DLI by address
@@ -130,13 +130,13 @@ typedef enum {
        N_SP_ID
 } sp_ID_t;
 
-#if defined (IS_ISP_2401_MAMOIADA_SYSTEM)
+#if defined(IS_ISP_2401_MAMOIADA_SYSTEM)
 typedef enum {
        MMU0_ID = 0,
        MMU1_ID,
        N_MMU_ID
 } mmu_ID_t;
-#elif defined (IS_ISP_2400_MAMOIADA_SYSTEM)
+#elif defined(IS_ISP_2400_MAMOIADA_SYSTEM)
 typedef enum {
        MMU0_ID = 0,
        MMU1_ID,
@@ -316,6 +316,7 @@ enum ia_css_isp_memories {
        IA_CSS_DDR,
        N_IA_CSS_MEMORIES
 };
+
 #define IA_CSS_NUM_MEMORIES 9
 /* For driver compatibility */
 #define N_IA_CSS_ISP_MEMORIES   IA_CSS_NUM_MEMORIES
index c3e8a01040924241a9eb2a893b3ec1121cdd4711..539d941eb9febd7d27a803822db9b78a2b4cd20a 100644 (file)
@@ -51,6 +51,4 @@
 #define HIVE_TIMED_CTRL_CSI_EOF_BIT_ID                          22
 #define HIVE_TIMED_CTRL_IRQ_IS_STREAMING_MONITOR_BIT_ID         23
 
-
-
 #endif /* __TIMED_CTRL_GLOBAL_H_INCLUDED__ */
index 58713c6583b96f10fa768bc52e4852d933b13fda..92b783fed82cd9f521f8826e12c92153e98c6782 100644 (file)
 
 /* (log) stepsize of linear interpolation */
 #define VAMEM_INTERP_STEP_LOG2 4
-#define VAMEM_INTERP_STEP              (1<<VAMEM_INTERP_STEP_LOG2)
+#define VAMEM_INTERP_STEP              BIT(VAMEM_INTERP_STEP_LOG2)
 /* (physical) size of the tables */
-#define VAMEM_TABLE_UNIT_SIZE  ((1<<(ISP_VAMEM_ADDRESS_BITS-VAMEM_INTERP_STEP_LOG2)) + 1)
+#define VAMEM_TABLE_UNIT_SIZE  ((1 << (ISP_VAMEM_ADDRESS_BITS - VAMEM_INTERP_STEP_LOG2)) + 1)
 /* (logical) size of the tables */
-#define VAMEM_TABLE_UNIT_STEP  ((VAMEM_TABLE_UNIT_SIZE-1)<<1)
+#define VAMEM_TABLE_UNIT_STEP  ((VAMEM_TABLE_UNIT_SIZE - 1) << 1)
 /* Number of tables */
-#define VAMEM_TABLE_UNIT_COUNT (ISP_VAMEM_DEPTH/VAMEM_TABLE_UNIT_STEP)
+#define VAMEM_TABLE_UNIT_COUNT (ISP_VAMEM_DEPTH / VAMEM_TABLE_UNIT_STEP)
 
-typedef uint16_t                               vamem_data_t;
+typedef u16                            vamem_data_t;
 
 #endif /* __VAMEM_GLOBAL_H_INCLUDED__ */
index 7867cd137f3fe4d2d864ec0a74a74b73696f4393..369856363b5bbbfccb9cf5ba04595b8c100c1d0f 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 7dac8dd93f000c600e63c48231abd0ca80cc0d54..ac00880e31181e11b59c1df4a3654a8b459aeecb 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef __ASSERT_SUPPORT_H_INCLUDED__
 #define __ASSERT_SUPPORT_H_INCLUDED__
 
-
 /**
  * The following macro can help to test the size of a struct at compile
  * time rather than at run-time. It does not work for all compilers; see
  * Not all compilers will trigger an error with this macro; use a search engine to search for
  * BUILD_BUG_ON to find other methods.
  */
-#define COMPILATION_ERROR_IF(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
+#define COMPILATION_ERROR_IF(condition) ((void)sizeof(char[1 - 2 * !!(condition)]))
 
 /* Compile time assertion */
 #ifndef CT_ASSERT
-#define CT_ASSERT(cnd) ((void)sizeof(char[(cnd)?1:-1]))
+#define CT_ASSERT(cnd) ((void)sizeof(char[(cnd) ? 1 :  -1]))
 #endif /* CT_ASSERT */
 
 #ifdef NDEBUG
  * The implementation for the pipe generation tool is in see support.isp.h */
 #define OP___assert(cnd) assert(cnd)
 
-static inline void compile_time_assert (unsigned cond)
+static inline void compile_time_assert(unsigned int cond)
 {
        /* Call undefined function if cond is false */
-       extern void _compile_time_assert (void);
+       void _compile_time_assert(void);
        if (!cond) _compile_time_assert();
 }
 #endif /* PIPE_GENERATION */
index 1b271c3c6a254014d136b4c912fd5ceff4ed53fc..76856db586262317f4f4dad100874446f70b807c 100644 (file)
@@ -22,4 +22,3 @@
 #define bitop_clearbit(a, b) ((a) &= ~(1UL << (b)))
 
 #endif /* __BITOP_SUPPORT_H_INCLUDED__ */
-
index 917ee8cdb1d9f031883a29d911d0e725f65c189f..badb1570571003020689e2b5c546d3687974306d 100644 (file)
@@ -30,7 +30,6 @@
  * - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "csi_rx_local.h"
 
index 0aa22446e27e99becd33b2c410335133a93f97b9..ba11b956eb1a8335cde088d1e73720d3946ffc12 100644 (file)
  *
  */
 
-
 #include "system_local.h"
 #include "debug_local.h"
 
 #ifndef __INLINE_DEBUG__
 #define STORAGE_CLASS_DEBUG_H extern
-#define STORAGE_CLASS_DEBUG_C 
+#define STORAGE_CLASS_DEBUG_C
 #include "debug_public.h"
 #else  /* __INLINE_DEBUG__ */
 #define STORAGE_CLASS_DEBUG_H static inline
index 834e7c3e0814feaac851e9821f5573fea9d3d379..038cf3cf7c607b6fcaf35bd8f08a4d1234ad4aeb 100644 (file)
@@ -75,15 +75,14 @@ typedef     hrt_address             sys_address;
 
  \return none,
  */
-extern void device_set_base_address(
+void device_set_base_address(
        const sys_address               base_addr);
 
-
 /*! Get the (sub)system base address
 
  \return base_address,
  */
-extern sys_address device_get_base_address(void);
+sys_address device_get_base_address(void);
 
 /*! Read an 8-bit value from a device register or memory in the device
 
@@ -91,7 +90,7 @@ extern sys_address device_get_base_address(void);
 
  \return device[addr]
  */
-extern uint8_t ia_css_device_load_uint8(
+uint8_t ia_css_device_load_uint8(
        const hrt_address               addr);
 
 /*! Read a 16-bit value from a device register or memory in the device
@@ -100,7 +99,7 @@ extern uint8_t ia_css_device_load_uint8(
 
  \return device[addr]
  */
-extern uint16_t ia_css_device_load_uint16(
+uint16_t ia_css_device_load_uint16(
        const hrt_address               addr);
 
 /*! Read a 32-bit value from a device register or memory in the device
@@ -109,7 +108,7 @@ extern uint16_t ia_css_device_load_uint16(
 
  \return device[addr]
  */
-extern uint32_t ia_css_device_load_uint32(
+uint32_t ia_css_device_load_uint32(
        const hrt_address               addr);
 
 /*! Read a 64-bit value from a device register or memory in the device
@@ -118,7 +117,7 @@ extern uint32_t ia_css_device_load_uint32(
 
  \return device[addr]
  */
-extern uint64_t ia_css_device_load_uint64(
+uint64_t ia_css_device_load_uint64(
        const hrt_address               addr);
 
 /*! Write an 8-bit value to a device register or memory in the device
@@ -128,7 +127,7 @@ extern uint64_t ia_css_device_load_uint64(
 
  \return none, device[addr] = value
  */
-extern void ia_css_device_store_uint8(
+void ia_css_device_store_uint8(
        const hrt_address               addr,
        const uint8_t                   data);
 
@@ -139,7 +138,7 @@ extern void ia_css_device_store_uint8(
 
  \return none, device[addr] = value
  */
-extern void ia_css_device_store_uint16(
+void ia_css_device_store_uint16(
        const hrt_address               addr,
        const uint16_t                  data);
 
@@ -150,7 +149,7 @@ extern void ia_css_device_store_uint16(
 
  \return none, device[addr] = value
  */
-extern void ia_css_device_store_uint32(
+void ia_css_device_store_uint32(
        const hrt_address               addr,
        const uint32_t                  data);
 
@@ -161,7 +160,7 @@ extern void ia_css_device_store_uint32(
 
  \return none, device[addr] = value
  */
-extern void ia_css_device_store_uint64(
+void ia_css_device_store_uint64(
        const hrt_address               addr,
        const uint64_t                  data);
 
@@ -173,7 +172,7 @@ extern void ia_css_device_store_uint64(
 
  \return none
  */
-extern void ia_css_device_load(
+void ia_css_device_load(
        const hrt_address               addr,
        void                                    *data,
        const size_t                    size);
@@ -186,7 +185,7 @@ extern void ia_css_device_load(
 
  \return none
  */
-extern void ia_css_device_store(
+void ia_css_device_store(
        const hrt_address               addr,
        const void                              *data,
        const size_t                    size);
index d9dee691e3f8b4385409b2273fb38450b6c9277e..b6c464a530ea8b88f12b953f73ca42861b707b5c 100644 (file)
  *
  */
 
-
 #include "system_local.h"
 #include "dma_local.h"
 
 #ifndef __INLINE_DMA__
 #define STORAGE_CLASS_DMA_H extern
-#define STORAGE_CLASS_DMA_C 
+#define STORAGE_CLASS_DMA_C
 #include "dma_public.h"
 #else  /* __INLINE_DMA__ */
 #define STORAGE_CLASS_DMA_H static inline
index 6e5e5dd4107d448ffb87281c54103f3949be4ffe..bca0195016dfe9b032b0fb226154cae63e1cfd01 100644 (file)
@@ -28,7 +28,6 @@
 #define ENOTSUP 252
 #define ENOBUFS 233
 
-
 #elif defined(__KERNEL__)
 #include <linux/errno.h>
 /*
 
 #endif
 
-#define verifexit(cond,error_tag)  \
+#define verifexit(cond, error_tag)  \
 do {                               \
-       if (!(cond)){              \
+       if (!(cond)) {              \
                goto EXIT;         \
        }                          \
-} while(0)
+} while (0)
 
 #define verifjmpexit(cond)         \
 do {                               \
-       if (!(cond)){              \
+       if (!(cond)) {              \
                goto EXIT;         \
        }                          \
-} while(0)
+} while (0)
 
 #endif /* __ERROR_SUPPORT_H_INCLUDED__ */
index df579e902796973baf1dfc163c3112d813090192..8bfe348772f4e7c6ea9c3979b2759dc5573b833b 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "event_fifo_local.h"
 
 #ifndef __INLINE_EVENT__
 #define STORAGE_CLASS_EVENT_H extern
-#define STORAGE_CLASS_EVENT_C 
+#define STORAGE_CLASS_EVENT_C
 #include "event_fifo_public.h"
 #else  /* __INLINE_EVENT__ */
 #define STORAGE_CLASS_EVENT_H static inline
index f10c4fa2e32b729cfbde62b6bef2535cb590dbf1..1743caa006d0f291c78785b318112b322655e606 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "fifo_monitor_local.h"
 
 #ifndef __INLINE_FIFO_MONITOR__
 #define STORAGE_CLASS_FIFO_MONITOR_H extern
-#define STORAGE_CLASS_FIFO_MONITOR_C 
+#define STORAGE_CLASS_FIFO_MONITOR_C
 #include "fifo_monitor_public.h"
 #else  /* __INLINE_FIFO_MONITOR__ */
 #define STORAGE_CLASS_FIFO_MONITOR_H static inline
index 75c6854c8e7b69b77854b7d6126a56547f342c1e..4f8d7fbc8e7f0027715831de53d8da4300d646ea 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "gdc_local.h"
 
 #ifndef __INLINE_GDC__
 #define STORAGE_CLASS_GDC_H extern
-#define STORAGE_CLASS_GDC_C 
+#define STORAGE_CLASS_GDC_C
 #include "gdc_public.h"
 #else  /* __INLINE_GDC__ */
 #define STORAGE_CLASS_GDC_H static inline
index aba94e623043e463a23c0c12e0aa18d386342b63..665557bae7a1957e75774a7f0cb26375c920bfdc 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "gp_device_local.h"
 
 #ifndef __INLINE_GP_DEVICE__
 #define STORAGE_CLASS_GP_DEVICE_H extern
-#define STORAGE_CLASS_GP_DEVICE_C 
+#define STORAGE_CLASS_GP_DEVICE_C
 #include "gp_device_public.h"
 #else  /* __INLINE_GP_DEVICE__ */
 #define STORAGE_CLASS_GP_DEVICE_H static inline
index d5d2df24e11aa421802f5c116945309e9784e449..cd26c9d16a3514019b2bd1f35bb4001677ab139f 100644 (file)
@@ -29,7 +29,6 @@
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"    /*GP_TIMER_BASE address */
 #include "gp_timer_local.h"  /*GP_TIMER register offsets */
 
index d37f7166aa4ac98479bd77e996458e2d51caafea..ad79c03e59f46e304bc8247b59ef897ffec26584 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "gpio_local.h"
 
 #ifndef __INLINE_GPIO__
 #define STORAGE_CLASS_GPIO_H extern
-#define STORAGE_CLASS_GPIO_C 
+#define STORAGE_CLASS_GPIO_C
 #include "gpio_public.h"
 #else  /* __INLINE_GPIO__ */
 #define STORAGE_CLASS_GPIO_H static inline
index a82fd3a21e98a71b1502d8189a2ad7fa33964ce2..f87fd6b2ba2319d5559ae45d6ead0b89bde346bb 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "hmem_local.h"
 
 #ifndef __INLINE_HMEM__
 #define STORAGE_CLASS_HMEM_H extern
-#define STORAGE_CLASS_HMEM_C 
+#define STORAGE_CLASS_HMEM_C
 #include "hmem_public.h"
 #else  /* __INLINE_HMEM__ */
 #define STORAGE_CLASS_HMEM_H static inline
index 45b316abb6749cc876bdf60936586c293d939341..63b3c2acc68799e5e6208d0a65b33690b30ed21f 100644 (file)
@@ -28,7 +28,7 @@
  * @param[in]  id      The global unique ID of the csi rx fe controller.
  * @param[out] state   Point to the register-state.
  */
-extern void csi_rx_fe_ctrl_get_state(
+void csi_rx_fe_ctrl_get_state(
                const csi_rx_frontend_ID_t ID,
                csi_rx_fe_ctrl_state_t *state);
 /**
@@ -38,7 +38,7 @@ extern void csi_rx_fe_ctrl_get_state(
  * @param[in]  id      The global unique ID of the csi rx fe controller.
  * @param[in]  state   Point to the register-state.
  */
-extern void csi_rx_fe_ctrl_dump_state(
+void csi_rx_fe_ctrl_dump_state(
                const csi_rx_frontend_ID_t ID,
                csi_rx_fe_ctrl_state_t *state);
 /**
@@ -49,9 +49,9 @@ extern void csi_rx_fe_ctrl_dump_state(
  * @param[in]  lane            The lane ID.
  * @param[out] state           Point to the dlane state.
  */
-extern void csi_rx_fe_ctrl_get_dlane_state(
+void csi_rx_fe_ctrl_get_dlane_state(
                const csi_rx_frontend_ID_t ID,
-               const uint32_t lane,
+               const u32 lane,
                csi_rx_fe_ctrl_lane_t *dlane_state);
 /**
  * @brief Get the csi rx backend state.
@@ -60,7 +60,7 @@ extern void csi_rx_fe_ctrl_get_dlane_state(
  * @param[in]  id      The global unique ID of the csi rx be controller.
  * @param[out] state   Point to the register-state.
  */
-extern void csi_rx_be_ctrl_get_state(
+void csi_rx_be_ctrl_get_state(
                const csi_rx_backend_ID_t ID,
                csi_rx_be_ctrl_state_t *state);
 /**
@@ -70,7 +70,7 @@ extern void csi_rx_be_ctrl_get_state(
  * @param[in]  id      The global unique ID of the csi rx be controller.
  * @param[in]  state   Point to the register-state.
  */
-extern void csi_rx_be_ctrl_dump_state(
+void csi_rx_be_ctrl_dump_state(
                const csi_rx_backend_ID_t ID,
                csi_rx_be_ctrl_state_t *state);
 /* end of NCI */
@@ -89,7 +89,7 @@ extern void csi_rx_be_ctrl_dump_state(
  *
  * @return the value of the register.
  */
-extern hrt_data csi_rx_fe_ctrl_reg_load(
+hrt_data csi_rx_fe_ctrl_reg_load(
        const csi_rx_frontend_ID_t ID,
        const hrt_address reg);
 /**
@@ -101,7 +101,7 @@ extern hrt_data csi_rx_fe_ctrl_reg_load(
  * @param[in]  value   The value to be stored.
  *
  */
-extern void csi_rx_fe_ctrl_reg_store(
+void csi_rx_fe_ctrl_reg_store(
        const csi_rx_frontend_ID_t ID,
        const hrt_address reg,
        const hrt_data value);
@@ -114,7 +114,7 @@ extern void csi_rx_fe_ctrl_reg_store(
  *
  * @return the value of the register.
  */
-extern hrt_data csi_rx_be_ctrl_reg_load(
+hrt_data csi_rx_be_ctrl_reg_load(
        const csi_rx_backend_ID_t ID,
        const hrt_address reg);
 /**
@@ -126,7 +126,7 @@ extern hrt_data csi_rx_be_ctrl_reg_load(
  * @param[in]  value   The value to be stored.
  *
  */
-extern void csi_rx_be_ctrl_reg_store(
+void csi_rx_be_ctrl_reg_store(
        const csi_rx_backend_ID_t ID,
        const hrt_address reg,
        const hrt_data value);
index 90b4ba7e023fe976debb71b9fb27a4bdca1745d3..450f4400fd493ff3deb8c44783043e7326bfb967 100644 (file)
@@ -45,55 +45,54 @@ extern hrt_address                          debug_buffer_address;
 extern hrt_vaddress                            debug_buffer_ddr_address;
 
 /*! Check the empty state of the local debug data buffer
+
  \return isEmpty(buffer)
  */
 STORAGE_CLASS_DEBUG_H bool is_debug_buffer_empty(void);
 
 /*! Dequeue a token from the debug data buffer
+
  \return isEmpty(buffer)?0:buffer[head]
  */
 STORAGE_CLASS_DEBUG_H hrt_data debug_dequeue(void);
 
 /*! Synchronise the remote buffer to the local buffer
+
  \return none
  */
 STORAGE_CLASS_DEBUG_H void debug_synch_queue(void);
 
 /*! Synchronise the remote buffer to the local buffer
+
  \return none
  */
 STORAGE_CLASS_DEBUG_H void debug_synch_queue_isp(void);
 
-
 /*! Synchronise the remote buffer to the local buffer
+
  \return none
  */
 STORAGE_CLASS_DEBUG_H void debug_synch_queue_ddr(void);
 
 /*! Set the offset/address of the (remote) debug buffer
+
  \return none
  */
-extern void debug_buffer_init(
+void debug_buffer_init(
        const hrt_address               addr);
 
 /*! Set the offset/address of the (remote) debug buffer
+
  \return none
  */
-extern void debug_buffer_ddr_init(
+void debug_buffer_ddr_init(
        const hrt_vaddress              addr);
 
 /*! Set the (remote) operating mode of the debug buffer
+
  \return none
  */
-extern void debug_buffer_setmode(
+void debug_buffer_setmode(
        const debug_buf_mode_t  mode);
 
 #endif /* __DEBUG_PUBLIC_H_INCLUDED__ */
index 1d5e38ffe9389ea75e9ce66b945aaaadb5ec6847..834e5dfc5ce07dcd9f0276ab61386162e88c36c9 100644 (file)
@@ -26,7 +26,7 @@ typedef struct dma_state_s            dma_state_t;
 
  \return none, state = DMA[ID].state
  */
-extern void dma_get_state(
+void dma_get_state(
        const dma_ID_t          ID,
        dma_state_t                     *state);
 
@@ -55,7 +55,6 @@ STORAGE_CLASS_DMA_H hrt_data dma_reg_load(
        const dma_ID_t          ID,
        const unsigned int      reg);
 
-
 /*! Set maximum burst size of DMA[ID]
 
  \param ID[in]                         DMA identifier
index d95bc7070f4c23376eba8ef586f2e52e22cfdf27..6e84fc775f259a6720ac2190cc06464c32129672 100644 (file)
@@ -19,7 +19,7 @@
 #include "system_types.h"
 
 /*! Blocking read from an event source EVENT[ID]
+
  \param        ID[in]                          EVENT identifier
 
  \return none, dequeue(event_queue[ID])
@@ -28,7 +28,7 @@ STORAGE_CLASS_EVENT_H void event_wait_for(
        const event_ID_t                ID);
 
 /*! Conditional blocking wait for an event source EVENT[ID]
+
  \param        ID[in]                          EVENT identifier
  \param        cnd[in]                         predicate
 
@@ -39,7 +39,7 @@ STORAGE_CLASS_EVENT_H void cnd_event_wait_for(
        const bool                              cnd);
 
 /*! Blocking read from an event source EVENT[ID]
+
  \param        ID[in]                          EVENT identifier
 
  \return dequeue(event_queue[ID])
@@ -48,7 +48,7 @@ STORAGE_CLASS_EVENT_H hrt_data event_receive_token(
        const event_ID_t                ID);
 
 /*! Blocking write to an event sink EVENT[ID]
+
  \param        ID[in]                          EVENT identifier
  \param        token[in]                       token to be written on the event
 
@@ -59,7 +59,7 @@ STORAGE_CLASS_EVENT_H void event_send_token(
        const hrt_data                  token);
 
 /*! Query an event source EVENT[ID]
+
  \param        ID[in]                          EVENT identifier
 
  \return !isempty(event_queue[ID])
@@ -68,7 +68,7 @@ STORAGE_CLASS_EVENT_H bool is_event_pending(
        const event_ID_t                ID);
 
 /*! Query an event sink EVENT[ID]
+
  \param        ID[in]                          EVENT identifier
 
  \return !isfull(event_queue[ID])
index 329f5d5049f29696f449d8e9d9554755b99895f9..93b4f9b441ae0e9dcdf2f0f3d104833b8b34212b 100644 (file)
@@ -22,7 +22,7 @@ typedef struct fifo_switch_state_s            fifo_switch_state_t;
 typedef struct fifo_monitor_state_s            fifo_monitor_state_t;
 
 /*! Set a fifo switch multiplex
+
  \param        ID[in]                          FIFO_MONITOR identifier
  \param        switch_id[in]           fifo switch identifier
  \param        sel[in]                         fifo switch selector
@@ -35,7 +35,7 @@ STORAGE_CLASS_FIFO_MONITOR_H void fifo_switch_set(
        const hrt_data                          sel);
 
 /*! Get a fifo switch multiplex
+
  \param        ID[in]                          FIFO_MONITOR identifier
  \param        switch_id[in]           fifo switch identifier
 
@@ -46,44 +46,44 @@ STORAGE_CLASS_FIFO_MONITOR_H hrt_data fifo_switch_get(
        const fifo_switch_t                     switch_id);
 
 /*! Read the state of FIFO_MONITOR[ID]
+
  \param        ID[in]                          FIFO_MONITOR identifier
  \param        state[out]                      fifo monitor state structure
 
  \return none, state = FIFO_MONITOR[ID].state
  */
-extern void fifo_monitor_get_state(
+void fifo_monitor_get_state(
        const fifo_monitor_ID_t         ID,
        fifo_monitor_state_t            *state);
 
 /*! Read the state of a fifo channel
+
  \param        ID[in]                          FIFO_MONITOR identifier
  \param        channel_id[in]          fifo channel identifier
  \param        state[out]                      fifo channel state structure
 
  \return none, state = fifo_channel[channel_id].state
  */
-extern void fifo_channel_get_state(
+void fifo_channel_get_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
+
  \param        ID[in]                          FIFO_MONITOR identifier
  \param        switch_id[in]           fifo switch identifier
  \param        state[out]                      fifo switch state structure
 
  \return none, state = fifo_switch[switch_id].state
  */
-extern void fifo_switch_get_state(
+void fifo_switch_get_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]
+
  \param        ID[in]                          FIFO_MONITOR identifier
  \param        reg[in]                         register index
  \param value[in]                      The data to be written
@@ -96,7 +96,7 @@ STORAGE_CLASS_FIFO_MONITOR_H void fifo_monitor_reg_store(
        const hrt_data                          value);
 
 /*! Read from a control register of FIFO_MONITOR[ID]
+
  \param        ID[in]                          FIFO_MONITOR identifier
  \param        reg[in]                         register index
  \param value[in]                      The data to be written
index d09d1e3203066a5e9bfc4ba76ad6f87d1f716dde..736a3ca67d793ce80603fbb46ff4b3bef02a770f 100644 (file)
@@ -33,7 +33,7 @@
 
  \return none, GDC[ID].lut[0...3][0...HRT_GDC_N-1] = data
  */
-extern void gdc_lut_store(
+void gdc_lut_store(
        const gdc_ID_t          ID,
        const int                       data[4][HRT_GDC_N]);
 
@@ -43,17 +43,17 @@ extern void gdc_lut_store(
  \param in_lut[in]                     The data matrix to be converted
  \param out_lut[out]                   The data matrix as the output of conversion
  */
-extern void gdc_lut_convert_to_isp_format(
+void gdc_lut_convert_to_isp_format(
        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]
+
  \param        ID[in]                          GDC identifier
 
  \return unity
  */
-extern int gdc_get_unity(
+int gdc_get_unity(
        const gdc_ID_t          ID);
 
 #endif /* __GDC_PUBLIC_H_INCLUDED__ */
index acbce0fd658fe1e278ac03b6ec5d0ffadc726e0f..fa5ff8c4cd28afa6931dd46291fff5164a2182b8 100644 (file)
 typedef struct gp_device_state_s               gp_device_state_t;
 
 /*! Read the state of GP_DEVICE[ID]
+
  \param        ID[in]                          GP_DEVICE identifier
  \param        state[out]                      gp device state structure
 
  \return none, state = GP_DEVICE[ID].state
  */
-extern void gp_device_get_state(
+void gp_device_get_state(
        const gp_device_ID_t            ID,
        gp_device_state_t                       *state);
 
@@ -44,7 +44,7 @@ STORAGE_CLASS_GP_DEVICE_H void gp_device_reg_store(
        const hrt_data                  value);
 
 /*! Read from a control register of GP_DEVICE[ID]
+
  \param        ID[in]                          GP_DEVICE identifier
  \param        reg_addr[in]            register byte address
  \param value[in]                      The data to be written
index 276e2fa9b1e78d4ca59ff177458022299fddf678..2ddb8c40a5b25dcedd18cd2f75650501789ec342 100644 (file)
@@ -23,7 +23,6 @@ param ID              timer_id
 extern void
 gp_timer_init(gp_timer_ID_t ID);
 
-
 /*! read timer value for (platform selected)selected timer.
 param ID               timer_id
  \return uint32_t      32 bit timer value
index 82eaa0d48bee5d56db1296ab5ce82c8b6eb03302..275e8e4d853daa1636a4f385222bfb91f71716dd 100644 (file)
@@ -31,7 +31,7 @@ STORAGE_CLASS_GPIO_H void gpio_reg_store(
        const hrt_data                  value);
 
 /*! Read from a control register of GPIO[ID]
+
  \param        ID[in]                          GPIO identifier
  \param        reg_addr[in]            register byte address
  \param value[in]                      The data to be written
index 274ceaf4b050f9dc7ba27271cfc7f2faa6954074..5bd6cebe85b31f4b1595c6e00a331e6fb16f955d 100644 (file)
@@ -42,7 +42,7 @@ STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_get_state(
  */
 STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_get_proc_state(
                const ibuf_ctrl_ID_t ID,
-               const uint32_t proc_id,
+               const u32 proc_id,
                ibuf_ctrl_proc_state_t *state);
 /**
  * @brief Dump the ibuf-controller state.
index 2db70893daf9cf508ff02bc3c13bfbd7c89cda01..87f6d5031fdfe69355aaba74c7d9b314f76b4b98 100644 (file)
 #include "system_types.h"
 
 /*! Reset INPUT_FORMATTER[ID]
+
  \param        ID[in]                          INPUT_FORMATTER identifier
 
  \return none, reset(INPUT_FORMATTER[ID])
  */
-extern void input_formatter_rst(
+void input_formatter_rst(
        const input_formatter_ID_t              ID);
 
 /*! Set the blocking mode of INPUT_FORMATTER[ID]
+
  \param        ID[in]                          INPUT_FORMATTER identifier
  \param        enable[in]                      blocking enable flag
 
@@ -41,54 +41,54 @@ extern void input_formatter_rst(
 
  \return none, INPUT_FORMATTER[ID].blocking_mode = enable
  */
-extern void input_formatter_set_fifo_blocking_mode(
+void input_formatter_set_fifo_blocking_mode(
        const input_formatter_ID_t              ID,
        const bool                                              enable);
 
 /*! Return the data alignment of INPUT_FORMATTER[ID]
+
  \param        ID[in]                          INPUT_FORMATTER identifier
 
  \return alignment(INPUT_FORMATTER[ID].data)
  */
-extern unsigned int input_formatter_get_alignment(
+unsigned int input_formatter_get_alignment(
        const input_formatter_ID_t              ID);
 
 /*! Read the source switch state into INPUT_FORMATTER[ID]
+
  \param        ID[in]                          INPUT_FORMATTER identifier
  \param        state[out]                      input formatter switch state structure
 
  \return none, state = INPUT_FORMATTER[ID].switch_state
  */
-extern void input_formatter_get_switch_state(
+void input_formatter_get_switch_state(
        const input_formatter_ID_t              ID,
        input_formatter_switch_state_t  *state);
 
 /*! Read the control registers of INPUT_FORMATTER[ID]
+
  \param        ID[in]                          INPUT_FORMATTER identifier
  \param        state[out]                      input formatter state structure
 
  \return none, state = INPUT_FORMATTER[ID].state
  */
-extern void input_formatter_get_state(
+void input_formatter_get_state(
        const input_formatter_ID_t              ID,
        input_formatter_state_t                 *state);
 
 /*! Read the control registers of bin copy INPUT_FORMATTER[ID]
+
  \param        ID[in]                          INPUT_FORMATTER identifier
  \param        state[out]                      input formatter state structure
 
  \return none, state = INPUT_FORMATTER[ID].state
  */
-extern void input_formatter_bin_get_state(
+void input_formatter_bin_get_state(
        const input_formatter_ID_t              ID,
        input_formatter_bin_state_t             *state);
 
 /*! Write to a control register of INPUT_FORMATTER[ID]
+
  \param        ID[in]                          INPUT_FORMATTER identifier
  \param        reg_addr[in]            register byte address
  \param value[in]                      The data to be written
@@ -101,7 +101,7 @@ STORAGE_CLASS_INPUT_FORMATTER_H void input_formatter_reg_store(
        const hrt_data                          value);
 
 /*! Read from a control register of INPUT_FORMATTER[ID]
+
  \param        ID[in]                          INPUT_FORMATTER identifier
  \param        reg_addr[in]            register byte address
  \param value[in]                      The data to be written
index 6e37ff0fe0f911dcb8e71279f21735c484361860..786b3585fde3829fa5643d3136931cbec27138b0 100644 (file)
@@ -30,7 +30,7 @@ typedef struct receiver_state_s                       receiver_state_t;
 
  \return none, state = INPUT_SYSTEM[ID].state
  */
-extern void input_system_get_state(
+void input_system_get_state(
        const input_system_ID_t         ID,
        input_system_state_t            *state);
 
@@ -41,7 +41,7 @@ extern void input_system_get_state(
 
  \return none, state = RECEIVER[ID].state
  */
-extern void receiver_get_state(
+void receiver_get_state(
        const rx_ID_t                           ID,
        receiver_state_t                        *state);
 
@@ -51,7 +51,7 @@ extern void receiver_get_state(
 
  \return mipi_format == YUV420
  */
-extern bool is_mipi_format_yuv420(
+bool is_mipi_format_yuv420(
        const mipi_format_t                     mipi_format);
 
 /*! Set compression parameters for cfg[cfg_ID] of RECEIVER[ID]
@@ -62,12 +62,12 @@ extern bool is_mipi_format_yuv420(
  \param        pred[in]                        Predictor method
 
  \NOTE: the storage of compression configuration is
-        implementation specific. The config can be
-        carried either on MIPI ports or on MIPI channels
+       implementation specific. The config can be
+       carried either on MIPI ports or on MIPI channels
 
  \return none, RECEIVER[ID].cfg[cfg_ID] = {comp, pred}
  */
-extern void receiver_set_compression(
+void receiver_set_compression(
        const rx_ID_t                           ID,
        const unsigned int                      cfg_ID,
        const mipi_compressor_t         comp,
@@ -81,7 +81,7 @@ extern void receiver_set_compression(
 
  \return None, enable(RECEIVER[ID].PORT[port_ID])
  */
-extern void receiver_port_enable(
+void receiver_port_enable(
        const rx_ID_t                           ID,
        const enum mipi_port_id         port_ID,
        const bool                                      cnd);
@@ -93,7 +93,7 @@ extern void receiver_port_enable(
 
  \return enable(RECEIVER[ID].PORT[port_ID]) == true
  */
-extern bool is_receiver_port_enabled(
+bool is_receiver_port_enabled(
        const rx_ID_t                           ID,
        const enum mipi_port_id         port_ID);
 
@@ -105,7 +105,7 @@ extern bool is_receiver_port_enabled(
 
  \return None, enable(RECEIVER[ID].PORT[port_ID].irq_info)
  */
-extern void receiver_irq_enable(
+void receiver_irq_enable(
        const rx_ID_t                           ID,
        const enum mipi_port_id         port_ID,
        const rx_irq_info_t                     irq_info);
@@ -117,7 +117,7 @@ extern void receiver_irq_enable(
 
  \return RECEIVER[ID].PORT[port_ID].irq_info
  */
-extern rx_irq_info_t receiver_get_irq_info(
+rx_irq_info_t receiver_get_irq_info(
        const rx_ID_t                           ID,
        const enum mipi_port_id         port_ID);
 
@@ -129,7 +129,7 @@ extern rx_irq_info_t receiver_get_irq_info(
 
  \return None, clear(RECEIVER[ID].PORT[port_ID].irq_info)
  */
-extern void receiver_irq_clear(
+void receiver_irq_clear(
        const rx_ID_t                           ID,
        const enum mipi_port_id                 port_ID,
        const rx_irq_info_t                     irq_info);
@@ -242,8 +242,6 @@ STORAGE_CLASS_INPUT_SYSTEM_H hrt_data input_system_sub_system_reg_load(
        const sub_system_ID_t           sub_ID,
        const hrt_address                       reg);
 
-
-
 ///////////////////////////////////////////////////////////////////////////
 //
 //    Functions for configuration phase on input system.
@@ -268,107 +266,102 @@ input_system_error_t input_system_configuration_commit(void);
 //
 ///////////////////////////////////////////////////////////////////////////
 
-
 // FIFO channel config function user
 
 input_system_error_t   input_system_csi_fifo_channel_cfg(
-       uint32_t                                ch_id,
+       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(
-       uint32_t                                ch_id,
-       uint32_t                                nof_frame,
+       u32                             ch_id,
+       u32                             nof_frame,
        input_system_csi_port_t port,
        backend_channel_cfg_t   backend_ch,
-       uint32_t                                mem_region_size,
-       uint32_t                                nof_mem_regions,
+       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(
-       uint32_t                                ch_id,
+       u32                             ch_id,
        input_system_csi_port_t port,
        backend_channel_cfg_t   backend_ch,
-       uint32_t                                csi_mem_region_size,
-       uint32_t                                csi_nof_mem_regions,
-       target_cfg2400_t                        target
+       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(
-       uint32_t                                ch_id,
+       u32                             ch_id,
        input_system_csi_port_t port,
        backend_channel_cfg_t   backend_ch,
-       uint32_t                                mem_region_size,
-       uint32_t                                nof_mem_regions,
-       uint32_t                                acq_mem_region_size,
-       uint32_t                                acq_nof_mem_regions,
-       target_cfg2400_t                        target,
-       uint32_t                                nof_xmem_buffers
+       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(
-       uint32_t                                ch_id,
-       uint32_t                                nof_frames,
+       u32                             ch_id,
+       u32                             nof_frames,
        input_system_csi_port_t port,
-       uint32_t                                csi_mem_region_size,
-       uint32_t                                csi_nof_mem_regions,
-       uint32_t                                acq_mem_region_size,
-       uint32_t                                acq_nof_mem_regions,
-       target_cfg2400_t                        target
+       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(
-       uint32_t                                ch_id,
-       uint32_t                                nof_frames,
+       u32                             ch_id,
+       u32                             nof_frames,
        input_system_csi_port_t port,
        backend_channel_cfg_t   backend_ch,
-       uint32_t                                acq_mem_region_size,
-       uint32_t                                acq_nof_mem_regions,
-       target_cfg2400_t                        target
+       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(
-       uint32_t                ch_id,
-       uint32_t                nof_frames,
-       uint32_t                seed,
-       uint32_t                sync_gen_width,
-       uint32_t                sync_gen_height,
-       uint32_t                sync_gen_hblank_cycles,
-       uint32_t                sync_gen_vblank_cycles,
+       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(
-       uint32_t                ch_id,
-       uint32_t                nof_frames,//not used yet
-       uint32_t                x_mask,
-       uint32_t                y_mask,
-       uint32_t                x_delta,
-       uint32_t                y_delta,
-       uint32_t                xy_mask,
-       uint32_t                sync_gen_width,
-       uint32_t                sync_gen_height,
-       uint32_t                sync_gen_hblank_cycles,
-       uint32_t                sync_gen_vblank_cycles,
+       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(
-       uint32_t                ch_id,
-       uint32_t                nof_frames,
+       u32             ch_id,
+       u32             nof_frames,
        target_cfg2400_t        target
 );
 #endif /* #ifdef USE_INPUT_SYSTEM_VERSION_2401 */
index 9aeaf8f082d26e0762d0fd810b11b76a021953f1..79d16c0550f048bf1e73ddca54393714757068bd 100644 (file)
@@ -25,7 +25,7 @@
 
  \return none, state = IRQ[ID].state
  */
-extern void irq_controller_get_state(
+void irq_controller_get_state(
        const irq_ID_t                          ID,
        irq_controller_state_t          *state);
 
@@ -61,7 +61,7 @@ STORAGE_CLASS_IRQ_H hrt_data irq_reg_load(
 
  \return none, enable(IRQ[ID].channel[irq_ID])
  */
-extern void irq_enable_channel(
+void irq_enable_channel(
        const irq_ID_t                          ID,
        const unsigned int                      irq_ID);
 
@@ -72,9 +72,9 @@ extern void irq_enable_channel(
 
  \return none
  */
-extern void irq_enable_pulse(
+void irq_enable_pulse(
        const irq_ID_t  ID,
-       bool                    pulse);
+       bool                    pulse);
 
 /*! Disable an IRQ channel of IRQ[ID]
 
@@ -83,7 +83,7 @@ extern void irq_enable_pulse(
 
  \return none, disable(IRQ[ID].channel[irq_ID])
  */
-extern void irq_disable_channel(
+void irq_disable_channel(
        const irq_ID_t                          ID,
        const unsigned int                      irq);
 
@@ -93,7 +93,7 @@ extern void irq_disable_channel(
 
  \return none, clear(IRQ[ID].channel[])
  */
-extern void irq_clear_all(
+void irq_clear_all(
        const irq_ID_t                          ID);
 
 /*! Return the ID of a signalling IRQ channel of IRQ[ID]
@@ -107,7 +107,7 @@ extern void irq_clear_all(
 
  \return state(IRQ[ID])
  */
-extern enum hrt_isp_css_irq_status irq_get_channel_id(
+enum hrt_isp_css_irq_status irq_get_channel_id(
        const irq_ID_t                          ID,
        unsigned int                            *irq_id);
 
@@ -118,7 +118,7 @@ extern enum hrt_isp_css_irq_status irq_get_channel_id(
 
  \return none, signal(IRQ[ID].channel[irq_id])
  */
-extern void irq_raise(
+void irq_raise(
        const irq_ID_t                          ID,
        const irq_sw_channel_id_t       irq_id);
 
@@ -126,7 +126,7 @@ extern void irq_raise(
 
  \return any(VIRQ.channel[irq_ID] != 0)
  */
-extern bool any_virq_signal(void);
+bool any_virq_signal(void);
 
 /*! Enable an IRQ channel of the virtual super IRQ
 
@@ -135,7 +135,7 @@ extern bool any_virq_signal(void);
 
  \return none, VIRQ.channel[irq_ID].enable = en
  */
-extern void cnd_virq_enable_channel(
+void cnd_virq_enable_channel(
        const virq_id_t                         irq_ID,
        const bool                                      en);
 
@@ -143,7 +143,7 @@ extern void cnd_virq_enable_channel(
 
  \return none, clear(VIRQ.channel[])
  */
-extern void virq_clear_all(void);
+void virq_clear_all(void);
 
 /*! Clear the IRQ info state of the virtual super IRQ
 
@@ -151,7 +151,7 @@ extern void virq_clear_all(void);
 
  \return none
  */
-extern void virq_clear_info(
+void virq_clear_info(
        virq_info_t                                     *irq_info);
 
 /*! Return the ID of a signalling IRQ channel of the virtual super IRQ
@@ -164,7 +164,7 @@ extern void virq_clear_info(
 
  \return state(IRQ[...])
  */
-extern enum hrt_isp_css_irq_status virq_get_channel_id(
+enum hrt_isp_css_irq_status virq_get_channel_id(
        virq_id_t                                       *irq_id);
 
 /*! Return the IDs of all signaling IRQ channels of the virtual super IRQ
@@ -178,7 +178,7 @@ extern enum hrt_isp_css_irq_status virq_get_channel_id(
 
  \return (error(state(IRQ[...]))
  */
-extern enum hrt_isp_css_irq_status virq_get_channel_signals(
+enum hrt_isp_css_irq_status virq_get_channel_signals(
        virq_info_t                                     *irq_info);
 
 #endif /* __IRQ_PUBLIC_H_INCLUDED__ */
index 808ec050efc0f095e1d27933fd7116f367e3af24..e0bbc6499c73215fe6518716479c7a24f30a82a4 100644 (file)
@@ -25,7 +25,7 @@
 
  \return none, if(cnd) enable(ISP[ID].irq) else disable(ISP[ID].irq)
  */
-extern void cnd_isp_irq_enable(
+void cnd_isp_irq_enable(
        const isp_ID_t          ID,
        const bool                      cnd);
 
@@ -37,12 +37,11 @@ extern void cnd_isp_irq_enable(
 
  \return none, state = ISP[ID].state, stall = ISP[ID].stall
  */
-extern void isp_get_state(
+void isp_get_state(
        const isp_ID_t          ID,
        isp_state_t                     *state,
        isp_stall_t                     *stall);
 
-
 /*! Write to the status and control register of ISP[ID]
 
  \param        ID[in]                          ISP identifier
@@ -172,12 +171,12 @@ 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 uint16_t          x0,
+       const u16               x0,
        const uint16_t          x1);
 
-unsigned isp_is_ready(isp_ID_t ID);
+unsigned int isp_is_ready(isp_ID_t ID);
 
-unsigned isp_is_sleeping(isp_ID_t ID);
+unsigned int isp_is_sleeping(isp_ID_t ID);
 
 void isp_start(isp_ID_t ID);
 
index 4b1603895f06191d20e5fbe4de732e3d9cf2156d..962555a84f034e70ace60f99eb9b2a0b407fbbd3 100644 (file)
@@ -29,7 +29,7 @@ STORAGE_CLASS_ISYS2401_DMA_H hrt_data isys2401_dma_reg_load(
        const isys2401_dma_ID_t dma_id,
        const unsigned int      reg);
 
-extern void isys2401_dma_set_max_burst_size(
+void isys2401_dma_set_max_burst_size(
        const isys2401_dma_ID_t dma_id,
        uint32_t                max_burst_size);
 
index bbff4128603b05515568af90b9e300dcc6e483ee..db3eb31bc865282fdc1ef4f6953b990522666ddf 100644 (file)
@@ -26,7 +26,7 @@
 
  \return none, MMU[ID].page_table_base_index = base_index
  */
-extern void mmu_set_page_table_base_index(
+void mmu_set_page_table_base_index(
        const mmu_ID_t          ID,
        const hrt_data          base_index);
 
@@ -37,7 +37,7 @@ extern void mmu_set_page_table_base_index(
 
  \return MMU[ID].page_table_base_index
  */
-extern hrt_data mmu_get_page_table_base_index(
+hrt_data mmu_get_page_table_base_index(
        const mmu_ID_t          ID);
 
 /*! Invalidate the page table cache of MMU[ID]
@@ -46,15 +46,14 @@ extern hrt_data mmu_get_page_table_base_index(
 
  \return none
  */
-extern void mmu_invalidate_cache(
+void mmu_invalidate_cache(
        const mmu_ID_t          ID);
 
-
 /*! Invalidate the page table cache of all MMUs
 
  \return none
  */
-extern void mmu_invalidate_cache_all(void);
+void mmu_invalidate_cache_all(void);
 
 /*! Write to a control register of MMU[ID]
 
@@ -70,12 +69,11 @@ static inline void mmu_reg_store(
        const hrt_data          value)
 {
        assert(ID < N_MMU_ID);
-       assert(MMU_BASE[ID] != (hrt_address)-1);
-       ia_css_device_store_uint32(MMU_BASE[ID] + reg*sizeof(hrt_data), value);
+       assert(MMU_BASE[ID] != (hrt_address) - 1);
+       ia_css_device_store_uint32(MMU_BASE[ID] + reg * sizeof(hrt_data), value);
        return;
 }
 
-
 /*! Read from a control register of MMU[ID]
 
  \param        ID[in]                          MMU identifier
@@ -89,8 +87,8 @@ static inline hrt_data mmu_reg_load(
        const unsigned int      reg)
 {
        assert(ID < N_MMU_ID);
-       assert(MMU_BASE[ID] != (hrt_address)-1);
-       return ia_css_device_load_uint32(MMU_BASE[ID] + reg*sizeof(hrt_data));
+       assert(MMU_BASE[ID] != (hrt_address) - 1);
+       return ia_css_device_load_uint32(MMU_BASE[ID] + reg * sizeof(hrt_data));
 }
 
 #endif /* __MMU_PUBLIC_H_INCLUDED__ */
index 974ce6a33b4bcc0377e1d53268b6430333466d93..ce3f2404e057d528c08fc38b316761a9c1b0b44f 100644 (file)
@@ -22,25 +22,25 @@ typedef struct sp_state_s           sp_state_t;
 typedef struct sp_stall_s              sp_stall_t;
 
 /*! Enable or disable the program complete irq signal of SP[ID]
+
  \param        ID[in]                          SP identifier
  \param        cnd[in]                         predicate
 
  \return none, if(cnd) enable(SP[ID].irq) else disable(SP[ID].irq)
  */
-extern void cnd_sp_irq_enable(
+void cnd_sp_irq_enable(
        const sp_ID_t           ID,
        const bool                      cnd);
 
 /*! Read the state of cell SP[ID]
+
  \param        ID[in]                          SP identifier
  \param        state[out]                      sp state structure
  \param        stall[out]                      isp stall conditions
 
  \return none, state = SP[ID].state, stall = SP[ID].stall
  */
-extern void sp_get_state(
+void sp_get_state(
        const sp_ID_t           ID,
        sp_state_t                      *state,
        sp_stall_t                      *stall);
index 22ef747f3d4a9a6afb0afedf272a08bbce5388d5..afd5a59489ccfcc11b6a0cb42015bbff30ed8107 100644 (file)
@@ -38,4 +38,3 @@ unsigned int
 sh_css_encode_tag_descr(struct sh_css_tag_descr *tag);
 
 #endif /* __TAG_PUBLIC_H_INCLUDED__ */
-
index b3becac16f4976ea4720d83025d5e9e522e1394a..6472ac5f119772fdd1a1cc8e91e9ba99e19cfd06 100644 (file)
@@ -30,7 +30,7 @@ STORAGE_CLASS_TIMED_CTRL_H void timed_ctrl_reg_store(
        const unsigned int              reg_addr,
        const hrt_data                  value);
 
-extern void timed_ctrl_snd_commnd(
+void timed_ctrl_snd_commnd(
        const timed_ctrl_ID_t                           ID,
        hrt_data                                mask,
        hrt_data                                condition,
@@ -38,7 +38,7 @@ extern void timed_ctrl_snd_commnd(
        hrt_address                             addr,
        hrt_data                                value);
 
-extern void timed_ctrl_snd_sp_commnd(
+void timed_ctrl_snd_sp_commnd(
        const timed_ctrl_ID_t                           ID,
        hrt_data                                mask,
        hrt_data                                condition,
@@ -47,7 +47,7 @@ extern void timed_ctrl_snd_sp_commnd(
        hrt_address                             offset,
        hrt_data                                value);
 
-extern void timed_ctrl_snd_gpio_commnd(
+void timed_ctrl_snd_gpio_commnd(
        const timed_ctrl_ID_t                           ID,
        hrt_data                                mask,
        hrt_data                                condition,
index cee15d0ab2d869c0af41e30431243ca40216632b..577b9b8449e8c7931521be62084fb32ddbd1d8a8 100644 (file)
@@ -15,6 +15,4 @@
 #ifndef __VAMEM_PUBLIC_H_INCLUDED__
 #define __VAMEM_PUBLIC_H_INCLUDED__
 
-
-
 #endif /* __VAMEM_PUBLIC_H_INCLUDED__ */
index c7d9095472b1a82fd00baf006749520f59636501..f9cf7b586045703c0851e5727f8bf9ab297eecc9 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef __IBUF_CTRL_H_INCLUDED__
 #define __IBUF_CTRL_H_INCLUDED__
 
-
 /*
  * This file is included on every cell {SP,ISP,host} and on every system
  * that uses the input system device(s). It defines the API to DLI bridge
@@ -31,7 +30,6 @@
  * - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "ibuf_ctrl_local.h"
 
index eeaaecdd57ba1deaddc4a4f4227561e20d8994f4..377996e0536d5812124365527ffb99a2a400f1a6 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "input_formatter_local.h"
 
 #ifndef __INLINE_INPUT_FORMATTER__
 #define STORAGE_CLASS_INPUT_FORMATTER_H extern
-#define STORAGE_CLASS_INPUT_FORMATTER_C 
+#define STORAGE_CLASS_INPUT_FORMATTER_C
 #include "input_formatter_public.h"
 #else  /* __INLINE_INPUT_FORMATTER__ */
 #define STORAGE_CLASS_INPUT_FORMATTER_H static inline
index 3f02d9ec9588fb9b93112375043ea194f1e29bd3..33ab8a85909e6e16cf7dbdd80cc5a0f6ec401614 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "input_system_local.h"
 
 #ifndef __INLINE_INPUT_SYSTEM__
 #define STORAGE_CLASS_INPUT_SYSTEM_H extern
-#define STORAGE_CLASS_INPUT_SYSTEM_C 
+#define STORAGE_CLASS_INPUT_SYSTEM_C
 #include "input_system_public.h"
 #else  /* __INLINE_INPUT_SYSTEM__ */
 #define STORAGE_CLASS_INPUT_SYSTEM_H static inline
index e1446388dee5ded55c7afc273da62287ad2f267b..133dd9014fef58bdbeb85ff4235e4474abdc1caa 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "irq_local.h"
 
 #ifndef __INLINE_IRQ__
 #define STORAGE_CLASS_IRQ_H extern
-#define STORAGE_CLASS_IRQ_C 
+#define STORAGE_CLASS_IRQ_C
 #include "irq_public.h"
 #else  /* __INLINE_IRQ__ */
 #define STORAGE_CLASS_IRQ_H static inline
index b916953e7f47d9261dfe096546dada2312ce7f97..749610b8a8313b651c8088190ab332034a6b07de 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "isp_local.h"
 
 #ifndef __INLINE_ISP__
 #define STORAGE_CLASS_ISP_H extern
-#define STORAGE_CLASS_ISP_C 
+#define STORAGE_CLASS_ISP_C
 #include "isp_public.h"
 #else  /* __INLINE_iSP__ */
 #define STORAGE_CLASS_ISP_H static inline
index 76aba114a5c1bdad0d3bafabb34312573fcef28f..dbdd17115018bc4bcfde24b707bfd5c81e549636 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef __ISYS_DMA_H_INCLUDED__
 #define __ISYS_DMA_H_INCLUDED__
 
-
 /*
  * This file is included on every cell {SP,ISP,host} and on every system
  * that uses the input system device(s). It defines the API to DLI bridge
@@ -31,7 +30,6 @@
  * - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "isys_dma_local.h"
 
index 16fbf9d25eba7785cdcfadc9ead7457f9f353f9c..e2ebeb14e7c222868f358c44718178cbc34933ec 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef __ISYS_STREAM2MMIO_H_INCLUDED__
 #define __ISYS_STREAM2MMIO_H_INCLUDED__
 
-
 /*
  * This file is included on every cell {SP,ISP,host} and on every system
  * that uses the input system device(s). It defines the API to DLI bridge
@@ -31,7 +30,6 @@
  * - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "isys_stream2mmio_local.h"
 
index 7c52ba54fcf1760e71c8f7b4c05538b1cd7edaba..b633cfaac1da3e4d3c4da341ab01eb8d39f5507c 100644 (file)
 #define CEIL_DIV(a, b)       (((b) != 0) ? ((a) + (b) - 1) / (b) : 0)
 #define CEIL_MUL(a, b)       (CEIL_DIV(a, b) * (b))
 #define CEIL_MUL2(a, b)      (((a) + (b) - 1) & ~((b) - 1))
-#define CEIL_SHIFT(a, b)     (((a) + (1 << (b)) - 1)>>(b))
+#define CEIL_SHIFT(a, b)     (((a) + (1 << (b)) - 1) >> (b))
 #define CEIL_SHIFT_MUL(a, b) (CEIL_SHIFT(a, b) << (b))
 #ifdef ISP2401
 #define ROUND_HALF_DOWN_DIV(a, b)      (((b) != 0) ? ((a) + (b / 2) - 1) / (b) : 0)
 #define ROUND_HALF_DOWN_MUL(a, b)      (ROUND_HALF_DOWN_DIV(a, b) * (b))
 #endif
 
-
 /*To Find next power of 2 number from x */
 #define bit2(x)            ((x)      | ((x) >> 1))
 #define bit4(x)            (bit2(x)  | (bit2(x) >> 2))
 #define bit8(x)            (bit4(x)  | (bit4(x) >> 4))
 #define bit16(x)           (bit8(x)  | (bit8(x) >> 8))
 #define bit32(x)           (bit16(x) | (bit16(x) >> 16))
-#define NEXT_POWER_OF_2(x) (bit32(x-1) + 1)
-
+#define NEXT_POWER_OF_2(x) (bit32(x - 1) + 1)
 
 /* min and max should not be macros as they will evaluate their arguments twice.
    if you really need a macro (e.g. for CPP or for initializing an array)
    use MIN() and MAX(), otherwise use min() and max().
 
-
 */
 
 #if !defined(PIPE_GENERATION)
@@ -133,7 +130,6 @@ static inline unsigned int umin(unsigned int a, unsigned int b)
        return MIN(a, b);
 }
 
-
 static inline unsigned int ceil_mul(unsigned int a, unsigned int b)
 {
        return CEIL_MUL(a, b);
@@ -190,17 +186,17 @@ static inline unsigned int ceil_pow2(unsigned int a)
                return 1;
        }
        /* IF input is already a power of two*/
-       else if ((!((a)&((a)-1)))) {
+       else if ((!((a) & ((a) - 1)))) {
                return a;
-       }
-       else {
+       } else {
                unsigned int v = a;
-               v |= v>>1;
-               v |= v>>2;
-               v |= v>>4;
-               v |= v>>8;
-               v |= v>>16;
-               return (v+1);
+
+               v |= v >> 1;
+               v |= v >> 2;
+               v |= v >> 4;
+               v |= v >> 8;
+               v |= v >> 16;
+               return (v + 1);
        }
 }
 
@@ -211,8 +207,7 @@ static inline unsigned int ceil_pow2(unsigned int a)
  * For SP and ISP, SDK provides the definition of OP_std_modadd.
  * We need it only for host
  */
-#define OP_std_modadd(base, offset, size) ((base+offset)%(size))
+#define OP_std_modadd(base, offset, size) ((base + offset) % (size))
 #endif /* !defined(__ISP) */
 
-
 #endif /* __MATH_SUPPORT_H */
index f06d52533531e6aec4d35d5a6adf5864568153d2..32fd13efe8020e2965ee8087163c90890400ec62 100644 (file)
@@ -97,7 +97,7 @@ extern const hrt_vaddress     mmgr_EXCEPTION;
 
  \return vaddress
  */
-extern hrt_vaddress mmgr_malloc(const size_t size);
+hrt_vaddress mmgr_malloc(const size_t size);
 
 /*! Return the address of a zero initialised allocation in memory
 
@@ -106,7 +106,7 @@ extern hrt_vaddress mmgr_malloc(const size_t size);
 
  \return vaddress
  */
-extern hrt_vaddress mmgr_calloc(const size_t N, const size_t size);
+hrt_vaddress mmgr_calloc(const size_t N, const size_t size);
 
 /*! Return the address of an allocation in memory
 
@@ -117,7 +117,7 @@ extern hrt_vaddress mmgr_calloc(const size_t N, const size_t size);
  \return vaddress
  */
 
-extern hrt_vaddress mmgr_alloc_attr(const size_t size, const uint16_t attribute);
+hrt_vaddress mmgr_alloc_attr(const size_t size, const uint16_t attribute);
 
 /*! Return the address of a mapped existing allocation in memory
 
@@ -136,10 +136,10 @@ extern hrt_vaddress mmgr_alloc_attr(const size_t size, const uint16_t attribute)
 
  \return vaddress
  */
-extern hrt_vaddress mmgr_mmap(
+hrt_vaddress mmgr_mmap(
        const void __user *ptr,
        const size_t size,
-       uint16_t attribute,
+       u16 attribute,
        void *context);
 
 /*! Zero initialise an allocation in memory
@@ -149,7 +149,7 @@ extern hrt_vaddress mmgr_mmap(
 
  \return none
  */
-extern void mmgr_clear(hrt_vaddress vaddr, const size_t        size);
+void mmgr_clear(hrt_vaddress vaddr, const size_t       size);
 
 /*! Read an array of bytes from a virtual memory address
 
@@ -159,7 +159,7 @@ extern void mmgr_clear(hrt_vaddress vaddr, const size_t     size);
 
  \return none
  */
-extern void mmgr_load(const hrt_vaddress vaddr, void *data, const size_t size);
+void mmgr_load(const hrt_vaddress vaddr, void *data, const size_t size);
 
 /*! Write an array of bytes to device registers or memory in the device
 
@@ -169,6 +169,6 @@ extern void mmgr_load(const hrt_vaddress vaddr, void *data, const size_t size);
 
  \return none
  */
-extern void mmgr_store(const hrt_vaddress vaddr, const void *data, const size_t size);
+void mmgr_store(const hrt_vaddress vaddr, const void *data, const size_t size);
 
 #endif /* __MEMORY_ACCESS_H_INCLUDED__ */
index f3b7273fed1b06b648ba95f24c27ecb9ef2e80c9..53937aa69dd24d4d963ce876bdb31f74228d8d9a 100644 (file)
@@ -29,7 +29,7 @@ more details.
 #include "ia_css_err.h"
 
 bool reallocate_buffer(
-       hrt_vaddress *curr_buf,
+       hrt_vaddress * curr_buf,
        size_t *curr_size,
        size_t needed_size,
        bool force,
index 8f6f1dc40095df525754102e4b3c3a4e9b7ba534..1a36cb493fd8e5d73337132e42b7fd83ddf3bd25 100644 (file)
@@ -31,7 +31,6 @@
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "mmu_local.h"
 
index 418d02382d7683967b7825733118cf91dfdb5486..74335fdeff7d50fd54db74f4a7b82427e449cbbb 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef __PIXELGEN_H_INCLUDED__
 #define __PIXELGEN_H_INCLUDED__
 
-
 /*
  * This file is included on every cell {SP,ISP,host} and on every system
  * that uses the input system device(s). It defines the API to DLI bridge
@@ -31,7 +30,6 @@
  * - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "pixelgen_local.h"
 
index 37e8116b74a4d7438fb79fac0650c34e3b6ae640..f5fcf6b1d667dc3426c5679a59387b26ea9704d4 100644 (file)
 #ifndef __PRINT_SUPPORT_H_INCLUDED__
 #define __PRINT_SUPPORT_H_INCLUDED__
 
-
 #include <stdarg.h>
 
-extern int (*sh_css_printf) (const char *fmt, va_list args);
+extern int (*sh_css_printf)(const char *fmt, va_list args);
 /* depends on host supplied print function in ia_css_init() */
 static inline void ia_css_print(const char *fmt, ...)
 {
        va_list ap;
+
        if (sh_css_printf) {
                va_start(ap, fmt);
                sh_css_printf(fmt, ap);
index aa5fadf5aadb1947f62e4a51987b8d9eb14fa575..1bcadd838161b1d2f3e792ab60ffa6ed48a7d243 100644 (file)
  *
  */
 
-
 #include "queue_local.h"
 
 #ifndef __INLINE_QUEUE__
 #define STORAGE_CLASS_QUEUE_H extern
-#define STORAGE_CLASS_QUEUE_C 
+#define STORAGE_CLASS_QUEUE_C
 /* #include "queue_public.h" */
 #include "ia_css_queue.h"
 #else  /* __INLINE_QUEUE__ */
index bd9f53e6b6800734f0d1ea59e6d0a571e814cdce..129446600067b333cb231accb731cb22939a280f 100644 (file)
  *
  */
 
-
 #include "system_local.h"
 #include "resource_local.h"
 
 #ifndef __INLINE_RESOURCE__
 #define STORAGE_CLASS_RESOURCE_H extern
-#define STORAGE_CLASS_RESOURCE_C 
+#define STORAGE_CLASS_RESOURCE_C
 #include "resource_public.h"
 #else  /* __INLINE_RESOURCE__ */
 #define STORAGE_CLASS_RESOURCE_H static inline
index 8f57f2060791fff0c7a39652abc753d76cbe6f43..194cd64a7da8e044f5c467d145578858b63993e9 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "sp_local.h"
 
 #ifndef __INLINE_SP__
 #define STORAGE_CLASS_SP_H extern
-#define STORAGE_CLASS_SP_C 
+#define STORAGE_CLASS_SP_C
 #include "sp_public.h"
 #else  /* __INLINE_SP__ */
 #define STORAGE_CLASS_SP_H static inline
index f4d9674cdab64f47b8749260b97e27a6e495037c..5fbabf4d372203aff398bfcd678d793e28a5e0b0 100644 (file)
@@ -22,7 +22,6 @@
  * For all non microsoft cases, we need the following functions
  */
 
-
 /* @brief Copy from src_buf to dest_buf.
  *
  * @param[out] dest_buf. Destination buffer to copy to
  * @return     ERANGE on Destination size too small
  */
 static inline int memcpy_s(
-       voiddest_buf,
+       void *dest_buf,
        size_t dest_size,
-       const voidsrc_buf,
+       const void *src_buf,
        size_t src_size)
 {
-       if ((src_buf == NULL) || (dest_buf == NULL)) {
+       if ((!src_buf) || (!dest_buf)) {
                /* Invalid arguments*/
                return EINVAL;
        }
@@ -62,11 +61,12 @@ static inline int memcpy_s(
  * @return     Returns 0 if src_str is NULL
  */
 static size_t strnlen_s(
-       const charsrc_str,
+       const char *src_str,
        size_t max_len)
 {
        size_t ix;
-       if (src_str == NULL) {
+
+       if (!src_str) {
                /* Invalid arguments*/
                return 0;
        }
@@ -89,18 +89,19 @@ static size_t strnlen_s(
  * @return     Returns ERANGE on destination size too small
  */
 static inline int strncpy_s(
-       chardest_str,
+       char *dest_str,
        size_t dest_size,
-       const charsrc_str,
+       const char *src_str,
        size_t src_size)
 {
        size_t len;
-       if (dest_str == NULL) {
+
+       if (!dest_str) {
                /* Invalid arguments*/
                return EINVAL;
        }
 
-       if ((src_str == NULL) || (dest_size == 0)) {
+       if ((!src_str) || (dest_size == 0)) {
                /* Invalid arguments*/
                dest_str[0] = '\0';
                return EINVAL;
@@ -130,17 +131,18 @@ static inline int strncpy_s(
  * @return     Returns ERANGE on destination size too small
  */
 static inline int strcpy_s(
-       chardest_str,
+       char *dest_str,
        size_t dest_size,
-       const charsrc_str)
+       const char *src_str)
 {
        size_t len;
-       if (dest_str == NULL) {
+
+       if (!dest_str) {
                /* Invalid arguments*/
                return EINVAL;
        }
 
-       if ((src_str == NULL) || (dest_size == 0)) {
+       if ((!src_str) || (dest_size == 0)) {
                /* Invalid arguments*/
                dest_str[0] = '\0';
                return EINVAL;
index a8c19cee17da2011ff6d8be153ded605f081a5d0..764fda8dd214af7e8fd48eb74de0832630592d79 100644 (file)
@@ -19,7 +19,6 @@
 * Platform specific types.
 */
 
-
 #include "system_local.h"
 
 #endif /* __SYSTEM_TYPES_H_INCLUDED__ */
index ace69564336981ece319ff3224f5646f9b0337ed..1f0a5d948316990a27c839d7958a9cb804ef3d70 100644 (file)
  *
  */
 
-
 #include "tag_local.h"
 
 #ifndef __INLINE_TAG__
 #define STORAGE_CLASS_TAG_H extern
-#define STORAGE_CLASS_TAG_C 
+#define STORAGE_CLASS_TAG_C
 #include "tag_public.h"
 #else  /* __INLINE_TAG__ */
 #define STORAGE_CLASS_TAG_H static inline
index f6bc1c47553f4ed02b072664d9dd766e90f6eeb3..403abcb828bf431e1aa9f292bd12d1403f46ad0c 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "timed_ctrl_local.h"
 
 #ifndef __INLINE_TIMED_CTRL__
 #define STORAGE_CLASS_TIMED_CTRL_H extern
-#define STORAGE_CLASS_TIMED_CTRL_C 
+#define STORAGE_CLASS_TIMED_CTRL_C
 #include "timed_ctrl_public.h"
 #else  /* __INLINE_TIMED_CTRL__ */
 #define STORAGE_CLASS_TIMED_CTRL_H static inline
index 82d447bf9704eba9ce84dc3b709fc31b4ac238a7..032f371a72c4078e7a698108cca519b40a09e9a7 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "vamem_local.h"
 
 #ifndef __INLINE_VAMEM__
 #define STORAGE_CLASS_VAMEM_H extern
-#define STORAGE_CLASS_VAMEM_C 
+#define STORAGE_CLASS_VAMEM_C
 #include "vamem_public.h"
 #else  /* __INLINE_VAMEM__ */
 #define STORAGE_CLASS_VAMEM_H static inline
index d3375729c4415f3d576e6f3ccbfff161d12edcc9..873e01e6d054494819e767251020c10d54a205df 100644 (file)
  *     - local:   system and cell specific constants and identifiers
  */
 
-
 #include "system_local.h"
 #include "vmem_local.h"
 
 #ifndef __INLINE_VMEM__
 #define STORAGE_CLASS_VMEM_H extern
-#define STORAGE_CLASS_VMEM_C 
+#define STORAGE_CLASS_VMEM_C
 #include "vmem_public.h"
 #else  /* __INLINE_VMEM__ */
 #define STORAGE_CLASS_VMEM_H static inline
index 2cf1d58941bfc5f806c1f0920c9587a5f4f1ec59..0fe1ce1d122e1e822e95f8cd132edc85482bb58d 100644 (file)
@@ -31,7 +31,7 @@ sh_css_create_tag_descr(int num_captures,
                        unsigned int exp_id,
                        struct sh_css_tag_descr *tag_descr)
 {
-       assert(tag_descr != NULL);
+       assert(tag_descr);
 
        tag_descr->num_captures = num_captures;
        tag_descr->skip         = skip;
@@ -55,7 +55,7 @@ sh_css_encode_tag_descr(struct sh_css_tag_descr *tag)
        unsigned int exp_id;
        unsigned int encoded_tag;
 
-       assert(tag != NULL);
+       assert(tag);
 
        if (tag->num_captures < 0) {
                num_captures = -tag->num_captures;
@@ -80,16 +80,14 @@ sh_css_encode_tag_descr(struct sh_css_tag_descr *tag)
                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 
+               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);
-
        }
        return encoded_tag;
 }
index fda457792c9ca1da70648804af0ca28ff1e7c482..9db8766b3a7be6877e5323316e6544bccaf3bc81 100644 (file)
 #define TAG_EXP        2
 
 #define TAG_NUM_CAPTURES_SIGN_SHIFT     6
-#define TAG_OFFSET_SIGN_SHIFT           7
-#define TAG_NUM_CAPTURES_SHIFT                  8
-#define TAG_OFFSET_SHIFT               16
-#define TAG_SKIP_SHIFT                         24
+#define TAG_OFFSET_SIGN_SHIFT           7
+#define TAG_NUM_CAPTURES_SHIFT          8
+#define TAG_OFFSET_SHIFT               16
+#define TAG_SKIP_SHIFT                 24
 
-#define TAG_EXP_ID_SHIFT                8
+#define TAG_EXP_ID_SHIFT                8
 
 /* Data structure containing the tagging information which is used in
  * continuous mode to specify which frames should be captured.
index 080198796ad0d4848456e74fd8dc736915cea957..919574a2039172e9e44ef213a69f182f9f55247f 100644 (file)
@@ -48,15 +48,16 @@ struct ia_css_isp_3a_statistics {
        struct {
                ia_css_ptr rgby_tbl;
        } data_hmem;
-       uint32_t exp_id;     /** exposure id, to match statistics to a frame,
-                                 see ia_css_event_public.h for more detail. */
-       uint32_t isp_config_id;/** Unique ID to track which config was actually applied to a particular frame */
+       u32 exp_id;     /** exposure id, to match statistics to a frame,
+                                 see ia_css_event_public.h for more detail. */
+       u32 isp_config_id;/** Unique ID to track which config was actually applied to a particular frame */
        ia_css_ptr data_ptr; /** pointer to base of all data */
-       uint32_t   size;     /** total size of all data */
-       uint32_t   dmem_size;
-       uint32_t   vmem_size; /** both lo and hi have this size */
-       uint32_t   hmem_size;
+       u32   size;     /** total size of all data */
+       u32   dmem_size;
+       u32   vmem_size; /** both lo and hi have this size */
+       u32   hmem_size;
 };
+
 #define SIZE_OF_DMEM_STRUCT                                            \
        (SIZE_OF_IA_CSS_PTR)
 
@@ -87,11 +88,11 @@ struct ia_css_isp_3a_statistics {
 struct ia_css_isp_3a_statistics_map {
        void                    *data_ptr; /** Pointer to start of memory */
        struct ia_css_3a_output *dmem_stats;
-       uint16_t                *vmem_stats_hi;
-       uint16_t                *vmem_stats_lo;
+       u16                *vmem_stats_hi;
+       u16                *vmem_stats_lo;
        struct ia_css_bh_table  *hmem_stats;
-       uint32_t                 size; /** total size in bytes of data_ptr */
-       uint32_t                 data_allocated; /** indicate whether data_ptr
+       u32                 size; /** total size in bytes of data_ptr */
+       u32                 data_allocated; /** indicate whether data_ptr
                                                    was allocated or not. */
 };
 
index 138bc3bb4627e5056f1fc1e828142f3ab1f430f3..3aac8d8f6023191f485bfaaa8f51beed39541003 100644 (file)
@@ -77,120 +77,120 @@ struct ia_css_blob_descr;
  */
 struct ia_css_blob_info {
        /** Static blob data */
-       uint32_t offset;                /** Blob offset in fw file */
+       u32 offset;             /** Blob offset in fw file */
        struct ia_css_isp_param_memory_offsets memory_offsets;  /** offset wrt hdr in bytes */
-       uint32_t prog_name_offset;  /** offset wrt hdr in bytes */
-       uint32_t size;                  /** Size of blob */
-       uint32_t padding_size;  /** total cummulative of bytes added due to section alignment */
-       uint32_t icache_source; /** Position of icache in blob */
-       uint32_t icache_size;   /** Size of icache section */
-       uint32_t icache_padding;/** bytes added due to icache section alignment */
-       uint32_t text_source;   /** Position of text in blob */
-       uint32_t text_size;             /** Size of text section */
-       uint32_t text_padding;  /** bytes added due to text section alignment */
-       uint32_t data_source;   /** Position of data in blob */
-       uint32_t data_target;   /** Start of data in SP dmem */
-       uint32_t data_size;             /** Size of text section */
-       uint32_t data_padding;  /** bytes added due to data section alignment */
-       uint32_t bss_target;    /** Start position of bss in SP dmem */
-       uint32_t bss_size;              /** Size of bss section */
+       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 */
+       u32 icache_source;      /** Position of icache in blob */
+       u32 icache_size;        /** Size of icache section */
+       u32 icache_padding;/** bytes added due to icache section alignment */
+       u32 text_source;        /** Position of text in blob */
+       u32 text_size;          /** Size of text section */
+       u32 text_padding;       /** bytes added due to text section alignment */
+       u32 data_source;        /** Position of data in blob */
+       u32 data_target;        /** Start of data in SP dmem */
+       u32 data_size;          /** Size of text section */
+       u32 data_padding;       /** bytes added due to data section alignment */
+       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 */
 };
 
 struct ia_css_binary_input_info {
-       uint32_t                min_width;
-       uint32_t                min_height;
-       uint32_t                max_width;
-       uint32_t                max_height;
-       uint32_t                source; /* memory, sensor, variable */
+       u32             min_width;
+       u32             min_height;
+       u32             max_width;
+       u32             max_height;
+       u32             source; /* memory, sensor, variable */
 };
 
 struct ia_css_binary_output_info {
-       uint32_t                min_width;
-       uint32_t                min_height;
-       uint32_t                max_width;
-       uint32_t                max_height;
-       uint32_t                num_chunks;
-       uint32_t                variable_format;
+       u32             min_width;
+       u32             min_height;
+       u32             max_width;
+       u32             max_height;
+       u32             num_chunks;
+       u32             variable_format;
 };
 
 struct ia_css_binary_internal_info {
-       uint32_t                max_width;
-       uint32_t                max_height;
+       u32             max_width;
+       u32             max_height;
 };
 
 struct ia_css_binary_bds_info {
-       uint32_t                supported_bds_factors;
+       u32             supported_bds_factors;
 };
 
 struct ia_css_binary_dvs_info {
-       uint32_t                max_envelope_width;
-       uint32_t                max_envelope_height;
+       u32             max_envelope_width;
+       u32             max_envelope_height;
 };
 
 struct ia_css_binary_vf_dec_info {
-       uint32_t                is_variable;
-       uint32_t                max_log_downscale;
+       u32             is_variable;
+       u32             max_log_downscale;
 };
 
 struct ia_css_binary_s3a_info {
-       uint32_t                s3atbl_use_dmem;
-       uint32_t                fixed_s3a_deci_log;
+       u32             s3atbl_use_dmem;
+       u32             fixed_s3a_deci_log;
 };
 
 /* DPC related binary info */
 struct ia_css_binary_dpc_info {
-       uint32_t                bnr_lite; /** bnr lite enable flag */
+       u32             bnr_lite; /** bnr lite enable flag */
 };
 
 struct ia_css_binary_iterator_info {
-       uint32_t                num_stripes;
-       uint32_t                row_stripes_height;
-       uint32_t                row_stripes_overlap_lines;
+       u32             num_stripes;
+       u32             row_stripes_height;
+       u32             row_stripes_overlap_lines;
 };
 
 struct ia_css_binary_address_info {
-       uint32_t                isp_addresses;  /* Address in ISP dmem */
-       uint32_t                main_entry;     /* Address of entry fct */
-       uint32_t                in_frame;       /* Address in ISP dmem */
-       uint32_t                out_frame;      /* Address in ISP dmem */
-       uint32_t                in_data;        /* Address in ISP dmem */
-       uint32_t                out_data;       /* Address in ISP dmem */
-       uint32_t                sh_dma_cmd_ptr;     /* In ISP dmem */
+       u32             isp_addresses;  /* Address in ISP dmem */
+       u32             main_entry;     /* Address of entry fct */
+       u32             in_frame;       /* Address in ISP dmem */
+       u32             out_frame;      /* Address in ISP dmem */
+       u32             in_data;        /* Address in ISP dmem */
+       u32             out_data;       /* Address in ISP dmem */
+       u32             sh_dma_cmd_ptr;     /* In ISP dmem */
 };
 
 struct ia_css_binary_uds_info {
-       uint16_t        bpp;
-       uint16_t        use_bci;
-       uint16_t        use_str;
-       uint16_t        woix;
-       uint16_t        woiy;
-       uint16_t        extra_out_vecs;
-       uint16_t        vectors_per_line_in;
-       uint16_t        vectors_per_line_out;
-       uint16_t        vectors_c_per_line_in;
-       uint16_t        vectors_c_per_line_out;
-       uint16_t        vmem_gdc_in_block_height_y;
-       uint16_t        vmem_gdc_in_block_height_c;
+       u16     bpp;
+       u16     use_bci;
+       u16     use_str;
+       u16     woix;
+       u16     woiy;
+       u16     extra_out_vecs;
+       u16     vectors_per_line_in;
+       u16     vectors_per_line_out;
+       u16     vectors_c_per_line_in;
+       u16     vectors_c_per_line_out;
+       u16     vmem_gdc_in_block_height_y;
+       u16     vmem_gdc_in_block_height_c;
        /* uint16_t padding; */
 };
 
 struct ia_css_binary_pipeline_info {
-       uint32_t        mode;
-       uint32_t        isp_pipe_version;
-       uint32_t        pipelining;
-       uint32_t        c_subsampling;
-       uint32_t        top_cropping;
-       uint32_t        left_cropping;
-       uint32_t        variable_resolution;
+       u32     mode;
+       u32     isp_pipe_version;
+       u32     pipelining;
+       u32     c_subsampling;
+       u32     top_cropping;
+       u32     left_cropping;
+       u32     variable_resolution;
 };
 
 struct ia_css_binary_block_info {
-       uint32_t        block_width;
-       uint32_t        block_height;
-       uint32_t        output_block_height;
+       u32     block_width;
+       u32     block_height;
+       u32     output_block_height;
 };
 
 /* Structure describing an ISP binary.
@@ -201,7 +201,7 @@ struct ia_css_binary_block_info {
  * thereby making the SP code more binary independent.
  */
 struct ia_css_binary_info {
-       CSS_ALIGN(uint32_t                      id, 8); /* IA_CSS_BINARY_ID_* */
+       CSS_ALIGN(u32                   id, 8); /* IA_CSS_BINARY_ID_* */
        struct ia_css_binary_pipeline_info      pipeline;
        struct ia_css_binary_input_info         input;
        struct ia_css_binary_output_info        output;
@@ -219,53 +219,53 @@ struct ia_css_binary_info {
 /* MW: Packing (related) bools in an integer ?? */
        struct {
 #ifdef ISP2401
-               uint8_t luma_only;
-               uint8_t input_yuv;
-               uint8_t input_raw;
+               u8      luma_only;
+               u8      input_yuv;
+               u8      input_raw;
 #endif
-               uint8_t reduced_pipe;
-               uint8_t vf_veceven;
-               uint8_t dis;
-               uint8_t dvs_envelope;
-               uint8_t uds;
-               uint8_t dvs_6axis;
-               uint8_t block_output;
-               uint8_t streaming_dma;
-               uint8_t ds;
-               uint8_t bayer_fir_6db;
-               uint8_t raw_binning;
-               uint8_t continuous;
-               uint8_t s3a;
-               uint8_t fpnr;
-               uint8_t sc;
-               uint8_t macc;
-               uint8_t output;
-               uint8_t ref_frame;
-               uint8_t tnr;
-               uint8_t xnr;
-               uint8_t params;
-               uint8_t ca_gdc;
-               uint8_t isp_addresses;
-               uint8_t in_frame;
-               uint8_t out_frame;
-               uint8_t high_speed;
-               uint8_t dpc;
-               uint8_t padding[2];
+               u8      reduced_pipe;
+               u8      vf_veceven;
+               u8      dis;
+               u8      dvs_envelope;
+               u8      uds;
+               u8      dvs_6axis;
+               u8      block_output;
+               u8      streaming_dma;
+               u8      ds;
+               u8      bayer_fir_6db;
+               u8      raw_binning;
+               u8      continuous;
+               u8      s3a;
+               u8      fpnr;
+               u8      sc;
+               u8      macc;
+               u8      output;
+               u8      ref_frame;
+               u8      tnr;
+               u8      xnr;
+               u8      params;
+               u8      ca_gdc;
+               u8      isp_addresses;
+               u8      in_frame;
+               u8      out_frame;
+               u8      high_speed;
+               u8      dpc;
+               u8 padding[2];
        } enable;
        struct {
 /* DMA channel ID: [0,...,HIVE_ISP_NUM_DMA_CHANNELS> */
-               uint8_t ref_y_channel;
-               uint8_t ref_c_channel;
-               uint8_t tnr_channel;
-               uint8_t tnr_out_channel;
-               uint8_t dvs_coords_channel;
-               uint8_t output_channel;
-               uint8_t c_channel;
-               uint8_t vfout_channel;
-               uint8_t vfout_c_channel;
-               uint8_t vfdec_bits_per_pixel;
-               uint8_t claimed_by_isp;
-               uint8_t padding[2];
+               u8      ref_y_channel;
+               u8      ref_c_channel;
+               u8      tnr_channel;
+               u8      tnr_out_channel;
+               u8      dvs_coords_channel;
+               u8      output_channel;
+               u8      c_channel;
+               u8      vfout_channel;
+               u8      vfout_c_channel;
+               u8      vfdec_bits_per_pixel;
+               u8      claimed_by_isp;
+               u8 padding[2];
        } dma;
 };
 
@@ -279,14 +279,17 @@ struct ia_css_binary_xinfo {
 
        /* Rest of the binary info, only interesting to the host. */
        enum ia_css_acc_type         type;
-       CSS_ALIGN(int32_t            num_output_formats, 8);
+
+       CSS_ALIGN(s32        num_output_formats, 8);
        enum ia_css_frame_format     output_formats[IA_CSS_FRAME_FORMAT_NUM];
-       CSS_ALIGN(int32_t            num_vf_formats, 8); /** number of supported vf formats */
+
+       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 */
-       uint8_t                      num_output_pins;
+       u8                           num_output_pins;
        ia_css_ptr                   xmem_addr;
+
        CSS_ALIGN(const struct ia_css_blob_descr *blob, 8);
-       CSS_ALIGN(uint32_t blob_index, 8);
+       CSS_ALIGN(u32 blob_index, 8);
        CSS_ALIGN(union ia_css_all_memory_offsets mem_offsets, 8);
        CSS_ALIGN(struct ia_css_binary_xinfo *next, 8);
 };
@@ -296,11 +299,11 @@ struct ia_css_binary_xinfo {
  * the entry function in icache.
  */
 struct ia_css_bl_info {
-       uint32_t num_dma_cmds;  /** Number of cmds sent by CSS */
-       uint32_t dma_cmd_list;  /** Dma command list sent by CSS */
-       uint32_t sw_state;      /** Polled from css */
+       u32 num_dma_cmds;       /** Number of cmds sent by CSS */
+       u32 dma_cmd_list;       /** Dma command list sent by CSS */
+       u32 sw_state;   /** Polled from css */
        /* Entry functions */
-       uint32_t bl_entry;      /** The SP entry function */
+       u32 bl_entry;   /** The SP entry function */
 };
 
 /* Structure describing the SP binary.
@@ -308,38 +311,38 @@ struct ia_css_bl_info {
  * the entry function in pmem.
  */
 struct ia_css_sp_info {
-       uint32_t init_dmem_data; /** data sect config, stored to dmem */
-       uint32_t per_frame_data; /** Per frame data, stored to dmem */
-       uint32_t group;         /** Per pipeline data, loaded by dma */
-       uint32_t output;                /** SP output data, loaded by dmem */
-       uint32_t host_sp_queue; /** Host <-> SP queues */
-       uint32_t host_sp_com;/** Host <-> SP commands */
-       uint32_t isp_started;   /** Polled from sensor thread, csim only */
-       uint32_t sw_state;      /** Polled from css */
-       uint32_t host_sp_queues_initialized; /** Polled from the SP */
-       uint32_t sleep_mode;  /** different mode to halt SP */
-       uint32_t invalidate_tlb;                /** inform SP to invalidate mmu TLB */
+       u32 init_dmem_data; /** data sect config, stored to dmem */
+       u32 per_frame_data; /** Per frame data, stored to dmem */
+       u32 group;              /** Per pipeline data, loaded by dma */
+       u32 output;             /** SP output data, loaded by dmem */
+       u32 host_sp_queue;      /** Host <-> SP queues */
+       u32 host_sp_com;/** Host <-> SP commands */
+       u32 isp_started;        /** Polled from sensor thread, csim only */
+       u32 sw_state;   /** Polled from css */
+       u32 host_sp_queues_initialized; /** Polled from the SP */
+       u32 sleep_mode;  /** different mode to halt SP */
+       u32 invalidate_tlb;             /** inform SP to invalidate mmu TLB */
 #ifndef ISP2401
-       uint32_t stop_copy_preview;       /** suspend copy and preview pipe when capture */
+       u32 stop_copy_preview;       /** suspend copy and preview pipe when capture */
 #endif
-       uint32_t debug_buffer_ddr_address;      /** inform SP the address
+       u32 debug_buffer_ddr_address;   /** inform SP the address
        of DDR debug queue */
-       uint32_t perf_counter_input_system_error; /** input system perf
+       u32 perf_counter_input_system_error; /** input system perf
        counter array */
 #ifdef HAS_WATCHDOG_SP_THREAD_DEBUG
-       uint32_t debug_wait; /** thread/pipe post mortem debug */
-       uint32_t debug_stage; /** thread/pipe post mortem debug */
-       uint32_t debug_stripe; /** thread/pipe post mortem debug */
+       u32 debug_wait; /** thread/pipe post mortem debug */
+       u32 debug_stage; /** thread/pipe post mortem debug */
+       u32 debug_stripe; /** thread/pipe post mortem debug */
 #endif
-       uint32_t threads_stack; /** sp thread's stack pointers */
-       uint32_t threads_stack_size; /** sp thread's stack sizes */
-       uint32_t curr_binary_id;        /** current binary id */
-       uint32_t raw_copy_line_count;   /** raw copy line counter */
-       uint32_t ddr_parameter_address; /** acc param ddrptr, sp dmem */
-       uint32_t ddr_parameter_size;    /** acc param size, sp dmem */
+       u32 threads_stack; /** sp thread's stack pointers */
+       u32 threads_stack_size; /** sp thread's stack sizes */
+       u32 curr_binary_id;        /** current binary id */
+       u32 raw_copy_line_count;   /** raw copy line counter */
+       u32 ddr_parameter_address; /** acc param ddrptr, sp dmem */
+       u32 ddr_parameter_size;    /** acc param size, sp dmem */
        /* Entry functions */
-       uint32_t sp_entry;      /** The SP entry function */
-       uint32_t tagger_frames_addr;   /** Base address of tagger state */
+       u32 sp_entry;   /** The SP entry function */
+       u32 tagger_frames_addr;   /** Base address of tagger state */
 };
 
 /* The following #if is there because this header file is also included
@@ -351,7 +354,7 @@ struct ia_css_sp_info {
 /* Accelerator firmware information.
  */
 struct ia_css_acc_info {
-       uint32_t per_frame_data; /** Dummy for now */
+       u32 per_frame_data; /** Dummy for now */
 };
 
 /* Firmware information.
@@ -367,15 +370,17 @@ union ia_css_fw_union {
  */
 struct ia_css_fw_info {
        size_t                   header_size; /** size of fw header */
-       CSS_ALIGN(uint32_t type, 8);
+
+       CSS_ALIGN(u32 type, 8);
        union ia_css_fw_union    info; /** Binary info */
        struct ia_css_blob_info  blob; /** Blob info */
        /* Dynamic part */
        struct ia_css_fw_info   *next;
-       CSS_ALIGN(uint32_t       loaded, 8);    /** Firmware has been loaded */
-       CSS_ALIGN(const uint8_t *isp_code, 8);  /** ISP pointer to code */
+
+       CSS_ALIGN(u32       loaded, 8); /** Firmware has been loaded */
+       CSS_ALIGN(const u8 *isp_code, 8);  /** ISP pointer to code */
        /** Firmware handle between user space and kernel */
-       CSS_ALIGN(uint32_t      handle, 8);
+       CSS_ALIGN(u32   handle, 8);
        /** Sections to copy from/to ISP */
        struct ia_css_isp_param_css_segments mem_initializers;
        /** Initializer for local ISP memories */
@@ -394,14 +399,14 @@ struct ia_css_acc_fw;
  */
 struct ia_css_acc_sp {
        void (*init)(struct ia_css_acc_fw *);   /** init for crun */
-       uint32_t sp_prog_name_offset;           /** program name offset wrt hdr in bytes */
-       uint32_t sp_blob_offset;                /** blob offset wrt hdr in bytes */
+       u32 sp_prog_name_offset;                /** program name offset wrt hdr in bytes */
+       u32 sp_blob_offset;             /** blob offset wrt hdr in bytes */
        void     *entry;                        /** Address of sp entry point */
-       uint32_t *css_abort;                    /** SP dmem abort flag */
+       u32 *css_abort;                 /** SP dmem abort flag */
        void     *isp_code;                     /** SP dmem address holding xmem
                                                     address of isp code */
        struct ia_css_fw_info fw;               /** SP fw descriptor */
-       const uint8_t *code;                    /** ISP pointer of allocated SP code */
+       const u8 *code;                 /** ISP pointer of allocated SP code */
 };
 
 /* Acceleration firmware descriptor.
@@ -410,15 +415,15 @@ struct ia_css_acc_sp {
   */
 struct ia_css_acc_fw_hdr {
        enum ia_css_acc_type type;      /** Type of accelerator */
-       uint32_t        isp_prog_name_offset; /** program name offset wrt
+       u32     isp_prog_name_offset; /** program name offset wrt
                                                   header in bytes */
-       uint32_t        isp_blob_offset;      /** blob offset wrt header
+       u32     isp_blob_offset;      /** blob offset wrt header
                                                   in bytes */
-       uint32_t        isp_size;             /** Size of isp blob */
-       const uint8_t  *isp_code;             /** ISP pointer to code */
+       u32     isp_size;             /** Size of isp blob */
+       const u8  *isp_code;          /** ISP pointer to code */
        struct ia_css_acc_sp  sp;  /** Standalone sp code */
        /** Firmware handle between user space and kernel */
-       uint32_t        handle;
+       u32     handle;
        struct ia_css_data parameters; /** Current SP parameters */
 };
 
@@ -440,7 +445,7 @@ struct ia_css_acc_fw {
 };
 
 /* Access macros for firmware */
-#define IA_CSS_ACC_OFFSET(t, f, n) ((t)((uint8_t *)(f)+(f->header.n)))
+#define IA_CSS_ACC_OFFSET(t, f, n) ((t)((uint8_t *)(f) + (f->header.n)))
 #define IA_CSS_ACC_SP_PROG_NAME(f) IA_CSS_ACC_OFFSET(const char *, f, \
                                                 sp.sp_prog_name_offset)
 #define IA_CSS_ACC_ISP_PROG_NAME(f) IA_CSS_ACC_OFFSET(const char *, f, \
@@ -454,9 +459,9 @@ struct ia_css_acc_fw {
 #define IA_CSS_ACC_ISP_SIZE(f)     ((f)->header.isp_size)
 
 /* Binary name follows header immediately */
-#define IA_CSS_EXT_ISP_PROG_NAME(f)   ((const char *)(f)+(f)->blob.prog_name_offset)
+#define IA_CSS_EXT_ISP_PROG_NAME(f)   ((const char *)(f) + (f)->blob.prog_name_offset)
 #define IA_CSS_EXT_ISP_MEM_OFFSETS(f) \
-       ((const struct ia_css_memory_offsets *)((const char *)(f)+(f)->blob.mem_offsets))
+       ((const struct ia_css_memory_offsets *)((const char *)(f) + (f)->blob.mem_offsets))
 
 #endif /* !defined(__ISP) */
 
index a0058eac7d5a12e67ce2c0d7a908acbfebd4a539..3bb641d8bb57a6461452c3f27fbda1255cf33d79 100644 (file)
@@ -64,7 +64,7 @@ struct ia_css_buffer {
                struct ia_css_acc_param          *custom_data; /** Custom buffer. */
                struct ia_css_metadata           *metadata;    /** Sensor metadata. */
        } data; /** Buffer data pointer. */
-       uint64_t driver_cookie; /** cookie for the driver */
+       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*/
 };
index 021a313fab857079fba9f714da58f4621a263859..9e01ed2c1bbeb49e4e0c39c1981dcd44959827ad 100644 (file)
@@ -48,7 +48,7 @@
 enum ia_css_err ia_css_init(
        const struct ia_css_env *env,
        const struct ia_css_fw  *fw,
-       uint32_t                 l1_base,
+       u32                 l1_base,
        enum ia_css_irq_type     irq_type);
 
 /* @brief Un-initialize the CSS API.
@@ -143,7 +143,6 @@ ia_css_sp_has_terminated(void);
 enum ia_css_err
 ia_css_start_sp(void);
 
-
 /* @brief stop SP hardware
  *
  * @return                     IA_CSS_SUCCESS or error code upon error.
index 21b842379accbbeca68509890e31209cbd1518b6..6ad8687cf08b29577bada7af2af7fab0ae512158 100644 (file)
@@ -23,7 +23,7 @@ static struct ia_css_hw_access_env my_env;
 void
 ia_css_device_access_init(const struct ia_css_hw_access_env *env)
 {
-       assert(env != NULL);
+       assert(env);
 
        my_env = *env;
 }
index 1f01534964e3e851035f417404bf7619d319517a..d635a747f13db8d464856bf5cf8aa2444972b481 100644 (file)
@@ -30,7 +30,6 @@ enum dvs_statistics_type {
        SKC_DVS_STATISTICS
 };
 
-
 /* Structure that holds DVS statistics in the ISP internal
  * format. Use ia_css_get_dvs_statistics() to translate
  * this to the format used on the host (DVS engine).
@@ -38,11 +37,11 @@ enum dvs_statistics_type {
 struct ia_css_isp_dvs_statistics {
        ia_css_ptr hor_proj;
        ia_css_ptr ver_proj;
-       uint32_t   hor_size;
-       uint32_t   ver_size;
-       uint32_t   exp_id;   /** see ia_css_event_public.h for more detail */
+       u32   hor_size;
+       u32   ver_size;
+       u32   exp_id;   /** see ia_css_event_public.h for more detail */
        ia_css_ptr data_ptr; /* base pointer containing all memory */
-       uint32_t   size;     /* size of allocated memory in data_ptr */
+       u32   size;     /* size of allocated memory in data_ptr */
 };
 
 /* Structure that holds SKC DVS statistics in the ISP internal
@@ -51,7 +50,6 @@ struct ia_css_isp_dvs_statistics {
  * */
 struct ia_css_isp_skc_dvs_statistics;
 
-
 #define SIZE_OF_IA_CSS_ISP_DVS_STATISTICS_STRUCT                       \
        ((3 * SIZE_OF_IA_CSS_PTR) +                                     \
         (4 * sizeof(uint32_t)))
@@ -65,10 +63,10 @@ struct ia_css_isp_skc_dvs_statistics;
  */
 struct ia_css_isp_dvs_statistics_map {
        void    *data_ptr;
-       int32_t *hor_proj;
-       int32_t *ver_proj;
-       uint32_t size;           /* total size in bytes */
-       uint32_t data_allocated; /* indicate whether data was allocated */
+       s32 *hor_proj;
+       s32 *ver_proj;
+       u32 size;                /* total size in bytes */
+       u32 data_allocated; /* indicate whether data was allocated */
 };
 
 union ia_css_dvs_statistics_isp {
index 036a2f03d3bd416850e253ade9951fe1f6cec9b4..5c0470fa4a74cc7b587b95f98f7377e2204b52c7 100644 (file)
@@ -60,7 +60,7 @@ enum ia_css_event_type {
        /** Extension stage complete. */
        IA_CSS_EVENT_TYPE_TIMER                         = 1 << 12,
        /** Timer event for measuring the SP side latencies. It contains the
-             32-bit timer value from the SP */
+            32-bit timer value from the SP */
        IA_CSS_EVENT_TYPE_PORT_EOF                      = 1 << 13,
        /** End Of Frame event, sent when in buffered sensor mode. */
        IA_CSS_EVENT_TYPE_FW_WARNING                    = 1 << 14,
@@ -101,9 +101,9 @@ struct ia_css_event {
             events. */
        enum ia_css_event_type type;
        /** Type of Event, always valid/filled. */
-       uint8_t                port;
+       u8                port;
        /** Port number for EOF event (not valid for other events). */
-       uint8_t                exp_id;
+       u8                exp_id;
        /** Exposure id for EOF/FRAME_TAGGED/FW_WARNING event (not valid for other events)
             The exposure ID is unique only within a logical stream and it is
             only generated on systems that have an input system (such as 2400
@@ -119,22 +119,22 @@ struct ia_css_event {
             Note that in case frames are dropped, this will not be reflected
             in the exposure IDs. Therefor applications should not use this
             to detect frame drops. */
-       uint32_t               fw_handle;
+       u32               fw_handle;
        /** Firmware Handle for ACC_STAGE_COMPLETE event (not valid for other
             events). */
        enum ia_css_fw_warning fw_warning;
        /** Firmware warning code, only for WARNING events. */
-       uint8_t                fw_assert_module_id;
+       u8                fw_assert_module_id;
        /** Firmware module id, only for ASSERT events, should be logged by driver. */
-       uint16_t               fw_assert_line_no;
+       u16               fw_assert_line_no;
        /** Firmware line number, only for ASSERT events, should be logged by driver. */
        clock_value_t          timer_data;
        /** For storing the full 32-bit of the timer value. Valid only for TIMER
             event */
-       uint8_t                timer_code;
+       u8                timer_code;
        /** For storing the code of the TIMER event. Valid only for
             TIMER event */
-       uint8_t                timer_subcode;
+       u8                timer_subcode;
        /** For storing the subcode of the TIMER event. Valid only
             for TIMER event */
 };
index e5ffc579aef1e09969dcc14fd4e1e5b220d7c044..59720370cb8ec888659e8c3221c8b9c46e733ee4 100644 (file)
  * to save on extension operations in the ISP code.
  */
 /* Unsigned fixed point value, 0 integer bits, 16 fractional bits */
-typedef uint32_t ia_css_u0_16;
+typedef u32 ia_css_u0_16;
 /* Unsigned fixed point value, 5 integer bits, 11 fractional bits */
-typedef uint32_t ia_css_u5_11;
+typedef u32 ia_css_u5_11;
 /* Unsigned fixed point value, 8 integer bits, 8 fractional bits */
-typedef uint32_t ia_css_u8_8;
+typedef u32 ia_css_u8_8;
 /* Signed fixed point value, 0 integer bits, 15 fractional bits */
-typedef int32_t ia_css_s0_15;
+typedef s32 ia_css_s0_15;
 
 #endif /* _IA_CSS_FRAC_H */
index 89943e8bf180195fb9c7e5315d2829b8ca72ff74..a32fb299fa6285141ab2b48f6a8fd27d66cd3ba1 100644 (file)
@@ -35,6 +35,7 @@ enum ia_css_bayer_order {
        IA_CSS_BAYER_ORDER_BGGR, /** BGBGBGBGBG .. GRGRGRGRGR */
        IA_CSS_BAYER_ORDER_GBRG, /** GBGBGBGBGB .. RGRGRGRGRG */
 };
+
 #define IA_CSS_BAYER_ORDER_NUM (IA_CSS_BAYER_ORDER_GBRG + 1)
 
 /* Frame plane structure. This describes one plane in an image
@@ -166,7 +167,7 @@ struct ia_css_frame {
        enum ia_css_frame_flash_state flash_state;
        unsigned int exp_id;
        /** exposure id, see ia_css_event_public.h for more detail */
-       uint32_t isp_config_id; /** Unique ID to track which config was actually applied to a particular frame */
+       u32 isp_config_id; /** Unique ID to track which config was actually applied to a particular frame */
        bool valid; /** First video output frame is not valid */
        bool contiguous; /** memory is allocated physically contiguously */
        union {
@@ -334,7 +335,7 @@ enum ia_css_err
 ia_css_frame_map(struct ia_css_frame **frame,
                 const struct ia_css_frame_info *info,
                 const void __user *data,
-                uint16_t attribute,
+                u16 attribute,
                 void *context);
 
 /* @brief Unmap a CSS frame structure.
index 4557e66891dfbd36323a4bfbedaf490e6ede78ea..bc82e97d24cbae3acc9a94767b26ffcf513cd7ea 100644 (file)
@@ -43,4 +43,3 @@ ia_css_host_data_allocate(size_t size);
 void ia_css_host_data_free(struct ia_css_host_data *me);
 
 #endif /* __SH_CSS_HOST_DATA_H */
-
index 8222dd0a41f26367850c99b5a52ce96473a82fe8..269392d4d5d4eb66924d311d4120e7df73e5551a 100644 (file)
@@ -30,7 +30,8 @@ mmgr_malloc(const size_t size)
 
 hrt_vaddress mmgr_alloc_attr(const size_t size, const uint16_t attrs)
 {
-       uint16_t masked_attrs = attrs & MMGR_ATTRIBUTE_MASK;
+       u16 masked_attrs = attrs & MMGR_ATTRIBUTE_MASK;
+
        WARN_ON(attrs & MMGR_ATTRIBUTE_CONTIGUOUS);
 
        if (masked_attrs & MMGR_ATTRIBUTE_CLEARED) {
@@ -73,9 +74,10 @@ mmgr_store(const hrt_vaddress vaddr, const void *data, const size_t size)
 
 hrt_vaddress
 mmgr_mmap(const void __user *ptr, const size_t size,
-         uint16_t attribute, void *context)
+         u16 attribute, void *context)
 {
        struct hrt_userbuffer_attr *userbuffer_attr = context;
+
        return hrt_isp_css_mm_alloc_user_ptr(
                        size, ptr, userbuffer_attr->pgnr,
                        userbuffer_attr->type,
index ed0b6ab371dac00e43816676d95a0e8d68975969..38305aa26b9b3d781a25b78099374d0fd1996bdf 100644 (file)
@@ -36,16 +36,17 @@ struct ia_css_metadata_config {
 
 struct ia_css_metadata_info {
        struct ia_css_resolution resolution; /** Resolution */
-       uint32_t                 stride;     /** Stride in bytes */
-       uint32_t                 size;       /** Total size in bytes */
+       u32                 stride;     /** Stride in bytes */
+       u32                 size;       /** Total size in bytes */
 };
 
 struct ia_css_metadata {
        struct ia_css_metadata_info info;    /** Layout info */
        ia_css_ptr                  address; /** CSS virtual address */
-       uint32_t                    exp_id;
+       u32                 exp_id;
        /** Exposure ID, see ia_css_event_public.h for more detail */
 };
+
 #define SIZE_OF_IA_CSS_METADATA_STRUCT sizeof(struct ia_css_metadata)
 
 /* @brief Allocate a metadata buffer.
index f6870fa7a18c56f2e7f2adac194470172ace4769..f0963968f22ce0dce9045d198cf1ac42d60e8f2f 100644 (file)
@@ -190,6 +190,4 @@ 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);
 
-
-
 #endif /* __IA_CSS_PIPE_H__ */
index 29bb7c01da3851a49dee2d68034c999e475e1839..57542d451ec0a3e1082681dcafab181dfb3edf24 100644 (file)
@@ -50,6 +50,7 @@ enum ia_css_pipe_mode {
        IA_CSS_PIPE_MODE_YUVPP,         /** YUV post processing pipe, used for all use cases with YUV input,
                                                                        for SoC sensor and external ISP */
 };
+
 /* Temporary define  */
 #define IA_CSS_PIPE_MODE_NUM (IA_CSS_PIPE_MODE_YUVPP + 1)
 
@@ -105,7 +106,7 @@ struct ia_css_pipe_config {
        /** Pipeline extension accelerator */
        struct ia_css_fw_info **acc_stages;
        /** Standalone accelerator stages */
-       uint32_t num_acc_stages;
+       u32 num_acc_stages;
        /** Number of standalone accelerator stages */
        struct ia_css_capture_config default_capture_config;
        /** Default capture config for initial capture pipe configuration. */
@@ -151,7 +152,6 @@ struct ia_css_pipe_config {
 #endif
 };
 
-
 /**
  * Default settings for newly created pipe configurations.
  */
@@ -438,7 +438,6 @@ enum ia_css_err
 ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
                           struct ia_css_buffer *buffer);
 
-
 /* @brief  Set the state (Enable or Disable) of the Extension stage in the
  *          given pipe.
  * @param[in] pipe         Pipe handle.
@@ -446,25 +445,25 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
  * @param[in] enable       Enable Flag (1 to enable ; 0 to disable)
  *
  * @return
- * IA_CSS_SUCCESS                      : Success
+ * IA_CSS_SUCCESS                      : Success
  * IA_CSS_ERR_INVALID_ARGUMENTS                : Invalid Parameters
  * IA_CSS_ERR_RESOURCE_NOT_AVAILABLE   : Inactive QOS Pipe
- *                                     (No active stream with this pipe)
+ *                                     (No active stream with this pipe)
  *
  * This function will request state change (enable or disable) for the Extension
  * stage (firmware handle) in the given pipe.
  *
  * Note:
- *     1. Extension can be enabled/disabled only on QOS Extensions
- *     2. Extension can be enabled/disabled only with an active QOS Pipe
- *     3. Initial(Default) state of QOS Extensions is Disabled
- *     4. State change cannot be guaranteed immediately OR on frame boundary
+ *     1. Extension can be enabled/disabled only on QOS Extensions
+ *     2. Extension can be enabled/disabled only with an active QOS Pipe
+ *     3. Initial(Default) state of QOS Extensions is Disabled
+ *     4. State change cannot be guaranteed immediately OR on frame boundary
  *
  */
 enum ia_css_err
-ia_css_pipe_set_qos_ext_state (struct ia_css_pipe *pipe,
-                           uint32_t fw_handle,
-                           bool  enable);
+ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe,
+                          u32 fw_handle,
+                          bool  enable);
 
 /* @brief  Get the state (Enable or Disable) of the Extension stage in the
  *          given pipe.
@@ -473,37 +472,37 @@ ia_css_pipe_set_qos_ext_state (struct ia_css_pipe *pipe,
  * @param[out] *enable     Enable Flag
  *
  * @return
- * IA_CSS_SUCCESS                      : Success
+ * IA_CSS_SUCCESS                      : Success
  * IA_CSS_ERR_INVALID_ARGUMENTS                : Invalid Parameters
  * IA_CSS_ERR_RESOURCE_NOT_AVAILABLE   : Inactive QOS Pipe
- *                                     (No active stream with this pipe)
+ *                                     (No active stream with this pipe)
  *
  * This function will query the state of the Extension stage (firmware handle)
  * in the given Pipe.
  *
  * Note:
- *     1. Extension state can be queried only on QOS Extensions
- *     2. Extension can be enabled/disabled only with an active QOS Pipe
- *     3. Initial(Default) state of QOS Extensions is Disabled.
+ *     1. Extension state can be queried only on QOS Extensions
+ *     2. Extension can be enabled/disabled only with an active QOS Pipe
+ *     3. Initial(Default) state of QOS Extensions is Disabled.
  *
  */
 enum ia_css_err
-ia_css_pipe_get_qos_ext_state (struct ia_css_pipe *pipe,
-                           uint32_t fw_handle,
-                           bool * enable);
+ia_css_pipe_get_qos_ext_state(struct ia_css_pipe *pipe,
+                          u32 fw_handle,
+                          bool *enable);
 
 #ifdef ISP2401
 /* @brief  Update mapped CSS and ISP arguments for QoS pipe during SP runtime.
- * @param[in] pipe             Pipe handle.
+ * @param[in] pipe     Pipe handle.
  * @param[in] fw_handle        Extension firmware Handle (ia_css_fw_info.handle).
- * @param[in] css_seg          Parameter memory descriptors for CSS segments.
- * @param[in] isp_seg          Parameter memory descriptors for ISP segments.
+ * @param[in] css_seg  Parameter memory descriptors for CSS segments.
+ * @param[in] isp_seg  Parameter memory descriptors for ISP segments.
  *
  * @return
- * IA_CSS_SUCCESS                      : Success
+ * IA_CSS_SUCCESS                      : Success
  * IA_CSS_ERR_INVALID_ARGUMENTS                : Invalid Parameters
  * IA_CSS_ERR_RESOURCE_NOT_AVAILABLE   : Inactive QOS Pipe
- *                                     (No active stream with this pipe)
+ *                                     (No active stream with this pipe)
  *
  * \deprecated{This interface is used to temporarily support a late-developed,
  * specific use-case on a specific IPU2 platform. It will not be supported or
@@ -530,7 +529,7 @@ ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
  * @param[in]  lut         Look up tabel
  *
  * @return
- * IA_CSS_SUCCESS                      : Success
+ * IA_CSS_SUCCESS                      : Success
  * IA_CSS_ERR_INVALID_ARGUMENTS                : Invalid Parameters
  *
  * Note:
@@ -541,12 +540,12 @@ 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,
+ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe,
                                const void *lut);
 /* @brief Checking of DVS statistics ability
  * @param[in]  pipe_info       The pipe info.
  * @return             true - has DVS statistics ability
- *                     false - otherwise
+ *                     false - otherwise
  */
 bool ia_css_pipe_has_dvs_stats(struct ia_css_pipe_info *pipe_info);
 
index 6f24656b6cb46c0d675cd68f72743723455a5ad4..037fc4f77c7774a833add1989f297cc9f0a35e9c 100644 (file)
@@ -33,7 +33,7 @@ enum ia_css_prbs_id {
  * Make sure the value of this define gets changed to reflect the correct
  * number of ia_css_prbs_id enum if you add/delete an item in the enum.
  */
-#define N_CSS_PRBS_IDS (IA_CSS_PRBS_ID2+1)
+#define N_CSS_PRBS_IDS (IA_CSS_PRBS_ID2 + 1)
 
 /**
  * PRBS configuration structure.
index 3d1c5a8f879bcba6489bbd58c4c9dc1dfa37b404..a5ec4e100cec0ee1d9f7f6edafb38797a645327e 100644 (file)
@@ -83,7 +83,6 @@ struct ia_css_stream_input_config {
        enum ia_css_bayer_order bayer_order; /** Bayer order for RAW streams */
 };
 
-
 /* Input stream description. This describes how input will flow into the
  *  CSS. This is used to program the CSS hardware.
  */
@@ -118,15 +117,15 @@ struct ia_css_stream_config {
        bool online; /** offline will activate RAW copy on SP, use this for
                          continuous capture. */
                /* ISYS2401 usage: ISP receives data directly from sensor, no copy. */
-       unsigned init_num_cont_raw_buf; /** initial number of raw buffers to
+       unsigned int init_num_cont_raw_buf; /** initial number of raw buffers to
                                             allocate */
-       unsigned target_num_cont_raw_buf; /** total number of raw buffers to
+       unsigned int target_num_cont_raw_buf; /** total number of raw buffers to
                                             allocate */
        bool pack_raw_pixels; /** Pack pixels in the raw buffers */
        bool continuous; /** Use SP copy feature to continuously capture frames
                              to system memory and run pipes in offline mode */
        bool disable_cont_viewfinder; /** disable continuous viewfinder for ZSL use case */
-       int32_t flash_gpio_pin; /** pin on which the flash is connected, -1 for no flash */
+       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. */
@@ -482,8 +481,8 @@ void
 ia_css_stream_request_flash(struct ia_css_stream *stream);
 
 /* @brief Configure a stream with filter coefficients.
- *        @deprecated {Replaced by
- *                                ia_css_pipe_set_isp_config_on_pipe()}
+ *        @deprecated {Replaced by
+ *                                ia_css_pipe_set_isp_config_on_pipe()}
  *
  * @param[in]  stream The stream.
  * @param[in]  config  The set of filter coefficients.
@@ -504,8 +503,8 @@ ia_css_stream_set_isp_config_on_pipe(struct ia_css_stream *stream,
                             struct ia_css_pipe *pipe);
 
 /* @brief Configure a stream with filter coefficients.
- *        @deprecated {Replaced by
- *                                ia_css_pipe_set_isp_config()}
+ *        @deprecated {Replaced by
+ *                                ia_css_pipe_set_isp_config()}
  * @param[in]  stream  The stream.
  * @param[in]  config  The set of filter coefficients.
  * @return             IA_CSS_SUCCESS or error code upon error.
index b256d7c88716c471f54375192fcc8d3961c711c2..4ec86142160067f88396277dfb04655cd3a48d2f 100644 (file)
@@ -38,7 +38,7 @@ more details.
 #include "ia_css_err.h"
 
 /* @brief timer reading definition */
-typedef uint32_t clock_value_t;
+typedef u32 clock_value_t;
 
 /* @brief 32 bit clock tick,(timestamp based on timer-value of CSS-internal timer)*/
 struct ia_css_clock_tick {
index 81498bd7485b7405e1825963cc8713d2c654fb60..79c4e1b3b48f20a83af43d4ea6e4a8985c2d9f0a 100644 (file)
@@ -33,7 +33,7 @@ enum ia_css_tpg_id {
  * Make sure the value of this define gets changed to reflect the correct
  * number of ia_css_tpg_id enum if you add/delete an item in the enum.
  */
-#define N_CSS_TPG_IDS (IA_CSS_TPG_ID2+1)
+#define N_CSS_TPG_IDS (IA_CSS_TPG_ID2 + 1)
 
 /* Enumerate the TPG modes.
  */
index 259ab3f074babaec6e7df37b2fc995e30ca60648..add400b910544307d9fb8e36e4d1772f903bf54c 100644 (file)
@@ -80,28 +80,28 @@ struct ia_css_config_memory_offsets;
 struct ia_css_state_memory_offsets;
 
 /* Virtual address within the CSS address space. */
-typedef uint32_t ia_css_ptr;
+typedef u32 ia_css_ptr;
 
 /* Generic resolution structure.
  */
 struct ia_css_resolution {
-       uint32_t width;  /** Width */
-       uint32_t height; /** Height */
+       u32 width;  /** Width */
+       u32 height; /** Height */
 };
 
 /* Generic coordinate structure.
  */
 struct ia_css_coordinate {
-       int32_t x;      /** Value of a coordinate on the horizontal axis */
-       int32_t y;      /** Value of a coordinate on the vertical axis */
+       s32 x;  /** Value of a coordinate on the horizontal axis */
+       s32 y;  /** Value of a coordinate on the vertical axis */
 };
 
 /* Vector with signed values. This is used to indicate motion for
  * Digital Image Stabilization.
  */
 struct ia_css_vector {
-       int32_t x; /** horizontal motion (in pixels) */
-       int32_t y; /** vertical motion (in pixels) */
+       s32 x; /** horizontal motion (in pixels) */
+       s32 y; /** vertical motion (in pixels) */
 };
 
 /* Short hands */
@@ -111,19 +111,19 @@ struct ia_css_vector {
 /* CSS data descriptor */
 struct ia_css_data {
        ia_css_ptr address; /** CSS virtual address */
-       uint32_t   size;    /** Disabled if 0 */
+       u32   size;    /** Disabled if 0 */
 };
 
 /* Host data descriptor */
 struct ia_css_host_data {
        char      *address; /** Host address */
-       uint32_t   size;    /** Disabled if 0 */
+       u32   size;    /** Disabled if 0 */
 };
 
 /* ISP data descriptor */
 struct ia_css_isp_data {
-       uint32_t   address; /** ISP address */
-       uint32_t   size;    /** Disabled if 0 */
+       u32   address; /** ISP address */
+       u32   size;    /** Disabled if 0 */
 };
 
 /* Shading Correction types. */
@@ -288,27 +288,27 @@ struct ia_css_shading_info {
                 */
                struct {
 #ifndef ISP2401
-                       uint32_t enable;        /** Shading correction enabled.
+                       u32 enable;     /** Shading correction enabled.
                                                     0:disabled, 1:enabled */
-                       uint32_t num_hor_grids; /** Number of data points per line
+                       u32 num_hor_grids;      /** Number of data points per line
                                                     per color on shading table. */
-                       uint32_t num_ver_grids; /** Number of lines of data points
+                       u32 num_ver_grids;      /** Number of lines of data points
                                                     per color on shading table. */
-                       uint32_t bqs_per_grid_cell; /** Grid cell size
+                       u32 bqs_per_grid_cell; /** Grid cell size
                                                in BQ(Bayer Quad) unit.
                                                (1BQ means {Gr,R,B,Gb}(2x2 pixels).)
                                                Valid values are 8,16,32,64. */
 #else
-                       uint32_t num_hor_grids; /** Number of data points per line per color on shading table. */
-                       uint32_t num_ver_grids; /** Number of lines of data points per color on shading table. */
-                       uint32_t bqs_per_grid_cell; /** Grid cell size in BQ unit.
+                       u32 num_hor_grids;      /** Number of data points per line per color on shading table. */
+                       u32 num_ver_grids;      /** Number of lines of data points per color on shading table. */
+                       u32 bqs_per_grid_cell; /** Grid cell size in BQ unit.
                                                         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
-                       uint32_t bayer_scale_hor_ratio_in;
-                       uint32_t bayer_scale_hor_ratio_out;
+                       u32 bayer_scale_hor_ratio_in;
+                       u32 bayer_scale_hor_ratio_out;
 #ifndef ISP2401
                        /** Horizontal ratio of bayer scaling
                        between input width and output width, for the scaling
@@ -321,21 +321,21 @@ struct ia_css_shading_info {
                                        output_width = input_width * bayer_scale_hor_ratio_out
                                                                        / bayer_scale_hor_ratio_in + 0.5 */
 #endif
-                       uint32_t bayer_scale_ver_ratio_in;
-                       uint32_t bayer_scale_ver_ratio_out;
+                       u32 bayer_scale_ver_ratio_in;
+                       u32 bayer_scale_ver_ratio_out;
 #ifndef ISP2401
                        /** 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 */
-                       uint32_t sc_bayer_origin_x_bqs_on_shading_table;
+                       u32 sc_bayer_origin_x_bqs_on_shading_table;
                        /** X coordinate (in bqs) of bayer origin on shading table.
                        This indicates the left-most pixel of bayer
                        (not include margin) inputted to the shading correction.
                        This corresponds to the left-most pixel of bayer
                        inputted to isp from sensor. */
-                       uint32_t sc_bayer_origin_y_bqs_on_shading_table;
+                       u32 sc_bayer_origin_y_bqs_on_shading_table;
                        /** Y coordinate (in bqs) of bayer origin on shading table.
                        This indicates the top pixel of bayer
                        (not include margin) inputted to the shading correction.
@@ -393,8 +393,8 @@ struct ia_css_grid_info {
          * that is visible for user
          * @{
          */
-       uint32_t isp_in_width;
-       uint32_t isp_in_height;
+       u32 isp_in_width;
+       u32 isp_in_height;
        /* @}*/
 
        struct ia_css_3a_grid_info  s3a_grid; /** 3A grid info */
@@ -417,35 +417,35 @@ struct ia_css_grid_info {
  *  advanced ISP can correct for these imperfections using this table.
  */
 struct ia_css_morph_table {
-       uint32_t enable; /** To disable GDC, set this field to false. The
+       u32 enable; /** To disable GDC, set this field to false. The
                          coordinates fields can be set to NULL in this case. */
-       uint32_t height; /** Table height */
-       uint32_t width;  /** Table width */
-       uint16_t *coordinates_x[IA_CSS_MORPH_TABLE_NUM_PLANES];
+       u32 height; /** Table height */
+       u32 width;  /** Table width */
+       u16 *coordinates_x[IA_CSS_MORPH_TABLE_NUM_PLANES];
        /** X coordinates that describe the sensor imperfection */
-       uint16_t *coordinates_y[IA_CSS_MORPH_TABLE_NUM_PLANES];
+       u16 *coordinates_y[IA_CSS_MORPH_TABLE_NUM_PLANES];
        /** Y coordinates that describe the sensor imperfection */
 };
 
 struct ia_css_dvs_6axis_config {
        unsigned int exp_id;
        /** Exposure ID, see ia_css_event_public.h for more detail */
-       uint32_t width_y;
-       uint32_t height_y;
-       uint32_t width_uv;
-       uint32_t height_uv;
-       uint32_t *xcoords_y;
-       uint32_t *ycoords_y;
-       uint32_t *xcoords_uv;
-       uint32_t *ycoords_uv;
+       u32 width_y;
+       u32 height_y;
+       u32 width_uv;
+       u32 height_uv;
+       u32 *xcoords_y;
+       u32 *ycoords_y;
+       u32 *xcoords_uv;
+       u32 *ycoords_uv;
 };
 
 /**
  * This specifies the coordinates (x,y)
  */
 struct ia_css_point {
-       int32_t x; /** x coordinate */
-       int32_t y; /** y coordinate */
+       s32 x; /** x coordinate */
+       s32 y; /** y coordinate */
 };
 
 /**
@@ -474,8 +474,8 @@ struct ia_css_region {
  * y + height <= effective input height
  */
 struct ia_css_dz_config {
-       uint32_t dx; /** Horizontal zoom factor */
-       uint32_t dy; /** Vertical zoom factor */
+       u32 dx; /** Horizontal zoom factor */
+       u32 dy; /** Vertical zoom factor */
        struct ia_css_region zoom_region; /** region for zoom */
 };
 
@@ -492,8 +492,8 @@ enum ia_css_capture_mode {
 
 struct ia_css_capture_config {
        enum ia_css_capture_mode mode; /** Still capture mode */
-       uint32_t enable_xnr;           /** Enable/disable XNR */
-       uint32_t enable_raw_output;
+       u32 enable_xnr;        /** Enable/disable XNR */
+       u32 enable_raw_output;
        bool enable_capture_pp_bli;    /** Enable capture_pp_bli mode */
 };
 
@@ -503,7 +503,6 @@ struct ia_css_capture_config {
        .mode   = IA_CSS_CAPTURE_MODE_PRIMARY, \
 }
 
-
 /* ISP filter configuration. This is a collection of configurations
  *  for each of the ISP filters (modules).
  *
@@ -610,7 +609,7 @@ struct ia_css_isp_config {
        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) */
-       uint32_t                        isp_config_id;  /** Unique ID to track which config was actually applied to a particular frame */
+       u32                     isp_config_id;  /** Unique ID to track which config was actually applied to a particular frame */
 };
 
 #endif /* _IA_CSS_TYPES_H */
index aad592cb86ef0fbd96f38301ffc3bfb1b92d5dd1..8fb8c045f2927e8deec06c57c7ab6f4cdfe8a372 100644 (file)
 #ifndef __IA_CSS_VERSION_DATA_H
 #define __IA_CSS_VERSION_DATA_H
 
-
 #ifndef ISP2401
 #define CSS_VERSION_STRING "REL:20150521_21.4_0539; API:2.1.15.3; GIT:irci_candrpv_0415_20150504_35b345#35b345be52ac575f8934abb3a88fea26a94e7343; SDK:/nfs/iir/disks/iir_hivepackages_003/iir_hivepkgs_disk017/Css_Mizuchi/packages/Css_Mizuchi/int_css_mizuchi_20140829_1053; USER:viedifw; "
 #else
 #define CSS_VERSION_STRING "REL:20150911_37.5_1652; API:2.1.20.9; GIT:irci___#ebf437d53a8951bb7ff6d13fdb7270dab393a92a; SDK:; USER:viedifw; "
 #endif
 
-
 #endif
-
index f7dd256b6f7a0b986fa07471f1303373ab4b9c29..9cdfe50b2835c3a3faea36e51548cf0cd0b4f70c 100644 (file)
@@ -29,4 +29,3 @@ const struct ia_css_aa_config default_aa_config = {
 const struct ia_css_aa_config default_baa_config = {
        8191 /* default should be 0 */
 };
-
index dbab4d6c6cd58270252664a5db92ef03be2eb8f5..3c699bae2f5544ec8f3ca4afbef9d53fd9b32990 100644 (file)
@@ -18,7 +18,7 @@
 #include "type_support.h"
 
 struct sh_css_isp_aa_params {
-       int32_t strength;
+       s32 strength;
 };
 
 #endif /* __IA_CSS_AA_PARAM_H */
index 0b95bf9b9aaf8ebba856bf562724ac32a756673c..cc6a444ac716d4ff670ad8cd85ad934709b5cebb 100644 (file)
@@ -19,7 +19,6 @@
 * CSS-API header file for Anti-Aliasing parameters.
 */
 
-
 /* Anti-Aliasing configuration.
  *
  *  This structure is used both for YUV AA and Bayer AA.
  *     ISP2: BAA2 is used.
  */
 struct ia_css_aa_config {
-       uint16_t strength;      /** Strength of the filter.
+       u16 strength;   /** Strength of the filter.
                                        u0.13, [0,8191],
                                        default/ineffective 0 */
 };
 
 #endif /* __IA_CSS_AA2_TYPES_H */
-
index edc4f1ae6d5e8da7ab764b6b413ad89b671e6a76..c5fb1e08f3b4e048cfbcb80a4a6f332e304666c0 100644 (file)
@@ -31,7 +31,7 @@ void
 ia_css_anr_encode(
        struct sh_css_isp_anr_params *to,
        const struct ia_css_anr_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->threshold = from->threshold;
@@ -40,7 +40,7 @@ ia_css_anr_encode(
 void
 ia_css_anr_dump(
        const struct sh_css_isp_anr_params *anr,
-       unsigned level)
+       unsigned int level)
 {
        if (!anr) return;
        ia_css_debug_dtrace(level, "Advance Noise Reduction:\n");
@@ -51,10 +51,9 @@ ia_css_anr_dump(
 void
 ia_css_anr_debug_dtrace(
        const struct ia_css_anr_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
                "config.threshold=%d\n",
                config->threshold);
 }
-
index 29566c07653cd3942353b1e0096959cc64ba5fc0..1f045a0ca8df98405280028a7ea5f52fd7899a96 100644 (file)
@@ -24,16 +24,16 @@ void
 ia_css_anr_encode(
        struct sh_css_isp_anr_params *to,
        const struct ia_css_anr_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_anr_dump(
        const struct sh_css_isp_anr_params *anr,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_anr_debug_dtrace(
-       const struct ia_css_anr_config *config, unsigned level)
+       const struct ia_css_anr_config *config, unsigned int level)
 ;
 
 #endif /* __IA_CSS_ANR_HOST_H */
index 2621b920c3dca40f5b253d86566883b475b08bdb..6bf834cb47d923b810ee35ea9b88fe127d4018bd 100644 (file)
@@ -19,7 +19,7 @@
 
 /* ANR (Advanced Noise Reduction) */
 struct sh_css_isp_anr_params {
-       int32_t threshold;
+       s32 threshold;
 };
 
 #endif /* __IA_CSS_ANR_PARAM_H */
index dc317a85736932cd805f1a0b216d608c84632e30..d3fa0193ae07d11d55f844dca199ea7ef3fd2e74 100644 (file)
 
 /* Application specific DMA settings  */
 #define ANR_BPP                 10
-#define ANR_ELEMENT_BITS        ((CEIL_DIV(ANR_BPP, 8))*8)
+#define ANR_ELEMENT_BITS        ((CEIL_DIV(ANR_BPP, 8)) * 8)
 
 /* Advanced Noise Reduction configuration.
  *  This is also known as Low-Light.
  */
 struct ia_css_anr_config {
-       int32_t threshold; /** Threshold */
-       int32_t thresholds[4*4*4];
-       int32_t factors[3];
+       s32 threshold; /** Threshold */
+       s32 thresholds[4 * 4 * 4];
+       s32 factors[3];
 };
 
 #endif /* __IA_CSS_ANR_TYPES_H */
-
index b338c434453e9ecbf4b8ce4b8c9cac973dbf64be..5db6f1afff68e0533d20ed3fd02a5e1ed1265e9d 100644 (file)
@@ -24,13 +24,14 @@ ia_css_anr2_vmem_encode(
        const struct ia_css_anr_thres *from,
        size_t size)
 {
-       unsigned i;
+       unsigned int i;
 
        (void)size;
        for (i = 0; i < ANR_PARAM_SIZE; i++) {
-               unsigned j;
+               unsigned int j;
+
                for (j = 0; j < ISP_VEC_NELEMS; j++) {
-                       to->data[i][j] = from->data[i*ISP_VEC_NELEMS+j];
+                       to->data[i][j] = from->data[i * ISP_VEC_NELEMS + j];
                }
        }
 }
@@ -38,9 +39,8 @@ ia_css_anr2_vmem_encode(
 void
 ia_css_anr2_debug_dtrace(
        const struct ia_css_anr_thres *config,
-       unsigned level)
+       unsigned int level)
 {
        (void)config;
        (void)level;
 }
-
index 83c37e328591ef056f7d3d5b5a90f2f6609fbe3a..96a063ffdc16eec3aeadf59f4ec503ce2d988a63 100644 (file)
@@ -29,7 +29,7 @@ ia_css_anr2_vmem_encode(
 
 void
 ia_css_anr2_debug_dtrace(
-       const struct ia_css_anr_thres *config, unsigned level)
+       const struct ia_css_anr_thres *config, unsigned int level)
 ;
 
 #endif /* __IA_CSS_ANR2_HOST_H */
index 2de51fe45623f58ed291173a9e45f1e16b439423..9cbeeef7417b8986047527bf1552db8ad4fad0c6 100644 (file)
@@ -49,4 +49,3 @@ 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}
 };
 #endif
-
index 9b611315392ccc37cf06d6987b36c61b6942c726..200df3829fc7fefa548c170b5460f5fd8d8a8731 100644 (file)
@@ -25,8 +25,7 @@
 
 /* Advanced Noise Reduction (ANR) thresholds */
 struct ia_css_anr_thres {
-       int16_t data[13*64];
+       s16 data[13 * 64];
 };
 
 #endif /* __IA_CSS_ANR2_TYPES_H */
-
index 312141793fd23806fd83c6f4e4ddf3e0576de5b6..629c9ae6ad234e77f81324b75726a2ecb9654577 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 99c80d2d8f11c5e0eedd47c957d51e1fead275e0..0e8dd4eebc3b8fcfdddf897873d42dff44e06053 100644 (file)
@@ -32,7 +32,7 @@ ia_css_bh_hmem_decode(
        /*
         * No weighted histogram, hence no grid definition
         */
-       if(!hmem_buf)
+       if (!hmem_buf)
                return;
        assert(sizeof_hmem(HMEM0_ID) == sizeof(*hmem_buf));
 
@@ -51,7 +51,7 @@ void
 ia_css_bh_encode(
        struct sh_css_isp_bh_params *to,
        const struct ia_css_3a_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        /* coefficients to calculate Y */
index cbb09299cf21e8c7cab3ab89d168935a4d726399..2a4c6c4a75463639a587698db280ea8b773665a3 100644 (file)
@@ -27,6 +27,6 @@ void
 ia_css_bh_encode(
        struct sh_css_isp_bh_params *to,
        const struct ia_css_3a_config *from,
-       unsigned size);
+       unsigned int size);
 
 #endif /* __IA_CSS_BH_HOST_H */
index b0a8ef3862e0910167cfb3193fb6296ecbd0caf7..692a855ba012c101fd41d34a47f1b582d2e12ede 100644 (file)
 /* AE (3A Support) */
 struct sh_css_isp_bh_params {
        /* coefficients to calculate Y */
-       int32_t y_coef_r;
-       int32_t y_coef_g;
-       int32_t y_coef_b;
+       s32 y_coef_r;
+       s32 y_coef_g;
+       s32 y_coef_b;
 };
 
 /* This should be hmem_data_t, but that breaks the pipe generator */
 struct sh_css_isp_bh_hmem_params {
-       uint32_t bh[ISP_HIST_COMPONENTS][IA_CSS_HMEM_BH_UNIT_SIZE];
+       u32 bh[ISP_HIST_COMPONENTS][IA_CSS_HMEM_BH_UNIT_SIZE];
 };
 
 #endif /* __IA_CSS_HB_PARAM_H */
index ec1688e7352d17fb2b5379c40f6c5c22c04922cc..8b2a53a26b753d41730097d8215b48f9c0def30e 100644 (file)
@@ -19,7 +19,7 @@
   * Should be consistent with hmem.h
   */
 #define IA_CSS_HMEM_BH_TABLE_SIZE      ISP_HIST_DEPTH
-#define IA_CSS_HMEM_BH_UNIT_SIZE       (ISP_HIST_DEPTH/ISP_HIST_COMPONENTS)
+#define IA_CSS_HMEM_BH_UNIT_SIZE       (ISP_HIST_DEPTH / ISP_HIST_COMPONENTS)
 
 #define BH_COLOR_R     (0)
 #define BH_COLOR_G     (1)
@@ -29,9 +29,7 @@
 
 /* BH table */
 struct ia_css_bh_table {
-       uint32_t hmem[ISP_HIST_COMPONENTS][IA_CSS_HMEM_BH_UNIT_SIZE];
+       u32 hmem[ISP_HIST_COMPONENTS][IA_CSS_HMEM_BH_UNIT_SIZE];
 };
 
 #endif /* __IA_CSS_BH_TYPES_H */
-
-
index 6d12e031e6fcaee96a9086d0d7987d0e06bf81f2..03da019346fc1e654a5a580cdafcb65c14344e9d 100644 (file)
 #include <assert_support.h>
 
 #define BNLM_DIV_LUT_SIZE      (12)
-static const int32_t div_lut_nearests[BNLM_DIV_LUT_SIZE] = {
+static const s32 div_lut_nearests[BNLM_DIV_LUT_SIZE] = {
        0, 454, 948, 1484, 2070, 2710, 3412, 4184, 5035, 5978, 7025, 8191
 };
 
-static const int32_t div_lut_slopes[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 int32_t div_lut_intercepts[BNLM_DIV_LUT_SIZE] = {
+static const s32 div_lut_intercepts[BNLM_DIV_LUT_SIZE] = {
        8184, 7752, 7336, 6928, 6536, 6152, 5776, 5416, 5064, 4728, 4408, 4408
 };
 
@@ -59,9 +59,9 @@ bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lut
         */
        assert((lut_size >= 2) && (lut_size <= block_size));
        /* array lut_thr has (lut_size-1) entries */
-       for (i = 0; i < lut_size-2; i++) {
+       for (i = 0; i < lut_size - 2; i++) {
                /* Check if the lut_thr is monotonically increasing */
-               assert(lut_thr[i] <= lut_thr[i+1]);
+               assert(lut_thr[i] <= lut_thr[i + 1]);
        }
 
        /* Initialize */
@@ -80,6 +80,7 @@ bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lut
        /* Copy data from first block to all blocks */
        for (blk = 1; blk < total_blocks; blk++) {
                u32 blk_offset = blk * block_size;
+
                for (i = 1; i < lut_size; i++) {
                        lut->thr[0][blk_offset + i] = lut->thr[0][i];
                        lut->val[0][blk_offset + i] = lut->val[0][i];
@@ -125,12 +126,12 @@ ia_css_bnlm_vmem_encode(
 
        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++) {
+       for (i = 0; i < BNLM_DIV_LUT_SIZE; i++) {
                to->div_lut_intercepts[0][i] = div_lut_intercepts[i];
        }
 
        memset(to->power_of_2, 0, sizeof(to->power_of_2));
-       for (i = 0; i < (ISP_VEC_ELEMBITS-1); i++) {
+       for (i = 0; i < (ISP_VEC_ELEMBITS - 1); i++) {
                to->power_of_2[0][i] = 1 << i;
        }
 }
@@ -159,7 +160,7 @@ ia_css_bnlm_encode(
 void
 ia_css_bnlm_debug_trace(
        const struct ia_css_bnlm_config *config,
-       unsigned level)
+       unsigned int level)
 {
        if (!config)
                return;
@@ -179,5 +180,4 @@ ia_css_bnlm_debug_trace(
 
        /* ToDo: print traces for LUTs */
 #endif /* IA_CSS_NO_DEBUG */
-
 }
index 675f6e539b3f26fe8a257f73e2ce7d93fb5de2ed..7f888afeb65acc4574f33bdd18f1f8714f2c54f5 100644 (file)
@@ -34,7 +34,7 @@ ia_css_bnlm_encode(
 void
 ia_css_bnlm_debug_trace(
        const struct ia_css_bnlm_config *config,
-       unsigned level);
+       unsigned int level);
 #endif
 
 #endif /* __IA_CSS_BNLM_HOST_H */
index 2f4be43e594ed751a355b78c457adfa9b77b18af..c7d5cadf5fd4a0c8b4ee1f4d364451455daf683e 100644 (file)
@@ -38,6 +38,7 @@ struct bnlm_vmem_params {
 
        /* LUTs used for division approximiation */
        struct bnlm_lut div_lut;
+
        VMEM_ARRAY(div_lut_intercepts, ISP_VEC_NELEMS);
 
        /* 240x does not have an ISP instruction to left shift each element of a
@@ -49,15 +50,15 @@ struct bnlm_vmem_params {
 /* BNLM ISP parameters */
 struct bnlm_dmem_params {
        bool rad_enable;
-       int32_t rad_x_origin;
-       int32_t rad_y_origin;
-       int32_t avg_min_th;
-       int32_t max_min_th;
-
-       int32_t exp_coeff_a;
-       uint32_t exp_coeff_b;
-       int32_t exp_coeff_c;
-       uint32_t exp_exponent;
+       s32 rad_x_origin;
+       s32 rad_y_origin;
+       s32 avg_min_th;
+       s32 max_min_th;
+
+       s32 exp_coeff_a;
+       u32 exp_coeff_b;
+       s32 exp_coeff_c;
+       u32 exp_exponent;
 };
 
 #endif /* __IA_CSS_BNLM_PARAM_H */
index 87e0f19c856b2e7e0ee05f5750ca6e63f61eed23..8dd1b1766c647895da349142f561e5fb3ffed3c7 100644 (file)
  */
 struct ia_css_bnlm_config {
        bool            rad_enable;     /** Enable a radial dependency in a weight calculation */
-       int32_t         rad_x_origin;   /** Initial x coordinate for a radius calculation */
-       int32_t         rad_y_origin;   /** Initial x coordinate for a radius calculation */
+       s32             rad_x_origin;   /** Initial x coordinate for a radius calculation */
+       s32             rad_y_origin;   /** Initial x coordinate for a radius calculation */
        /* a threshold for average of weights if this < Th, do not denoise pixel */
-       int32_t         avg_min_th;
+       s32             avg_min_th;
        /* minimum weight for denoising if max < th, do not denoise pixel */
-       int32_t         max_min_th;
+       s32             max_min_th;
 
        /**@{*/
        /* Coefficient for approximation, in the form of (1 + x / N)^N,
         * that fits the first-order exp() to default exp_lut in BNLM sheet
         * */
-       int32_t         exp_coeff_a;
-       uint32_t        exp_coeff_b;
-       int32_t         exp_coeff_c;
-       uint32_t        exp_exponent;
+       s32             exp_coeff_a;
+       u32     exp_coeff_b;
+       s32             exp_coeff_c;
+       u32     exp_exponent;
        /**@}*/
 
-       int32_t nl_th[3];       /** Detail thresholds */
+       s32 nl_th[3];   /** Detail thresholds */
 
        /* Index for n-th maximum candidate weight for each detail group */
-       int32_t match_quality_max_idx[4];
+       s32 match_quality_max_idx[4];
 
        /**@{*/
        /* A lookup table for 1/sqrt(1+mu) approximation */
-       int32_t mu_root_lut_thr[15];
-       int32_t mu_root_lut_val[16];
+       s32 mu_root_lut_thr[15];
+       s32 mu_root_lut_val[16];
        /**@}*/
        /**@{*/
        /* A lookup table for SAD normalization */
-       int32_t sad_norm_lut_thr[15];
-       int32_t sad_norm_lut_val[16];
+       s32 sad_norm_lut_thr[15];
+       s32 sad_norm_lut_val[16];
        /**@}*/
        /**@{*/
        /* A lookup table that models a weight's dependency on textures */
-       int32_t sig_detail_lut_thr[15];
-       int32_t sig_detail_lut_val[16];
+       s32 sig_detail_lut_thr[15];
+       s32 sig_detail_lut_val[16];
        /**@}*/
        /**@{*/
        /* A lookup table that models a weight's dependency on a pixel's radial distance */
-       int32_t sig_rad_lut_thr[15];
-       int32_t sig_rad_lut_val[16];
+       s32 sig_rad_lut_thr[15];
+       s32 sig_rad_lut_val[16];
        /**@}*/
        /**@{*/
        /* A lookup table to control denoise power depending on a pixel's radial distance */
-       int32_t rad_pow_lut_thr[15];
-       int32_t rad_pow_lut_val[16];
+       s32 rad_pow_lut_thr[15];
+       s32 rad_pow_lut_val[16];
        /**@}*/
        /**@{*/
        /* Non linear transfer functions to calculate the blending coefficient depending on detail group */
        /* detail group 0 */
        /**@{*/
-       int32_t nl_0_lut_thr[15];
-       int32_t nl_0_lut_val[16];
+       s32 nl_0_lut_thr[15];
+       s32 nl_0_lut_val[16];
        /**@}*/
        /**@{*/
        /* detail group 1 */
-       int32_t nl_1_lut_thr[15];
-       int32_t nl_1_lut_val[16];
+       s32 nl_1_lut_thr[15];
+       s32 nl_1_lut_val[16];
        /**@}*/
        /**@{*/
        /* detail group 2 */
-       int32_t nl_2_lut_thr[15];
-       int32_t nl_2_lut_val[16];
+       s32 nl_2_lut_thr[15];
+       s32 nl_2_lut_val[16];
        /**@}*/
        /**@{*/
        /* detail group 3 */
-       int32_t nl_3_lut_thr[15];
-       int32_t nl_3_lut_val[16];
+       s32 nl_3_lut_thr[15];
+       s32 nl_3_lut_val[16];
        /**@}*/
        /**@}*/
 };
index a7de6ecb950d101eb89813d218206eed4b8a30a9..42c6e5fa5a1eb6f6e15c53f4239630c86f06acf4 100644 (file)
@@ -86,7 +86,7 @@ ia_css_bnr2_2_encode(
 void
 ia_css_bnr2_2_debug_dtrace(
        const struct ia_css_bnr2_2_config *bnr,
-       unsigned level)
+       unsigned int level)
 {
        if (!bnr)
                return;
index c94b366b814200eb732d61a642cbd81645583964..ab1106fd24d6c6c32804e5d843d1e47bf7cf1d1d 100644 (file)
@@ -29,7 +29,7 @@ ia_css_bnr2_2_encode(
 void
 ia_css_bnr2_2_debug_dtrace(
        const struct ia_css_bnr2_2_config *config,
-       unsigned level);
+       unsigned int level);
 #endif
 
 #endif /* __IA_CSS_BNR2_2_HOST_H */
index 6dec27a99d8fbb32a4f31268d8da3facca7f69ef..698fdc0b13fa35dbdab95e4b7e965d324480b6e5 100644 (file)
 
 /* BNR (Bayer Noise Reduction) ISP parameters */
 struct sh_css_isp_bnr2_2_params {
-       int32_t d_var_gain_r;
-       int32_t d_var_gain_g;
-       int32_t d_var_gain_b;
-       int32_t d_var_gain_slope_r;
-       int32_t d_var_gain_slope_g;
-       int32_t d_var_gain_slope_b;
-       int32_t n_var_gain_r;
-       int32_t n_var_gain_g;
-       int32_t n_var_gain_b;
-       int32_t n_var_gain_slope_r;
-       int32_t n_var_gain_slope_g;
-       int32_t n_var_gain_slope_b;
-       int32_t dir_thres;
-       int32_t dir_thres_w;
-       int32_t var_offset_coef;
-       int32_t dir_gain;
-       int32_t detail_gain;
-       int32_t detail_gain_divisor;
-       int32_t detail_level_offset;
-       int32_t d_var_th_min;
-       int32_t d_var_th_max;
-       int32_t n_var_th_min;
-       int32_t n_var_th_max;
+       s32 d_var_gain_r;
+       s32 d_var_gain_g;
+       s32 d_var_gain_b;
+       s32 d_var_gain_slope_r;
+       s32 d_var_gain_slope_g;
+       s32 d_var_gain_slope_b;
+       s32 n_var_gain_r;
+       s32 n_var_gain_g;
+       s32 n_var_gain_b;
+       s32 n_var_gain_slope_r;
+       s32 n_var_gain_slope_g;
+       s32 n_var_gain_slope_b;
+       s32 dir_thres;
+       s32 dir_thres_w;
+       s32 var_offset_coef;
+       s32 dir_gain;
+       s32 detail_gain;
+       s32 detail_gain_divisor;
+       s32 detail_level_offset;
+       s32 d_var_th_min;
+       s32 d_var_th_max;
+       s32 n_var_th_min;
+       s32 n_var_th_max;
 };
 
 #endif /* __IA_CSS_BNR2_2_PARAM_H */
index 551bd0ed3bacc087fdebda3bf553b89251a2fd48..ee9569891747a8b2caa7bc906488ada73e58001f 100644 (file)
 struct ia_css_bnr2_2_config {
        /**@{*/
        /* Directional variance gain for R/G/B components in dark region */
-       int32_t d_var_gain_r;
-       int32_t d_var_gain_g;
-       int32_t d_var_gain_b;
+       s32 d_var_gain_r;
+       s32 d_var_gain_g;
+       s32 d_var_gain_b;
        /**@}*/
        /**@{*/
        /* Slope of Directional variance gain between dark and bright region */
-       int32_t d_var_gain_slope_r;
-       int32_t d_var_gain_slope_g;
-       int32_t d_var_gain_slope_b;
+       s32 d_var_gain_slope_r;
+       s32 d_var_gain_slope_g;
+       s32 d_var_gain_slope_b;
        /**@}*/
        /**@{*/
        /* Non-Directional variance gain for R/G/B components in dark region */
-       int32_t n_var_gain_r;
-       int32_t n_var_gain_g;
-       int32_t n_var_gain_b;
+       s32 n_var_gain_r;
+       s32 n_var_gain_g;
+       s32 n_var_gain_b;
        /**@}*/
        /**@{*/
        /* Slope of Non-Directional variance gain between dark and bright region */
-       int32_t n_var_gain_slope_r;
-       int32_t n_var_gain_slope_g;
-       int32_t n_var_gain_slope_b;
+       s32 n_var_gain_slope_r;
+       s32 n_var_gain_slope_g;
+       s32 n_var_gain_slope_b;
        /**@}*/
 
-       int32_t dir_thres;              /** Threshold for directional filtering */
-       int32_t dir_thres_w;            /** Threshold width for directional filtering */
-       int32_t var_offset_coef;        /** Variance offset coefficient */
-       int32_t dir_gain;               /** Gain for directional coefficient */
-       int32_t detail_gain;            /** Gain for low contrast texture control */
-       int32_t detail_gain_divisor;    /** Gain divisor for low contrast texture control */
-       int32_t detail_level_offset;    /** Bias value for low contrast texture control */
-       int32_t d_var_th_min;           /** Minimum clipping value for directional variance*/
-       int32_t d_var_th_max;           /** Maximum clipping value for diretional variance*/
-       int32_t n_var_th_min;           /** Minimum clipping value for non-directional variance*/
-       int32_t n_var_th_max;           /** Maximum clipping value for non-directional variance*/
+       s32 dir_thres;          /** Threshold for directional filtering */
+       s32 dir_thres_w;                /** Threshold width for directional filtering */
+       s32 var_offset_coef;    /** Variance offset coefficient */
+       s32 dir_gain;           /** Gain for directional coefficient */
+       s32 detail_gain;                /** Gain for low contrast texture control */
+       s32 detail_gain_divisor;        /** Gain divisor for low contrast texture control */
+       s32 detail_level_offset;        /** Bias value for low contrast texture control */
+       s32 d_var_th_min;               /** Minimum clipping value for directional variance*/
+       s32 d_var_th_max;               /** Maximum clipping value for diretional variance*/
+       s32 n_var_th_min;               /** Minimum clipping value for non-directional variance*/
+       s32 n_var_th_max;               /** Maximum clipping value for non-directional variance*/
 };
 
 #endif /* __IA_CSS_BNR2_2_TYPES_H */
index d1baca54c3ad4f587fa56c4e0faabc81c9519a27..62489df37701df8d9c51c79889e457ca0e37e9ce 100644 (file)
@@ -23,7 +23,7 @@ void
 ia_css_bnr_encode(
        struct sh_css_isp_bnr_params *to,
        const struct ia_css_nr_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        /* BNR (Bayer Noise Reduction) */
@@ -36,13 +36,13 @@ ia_css_bnr_encode(
            uDIGIT_FITTING(from->bnr_gain, 16, SH_CSS_BNR_GAIN_SHIFT);
        to->gain_dir =
            uDIGIT_FITTING(from->bnr_gain, 16, SH_CSS_BNR_GAIN_SHIFT);
-       to->clip = uDIGIT_FITTING((unsigned)16384, 16, SH_CSS_BAYER_BITS);
+       to->clip = uDIGIT_FITTING(16384U, 16, SH_CSS_BAYER_BITS);
 }
 
 void
 ia_css_bnr_dump(
        const struct sh_css_isp_bnr_params *bnr,
-       unsigned level)
+       unsigned int level)
 {
        if (!bnr) return;
        ia_css_debug_dtrace(level, "Bayer Noise Reduction:\n");
index ccd2abc60537655ca7390e636075aac96c62f548..aa3493c39b7493561f7745582b7aaa607972a9eb 100644 (file)
@@ -24,11 +24,11 @@ void
 ia_css_bnr_encode(
        struct sh_css_isp_bnr_params *to,
        const struct ia_css_nr_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_bnr_dump(
        const struct sh_css_isp_bnr_params *bnr,
-       unsigned level);
+       unsigned int level);
 
 #endif /* __IA_CSS_DP_HOST_H */
index 331e05885ef4d02ff56f3ad8b7ee7b25f3988204..52f21ce8f4d2d9df353ec13a175e17074e3f75bf 100644 (file)
 
 /* BNR (Bayer Noise Reduction) */
 struct sh_css_isp_bnr_params {
-       int32_t gain_all;
-       int32_t gain_dir;
-       int32_t threshold_low;
-       int32_t threshold_width_log2;
-       int32_t threshold_width;
-       int32_t clip;
+       s32 gain_all;
+       s32 gain_dir;
+       s32 threshold_low;
+       s32 threshold_width_log2;
+       s32 threshold_width;
+       s32 clip;
 };
 
 #endif /* __IA_CSS_BNR_PARAM_H */
index d14fd8fc08b1e1caaf06f2346282b84551311adf..a07b68c92cd3443b0503f12a072182bae63d1e7a 100644 (file)
@@ -21,7 +21,7 @@
 /* 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,
+       void/*struct sh_css_isp_cnr_vmem_state*/ * state,
        size_t size)
 {
        memset(state, 0, size);
index 6f00d280b7d6e305cb1a9f9e100573f6c6377ac8..8430f1b64054501b9edc3426dd077dfe268c7371 100644 (file)
@@ -19,7 +19,7 @@
 
 void
 ia_css_init_cnr_state(
-       void/*struct sh_css_isp_cnr_vmem_state*/ *state,
+       void/*struct sh_css_isp_cnr_vmem_state*/ * state,
        size_t size);
 
 #endif /* __IA_CSS_CNR_HOST_H */
index 4b4b2b7154075941f045043dfa00d61bf453b021..899f6b27499434e1b6a98598b146bf5f9b1c4e4a 100644 (file)
@@ -33,7 +33,7 @@ void
 ia_css_cnr_encode(
        struct sh_css_isp_cnr_params *to,
        const struct ia_css_cnr_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->coring_u = from->coring_u;
@@ -49,18 +49,15 @@ ia_css_cnr_encode(
 void
 ia_css_cnr_dump(
        const struct sh_css_isp_cnr_params *cnr,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_cnr_debug_dtrace(
        const struct ia_css_cnr_config *config,
-       unsigned level)
+       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=%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,
@@ -69,7 +66,7 @@ ia_css_cnr_debug_dtrace(
 
 void
 ia_css_init_cnr2_state(
-       void/*struct sh_css_isp_cnr_vmem_state*/ *state,
+       void/*struct sh_css_isp_cnr_vmem_state*/ * state,
        size_t size)
 {
        memset(state, 0, size);
index abcf0eba706f4ef1ac1da97c9f8460e1080066cd..902b850cebf5082361a8580acbc420813bcd538d 100644 (file)
@@ -24,20 +24,20 @@ void
 ia_css_cnr_encode(
        struct sh_css_isp_cnr_params *to,
        const struct ia_css_cnr_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_cnr_dump(
        const struct sh_css_isp_cnr_params *cnr,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_cnr_debug_dtrace(
        const struct ia_css_cnr_config *config,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_init_cnr2_state(
-       void/*struct sh_css_isp_cnr_vmem_state*/ *state,
+       void/*struct sh_css_isp_cnr_vmem_state*/ * state,
        size_t size);
 #endif /* __IA_CSS_CNR2_HOST_H */
index d6f490e26c94d02f05aef49e6f843b7dd5ae5b17..0d2fb289772001dcae3f2b31c443e349dafe4304 100644 (file)
 
 /* CNR (Chroma Noise Reduction) */
 struct sh_css_isp_cnr_params {
-       int32_t coring_u;
-       int32_t coring_v;
-       int32_t sense_gain_vy;
-       int32_t sense_gain_vu;
-       int32_t sense_gain_vv;
-       int32_t sense_gain_hy;
-       int32_t sense_gain_hu;
-       int32_t sense_gain_hv;
+       s32 coring_u;
+       s32 coring_v;
+       s32 sense_gain_vy;
+       s32 sense_gain_vu;
+       s32 sense_gain_vv;
+       s32 sense_gain_hy;
+       s32 sense_gain_hu;
+       s32 sense_gain_hv;
 };
 
 #endif /* __IA_CSS_CNR2_PARAM_H */
index 3ebc069d8ada9f3f1d0e64db4d4c5ee845dcce95..35fc2e77eb3d0c58f1b54d00d6a41c2bccb4bf33 100644 (file)
  *  ISP2: CNR2 is used for Still.
  */
 struct ia_css_cnr_config {
-       uint16_t coring_u;      /** Coring level of U.
+       u16 coring_u;   /** Coring level of U.
                                u0.13, [0,8191], default/ineffective 0 */
-       uint16_t coring_v;      /** Coring level of V.
+       u16 coring_v;   /** Coring level of V.
                                u0.13, [0,8191], default/ineffective 0 */
-       uint16_t sense_gain_vy; /** Sensitivity of horizontal edge of Y.
+       u16 sense_gain_vy;      /** Sensitivity of horizontal edge of Y.
                                u13.0, [0,8191], default 100, ineffective 8191 */
-       uint16_t sense_gain_vu; /** Sensitivity of horizontal edge of U.
+       u16 sense_gain_vu;      /** Sensitivity of horizontal edge of U.
                                u13.0, [0,8191], default 100, ineffective 8191 */
-       uint16_t sense_gain_vv; /** Sensitivity of horizontal edge of V.
+       u16 sense_gain_vv;      /** Sensitivity of horizontal edge of V.
                                u13.0, [0,8191], default 100, ineffective 8191 */
-       uint16_t sense_gain_hy; /** Sensitivity of vertical edge of Y.
+       u16 sense_gain_hy;      /** Sensitivity of vertical edge of Y.
                                u13.0, [0,8191], default 50, ineffective 8191 */
-       uint16_t sense_gain_hu; /** Sensitivity of vertical edge of U.
+       u16 sense_gain_hu;      /** Sensitivity of vertical edge of U.
                                u13.0, [0,8191], default 50, ineffective 8191 */
-       uint16_t sense_gain_hv; /** Sensitivity of vertical edge of V.
+       u16 sense_gain_hv;      /** Sensitivity of vertical edge of V.
                                u13.0, [0,8191], default 50, ineffective 8191 */
 };
 
 #endif /* __IA_CSS_CNR2_TYPES_H */
-
index 8f25ee180cda6434925447372b46d1c15f4027ca..d7c814d3c41023219baea7dd588db5e7e06c7366 100644 (file)
@@ -26,7 +26,7 @@ void
 ia_css_conversion_encode(
        struct sh_css_isp_conversion_params *to,
        const struct ia_css_conversion_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->en     = from->en;
index da7a0a034a71568e3acdc62e56e1d20def6e6f68..6f798811c9ab806fb253a2a9dd5a83df72bd4bc8 100644 (file)
@@ -24,7 +24,7 @@ void
 ia_css_conversion_encode(
        struct sh_css_isp_conversion_params *to,
        const struct ia_css_conversion_config *from,
-       unsigned size);
+       unsigned int size);
 
 #ifdef ISP2401
 /* workaround until code generation in isp_kernelparameters.host.c is fixed */
index 301d506f447e358daf5cc453cd0b9bc0cc344268..3a6ede394bdcbbf32dfb53520005e75e2ae200c1 100644 (file)
 
 /* CONVERSION */
 struct sh_css_isp_conversion_params {
-       uint32_t en;
-       uint32_t dummy0;
-       uint32_t dummy1;
-       uint32_t dummy2;
+       u32 en;
+       u32 dummy0;
+       u32 dummy1;
+       u32 dummy2;
 };
 
 #endif /* __IA_CSS_CONVERSION_PARAM_H */
index 47a38fd65950be7a1367f79ee10d5d31c03f04f8..79a626fe3a296316806866051104920ef524cce7 100644 (file)
  *
  */
 struct ia_css_conversion_config {
-       uint32_t en;     /** en parameter */
-       uint32_t dummy0; /** dummy0 dummy parameter 0 */
-       uint32_t dummy1; /** dummy1 dummy parameter 1 */
-       uint32_t dummy2; /** dummy2 dummy parameter 2 */
+       u32 en;     /** en parameter */
+       u32 dummy0; /** dummy0 dummy parameter 0 */
+       u32 dummy1; /** dummy1 dummy parameter 1 */
+       u32 dummy2; /** dummy2 dummy parameter 2 */
 };
 
 #endif /* __IA_CSS_CONVERSION_TYPES_H */
index 45e1ea8b1fb0e7ef60f5bbe23073305191727dbf..18e40c37510b304f68804d40f9bfc525b924e5d4 100644 (file)
@@ -27,7 +27,7 @@ void
 ia_css_copy_output_config(
        struct sh_css_isp_copy_output_isp_config      *to,
        const struct ia_css_copy_output_configuration *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->enable = from->enable;
@@ -44,4 +44,3 @@ ia_css_copy_output_configure(
 
        ia_css_configure_copy_output(binary, &config);
 }
-
index 3eb77365f8d0124bf8ecf50006a519741af8c437..0e12d80df9d76dec71bd3fbe2a65d2608f972e47 100644 (file)
@@ -24,7 +24,7 @@ void
 ia_css_copy_output_config(
        struct sh_css_isp_copy_output_isp_config      *to,
        const struct ia_css_copy_output_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_copy_output_configure(
index 622d9181e13fb337890001ce495974aec61b9b22..587d0c62c9364430864f735ee8a2640424775d25 100644 (file)
@@ -20,7 +20,7 @@ struct ia_css_copy_output_configuration {
 };
 
 struct sh_css_isp_copy_output_isp_config {
-       uint32_t enable;
+       u32 enable;
 };
 
 #endif /* __IA_CSS_COPY_PARAM_H */
index 92905220d862e1405c2e62891c018df3bc9fd0c9..4f541971a1fdb901895b44acb2db61c6ae12cf43 100644 (file)
@@ -29,7 +29,7 @@ void
 ia_css_crop_encode(
        struct sh_css_isp_crop_isp_params *to,
        const struct ia_css_crop_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->crop_pos = from->crop_pos;
@@ -39,16 +39,16 @@ void
 ia_css_crop_config(
        struct sh_css_isp_crop_isp_config *to,
        const struct ia_css_crop_configuration  *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned elems_a = ISP_VEC_NELEMS;
+       unsigned int elems_a = ISP_VEC_NELEMS;
 
        (void)size;
        ia_css_dma_configure_from_info(&to->port_b, from->info);
        to->width_a_over_b = elems_a / to->port_b.elems;
 
        /* Assume divisiblity here, may need to generalize to fixed point. */
-       assert (elems_a % to->port_b.elems == 0);
+       assert(elems_a % to->port_b.elems == 0);
 }
 
 void
index 9c1a4c7cac983406e06bcb4122fe00a86316f4cb..5d2bf405946c5d937fc805075d4e7991c91da76d 100644 (file)
@@ -25,13 +25,13 @@ void
 ia_css_crop_encode(
        struct sh_css_isp_crop_isp_params *to,
        const struct ia_css_crop_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_crop_config(
        struct sh_css_isp_crop_isp_config      *to,
        const struct ia_css_crop_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_crop_configure(
index 0f1812cdd92ab47a2416562da69af13da420f028..35835929d252413b7b70f0059ef8896a778752e6 100644 (file)
@@ -21,7 +21,7 @@
 
 /* Crop frame */
 struct sh_css_isp_crop_isp_config {
-       uint32_t width_a_over_b;
+       u32 width_a_over_b;
        struct dma_port_config port_b;
 };
 
index 9f94ef1de5725df5b7b74ed919d888a79b76d713..732ca773722c14eb094df31cc4a26f5cebb14191 100644 (file)
@@ -30,23 +30,23 @@ void
 ia_css_encode_cc(
        struct sh_css_isp_csc_params *to,
        const struct ia_css_cc_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
 #ifndef IA_CSS_NO_DEBUG
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_encode_cc() enter:\n");
 #endif
 
-       to->m_shift    = (int16_t) from->fraction_bits;
-       to->m00 = (int16_t) from->matrix[0];
-       to->m01 = (int16_t) from->matrix[1];
-       to->m02 = (int16_t) from->matrix[2];
-       to->m10 = (int16_t) from->matrix[3];
-       to->m11 = (int16_t) from->matrix[4];
-       to->m12 = (int16_t) from->matrix[5];
-       to->m20 = (int16_t) from->matrix[6];
-       to->m21 = (int16_t) from->matrix[7];
-       to->m22 = (int16_t) from->matrix[8];
+       to->m_shift    = (int16_t)from->fraction_bits;
+       to->m00 = (int16_t)from->matrix[0];
+       to->m01 = (int16_t)from->matrix[1];
+       to->m02 = (int16_t)from->matrix[2];
+       to->m10 = (int16_t)from->matrix[3];
+       to->m11 = (int16_t)from->matrix[4];
+       to->m12 = (int16_t)from->matrix[5];
+       to->m20 = (int16_t)from->matrix[6];
+       to->m21 = (int16_t)from->matrix[7];
+       to->m22 = (int16_t)from->matrix[8];
 
 #ifndef IA_CSS_NO_DEBUG
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_encode_cc() leave:\n");
@@ -57,7 +57,7 @@ void
 ia_css_csc_encode(
        struct sh_css_isp_csc_params *to,
        const struct ia_css_cc_config *from,
-       unsigned size)
+       unsigned int size)
 {
        ia_css_encode_cc(to, from, size);
 }
@@ -66,7 +66,7 @@ ia_css_csc_encode(
 void
 ia_css_cc_dump(
        const struct sh_css_isp_csc_params *csc,
-       unsigned level,
+       unsigned int level,
        const char *name)
 {
        if (!csc) return;
@@ -106,7 +106,7 @@ ia_css_cc_dump(
 void
 ia_css_csc_dump(
        const struct sh_css_isp_csc_params *csc,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_cc_dump(csc, level, "Color Space Conversion");
 }
@@ -114,14 +114,10 @@ ia_css_csc_dump(
 void
 ia_css_cc_config_debug_dtrace(
        const struct ia_css_cc_config *config,
-       unsigned level)
+       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.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],
@@ -129,4 +125,3 @@ ia_css_cc_config_debug_dtrace(
                config->matrix[7], config->matrix[8]);
 }
 #endif
-
index eb10d8a5709da15fd52f4ccb33692809f8c60018..2c9fec710d12b7d86e6fa6d2ff6dfda8fab07a71 100644 (file)
@@ -24,29 +24,29 @@ void
 ia_css_encode_cc(
        struct sh_css_isp_csc_params *to,
        const struct ia_css_cc_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_csc_encode(
        struct sh_css_isp_csc_params *to,
        const struct ia_css_cc_config *from,
-       unsigned size);
+       unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_cc_dump(
-       const struct sh_css_isp_csc_params *csc, unsigned level,
+       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 level);
+       unsigned int level);
 
 void
 ia_css_cc_config_debug_dtrace(
        const struct ia_css_cc_config *config,
-       unsigned level);
+       unsigned int level);
 
 #define ia_css_csc_debug_dtrace ia_css_cc_config_debug_dtrace
 #endif
index 0b054a939baf8cc767cba5edaea0332f4e78e717..53e270df2db7e2740c8c0b3972a89b763f327450 100644 (file)
 #include "type_support.h"
 /* CSC (Color Space Conversion) */
 struct sh_css_isp_csc_params {
-       uint16_t        m_shift;
-       int16_t         m00;
-       int16_t         m01;
-       int16_t         m02;
-       int16_t         m10;
-       int16_t         m11;
-       int16_t         m12;
-       int16_t         m20;
-       int16_t         m21;
-       int16_t         m22;
+       u16     m_shift;
+       s16             m00;
+       s16             m01;
+       s16             m02;
+       s16             m10;
+       s16             m11;
+       s16             m12;
+       s16             m20;
+       s16             m21;
+       s16             m22;
 };
 
-
 #endif /* __IA_CSS_CSC_PARAM_H */
index 10404380c63731e432496fc62696acd508c20554..d49203d322bd1fc8aaf3740f682191181253c9f2 100644 (file)
  *
  *  default/ineffective:
  *  1. YCgCo -> YUV
- *     1       0.174           0.185
- *     0       -0.66252        -0.66874
- *     0       -0.83738        0.58131
+ *     1       0.174           0.185
+ *     0       -0.66252        -0.66874
+ *     0       -0.83738        0.58131
  *
  *     fraction_bits = 12
- *     4096    713     758
- *     0       -2714   -2739
- *     0       -3430   2381
+ *     4096    713     758
+ *     0       -2714   -2739
+ *     0       -3430   2381
  *
  *  2. YCgCo -> RGB
- *     1       -1      1
- *     1       1       0
- *     1       -1      -1
+ *     1       -1      1
+ *     1       1       0
+ *     1       -1      -1
  *
  *     fraction_bits = 12
- *     4096    -4096   4096
- *     4096    4096    0
- *     4096    -4096   -4096
+ *     4096    -4096   4096
+ *     4096    4096    0
+ *     4096    -4096   -4096
  *
  *  3. RGB -> YUV
  *     0.299      0.587        0.114
- *     -0.16874   -0.33126     0.5
- *     0.5        -0.41869     -0.08131
+ *     -0.16874   -0.33126     0.5
+ *     0.5        -0.41869     -0.08131
  *
  *     fraction_bits = 13
- *     2449    4809    934
- *     -1382   -2714   4096
- *     4096    -3430   -666
+ *     2449    4809    934
+ *     -1382   -2714   4096
+ *     4096    -3430   -666
  */
 struct ia_css_cc_config {
-       uint32_t fraction_bits;/** Fractional bits of matrix.
+       u32 fraction_bits;/** Fractional bits of matrix.
                                        u8.0, [0,13] */
-       int32_t matrix[3 * 3]; /** Conversion matrix.
+       s32 matrix[3 * 3]; /** Conversion matrix.
                                        s[13-fraction_bits].[fraction_bits],
                                        [-8192,8191] */
 };
index e27648c46a258e19650f6c63f06ef909e635083b..7558d80c0ff4b209997d96b65a564da4d60d2924 100644 (file)
@@ -44,8 +44,8 @@ static void ctc_gradient(
        assert(y0 >= 0 && y0 <= max_dydx);
        assert(y1 >= 0 && y1 <= max_dydx);
        assert(x0 < x1);
-       assert(dydx != NULL);
-       assert(shift != NULL);
+       assert(dydx);
+       assert(shift);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ctc_gradient() enter:\n");
 
@@ -71,7 +71,7 @@ void
 ia_css_ctc_encode(
        struct sh_css_isp_ctc_params *to,
        const struct ia_css_ctc_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->y0 = from->y0;
@@ -88,13 +88,13 @@ ia_css_ctc_encode(
        to->x3 = from->x3;
        to->x4 = from->x4;
 
-       ctc_gradient(&(to->dydx0),
-                    &(to->dydx0_shift),
+       ctc_gradient(&to->dydx0,
+                    &to->dydx0_shift,
                     from->y1, from->y0,
                     from->x1, 0);
 
-       ctc_gradient(&(to->dydx1),
-                    &(to->dydx1_shift),
+       ctc_gradient(&to->dydx1,
+                    &to->dydx1_shift,
                     from->y2, from->y1,
                     from->x2, from->x1);
 
@@ -108,8 +108,8 @@ ia_css_ctc_encode(
                     from->y4, from->y3,
                     from->x4, from->x3);
 
-       ctc_gradient(&(to->dydx4),
-                    &(to->dydx4_shift),
+       ctc_gradient(&to->dydx4,
+                    &to->dydx4_shift,
                     from->y5, from->y4,
                     SH_CSS_BAYER_MAXVAL, from->x4);
 }
@@ -117,4 +117,4 @@ ia_css_ctc_encode(
 void
 ia_css_ctc_dump(
        const struct sh_css_isp_ctc_params *ctc,
-       unsigned level);
+       unsigned int level);
index d943aff28152486cad41df111068ecac7276339c..c5b28151529f6d8bc0b04f4965f52430de9e3e4a 100644 (file)
@@ -23,11 +23,11 @@ void
 ia_css_ctc_encode(
        struct sh_css_isp_ctc_params *to,
        const struct ia_css_ctc_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_ctc_dump(
        const struct sh_css_isp_ctc_params *ctc,
-       unsigned level);
+       unsigned int level);
 
 #endif /* __IA_CSS_CTC1_5_HOST_H */
index 8d9ac2b1832c3f2a4369019fdb490bae13da670d..95cf34ef4ed23cec1492e70798d4d179e3282d89 100644 (file)
 
 /* CTC (Color Tone Control) */
 struct sh_css_isp_ctc_params {
-       int32_t y0;
-       int32_t y1;
-       int32_t y2;
-       int32_t y3;
-       int32_t y4;
-       int32_t y5;
-       int32_t ce_gain_exp;
-       int32_t x1;
-       int32_t x2;
-       int32_t x3;
-       int32_t x4;
-       int32_t dydx0;
-       int32_t dydx0_shift;
-       int32_t dydx1;
-       int32_t dydx1_shift;
-       int32_t dydx2;
-       int32_t dydx2_shift;
-       int32_t dydx3;
-       int32_t dydx3_shift;
-       int32_t dydx4;
-       int32_t dydx4_shift;
+       s32 y0;
+       s32 y1;
+       s32 y2;
+       s32 y3;
+       s32 y4;
+       s32 y5;
+       s32 ce_gain_exp;
+       s32 x1;
+       s32 x2;
+       s32 x3;
+       s32 x4;
+       s32 dydx0;
+       s32 dydx0_shift;
+       s32 dydx1;
+       s32 dydx1_shift;
+       s32 dydx2;
+       s32 dydx2_shift;
+       s32 dydx3;
+       s32 dydx3_shift;
+       s32 dydx4;
+       s32 dydx4_shift;
 };
 
 #endif /* __IA_CSS_CTC1_5_PARAM_H */
index 74fc102a8192a8bbba88b405b9511abc8ed722aa..9a447f14b869afcebef2988290ff847135aec1a3 100644 (file)
@@ -54,13 +54,13 @@ static int ctc2_slope(int y1, int y0, int x1, int x0)
 
        if (dy < 0)
                rounding = -rounding;
-       slope = (int) (dy_shift + rounding) / dx;
+       slope = (int)(dy_shift + rounding) / dx;
 
        /*the slope must lie within the range
          (-max_slope-1) >= (dydx) >= (max_slope)
        */
-       if (slope <= -max_slope-1) {
-               dydx = -max_slope-1;
+       if (slope <= -max_slope - 1) {
+               dydx = -max_slope - 1;
        } else if (slope >= max_slope) {
                dydx = max_slope;
        } else {
@@ -78,9 +78,9 @@ void ia_css_ctc2_vmem_encode(struct ia_css_isp_ctc2_vmem_params *to,
                             const struct ia_css_ctc2_config *from,
                             size_t size)
 {
-       unsigned i, j;
-       const unsigned shffl_blck = 4;
-       const unsigned length_zeros = 11;
+       unsigned int i, j;
+       const unsigned int shffl_blck = 4;
+       const unsigned int length_zeros = 11;
        short dydx0, dydx1, dydx2, dydx3, dydx4;
 
        (void)size;
@@ -130,7 +130,7 @@ void ia_css_ctc2_vmem_encode(struct ia_css_isp_ctc2_vmem_params *to,
                for (j = 0; j < length_zeros; j++) {
                        to->y_x[0][(i << shffl_blck) + 5 + j] = 0;
                        to->y_y[0][(i << shffl_blck) + 5 + j] = 0;
-                       to->e_y_slope[0][(i << shffl_blck)+ 5 + j] = 0;
+                       to->e_y_slope[0][(i << shffl_blck) + 5 + j] = 0;
                }
        }
 }
index ad7040c9d7cbf8944642167598422cda9990cc53..224bdb199942c59a66965ea3acf0186be57681dc 100644 (file)
@@ -33,17 +33,16 @@ struct ia_css_isp_ctc2_vmem_params {
 
 /*DMEM Chroma params*/
 struct ia_css_isp_ctc2_dmem_params {
-
        /* Gains by UV(Chroma) under kneepoints uv_x0 and uv_x1*/
-       int32_t uv_y0;
-       int32_t uv_y1;
+       s32 uv_y0;
+       s32 uv_y1;
 
        /* Kneepoints by UV(Chroma)- uv_x0 and uv_x1*/
-       int32_t uv_x0;
-       int32_t uv_x1;
+       s32 uv_x0;
+       s32 uv_x1;
 
        /* Slope of line interconnecting uv_x0 -> uv_x1*/
-       int32_t uv_dydx;
+       s32 uv_dydx;
 
 };
 #endif /* __IA_CSS_CTC2_PARAM_H */
index 1222cf33e8511757084e733490014869be11182f..be9cd8c9c470561d83f02cb3dae649f47a074392 100644 (file)
 *  ISP261: CTC2 (CTC by Fast Approximate Distance)
 */
 struct ia_css_ctc2_config {
-
        /** Gains by Y(Luma) at Y =0.0,Y_X1, Y_X2, Y_X3, Y_X4 and Y_X5
        *   --default/ineffective value: 4096(0.5f)
        */
-       int32_t y_y0;
-       int32_t y_y1;
-       int32_t y_y2;
-       int32_t y_y3;
-       int32_t y_y4;
-       int32_t y_y5;
+       s32 y_y0;
+       s32 y_y1;
+       s32 y_y2;
+       s32 y_y3;
+       s32 y_y4;
+       s32 y_y5;
        /* 1st-4th  kneepoints by Y(Luma) --default/ineffective value:n/a
        *   requirement: 0.0 < y_x1 < y_x2 <y _x3 < y_x4 < 1.0
        */
-       int32_t y_x1;
-       int32_t y_x2;
-       int32_t y_x3;
-       int32_t y_x4;
+       s32 y_x1;
+       s32 y_x2;
+       s32 y_x3;
+       s32 y_x4;
        /* Gains by UV(Chroma) under threholds uv_x0 and uv_x1
        *   --default/ineffective value: 4096(0.5f)
        */
-       int32_t uv_y0;
-       int32_t uv_y1;
+       s32 uv_y0;
+       s32 uv_y1;
        /* Minimum and Maximum Thresholds by UV(Chroma)- uv_x0 and uv_x1
        *   --default/ineffective value: n/a
        */
-       int32_t uv_x0;
-       int32_t uv_x1;
+       s32 uv_x0;
+       s32 uv_x1;
        };
 
 #endif /* __IA_CSS_CTC2_TYPES_H */
index 7c1a367918a07e62e819df4be4373c9c5da78b61..580b5a84f93332d4843cdf6db48d57c90dca0e03 100644 (file)
@@ -37,27 +37,22 @@ void
 ia_css_ctc_vamem_encode(
        struct sh_css_isp_ctc_vamem_params *to,
        const struct ia_css_ctc_table *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
-       memcpy (&to->ctc,  &from->data, sizeof(to->ctc));
+       memcpy(&to->ctc,  &from->data, sizeof(to->ctc));
 }
 
 void
 ia_css_ctc_debug_dtrace(
        const struct ia_css_ctc_config *config,
-       unsigned level)
+       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=%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 bec52a6519f9752f4b7d2acf4c5edac16ac47385..d044071b690d3d389f81449bf17aad59a00c9b03 100644 (file)
@@ -26,11 +26,11 @@ void
 ia_css_ctc_vamem_encode(
        struct sh_css_isp_ctc_vamem_params *to,
        const struct ia_css_ctc_table *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_ctc_debug_dtrace(
-       const struct ia_css_ctc_config *config, unsigned level)
+       const struct ia_css_ctc_config *config, unsigned int level)
 ;
 
 #endif /* __IA_CSS_CTC_HOST_H */
index 6e88ad3d24201d0e9a57130ebb0af07df5d4a9a8..6e541a0ebaa9071ca35acbaa4057d7abb492ace2 100644 (file)
@@ -28,7 +28,7 @@
 #define SH_CSS_ISP_CTC_TABLE_SIZE_LOG2       IA_CSS_VAMEM_1_CTC_TABLE_SIZE_LOG2
 #define SH_CSS_ISP_CTC_TABLE_SIZE            IA_CSS_VAMEM_1_CTC_TABLE_SIZE
 #else
-#error "VAMEM should be {VERSION1, VERSION2}" 
+#error "VAMEM should be {VERSION1, VERSION2}"
 #endif
 
 #else
@@ -38,7 +38,7 @@
 
 /* This should be vamem_data_t, but that breaks the pipe generator */
 struct sh_css_isp_ctc_vamem_params {
-       uint16_t ctc[SH_CSS_ISP_CTC_TABLE_SIZE];
+       u16 ctc[SH_CSS_ISP_CTC_TABLE_SIZE];
 };
 
 #endif /* __IA_CSS_CTC_PARAM_H */
index 4ac47ce10566f0770151374c6b4a9f3106de3428..f6f5ec28827fe1fc30c3bb2919405b0c8dd2a1ca 100644 (file)
@@ -15,6 +15,8 @@
 #ifndef __IA_CSS_CTC_TYPES_H
 #define __IA_CSS_CTC_TYPES_H
 
+#include <linux/bitops.h>
+
 /* @file
 * CSS-API header file for Chroma Tone Control parameters.
 */
 /* Number of elements in the CTC table. */
 #define IA_CSS_VAMEM_1_CTC_TABLE_SIZE_LOG2      10
 /* Number of elements in the CTC table. */
-#define IA_CSS_VAMEM_1_CTC_TABLE_SIZE           (1U<<IA_CSS_VAMEM_1_CTC_TABLE_SIZE_LOG2)
+#define IA_CSS_VAMEM_1_CTC_TABLE_SIZE           BIT(IA_CSS_VAMEM_1_CTC_TABLE_SIZE_LOG2)
 
 /* Number of elements in the CTC table. */
 #define IA_CSS_VAMEM_2_CTC_TABLE_SIZE_LOG2      8
 /* Number of elements in the CTC table. */
-#define IA_CSS_VAMEM_2_CTC_TABLE_SIZE           ((1U<<IA_CSS_VAMEM_2_CTC_TABLE_SIZE_LOG2) + 1)
+#define IA_CSS_VAMEM_2_CTC_TABLE_SIZE           ((1U << IA_CSS_VAMEM_2_CTC_TABLE_SIZE_LOG2) + 1)
 
 enum ia_css_vamem_type {
        IA_CSS_VAMEM_TYPE_1,
@@ -54,44 +56,44 @@ enum ia_css_vamem_type {
  *  ISP2: CTC2 is used.
  */
 struct ia_css_ctc_config {
-       uint16_t y0;    /** 1st kneepoint gain.
+       u16 y0; /** 1st kneepoint gain.
                                u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
                                default/ineffective 4096(0.5) */
-       uint16_t y1;    /** 2nd kneepoint gain.
+       u16 y1; /** 2nd kneepoint gain.
                                u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
                                default/ineffective 4096(0.5) */
-       uint16_t y2;    /** 3rd kneepoint gain.
+       u16 y2; /** 3rd kneepoint gain.
                                u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
                                default/ineffective 4096(0.5) */
-       uint16_t y3;    /** 4th kneepoint gain.
+       u16 y3; /** 4th kneepoint gain.
                                u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
                                default/ineffective 4096(0.5) */
-       uint16_t y4;    /** 5th kneepoint gain.
+       u16 y4; /** 5th kneepoint gain.
                                u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
                                default/ineffective 4096(0.5) */
-       uint16_t y5;    /** 6th kneepoint gain.
+       u16 y5; /** 6th kneepoint gain.
                                u[ce_gain_exp].[13-ce_gain_exp], [0,8191],
                                default/ineffective 4096(0.5) */
-       uint16_t ce_gain_exp;   /** Common exponent of y-axis gain.
+       u16 ce_gain_exp;        /** Common exponent of y-axis gain.
                                u8.0, [0,13],
                                default/ineffective 1 */
-       uint16_t x1;    /** 2nd kneepoint luma.
+       u16 x1; /** 2nd kneepoint luma.
                                u0.13, [0,8191], constraints: 0<x1<x2,
                                default/ineffective 1024 */
-       uint16_t x2;    /** 3rd kneepoint luma.
+       u16 x2; /** 3rd kneepoint luma.
                                u0.13, [0,8191], constraints: x1<x2<x3,
                                default/ineffective 2048 */
-       uint16_t x3;    /** 4th kneepoint luma.
+       u16 x3; /** 4th kneepoint luma.
                                u0.13, [0,8191], constraints: x2<x3<x4,
                                default/ineffective 6144 */
-       uint16_t x4;    /** 5tn kneepoint luma.
+       u16 x4; /** 5tn kneepoint luma.
                                u0.13, [0,8191], constraints: x3<x4<8191,
                                default/ineffective 7168 */
 };
 
 union ia_css_ctc_data {
-       uint16_t vamem_1[IA_CSS_VAMEM_1_CTC_TABLE_SIZE];
-       uint16_t vamem_2[IA_CSS_VAMEM_2_CTC_TABLE_SIZE];
+       u16 vamem_1[IA_CSS_VAMEM_1_CTC_TABLE_SIZE];
+       u16 vamem_2[IA_CSS_VAMEM_2_CTC_TABLE_SIZE];
 };
 
 /* CTC table, used for Chroma Tone Control.
@@ -106,5 +108,3 @@ struct ia_css_ctc_table {
 };
 
 #endif /* __IA_CSS_CTC_TYPES_H */
-
-
index fbab2f1c396cfbf94ea4c0f75988c6d91e370a9e..4eb96b4dc8dcf8d2a55a103cf55cb3aa0bef8e9a 100644 (file)
@@ -28,7 +28,7 @@ void
 ia_css_de_encode(
        struct sh_css_isp_de_params *to,
        const struct ia_css_de_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->pixelnoise =
@@ -44,7 +44,7 @@ ia_css_de_encode(
 void
 ia_css_de_dump(
        const struct sh_css_isp_de_params *de,
-       unsigned level)
+       unsigned int level)
 {
        if (!de) return;
        ia_css_debug_dtrace(level, "Demosaic:\n");
@@ -61,18 +61,17 @@ ia_css_de_dump(
 void
 ia_css_de_debug_dtrace(
        const struct ia_css_de_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.pixelnoise=%d, "
-               "config.c1_coring_threshold=%d, config.c2_coring_threshold=%d\n",
+               "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,
+       void/*struct sh_css_isp_de_vmem_state*/ * state,
        size_t size)
 {
        memset(state, 0, size);
index 5dd6f06f2bf14051337e07671e30ea55439e6c2b..b7b28af365c556afac77717fedb41b55f37e9cf2 100644 (file)
@@ -24,21 +24,21 @@ void
 ia_css_de_encode(
        struct sh_css_isp_de_params *to,
        const struct ia_css_de_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_de_dump(
        const struct sh_css_isp_de_params *de,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_de_debug_dtrace(
        const struct ia_css_de_config *config,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_init_de_state(
-       void/*struct sh_css_isp_de_vmem_state*/ *state,
+       void/*struct sh_css_isp_de_vmem_state*/ * state,
        size_t size);
 
 #endif /* __IA_CSS_DE_HOST_H */
index 833c80afc7a848c8df950b3afafdff4f65d3c6ee..c85a57e194cc300052f8d5eb9779256d1249684b 100644 (file)
@@ -19,9 +19,9 @@
 
 /* DE (Demosaic) */
 struct sh_css_isp_de_params {
-       int32_t pixelnoise;
-       int32_t c1_coring_threshold;
-       int32_t c2_coring_threshold;
+       s32 pixelnoise;
+       s32 c1_coring_threshold;
+       s32 c2_coring_threshold;
 };
 
 #endif /* __IA_CSS_DE_PARAM_H */
index d64511763436208637f28732c6868b2350cd1a21..eddd9ae7d05f29b3ae5a6812216c698b27c905da 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 a5247a57bafbbed43f8ec637a8c8e49523e50834..d459ec9a973bc702b17dc00ae7c59448a9d4db60 100644 (file)
@@ -28,7 +28,7 @@ void
 ia_css_ecd_encode(
        struct sh_css_isp_ecd_params *to,
        const struct ia_css_ecd_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->zip_strength = from->zip_strength;
@@ -39,16 +39,15 @@ ia_css_ecd_encode(
 void
 ia_css_ecd_dump(
        const struct sh_css_isp_ecd_params *ecd,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_ecd_debug_dtrace(
        const struct ia_css_ecd_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.zip_strength=%d, "
-               "config.fc_strength=%d, config.fc_debias=%d\n",
+               "config.zip_strength=%d, config.fc_strength=%d, config.fc_debias=%d\n",
                config->zip_strength,
                config->fc_strength, config->fc_debias);
 }
index f7cd8448cb304b455cfc9b8542115724e38eb6d8..69c5d2533ef7e3dba181bf5362a551a64c0a46e5 100644 (file)
@@ -24,15 +24,15 @@ void
 ia_css_ecd_encode(
        struct sh_css_isp_ecd_params *to,
        const struct ia_css_ecd_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_ecd_dump(
        const struct sh_css_isp_ecd_params *ecd,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_ecd_debug_dtrace(
-       const struct ia_css_ecd_config *config, unsigned level);
+       const struct ia_css_ecd_config *config, unsigned int level);
 
 #endif /* __IA_CSS_DE2_HOST_H */
index ea2da73a4927273a7e0af1e25e85b545e6f944cc..868dfaaf78c781662e66d1e737b48e36fbb3d252 100644 (file)
@@ -22,9 +22,9 @@
 
 /* DE (Demosaic) */
 struct sh_css_isp_ecd_params {
-       int32_t zip_strength;
-       int32_t fc_strength;
-       int32_t fc_debias;
+       s32 zip_strength;
+       s32 fc_strength;
+       s32 fc_debias;
 };
 
 #endif /* __IA_CSS_DE2_PARAM_H */
index 50bdde419bb1247708aae4a46ea8cc94556c5146..24700d256bfddd7ec856782132cf551aed5fa31b 100644 (file)
  *  ISP2: DE2 is used.
  */
 struct ia_css_ecd_config {
-       uint16_t zip_strength;  /** Strength of zipper reduction.
+       u16 zip_strength;       /** Strength of zipper reduction.
                                u0.13, [0,8191],
                                default 5489(0.67), ineffective 0 */
-       uint16_t fc_strength;   /** Strength of false color reduction.
+       u16 fc_strength;        /** Strength of false color reduction.
                                u0.13, [0,8191],
                                default 8191(almost 1.0), ineffective 0 */
-       uint16_t fc_debias;     /** Prevent color change
+       u16 fc_debias;  /** Prevent color change
                                     on noise or Gr/Gb imbalance.
                                u0.13, [0,8191],
                                default 0, ineffective 0 */
 };
 
 #endif /* __IA_CSS_DE2_TYPES_H */
-
index b1f9dc8d662d64f3fa761a86e73df5b28bf59e7c..039865b6a44634be243b84a583e68cfd86260271 100644 (file)
@@ -46,7 +46,7 @@ void
 ia_css_dp_encode(
        struct sh_css_isp_dp_params *to,
        const struct ia_css_dp_config *from,
-       unsigned size)
+       unsigned int size)
 {
        int gain = from->gain;
        int gr   = from->gr;
@@ -63,27 +63,27 @@ ia_css_dp_encode(
            uDIGIT_FITTING(from->gain, 8, SH_CSS_DP_GAIN_SHIFT);
 
        to->coef_rr_gr =
-           uDIGIT_FITTING (gain * gr / r, 8, SH_CSS_DP_GAIN_SHIFT);
+           uDIGIT_FITTING(gain * gr / r, 8, SH_CSS_DP_GAIN_SHIFT);
        to->coef_rr_gb =
-           uDIGIT_FITTING (gain * gb / r, 8, SH_CSS_DP_GAIN_SHIFT);
+           uDIGIT_FITTING(gain * gb / r, 8, SH_CSS_DP_GAIN_SHIFT);
        to->coef_bb_gb =
-           uDIGIT_FITTING (gain * gb / b, 8, SH_CSS_DP_GAIN_SHIFT);
+           uDIGIT_FITTING(gain * gb / b, 8, SH_CSS_DP_GAIN_SHIFT);
        to->coef_bb_gr =
-           uDIGIT_FITTING (gain * gr / b, 8, SH_CSS_DP_GAIN_SHIFT);
+           uDIGIT_FITTING(gain * gr / b, 8, SH_CSS_DP_GAIN_SHIFT);
        to->coef_gr_rr =
-           uDIGIT_FITTING (gain * r / gr, 8, SH_CSS_DP_GAIN_SHIFT);
+           uDIGIT_FITTING(gain * r / gr, 8, SH_CSS_DP_GAIN_SHIFT);
        to->coef_gr_bb =
-           uDIGIT_FITTING (gain * b / gr, 8, SH_CSS_DP_GAIN_SHIFT);
+           uDIGIT_FITTING(gain * b / gr, 8, SH_CSS_DP_GAIN_SHIFT);
        to->coef_gb_bb =
-           uDIGIT_FITTING (gain * b / gb, 8, SH_CSS_DP_GAIN_SHIFT);
+           uDIGIT_FITTING(gain * b / gb, 8, SH_CSS_DP_GAIN_SHIFT);
        to->coef_gb_rr =
-           uDIGIT_FITTING (gain * r / gb, 8, SH_CSS_DP_GAIN_SHIFT);
+           uDIGIT_FITTING(gain * r / gb, 8, SH_CSS_DP_GAIN_SHIFT);
 }
 
 void
 ia_css_dp_dump(
        const struct sh_css_isp_dp_params *dp,
-       unsigned level)
+       unsigned int level)
 {
        if (!dp) return;
        ia_css_debug_dtrace(level, "Defect Pixel Correction:\n");
@@ -116,7 +116,7 @@ ia_css_dp_dump(
 void
 ia_css_dp_debug_dtrace(
        const struct ia_css_dp_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
                "config.threshold=%d, config.gain=%d\n",
@@ -125,7 +125,7 @@ ia_css_dp_debug_dtrace(
 
 void
 ia_css_init_dp_state(
-       void/*struct sh_css_isp_dp_vmem_state*/ *state,
+       void/*struct sh_css_isp_dp_vmem_state*/ * state,
        size_t size)
 {
        memset(state, 0, size);
index db21814ad3db856066f5403fee57f9f26722c50b..c8359ecc3a8987a46db7e095d9270a6a2b44091a 100644 (file)
@@ -27,21 +27,21 @@ void
 ia_css_dp_encode(
        struct sh_css_isp_dp_params *to,
        const struct ia_css_dp_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_dp_dump(
        const struct sh_css_isp_dp_params *dp,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_dp_debug_dtrace(
        const struct ia_css_dp_config *config,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_init_dp_state(
-       void/*struct sh_css_isp_dp_vmem_state*/ *state,
+       void/*struct sh_css_isp_dp_vmem_state*/ * state,
        size_t size);
 
 #endif /* __IA_CSS_DP_HOST_H */
index fc9035a98d9221f9d34b4c896abdba34aa5fa435..8567a620696af9c724d997fd6350cc7d30d1d8e4 100644 (file)
 
 /* DP (Defect Pixel Correction) */
 struct sh_css_isp_dp_params {
-       int32_t threshold_single;
-       int32_t threshold_2adjacent;
-       int32_t gain;
-       int32_t coef_rr_gr;
-       int32_t coef_rr_gb;
-       int32_t coef_bb_gb;
-       int32_t coef_bb_gr;
-       int32_t coef_gr_rr;
-       int32_t coef_gr_bb;
-       int32_t coef_gb_bb;
-       int32_t coef_gb_rr;
+       s32 threshold_single;
+       s32 threshold_2adjacent;
+       s32 gain;
+       s32 coef_rr_gr;
+       s32 coef_rr_gb;
+       s32 coef_bb_gb;
+       s32 coef_bb_gr;
+       s32 coef_gr_rr;
+       s32 coef_gr_bb;
+       s32 coef_gb_bb;
+       s32 coef_gb_rr;
 };
 
 #endif /* __IA_CSS_DP_PARAM_H */
index 1bf6dcef7dc76764a9cde48121807b45c4cda76b..e96f83e5d47cb6de1253aab56d48213cbec75f82 100644 (file)
@@ -19,7 +19,6 @@
 * CSS-API header file for Defect Pixel Correction (DPC) parameters.
 */
 
-
 /* Defect Pixel Correction configuration.
  *
  *  ISP block: DPC1 (DPC after WB)
@@ -40,11 +39,10 @@ struct ia_css_dp_config {
                                too large.
                                u8.8, [0,65535],
                                default 4096, ineffective 65535 */
-       uint32_t gr;    /* unsigned <integer_bits>.<16-integer_bits> */
-       uint32_t r;     /* unsigned <integer_bits>.<16-integer_bits> */
-       uint32_t b;     /* unsigned <integer_bits>.<16-integer_bits> */
-       uint32_t gb;    /* unsigned <integer_bits>.<16-integer_bits> */
+       u32 gr; /* unsigned <integer_bits>.<16-integer_bits> */
+       u32 r;  /* unsigned <integer_bits>.<16-integer_bits> */
+       u32 b;  /* unsigned <integer_bits>.<16-integer_bits> */
+       u32 gb; /* unsigned <integer_bits>.<16-integer_bits> */
 };
 
 #endif /* __IA_CSS_DP_TYPES_H */
-
index bc14b85cf952767b1654b921b986deeb0d0bd9a4..1217a2a7b2f55f9b5871e2dab2a8431ac222921e 100644 (file)
@@ -23,14 +23,14 @@ ia_css_dpc2_encode(
 {
        (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));
-       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));
-       assert ((from->wb_gain_gb > 0) && (from->wb_gain_gb < 16*WBGAIN_ONE_FP));
+       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));
+       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));
+       assert((from->wb_gain_gb > 0) && (from->wb_gain_gb < 16 * WBGAIN_ONE_FP));
 
        to->metric1 = from->metric1;
        to->metric2 = from->metric2;
@@ -57,7 +57,7 @@ ia_css_init_dpc2_state(
 void
 ia_css_dpc2_debug_dtrace(
        const struct ia_css_dpc2_config *config,
-       unsigned level)
+       unsigned int level)
 {
        (void)config;
        (void)level;
index 38d10a5237c6e7756d7b399447cc1ee9e150857e..7d4619f2bfb2e1515fcc589af687c526c889c6eb 100644 (file)
@@ -33,7 +33,7 @@ ia_css_init_dpc2_state(
 void
 ia_css_dpc2_debug_dtrace(
        const struct ia_css_dpc2_config *config,
-       unsigned level);
+       unsigned int level);
 #endif
 
 #endif /* __IA_CSS_DPC2_HOST_H */
index ef668d54fe16d3ace48bdb4e7f57dc48b008d6a2..6df06fb249aa75c2aadfd96b5ec2c1aa4ae6ec4c 100644 (file)
@@ -18,7 +18,6 @@
 #include "type_support.h"
 #include "vmem.h" /* for VMEM_ARRAY*/
 
-
 /* 4 planes : GR, R, B, GB */
 #define NUM_PLANES             4
 
 #define DPC2_STATE_SECOND_MINMAX_BUFFER_HEIGHT 1
 #define DPC2_STATE_SECOND_MINMAX_BUFFER_WIDTH  MAX_FRAME_SIMDWIDTH
 
-
 struct ia_css_isp_dpc2_params {
-       int32_t metric1;
-       int32_t metric2;
-       int32_t metric3;
-       int32_t wb_gain_gr;
-       int32_t wb_gain_r;
-       int32_t wb_gain_b;
-       int32_t wb_gain_gb;
+       s32 metric1;
+       s32 metric2;
+       s32 metric3;
+       s32 wb_gain_gr;
+       s32 wb_gain_r;
+       s32 wb_gain_b;
+       s32 wb_gain_gb;
 };
 
 #endif /* __IA_CSS_DPC2_PARAM_H */
index 6727682d287ffdb4dcc67144b97dea3d0034b081..f78451be8d6aa6664d0443266450d08384d00fa5 100644 (file)
 
 /**@{*/
 /* Floating point constants for different metrics. */
-#define METRIC1_ONE_FP (1<<12)
-#define METRIC2_ONE_FP (1<<5)
-#define METRIC3_ONE_FP (1<<12)
-#define WBGAIN_ONE_FP  (1<<9)
+#define METRIC1_ONE_FP BIT(12)
+#define METRIC2_ONE_FP BIT(5)
+#define METRIC3_ONE_FP BIT(12)
+#define WBGAIN_ONE_FP  BIT(9)
 /**@}*/
 
 /**@{*/
  */
 struct ia_css_dpc2_config {
        /**@{*/
-       int32_t metric1;
-       int32_t metric2;
-       int32_t metric3;
-       int32_t wb_gain_gr;
-       int32_t wb_gain_r;
-       int32_t wb_gain_b;
-       int32_t wb_gain_gb;
+       s32 metric1;
+       s32 metric2;
+       s32 metric3;
+       s32 wb_gain_gr;
+       s32 wb_gain_r;
+       s32 wb_gain_b;
+       s32 wb_gain_gb;
        /**@}*/
 };
+
 /**@}*/
 
 #endif /* __IA_CSS_DPC2_TYPES_H */
-
index 955adc4d6ab09c88d75d061b46896d15ba008be3..0c21b41774c388bceb6b42901006a77063314275 100644 (file)
@@ -35,7 +35,7 @@ void
 ia_css_dvs_config(
        struct sh_css_isp_dvs_isp_config *to,
        const struct ia_css_dvs_configuration  *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->num_horizontal_blocks =
@@ -80,32 +80,30 @@ convert_coords_to_ispparams(
                                           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 width, height;
+       unsigned int width, height;
        unsigned int *xbuff = NULL;
        unsigned int *ybuff = NULL;
        struct gdc_warp_param_mem_s *ptr;
 
-       assert(config != NULL);
-       assert(gdc_warp_table != NULL);
-       assert(gdc_warp_table->address != NULL);
+       assert(config);
+       assert(gdc_warp_table);
+       assert(gdc_warp_table->address);
 
        ptr = (struct gdc_warp_param_mem_s *)gdc_warp_table->address;
 
        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;
@@ -115,7 +113,7 @@ convert_coords_to_ispparams(
 
        IA_CSS_LOG("blockdim_x %d blockdim_y %d",
                   DVS_BLOCKDIM_X, DVS_BLOCKDIM_Y_LUMA >> uv_flag);
-       IA_CSS_LOG("num_blocks_x %d num_blocks_y %d", num_blocks_x,num_blocks_y);
+       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
@@ -123,16 +121,15 @@ convert_coords_to_ispparams(
 
        for (j = 0; j < num_blocks_y; j++) {
                for (i = 0; i < num_blocks_x; i++) {
-
                        x00 = xbuff[j * width + i];
-                       x01 = xbuff[j * width + (i+1)];
-                       x10 = xbuff[(j+1) * width + i];
-                       x11 = xbuff[(j+1) * width + (i+1)];
+                       x01 = xbuff[j * width + (i + 1)];
+                       x10 = xbuff[(j + 1) * width + i];
+                       x11 = xbuff[(j + 1) * width + (i + 1)];
 
                        y00 = ybuff[j * width + i];
-                       y01 = ybuff[j * width + (i+1)];
-                       y10 = ybuff[(j+1) * width + i];
-                       y11 = ybuff[(j+1) * width + (i+1)];
+                       y01 = ybuff[j * width + (i + 1)];
+                       y10 = ybuff[(j + 1) * width + i];
+                       y11 = ybuff[(j + 1) * width + (i + 1)];
 
                        xmin = min(x00, x10);
                        xmax = max(x01, x11);
@@ -140,11 +137,11 @@ convert_coords_to_ispparams(
                        ymax = max(y10, y11);
 
                        /* Assert that right column's X is greater */
-                       assert ( x01 >= xmin);
-                       assert ( x11 >= xmin);
+                       assert(x01 >= xmin);
+                       assert(x11 >= xmin);
                        /* Assert that bottom row's Y is greater */
-                       assert ( y10 >= ymin);
-                       assert ( y11 >= ymin);
+                       assert(y10 >= ymin);
+                       assert(y11 >= ymin);
 
                        topleft_y = ymin >> DVS_COORD_FRAC_BITS;
                        topleft_x = ((xmin >> DVS_COORD_FRAC_BITS)
@@ -201,14 +198,14 @@ convert_coords_to_ispparams(
                        printf("p3_x: %d\n", s.p3_x);
                        printf("p3_y: %d\n", s.p3_y);
 
-                       printf("p0_x_nofrac[0]: %d\n", s.p0_x>>DVS_COORD_FRAC_BITS);
-                       printf("p0_y_nofrac[1]: %d\n", s.p0_y>>DVS_COORD_FRAC_BITS);
-                       printf("p1_x_nofrac[2]: %d\n", s.p1_x>>DVS_COORD_FRAC_BITS);
-                       printf("p1_y_nofrac[3]: %d\n", s.p1_y>>DVS_COORD_FRAC_BITS);
-                       printf("p2_x_nofrac[0]: %d\n", s.p2_x>>DVS_COORD_FRAC_BITS);
-                       printf("p2_y_nofrac[1]: %d\n", s.p2_y>>DVS_COORD_FRAC_BITS);
-                       printf("p3_x_nofrac[2]: %d\n", s.p3_x>>DVS_COORD_FRAC_BITS);
-                       printf("p3_y_nofrac[3]: %d\n", s.p3_y>>DVS_COORD_FRAC_BITS);
+                       printf("p0_x_nofrac[0]: %d\n", s.p0_x >> DVS_COORD_FRAC_BITS);
+                       printf("p0_y_nofrac[1]: %d\n", s.p0_y >> DVS_COORD_FRAC_BITS);
+                       printf("p1_x_nofrac[2]: %d\n", s.p1_x >> DVS_COORD_FRAC_BITS);
+                       printf("p1_y_nofrac[3]: %d\n", s.p1_y >> DVS_COORD_FRAC_BITS);
+                       printf("p2_x_nofrac[0]: %d\n", s.p2_x >> DVS_COORD_FRAC_BITS);
+                       printf("p2_y_nofrac[1]: %d\n", s.p2_y >> DVS_COORD_FRAC_BITS);
+                       printf("p3_x_nofrac[2]: %d\n", s.p3_x >> DVS_COORD_FRAC_BITS);
+                       printf("p3_y_nofrac[3]: %d\n", s.p3_y >> DVS_COORD_FRAC_BITS);
                        printf("\n");
 #endif
 
@@ -221,7 +218,7 @@ convert_coords_to_ispparams(
                        if (uv_flag)
                                ptr += 3;
                        else
-                               ptr += (1 + (i&1));
+                               ptr += (1 + (i & 1));
                }
        }
 }
@@ -238,9 +235,9 @@ convert_allocate_dvs_6axis_config(
        struct ia_css_host_data *me;
        struct gdc_warp_param_mem_s *isp_data_ptr;
 
-       assert(binary != NULL);
-       assert(dvs_6axis_config != NULL);
-       assert(dvs_in_frame_info != NULL);
+       assert(binary);
+       assert(dvs_6axis_config);
+       assert(dvs_in_frame_info);
 
        me = ia_css_host_data_allocate((size_t)((DVS_6AXIS_BYTES(binary) / 2) * 3));
 
@@ -264,12 +261,12 @@ convert_allocate_dvs_6axis_config(
 
        if (dvs_in_frame_info->format == IA_CSS_FRAME_FORMAT_YUV420) {
                /*YUV420 has half the stride for U/V plane*/
-               i_stride /=2;
+               i_stride /= 2;
        }
 
        /* UV plane (packed inside the y plane) */
        convert_coords_to_ispparams(me, dvs_6axis_config,
-                                   i_stride, o_width/2, o_height/2, 1);
+                                   i_stride, o_width / 2, o_height / 2, 1);
 
        return me;
 }
@@ -281,11 +278,11 @@ store_dvs_6axis_config(
        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 != NULL);
+
+       assert(dvs_6axis_config);
        assert(ddr_addr_y != mmgr_NULL);
-       assert(dvs_in_frame_info != NULL);
+       assert(dvs_in_frame_info);
 
        me = convert_allocate_dvs_6axis_config(dvs_6axis_config,
                                 binary,
@@ -303,4 +300,3 @@ store_dvs_6axis_config(
 
        return IA_CSS_SUCCESS;
 }
-
index 2f513e29d88c98d1c7f455f448c8d99acb2489e3..4402ca76d627110f6ca26a85b37fe1792bcd2e2e 100644 (file)
@@ -32,7 +32,7 @@ void
 ia_css_dvs_config(
        struct sh_css_isp_dvs_isp_config      *to,
        const struct ia_css_dvs_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_dvs_configure(
index 66a7e58659c0b92d11b0934a56886aab8b1c8fa9..a47f7d438ad59c6a588f91124a53f8a7e7974570 100644 (file)
@@ -32,8 +32,8 @@
 #endif
 /* dvserence frame */
 struct sh_css_isp_dvs_isp_config {
-       uint32_t num_horizontal_blocks;
-       uint32_t num_vertical_blocks;
+       u32 num_horizontal_blocks;
+       u32 num_vertical_blocks;
 };
 
 #endif /* __IA_CSS_DVS_PARAM_H */
index 8f2178bf9e68430cb46e7591a0be4b4f6a67cb64..5a79f10a6294851ab4aba33d9897eceebd7ebf0d 100644 (file)
 #define NUMBER_OF_TCINV_POINTS 9
 #define NUMBER_OF_FCINV_POINTS 9
 
-static const int16_t chgrinv_x[NUMBER_OF_CHGRINV_POINTS] = {
+static const s16 chgrinv_x[NUMBER_OF_CHGRINV_POINTS] = {
 0, 16, 64, 144, 272, 448, 672, 976,
 1376, 1888, 2528, 3312, 4256, 5376, 6688};
 
-static const int16_t chgrinv_a[NUMBER_OF_CHGRINV_POINTS] = {
+static const s16 chgrinv_a[NUMBER_OF_CHGRINV_POINTS] = {
 -7171, -256, -29, -3456, -1071, -475, -189, -102,
 -48, -38, -10, -9, -7, -6, 0};
 
-static const int16_t chgrinv_b[NUMBER_OF_CHGRINV_POINTS] = {
+static const s16 chgrinv_b[NUMBER_OF_CHGRINV_POINTS] = {
 8191, 1021, 256, 114, 60, 37, 24, 17,
 12, 9, 6, 5, 4, 3, 2};
 
-static const int16_t chgrinv_c[NUMBER_OF_CHGRINV_POINTS] = {
+static const s16 chgrinv_c[NUMBER_OF_CHGRINV_POINTS] = {
 1, 1, 1, 0, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0};
 
-static const int16_t tcinv_x[NUMBER_OF_TCINV_POINTS] = {
+static const s16 tcinv_x[NUMBER_OF_TCINV_POINTS] = {
 0, 4, 11, 23, 42, 68, 102, 148, 205};
 
-static const int16_t tcinv_a[NUMBER_OF_TCINV_POINTS] = {
+static const s16 tcinv_a[NUMBER_OF_TCINV_POINTS] = {
 -6364, -631, -126, -34, -13, -6, -4452, -2156, 0};
 
-static const int16_t tcinv_b[NUMBER_OF_TCINV_POINTS] = {
+static const s16 tcinv_b[NUMBER_OF_TCINV_POINTS] = {
 8191, 1828, 726, 352, 197, 121, 80, 55, 40};
 
-static const int16_t tcinv_c[NUMBER_OF_TCINV_POINTS] = {
+static const s16 tcinv_c[NUMBER_OF_TCINV_POINTS] = {
 1, 1, 1, 1, 1, 1, 0, 0, 0};
 
-static const int16_t fcinv_x[NUMBER_OF_FCINV_POINTS] = {
+static const s16 fcinv_x[NUMBER_OF_FCINV_POINTS] = {
 0, 80, 216, 456, 824, 1344, 2040, 2952, 4096};
 
-static const int16_t fcinv_a[NUMBER_OF_FCINV_POINTS] = {
+static const s16 fcinv_a[NUMBER_OF_FCINV_POINTS] = {
 -5244, -486, -86, -2849, -961, -400, -180, -86, 0};
 
-static const int16_t fcinv_b[NUMBER_OF_FCINV_POINTS] = {
+static const s16 fcinv_b[NUMBER_OF_FCINV_POINTS] = {
 8191, 1637, 607, 287, 159, 98, 64, 44, 32};
 
-static const int16_t fcinv_c[NUMBER_OF_FCINV_POINTS] = {
+static const s16 fcinv_c[NUMBER_OF_FCINV_POINTS] = {
 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)
 {
-       unsigned i, j, base;
-       const unsigned total_blocks = 4;
-       const unsigned shuffle_block = 16;
+       unsigned int i, j, base;
+       const unsigned int total_blocks = 4;
+       const unsigned int shuffle_block = 16;
 
        (void)size;
 
@@ -121,8 +120,8 @@ ia_css_eed1_8_vmem_encode(
        }
 
        for (j = 1; j < IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS; j++) {
-               assert(from->dew_enhance_seg_x[j] > from->dew_enhance_seg_x[j-1]);
-               assert(from->dew_enhance_seg_y[j] > from->dew_enhance_seg_y[j-1]);
+               assert(from->dew_enhance_seg_x[j] > from->dew_enhance_seg_x[j - 1]);
+               assert(from->dew_enhance_seg_y[j] > from->dew_enhance_seg_y[j - 1]);
        }
 
        assert(from->dew_enhance_seg_x[0] == 0);
@@ -138,15 +137,15 @@ ia_css_eed1_8_vmem_encode(
        assert(fcinv_x[0] == 0);
 
        for (j = 1; j < NUMBER_OF_CHGRINV_POINTS; j++) {
-               assert(chgrinv_x[j] > chgrinv_x[j-1]);
+               assert(chgrinv_x[j] > chgrinv_x[j - 1]);
        }
 
        for (j = 1; j < NUMBER_OF_TCINV_POINTS; j++) {
-               assert(tcinv_x[j] > tcinv_x[j-1]);
+               assert(tcinv_x[j] > tcinv_x[j - 1]);
        }
 
        for (j = 1; j < NUMBER_OF_FCINV_POINTS; j++) {
-               assert(fcinv_x[j] > fcinv_x[j-1]);
+               assert(fcinv_x[j] > fcinv_x[j - 1]);
        }
 
        /* The implementation of the calulating 1/x is based on the availability
@@ -156,7 +155,7 @@ ia_css_eed1_8_vmem_encode(
         * initialised as described in the KFS. The remaining elements of a vector are set to 0.
         */
        /* TODO: guard this code with above assumptions */
-       for(i = 0; i < total_blocks; i++) {
+       for (i = 0; i < total_blocks; i++) {
                base = shuffle_block * i;
 
                for (j = 0; j < IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS; j++) {
@@ -171,7 +170,7 @@ ia_css_eed1_8_vmem_encode(
                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);
+                                                                       -8192), 8191);
                        /* Convert dew_enhance_seg_exp to flag:
                         * 0 -> 0
                         * 1...13 -> 1
@@ -211,7 +210,6 @@ ia_css_eed1_8_vmem_encode(
        }
 }
 
-
 void
 ia_css_eed1_8_encode(
        struct eed1_8_dmem_params *to,
@@ -270,7 +268,6 @@ ia_css_eed1_8_encode(
        to->dedgew_max = from->dedgew_max;
 }
 
-
 void
 ia_css_init_eed1_8_state(
        void *state,
@@ -279,12 +276,11 @@ ia_css_init_eed1_8_state(
        memset(state, 0, size);
 }
 
-
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_eed1_8_debug_dtrace(
        const struct ia_css_eed1_8_config *eed,
-       unsigned level)
+       unsigned int level)
 {
        if (!eed)
                return;
@@ -326,4 +322,3 @@ ia_css_eed1_8_debug_dtrace(
        ia_css_debug_dtrace(level, "\t%-32s = %d\n", "dedgew_max", eed->dedgew_max);
 }
 #endif
-
index fff932c1364e2cb331a37910b981b5ccd2afdf4c..aa38a35f75dea74904f7d35912ae98de09311124 100644 (file)
@@ -39,7 +39,7 @@ ia_css_init_eed1_8_state(
 void
 ia_css_eed1_8_debug_dtrace(
        const struct ia_css_eed1_8_config *config,
-       unsigned level);
+       unsigned int level);
 #endif
 
 #endif /* __IA_CSS_EED1_8_HOST_H */
index bc3a07fd07ebb02887b34a9e309a7b49bd041d83..880454d4dcf54fdf336923cf56aa653f242bc16f 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "ia_css_eed1_8_types.h" /* IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS */
 
-
 /* Configuration parameters: */
 
 /* Enable median for false color correction
@@ -113,42 +112,42 @@ struct eed1_8_vmem_params {
 
 /* EED (Edge Enhancing Demosaic) ISP parameters */
 struct eed1_8_dmem_params {
-       int32_t rbzp_strength;
-
-       int32_t fcstrength;
-       int32_t fcthres_0;
-       int32_t fc_sat_coef;
-       int32_t fc_coring_prm;
-       int32_t fc_slope;
-
-       int32_t aerel_thres0;
-       int32_t aerel_gain0;
-       int32_t aerel_thres_diff;
-       int32_t aerel_gain_diff;
-
-       int32_t derel_thres0;
-       int32_t derel_gain0;
-       int32_t derel_thres_diff;
-       int32_t derel_gain_diff;
-
-       int32_t coring_pos0;
-       int32_t coring_pos_diff;
-       int32_t coring_neg0;
-       int32_t coring_neg_diff;
-
-       int32_t gain_exp;
-       int32_t gain_pos0;
-       int32_t gain_pos_diff;
-       int32_t gain_neg0;
-       int32_t gain_neg_diff;
-
-       int32_t margin_pos0;
-       int32_t margin_pos_diff;
-       int32_t margin_neg0;
-       int32_t margin_neg_diff;
-
-       int32_t e_dew_enh_asr;
-       int32_t dedgew_max;
+       s32 rbzp_strength;
+
+       s32 fcstrength;
+       s32 fcthres_0;
+       s32 fc_sat_coef;
+       s32 fc_coring_prm;
+       s32 fc_slope;
+
+       s32 aerel_thres0;
+       s32 aerel_gain0;
+       s32 aerel_thres_diff;
+       s32 aerel_gain_diff;
+
+       s32 derel_thres0;
+       s32 derel_gain0;
+       s32 derel_thres_diff;
+       s32 derel_gain_diff;
+
+       s32 coring_pos0;
+       s32 coring_pos_diff;
+       s32 coring_neg0;
+       s32 coring_neg_diff;
+
+       s32 gain_exp;
+       s32 gain_pos0;
+       s32 gain_pos_diff;
+       s32 gain_neg0;
+       s32 gain_neg_diff;
+
+       s32 margin_pos0;
+       s32 margin_pos_diff;
+       s32 margin_neg0;
+       s32 margin_neg_diff;
+
+       s32 e_dew_enh_asr;
+       s32 dedgew_max;
 };
 
 #endif /* __IA_CSS_EED1_8_PARAM_H */
index 32e91824a5e5a0f86f73e1926618bf99cc3606f8..303ec5193ffcf21c0c3b23b8e80f0ef00714e944 100644 (file)
@@ -19,7 +19,6 @@
 * CSS-API header file for Edge Enhanced Demosaic parameters.
 */
 
-
 #include "type_support.h"
 
 /**
  */
 
 struct ia_css_eed1_8_config {
-       int32_t rbzp_strength;  /** Strength of zipper reduction. */
-
-       int32_t fcstrength;     /** Strength of false color reduction. */
-       int32_t fcthres_0;      /** Threshold to prevent chroma coring due to noise or green disparity in dark region. */
-       int32_t fcthres_1;      /** Threshold to prevent chroma coring due to noise or green disparity in bright region. */
-       int32_t fc_sat_coef;    /** How much color saturation to maintain in high color saturation region. */
-       int32_t fc_coring_prm;  /** Chroma coring coefficient for tint color suppression. */
-
-       int32_t aerel_thres0;   /** Threshold for Non-Directional Reliability at dark region. */
-       int32_t aerel_gain0;    /** Gain for Non-Directional Reliability at dark region. */
-       int32_t aerel_thres1;   /** Threshold for Non-Directional Reliability at bright region. */
-       int32_t aerel_gain1;    /** Gain for Non-Directional Reliability at bright region. */
-
-       int32_t derel_thres0;   /** Threshold for Directional Reliability at dark region. */
-       int32_t derel_gain0;    /** Gain for Directional Reliability at dark region. */
-       int32_t derel_thres1;   /** Threshold for Directional Reliability at bright region. */
-       int32_t derel_gain1;    /** Gain for Directional Reliability at bright region. */
-
-       int32_t coring_pos0;    /** Positive Edge Coring Threshold in dark region. */
-       int32_t coring_pos1;    /** Positive Edge Coring Threshold in bright region. */
-       int32_t coring_neg0;    /** Negative Edge Coring Threshold in dark region. */
-       int32_t coring_neg1;    /** Negative Edge Coring Threshold in bright region. */
-
-       int32_t gain_exp;       /** Common Exponent of Gain. */
-       int32_t gain_pos0;      /** Gain for Positive Edge in dark region. */
-       int32_t gain_pos1;      /** Gain for Positive Edge in bright region. */
-       int32_t gain_neg0;      /** Gain for Negative Edge in dark region. */
-       int32_t gain_neg1;      /** Gain for Negative Edge in bright region. */
-
-       int32_t pos_margin0;    /** Margin for Positive Edge in dark region. */
-       int32_t pos_margin1;    /** Margin for Positive Edge in bright region. */
-       int32_t neg_margin0;    /** Margin for Negative Edge in dark region. */
-       int32_t neg_margin1;    /** Margin for Negative Edge in bright region. */
-
-       int32_t dew_enhance_seg_x[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS];               /** Segment data for directional edge weight: X. */
-       int32_t dew_enhance_seg_y[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS];               /** Segment data for directional edge weight: Y. */
-       int32_t dew_enhance_seg_slope[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1)];     /** Segment data for directional edge weight: Slope. */
-       int32_t dew_enhance_seg_exp[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1)];       /** Segment data for directional edge weight: Exponent. */
-       int32_t dedgew_max;     /** Max Weight for Directional Edge. */
+       s32 rbzp_strength;      /** Strength of zipper reduction. */
+
+       s32 fcstrength; /** Strength of false color reduction. */
+       s32 fcthres_0;  /** Threshold to prevent chroma coring due to noise or green disparity in dark region. */
+       s32 fcthres_1;  /** Threshold to prevent chroma coring due to noise or green disparity in bright region. */
+       s32 fc_sat_coef;        /** How much color saturation to maintain in high color saturation region. */
+       s32 fc_coring_prm;      /** Chroma coring coefficient for tint color suppression. */
+
+       s32 aerel_thres0;       /** Threshold for Non-Directional Reliability at dark region. */
+       s32 aerel_gain0;        /** Gain for Non-Directional Reliability at dark region. */
+       s32 aerel_thres1;       /** Threshold for Non-Directional Reliability at bright region. */
+       s32 aerel_gain1;        /** Gain for Non-Directional Reliability at bright region. */
+
+       s32 derel_thres0;       /** Threshold for Directional Reliability at dark region. */
+       s32 derel_gain0;        /** Gain for Directional Reliability at dark region. */
+       s32 derel_thres1;       /** Threshold for Directional Reliability at bright region. */
+       s32 derel_gain1;        /** Gain for Directional Reliability at bright region. */
+
+       s32 coring_pos0;        /** Positive Edge Coring Threshold in dark region. */
+       s32 coring_pos1;        /** Positive Edge Coring Threshold in bright region. */
+       s32 coring_neg0;        /** Negative Edge Coring Threshold in dark region. */
+       s32 coring_neg1;        /** Negative Edge Coring Threshold in bright region. */
+
+       s32 gain_exp;   /** Common Exponent of Gain. */
+       s32 gain_pos0;  /** Gain for Positive Edge in dark region. */
+       s32 gain_pos1;  /** Gain for Positive Edge in bright region. */
+       s32 gain_neg0;  /** Gain for Negative Edge in dark region. */
+       s32 gain_neg1;  /** Gain for Negative Edge in bright region. */
+
+       s32 pos_margin0;        /** Margin for Positive Edge in dark region. */
+       s32 pos_margin1;        /** Margin for Positive Edge in bright region. */
+       s32 neg_margin0;        /** Margin for Negative Edge in dark region. */
+       s32 neg_margin1;        /** Margin for Negative Edge in bright region. */
+
+       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 dedgew_max; /** Max Weight for Directional Edge. */
 };
 
 #endif /* __IA_CSS_EED1_8_TYPES_H */
index 94631eee8614246cc393de165d2d497d1897e6bf..de08cc2f41f8f8bfa6be9839181b07e0b423edcd 100644 (file)
@@ -30,17 +30,18 @@ void
 ia_css_formats_encode(
        struct sh_css_isp_formats_params *to,
        const struct ia_css_formats_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->video_full_range_flag = from->video_full_range_flag;
 }
+
 #ifndef IA_CSS_NO_DEBUG
 /* FIXME: See BZ 4427 */
 void
 ia_css_formats_dump(
        const struct sh_css_isp_formats_params *formats,
-       unsigned level)
+       unsigned int level)
 {
        if (!formats) return;
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
@@ -53,7 +54,7 @@ ia_css_formats_dump(
 void
 ia_css_formats_debug_dtrace(
        const struct ia_css_formats_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
                "config.video_full_range_flag=%d\n",
index 8a90cd83b248b8cbdffb8c2d22bb14e349dd1301..a6a4a2e41b21e16619f026a52e06183b7c076571 100644 (file)
@@ -24,13 +24,13 @@ void
 ia_css_formats_encode(
        struct sh_css_isp_formats_params *to,
        const struct ia_css_formats_config *from,
-       unsigned size);
+       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 level);
+       unsigned int level);
 #endif
 
 #ifndef IA_CSS_NO_DEBUG
@@ -38,8 +38,7 @@ ia_css_formats_dump(
 void
 ia_css_formats_debug_dtrace(
        const struct ia_css_formats_config *formats,
-       unsigned level);
+       unsigned int level);
 #endif /*IA_CSS_NO_DEBUG*/
 
 #endif /* __IA_CSS_FORMATS_HOST_H */
-
index 2eb6030b60812c9500a9ed0d4cee80491e8f5bc8..8f36af1a5ae6213c745dfdb5cc1c8a4d02a37eb1 100644 (file)
@@ -19,7 +19,7 @@
 
 /* FORMATS (Format conversion) */
 struct sh_css_isp_formats_params {
-       int32_t video_full_range_flag;
+       s32 video_full_range_flag;
 };
 
 #endif /* __IA_CSS_FORMATS_PARAM_H */
index 49479572b40d231a6248227d7f2fb83c0224b989..7cfebaf05dc2ad677fe5d98b9c9ea6e6bad036ee 100644 (file)
@@ -28,7 +28,7 @@
  *  ISP2: FORMATS is used.
  */
 struct ia_css_formats_config {
-       uint32_t video_full_range_flag; /** selects the range of YUV output.
+       u32 video_full_range_flag; /** selects the range of YUV output.
                                u8.0, [0,1],
                                default 1, ineffective n/a\n
                                1 - full range, luma 0-255, chroma 0-255\n
index cc8dd1a7007fe87a356a6500cbac392b2cf837cf..82cb1f2c7dd7986632ca74148e1e6bb80ec5d26a 100644 (file)
@@ -20,7 +20,7 @@
 #ifdef ISP2401
 #define BDS_UNIT 8
 #define FRAC_LOG 3
-#define FRAC_ACC (1<<FRAC_LOG)
+#define FRAC_ACC BIT(FRAC_LOG)
 #if FRAC_ACC != BDS_UNIT
 #error "FRAC_ACC and BDS_UNIT need to be merged into one define"
 #endif
index 5b59d9dec4d093119eaa215da1f4bf5e5ce6a501..6485834704da109fe60ff6870529fc850e2f374e 100644 (file)
 #ifndef __IA_CSS_FIXEDBDS_TYPES_H
 #define __IA_CSS_FIXEDBDS_TYPES_H
 
-
 struct sh_css_bds_factor {
-       unsigned numerator;
-       unsigned denominator;
+       unsigned int numerator;
+       unsigned int denominator;
        unsigned int bds_factor;
 };
 
-
 #endif /*__IA_CSS_FIXEDBDS_TYPES_H*/
index 1fb9f27540f3ae5562529cdf2373347f58bc7ee5..06d54dd285b0fa8afee60e6f0209df988b735499 100644 (file)
@@ -30,7 +30,7 @@ void
 ia_css_fpn_encode(
        struct sh_css_isp_fpn_params *to,
        const struct ia_css_fpn_table *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->shift = from->shift;
@@ -40,7 +40,7 @@ ia_css_fpn_encode(
 void
 ia_css_fpn_dump(
        const struct sh_css_isp_fpn_params *fpn,
-       unsigned level)
+       unsigned int level)
 {
        if (!fpn) return;
        ia_css_debug_dtrace(level, "Fixed Pattern Noise Reduction:\n");
@@ -54,16 +54,16 @@ void
 ia_css_fpn_config(
        struct sh_css_isp_fpn_isp_config *to,
        const struct ia_css_fpn_configuration *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned elems_a = ISP_VEC_NELEMS;
+       unsigned int elems_a = ISP_VEC_NELEMS;
 
        (void)size;
        ia_css_dma_configure_from_info(&to->port_b, from->info);
        to->width_a_over_b = elems_a / to->port_b.elems;
 
        /* Assume divisiblity here, may need to generalize to fixed point. */
-       assert (elems_a % to->port_b.elems == 0);
+       assert(elems_a % to->port_b.elems == 0);
 }
 
 void
@@ -86,4 +86,3 @@ ia_css_fpn_configure(
 
        ia_css_configure_fpn(binary, &config);
 }
-
index bb905c8db8c8232e82be36f4433ba5aae67de3f5..0aeea3752e65f64c563ef6474fd2030962800991 100644 (file)
@@ -23,18 +23,18 @@ void
 ia_css_fpn_encode(
        struct sh_css_isp_fpn_params *to,
        const struct ia_css_fpn_table *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_fpn_dump(
        const struct sh_css_isp_fpn_params *fpn,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_fpn_config(
        struct sh_css_isp_fpn_isp_config      *to,
        const struct ia_css_fpn_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_fpn_configure(
index 68765c3f3bf753dfe77b39acc3933e6761e2b1fc..f103ddd882fdf999f5dacb03749463454f0d056b 100644 (file)
 
 /* FPNR (Fixed Pattern Noise Reduction) */
 struct sh_css_isp_fpn_params {
-       int32_t shift;
-       int32_t enabled;
+       s32 shift;
+       s32 enabled;
 };
 
 struct sh_css_isp_fpn_isp_config {
-       uint32_t width_a_over_b;
+       u32 width_a_over_b;
        struct dma_port_config port_b;
 };
 
index ef287fa3c428a0caac7573611a550061478006bd..95552a0e3c4563275df6a72d9245905672aa2192 100644 (file)
  */
 
 struct ia_css_fpn_table {
-       int16_t *data;          /** Table content (fixed patterns noise).
+       s16 *data;              /** Table content (fixed patterns noise).
                                        u0.[13-shift], [0,63] */
-       uint32_t width;         /** Table width (in pixels).
+       u32 width;              /** Table width (in pixels).
                                        This is the input frame width. */
-       uint32_t height;        /** Table height (in pixels).
+       u32 height;     /** Table height (in pixels).
                                        This is the input frame height. */
-       uint32_t shift;         /** Common exponent of table content.
+       u32 shift;              /** Common exponent of table content.
                                        u8.0, [0,13] */
-       uint32_t enabled;       /** Fpn is enabled.
+       u32 enabled;    /** Fpn is enabled.
                                        bool */
 };
 
index 0cfb5c94447f51e11599724acbae8b26f8d580cd..0635190d3b71643905df81cf9a26d0bf357db3e4 100644 (file)
@@ -37,7 +37,7 @@ void
 ia_css_gc_encode(
        struct sh_css_isp_gc_params *to,
        const struct ia_css_gc_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->gain_k1 =
@@ -52,7 +52,7 @@ void
 ia_css_ce_encode(
        struct sh_css_isp_ce_params *to,
        const struct ia_css_ce_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->uv_level_min = from->uv_level_min;
@@ -63,17 +63,17 @@ void
 ia_css_gc_vamem_encode(
        struct sh_css_isp_gc_vamem_params *to,
        const struct ia_css_gamma_table *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
-       memcpy (&to->gc,  &from->data, sizeof(to->gc));
+       memcpy(&to->gc,  &from->data, sizeof(to->gc));
 }
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_gc_dump(
        const struct sh_css_isp_gc_params *gc,
-       unsigned level)
+       unsigned int level)
 {
        if (!gc) return;
        ia_css_debug_dtrace(level, "Gamma Correction:\n");
@@ -86,7 +86,7 @@ ia_css_gc_dump(
 void
 ia_css_ce_dump(
        const struct sh_css_isp_ce_params *ce,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level, "Chroma Enhancement:\n");
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
@@ -98,7 +98,7 @@ ia_css_ce_dump(
 void
 ia_css_gc_debug_dtrace(
        const struct ia_css_gc_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
                "config.gain_k1=%d, config.gain_k2=%d\n",
@@ -108,11 +108,10 @@ ia_css_gc_debug_dtrace(
 void
 ia_css_ce_debug_dtrace(
        const struct ia_css_ce_config *config,
-       unsigned level)
+       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);
 }
 #endif
-
index 06f08840563ec9bde59a2ae5fa66171cf249e6df..4f470780002c91c78b349735b934d4b90f53d487 100644 (file)
@@ -25,40 +25,40 @@ void
 ia_css_gc_encode(
        struct sh_css_isp_gc_params *to,
        const struct ia_css_gc_config *from,
-       unsigned size);
+       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 size);
+       unsigned int size);
 
 void
 ia_css_ce_encode(
        struct sh_css_isp_ce_params *to,
        const struct ia_css_ce_config *from,
-       unsigned size);
+       unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_gc_dump(
        const struct sh_css_isp_gc_params *gc,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_ce_dump(
        const struct sh_css_isp_ce_params *ce,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_gc_debug_dtrace(
        const struct ia_css_gc_config *config,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_ce_debug_dtrace(
        const struct ia_css_ce_config *config,
-       unsigned level);
+       unsigned int level);
 
 #endif
 
index 52972b1a07ff8e10e722aa01a4c22acaec3f2ef9..beeba6c9be6addcacbd431654c01383f7066cf14 100644 (file)
 #endif
 
 #define GAMMA_OUTPUT_BITS              8
-#define GAMMA_OUTPUT_MAX_VAL           ((1<<GAMMA_OUTPUT_BITS)-1)
+#define GAMMA_OUTPUT_MAX_VAL           ((1 << GAMMA_OUTPUT_BITS) - 1)
 
 /* GC (Gamma Correction) */
 struct sh_css_isp_gc_params {
-       int32_t gain_k1;
-       int32_t gain_k2;
+       s32 gain_k1;
+       s32 gain_k2;
 };
 
 /* CE (Chroma Enhancement) */
 struct sh_css_isp_ce_params {
-       int32_t uv_level_min;
-       int32_t uv_level_max;
+       s32 uv_level_min;
+       s32 uv_level_max;
 };
 
 /* This should be vamem_data_t, but that breaks the pipe generator */
 struct sh_css_isp_gc_vamem_params {
-       uint16_t gc[SH_CSS_ISP_GC_TABLE_SIZE];
+       u16 gc[SH_CSS_ISP_GC_TABLE_SIZE];
 };
 
 #endif /* __IA_CSS_GC_PARAM_H */
index 594807fe2925b88d51b493df50527a2e42e5336f..c896c138b56912d965a3b7506d464ee68bf30f89 100644 (file)
 
 /* Number of elements in the gamma table. */
 #define IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE_LOG2    10
-#define IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE         (1U<<IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE_LOG2)
+#define IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE         BIT(IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE_LOG2)
 
 /* Number of elements in the gamma table. */
 #define IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE_LOG2    8
-#define IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE         ((1U<<IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE_LOG2) + 1)
+#define IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE         ((1U << IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE_LOG2) + 1)
 
 /* Gamma table, used for Y(Luma) Gamma Correction.
  *
@@ -41,9 +41,9 @@
 /** IA_CSS_VAMEM_TYPE_1(ISP2300) or
      IA_CSS_VAMEM_TYPE_2(ISP2400) */
 union ia_css_gc_data {
-       uint16_t vamem_1[IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE];
+       u16 vamem_1[IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE];
        /** Y(Luma) Gamma table on vamem type 1. u0.8, [0,255] */
-       uint16_t vamem_2[IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE];
+       u16 vamem_2[IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE];
        /** Y(Luma) Gamma table on vamem type 2. u0.8, [0,255] */
 };
 
@@ -59,10 +59,10 @@ struct ia_css_gamma_table {
  * (ISP2: GC2 (sRGB Gamma Correction) is used.)
   */
 struct ia_css_gc_config {
-       uint16_t gain_k1; /** Gain to adjust U after YUV Gamma Correction.
+       u16 gain_k1; /** Gain to adjust U after YUV Gamma Correction.
                                u0.16, [0,65535],
                                default/ineffective 19000(0.29) */
-       uint16_t gain_k2; /** Gain to adjust V after YUV Gamma Correction.
+       u16 gain_k2; /** Gain to adjust V after YUV Gamma Correction.
                                u0.16, [0,65535],
                                default/ineffective 19000(0.29) */
 };
@@ -77,9 +77,9 @@ struct ia_css_gc_config {
  * (ISP2: CE1 is not used.)
  */
 struct ia_css_ce_config {
-       uint8_t uv_level_min; /** Minimum of chroma output level.
+       u8 uv_level_min; /** Minimum of chroma output level.
                                u0.8, [0,255], default/ineffective 0 */
-       uint8_t uv_level_max; /** Maximum of chroma output level.
+       u8 uv_level_max; /** Maximum of chroma output level.
                                u0.8, [0,255], default/ineffective 255 */
 };
 
@@ -90,7 +90,7 @@ struct ia_css_ce_config {
  *  ISP2: MACC2 is used.
  */
 struct ia_css_macc_config {
-       uint8_t exp;    /** Common exponent of ia_css_macc_table.
+       u8 exp; /** Common exponent of ia_css_macc_table.
                                u8.0, [0,13], default 1, ineffective 1 */
 };
 
index 0fb1a919fccd1ac384f134240aa42a515af0a63f..6d8ef2298571303bfce08c892c1bdead93b878c0 100644 (file)
@@ -37,7 +37,7 @@ void
 ia_css_yuv2rgb_encode(
        struct sh_css_isp_csc_params *to,
        const struct ia_css_cc_config *from,
-       unsigned size)
+       unsigned int size)
 {
        ia_css_encode_cc(to, from, size);
 }
@@ -46,7 +46,7 @@ void
 ia_css_rgb2yuv_encode(
        struct sh_css_isp_csc_params *to,
        const struct ia_css_cc_config *from,
-       unsigned size)
+       unsigned int size)
 {
        ia_css_encode_cc(to, from, size);
 }
@@ -55,37 +55,37 @@ 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 size)
+       unsigned int size)
 {
        (void)size;
-       memcpy (&to->gc,  &from->data, sizeof(to->gc));
+       memcpy(&to->gc,  &from->data, sizeof(to->gc));
 }
 
 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 size)
+       unsigned int size)
 {
        (void)size;
-       memcpy (&to->gc,  &from->data, sizeof(to->gc));
+       memcpy(&to->gc,  &from->data, sizeof(to->gc));
 }
 
 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 size)
+       unsigned int size)
 {
        (void)size;
-       memcpy (&to->gc,  &from->data, sizeof(to->gc));
+       memcpy(&to->gc,  &from->data, sizeof(to->gc));
 }
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_yuv2rgb_dump(
        const struct sh_css_isp_csc_params *yuv2rgb,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_cc_dump(yuv2rgb, level, "YUV to RGB Conversion");
 }
@@ -93,7 +93,7 @@ ia_css_yuv2rgb_dump(
 void
 ia_css_rgb2yuv_dump(
        const struct sh_css_isp_csc_params *rgb2yuv,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_cc_dump(rgb2yuv, level, "RGB to YUV Conversion");
 }
@@ -101,10 +101,9 @@ ia_css_rgb2yuv_dump(
 void
 ia_css_rgb_gamma_table_debug_dtrace(
        const struct ia_css_rgb_gamma_table *config,
-       unsigned level)
+       unsigned int level)
 {
        (void)config;
        (void)level;
 }
 #endif
-
index ba140eefd5256c0269b309ae4db697716214a238..146bb1d76e40319d42214bf45798ab567b89b1cd 100644 (file)
@@ -26,47 +26,47 @@ void
 ia_css_yuv2rgb_encode(
        struct sh_css_isp_csc_params *to,
        const struct ia_css_cc_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_rgb2yuv_encode(
        struct sh_css_isp_csc_params *to,
        const struct ia_css_cc_config *from,
-       unsigned size);
+       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 size);
+       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 size);
+       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 size);
+       unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_yuv2rgb_dump(
        const struct sh_css_isp_csc_params *yuv2rgb,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_rgb2yuv_dump(
        const struct sh_css_isp_csc_params *rgb2yuv,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_rgb_gamma_table_debug_dtrace(
        const struct ia_css_rgb_gamma_table *config,
-       unsigned level);
+       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 d25239f4d86f09f7389127ac4571d477be06defe..458c72a45eef1ee917462fb46e35cefff441945f 100644 (file)
@@ -37,7 +37,7 @@
 
 /* This should be vamem_data_t, but that breaks the pipe generator */
 struct sh_css_isp_rgb_gamma_vamem_params {
-       uint16_t gc[SH_CSS_ISP_RGB_GAMMA_TABLE_SIZE];
+       u16 gc[SH_CSS_ISP_RGB_GAMMA_TABLE_SIZE];
 };
 
 #endif /* __IA_CSS_GC2_PARAM_H */
index f14a66b78714ffc47e895de7a87a22c84823a989..a90d9d0a185476f1268fd05237ac60fc48387c1b 100644 (file)
@@ -129,4 +129,3 @@ ia_css_config_rgb_gamma_tables(void)
        default_b_gamma_table.vamem_type   = IA_CSS_VAMEM_TYPE_1;
 #endif
 }
-
index fab7467d30a5500a56fc34ce6dd9905013a13820..7df75918ce4c76a240cf9147fb3431f2c8772ac8 100644 (file)
 
 /* Number of elements in the sRGB gamma table. */
 #define IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE_LOG2 8
-#define IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE      (1U<<IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE_LOG2)
+#define IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE      BIT(IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE_LOG2)
 
 /* Number of elements in the sRGB gamma table. */
 #define IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE_LOG2    8
-#define IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE     ((1U<<IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE_LOG2) + 1)
+#define IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE     ((1U << IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE_LOG2) + 1)
 
 /** IA_CSS_VAMEM_TYPE_1(ISP2300) or
      IA_CSS_VAMEM_TYPE_2(ISP2400) */
 union ia_css_rgb_gamma_data {
-       uint16_t vamem_1[IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE];
+       u16 vamem_1[IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE];
        /** RGB Gamma table on vamem type1. This table is not used,
                because sRGB Gamma Correction is not implemented for ISP2300. */
-       uint16_t vamem_2[IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE];
+       u16 vamem_2[IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE];
                /** RGB Gamma table on vamem type2. u0.12, [0,4095] */
 };
 
index 8215ae47d38430aa6931c1fe4750e81deaa5d80b..763ce01afe60f2a5b5dbae46aa298cdd17901673 100644 (file)
@@ -20,7 +20,7 @@ void
 ia_css_hdr_init_config(
        struct sh_css_isp_hdr_params *to,
        const struct ia_css_hdr_config *from,
-       unsigned size)
+       unsigned int size)
 {
        int i;
        (void)size;
index 8f89bc8f1ca2b5e6693fa7555bc7cad8ebe4b03a..5ee0d8dd12c822ee6d8a355186a2ed20013f5abb 100644 (file)
@@ -26,6 +26,6 @@ void
 ia_css_hdr_init_config(
        struct sh_css_isp_hdr_params *to,
        const struct ia_css_hdr_config *from,
-       unsigned size);
+       unsigned int size);
 
 #endif /* __IA_CSS_HDR_HOST_H */
index 1c053af7d0d355e270b1377834d73f115e44dae1..784c716ce5e39cfc839bdc3e721475bd875c31bb 100644 (file)
 
 /* HDR irradiance map parameters on ISP. */
 struct sh_css_hdr_irradiance_params {
-       int32_t test_irr;
-       int32_t match_shift[HDR_NUM_INPUT_FRAMES - 1];  /* Histogram matching shift parameter */
-       int32_t match_mul[HDR_NUM_INPUT_FRAMES - 1];    /* Histogram matching multiplication parameter */
-       int32_t thr_low[HDR_NUM_INPUT_FRAMES - 1];      /* Weight map soft threshold low bound parameter */
-       int32_t thr_high[HDR_NUM_INPUT_FRAMES - 1];     /* Weight map soft threshold high bound parameter */
-       int32_t thr_coeff[HDR_NUM_INPUT_FRAMES - 1];    /* Soft threshold linear function coefficient */
-       int32_t thr_shift[HDR_NUM_INPUT_FRAMES - 1];    /* Soft threshold precision shift parameter */
-       int32_t weight_bpp;                             /* Weight map bits per pixel */
+       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 weight_bpp;                             /* Weight map bits per pixel */
 };
 
 /* HDR deghosting parameters on ISP */
 struct sh_css_hdr_deghost_params {
-       int32_t test_deg;
+       s32 test_deg;
 };
 
 /* HDR exclusion parameters on ISP */
 struct sh_css_hdr_exclusion_params {
-       int32_t test_excl;
+       s32 test_excl;
 };
 
 /* HDR ISP parameters */
index a31c9e828e22543f11b7a97b932a0ebef8058b4f..a57a9d124363c772e7ba7e3e72932e03a42d1b76 100644 (file)
@@ -28,13 +28,13 @@ ia_css_bayer_io_config(
        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 **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 ddr_bits_per_element = sizeof(short) * 8;
-       const unsigned ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS, ddr_bits_per_element);
-       unsigned size_get = 0, size_put = 0;
-       unsigned offset = 0;
+       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);
+       unsigned int size_get = 0, size_put = 0;
+       unsigned int offset = 0;
 
        if (binary->info->mem_offsets.offsets.param) {
                size_get = binary->info->mem_offsets.offsets.param->dmem.get.size;
index 7e5d4cfe3454a88a43e226b4e7fd10a167cbdb40..3decbf1a188d177bf4db40f268fd1aaf3676d9ed 100644 (file)
@@ -21,7 +21,6 @@
 #include "ia_css_binary.h"
 #include "sh_css_internal.h"
 
-
 void
 ia_css_bayer_io_config(
        const struct ia_css_binary     *binary,
index 8a9a97063264859479f30a7e46ab550afb8cd5dc..aedf2d88f87cd70abc8af579f217e7e976c450d9 100644 (file)
 #define MAX_IO_DMA_CHANNELS 2
 
 struct ia_css_common_io_config {
-       unsigned base_address;
-       unsigned width;
-       unsigned height;
-       unsigned stride;
-       unsigned ddr_elems_per_word;
-       unsigned dma_channel[MAX_IO_DMA_CHANNELS];
+       unsigned int base_address;
+       unsigned int width;
+       unsigned int height;
+       unsigned int stride;
+       unsigned int ddr_elems_per_word;
+       unsigned int dma_channel[MAX_IO_DMA_CHANNELS];
 };
 
 #endif /* __IA_CSS_COMMON_IO_TYPES */
index f80480cf9de202cd368ce611d64a3be7d446b93e..5e511edb05e2d41f370beffb8639a57847482ce6 100644 (file)
@@ -28,13 +28,13 @@ ia_css_bayer_io_config(
        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 **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 ddr_bits_per_element = sizeof(short) * 8;
-       const unsigned ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS, ddr_bits_per_element);
-       unsigned size_get = 0, size_put = 0;
-       unsigned offset = 0;
+       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);
+       unsigned int size_get = 0, size_put = 0;
+       unsigned int offset = 0;
 
        if (binary->info->mem_offsets.offsets.param) {
                size_get = binary->info->mem_offsets.offsets.param->dmem.get.size;
index ab9fa31bfc5ee868b3c9f4505e6fe2b9cc121990..eaf54524245a06fc0b2879b8d3aa70904ad124c8 100644 (file)
@@ -21,7 +21,6 @@ more details.
 #include "ia_css_binary.h"
 #include "sh_css_internal.h"
 
-
 void
 ia_css_bayer_io_config(
        const struct ia_css_binary     *binary,
index 0a19e2d1aff4a219ff5e158d558df501bed8f011..1a505049aa43c2df85d69a791e00d1319c66cff5 100644 (file)
@@ -19,12 +19,12 @@ more details.
 #define MAX_IO_DMA_CHANNELS 3
 
 struct ia_css_common_io_config {
-       unsigned base_address;
-       unsigned width;
-       unsigned height;
-       unsigned stride;
-       unsigned ddr_elems_per_word;
-       unsigned dma_channel[MAX_IO_DMA_CHANNELS];
+       unsigned int base_address;
+       unsigned int width;
+       unsigned int height;
+       unsigned int stride;
+       unsigned int ddr_elems_per_word;
+       unsigned int dma_channel[MAX_IO_DMA_CHANNELS];
 };
 
 #endif /* __IA_CSS_COMMON_IO_TYPES */
index eb9e9439cc2188e4501a37e006c233fc2d09ff04..bc8a695b8969241d9139778d1e5311166f936d57 100644 (file)
@@ -28,13 +28,13 @@ ia_css_yuv444_io_config(
        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 **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 ddr_bits_per_element = sizeof(short) * 8;
-       const unsigned ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS, ddr_bits_per_element);
-       unsigned size_get = 0, size_put = 0;
-       unsigned offset = 0;
+       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);
+       unsigned int size_get = 0, size_put = 0;
+       unsigned int offset = 0;
 
        if (binary->info->mem_offsets.offsets.param) {
                size_get = binary->info->mem_offsets.offsets.param->dmem.get.size;
index 480172d39aeeed6316de2aaebfb3f38b54dd7e66..e5b2aa76ceaefb32114b0116bab50e688638f785 100644 (file)
@@ -21,7 +21,6 @@ more details.
 #include "ia_css_binary.h"
 #include "sh_css_internal.h"
 
-
 void
 ia_css_yuv444_io_config(
        const struct ia_css_binary     *binary,
index 9e41cc0a307f025876127e052ddc5c8ed41342d4..cc39a35b999b663f7a5a36991b0b8b7ae1395b48 100644 (file)
@@ -27,7 +27,7 @@ void
 ia_css_iterator_config(
        struct sh_css_isp_iterator_isp_config *to,
        const struct ia_css_iterator_configuration *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        ia_css_frame_info_to_frame_sp_info(&to->input_info,    from->input_info);
index d8f249c5a53b41ab0d04135d9eec4a5ee1f7d7a3..279909cf66a4926b6732d643a21f2e9e8d16b267 100644 (file)
@@ -24,7 +24,7 @@ void
 ia_css_iterator_config(
        struct sh_css_isp_iterator_isp_config *to,
        const struct ia_css_iterator_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 enum ia_css_err
 ia_css_iterator_configure(
index 5ddf61fc95fa20d48cf8c2e8b95b551947e76368..7cef616e7d07fcd1707601ec97feef5046e75285 100644 (file)
@@ -58,7 +58,6 @@ ia_css_macc1_5_vmem_encode(
                        params->data[2][(idx)] = from->data[j + 2];
                        params->data[3][(idx)] = from->data[j + 3];
                }
-
 }
 
 #ifndef IA_CSS_NO_DEBUG
index 41a2da460dcf38d050891fef834f08121b1da5ee..1ac2c9c50a71a888bc406d02d75c9323cac42084 100644 (file)
 
 /* MACC */
 struct sh_css_isp_macc1_5_params {
-       int32_t exp;
+       s32 exp;
 };
 
 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 9cd31c2c0253b8bbf774785d79edc076d105e9cf..9aa352cbcffcce1962169b1c177a70e90ce4c7ff 100644 (file)
@@ -24,7 +24,6 @@
  * ISP2.6.1: MACC1_5 is used.
  */
 
-
 /* Number of axes in the MACC table. */
 #define IA_CSS_MACC_NUM_AXES           16
 /* Number of coefficients per MACC axes. */
@@ -54,7 +53,7 @@
  *   OutV = (   0 * InU + 4096 * InV) >> (13 - 1)
  */
 struct ia_css_macc1_5_table {
-       int16_t data[IA_CSS_MACC_NUM_COEFS * IA_CSS_MACC_NUM_AXES];
+       s16 data[IA_CSS_MACC_NUM_COEFS * IA_CSS_MACC_NUM_AXES];
        /** 16 of 2x2 matix
          MACC1_5: s[macc_config.exp].[13-macc_config.exp], [-8192,8191]
            default/ineffective: (s1.12)
@@ -67,7 +66,7 @@ struct ia_css_macc1_5_table {
  *  ISP2: MACC1_5 is used.
  */
 struct ia_css_macc1_5_config {
-       uint8_t exp;    /** Common exponent of ia_css_macc_table.
+       u8 exp; /** Common exponent of ia_css_macc_table.
                                u8.0, [0,13], default 1, ineffective 1 */
 };
 
index 1f7e9e4eec3c572ff116c11e9466d55331a7e505..f931f631d2bcba6b970ee5e4318ff5066899686c 100644 (file)
@@ -27,7 +27,7 @@ void
 ia_css_macc_encode(
        struct sh_css_isp_macc_params *to,
        const struct ia_css_macc_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->exp = from->exp;
@@ -36,12 +36,12 @@ ia_css_macc_encode(
 void
 ia_css_macc_dump(
        const struct sh_css_isp_macc_params *macc,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_macc_debug_dtrace(
        const struct ia_css_macc_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
                "config.exp=%d\n",
index 044b01d38ad62d0f88e47e728d5375ab95f6f9d2..843892de45a527aca851de08ec3f7b245ea45ba8 100644 (file)
@@ -26,17 +26,16 @@ void
 ia_css_macc_encode(
        struct sh_css_isp_macc_params *to,
        const struct ia_css_macc_config *from,
-       unsigned size);
-       
+       unsigned int size);
 
 void
 ia_css_macc_dump(
        const struct sh_css_isp_macc_params *macc,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_macc_debug_dtrace(
        const struct ia_css_macc_config *config,
-       unsigned level);
+       unsigned int level);
 
 #endif /* __IA_CSS_MACC_HOST_H */
index 6a12b922c48584a53dfc2714ee6c52ecdbb76831..3b4e440c3c30a4ab91d705ed3d5cebc2b0c00df0 100644 (file)
@@ -19,7 +19,7 @@
 
 /* MACC */
 struct sh_css_isp_macc_params {
-       int32_t exp;
+       s32 exp;
 };
 
 #endif /* __IA_CSS_MACC_PARAM_H */
index 8a6c3cafabdc8c6328c4aa5826f96f6b6fba2ac8..56c2114fe54c15854a31484de311d40f6f24f00f 100644 (file)
@@ -17,8 +17,8 @@
 #include "ia_css_macc_table.host.h"
 
 /* Multi-Axes Color Correction table for ISP1.
- *     64values = 2x2matrix for 16area, [s2.13]
- *     ineffective: 16 of "identity 2x2 matix" {8192,0,0,8192}
+ *     64values = 2x2matrix for 16area, [s2.13]
+ *     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,
@@ -32,8 +32,8 @@ const struct ia_css_macc_table default_macc_table = {
 };
 
 /* Multi-Axes Color Correction table for ISP2.
- *     64values = 2x2matrix for 16area, [s1.12]
- *     ineffective: 16 of "identity 2x2 matix" {4096,0,0,4096}
+ *     64values = 2x2matrix for 16area, [s1.12]
+ *     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,
index 2c9e5a8ceb9880e93b315d0e1bc0f3e20ba53af0..093302f08bcaf3d7cb54bb8d69542f9d8257de00 100644 (file)
@@ -50,7 +50,7 @@
  */
 
 struct ia_css_macc_table {
-       int16_t data[IA_CSS_MACC_NUM_COEFS * IA_CSS_MACC_NUM_AXES];
+       s16 data[IA_CSS_MACC_NUM_COEFS * IA_CSS_MACC_NUM_AXES];
        /** 16 of 2x2 matix
          MACC1: s2.13, [-65536,65535]
            default/ineffective:
index f77aff13f8e3cd91529e986ec20ab54f898e6b32..81f5a36e7b17813ae86124e6db6afed5eb5f988e 100644 (file)
@@ -32,7 +32,7 @@ void
 ia_css_ob2_encode(
        struct sh_css_isp_ob2_params *to,
        const struct ia_css_ob2_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
 
@@ -47,7 +47,7 @@ ia_css_ob2_encode(
 void
 ia_css_ob2_dump(
        const struct sh_css_isp_ob2_params *ob2,
-       unsigned level)
+       unsigned int level)
 {
        if (!ob2)
                return;
@@ -61,18 +61,15 @@ ia_css_ob2_dump(
                "ob2_blacklevel_b", ob2->blacklevel_b);
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
                "ob2_blacklevel_gb", ob2->blacklevel_gb);
-
 }
 
-
 void
 ia_css_ob2_debug_dtrace(
        const struct ia_css_ob2_config *config,
-       unsigned level)
+       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=%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);
 }
index 06846502eca3cc3da5a06230d06bd37b485b35f8..5350ec3ac64216cd9c030e8d2a00c9089d7e4b6a 100644 (file)
@@ -24,17 +24,17 @@ void
 ia_css_ob2_encode(
        struct sh_css_isp_ob2_params *to,
        const struct ia_css_ob2_config *from,
-       unsigned size);
+       unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_ob2_dump(
        const struct sh_css_isp_ob2_params *ob2,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_ob2_debug_dtrace(
-       const struct ia_css_ob2_config *config, unsigned level);
+       const struct ia_css_ob2_config *config, unsigned int level);
 #endif
 
 #endif /* __IA_CSS_OB2_HOST_H */
index 5c21d6a3911b1a99f29484b82ec198d9763e96ed..c728f8791ef4d1e93532b72ee7fd11e5cf6ecdb1 100644 (file)
 
 #include "type_support.h"
 
-
 /* OB2 (Optical Black) */
 struct sh_css_isp_ob2_params {
-       int32_t blacklevel_gr;
-       int32_t blacklevel_r;
-       int32_t blacklevel_b;
-       int32_t blacklevel_gb;
+       s32 blacklevel_gr;
+       s32 blacklevel_r;
+       s32 blacklevel_b;
+       s32 blacklevel_gb;
 };
 
 #endif /* __IA_CSS_OB2_PARAM_H */
index fd891ac092edf69efba5ed1a4212e2818b88a7f1..fce5e65ff6bce6023c1543805fcc5fad35167e9d 100644 (file)
@@ -47,7 +47,7 @@ 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 size)
+       unsigned int size)
 {
        unsigned int ob_bit_depth
                = config->isp_pipe_version == 2 ? SH_CSS_BAYER_BITS : config->raw_bit_depth;
@@ -91,7 +91,7 @@ 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 size)
+       unsigned int size)
 {
        struct sh_css_isp_ob_params tmp;
        struct sh_css_isp_ob_params *ob = &tmp;
@@ -100,18 +100,18 @@ ia_css_ob_vmem_encode(
        ia_css_ob_encode(&tmp, from, config, sizeof(tmp));
 
        {
-               unsigned i;
-               unsigned sp_obarea_start_bq  = ob->area_start_bq;
-               unsigned sp_obarea_length_bq = ob->area_length_bq;
-               unsigned low = sp_obarea_start_bq;
-               unsigned high = low + sp_obarea_length_bq;
-               uint16_t all_ones = ~0;
+               unsigned int i;
+               unsigned int sp_obarea_start_bq  = ob->area_start_bq;
+               unsigned int sp_obarea_length_bq = ob->area_length_bq;
+               unsigned int low = sp_obarea_start_bq;
+               unsigned int high = low + sp_obarea_length_bq;
+               u16 all_ones = ~0;
 
                for (i = 0; i < OBAREA_MASK_SIZE; i++) {
                        if (i >= low && i < high)
-                               to->vmask[i/ISP_VEC_NELEMS][i%ISP_VEC_NELEMS] = all_ones;
+                               to->vmask[i / ISP_VEC_NELEMS][i % ISP_VEC_NELEMS] = all_ones;
                        else
-                               to->vmask[i/ISP_VEC_NELEMS][i%ISP_VEC_NELEMS] = 0;
+                               to->vmask[i / ISP_VEC_NELEMS][i % ISP_VEC_NELEMS] = 0;
                }
        }
 }
@@ -119,7 +119,7 @@ ia_css_ob_vmem_encode(
 void
 ia_css_ob_dump(
        const struct sh_css_isp_ob_params *ob,
-       unsigned level)
+       unsigned int level)
 {
        if (!ob) return;
        ia_css_debug_dtrace(level, "Optical Black:\n");
@@ -140,20 +140,15 @@ ia_css_ob_dump(
                ob->area_length_bq_inverse);
 }
 
-
 void
 ia_css_ob_debug_dtrace(
        const struct ia_css_ob_config *config,
-       unsigned level)
+       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=%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 4af181470f8d2a1f24571b1e914db8e374f0a8d7..64cbaf15ceba005021c3d10360f74f3f7399ac74 100644 (file)
@@ -31,23 +31,23 @@ 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 size);
+       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 size);
+       unsigned int size);
 
 void
 ia_css_ob_dump(
        const struct sh_css_isp_ob_params *ob,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_ob_debug_dtrace(
-       const struct ia_css_ob_config *config, unsigned level)
+       const struct ia_css_ob_config *config, unsigned int level)
 ;
 
 #endif /* __IA_CSS_OB_HOST_H */
index a60a644bb4ff75f1920dbae37593477d792663a3..f5c3e14a1a8ad1151ba6896e9f194eaca5d67ae8 100644 (file)
 #define OBAREA_LENGTHBQ_INVERSE_SHIFT     12
 
 /* AREA_LENGTH_UNIT is dependent on NWAY, requires rewrite */
-#define AREA_LENGTH_UNIT (1<<12)
-
+#define AREA_LENGTH_UNIT BIT(12)
 
 /* OB (Optical Black) */
 struct sh_css_isp_ob_stream_config {
-       unsigned isp_pipe_version;
-       unsigned raw_bit_depth;
+       unsigned int isp_pipe_version;
+       unsigned int raw_bit_depth;
 };
 
 struct sh_css_isp_ob_params {
-       int32_t blacklevel_gr;
-       int32_t blacklevel_r;
-       int32_t blacklevel_b;
-       int32_t blacklevel_gb;
-       int32_t area_start_bq;
-       int32_t area_length_bq;
-       int32_t area_length_bq_inverse;
+       s32 blacklevel_gr;
+       s32 blacklevel_r;
+       s32 blacklevel_b;
+       s32 blacklevel_gb;
+       s32 area_start_bq;
+       s32 area_length_bq;
+       s32 area_length_bq_inverse;
 };
 
 struct sh_css_isp_ob_vmem_params {
index a9717b8f44acc744786592080e48412c4888dbef..317b24e240d8f5fa34d286bba26b46693aca611d 100644 (file)
@@ -55,15 +55,14 @@ struct ia_css_ob_config {
                                        (used for Fixed Mode only).
                                        u0.16, [0,65535],
                                        default/ineffective 0 */
-       uint16_t start_position; /** Start position of OB area
+       u16 start_position; /** Start position of OB area
                                        (used for Raster Mode only).
                                        u16.0, [0,63],
                                        default/ineffective 0 */
-       uint16_t end_position;  /** End position of OB area
+       u16 end_position;  /** End position of OB area
                                        (used for Raster Mode only).
                                        u16.0, [0,63],
                                        default/ineffective 0 */
 };
 
 #endif /* __IA_CSS_OB_TYPES_H */
-
index 9efe5e5e4e06bea0eb72768eaa4ee2e13ad38fdc..0446faae159f6cd8e29ce947fa114f6d2da0822c 100644 (file)
@@ -42,7 +42,7 @@ void
 ia_css_output_encode(
        struct sh_css_isp_output_params *to,
        const struct ia_css_output_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->enable_hflip = from->enable_hflip;
@@ -53,9 +53,9 @@ void
 ia_css_output_config(
        struct sh_css_isp_output_isp_config *to,
        const struct ia_css_output_configuration  *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned elems_a = ISP_VEC_NELEMS;
+       unsigned int elems_a = ISP_VEC_NELEMS;
 
        (void)size;
        ia_css_dma_configure_from_info(&to->port_b, from->info);
@@ -65,16 +65,16 @@ ia_css_output_config(
        ia_css_frame_info_to_frame_sp_info(&to->info, from->info);
 
        /* Assume divisiblity here, may need to generalize to fixed point. */
-       assert (elems_a % to->port_b.elems == 0);
+       assert(elems_a % to->port_b.elems == 0);
 }
 
 void
 ia_css_output0_config(
        struct sh_css_isp_output_isp_config       *to,
        const struct ia_css_output0_configuration *from,
-       unsigned size)
+       unsigned int size)
 {
-       ia_css_output_config (
+       ia_css_output_config(
                to, (const struct ia_css_output_configuration *)from, size);
 }
 
@@ -82,9 +82,9 @@ void
 ia_css_output1_config(
        struct sh_css_isp_output_isp_config       *to,
        const struct ia_css_output1_configuration *from,
-       unsigned size)
+       unsigned int size)
 {
-       ia_css_output_config (
+       ia_css_output_config(
                to, (const struct ia_css_output_configuration *)from, size);
 }
 
@@ -93,7 +93,7 @@ ia_css_output_configure(
        const struct ia_css_binary     *binary,
        const struct ia_css_frame_info *info)
 {
-       if (NULL != info) {
+       if (info) {
                struct ia_css_output_configuration config =
                                default_output_configuration;
 
@@ -108,7 +108,7 @@ ia_css_output0_configure(
        const struct ia_css_binary     *binary,
        const struct ia_css_frame_info *info)
 {
-       if (NULL != info) {
+       if (info) {
                struct ia_css_output0_configuration config =
                                default_output0_configuration;
 
@@ -123,8 +123,7 @@ ia_css_output1_configure(
        const struct ia_css_binary     *binary,
        const struct ia_css_frame_info *info)
 {
-
-       if (NULL != info) {
+       if (info) {
                struct ia_css_output1_configuration config =
                                default_output1_configuration;
 
@@ -137,7 +136,7 @@ ia_css_output1_configure(
 void
 ia_css_output_dump(
        const struct sh_css_isp_output_params *output,
-       unsigned level)
+       unsigned int level)
 {
        if (!output) return;
        ia_css_debug_dtrace(level, "Horizontal Output Flip:\n");
@@ -151,7 +150,7 @@ ia_css_output_dump(
 void
 ia_css_output_debug_dtrace(
        const struct ia_css_output_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
                "config.enable_hflip=%d",
index 530f934ce81e799671778da3800df00b497e08aa..4fe2c54dae5e7dad283d1342328bc1fba1e88732 100644 (file)
@@ -27,25 +27,25 @@ void
 ia_css_output_encode(
        struct sh_css_isp_output_params *to,
        const struct ia_css_output_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_output_config(
        struct sh_css_isp_output_isp_config      *to,
        const struct ia_css_output_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_output0_config(
        struct sh_css_isp_output_isp_config       *to,
        const struct ia_css_output0_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_output1_config(
        struct sh_css_isp_output_isp_config       *to,
        const struct ia_css_output1_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_output_configure(
@@ -65,11 +65,11 @@ ia_css_output1_configure(
 void
 ia_css_output_dump(
        const struct sh_css_isp_output_params *output,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_output_debug_dtrace(
        const struct ia_css_output_config *config,
-       unsigned level);
+       unsigned int level);
 
 #endif /* __IA_CSS_OUTPUT_HOST_H */
index eb7defa4114563a23bae8f9c8991585db334f7b8..3a63eee58cb606998cd7317c17a1a26917176645 100644 (file)
 
 /* output frame */
 struct sh_css_isp_output_isp_config {
-       uint32_t width_a_over_b;
-       uint32_t height;
-       uint32_t enable;
+       u32 width_a_over_b;
+       u32 height;
+       u32 enable;
        struct ia_css_frame_sp_info info;
        struct dma_port_config port_b;
 };
 
 struct sh_css_isp_output_params {
-       uint8_t enable_hflip;
-       uint8_t enable_vflip;
+       u8 enable_hflip;
+       u8 enable_vflip;
 };
 
 #endif /* __IA_CSS_OUTPUT_PARAM_H */
index 9c7342fb8145f379ec394567a5a9f5db7727f6f1..3248bc3fd6c324402810148c1236b4b3713de1cb 100644 (file)
@@ -40,9 +40,8 @@ struct ia_css_output1_configuration {
 };
 
 struct ia_css_output_config {
-       uint8_t enable_hflip;  /** enable horizontal output mirroring */
-       uint8_t enable_vflip;  /** enable vertical output mirroring */
+       u8 enable_hflip;  /** enable horizontal output mirroring */
+       u8 enable_vflip;  /** enable vertical output mirroring */
 };
 
 #endif /* __IA_CSS_OUTPUT_TYPES_H */
-
index d1fb4b11600393f57c16b8208c339090bb76e448..f6e452e1d70afb05230fffa32f612581afe81694 100644 (file)
@@ -31,16 +31,16 @@ void
 ia_css_qplane_config(
        struct sh_css_isp_qplane_isp_config *to,
        const struct ia_css_qplane_configuration  *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned elems_a = ISP_VEC_NELEMS;
+       unsigned int elems_a = ISP_VEC_NELEMS;
 
        (void)size;
        ia_css_dma_configure_from_info(&to->port_b, from->info);
        to->width_a_over_b = elems_a / to->port_b.elems;
 
        /* Assume divisiblity here, may need to generalize to fixed point. */
-       assert (elems_a % to->port_b.elems == 0);
+       assert(elems_a % to->port_b.elems == 0);
 
        to->inout_port_config = from->pipe->inout_port_config;
        to->format = from->info->format;
index c41e9e5e0fd7a4bcee0d08182caaecd7d1c2202a..7448ec706893bf09bcc95ca5faa47f0993f673ae 100644 (file)
@@ -32,7 +32,7 @@ void
 ia_css_qplane_config(
        struct sh_css_isp_qplane_isp_config      *to,
        const struct ia_css_qplane_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_qplane_configure(
index 5885f621de88a59e6a629e805cd385fd435fbe26..87898d2df2de13c5f249f35e93b60d085d61e5ed 100644 (file)
 
 /* qplane channel */
 struct sh_css_isp_qplane_isp_config {
-       uint32_t width_a_over_b;
+       u32 width_a_over_b;
        struct dma_port_config port_b;
-       uint32_t inout_port_config;
-       uint32_t input_needs_raw_binning;
-       uint32_t format; /* enum ia_css_frame_format */
+       u32 inout_port_config;
+       u32 input_needs_raw_binning;
+       u32 format; /* enum ia_css_frame_format */
 };
 
 #endif /* __IA_CSS_QPLANE_PARAM_H */
index 62d371841619b0104ebd917cea589d1b3b75c077..b7ecd8f40c1c08c18f4c8f66fc984ad75a1e4573 100644 (file)
  *  ISP block: qplane frame
  */
 
-
 struct ia_css_qplane_configuration {
        const struct sh_css_sp_pipeline *pipe;
        const struct ia_css_frame_info  *info;
 };
 
 #endif /* __IA_CSS_QPLANE_TYPES_H */
-
index fa9ce0fedf234b3d03ef3ad0c4997493b441a99b..3d8d2683fb5dfb1d3fca41063f64517c5a99e730 100644 (file)
 
 #include "ia_css_raw.host.h"
 
-
 static const struct ia_css_raw_configuration default_config = {
        .pipe = (struct sh_css_sp_pipeline *)NULL,
 };
 
 static inline unsigned
-sh_css_elems_bytes_from_info (unsigned raw_bit_depth)
+sh_css_elems_bytes_from_info(unsigned int raw_bit_depth)
 {
-       return CEIL_DIV(raw_bit_depth,8);
+       return CEIL_DIV(raw_bit_depth, 8);
 }
 
 /* MW: These areMIPI / ISYS properties, not camera function properties */
@@ -74,9 +73,9 @@ void
 ia_css_raw_config(
        struct sh_css_isp_raw_isp_config *to,
        const struct ia_css_raw_configuration  *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned elems_a = ISP_VEC_NELEMS;
+       unsigned int elems_a = ISP_VEC_NELEMS;
        const struct ia_css_frame_info *in_info = from->in_info;
        const struct ia_css_frame_info *internal_info = from->internal_info;
 
@@ -121,7 +120,7 @@ ia_css_raw_configure(
        bool two_ppc,
        bool deinterleaved)
 {
-       uint8_t enable_left_padding = (uint8_t)((binary->left_padding) ? 1 : 0);
+       u8 enable_left_padding = (uint8_t)((binary->left_padding) ? 1 : 0);
        struct ia_css_raw_configuration config = default_config;
 
        config.pipe                = pipe;
index ac6b7f6b59c62987f934f0d10af82680919f039f..189c0839ee01df1cbf83bf270c06ffd6848eb913 100644 (file)
@@ -24,7 +24,7 @@ void
 ia_css_raw_config(
        struct sh_css_isp_raw_isp_config      *to,
        const struct ia_css_raw_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_raw_configure(
index 12168b2dec2d013e68eab478a66423c0ab3e807c..a1a314272a77cf3a4860d7b58fc514c86d1b7dd1 100644 (file)
 
 /* Raw channel */
 struct sh_css_isp_raw_isp_config {
-       uint32_t width_a_over_b;
+       u32 width_a_over_b;
        struct dma_port_config port_b;
-       uint32_t inout_port_config;
-       uint32_t input_needs_raw_binning;
-       uint32_t format; /* enum ia_css_frame_format */
-       uint32_t required_bds_factor;
-       uint32_t two_ppc;
-       uint32_t stream_format; /* enum sh_stream_format */
-       uint32_t deinterleaved;
-       uint32_t start_column; /*left crop offset*/
-       uint32_t start_line; /*top crop offset*/
-       uint8_t enable_left_padding; /*need this for multiple binary case*/
+       u32 inout_port_config;
+       u32 input_needs_raw_binning;
+       u32 format; /* enum ia_css_frame_format */
+       u32 required_bds_factor;
+       u32 two_ppc;
+       u32 stream_format; /* enum sh_stream_format */
+       u32 deinterleaved;
+       u32 start_column; /*left crop offset*/
+       u32 start_line; /*top crop offset*/
+       u8 enable_left_padding; /*need this for multiple binary case*/
 };
 
 #endif /* __IA_CSS_RAW_PARAM_H */
index ae868eb5e10f7e13e0fa840ade1a3c9dd46d4895..7838f59a298619f6663d996049b4c2dc7e822815 100644 (file)
@@ -30,8 +30,7 @@ struct ia_css_raw_configuration {
        bool two_ppc;
        enum atomisp_input_format stream_format;
        bool deinterleaved;
-       uint8_t enable_left_padding;
+       u8 enable_left_padding;
 };
 
 #endif /* __IA_CSS_RAW_TYPES_H */
-
index 92168211683d51114ce0e27caea0f8c33d26a724..50ab19ad8b1e398220d7cdd739d450bf55a3b7d4 100644 (file)
@@ -25,7 +25,7 @@ void
 ia_css_raa_encode(
        struct sh_css_isp_aa_params *to,
        const struct ia_css_aa_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        (void)to;
index b4f245c19f18b76901d939079064e3cc742be8c0..9435781ac99ee86e64e9d82e3b31ee5092b3f52f 100644 (file)
@@ -22,6 +22,6 @@ void
 ia_css_raa_encode(
        struct sh_css_isp_aa_params *to,
        const struct ia_css_aa_config *from,
-       unsigned size);
+       unsigned int size);
 
 #endif /* __IA_CSS_RAA_HOST_H */
index 4c0ed5d4d971fc1e9f541e1ac63515f456aaa8b9..692727ed010076fa562379fa02c18130214b38a2 100644 (file)
@@ -25,12 +25,12 @@ void
 ia_css_ref_config(
        struct sh_css_isp_ref_isp_config *to,
        const struct ia_css_ref_configuration  *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned elems_a = ISP_VEC_NELEMS, i;
+       unsigned int elems_a = ISP_VEC_NELEMS, i;
 
        (void)size;
-       ia_css_dma_configure_from_info(&to->port_b, &(from->ref_frames[0]->info));
+       ia_css_dma_configure_from_info(&to->port_b, &from->ref_frames[0]->info);
        to->width_a_over_b = elems_a / to->port_b.elems;
        to->dvs_frame_delay = from->dvs_frame_delay;
        for (i = 0; i < MAX_NUM_VIDEO_DELAY_FRAMES; i++) {
@@ -44,7 +44,7 @@ ia_css_ref_config(
        }
 
        /* Assume divisiblity here, may need to generalize to fixed point. */
-       assert (elems_a % to->port_b.elems == 0);
+       assert(elems_a % to->port_b.elems == 0);
 }
 
 void
@@ -54,7 +54,7 @@ ia_css_ref_configure(
        const uint32_t dvs_frame_delay)
 {
        struct ia_css_ref_configuration config;
-       unsigned i;
+       unsigned int i;
 
        for (i = 0; i < MAX_NUM_VIDEO_DELAY_FRAMES; i++)
                config.ref_frames[i] = ref_frames[i];
@@ -65,7 +65,7 @@ ia_css_ref_configure(
 void
 ia_css_init_ref_state(
        struct sh_css_isp_ref_dmem_state *state,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        assert(MAX_NUM_VIDEO_DELAY_FRAMES >= 2);
index 3c6d728d49ec688a979f8938e0969c18f367d5a0..29cca48b21930b46e3ac245a00d6897b2e9ca98f 100644 (file)
@@ -26,7 +26,7 @@ void
 ia_css_ref_config(
        struct sh_css_isp_ref_isp_config      *to,
        const struct ia_css_ref_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_ref_configure(
@@ -37,5 +37,5 @@ ia_css_ref_configure(
 void
 ia_css_init_ref_state(
        struct sh_css_isp_ref_dmem_state *state,
-       unsigned size);
+       unsigned int size);
 #endif /* __IA_CSS_REF_HOST_H */
index 026443b999a647500ae9b55105f0afd2fab50e98..0a0498c17fbacbca75349ca72894cf4b481581bb 100644 (file)
 /* Reference frame */
 struct ia_css_ref_configuration {
        const struct ia_css_frame *ref_frames[MAX_NUM_VIDEO_DELAY_FRAMES];
-       uint32_t dvs_frame_delay;
+       u32 dvs_frame_delay;
 };
 
 struct sh_css_isp_ref_isp_config {
-       uint32_t width_a_over_b;
+       u32 width_a_over_b;
        struct dma_port_config port_b;
        hrt_vaddress ref_frame_addr_y[MAX_NUM_VIDEO_DELAY_FRAMES];
        hrt_vaddress ref_frame_addr_c[MAX_NUM_VIDEO_DELAY_FRAMES];
-       uint32_t dvs_frame_delay;
+       u32 dvs_frame_delay;
 };
 
 #endif /* __IA_CSS_REF_PARAM_H */
index 7867be8a7958f83e081b582c9645d2d1191d8fed..1d30ccc2c638450e50b1ea51e5d0cd3aae2c4187 100644 (file)
@@ -19,8 +19,8 @@
 
 /* REF (temporal noise reduction) */
 struct sh_css_isp_ref_dmem_state {
-       int32_t ref_in_buf_idx;
-       int32_t ref_out_buf_idx;
+       s32 ref_in_buf_idx;
+       s32 ref_out_buf_idx;
 };
 
 #endif /* __IA_CSS_REF_STATE_H */
index aa733674f42b61e747973210c36cda9e06a26472..254835184fe49eb4d35a38b4c00f7541baffbceb 100644 (file)
@@ -46,7 +46,7 @@ static void
 ia_css_ae_encode(
        struct sh_css_isp_ae_params *to,
        const struct ia_css_3a_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        /* coefficients to calculate Y */
@@ -62,7 +62,7 @@ static void
 ia_css_awb_encode(
        struct sh_css_isp_awb_params *to,
        const struct ia_css_3a_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        /* AWB level gate */
@@ -78,7 +78,7 @@ static void
 ia_css_af_encode(
        struct sh_css_isp_af_params *to,
        const struct ia_css_3a_config *from,
-       unsigned size)
+       unsigned int size)
 {
        unsigned int i;
        (void)size;
@@ -98,7 +98,7 @@ void
 ia_css_s3a_encode(
        struct sh_css_isp_s3a_params *to,
        const struct ia_css_3a_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
 
@@ -110,13 +110,13 @@ ia_css_s3a_encode(
 #if 0
 void
 ia_css_process_s3a(
-       unsigned pipe_id,
+       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;
 
-       assert(params != NULL);
+       assert(params);
 
        if (dmem_offset >= 0) {
                ia_css_s3a_encode((struct sh_css_isp_s3a_params *)
@@ -137,7 +137,7 @@ ia_css_process_s3a(
 void
 ia_css_ae_dump(
        const struct sh_css_isp_ae_params *ae,
-       unsigned level)
+       unsigned int level)
 {
        if (!ae) return;
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
@@ -151,7 +151,7 @@ ia_css_ae_dump(
 void
 ia_css_awb_dump(
        const struct sh_css_isp_awb_params *awb,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
                        "awb_lg_high_raw", awb->lg_high_raw);
@@ -164,7 +164,7 @@ ia_css_awb_dump(
 void
 ia_css_af_dump(
        const struct sh_css_isp_af_params *af,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level, "\t%-32s = %d\n",
                        "af_fir1[0]", af->fir1[0]);
@@ -199,23 +199,21 @@ ia_css_af_dump(
 void
 ia_css_s3a_dump(
        const struct sh_css_isp_s3a_params *s3a,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level, "S3A Support:\n");
-       ia_css_ae_dump  (&s3a->ae, level);
-       ia_css_awb_dump (&s3a->awb, level);
-       ia_css_af_dump  (&s3a->af, level);
+       ia_css_ae_dump(&s3a->ae, level);
+       ia_css_awb_dump(&s3a->awb, level);
+       ia_css_af_dump(&s3a->af, level);
 }
 
 void
 ia_css_s3a_debug_dtrace(
        const struct ia_css_3a_config *config,
-       unsigned level)
+       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=%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);
@@ -238,9 +236,9 @@ ia_css_s3a_hmem_decode(
        int count_for_3a;
        int sum_r, diff;
 
-       assert(host_stats != NULL);
-       assert(host_stats->rgby_data != NULL);
-       assert(hmem_buf != NULL);
+       assert(host_stats);
+       assert(host_stats->rgby_data);
+       assert(hmem_buf);
 
        count_for_3a = host_stats->grid.width * host_stats->grid.height
            * host_stats->grid.bqs_per_grid_cell
@@ -267,6 +265,7 @@ ia_css_s3a_hmem_decode(
                int sum_g = 0;
                int sum_b = 0;
                int sum_y = 0;
+
                for (i = 0; i < HMEM_UNIT_SIZE; i++) {
                        sum_g += out_ptr[i].g;
                        sum_b += out_ptr[i].b;
@@ -301,9 +300,9 @@ ia_css_s3a_dmem_decode(
        int isp_width, host_width, height, i;
        struct ia_css_3a_output *host_ptr;
 
-       assert(host_stats != NULL);
-       assert(host_stats->data != NULL);
-       assert(isp_stats != NULL);
+       assert(host_stats);
+       assert(host_stats->data);
+       assert(isp_stats);
 
        isp_width  = host_stats->grid.aligned_width;
        host_width = host_stats->grid.width;
@@ -324,25 +323,25 @@ ia_css_s3a_dmem_decode(
 static inline int
 merge_hi_lo_14(unsigned short hi, unsigned short lo)
 {
-       int val = (int) ((((unsigned int) hi << 14) & 0xfffc000) |
-                       ((unsigned int) lo & 0x3fff));
+       int val = (int)((((unsigned int)hi << 14) & 0xfffc000) |
+                       ((unsigned int)lo & 0x3fff));
        return val;
 }
 
 void
 ia_css_s3a_vmem_decode(
        struct ia_css_3a_statistics *host_stats,
-       const uint16_t *isp_stats_hi,
+       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 uint16_t *hi, *lo;
+       const u16 *hi, *lo;
        struct ia_css_3a_output *output;
 
-       assert(host_stats!= NULL);
-       assert(host_stats->data != NULL);
-       assert(isp_stats_hi != NULL);
-       assert(isp_stats_lo != NULL);
+       assert(host_stats);
+       assert(host_stats->data);
+       assert(isp_stats_hi);
+       assert(isp_stats_lo);
 
        output = host_stats->data;
        out_width  = host_stats->grid.width;
index 4bc6c0bf478f88353696ec7df7365e1cf85bdf16..1dfe3262631836b120700c5e2836674c7454a7d0 100644 (file)
@@ -29,33 +29,33 @@ void
 ia_css_s3a_encode(
        struct sh_css_isp_s3a_params *to,
        const struct ia_css_3a_config *from,
-       unsigned size);
+       unsigned int size);
 
 #ifndef IA_CSS_NO_DEBUG
 void
 ia_css_ae_dump(
        const struct sh_css_isp_ae_params *ae,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_awb_dump(
        const struct sh_css_isp_awb_params *awb,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_af_dump(
        const struct sh_css_isp_af_params *af,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_s3a_dump(
        const struct sh_css_isp_s3a_params *s3a,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_s3a_debug_dtrace(
        const struct ia_css_3a_config *config,
-       unsigned level);
+       unsigned int level);
 #endif
 
 void
@@ -71,7 +71,7 @@ ia_css_s3a_dmem_decode(
 void
 ia_css_s3a_vmem_decode(
        struct ia_css_3a_statistics *host_stats,
-       const uint16_t *isp_stats_hi,
+       const u16 *isp_stats_hi,
        const uint16_t *isp_stats_lo);
 
 #endif /* __IA_CSS_S3A_HOST_H */
index 35fb0a2c921a19ac1c53797c5ab8e3bebe22c84c..041101767ff2f4b23d2b44ae4f124c239cfd851d 100644 (file)
 /* AE (3A Support) */
 struct sh_css_isp_ae_params {
        /* coefficients to calculate Y */
-       int32_t y_coef_r;
-       int32_t y_coef_g;
-       int32_t y_coef_b;
+       s32 y_coef_r;
+       s32 y_coef_g;
+       s32 y_coef_b;
 };
 
 /* AWB (3A Support) */
 struct sh_css_isp_awb_params {
-       int32_t lg_high_raw;
-       int32_t lg_low;
-       int32_t lg_high;
+       s32 lg_high_raw;
+       s32 lg_low;
+       s32 lg_high;
 };
 
 /* AF (3A Support) */
 struct sh_css_isp_af_params {
-       int32_t fir1[7];
-       int32_t fir2[7];
+       s32 fir1[7];
+       s32 fir2[7];
 };
 
 /* S3A (3A Support) */
 struct sh_css_isp_s3a_params {
        /* coefficients to calculate Y */
        struct sh_css_isp_ae_params ae;
-       
+
        /* AWB level gate */
        struct sh_css_isp_awb_params awb;
 
@@ -50,5 +50,4 @@ struct sh_css_isp_s3a_params {
        struct sh_css_isp_af_params af;
 };
 
-
 #endif /* __IA_CSS_S3A_PARAM_H */
index 63e70669f0859727b0dd3dc3bae64cc68bd15721..be8e83ec215c3e2f7ab16428c6d948ad2b5728fb 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <ia_css_frac.h>
 
-#if (defined(SYSTEM_css_skycam_c0_system)) && (! defined(PIPE_GENERATION) )
+#if (defined(SYSTEM_css_skycam_c0_system)) && (!defined(PIPE_GENERATION))
 #include "../../../../components/stats_3a/src/stats_3a_public.h"
 #endif
 
  *  ISP2: S3A2 is used.
  */
 struct ia_css_3a_grid_info {
-
 #if defined(SYSTEM_css_skycam_c0_system)
-       uint32_t ae_enable;                                     /** ae enabled in binary,
+       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*/
 
-       uint32_t awb_enable;                                    /** awb enabled in binary,
+       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*/
 
-       uint32_t af_enable;                                     /** af enabled in binary,
+       u32 af_enable;                                  /** af enabled in binary,
                                                                   0:disabled, 1:enabled */
        struct af_public_grid_config            af_grd_info;    /** see description in af_public.h*/
 
-       uint32_t awb_fr_enable;                                 /** awb_fr enabled in binary,
+       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*/
 
-        uint32_t elem_bit_depth;    /** TODO:Taken from BYT  - need input from AIQ
+       u32 elem_bit_depth;    /** TODO:Taken from BYT  - need input from AIQ
                                        if needed for SKC
                                        Bit depth of element used
                                        to calculate 3A statistics.
@@ -63,41 +62,40 @@ struct ia_css_3a_grid_info {
                                        bayer bit depth in DSP. */
 
 #else
-       uint32_t enable;            /** 3A statistics enabled.
+       u32 enable;            /** 3A statistics enabled.
                                        0:disabled, 1:enabled */
-       uint32_t use_dmem;          /** DMEM or VMEM determines layout.
+       u32 use_dmem;          /** DMEM or VMEM determines layout.
                                        0:3A statistics are stored to VMEM,
                                        1:3A statistics are stored to DMEM */
-       uint32_t has_histogram;     /** Statistics include histogram.
+       u32 has_histogram;     /** Statistics include histogram.
                                        0:no histogram, 1:has histogram */
-       uint32_t width;             /** Width of 3A grid table.
+       u32 width;                  /** Width of 3A grid table.
                                        (= Horizontal number of grid cells
                                        in table, which cells have effective
                                        statistics.) */
-       uint32_t height;            /** Height of 3A grid table.
+       u32 height;         /** Height of 3A grid table.
                                        (= Vertical number of grid cells
                                        in table, which cells have effective
                                        statistics.) */
-       uint32_t aligned_width;     /** Horizontal stride (for alloc).
+       u32 aligned_width;     /** Horizontal stride (for alloc).
                                        (= Horizontal number of grid cells
                                        in table, which means
                                        the allocated width.) */
-       uint32_t aligned_height;    /** Vertical stride (for alloc).
+       u32 aligned_height;    /** Vertical stride (for alloc).
                                        (= Vertical number of grid cells
                                        in table, which means
                                        the allocated height.) */
-       uint32_t bqs_per_grid_cell; /** Grid cell size in BQ(Bayer Quad) unit.
+       u32 bqs_per_grid_cell; /** Grid cell size in BQ(Bayer Quad) unit.
                                        (1BQ means {Gr,R,B,Gb}(2x2 pixels).)
                                        Valid values are 8,16,32,64. */
-       uint32_t deci_factor_log2;  /** log2 of bqs_per_grid_cell. */
-       uint32_t elem_bit_depth;    /** Bit depth of element used
+       u32 deci_factor_log2;  /** log2 of bqs_per_grid_cell. */
+       u32 elem_bit_depth;    /** Bit depth of element used
                                        to calculate 3A statistics.
                                        This is 13, which is the normalized
                                        bayer bit depth in DSP. */
 #endif
 };
 
-
 /* This struct should be split into 3, for AE, AWB and AF.
  * However, that will require driver/ 3A lib modifications.
  */
@@ -163,31 +161,30 @@ struct ia_css_3a_config {
  *  ISP2: S3A2 is used.
  */
 struct ia_css_3a_output {
-       int32_t ae_y;    /** Sum of Y in a statistics window, for AE.
+       s32 ae_y;    /** Sum of Y in a statistics window, for AE.
                                (u19.13) */
-       int32_t awb_cnt; /** Number of effective pixels
+       s32 awb_cnt; /** Number of effective pixels
                                in a statistics window.
                                Pixels passed by the AWB level gate check are
                                judged as "effective". (u32) */
-       int32_t awb_gr;  /** Sum of Gr in a statistics window, for AWB.
+       s32 awb_gr;  /** Sum of Gr in a statistics window, for AWB.
                                All Gr pixels (not only for effective pixels)
                                are summed. (u19.13) */
-       int32_t awb_r;   /** Sum of R in a statistics window, for AWB.
+       s32 awb_r;   /** Sum of R in a statistics window, for AWB.
                                All R pixels (not only for effective pixels)
                                are summed. (u19.13) */
-       int32_t awb_b;   /** Sum of B in a statistics window, for AWB.
+       s32 awb_b;   /** Sum of B in a statistics window, for AWB.
                                All B pixels (not only for effective pixels)
                                are summed. (u19.13) */
-       int32_t awb_gb;  /** Sum of Gb in a statistics window, for AWB.
+       s32 awb_gb;  /** Sum of Gb in a statistics window, for AWB.
                                All Gb pixels (not only for effective pixels)
                                are summed. (u19.13) */
-       int32_t af_hpf1; /** Sum of |Y| following high pass filter af_fir1
+       s32 af_hpf1; /** Sum of |Y| following high pass filter af_fir1
                                within a statistics window, for AF. (u19.13) */
-       int32_t af_hpf2; /** Sum of |Y| following high pass filter af_fir2
+       s32 af_hpf2; /** Sum of |Y| following high pass filter af_fir2
                                within a statistics window, for AF. (u19.13) */
 };
 
-
 /* 3A Statistics. This structure describes the statistics that are generated
  *  using the provided configuration (ia_css_3a_config).
  */
@@ -210,11 +207,10 @@ struct ia_css_3a_statistics {
  *  ISP2: HIST2 is used.
  */
 struct ia_css_3a_rgby_output {
-       uint32_t r;     /** Number of R of one bin of the histogram R. (u24) */
-       uint32_t g;     /** Number of G of one bin of the histogram G. (u24) */
-       uint32_t b;     /** Number of B of one bin of the histogram B. (u24) */
-       uint32_t y;     /** Number of Y of one bin of the histogram Y. (u24) */
+       u32 r;  /** Number of R of one bin of the histogram R. (u24) */
+       u32 g;  /** Number of G of one bin of the histogram G. (u24) */
+       u32 b;  /** Number of B of one bin of the histogram B. (u24) */
+       u32 y;  /** Number of Y of one bin of the histogram Y. (u24) */
 };
 
 #endif /* __IA_CSS_S3A_TYPES_H */
-
index 565ae45b75417264144f673b7f974738287a58c7..8ec9296300ca04ac42fe072fc90a96527fa4ff57 100644 (file)
@@ -29,7 +29,7 @@ void
 ia_css_sc_encode(
        struct sh_css_isp_sc_params *to,
        struct ia_css_shading_table **from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->gain_shift = (*from)->fraction_bits;
@@ -38,7 +38,7 @@ ia_css_sc_encode(
 void
 ia_css_sc_dump(
        const struct sh_css_isp_sc_params *sc,
-       unsigned level)
+       unsigned int level)
 {
        if (!sc) return;
        ia_css_debug_dtrace(level, "Shading Correction:\n");
@@ -51,11 +51,11 @@ void
 ia_css_sc_config(
        struct sh_css_isp_sc_isp_config *to,
        const struct ia_css_sc_configuration *from,
-       unsigned size)
+       unsigned int size)
 {
-       uint32_t internal_org_x_bqs = from->internal_frame_origin_x_bqs_on_sctbl;
-       uint32_t internal_org_y_bqs = from->internal_frame_origin_y_bqs_on_sctbl;
-       uint32_t slice, rest, i;
+       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;
+       u32 slice, rest, i;
 
        (void)size;
 
@@ -73,7 +73,7 @@ ia_css_sc_config(
 void
 ia_css_sc_configure(
        const struct ia_css_binary *binary,
-       uint32_t internal_frame_origin_x_bqs_on_sctbl,
+       u32 internal_frame_origin_x_bqs_on_sctbl,
        uint32_t internal_frame_origin_y_bqs_on_sctbl)
 {
        const struct ia_css_sc_configuration config = {
@@ -95,9 +95,9 @@ void
 sh_css_get_shading_settings(const struct ia_css_isp_parameters *params,
                        struct ia_css_shading_settings *settings)
 {
-       if (settings == NULL)
+       if (!settings)
                return;
-       assert(params != NULL);
+       assert(params);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                "ia_css_get_shading_settings() enter: settings=%p\n", settings);
@@ -113,9 +113,9 @@ void
 sh_css_set_shading_settings(struct ia_css_isp_parameters *params,
                        const struct ia_css_shading_settings *settings)
 {
-       if (settings == NULL)
+       if (!settings)
                return;
-       assert(params != NULL);
+       assert(params);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                "ia_css_set_shading_settings() enter: settings.enable_shading_table_conversion=%d\n",
@@ -127,4 +127,5 @@ sh_css_set_shading_settings(struct ia_css_isp_parameters *params,
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                "ia_css_set_shading_settings() leave: return_void\n");
 }
+
 /* ------ deprecated(bz675) : to ------ */
index b35ac3e4009be38ecb15ed6d2c824434d730d1c9..6f25401c173f8cbfa3fbe7cb1cc3bb21191c9378 100644 (file)
@@ -24,12 +24,12 @@ void
 ia_css_sc_encode(
        struct sh_css_isp_sc_params *to,
        struct ia_css_shading_table **from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_sc_dump(
        const struct sh_css_isp_sc_params *sc,
-       unsigned level);
+       unsigned int level);
 
 #ifdef ISP2401
 /* @brief Configure the shading correction.
@@ -43,7 +43,7 @@ void
 ia_css_sc_config(
        struct sh_css_isp_sc_isp_config *to,
        const struct ia_css_sc_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 /* @brief Configure the shading correction.
  * @param[in]  binary  The binary, which has the shading correction.
@@ -60,7 +60,7 @@ ia_css_sc_config(
 void
 ia_css_sc_configure(
        const struct ia_css_binary *binary,
-       uint32_t internal_frame_origin_x_bqs_on_sctbl,
+       u32 internal_frame_origin_x_bqs_on_sctbl,
        uint32_t internal_frame_origin_y_bqs_on_sctbl);
 
 #endif
index d997d5137634c7df2047412c681389e0581239e1..85bc4f2c8d06fc61d07e831bc45b48de5f85eb58 100644 (file)
@@ -46,7 +46,7 @@
 #endif
 /* SC (Shading Corrction) */
 struct sh_css_isp_sc_params {
-       int32_t gain_shift;
+       s32 gain_shift;
 };
 
 #ifdef ISP2401
@@ -63,8 +63,8 @@ struct sh_css_isp_sc_params {
 #define SH_CSS_SC_INTERPED_GAIN_HOR_SLICE_TIMES   8
 
 struct sh_css_isp_sc_isp_config {
-       uint32_t interped_gain_hor_slice_bqs[SH_CSS_SC_INTERPED_GAIN_HOR_SLICE_TIMES];
-       uint32_t internal_frame_origin_y_bqs_on_sctbl;
+       u32 interped_gain_hor_slice_bqs[SH_CSS_SC_INTERPED_GAIN_HOR_SLICE_TIMES];
+       u32 internal_frame_origin_y_bqs_on_sctbl;
 };
 
 #endif
index 30ce499ac8cfc1d3264eb2c0d68007b2c6e38bab..8cd4f4eccfbc3edcb526fdfbae35ff5eda757eec 100644 (file)
@@ -19,7 +19,6 @@
 * CSS-API header file for Lens Shading Correction (SC) parameters.
 */
 
-
 /* Number of color planes in the shading table. */
 #define IA_CSS_SC_NUM_COLORS           4
 
@@ -64,25 +63,25 @@ enum ia_css_sc_color {
  *  ISP2: SC1 is used.
  */
 struct ia_css_shading_table {
-       uint32_t enable; /** Set to false for no shading correction.
-                         The data field can be NULL when enable == true */
+       u32 enable; /** Set to false for no shading correction.
+                         The data field can be NULL when enable == true */
 /* ------ deprecated(bz675) : from ------ */
-       uint32_t sensor_width;  /** Native sensor width in pixels. */
-       uint32_t sensor_height; /** Native sensor height in lines.
+       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
                as 0, sensor_width and sensor_height are NOT used.
                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 ------ */
-       uint32_t width;  /** Number of data points per line per color.
+       u32 width;  /** Number of data points per line per color.
                                u8.0, [0,81] */
-       uint32_t height; /** Number of lines of data points per color.
+       u32 height; /** Number of lines of data points per color.
                                u8.0, [0,61] */
-       uint32_t fraction_bits; /** Bits of fractional part in the data
+       u32 fraction_bits; /** Bits of fractional part in the data
                                points.
                                u8.0, [0,13] */
-       uint16_t *data[IA_CSS_SC_NUM_COLORS];
+       u16 *data[IA_CSS_SC_NUM_COLORS];
        /** Table data, one array for each color.
             Use ia_css_sc_color to index this array.
             u[13-fraction_bits].[fraction_bits], [0,8191] */
@@ -96,7 +95,7 @@ struct ia_css_shading_table {
  *  removed from the css.
  */
 struct ia_css_shading_settings {
-       uint32_t enable_shading_table_conversion; /** Set to 0,
+       u32 enable_shading_table_conversion; /** Set to 0,
                if the conversion of the shading table should be disabled
                in the css. (default 1)
                  0: The shading table is directly sent to the isp.
@@ -115,6 +114,7 @@ struct ia_css_shading_settings {
                enable_shading_table_conversion is set as 1 by default
                in the css. */
 };
+
 /* ------ deprecated(bz675) : to ------ */
 
 #ifdef ISP2401
@@ -124,8 +124,8 @@ struct ia_css_shading_settings {
  *  NOTE: The shading table size is larger than or equal to the internal frame size.
  */
 struct ia_css_sc_configuration {
-       uint32_t internal_frame_origin_x_bqs_on_sctbl; /** Origin X (in bqs) of internal frame on shading table. */
-       uint32_t internal_frame_origin_y_bqs_on_sctbl; /** Origin Y (in bqs) of internal frame on shading table. */
+       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.
index 4eb4910798fab27f596d1a17511ab0df5d4f99a9..d5be09e851d2c7dfb5a3f30bef679692b2488dba 100644 (file)
        IA_CSS_DVS_NUM_COEF_TYPES)
 
 #ifndef PIPE_GENERATION
-#if defined(__ISP) || defined (MK_FIRMWARE)
+#if defined(__ISP) || defined(MK_FIRMWARE)
 
 /* Array cannot be 2-dimensional, since driver ddr allocation does not know stride */
 struct sh_css_isp_sdis_hori_proj_tbl {
-  int32_t 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
-  int32_t margin[DVS2_PROJ_MARGIN];
+  s32 margin[DVS2_PROJ_MARGIN];
 #endif
 };
 
 struct sh_css_isp_sdis_vert_proj_tbl {
-  int32_t 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
-  int32_t 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 +87,10 @@ struct sh_css_isp_sdis_vert_coef_tbl {
 
 #ifndef PIPE_GENERATION
 struct s_sdis_config {
-  unsigned horicoef_vectors;
-  unsigned vertcoef_vectors;
-  unsigned horiproj_num;
-  unsigned 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 381e5730d405cf26069ea6aced8b01cbea3eb5eb..c72b36a0ca18cdaaa90b31d6a5f013df73c9edef 100644 (file)
@@ -25,8 +25,8 @@
  */
 
 struct ia_css_dvs_grid_dim {
-       uint32_t width;         /** Width of DVS grid table in cells */
-       uint32_t height;        /** Height of DVS grid table in cells */
+       u32 width;              /** Width of DVS grid table in cells */
+       u32 height;     /** Height of DVS grid table in cells */
 };
 
 /* DVS statistics dimensions in number of cells for
@@ -38,7 +38,7 @@ struct ia_css_sdis_info {
                struct ia_css_dvs_grid_dim dim; /* Dimensions */
                struct ia_css_dvs_grid_dim pad; /* Padded dimensions */
        } grid, coef, proj;
-       uint32_t deci_factor_log2;
+       u32 deci_factor_log2;
 };
 
 /* DVS statistics grid
@@ -49,23 +49,23 @@ struct ia_css_sdis_info {
  *  ISP2: SDVS2 is used.
  */
 struct ia_css_dvs_grid_res {
-       uint32_t width;         /** Width of DVS grid table.
+       u32 width;              /** Width of DVS grid table.
                                        (= Horizontal number of grid cells
                                        in table, which cells have effective
                                        statistics.)
                                        For DVS1, this is equal to
                                         the number of vertical statistics. */
-       uint32_t aligned_width; /** Stride of each grid line.
+       u32 aligned_width; /** Stride of each grid line.
                                        (= Horizontal number of grid cells
                                        in table, which means
                                        the allocated width.) */
-       uint32_t height;        /** Height of DVS grid table.
+       u32 height;     /** Height of DVS grid table.
                                        (= Vertical number of grid cells
                                        in table, which cells have effective
                                        statistics.)
                                        For DVS1, This is equal to
                                        the number of horizontal statistics. */
-       uint32_t aligned_height;/** Stride of each grid column.
+       u32 aligned_height;/** Stride of each grid column.
                                        (= Vertical number of grid cells
                                        in table, which means
                                        the allocated height.) */
@@ -75,35 +75,35 @@ struct ia_css_dvs_grid_res {
  * However, that implies driver I/F changes
  */
 struct ia_css_dvs_grid_info {
-       uint32_t enable;        /** DVS statistics enabled.
+       u32 enable;        /** DVS statistics enabled.
                                        0:disabled, 1:enabled */
-       uint32_t width;         /** Width of DVS grid table.
+       u32 width;              /** Width of DVS grid table.
                                        (= Horizontal number of grid cells
                                        in table, which cells have effective
                                        statistics.)
                                        For DVS1, this is equal to
                                         the number of vertical statistics. */
-       uint32_t aligned_width; /** Stride of each grid line.
+       u32 aligned_width; /** Stride of each grid line.
                                        (= Horizontal number of grid cells
                                        in table, which means
                                        the allocated width.) */
-       uint32_t height;        /** Height of DVS grid table.
+       u32 height;     /** Height of DVS grid table.
                                        (= Vertical number of grid cells
                                        in table, which cells have effective
                                        statistics.)
                                        For DVS1, This is equal to
                                        the number of horizontal statistics. */
-       uint32_t aligned_height;/** Stride of each grid column.
+       u32 aligned_height;/** Stride of each grid column.
                                        (= Vertical number of grid cells
                                        in table, which means
                                        the allocated height.) */
-       uint32_t bqs_per_grid_cell; /** Grid cell size in BQ(Bayer Quad) unit.
+       u32 bqs_per_grid_cell; /** Grid cell size in BQ(Bayer Quad) unit.
                                        (1BQ means {Gr,R,B,Gb}(2x2 pixels).)
                                        For DVS1, valid value is 64.
                                        For DVS2, valid value is only 64,
                                        currently. */
-       uint32_t num_hor_coefs; /** Number of horizontal coefficients. */
-       uint32_t num_ver_coefs; /** Number of vertical coefficients. */
+       u32 num_hor_coefs;      /** Number of horizontal coefficients. */
+       u32 num_ver_coefs;      /** Number of vertical coefficients. */
 };
 
 /* Number of DVS statistics levels
index 0fdd696bf654998fcfa837ce0bc6603a9868c31e..22293829ad9bf48db36f2f67738a980c0c7960db 100644 (file)
@@ -26,76 +26,76 @@ const struct ia_css_dvs_coefficients default_sdis_config = {
 };
 
 static void
-fill_row(short *private, const short *public, unsigned width, unsigned padding)
+fill_row(short *private, const short *public, unsigned int width, unsigned int padding)
 {
        assert((int)width >= 0);
        assert((int)padding >= 0);
-       memcpy (private, public, width*sizeof(short));
-       memset (&private[width], 0, padding*sizeof(short));
+       memcpy(private, public, width * sizeof(short));
+       memset(&private[width], 0, padding * sizeof(short));
 }
 
-void ia_css_sdis_horicoef_vmem_encode (
+void ia_css_sdis_horicoef_vmem_encode(
        struct sh_css_isp_sdis_hori_coef_tbl *to,
        const struct ia_css_dvs_coefficients *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned aligned_width = from->grid.aligned_width * from->grid.bqs_per_grid_cell;
-       unsigned width         = from->grid.num_hor_coefs;
-       int      padding       = aligned_width-width;
-       unsigned stride        = size/IA_CSS_DVS_NUM_COEF_TYPES/sizeof(short);
-       unsigned total_bytes   = aligned_width*IA_CSS_DVS_NUM_COEF_TYPES*sizeof(short);
+       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);
        short   *public        = from->hor_coefs;
-       short   *private       = (short*)to;
-       unsigned type;
+       short   *private       = (short *)to;
+       unsigned int type;
 
        /* 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);
+               fill_row(&private[type * stride], &public[type * width], width, padding);
        }
 }
 
-void ia_css_sdis_vertcoef_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 size)
+       unsigned int size)
 {
-       unsigned aligned_height = from->grid.aligned_height * from->grid.bqs_per_grid_cell;
-       unsigned height         = from->grid.num_ver_coefs;
-       int      padding        = aligned_height-height;
-       unsigned stride         = size/IA_CSS_DVS_NUM_COEF_TYPES/sizeof(short);
-       unsigned total_bytes    = aligned_height*IA_CSS_DVS_NUM_COEF_TYPES*sizeof(short);
+       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);
        short   *public         = from->ver_coefs;
-       short   *private        = (short*)to;
-       unsigned type;
+       short   *private        = (short *)to;
+       unsigned int type;
 
        /* 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);
+               fill_row(&private[type * stride], &public[type * height], height, padding);
        }
 }
 
-void ia_css_sdis_horiproj_encode (
+void ia_css_sdis_horiproj_encode(
        struct sh_css_isp_sdis_hori_proj_tbl *to,
        const struct ia_css_dvs_coefficients *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)to;
        (void)from;
        (void)size;
 }
 
-void ia_css_sdis_vertproj_encode (
+void ia_css_sdis_vertproj_encode(
        struct sh_css_isp_sdis_vert_proj_tbl *to,
        const struct ia_css_dvs_coefficients *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)to;
        (void)from;
@@ -115,8 +115,8 @@ void ia_css_get_isp_dis_coefficients(
 
        IA_CSS_ENTER("void");
 
-       assert(horizontal_coefficients != NULL);
-       assert(vertical_coefficients != NULL);
+       assert(horizontal_coefficients);
+       assert(vertical_coefficients);
 
        params = stream->isp_params_configs;
 
@@ -131,12 +131,12 @@ void ia_css_get_isp_dis_coefficients(
        ver_num_3a  = dvs_binary->dis.coef.dim.height;
 
        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);
+               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);
        }
        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);
+               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);
        }
 
        IA_CSS_LEAVE("void");
@@ -162,11 +162,11 @@ ia_css_sdis_ver_coef_tbl_bytes(
 void
 ia_css_sdis_init_info(
        struct ia_css_sdis_info *dis,
-       unsigned sc_3a_dis_width,
-       unsigned sc_3a_dis_padded_width,
-       unsigned sc_3a_dis_height,
-       unsigned isp_pipe_version,
-       unsigned enabled)
+       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) { };
@@ -232,8 +232,8 @@ ia_css_get_dvs_statistics(
 
        IA_CSS_ENTER("host_stats=%p, isp_stats=%p", host_stats, isp_stats);
 
-       assert(host_stats != NULL);
-       assert(isp_stats != NULL);
+       assert(host_stats);
+       assert(isp_stats);
 
        map = ia_css_isp_dvs_statistics_map_allocate(isp_stats, NULL);
        if (map) {
@@ -255,14 +255,14 @@ ia_css_translate_dvs_statistics(
        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;
-       int32_t *hor_ptr_dvs, *ver_ptr_dvs, *hor_ptr_isp, *ver_ptr_isp;
+       s32 *hor_ptr_dvs, *ver_ptr_dvs, *hor_ptr_isp, *ver_ptr_isp;
 
-       assert(host_stats != NULL);
-       assert(host_stats->hor_proj != NULL);
-       assert(host_stats->ver_proj != NULL);
-       assert(isp_stats != NULL);
-       assert(isp_stats->hor_proj != NULL);
-       assert(isp_stats->ver_proj != NULL);
+       assert(host_stats);
+       assert(host_stats->hor_proj);
+       assert(host_stats->ver_proj);
+       assert(isp_stats);
+       assert(isp_stats->hor_proj);
+       assert(isp_stats->ver_proj);
 
        IA_CSS_ENTER("hproj=%p, vproj=%p, haddr=%p, vaddr=%p",
                     host_stats->hor_proj, host_stats->ver_proj,
@@ -297,14 +297,14 @@ ia_css_isp_dvs_statistics_allocate(
        struct ia_css_isp_dvs_statistics *me;
        int hor_size, ver_size;
 
-       assert(grid != NULL);
+       assert(grid);
 
        IA_CSS_ENTER("grid=%p", grid);
 
        if (!grid->enable)
                return NULL;
 
-       me = sh_css_calloc(1,sizeof(*me));
+       me = sh_css_calloc(1, sizeof(*me));
        if (!me)
                goto err;
 
@@ -313,7 +313,6 @@ ia_css_isp_dvs_statistics_allocate(
        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;
        me->data_ptr = mmgr_malloc(me->size);
        if (me->data_ptr == mmgr_NULL)
@@ -351,7 +350,7 @@ ia_css_isp_dvs_statistics_map_allocate(
        }
 
        me->data_ptr = data_ptr;
-       me->data_allocated = data_ptr == NULL;
+       me->data_allocated = !data_ptr;
 
        if (!me->data_ptr) {
                me->data_ptr = sh_css_malloc(isp_stats->size);
@@ -365,8 +364,8 @@ ia_css_isp_dvs_statistics_map_allocate(
        me->size = isp_stats->size;
        /* GCC complains when we assign a char * to a void *, so these
         * casts are necessary unfortunately. */
-       me->hor_proj = (void*)base_ptr;
-       me->ver_proj = (void*)(base_ptr + isp_stats->hor_size);
+       me->hor_proj = (void *)base_ptr;
+       me->ver_proj = (void *)(base_ptr + isp_stats->hor_size);
 
        return me;
 err:
@@ -388,35 +387,35 @@ ia_css_isp_dvs_statistics_map_free(struct ia_css_isp_dvs_statistics_map *me)
 void
 ia_css_isp_dvs_statistics_free(struct ia_css_isp_dvs_statistics *me)
 {
-       if (me != NULL) {
+       if (me) {
                hmm_free(me->data_ptr);
                sh_css_free(me);
        }
 }
 
 void ia_css_sdis_horicoef_debug_dtrace(
-       const struct ia_css_dvs_coefficients *config, unsigned 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 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 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 level)
+       const struct ia_css_dvs_coefficients *config, unsigned int level)
 {
        (void)config;
        (void)level;
index 95e2c61bbcbab8fc7fee1eb1035d8c39887b67e4..1f9bcacdecbbb599a0601b91eb791303ee56e7ca 100644 (file)
@@ -28,25 +28,25 @@ struct sh_css_isp_sdis_vert_coef_tbl;
 struct sh_css_isp_sdis_hori_proj_tbl;
 struct sh_css_isp_sdis_vert_proj_tbl;
 
-void ia_css_sdis_horicoef_vmem_encode (
+void ia_css_sdis_horicoef_vmem_encode(
        struct sh_css_isp_sdis_hori_coef_tbl *to,
        const struct ia_css_dvs_coefficients *from,
-       unsigned size);
+       unsigned int size);
 
-void ia_css_sdis_vertcoef_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 size);
+       unsigned int size);
 
-void ia_css_sdis_horiproj_encode (
+void ia_css_sdis_horiproj_encode(
        struct sh_css_isp_sdis_hori_proj_tbl *to,
        const struct ia_css_dvs_coefficients *from,
-       unsigned size);
+       unsigned int size);
 
-void ia_css_sdis_vertproj_encode (
+void ia_css_sdis_vertproj_encode(
        struct sh_css_isp_sdis_vert_proj_tbl *to,
        const struct ia_css_dvs_coefficients *from,
-       unsigned size);
+       unsigned int size);
 
 void ia_css_get_isp_dis_coefficients(
        struct ia_css_stream *stream,
@@ -77,25 +77,25 @@ 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 sc_3a_dis_width,
-       unsigned sc_3a_dis_padded_width,
-       unsigned sc_3a_dis_height,
-       unsigned isp_pipe_version,
-       unsigned enabled);
+       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);
 
 void ia_css_sdis_horicoef_debug_dtrace(
-       const struct ia_css_dvs_coefficients *config, unsigned 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 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 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 level);
+       const struct ia_css_dvs_coefficients *config, unsigned int level);
 
 #endif /* __IA_CSS_SDIS_HOST_H */
index d2ee57008fb6ad87c07eea76112b8608f909706a..766dfd9a4f751d378f929f41b5f6468014b93422 100644 (file)
@@ -32,9 +32,9 @@
 
 struct ia_css_dvs_coefficients {
        struct ia_css_dvs_grid_info grid;/** grid info contains the dimensions of the dvs grid */
-       int16_t *hor_coefs;     /** the pointer to int16_t[grid.num_hor_coefs * IA_CSS_DVS_NUM_COEF_TYPES]
+       s16 *hor_coefs; /** the pointer to int16_t[grid.num_hor_coefs * IA_CSS_DVS_NUM_COEF_TYPES]
                                     containing the horizontal coefficients */
-       int16_t *ver_coefs;     /** the pointer to int16_t[grid.num_ver_coefs * IA_CSS_DVS_NUM_COEF_TYPES]
+       s16 *ver_coefs; /** the pointer to int16_t[grid.num_ver_coefs * IA_CSS_DVS_NUM_COEF_TYPES]
                                     containing the vertical coefficients */
 };
 
@@ -44,9 +44,9 @@ 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 */
-       int32_t *hor_proj;      /** the pointer to int16_t[grid.height * IA_CSS_DVS_NUM_COEF_TYPES]
+       s32 *hor_proj;  /** the pointer to int16_t[grid.height * IA_CSS_DVS_NUM_COEF_TYPES]
                                     containing the horizontal projections */
-       int32_t *ver_proj;      /** the pointer to int16_t[grid.width * IA_CSS_DVS_NUM_COEF_TYPES]
+       s32 *ver_proj;  /** the pointer to int16_t[grid.width * IA_CSS_DVS_NUM_COEF_TYPES]
                                     containing the vertical projections */
 };
 
index 9bccb64731546c6455e561f15aeb215a4e735174..fea03777f81cc5924ea6c9b03fd28fc2519a65c5 100644 (file)
@@ -24,71 +24,70 @@ const struct ia_css_dvs2_coefficients default_sdis2_config = {
 };
 
 static void
-fill_row(short *private, const short *public, unsigned width, unsigned 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));
+       memcpy(private, public, width * sizeof(short));
+       memset(&private[width], 0, padding * sizeof(short));
 }
 
-void ia_css_sdis2_horicoef_vmem_encode (
+void ia_css_sdis2_horicoef_vmem_encode(
        struct sh_css_isp_sdis_hori_coef_tbl *to,
        const struct ia_css_dvs2_coefficients *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned aligned_width = from->grid.aligned_width * from->grid.bqs_per_grid_cell;
-       unsigned width         = from->grid.num_hor_coefs;
-       int      padding       = aligned_width-width;
-       unsigned stride        = size/IA_CSS_DVS2_NUM_COEF_TYPES/sizeof(short);
-       unsigned total_bytes   = aligned_width*IA_CSS_DVS2_NUM_COEF_TYPES*sizeof(short);
-       short   *private       = (short*)to;
-
+       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);
+       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);
-       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);
-       fill_row(&private[3*stride], from->hor_coefs.even_imag, width, padding);
+       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);
+       fill_row(&private[3 * stride], from->hor_coefs.even_imag, width, padding);
 }
 
-void ia_css_sdis2_vertcoef_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 size)
+       unsigned int size)
 {
-       unsigned aligned_height = from->grid.aligned_height * from->grid.bqs_per_grid_cell;
-       unsigned height         = from->grid.num_ver_coefs;
-       int      padding        = aligned_height-height;
-       unsigned stride         = size/IA_CSS_DVS2_NUM_COEF_TYPES/sizeof(short);
-       unsigned total_bytes    = aligned_height*IA_CSS_DVS2_NUM_COEF_TYPES*sizeof(short);
-       short   *private        = (short*)to;
+       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);
+       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);
-       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);
-       fill_row(&private[3*stride], from->ver_coefs.even_imag, height, padding);
+       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);
+       fill_row(&private[3 * stride], from->ver_coefs.even_imag, height, padding);
 }
 
-void ia_css_sdis2_horiproj_encode (
+void ia_css_sdis2_horiproj_encode(
        struct sh_css_isp_sdis_hori_proj_tbl *to,
        const struct ia_css_dvs2_coefficients *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)to;
        (void)from;
        (void)size;
 }
 
-void ia_css_sdis2_vertproj_encode (
+void ia_css_sdis2_vertproj_encode(
        struct sh_css_isp_sdis_vert_proj_tbl *to,
        const struct ia_css_dvs2_coefficients *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)to;
        (void)from;
@@ -113,15 +112,15 @@ void ia_css_get_isp_dvs2_coefficients(
 
        IA_CSS_ENTER("void");
 
-       assert(stream != NULL);
-       assert(hor_coefs_odd_real  != NULL);
-       assert(hor_coefs_odd_imag  != NULL);
-       assert(hor_coefs_even_real != NULL);
-       assert(hor_coefs_even_imag != NULL);
-       assert(ver_coefs_odd_real  != NULL);
-       assert(ver_coefs_odd_imag  != NULL);
-       assert(ver_coefs_even_real != NULL);
-       assert(ver_coefs_even_imag != NULL);
+       assert(stream);
+       assert(hor_coefs_odd_real);
+       assert(hor_coefs_odd_imag);
+       assert(hor_coefs_even_real);
+       assert(hor_coefs_even_imag);
+       assert(ver_coefs_odd_real);
+       assert(ver_coefs_odd_imag);
+       assert(ver_coefs_even_real);
+       assert(ver_coefs_even_imag);
 
        params = stream->isp_params_configs;
 
@@ -135,14 +134,14 @@ 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");
 }
@@ -170,8 +169,8 @@ ia_css_get_dvs2_statistics(
 
        IA_CSS_ENTER("host_stats=%p, isp_stats=%p", host_stats, isp_stats);
 
-       assert(host_stats != NULL);
-       assert(isp_stats != NULL);
+       assert(host_stats);
+       assert(isp_stats);
 
        map = ia_css_isp_dvs_statistics_map_allocate(isp_stats, NULL);
        if (map) {
@@ -194,26 +193,22 @@ ia_css_translate_dvs2_statistics(
 {
        unsigned int size_bytes, table_width, table_size, height;
        unsigned int src_offset = 0, dst_offset = 0;
-       int32_t *htemp_ptr, *vtemp_ptr;
-
-       assert(host_stats != NULL);
-       assert(host_stats->hor_prod.odd_real  != NULL);
-       assert(host_stats->hor_prod.odd_imag  != NULL);
-       assert(host_stats->hor_prod.even_real != NULL);
-       assert(host_stats->hor_prod.even_imag != NULL);
-       assert(host_stats->ver_prod.odd_real  != NULL);
-       assert(host_stats->ver_prod.odd_imag  != NULL);
-       assert(host_stats->ver_prod.even_real != NULL);
-       assert(host_stats->ver_prod.even_imag != NULL);
-       assert(isp_stats != NULL);
-       assert(isp_stats->hor_proj != NULL);
-       assert(isp_stats->ver_proj != NULL);
-
-       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",
+       s32 *htemp_ptr, *vtemp_ptr;
+
+       assert(host_stats);
+       assert(host_stats->hor_prod.odd_real);
+       assert(host_stats->hor_prod.odd_imag);
+       assert(host_stats->hor_prod.even_real);
+       assert(host_stats->hor_prod.even_imag);
+       assert(host_stats->ver_prod.odd_real);
+       assert(host_stats->ver_prod.odd_imag);
+       assert(host_stats->ver_prod.even_real);
+       assert(host_stats->ver_prod.even_imag);
+       assert(isp_stats);
+       assert(isp_stats->hor_proj);
+       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,
@@ -233,23 +228,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;
@@ -265,14 +260,14 @@ ia_css_isp_dvs2_statistics_allocate(
        struct ia_css_isp_dvs_statistics *me;
        int size;
 
-       assert(grid != NULL);
+       assert(grid);
 
        IA_CSS_ENTER("grid=%p", grid);
 
        if (!grid->enable)
                return NULL;
 
-       me = sh_css_calloc(1,sizeof(*me));
+       me = sh_css_calloc(1, sizeof(*me));
        if (!me)
                goto err;
 
@@ -282,7 +277,7 @@ ia_css_isp_dvs2_statistics_allocate(
        size = CEIL_MUL(sizeof(int) * grid->aligned_width, HIVE_ISP_DDR_WORD_BYTES)
                * grid->aligned_height * IA_CSS_DVS2_NUM_COEF_TYPES;
 
-       me->size = 2*size;
+       me->size = 2 * size;
        me->data_ptr = mmgr_malloc(me->size);
        if (me->data_ptr == mmgr_NULL)
                goto err;
@@ -303,35 +298,35 @@ err:
 void
 ia_css_isp_dvs2_statistics_free(struct ia_css_isp_dvs_statistics *me)
 {
-       if (me != NULL) {
+       if (me) {
                hmm_free(me->data_ptr);
                sh_css_free(me);
        }
 }
 
 void ia_css_sdis2_horicoef_debug_dtrace(
-       const struct ia_css_dvs2_coefficients *config, unsigned 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 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 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 level)
+       const struct ia_css_dvs2_coefficients *config, unsigned int level)
 {
        (void)config;
        (void)level;
index 60198d4279b41e47a0ec62a2b96284c28391f5e7..d723b63b150edb3b169bc6b63948a37b7b6ecb65 100644 (file)
@@ -28,25 +28,25 @@ struct sh_css_isp_sdis_vert_coef_tbl;
 struct sh_css_isp_sdis_hori_proj_tbl;
 struct sh_css_isp_sdis_vert_proj_tbl;
 
-void ia_css_sdis2_horicoef_vmem_encode (
+void ia_css_sdis2_horicoef_vmem_encode(
        struct sh_css_isp_sdis_hori_coef_tbl *to,
        const struct ia_css_dvs2_coefficients *from,
-       unsigned size);
+       unsigned int size);
 
-void ia_css_sdis2_vertcoef_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 size);
+       unsigned int size);
 
-void ia_css_sdis2_horiproj_encode (
+void ia_css_sdis2_horiproj_encode(
        struct sh_css_isp_sdis_hori_proj_tbl *to,
        const struct ia_css_dvs2_coefficients *from,
-       unsigned size);
+       unsigned int size);
 
-void ia_css_sdis2_vertproj_encode (
+void ia_css_sdis2_vertproj_encode(
        struct sh_css_isp_sdis_vert_proj_tbl *to,
        const struct ia_css_dvs2_coefficients *from,
-       unsigned size);
+       unsigned int size);
 
 void ia_css_get_isp_dvs2_coefficients(
        struct ia_css_stream *stream,
@@ -81,15 +81,15 @@ 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 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 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 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 level);
+       const struct ia_css_dvs2_coefficients *config, unsigned int level);
 
 #endif /* __IA_CSS_SDIS2_HOST_H */
index 2a0bc403174667b1f3e55ba72620cdad47258639..7a6fb266d5c853a7b8d6d1910d7a395007b5a7ee 100644 (file)
  *  arrays that contain the coeffients for each type.
  */
 struct ia_css_dvs2_coef_types {
-       int16_t *odd_real; /** real part of the odd coefficients*/
-       int16_t *odd_imag; /** imaginary part of the odd coefficients*/
-       int16_t *even_real;/** real part of the even coefficients*/
-       int16_t *even_imag;/** imaginary part of the even coefficients*/
+       s16 *odd_real; /** real part of the odd coefficients*/
+       s16 *odd_imag; /** imaginary part of the odd coefficients*/
+       s16 *even_real;/** real part of the even coefficients*/
+       s16 *even_imag;/** imaginary part of the even coefficients*/
 };
 
 /* DVS 2.0 Coefficients. This structure describes the coefficients that are needed for the dvs statistics.
- *  e.g. hor_coefs.odd_real is the pointer to int16_t[grid.num_hor_coefs] containing the horizontal odd real 
+ *  e.g. hor_coefs.odd_real is the pointer to int16_t[grid.num_hor_coefs] containing the horizontal odd real
  *  coefficients.
  */
 struct ia_css_dvs2_coefficients {
@@ -50,14 +50,14 @@ struct ia_css_dvs2_coefficients {
  *  arrays that contain the statistics for each type.
  */
 struct ia_css_dvs2_stat_types {
-       int32_t *odd_real; /** real part of the odd statistics*/
-       int32_t *odd_imag; /** imaginary part of the odd statistics*/
-       int32_t *even_real;/** real part of the even statistics*/
-       int32_t *even_imag;/** imaginary part of the even statistics*/
+       s32 *odd_real; /** real part of the odd statistics*/
+       s32 *odd_imag; /** imaginary part of the odd statistics*/
+       s32 *even_real;/** real part of the even statistics*/
+       s32 *even_imag;/** imaginary part of the even statistics*/
 };
 
 /* DVS 2.0 Statistics. This structure describes the statistics that are generated using the provided coefficients.
- *  e.g. hor_prod.odd_real is the pointer to int16_t[grid.aligned_height][grid.aligned_width] containing 
+ *  e.g. hor_prod.odd_real is the pointer to int16_t[grid.aligned_height][grid.aligned_width] containing
  *  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 {
index 78a113bfe8f1cf22cd0effe8fc26789bfd77290e..2ee8d78c6a268677c6caff7b77e4ed82efc2dfd3 100644 (file)
@@ -15,7 +15,7 @@
 #include "ia_css_debug.h"
 #include "ia_css_tdf.host.h"
 
-static const int16_t g_pyramid[8][8] = {
+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},
@@ -32,15 +32,14 @@ ia_css_tdf_vmem_encode(
        const struct ia_css_tdf_config *from,
        size_t size)
 {
-       unsigned i;
+       unsigned int i;
        (void)size;
 
        for (i = 0; i < ISP_VEC_NELEMS; i++) {
-               to->pyramid[0][i]          = g_pyramid[i/8][i%8];
+               to->pyramid[0][i]          = g_pyramid[i / 8][i % 8];
                to->threshold_flat[0][i]   = from->thres_flat_table[i];
                to->threshold_detail[0][i] = from->thres_detail_table[i];
        }
-
 }
 
 void
@@ -68,9 +67,8 @@ ia_css_tdf_encode(
 void
 ia_css_tdf_debug_dtrace(
        const struct ia_css_tdf_config *config,
-       unsigned level)
+       unsigned int level)
 {
        (void)config;
        (void)level;
 }
-
index bd628a18e839edf4aca8bfdfd88997823e35bc6b..468e0177ed8a807fe69024aede39fe3188147031 100644 (file)
@@ -32,7 +32,7 @@ ia_css_tdf_encode(
 
 void
 ia_css_tdf_debug_dtrace(
-       const struct ia_css_tdf_config *config, unsigned level)
+       const struct ia_css_tdf_config *config, unsigned int level)
 ;
 
 #endif /* __IA_CSS_TDF_HOST_H */
index 9334f2e0698b40510d5cc445fc83c3e2972e076f..a93891448cdeb453fb45227d4657fbaddfc774e4 100644 (file)
@@ -25,19 +25,19 @@ struct ia_css_isp_tdf_vmem_params {
 };
 
 struct ia_css_isp_tdf_dmem_params {
-       int32_t Epsilon_0;
-       int32_t Epsilon_1;
-       int32_t EpsScaleText;
-       int32_t EpsScaleEdge;
-       int32_t Sepa_flat;
-       int32_t Sepa_Edge;
-       int32_t Blend_Flat;
-       int32_t Blend_Text;
-       int32_t Blend_Edge;
-       int32_t Shading_Gain;
-       int32_t Shading_baseGain;
-       int32_t LocalY_Gain;
-       int32_t LocalY_baseGain;
+       s32 Epsilon_0;
+       s32 Epsilon_1;
+       s32 EpsScaleText;
+       s32 EpsScaleEdge;
+       s32 Sepa_flat;
+       s32 Sepa_Edge;
+       s32 Blend_Flat;
+       s32 Blend_Text;
+       s32 Blend_Edge;
+       s32 Shading_Gain;
+       s32 Shading_baseGain;
+       s32 LocalY_Gain;
+       s32 LocalY_baseGain;
 };
 
 #endif /* __IA_CSS_TDF_PARAM_H */
index 91ea8dd4651d6f9b25f4dd81104987450e42e33e..e4263afee7da52c1b7d45edcacdd99f249b21c8c 100644 (file)
  * ISP2.6.1: TDF is used.
  */
 struct ia_css_tdf_config {
-       int32_t thres_flat_table[64];   /** Final optimized strength table of NR for flat region. */
-       int32_t thres_detail_table[64]; /** Final optimized strength table of NR for detail region. */
-       int32_t epsilon_0;              /** Coefficient to control variance for dark area (for flat region). */
-       int32_t epsilon_1;              /** Coefficient to control variance for bright area (for flat region). */
-       int32_t eps_scale_text;         /** Epsilon scaling coefficient for texture region. */
-       int32_t eps_scale_edge;         /** Epsilon scaling coefficient for edge region. */
-       int32_t sepa_flat;              /** Threshold to judge flat (edge < m_Flat_thre). */
-       int32_t sepa_edge;              /** Threshold to judge edge (edge > m_Edge_thre). */
-       int32_t blend_flat;             /** Blending ratio at flat region. */
-       int32_t blend_text;             /** Blending ratio at texture region. */
-       int32_t blend_edge;             /** Blending ratio at edge region. */
-       int32_t shading_gain;           /** Gain of Shading control. */
-       int32_t shading_base_gain;      /** Base Gain of Shading control. */
-       int32_t local_y_gain;           /** Gain of local luminance control. */
-       int32_t local_y_base_gain;      /** Base gain of local luminance control. */
-       int32_t rad_x_origin;           /** Initial x coord. for radius computation. */
-       int32_t rad_y_origin;           /** Initial y coord. for radius computation. */
+       s32 thres_flat_table[64];       /** Final optimized strength table of NR for flat region. */
+       s32 thres_detail_table[64];     /** Final optimized strength table of NR for detail region. */
+       s32 epsilon_0;          /** Coefficient to control variance for dark area (for flat region). */
+       s32 epsilon_1;          /** Coefficient to control variance for bright area (for flat region). */
+       s32 eps_scale_text;             /** Epsilon scaling coefficient for texture region. */
+       s32 eps_scale_edge;             /** Epsilon scaling coefficient for edge region. */
+       s32 sepa_flat;          /** Threshold to judge flat (edge < m_Flat_thre). */
+       s32 sepa_edge;          /** Threshold to judge edge (edge > m_Edge_thre). */
+       s32 blend_flat;         /** Blending ratio at flat region. */
+       s32 blend_text;         /** Blending ratio at texture region. */
+       s32 blend_edge;         /** Blending ratio at edge region. */
+       s32 shading_gain;               /** Gain of Shading control. */
+       s32 shading_base_gain;  /** Base Gain of Shading control. */
+       s32 local_y_gain;               /** Gain of local luminance control. */
+       s32 local_y_base_gain;  /** Base gain of local luminance control. */
+       s32 rad_x_origin;               /** Initial x coord. for radius computation. */
+       s32 rad_y_origin;               /** Initial y coord. for radius computation. */
 };
 
 #endif /* __IA_CSS_TDF_TYPES_H */
-
index 222a7bd7f1767e920602fcd90e8beec5d63aa885..d2f9887ffddb5dbdc37cf128fdb4ede7ebdccc7e 100644 (file)
@@ -33,7 +33,7 @@ void
 ia_css_tnr_encode(
        struct sh_css_isp_tnr_params *to,
        const struct ia_css_tnr_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->coef =
@@ -47,7 +47,7 @@ ia_css_tnr_encode(
 void
 ia_css_tnr_dump(
        const struct sh_css_isp_tnr_params *tnr,
-       unsigned level)
+       unsigned int level)
 {
        if (!tnr) return;
        ia_css_debug_dtrace(level, "Temporal Noise Reduction:\n");
@@ -62,11 +62,10 @@ ia_css_tnr_dump(
 void
 ia_css_tnr_debug_dtrace(
        const struct ia_css_tnr_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
-               "config.gain=%d, "
-               "config.threshold_y=%d, config.threshold_uv=%d\n",
+               "config.gain=%d, config.threshold_y=%d, config.threshold_uv=%d\n",
                config->gain,
                config->threshold_y, config->threshold_uv);
 }
@@ -75,10 +74,10 @@ void
 ia_css_tnr_config(
        struct sh_css_isp_tnr_isp_config *to,
        const struct ia_css_tnr_configuration *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned elems_a = ISP_VEC_NELEMS;
-       unsigned i;
+       unsigned int elems_a = ISP_VEC_NELEMS;
+       unsigned int i;
 
        (void)size;
        ia_css_dma_configure_from_info(&to->port_b, &from->tnr_frames[0]->info);
@@ -93,7 +92,7 @@ ia_css_tnr_config(
        }
 
        /* Assume divisiblity here, may need to generalize to fixed point. */
-       assert (elems_a % to->port_b.elems == 0);
+       assert(elems_a % to->port_b.elems == 0);
 }
 
 void
@@ -102,7 +101,7 @@ ia_css_tnr_configure(
        const struct ia_css_frame **frames)
 {
        struct ia_css_tnr_configuration config;
-       unsigned i;
+       unsigned int i;
 
 #ifndef ISP2401
        for (i = 0; i < NUM_VIDEO_TNR_FRAMES; i++)
index 9290dfad574eb3ed79e823dd4a76e2d59b685d63..50aabec5d3ac6adb68ebe49c45e636057010a07b 100644 (file)
@@ -26,23 +26,23 @@ void
 ia_css_tnr_encode(
        struct sh_css_isp_tnr_params *to,
        const struct ia_css_tnr_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_tnr_dump(
        const struct sh_css_isp_tnr_params *tnr,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_tnr_debug_dtrace(
        const struct ia_css_tnr_config *config,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_tnr_config(
        struct sh_css_isp_tnr_isp_config      *to,
        const struct ia_css_tnr_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_tnr_configure(
index db4a7cced2649afde21cc6875fe5ba261fc49eb8..64eab3c8e5464d55abc87fab1f7b787f7a428d55 100644 (file)
@@ -21,9 +21,9 @@
 
 /* TNR (Temporal Noise Reduction) */
 struct sh_css_isp_tnr_params {
-       int32_t coef;
-       int32_t threshold_Y;
-       int32_t threshold_C;
+       s32 coef;
+       s32 threshold_Y;
+       s32 threshold_C;
 };
 
 struct ia_css_tnr_configuration {
@@ -35,8 +35,8 @@ struct ia_css_tnr_configuration {
 };
 
 struct sh_css_isp_tnr_isp_config {
-       uint32_t width_a_over_b;
-       uint32_t frame_height;
+       u32 width_a_over_b;
+       u32 frame_height;
        struct dma_port_config port_b;
 #ifndef ISP2401
        hrt_vaddress tnr_frame_addr[NUM_VIDEO_TNR_FRAMES];
index 8b1218f7235dc55618b9bbbdc55e956a89e986ef..901aa1e298e06e2388bf0905b51ede5a88b295b0 100644 (file)
@@ -19,8 +19,8 @@
 
 /* TNR (temporal noise reduction) */
 struct sh_css_isp_tnr_dmem_state {
-       uint32_t tnr_in_buf_idx;
-       uint32_t tnr_out_buf_idx;
+       u32 tnr_in_buf_idx;
+       u32 tnr_out_buf_idx;
 };
 
 #endif /* __IA_CSS_TNR_STATE_H */
index 9bbc9ab2e6c0d1a5ff5b176d07c5a6945bb580df..98b0daeeab39692d326d9e47286baa8bbf26a355 100644 (file)
  *  ISP2: TNR1 is used.
  */
 
-
 struct ia_css_tnr_config {
        ia_css_u0_16 gain; /** Interpolation ratio of current frame
-                               and previous frame.
+                               and previous frame.
                                gain=0.0 -> previous frame is outputted.
                                gain=1.0 -> current frame is outputted.
                                u0.16, [0,65535],
@@ -55,6 +54,4 @@ struct ia_css_tnr_config {
                                u0.16, [0,65535], default/ineffective 0 */
 };
 
-
 #endif /* __IA_CSS_TNR_TYPES_H */
-
index c2076e4124101d93386654789f8358c75f82fde8..0aa0231b0348106b97a90376396ed632bd2fd67c 100644 (file)
@@ -27,9 +27,9 @@ void
 ia_css_vf_config(
        struct sh_css_isp_vf_isp_config      *to,
        const struct ia_css_vf_configuration *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned elems_a = ISP_VEC_NELEMS;
+       unsigned int elems_a = ISP_VEC_NELEMS;
 
        (void)size;
        to->vf_downscale_bits = from->vf_downscale_bits;
@@ -41,7 +41,7 @@ ia_css_vf_config(
                to->dma.width_a_over_b = elems_a / to->dma.port_b.elems;
 
                /* Assume divisiblity here, may need to generalize to fixed point. */
-               assert (elems_a % to->dma.port_b.elems == 0);
+               assert(elems_a % to->dma.port_b.elems == 0);
        }
 }
 
@@ -58,13 +58,13 @@ sh_css_vf_downscale_log2(
        unsigned int ds_log2 = 0;
        unsigned int out_width;
 
-       if ((out_info == NULL) | (vf_info == NULL))
-              return IA_CSS_ERR_INVALID_ARGUMENTS;
+       if ((!out_info) | (!vf_info))
+       return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        out_width = out_info->res.width;
 
        if (out_width == 0)
-              return IA_CSS_ERR_INVALID_ARGUMENTS;
+       return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        /* downscale until width smaller than the viewfinder width. We don't
        * test for the height since the vmem buffers only put restrictions on
@@ -79,7 +79,7 @@ sh_css_vf_downscale_log2(
               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;
+       return IA_CSS_ERR_INVALID_ARGUMENTS;
        *downscale_log2 = ds_log2;
        return IA_CSS_SUCCESS;
 }
@@ -93,13 +93,13 @@ configure_kernel(
        struct ia_css_vf_configuration *config)
 {
        enum ia_css_err err;
-       unsigned vf_log_ds = 0;
+       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;
+       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;
@@ -133,8 +133,7 @@ ia_css_vf_configure(
 
        if (vf_info)
                vf_info->raw_bit_depth = info->dma.vfdec_bits_per_pixel;
-       ia_css_configure_vf (binary, &config);
+       ia_css_configure_vf(binary, &config);
 
        return IA_CSS_SUCCESS;
 }
-
index c7c3625a9a96777898494b4de4c49480448666bf..247ad0a39b9bd404c6539a01878bc69bcf2492cb 100644 (file)
@@ -35,7 +35,7 @@ void
 ia_css_vf_config(
        struct sh_css_isp_vf_isp_config *to,
        const struct ia_css_vf_configuration *from,
-       unsigned size);
+       unsigned int size);
 
 enum ia_css_err
 ia_css_vf_configure(
index 9df4e12f6c2c7f1379caed574e4a55d7becb1164..171a98508a888a0630e7baaf32539a6392ee45a6 100644 (file)
 
 /* Viewfinder decimation */
 struct sh_css_isp_vf_isp_config {
-       uint32_t vf_downscale_bits; /** Log VF downscale value */
-       uint32_t enable;
+       u32 vf_downscale_bits; /** Log VF downscale value */
+       u32 enable;
        struct ia_css_frame_sp_info info;
        struct {
-               uint32_t width_a_over_b;
+               u32 width_a_over_b;
                struct dma_port_config port_b;
        } dma;
 };
index e3efafa279ffc3c5a62bf9054a909061e2d6935a..a4d39e2e9d8ea62c4c1ad5f586a5b6740196edb7 100644 (file)
@@ -24,9 +24,8 @@
 #include <type_support.h>
 
 struct ia_css_vf_configuration {
-       uint32_t vf_downscale_bits; /** Log VF downscale value */
+       u32 vf_downscale_bits; /** Log VF downscale value */
        const struct ia_css_frame_info *info;
 };
 
 #endif /* __IA_CSS_VF_TYPES_H */
-
index b43cb88c6ae452e620aa5c97a28ad32175edccda..5affd3875f268b33fa2f0e30e8633b4825225f61 100644 (file)
@@ -33,7 +33,7 @@ void
 ia_css_wb_encode(
        struct sh_css_isp_wb_params *to,
        const struct ia_css_wb_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->gain_shift =
@@ -56,7 +56,7 @@ ia_css_wb_encode(
 void
 ia_css_wb_dump(
        const struct sh_css_isp_wb_params *wb,
-       unsigned level)
+       unsigned int level)
 {
        if (!wb) return;
        ia_css_debug_dtrace(level, "White Balance:\n");
@@ -75,15 +75,12 @@ ia_css_wb_dump(
 void
 ia_css_wb_debug_dtrace(
        const struct ia_css_wb_config *config,
-       unsigned level)
+       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=%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 18666baf9f76b2703761150ef5fe0b54eaff21f4..7d983f3f20c7a9dd827ae3863b7daba3942d5784 100644 (file)
@@ -24,16 +24,16 @@ void
 ia_css_wb_encode(
        struct sh_css_isp_wb_params *to,
        const struct ia_css_wb_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_wb_dump(
        const struct sh_css_isp_wb_params *wb,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_wb_debug_dtrace(
        const struct ia_css_wb_config *wb,
-       unsigned level);
+       unsigned int level);
 
 #endif /* __IA_CSS_WB_HOST_H */
index c95c53a2406702122ca2bc38ef30a26502a1ef36..dcf548da55cc87bf3eade8c8ce9a4f83acae6a8e 100644 (file)
 
 /* WB (White Balance) */
 struct sh_css_isp_wb_params {
-       int32_t gain_shift;
-       int32_t gain_gr;
-       int32_t gain_r;
-       int32_t gain_b;
-       int32_t gain_gb;
+       s32 gain_shift;
+       s32 gain_gr;
+       s32 gain_r;
+       s32 gain_b;
+       s32 gain_gb;
 };
 
 #endif /* __IA_CSS_WB_PARAM_H */
index bf98734d057e5e0e7280ad8882647e78a4a054a9..59cbd71ef33211a9b4b3faf5b08fc9bb81db791e 100644 (file)
@@ -19,7 +19,6 @@
 * CSS-API header file for White Balance parameters.
 */
 
-
 /* White Balance configuration (Gain Adjust).
  *
  *  ISP block: WB1
  *  ISP2: WB1 is used.
  */
 struct ia_css_wb_config {
-       uint32_t integer_bits; /** Common exponent of gains.
+       u32 integer_bits; /** Common exponent of gains.
                                u8.0, [0,3],
                                default 1, ineffective 1 */
-       uint32_t gr;    /** Significand of Gr gain.
+       u32 gr; /** Significand of Gr gain.
                                u[integer_bits].[16-integer_bits], [0,65535],
                                default/ineffective 32768(u1.15, 1.0) */
-       uint32_t r;     /** Significand of R gain.
+       u32 r;  /** Significand of R gain.
                                u[integer_bits].[16-integer_bits], [0,65535],
                                default/ineffective 32768(u1.15, 1.0) */
-       uint32_t b;     /** Significand of B gain.
+       u32 b;  /** Significand of B gain.
                                u[integer_bits].[16-integer_bits], [0,65535],
                                default/ineffective 32768(u1.15, 1.0) */
-       uint32_t gb;    /** Significand of Gb gain.
+       u32 gb; /** Significand of Gb gain.
                                u[integer_bits].[16-integer_bits], [0,65535],
                                default/ineffective 32768(u1.15, 1.0) */
 };
index abcb531f51ccdf6c1073cf09862e90685bd6640b..50f42348ed192a72ae211cfbeb194e971afe5bac 100644 (file)
@@ -12,7 +12,6 @@
  * more details.
  */
 
-
 #include "ia_css_types.h"
 #include "sh_css_defs.h"
 #include "ia_css_debug.h"
@@ -29,17 +28,17 @@ void
 ia_css_xnr_table_vamem_encode(
        struct sh_css_isp_xnr_vamem_params *to,
        const struct ia_css_xnr_table *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
-       memcpy (&to->xnr,  &from->data, sizeof(to->xnr));
+       memcpy(&to->xnr,  &from->data, sizeof(to->xnr));
 }
 
 void
 ia_css_xnr_encode(
        struct sh_css_isp_xnr_params *to,
        const struct ia_css_xnr_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
 
@@ -50,7 +49,7 @@ ia_css_xnr_encode(
 void
 ia_css_xnr_table_debug_dtrace(
        const struct ia_css_xnr_table *config,
-       unsigned level)
+       unsigned int level)
 {
        (void)config;
        (void)level;
@@ -59,7 +58,7 @@ ia_css_xnr_table_debug_dtrace(
 void
 ia_css_xnr_debug_dtrace(
        const struct ia_css_xnr_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
                "config.threshold=%d\n", config->threshold);
index eb3425eafbbef6cf93aad9f21a08ce4884531858..eae4aa78ce58d5eeb05da1f6a010bf36ecab2429 100644 (file)
@@ -26,22 +26,22 @@ void
 ia_css_xnr_table_vamem_encode(
        struct sh_css_isp_xnr_vamem_params *to,
        const struct ia_css_xnr_table *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_xnr_encode(
        struct sh_css_isp_xnr_params *to,
        const struct ia_css_xnr_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_xnr_table_debug_dtrace(
        const struct ia_css_xnr_table *s3a,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_xnr_debug_dtrace(
        const struct ia_css_xnr_config *config,
-       unsigned level);
+       unsigned int level);
 
 #endif /* __IA_CSS_XNR_HOST_H */
index a5caebbe2f8481825f6aed6e743df9ac9af0002f..72a5c5fd10e750b444b799de4ef2380f48f21096 100644 (file)
@@ -29,7 +29,6 @@
 #error "Unknown vamem type"
 #endif
 
-
 #else
 /* For pipe generation, the size is not relevant */
 #define SH_CSS_ISP_XNR_TABLE_SIZE 0
@@ -37,7 +36,7 @@
 
 /* This should be vamem_data_t, but that breaks the pipe generator */
 struct sh_css_isp_xnr_vamem_params {
-       uint16_t xnr[SH_CSS_ISP_XNR_TABLE_SIZE];
+       u16 xnr[SH_CSS_ISP_XNR_TABLE_SIZE];
 };
 
 struct sh_css_isp_xnr_params {
@@ -45,7 +44,7 @@ struct sh_css_isp_xnr_params {
         * type:u0.16 but actual valid range is:[0,255]
         * valid range is dependent on SH_CSS_ISP_YUV_BITS (currently 8bits)
         * default: 25 */
-       uint16_t threshold;
+       u16 threshold;
 };
 
 #endif /* __IA_CSS_XNR_PARAM_H */
index cd5fb72fce3fd2ea99b863fafbab224ae409e8ac..0119e20292ce638b035377a6539dc8972becd3a1 100644 (file)
@@ -26,19 +26,19 @@ 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,
+  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,
+  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,
+  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
+  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)
@@ -46,19 +46,19 @@ default_xnr_table_data[IA_CSS_VAMEM_2_XNR_TABLE_SIZE] = {
 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,
+  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,
+  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,
+  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
+  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
index d2b634211a3fadcefb1fd7f4758a6dec51208479..d26df92aa2b60f73fcd53221fa2c29c9ee182a2a 100644 (file)
@@ -26,7 +26,7 @@
  *
  *  This table contains coefficients used for division in XNR.
  *
- *     u0.12, [0,4095],
+ *     u0.12, [0,4095],
  *      {4095, 2048, 1365, .........., 65, 64}
  *      ({1/1, 1/2, 1/3, ............., 1/63, 1/64})
  *
 /* Number of elements in the xnr table. */
 #define IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2      6
 /* Number of elements in the xnr table. */
-#define IA_CSS_VAMEM_1_XNR_TABLE_SIZE           (1U<<IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2)
+#define IA_CSS_VAMEM_1_XNR_TABLE_SIZE           BIT(IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2)
 
 /* 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          (1U<<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) */
 union ia_css_xnr_data {
-       uint16_t vamem_1[IA_CSS_VAMEM_1_XNR_TABLE_SIZE];
+       u16 vamem_1[IA_CSS_VAMEM_1_XNR_TABLE_SIZE];
        /** Coefficients table on vamem type1. u0.12, [0,4095] */
-       uint16_t vamem_2[IA_CSS_VAMEM_2_XNR_TABLE_SIZE];
+       u16 vamem_2[IA_CSS_VAMEM_2_XNR_TABLE_SIZE];
        /** Coefficients table on vamem type2. u0.12, [0,4095] */
 };
 
@@ -64,8 +64,7 @@ struct ia_css_xnr_config {
        /* XNR threshold.
         * type:u0.16 valid range:[0,65535]
         * default: 6400 */
-       uint16_t threshold;
+       u16 threshold;
 };
 
 #endif /* __IA_CSS_XNR_TYPES_H */
-
index 955b6c8a87380ce1eb4905d28712c381a6f390d4..59e6da4b25462fa8119e7750498f3aabb90b6b16 100644 (file)
  */
 #define XNR3_LOOK_UP_TABLE_POINTS 16
 
-static const int16_t x[XNR3_LOOK_UP_TABLE_POINTS] = {
+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};
 
-static const int16_t a[XNR3_LOOK_UP_TABLE_POINTS] = {
+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};
 
-static const int16_t b[XNR3_LOOK_UP_TABLE_POINTS] = {
+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};
 
-static const int16_t c[XNR3_LOOK_UP_TABLE_POINTS] = {
+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};
 
 /*
@@ -74,9 +74,9 @@ const struct ia_css_xnr3_config default_xnr3_config = {
 static int32_t
 compute_alpha(int sigma)
 {
-       int32_t alpha;
+       s32 alpha;
 #if defined(XNR_ATE_ROUNDING_BUG)
-       int32_t alpha_unscaled;
+       s32 alpha_unscaled;
 #else
        int offset = sigma / 2;
 #endif
@@ -94,7 +94,7 @@ compute_alpha(int sigma)
                alpha_unscaled = IA_CSS_XNR3_SIGMA_SCALE / sigma;
                alpha = alpha_unscaled * XNR_ALPHA_SCALE_FACTOR;
 #else
-               alpha = ((IA_CSS_XNR3_SIGMA_SCALE * XNR_ALPHA_SCALE_FACTOR) + offset)/ sigma;
+               alpha = ((IA_CSS_XNR3_SIGMA_SCALE * XNR_ALPHA_SCALE_FACTOR) + offset) / sigma;
 #endif
 
                if (alpha > XNR_MAX_ALPHA)
@@ -111,10 +111,10 @@ compute_alpha(int sigma)
 static int32_t
 compute_coring(int coring)
 {
-       int32_t isp_coring;
-       int32_t isp_scale = XNR_CORING_SCALE_FACTOR;
-       int32_t host_scale = IA_CSS_XNR3_CORING_SCALE;
-       int32_t offset = host_scale / 2; /* fixed-point 0.5 */
+       s32 isp_coring;
+       s32 isp_scale = XNR_CORING_SCALE_FACTOR;
+       s32 host_scale = IA_CSS_XNR3_CORING_SCALE;
+       s32 offset = host_scale / 2; /* fixed-point 0.5 */
 
        /* Convert from public host-side scale factor to isp-side scale
         * factor. Clip to [0, isp_scale-1).
@@ -130,10 +130,10 @@ compute_coring(int coring)
 static int32_t
 compute_blending(int strength)
 {
-       int32_t isp_strength;
-       int32_t isp_scale = XNR_BLENDING_SCALE_FACTOR;
-       int32_t host_scale = IA_CSS_XNR3_BLENDING_SCALE;
-       int32_t offset = host_scale / 2; /* fixed-point 0.5 */
+       s32 isp_strength;
+       s32 isp_scale = XNR_BLENDING_SCALE_FACTOR;
+       s32 host_scale = IA_CSS_XNR3_BLENDING_SCALE;
+       s32 offset = host_scale / 2; /* fixed-point 0.5 */
 
        /* Convert from public host-side scale factor to isp-side scale
         * factor. The blending factor is positive on the host side, but
@@ -148,33 +148,33 @@ void
 ia_css_xnr3_encode(
        struct sh_css_isp_xnr3_params *to,
        const struct ia_css_xnr3_config *from,
-       unsigned size)
+       unsigned int size)
 {
        int kernel_size = XNR_FILTER_SIZE;
        /* The adjust factor is the next power of 2
           w.r.t. the kernel size*/
        int adjust_factor = ceil_pow2(kernel_size);
-       int32_t max_diff = (1 << (ISP_VEC_ELEMBITS - 1)) - 1;
-       int32_t min_diff = -(1 << (ISP_VEC_ELEMBITS - 1));
-
-       int32_t alpha_y0 = compute_alpha(from->sigma.y0);
-       int32_t alpha_y1 = compute_alpha(from->sigma.y1);
-       int32_t alpha_u0 = compute_alpha(from->sigma.u0);
-       int32_t alpha_u1 = compute_alpha(from->sigma.u1);
-       int32_t alpha_v0 = compute_alpha(from->sigma.v0);
-       int32_t alpha_v1 = compute_alpha(from->sigma.v1);
-       int32_t alpha_ydiff = (alpha_y1 - alpha_y0) * adjust_factor / kernel_size;
-       int32_t alpha_udiff = (alpha_u1 - alpha_u0) * adjust_factor / kernel_size;
-       int32_t alpha_vdiff = (alpha_v1 - alpha_v0) * adjust_factor / kernel_size;
-
-       int32_t coring_u0 = compute_coring(from->coring.u0);
-       int32_t coring_u1 = compute_coring(from->coring.u1);
-       int32_t coring_v0 = compute_coring(from->coring.v0);
-       int32_t coring_v1 = compute_coring(from->coring.v1);
-       int32_t coring_udiff = (coring_u1 - coring_u0) * adjust_factor / kernel_size;
-       int32_t coring_vdiff = (coring_v1 - coring_v0) * adjust_factor / kernel_size;
-
-       int32_t blending = compute_blending(from->blending.strength);
+       s32 max_diff = (1 << (ISP_VEC_ELEMBITS - 1)) - 1;
+       s32 min_diff = -(1 << (ISP_VEC_ELEMBITS - 1));
+
+       s32 alpha_y0 = compute_alpha(from->sigma.y0);
+       s32 alpha_y1 = compute_alpha(from->sigma.y1);
+       s32 alpha_u0 = compute_alpha(from->sigma.u0);
+       s32 alpha_u1 = compute_alpha(from->sigma.u1);
+       s32 alpha_v0 = compute_alpha(from->sigma.v0);
+       s32 alpha_v1 = compute_alpha(from->sigma.v1);
+       s32 alpha_ydiff = (alpha_y1 - alpha_y0) * adjust_factor / kernel_size;
+       s32 alpha_udiff = (alpha_u1 - alpha_u0) * adjust_factor / kernel_size;
+       s32 alpha_vdiff = (alpha_v1 - alpha_v0) * adjust_factor / kernel_size;
+
+       s32 coring_u0 = compute_coring(from->coring.u0);
+       s32 coring_u1 = compute_coring(from->coring.u1);
+       s32 coring_v0 = compute_coring(from->coring.v0);
+       s32 coring_v1 = compute_coring(from->coring.v1);
+       s32 coring_udiff = (coring_u1 - coring_u0) * adjust_factor / kernel_size;
+       s32 coring_vdiff = (coring_v1 - coring_v0) * adjust_factor / kernel_size;
+
+       s32 blending = compute_blending(from->blending.strength);
 
        (void)size;
 
@@ -205,11 +205,11 @@ void
 ia_css_xnr3_vmem_encode(
        struct sh_css_isp_xnr3_vmem_params *to,
        const struct ia_css_xnr3_config *from,
-       unsigned size)
+       unsigned int size)
 {
-       unsigned i, j, base;
-       const unsigned total_blocks = 4;
-       const unsigned shuffle_block = 16;
+       unsigned int i, j, base;
+       const unsigned int total_blocks = 4;
+       const unsigned int shuffle_block = 16;
 
        (void)from;
        (void)size;
@@ -231,7 +231,6 @@ ia_css_xnr3_vmem_encode(
        for (j = 1; j < XNR3_LOOK_UP_TABLE_POINTS; j++) {
                assert(x[j] >= 0);
                assert(x[j] > x[j - 1]);
-
        }
 
        /* The implementation of the calulating 1/x is based on the availability
@@ -258,7 +257,7 @@ ia_css_xnr3_vmem_encode(
 void
 ia_css_xnr3_debug_dtrace(
        const struct ia_css_xnr3_config *config,
-       unsigned level)
+       unsigned int level)
 {
        (void)config;
        (void)level;
index 6a86924a71fe1ac36fde4865b02a71c457ab5f94..27f969f3a201d71574e3aa1a4e3b224d8143b61f 100644 (file)
@@ -24,19 +24,19 @@ void
 ia_css_xnr3_encode(
        struct sh_css_isp_xnr3_params *to,
        const struct ia_css_xnr3_config *from,
-       unsigned size);
+       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 size);
+       unsigned int size);
 
 #endif
 void
 ia_css_xnr3_debug_dtrace(
        const struct ia_css_xnr3_config *config,
-       unsigned level);
+       unsigned int level);
 
 #endif /* __IA_CSS_XNR3_HOST_H */
index 06c24e848234308606a625016f88cd704919aefa..e91753700442911d066fff581b9d3e43ad130c68 100644 (file)
  * It must be chosen such that 1/min_sigma still fits in an ISP vector
  * element. */
 #define XNR_ALPHA_SCALE_LOG2        5
-#define XNR_ALPHA_SCALE_FACTOR      (1 << XNR_ALPHA_SCALE_LOG2)
+#define XNR_ALPHA_SCALE_FACTOR      BIT(XNR_ALPHA_SCALE_LOG2)
 
 /* Scaling factor of the coring values on the ISP. */
-#define XNR_CORING_SCALE_LOG2       (ISP_VEC_ELEMBITS-1)
-#define XNR_CORING_SCALE_FACTOR     (1 << XNR_CORING_SCALE_LOG2)
+#define XNR_CORING_SCALE_LOG2       (ISP_VEC_ELEMBITS - 1)
+#define XNR_CORING_SCALE_FACTOR     BIT(XNR_CORING_SCALE_LOG2)
 
 /* Scaling factor of the blending strength on the ISP. */
-#define XNR_BLENDING_SCALE_LOG2     (ISP_VEC_ELEMBITS-1)
-#define XNR_BLENDING_SCALE_FACTOR   (1 << XNR_BLENDING_SCALE_LOG2)
+#define XNR_BLENDING_SCALE_LOG2     (ISP_VEC_ELEMBITS - 1)
+#define XNR_BLENDING_SCALE_FACTOR   BIT(XNR_BLENDING_SCALE_LOG2)
 
 /* XNR3 filter size. Must be 11x11, 9x9 or 5x5. */
 #ifdef FLT_KERNEL_9x9
 /* XNR3 alpha (1/sigma) parameters on the ISP, expressed as a base (0) value
  * for dark areas, and a scaled diff towards the value for bright areas. */
 struct sh_css_xnr3_alpha_params {
-       int32_t y0;
-       int32_t u0;
-       int32_t v0;
-       int32_t ydiff;
-       int32_t udiff;
-       int32_t vdiff;
+       s32 y0;
+       s32 u0;
+       s32 v0;
+       s32 ydiff;
+       s32 udiff;
+       s32 vdiff;
 };
 
 /* XNR3 coring parameters on the ISP, expressed as a base (0) value
  * for dark areas, and a scaled diff towards the value for bright areas. */
 struct sh_css_xnr3_coring_params {
-       int32_t u0;
-       int32_t v0;
-       int32_t udiff;
-       int32_t vdiff;
+       s32 u0;
+       s32 v0;
+       s32 udiff;
+       s32 vdiff;
 };
 
 /* XNR3 blending strength on the ISP. */
 struct sh_css_xnr3_blending_params {
-       int32_t strength;
+       s32 strength;
 };
 
 /* XNR3 ISP parameters */
@@ -91,6 +91,5 @@ struct sh_css_isp_xnr3_vmem_params {
        VMEM_ARRAY(c, ISP_VEC_NELEMS);
 };
 
-
 #endif
 #endif  /*__IA_CSS_XNR3_PARAM_H */
index 669200caf72e6b765819086e68f818b5ea4ee1ca..6963bef3c07dc2ab540e129bbdc8b0ac0798d5f4 100644 (file)
  * \brief Scale of the XNR sigma parameters.
  * \details The define specifies which fixed-point value represents 1.0.
  */
-#define IA_CSS_XNR3_SIGMA_SCALE  (1 << 10)
+#define IA_CSS_XNR3_SIGMA_SCALE  BIT(10)
 
 /**
  * \brief Scale of the XNR coring parameters.
  * \details The define specifies which fixed-point value represents 1.0.
  */
-#define IA_CSS_XNR3_CORING_SCALE (1 << 15)
+#define IA_CSS_XNR3_CORING_SCALE BIT(15)
 
 /**
  * \brief Scale of the XNR blending parameter.
  * \details The define specifies which fixed-point value represents 1.0.
  */
-#define IA_CSS_XNR3_BLENDING_SCALE (1 << 11)
-
+#define IA_CSS_XNR3_BLENDING_SCALE BIT(11)
 
 /**
  * \brief XNR3 Sigma Parameters.
index d8dccce772a9432a273884ad3d04a6b4bd54f3d5..a23d876147ada112e11ed49d803cddac00204b39 100644 (file)
@@ -38,12 +38,12 @@ void
 ia_css_nr_encode(
        struct sh_css_isp_ynr_params *to,
        const struct ia_css_nr_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        /* YNR (Y Noise Reduction) */
        to->threshold =
-               uDIGIT_FITTING((unsigned)8192, 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 =
@@ -58,9 +58,9 @@ void
 ia_css_yee_encode(
        struct sh_css_isp_yee_params *to,
        const struct ia_css_yee_config *from,
-       unsigned size)
+       unsigned int size)
 {
-       int asiWk1 = (int) from->ee.gain;
+       int asiWk1 = (int)from->ee.gain;
        int asiWk2 = asiWk1 / 8;
        int asiWk3 = asiWk1 / 4;
 
@@ -82,10 +82,10 @@ ia_css_yee_encode(
            uDIGIT_FITTING(from->ee.detail_gain, 11,
                           SH_CSS_YEE_DETAIL_GAIN_SHIFT);
        to->coring_s =
-           (uDIGIT_FITTING((unsigned)56, 16, SH_CSS_BAYER_BITS) *
+           (uDIGIT_FITTING(56U, 16, SH_CSS_BAYER_BITS) *
             from->ee.threshold) >> 8;
        to->coring_g =
-           (uDIGIT_FITTING((unsigned)224, 16, SH_CSS_BAYER_BITS) *
+           (uDIGIT_FITTING(224U, 16, SH_CSS_BAYER_BITS) *
             from->ee.threshold) >> 8;
        /* 8; // *1.125 ->[s4.8] */
        to->scale_plus_s =
@@ -100,19 +100,19 @@ ia_css_yee_encode(
        to->scale_minus_g =
            (asiWk3) >> (11 - SH_CSS_YEE_SCALE_SHIFT);
        to->clip_plus_s =
-           uDIGIT_FITTING((unsigned)32760, 16, SH_CSS_BAYER_BITS);
+           uDIGIT_FITTING(32760U, 16, SH_CSS_BAYER_BITS);
        to->clip_plus_g = 0;
        to->clip_minus_s =
-           uDIGIT_FITTING((unsigned)504, 16, SH_CSS_BAYER_BITS);
+           uDIGIT_FITTING(504U, 16, SH_CSS_BAYER_BITS);
        to->clip_minus_g =
-           uDIGIT_FITTING((unsigned)32256, 16, SH_CSS_BAYER_BITS);
+           uDIGIT_FITTING(32256U, 16, SH_CSS_BAYER_BITS);
        to->Yclip = SH_CSS_BAYER_MAXVAL;
 }
 
 void
 ia_css_nr_dump(
        const struct sh_css_isp_ynr_params *ynr,
-       unsigned level)
+       unsigned int level)
 {
        if (!ynr) return;
        ia_css_debug_dtrace(level,
@@ -132,7 +132,7 @@ ia_css_nr_dump(
 void
 ia_css_yee_dump(
        const struct sh_css_isp_yee_params *yee,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
                "Y Edge Enhancement:\n");
@@ -189,12 +189,10 @@ ia_css_yee_dump(
 void
 ia_css_nr_debug_dtrace(
        const struct ia_css_nr_config *config,
-       unsigned level)
+       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=%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);
@@ -203,7 +201,7 @@ ia_css_nr_debug_dtrace(
 void
 ia_css_ee_debug_dtrace(
        const struct ia_css_ee_config *config,
-       unsigned level)
+       unsigned int level)
 {
        ia_css_debug_dtrace(level,
                "config.threshold=%d, config.gain=%d, config.detail_gain=%d\n",
@@ -212,7 +210,7 @@ ia_css_ee_debug_dtrace(
 
 void
 ia_css_init_ynr_state(
-       void/*struct sh_css_isp_ynr_vmem_state*/ *state,
+       void/*struct sh_css_isp_ynr_vmem_state*/ * state,
        size_t size)
 {
        memset(state, 0, size);
index b5730df313ef56fbc85acb6205a29110c9053dc6..63a26538b7bd1f8c831334354245ddc7ec3bd715 100644 (file)
@@ -25,36 +25,36 @@ void
 ia_css_nr_encode(
        struct sh_css_isp_ynr_params *to,
        const struct ia_css_nr_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_yee_encode(
        struct sh_css_isp_yee_params *to,
        const struct ia_css_yee_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_nr_dump(
        const struct sh_css_isp_ynr_params *ynr,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_yee_dump(
        const struct sh_css_isp_yee_params *yee,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_nr_debug_dtrace(
        const struct ia_css_nr_config *config,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_ee_debug_dtrace(
        const struct ia_css_ee_config *config,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_init_ynr_state(
-       void/*struct sh_css_isp_ynr_vmem_state*/ *state,
+       void/*struct sh_css_isp_ynr_vmem_state*/ * state,
        size_t size);
 #endif /* __IA_CSS_YNR_HOST_H */
index ad61ec1211e81604907c28ae4efb0f5a4788ccad..8f104bcb4d0f579481b15fad1ef936a0915147e9 100644 (file)
 
 /* YNR (Y Noise Reduction) */
 struct sh_css_isp_ynr_params {
-       int32_t threshold;
-       int32_t gain_all;
-       int32_t gain_dir;
-       int32_t threshold_cb;
-       int32_t threshold_cr;
+       s32 threshold;
+       s32 gain_all;
+       s32 gain_dir;
+       s32 threshold_cb;
+       s32 threshold_cr;
 };
 
 /* YEE (Y Edge Enhancement) */
 struct sh_css_isp_yee_params {
-       int32_t dirthreshold_s;
-       int32_t dirthreshold_g;
-       int32_t dirthreshold_width_log2;
-       int32_t dirthreshold_width;
-       int32_t detailgain;
-       int32_t coring_s;
-       int32_t coring_g;
-       int32_t scale_plus_s;
-       int32_t scale_plus_g;
-       int32_t scale_minus_s;
-       int32_t scale_minus_g;
-       int32_t clip_plus_s;
-       int32_t clip_plus_g;
-       int32_t clip_minus_s;
-       int32_t clip_minus_g;
-       int32_t Yclip;
+       s32 dirthreshold_s;
+       s32 dirthreshold_g;
+       s32 dirthreshold_width_log2;
+       s32 dirthreshold_width;
+       s32 detailgain;
+       s32 coring_s;
+       s32 coring_g;
+       s32 scale_plus_s;
+       s32 scale_plus_g;
+       s32 scale_minus_s;
+       s32 scale_minus_g;
+       s32 clip_plus_s;
+       s32 clip_plus_g;
+       s32 clip_minus_s;
+       s32 clip_minus_g;
+       s32 Yclip;
 };
 
 #endif /* __IA_CSS_YNR_PARAM_H */
index b2348b19c3cd1735464c01a5d0a368d1c694045f..4c5c2f0010d26b9c92f8173cf8dd449b3d6800ad 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 44b0050042389d7a6770219abec03b3db9aaf75a..d162fc08b4ddd5185bdfc453e8d1bc2b2c98fa9a 100644 (file)
@@ -38,15 +38,15 @@ const struct ia_css_fc_config default_fc_config = {
        (1 << (ISP_VEC_ELEMBITS - 2)),          /* 0.5 */
        (1 << (ISP_VEC_ELEMBITS - 1)) - 1,      /* 1 */
        (1 << (ISP_VEC_ELEMBITS - 1)) - 1,      /* 1 */
-       (int16_t)- (1 << (ISP_VEC_ELEMBITS - 1)),       /* -1 */
-       (int16_t)- (1 << (ISP_VEC_ELEMBITS - 1)),       /* -1 */
+       (int16_t)-(1 << (ISP_VEC_ELEMBITS - 1)),        /* -1 */
+       (int16_t)-(1 << (ISP_VEC_ELEMBITS - 1)),        /* -1 */
 };
 
 void
 ia_css_ynr_encode(
        struct sh_css_isp_yee2_params *to,
        const struct ia_css_ynr_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->edge_sense_gain_0   = from->edge_sense_gain_0;
@@ -59,7 +59,7 @@ void
 ia_css_fc_encode(
        struct sh_css_isp_fc_params *to,
        const struct ia_css_fc_config *from,
-       unsigned size)
+       unsigned int size)
 {
        (void)size;
        to->gain_exp   = from->gain_exp;
@@ -83,26 +83,20 @@ ia_css_fc_encode(
 void
 ia_css_ynr_dump(
        const struct sh_css_isp_yee2_params *yee2,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_fc_dump(
        const struct sh_css_isp_fc_params *fc,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_fc_debug_dtrace(
        const struct ia_css_fc_config *config,
-       unsigned level)
+       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=%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,
@@ -115,11 +109,10 @@ ia_css_fc_debug_dtrace(
 void
 ia_css_ynr_debug_dtrace(
        const struct ia_css_ynr_config *config,
-       unsigned level)
+       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=%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 71e89c469e4c6f6afec3fb8cd0af53361415db83..8ee483a91d08eb3bdababea52b66fc437bef1de7 100644 (file)
@@ -25,32 +25,32 @@ void
 ia_css_ynr_encode(
        struct sh_css_isp_yee2_params *to,
        const struct ia_css_ynr_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_fc_encode(
        struct sh_css_isp_fc_params *to,
        const struct ia_css_fc_config *from,
-       unsigned size);
+       unsigned int size);
 
 void
 ia_css_ynr_dump(
        const struct sh_css_isp_yee2_params *yee2,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_fc_dump(
        const struct sh_css_isp_fc_params *fc,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_fc_debug_dtrace(
        const struct ia_css_fc_config *config,
-       unsigned level);
+       unsigned int level);
 
 void
 ia_css_ynr_debug_dtrace(
        const struct ia_css_ynr_config *config,
-       unsigned level);
+       unsigned int level);
 
 #endif /* __IA_CSS_YNR2_HOST_H */
index e56b695bef2787a3e1836bc00e7298f4494de6c2..7479bce598d516e2a523643f5a7c1a0b0ab6d0ce 100644 (file)
 
 /* YNR (Y Noise Reduction), YEE (Y Edge Enhancement) */
 struct sh_css_isp_yee2_params {
-       int32_t edge_sense_gain_0;
-       int32_t edge_sense_gain_1;
-       int32_t corner_sense_gain_0;
-       int32_t corner_sense_gain_1;
+       s32 edge_sense_gain_0;
+       s32 edge_sense_gain_1;
+       s32 corner_sense_gain_0;
+       s32 corner_sense_gain_1;
 };
 
 /* Fringe Control */
 struct sh_css_isp_fc_params {
-       int32_t gain_exp;
-       uint16_t coring_pos_0;
-       uint16_t coring_pos_1;
-       uint16_t coring_neg_0;
-       uint16_t coring_neg_1;
-       int32_t gain_pos_0;
-       int32_t gain_pos_1;
-       int32_t gain_neg_0;
-       int32_t gain_neg_1;
-       int32_t crop_pos_0;
-       int32_t crop_pos_1;
-       int32_t crop_neg_0;
-       int32_t crop_neg_1;
+       s32 gain_exp;
+       u16 coring_pos_0;
+       u16 coring_pos_1;
+       u16 coring_neg_0;
+       u16 coring_neg_1;
+       s32 gain_pos_0;
+       s32 gain_pos_1;
+       s32 gain_neg_0;
+       s32 gain_neg_1;
+       s32 crop_pos_0;
+       s32 crop_pos_1;
+       s32 crop_neg_0;
+       s32 crop_neg_1;
 };
 
 #endif /* __IA_CSS_YNR2_PARAM_H */
index 83161a24207d9b50e69df725781efd6d5b62fe34..36e4bb61b38c82f61fe7ebff992341be6b2fdda7 100644 (file)
  *  ISP2: YNR2 and YEE2 are used for Still.
  */
 struct ia_css_ynr_config {
-       uint16_t edge_sense_gain_0;   /** Sensitivity of edge in dark area.
+       u16 edge_sense_gain_0;   /** Sensitivity of edge in dark area.
                                        u13.0, [0,8191],
                                        default 1000, ineffective 0 */
-       uint16_t edge_sense_gain_1;   /** Sensitivity of edge in bright area.
+       u16 edge_sense_gain_1;   /** Sensitivity of edge in bright area.
                                        u13.0, [0,8191],
                                        default 1000, ineffective 0 */
-       uint16_t corner_sense_gain_0; /** Sensitivity of corner in dark area.
+       u16 corner_sense_gain_0; /** Sensitivity of corner in dark area.
                                        u13.0, [0,8191],
                                        default 1000, ineffective 0 */
-       uint16_t corner_sense_gain_1; /** Sensitivity of corner in bright area.
+       u16 corner_sense_gain_1; /** Sensitivity of corner in bright area.
                                        u13.0, [0,8191],
                                        default 1000, ineffective 0 */
 };
@@ -49,46 +49,45 @@ struct ia_css_ynr_config {
  *  ISP2: FC2 is used for Still.
  */
 struct ia_css_fc_config {
-       uint8_t  gain_exp;   /** Common exponent of gains.
+       u8  gain_exp;   /** Common exponent of gains.
                                u8.0, [0,13],
                                default 1, ineffective 0 */
-       uint16_t coring_pos_0; /** Coring threshold for positive edge in dark area.
+       u16 coring_pos_0; /** Coring threshold for positive edge in dark area.
                                u0.13, [0,8191],
                                default 0(0), ineffective 0 */
-       uint16_t coring_pos_1; /** Coring threshold for positive edge in bright area.
+       u16 coring_pos_1; /** Coring threshold for positive edge in bright area.
                                u0.13, [0,8191],
                                default 0(0), ineffective 0 */
-       uint16_t coring_neg_0; /** Coring threshold for negative edge in dark area.
+       u16 coring_neg_0; /** Coring threshold for negative edge in dark area.
                                u0.13, [0,8191],
                                default 0(0), ineffective 0 */
-       uint16_t coring_neg_1; /** Coring threshold for negative edge in bright area.
+       u16 coring_neg_1; /** Coring threshold for negative edge in bright area.
                                u0.13, [0,8191],
                                default 0(0), ineffective 0 */
-       uint16_t gain_pos_0; /** Gain for positive edge in dark area.
+       u16 gain_pos_0; /** Gain for positive edge in dark area.
                                u0.13, [0,8191],
                                default 4096(0.5), ineffective 0 */
-       uint16_t gain_pos_1; /** Gain for positive edge in bright area.
+       u16 gain_pos_1; /** Gain for positive edge in bright area.
                                u0.13, [0,8191],
                                default 4096(0.5), ineffective 0 */
-       uint16_t gain_neg_0; /** Gain for negative edge in dark area.
+       u16 gain_neg_0; /** Gain for negative edge in dark area.
                                u0.13, [0,8191],
                                default 4096(0.5), ineffective 0 */
-       uint16_t gain_neg_1; /** Gain for negative edge in bright area.
+       u16 gain_neg_1; /** Gain for negative edge in bright area.
                                u0.13, [0,8191],
                                default 4096(0.5), ineffective 0 */
-       uint16_t crop_pos_0; /** Limit for positive edge in dark area.
+       u16 crop_pos_0; /** Limit for positive edge in dark area.
                                u0.13, [0,8191],
                                default/ineffective 8191(almost 1.0) */
-       uint16_t crop_pos_1; /** Limit for positive edge in bright area.
+       u16 crop_pos_1; /** Limit for positive edge in bright area.
                                u0.13, [0,8191],
                                default/ineffective 8191(almost 1.0) */
-       int16_t  crop_neg_0; /** Limit for negative edge in dark area.
+       s16  crop_neg_0; /** Limit for negative edge in dark area.
                                s0.13, [-8192,0],
                                default/ineffective -8192(-1.0) */
-       int16_t  crop_neg_1; /** Limit for negative edge in bright area.
+       s16  crop_neg_1; /** Limit for negative edge in bright area.
                                s0.13, [-8192,0],
                                default/ineffective -8192(-1.0) */
 };
 
 #endif /* __IA_CSS_YNR2_TYPES_H */
-
index 2f215dc2ac32cd069042a73c2696612f9ff4fbc1..392b5dd334fb3c3ac94a1a674cefffa3b546623e 100644 (file)
@@ -36,10 +36,10 @@ more details.
 /* Binary independent constants */
 
 #ifndef NO_HOIST
-#  define              NO_HOIST        HIVE_ATTRIBUTE (( no_hoist ))
+#  define              NO_HOIST        HIVE_ATTRIBUTE((no_hoist))
 #endif
 
-#define NO_HOIST_CSE HIVE_ATTRIBUTE ((no_hoist, no_cse))
+#define NO_HOIST_CSE HIVE_ATTRIBUTE((no_hoist, no_cse))
 
 #define UNION struct /* Union constructors not allowed in C++ */
 
@@ -329,8 +329,8 @@ more details.
 #endif
 
 #define XMEM_WIDTH_BITS              HIVE_ISP_DDR_WORD_BITS
-#define XMEM_SHORTS_PER_WORD         (HIVE_ISP_DDR_WORD_BITS/16)
-#define XMEM_INTS_PER_WORD           (HIVE_ISP_DDR_WORD_BITS/32)
+#define XMEM_SHORTS_PER_WORD         (HIVE_ISP_DDR_WORD_BITS / 16)
+#define XMEM_INTS_PER_WORD           (HIVE_ISP_DDR_WORD_BITS / 32)
 #define XMEM_POW2_BYTES_PER_WORD      HIVE_ISP_DDR_WORD_BYTES
 
 #define BITS8_ELEMENTS_PER_XMEM_ADDR    CEIL_DIV(XMEM_WIDTH_BITS, 8)
@@ -383,7 +383,7 @@ more details.
 #define ISP_LEFT_PADDING_VECS_CONT     CEIL_DIV(ISP_LEFT_PADDING_CONT, ISP_VEC_NELEMS)
 
 #define CEIL_ROUND_DIV_STRIPE(width, stripe, padding) \
-       CEIL_MUL(padding + CEIL_DIV(width - padding, stripe), ((ENABLE_RAW_BINNING || ENABLE_FIXED_BAYER_DS)?4:2))
+       CEIL_MUL(padding + CEIL_DIV(width - padding, stripe), ((ENABLE_RAW_BINNING || ENABLE_FIXED_BAYER_DS) ? 4 : 2))
 
 /* output (Y,U,V) image, 4:2:0 */
 #define MAX_VECTORS_PER_LINE \
@@ -407,7 +407,6 @@ more details.
                                                              ISP_NUM_STRIPES, \
                                                              ISP_LEFT_PADDING_VECS)
 
-
 /* Add 2 for left croppping */
 #define MAX_SP_RAW_COPY_VECTORS_PER_INPUT_LINE (CEIL_DIV(ISP_MAX_INPUT_WIDTH, ISP_VEC_NELEMS) + 2)
 
@@ -429,28 +428,26 @@ more details.
 
 #define MAX_VECTORS_PER_CHUNK \
        (NO_CHUNKING ? MAX_VECTORS_PER_LINE \
-                               : 2*CEIL_DIV(MAX_VECTORS_PER_LINE, \
-                                            2*OUTPUT_NUM_CHUNKS))
+                               : 2 * CEIL_DIV(MAX_VECTORS_PER_LINE, \
+                                            2 * OUTPUT_NUM_CHUNKS))
 
 #define MAX_C_VECTORS_PER_CHUNK \
-       (MAX_VECTORS_PER_CHUNK/2)
+       (MAX_VECTORS_PER_CHUNK / 2)
 
 /* should be even */
 #define MAX_VECTORS_PER_OUTPUT_CHUNK \
        (NO_CHUNKING ? MAX_VECTORS_PER_OUTPUT_LINE \
-                               : 2*CEIL_DIV(MAX_VECTORS_PER_OUTPUT_LINE, \
-                                            2*OUTPUT_NUM_CHUNKS))
+                               : 2 * CEIL_DIV(MAX_VECTORS_PER_OUTPUT_LINE, \
+                                            2 * OUTPUT_NUM_CHUNKS))
 
 #define MAX_C_VECTORS_PER_OUTPUT_CHUNK \
-       (MAX_VECTORS_PER_OUTPUT_CHUNK/2)
-
-
+       (MAX_VECTORS_PER_OUTPUT_CHUNK / 2)
 
 /* should be even */
 #define MAX_VECTORS_PER_INPUT_CHUNK \
        (INPUT_NUM_CHUNKS == 1 ? MAX_VECTORS_PER_INPUT_STRIPE \
-                              : 2*CEIL_DIV(MAX_VECTORS_PER_INPUT_STRIPE, \
-                                           2*OUTPUT_NUM_CHUNKS))
+                              : 2 * CEIL_DIV(MAX_VECTORS_PER_INPUT_STRIPE, \
+                                           2 * OUTPUT_NUM_CHUNKS))
 
 #define DEFAULT_C_SUBSAMPLING      2
 
@@ -460,7 +457,7 @@ more details.
 
 #define RAW_BUF_STRIDE \
        (BINARY_ID == SH_CSS_BINARY_ID_POST_ISP ? MAX_VECTORS_PER_INPUT_CHUNK : \
-        ISP_NUM_STRIPES > 1 ? MAX_VECTORS_PER_INPUT_STRIPE+_ISP_EXTRA_PADDING_VECS : \
+        ISP_NUM_STRIPES > 1 ? MAX_VECTORS_PER_INPUT_STRIPE + _ISP_EXTRA_PADDING_VECS : \
         !ENABLE_CONTINUOUS ? MAX_VECTORS_PER_INPUT_LINE : \
         MAX_VECTORS_PER_INPUT_CHUNK)
 
index 37a7d28f6d9f1e612aa7b71d692f5d440a889fef..2c6d1f8dcbb91590b41553434b18418ae7bd49bb 100644 (file)
@@ -39,14 +39,14 @@ struct ia_css_3a_output;
 struct isp_uds_config {
        int      hive_dx;
        int      hive_dy;
-       unsigned hive_woix;
-       unsigned hive_bpp; /* gdc_bits_per_pixel */
-       unsigned hive_bci;
+       unsigned int hive_woix;
+       unsigned int hive_bpp; /* gdc_bits_per_pixel */
+       unsigned int hive_bci;
 };
 
 struct s_isp_gdcac_config {
-       unsigned nbx;
-       unsigned nby;
+       unsigned int nbx;
+       unsigned int nby;
 };
 
 /* output.hive.c request information */
@@ -57,13 +57,13 @@ typedef enum {
 } output_channel_type;
 
 typedef struct s_output_dma_info {
-  unsigned            cond;            /* Condition for transfer */
+  unsigned int cond;           /* Condition for transfer */
   output_channel_type channel_type;
   dma_channel         channel;
-  unsigned            width_a;
-  unsigned            width_b;
-  unsigned            stride;
-  unsigned            v_delta;         /* Offset for v address to do cropping */
+  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 6512a1ceb9d34d1cc3f5f6ddcee6ef093f9b1436..8246ae402075d1e5bf5878c188164637a68257ea 100644 (file)
@@ -17,23 +17,22 @@ more details.
 #include "memory_access.h"
 
 static bool realloc_isp_css_mm_buf(
-       hrt_vaddress *curr_buf,
+       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,
+       hrt_vaddress * curr_buf,
        size_t *curr_size,
        size_t needed_size,
        bool force,
        enum ia_css_err *err)
 {
        bool ret;
-       uint16_t        mmgr_attribute = MMGR_ATTRIBUTE_DEFAULT;
+       u16     mmgr_attribute = MMGR_ATTRIBUTE_DEFAULT;
 
        IA_CSS_ENTER_PRIVATE("void");
 
@@ -45,14 +44,14 @@ bool reallocate_buffer(
 }
 
 static bool realloc_isp_css_mm_buf(
-       hrt_vaddress *curr_buf,
+       hrt_vaddress * curr_buf,
        size_t *curr_size,
        size_t needed_size,
        bool force,
        enum ia_css_err *err,
        uint16_t mmgr_attribute)
 {
-       int32_t id;
+       s32 id;
 
        *err = IA_CSS_SUCCESS;
        /* Possible optimization: add a function sh_css_isp_css_mm_realloc()
index e16ab458cf523fda8bedc101e6f82d7eca1d0f63..d07a4b0132a148a7bdadcb2d3d5a075765928d17 100644 (file)
@@ -53,7 +53,7 @@ ia_css_binary_dvs_env(const struct ia_css_binary_info *info,
                      struct ia_css_resolution *binary_dvs_env)
 {
        if (info->enable.dvs_envelope) {
-               assert(dvs_env != NULL);
+               assert(dvs_env);
                binary_dvs_env->width  = max(dvs_env->width, SH_CSS_MIN_DVS_ENVELOPE);
                binary_dvs_env->height = max(dvs_env->height, SH_CSS_MIN_DVS_ENVELOPE);
        }
@@ -77,20 +77,20 @@ ia_css_binary_internal_res(const struct ia_css_frame_info *in_info,
        ia_css_binary_dvs_env(info, dvs_env, &binary_dvs_env);
 
        if (binary_supports_yuv_ds) {
-               if (in_info != NULL) {
+               if (in_info) {
                        isp_tmp_internal_width = in_info->res.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;
                }
-       } else if ((bds_out_info != NULL) && (out_info != NULL) &&
+       } 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;
        } else {
-               if (out_info != NULL) {
+               if (out_info) {
                        isp_tmp_internal_width = out_info->padded_width;
                        isp_tmp_internal_height = out_info->res.height;
                }
@@ -111,25 +111,25 @@ ia_css_binary_internal_res(const struct ia_css_frame_info *in_info,
 #ifndef ISP2401
 /* Computation results of the origin coordinate of bayer on the shading table. */
 struct sh_css_shading_table_bayer_origin_compute_results {
-       uint32_t bayer_scale_hor_ratio_in;      /* Horizontal ratio (in) of bayer scaling. */
-       uint32_t bayer_scale_hor_ratio_out;     /* Horizontal ratio (out) of bayer scaling. */
-       uint32_t bayer_scale_ver_ratio_in;      /* Vertical ratio (in) of bayer scaling. */
-       uint32_t bayer_scale_ver_ratio_out;     /* Vertical ratio (out) of bayer scaling. */
-       uint32_t sc_bayer_origin_x_bqs_on_shading_table; /* X coordinate (in bqs) of bayer origin on shading table. */
-       uint32_t sc_bayer_origin_y_bqs_on_shading_table; /* Y coordinate (in bqs) of bayer origin on shading table. */
+       u32 bayer_scale_hor_ratio_in;   /* Horizontal ratio (in) of bayer scaling. */
+       u32 bayer_scale_hor_ratio_out;  /* Horizontal ratio (out) of bayer scaling. */
+       u32 bayer_scale_ver_ratio_in;   /* Vertical ratio (in) of bayer scaling. */
+       u32 bayer_scale_ver_ratio_out;  /* Vertical ratio (out) of bayer scaling. */
+       u32 sc_bayer_origin_x_bqs_on_shading_table; /* X coordinate (in bqs) of bayer origin on shading table. */
+       u32 sc_bayer_origin_y_bqs_on_shading_table; /* Y coordinate (in bqs) of bayer origin on shading table. */
 #else
 /* Requirements for the shading correction. */
 struct sh_css_binary_sc_requirements {
        /* Bayer scaling factor, for the scaling which is applied before shading correction. */
-       uint32_t bayer_scale_hor_ratio_in;  /* Horizontal ratio (in) of scaling applied BEFORE shading correction. */
-       uint32_t bayer_scale_hor_ratio_out; /* Horizontal ratio (out) of scaling applied BEFORE shading correction. */
-       uint32_t bayer_scale_ver_ratio_in;  /* Vertical ratio (in) of scaling applied BEFORE shading correction. */
-       uint32_t bayer_scale_ver_ratio_out; /* Vertical ratio (out) of scaling applied BEFORE shading correction. */
+       u32 bayer_scale_hor_ratio_in;  /* Horizontal ratio (in) of scaling applied BEFORE shading correction. */
+       u32 bayer_scale_hor_ratio_out; /* Horizontal ratio (out) of scaling applied BEFORE shading correction. */
+       u32 bayer_scale_ver_ratio_in;  /* Vertical ratio (in) of scaling applied BEFORE shading correction. */
+       u32 bayer_scale_ver_ratio_out; /* Vertical ratio (out) of scaling applied BEFORE shading correction. */
 
        /* ISP internal frame is composed of the real sensor data and the padding data. */
-       uint32_t sensor_data_origin_x_bqs_on_internal; /* X origin (in bqs) of sensor data on internal frame
+       u32 sensor_data_origin_x_bqs_on_internal; /* X origin (in bqs) of sensor data on internal frame
                                                                at shading correction. */
-       uint32_t sensor_data_origin_y_bqs_on_internal; /* Y origin (in bqs) of sensor data on internal frame
+       u32 sensor_data_origin_y_bqs_on_internal; /* Y origin (in bqs) of sensor data on internal frame
                                                                at shading correction. */
 #endif
 };
@@ -362,7 +362,7 @@ sh_css_binary_get_sc_requirements(
                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);
+               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);
@@ -414,12 +414,12 @@ sh_css_binary_get_sc_requirements(
        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
+               * 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
+               * 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 */
 
@@ -444,13 +444,13 @@ sh_css_binary_get_sc_requirements(
                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
+                       = ((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
+                       = ((top_padding_bqs + down_shift_bqs_before_bs) * bs_out + bs_in / 2) / bs_in
                                + down_shift_bqs_after_bs;      /* "+ bs_in/2": rounding */
        }
 
@@ -493,26 +493,26 @@ ia_css_binary_get_shading_info_type_1(const struct ia_css_binary *binary, /* [in
 #endif
 
 #ifndef ISP2401
-       assert(binary != NULL);
-       assert(info != NULL);
+       assert(binary);
+       assert(info);
 #else
-       uint32_t in_width_bqs, in_height_bqs, internal_width_bqs, internal_height_bqs;
-       uint32_t num_hor_grids, num_ver_grids, bqs_per_grid_cell, tbl_width_bqs, tbl_height_bqs;
-       uint32_t sensor_org_x_bqs_on_internal, sensor_org_y_bqs_on_internal, sensor_width_bqs, sensor_height_bqs;
-       uint32_t sensor_center_x_bqs_on_internal, sensor_center_y_bqs_on_internal;
-       uint32_t left, right, upper, lower;
-       uint32_t adjust_left, adjust_right, adjust_upper, adjust_lower, adjust_width_bqs, adjust_height_bqs;
-       uint32_t internal_org_x_bqs_on_tbl, internal_org_y_bqs_on_tbl;
-       uint32_t sensor_org_x_bqs_on_tbl, sensor_org_y_bqs_on_tbl;
+       u32 in_width_bqs, in_height_bqs, internal_width_bqs, internal_height_bqs;
+       u32 num_hor_grids, num_ver_grids, bqs_per_grid_cell, tbl_width_bqs, tbl_height_bqs;
+       u32 sensor_org_x_bqs_on_internal, sensor_org_y_bqs_on_internal, sensor_width_bqs, sensor_height_bqs;
+       u32 sensor_center_x_bqs_on_internal, sensor_center_y_bqs_on_internal;
+       u32 left, right, upper, lower;
+       u32 adjust_left, adjust_right, adjust_upper, adjust_lower, adjust_width_bqs, adjust_height_bqs;
+       u32 internal_org_x_bqs_on_tbl, internal_org_y_bqs_on_tbl;
+       u32 sensor_org_x_bqs_on_tbl, sensor_org_y_bqs_on_tbl;
 #endif
 
 #ifndef ISP2401
        info->type = IA_CSS_SHADING_CORRECTION_TYPE_1;
 #else
-       assert(binary != NULL);
-       assert(stream_config != NULL);
-       assert(shading_info != NULL);
-       assert(pipe_config != NULL);
+       assert(binary);
+       assert(stream_config);
+       assert(shading_info);
+       assert(pipe_config);
 #endif
 
 #ifndef ISP2401
@@ -601,11 +601,11 @@ ia_css_binary_get_shading_info_type_1(const struct ia_css_binary *binary, /* [in
 
                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 */
+               sensor_width_bqs  = (in_width_bqs * bs_out + bs_in / 2) / bs_in; /* "+ bs_in/2": rounding */
 
                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 */
+               sensor_height_bqs = (in_height_bqs * bs_out + bs_in / 2) / bs_in; /* "+ bs_in/2": rounding */
        }
 
        /* Center of the sensor data on the internal frame at shading correction. */
@@ -704,11 +704,11 @@ ia_css_binary_get_shading_info(const struct ia_css_binary *binary,                        /* [in] */
 {
        enum ia_css_err err;
 
-       assert(binary != NULL);
+       assert(binary);
 #ifndef ISP2401
-       assert(info != NULL);
+       assert(info);
 #else
-       assert(shading_info != NULL);
+       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);
@@ -734,8 +734,8 @@ 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)
 {
-       assert(binary != NULL);
-       assert(info != NULL);
+       assert(binary);
+       assert(info);
 
        info->isp_in_width = binary->internal_frame_info.res.width;
        info->isp_in_height = binary->internal_frame_info.res.height;
@@ -751,8 +751,8 @@ ia_css_binary_dvs_grid_info(const struct ia_css_binary *binary,
        struct ia_css_dvs_grid_info *dvs_info;
 
        (void)pipe;
-       assert(binary != NULL);
-       assert(info != NULL);
+       assert(binary);
+       assert(info);
 
        dvs_info = &info->dvs_grid.dvs_grid_info;
 
@@ -794,11 +794,10 @@ ia_css_binary_3a_grid_info(const struct ia_css_binary *binary,
        IA_CSS_ENTER_PRIVATE("binary=%p, info=%p, pipe=%p",
                             binary, info, pipe);
 
-       assert(binary != NULL);
-       assert(info != NULL);
+       assert(binary);
+       assert(info);
        s3a_info = &info->s3a_grid;
 
-
        /* 3A statistics grid */
        s3a_info->enable            = binary->info->sp.enable.s3a;
        s3a_info->width             = binary->s3atbl_width;
@@ -821,7 +820,7 @@ ia_css_binary_3a_grid_info(const struct ia_css_binary *binary,
 static void
 binary_init_pc_histogram(struct sh_css_pc_histogram *histo)
 {
-       assert(histo != NULL);
+       assert(histo);
 
        histo->length = 0;
        histo->run = NULL;
@@ -832,8 +831,8 @@ static void
 binary_init_metrics(struct sh_css_binary_metrics *metrics,
             const struct ia_css_binary_info *info)
 {
-       assert(metrics != NULL);
-       assert(info != NULL);
+       assert(metrics);
+       assert(info);
 
        metrics->mode = info->pipeline.mode;
        metrics->id   = info->id;
@@ -849,7 +848,7 @@ binary_supports_output_format(const struct ia_css_binary_xinfo *info,
 {
        int i;
 
-       assert(info != NULL);
+       assert(info);
 
        for (i = 0; i < info->num_output_formats; i++) {
                if (info->output_formats[i] == format)
@@ -863,8 +862,7 @@ static bool
 binary_supports_input_format(const struct ia_css_binary_xinfo *info,
                             enum atomisp_input_format format)
 {
-
-       assert(info != NULL);
+       assert(info);
        (void)format;
 
        return true;
@@ -877,7 +875,7 @@ binary_supports_vf_format(const struct ia_css_binary_xinfo *info,
 {
        int i;
 
-       assert(info != NULL);
+       assert(info);
 
        for (i = 0; i < info->num_vf_formats; i++) {
                if (info->vf_formats[i] == format)
@@ -888,7 +886,7 @@ binary_supports_vf_format(const struct ia_css_binary_xinfo *info,
 
 /* move to host part of bds module */
 static bool
-supports_bds_factor(uint32_t supported_factors,
+supports_bds_factor(u32 supported_factors,
                       uint32_t bds_factor)
 {
        return ((supported_factors & PACK_BDS_FACTOR(bds_factor)) != 0);
@@ -899,13 +897,13 @@ binary_init_info(struct ia_css_binary_xinfo *info, unsigned int i,
                 bool *binary_found)
 {
        const unsigned char *blob = sh_css_blob_info[i].blob;
-       unsigned size = sh_css_blob_info[i].header.blob.size;
+       unsigned int size = sh_css_blob_info[i].header.blob.size;
 
-       if ((info == NULL) || (binary_found == NULL))
+       if ((!info) || (!binary_found))
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        *info = sh_css_blob_info[i].header.info.isp;
-       *binary_found = blob != NULL;
+       *binary_found = blob;
        info->blob_index = i;
        /* we don't have this binary, skip it */
        if (!size)
@@ -931,7 +929,7 @@ ia_css_binary_init_infos(void)
 
        all_binaries = sh_css_malloc(num_of_isp_binaries *
                                                sizeof(*all_binaries));
-       if (all_binaries == NULL)
+       if (!all_binaries)
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 
        for (i = 0; i < num_of_isp_binaries; i++) {
@@ -1058,7 +1056,7 @@ binary_in_frame_padded_width(int in_frame_width,
        nr_of_left_paddings = 0;
 #else
        /* in other cases, the left padding pixels are always 128 */
-       nr_of_left_paddings = 2*ISP_VEC_NELEMS;
+       nr_of_left_paddings = 2 * ISP_VEC_NELEMS;
 #endif
        if (need_scaling) {
                /* In SDV use-case, we need to match left-padding of
@@ -1067,14 +1065,14 @@ binary_in_frame_padded_width(int in_frame_width,
                        /* Different than before, we do left&right padding. */
                        rval =
                                CEIL_MUL(in_frame_width + nr_of_left_paddings,
-                                       2*ISP_VEC_NELEMS);
+                                       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);
+                                       2 * ISP_VEC_NELEMS);
                }
        } else {
                rval = isp_internal_width;
@@ -1083,7 +1081,6 @@ binary_in_frame_padded_width(int in_frame_width,
        return rval;
 }
 
-
 enum ia_css_err
 ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
                 bool online,
@@ -1120,8 +1117,8 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
        unsigned int i;
        const struct ia_css_frame_info *bin_out_info = NULL;
 
-       assert(info != NULL);
-       assert(binary != NULL);
+       assert(info);
+       assert(binary);
 
        binary->info = xinfo;
        if (!accelerator) {
@@ -1139,12 +1136,11 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
                        break;
                }
        }
-       if (in_info != NULL && bin_out_info != NULL) {
+       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);
        }
 
-
        /* binary_dvs_env has to be equal or larger than SH_CSS_MIN_DVS_ENVELOPE */
        binary_dvs_env.width = 0;
        binary_dvs_env.height = 0;
@@ -1163,15 +1159,15 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
        isp_internal_height = internal_res.height;
 
        /* internal frame info */
-       if (bin_out_info != NULL) /* { */
+       if (bin_out_info) /* { */
                binary->internal_frame_info.format = bin_out_info->format;
        /* } */
        binary->internal_frame_info.res.width       = isp_internal_width;
-       binary->internal_frame_info.padded_width    = CEIL_MUL(isp_internal_width, 2*ISP_VEC_NELEMS);
+       binary->internal_frame_info.padded_width    = CEIL_MUL(isp_internal_width, 2 * ISP_VEC_NELEMS);
        binary->internal_frame_info.res.height      = isp_internal_height;
        binary->internal_frame_info.raw_bit_depth   = bits_per_pixel;
 
-       if (in_info != NULL) {
+       if (in_info) {
                binary->effective_in_frame_res.width = in_info->res.width;
                binary->effective_in_frame_res.height = in_info->res.height;
 
@@ -1204,7 +1200,7 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
        binary->in_frame_info.raw_bit_depth = bits_per_pixel;
 
        for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
-               if (out_info[i] != NULL) {
+               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;
                        binary->out_frame_info[i].padded_width  = out_info[i]->padded_width;
@@ -1239,10 +1235,11 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
        binary->input_format      = stream_format;
 
        /* viewfinder output info */
-       if ((vf_info != NULL) && (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 == NULL)
+               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);
@@ -1292,7 +1289,7 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
        sc_3a_dis_width = binary->in_frame_info.res.width;
        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 != NULL && in_info != NULL &&
+       if (bds_out_info && in_info &&
                        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! */
@@ -1301,7 +1298,6 @@ ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
                sc_3a_dis_height = isp_internal_height;
        }
 
-
        s3a_isp_width = _ISP_S3A_ELEMS_ISP_WIDTH(sc_3a_dis_padded_width,
                info->pipeline.left_cropping);
        if (info->s3a.fixed_s3a_deci_log) {
@@ -1410,9 +1406,9 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
        struct ia_css_resolution dvs_env, internal_res;
        unsigned int i;
 
-       assert(descr != NULL);
+       assert(descr);
        /* MW: used after an error check, may accept NULL, but doubtfull */
-       assert(binary != NULL);
+       assert(binary);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                "ia_css_binary_find() enter: descr=%p, (mode=%d), binary=%p\n",
@@ -1430,13 +1426,13 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
                if (req_out_info[i] && (req_out_info[i]->res.width != 0))
                        req_bin_out_info = req_out_info[i];
        }
-       if (req_bin_out_info == NULL)
+       if (!req_bin_out_info)
                return IA_CSS_ERR_INTERNAL_ERROR;
 #ifndef ISP2401
        req_vf_info = descr->vf_info;
 #else
 
-       if ((descr->vf_info != NULL) && (descr->vf_info->res.width == 0))
+       if ((descr->vf_info) && (descr->vf_info->res.width == 0))
                /* width==0 means that there is no vf pin (e.g. in SkyCam preview case) */
                req_vf_info = NULL;
        else
@@ -1468,7 +1464,6 @@ 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) {
                dvs_env = descr->dvs_env;
                need_dz = descr->enable_dz;
@@ -1586,7 +1581,7 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
                        need_dz = false;
 
                /* when we require vf output, we need to have vf_veceven */
-               if ((req_vf_info != NULL) && !(candidate->enable.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. */
@@ -1767,7 +1762,7 @@ ia_css_binary_find(struct ia_css_binary_descr *descr,
                        continue;
                }
 
-               if(!candidate->enable.tnr && need_tnr) {
+               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,
@@ -1824,7 +1819,7 @@ void
 ia_css_binary_get_isp_binaries(struct ia_css_binary_xinfo **binaries,
        uint32_t *num_isp_binaries)
 {
-       assert(binaries != NULL);
+       assert(binaries);
 
        if (num_isp_binaries)
                *num_isp_binaries = 0;
index 4d17d3c697d6a63f374b9fb8d38e6a3f72ef4833..fffe3b846162552906f00feb03345888c3e64280 100644 (file)
@@ -37,7 +37,6 @@ more details.
 #include "ia_css_err.h"
 #define BUFQ_EVENT_SIZE 4
 
-
 /**
  * @brief Query the internal frame ID.
  *
@@ -54,7 +53,6 @@ bool ia_css_query_internal_queue_id(
        enum sh_css_queue_id *val
        );
 
-
 /**
  * @brief  Map buffer type to a internal queue id.
  *
@@ -69,14 +67,12 @@ void ia_css_queue_map(
        bool map
        );
 
-
 /**
  * @brief  Initialize buffer type to a queue id mapping
  * @return none
  */
 void ia_css_queue_map_init(void);
 
-
 /**
  * @brief initializes bufq module
  * It create instances of
@@ -90,7 +86,6 @@ void ia_css_queue_map_init(void);
  */
 void ia_css_bufq_init(void);
 
-
 /**
 * @brief Enqueues an item into host to SP buffer queue
  *
@@ -130,9 +125,9 @@ enum  ia_css_err ia_css_bufq_dequeue_buffer(
  *
 */
 enum ia_css_err ia_css_bufq_enqueue_psys_event(
-       uint8_t evt_id,
-       uint8_t evt_payload_0,
-       uint8_t evt_payload_1,
+       u8 evt_id,
+       u8 evt_payload_0,
+       u8 evt_payload_1,
        uint8_t evt_payload_2
        );
 
@@ -144,7 +139,8 @@ enum ia_css_err ia_css_bufq_enqueue_psys_event(
  *
 */
 enum  ia_css_err ia_css_bufq_dequeue_psys_event(
-       uint8_t item[BUFQ_EVENT_SIZE]
+       u8 item[BUFQ_EVENT_SIZE]
+
        );
 
 /**
@@ -166,7 +162,7 @@ enum ia_css_err ia_css_bufq_enqueue_isys_event(
  *
  */
 enum  ia_css_err ia_css_bufq_dequeue_isys_event(
-       uint8_t item[BUFQ_EVENT_SIZE]);
+       u8 item[BUFQ_EVENT_SIZE]);
 
 /**
 * @brief   Enqueue a tagger command item into tagger command queue..
index bb77080591b9028fddcdf58ff3899f02fed2b564..20951f6bb0af5f580734230323a81cc1caa8962a 100644 (file)
@@ -51,9 +51,9 @@ enum sh_css_queue_id {
 #endif
 
 #if defined(HAS_NO_INPUT_SYSTEM) || defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
-#define SH_CSS_MAX_NUM_QUEUES (SH_CSS_QUEUE_H_ID+1)
+#define SH_CSS_MAX_NUM_QUEUES (SH_CSS_QUEUE_H_ID + 1)
 #else
-#define SH_CSS_MAX_NUM_QUEUES (SH_CSS_QUEUE_G_ID+1)
+#define SH_CSS_MAX_NUM_QUEUES (SH_CSS_QUEUE_G_ID + 1)
 #endif
 
 };
index ffbcdd80d934374eb65b064f90a6472a1a8ea600..dff5bb8211b1c0f16f9de8bf9dc903aa7bcf165d 100644 (file)
@@ -161,7 +161,7 @@ bool ia_css_query_internal_queue_id(
 {
        IA_CSS_ENTER("buf_type=%d, thread_id=%d, val = %p", buf_type, thread_id, val);
 
-       if ((val == NULL) || (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;
        }
@@ -232,7 +232,6 @@ static void unmap_buffer_type_to_queue_id(
        queue_availability[thread_id][queue_id] = true;
 }
 
-
 static ia_css_queue_t *bufq_get_qhandle(
        enum sh_css_queue_type type,
        enum sh_css_queue_id id,
@@ -369,7 +368,7 @@ enum ia_css_err ia_css_bufq_enqueue_buffer(
        q = bufq_get_qhandle(sh_css_host2sp_buffer_queue,
                queue_id,
                thread_index);
-       if (q != NULL) {
+       if (q) {
                error = ia_css_queue_enqueue(q, item);
                return_err = ia_css_convert_errno(error);
        } else {
@@ -390,7 +389,7 @@ enum ia_css_err ia_css_bufq_dequeue_buffer(
        ia_css_queue_t *q;
 
        IA_CSS_ENTER_PRIVATE("queue_id=%d", queue_id);
-       if ((item == NULL) ||
+       if ((!item) ||
            (queue_id <= SH_CSS_INVALID_QUEUE_ID) ||
            (queue_id >= SH_CSS_MAX_NUM_QUEUES)
           )
@@ -399,7 +398,7 @@ enum ia_css_err ia_css_bufq_dequeue_buffer(
        q = bufq_get_qhandle(sh_css_sp2host_buffer_queue,
                queue_id,
                -1);
-       if (q != NULL) {
+       if (q) {
                error = ia_css_queue_dequeue(q, item);
                return_err = ia_css_convert_errno(error);
        } else {
@@ -412,9 +411,9 @@ enum ia_css_err ia_css_bufq_dequeue_buffer(
 }
 
 enum ia_css_err ia_css_bufq_enqueue_psys_event(
-       uint8_t evt_id,
-       uint8_t evt_payload_0,
-       uint8_t evt_payload_1,
+       u8 evt_id,
+       u8 evt_payload_0,
+       u8 evt_payload_1,
        uint8_t evt_payload_2)
 {
        enum ia_css_err return_err;
@@ -423,7 +422,7 @@ enum ia_css_err ia_css_bufq_enqueue_psys_event(
 
        IA_CSS_ENTER_PRIVATE("evt_id=%d", evt_id);
        q = bufq_get_qhandle(sh_css_host2sp_psys_event_queue, -1, -1);
-       if (NULL == q) {
+       if (!q) {
                IA_CSS_ERROR("queue is not initialized");
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        }
@@ -437,7 +436,7 @@ enum ia_css_err ia_css_bufq_enqueue_psys_event(
 }
 
 enum  ia_css_err ia_css_bufq_dequeue_psys_event(
-       uint8_t item[BUFQ_EVENT_SIZE])
+       u8 item[BUFQ_EVENT_SIZE])
 {
        enum ia_css_err;
        int error = 0;
@@ -446,22 +445,21 @@ enum  ia_css_err ia_css_bufq_dequeue_psys_event(
        /* No ENTER/LEAVE in this function since this is polled
         * by some test apps. Enablign logging here floods the log
         * files which may cause timeouts. */
-       if (item == NULL)
+       if (!item)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        q = bufq_get_qhandle(sh_css_sp2host_psys_event_queue, -1, -1);
-       if (NULL == q) {
+       if (!q) {
                IA_CSS_ERROR("queue is not initialized");
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        }
        error = ia_css_eventq_recv(q, item);
 
        return ia_css_convert_errno(error);
-
 }
 
 enum  ia_css_err ia_css_bufq_dequeue_isys_event(
-       uint8_t item[BUFQ_EVENT_SIZE])
+       u8 item[BUFQ_EVENT_SIZE])
 {
 #if !defined(HAS_NO_INPUT_SYSTEM)
        enum ia_css_err;
@@ -471,11 +469,11 @@ enum  ia_css_err ia_css_bufq_dequeue_isys_event(
        /* No ENTER/LEAVE in this function since this is polled
         * by some test apps. Enablign logging here floods the log
         * files which may cause timeouts. */
-       if (item == NULL)
+       if (!item)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        q = bufq_get_qhandle(sh_css_sp2host_isys_event_queue, -1, -1);
-       if (q == NULL) {
+       if (!q) {
                IA_CSS_ERROR("queue is not initialized");
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        }
@@ -496,7 +494,7 @@ enum ia_css_err ia_css_bufq_enqueue_isys_event(uint8_t evt_id)
 
        IA_CSS_ENTER_PRIVATE("event_id=%d", evt_id);
        q = bufq_get_qhandle(sh_css_host2sp_isys_event_queue, -1, -1);
-       if (q == NULL) {
+       if (!q) {
                IA_CSS_ERROR("queue is not initialized");
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        }
@@ -521,7 +519,7 @@ enum ia_css_err ia_css_bufq_enqueue_tag_cmd(
 
        IA_CSS_ENTER_PRIVATE("item=%d", item);
        q = bufq_get_qhandle(sh_css_host2sp_tag_cmd_queue, -1, -1);
-       if (NULL == q) {
+       if (!q) {
                IA_CSS_ERROR("queue is not initialized");
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        }
@@ -543,13 +541,13 @@ enum ia_css_err ia_css_bufq_deinit(void)
 
 static void bufq_dump_queue_info(const char *prefix, ia_css_queue_t *qhandle)
 {
-       uint32_t free = 0, used = 0;
-       assert(prefix != NULL && qhandle != NULL);
+       u32 free = 0, used = 0;
+
+       assert(prefix && 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);
-
 }
 
 void ia_css_bufq_dump_queue_info(void)
index 4b28b2a0863a70528c321a1b11874e203d84786c..a330575bb1522c6aae30fa12714b687e9fe4e4bb 100644 (file)
@@ -138,7 +138,7 @@ ia_css_debug_vdtrace(unsigned int level, const char *fmt, va_list args)
 }
 
 __printf(2, 3)
-extern void ia_css_debug_dtrace(unsigned int level, const char *fmt, ...);
+void ia_css_debug_dtrace(unsigned int level, const char *fmt, ...);
 
 /*! @brief Dump sp thread's stack contents
  * SP thread's stack contents are set to 0xcafecafe. This function dumps the
@@ -371,7 +371,6 @@ void ia_css_debug_dump_pipe_extra_config(
 void ia_css_debug_dump_pipe_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.
  * @param[in]  config  pointer to struct ia_css_stream_config
index 72ac0e32ebf7485c12f593538da9e9763c0e7fce..fcb923d9c4c6c725a6b649c92d58d77644b1c763 100644 (file)
@@ -42,14 +42,14 @@ more details.
  *
  * @return     None
  */
-extern void ia_css_debug_pipe_graph_dump_prologue(void);
+void ia_css_debug_pipe_graph_dump_prologue(void);
 
 /**
  * @brief Internal debug support for constructing a pipe graph.
  *
  * @return     None
  */
-extern void ia_css_debug_pipe_graph_dump_epilogue(void);
+void ia_css_debug_pipe_graph_dump_epilogue(void);
 
 /**
  * @brief Internal debug support for constructing a pipe graph.
@@ -58,7 +58,7 @@ extern void ia_css_debug_pipe_graph_dump_epilogue(void);
  *
  * @return     None
  */
-extern void ia_css_debug_pipe_graph_dump_stage(
+void ia_css_debug_pipe_graph_dump_stage(
                struct ia_css_pipeline_stage *stage,
                enum ia_css_pipe_id id);
 
@@ -68,17 +68,16 @@ extern void ia_css_debug_pipe_graph_dump_stage(
  *
  * @return     None
  */
-extern void ia_css_debug_pipe_graph_dump_sp_raw_copy(
+void ia_css_debug_pipe_graph_dump_sp_raw_copy(
                struct ia_css_frame *out_frame);
 
-
 /**
  * @brief Internal debug support for constructing a pipe graph.
  * @param[in]  stream_config   info about sensor and input formatter.
  *
  * @return     None
  */
-extern void ia_css_debug_pipe_graph_dump_stream_config(
+void ia_css_debug_pipe_graph_dump_stream_config(
                const struct ia_css_stream_config *stream_config);
 
 #endif /* _IA_CSS_DEBUG_PIPE_H_ */
index 66556a4e574ee09f0f6c7aa263e10ab4c038ba7b..05969686b8c241a7628d22367a03962f84df6c98 100644 (file)
@@ -116,13 +116,13 @@ unsigned int ia_css_debug_trace_level = IA_CSS_DEBUG_WARNING;
 #define ENABLE_LINE_MAX_LENGTH (25)
 
 #ifdef ISP2401
-#define DBG_EXT_CMD_TRACE_PNTS_DUMP (1 << 8)
-#define DBG_EXT_CMD_PUB_CFG_DUMP (1 << 9)
-#define DBG_EXT_CMD_GAC_REG_DUMP (1 << 10)
-#define DBG_EXT_CMD_GAC_ACB_REG_DUMP (1 << 11)
-#define DBG_EXT_CMD_FIFO_DUMP (1 << 12)
-#define DBG_EXT_CMD_QUEUE_DUMP (1 << 13)
-#define DBG_EXT_CMD_DMA_DUMP (1 << 14)
+#define DBG_EXT_CMD_TRACE_PNTS_DUMP BIT(8)
+#define DBG_EXT_CMD_PUB_CFG_DUMP BIT(9)
+#define DBG_EXT_CMD_GAC_REG_DUMP BIT(10)
+#define DBG_EXT_CMD_GAC_ACB_REG_DUMP BIT(11)
+#define DBG_EXT_CMD_FIFO_DUMP BIT(12)
+#define DBG_EXT_CMD_QUEUE_DUMP BIT(13)
+#define DBG_EXT_CMD_DMA_DUMP BIT(14)
 #define DBG_EXT_CMD_MASK 0xAB0000CD
 
 #endif
@@ -161,7 +161,7 @@ static const char * const pipe_id_to_str[] = {
        /* [IA_CSS_PIPE_ID_ACC]       =*/ "accelerator"
 };
 
-static char dot_id_input_bin[SH_CSS_MAX_BINARY_NAME+10];
+static char dot_id_input_bin[SH_CSS_MAX_BINARY_NAME + 10];
 static char ring_buffer[200];
 
 void ia_css_debug_dtrace(unsigned int level, const char *fmt, ...)
@@ -176,18 +176,18 @@ 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 stack_size)
+       unsigned int stack_size)
 {
        unsigned int i;
-       uint32_t val;
-       uint32_t addr = (uint32_t) stack_sp_addr;
-       uint32_t stack_size_words = CEIL_DIV(stack_size, sizeof(uint32_t));
+       u32 val;
+       u32 addr = (uint32_t)stack_sp_addr;
+       u32 stack_size_words = CEIL_DIV(stack_size, sizeof(uint32_t));
 
        /* When size is not multiple of four, last word is only relevant for
         * remaining bytes */
        for (i = 0; i < stack_size_words; i++) {
                val = sp_dmem_load_uint32(sp_id, (hrt_address)addr);
-               if ((i%8) == 0)
+               if ((i % 8) == 0)
                        ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "\n");
 
                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "0x%08x ", val);
@@ -203,8 +203,8 @@ static void debug_dump_sp_stack_info(
        const struct ia_css_fw_info *fw;
        unsigned int HIVE_ADDR_sp_threads_stack;
        unsigned int HIVE_ADDR_sp_threads_stack_size;
-       uint32_t stack_sizes[MAX_THREAD_NUM];
-       uint32_t stack_sp_addr[MAX_THREAD_NUM];
+       u32 stack_sizes[MAX_THREAD_NUM];
+       u32 stack_sp_addr[MAX_THREAD_NUM];
        unsigned int i;
 
        fw = &sh_css_sp_fw;
@@ -222,8 +222,8 @@ static void debug_dump_sp_stack_info(
                fw->info.sp.threads_stack_size == 0)
                return;
 
-       (void) HIVE_ADDR_sp_threads_stack;
-       (void) HIVE_ADDR_sp_threads_stack_size;
+       (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),
@@ -246,7 +246,6 @@ void ia_css_debug_dump_sp_stack_info(void)
        debug_dump_sp_stack_info(SP0_ID);
 }
 
-
 void ia_css_debug_set_dtrace_level(const unsigned int trace_level)
 {
        ia_css_debug_trace_level = trace_level;
@@ -349,7 +348,6 @@ 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)
 {
        switch (frame_format) {
-
        case IA_CSS_FRAME_FORMAT_NV11:
                return "NV11";
        case IA_CSS_FRAME_FORMAT_NV12:
@@ -415,8 +413,8 @@ static const char *debug_frame_format2str(const enum ia_css_frame_format frame_f
 
 static void debug_print_sp_state(const sp_state_t *state, const char *cell)
 {
-       assert(cell != NULL);
-       assert(state != NULL);
+       assert(cell);
+       assert(state);
 
        ia_css_debug_dtrace(2, "%s state:\n", cell);
        ia_css_debug_dtrace(2, "\t%-32s: 0x%X\n", "PC", state->pc);
@@ -433,8 +431,8 @@ static void debug_print_sp_state(const sp_state_t *state, const char *cell)
 
 static void debug_print_isp_state(const isp_state_t *state, const char *cell)
 {
-       assert(state != NULL);
-       assert(cell != NULL);
+       assert(state);
+       assert(cell);
 
        ia_css_debug_dtrace(2, "%s state:\n", cell);
        ia_css_debug_dtrace(2, "\t%-32s: 0x%X\n", "PC", state->pc);
@@ -509,6 +507,7 @@ void ia_css_debug_dump_sp_state(void)
 {
        sp_state_t state;
        sp_stall_t stall;
+
        sp_get_state(SP0_ID, &state, &stall);
        debug_print_sp_state(&state, "SP");
        if (state.is_stalling) {
@@ -562,8 +561,8 @@ void ia_css_debug_dump_sp_state(void)
 static void debug_print_fifo_channel_state(const fifo_channel_state_t *state,
                                           const char *descr)
 {
-       assert(state != NULL);
-       assert(descr != NULL);
+       assert(state);
+       assert(descr);
 
        ia_css_debug_dtrace(2, "FIFO channel: %s\n", descr);
        ia_css_debug_dtrace(2, "\t%-32s: %d\n", "source valid",
@@ -581,6 +580,7 @@ static void debug_print_fifo_channel_state(const fifo_channel_state_t *state,
 void ia_css_debug_dump_pif_a_isp_fifo_state(void)
 {
        fifo_channel_state_t pif_to_isp, isp_to_pif;
+
        fifo_channel_get_state(FIFO_MONITOR0_ID,
                               FIFO_CHANNEL_IF0_TO_ISP0, &pif_to_isp);
        fifo_channel_get_state(FIFO_MONITOR0_ID,
@@ -592,6 +592,7 @@ void ia_css_debug_dump_pif_a_isp_fifo_state(void)
 void ia_css_debug_dump_pif_b_isp_fifo_state(void)
 {
        fifo_channel_state_t pif_to_isp, isp_to_pif;
+
        fifo_channel_get_state(FIFO_MONITOR0_ID,
                               FIFO_CHANNEL_IF1_TO_ISP0, &pif_to_isp);
        fifo_channel_get_state(FIFO_MONITOR0_ID,
@@ -603,6 +604,7 @@ void ia_css_debug_dump_pif_b_isp_fifo_state(void)
 void ia_css_debug_dump_str2mem_sp_fifo_state(void)
 {
        fifo_channel_state_t s2m_to_sp, sp_to_s2m;
+
        fifo_channel_get_state(FIFO_MONITOR0_ID,
                               FIFO_CHANNEL_STREAM2MEM0_TO_SP0, &s2m_to_sp);
        fifo_channel_get_state(FIFO_MONITOR0_ID,
@@ -644,7 +646,7 @@ static void debug_print_if_state(input_formatter_state_t *state, const char *id)
        int st_allow_fifo_overflow = state->allow_fifo_overflow;
        int st_block_fifo_when_no_req = state->block_fifo_when_no_req;
 
-       assert(state != NULL);
+       assert(state);
        ia_css_debug_dtrace(2, "InputFormatter State (%s):\n", id);
 
        ia_css_debug_dtrace(2, "\tConfiguration:\n");
@@ -1137,7 +1139,8 @@ void ia_css_debug_dump_dma_state(void)
                            state.write_width);
 
        for (i = 0; i < HIVE_ISP_NUM_DMA_CONNS; i++) {
-               dma_port_state_t *port = &(state.port_states[i]);
+               dma_port_state_t *port = &state.port_states[i];
+
                ia_css_debug_dtrace(2, "\tDMA device interface %d\n", i);
                ia_css_debug_dtrace(2, "\t\tDMA internal side state\n");
                ia_css_debug_dtrace(2,
@@ -1164,7 +1167,8 @@ void ia_css_debug_dump_dma_state(void)
        }
 
        for (i = 0; i < HIVE_DMA_NUM_CHANNELS; i++) {
-               dma_channel_state_t *ch = &(state.channel_states[i]);
+               dma_channel_state_t *ch = &state.channel_states[i];
+
                ia_css_debug_dtrace(2, "\t%-32s: %d\n", "DMA channel register",
                                    i);
                ia_css_debug_dtrace(2, "\t\t%-32s: %d\n", "Connection",
@@ -1196,6 +1200,7 @@ void ia_css_debug_dump_dma_state(void)
 void ia_css_debug_dump_dma_sp_fifo_state(void)
 {
        fifo_channel_state_t dma_to_sp, sp_to_dma;
+
        fifo_channel_get_state(FIFO_MONITOR0_ID,
                               FIFO_CHANNEL_DMA0_TO_SP0, &dma_to_sp);
        fifo_channel_get_state(FIFO_MONITOR0_ID,
@@ -1208,6 +1213,7 @@ void ia_css_debug_dump_dma_sp_fifo_state(void)
 void ia_css_debug_dump_dma_isp_fifo_state(void)
 {
        fifo_channel_state_t dma_to_isp, isp_to_dma;
+
        fifo_channel_get_state(FIFO_MONITOR0_ID,
                               FIFO_CHANNEL_DMA0_TO_ISP0, &dma_to_isp);
        fifo_channel_get_state(FIFO_MONITOR0_ID,
@@ -1220,6 +1226,7 @@ void ia_css_debug_dump_dma_isp_fifo_state(void)
 void ia_css_debug_dump_isp_sp_fifo_state(void)
 {
        fifo_channel_state_t sp_to_isp, isp_to_sp;
+
        fifo_channel_get_state(FIFO_MONITOR0_ID,
                               FIFO_CHANNEL_SP0_TO_ISP0, &sp_to_isp);
        fifo_channel_get_state(FIFO_MONITOR0_ID,
@@ -1246,17 +1253,18 @@ void ia_css_debug_dump_all_fifo_state(void)
 {
        int i;
        fifo_monitor_state_t state;
+
        fifo_monitor_get_state(FIFO_MONITOR0_ID, &state);
 
        for (i = 0; i < N_FIFO_CHANNEL; i++)
-               debug_print_fifo_channel_state(&(state.fifo_channels[i]),
+               debug_print_fifo_channel_state(&state.fifo_channels[i],
                                               "squepfstqkt");
        return;
 }
 
 static void debug_binary_info_print(const struct ia_css_binary_xinfo *info)
 {
-       assert(info != NULL);
+       assert(info);
        ia_css_debug_dtrace(2, "id = %d\n", info->sp.id);
        ia_css_debug_dtrace(2, "mode = %d\n", info->sp.pipeline.mode);
        ia_css_debug_dtrace(2, "max_input_width = %d\n", info->sp.input.max_width);
@@ -1279,6 +1287,7 @@ static void debug_binary_info_print(const struct ia_css_binary_xinfo *info)
 void ia_css_debug_binary_print(const struct ia_css_binary *bi)
 {
        unsigned int i;
+
        debug_binary_info_print(bi->info);
        ia_css_debug_dtrace(2,
                            "input:  %dx%d, format = %d, padded width = %d\n",
@@ -1335,8 +1344,8 @@ void ia_css_debug_frame_print(const struct ia_css_frame *frame,
 {
        char *data = NULL;
 
-       assert(frame != NULL);
-       assert(descr != NULL);
+       assert(frame);
+       assert(descr);
 
        data = (char *)HOST_ADDRESS(frame->data);
        ia_css_debug_dtrace(2, "frame %s (%p):\n", descr, frame);
@@ -1422,12 +1431,11 @@ void ia_css_debug_frame_print(const struct ia_css_frame *frame,
 void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
                                       *state)
 {
-
 #endif
 
 #if SP_DEBUG == SP_DEBUG_DUMP
 
-       assert(state != NULL);
+       assert(state);
        ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
                            "current SP software counter: %d\n",
                            state->debug[0]);
@@ -1570,7 +1578,7 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
        int sp_index = state->index;
        int n;
 
-       assert(state != NULL);
+       assert(state);
        if (sp_index < last_index) {
                /* SP has been reset */
                last_index = 0;
@@ -1578,10 +1586,7 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
 
        if (last_index == 0) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-                                   "copy-trace init: sp_dbg_if_start_line=%d, "
-                                   "sp_dbg_if_start_column=%d, "
-                                   "sp_dbg_if_cropped_height=%d, "
-                                   "sp_debg_if_cropped_width=%d\n",
+                                   "copy-trace init: sp_dbg_if_start_line=%d, sp_dbg_if_start_column=%d, sp_dbg_if_cropped_height=%d, sp_debg_if_cropped_width=%d\n",
                                    state->if_start_line,
                                    state->if_start_column,
                                    state->if_cropped_height,
@@ -1596,12 +1601,10 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
 
        for (n = last_index; n < sp_index; n++) {
                int i = n % SH_CSS_SP_DBG_TRACE_DEPTH;
+
                if (state->trace[i].frame != 0) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-                                           "copy-trace: frame=%d, line=%d, "
-                                           "pixel_distance=%d, "
-                                           "mipi_used_dword=%d, "
-                                           "sp_index=%d\n",
+                                           "copy-trace: frame=%d, line=%d, pixel_distance=%d, mipi_used_dword=%d, sp_index=%d\n",
                                            state->trace[i].frame,
                                            state->trace[i].line,
                                            state->trace[i].pixel_distance,
@@ -1649,7 +1652,7 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
        static int host_index_last[SH_CSS_SP_DBG_NR_OF_TRACES] = { 0 };
        int t, n;
 
-       assert(state != NULL);
+       assert(state);
 
        for (t = 0; t < SH_CSS_SP_DBG_NR_OF_TRACES; t++) {
                int sp_index_last = state->index_last[t];
@@ -1664,8 +1667,7 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
                        /* last index can be multiple rounds behind */
                        /* while trace size is only SH_CSS_SP_DBG_TRACE_DEPTH */
                        ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-                                           "Warning: trace %s has gap of %d "
-                                           "traces\n",
+                                           "Warning: trace %s has gap of %d traces\n",
                                            trace_name[t],
                                            (sp_index_last -
                                             (host_index_last[t] +
@@ -1685,8 +1687,7 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
 
                        if (ts) {
                                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-                                                   "%05d trace=%s, file=%s:%d, "
-                                                   "data=0x%08x\n",
+                                                   "%05d trace=%s, file=%s:%d, data=0x%08x\n",
                                                    ts,
                                                    trace_name[t],
                                                    id2filename[fid], l,
@@ -1702,7 +1703,7 @@ void ia_css_debug_print_sp_debug_state(const struct sh_css_sp_debug_state
        int limit = SH_CSS_NUM_SP_DEBUG;
        int step = 1;
 
-       assert(state != NULL);
+       assert(state);
 
        for (i = base; i < limit; i += step) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
@@ -1723,7 +1724,7 @@ static void debug_print_rx_mipi_port_state(mipi_port_state_t *state)
        int i;
        unsigned int bits, infos;
 
-       assert(state != NULL);
+       assert(state);
 
        bits = state->irq_status;
        infos = ia_css_isys_rx_translate_irq_infos(bits);
@@ -1797,7 +1798,7 @@ static void debug_print_rx_channel_state(rx_channel_state_t *state)
 {
        int i;
 
-       assert(state != NULL);
+       assert(state);
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "compression_scheme0", state->comp_scheme0);
 
@@ -1821,7 +1822,7 @@ static void debug_print_rx_state(receiver_state_t *state)
 {
        int i;
 
-       assert(state != NULL);
+       assert(state);
        ia_css_debug_dtrace(2, "CSI Receiver State:\n");
 
        ia_css_debug_dtrace(2, "\tConfiguration:\n");
@@ -1942,7 +1943,7 @@ void ia_css_debug_dump_sp_sw_debug_info(void)
 #if defined(USE_INPUT_SYSTEM_VERSION_2)
 static void debug_print_isys_capture_unit_state(capture_unit_state_t *state)
 {
-       assert(state != NULL);
+       assert(state);
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "Packet_Length", state->Packet_Length);
 
@@ -1989,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)
 {
-       assert(state != NULL);
+       assert(state);
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
                            "Received_Short_Packets",
@@ -2029,7 +2030,7 @@ static void debug_print_isys_acquisition_unit_state(
 
 static void debug_print_isys_ctrl_unit_state(ctrl_unit_state_t *state)
 {
-       assert(state != NULL);
+       assert(state);
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n", "last_cmd", state->last_cmd);
 
        ia_css_debug_dtrace(2, "\t\t%-32s: %d\n", "next_cmd", state->next_cmd);
@@ -2106,7 +2107,7 @@ static void debug_print_isys_state(input_system_state_t *state)
 {
        int i;
 
-       assert(state != NULL);
+       assert(state);
        ia_css_debug_dtrace(2, "InputSystem State:\n");
 
        /* configuration */
@@ -2204,7 +2205,7 @@ void ia_css_debug_dump_isys_state(void)
 
 void ia_css_debug_dump_debug_info(const char *context)
 {
-       if (context == NULL)
+       if (!context)
                context = "No Context provided";
 
        ia_css_debug_dtrace(2, "CSS Debug Info dump [Context = %s]\n", context);
@@ -2233,6 +2234,7 @@ void ia_css_debug_dump_debug_info(const char *context)
 
        {
                irq_controller_state_t state;
+
                irq_controller_get_state(IRQ2_ID, &state);
 
                ia_css_debug_dtrace(2, "\t%-32s:\n",
@@ -2281,7 +2283,7 @@ void ia_css_debug_enable_sp_sleep_mode(enum ia_css_sp_sleep_mode mode)
 
        sp_dmem_store_uint32(SP0_ID,
                             (unsigned int)sp_address_of(sp_sleep_mode),
-                            (uint32_t) mode);
+                            (uint32_t)mode);
 }
 
 void ia_css_debug_wake_up_sp(void)
@@ -2302,10 +2304,12 @@ static char *
 findf_dmem_params(struct ia_css_stream *stream, short idx)
 {
        int i;
+
        for (i = 0; i < stream->num_pipes; i++) {
                struct ia_css_pipe *pipe = stream->pipes[i];
                struct ia_css_pipeline *pipeline = ia_css_pipe_get_pipeline(pipe);
                struct ia_css_pipeline_stage *stage;
+
                for (stage = pipeline->stages; stage; stage = stage->next) {
                        struct ia_css_binary *binary = stage->binary;
                        short *offsets = (short *)&binary->info->mem_offsets.offsets.param->dmem;
@@ -2331,7 +2335,7 @@ void ia_css_debug_dump_isp_params(struct ia_css_stream *stream,
        (void)stream;
 #else
 
-       assert(stream != NULL);
+       assert(stream);
        if ((enable & IA_CSS_DEBUG_DUMP_FPN)
            || (enable & IA_CSS_DEBUG_DUMP_ALL)) {
                ia_css_fpn_dump(FIND_DMEM_PARAMS(stream, fpn), IA_CSS_DEBUG_VERBOSE);
@@ -2398,8 +2402,8 @@ void sh_css_dump_sp_raw_copy_linecount(bool reduced)
 {
        const struct ia_css_fw_info *fw;
        unsigned int HIVE_ADDR_raw_copy_line_count;
-       int32_t raw_copy_line_count;
-       static int32_t prev_raw_copy_line_count = -1;
+       s32 raw_copy_line_count;
+       static s32 prev_raw_copy_line_count = -1;
 
        fw = &sh_css_sp_fw;
        HIVE_ADDR_raw_copy_line_count =
@@ -2414,12 +2418,11 @@ void sh_css_dump_sp_raw_copy_linecount(bool reduced)
 
        /* only indicate if copy loop is active */
        if (reduced)
-               raw_copy_line_count = (raw_copy_line_count < 0)?raw_copy_line_count:1;
+               raw_copy_line_count = (raw_copy_line_count < 0) ? raw_copy_line_count : 1;
        /* 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",
+                       "sh_css_dump_sp_raw_copy_linecount() line_count=%d\n",
                        raw_copy_line_count);
                prev_raw_copy_line_count = raw_copy_line_count;
        }
@@ -2429,9 +2432,9 @@ void ia_css_debug_dump_isp_binary(void)
 {
        const struct ia_css_fw_info *fw;
        unsigned int HIVE_ADDR_pipeline_sp_curr_binary_id;
-       uint32_t curr_binary_id;
-       static uint32_t prev_binary_id = 0xFFFFFFFF;
-       static uint32_t sample_count;
+       u32 curr_binary_id;
+       static u32 prev_binary_id = 0xFFFFFFFF;
+       static u32 sample_count;
 
        fw = &sh_css_sp_fw;
        HIVE_ADDR_pipeline_sp_curr_binary_id = fw->info.sp.curr_binary_id;
@@ -2447,8 +2450,7 @@ void ia_css_debug_dump_isp_binary(void)
        sample_count++;
        if (prev_binary_id != curr_binary_id) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
-                                   "sh_css_dump_isp_binary() "
-                                   "pipe_id=%d, binary_id=%d, sample_count=%d\n",
+                                   "sh_css_dump_isp_binary() pipe_id=%d, binary_id=%d, sample_count=%d\n",
                                    (curr_binary_id >> 16),
                                    (curr_binary_id & 0x0ffff),
                                    sample_count);
@@ -2463,7 +2465,7 @@ 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;
-       int32_t 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");
 
@@ -2530,6 +2532,7 @@ void ia_css_debug_dump_ddr_debug_queue(void)
 bool ia_css_debug_mode_init(void)
 {
        bool rc;
+
        rc = sh_css_sp_init_dma_sw_reg(0);
        return rc;
 }
@@ -2569,7 +2572,7 @@ void dtrace_dot(const char *fmt, ...)
 {
        va_list ap;
 
-       assert(fmt != NULL);
+       assert(fmt);
        va_start(ap, fmt);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_INFO, "%s", DPG_START);
@@ -2577,13 +2580,15 @@ void dtrace_dot(const char *fmt, ...)
        ia_css_debug_dtrace(IA_CSS_DEBUG_INFO, "%s", DPG_END);
        va_end(ap);
 }
+
 #ifdef HAS_WATCHDOG_SP_THREAD_DEBUG
 void sh_css_dump_thread_wait_info(void)
 {
        const struct ia_css_fw_info *fw;
        int i;
        unsigned int HIVE_ADDR_sp_thread_wait;
-       int32_t sp_thread_wait[MAX_THREAD_NUM];
+       s32 sp_thread_wait[MAX_THREAD_NUM];
+
        ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "SEM WAITS:\n");
 
        fw = &sh_css_sp_fw;
@@ -2601,7 +2606,6 @@ void sh_css_dump_thread_wait_info(void)
                        "\twait[%d] = 0x%X\n",
                        i, sp_thread_wait[i]);
        }
-
 }
 
 void sh_css_dump_pipe_stage_info(void)
@@ -2609,7 +2613,8 @@ void sh_css_dump_pipe_stage_info(void)
        const struct ia_css_fw_info *fw;
        int i;
        unsigned int HIVE_ADDR_sp_pipe_stage;
-       int32_t sp_pipe_stage[MAX_THREAD_NUM];
+       s32 sp_pipe_stage[MAX_THREAD_NUM];
+
        ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "PIPE STAGE:\n");
 
        fw = &sh_css_sp_fw;
@@ -2627,7 +2632,6 @@ void sh_css_dump_pipe_stage_info(void)
                        "\tstage[%d] = %d\n",
                        i, sp_pipe_stage[i]);
        }
-
 }
 
 void sh_css_dump_pipe_stripe_info(void)
@@ -2635,7 +2639,8 @@ void sh_css_dump_pipe_stripe_info(void)
        const struct ia_css_fw_info *fw;
        int i;
        unsigned int HIVE_ADDR_sp_pipe_stripe;
-       int32_t sp_pipe_stripe[MAX_THREAD_NUM];
+       s32 sp_pipe_stripe[MAX_THREAD_NUM];
+
        ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "PIPE STRIPE:\n");
 
        fw = &sh_css_sp_fw;
@@ -2653,7 +2658,6 @@ void sh_css_dump_pipe_stripe_info(void)
                        "\tstripe[%d] = %d\n",
                        i, sp_pipe_stripe[i]);
        }
-
 }
 #endif
 
@@ -2675,9 +2679,7 @@ ia_css_debug_pipe_graph_dump_frame(
                        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\"];",
+               "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,
@@ -2688,14 +2690,12 @@ ia_css_debug_pipe_graph_dump_frame(
 
        if (in_frame) {
                dtrace_dot(
-                       "\"%p\"->\"%s(pipe%d)\" "
-                       "[label = %s_frame];",
+                       "\"%p\"->\"%s(pipe%d)\" [label = %s_frame];",
                        frame,
                        blob_name, id, frame_name);
        } else {
                dtrace_dot(
-                       "\"%s(pipe%d)\"->\"%p\" "
-                       "[label = %s_frame];",
+                       "\"%s(pipe%d)\"->\"%p\" [label = %s_frame];",
                        blob_name, id,
                        frame,
                        frame_name);
@@ -2709,48 +2709,33 @@ ia_css_debug_pipe_graph_dump_prologue(void)
        dtrace_dot("rankdir=LR;");
 
        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\"");
+       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\"");
 }
 
 void ia_css_debug_pipe_graph_dump_epilogue(void)
 {
-
        if (strlen(ring_buffer) > 0) {
                dtrace_dot(ring_buffer);
        }
 
-
        if (pg_inst.stream_format != N_ATOMISP_INPUT_FORMAT) {
                /* An input stream format has been set so assume we have
                 * an input system and sensor
                 */
 
-
                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\"];",
+                       "\"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)\"];",
+                       "\"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);
@@ -2775,11 +2760,11 @@ ia_css_debug_pipe_graph_dump_stage(
        struct ia_css_pipeline_stage *stage,
        enum ia_css_pipe_id id)
 {
-       char blob_name[SH_CSS_MAX_BINARY_NAME+10] = "<unknown type>";
+       char blob_name[SH_CSS_MAX_BINARY_NAME + 10] = "<unknown type>";
        char const *bin_type = "<unknown type>";
        int i;
 
-       assert(stage != NULL);
+       assert(stage);
        if (stage->sp_func != IA_CSS_PIPELINE_NO_FUNC)
                return;
 
@@ -2799,7 +2784,7 @@ ia_css_debug_pipe_graph_dump_stage(
        }
 
        /* Guard in case of binaries that don't have any binary_info */
-       if (stage->binary_info != NULL) {
+       if (stage->binary_info) {
                char enable_info1[100];
                char enable_info2[100];
                char enable_info3[100];
@@ -2852,7 +2837,7 @@ ia_css_debug_pipe_graph_dump_stage(
                        l = strlen(ei);
 
                        /* Replace last ',' with \0 if present */
-                       if (l && enable_info[l-1] == ',')
+                       if (l && enable_info[l - 1] == ',')
                                enable_info[--l] = '\0';
 
                        if (l > ENABLE_LINE_MAX_LENGTH) {
@@ -2866,7 +2851,7 @@ ia_css_debug_pipe_graph_dump_stage(
                                        ei, p);
                                enable_info1[p] = '\0';
 
-                               ei += p+1;
+                               ei += p + 1;
                                l = strlen(ei);
 
                                if (l <= ENABLE_LINE_MAX_LENGTH) {
@@ -2890,7 +2875,7 @@ ia_css_debug_pipe_graph_dump_stage(
                                                sizeof(enable_info2),
                                                ei, p);
                                        enable_info2[p] = '\0';
-                                       ei += p+1;
+                                       ei += p + 1;
                                        l = strlen(ei);
 
                                        if (l <= ENABLE_LINE_MAX_LENGTH) {
@@ -2914,7 +2899,7 @@ ia_css_debug_pipe_graph_dump_stage(
                                                        sizeof(enable_info3),
                                                        ei, p);
                                                enable_info3[p] = '\0';
-                                               ei += p+1;
+                                               ei += p + 1;
                                                strcpy_s(enable_info3,
                                                        sizeof(enable_info3), ei);
                                                snprintf(enable_info, sizeof(enable_info),
@@ -2926,14 +2911,10 @@ ia_css_debug_pipe_graph_dump_stage(
                        }
                }
 
-               dtrace_dot("node [shape = circle, fixedsize=true, width=2.5, "
-                       "label=\"%s\\n%s\\n\\n%s\"]; \"%s(pipe%d)\"",
+               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);
-
-       }
-       else {
-               dtrace_dot("node [shape = circle, fixedsize=true, width=2.5, "
-                       "label=\"%s\\n%s\\n\"]; \"%s(pipe%d)\"",
+       } 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);
        }
 
@@ -2996,20 +2977,17 @@ void
 ia_css_debug_pipe_graph_dump_sp_raw_copy(
        struct ia_css_frame *out_frame)
 {
-       assert(out_frame != NULL);
+       assert(out_frame);
        if (pg_inst.do_init) {
                ia_css_debug_pipe_graph_dump_prologue();
                pg_inst.do_init = false;
        }
 
-       dtrace_dot("node [shape = circle, fixedsize=true, width=2.5, "
-               "label=\"%s\\n%s\"]; \"%s(pipe%d)\"",
+       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);
 
        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\"];",
+               "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,
@@ -3019,8 +2997,7 @@ ia_css_debug_pipe_graph_dump_sp_raw_copy(
        dtrace_dot(ring_buffer);
 
        dtrace_dot(
-               "\"%s(pipe%d)\"->\"%p\" "
-               "[label = 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);
@@ -3304,21 +3281,21 @@ static void debug_dump_one_trace(enum TRACE_CORE_ID proc_id)
 #endif
 {
 #if defined(HAS_TRACER_V2)
-       uint32_t start_addr;
-       uint32_t start_addr_data;
-       uint32_t item_size;
+       u32 start_addr;
+       u32 start_addr_data;
+       u32 item_size;
 #ifndef ISP2401
-       uint32_t tmp;
+       u32 tmp;
 #else
-       uint8_t tid_val;
+       u8 tid_val;
        enum TRACE_DUMP_FORMAT dump_format;
 #endif
        int i, j, max_trace_points, point_num, limit = -1;
        /* using a static buffer here as the driver has issues allocating memory */
-       static uint32_t trace_read_buf[TRACE_BUFF_SIZE] = {0};
+       static u32 trace_read_buf[TRACE_BUFF_SIZE] = {0};
 #ifdef ISP2401
        static struct trace_header_t header;
-       uint8_t *header_arr;
+       u8 *header_arr;
 #endif
 
        /* read the header and parse it */
@@ -3402,8 +3379,8 @@ 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
@@ -3571,7 +3548,6 @@ void ia_css_debug_tagger_state(void)
                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);
        }
-
 }
 #endif /* defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401) */
 
@@ -3581,6 +3557,7 @@ void ia_css_debug_pc_dump(sp_ID_t id, unsigned int num_of_dumps)
        unsigned int pc;
        unsigned int i;
        hrt_data sc = sp_ctrl_load(id, SP_SC_REG);
+
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "SP%-1d Status reg: 0x%X\n", id, sc);
        sc = sp_ctrl_load(id, SP_CTRL_SINK_REG);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "SP%-1d Stall reg: 0x%X\n", id, sc);
index ab1d9bed9fd8877cef979f25b3562ae547008684..295b2960320c68232c49074f3cbfdc6807104a21 100644 (file)
@@ -35,12 +35,12 @@ more details.
 #include "sw_event_global.h"    /*event macros.TODO : Change File Name..???*/
 
 bool ia_css_event_encode(
-       uint8_t *in,
-       uint8_t nr,
+       u8      *in,
+       u8      nr,
        uint32_t        *out);
 
 void ia_css_event_decode(
-       uint32_t event,
+       u32 event,
        uint8_t *payload);
 
 #endif /*_IA_CSS_EVENT_H*/
index 239c06730bf4f27a2145ca99c9ebe59745835f82..5902d550350bdf13c8fa756c690f62d5facdda66 100644 (file)
@@ -57,15 +57,16 @@ more details.
  * Refer to "sw_event_public.h" for details.
  */
 bool ia_css_event_encode(
-       uint8_t *in,
-       uint8_t nr,
+       u8      *in,
+       u8      nr,
        uint32_t        *out)
 {
        bool ret;
-       uint32_t nr_of_bits;
-       uint32_t i;
-       assert(in != NULL);
-       assert(out != NULL);
+       u32 nr_of_bits;
+       u32 i;
+
+       assert(in);
+       assert(out);
        OP___assert(nr > 0 && nr <= MAX_NR_OF_PAYLOADS_PER_SW_EVENT);
 
        /* initialize the output */
@@ -87,7 +88,7 @@ bool ia_css_event_encode(
 }
 
 void ia_css_event_decode(
-       uint32_t event,
+       u32 event,
        uint8_t *payload)
 {
        assert(payload[1] == 0);
index 67eb8fdb33c51533792e21b5af68c44bff9cde80..62aaf0e3d7721c80db021d7a16cfb5b548a27e11 100644 (file)
@@ -62,8 +62,8 @@ int ia_css_eventq_recv(
  */
 int ia_css_eventq_send(
                ia_css_queue_t *eventq_handle,
-               uint8_t evt_id,
-               uint8_t evt_payload_0,
-               uint8_t evt_payload_1,
+               u8 evt_id,
+               u8 evt_payload_0,
+               u8 evt_payload_1,
                uint8_t evt_payload_2);
 #endif /* _IA_CSS_EVENTQ_H */
index 913a4bf7a34fc24522f762b2e52530b569e3a917..b49039b05c69a4a2a40d3291e8e400286a118ca5 100644 (file)
@@ -25,7 +25,7 @@ int ia_css_eventq_recv(
                ia_css_queue_t *eventq_handle,
                uint8_t *payload)
 {
-       uint32_t sp_event;
+       u32 sp_event;
        int error;
 
        /* dequeue the IRQ event */
@@ -43,13 +43,13 @@ int ia_css_eventq_recv(
  */
 int ia_css_eventq_send(
                        ia_css_queue_t *eventq_handle,
-                       uint8_t evt_id,
-                       uint8_t evt_payload_0,
-                       uint8_t evt_payload_1,
+                       u8 evt_id,
+                       u8 evt_payload_0,
+                       u8 evt_payload_1,
                        uint8_t evt_payload_2)
 {
-       uint8_t tmp[4];
-       uint32_t sw_event;
+       u8 tmp[4];
+       u32 sw_event;
        int error = ENOSYS;
 
        /*
@@ -65,7 +65,7 @@ int ia_css_eventq_send(
        /* queue the software event (busy-waiting) */
        for ( ; ; ) {
                error = ia_css_queue_enqueue(eventq_handle, sw_event);
-               if (ENOBUFS != error) {
+               if (error != ENOBUFS) {
                        /* We were able to successfully send the event
                           or had a real failure. return the status*/
                        break;
index a469e0afb2b5b5fc1118b53145ff9435cb5467d3..5f995efae39d1a4dd623ae7385bff18ecd68a7e4 100644 (file)
@@ -78,8 +78,8 @@ struct ia_css_frame_sp_plane6 {
 };
 
 struct ia_css_sp_resolution {
-       uint16_t width;         /* width of valid data in pixels */
-       uint16_t height;        /* Height of valid data in lines */
+       u16 width;              /* width of valid data in pixels */
+       u16 height;     /* Height of valid data in lines */
 };
 
 /*
@@ -87,7 +87,7 @@ struct ia_css_sp_resolution {
  */
 struct ia_css_frame_sp_info {
        struct ia_css_sp_resolution res;
-       uint16_t padded_width;          /* stride of line in memory
+       u16 padded_width;               /* stride of line in memory
                                        (in pixels) */
        unsigned char format;           /* format of the frame data */
        unsigned char raw_bit_depth;    /* number of valid bits per pixel,
@@ -129,4 +129,3 @@ void ia_css_resolution_to_sp_resolution(
        const struct ia_css_resolution *info);
 
 #endif /*__IA_CSS_FRAME_COMM_H__*/
-
index 5a7df5ab4e3e3efa26f72d221e3917efe2b664e6..05740a3a54099b992cc5112ca77e83d923a6bf61 100644 (file)
@@ -36,7 +36,6 @@ more details.
 #include "sh_css_internal.h"
 #include "memory_access.h"
 
-
 #define NV12_TILEY_TILE_WIDTH  128
 #define NV12_TILEY_TILE_HEIGHT  32
 
@@ -112,7 +111,7 @@ ia_css_elems_bytes_from_info(
 
 void ia_css_frame_zero(struct ia_css_frame *frame)
 {
-       assert(frame != NULL);
+       assert(frame);
        mmgr_clear(frame->data, frame->data_bytes);
 }
 
@@ -120,7 +119,8 @@ enum ia_css_err ia_css_frame_allocate_from_info(struct ia_css_frame **frame,
        const struct ia_css_frame_info *info)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
-       if (frame == NULL || info == NULL)
+
+       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");
@@ -142,7 +142,7 @@ enum ia_css_err ia_css_frame_allocate(struct ia_css_frame **frame,
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       if (frame == NULL || width == 0 || height == 0)
+       if (!frame || width == 0 || height == 0)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
@@ -161,7 +161,7 @@ enum ia_css_err ia_css_frame_allocate(struct ia_css_frame **frame,
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                      "ia_css_frame_allocate() leave: frame=%p\n", *frame);
 #else
-       if ((*frame != NULL) && err == IA_CSS_SUCCESS)
+       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);
        else
@@ -176,12 +176,13 @@ enum ia_css_err ia_css_frame_allocate(struct ia_css_frame **frame,
 enum ia_css_err ia_css_frame_map(struct ia_css_frame **frame,
        const struct ia_css_frame_info *info,
        const void __user *data,
-       uint16_t attribute,
+       u16 attribute,
        void *context)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_frame *me;
-       assert(frame != NULL);
+
+       assert(frame);
 
        /* Create the frame structure */
        err = ia_css_frame_create_from_info(&me, info);
@@ -217,12 +218,12 @@ enum ia_css_err ia_css_frame_create_from_info(struct ia_css_frame **frame,
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_frame *me;
+
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                "ia_css_frame_create_from_info() enter:\n");
-       if (frame == NULL || info == NULL) {
+       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;
        }
 
@@ -233,10 +234,9 @@ enum ia_css_err ia_css_frame_create_from_info(struct ia_css_frame **frame,
                info->raw_bit_depth,
                false,
                false);
-       if (me == NULL) {
+       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;
        }
 
@@ -267,9 +267,10 @@ enum ia_css_err ia_css_frame_set_data(struct ia_css_frame *frame,
        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");
-       if (frame == NULL) {
+       if (!frame) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                        "ia_css_frame_set_data() leave: NULL frame\n");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -326,7 +327,8 @@ enum ia_css_err ia_css_frame_allocate_contiguous_from_info(
        const struct ia_css_frame_info *info)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
-       assert(frame != NULL);
+
+       assert(frame);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                "ia_css_frame_allocate_contiguous_from_info() enter:\n");
        err = ia_css_frame_allocate_contiguous(frame,
@@ -344,7 +346,7 @@ void ia_css_frame_free(struct ia_css_frame *frame)
 {
        IA_CSS_ENTER_PRIVATE("frame = %p", frame);
 
-       if (frame != NULL) {
+       if (frame) {
                hmm_free(frame->data);
                sh_css_free(frame);
        }
@@ -358,7 +360,7 @@ void ia_css_frame_free(struct ia_css_frame *frame)
 
 enum ia_css_err ia_css_frame_check_info(const struct ia_css_frame_info *info)
 {
-       assert(info != NULL);
+       assert(info);
        if (info->res.width == 0 || info->res.height == 0)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        return IA_CSS_SUCCESS;
@@ -366,7 +368,7 @@ enum ia_css_err ia_css_frame_check_info(const struct ia_css_frame_info *info)
 
 enum ia_css_err ia_css_frame_init_planes(struct ia_css_frame *frame)
 {
-       assert(frame != NULL);
+       assert(frame);
 
        switch (frame->info.format) {
        case IA_CSS_FRAME_FORMAT_MIPI:
@@ -482,7 +484,7 @@ void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
 
        IA_CSS_ENTER_PRIVATE("info = %p,width = %d, minimum padded width = %d",
                             info, width, min_padded_width);
-       if (info == NULL) {
+       if (!info) {
                IA_CSS_ERROR("NULL input parameter");
                IA_CSS_LEAVE_PRIVATE("");
                return;
@@ -518,7 +520,7 @@ 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)
 {
-       assert(info != NULL);
+       assert(info);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                "ia_css_frame_info_set_format() enter:\n");
        info->format = format;
@@ -532,7 +534,7 @@ void ia_css_frame_info_init(struct ia_css_frame_info *info,
 {
        IA_CSS_ENTER_PRIVATE("info = %p, width = %d, height = %d, format = %d, aligned = %d",
                             info, width, height, format, aligned);
-       if (info == NULL) {
+       if (!info) {
                IA_CSS_ERROR("NULL input parameter");
                IA_CSS_LEAVE_PRIVATE("");
                return;
@@ -547,6 +549,7 @@ void ia_css_frame_free_multiple(unsigned int num_frames,
        struct ia_css_frame **frames_array)
 {
        unsigned int i;
+
        for (i = 0; i < num_frames; i++) {
                if (frames_array[i]) {
                        ia_css_frame_free(frames_array[i]);
@@ -566,7 +569,7 @@ enum ia_css_err ia_css_frame_allocate_with_buffer_size(
                IA_CSS_FRAME_FORMAT_NUM,/* Not valid format yet */
                0, 0, contiguous, false);
 
-       if (me == NULL)
+       if (!me)
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 
        /* Get the data size */
@@ -627,11 +630,11 @@ ia_css_dma_configure_from_info(
        struct dma_port_config *config,
        const struct ia_css_frame_info *info)
 {
-       unsigned is_raw_packed = info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED;
-       unsigned bits_per_pixel = is_raw_packed ? info->raw_bit_depth : ia_css_elems_bytes_from_info(info)*8;
-       unsigned pix_per_ddrword = HIVE_ISP_DDR_WORD_BITS / bits_per_pixel;
-       unsigned words_per_line = CEIL_DIV(info->padded_width, pix_per_ddrword);
-       unsigned elems_b = pix_per_ddrword;
+       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 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;
 
        config->stride = HIVE_ISP_DDR_WORD_BYTES * words_per_line;
        config->elems  = (uint8_t)elems_b;
@@ -684,7 +687,8 @@ static void frame_init_raw_single_plane(
        unsigned int bits_per_pixel)
 {
        unsigned int stride;
-       assert(frame != NULL);
+
+       assert(frame);
 
        stride = HIVE_ISP_DDR_WORD_BYTES *
                        CEIL_DIV(subpixels_per_line,
@@ -729,7 +733,7 @@ static void frame_init_nv_planes(struct ia_css_frame *frame,
        uv_width = 2 * (y_width / horizontal_decimation);
        uv_height = y_height / vertical_decimation;
 
-       if (IA_CSS_FRAME_FORMAT_NV12_TILEY == frame->info.format) {
+       if (frame->info.format == IA_CSS_FRAME_FORMAT_NV12_TILEY) {
                y_width   = CEIL_MUL(y_width,   NV12_TILEY_TILE_WIDTH);
                uv_width  = CEIL_MUL(uv_width,  NV12_TILEY_TILE_WIDTH);
                y_height  = CEIL_MUL(y_height,  NV12_TILEY_TILE_HEIGHT);
@@ -854,7 +858,7 @@ static enum ia_css_err frame_allocate_with_data(struct ia_css_frame **frame,
                contiguous,
                true);
 
-       if (me == NULL)
+       if (!me)
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 
        err = ia_css_frame_init_planes(me);
@@ -886,7 +890,7 @@ static struct ia_css_frame *frame_create(unsigned int width,
 {
        struct ia_css_frame *me = sh_css_malloc(sizeof(*me));
 
-       if (me == NULL)
+       if (!me)
                return NULL;
 
        memset(me, 0, sizeof(*me));
@@ -926,7 +930,7 @@ ia_css_elems_bytes_from_info(const struct ia_css_frame_info *info)
        if (info->format == IA_CSS_FRAME_FORMAT_RAW
                || (info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED)) {
                if (info->raw_bit_depth)
-                       return CEIL_DIV(info->raw_bit_depth,8);
+                       return CEIL_DIV(info->raw_bit_depth, 8);
                else
                        return 2; /* bytes per pixel */
        }
@@ -957,6 +961,7 @@ void ia_css_resolution_to_sp_resolution(
        to->width  = (uint16_t)from->width;
        to->height = (uint16_t)from->height;
 }
+
 #ifdef ISP2401
 
 enum ia_css_err
@@ -964,10 +969,10 @@ 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)
 {
-       uint32_t wd_even_ceil, ht_even_ceil;
-       uint32_t in_ratio, out_ratio;
+       u32 wd_even_ceil, ht_even_ceil;
+       u32 in_ratio, out_ratio;
 
-       if ((in_res == NULL) || (out_res == NULL) || (crop_res == NULL))
+       if ((!in_res) || (!out_res) || (!crop_res))
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        IA_CSS_ENTER_PRIVATE("in(%ux%u) -> out(%ux%u)", in_res->width,
index 1bed027435fd01588efe9a12736d0c6afeb74ccd..bccbddd35d28d05963c0e035b3c0539fa675d2ac 100644 (file)
@@ -68,9 +68,9 @@ static void ifmtr_set_if_blocking_mode(
 unsigned int ia_css_ifmtr_lines_needed_for_bayer_order(
                const struct ia_css_stream_config *config)
 {
-       assert(config != NULL);
-       if ((IA_CSS_BAYER_ORDER_BGGR == config->input_config.bayer_order)
-           || (IA_CSS_BAYER_ORDER_GBRG == config->input_config.bayer_order))
+       assert(config);
+       if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_BGGR)
+           || (config->input_config.bayer_order == IA_CSS_BAYER_ORDER_GBRG))
                return 1;
 
        return 0;
@@ -79,9 +79,9 @@ 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)
 {
-       assert(config != NULL);
-       if ((IA_CSS_BAYER_ORDER_RGGB == config->input_config.bayer_order)
-           || (IA_CSS_BAYER_ORDER_GBRG == config->input_config.bayer_order))
+       assert(config);
+       if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_RGGB)
+           || (config->input_config.bayer_order == IA_CSS_BAYER_ORDER_GBRG))
                return 1;
 
        return 0;
@@ -114,7 +114,7 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
        input_formatter_cfg_t if_a_config, if_b_config;
        enum atomisp_input_format input_format;
        enum ia_css_err err = IA_CSS_SUCCESS;
-       uint8_t if_config_index;
+       u8 if_config_index;
 
        /* Determine which input formatter config set is targeted. */
        /* Index is equal to the CSI-2 port used. */
@@ -141,7 +141,7 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
        if (config->mode == IA_CSS_INPUT_MODE_SENSOR
            || config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
                port = config->source.port.port;
-               if_config_index = (uint8_t) (port - MIPI_PORT0_ID);
+               if_config_index = (uint8_t)(port - MIPI_PORT0_ID);
        } else if (config->mode == IA_CSS_INPUT_MODE_MEMORY) {
                if_config_index = SH_CSS_IF_CONFIG_NOT_NEEDED;
        } else {
@@ -170,8 +170,7 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
                else
                        left_padding = binary->left_padding;
        else
-               left_padding = 2*ISP_VEC_NELEMS - config->left_padding;
-
+               left_padding = 2 * ISP_VEC_NELEMS - config->left_padding;
 
        if (left_padding) {
                num_vectors = CEIL_DIV(cropped_width + left_padding,
@@ -300,6 +299,7 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
        case ATOMISP_INPUT_FORMAT_RAW_12:
                if (two_ppc) {
                        int crop_col = (start_column % 2) == 1;
+
                        vmem_increment = 2;
                        deinterleaving = 1;
                        width_a = width_b = cropped_width / 2;
@@ -455,7 +455,7 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
                if_b_config.block_no_reqs =
                    (config->mode != IA_CSS_INPUT_MODE_SENSOR);
 
-               if (SH_CSS_IF_CONFIG_NOT_NEEDED != if_config_index) {
+               if (if_config_index != SH_CSS_IF_CONFIG_NOT_NEEDED) {
                        assert(if_config_index <= SH_CSS_MAX_IF_CONFIGS);
 
                        ifmtr_set_if_blocking_mode(&if_a_config, &if_b_config);
@@ -464,7 +464,7 @@ enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
                                                 if_config_index);
                }
        } else {
-               if (SH_CSS_IF_CONFIG_NOT_NEEDED != if_config_index) {
+               if (if_config_index != SH_CSS_IF_CONFIG_NOT_NEEDED) {
                        assert(if_config_index <= SH_CSS_MAX_IF_CONFIGS);
 
                        ifmtr_set_if_blocking_mode(&if_a_config, NULL);
@@ -488,6 +488,7 @@ static void ifmtr_set_if_blocking_mode(
 {
        int i;
        bool block[] = { false, false, false, false };
+
        assert(N_INPUT_FORMATTER_ID <= (ARRAY_SIZE(block)));
 
 #if !defined(IS_ISP_2400_SYSTEM)
@@ -495,7 +496,7 @@ static void ifmtr_set_if_blocking_mode(
 #endif
 
        block[INPUT_FORMATTER0_ID] = (bool)config_a->block_no_reqs;
-       if (NULL != config_b)
+       if (config_b)
                block[INPUT_FORMATTER1_ID] = (bool)config_b->block_no_reqs;
 
        /* TODO: next could cause issues when streams are started after
@@ -504,7 +505,8 @@ static void ifmtr_set_if_blocking_mode(
        if (ifmtr_set_if_blocking_mode_reset) {
                ifmtr_set_if_blocking_mode_reset = false;
                for (i = 0; i < N_INPUT_FORMATTER_ID; i++) {
-                       input_formatter_ID_t id = (input_formatter_ID_t) i;
+                       input_formatter_ID_t id = (input_formatter_ID_t)i;
+
                        input_formatter_rst(id);
                        input_formatter_set_fifo_blocking_mode(id, block[id]);
                }
index 24ca4aaf8df1456520ba07076708724141eb8d41..029db01a94411fc7286093b3e19e536a7ba3e933 100644 (file)
@@ -81,6 +81,7 @@ enum inputfifo_mipi_data_type {
        inputfifo_mipi_data_type_yuv420_legacy,
        inputfifo_mipi_data_type_rgb,
 };
+
 #if !defined(HAS_NO_INPUT_SYSTEM)
 static unsigned int inputfifo_curr_ch_id, inputfifo_curr_fmt_type;
 #endif
@@ -94,6 +95,7 @@ struct inputfifo_instance {
        unsigned int                            fmt_type;
        enum inputfifo_mipi_data_type   type;
 };
+
 #if !defined(HAS_NO_INPUT_SYSTEM)
 /*
  * Maintain a basic streaming to Mipi administration with ch_id as index
@@ -104,9 +106,9 @@ static struct inputfifo_instance
        inputfifo_inst_admin[INPUTFIFO_NR_OF_S2M_CHANNELS];
 
 /* Streaming to MIPI */
-static unsigned inputfifo_wrap_marker(
+static unsigned int inputfifo_wrap_marker(
 /* static inline unsigned inputfifo_wrap_marker( */
-       unsigned marker)
+       unsigned int marker)
 {
        return marker |
        (inputfifo_curr_ch_id << HIVE_STR_TO_MIPI_CH_ID_LSB) |
@@ -114,7 +116,7 @@ static unsigned inputfifo_wrap_marker(
 }
 
 static inline void
-_sh_css_fifo_snd(unsigned token)
+_sh_css_fifo_snd(unsigned int token)
 {
        while (!can_event_send_token(STR2MIPI_EVENT_ID))
                hrt_sleep();
@@ -132,8 +134,6 @@ unsigned int data)
        return;
 }
 
-
-
 static void inputfifo_send_data_b(
 /* static inline void inputfifo_send_data_b( */
        unsigned int data)
@@ -144,8 +144,6 @@ static void inputfifo_send_data_b(
        return;
 }
 
-
-
 static void inputfifo_send_data(
 /* static inline void inputfifo_send_data( */
        unsigned int a,
@@ -159,8 +157,6 @@ static void inputfifo_send_data(
        return;
 }
 
-
-
 static void inputfifo_send_sol(void)
 /* static inline void inputfifo_send_sol(void) */
 {
@@ -171,8 +167,6 @@ static void inputfifo_send_sol(void)
        return;
 }
 
-
-
 static void inputfifo_send_eol(void)
 /* static inline void inputfifo_send_eol(void) */
 {
@@ -182,8 +176,6 @@ static void inputfifo_send_eol(void)
        return;
 }
 
-
-
 static void inputfifo_send_sof(void)
 /* static inline void inputfifo_send_sof(void) */
 {
@@ -194,8 +186,6 @@ static void inputfifo_send_sof(void)
        return;
 }
 
-
-
 static void inputfifo_send_eof(void)
 /* static inline void inputfifo_send_eof(void) */
 {
@@ -205,14 +195,13 @@ static void inputfifo_send_eof(void)
        return;
 }
 
-
-
 #ifdef __ON__
 static void inputfifo_send_ch_id(
 /* static inline void inputfifo_send_ch_id( */
        unsigned int ch_id)
 {
        hrt_data        token;
+
        inputfifo_curr_ch_id = ch_id & _HIVE_ISP_CH_ID_MASK;
        /* we send an zero marker, this will wrap the ch_id and
         * fmt_type automatically.
@@ -227,6 +216,7 @@ static void inputfifo_send_fmt_type(
        unsigned int fmt_type)
 {
        hrt_data        token;
+
        inputfifo_curr_fmt_type = fmt_type & _HIVE_ISP_FMT_TYPE_MASK;
        /* we send an zero marker, this will wrap the ch_id and
         * fmt_type automatically.
@@ -237,8 +227,6 @@ 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( */
@@ -246,6 +234,7 @@ void inputfifo_send_ch_id_and_fmt_type( */
        unsigned int fmt_type)
 {
        hrt_data        token;
+
        inputfifo_curr_ch_id = ch_id & _HIVE_ISP_CH_ID_MASK;
        inputfifo_curr_fmt_type = fmt_type & _HIVE_ISP_FMT_TYPE_MASK;
        /* we send an zero marker, this will wrap the ch_id and
@@ -256,18 +245,15 @@ void inputfifo_send_ch_id_and_fmt_type( */
        return;
 }
 
-
-
 static void inputfifo_send_empty_token(void)
 /* static inline void inputfifo_send_empty_token(void) */
 {
        hrt_data        token = inputfifo_wrap_marker(0);
+
        _sh_css_fifo_snd(token);
        return;
 }
 
-
-
 static void inputfifo_start_frame(
 /* static inline void inputfifo_start_frame( */
        unsigned int ch_id,
@@ -278,20 +264,17 @@ static void inputfifo_start_frame(
        return;
 }
 
-
-
 static void inputfifo_end_frame(
        unsigned int marker_cycles)
 {
        unsigned int i;
+
        for (i = 0; i < marker_cycles; i++)
                inputfifo_send_empty_token();
        inputfifo_send_eof();
        return;
 }
 
-
-
 static void inputfifo_send_line2(
        const unsigned short *data,
        unsigned int width,
@@ -304,8 +287,8 @@ static void inputfifo_send_line2(
 {
        unsigned int i, is_rgb = 0, is_legacy = 0;
 
-       assert(data != NULL);
-       assert((data2 != NULL) || (width2 == 0));
+       assert(data);
+       assert((data2) || (width2 == 0));
        if (type == inputfifo_mipi_data_type_rgb)
                is_rgb = 1;
 
@@ -323,6 +306,7 @@ static void inputfifo_send_line2(
                 * we only send 1 pixel, to data[0].
                 */
                unsigned int send_two_pixels = two_ppc;
+
                if ((is_rgb || is_legacy) && (i % 3 == 2))
                        send_two_pixels = 0;
                if (send_two_pixels) {
@@ -352,6 +336,7 @@ static void inputfifo_send_line2(
                 * we only send 1 pixel, to data2[0].
                 */
                unsigned int send_two_pixels = two_ppc;
+
                if ((is_rgb || is_legacy) && (i % 3 == 2))
                        send_two_pixels = 0;
                if (send_two_pixels) {
@@ -380,8 +365,6 @@ static void inputfifo_send_line2(
        return;
 }
 
-
-
 static void
 inputfifo_send_line(const unsigned short *data,
                         unsigned int width,
@@ -390,7 +373,7 @@ inputfifo_send_line(const unsigned short *data,
                         unsigned int two_ppc,
                         enum inputfifo_mipi_data_type type)
 {
-       assert(data != NULL);
+       assert(data);
        inputfifo_send_line2(data, width, NULL, 0,
                                        hblank_cycles,
                                        marker_cycles,
@@ -398,7 +381,6 @@ inputfifo_send_line(const unsigned short *data,
                                        type);
 }
 
-
 /* Send a frame of data into the input network via the GP FIFO.
  *  Parameters:
  *   - data: array of 16 bit values that contains all data for the frame.
@@ -440,7 +422,7 @@ static void inputfifo_send_frame(
 {
        unsigned int i;
 
-       assert(data != NULL);
+       assert(data);
        inputfifo_start_frame(ch_id, fmt_type);
 
        for (i = 0; i < height; i++) {
@@ -463,8 +445,6 @@ static void inputfifo_send_frame(
        return;
 }
 
-
-
 static enum inputfifo_mipi_data_type inputfifo_determine_type(
        enum atomisp_input_format input_format)
 {
@@ -487,8 +467,6 @@ static enum inputfifo_mipi_data_type inputfifo_determine_type(
        return type;
 }
 
-
-
 static struct inputfifo_instance *inputfifo_get_inst(
        unsigned int ch_id)
 {
@@ -506,7 +484,7 @@ void ia_css_inputfifo_send_input_frame(
        unsigned int fmt_type, hblank_cycles, marker_cycles;
        enum inputfifo_mipi_data_type type;
 
-       assert(data != NULL);
+       assert(data);
        hblank_cycles = HBLANK_CYCLES;
        marker_cycles = MARKER_CYCLES;
        ia_css_isys_convert_stream_format_to_mipi_format(input_format,
@@ -520,14 +498,13 @@ void ia_css_inputfifo_send_input_frame(
                        two_ppc, type);
 }
 
-
-
 void ia_css_inputfifo_start_frame(
        unsigned int ch_id,
        enum atomisp_input_format input_format,
        bool two_ppc)
 {
        struct inputfifo_instance *s2mi;
+
        s2mi = inputfifo_get_inst(ch_id);
 
        s2mi->ch_id = ch_id;
@@ -544,8 +521,6 @@ void ia_css_inputfifo_start_frame(
        return;
 }
 
-
-
 void ia_css_inputfifo_send_line(
        unsigned int ch_id,
        const unsigned short *data,
@@ -555,11 +530,10 @@ void ia_css_inputfifo_send_line(
 {
        struct inputfifo_instance *s2mi;
 
-       assert(data != NULL);
-       assert((data2 != NULL) || (width2 == 0));
+       assert(data);
+       assert((data2) || (width2 == 0));
        s2mi = inputfifo_get_inst(ch_id);
 
-
        /* Set global variables that indicate channel_id and format_type */
        inputfifo_curr_ch_id = (s2mi->ch_id) & _HIVE_ISP_CH_ID_MASK;
        inputfifo_curr_fmt_type = (s2mi->fmt_type) & _HIVE_ISP_FMT_TYPE_MASK;
@@ -571,7 +545,6 @@ void ia_css_inputfifo_send_line(
                                        s2mi->type);
 }
 
-
 void ia_css_inputfifo_send_embedded_line(
        unsigned int    ch_id,
        enum atomisp_input_format       data_type,
@@ -581,7 +554,7 @@ void ia_css_inputfifo_send_embedded_line(
        struct inputfifo_instance *s2mi;
        unsigned int fmt_type;
 
-       assert(data != NULL);
+       assert(data);
        s2mi = inputfifo_get_inst(ch_id);
        ia_css_isys_convert_stream_format_to_mipi_format(data_type,
                        MIPI_PREDICTOR_NONE, &fmt_type);
@@ -593,11 +566,11 @@ void ia_css_inputfifo_send_embedded_line(
                        s2mi->two_ppc, inputfifo_mipi_data_type_regular);
 }
 
-
 void ia_css_inputfifo_end_frame(
        unsigned int    ch_id)
 {
        struct inputfifo_instance *s2mi;
+
        s2mi = inputfifo_get_inst(ch_id);
 
        /* Set global variables that indicate channel_id and format_type */
index 285749885105ccf6ce09bacc2b40cd1ff18b44d1..15e4b3bff6d3320cddab1d0c22db6c4dfd08fbbf 100644 (file)
@@ -54,7 +54,7 @@ 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,
-       uint32_t address, size_t size);
+       u32 address, size_t size);
 
 /* Get functions for parameter memory descriptors */
 const struct ia_css_host_data*
index 9d111793bb65b5ee2068f481f918e99e46e4692c..ee933302bbb832784a18555edaf6c0bae5a0f3e8 100644 (file)
@@ -51,15 +51,15 @@ enum ia_css_param_class {
        IA_CSS_PARAM_CLASS_FRAME  = 3,  /* Frame time parameters, like output buffer */
 #endif
 };
+
 #define IA_CSS_NUM_PARAM_CLASSES (IA_CSS_PARAM_CLASS_STATE + 1)
 
 /* ISP parameter descriptor */
 struct ia_css_isp_parameter {
-       uint32_t offset; /* Offset in isp_<mem>)parameters, etc. */
-       uint32_t size;   /* Disabled if 0 */
+       u32 offset; /* Offset in isp_<mem>)parameters, etc. */
+       u32 size;   /* Disabled if 0 */
 };
 
-
 /* Address/size of each parameter class in each isp memory, host memory pointers */
 struct ia_css_isp_param_host_segments {
        struct ia_css_host_data params[IA_CSS_NUM_PARAM_CLASSES][IA_CSS_NUM_MEMORIES];
@@ -77,7 +77,7 @@ struct ia_css_isp_param_isp_segments {
 
 /* Memory offsets in binary info */
 struct ia_css_isp_param_memory_offsets {
-       uint32_t offsets[IA_CSS_NUM_PARAM_CLASSES];  /** offset wrt hdr in bytes */
+       u32 offsets[IA_CSS_NUM_PARAM_CLASSES];  /** offset wrt hdr in bytes */
 };
 
 /* Offsets for ISP kernel parameters per isp memory.
@@ -95,4 +95,3 @@ union ia_css_all_memory_offsets {
 };
 
 #endif /* _IA_CSS_ISP_PARAM_TYPES_H_ */
-
index f793ce125f02a85c494d71ef3c597adcefc01d2b..a0b4387582980bc38cabf6c932f09f0bc033b9b6 100644 (file)
@@ -61,7 +61,7 @@ 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,
-       uint32_t address, size_t size)
+       u32 address, size_t size)
 {
        mem_init->params[pclass][mem].address = address;
        mem_init->params[pclass][mem].size = (uint32_t)size;
@@ -101,7 +101,8 @@ ia_css_init_memory_interface(
        const struct ia_css_isp_param_host_segments *mem_params,
        const struct ia_css_isp_param_css_segments *css_params)
 {
-       unsigned pclass, mem;
+       unsigned int pclass, mem;
+
        for (pclass = 0; pclass < IA_CSS_NUM_PARAM_CLASSES; pclass++) {
                memset(isp_mem_if->params[pclass], 0, sizeof(isp_mem_if->params[pclass]));
                for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) {
@@ -121,12 +122,13 @@ ia_css_isp_param_allocate_isp_parameters(
        const struct ia_css_isp_param_isp_segments *mem_initializers)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
-       unsigned mem, pclass;
+       unsigned int mem, pclass;
 
        pclass = IA_CSS_PARAM_CLASS_PARAM;
        for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) {
                for (pclass = 0; pclass < IA_CSS_NUM_PARAM_CLASSES; pclass++) {
-                       uint32_t size = 0;
+                       u32 size = 0;
+
                        if (mem_initializers)
                                size = mem_initializers->params[pclass][mem].size;
                        mem_params->params[pclass][mem].size = size;
@@ -160,7 +162,7 @@ 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)
 {
-       unsigned mem, pclass;
+       unsigned int mem, pclass;
 
        for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) {
                for (pclass = 0; pclass < IA_CSS_NUM_PARAM_CLASSES; pclass++) {
@@ -181,7 +183,8 @@ ia_css_isp_param_load_fw_params(
        const struct ia_css_isp_param_memory_offsets *memory_offsets,
        bool init)
 {
-       unsigned pclass;
+       unsigned int pclass;
+
        for (pclass = 0; pclass < IA_CSS_NUM_PARAM_CLASSES; pclass++) {
                mem_offsets->array[pclass].ptr = NULL;
                if (init)
@@ -195,12 +198,13 @@ ia_css_isp_param_copy_isp_mem_if_to_ddr(
        const struct ia_css_isp_param_host_segments *host,
        enum ia_css_param_class pclass)
 {
-       unsigned mem;
+       unsigned int 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;
+
                if (size != ddr->params[pclass][mem].size)
                        return IA_CSS_ERR_INTERNAL_ERROR;
                if (!size)
@@ -223,5 +227,3 @@ ia_css_isp_param_enable_pipeline(
 
        *(uint32_t *)&mem_params->params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM0].address[dmem_offset] = 0x0;
 }
-
-
index 8c005db9766e2fa09e9fe9126b42dcb54df72e60..9207a48856dffd21eac9d7e98cf7f41cc9dff310 100644 (file)
@@ -132,66 +132,65 @@ enum ia_css_err ia_css_isys_convert_stream_format_to_mipi_format(
 /**
  * Virtual Input System. (Input System 2401)
  */
-extern ia_css_isys_error_t ia_css_isys_stream_create(
+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);
 
-extern void ia_css_isys_stream_destroy(
+void ia_css_isys_stream_destroy(
                ia_css_isys_stream_h    isys_stream);
 
-extern ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
+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);
 
-extern void ia_css_isys_csi_rx_lut_rmgr_init(void);
+void ia_css_isys_csi_rx_lut_rmgr_init(void);
 
-extern void ia_css_isys_csi_rx_lut_rmgr_uninit(void);
+void ia_css_isys_csi_rx_lut_rmgr_uninit(void);
 
-extern bool ia_css_isys_csi_rx_lut_rmgr_acquire(
+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);
 
-extern void ia_css_isys_csi_rx_lut_rmgr_release(
+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);
 
+void ia_css_isys_ibuf_rmgr_init(void);
 
-extern void ia_css_isys_ibuf_rmgr_init(void);
+void ia_css_isys_ibuf_rmgr_uninit(void);
 
-extern void ia_css_isys_ibuf_rmgr_uninit(void);
-
-extern bool ia_css_isys_ibuf_rmgr_acquire(
-       uint32_t        size,
+bool ia_css_isys_ibuf_rmgr_acquire(
+       u32     size,
        uint32_t        *start_addr);
 
-extern void ia_css_isys_ibuf_rmgr_release(
+void ia_css_isys_ibuf_rmgr_release(
        uint32_t        *start_addr);
 
-extern void ia_css_isys_dma_channel_rmgr_init(void);
+void ia_css_isys_dma_channel_rmgr_init(void);
 
-extern void ia_css_isys_dma_channel_rmgr_uninit(void);
+void ia_css_isys_dma_channel_rmgr_uninit(void);
 
-extern bool ia_css_isys_dma_channel_rmgr_acquire(
+bool ia_css_isys_dma_channel_rmgr_acquire(
        isys2401_dma_ID_t       dma_id,
        isys2401_dma_channel    *channel);
 
-extern void ia_css_isys_dma_channel_rmgr_release(
+void ia_css_isys_dma_channel_rmgr_release(
        isys2401_dma_ID_t       dma_id,
        isys2401_dma_channel    *channel);
 
-extern void ia_css_isys_stream2mmio_sid_rmgr_init(void);
+void ia_css_isys_stream2mmio_sid_rmgr_init(void);
 
-extern void ia_css_isys_stream2mmio_sid_rmgr_uninit(void);
+void ia_css_isys_stream2mmio_sid_rmgr_uninit(void);
 
-extern bool ia_css_isys_stream2mmio_sid_rmgr_acquire(
+bool ia_css_isys_stream2mmio_sid_rmgr_acquire(
        stream2mmio_ID_t        stream2mmio,
        stream2mmio_sid_ID_t    *sid);
 
-extern void ia_css_isys_stream2mmio_sid_rmgr_release(
+void ia_css_isys_stream2mmio_sid_rmgr_release(
        stream2mmio_ID_t        stream2mmio,
        stream2mmio_sid_ID_t    *sid);
 
index 0c3434ad061392b993433c7b4151dc0df59b6032..71d1b66e954bde3e6ebdec0547915243f9485024 100644 (file)
@@ -59,7 +59,7 @@ 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(
-       uint32_t        sp_thread_id,
+       u32     sp_thread_id,
        uint32_t        stream_id)
 {
        return sp_thread_id * IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH + stream_id;
index a914ce5532ec9451d267b380f203f114a7416515..f15c805a519308ae2faeefd9a3ad60e42ff8657b 100644 (file)
@@ -60,16 +60,16 @@ bool ia_css_isys_csi_rx_lut_rmgr_acquire(
        csi_rx_backend_lut_entry_t      *entry)
 {
        bool retval = false;
-       uint32_t max_num_packets_of_type;
-       uint32_t num_active_of_type;
+       u32 max_num_packets_of_type;
+       u32 num_active_of_type;
        isys_csi_rx_rsrc_t *cur_rsrc = NULL;
-       uint16_t i;
+       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(entry != NULL);
+       assert(entry);
 
-       if ((backend < N_CSI_RX_BACKEND_ID) && (entry != NULL)) {
+       if ((backend < N_CSI_RX_BACKEND_ID) && (entry)) {
                cur_rsrc = &isys_csi_rx_rsrc[backend];
                if (packet_type == CSI_MIPI_PACKET_TYPE_LONG) {
                        max_num_packets_of_type = N_LONG_PACKET_LUT_ENTRIES[backend];
@@ -108,15 +108,15 @@ void ia_css_isys_csi_rx_lut_rmgr_release(
        csi_mipi_packet_type_t          packet_type,
        csi_rx_backend_lut_entry_t      *entry)
 {
-       uint32_t max_num_packets;
+       u32 max_num_packets;
        isys_csi_rx_rsrc_t *cur_rsrc = NULL;
-       uint32_t packet_entry = 0;
+       u32 packet_entry = 0;
 
        assert(backend < N_CSI_RX_BACKEND_ID);
-       assert(entry != NULL);
+       assert(entry);
        assert((packet_type >= CSI_MIPI_PACKET_TYPE_LONG) || (packet_type <= CSI_MIPI_PACKET_TYPE_SHORT));
 
-       if ((backend < N_CSI_RX_BACKEND_ID) && (entry != NULL)) {
+       if ((backend < N_CSI_RX_BACKEND_ID) && (entry)) {
                if (packet_type == CSI_MIPI_PACKET_TYPE_LONG) {
                        max_num_packets = N_LONG_PACKET_LUT_ENTRIES[backend];
                        packet_entry = entry->long_packet_entry;
@@ -149,6 +149,7 @@ enum ia_css_err ia_css_isys_csi_rx_register_stream(
        if ((port < N_INPUT_SYSTEM_CSI_PORT) &&
            (isys_stream_id < SH_CSS_MAX_ISYS_CHANNEL_NODES)) {
                struct sh_css_sp_pipeline_io_status *pipe_io_status;
+
                pipe_io_status = ia_css_pipeline_get_pipe_io_status();
                if (bitop_getbit(pipe_io_status->active[port], isys_stream_id) == 0) {
                        bitop_setbit(pipe_io_status->active[port], isys_stream_id);
@@ -168,6 +169,7 @@ enum ia_css_err ia_css_isys_csi_rx_unregister_stream(
        if ((port < N_INPUT_SYSTEM_CSI_PORT) &&
            (isys_stream_id < SH_CSS_MAX_ISYS_CHANNEL_NODES)) {
                struct sh_css_sp_pipeline_io_status *pipe_io_status;
+
                pipe_io_status = ia_css_pipeline_get_pipe_io_status();
                if (bitop_getbit(pipe_io_status->active[port], isys_stream_id) == 1) {
                        bitop_clearbit(pipe_io_status->active[port], isys_stream_id);
index c27b0ab83c93875f9bb060eb5d1831166b915f34..c9a75d8e74387c11ee38750b29e6e61c36d3f8a5 100644 (file)
@@ -33,11 +33,10 @@ more details.
 
 typedef struct isys_csi_rx_rsrc_s isys_csi_rx_rsrc_t;
 struct isys_csi_rx_rsrc_s {
-       uint32_t        active_table;
-       uint32_t        num_active;
-       uint16_t        num_long_packets;
-       uint16_t        num_short_packets;
+       u32     active_table;
+       u32        num_active;
+       u16     num_long_packets;
+       u16     num_short_packets;
 };
 
 #endif /* __CSI_RX_RMGR_H_INCLUDED__ */
-
index d8c3b75d7faca3b8502cdd2f2123d3e39ab7bd4c..faa14ed630808a4147aa2b71b66f9f99619aa27a 100644 (file)
@@ -61,16 +61,16 @@ void ia_css_isys_ibuf_rmgr_uninit(void)
 }
 
 bool ia_css_isys_ibuf_rmgr_acquire(
-       uint32_t        size,
+       u32     size,
        uint32_t        *start_addr)
 {
        bool retval = false;
        bool input_buffer_found = false;
-       uint32_t aligned_size;
+       u32 aligned_size;
        ibuf_handle_t *handle = NULL;
-       uint16_t i;
+       u16 i;
 
-       assert(start_addr != NULL);
+       assert(start_addr);
        assert(size > 0);
 
        aligned_size = (size + (IBUF_ALIGN - 1)) & ~(IBUF_ALIGN - 1);
@@ -123,10 +123,10 @@ bool ia_css_isys_ibuf_rmgr_acquire(
 void ia_css_isys_ibuf_rmgr_release(
        uint32_t        *start_addr)
 {
-       uint16_t i;
+       u16 i;
        ibuf_handle_t *handle = NULL;
 
-       assert(start_addr != NULL);
+       assert(start_addr);
 
        for (i = 0; i < ibuf_rsrc.num_allocated; i++) {
                handle = getHandle(i);
index 424cfe9f3b2a286d17038bc85e00370b895ecc54..a04034a8763c4f09a07de1ac168e186df1d54e4c 100644 (file)
@@ -37,19 +37,18 @@ more details.
 
 typedef struct ibuf_handle_s ibuf_handle_t;
 struct ibuf_handle_s {
-       uint32_t        start_addr;
-       uint32_t        size;
+       u32     start_addr;
+       u32     size;
        bool            active;
 };
 
 typedef struct ibuf_rsrc_s ibuf_rsrc_t;
 struct ibuf_rsrc_s {
-       uint32_t        free_start_addr;
-       uint32_t        free_size;
-       uint16_t        num_active;
-       uint16_t        num_allocated;
+       u32     free_start_addr;
+       u32     free_size;
+       u16     num_active;
+       u16     num_allocated;
        ibuf_handle_t   handles[MAX_IBUF_HANDLES];
 };
 
 #endif /* __IBUF_CTRL_RMGR_H_INCLUDED */
-
index 4def4a542b7db3b524d7c473bb23e51669d4e77c..425b317699f39112fc11a1cbb27e4b15a8783af2 100644 (file)
@@ -60,7 +60,7 @@ bool ia_css_isys_dma_channel_rmgr_acquire(
        isys_dma_rsrc_t         *cur_rsrc = NULL;
 
        assert(dma_id < N_ISYS2401_DMA_ID);
-       assert(channel != NULL);
+       assert(channel);
 
        max_dma_channel = N_ISYS2401_DMA_CHANNEL_PROCS[dma_id];
        cur_rsrc = &isys_dma_rsrc[dma_id];
@@ -88,7 +88,7 @@ void ia_css_isys_dma_channel_rmgr_release(
        isys_dma_rsrc_t         *cur_rsrc = NULL;
 
        assert(dma_id < N_ISYS2401_DMA_ID);
-       assert(channel != NULL);
+       assert(channel);
 
        max_dma_channel = N_ISYS2401_DMA_CHANNEL_PROCS[dma_id];
        cur_rsrc = &isys_dma_rsrc[dma_id];
index b2c286537774f9cec06e5677d7be571631bba87a..08913240d7270a007a3102c5be698eaa954db161 100644 (file)
@@ -33,9 +33,8 @@ more details.
 
 typedef struct isys_dma_rsrc_s isys_dma_rsrc_t;
 struct isys_dma_rsrc_s {
-       uint32_t active_table;
-       uint16_t num_active;
+       u32 active_table;
+       u16 num_active;
 };
 
 #endif /* __ISYS_DMA_RMGR_H_INCLUDED__ */
-
index 2ae5e59d5e31f729ae8239625fba77e5a3374671..0397f79edfef5e6e803d7f5de721711534bc9ba2 100644 (file)
@@ -46,8 +46,8 @@ input_system_error_t ia_css_isys_init(void)
        backend_channel_cfg_t backend_ch1;
        target_cfg2400_t targetB;
        target_cfg2400_t targetC;
-       uint32_t acq_mem_region_size = 24;
-       uint32_t acq_nof_mem_regions = 2;
+       u32 acq_mem_region_size = 24;
+       u32 acq_nof_mem_regions = 2;
        input_system_error_t error = INPUT_SYSTEM_ERR_NO_ERROR;
 
        memset(&backend_ch0, 0, sizeof(backend_channel_cfg_t));
index 222b294c0ab000152f5148ea49a9f5324db2475d..3c2345f1156e47467daa7e33a6615b804512aca2 100644 (file)
@@ -60,9 +60,9 @@ bool ia_css_isys_stream2mmio_sid_rmgr_acquire(
        stream2mmio_sid_ID_t    i;
 
        assert(stream2mmio < N_STREAM2MMIO_ID);
-       assert(sid != NULL);
+       assert(sid);
 
-       if ((stream2mmio < N_STREAM2MMIO_ID) && (sid != NULL)) {
+       if ((stream2mmio < N_STREAM2MMIO_ID) && (sid)) {
                max_sid = N_STREAM2MMIO_SID_PROCS[stream2mmio];
                cur_rsrc = &isys_stream2mmio_rsrc[stream2mmio];
 
@@ -89,9 +89,9 @@ void ia_css_isys_stream2mmio_sid_rmgr_release(
        isys_stream2mmio_rsrc_t *cur_rsrc = NULL;
 
        assert(stream2mmio < N_STREAM2MMIO_ID);
-       assert(sid != NULL);
+       assert(sid);
 
-       if ((stream2mmio < N_STREAM2MMIO_ID) && (sid != NULL)) {
+       if ((stream2mmio < N_STREAM2MMIO_ID) && (sid)) {
                max_sid = N_STREAM2MMIO_SID_PROCS[stream2mmio];
                cur_rsrc = &isys_stream2mmio_rsrc[stream2mmio];
                if ((*sid < max_sid) && (cur_rsrc->num_active > 0)) {
index 4f63005b1071b815e85335346e1ee8b8aba7cecf..6427a999848a9329808574bf4ebc3bbce88b29eb 100644 (file)
@@ -33,9 +33,8 @@ more details.
 
 typedef struct isys_stream2mmio_rsrc_s isys_stream2mmio_rsrc_t;
 struct isys_stream2mmio_rsrc_s {
-       uint32_t        active_table;
-       uint16_t        num_active;
+       u32     active_table;
+       u16     num_active;
 };
 
 #endif /* __ISYS_STREAM2MMIO_RMGR_H_INCLUDED__ */
-
index 425bd3cc3f343c32aedcaff2d70f059c07f496c1..12682d3f907c3e49c8967973f8f2f829fb036c40 100644 (file)
@@ -111,6 +111,7 @@ void ia_css_rx_port_get_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_get_irq_info(port, irq_infos);
 }
 
@@ -119,7 +120,7 @@ void ia_css_isys_rx_get_irq_info(enum mipi_port_id port,
 {
        unsigned int bits;
 
-       assert(irq_infos != NULL);
+       assert(irq_infos);
        bits = ia_css_isys_rx_get_interrupt_reg(port);
        *irq_infos = ia_css_isys_rx_translate_irq_infos(bits);
 }
@@ -175,6 +176,7 @@ void ia_css_rx_clear_irq_info(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);
 }
 
@@ -233,7 +235,7 @@ enum ia_css_err ia_css_isys_convert_stream_format_to_mipi_format(
                mipi_predictor_t compression,
                unsigned int *fmt_type)
 {
-       assert(fmt_type != NULL);
+       assert(fmt_type);
        /*
         * Custom (user defined) modes. Used for compressed
         * MIPI transfers
@@ -372,6 +374,7 @@ enum ia_css_err ia_css_isys_convert_stream_format_to_mipi_format(
        }
        return IA_CSS_SUCCESS;
 }
+
 #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)
 {
@@ -379,22 +382,24 @@ static mipi_predictor_t sh_css_csi2_compression_type_2_mipi_predictor(enum ia_cs
 
        switch (type) {
        case IA_CSS_CSI2_COMPRESSION_TYPE_1:
-               predictor = MIPI_PREDICTOR_TYPE1-1;
+               predictor = MIPI_PREDICTOR_TYPE1 - 1;
                break;
        case IA_CSS_CSI2_COMPRESSION_TYPE_2:
-               predictor = MIPI_PREDICTOR_TYPE2-1;
+               predictor = MIPI_PREDICTOR_TYPE2 - 1;
        default:
                break;
        }
        return predictor;
 }
+
 enum ia_css_err ia_css_isys_convert_compressed_format(
                struct ia_css_csi2_compression *comp,
                struct input_system_cfg_s *cfg)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
-       assert(comp != NULL);
-       assert(cfg != NULL);
+
+       assert(comp);
+       assert(cfg);
 
        if (comp->type != IA_CSS_CSI2_COMPRESSION_TYPE_NONE) {
                /* compression register bit slicing
@@ -494,13 +499,13 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config,
        bool any_port_enabled = false;
        enum mipi_port_id port;
 
-       if ((config == NULL)
+       if ((!config)
                || (config->mode >= N_RX_MODE)
                || (config->port >= N_MIPI_PORT_ID)) {
                assert(0);
                return;
        }
-       for (port = (enum mipi_port_id) 0; port < N_MIPI_PORT_ID; port++) {
+       for (port = (enum mipi_port_id)0; port < N_MIPI_PORT_ID; port++) {
                if (is_receiver_port_enabled(RX0_ID, port))
                        any_port_enabled = true;
        }
@@ -530,7 +535,6 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config,
                port_enabled[port] = true;
 
                if (input_mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
-
                        /* 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,
@@ -543,7 +547,7 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config,
                        input_system_sub_system_reg_store(INPUT_SYSTEM0_ID,
                                        GPREGS_UNIT0_ID,
                                        HIVE_ISYS_GPREG_MUX_IDX,
-                                       (input_system_multiplex_t) port);
+                                       (input_system_multiplex_t)port);
                } else {
                        /*
                         * AM: A bit of a hack, wiring the input system.
@@ -596,7 +600,8 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config,
 void ia_css_isys_rx_disable(void)
 {
        enum mipi_port_id port;
-       for (port = (enum mipi_port_id) 0; port < N_MIPI_PORT_ID; port++) {
+
+       for (port = (enum mipi_port_id)0; port < N_MIPI_PORT_ID; port++) {
                receiver_port_reg_store(RX0_ID, port,
                                        _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX,
                                        false);
@@ -604,4 +609,3 @@ void ia_css_isys_rx_disable(void)
        return;
 }
 #endif /* if !defined(USE_INPUT_SYSTEM_VERSION_2401) */
-
index 2484949453b7ccef8d9a725ee44df44d1b9a1d90..c47e14d8bcad07c3357314385089c6c9d8757b9b 100644 (file)
@@ -85,10 +85,10 @@ static void release_sid(
        stream2mmio_sid_ID_t    *sid);
 
 static bool acquire_ib_buffer(
-       int32_t bits_per_pixel,
-       int32_t pixels_per_line,
-       int32_t lines_per_frame,
-       int32_t align_in_bytes,
+       s32 bits_per_pixel,
+       s32 pixels_per_line,
+       s32 lines_per_frame,
+       s32 align_in_bytes,
        bool online,
        ib_buffer_t *buf);
 
@@ -161,8 +161,8 @@ static csi_mipi_packet_type_t get_csi_mipi_packet_type(
        int32_t data_type);
 
 static int32_t calculate_stride(
-       int32_t bits_per_pixel,
-       int32_t pixels_per_line,
+       s32 bits_per_pixel,
+       s32 pixels_per_line,
        bool    raw_packed,
        int32_t align_in_bytes);
 
@@ -180,7 +180,7 @@ ia_css_isys_error_t ia_css_isys_stream_create(
 {
        ia_css_isys_error_t rc;
 
-       if (isys_stream_descr == NULL || isys_stream == NULL ||
+       if (!isys_stream_descr || !isys_stream ||
                isys_stream_id >= SH_CSS_MAX_ISYS_CHANNEL_NODES)
                return  false;
 
@@ -193,11 +193,11 @@ 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;
@@ -233,7 +233,7 @@ void ia_css_isys_stream_destroy(
        ia_css_isys_stream_h    isys_stream)
 {
        destroy_input_system_input_port(&isys_stream->input_port);
-       destroy_input_system_channel(&(isys_stream->channel));
+       destroy_input_system_channel(&isys_stream->channel);
        if (isys_stream->enable_metadata) {
                /* Destroy metadata channel only if its allocated*/
                destroy_input_system_channel(&isys_stream->md_channel);
@@ -247,19 +247,19 @@ ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
 {
        ia_css_isys_error_t rc;
 
-       if (isys_stream_cfg == NULL             ||
-               isys_stream_descr == NULL       ||
-               isys_stream == NULL)
+       if (!isys_stream_cfg            ||
+               !isys_stream_descr      ||
+               !isys_stream)
                return false;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                "ia_css_isys_stream_calculate_cfg() enter:\n");
 
        rc  = calculate_input_system_channel_cfg(
-                       &(isys_stream->channel),
-                       &(isys_stream->input_port),
+                       &isys_stream->channel,
+                       &isys_stream->input_port,
                        isys_stream_descr,
-                       &(isys_stream_cfg->channel_cfg),
+                       &isys_stream_cfg->channel_cfg,
                        false);
        if (rc == false)
                return false;
@@ -278,10 +278,10 @@ ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
        }
 
        rc = calculate_input_system_input_port_cfg(
-                       &(isys_stream->channel),
-                       &(isys_stream->input_port),
+                       &isys_stream->channel,
+                       &isys_stream->input_port,
                        isys_stream_descr,
-                       &(isys_stream_cfg->input_port_cfg));
+                       &isys_stream_cfg->input_port_cfg);
        if (rc == false)
                return false;
 
@@ -334,7 +334,7 @@ static bool create_input_system_channel(
        if (!rc)
                return false;
 
-       if (!acquire_sid(me->stream2mmio_id, &(me->stream2mmio_sid_id))) {
+       if (!acquire_sid(me->stream2mmio_id, &me->stream2mmio_sid_id)) {
                return false;
        }
 
@@ -344,14 +344,14 @@ static bool create_input_system_channel(
                        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));
+                       &me->ib_buffer)) {
+               release_sid(me->stream2mmio_id, &me->stream2mmio_sid_id);
                return false;
        }
 
-       if (!acquire_dma_channel(me->dma_id, &(me->dma_channel))) {
-               release_sid(me->stream2mmio_id, &(me->stream2mmio_sid_id));
-               release_ib_buffer(&(me->ib_buffer));
+       if (!acquire_dma_channel(me->dma_id, &me->dma_channel)) {
+               release_sid(me->stream2mmio_id, &me->stream2mmio_sid_id);
+               release_ib_buffer(&me->ib_buffer);
                return false;
        }
 
@@ -362,11 +362,11 @@ static void destroy_input_system_channel(
        input_system_channel_t  *me)
 {
        release_sid(me->stream2mmio_id,
-               &(me->stream2mmio_sid_id));
+               &me->stream2mmio_sid_id);
 
-       release_ib_buffer(&(me->ib_buffer));
+       release_ib_buffer(&me->ib_buffer);
 
-       release_dma_channel(me->dma_id, &(me->dma_channel));
+       release_dma_channel(me->dma_id, &me->dma_channel);
 }
 
 static bool create_input_system_input_port(
@@ -387,7 +387,7 @@ static bool create_input_system_input_port(
                rc = acquire_be_lut_entry(
                                me->csi_rx.backend_id,
                                packet_type,
-                               &(me->csi_rx.backend_lut_entry));
+                               &me->csi_rx.backend_lut_entry);
                break;
        case INPUT_SYSTEM_PIXELGEN_PORT0_ID:
                me->pixelgen.pixelgen_id = PIXELGEN0_ID;
@@ -402,7 +402,7 @@ static bool create_input_system_input_port(
                rc = acquire_be_lut_entry(
                                me->csi_rx.backend_id,
                                packet_type,
-                               &(me->csi_rx.backend_lut_entry));
+                               &me->csi_rx.backend_lut_entry);
                break;
        case INPUT_SYSTEM_PIXELGEN_PORT1_ID:
                me->pixelgen.pixelgen_id = PIXELGEN1_ID;
@@ -418,7 +418,7 @@ static bool create_input_system_input_port(
                rc = acquire_be_lut_entry(
                                me->csi_rx.backend_id,
                                packet_type,
-                               &(me->csi_rx.backend_lut_entry));
+                               &me->csi_rx.backend_lut_entry);
                break;
        case INPUT_SYSTEM_PIXELGEN_PORT2_ID:
                me->pixelgen.pixelgen_id = PIXELGEN2_ID;
@@ -473,7 +473,7 @@ static bool calculate_input_system_channel_cfg(
        bool rc;
 
        rc = calculate_stream2mmio_cfg(isys_cfg, metadata,
-                       &(channel_cfg->stream2mmio_cfg));
+                       &channel_cfg->stream2mmio_cfg);
        if (!rc)
                return false;
 
@@ -481,7 +481,7 @@ static bool calculate_input_system_channel_cfg(
                        channel,
                        input_port,
                        isys_cfg,
-                       &(channel_cfg->ibuf_ctrl_cfg));
+                       &channel_cfg->ibuf_ctrl_cfg);
        if (!rc)
                return false;
        if (metadata)
@@ -490,7 +490,7 @@ static bool calculate_input_system_channel_cfg(
        rc = calculate_isys2401_dma_cfg(
                        channel,
                        isys_cfg,
-                       &(channel_cfg->dma_cfg));
+                       &channel_cfg->dma_cfg);
        if (!rc)
                return false;
 
@@ -498,7 +498,7 @@ static bool calculate_input_system_channel_cfg(
                        isys_cfg,
                        false,
                        metadata,
-                       &(channel_cfg->dma_src_port_cfg));
+                       &channel_cfg->dma_src_port_cfg);
        if (!rc)
                return false;
 
@@ -506,7 +506,7 @@ static bool calculate_input_system_channel_cfg(
                        isys_cfg,
                        isys_cfg->raw_packed,
                        metadata,
-                       &(channel_cfg->dma_dest_port_cfg));
+                       &channel_cfg->dma_dest_port_cfg);
        if (!rc)
                return false;
 
@@ -525,13 +525,13 @@ static bool calculate_input_system_input_port_cfg(
        case INPUT_SYSTEM_SOURCE_TYPE_SENSOR:
                rc  = calculate_fe_cfg(
                                isys_cfg,
-                               &(input_port_cfg->csi_rx_cfg.frontend_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_cfg->csi_rx_cfg.backend_cfg);
 
                if (rc && isys_cfg->metadata.enable)
                        rc &= calculate_be_cfg(input_port, isys_cfg, true,
@@ -542,14 +542,14 @@ static bool calculate_input_system_input_port_cfg(
                                channel,
                                input_port,
                                isys_cfg,
-                               &(input_port_cfg->pixelgen_cfg.tpg_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));
+                               &input_port_cfg->pixelgen_cfg.prbs_cfg);
                break;
        default:
                rc = false;
@@ -575,15 +575,15 @@ static void release_sid(
 
 /* See also: ia_css_dma_configure_from_info() */
 static int32_t calculate_stride(
-       int32_t bits_per_pixel,
-       int32_t pixels_per_line,
+       s32 bits_per_pixel,
+       s32 pixels_per_line,
        bool    raw_packed,
        int32_t align_in_bytes)
 {
-       int32_t bytes_per_line;
-       int32_t pixels_per_word;
-       int32_t words_per_line;
-       int32_t pixels_per_line_padded;
+       s32 bytes_per_line;
+       s32 pixels_per_word;
+       s32 words_per_line;
+       s32 pixels_per_line_padded;
 
        pixels_per_line_padded = CEIL_MUL(pixels_per_line, align_in_bytes);
 
@@ -598,10 +598,10 @@ static int32_t calculate_stride(
 }
 
 static bool acquire_ib_buffer(
-       int32_t bits_per_pixel,
-       int32_t pixels_per_line,
-       int32_t lines_per_frame,
-       int32_t align_in_bytes,
+       s32 bits_per_pixel,
+       s32 pixels_per_line,
+       s32 lines_per_frame,
+       s32 align_in_bytes,
        bool online,
        ib_buffer_t *buf)
 {
@@ -663,7 +663,7 @@ static bool calculate_tpg_cfg(
        memcpy_s(
                (void *)cfg,
                sizeof(pixelgen_tpg_cfg_t),
-               (void *)(&(isys_cfg->tpg_port_attr)),
+               (void *)(&isys_cfg->tpg_port_attr),
                sizeof(pixelgen_tpg_cfg_t));
        return true;
 }
@@ -680,7 +680,7 @@ static bool calculate_prbs_cfg(
        memcpy_s(
                (void *)cfg,
                sizeof(pixelgen_prbs_cfg_t),
-               (void *)(&(isys_cfg->prbs_port_attr)),
+               (void *)(&isys_cfg->prbs_port_attr),
                sizeof(pixelgen_prbs_cfg_t));
        return true;
 }
@@ -699,7 +699,6 @@ static bool calculate_be_cfg(
        bool                            metadata,
        csi_rx_backend_cfg_t            *cfg)
 {
-
        memcpy_s(
                (void *)(&cfg->lut_entry),
                sizeof(csi_rx_backend_lut_entry_t),
@@ -712,8 +711,7 @@ static bool calculate_be_cfg(
                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 {
+       } else {
                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;
@@ -747,10 +745,10 @@ static bool calculate_ibuf_ctrl_cfg(
        const input_system_cfg_t        *isys_cfg,
        ibuf_ctrl_cfg_t                 *cfg)
 {
-       const int32_t bits_per_byte = 8;
-       int32_t bits_per_pixel;
-       int32_t bytes_per_pixel;
-       int32_t left_padding;
+       const s32 bits_per_byte = 8;
+       s32 bits_per_pixel;
+       s32 bytes_per_pixel;
+       s32 left_padding;
 
        (void)input_port;
 
@@ -816,7 +814,6 @@ static bool calculate_ibuf_ctrl_cfg(
 
        cfg->stores_per_frame           = isys_cfg->input_port_resolution.lines_per_frame;
 
-
        cfg->stream2mmio_cfg.sync_cmd   = _STREAM2MMIO_CMD_TOKEN_SYNC_FRAME;
 
        /* TODO: Define conditions as when to use store words vs store packets */
@@ -852,9 +849,9 @@ static bool calculate_isys2401_dma_port_cfg(
        bool                            metadata,
        isys2401_dma_port_cfg_t         *cfg)
 {
-       int32_t bits_per_pixel;
-       int32_t pixels_per_line;
-       int32_t align_req_in_bytes;
+       s32 bits_per_pixel;
+       s32 pixels_per_line;
+       s32 align_req_in_bytes;
 
        /* TODO: Move metadata away from isys_cfg to application layer */
        if (metadata) {
@@ -894,5 +891,6 @@ static csi_mipi_packet_type_t get_csi_mipi_packet_type(
 
        return packet_type;
 }
+
 /* end of Private Methods */
 #endif
index 66c7293c0a93ed6ec5324a235a83c653befe8cc9..91614beb9b8962f89cfd1f3abc458b2c46549926 100644 (file)
@@ -38,4 +38,3 @@ more details.
 #define _STREAM2MMIO_CMD_TOKEN_SYNC_FRAME      2
 
 #endif /* __VIRTUAL_ISYS_H_INCLUDED__ */
-
index 45a47c202e2f7e24da430d671ce262d9e2a4be84..1f10eaedc05157b41dedc0e877541f176c81fb27 100644 (file)
@@ -37,7 +37,6 @@ more details.
 
 #define IA_CSS_PIPELINE_NUM_MAX                (20)
 
-
 /* Pipeline stage to be executed on SP/ISP */
 struct ia_css_pipeline_stage {
        unsigned int stage_num;
@@ -46,7 +45,7 @@ struct ia_css_pipeline_stage {
        const struct ia_css_fw_info *firmware;  /* acceleration binary */
        /* SP function for SP stage */
        enum ia_css_pipeline_stage_sp_func sp_func;
-       unsigned max_input_width;       /* For SP raw copy */
+       unsigned int max_input_width;   /* For SP raw copy */
        struct sh_css_binary_args args;
        int mode;
        bool out_frame_allocated[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -58,19 +57,19 @@ struct ia_css_pipeline_stage {
 /* Pipeline of n stages to be executed on SP/ISP per stage */
 struct ia_css_pipeline {
        enum ia_css_pipe_id pipe_id;
-       uint8_t pipe_num;
+       u8 pipe_num;
        bool stop_requested;
        struct ia_css_pipeline_stage *stages;
        struct ia_css_pipeline_stage *current_stage;
-       unsigned num_stages;
+       unsigned int num_stages;
        struct ia_css_frame in_frame;
        struct ia_css_frame out_frame[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
        struct ia_css_frame vf_frame[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
        unsigned int dvs_frame_delay;
-       unsigned inout_port_config;
+       unsigned int inout_port_config;
        int num_execs;
        bool acquire_isp_each_stage;
-       uint32_t pipe_qos_config;
+       u32 pipe_qos_config;
 };
 
 #define DEFAULT_PIPELINE \
@@ -90,7 +89,7 @@ struct ia_css_pipeline_stage_desc {
        struct ia_css_binary *binary;
        const struct ia_css_fw_info *firmware;
        enum ia_css_pipeline_stage_sp_func sp_func;
-       unsigned max_input_width;
+       unsigned int max_input_width;
        unsigned int mode;
        struct ia_css_frame *in_frame;
        struct ia_css_frame *out_frame[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
@@ -131,7 +130,6 @@ enum ia_css_err ia_css_pipeline_create(
  */
 void ia_css_pipeline_destroy(struct ia_css_pipeline *pipeline);
 
-
 /* @brief Starts a pipeline
  *
  * @param[in] pipe_id
@@ -212,7 +210,7 @@ enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline,
  *
  */
 enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeline,
-                         uint32_t fw_handle,
+                         u32 fw_handle,
                          struct ia_css_pipeline_stage **stage);
 
 /* @brief Gets the Firmware handle corresponding the stage num from the pipeline
@@ -225,7 +223,7 @@ enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeli
  *
  */
 enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline *pipeline,
-                         uint32_t stage_num,
+                         u32 stage_num,
                          uint32_t *fw_handle);
 
 /* @brief gets the output stage from the pipeline
index a7e6edf41cdbd0449458eb9ff845dda816e270c5..30dec75bda0c45db45101895dff0efeab7906c4e 100644 (file)
@@ -37,6 +37,7 @@ enum ia_css_pipeline_stage_sp_func {
        IA_CSS_PIPELINE_ISYS_COPY = 2,
        IA_CSS_PIPELINE_NO_FUNC = 3,
 };
+
 #define IA_CSS_PIPELINE_NUM_STAGE_FUNCS 3
 
 #endif /*__IA_CSS_PIPELINE_COMMON_H__*/
index 4746620ca2129dfd316c83be831c8ad4bdabd9e8..3d36be4795e73b2f4620efeac353e0780a0f680d 100644 (file)
@@ -42,7 +42,6 @@ more details.
 #define PIPELINE_SP_THREAD_EMPTY_TOKEN          (0x0)
 #define PIPELINE_SP_THREAD_RESERVED_TOKEN       (0x1)
 
-
 /*******************************************************
 *** Static variables
 ********************************************************/
@@ -83,10 +82,10 @@ enum ia_css_err ia_css_pipeline_create(
        unsigned int pipe_num,
        unsigned int dvs_frame_delay)
 {
-       assert(pipeline != NULL);
+       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);
-       if (pipeline == NULL) {
+       if (!pipeline) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -122,10 +121,10 @@ void ia_css_pipeline_map(unsigned int pipe_num, bool map)
  */
 void ia_css_pipeline_destroy(struct ia_css_pipeline *pipeline)
 {
-       assert(pipeline != NULL);
+       assert(pipeline);
        IA_CSS_ENTER_PRIVATE("pipeline = %p", pipeline);
 
-       if (pipeline == NULL) {
+       if (!pipeline) {
                IA_CSS_ERROR("NULL input parameter");
                IA_CSS_LEAVE_PRIVATE("void");
                return;
@@ -143,10 +142,10 @@ void ia_css_pipeline_destroy(struct ia_css_pipeline *pipeline)
 void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id,
                           struct ia_css_pipeline *pipeline)
 {
-       uint8_t pipe_num = 0;
+       u8 pipe_num = 0;
        unsigned int thread_id;
 
-       assert(pipeline != NULL);
+       assert(pipeline);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
              "ia_css_pipeline_start() enter: pipe_id=%d, pipeline=%p\n",
              pipe_id, pipeline);
@@ -161,9 +160,9 @@ void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id,
 #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
@@ -193,17 +192,16 @@ void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id,
  */
 bool ia_css_pipeline_get_sp_thread_id(unsigned int key, unsigned int *val)
 {
-
        IA_CSS_ENTER("key=%d, val=%p", key, val);
 
-       if ((val == NULL) || (key >= IA_CSS_PIPELINE_NUM_MAX) || (key >= IA_CSS_PIPE_ID_NUM)) {
+       if ((!val) || (key >= IA_CSS_PIPELINE_NUM_MAX) || (key >= IA_CSS_PIPE_ID_NUM)) {
                IA_CSS_LEAVE("return value = false");
                return false;
        }
 
        *val = pipeline_num_to_sp_thread_map[key];
 
-       if (*val == (unsigned)PIPELINE_NUM_UNMAPPED) {
+       if (*val == (unsigned int)PIPELINE_NUM_UNMAPPED) {
                IA_CSS_LOG("unmapped pipeline number");
                IA_CSS_LEAVE("return value = false");
                return false;
@@ -215,6 +213,7 @@ bool ia_css_pipeline_get_sp_thread_id(unsigned int key, unsigned int *val)
 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");
        for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++) {
@@ -228,9 +227,9 @@ enum ia_css_err ia_css_pipeline_request_stop(struct ia_css_pipeline *pipeline)
        enum ia_css_err err = IA_CSS_SUCCESS;
        unsigned int thread_id;
 
-       assert(pipeline != NULL);
+       assert(pipeline);
 
-       if (pipeline == NULL)
+       if (!pipeline)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
@@ -265,10 +264,10 @@ void ia_css_pipeline_clean(struct ia_css_pipeline *pipeline)
 {
        struct ia_css_pipeline_stage *s;
 
-       assert(pipeline != NULL);
+       assert(pipeline);
        IA_CSS_ENTER_PRIVATE("pipeline = %p", pipeline);
 
-       if (pipeline == NULL) {
+       if (!pipeline) {
                IA_CSS_ERROR("NULL input parameter");
                IA_CSS_LEAVE_PRIVATE("void");
                return;
@@ -277,6 +276,7 @@ void ia_css_pipeline_clean(struct ia_css_pipeline *pipeline)
 
        while (s) {
                struct ia_css_pipeline_stage *next = s->next;
+
                pipeline_stage_destroy(s);
                s = next;
        }
@@ -305,8 +305,8 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
        enum ia_css_err err;
 
        /* other arguments can be NULL */
-       assert(pipeline != NULL);
-       assert(stage_desc != NULL);
+       assert(pipeline);
+       assert(stage_desc);
        last = pipeline->stages;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
@@ -314,8 +314,7 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
        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;
        }
@@ -331,7 +330,6 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
                && (!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];
@@ -344,8 +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;
        }
 
@@ -366,10 +363,10 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage(
 void ia_css_pipeline_finalize_stages(struct ia_css_pipeline *pipeline,
                        bool continuous)
 {
-       unsigned i = 0;
+       unsigned int i = 0;
        struct ia_css_pipeline_stage *stage;
 
-       assert(pipeline != NULL);
+       assert(pipeline);
        for (stage = pipeline->stages; stage; stage = stage->next) {
                stage->stage_num = i;
                i++;
@@ -385,8 +382,9 @@ enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline,
                                          struct ia_css_pipeline_stage **stage)
 {
        struct ia_css_pipeline_stage *s;
-       assert(pipeline != NULL);
-       assert(stage != NULL);
+
+       assert(pipeline);
+       assert(stage);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                      "ia_css_pipeline_get_stage() enter:\n");
        for (s = pipeline->stages; s; s = s->next) {
@@ -399,13 +397,14 @@ enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline,
 }
 
 enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeline,
-                         uint32_t fw_handle,
+                         u32 fw_handle,
                          struct ia_css_pipeline_stage **stage)
 {
        struct ia_css_pipeline_stage *s;
-       assert(pipeline != NULL);
-       assert(stage != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,"%s() \n",__func__);
+
+       assert(pipeline);
+       assert(stage);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
        for (s = pipeline->stages; s; s = s->next) {
                if ((s->firmware) && (s->firmware->handle == fw_handle)) {
                        *stage = s;
@@ -416,17 +415,17 @@ enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeli
 }
 
 enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline *pipeline,
-                         uint32_t stage_num,
+                         u32 stage_num,
                          uint32_t *fw_handle)
 {
        struct ia_css_pipeline_stage *s;
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,"%s() \n",__func__);
-       if ((pipeline == NULL) || (fw_handle == NULL))
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
+       if ((!pipeline) || (!fw_handle))
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        for (s = pipeline->stages; s; s = s->next) {
-               if((s->stage_num == stage_num) && (s->firmware)) {
+               if ((s->stage_num == stage_num) && (s->firmware)) {
                        *fw_handle = s->firmware->handle;
                        return IA_CSS_SUCCESS;
                }
@@ -440,8 +439,9 @@ enum ia_css_err ia_css_pipeline_get_output_stage(
                struct ia_css_pipeline_stage **stage)
 {
        struct ia_css_pipeline_stage *s;
-       assert(pipeline != NULL);
-       assert(stage != NULL);
+
+       assert(pipeline);
+       assert(stage);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                      "ia_css_pipeline_get_output_stage() enter:\n");
 
@@ -499,7 +499,7 @@ bool ia_css_pipeline_is_mapped(unsigned int key)
                return false;
        }
 
-       ret = (bool)(pipeline_num_to_sp_thread_map[key] != (unsigned)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;
@@ -524,6 +524,7 @@ bool ia_css_pipeline_is_mapped(unsigned int key)
 static void pipeline_stage_destroy(struct ia_css_pipeline_stage *stage)
 {
        unsigned int i;
+
        for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
                if (stage->out_frame_allocated[i]) {
                        ia_css_frame_free(stage->args.out_frame[i]);
@@ -555,7 +556,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)PIPELINE_NUM_UNMAPPED);
+               == (unsigned int)PIPELINE_NUM_UNMAPPED);
 
        for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++) {
                if (pipeline_sp_thread_list[i] ==
@@ -580,8 +581,9 @@ static void pipeline_map_num_to_sp_thread(unsigned int pipe_num)
 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)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;
@@ -615,7 +617,7 @@ static enum ia_css_err pipeline_stage_create(
        }
 
        stage = sh_css_malloc(sizeof(*stage));
-       if (stage == NULL) {
+       if (!stage) {
                err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                goto ERR;
        }
@@ -681,7 +683,7 @@ static enum ia_css_err pipeline_stage_create(
        *new_stage = stage;
        return err;
 ERR:
-       if (stage != NULL)
+       if (stage)
                pipeline_stage_destroy(stage);
        return err;
 }
@@ -714,7 +716,7 @@ static void ia_css_pipeline_set_zoom_stage(struct ia_css_pipeline *pipeline)
        struct ia_css_pipeline_stage *stage = NULL;
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       assert(pipeline != NULL);
+       assert(pipeline);
        if (pipeline->pipe_id == IA_CSS_PIPE_ID_PREVIEW) {
                /* in preview pipeline, vf_pp stage should do zoom */
                err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_VF_PP, &stage);
index aaf2e247cafbe0d2ed2eb6fbc02219e3b49257fb..9eb46411ac8b990d8a9a3b95e4d9d5768ab62626 100644 (file)
@@ -42,12 +42,12 @@ struct ia_css_queue_local {
        ia_css_circbuf_desc_t *cb_desc; /*Circbuf desc for local queues*/
        ia_css_circbuf_elem_t *cb_elems; /*Circbuf elements*/
 };
+
 typedef struct ia_css_queue_local ia_css_queue_local_t;
 
 /* Handle for queue object*/
 typedef struct ia_css_queue ia_css_queue_t;
 
-
 /*****************************************************************************
  * Queue Public APIs
  *****************************************************************************/
@@ -59,7 +59,7 @@ typedef struct ia_css_queue ia_css_queue_t;
  * @return     EINVAL - Invalid argument.
  *
  */
-extern int ia_css_queue_local_init(
+int ia_css_queue_local_init(
                        ia_css_queue_t *qhandle,
                        ia_css_queue_local_t *desc);
 
@@ -70,7 +70,7 @@ extern int ia_css_queue_local_init(
  * @return     0      - Successful init of remote queue instance.
  * @return     EINVAL - Invalid argument.
  */
-extern int ia_css_queue_remote_init(
+int ia_css_queue_remote_init(
                        ia_css_queue_t *qhandle,
                        ia_css_queue_remote_t *desc);
 
@@ -80,7 +80,7 @@ extern int ia_css_queue_remote_init(
  * @return     0 - Successful uninit.
  *
  */
-extern int ia_css_queue_uninit(
+int ia_css_queue_uninit(
                        ia_css_queue_t *qhandle);
 
 /* @brief Enqueue an item in the queue instance
@@ -92,7 +92,7 @@ extern int ia_css_queue_uninit(
  * @return     ENOBUFS - Queue is full.
  *
  */
-extern int ia_css_queue_enqueue(
+int ia_css_queue_enqueue(
                        ia_css_queue_t *qhandle,
                        uint32_t item);
 
@@ -106,7 +106,7 @@ extern int ia_css_queue_enqueue(
  * @return     ENODATA - Queue is empty.
  *
  */
-extern int ia_css_queue_dequeue(
+int ia_css_queue_dequeue(
                        ia_css_queue_t *qhandle,
                        uint32_t *item);
 
@@ -119,7 +119,7 @@ extern int ia_css_queue_dequeue(
  * @return     ENOSYS  - Function not implemented.
  *
  */
-extern int ia_css_queue_is_empty(
+int ia_css_queue_is_empty(
                        ia_css_queue_t *qhandle,
                        bool *is_empty);
 
@@ -132,7 +132,7 @@ extern int ia_css_queue_is_empty(
  * @return     ENOSYS  - Function not implemented.
  *
  */
-extern int ia_css_queue_is_full(
+int ia_css_queue_is_full(
                        ia_css_queue_t *qhandle,
                        bool *is_full);
 
@@ -144,7 +144,7 @@ extern int ia_css_queue_is_full(
  * @return     EINVAL  - Invalid argument.
  *
  */
-extern int ia_css_queue_get_used_space(
+int ia_css_queue_get_used_space(
                        ia_css_queue_t *qhandle,
                        uint32_t *size);
 
@@ -156,7 +156,7 @@ extern int ia_css_queue_get_used_space(
  * @return     EINVAL  - Invalid argument.
  *
  */
-extern int ia_css_queue_get_free_space(
+int ia_css_queue_get_free_space(
                        ia_css_queue_t *qhandle,
                        uint32_t *size);
 
@@ -164,15 +164,15 @@ extern int ia_css_queue_get_free_space(
  *
  * @param[in]  qhandle.  Handle to queue instance
  * @param[in]  offset   Offset of element to peek,
- *                      starting from head of queue
+ *                      starting from head of queue
  * @param[in]  element   Value of element returned
  * @return     0       - Successfully access state.
  * @return     EINVAL  - Invalid argument.
  *
  */
-extern int ia_css_queue_peek(
+int ia_css_queue_peek(
                ia_css_queue_t *qhandle,
-               uint32_t offset,
+               u32 offset,
                uint32_t *element);
 
 /* @brief Get the usable size for the queue
@@ -184,9 +184,8 @@ extern int ia_css_queue_peek(
  * @return     ENOSYS  - Function not implemented.
  *
  */
-extern int ia_css_queue_get_size(
+int ia_css_queue_get_size(
                ia_css_queue_t *qhandle,
                uint32_t *size);
 
 #endif /* __IA_CSS_QUEUE_H */
-
index 4ebaeb0c18470f86079cb9b97a2cae6ea4f5290b..04c9c1c84e8601d45970149d84e0ac8023580e6a 100644 (file)
@@ -58,12 +58,12 @@ DMAed to access single element.*/
 
 /* Remote Queue object descriptor */
 struct ia_css_queue_remote {
-       uint32_t cb_desc_addr; /*Circbuf desc address for remote queues*/
-       uint32_t cb_elems_addr; /*Circbuf elements addr for remote queue*/
-       uint8_t location;    /* Cell location for queue */
-       uint8_t proc_id;     /* Processor id for queue access */
+       u32 cb_desc_addr; /*Circbuf desc address for remote queues*/
+       u32 cb_elems_addr; /*Circbuf elements addr for remote queue*/
+       u8 location;    /* Cell location for queue */
+       u8 proc_id;     /* Processor id for queue access */
 };
-typedef struct ia_css_queue_remote ia_css_queue_remote_t;
 
+typedef struct ia_css_queue_remote ia_css_queue_remote_t;
 
 #endif /* __IA_CSS_QUEUE_COMM_H */
index 606376fdf0ba1fc5208b319cff4c551026615f1d..d8746e7f6a6868138637abbd9b98aedb364278d8 100644 (file)
@@ -88,7 +88,8 @@ int ia_css_queue_enqueue(
                        uint32_t item)
 {
        int error = 0;
-       if (NULL == qhandle)
+
+       if (!qhandle)
                return EINVAL;
 
        /* 1. Load the required queue object */
@@ -106,7 +107,7 @@ int ia_css_queue_enqueue(
        } else if (qhandle->type == IA_CSS_QUEUE_TYPE_REMOTE) {
                ia_css_circbuf_desc_t cb_desc;
                ia_css_circbuf_elem_t cb_elem;
-               uint32_t ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
+               u32 ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
 
                /* a. Load the queue cb_desc from remote */
                QUEUE_CB_DESC_INIT(&cb_desc);
@@ -146,7 +147,8 @@ int ia_css_queue_dequeue(
                        uint32_t *item)
 {
        int error = 0;
-       if (qhandle == NULL || NULL == item)
+
+       if (!qhandle || NULL == item)
                return EINVAL;
 
        /* 1. Load the required queue object */
@@ -164,7 +166,7 @@ int ia_css_queue_dequeue(
                /* a. Load the queue from remote */
                ia_css_circbuf_desc_t cb_desc;
                ia_css_circbuf_elem_t cb_elem;
-               uint32_t ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
+               u32 ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
 
                QUEUE_CB_DESC_INIT(&cb_desc);
 
@@ -202,7 +204,8 @@ int ia_css_queue_is_full(
                        bool *is_full)
 {
        int error = 0;
-       if ((qhandle == NULL) || (is_full == NULL))
+
+       if ((!qhandle) || (!is_full))
                return EINVAL;
 
        /* 1. Load the required queue object */
@@ -215,7 +218,8 @@ int ia_css_queue_is_full(
        } else if (qhandle->type == IA_CSS_QUEUE_TYPE_REMOTE) {
                /* a. Load the queue from remote */
                ia_css_circbuf_desc_t cb_desc;
-               uint32_t ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
+               u32 ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
+
                QUEUE_CB_DESC_INIT(&cb_desc);
                error = ia_css_queue_load(qhandle, &cb_desc, ignore_desc_flags);
                if (error != 0)
@@ -234,7 +238,8 @@ int ia_css_queue_get_free_space(
                        uint32_t *size)
 {
        int error = 0;
-       if ((qhandle == NULL) || (size == NULL))
+
+       if ((!qhandle) || (!size))
                return EINVAL;
 
        /* 1. Load the required queue object */
@@ -247,7 +252,8 @@ int ia_css_queue_get_free_space(
        } else if (qhandle->type == IA_CSS_QUEUE_TYPE_REMOTE) {
                /* a. Load the queue from remote */
                ia_css_circbuf_desc_t cb_desc;
-               uint32_t ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
+               u32 ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
+
                QUEUE_CB_DESC_INIT(&cb_desc);
                error = ia_css_queue_load(qhandle, &cb_desc, ignore_desc_flags);
                if (error != 0)
@@ -266,7 +272,8 @@ int ia_css_queue_get_used_space(
                        uint32_t *size)
 {
        int error = 0;
-       if ((qhandle == NULL) || (size == NULL))
+
+       if ((!qhandle) || (!size))
                return EINVAL;
 
        /* 1. Load the required queue object */
@@ -279,7 +286,8 @@ int ia_css_queue_get_used_space(
        } else if (qhandle->type == IA_CSS_QUEUE_TYPE_REMOTE) {
                /* a. Load the queue from remote */
                ia_css_circbuf_desc_t cb_desc;
-               uint32_t ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
+               u32 ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
+
                QUEUE_CB_DESC_INIT(&cb_desc);
                error = ia_css_queue_load(qhandle, &cb_desc, ignore_desc_flags);
                if (error != 0)
@@ -295,13 +303,13 @@ int ia_css_queue_get_used_space(
 
 int ia_css_queue_peek(
                ia_css_queue_t *qhandle,
-               uint32_t offset,
+               u32 offset,
                uint32_t *element)
 {
-       uint32_t num_elems = 0;
+       u32 num_elems = 0;
        int error = 0;
 
-       if ((qhandle == NULL) || (element == NULL))
+       if ((!qhandle) || (!element))
                return EINVAL;
 
        /* 1. Load the required queue object */
@@ -314,13 +322,13 @@ int ia_css_queue_peek(
                if (offset > num_elems)
                        return EINVAL;
 
-               *element = ia_css_circbuf_peek_from_start(&qhandle->desc.cb_local, (int) offset);
+               *element = ia_css_circbuf_peek_from_start(&qhandle->desc.cb_local, (int)offset);
                return 0;
        } else if (qhandle->type == IA_CSS_QUEUE_TYPE_REMOTE) {
                /* a. Load the queue from remote */
                ia_css_circbuf_desc_t cb_desc;
                ia_css_circbuf_elem_t cb_elem;
-               uint32_t ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
+               u32 ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
 
                QUEUE_CB_DESC_INIT(&cb_desc);
 
@@ -350,7 +358,8 @@ int ia_css_queue_is_empty(
                        bool *is_empty)
 {
        int error = 0;
-       if ((qhandle == NULL) || (is_empty == NULL))
+
+       if ((!qhandle) || (!is_empty))
                return EINVAL;
 
        /* 1. Load the required queue object */
@@ -363,7 +372,7 @@ int ia_css_queue_is_empty(
        } else if (qhandle->type == IA_CSS_QUEUE_TYPE_REMOTE) {
                /* a. Load the queue from remote */
                ia_css_circbuf_desc_t cb_desc;
-               uint32_t ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
+               u32 ignore_desc_flags = QUEUE_IGNORE_STEP_FLAG;
 
                QUEUE_CB_DESC_INIT(&cb_desc);
                error = ia_css_queue_load(qhandle, &cb_desc, ignore_desc_flags);
@@ -383,7 +392,8 @@ int ia_css_queue_get_size(
                        uint32_t *size)
 {
        int error = 0;
-       if ((qhandle == NULL) || (size == NULL))
+
+       if ((!qhandle) || (!size))
                return EINVAL;
 
        /* 1. Load the required queue object */
@@ -396,7 +406,7 @@ int ia_css_queue_get_size(
        } else if (qhandle->type == IA_CSS_QUEUE_TYPE_REMOTE) {
                /* a. Load the queue from remote */
                ia_css_circbuf_desc_t cb_desc;
-               uint32_t ignore_desc_flags = QUEUE_IGNORE_START_END_STEP_FLAGS;
+               u32 ignore_desc_flags = QUEUE_IGNORE_START_END_STEP_FLAGS;
 
                QUEUE_CB_DESC_INIT(&cb_desc);
 
index 7bb2b494836e8d16eaafe99415966b09f6436339..d9243184c112bebdbbfcc6308f8a165c21e7c656 100644 (file)
@@ -40,7 +40,7 @@ int ia_css_queue_load(
                ia_css_circbuf_desc_t *cb_desc,
                uint32_t ignore_desc_flags)
 {
-       if (rdesc == NULL || cb_desc == NULL)
+       if (!rdesc || !cb_desc)
                return EINVAL;
 
        if (rdesc->location == IA_CSS_QUEUE_LOC_SP) {
@@ -51,7 +51,7 @@ int ia_css_queue_load(
                                rdesc->desc.remote.cb_desc_addr
                                + offsetof(ia_css_circbuf_desc_t, size));
 
-                       if (0 == cb_desc->size) {
+                       if (cb_desc->size == 0) {
                                /* Adding back the workaround which was removed
                                   while refactoring queues. When reading size
                                   through sp_dmem_load_*, sometimes we get back
@@ -95,7 +95,7 @@ int ia_css_queue_store(
                ia_css_circbuf_desc_t *cb_desc,
                uint32_t ignore_desc_flags)
 {
-       if (rdesc == NULL || cb_desc == NULL)
+       if (!rdesc || !cb_desc)
                return EINVAL;
 
        if (rdesc->location == IA_CSS_QUEUE_LOC_SP) {
@@ -139,10 +139,10 @@ int ia_css_queue_store(
 
 int ia_css_queue_item_load(
                struct ia_css_queue *rdesc,
-               uint8_t position,
+               u8 position,
                ia_css_circbuf_elem_t *item)
 {
-       if (rdesc == NULL || item == NULL)
+       if (!rdesc || !item)
                return EINVAL;
 
        if (rdesc->location == IA_CSS_QUEUE_LOC_SP) {
@@ -166,10 +166,10 @@ int ia_css_queue_item_load(
 
 int ia_css_queue_item_store(
                struct ia_css_queue *rdesc,
-               uint8_t position,
+               u8 position,
                ia_css_circbuf_elem_t *item)
 {
-       if (rdesc == NULL || item == NULL)
+       if (!rdesc || !item)
                return EINVAL;
 
        if (rdesc->location == IA_CSS_QUEUE_LOC_SP) {
index 4775513f54cf19f516cf39f512d5f19b42effd95..3438288474bdc3d64ab2308df797fc8e48afe65c 100644 (file)
@@ -63,39 +63,39 @@ more details.
                (cb_desc)->step  = 0;   \
                (cb_desc)->start = 0;   \
                (cb_desc)->end   = 0;   \
-       } while(0)
+       } while (0)
 
 struct ia_css_queue {
-       uint8_t type;        /* Specify remote/local type of access */
-       uint8_t location;    /* Cell location for queue */
-       uint8_t proc_id;     /* Processor id for queue access */
+       u8 type;        /* Specify remote/local type of access */
+       u8 location;    /* Cell location for queue */
+       u8 proc_id;     /* Processor id for queue access */
        union {
                ia_css_circbuf_t cb_local;
                struct {
-                       uint32_t cb_desc_addr; /*Circbuf desc address for remote queues*/
-                       uint32_t cb_elems_addr; /*Circbuf elements addr for remote queue*/
+                       u32 cb_desc_addr; /*Circbuf desc address for remote queues*/
+                       u32 cb_elems_addr; /*Circbuf elements addr for remote queue*/
                }       remote;
        } desc;
 };
 
-extern int ia_css_queue_load(
+int ia_css_queue_load(
                struct ia_css_queue *rdesc,
                ia_css_circbuf_desc_t *cb_desc,
                uint32_t ignore_desc_flags);
 
-extern int ia_css_queue_store(
+int ia_css_queue_store(
                struct ia_css_queue *rdesc,
                ia_css_circbuf_desc_t *cb_desc,
                uint32_t ignore_desc_flags);
 
-extern int ia_css_queue_item_load(
+int ia_css_queue_item_load(
                struct ia_css_queue *rdesc,
-               uint8_t position,
+               u8 position,
                ia_css_circbuf_elem_t *item);
 
-extern int ia_css_queue_item_store(
+int ia_css_queue_item_store(
                struct ia_css_queue *rdesc,
-               uint8_t position,
+               u8 position,
                ia_css_circbuf_elem_t *item);
 
 #endif /* __QUEUE_ACCESS_H */
index 90ac27cf02cffb6c49584d15e85112001a78ebe0..b81acc80d861edd3fe41e212b701028eb14013bd 100644 (file)
@@ -40,18 +40,18 @@ more details.
  */
 struct ia_css_rmgr_vbuf_handle {
        hrt_vaddress vptr;
-       uint8_t count;
-       uint32_t size;
+       u8 count;
+       u32 size;
 };
 
 /**
  * @brief Data structure for the resource pool (host, vbuf)
  */
 struct ia_css_rmgr_vbuf_pool {
-       uint8_t copy_on_write;
-       uint8_t recycle;
-       uint32_t size;
-       uint32_t index;
+       u8 copy_on_write;
+       u8 recycle;
+       u32 size;
+       u32 index;
        struct ia_css_rmgr_vbuf_handle **handles;
 };
 
index a4d8a48f95ba9a20d861aa0e4dc5af3bb9d4e237..d49f50b61931287404861cd969e9e6fff9db4494 100644 (file)
@@ -81,7 +81,8 @@ void ia_css_rmgr_refcount_retain_vbuf(struct ia_css_rmgr_vbuf_handle **handle)
 {
        int i;
        struct ia_css_rmgr_vbuf_handle *h;
-       if ((handle == NULL) || (*handle == NULL)) {
+
+       if ((!handle) || (!*handle)) {
                IA_CSS_LOG("Invalid inputs");
                return;
        }
@@ -98,7 +99,7 @@ void ia_css_rmgr_refcount_retain_vbuf(struct ia_css_rmgr_vbuf_handle **handle)
                /* if the loop dus not break and *handle == NULL
                   this is an error handle and report it.
                 */
-               if (*handle == NULL) {
+               if (!*handle) {
                        ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
                                "ia_css_i_host_refcount_retain_vbuf() failed to find empty slot!\n");
                        return;
@@ -116,7 +117,7 @@ void ia_css_rmgr_refcount_retain_vbuf(struct ia_css_rmgr_vbuf_handle **handle)
  */
 void ia_css_rmgr_refcount_release_vbuf(struct ia_css_rmgr_vbuf_handle **handle)
 {
-       if ((handle == NULL) || ((*handle) == NULL) || (((*handle)->count) == 0)) {
+       if ((!handle) || ((*handle) == NULL) || (((*handle)->count) == 0)) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
                                    "ia_css_rmgr_refcount_release_vbuf() invalid arguments!\n");
                return;
@@ -140,9 +141,10 @@ enum ia_css_err ia_css_rmgr_init_vbuf(struct ia_css_rmgr_vbuf_pool *pool)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
        size_t bytes_needed;
+
        rmgr_refcount_init_vbuf();
-       assert(pool != NULL);
-       if (pool == NULL)
+       assert(pool);
+       if (!pool)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        /* initialize the recycle pool if used */
        if (pool->recycle && pool->size) {
@@ -151,7 +153,7 @@ enum ia_css_err ia_css_rmgr_init_vbuf(struct ia_css_rmgr_vbuf_pool *pool)
                    sizeof(void *) *
                    pool->size;
                pool->handles = sh_css_malloc(bytes_needed);
-               if (pool->handles != NULL)
+               if (pool->handles)
                        memset(pool->handles, 0, bytes_needed);
                else
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
@@ -170,16 +172,17 @@ enum ia_css_err ia_css_rmgr_init_vbuf(struct ia_css_rmgr_vbuf_pool *pool)
  */
 void ia_css_rmgr_uninit_vbuf(struct ia_css_rmgr_vbuf_pool *pool)
 {
-       uint32_t i;
+       u32 i;
+
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_rmgr_uninit_vbuf()\n");
-       if (pool == NULL) {
+       if (!pool) {
                ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR, "ia_css_rmgr_uninit_vbuf(): NULL argument\n");
                return;
        }
-       if (pool->handles != NULL) {
+       if (pool->handles) {
                /* free the hmm buffers */
                for (i = 0; i < pool->size; i++) {
-                       if (pool->handles[i] != NULL) {
+                       if (pool->handles[i]) {
                                ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                                      "   freeing/releasing %x (count=%d)\n",
                                      pool->handles[i]->vptr,
@@ -207,14 +210,15 @@ static
 void rmgr_push_handle(struct ia_css_rmgr_vbuf_pool *pool,
                      struct ia_css_rmgr_vbuf_handle **handle)
 {
-       uint32_t i;
+       u32 i;
        bool succes = false;
-       assert(pool != NULL);
+
+       assert(pool);
        assert(pool->recycle);
-       assert(pool->handles != NULL);
-       assert(handle != NULL);
+       assert(pool->handles);
+       assert(handle);
        for (i = 0; i < pool->size; i++) {
-               if (pool->handles[i] == NULL) {
+               if (!pool->handles[i]) {
                        ia_css_rmgr_refcount_retain_vbuf(handle);
                        pool->handles[i] = *handle;
                        succes = true;
@@ -234,15 +238,16 @@ static
 void rmgr_pop_handle(struct ia_css_rmgr_vbuf_pool *pool,
                     struct ia_css_rmgr_vbuf_handle **handle)
 {
-       uint32_t i;
+       u32 i;
        bool succes = false;
-       assert(pool != NULL);
+
+       assert(pool);
        assert(pool->recycle);
-       assert(pool->handles != NULL);
-       assert(handle != NULL);
-       assert(*handle != NULL);
+       assert(pool->handles);
+       assert(handle);
+       assert(*handle);
        for (i = 0; i < pool->size; i++) {
-               if ((pool->handles[i] != NULL) &&
+               if ((pool->handles[i]) &&
                    (pool->handles[i]->size == (*handle)->size)) {
                        *handle = pool->handles[i];
                        pool->handles[i] = NULL;
@@ -265,7 +270,7 @@ void ia_css_rmgr_acq_vbuf(struct ia_css_rmgr_vbuf_pool *pool,
 {
        struct ia_css_rmgr_vbuf_handle h;
 
-       if ((pool == NULL) || (handle == NULL) || (*handle == NULL)) {
+       if ((!pool) || (!handle) || (!*handle)) {
                IA_CSS_LOG("Invalid inputs");
                return;
        }
@@ -311,7 +316,7 @@ void ia_css_rmgr_acq_vbuf(struct ia_css_rmgr_vbuf_pool *pool,
 void ia_css_rmgr_rel_vbuf(struct ia_css_rmgr_vbuf_pool *pool,
                          struct ia_css_rmgr_vbuf_handle **handle)
 {
-       if ((pool == NULL) || (handle == NULL) || (*handle == NULL)) {
+       if ((!pool) || (!handle) || (!*handle)) {
                IA_CSS_LOG("Invalid inputs");
                return;
        }
index bc4b1723369ec71664ea0821a2b5605428e2c44b..39b82c4685e7284f76bf6b558c6f9fbeef9bd00d 100644 (file)
@@ -35,18 +35,17 @@ more details.
 #include <ia_css_err.h>
 #include "ia_css_spctrl_comm.h"
 
-
 typedef struct {
-       uint32_t        ddr_data_offset;       /**  posistion of data in DDR */
-       uint32_t        dmem_data_addr;        /** data segment address in dmem */
-       uint32_t        dmem_bss_addr;         /** bss segment address in dmem  */
-       uint32_t        data_size;             /** data segment size            */
-       uint32_t        bss_size;              /** bss segment size             */
-       uint32_t        spctrl_config_dmem_addr; /* <location of dmem_cfg  in SP dmem */
-       uint32_t        spctrl_state_dmem_addr;  /* < location of state  in SP dmem */
+       u32        ddr_data_offset;       /**  posistion of data in DDR */
+       u32        dmem_data_addr;        /** data segment address in dmem */
+       u32        dmem_bss_addr;         /** bss segment address in dmem  */
+       u32        data_size;             /** data segment size            */
+       u32        bss_size;              /** bss segment size             */
+       u32        spctrl_config_dmem_addr; /* <location of dmem_cfg  in SP dmem */
+       u32        spctrl_state_dmem_addr;  /* < location of state  in SP dmem */
        unsigned int    sp_entry;                /* < entry function ptr on SP */
        const void      *code;                   /** location of firmware */
-       uint32_t         code_size;
+       u32         code_size;
        char      *program_name;    /** not used on hardware, only for simulation */
 } ia_css_spctrl_cfg;
 
@@ -67,7 +66,6 @@ void sh_css_spctrl_reload_fw(sp_ID_t sp_id);
 */
 enum ia_css_err ia_css_spctrl_unload_fw(sp_ID_t sp_id);
 
-
 /*! Intilaize dmem_cfg in SP dmem  and  start SP program
 */
 enum ia_css_err ia_css_spctrl_start(sp_ID_t sp_id);
index 2620d7514f79c63d55dfe1126e9a4687cba327dd..16e6fc0018453e71f86bade7ed8943a07432daca 100644 (file)
@@ -46,10 +46,10 @@ typedef enum {
  */
 struct ia_css_sp_init_dmem_cfg {
        ia_css_ptr      ddr_data_addr;  /** data segment address in ddr  */
-       uint32_t        dmem_data_addr; /** data segment address in dmem */
-       uint32_t        dmem_bss_addr;  /** bss segment address in dmem  */
-       uint32_t        data_size;      /** data segment size            */
-       uint32_t        bss_size;       /** bss segment size             */
+       u32        dmem_data_addr; /** data segment address in dmem */
+       u32        dmem_bss_addr;  /** bss segment address in dmem  */
+       u32        data_size;      /** data segment size            */
+       u32        bss_size;       /** bss segment size             */
        sp_ID_t         sp_id;          /* <sp Id */
 };
 
index 844e4d536cecc612c308bd756fd94ae44706a788..6166619c24325bfb6173822fd8d36290bdf204c9 100644 (file)
@@ -39,11 +39,11 @@ more details.
 
 struct spctrl_context_info {
        struct ia_css_sp_init_dmem_cfg dmem_config;
-       uint32_t        spctrl_config_dmem_addr; /* location of dmem_cfg  in SP dmem */
-       uint32_t        spctrl_state_dmem_addr;
+       u32        spctrl_config_dmem_addr; /* location of dmem_cfg  in SP dmem */
+       u32        spctrl_state_dmem_addr;
        unsigned int    sp_entry;           /* entry function ptr on SP */
        hrt_vaddress    code_addr;          /* sp firmware location in host mem-DDR*/
-       uint32_t        code_size;
+       u32        code_size;
        char           *program_name;       /* used in case of PLATFORM_SIM */
 };
 
@@ -57,7 +57,7 @@ enum ia_css_err ia_css_spctrl_load_fw(sp_ID_t sp_id,
        hrt_vaddress code_addr = mmgr_NULL;
        struct ia_css_sp_init_dmem_cfg *init_dmem_cfg;
 
-       if ((sp_id >= N_SP_ID) || (spctrl_cfg == NULL))
+       if ((sp_id >= N_SP_ID) || (!spctrl_cfg))
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        spctrl_cofig_info[sp_id].code_addr = mmgr_NULL;
@@ -172,22 +172,23 @@ ia_css_spctrl_sp_sw_state ia_css_spctrl_get_state(sp_ID_t sp_id)
 {
        ia_css_spctrl_sp_sw_state state = 0;
        unsigned int HIVE_ADDR_sp_sw_state;
+
        if (sp_id >= N_SP_ID)
                return IA_CSS_SP_SW_TERMINATED;
 
        HIVE_ADDR_sp_sw_state = spctrl_cofig_info[sp_id].spctrl_state_dmem_addr;
        (void)HIVE_ADDR_sp_sw_state; /* Suppres warnings in CRUN */
        if (sp_id == SP0_ID)
-               state = sp_dmem_load_uint32(sp_id, (unsigned)sp_address_of(sp_sw_state));
+               state = sp_dmem_load_uint32(sp_id, (unsigned int)sp_address_of(sp_sw_state));
        return state;
 }
 
 int ia_css_spctrl_is_idle(sp_ID_t sp_id)
 {
        int state = 0;
-       assert (sp_id < N_SP_ID);
+
+       assert(sp_id < N_SP_ID);
 
        state = sp_ctrl_getbit(sp_id, SP_SC_REG, SP_IDLE_BIT);
        return state;
 }
-
index d0d74957358be0ec108299cc9323d8091b67ebe2..0a8bc1da06f6aa9ba69a9ff3c13df7954a12e9de 100644 (file)
@@ -49,11 +49,11 @@ more details.
  * @brief Data structure for the tagger buffer element.
  */
 typedef struct {
-       uint32_t frame; /* the frame value stored in the element */
-       uint32_t param; /* the param value stored in the element */
-       uint8_t mark;   /* the mark on the element */
-       uint8_t lock;   /* the lock on the element */
-       uint8_t exp_id; /* exp_id of frame, for debugging only */
+       u32 frame;      /* the frame value stored in the element */
+       u32 param;      /* the param value stored in the element */
+       u8 mark;        /* the mark on the element */
+       u8 lock;        /* the lock on the element */
+       u8 exp_id; /* exp_id of frame, for debugging only */
 } ia_css_tagger_buf_sp_elem_t;
 
 #endif /* __IA_CSS_TAGGER_COMMON_H__ */
index b7dd18492a91b72f5d8bca9b28c8c3ae629c41ff..c1d63e5a26566de320e2a6319c34ccb7dc29fb77 100644 (file)
@@ -37,12 +37,10 @@ more details.
 enum ia_css_err
 ia_css_timer_get_current_tick(
        struct ia_css_clock_tick *curr_ts) {
-
-       assert(curr_ts !=  NULL);
-       if (curr_ts == NULL) {
+       assert(curr_ts);
+       if (!curr_ts) {
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
        curr_ts->ticks = (clock_value_t)gp_timer_read(GP_TIMER_SEL);
        return IA_CSS_SUCCESS;
 }
-
index 230b4cc60767cbd93abcd1972090384bbd61ed5b..e094d1c3ea4dc94ad825371042befcd52334ef31 100644 (file)
@@ -110,11 +110,11 @@ static int thread_alive;
 #define JPEG_BYTES (16 * 1024 * 1024)
 
 #define STATS_ENABLED(stage) (stage && stage->binary && stage->binary->info && \
-        (stage->binary->info->sp.enable.s3a || stage->binary->info->sp.enable.dis))
+       (stage->binary->info->sp.enable.s3a || stage->binary->info->sp.enable.dis))
 
 struct sh_css my_css;
 
-int (*sh_css_printf) (const char *fmt, va_list args) = NULL;
+int (*sh_css_printf)(const char *fmt, va_list args) = NULL;
 
 /* modes of work: stream_create and stream_destroy will update the save/restore data
    only when in working mode, not suspend/resume
@@ -145,7 +145,7 @@ struct sh_css_stream_seed {
 */
 struct sh_css_save {
        enum ia_sh_css_modes            mode;
-       uint32_t                       mmu_base;                                /* the last mmu_base */
+       u32                    mmu_base;                                /* the last mmu_base */
        enum ia_css_irq_type           irq_type;
        struct sh_css_stream_seed      stream_seeds[MAX_ACTIVE_STREAMS];
        struct ia_css_fw               *loaded_fw;                              /* fw struct previously loaded */
@@ -170,9 +170,9 @@ struct sh_css_hmm_buffer_record {
 
 static struct sh_css_hmm_buffer_record hmm_buffer_record[MAX_HMM_BUFFER_NUM];
 
-#define GPIO_FLASH_PIN_MASK (1 << HIVE_GPIO_STROBE_TRIGGER_PIN)
+#define GPIO_FLASH_PIN_MASK BIT(HIVE_GPIO_STROBE_TRIGGER_PIN)
 
-static bool fw_explicitly_loaded = false;
+static bool fw_explicitly_loaded;
 
 /*
  * Local prototypes
@@ -235,7 +235,7 @@ static void
 ia_css_pipe_unload_extension(struct ia_css_pipe *pipe,
                struct ia_css_fw_info *firmware);
 static void
-ia_css_reset_defaults(struct sh_csscss);
+ia_css_reset_defaults(struct sh_css *css);
 
 static void
 sh_css_init_host_sp_control_vars(void);
@@ -333,7 +333,7 @@ create_host_video_pipeline(struct ia_css_pipe *pipe);
 
 static enum ia_css_err
 create_host_copy_pipeline(struct ia_css_pipe *pipe,
-    unsigned max_input_width,
+    unsigned int max_input_width,
     struct ia_css_frame *out_frame);
 
 static enum ia_css_err
@@ -382,7 +382,6 @@ ia_css_get_acc_configs(
        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);
 #endif
@@ -413,8 +412,8 @@ aspect_ratio_crop(struct ia_css_pipe *curr_pipe,
 static void
 sh_css_pipe_free_shading_table(struct ia_css_pipe *pipe)
 {
-       assert(pipe != NULL);
-       if (pipe == NULL) {
+       assert(pipe);
+       if (!pipe) {
                IA_CSS_ERROR("NULL input parameter");
                return;
        }
@@ -458,13 +457,13 @@ 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 != NULL);
-       assert(pipe->stream != NULL);
+       assert(pipe);
+       assert(pipe->stream);
 
        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++)
+               for (i = 0; i < ARRAY_SIZE(yuv420_copy_formats) && !found; i++)
                        found = (out_fmt == yuv420_copy_formats[i]);
                break;
        case ATOMISP_INPUT_FORMAT_YUV420_10:
@@ -472,7 +471,7 @@ verify_copy_out_frame_format(struct ia_css_pipe *pipe)
                found = (out_fmt == IA_CSS_FRAME_FORMAT_YUV420_16);
                break;
        case ATOMISP_INPUT_FORMAT_YUV422_8:
-               for (i=0; i<ARRAY_SIZE(yuv422_copy_formats) && !found; i++)
+               for (i = 0; i < ARRAY_SIZE(yuv422_copy_formats) && !found; i++)
                        found = (out_fmt == yuv422_copy_formats[i]);
                break;
        case ATOMISP_INPUT_FORMAT_YUV422_10:
@@ -517,7 +516,7 @@ ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream)
 {
        int bpp = 0;
 
-       if (stream != NULL)
+       if (stream)
                bpp = ia_css_util_input_format_bpp(stream->config.input_config.format,
                                                stream->config.pixels_per_clock == 2);
 
@@ -533,8 +532,8 @@ sh_css_config_input_network(struct ia_css_stream *stream)
        struct ia_css_binary *binary = NULL;
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       assert(stream != NULL);
-       assert(pipe != NULL);
+       assert(stream);
+       assert(pipe);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                "sh_css_config_input_network() enter:\n");
@@ -836,7 +835,7 @@ 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.nr_of_frames = (uint32_t) ~(0x0);
+               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;
 
@@ -853,7 +852,7 @@ 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.nr_of_frames = (uint32_t) ~(0x0);
+               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;
 
@@ -933,16 +932,13 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_resolution(
        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) {
-
                if (stream_cfg->source.port.compression.uncompressed_bits_per_pixel ==
                        UNCOMPRESSED_BITS_PER_PIXEL_10) {
                                fmt_type = ATOMISP_INPUT_FORMAT_RAW_10;
-               }
-               else if (stream_cfg->source.port.compression.uncompressed_bits_per_pixel ==
+               } else if (stream_cfg->source.port.compression.uncompressed_bits_per_pixel ==
                        UNCOMPRESSED_BITS_PER_PIXEL_12) {
                                fmt_type = ATOMISP_INPUT_FORMAT_RAW_12;
-               }
-               else
+               } else
                        return false;
        }
 
@@ -988,7 +984,7 @@ static bool sh_css_translate_stream_cfg_to_isys_stream_descr(
        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
@@ -1009,7 +1005,7 @@ static bool sh_css_translate_stream_cfg_to_isys_stream_descr(
 
 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)
+               ia_css_isys_descr_t     *isys_stream_descr)
 {
        if (!binary)
                return false;
@@ -1030,10 +1026,10 @@ sh_css_config_input_network(struct ia_css_stream *stream)
        struct ia_css_pipe *pipe = NULL;
        struct ia_css_binary *binary = NULL;
        int i;
-       uint32_t isys_stream_id;
+       u32 isys_stream_id;
        bool early_polling = false;
 
-       assert(stream != NULL);
+       assert(stream);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                "sh_css_config_input_network() enter 0x%p:\n", stream);
 
@@ -1062,16 +1058,14 @@ sh_css_config_input_network(struct ia_css_stream *stream)
                }
        }
 
-       assert(pipe != NULL);
-       if (pipe == NULL)
+       assert(pipe);
+       if (!pipe)
                return IA_CSS_ERR_INTERNAL_ERROR;
 
-       if (pipe->pipeline.stages != NULL)
-               if (pipe->pipeline.stages->binary != NULL)
+       if (pipe->pipeline.stages)
+               if (pipe->pipeline.stages->binary)
                        binary = pipe->pipeline.stages->binary;
 
-
-
        if (binary) {
                /* this was being done in ifmtr in 2400.
                 * online and cont bypass the init_in_frameinfo_memory_defaults
@@ -1085,11 +1079,11 @@ sh_css_config_input_network(struct ia_css_stream *stream)
        if (!rc)
                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);
+       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++) {
                /* initialization */
-               memset((void*)(&isys_stream_descr), 0, sizeof(ia_css_isys_descr_t));
+               memset((void *)(&isys_stream_descr), 0, sizeof(ia_css_isys_descr_t));
                sp_pipeline_input_terminal->context.virtual_input_system_stream[i].valid = 0;
                sp_pipeline_input_terminal->ctrl.virtual_input_system_stream_cfg[i].valid = 0;
 
@@ -1098,7 +1092,7 @@ 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),
+                               &stream->config,
                                early_polling,
                                &(isys_stream_descr), i);
 
@@ -1116,18 +1110,18 @@ 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]),
+                               &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]),
+                               &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->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;
                }
        }
@@ -1142,7 +1136,8 @@ static inline struct ia_css_pipe *stream_get_last_pipe(
                struct ia_css_stream *stream)
 {
        struct ia_css_pipe *last_pipe = NULL;
-       if (stream != NULL)
+
+       if (stream)
                last_pipe = stream->last_pipe;
 
        return last_pipe;
@@ -1157,10 +1152,9 @@ static inline struct ia_css_pipe *stream_get_copy_pipe(
 
        last_pipe = stream_get_last_pipe(stream);
 
-       if ((stream != NULL) &&
-           (last_pipe != NULL) &&
+       if ((stream) &&
+           (last_pipe) &&
            (stream->config.continuous)) {
-
                pipe_id = last_pipe->mode;
                switch (pipe_id) {
                        case IA_CSS_PIPE_ID_PREVIEW:
@@ -1198,16 +1192,16 @@ static enum ia_css_err stream_csi_rx_helper(
        enum ia_css_err (*func)(enum mipi_port_id, uint32_t))
 {
        enum ia_css_err retval = IA_CSS_ERR_INTERNAL_ERROR;
-       uint32_t sp_thread_id, stream_id;
+       u32 sp_thread_id, stream_id;
        bool rc;
        struct ia_css_pipe *target_pipe = NULL;
 
-       if ((stream == NULL) || (stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR))
+       if ((!stream) || (stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR))
                goto exit;
 
        target_pipe = stream_get_target_pipe(stream);
 
-       if (target_pipe == NULL)
+       if (!target_pipe)
                goto exit;
 
        rc = ia_css_pipeline_get_sp_thread_id(
@@ -1221,7 +1215,8 @@ static enum ia_css_err stream_csi_rx_helper(
        stream_id = 0;
        do {
                if (stream->config.isys_config[stream_id].valid) {
-                       uint32_t isys_stream_id = ia_css_isys_generate_stream_id(sp_thread_id, stream_id);
+                       u32 isys_stream_id = ia_css_isys_generate_stream_id(sp_thread_id, stream_id);
+
                        retval = func(stream->config.source.port.port, isys_stream_id);
                }
                stream_id++;
@@ -1251,11 +1246,11 @@ static int sh_binary_running;         /* Enable sampling in the thread */
 
 static void print_pc_histo(char *core_name, struct sh_css_pc_histogram *hist)
 {
-       unsigned i;
-       unsigned cnt_run = 0;
-       unsigned cnt_stall = 0;
+       unsigned int i;
+       unsigned int cnt_run = 0;
+       unsigned int cnt_stall = 0;
 
-       if (hist == NULL)
+       if (!hist)
                return;
 
        sh_css_print("%s histogram length = %d\n", core_name, hist->length);
@@ -1270,8 +1265,7 @@ static void print_pc_histo(char *core_name, struct sh_css_pc_histogram *hist)
                cnt_stall += hist->stall[i];
        }
 
-       sh_css_print(" Statistics for %s, cnt_run = %d, cnt_stall = %d, "
-              "hist->length = %d\n",
+       sh_css_print(" Statistics for %s, cnt_run = %d, cnt_stall = %d, hist->length = %d\n",
                        core_name, cnt_run, cnt_stall, hist->length);
 }
 
@@ -1292,8 +1286,8 @@ static void print_pc_histogram(void)
                sh_css_print(" pc_histogram for binary %d\n", metrics->id);
                print_pc_histo("  ISP", &metrics->isp_histogram);
                print_pc_histo("  SP",   &metrics->sp_histogram);
-               sh_css_print("print_pc_histogram() done for binay->id = %d, "
-                            "done.\n", metrics->id);
+               sh_css_print("print_pc_histogram() done for binay->id = %d, done.\n",
+                            metrics->id);
        }
 
        sh_css_print("PC_MONITORING:print_pc_histogram() -- DONE\n");
@@ -1325,8 +1319,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",
+       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);
 }
 #endif /* WITH_PC_MONITORING */
@@ -1337,7 +1330,7 @@ start_binary(struct ia_css_pipe *pipe,
 {
        struct ia_css_stream *stream;
 
-       assert(pipe != NULL);
+       assert(pipe);
        /* Acceleration uses firmware, the binary thus can be NULL */
        /* assert(binary != NULL); */
 
@@ -1354,8 +1347,7 @@ start_binary(struct ia_css_pipe *pipe,
                sh_css_metrics_start_binary(&binary->metrics);
 
 #if WITH_PC_MONITORING
-       sh_css_print("PC_MONITORING: %s() -- binary id = %d , "
-                    "enable_dvs_envelope = %d\n",
+       sh_css_print("PC_MONITORING: %s() -- binary id = %d , enable_dvs_envelope = %d\n",
                     __func__, binary->info->sp.id,
                     binary->info->sp.enable.dvs_envelope);
        input_frame_info(binary->in_frame_info);
@@ -1378,12 +1370,11 @@ static enum ia_css_err
 start_copy_on_sp(struct ia_css_pipe *pipe,
                 struct ia_css_frame *out_frame)
 {
-
        (void)out_frame;
-       assert(pipe != NULL);
-       assert(pipe->stream != NULL);
+       assert(pipe);
+       assert(pipe->stream);
 
-       if ((pipe == NULL) || (pipe->stream == NULL))
+       if ((!pipe) || (!pipe->stream))
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
 #if !defined(HAS_NO_INPUT_SYSTEM) && !defined(USE_INPUT_SYSTEM_VERSION_2401)
@@ -1438,7 +1429,7 @@ static void start_pipe(
        IA_CSS_ENTER_PRIVATE("me = %p, copy_ovrd = %d, input_mode = %d",
                             me, copy_ovrd, input_mode);
 
-       assert(me != NULL); /* all callers are in this file and call with non null argument */
+       assert(me); /* all callers are in this file and call with non null argument */
 
        sh_css_sp_init_pipeline(&me->pipeline,
                                me->mode,
@@ -1453,18 +1444,19 @@ static void start_pipe(
                                &me->stream->config.metadata_config,
                                &me->stream->info.metadata_info
 #if !defined(HAS_NO_INPUT_SYSTEM)
-                               ,(input_mode==IA_CSS_INPUT_MODE_MEMORY) ?
+                               , (input_mode == IA_CSS_INPUT_MODE_MEMORY) ?
                                        (enum mipi_port_id)0 :
                                        me->stream->config.source.port.port
 #endif
 #ifdef ISP2401
-                               ,&me->config.internal_frame_origin_bqs_on_sctbl,
+                               , &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;
+
                stage = me->pipeline.stages;
                if (stage) {
                        me->pipeline.current_stage = stage;
@@ -1478,13 +1470,14 @@ void
 sh_css_invalidate_shading_tables(struct ia_css_stream *stream)
 {
        int i;
-       assert(stream != NULL);
+
+       assert(stream);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                "sh_css_invalidate_shading_tables() enter:\n");
 
-       for (i=0; i<stream->num_pipes; i++) {
-               assert(stream->pipes[i] != NULL);
+       for (i = 0; i < stream->num_pipes; i++) {
+               assert(stream->pipes[i]);
                sh_css_pipe_free_shading_table(stream->pipes[i]);
        }
 
@@ -1500,6 +1493,7 @@ enable_interrupts(enum ia_css_irq_type irq_type)
        enum mipi_port_id port;
 #endif
        bool enable_pulse = irq_type != IA_CSS_IRQ_TYPE_EDGE;
+
        IA_CSS_ENTER_PRIVATE("");
        /* Enable IRQ on the SP which signals that SP goes to idle
         * (aka ready state) */
@@ -1536,10 +1530,10 @@ 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,
+                                                       const char *program,
                                                        ia_css_spctrl_cfg  *spctrl_cfg)
 {
-       if((fw == NULL)||(spctrl_cfg == NULL))
+       if ((!fw) || (!spctrl_cfg))
                return false;
        spctrl_cfg->sp_entry = 0;
        spctrl_cfg->program_name = (char *)(program);
@@ -1547,7 +1541,7 @@ static bool sh_css_setup_spctrl_config(const struct ia_css_fw_info *fw,
        spctrl_cfg->ddr_data_offset =  fw->blob.data_source;
        spctrl_cfg->dmem_data_addr = fw->blob.data_target;
        spctrl_cfg->dmem_bss_addr = fw->blob.bss_target;
-       spctrl_cfg->data_size = fw->blob.data_size ;
+       spctrl_cfg->data_size = fw->blob.data_size;
        spctrl_cfg->bss_size = fw->blob.bss_size;
 
        spctrl_cfg->spctrl_config_dmem_addr = fw->info.sp.init_dmem_data;
@@ -1559,6 +1553,7 @@ static bool sh_css_setup_spctrl_config(const struct ia_css_fw_info *fw,
 
        return true;
 }
+
 void
 ia_css_unload_firmware(void)
 {
@@ -1572,7 +1567,7 @@ ia_css_unload_firmware(void)
 }
 
 static void
-ia_css_reset_defaults(struct sh_csscss)
+ia_css_reset_defaults(struct sh_css *css)
 {
        struct sh_css default_css;
 
@@ -1598,7 +1593,7 @@ ia_css_check_firmware_version(const struct ia_css_fw  *fw)
 {
        bool retval = false;
 
-       if (fw != NULL) {
+       if (fw) {
                retval = sh_css_check_firmware_version(fw->data);
        }
        return retval;
@@ -1610,9 +1605,9 @@ ia_css_load_firmware(const struct ia_css_env *env,
 {
        enum ia_css_err err;
 
-       if (env == NULL)
+       if (!env)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
-       if (fw == NULL)
+       if (!fw)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_load_firmware() enter\n");
@@ -1631,14 +1626,14 @@ ia_css_load_firmware(const struct ia_css_env *env,
                        fw_explicitly_loaded = true;
        }
 
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_load_firmware() leave \n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_load_firmware() leave\n");
        return err;
 }
 
 enum ia_css_err
 ia_css_init(const struct ia_css_env *env,
            const struct ia_css_fw  *fw,
-           uint32_t                 mmu_l1_base,
+           u32                 mmu_l1_base,
            enum ia_css_irq_type     irq_type)
 {
        enum ia_css_err err;
@@ -1664,29 +1659,29 @@ ia_css_init(const struct ia_css_env *env,
         * equal, functionality will break.
         */
        /* Check struct sh_css_ddr_address_map */
-       COMPILATION_ERROR_IF( sizeof(struct sh_css_ddr_address_map)             != SIZE_OF_SH_CSS_DDR_ADDRESS_MAP_STRUCT        );
+       COMPILATION_ERROR_IF(sizeof(struct sh_css_ddr_address_map)              != SIZE_OF_SH_CSS_DDR_ADDRESS_MAP_STRUCT);
        /* Check struct host_sp_queues */
-       COMPILATION_ERROR_IF( sizeof(struct host_sp_queues)                     != SIZE_OF_HOST_SP_QUEUES_STRUCT                );
-       COMPILATION_ERROR_IF( sizeof(struct ia_css_circbuf_desc_s)              != SIZE_OF_IA_CSS_CIRCBUF_DESC_S_STRUCT         );
-       COMPILATION_ERROR_IF( sizeof(struct ia_css_circbuf_elem_s)              != SIZE_OF_IA_CSS_CIRCBUF_ELEM_S_STRUCT         );
+       COMPILATION_ERROR_IF(sizeof(struct host_sp_queues)                      != SIZE_OF_HOST_SP_QUEUES_STRUCT);
+       COMPILATION_ERROR_IF(sizeof(struct ia_css_circbuf_desc_s)               != SIZE_OF_IA_CSS_CIRCBUF_DESC_S_STRUCT);
+       COMPILATION_ERROR_IF(sizeof(struct ia_css_circbuf_elem_s)               != SIZE_OF_IA_CSS_CIRCBUF_ELEM_S_STRUCT);
 
        /* Check struct host_sp_communication */
-       COMPILATION_ERROR_IF( sizeof(struct host_sp_communication)              != SIZE_OF_HOST_SP_COMMUNICATION_STRUCT         );
-       COMPILATION_ERROR_IF( sizeof(struct sh_css_event_irq_mask)              != SIZE_OF_SH_CSS_EVENT_IRQ_MASK_STRUCT         );
+       COMPILATION_ERROR_IF(sizeof(struct host_sp_communication)               != SIZE_OF_HOST_SP_COMMUNICATION_STRUCT);
+       COMPILATION_ERROR_IF(sizeof(struct sh_css_event_irq_mask)               != SIZE_OF_SH_CSS_EVENT_IRQ_MASK_STRUCT);
 
        /* Check struct sh_css_hmm_buffer */
-       COMPILATION_ERROR_IF( sizeof(struct sh_css_hmm_buffer)                  != SIZE_OF_SH_CSS_HMM_BUFFER_STRUCT             );
-       COMPILATION_ERROR_IF( sizeof(struct ia_css_isp_3a_statistics)           != SIZE_OF_IA_CSS_ISP_3A_STATISTICS_STRUCT      );
-       COMPILATION_ERROR_IF( sizeof(struct ia_css_isp_dvs_statistics)          != SIZE_OF_IA_CSS_ISP_DVS_STATISTICS_STRUCT     );
-       COMPILATION_ERROR_IF( sizeof(struct ia_css_metadata)                    != SIZE_OF_IA_CSS_METADATA_STRUCT               );
+       COMPILATION_ERROR_IF(sizeof(struct sh_css_hmm_buffer)                   != SIZE_OF_SH_CSS_HMM_BUFFER_STRUCT);
+       COMPILATION_ERROR_IF(sizeof(struct ia_css_isp_3a_statistics)            != SIZE_OF_IA_CSS_ISP_3A_STATISTICS_STRUCT);
+       COMPILATION_ERROR_IF(sizeof(struct ia_css_isp_dvs_statistics)           != SIZE_OF_IA_CSS_ISP_DVS_STATISTICS_STRUCT);
+       COMPILATION_ERROR_IF(sizeof(struct ia_css_metadata)                     != SIZE_OF_IA_CSS_METADATA_STRUCT);
 
        /* Check struct ia_css_init_dmem_cfg */
-       COMPILATION_ERROR_IF( sizeof(struct ia_css_sp_init_dmem_cfg)            != SIZE_OF_IA_CSS_SP_INIT_DMEM_CFG_STRUCT       );
+       COMPILATION_ERROR_IF(sizeof(struct ia_css_sp_init_dmem_cfg)             != SIZE_OF_IA_CSS_SP_INIT_DMEM_CFG_STRUCT);
 
-       if (fw == NULL && !fw_explicitly_loaded)
+       if (!fw && !fw_explicitly_loaded)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
-       if (env == NULL)
-           return IA_CSS_ERR_INVALID_ARGUMENTS;
+       if (!env)
+       return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        sh_css_printf = env->print_env.debug_print;
 
@@ -1786,7 +1781,7 @@ ia_css_init(const struct ia_css_env *env,
                my_css_save.loaded_fw = (struct ia_css_fw *)fw;
 #endif
        }
-       if(!sh_css_setup_spctrl_config(&sh_css_sp_fw,SP_PROG_NAME,&spctrl_cfg))
+       if (!sh_css_setup_spctrl_config(&sh_css_sp_fw, SP_PROG_NAME, &spctrl_cfg))
                return IA_CSS_ERR_INTERNAL_ERROR;
 
        err = ia_css_spctrl_load_fw(SP0_ID, &spctrl_cfg);
@@ -1817,7 +1812,7 @@ ia_css_init(const struct ia_css_env *env,
 #if defined(HAS_INPUT_SYSTEM_VERSION_2) && defined(HAS_INPUT_SYSTEM_VERSION_2401)
 #if    defined(USE_INPUT_SYSTEM_VERSION_2)
        gp_device_reg_store(GP_DEVICE0_ID, _REG_GP_SWITCH_ISYS2401_ADDR, 0);
-#elif defined (USE_INPUT_SYSTEM_VERSION_2401)
+#elif defined(USE_INPUT_SYSTEM_VERSION_2401)
        gp_device_reg_store(GP_DEVICE0_ID, _REG_GP_SWITCH_ISYS2401_ADDR, 1);
 #endif
 #endif
@@ -1826,7 +1821,7 @@ ia_css_init(const struct ia_css_env *env,
        dma_set_max_burst_size(DMA0_ID, HIVE_DMA_BUS_DDR_CONN,
                               ISP_DMA_MAX_BURST_LENGTH);
 
-       if(ia_css_isys_init() != INPUT_SYSTEM_ERR_NO_ERROR)
+       if (ia_css_isys_init() != INPUT_SYSTEM_ERR_NO_ERROR)
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
 #endif
 
@@ -1839,10 +1834,11 @@ ia_css_init(const struct ia_css_env *env,
 enum ia_css_err ia_css_suspend(void)
 {
        int i;
+
        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 != NULL)
+       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);
                        ia_css_stream_unload(my_css_save.stream_seeds[i].stream);
@@ -1850,7 +1846,7 @@ enum ia_css_err ia_css_suspend(void)
        my_css_save.mode = sh_css_mode_working;
        ia_css_stop_sp();
        ia_css_uninit();
-       for(i=0;i<MAX_ACTIVE_STREAMS;i++)
+       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, "ia_css_suspend() leave\n");
        return IA_CSS_SUCCESS;
@@ -1861,33 +1857,34 @@ ia_css_resume(void)
 {
        int i, j;
        enum ia_css_err err;
+
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_resume() enter: void\n");
 
-       err = ia_css_init(&(my_css_save.driver_env), my_css_save.loaded_fw, my_css_save.mmu_base, my_css_save.irq_type);
+       err = ia_css_init(&my_css_save.driver_env, my_css_save.loaded_fw, my_css_save.mmu_base, my_css_save.irq_type);
        if (err != IA_CSS_SUCCESS)
                return err;
        err = ia_css_start_sp();
        if (err != IA_CSS_SUCCESS)
                return err;
        my_css_save.mode = sh_css_mode_resume;
-       for(i=0;i<MAX_ACTIVE_STREAMS;i++)
+       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 != NULL)
+               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 (i)
-                                       for(j=0;j<i;j++)
+                                       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++)
+                               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);
@@ -1895,8 +1892,8 @@ ia_css_resume(void)
                                return err;
                        }
                        *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];
+                       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.mode = sh_css_mode_working;
@@ -1915,7 +1912,7 @@ 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;
@@ -1928,11 +1925,11 @@ 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) {
-               p = sh_css_malloc(N*size);
+               p = sh_css_malloc(N * size);
                if (p)
                        memset(p, 0, size);
                return p;
@@ -1953,7 +1950,7 @@ void
 sh_css_flush(struct ia_css_acc_fw *fw)
 {
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_flush() enter:\n");
-       if ((fw != NULL) && (my_css.flush != NULL))
+       if ((fw) && (my_css.flush))
                my_css.flush(fw);
 }
 
@@ -1971,11 +1968,11 @@ map_sp_threads(struct ia_css_stream *stream, bool map)
        enum ia_css_err err = IA_CSS_SUCCESS;
        enum ia_css_pipe_id pipe_id;
 
-       assert(stream != NULL);
+       assert(stream);
        IA_CSS_ENTER_PRIVATE("stream = %p, map = %s",
                             stream, map ? "true" : "false");
 
-       if (stream == NULL) {
+       if (!stream) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2007,17 +2004,18 @@ map_sp_threads(struct ia_css_stream *stream, bool map)
                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) {
                int i;
+
                for (i = 1; i < stream->num_pipes; i++)
                        ia_css_pipeline_map(stream->pipes[i]->pipe_num, map);
        }
@@ -2039,17 +2037,17 @@ create_host_pipeline_structure(struct ia_css_stream *stream)
        unsigned int copy_pipe_delay = 0,
                     capture_pipe_delay = 0;
 
-       assert(stream != NULL);
+       assert(stream);
        IA_CSS_ENTER_PRIVATE("stream = %p", stream);
 
-       if (stream == NULL) {
+       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 != NULL);
-       if (main_pipe == NULL) {
+       assert(main_pipe);
+       if (!main_pipe) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2092,27 +2090,28 @@ create_host_pipeline_structure(struct ia_css_stream *stream)
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if ((IA_CSS_SUCCESS == err) && 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);
        }
 
-       if ((IA_CSS_SUCCESS == err) && 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);
        }
 
-       if ((IA_CSS_SUCCESS == err) && acc_pipe) {
+       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,
@@ -2136,10 +2135,10 @@ create_host_pipeline(struct ia_css_stream *stream)
        enum ia_css_pipe_id pipe_id;
        struct ia_css_pipe *main_pipe = NULL;
        enum ia_css_err err = IA_CSS_SUCCESS;
-       unsigned max_input_width = 0;
+       unsigned int max_input_width = 0;
 
        IA_CSS_ENTER_PRIVATE("stream = %p", stream);
-       if (stream == NULL) {
+       if (!stream) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2163,7 +2162,6 @@ create_host_pipeline(struct ia_css_stream *stream)
                        if (err != IA_CSS_SUCCESS)
                                goto ERR;
                }
-
        }
 
 #if defined(USE_INPUT_SYSTEM_VERSION_2)
@@ -2232,14 +2230,14 @@ 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]);
                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;
@@ -2254,6 +2252,7 @@ create_host_pipeline(struct ia_css_stream *stream)
        /* DH regular multi pipe - not continuous mode: create the next pipelines too */
        if (!stream->config.continuous) {
                int i;
+
                for (i = 1; i < stream->num_pipes && IA_CSS_SUCCESS == err; i++) {
                        switch (stream->pipes[i]->mode) {
                        case IA_CSS_PIPE_ID_PREVIEW:
@@ -2289,7 +2288,7 @@ init_pipe_defaults(enum ia_css_pipe_mode mode,
               struct ia_css_pipe *pipe,
               bool copy_pipe)
 {
-       if (pipe == NULL) {
+       if (!pipe) {
                IA_CSS_ERROR("NULL pipe parameter");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2335,7 +2334,7 @@ init_pipe_defaults(enum ia_css_pipe_mode mode,
 static void
 pipe_global_init(void)
 {
-       uint8_t i;
+       u8 i;
 
        my_css.pipe_counter = 0;
        for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++) {
@@ -2346,18 +2345,18 @@ pipe_global_init(void)
 static enum ia_css_err
 pipe_generate_pipe_num(const struct ia_css_pipe *pipe, unsigned int *pipe_number)
 {
-       const uint8_t INVALID_PIPE_NUM = (uint8_t)~(0);
-       uint8_t pipe_num = INVALID_PIPE_NUM;
-       uint8_t i;
+       const u8 INVALID_PIPE_NUM = (uint8_t)~(0);
+       u8 pipe_num = INVALID_PIPE_NUM;
+       u8 i;
 
-       if (pipe == NULL) {
+       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++) {
-               if (my_css.all_pipes[i] == NULL) {
+               if (!my_css.all_pipes[i]) {
                        /*position is reserved */
                        my_css.all_pipes[i] = (struct ia_css_pipe *)pipe;
                        pipe_num = i;
@@ -2395,7 +2394,7 @@ create_pipe(enum ia_css_pipe_mode mode,
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_pipe *me;
 
-       if (pipe == NULL) {
+       if (!pipe) {
                IA_CSS_ERROR("NULL pipe parameter");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2410,7 +2409,7 @@ create_pipe(enum ia_css_pipe_mode mode,
                return err;
        }
 
-       err = pipe_generate_pipe_num(me, &(me->pipe_num));
+       err = pipe_generate_pipe_num(me, &me->pipe_num);
        if (err != IA_CSS_SUCCESS) {
                kfree(me);
                return err;
@@ -2424,7 +2423,8 @@ struct ia_css_pipe *
 find_pipe_by_num(uint32_t pipe_num)
 {
        unsigned int i;
-       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] &&
                                ia_css_pipe_get_pipe_num(my_css.all_pipes[i]) == pipe_num) {
                        return my_css.all_pipes[i];
@@ -2433,14 +2433,14 @@ find_pipe_by_num(uint32_t pipe_num)
        return NULL;
 }
 
-static void sh_css_pipe_free_acc_binaries (
+static void sh_css_pipe_free_acc_binaries(
     struct ia_css_pipe *pipe)
 {
        struct ia_css_pipeline *pipeline;
        struct ia_css_pipeline_stage *stage;
 
-       assert(pipe != NULL);
-       if (pipe == NULL) {
+       assert(pipe);
+       if (!pipe) {
                IA_CSS_ERROR("NULL input pointer");
                return;
        }
@@ -2459,14 +2459,15 @@ enum ia_css_err
 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 == NULL) {
+       if (!pipe) {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if (pipe->stream != NULL) {
+       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;
@@ -2483,8 +2484,8 @@ ia_css_pipe_destroy(struct ia_css_pipe *pipe)
                                        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;
@@ -2496,8 +2497,8 @@ ia_css_pipe_destroy(struct ia_css_pipe *pipe)
                                        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
@@ -2548,7 +2549,6 @@ ia_css_uninit(void)
 
        sh_css_params_free_default_gdc_lut();
 
-
        /* TODO: JB: implement decent check and handling of freeing mipi frames */
        //assert(ref_count_mipi_allocation == 0); //mipi frames are not freed
        /* cleanup generic data */
@@ -2591,7 +2591,7 @@ enum ia_css_err ia_css_irq_translate(
 
 /* 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);
+       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);
@@ -2599,9 +2599,9 @@ enum ia_css_err ia_css_irq_translate(
                        return IA_CSS_ERR_INTERNAL_ERROR;
 
 #if WITH_PC_MONITORING
-               sh_css_print("PC_MONITORING: %s() irq = %d, "
-                            "sh_binary_running set to 0\n", __func__, irq);
-               sh_binary_running = 0 ;
+               sh_css_print("PC_MONITORING: %s() irq = %d, sh_binary_running set to 0\n",
+                            __func__, irq);
+               sh_binary_running = 0;
 #endif
 
                switch (irq) {
@@ -2646,8 +2646,8 @@ 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;
 }
@@ -2657,6 +2657,7 @@ enum ia_css_err ia_css_irq_enable(
        bool enable)
 {
        virq_id_t       irq = N_virq_id;
+
        IA_CSS_ENTER("info=%d, enable=%d", info, enable);
 
        switch (info) {
@@ -2705,9 +2706,10 @@ static unsigned int
 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;
 }
 
@@ -2724,12 +2726,12 @@ static enum ia_css_err load_copy_binary(
        struct ia_css_binary_descr copy_descr;
 
        /* next_binary can be NULL */
-       assert(pipe != NULL);
-       assert(copy_binary != NULL);
+       assert(pipe);
+       assert(copy_binary);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                "load_copy_binary() enter:\n");
 
-       if (next_binary != NULL) {
+       if (next_binary) {
                copy_out_info = next_binary->in_frame_info;
                left_padding = next_binary->left_padding;
        } else {
@@ -2740,7 +2742,7 @@ 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 : 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;
@@ -2762,7 +2764,7 @@ alloc_continuous_frames(
 
        IA_CSS_ENTER_PRIVATE("pipe = %p, init_time = %d", pipe, init_time);
 
-       if ((pipe == NULL) || (pipe->stream == NULL)) {
+       if ((!pipe) || (!pipe->stream)) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2784,8 +2786,7 @@ alloc_continuous_frames(
                ref_info = pipe->pipe_settings.preview.preview_binary.in_frame_info;
        } 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;
@@ -2863,7 +2864,7 @@ alloc_continuous_frames(
 enum ia_css_err
 ia_css_alloc_continuous_frame_remain(struct ia_css_stream *stream)
 {
-       if (stream == NULL)
+       if (!stream)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        return alloc_continuous_frames(stream->continuous_pipe, false);
 }
@@ -2888,8 +2889,8 @@ load_preview_binaries(struct ia_css_pipe *pipe)
        struct ia_css_preview_settings *mycs  = &pipe->pipe_settings.preview;
 
        IA_CSS_ENTER_PRIVATE("");
-       assert(pipe != NULL);
-       assert(pipe->stream != NULL);
+       assert(pipe);
+       assert(pipe->stream);
        assert(pipe->mode == IA_CSS_PIPE_ID_PREVIEW);
 
        online = pipe->stream->config.online;
@@ -2976,7 +2977,6 @@ load_preview_binaries(struct ia_css_pipe *pipe)
         */
        if (need_vf_pp &&
                (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;
@@ -3060,7 +3060,7 @@ unload_preview_binaries(struct ia_css_pipe *pipe)
 {
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
 
-       if ((pipe == NULL) || (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;
        }
@@ -3081,6 +3081,7 @@ static const struct ia_css_fw_info *last_output_firmware(
 
        for (; fw; fw = fw->next) {
                const struct ia_css_fw_info *info = fw;
+
                if (info->info.isp.sp.enable.output)
                        last_fw = fw;
        }
@@ -3111,6 +3112,7 @@ static enum ia_css_err add_firmwares(
                struct ia_css_frame *out[IA_CSS_BINARY_MAX_OUTPUT_PORTS] = {NULL};
                struct ia_css_frame *in = NULL;
                struct ia_css_frame *vf = NULL;
+
                if ((fw == last_fw) && (fw->info.isp.sp.enable.out_frame  != 0)) {
                        out[0] = out_frame;
                }
@@ -3145,7 +3147,6 @@ static enum ia_css_err add_vf_pp_stage(
        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;
        enum ia_css_err err = IA_CSS_SUCCESS;
@@ -3154,13 +3155,13 @@ static enum ia_css_err add_vf_pp_stage(
 
 /* out_frame can be NULL ??? */
 
-       if (pipe == NULL)
+       if (!pipe)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
-       if (in_frame == NULL)
+       if (!in_frame)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
-       if (vf_pp_binary == NULL)
+       if (!vf_pp_binary)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
-       if (vf_pp_stage == NULL)
+       if (!vf_pp_stage)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        ia_css_pipe_util_create_output_frames(out_frames);
@@ -3177,7 +3178,7 @@ static enum ia_css_err add_vf_pp_stage(
                        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);
-               } else{
+               } 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);
@@ -3210,11 +3211,11 @@ static enum ia_css_err add_yuv_scaler_stage(
        struct ia_css_pipeline_stage_desc stage_desc;
 
        /* out_frame can be NULL ??? */
-       assert(in_frame != NULL);
-       assert(pipe != NULL);
-       assert(me != NULL);
-       assert(yuv_scaler_binary != NULL);
-       assert(pre_vf_pp_stage != NULL);
+       assert(in_frame);
+       assert(pipe);
+       assert(me);
+       assert(yuv_scaler_binary);
+       assert(pre_vf_pp_stage);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                "add_yuv_scaler_stage() enter:\n");
 
@@ -3223,7 +3224,7 @@ static enum ia_css_err add_yuv_scaler_stage(
 
        last_fw = last_output_firmware(pipe->output_stage);
 
-       if(last_fw) {
+       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);
@@ -3267,11 +3268,11 @@ static enum ia_css_err add_capture_pp_stage(
        struct ia_css_pipeline_stage_desc stage_desc;
 
        /* out_frame can be NULL ??? */
-       assert(in_frame != NULL);
-       assert(pipe != NULL);
-       assert(me != NULL);
-       assert(capture_pp_binary != NULL);
-       assert(capture_pp_stage != NULL);
+       assert(in_frame);
+       assert(pipe);
+       assert(me);
+       assert(capture_pp_binary);
+       assert(capture_pp_stage);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                "add_capture_pp_stage() enter:\n");
 
@@ -3283,7 +3284,7 @@ static enum ia_css_err add_capture_pp_stage(
                                    &capture_pp_binary->vf_frame_info);
        if (err != IA_CSS_SUCCESS)
                return err;
-       if(last_fw)     {
+       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);
@@ -3339,7 +3340,7 @@ init_vf_frameinfo_defaults(struct ia_css_pipe *pipe,
        unsigned int thread_id;
        enum sh_css_queue_id queue_id;
 
-       assert(vf_frame != NULL);
+       assert(vf_frame);
 
        sh_css_pipe_get_viewfinder_frame_info(pipe, &vf_frame->info, idx);
        vf_frame->contiguous = false;
@@ -3355,24 +3356,24 @@ init_vf_frameinfo_defaults(struct ia_css_pipe *pipe,
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
 static unsigned int
-get_crop_lines_for_bayer_order (
+get_crop_lines_for_bayer_order(
                const struct ia_css_stream_config *config)
 {
-       assert(config != NULL);
-       if ((IA_CSS_BAYER_ORDER_BGGR == config->input_config.bayer_order)
-           || (IA_CSS_BAYER_ORDER_GBRG == config->input_config.bayer_order))
+       assert(config);
+       if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_BGGR)
+           || (config->input_config.bayer_order == IA_CSS_BAYER_ORDER_GBRG))
                return 1;
 
        return 0;
 }
 
 static unsigned int
-get_crop_columns_for_bayer_order (
+get_crop_columns_for_bayer_order(
                const struct ia_css_stream_config *config)
 {
-       assert(config != NULL);
-       if ((IA_CSS_BAYER_ORDER_RGGB == config->input_config.bayer_order)
-           || (IA_CSS_BAYER_ORDER_GBRG == config->input_config.bayer_order))
+       assert(config);
+       if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_RGGB)
+           || (config->input_config.bayer_order == IA_CSS_BAYER_ORDER_GBRG))
                return 1;
 
        return 0;
@@ -3426,7 +3427,7 @@ static void get_pipe_extra_pixel(struct ia_css_pipe *pipe,
 }
 
 void
-ia_css_get_crop_offsets (
+ia_css_get_crop_offsets(
     struct ia_css_pipe *pipe,
     struct ia_css_frame_info *in_frame)
 {
@@ -3437,9 +3438,9 @@ ia_css_get_crop_offsets (
        unsigned int extra_row = 0, extra_col = 0;
        unsigned int min_reqd_height, min_reqd_width;
 
-       assert(pipe != NULL);
-       assert(pipe->stream != NULL);
-       assert(in_frame != NULL);
+       assert(pipe);
+       assert(pipe->stream);
+       assert(in_frame);
 
        IA_CSS_ENTER_PRIVATE("pipe = %p effective_wd = %u effective_ht = %u",
                pipe, pipe->config.input_effective_res.width,
@@ -3498,7 +3499,7 @@ init_in_frameinfo_memory_defaults(struct ia_css_pipe *pipe,
        unsigned int thread_id;
        enum sh_css_queue_id queue_id;
 
-       assert(frame != NULL);
+       assert(frame);
        in_frame = frame;
 
        in_frame->info.format = format;
@@ -3509,7 +3510,6 @@ init_in_frameinfo_memory_defaults(struct ia_css_pipe *pipe,
                                        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 =
@@ -3540,7 +3540,7 @@ init_out_frameinfo_defaults(struct ia_css_pipe *pipe,
        unsigned int thread_id;
        enum sh_css_queue_id queue_id;
 
-       assert(out_frame != NULL);
+       assert(out_frame);
 
        sh_css_pipe_get_output_frame_info(pipe, &out_frame->info, idx);
        out_frame->contiguous = false;
@@ -3573,14 +3573,14 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
        bool need_copy   = false;
        bool need_vf_pp  = false;
        bool need_yuv_pp = false;
-       unsigned num_output_pins;
+       unsigned int num_output_pins;
        bool need_in_frameinfo_memory = false;
 
        unsigned int i, num_yuv_scaler;
        bool *is_output_stage = NULL;
 
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((pipe == NULL) || (pipe->stream == NULL) || (pipe->mode != IA_CSS_PIPE_ID_VIDEO)) {
+       if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_VIDEO)) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -3633,9 +3633,9 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
        num_yuv_scaler  = pipe->pipe_settings.video.num_yuv_scaler;
        is_output_stage = pipe->pipe_settings.video.is_output_stage;
 
-       need_copy   = (copy_binary != NULL && copy_binary->info != NULL);
-       need_vf_pp  = (vf_pp_binary != NULL && vf_pp_binary->info != NULL);
-       need_yuv_pp = (yuv_scaler_binary != NULL && yuv_scaler_binary->info != NULL);
+       need_copy   = (copy_binary && copy_binary->info);
+       need_vf_pp  = (vf_pp_binary && vf_pp_binary->info);
+       need_yuv_pp = (yuv_scaler_binary && yuv_scaler_binary->info);
 
        if (need_copy) {
                ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
@@ -3662,7 +3662,7 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
 
        /* when the video binary supports a second output pin,
           it can directly produce the vf_frame.  */
-       if(need_vf_pp) {
+       if (need_vf_pp) {
                ia_css_pipe_get_generic_stage_desc(&stage_desc, video_binary,
                        out_frames, in_frame, NULL);
        } else {
@@ -3676,7 +3676,7 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
                goto ERR;
 
        /* If we use copy iso video, the input must be yuv iso raw */
-       if(video_stage) {
+       if (video_stage) {
                video_stage->args.copy_vf =
                        video_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY;
                video_stage->args.copy_output = video_stage->args.copy_vf;
@@ -3717,16 +3717,15 @@ static enum ia_css_err create_host_video_pipeline(struct ia_css_pipe *pipe)
                if ((pipe->config.acc_extension->info.isp.sp.enable.output) &&
                    (pipe->config.acc_extension->info.isp.sp.enable.in_frame) &&
                    (pipe->config.acc_extension->info.isp.sp.enable.out_frame)) {
-
                        /* In/Out Frame mapping to support output frame extension.*/
                        out = video_stage->args.out_frame[0];
-                       err = ia_css_frame_allocate_from_info(&in, &(pipe->output_info[0]));
+                       err = ia_css_frame_allocate_from_info(&in, &pipe->output_info[0]);
                        if (err != IA_CSS_SUCCESS)
                                goto ERR;
                        video_stage->args.out_frame[0] = in;
                }
 
-               err = add_firmwares( me, video_binary, pipe->output_stage,
+               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);
@@ -3775,7 +3774,7 @@ create_host_acc_pipeline(struct ia_css_pipe *pipe)
        unsigned int i;
 
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((pipe == NULL) || (pipe->stream == NULL)) {
+       if ((!pipe) || (!pipe->stream)) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -3786,14 +3785,15 @@ create_host_acc_pipeline(struct ia_css_pipe *pipe)
           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);
                if (err != IA_CSS_SUCCESS)
                        goto ERR;
@@ -3829,12 +3829,11 @@ create_host_preview_pipeline(struct ia_css_pipe *pipe)
 #endif
 
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((pipe == NULL) || (pipe->stream == NULL) || (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;
        }
 
-
        ia_css_pipe_util_create_output_frames(out_frames);
        /* pipeline already created as part of create_host_pipeline_structure */
        me = &pipe->pipeline;
@@ -3897,7 +3896,7 @@ create_host_preview_pipeline(struct ia_css_pipe *pipe)
                /* When continuous is enabled, configure in_frame with the
                 * last pipe, which is the copy pipe.
                 */
-               if (continuous || !online){
+               if (continuous || !online) {
                        in_frame = pipe->stream->last_pipe->continuous_frames[0];
                }
 #else
@@ -3970,7 +3969,7 @@ static void send_raw_frames(struct ia_css_pipe *pipe)
 static enum ia_css_err
 preview_start(struct ia_css_pipe *pipe)
 {
-       struct ia_css_pipeline *me ;
+       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;
        struct ia_css_pipe *copy_pipe, *capture_pipe;
@@ -3979,7 +3978,7 @@ 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 == NULL) || (pipe->stream == NULL) || (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;
        }
@@ -4045,7 +4044,7 @@ preview_start(struct ia_css_pipe *pipe)
 #ifndef ISP2401
                        );
 #else
                      &pipe->config.internal_frame_origin_bqs_on_sctbl,
pipe->config.internal_frame_origin_bqs_on_sctbl,
                        pipe->stream->isp_params_configs);
 #endif
 
@@ -4082,7 +4081,7 @@ preview_start(struct ia_css_pipe *pipe)
 #ifndef ISP2401
                        );
 #else
                      &capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
                        capture_pipe->stream->isp_params_configs);
 #endif
        }
@@ -4090,7 +4089,7 @@ preview_start(struct ia_css_pipe *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),
+                       (uint8_t)ia_css_pipe_get_pipe_num(acc_pipe),
                        false,
                        pipe->stream->config.pixels_per_clock == 2,
                        false, /* continuous */
@@ -4106,15 +4105,15 @@ preview_start(struct ia_css_pipe *pipe)
 #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->config.internal_frame_origin_bqs_on_sctbl,
                        pipe->stream->isp_params_configs);
 #endif
        }
@@ -4146,7 +4145,7 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
 
        IA_CSS_ENTER("pipe=%p, buffer=%p", pipe, buffer);
 
-       if ((pipe == NULL) || (buffer == NULL)) {
+       if ((!pipe) || (!buffer)) {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -4157,6 +4156,7 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
 #if 0
        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)) {
@@ -4170,6 +4170,7 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
        }
        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)) {
@@ -4186,7 +4187,6 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
 
        IA_CSS_LOG("pipe_id=%d, buf_type=%d", pipe_id, buf_type);
 
-
        assert(pipe_id < IA_CSS_PIPE_ID_NUM);
        assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
        if ((buf_type == IA_CSS_BUFFER_TYPE_INVALID) ||
@@ -4220,10 +4220,9 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        }
 
-
        pipeline = &pipe->pipeline;
 
-       assert(pipeline != NULL ||
+       assert(pipeline ||
               pipe_id == IA_CSS_PIPE_ID_COPY ||
               pipe_id == IA_CSS_PIPE_ID_ACC);
 
@@ -4233,21 +4232,21 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
        ddr_buffer.timing_data = buffer->timing_data;
 
        if (buf_type == IA_CSS_BUFFER_TYPE_3A_STATISTICS) {
-               if (buffer->data.stats_3a == NULL) {
+               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) {
-               if (buffer->data.stats_dvs == NULL) {
+               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) {
-               if (buffer->data.metadata == NULL) {
+               if (!buffer->data.metadata) {
                        IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
                }
@@ -4258,7 +4257,7 @@ 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)) {
-               if (buffer->data.frame == NULL) {
+               if (!buffer->data.frame) {
                        IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
                }
@@ -4270,12 +4269,11 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
                        "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);
-               if (IA_CSS_SUCCESS != return_err) {
+               if (return_err != IA_CSS_SUCCESS) {
                        IA_CSS_LEAVE_ERR(return_err);
                        return return_err;
                }
@@ -4290,10 +4288,10 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
        /* TODO: change next to correct pool for optimization */
        ia_css_rmgr_acq_vbuf(hmm_buffer_pool, &h_vbuf);
 
-       assert(h_vbuf != NULL);
+       assert(h_vbuf);
        assert(h_vbuf->vptr != 0x0);
 
-       if ((h_vbuf == NULL) || (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;
        }
@@ -4304,7 +4302,7 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
        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)) {
-               if (pipeline == NULL) {
+               if (!pipeline) {
                        ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &h_vbuf);
                        IA_CSS_LOG("pipeline is empty!");
                        IA_CSS_LEAVE_ERR(IA_CSS_ERR_INTERNAL_ERROR);
@@ -4327,18 +4325,16 @@ ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
                   || (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)) {
-
                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) && (IA_CSS_BUFFER_TYPE_OUTPUT_FRAME == buf_type)) {
+               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);
                }
 #endif
-
        }
 
        if (return_err == IA_CSS_SUCCESS) {
@@ -4397,7 +4393,7 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
 
        IA_CSS_ENTER("pipe=%p, buffer=%p", pipe, buffer);
 
-       if ((pipe == NULL) || (buffer == NULL)) {
+       if ((!pipe) || (!buffer)) {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -4446,7 +4442,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);
-               if (hmm_buffer_record != NULL) {
+               if (hmm_buffer_record) {
                        /* valid hmm_buffer_record found. Save the kernel_ptr
                         * for validation after performing mmgr_load.  The
                         * vbuf handle and buffer_record can be released.
@@ -4496,7 +4492,6 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
                        case IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME:
                                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
@@ -4512,7 +4507,7 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
                                }
                        case IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME:
                        case IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME:
-                               frame = (struct ia_css_frame*)HOST_ADDRESS(ddr_buffer.kernel_ptr);
+                               frame = (struct ia_css_frame *)HOST_ADDRESS(ddr_buffer.kernel_ptr);
                                buffer->data.frame = frame;
                                buffer->exp_id = ddr_buffer.payload.frame.exp_id;
                                frame->exp_id = ddr_buffer.payload.frame.exp_id;
@@ -4536,7 +4531,7 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
 #endif
                                }
 #if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
-                               if (IA_CSS_BUFFER_TYPE_OUTPUT_FRAME == buf_type) {
+                               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);
                                }
@@ -4549,14 +4544,14 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
                                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*)
+                                       (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;
@@ -4565,7 +4560,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;
@@ -4580,7 +4575,7 @@ 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);
@@ -4638,7 +4633,7 @@ enum ia_css_err
 ia_css_dequeue_psys_event(struct ia_css_event *event)
 {
        enum ia_css_pipe_id pipe_id = 0;
-       uint8_t payload[4] = {0,0,0,0};
+       u8 payload[4] = {0, 0, 0, 0};
        enum ia_css_err ret_err;
 
        /*TODO:
@@ -4648,7 +4643,7 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
         * We skip the IA_CSS_ENTER logging call
         * to avoid flooding the logs when the host application
         * uses polling. */
-       if (event == NULL)
+       if (!event)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        if (!sh_css_sp_is_running()) {
@@ -4683,7 +4678,7 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
 
        if (event->type == IA_CSS_EVENT_TYPE_TIMER) {
                /* timer event ??? get the 2nd event and decode the data into the event struct */
-               uint32_t tmp_data;
+               u32 tmp_data;
                /* 1st event: LSB 16-bit timer data and code */
                event->timer_data = ((payload[1] & 0xFF) | ((payload[3] & 0xFF) << 8));
                event->timer_code = payload[2];
@@ -4744,6 +4739,7 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
                if (event->type == IA_CSS_EVENT_TYPE_FRAME_TAGGED) {
                        /* find the capture pipe that goes with this */
                        int i, n;
+
                        n = event->pipe->stream->num_pipes;
                        for (i = 0; i < n; i++) {
                                struct ia_css_pipe *p =
@@ -4757,11 +4753,12 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
                }
                if (event->type == IA_CSS_EVENT_TYPE_ACC_STAGE_COMPLETE) {
                        /* payload[3] contains the acc fw handle. */
-                       uint32_t stage_num = (uint32_t)payload[3];
+                       u32 stage_num = (uint32_t)payload[3];
+
                        ret_err = ia_css_pipeline_get_fw_from_stage(
-                                       &(event->pipe->pipeline),
+                                       &event->pipe->pipeline,
                                        stage_num,
-                                       &(event->fw_handle));
+                                       &event->fw_handle);
                        if (ret_err != IA_CSS_SUCCESS) {
                                IA_CSS_ERROR("Invalid stage num received for ACC event. stage_num:%u",
                                             stage_num);
@@ -4781,13 +4778,13 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
 enum ia_css_err
 ia_css_dequeue_isys_event(struct ia_css_event *event)
 {
-       uint8_t payload[4] = {0, 0, 0, 0};
+       u8 payload[4] = {0, 0, 0, 0};
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        /* We skip the IA_CSS_ENTER logging call
         * to avoid flooding the logs when the host application
         * uses polling. */
-       if (event == NULL)
+       if (!event)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        if (!sh_css_sp_is_running()) {
@@ -4818,8 +4815,8 @@ ia_css_dequeue_isys_event(struct ia_css_event *event)
 static void
 acc_start(struct ia_css_pipe *pipe)
 {
-       assert(pipe != NULL);
-       assert(pipe->stream != NULL);
+       assert(pipe);
+       assert(pipe->stream);
 
        start_pipe(pipe, SH_CSS_PIPE_CONFIG_OVRD_NO_OVRD,
                        pipe->stream->config.mode);
@@ -4836,19 +4833,19 @@ sh_css_pipe_start(struct ia_css_stream *stream)
 
        IA_CSS_ENTER_PRIVATE("stream = %p", stream);
 
-       if (stream == NULL) {
+       if (!stream) {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
        pipe = stream->last_pipe;
-       if (pipe == NULL) {
+       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;
@@ -4878,6 +4875,7 @@ sh_css_pipe_start(struct ia_css_stream *stream)
        /* DH regular multi pipe - not continuous mode: start the next pipes too */
        if (!stream->config.continuous) {
                int i;
+
                for (i = 1; i < stream->num_pipes && IA_CSS_SUCCESS == err ; i++) {
                        switch (stream->pipes[i]->mode) {
                        case IA_CSS_PIPE_ID_PREVIEW:
@@ -4940,6 +4938,7 @@ sh_css_pipe_start(struct ia_css_stream *stream)
        /* DH regular multi pipe - not continuous mode: enqueue event to the next pipes too */
        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]),
@@ -4959,7 +4958,7 @@ sh_css_pipe_start(struct ia_css_stream *stream)
                else if (pipe_id == IA_CSS_PIPE_ID_VIDEO)
                        copy_pipe = pipe->pipe_settings.video.copy_pipe;
 
-               if (copy_pipe == NULL) {
+               if (!copy_pipe) {
                        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
                        return IA_CSS_ERR_INTERNAL_ERROR;
                }
@@ -4971,12 +4970,13 @@ sh_css_pipe_start(struct ia_css_stream *stream)
        }
        if (pipe->stream->cont_capt) {
                struct ia_css_pipe *capture_pipe = NULL;
+
                if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
                        capture_pipe = pipe->pipe_settings.preview.capture_pipe;
                else if (pipe_id == IA_CSS_PIPE_ID_VIDEO)
                        capture_pipe = pipe->pipe_settings.video.capture_pipe;
 
-               if (capture_pipe == NULL) {
+               if (!capture_pipe) {
                        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
                        return IA_CSS_ERR_INTERNAL_ERROR;
                }
@@ -4990,14 +4990,15 @@ sh_css_pipe_start(struct ia_css_stream *stream)
        /* 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) {
                struct ia_css_pipe *acc_pipe = NULL;
+
                acc_pipe = pipe->pipe_settings.preview.acc_pipe;
 
-               if (acc_pipe){
+               if (acc_pipe) {
                        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);
+                               (uint8_t)thread_id, 0, 0);
                }
        }
 
@@ -5012,7 +5013,7 @@ 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);
+             "sh_css_enable_cont_capt() enter: enable=%d\n", enable);
 //my_css.cont_capt = enable;
        my_css.stop_copy_preview = stop_copy_preview;
 }
@@ -5043,8 +5044,8 @@ sh_css_pipes_stop(struct ia_css_stream *stream)
 #ifndef ISP2401
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_continuous_is_enabled() enter: pipe_num=%d\n", pipe_num);
 #else
-       assert(stream != NULL);
-       if (stream == NULL) {
+       assert(stream);
+       if (!stream) {
                IA_CSS_LOG("stream does NOT exist!");
                err = IA_CSS_ERR_INTERNAL_ERROR;
                goto ERR;
@@ -5061,8 +5062,8 @@ sh_css_pipes_stop(struct ia_css_stream *stream)
 }
 #else
        main_pipe = stream->last_pipe;
-       assert(main_pipe != NULL);
-       if (main_pipe == NULL) {
+       assert(main_pipe);
+       if (!main_pipe) {
                IA_CSS_LOG("main_pipe does NOT exist!");
                err = IA_CSS_ERR_INTERNAL_ERROR;
                goto ERR;
@@ -5073,7 +5074,7 @@ sh_css_pipes_stop(struct ia_css_stream *stream)
 enum ia_css_err
 ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
 {
-       if (buffer_depth == NULL)
+       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");
        (void)stream;
@@ -5089,7 +5090,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_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_set_buffer_depth() enter: num_frames=%d\n",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)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -5114,7 +5115,7 @@ 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)
 {
-       if (buffer_depth == NULL)
+       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
@@ -5157,8 +5158,8 @@ ia_css_stream_get_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
                        copy_pipe = main_pipe->pipe_settings.video.copy_pipe;
 
                /* return the error code if "Copy Pipe" does NOT exist */
-               assert(copy_pipe != NULL);
-               if (copy_pipe == NULL) {
+               assert(copy_pipe);
+               if (!copy_pipe) {
                        IA_CSS_LOG("Copy Pipe does NOT exist!");
                        err = IA_CSS_ERR_INTERNAL_ERROR;
                        goto ERR;
@@ -5191,17 +5192,17 @@ sh_css_pipes_have_stopped(struct ia_css_stream *stream)
 
        int i;
 
-       assert(stream != NULL);
-       if (stream == NULL) {
+       assert(stream);
+       if (!stream) {
                IA_CSS_LOG("stream does NOT exist!");
                rval = false;
                goto RET;
        }
 
        main_pipe = stream->last_pipe;
-       assert(main_pipe != NULL);
+       assert(main_pipe);
 
-       if (main_pipe == NULL) {
+       if (!main_pipe) {
                IA_CSS_LOG("main_pipe does NOT exist!");
                rval = false;
                goto RET;
@@ -5240,8 +5241,8 @@ sh_css_pipes_have_stopped(struct ia_css_stream *stream)
                        copy_pipe = main_pipe->pipe_settings.video.copy_pipe;
 
                /* return if "Copy Pipe" does NOT exist */
-               assert(copy_pipe != NULL);
-               if (copy_pipe == NULL) {
+               assert(copy_pipe);
+               if (!copy_pipe) {
                        IA_CSS_LOG("Copy Pipe does NOT exist!");
 
                        rval = false;
@@ -5279,7 +5280,7 @@ sh_css_continuous_is_enabled(uint8_t pipe_num)
 enum ia_css_err
 ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
 {
-       if (buffer_depth == NULL)
+       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");
        (void)stream;
@@ -5290,7 +5291,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_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_set_buffer_depth() enter: num_frames=%d\n",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)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -5303,7 +5304,7 @@ 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)
 {
-       if (buffer_depth == NULL)
+       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");
 #endif
@@ -5336,7 +5337,7 @@ static enum ia_css_err sh_css_pipe_configure_output(
 
        IA_CSS_ENTER_PRIVATE("pipe = %p, width = %d, height = %d, paddaed width = %d, format = %d, idx = %d",
                             pipe, width, height, padded_width, format, idx);
-       if (pipe == NULL) {
+       if (!pipe) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -5373,12 +5374,12 @@ sh_css_pipe_get_shading_info(struct ia_css_pipe *pipe,
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_binary *binary = NULL;
 
-       assert(pipe != NULL);
+       assert(pipe);
 #ifndef ISP2401
-       assert(info != NULL);
+       assert(info);
 #else
-       assert(shading_info != NULL);
-       assert(pipe_config != NULL);
+       assert(shading_info);
+       assert(pipe_config);
 #endif
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                "sh_css_pipe_get_shading_info() enter:\n");
@@ -5420,8 +5421,8 @@ sh_css_pipe_get_grid_info(struct ia_css_pipe *pipe,
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_binary *binary = NULL;
 
-       assert(pipe != NULL);
-       assert(info != NULL);
+       assert(pipe);
+       assert(info);
 
        IA_CSS_ENTER_PRIVATE("");
 
@@ -5446,7 +5447,7 @@ sh_css_pipe_get_grid_info(struct ia_css_pipe *pipe,
                           sizeof(info->dvs_grid.dvs_stat_grid_info));
        }
 
-       if (binary != NULL) {
+       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;
@@ -5460,7 +5461,7 @@ sh_css_pipe_get_grid_info(struct ia_css_pipe *pipe,
 #error "Unknown VAMEM version"
 #endif
 
-ERR:
+ERR :
        IA_CSS_LEAVE_ERR_PRIVATE(err);
        return err;
 }
@@ -5487,7 +5488,7 @@ 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);
+       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++) {
                if (supported_formats[i] == format) {
@@ -5514,7 +5515,7 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
        enum ia_css_err err = IA_CSS_SUCCESS;
        bool continuous = pipe->stream->config.continuous;
        unsigned int i;
-       unsigned num_output_pins;
+       unsigned int num_output_pins;
        struct ia_css_frame_info video_bin_out_info;
        bool need_scaler = false;
        bool vf_res_different_than_output = false;
@@ -5523,7 +5524,7 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
        struct ia_css_video_settings *mycs  = &pipe->pipe_settings.video;
 
        IA_CSS_ENTER_PRIVATE("");
-       assert(pipe != NULL);
+       assert(pipe);
        assert(pipe->mode == IA_CSS_PIPE_ID_VIDEO);
        /* we only test the video_binary because offline video doesn't need a
         * vf_pp binary and online does not (always use) the copy_binary.
@@ -5536,7 +5537,7 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
        pipe_out_info = &pipe->output_info[0];
        pipe_vf_out_info = &pipe->vf_output_info[0];
 
-       assert(pipe_out_info != NULL);
+       assert(pipe_out_info);
 
        /*
         * There is no explicit input format requirement for raw or yuv
@@ -5566,12 +5567,11 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                video_bin_out_info = *pipe_out_info;
 
        /* Video */
-       if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0]){
+       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);
-       }
-       else {
+       } else {
                video_vf_info = NULL;
        }
 
@@ -5608,6 +5608,7 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                }
                for (i = 0; i < cas_scaler_descr.num_stage; i++) {
                        struct ia_css_binary_descr yuv_scaler_descr;
+
                        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],
@@ -5625,7 +5626,6 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
                ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);
        }
 
-
        {
                struct ia_css_binary_descr video_descr;
                enum ia_css_frame_format vf_info_format;
@@ -5824,9 +5824,10 @@ static enum ia_css_err
 unload_video_binaries(struct ia_css_pipe *pipe)
 {
        unsigned int i;
+
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
 
-       if ((pipe == NULL) || (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;
        }
@@ -5857,9 +5858,8 @@ static enum ia_css_err video_start(struct ia_css_pipe *pipe)
        enum sh_css_pipe_config_override copy_ovrd;
        enum ia_css_input_mode video_pipe_input_mode;
 
-
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((pipe == NULL) || (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;
        }
@@ -5920,7 +5920,7 @@ static enum ia_css_err video_start(struct ia_css_pipe *pipe)
 #ifndef ISP2401
                        );
 #else
                      &copy_pipe->config.internal_frame_origin_bqs_on_sctbl,
copy_pipe->config.internal_frame_origin_bqs_on_sctbl,
                        copy_pipe->stream->isp_params_configs);
 #endif
 
@@ -5957,7 +5957,7 @@ static enum ia_css_err video_start(struct ia_css_pipe *pipe)
 #ifndef ISP2401
                        );
 #else
                      &capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
                        capture_pipe->stream->isp_params_configs);
 #endif
        }
@@ -5974,13 +5974,13 @@ enum ia_css_err sh_css_pipe_get_viewfinder_frame_info(
        struct ia_css_frame_info *info,
        unsigned int idx)
 {
-       assert(pipe != NULL);
-       assert(info != NULL);
+       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");
 
-       if ( pipe->mode == IA_CSS_PIPE_ID_CAPTURE &&
+       if (pipe->mode == IA_CSS_PIPE_ID_CAPTURE &&
            (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW ||
             pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER))
                return IA_CSS_ERR_MODE_HAS_NO_VIEWFINDER;
@@ -5992,9 +5992,9 @@ enum ia_css_err sh_css_pipe_get_viewfinder_frame_info(
                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;
 }
@@ -6010,12 +6010,11 @@ sh_css_pipe_configure_viewfinder(struct ia_css_pipe *pipe, unsigned int width,
        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 == NULL) {
+       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) {
                IA_CSS_LEAVE_ERR_PRIVATE(err);
@@ -6035,7 +6034,7 @@ static enum ia_css_err load_copy_binaries(struct ia_css_pipe *pipe)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       assert(pipe != NULL);
+       assert(pipe);
        IA_CSS_ENTER_PRIVATE("");
 
        assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
@@ -6063,8 +6062,9 @@ static bool need_capture_pp(
        const struct ia_css_pipe *pipe)
 {
        const struct ia_css_frame_info *out_info = &pipe->output_info[0];
+
        IA_CSS_ENTER_LEAVE_PRIVATE("");
-       assert(pipe != NULL);
+       assert(pipe);
        assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE);
 #ifdef ISP2401
 
@@ -6098,16 +6098,16 @@ static bool need_capt_ldc(
        const struct ia_css_pipe *pipe)
 {
        IA_CSS_ENTER_LEAVE_PRIVATE("");
-       assert(pipe != NULL);
+       assert(pipe);
        assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE);
-       return (pipe->extra_config.enable_dvs_6axis) ? true:false;
+       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)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       if (num == NULL)
+       if (!num)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        switch (version) {
@@ -6154,8 +6154,8 @@ static enum ia_css_err load_primary_binaries(
        bool need_extra_yuv_scaler = false;
 
        IA_CSS_ENTER_PRIVATE("");
-       assert(pipe != NULL);
-       assert(pipe->stream != NULL);
+       assert(pipe);
+       assert(pipe->stream);
        assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
 
        online = pipe->stream->config.online;
@@ -6184,8 +6184,7 @@ static enum ia_css_err load_primary_binaries(
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
                        return err;
                }
-       }
-       else{
+       } else {
                err = ia_css_frame_check_info(pipe_out_info);
                if (err != IA_CSS_SUCCESS) {
                        IA_CSS_LEAVE_ERR_PRIVATE(err);
@@ -6263,6 +6262,7 @@ static enum ia_css_err load_primary_binaries(
                }
                for (i = 0; i < cas_scaler_descr.num_stage; i++) {
                        struct ia_css_binary_descr yuv_scaler_descr;
+
                        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],
@@ -6288,6 +6288,7 @@ static enum ia_css_err load_primary_binaries(
        /* ldc and capt_pp are not supported in the same pipeline */
        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_pp_out_info);
@@ -6327,8 +6328,9 @@ static enum ia_css_err load_primary_binaries(
                }
 #ifndef ISP2401
 
-               if(need_ldc) {
+               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);
@@ -6351,6 +6353,7 @@ static enum ia_css_err load_primary_binaries(
 
                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);
@@ -6433,7 +6436,7 @@ allocate_delay_frames(struct ia_css_pipe *pipe)
 
        IA_CSS_ENTER_PRIVATE("");
 
-       if (pipe == NULL) {
+       if (!pipe) {
                IA_CSS_ERROR("Invalid args - pipe %p", pipe);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -6455,11 +6458,12 @@ allocate_delay_frames(struct ia_css_pipe *pipe)
                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;
                        /*The ref frame expects
-                        *      1. Y plane
-                        *      2. UV plane with line interleaving, like below
-                        *              UUUUUU(width/2 times) VVVVVVVV..(width/2 times)
+                        *      1. Y plane
+                        *      2. UV plane with line interleaving, like below
+                        *              UUUUUU(width/2 times) VVVVVVVV..(width/2 times)
                         *
                         *      This format is not YUV420(which has Y, U and V planes).
                         *      Its closer to NV12, except that the UV plane has UV
@@ -6474,6 +6478,7 @@ allocate_delay_frames(struct ia_css_pipe *pipe)
                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;
                        /*The ref frame expects
                         *      1. Y plane
@@ -6492,7 +6497,6 @@ 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;
@@ -6520,7 +6524,7 @@ static enum ia_css_err load_advanced_binaries(
 
        IA_CSS_ENTER_PRIVATE("");
 
-       assert(pipe != NULL);
+       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;
@@ -6632,7 +6636,7 @@ static enum ia_css_err load_bayer_isp_binaries(
        struct ia_css_binary_descr pre_de_descr;
 
        IA_CSS_ENTER_PRIVATE("");
-       assert(pipe != NULL);
+       assert(pipe);
        assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
        pipe_out_info = &pipe->output_info[0];
 
@@ -6665,7 +6669,7 @@ static enum ia_css_err load_low_light_binaries(
        enum ia_css_err err = IA_CSS_SUCCESS;
 
        IA_CSS_ENTER_PRIVATE("");
-       assert(pipe != NULL);
+       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)
@@ -6775,7 +6779,7 @@ static bool copy_on_sp(struct ia_css_pipe *pipe)
 {
        bool rval;
 
-       assert(pipe != NULL);
+       assert(pipe);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "copy_on_sp() enter:\n");
 
        rval = true;
@@ -6797,7 +6801,7 @@ static enum ia_css_err load_capture_binaries(
        bool must_be_raw;
 
        IA_CSS_ENTER_PRIVATE("");
-       assert(pipe != NULL);
+       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) {
@@ -6832,7 +6836,7 @@ static enum ia_css_err load_capture_binaries(
        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)
+       if (err == IA_CSS_SUCCESS)
                  pipe->pipe_settings.capture.copy_binary.online = pipe->stream->config.online;
 #endif
                break;
@@ -6862,9 +6866,10 @@ static enum ia_css_err
 unload_capture_binaries(struct ia_css_pipe *pipe)
 {
        unsigned int i;
+
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
 
-       if ((pipe == NULL) || ((pipe->mode != IA_CSS_PIPE_ID_CAPTURE) && (pipe->mode != IA_CSS_PIPE_ID_COPY))) {
+       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;
        }
@@ -6894,7 +6899,6 @@ 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;
 
@@ -6910,7 +6914,7 @@ need_yuv_scaler_stage(const struct ia_css_pipe *pipe)
        bool need_format_conversion = false;
 
        IA_CSS_ENTER_PRIVATE("");
-       assert(pipe != NULL);
+       assert(pipe);
        assert(pipe->mode == IA_CSS_PIPE_ID_YUVPP);
 
        /* TODO: make generic function */
@@ -6951,17 +6955,17 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output(
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_frame_info tmp_in_info;
 
-       unsigned 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 != NULL);
-       assert(cas_scaler_out_info != NULL);
+       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");
 
        /* 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);
+       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);
@@ -7000,7 +7004,6 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output(
 
        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;
@@ -7018,7 +7021,7 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output(
                        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 != NULL) {
+                       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;
@@ -7065,7 +7068,7 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi
        unsigned int num_stages = 0;
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       unsigned max_scale_factor_per_stage = MAX_PREFERRED_YUV_DS_PER_STEP;
+       unsigned int max_scale_factor_per_stage = MAX_PREFERRED_YUV_DS_PER_STEP;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_create_cas_scaler_desc() enter:\n");
 
@@ -7088,7 +7091,7 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi
                        descr->num_output_stage += 1;
                }
 
-               if (out_info[i] != NULL) {
+               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 */
@@ -7108,7 +7111,7 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi
 
        descr->num_stage = num_stages;
 
-       descr->in_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
+       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;
@@ -7129,7 +7132,7 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi
                goto ERR;
        }
        descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL);
-       if (descr->is_output_stage == NULL) {
+       if (!descr->is_output_stage) {
                err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                goto ERR;
        }
@@ -7137,8 +7140,8 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi
        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));
+                               assert((out_info[i - 1]->res.width >= out_info[i]->res.width) &&
+                                               (out_info[i - 1]->res.height >= out_info[i]->res.height));
                        }
                }
        }
@@ -7147,7 +7150,7 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi
        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] != NULL);
+               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) {
@@ -7166,7 +7169,7 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi
                        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] != NULL) {
+                       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;
@@ -7228,14 +7231,14 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe)
        bool need_isp_copy_binary = false;
 
        IA_CSS_ENTER_PRIVATE("");
-       assert(pipe != NULL);
-       assert(pipe->stream != NULL);
+       assert(pipe);
+       assert(pipe->stream);
        assert(pipe->mode == IA_CSS_PIPE_ID_YUVPP);
 
        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 */
+       /* 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;
@@ -7409,9 +7412,10 @@ static enum ia_css_err
 unload_yuvpp_binaries(struct ia_css_pipe *pipe)
 {
        unsigned int i;
+
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
 
-       if ((pipe == NULL) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
+       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;
        }
@@ -7441,7 +7445,7 @@ static enum ia_css_err yuvpp_start(struct ia_css_pipe *pipe)
        enum ia_css_input_mode yuvpp_pipe_input_mode;
 
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((pipe == NULL) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
+       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;
        }
@@ -7454,7 +7458,7 @@ static enum ia_css_err yuvpp_start(struct ia_css_pipe *pipe)
 
        /* multi stream video needs mipi buffers */
 
-#if !defined(HAS_NO_INPUT_SYSTEM) && ( defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401) )
+#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);
@@ -7479,9 +7483,10 @@ 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);
 
-       if (pipe == NULL) {
+       if (!pipe) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -7516,7 +7521,7 @@ sh_css_pipe_load_binaries(struct ia_css_pipe *pipe)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       assert(pipe != NULL);
+       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*/
@@ -7581,7 +7586,7 @@ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe)
 #endif
 
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if ((pipe == NULL) || (pipe->stream == NULL) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
+       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;
        }
@@ -7627,6 +7632,7 @@ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe)
                 * Bayer-Quad RAW.
                 */
                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) {
@@ -7694,7 +7700,6 @@ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe)
        need_scaler = need_yuv_scaler_stage(pipe);
 
        if (pipe->pipe_settings.yuvpp.copy_binary.info) {
-
                struct ia_css_frame *in_frame_local = NULL;
 
 #ifdef USE_INPUT_SYSTEM_VERSION_2401
@@ -7772,8 +7777,8 @@ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe)
                                j++;
                        }
                }
-       } else if (copy_stage != NULL) {
-               if (vf_frame[0] != NULL && vf_frame[0]->info.res.width != 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);
@@ -7793,7 +7798,7 @@ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe)
 
 static enum ia_css_err
 create_host_copy_pipeline(struct ia_css_pipe *pipe,
-    unsigned max_input_width,
+    unsigned int max_input_width,
     struct ia_css_frame *out_frame)
 {
        struct ia_css_pipeline *me;
@@ -7876,7 +7881,7 @@ create_host_isyscopy_capture_pipeline(struct ia_css_pipe *pipe)
                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)
+       if (err != IA_CSS_SUCCESS)
                return err;
 
        ia_css_pipeline_finalize_stages(me, pipe->stream->config.continuous);
@@ -7925,8 +7930,8 @@ create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
        bool need_ldc = false;
 
        IA_CSS_ENTER_PRIVATE("");
-       assert(pipe != NULL);
-       assert(pipe->stream != NULL);
+       assert(pipe);
+       assert(pipe->stream);
        assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
 
        me = &pipe->pipeline;
@@ -8007,8 +8012,8 @@ create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
        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 != NULL && yuv_scaler_binary->info != NULL);
-       need_ldc = (capture_ldc_binary != NULL && capture_ldc_binary->info != NULL);
+       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) {
@@ -8088,7 +8093,7 @@ create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
                        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) {
+                  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);
@@ -8108,7 +8113,7 @@ create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
                        return err;
                }
 
-               if(need_pp) {
+               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);
@@ -8140,9 +8145,10 @@ create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
 #ifndef ISP2401
        if (need_pp && current_stage) {
                struct ia_css_frame *local_in_frame = NULL;
+
                local_in_frame = current_stage->args.out_frame[0];
 
-               if(need_ldc) {
+               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);
@@ -8253,7 +8259,7 @@ static enum ia_css_err capture_start(
        enum sh_css_pipe_config_override copy_ovrd;
 
        IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-       if (pipe == NULL) {
+       if (!pipe) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -8261,7 +8267,7 @@ static enum ia_css_err capture_start(
        me = &pipe->pipeline;
 
        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.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]);
@@ -8293,7 +8299,6 @@ static enum ia_css_err capture_start(
 
                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);
 
@@ -8311,7 +8316,6 @@ static enum ia_css_err capture_start(
 
        IA_CSS_LEAVE_ERR_PRIVATE(err);
        return err;
-
 }
 
 static enum ia_css_err
@@ -8319,8 +8323,8 @@ sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
                                  struct ia_css_frame_info *info,
                                  unsigned int idx)
 {
-       assert(pipe != NULL);
-       assert(info != NULL);
+       assert(pipe);
+       assert(info);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                                                "sh_css_pipe_get_output_frame_info() enter:\n");
@@ -8336,9 +8340,8 @@ sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
                        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);
-
+       info->raw_bit_depth =
+           ia_css_pipe_util_pipe_input_format_bpp(pipe);
        }
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
@@ -8353,7 +8356,7 @@ ia_css_stream_send_input_frame(const struct ia_css_stream *stream,
                               unsigned int width,
                               unsigned int height)
 {
-       assert(stream != NULL);
+       assert(stream);
 
        ia_css_inputfifo_send_input_frame(
                        data, width, height,
@@ -8365,7 +8368,7 @@ ia_css_stream_send_input_frame(const struct ia_css_stream *stream,
 void
 ia_css_stream_start_input_frame(const struct ia_css_stream *stream)
 {
-       assert(stream != NULL);
+       assert(stream);
 
        ia_css_inputfifo_start_frame(
                        stream->config.channel_id,
@@ -8380,7 +8383,7 @@ ia_css_stream_send_input_line(const struct ia_css_stream *stream,
                              const unsigned short *data2,
                              unsigned int width2)
 {
-       assert(stream != NULL);
+       assert(stream);
 
        ia_css_inputfifo_send_line(stream->config.channel_id,
                                               data, width, data2, width2);
@@ -8392,8 +8395,8 @@ ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
                const unsigned short *data,
                unsigned int width)
 {
-       assert(stream != NULL);
-       if (data == NULL || width == 0)
+       assert(stream);
+       if (!data || width == 0)
                return;
        ia_css_inputfifo_send_embedded_line(stream->config.channel_id,
                        format, data, width);
@@ -8402,7 +8405,7 @@ ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
 void
 ia_css_stream_end_input_frame(const struct ia_css_stream *stream)
 {
-       assert(stream != NULL);
+       assert(stream);
 
        ia_css_inputfifo_end_frame(stream->config.channel_id);
 }
@@ -8411,8 +8414,8 @@ ia_css_stream_end_input_frame(const struct ia_css_stream *stream)
 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 == NULL) {
+       IA_CSS_ENTER_PRIVATE("l = %p, firmware = %p", l, firmware);
+       if (!l) {
                IA_CSS_ERROR("NULL fw_info");
                IA_CSS_LEAVE_PRIVATE("");
                return;
@@ -8441,16 +8444,17 @@ static enum ia_css_err upload_isp_code(struct ia_css_fw_info *firmware)
 {
        hrt_vaddress binary;
 
-       if (firmware == NULL) {
+       if (!firmware) {
                IA_CSS_ERROR("NULL input parameter");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
        binary = firmware->info.isp.xmem_addr;
 
        if (!binary) {
-               unsigned size = firmware->blob.size;
+               unsigned int size = firmware->blob.size;
                const unsigned char *blob;
                const unsigned char *binary_name;
+
                binary_name =
                        (const unsigned char *)(IA_CSS_EXT_ISP_PROG_NAME(
                                                firmware));
@@ -8471,14 +8475,15 @@ acc_load_extension(struct ia_css_fw_info *firmware)
 {
        enum ia_css_err err;
        struct ia_css_fw_info *hd = firmware;
-       while (hd){
+
+       while (hd) {
                err = upload_isp_code(hd);
                if (err != IA_CSS_SUCCESS)
                        return err;
                hd = hd->next;
        }
 
-       if (firmware == NULL)
+       if (!firmware)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        firmware->loaded = true;
        return IA_CSS_SUCCESS;
@@ -8490,10 +8495,10 @@ acc_unload_extension(struct ia_css_fw_info *firmware)
        struct ia_css_fw_info *hd = firmware;
        struct ia_css_fw_info *hdn = NULL;
 
-       if (firmware == NULL) /* should not happen */
+       if (!firmware) /* should not happen */
                return;
        /* unload and remove multiple firmwares */
-       while (hd){
+       while (hd) {
                hdn = (hd->next) ? &(*hd->next) : NULL;
                if (hd->info.isp.xmem_addr) {
                        hmm_free(hd->info.isp.xmem_addr);
@@ -8506,6 +8511,7 @@ acc_unload_extension(struct ia_css_fw_info *firmware)
 
        firmware->loaded = false;
 }
+
 /* Load firmware for extension */
 static enum ia_css_err
 ia_css_pipe_load_extension(struct ia_css_pipe *pipe,
@@ -8515,21 +8521,20 @@ ia_css_pipe_load_extension(struct ia_css_pipe *pipe,
 
        IA_CSS_ENTER_PRIVATE("fw = %p pipe = %p", firmware, pipe);
 
-       if ((firmware == NULL) || (pipe == NULL)) {
+       if ((!firmware) || (!pipe)) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
        if (firmware->info.isp.type == IA_CSS_ACC_OUTPUT) {
-               if (&pipe->output_stage != NULL)
+               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 != NULL)
+       } 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);
@@ -8549,7 +8554,7 @@ ia_css_pipe_unload_extension(struct ia_css_pipe *pipe,
 {
        IA_CSS_ENTER_PRIVATE("fw = %p pipe = %p", firmware, pipe);
 
-       if ((firmware == NULL) || (pipe == NULL)) {
+       if ((!firmware) || (!pipe)) {
                IA_CSS_ERROR("NULL input parameters");
                IA_CSS_LEAVE_PRIVATE("");
                return;
@@ -8569,7 +8574,7 @@ ia_css_pipeline_uses_params(struct ia_css_pipeline *me)
 {
        struct ia_css_pipeline_stage *stage;
 
-       assert(me != NULL);
+       assert(me);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                "ia_css_pipeline_uses_params() enter: me=%p\n", me);
@@ -8577,8 +8582,7 @@ ia_css_pipeline_uses_params(struct ia_css_pipeline *me)
        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");
+                               "ia_css_pipeline_uses_params() leave: return_bool=true\n");
                        return true;
                }
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
@@ -8593,15 +8597,17 @@ sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline,
        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 (fw->loaded == false)
                err = acc_load_extension(fw);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "sh_css_pipeline_add_acc_stage() enter: pipeline=%p,"
-               " acc_fw=%p\n", pipeline, acc_fw);
+               "sh_css_pipeline_add_acc_stage() enter: pipeline=%p, acc_fw=%p\n",
+               pipeline, acc_fw);
 
        if (err == IA_CSS_SUCCESS) {
                struct ia_css_pipeline_stage_desc stage_desc;
+
                ia_css_pipe_get_acc_stage_desc(&stage_desc, NULL, fw);
                err = ia_css_pipeline_create_and_add_stage(pipeline,
                        &stage_desc,
@@ -8609,7 +8615,7 @@ sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline,
        }
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
-               "sh_css_pipeline_add_acc_stage() leave: return_err=%d\n",err);
+               "sh_css_pipeline_add_acc_stage() leave: return_err=%d\n", err);
        return err;
 }
 
@@ -8621,10 +8627,10 @@ 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;
-       uint32_t encoded_tag_descr;
+       u32 encoded_tag_descr;
        enum ia_css_err err;
 
-       assert(stream != NULL);
+       assert(stream);
        IA_CSS_ENTER("exp_id=%d", exp_id);
 
        /* Only continuous streams have a tagger */
@@ -8647,7 +8653,7 @@ enum ia_css_err ia_css_stream_capture_frame(struct ia_css_stream *stream,
         * 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);
+       err = ia_css_bufq_enqueue_tag_cmd(encoded_tag_descr);
 
        IA_CSS_LEAVE_ERR(err);
        return err;
@@ -8667,12 +8673,12 @@ enum ia_css_err ia_css_stream_capture(
        unsigned int encoded_tag_descr;
        enum ia_css_err return_err;
 
-       if (stream == NULL)
+       if (!stream)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        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);
+               "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) {
@@ -8685,15 +8691,13 @@ enum ia_css_err ia_css_stream_capture(
        /* 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);
 
        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");
+                       "ia_css_stream_capture() leaving:queues unavailable\n");
                return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
        }
 
@@ -8714,7 +8718,7 @@ void ia_css_stream_request_flash(struct ia_css_stream *stream)
 {
        (void)stream;
 
-       assert(stream != NULL);
+       assert(stream);
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_request_flash() enter: void\n");
 
 #ifndef ISP2401
@@ -8794,7 +8798,7 @@ sh_css_init_host_sp_control_vars(void)
 #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));
+               my_css.stop_copy_preview ? (uint32_t)(1) : (uint32_t)(0));
 #endif
        store_sp_array_uint(host_sp_com, o, host2sp_cmd_ready);
 
@@ -8821,7 +8825,7 @@ void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config)
 void
 ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config *extra_config)
 {
-       if (extra_config == NULL) {
+       if (!extra_config) {
                IA_CSS_ERROR("NULL input parameter");
                return;
        }
@@ -8838,7 +8842,7 @@ ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config *extra_config)
 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 != NULL);
+       assert(stream_config);
        memset(stream_config, 0, sizeof(*stream_config));
        stream_config->online = true;
        stream_config->left_padding = -1;
@@ -8854,7 +8858,7 @@ ia_css_acc_pipe_create(struct ia_css_pipe *pipe)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       if (pipe == NULL) {
+       if (!pipe) {
                IA_CSS_ERROR("NULL input parameter");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -8875,20 +8879,21 @@ ia_css_pipe_create(const struct ia_css_pipe_config *config,
                   struct ia_css_pipe **pipe)
 {
 #ifndef ISP2401
-       if (config == NULL)
+       if (!config)
 #else
        enum ia_css_err err = IA_CSS_SUCCESS;
+
        IA_CSS_ENTER_PRIVATE("config = %p, pipe = %p", config, pipe);
 
-       if (config == NULL) {
+       if (!config) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
 #endif
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 #ifndef ISP2401
-       if (pipe == NULL)
+       if (!pipe)
 #else
        }
-       if (pipe == NULL) {
+       if (!pipe) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
 #endif
                return IA_CSS_ERR_INVALID_ARGUMENTS;
@@ -8899,7 +8904,7 @@ ia_css_pipe_create(const struct ia_css_pipe_config *config,
 
        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);
        }
 
@@ -8926,7 +8931,7 @@ ia_css_pipe_create_extra(const struct ia_css_pipe_config *config,
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if ((pipe == NULL) || (config == NULL)) {
+       if ((!pipe) || (!config)) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -8967,7 +8972,6 @@ ia_css_pipe_create_extra(const struct ia_css_pipe_config *config,
        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
@@ -8982,6 +8986,7 @@ ia_css_pipe_create_extra(const struct ia_css_pipe_config *config,
        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(
@@ -9070,23 +9075,21 @@ ia_css_pipe_create_extra(const struct ia_css_pipe_config *config,
        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 != NULL);
-       if (pipe_info == NULL) {
+       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 == NULL || pipe->stream == NULL) {
+       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");
+                       "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 */
@@ -9099,7 +9102,7 @@ bool ia_css_pipe_has_dvs_stats(struct ia_css_pipe_info *pipe_info)
 {
        unsigned int i;
 
-       if (pipe_info != NULL) {
+       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;
@@ -9119,7 +9122,7 @@ ia_css_pipe_override_frame_format(struct ia_css_pipe *pipe,
 
        IA_CSS_ENTER_PRIVATE("pipe = %p, pin_index = %d, new_formats = %d", pipe, pin_index, new_format);
 
-       if (NULL == pipe) {
+       if (!pipe) {
                IA_CSS_ERROR("pipe is not set");
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
                IA_CSS_LEAVE_ERR_PRIVATE(err);
@@ -9131,14 +9134,14 @@ ia_css_pipe_override_frame_format(struct ia_css_pipe *pipe,
                IA_CSS_LEAVE_ERR_PRIVATE(err);
                return err;
        }
-       if (IA_CSS_FRAME_FORMAT_NV12_TILEY != new_format) {
+       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 (IA_CSS_SUCCESS == err) {
+               if (err == IA_CSS_SUCCESS) {
                        if (pin_index == 0) {
                                pipe->output_info[0].format = new_format;
                        } else {
@@ -9157,7 +9160,8 @@ static enum ia_css_err
 ia_css_stream_configure_rx(struct ia_css_stream *stream)
 {
        struct ia_css_input_port *config;
-       assert(stream != NULL);
+
+       assert(stream);
 
        config = &stream->config.source.port;
 /* AM: this code is not reliable, especially for 2400 */
@@ -9199,10 +9203,11 @@ find_pipe(struct ia_css_pipe *pipes[],
                enum ia_css_pipe_mode mode,
                bool copy_pipe)
 {
-       unsigned i;
-       assert(pipes != NULL);
+       unsigned int i;
+
+       assert(pipes);
        for (i = 0; i < num_pipes; i++) {
-               assert(pipes[i] != NULL);
+               assert(pipes[i]);
                if (pipes[i]->config.mode != mode)
                        continue;
                if (copy_pipe && pipes[i]->mode != IA_CSS_PIPE_ID_COPY)
@@ -9218,18 +9223,19 @@ ia_css_acc_stream_create(struct ia_css_stream *stream)
        int i;
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       assert(stream != NULL);
+       assert(stream);
        IA_CSS_ENTER_PRIVATE("stream = %p", stream);
 
-       if (stream == NULL) {
+       if (!stream) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
        for (i = 0;  i < stream->num_pipes; i++) {
                struct ia_css_pipe *pipe = stream->pipes[i];
-               assert(pipe != NULL);
-               if (pipe == NULL) {
+
+               assert(pipe);
+               if (!pipe) {
                        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
                }
@@ -9246,7 +9252,8 @@ ia_css_acc_stream_create(struct ia_css_stream *stream)
 
        for (i = 0;  i < stream->num_pipes; i++) {
                struct ia_css_pipe *pipe = stream->pipes[i];
-               assert(pipe != NULL);
+
+               assert(pipe);
                ia_css_pipe_map_queue(pipe, true);
        }
 
@@ -9258,7 +9265,6 @@ ia_css_acc_stream_create(struct ia_css_stream *stream)
 
        stream->started = false;
 
-
        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
 
        return IA_CSS_SUCCESS;
@@ -9273,8 +9279,8 @@ metadata_info_init(const struct ia_css_metadata_config *mdc,
                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). */
+       /* 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;
@@ -9350,8 +9356,8 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
 
        /* some checks */
        if (num_pipes == 0 ||
-               stream == NULL ||
-               pipes == NULL) {
+               !stream ||
+               !pipes) {
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
                IA_CSS_LEAVE_ERR(err);
                return err;
@@ -9385,14 +9391,15 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
        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;
                        IA_CSS_LEAVE_ERR(err);
                        return err;
                }
 
-               if (my_css.size_mem_words != 0){
+               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;
@@ -9417,7 +9424,6 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
                        IA_CSS_LEAVE_ERR(err);
                        return err;
                }
-
        }
 #endif
 
@@ -9441,7 +9447,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
 
        /* allocate pipes */
        curr_stream->num_pipes = num_pipes;
-       curr_stream->pipes = kzalloc(num_pipes * sizeof(struct ia_css_pipe *), GFP_KERNEL);
+       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);
@@ -9453,7 +9459,7 @@ ia_css_stream_create(const struct ia_css_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->pipes[i] = pipes[i];
        curr_stream->last_pipe = curr_stream->pipes[0];
        /* take over stream config */
        curr_stream->config = *stream_config;
@@ -9550,7 +9556,6 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
                        /* 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);
@@ -9594,7 +9599,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
                goto ERR;
        }
        /* sensor binning */
-       if (!spcopyonly){
+       if (!spcopyonly) {
                sensor_binning_changed =
                        sh_css_params_set_binning_factor(curr_stream, curr_stream->config.sensor_binning_factor);
        } else {
@@ -9636,7 +9641,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
                if (curr_stream->cont_capt == true) {
                        capture_pipe = find_pipe(pipes, num_pipes,
                                                IA_CSS_PIPE_MODE_CAPTURE, false);
-                       if (capture_pipe == NULL) {
+                       if (!capture_pipe) {
                                err = IA_CSS_ERR_INTERNAL_ERROR;
                                goto ERR;
                        }
@@ -9695,6 +9700,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
        /* now pipes have been configured, info should be available */
        for (i = 0; i < num_pipes; i++) {
                struct ia_css_pipe_info *pipe_info = NULL;
+
                curr_pipe = pipes[i];
 
                err = sh_css_pipe_load_binaries(curr_pipe);
@@ -9712,12 +9718,12 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
 #ifdef ISP2401
                pipe_info->output_system_in_res_info = curr_pipe->config.output_system_in_res;
 #endif
-               if (!spcopyonly){
+               if (!spcopyonly) {
                        err = sh_css_pipe_get_shading_info(curr_pipe,
 #ifndef ISP2401
                                                &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;
@@ -9807,7 +9813,7 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
 #endif
 
        IA_CSS_ENTER_PRIVATE("stream = %p", stream);
-       if (stream == NULL) {
+       if (!stream) {
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
                IA_CSS_LEAVE_ERR_PRIVATE(err);
                return err;
@@ -9815,7 +9821,7 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
 
        ia_css_stream_isp_parameters_uninit(stream);
 
-       if ((stream->last_pipe != NULL) &&
+       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++) {
@@ -9823,19 +9829,19 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
                        unsigned int sp_thread_id;
                        struct sh_css_sp_pipeline_terminal *sp_pipeline_input_terminal;
 
-                       assert(entry != NULL);
-                       if (entry != NULL) {
+                       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);
+                                       &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 =
-                                               &(sp_pipeline_input_terminal->context.virtual_input_system_stream[i]);
+                                               &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);
                                }
@@ -9854,7 +9860,7 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
                                 * some test stream create-destroy cycles do not generate output frames
                                 * and the mipi buffer is not freed in the deque function
                                 */
-                               if (entry != NULL)
+                               if (entry)
                                        free_mipi_frames(entry);
                        }
                }
@@ -9863,7 +9869,8 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
 
                for (i = 0; i < stream->num_pipes; i++) {
                        struct ia_css_pipe *curr_pipe = stream->pipes[i];
-                       assert(curr_pipe != NULL);
+
+                       assert(curr_pipe);
                        ia_css_pipe_map_queue(curr_pipe, false);
                }
 
@@ -9877,8 +9884,9 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
        /* remove references from pipes to stream */
        for (i = 0; i < stream->num_pipes; i++) {
                struct ia_css_pipe *entry = stream->pipes[i];
-               assert(entry != NULL);
-               if (entry != NULL) {
+
+               assert(entry);
+               if (entry) {
                        /* clear reference to stream */
                        entry->stream = NULL;
                        /* check internal copy pipe */
@@ -9902,7 +9910,7 @@ ia_css_stream_destroy(struct ia_css_stream *stream)
 #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++)
+               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);
@@ -9933,8 +9941,8 @@ 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 != NULL);
-       assert(stream_info != NULL);
+       assert(stream);
+       assert(stream_info);
 
        *stream_info = stream->info;
        return IA_CSS_SUCCESS;
@@ -9952,25 +9960,28 @@ ia_css_stream_load(struct ia_css_stream *stream)
 #ifndef ISP2401
        int i;
        enum ia_css_err err;
-       assert(stream != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() enter, \n");
+
+       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) {
+
+                       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++)
+
+                                               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),
+                       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));
+                                                  &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++)
@@ -9980,7 +9991,7 @@ ia_css_stream_load(struct ia_css_stream *stream)
                        break;
                }
        }
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() exit, \n");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() exit,\n");
        return IA_CSS_SUCCESS;
 #else
        /* TODO remove function - DEPRECATED */
@@ -9993,8 +10004,9 @@ 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 == NULL) || (stream->last_pipe == NULL)) {
+       if ((!stream) || (!stream->last_pipe)) {
                IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -10011,7 +10023,7 @@ ia_css_stream_start(struct ia_css_stream *stream)
 
 #if !defined(HAS_NO_INPUT_SYSTEM)
 #if defined(USE_INPUT_SYSTEM_VERSION_2401)
-       if((stream->config.mode == IA_CSS_INPUT_MODE_SENSOR) ||
+       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
@@ -10022,7 +10034,7 @@ ia_css_stream_start(struct ia_css_stream *stream)
        if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
        {
                unsigned int idx;
-               unsigned int port = (unsigned int) (stream->config.source.port.port) ;
+               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);
@@ -10049,8 +10061,8 @@ 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 != NULL);
-       assert(stream->last_pipe != NULL);
+       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);
 
@@ -10059,7 +10071,7 @@ ia_css_stream_stop(struct ia_css_stream *stream)
        if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
        {
                unsigned int idx;
-               unsigned int port = (unsigned int) (stream->config.source.port.port) ;
+               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;
@@ -10086,7 +10098,8 @@ bool
 ia_css_stream_has_stopped(struct ia_css_stream *stream)
 {
        bool stopped;
-       assert(stream != NULL);
+
+       assert(stream);
 
 #ifndef ISP2401
        stopped = ia_css_pipeline_has_stopped(&stream->last_pipe->pipeline);
@@ -10106,22 +10119,24 @@ enum ia_css_err
 ia_css_stream_unload(struct ia_css_stream *stream)
 {
        int i;
-       assert(stream != NULL);
-       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() enter, \n");
+
+       assert(stream);
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() enter,\n");
        /* some checks */
-       assert (stream != NULL);
-       for(i=0;i<MAX_ACTIVE_STREAMS;i++)
+       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++)
+                       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");
+       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() exit,\n");
        return IA_CSS_SUCCESS;
 }
 
@@ -10130,7 +10145,7 @@ 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 != NULL)
+       if (pipe)
                *pipe_id = pipe->mode;
        else
                *pipe_id = IA_CSS_PIPE_ID_COPY;
@@ -10155,12 +10170,12 @@ ia_css_stream_get_shading_correction_binary(const struct ia_css_stream *stream)
 {
        struct ia_css_pipe *pipe;
 
-       assert(stream != NULL);
+       assert(stream);
 
        pipe = stream->pipes[0];
 
        if (stream->num_pipes == 2) {
-               assert(stream->pipes[1] != NULL);
+               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];
@@ -10176,8 +10191,9 @@ ia_css_stream_get_dvs_binary(const struct ia_css_stream *stream)
        struct ia_css_pipe *video_pipe = NULL;
 
        /* First we find the video pipe */
-       for (i=0; i<stream->num_pipes; i++) {
+       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;
@@ -10194,12 +10210,12 @@ 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 != NULL);
+       assert(stream);
 
        pipe = stream->pipes[0];
 
        if (stream->num_pipes == 2) {
-               assert(stream->pipes[1] != NULL);
+               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];
@@ -10210,17 +10226,16 @@ ia_css_stream_get_3a_binary(const struct ia_css_stream *stream)
        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;
 
-       assert(stream != NULL);
+       assert(stream);
 
        pipe = stream->last_pipe;
 
-       assert(pipe != NULL);
+       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;
@@ -10234,7 +10249,7 @@ ia_css_pipe_get_shading_correction_binary(const struct ia_css_pipe *pipe)
 {
        struct ia_css_binary *binary = NULL;
 
-       assert(pipe != NULL);
+       assert(pipe);
 
        switch (pipe->config.mode) {
        case IA_CSS_PIPE_MODE_PREVIEW:
@@ -10253,8 +10268,7 @@ ia_css_pipe_get_shading_correction_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 ||
                         pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT) {
@@ -10279,26 +10293,26 @@ ia_css_pipe_get_s3a_binary(const struct ia_css_pipe *pipe)
 {
        struct ia_css_binary *binary = NULL;
 
-       assert(pipe != NULL);
+       assert(pipe);
 
        switch (pipe->config.mode) {
                case IA_CSS_PIPE_MODE_PREVIEW:
-                       binary = (struct ia_css_binary*)&pipe->pipe_settings.preview.preview_binary;
+                       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;
+                       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.s3a) {
                                                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)
+                       } 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) {
@@ -10317,7 +10331,7 @@ ia_css_pipe_get_s3a_binary(const struct ia_css_pipe *pipe)
        if (binary && !binary->info->sp.enable.s3a)
                binary = NULL;
 
-        return binary;
+       return binary;
 }
 
 static struct ia_css_binary *
@@ -10325,11 +10339,11 @@ ia_css_pipe_get_sdis_binary(const struct ia_css_pipe *pipe)
 {
        struct ia_css_binary *binary = NULL;
 
-       assert(pipe != NULL);
+       assert(pipe);
 
        switch (pipe->config.mode) {
                case IA_CSS_PIPE_MODE_VIDEO:
-                       binary = (struct ia_css_binary*)&pipe->pipe_settings.video.video_binary;
+                       binary = (struct ia_css_binary *)&pipe->pipe_settings.video.video_binary;
                        break;
                default:
                        break;
@@ -10344,15 +10358,15 @@ ia_css_pipe_get_sdis_binary(const struct ia_css_pipe *pipe)
 struct ia_css_pipeline *
 ia_css_pipe_get_pipeline(const struct ia_css_pipe *pipe)
 {
-       assert(pipe != NULL);
+       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 != NULL);
+       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
@@ -10367,11 +10381,10 @@ ia_css_pipe_get_pipe_num(const struct ia_css_pipe *pipe)
        return pipe->pipe_num;
 }
 
-
 unsigned int
 ia_css_pipe_get_isp_pipe_version(const struct ia_css_pipe *pipe)
 {
-       assert(pipe != NULL);
+       assert(pipe);
 
        return (unsigned int)pipe->config.isp_pipe_version;
 }
@@ -10389,7 +10402,7 @@ ia_css_start_sp(void)
 
        /* 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) {
+       while ((ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_INITIALIZED) && timeout) {
                timeout--;
                hrt_sleep();
        }
@@ -10502,7 +10515,7 @@ ia_css_update_continuous_frames(struct ia_css_stream *stream)
            IA_CSS_DEBUG_TRACE,
            "sh_css_update_continuous_frames() enter:\n");
 
-       if (stream == NULL) {
+       if (!stream) {
                ia_css_debug_dtrace(
                        IA_CSS_DEBUG_TRACE,
                        "sh_css_update_continuous_frames() leave: invalid stream, return_void\n");
@@ -10533,7 +10546,7 @@ void ia_css_pipe_map_queue(struct ia_css_pipe *pipe, bool map)
        bool need_input_queue;
 
        IA_CSS_ENTER("");
-       assert(pipe != NULL);
+       assert(pipe);
 
        pipe_id = pipe->mode;
        pipe_num = pipe->pipe_num;
@@ -10624,6 +10637,7 @@ void ia_css_pipe_map_queue(struct ia_css_pipe *pipe, bool map)
 #endif
        } 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])
@@ -10652,8 +10666,7 @@ static enum ia_css_err set_config_on_frame_enqueue(struct ia_css_frame_info *inf
                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))
+               } else if ((info->padded_width < info->res.width) && (info->padded_width > 0))
                {
                        return IA_CSS_ERR_INVALID_ARGUMENTS;
                }
@@ -10676,7 +10689,7 @@ ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id)
 
        /* Only continuous streams have a tagger to which we can send the
         * unlock message. */
-       if (stream == NULL || !stream->config.continuous) {
+       if (!stream || !stream->config.continuous) {
                IA_CSS_ERROR("invalid stream pointer");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -10697,7 +10710,7 @@ ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id)
 }
 
 /* @brief      Set the state (Enable or Disable) of the Extension stage in the
- *             given pipe.
+ *             given pipe.
  */
 enum ia_css_err
 ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool enable)
@@ -10709,7 +10722,7 @@ ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool
        IA_CSS_ENTER("");
 
        /* Parameter Check */
-       if (pipe == NULL || pipe->stream == NULL) {
+       if (!pipe || !pipe->stream) {
                IA_CSS_ERROR("Invalid Pipe.");
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
        } else if (!(pipe->config.acc_extension)) {
@@ -10721,19 +10734,19 @@ ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool
        } 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);
+               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,
+                               (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);
+                               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);
+                                       SH_CSS_QOS_STAGE_DISABLE(&sh_css_sp_group.pipe[thread_id], stage->stage_num);
                        }
                }
        }
@@ -10754,7 +10767,7 @@ ia_css_pipe_get_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool
        IA_CSS_ENTER("");
 
        /* Parameter Check */
-       if (pipe == NULL || pipe->stream == NULL) {
+       if (!pipe || !pipe->stream) {
                IA_CSS_ERROR("Invalid Pipe.");
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
        } else if (!(pipe->config.acc_extension)) {
@@ -10770,7 +10783,7 @@ ia_css_pipe_get_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool
 
                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;
+                       *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);
@@ -10799,7 +10812,7 @@ ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe, uint32_t fw_hand
        fw = &sh_css_sp_fw;
 
        /* Parameter Check */
-       if (pipe == NULL || pipe->stream == NULL) {
+       if (!pipe || !pipe->stream) {
                IA_CSS_ERROR("Invalid Pipe.");
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
        } else if (!(pipe->config.acc_extension)) {
@@ -10811,10 +10824,10 @@ ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe, uint32_t fw_hand
        } 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);
+               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;
+                       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.");
@@ -10861,12 +10874,12 @@ aspect_ratio_crop_init(struct ia_css_stream *curr_stream,
        enum ia_css_err err = IA_CSS_SUCCESS;
        int i;
        struct ia_css_pipe *curr_pipe;
-       uint32_t pipe_mask = 0;
+       u32 pipe_mask = 0;
 
-       if ((curr_stream == NULL) ||
+       if ((!curr_stream) ||
            (curr_stream->num_pipes == 0) ||
-           (pipes == NULL) ||
-           (do_crop_status == NULL)) {
+           (!pipes) ||
+           (!do_crop_status)) {
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
                IA_CSS_LEAVE_ERR(err);
                return err;
@@ -10890,7 +10903,7 @@ aspect_ratio_crop_check(bool enabled, struct ia_css_pipe *curr_pipe)
 {
        bool status = false;
 
-       if ((curr_pipe != NULL) && enabled) {
+       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))
@@ -10912,8 +10925,8 @@ aspect_ratio_crop(struct ia_css_pipe *curr_pipe,
        bool use_vf_pp_in_res = false;
        bool use_capt_pp_in_res = false;
 
-       if ((curr_pipe == NULL) ||
-           (effective_res == NULL)) {
+       if ((!curr_pipe) ||
+           (!effective_res)) {
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
                IA_CSS_LEAVE_ERR(err);
                return err;
@@ -11007,7 +11020,7 @@ sh_css_hmm_buffer_record_uninit(void)
        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 != NULL)
+                       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
@@ -11015,7 +11028,7 @@ sh_css_hmm_buffer_record_uninit(void)
                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 != NULL)
+                               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);
                        }
@@ -11031,7 +11044,7 @@ sh_css_hmm_buffer_record_uninit(void)
 static void
 sh_css_hmm_buffer_record_reset(struct sh_css_hmm_buffer_record *buffer_record)
 {
-       assert(buffer_record != NULL);
+       assert(buffer_record);
        buffer_record->in_use = false;
        buffer_record->type = IA_CSS_BUFFER_TYPE_INVALID;
        buffer_record->h_vbuf = NULL;
@@ -11047,7 +11060,7 @@ static struct sh_css_hmm_buffer_record
        struct sh_css_hmm_buffer_record *buffer_record = NULL;
        struct sh_css_hmm_buffer_record *out_buffer_record = NULL;
 
-       assert(h_vbuf != NULL);
+       assert(h_vbuf);
        assert((type > IA_CSS_BUFFER_TYPE_INVALID) && (type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE));
        assert(kernel_ptr != 0);
 
@@ -11079,7 +11092,7 @@ static struct sh_css_hmm_buffer_record
        for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
                if ((buffer_record->in_use) &&
                    (buffer_record->type == type) &&
-                   (buffer_record->h_vbuf != NULL) &&
+                   (buffer_record->h_vbuf) &&
                    (buffer_record->h_vbuf->vptr == ddr_buffer_addr)) {
                        found_record = true;
                        break;
index 4072c564f911b0f414903d83146147d8fe140450..87a6b4a7efdd55bddfc45a2f7dfa5a198d086b98 100644 (file)
@@ -70,7 +70,7 @@
 #define SH_CSS_BDS_FACTOR_8_00 (11)
 #define NUM_BDS_FACTORS                (12)
 
-#define PACK_BDS_FACTOR(factor)        (1<<(factor))
+#define PACK_BDS_FACTOR(factor)        (1 << (factor))
 
 /* Following macros should match with the type enum ia_css_pipe_version in
  * ia_css_pipe_public.h. The reason to add these macros is that enum type
@@ -101,7 +101,7 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
 /* Bits of fractional part of interpolation in vamem, [0,4095]->[0,255] */
 #define SH_CSS_RGB_GAMMA_FRAC_BITS        \
        (SH_CSS_RGB_GAMMA_INPUT_BITS - SH_CSS_ISP_RGB_GAMMA_TABLE_SIZE_LOG2)
-#define SH_CSS_RGB_GAMMA_ONE              (1 << SH_CSS_RGB_GAMMA_FRAC_BITS)
+#define SH_CSS_RGB_GAMMA_ONE              BIT(SH_CSS_RGB_GAMMA_FRAC_BITS)
 
 /* Bits of input of CCM,  = 13, Y[0,8191],CgCo[-4096,4095] */
 #define SH_CSS_YUV2RGB_CCM_INPUT_BITS     SH_CSS_BAYER_BITS
@@ -131,7 +131,7 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
 #define SH_CSS_MAX_BQ_GRID_WIDTH          80
 #define SH_CSS_MAX_BQ_GRID_HEIGHT         60
 
-/* The minimum dvs envelope is 12x12(for IPU2) to make sure the 
+/* The minimum dvs envelope is 12x12(for IPU2) to make sure the
  * invalid rows/columns that result from filter initialization are skipped. */
 #define SH_CSS_MIN_DVS_ENVELOPE           12U
 
@@ -184,7 +184,7 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
 #define SH_CSS_MORPH_TABLE_GRID               ISP_VEC_NELEMS
 #define SH_CSS_MORPH_TABLE_ELEM_BYTES         2
 #define SH_CSS_MORPH_TABLE_ELEMS_PER_DDR_WORD \
-       (HIVE_ISP_DDR_WORD_BYTES/SH_CSS_MORPH_TABLE_ELEM_BYTES)
+       (HIVE_ISP_DDR_WORD_BYTES / SH_CSS_MORPH_TABLE_ELEM_BYTES)
 
 #ifndef ISP2401
 #define SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR   (SH_CSS_MAX_BQ_GRID_WIDTH + 1)
@@ -211,7 +211,6 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
 
 #define NUM_TNR_FRAMES                 2       /* FIXME */
 
-
 #define MAX_NUM_DELAY_FRAMES           MAX_NUM_VIDEO_DELAY_FRAMES
 
 #else
@@ -257,15 +256,15 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
 /* Rules: these implement logic shared between the host code and ISP firmware.
    The ISP firmware needs these rules to be applied at pre-processor time,
    that's why these are macros, not functions. */
-#define _ISP_BQS(num)  ((num)/2)
+#define _ISP_BQS(num)  ((num) / 2)
 #define _ISP_VECS(width) CEIL_DIV(width, ISP_VEC_NELEMS)
 
 #define ISP_BQ_GRID_WIDTH(elements_per_line, deci_factor_log2) \
-       CEIL_SHIFT(elements_per_line/2,  deci_factor_log2)
+       CEIL_SHIFT(elements_per_line / 2,  deci_factor_log2)
 #define ISP_BQ_GRID_HEIGHT(lines_per_frame, deci_factor_log2) \
-       CEIL_SHIFT(lines_per_frame/2,  deci_factor_log2)
+       CEIL_SHIFT(lines_per_frame / 2,  deci_factor_log2)
 #define ISP_C_VECTORS_PER_LINE(elements_per_line) \
-       _ISP_VECS(elements_per_line/2)
+       _ISP_VECS(elements_per_line / 2)
 
 /* The morphing table is similar to the shading table in the sense that we
    have 1 more value than we have cells in the grid. */
@@ -304,7 +303,7 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
        CEIL_SHIFT(_ISP_BQS(in_height), deci_factor_log2)
 #define ISP_S3ATBL_VECTORS \
        _ISP_VECS(SH_CSS_MAX_S3ATBL_WIDTH * \
-                 (sizeof(struct ia_css_3a_output)/sizeof(int32_t)))
+                 (sizeof(struct ia_css_3a_output) / sizeof(int32_t)))
 #define ISP_S3ATBL_HI_LO_STRIDE \
        (ISP_S3ATBL_VECTORS * ISP_VEC_NELEMS)
 #define ISP_S3ATBL_HI_LO_STRIDE_BYTES \
@@ -312,7 +311,7 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
 
 /* Viewfinder support */
 #define __ISP_MAX_VF_OUTPUT_WIDTH(width, left_crop) \
-       (width - 2*ISP_VEC_NELEMS + ((left_crop) ? 2 * ISP_VEC_NELEMS : 0))
+       (width - 2 * ISP_VEC_NELEMS + ((left_crop) ? 2 * ISP_VEC_NELEMS : 0))
 
 #define __ISP_VF_OUTPUT_WIDTH_VECS(out_width, vf_log_downscale) \
        (_ISP_VECS((out_width) >> (vf_log_downscale)))
@@ -330,17 +329,17 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
 
 /* Rules for computing the internal width. This is extremely complicated
  * and definitely needs to be commented and explained. */
-#define _ISP_LEFT_CROP_EXTRA(left_crop) ((left_crop) > 0 ? 2*ISP_VEC_NELEMS : 0)
+#define _ISP_LEFT_CROP_EXTRA(left_crop) ((left_crop) > 0 ? 2 * ISP_VEC_NELEMS : 0)
 
 #define __ISP_MIN_INTERNAL_WIDTH(num_chunks, pipelining, mode) \
-       ((num_chunks) * (pipelining) * (1<<_ISP_LOG_VECTOR_STEP(mode)) * \
+       ((num_chunks) * (pipelining) * (1 << _ISP_LOG_VECTOR_STEP(mode)) * \
         ISP_VEC_NELEMS)
 
 #define __ISP_PADDED_OUTPUT_WIDTH(out_width, dvs_env_width, left_crop) \
        ((out_width) + MAX(dvs_env_width, _ISP_LEFT_CROP_EXTRA(left_crop)))
 
 #define __ISP_CHUNK_STRIDE_ISP(mode) \
-       ((1<<_ISP_LOG_VECTOR_STEP(mode)) * ISP_VEC_NELEMS)
+       ((1 << _ISP_LOG_VECTOR_STEP(mode)) * ISP_VEC_NELEMS)
 
 #define __ISP_CHUNK_STRIDE_DDR(c_subsampling, num_chunks) \
        ((c_subsampling) * (num_chunks) * HIVE_ISP_DDR_WORD_BYTES)
@@ -375,9 +374,9 @@ RGB[0,8191],coef[-8192,8191] -> RGB[0,8191]
        ((enable_ds) ? \
           SH_CSS_MAX_SENSOR_WIDTH :\
         (enable_fixed_bayer_ds) ? \
-          CEIL_MUL(SH_CSS_MAX_CONTINUOUS_SENSOR_WIDTH_DEC, 4*ISP_VEC_NELEMS) : \
+          CEIL_MUL(SH_CSS_MAX_CONTINUOUS_SENSOR_WIDTH_DEC, 4 * ISP_VEC_NELEMS) : \
         (enable_raw_bin) ? \
-          CEIL_MUL(SH_CSS_MAX_CONTINUOUS_SENSOR_WIDTH, 4*ISP_VEC_NELEMS) : \
+          CEIL_MUL(SH_CSS_MAX_CONTINUOUS_SENSOR_WIDTH, 4 * ISP_VEC_NELEMS) : \
         (enable_continuous) ? \
           SH_CSS_MAX_CONTINUOUS_SENSOR_WIDTH \
           : max_internal_width)
index 8158ea40d06951232befde93f200d73f7b6404aa..2be1d0904336d06b8ba15d7345c6f06f7912fd70 100644 (file)
@@ -56,7 +56,7 @@ static struct firmware_header *firmware_header;
 #ifndef ISP2401
 static const char *release_version = STR(irci_stable_candrpv_0415_20150521_0458);
 #else
-static const char *release_version = STR(irci_ecr-master_20150911_0724);
+static const char *release_version = STR(irci_ecr - master_20150911_0724);
 #endif
 
 #define MAX_FW_REL_VER_NAME    300
@@ -64,28 +64,26 @@ static char FW_rel_ver_name[MAX_FW_REL_VER_NAME] = "---";
 
 struct ia_css_fw_info    sh_css_sp_fw;
 struct ia_css_blob_descr *sh_css_blob_info; /* Only ISP blob info (no SP) */
-unsigned                 sh_css_num_binaries; /* This includes 1 SP binary */
+unsigned int sh_css_num_binaries; /* This includes 1 SP binary */
 
 static struct fw_param *fw_minibuffer;
 
-
 char *sh_css_get_fw_version(void)
 {
        return FW_rel_ver_name;
 }
 
-
 /*
  * Split the loaded firmware into blobs
  */
 
 /* 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 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 == NULL) || (fw_data == NULL))
+       if ((!fw) || (!fw_data))
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        blob_data = fw_data + fw->blob.offset;
@@ -93,7 +91,7 @@ setup_binary(struct ia_css_fw_info *fw, const char *fw_data, struct ia_css_fw_in
        *sh_css_fw = *fw;
 
        sh_css_fw->blob.code = vmalloc(fw->blob.size);
-       if (sh_css_fw->blob.code == NULL)
+       if (!sh_css_fw->blob.code)
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 
        memcpy((void *)sh_css_fw->blob.code, blob_data, fw->blob.size);
@@ -102,17 +100,18 @@ setup_binary(struct ia_css_fw_info *fw, const char *fw_data, struct ia_css_fw_in
 
        return IA_CSS_SUCCESS;
 }
+
 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 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;
 
-       if ((fw == NULL) || (bd == NULL))
+       if ((!fw) || (!bd))
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        /* Special case: only one binary in fw */
-       if (bi == NULL) bi = (const struct ia_css_fw_info *)fw;
+       if (!bi) bi = (const struct ia_css_fw_info *)fw;
 
        name = fw + bi->blob.prog_name_offset;
        blob = (const unsigned char *)fw + bi->blob.offset;
@@ -123,7 +122,7 @@ sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, struct ia
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
 
-       if ((bi->blob.offset % (1UL<<(ISP_PMEM_WIDTH_LOG2-3))) != 0)
+       if ((bi->blob.offset % (1UL << (ISP_PMEM_WIDTH_LOG2 - 3))) != 0)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        bd->blob = blob;
@@ -196,7 +195,7 @@ enum ia_css_err
 sh_css_load_firmware(const char *fw_data,
                     unsigned int fw_size)
 {
-       unsigned i;
+       unsigned int i;
        struct ia_css_fw_info *binaries;
        struct sh_css_fw_bi_file_h *file_header;
        bool valid_firmware = false;
@@ -270,7 +269,7 @@ sh_css_load_firmware(const char *fw_data,
 
                        if (bi->type != ia_css_isp_firmware)
                                return IA_CSS_ERR_INTERNAL_ERROR;
-                       if (sh_css_blob_info == NULL) /* cannot happen but KW does not see this */
+                       if (!sh_css_blob_info) /* cannot happen but KW does not see this */
                                return IA_CSS_ERR_INTERNAL_ERROR;
                        sh_css_blob_info[i - NUM_OF_SPS] = bd;
                }
@@ -281,10 +280,10 @@ sh_css_load_firmware(const char *fw_data,
 
 void sh_css_unload_firmware(void)
 {
-
        /* release firmware minibuffer */
        if (fw_minibuffer) {
                unsigned int i = 0;
+
                for (i = 0; i < sh_css_num_binaries; i++) {
                        if (fw_minibuffer[i].name)
                                kfree((void *)fw_minibuffer[i].name);
@@ -302,14 +301,14 @@ void sh_css_unload_firmware(void)
 }
 
 hrt_vaddress
-sh_css_load_blob(const unsigned char *blob, unsigned size)
+sh_css_load_blob(const unsigned char *blob, unsigned int size)
 {
        hrt_vaddress target_addr = mmgr_malloc(size);
        /* this will allocate memory aligned to a DDR word boundary which
           is required for the CSS DMA to read the instructions. */
 
-       assert(blob != NULL);
-       if (target_addr) 
+       assert(blob);
+       if (target_addr)
                mmgr_store(target_addr, blob, size);
        return target_addr;
 }
index 588aabde8a86dcb332914bed786f61244d9d9204..55d94f268b2a35bcfb1988207fc2fa8cc54c1862 100644 (file)
@@ -32,7 +32,7 @@ extern struct ia_css_fw_info     sh_css_sp_fw;
 extern struct ia_css_fw_info     sh_css_bl_fw;
 #endif /* HAS_BL */
 extern struct ia_css_blob_descr *sh_css_blob_info;
-extern unsigned                         sh_css_num_binaries;
+extern unsigned int sh_css_num_binaries;
 
 char
 *sh_css_get_fw_version(void);
@@ -46,7 +46,7 @@ sh_css_load_firmware(const char *fw_data,
 
 void sh_css_unload_firmware(void);
 
-hrt_vaddress sh_css_load_blob(const unsigned char *blob, unsigned size);
+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);
index 90a63b3921e6c76a300f24ffe15fe02146a0f40f..cd2d755ec523d860e1b7232eb4f6ed773d505f12 100644 (file)
 #include <math_support.h>
 
 #define sISP_REG_BIT                 ISP_VEC_ELEMBITS
-#define uISP_REG_BIT                 ((unsigned)(sISP_REG_BIT-1))
-#define sSHIFT                             (16-sISP_REG_BIT)
-#define uSHIFT                             ((unsigned)(16-uISP_REG_BIT))
-#define sFRACTION_BITS_FITTING(a) (a-sSHIFT)
-#define uFRACTION_BITS_FITTING(a) ((unsigned)(a-uSHIFT))
-#define sISP_VAL_MIN                 (-(1<<uISP_REG_BIT))
-#define sISP_VAL_MAX                 ((1<<uISP_REG_BIT)-1)
-#define uISP_VAL_MIN                 ((unsigned)0)
-#define uISP_VAL_MAX                 ((unsigned)((1<<uISP_REG_BIT)-1))
+#define uISP_REG_BIT                 ((unsigned int)(sISP_REG_BIT - 1))
+#define sSHIFT                             (16 - sISP_REG_BIT)
+#define uSHIFT                             ((unsigned int)(16 - uISP_REG_BIT))
+#define sFRACTION_BITS_FITTING(a) (a - sSHIFT)
+#define uFRACTION_BITS_FITTING(a) ((unsigned int)(a - uSHIFT))
+#define sISP_VAL_MIN                 (-(1 << uISP_REG_BIT))
+#define sISP_VAL_MAX                 ((1 << uISP_REG_BIT) - 1)
+#define uISP_VAL_MIN                 (0U)
+#define uISP_VAL_MAX                 ((unsigned int)((1 << uISP_REG_BIT) - 1))
 
 /* a:fraction bits for 16bit precision, b:fraction bits for ISP precision */
 #define sDIGIT_FITTING(v, a, b) \
-       min_t(int, max_t(int, (((v)>>sSHIFT) >> max(sFRACTION_BITS_FITTING(a)-(b), 0)), \
+       min_t(int, max_t(int, (((v) >> sSHIFT) >> max(sFRACTION_BITS_FITTING(a) - (b), 0)), \
          sISP_VAL_MIN), sISP_VAL_MAX)
 #define uDIGIT_FITTING(v, a, b) \
-       min((unsigned)max((unsigned)(((v)>>uSHIFT) \
-       >> max((int)(uFRACTION_BITS_FITTING(a)-(b)), 0)), \
+       min((unsigned int)max((unsigned)(((v) >> uSHIFT) \
+       >> max((int)(uFRACTION_BITS_FITTING(a) - (b)), 0)), \
          uISP_VAL_MIN), uISP_VAL_MAX)
 
 #endif /* __SH_CSS_FRAC_H */
index 716d808d56db6fcbc5f42d7e62dd0814831e4591..fb4598341408cde4cc66a546a82ce9f5fa7e5fcc 100644 (file)
@@ -48,8 +48,9 @@ bool sh_css_hrt_system_is_idle(void)
        if (!idle)
                IA_CSS_WARNING("ISP not idle");
 
-       for (ch=0; ch<N_FIFO_CHANNEL; ch++) {
+       for (ch = 0; ch < N_FIFO_CHANNEL; ch++) {
                fifo_channel_state_t state;
+
                fifo_channel_get_state(FIFO_MONITOR0_ID, ch, &state);
                if (state.fifo_valid) {
                        IA_CSS_WARNING("FIFO channel %d is not empty", ch);
@@ -76,7 +77,7 @@ enum ia_css_err sh_css_hrt_sp_wait(void)
        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)) {
+                       (1U << (irq_id + IRQ_SW_CHANNEL_OFFSET))) == 0)) {
                hrt_sleep();
        }
 
index d559f9d303cc8f7ae284fdacce5e0bc3c943dfe9..5daa0e1660edcfe61a7b00b544d52617cf339a2e 100644 (file)
 #define SH_CSS_ENABLE_METADATA_THREAD
 #endif
 
-
  /*
   * SH_CSS_MAX_SP_THREADS:
   *     sp threads visible to host with connected communication queues
@@ -241,6 +240,7 @@ struct sh_css_ddr_address_map {
        hrt_vaddress tetra_batr_y;
        hrt_vaddress dvs_6axis_params_y;
 };
+
 #define SIZE_OF_SH_CSS_DDR_ADDRESS_MAP_STRUCT                                  \
        (SIZE_OF_HRT_VADDRESS +                                                 \
        (SH_CSS_MAX_STAGES * IA_CSS_NUM_MEMORIES * SIZE_OF_HRT_VADDRESS) +      \
@@ -276,7 +276,7 @@ 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:
                                                    This should be first member of this struct */
-       uint32_t                       isp_parameters_id;/** Unique ID to track which config was actually applied to a particular frame */
+       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) */
 };
 
@@ -294,7 +294,7 @@ struct sh_css_binary_args {
        struct ia_css_frame *out_vf_frame;   /* viewfinder output frame */
        bool                 copy_vf;
        bool                 copy_output;
-       unsigned             vf_downscale_log2;
+       unsigned int vf_downscale_log2;
 };
 
 #if SP_DEBUG == SP_DEBUG_DUMP
@@ -311,18 +311,18 @@ struct sh_css_sp_debug_state {
 #define SH_CSS_SP_DBG_TRACE_DEPTH      (40)
 
 struct sh_css_sp_debug_trace {
-       uint16_t frame;
-       uint16_t line;
-       uint16_t pixel_distance;
-       uint16_t mipi_used_dword;
-       uint16_t sp_index;
+       u16 frame;
+       u16 line;
+       u16 pixel_distance;
+       u16 mipi_used_dword;
+       u16 sp_index;
 };
 
 struct sh_css_sp_debug_state {
-       uint16_t if_start_line;
-       uint16_t if_start_column;
-       uint16_t if_cropped_height;
-       uint16_t if_cropped_width;
+       u16 if_start_line;
+       u16 if_start_column;
+       u16 if_cropped_height;
+       u16 if_cropped_width;
        unsigned int index;
        struct sh_css_sp_debug_trace
                trace[SH_CSS_SP_DBG_TRACE_DEPTH];
@@ -343,16 +343,16 @@ struct sh_css_sp_debug_state {
 #define SH_CSS_SP_DBG_TRACE_FILE_ID_BIT_POS (13)
 
 struct sh_css_sp_debug_trace {
-       uint16_t time_stamp;
-       uint16_t location;      /* bit 15..13 = file_id, 12..0 = line nr. */
-       uint32_t data;
+       u16 time_stamp;
+       u16 location;   /* bit 15..13 = file_id, 12..0 = line nr. */
+       u32 data;
 };
 
 struct sh_css_sp_debug_state {
        struct sh_css_sp_debug_trace
                trace[SH_CSS_SP_DBG_NR_OF_TRACES][SH_CSS_SP_DBG_TRACE_DEPTH];
-       uint16_t index_last[SH_CSS_SP_DBG_NR_OF_TRACES];
-       uint8_t index[SH_CSS_SP_DBG_NR_OF_TRACES];
+       u16 index_last[SH_CSS_SP_DBG_NR_OF_TRACES];
+       u8 index[SH_CSS_SP_DBG_NR_OF_TRACES];
 };
 
 #elif SP_DEBUG == SP_DEBUG_MINIMAL
@@ -366,7 +366,6 @@ struct sh_css_sp_debug_state {
 
 #endif
 
-
 struct sh_css_sp_debug_command {
        /*
         * The DMA software-mask,
@@ -379,13 +378,13 @@ struct sh_css_sp_debug_command {
         * writing request through DMA Channel 1 and the reading request
         * through DMA channel 2 are both disabled. The others are enabled.
         */
-       uint32_t dma_sw_reg;
+       u32 dma_sw_reg;
 };
 
 #if !defined(HAS_NO_INPUT_FORMATTER)
 /* SP input formatter configuration.*/
 struct sh_css_sp_input_formatter_set {
-       uint32_t                                stream_format;
+       u32                             stream_format;
        input_formatter_cfg_t   config_a;
        input_formatter_cfg_t   config_b;
 };
@@ -397,18 +396,18 @@ struct sh_css_sp_input_formatter_set {
 
 /* SP configuration information */
 struct sh_css_sp_config {
-       uint8_t                 no_isp_sync; /* Signal host immediately after start */
-       uint8_t                 enable_raw_pool_locking; /** Enable Raw Buffer Locking for HALv3 Support */
-       uint8_t                 lock_all;
+       u8                      no_isp_sync; /* Signal host immediately after start */
+       u8                      enable_raw_pool_locking; /** Enable Raw Buffer Locking for HALv3 Support */
+       u8                      lock_all;
        /** If raw buffer locking is enabled, this flag indicates whether raw
             frames are locked when their EOF event is successfully sent to the
             host (true) or when they are passed to the preview/video pipe
             (false). */
 #if !defined(HAS_NO_INPUT_FORMATTER)
        struct {
-               uint8_t                                 a_changed;
-               uint8_t                                 b_changed;
-               uint8_t                                 isp_2ppc;
+               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. */
        } input_formatter;
 #endif
@@ -417,24 +416,25 @@ struct sh_css_sp_config {
        tpg_cfg_t               tpg;
        prbs_cfg_t              prbs;
        input_system_cfg_t      input_circuit;
-       uint8_t                 input_circuit_cfg_changed;
-       uint32_t                mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
+       u8                      input_circuit_cfg_changed;
+       u32             mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
 #endif
 #if !defined(HAS_NO_INPUT_SYSTEM)
-       uint8_t                 enable_isys_event_queue;
+       u8                 enable_isys_event_queue;
 #endif
-       uint8_t                 disable_cont_vf;
+       u8                      disable_cont_vf;
 };
 
 enum sh_css_stage_type {
        SH_CSS_SP_STAGE_TYPE  = 0,
        SH_CSS_ISP_STAGE_TYPE = 1
 };
+
 #define SH_CSS_NUM_STAGE_TYPES 2
 
-#define SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS       (1 << 0)
+#define SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS       BIT(0)
 #define SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS_MASK \
-       ((SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS << SH_CSS_MAX_SP_THREADS)-1)
+       ((SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS << SH_CSS_MAX_SP_THREADS) - 1)
 
 #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2401)
 struct sh_css_sp_pipeline_terminal {
@@ -463,8 +463,8 @@ struct sh_css_sp_pipeline_io {
  * Only when all streams are configured, the CSI RX is started for that port.
  */
 struct sh_css_sp_pipeline_io_status {
-       uint32_t        active[N_INPUT_SYSTEM_CSI_PORT];        /** registered streams */
-       uint32_t        running[N_INPUT_SYSTEM_CSI_PORT];       /** configured streams */
+       u32     active[N_INPUT_SYSTEM_CSI_PORT];        /** registered streams */
+       u32     running[N_INPUT_SYSTEM_CSI_PORT];       /** configured streams */
 };
 
 #endif
@@ -525,58 +525,58 @@ ia_css_metadata_free_multiple(unsigned int num_bufs, struct ia_css_metadata **bu
 
 /* Information for a pipeline */
 struct sh_css_sp_pipeline {
-       uint32_t        pipe_id;        /* the pipe ID */
-       uint32_t        pipe_num;       /* the dynamic pipe number */
-       uint32_t        thread_id;      /* the sp thread ID */
-       uint32_t        pipe_config;    /* the pipe config */
-       uint32_t        pipe_qos_config;        /* Bitmap of multiple QOS extension fw state.
+       u32     pipe_id;        /* the pipe ID */
+       u32     pipe_num;       /* the dynamic pipe number */
+       u32     thread_id;      /* the sp thread ID */
+       u32     pipe_config;    /* the pipe config */
+       u32     pipe_qos_config;        /* Bitmap of multiple QOS extension fw state.
                                                (0xFFFFFFFF) indicates non QOS pipe.*/
-       uint32_t        inout_port_config;
-       uint32_t        required_bds_factor;
-       uint32_t        dvs_frame_delay;
+       u32     inout_port_config;
+       u32     required_bds_factor;
+       u32     dvs_frame_delay;
 #if !defined(HAS_NO_INPUT_SYSTEM)
-       uint32_t        input_system_mode;      /* enum ia_css_input_mode */
-       uint32_t        port_id;        /* port_id for input system */
+       u32     input_system_mode;      /* enum ia_css_input_mode */
+       u32     port_id;        /* port_id for input system */
 #endif
-       uint32_t        num_stages;             /* the pipe config */
-       uint32_t        running;        /* needed for pipe termination */
+       u32     num_stages;             /* the pipe config */
+       u32     running;        /* needed for pipe termination */
        hrt_vaddress    sp_stage_addr[SH_CSS_MAX_STAGES];
        hrt_vaddress    scaler_pp_lut; /* Early bound LUT */
-       uint32_t        dummy; /* stage ptr is only used on sp but lives in
+       u32     dummy; /* stage ptr is only used on sp but lives in
                                  this struct; needs cleanup */
-       int32_t num_execs; /* number of times to run if this is
+       s32 num_execs; /* number of times to run if this is
                              an acceleration pipe. */
 #if defined(SH_CSS_ENABLE_METADATA)
        struct {
-               uint32_t        format;   /* Metadata format in hrt format */
-               uint32_t        width;    /* Width of a line */
-               uint32_t        height;   /* Number of lines */
-               uint32_t        stride;   /* Stride (in bytes) per line */
-               uint32_t        size;     /* Total size (in bytes) */
+               u32        format;   /* Metadata format in hrt format */
+               u32        width;    /* Width of a line */
+               u32        height;   /* Number of lines */
+               u32        stride;   /* Stride (in bytes) per line */
+               u32        size;     /* Total size (in bytes) */
                hrt_vaddress    cont_buf; /* Address of continuous buffer */
        } metadata;
 #endif
 #if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
-       uint32_t        output_frame_queue_id;
+       u32     output_frame_queue_id;
 #endif
        union {
                struct {
-                       uint32_t        bytes_available;
+                       u32     bytes_available;
                } bin;
                struct {
-                       uint32_t        height;
-                       uint32_t        width;
-                       uint32_t        padded_width;
-                       uint32_t        max_input_width;
-                       uint32_t        raw_bit_depth;
+                       u32     height;
+                       u32     width;
+                       u32     padded_width;
+                       u32     max_input_width;
+                       u32     raw_bit_depth;
                } raw;
        } copy;
 #ifdef ISP2401
 
        /* Parameters passed to Shading Correction kernel. */
        struct {
-               uint32_t internal_frame_origin_x_bqs_on_sctbl; /* Origin X (bqs) of internal frame on shading table */
-               uint32_t internal_frame_origin_y_bqs_on_sctbl; /* Origin Y (bqs) of internal frame on shading table */
+               u32 internal_frame_origin_x_bqs_on_sctbl; /* Origin X (bqs) of internal frame on shading table */
+               u32 internal_frame_origin_y_bqs_on_sctbl; /* Origin Y (bqs) of internal frame on shading table */
        } shading;
 #endif
 };
@@ -631,33 +631,33 @@ struct sh_css_sp_stage {
         * Multiple boolean flags can be stored in an
         * integer
         */
-       uint8_t                 num; /* Stage number */
-       uint8_t                 isp_online;
-       uint8_t                 isp_copy_vf;
-       uint8_t                 isp_copy_output;
-       uint8_t                 sp_enable_xnr;
-       uint8_t                 isp_deci_log_factor;
-       uint8_t                 isp_vf_downscale_bits;
-       uint8_t                 deinterleaved;
+       u8                      num; /* Stage number */
+       u8                      isp_online;
+       u8                      isp_copy_vf;
+       u8                      isp_copy_output;
+       u8                      sp_enable_xnr;
+       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
  */
-       uint8_t                 program_input_circuit;
+       u8                      program_input_circuit;
 /* enum ia_css_pipeline_stage_sp_func  func; */
-       uint8_t                 func;
+       u8                      func;
        /* The type of the pipe-stage */
        /* enum sh_css_stage_type       stage_type; */
-       uint8_t                 stage_type;
-       uint8_t                 num_stripes;
-       uint8_t                 isp_pipe_version;
+       u8                      stage_type;
+       u8                      num_stripes;
+       u8                      isp_pipe_version;
        struct {
-               uint8_t         vf_output;
-               uint8_t         s3a;
-               uint8_t         sdis;
-               uint8_t         dvs_stats;
-               uint8_t         lace_stats;
+               u8              vf_output;
+               u8              s3a;
+               u8              sdis;
+               u8              dvs_stats;
+               u8              lace_stats;
        } enable;
        /* Add padding to come to a word boundary */
        /* unsigned char                        padding[0]; */
@@ -670,10 +670,10 @@ struct sh_css_sp_stage {
        hrt_vaddress                    xmem_bin_addr;
        hrt_vaddress                    xmem_map_addr;
 
-       uint16_t                top_cropping;
-       uint16_t                row_stripes_height;
-       uint16_t                row_stripes_overlap_lines;
-       uint8_t                 if_config_index; /* Which should be applied by this stage. */
+       u16             top_cropping;
+       u16             row_stripes_height;
+       u16             row_stripes_overlap_lines;
+       u8                      if_config_index; /* Which should be applied by this stage. */
 };
 
 /*
@@ -762,9 +762,9 @@ struct sh_css_hmm_buffer {
                struct ia_css_metadata  metadata;
                struct frame_data_wrapper {
                        hrt_vaddress    frame_data;
-                       uint32_t        flashed;
-                       uint32_t        exp_id;
-                       uint32_t        isp_parameters_id; /** Unique ID to track which config was
+                       u32     flashed;
+                       u32     exp_id;
+                       u32     isp_parameters_id; /** Unique ID to track which config was
                                                                actually applied to a particular frame */
 #if CONFIG_ON_FRAME_ENQUEUE()
                        struct sh_css_config_on_frame_enqueue config_on_frame_enqueue;
@@ -779,15 +779,16 @@ struct sh_css_hmm_buffer {
         * Size of the struct is checked by sp.hive.c.
         */
 #if !defined(__ISP)
-       CSS_ALIGN(uint64_t cookie_ptr, 8); /* TODO: check if this alignment is needed */
-       uint64_t kernel_ptr;
+       CSS_ALIGN(u64 cookie_ptr, 8); /* TODO: check if this alignment is needed */
+       u64 kernel_ptr;
 #else
-       CSS_ALIGN(struct { uint32_t a[2]; } cookie_ptr, 8); /* TODO: check if this alignment is needed */
-       struct { uint32_t 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;
 };
+
 #if CONFIG_ON_FRAME_ENQUEUE()
 #define SIZE_OF_FRAME_STRUCT                                           \
        (SIZE_OF_HRT_VADDRESS +                                         \
@@ -831,9 +832,10 @@ enum sh_css_queue_type {
 };
 
 struct sh_css_event_irq_mask {
-       uint16_t or_mask;
-       uint16_t and_mask;
+       u16 or_mask;
+       u16 and_mask;
 };
+
 #define SIZE_OF_SH_CSS_EVENT_IRQ_MASK_STRUCT                           \
        (2 * sizeof(uint16_t))
 
@@ -842,7 +844,7 @@ struct host_sp_communication {
         * Don't use enum host2sp_commands, because the sizeof an enum is
         * compiler dependent and thus non-portable
         */
-       uint32_t host2sp_command;
+       u32 host2sp_command;
 
        /*
         * The frame buffers that are reused by the
@@ -860,11 +862,11 @@ struct host_sp_communication {
 #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
        hrt_vaddress host2sp_mipi_frames[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
        hrt_vaddress host2sp_mipi_metadata[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
-       uint32_t host2sp_num_mipi_frames[N_CSI_PORTS];
+       u32 host2sp_num_mipi_frames[N_CSI_PORTS];
 #endif
-       uint32_t host2sp_cont_avail_num_raw_frames;
-       uint32_t host2sp_cont_extra_num_raw_frames;
-       uint32_t host2sp_cont_target_num_raw_frames;
+       u32 host2sp_cont_avail_num_raw_frames;
+       u32 host2sp_cont_extra_num_raw_frames;
+       u32 host2sp_cont_target_num_raw_frames;
        struct sh_css_event_irq_mask host2sp_event_irq_mask[NR_OF_PIPELINES];
 
 };
@@ -904,9 +906,11 @@ struct host_sp_queues {
         * The queues for the events.
         */
        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_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];
 
@@ -915,9 +919,11 @@ struct host_sp_queues {
         * The queues for the ISYS events.
         */
        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_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];
        /*
@@ -925,6 +931,7 @@ struct host_sp_queues {
         * CHECK: are these last two present on the 2401 ?
         */
        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];
 #endif
@@ -1004,7 +1011,6 @@ void sh_css_free(void *ptr);
 /* For Acceleration API: Flush FW (shared buffer pointer) arguments */
 void sh_css_flush(struct ia_css_acc_fw *fw);
 
-
 void
 sh_css_binary_args_reset(struct sh_css_binary_args *args);
 
@@ -1041,11 +1047,10 @@ hrt_vaddress
 sh_css_store_sp_group_to_ddr(void);
 
 hrt_vaddress
-sh_css_store_sp_stage_to_ddr(unsigned pipe, unsigned stage);
+sh_css_store_sp_stage_to_ddr(unsigned int pipe, unsigned int stage);
 
 hrt_vaddress
-sh_css_store_isp_stage_to_ddr(unsigned pipe, unsigned stage);
-
+sh_css_store_isp_stage_to_ddr(unsigned int pipe, unsigned int stage);
 
 void
 sh_css_update_uds_and_crop_info(
@@ -1057,6 +1062,7 @@ sh_css_update_uds_and_crop_info(
                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
                );
 
index 4fd25ba2cd0da9700fe4fa8a60e9aa3b13d7e146..eeb0b44c9305857c576c2c89c120e092f65ce9d1 100644 (file)
@@ -38,8 +38,9 @@ enum ia_css_pipe_id {
        IA_CSS_PIPE_ID_ACC
 #endif
 };
+
 #ifdef ISP2401
-#define IA_CSS_PIPE_ID_NUM (IA_CSS_PIPE_ID_ACC+1)
+#define IA_CSS_PIPE_ID_NUM (IA_CSS_PIPE_ID_ACC + 1)
 #endif
 
 struct ia_css_pipe_extra_config {
index 48e5542b3a43ec685ad06bbf29bf75eb87983bb3..4a640eb36271ae779204ae63b14cb937ce3f0ea7 100644 (file)
@@ -41,9 +41,9 @@ sh_css_metrics_start_frame(void)
 static void
 clear_histogram(struct sh_css_pc_histogram *histogram)
 {
-       unsigned i;
+       unsigned int i;
 
-       assert(histogram != NULL);
+       assert(histogram);
 
        for (i = 0; i < histogram->length; i++) {
                histogram->run[i] = 0;
@@ -59,9 +59,9 @@ sh_css_metrics_enable_pc_histogram(bool enable)
 }
 
 static void
-make_histogram(struct sh_css_pc_histogram *histogram, unsigned length)
+make_histogram(struct sh_css_pc_histogram *histogram, unsigned int length)
 {
-       assert(histogram != NULL);
+       assert(histogram);
 
        if (histogram->length)
                return;
@@ -85,9 +85,9 @@ static void
 insert_binary_metrics(struct sh_css_binary_metrics **l,
                        struct sh_css_binary_metrics *metrics)
 {
-       assert(l != NULL);
-       assert(*l != NULL);
-       assert(metrics != NULL);
+       assert(l);
+       assert(*l);
+       assert(metrics);
 
        for (; *l; l = &(*l)->next)
                if (*l == metrics)
@@ -100,7 +100,7 @@ insert_binary_metrics(struct sh_css_binary_metrics **l,
 void
 sh_css_metrics_start_binary(struct sh_css_binary_metrics *metrics)
 {
-       assert(metrics != NULL);
+       assert(metrics);
 
        if (!pc_histogram_enabled)
                return;
@@ -125,7 +125,6 @@ sh_css_metrics_sample_pcs(void)
        unsigned int resume_sc = 0;
 #endif
 
-
 #if MULTIPLE_PCS
        int i;
        unsigned int pc_tab[NOF_PCS];
index 2ef9238d95ad56d9c9e44d66c27688d87d25b9e3..f465d1545b8b1819c5c4563c7de5ef833b210858 100644 (file)
 #include <type_support.h>
 
 struct sh_css_pc_histogram {
-       unsigned length;
-       unsigned *run;
-       unsigned *stall;
-       unsigned *msink;
+       unsigned int length;
+       unsigned int *run;
+       unsigned int *stall;
+       unsigned int *msink;
 };
 
 struct sh_css_binary_metrics {
-       unsigned mode;
-       unsigned id;
+       unsigned int mode;
+       unsigned int id;
        struct sh_css_pc_histogram isp_histogram;
        struct sh_css_pc_histogram sp_histogram;
        struct sh_css_binary_metrics *next;
 };
 
 struct ia_css_frame_metrics {
-       unsigned num_frames;
+       unsigned int num_frames;
 };
 
 struct sh_css_metrics {
index a6a00024bae842427315ef596ea1772bedd6ba65..2713fc042dcd42f3e51fcfa82f4220db825107c7 100644 (file)
@@ -30,7 +30,7 @@
 #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 uint32_t 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
@@ -59,15 +59,15 @@ static bool ia_css_mipi_is_source_port_valid(struct ia_css_pipe *pipe,
 
        switch (pipe->stream->config.mode) {
        case IA_CSS_INPUT_MODE_BUFFERED_SENSOR:
-               port = (unsigned int) pipe->stream->config.source.port.port;
+               port = (unsigned int)pipe->stream->config.source.port.port;
                max_ports = N_CSI_PORTS;
                break;
        case IA_CSS_INPUT_MODE_TPG:
-               port = (unsigned int) pipe->stream->config.source.tpg.id;
+               port = (unsigned int)pipe->stream->config.source.tpg.id;
                max_ports = N_CSS_TPG_IDS;
                break;
        case IA_CSS_INPUT_MODE_PRBS:
-               port = (unsigned int) pipe->stream->config.source.prbs.id;
+               port = (unsigned int)pipe->stream->config.source.prbs.id;
                max_ports = N_CSS_PRBS_IDS;
                break;
        default:
@@ -242,7 +242,7 @@ enum ia_css_err
 ia_css_mipi_frame_enable_check_on_size(const enum mipi_port_id port,
                                const unsigned int      size_mem_words)
 {
-       uint32_t idx;
+       u32 idx;
 
        enum ia_css_err err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
 
@@ -396,9 +396,9 @@ 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) enter:\n", pipe);
 
-       assert(pipe != NULL);
-       assert(pipe->stream != NULL);
-       if ((pipe == NULL) || (pipe->stream == NULL)) {
+       assert(pipe);
+       assert(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);
@@ -428,7 +428,7 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
        }
 
 #ifndef ISP2401
-       port = (unsigned int) pipe->stream->config.source.port.port;
+       port = (unsigned int)pipe->stream->config.source.port.port;
        assert(port < N_CSI_PORTS);
        if (port >= N_CSI_PORTS) {
 #else
@@ -442,8 +442,8 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
 
 #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)
@@ -486,7 +486,8 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
 
        /* Incremental allocation (per stream), not for all streams at once. */
        { /* limit the scope of i,j */
-               unsigned i, j;
+               unsigned int i, j;
+
                for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
                        /* free previous frame */
                        if (my_css.mipi_frames[port][i]) {
@@ -515,7 +516,7 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
                        }
                        if (info->metadata_info.size > 0) {
                                /* free previous metadata buffer */
-                               if (my_css.mipi_metadata[port][i] != NULL) {
+                               if (my_css.mipi_metadata[port][i]) {
                                        ia_css_metadata_free(my_css.mipi_metadata[port][i]);
                                        my_css.mipi_metadata[port][i] = NULL;
                                }
@@ -523,7 +524,7 @@ allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
                                if (i < my_css.num_mipi_frames[port]) {
                                        /* allocate new metadata buffer */
                                        my_css.mipi_metadata[port][i] = ia_css_metadata_allocate(&info->metadata_info);
-                                       if (my_css.mipi_metadata[port][i] == NULL) {
+                                       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);
@@ -558,9 +559,9 @@ free_mipi_frames(struct ia_css_pipe *pipe)
                "free_mipi_frames(%p) enter:\n", pipe);
 
        /* assert(pipe != NULL); TEMP: TODO: Should be assert only. */
-       if (pipe != NULL) {
-               assert(pipe->stream != NULL);
-               if ((pipe == NULL) || (pipe->stream == NULL)) {
+       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);
@@ -581,7 +582,7 @@ free_mipi_frames(struct ia_css_pipe *pipe)
                }
 
 #ifndef ISP2401
-               port = (unsigned int) pipe->stream->config.source.port.port;
+               port = (unsigned int)pipe->stream->config.source.port.port;
                assert(port < N_CSI_PORTS);
                if (port >= N_CSI_PORTS) {
 #else
@@ -615,14 +616,15 @@ free_mipi_frames(struct ia_css_pipe *pipe)
                        if (ref_count_mipi_allocation[port] == 0) {
                                /* no streams are using this buffer, so free it */
                                unsigned int i;
+
                                for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
-                                       if (my_css.mipi_frames[port][i] != NULL) {
+                                       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);
                                                ia_css_frame_free(my_css.mipi_frames[port][i]);
                                                my_css.mipi_frames[port][i] = NULL;
                                        }
-                                       if (my_css.mipi_metadata[port][i] != NULL) {
+                                       if (my_css.mipi_metadata[port][i]) {
                                                ia_css_metadata_free(my_css.mipi_metadata[port][i]);
                                                my_css.mipi_metadata[port][i] = NULL;
                                        }
@@ -648,14 +650,15 @@ free_mipi_frames(struct ia_css_pipe *pipe)
                /* 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;
+
                        for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
-                               if (my_css.mipi_frames[port][i] != NULL) {
+                               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);
                                        ia_css_frame_free(my_css.mipi_frames[port][i]);
                                        my_css.mipi_frames[port][i] = NULL;
                                }
-                               if (my_css.mipi_metadata[port][i] != NULL) {
+                               if (my_css.mipi_metadata[port][i]) {
                                        ia_css_metadata_free(my_css.mipi_metadata[port][i]);
                                        my_css.mipi_metadata[port][i] = NULL;
                                }
@@ -683,9 +686,9 @@ send_mipi_frames(struct ia_css_pipe *pipe)
 
        IA_CSS_ENTER_PRIVATE("pipe=%p", pipe);
 
-       assert(pipe != NULL);
-       assert(pipe->stream != NULL);
-       if (pipe == NULL || pipe->stream == NULL) {
+       assert(pipe);
+       assert(pipe->stream);
+       if (!pipe || !pipe->stream) {
                IA_CSS_ERROR("pipe or stream is null");
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -705,7 +708,7 @@ send_mipi_frames(struct ia_css_pipe *pipe)
        }
 
 #ifndef ISP2401
-       port = (unsigned int) pipe->stream->config.source.port.port;
+       port = (unsigned int)pipe->stream->config.source.port.port;
        assert(port < N_CSI_PORTS);
        if (port >= N_CSI_PORTS) {
                IA_CSS_ERROR("invalid port specified (%d)", port);
index 237e38b2f0c1984486e8d550bf7f66afe63511a9..ccd5bd4c965e04247c6e939658f3e91c9daad46f 100644 (file)
@@ -46,9 +46,11 @@ void
 sh_css_mmu_set_page_table_base_index(hrt_data base_index)
 {
        int i;
+
        IA_CSS_ENTER_PRIVATE("base_index=0x%08x\n", base_index);
        for (i = 0; i < N_MMU_ID; i++) {
                mmu_ID_t mmu_id = i;
+
                mmu_set_page_table_base_index(mmu_id, base_index);
                mmu_invalidate_cache(mmu_id);
        }
index 57dd5e7988c986f3b353991fd795975448bf427e..0b92f7b0746dadfb245173f9c3f4d819a04ff68f 100644 (file)
@@ -31,20 +31,18 @@ alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res, struct ia_css_d
        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));
-       if (dvs_config == NULL) {
+       if (!dvs_config)        {
                IA_CSS_ERROR("out of memory");
                err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
-       }
-       else
+       } else
        {       /*Initialize new struct with latest config settings*/
-               if (NULL != dvs_config_src) {
+               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;
                        dvs_config->width_uv = width_uv = dvs_config_src->width_uv;
                        dvs_config->height_uv = height_uv = dvs_config_src->height_uv;
                        IA_CSS_LOG("alloc_dvs_6axis_table Y: W %d H %d", width_y, height_y);
-               }
-               else if (NULL != frame_res) {
+               } 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*/
@@ -54,14 +52,14 @@ alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res, struct ia_css_d
 
                /* Generate Y buffers  */
                dvs_config->xcoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(uint32_t));
-               if (dvs_config->xcoords_y == NULL) {
+               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));
-               if (dvs_config->ycoords_y == NULL) {
+               if (!dvs_config->ycoords_y) {
                        IA_CSS_ERROR("out of memory");
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                        goto exit;
@@ -71,14 +69,14 @@ alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res, struct ia_css_d
                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));
-               if (dvs_config->xcoords_uv == NULL) {
+               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));
-               if (dvs_config->ycoords_uv == NULL) {
+               if (!dvs_config->ycoords_uv) {
                        IA_CSS_ERROR("out of memory");
                        err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                }
@@ -106,28 +104,27 @@ init_dvs_6axis_table_from_default(struct ia_css_dvs_6axis_config *dvs_config, co
                           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;
+                       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;
+                       dvs_config->ycoords_uv[y * width_uv + x] =  ((dvs_offset->height / 2) + y * DVS_BLOCKDIM_Y_CHROMA) << DVS_COORD_FRAC_BITS;
                }
        }
-
 }
 
 static void
@@ -149,8 +146,8 @@ generate_dvs_6axis_table(const struct ia_css_resolution *frame_res, const struct
 {
        struct ia_css_dvs_6axis_config *dvs_6axis_table;
 
-       assert(frame_res != NULL);
-       assert(dvs_offset != NULL);
+       assert(frame_res);
+       assert(dvs_offset);
 
        dvs_6axis_table = alloc_dvs_6axis_table(frame_res, NULL);
        if (dvs_6axis_table) {
@@ -165,7 +162,7 @@ generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config  *dvs_config
 {
        struct ia_css_dvs_6axis_config *dvs_6axis_table;
 
-       assert(NULL != dvs_config_src);
+       assert(dvs_config_src);
 
        dvs_6axis_table = alloc_dvs_6axis_table(NULL, dvs_config_src);
        if (dvs_6axis_table) {
@@ -178,32 +175,32 @@ generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config  *dvs_config
 void
 free_dvs_6axis_table(struct ia_css_dvs_6axis_config  **dvs_6axis_config)
 {
-       assert(dvs_6axis_config != NULL);
-       assert(*dvs_6axis_config != NULL);
+       assert(dvs_6axis_config);
+       assert(*dvs_6axis_config);
 
-       if ((dvs_6axis_config != NULL) && (*dvs_6axis_config != NULL))
+       if ((dvs_6axis_config) && (*dvs_6axis_config))
        {
                IA_CSS_ENTER_PRIVATE("dvs_6axis_config %p", (*dvs_6axis_config));
-               if ((*dvs_6axis_config)->xcoords_y != NULL)
+               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 != NULL)
+               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 != NULL)
+               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 != NULL)
+               if ((*dvs_6axis_config)->ycoords_uv)
                {
                        sh_css_free((*dvs_6axis_config)->ycoords_uv);
                        (*dvs_6axis_config)->ycoords_uv = NULL;
@@ -223,12 +220,12 @@ void copy_dvs_6axis_table(struct ia_css_dvs_6axis_config *dvs_config_dst,
        unsigned int width_uv;
        unsigned int height_uv;
 
-       assert(dvs_config_src != NULL);
-       assert(dvs_config_dst != NULL);
-       assert(dvs_config_src->xcoords_y != NULL);
-       assert(dvs_config_src->xcoords_uv != NULL);
-       assert(dvs_config_src->ycoords_y != NULL);
-       assert(dvs_config_src->ycoords_uv != NULL);
+       assert(dvs_config_src);
+       assert(dvs_config_dst);
+       assert(dvs_config_src->xcoords_y);
+       assert(dvs_config_src->xcoords_uv);
+       assert(dvs_config_src->ycoords_y);
+       assert(dvs_config_src->ycoords_uv);
        assert(dvs_config_src->width_y == dvs_config_dst->width_y);
        assert(dvs_config_src->width_uv == dvs_config_dst->width_uv);
        assert(dvs_config_src->height_y == dvs_config_dst->height_y);
@@ -244,7 +241,6 @@ void copy_dvs_6axis_table(struct ia_css_dvs_6axis_config *dvs_config_dst,
 
        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
@@ -252,16 +248,14 @@ 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 (DVS_STATISTICS == type)
+       if (type == DVS_STATISTICS)
        {
                ia_css_get_dvs_statistics(host_stats->p_dvs_statistics_host,
                        isp_stats->p_dvs_statistics_isp);
-       } else if (DVS2_STATISTICS == type)
+       } else if (type == DVS2_STATISTICS)
        {
                ia_css_get_dvs2_statistics(host_stats->p_dvs2_statistics_host,
                        isp_stats->p_dvs_statistics_isp);
        }
        return;
 }
-
index 79b563dc78eea23ad95b5f07693eb8ee761e230a..04389a7dbcb060acd88cce14c366977475a72611 100644 (file)
@@ -38,7 +38,6 @@
 #define DVS_NUM_BLOCKS_X_CHROMA(X)     (CEIL_DIV((X), DVS_BLOCKDIM_X))
 #define DVS_NUM_BLOCKS_Y_CHROMA(X)     (CEIL_DIV((X), DVS_BLOCKDIM_Y_CHROMA))
 
-
 #endif
 #define DVS_TABLE_IN_BLOCKDIM_X_LUMA(X)        (DVS_NUM_BLOCKS_X(X) + 1)  /* N blocks have N + 1 set of coords */
 #define DVS_TABLE_IN_BLOCKDIM_X_CHROMA(X)   (DVS_NUM_BLOCKS_X_CHROMA(X) + 1)
@@ -82,5 +81,4 @@ void
 copy_dvs_6axis_table(struct ia_css_dvs_6axis_config *dvs_config_dst,
                         const struct ia_css_dvs_6axis_config *dvs_config_src);
 
-
 #endif
index e6ebd1b08f0d61369757ed1917b5167ff3cf4b01..f5cfd4cbe41c6fceed10b982053c8fe9626bce53 100644 (file)
@@ -94,8 +94,8 @@ crop_and_interpolate(unsigned int cropped_width,
        unsigned short *in_ptr,
                       *out_ptr;
 
-       assert(in_table != NULL);
-       assert(out_table != NULL);
+       assert(in_table);
+       assert(out_table);
 
        sensor_width  = in_table->sensor_width;
        sensor_height = in_table->sensor_height;
@@ -108,10 +108,10 @@ crop_and_interpolate(unsigned int cropped_width,
        out_cell_size = CEIL_DIV(padded_width, out_table->width - 1);
        in_cell_size  = CEIL_DIV(sensor_width, table_width - 1);
 
-       out_start_col = ((int)sensor_width - (int)cropped_width)/2 - left_padding;
-       out_start_row = ((int)sensor_height - (int)cropped_height)/2 - top_padding;
-       table_cell_w = (int)((table_width-1) * in_cell_size);
-       table_cell_h = (table_height-1) * in_cell_size;
+       out_start_col = ((int)sensor_width - (int)cropped_width) / 2 - left_padding;
+       out_start_row = ((int)sensor_height - (int)cropped_height) / 2 - top_padding;
+       table_cell_w = (int)((table_width - 1) * in_cell_size);
+       table_cell_h = (table_height - 1) * in_cell_size;
 
        for (i = 0; i < out_table->height; i++) {
                int ty, src_y0, src_y1;
@@ -128,14 +128,14 @@ crop_and_interpolate(unsigned int cropped_width,
                        src_y1 = (ty + out_cell_size) / in_cell_size;
                else
                        src_y1 = src_y0 + 1;
-               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),
+               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);
 
                /* calculate closest source points for distance computation */
-               sy0 = min(src_y0 * in_cell_size, sensor_height-1);
-               sy1 = min(src_y1 * in_cell_size, sensor_height-1);
+               sy0 = min(src_y0 * in_cell_size, sensor_height - 1);
+               sy1 = min(src_y1 * in_cell_size, sensor_height - 1);
                /* calculate distance between source and target pixels */
                dy0 = ty - sy0;
                dy1 = sy1 - ty;
@@ -161,14 +161,14 @@ crop_and_interpolate(unsigned int cropped_width,
                                src_x1 = src_x0 + 1;
                        }
                        /* if src points fall in padding, select closest ones.*/
-                       src_x0 = clamp(src_x0, 0, (int)table_width-1);
-                       src_x1 = clamp(src_x1, 0, (int)table_width-1);
-                       tx = min(clamp(tx, 0, (int)sensor_width-1),
+                       src_x0 = clamp(src_x0, 0, (int)table_width - 1);
+                       src_x1 = clamp(src_x1, 0, (int)table_width - 1);
+                       tx = min(clamp(tx, 0, (int)sensor_width - 1),
                                 (int)table_cell_w);
                        /* calculate closest source points for distance
                           computation */
-                       sx0 = min(src_x0 * in_cell_size, sensor_width-1);
-                       sx1 = min(src_x1 * in_cell_size, sensor_width-1);
+                       sx0 = min(src_x0 * in_cell_size, sensor_width - 1);
+                       sx1 = min(src_x1 * in_cell_size, sensor_width - 1);
                        /* calculate distances between source and target
                           pixels */
                        dx0 = tx - sx0;
@@ -184,13 +184,13 @@ crop_and_interpolate(unsigned int cropped_width,
                        }
 
                        /* get source pixel values */
-                       s_ul = in_ptr[(table_width*src_y0)+src_x0];
-                       s_ur = in_ptr[(table_width*src_y0)+src_x1];
-                       s_ll = in_ptr[(table_width*src_y1)+src_x0];
-                       s_lr = in_ptr[(table_width*src_y1)+src_x1];
+                       s_ul = in_ptr[(table_width * src_y0) + src_x0];
+                       s_ur = in_ptr[(table_width * src_y0) + src_x1];
+                       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));
                }
        }
 }
@@ -213,9 +213,9 @@ sh_css_params_shading_id_table_generate(
 #endif
        struct ia_css_shading_table *result;
 
-       assert(target_table != NULL);
+       assert(target_table);
 #ifndef ISP2401
-       assert(binary != NULL);
+       assert(binary);
 #endif
 
 #ifndef ISP2401
@@ -223,7 +223,7 @@ sh_css_params_shading_id_table_generate(
        table_height = binary->sctbl_height;
 #endif
        result = ia_css_shading_table_alloc(table_width, table_height);
-       if (result == NULL) {
+       if (!result) {
                *target_table = NULL;
                return;
        }
@@ -257,8 +257,8 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
 
        struct ia_css_shading_table *result;
 
-       assert(target_table != NULL);
-       assert(binary != NULL);
+       assert(target_table);
+       assert(binary);
 
        if (!in_table) {
 #ifndef ISP2401
@@ -275,14 +275,14 @@ 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;
        left_padding  = binary->left_padding;
        left_cropping = (binary->info->sp.pipeline.left_cropping == 0) ?
-                       binary->dvs_envelope.width : 2*ISP_VEC_NELEMS;
+                       binary->dvs_envelope.width : 2 * ISP_VEC_NELEMS;
 
        sh_css_bds_factor_get_numerator_denominator
                (bds_factor, &bds_numerator, &bds_denominator);
@@ -335,7 +335,7 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
 #endif
 
        result = ia_css_shading_table_alloc(table_width, table_height);
-       if (result == NULL) {
+       if (!result) {
                *target_table = NULL;
                return;
        }
@@ -376,8 +376,9 @@ ia_css_shading_table_alloc(
        for (i = 0; i < IA_CSS_SC_NUM_COLORS; i++) {
                me->data[i] =
                    sh_css_malloc(width * height * sizeof(*me->data[0]));
-               if (me->data[i] == NULL) {
+               if (!me->data[i]) {
                        unsigned int j;
+
                        for (j = 0; j < i; j++) {
                                sh_css_free(me->data[j]);
                                me->data[j] = NULL;
@@ -396,7 +397,7 @@ ia_css_shading_table_free(struct ia_css_shading_table *table)
 {
        unsigned int i;
 
-       if (table == NULL)
+       if (!table)
                return;
 
        /* We only output logging when the table is not NULL, otherwise
@@ -414,4 +415,3 @@ ia_css_shading_table_free(struct ia_css_shading_table *table)
 
        IA_CSS_LEAVE("");
 }
-
index e87863b7c8cce37655ff3324c4e33f31c22a4a0e..2521f622d7502adc5a6ad601b8de20ca66986186 100644 (file)
@@ -36,4 +36,3 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
                      unsigned int bds_factor);
 
 #endif /* __SH_CSS_PARAMS_SHADING_H */
-
index 9084bf751d633e1c6d37dd3837b85104c4c66b94..2a2bb27bdc1c514f0a21025eaa24e9c0cfc14313 100644 (file)
@@ -677,521 +677,521 @@ static const int zoom_table[4][HRT_GDC_N] = {
 };
 #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,
-                 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,
-                 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
+       {         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,
+                 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,
+                 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
        },
-       {         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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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,
-                 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
+       {         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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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,
+                 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
        },
-       {        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,
-                -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,
-                 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,
-                 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,
-                 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,
+                 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,
+                 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,
+                 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,
+                 0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4,   0 << 4
        }
 };
 #endif
@@ -1219,6 +1219,7 @@ static const struct ia_css_shading_settings default_shading_settings = {
        1       /* enable shading table conversion in the css
                (This matches the legacy way.) */
 };
+
 /* ------ deprecated(bz675) : to ------ */
 
 struct ia_css_isp_skc_dvs_statistics {
@@ -1241,7 +1242,7 @@ 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 pipe_id,
+               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,
@@ -1318,9 +1319,9 @@ convert_allocate_fpntbl(struct ia_css_isp_parameters *params)
        short *data_ptr;
        struct ia_css_host_data *me;
        unsigned int isp_format_data_size;
-       uint32_t *isp_format_data_ptr;
+       u32 *isp_format_data_ptr;
 
-       assert(params != NULL);
+       assert(params);
 
        data_ptr = params->fpn_config.data;
        isp_format_data_size = params->fpn_config.height * params->fpn_config.width * sizeof(uint32_t);
@@ -1351,7 +1352,7 @@ store_fpntbl(struct ia_css_isp_parameters *params, hrt_vaddress ptr)
 {
        struct ia_css_host_data *isp_data;
 
-       assert(params != NULL);
+       assert(params);
        assert(ptr != mmgr_NULL);
 
        isp_data = convert_allocate_fpntbl(params);
@@ -1371,7 +1372,7 @@ convert_raw_to_fpn(struct ia_css_isp_parameters *params)
        int maxval = 0;
        unsigned int i;
 
-       assert(params != NULL);
+       assert(params);
 
        /* Find the maximum value in the table */
        for (i = 0; i < params->fpn_config.height * params->fpn_config.width; i++) {
@@ -1401,17 +1402,18 @@ convert_raw_to_fpn(struct ia_css_isp_parameters *params)
        }
        /* Adjust the values in the table for the shift value */
        for (i = 0; i < params->fpn_config.height * params->fpn_config.width; i++)
-               ((unsigned short *) params->fpn_config.data)[i] >>= params->fpn_config.shift;
+               ((unsigned short *)params->fpn_config.data)[i] >>= params->fpn_config.shift;
 }
 
 static void
 ia_css_process_kernel(struct ia_css_stream *stream,
                      struct ia_css_isp_parameters *params,
-                     void (*process)(unsigned pipe_id,
+                     void (*process)(unsigned int pipe_id,
                                      const struct ia_css_pipeline_stage *stage,
                                      struct ia_css_isp_parameters *params))
 {
        int i;
+
        for (i = 0; i < stream->num_pipes; i++) {
                struct ia_css_pipe *pipe = stream->pipes[i];
                struct ia_css_pipeline *pipeline = ia_css_pipe_get_pipeline(pipe);
@@ -1427,7 +1429,6 @@ 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) {
-
        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
@@ -1436,7 +1437,7 @@ 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 == NULL) || (is_dp_10bpp == NULL)) {
+       if ((!pipe) || (!is_dp_10bpp)) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
                err = IA_CSS_ERR_INTERNAL_ERROR;
        } else {
@@ -1446,13 +1447,14 @@ sh_css_select_dp_10bpp_config(const struct ia_css_pipe *pipe, bool *is_dp_10bpp)
                if (pipe->config.enable_dpc) {
                        /*check if BDS is enabled*/
                        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)) {
                                if (IA_CSS_SUCCESS == binarydesc_calculate_bds_factor(
                                        pipe->config.input_effective_res,
                                        pipe->config.bayer_ds_out_res,
                                        &required_bds_factor)) {
-                                       if (SH_CSS_BDS_FACTOR_1_00 != required_bds_factor) {
+                                       if (required_bds_factor != SH_CSS_BDS_FACTOR_1_00) {
                                                /*we use 10bpp BDS configuration*/
                                                *is_dp_10bpp = true;
                                        }
@@ -1475,8 +1477,8 @@ sh_css_set_black_frame(struct ia_css_stream *stream,
        unsigned int height, width, y, x, k, data;
        hrt_vaddress ptr;
 
-       assert(stream != NULL);
-       assert(raw_black_frame != NULL);
+       assert(stream);
+       assert(raw_black_frame);
 
        params = stream->isp_params_configs;
        height = raw_black_frame->info.res.height;
@@ -1492,7 +1494,7 @@ sh_css_set_black_frame(struct ia_css_stream *stream,
                sh_css_free(params->fpn_config.data);
                params->fpn_config.data = NULL;
        }
-       if (params->fpn_config.data == NULL) {
+       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");
@@ -1508,20 +1510,21 @@ sh_css_set_black_frame(struct ia_css_stream *stream,
        for (y = 0; y < height; y++) {
                for (x = 0; x < width; x += (ISP_VEC_NELEMS * 2)) {
                        int ofs = y * width + x;
+
                        for (k = 0; k < ISP_VEC_NELEMS; k += 2) {
                                mmgr_load(ptr, (void *)(&data), sizeof(int));
                                params->fpn_config.data[ofs + 2 * k] =
-                                   (short) (data & 0xFFFF);
+                                   (short)(data & 0xFFFF);
                                params->fpn_config.data[ofs + 2 * k + 2] =
-                                   (short) ((data >> 16) & 0xFFFF);
+                                   (short)((data >> 16) & 0xFFFF);
                                ptr += sizeof(int);     /* byte system address */
                        }
                        for (k = 0; k < ISP_VEC_NELEMS; k += 2) {
                                mmgr_load(ptr, (void *)(&data), sizeof(int));
                                params->fpn_config.data[ofs + 2 * k + 1] =
-                                   (short) (data & 0xFFFF);
+                                   (short)(data & 0xFFFF);
                                params->fpn_config.data[ofs + 2 * k + 3] =
-                                   (short) ((data >> 16) & 0xFFFF);
+                                   (short)((data >> 16) & 0xFFFF);
                                ptr += sizeof(int);     /* byte system address */
                        }
                }
@@ -1544,7 +1547,7 @@ sh_css_params_set_binning_factor(struct ia_css_stream *stream, unsigned int binn
        struct ia_css_isp_parameters *params;
 
        IA_CSS_ENTER_PRIVATE("void");
-       assert(stream != NULL);
+       assert(stream);
 
        params = stream->isp_params_configs;
 
@@ -1574,9 +1577,9 @@ sh_css_set_shading_table(struct ia_css_stream *stream,
                         const struct ia_css_shading_table *table)
 {
        IA_CSS_ENTER_PRIVATE("");
-       if (table == NULL)
+       if (!table)
                return;
-       assert(stream != NULL);
+       assert(stream);
 
        if (!table->enable)
                table = NULL;
@@ -1601,8 +1604,8 @@ ia_css_params_store_ia_css_host_data(
        hrt_vaddress ddr_addr,
        struct ia_css_host_data *data)
 {
-       assert(data != NULL);
-       assert(data->address != NULL);
+       assert(data);
+       assert(data->address);
        assert(ddr_addr != mmgr_NULL);
 
        IA_CSS_ENTER_PRIVATE("");
@@ -1625,12 +1628,12 @@ ia_css_params_alloc_convert_sctbl(
        unsigned int sctbl_size;
        short int    *ptr;
 
-       assert(binary != NULL);
-       assert(shading_table != NULL);
+       assert(binary);
+       assert(shading_table);
 
        IA_CSS_ENTER_PRIVATE("");
 
-       if (shading_table == NULL) {
+       if (!shading_table) {
                IA_CSS_LEAVE_PRIVATE("void");
                return NULL;
        }
@@ -1643,7 +1646,7 @@ ia_css_params_alloc_convert_sctbl(
 
        if (!sctbl)
                return NULL;
-       ptr = (short int*)sctbl->address;
+       ptr = (short int *)sctbl->address;
        memset(ptr,
                0,
                sctbl_size);
@@ -1652,7 +1655,7 @@ ia_css_params_alloc_convert_sctbl(
                for (j = 0; j < IA_CSS_SC_NUM_COLORS; j++) {
                        memcpy(ptr,
                                   &shading_table->data[j]
-                                       [i*shading_table->width],
+                                       [i * shading_table->width],
                                   shading_table->width * sizeof(short));
                        ptr += aligned_width;
                }
@@ -1671,7 +1674,7 @@ enum ia_css_err ia_css_params_store_sctbl(
 
        IA_CSS_ENTER_PRIVATE("");
 
-       if (sc_config == NULL) {
+       if (!sc_config) {
                IA_CSS_LEAVE_PRIVATE("void");
                return IA_CSS_SUCCESS;
        }
@@ -1712,16 +1715,16 @@ ia_css_process_zoom_and_motion(
        const struct ia_css_pipeline_stage *stage;
        enum ia_css_err err = IA_CSS_SUCCESS;
        struct ia_css_resolution pipe_in_res;
+
        pipe_in_res.width = 0;
        pipe_in_res.height = 0;
 
-       assert(params != NULL);
+       assert(params);
 
        IA_CSS_ENTER_PRIVATE("");
 
        /* Go through all stages to udate uds and cropping */
        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
@@ -1737,6 +1740,7 @@ ia_css_process_zoom_and_motion(
                } else {
                        const struct sh_css_binary_args *args = &stage->args;
                        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 = &stage->firmware->info.isp;
@@ -1785,7 +1789,7 @@ ia_css_process_zoom_and_motion(
                                pipe_in_res,
                                stage->enable_zoom);
                        if (err != IA_CSS_SUCCESS)
-                           return err;
+                       return err;
                }
        }
        params->isp_params_changed = true;
@@ -1798,11 +1802,11 @@ static void
 sh_css_set_gamma_table(struct ia_css_isp_parameters *params,
                        const struct ia_css_gamma_table *table)
 {
-       if (table == NULL)
+       if (!table)
                return;
        IA_CSS_ENTER_PRIVATE("table=%p", table);
 
-       assert(params != NULL);
+       assert(params);
        params->gc_table = *table;
        params->config_changed[IA_CSS_GC_ID] = true;
 
@@ -1813,11 +1817,11 @@ static void
 sh_css_get_gamma_table(const struct ia_css_isp_parameters *params,
                        struct ia_css_gamma_table *table)
 {
-       if (table == NULL)
+       if (!table)
                return;
        IA_CSS_ENTER_PRIVATE("table=%p", table);
 
-       assert(params != NULL);
+       assert(params);
        *table = params->gc_table;
 
        IA_CSS_LEAVE_PRIVATE("void");
@@ -1827,12 +1831,12 @@ static void
 sh_css_set_ctc_table(struct ia_css_isp_parameters *params,
                        const struct ia_css_ctc_table *table)
 {
-       if (table == NULL)
+       if (!table)
                return;
 
        IA_CSS_ENTER_PRIVATE("table=%p", table);
 
-       assert(params != NULL);
+       assert(params);
        params->ctc_table = *table;
        params->config_changed[IA_CSS_CTC_ID] = true;
 
@@ -1843,12 +1847,12 @@ static void
 sh_css_get_ctc_table(const struct ia_css_isp_parameters *params,
                        struct ia_css_ctc_table *table)
 {
-       if (table == NULL)
+       if (!table)
                return;
 
        IA_CSS_ENTER_PRIVATE("table=%p", table);
 
-       assert(params != NULL);
+       assert(params);
        *table = params->ctc_table;
 
        IA_CSS_LEAVE_PRIVATE("void");
@@ -1858,12 +1862,12 @@ static void
 sh_css_set_macc_table(struct ia_css_isp_parameters *params,
                        const struct ia_css_macc_table *table)
 {
-       if (table == NULL)
+       if (!table)
                return;
 
        IA_CSS_ENTER_PRIVATE("table=%p", table);
 
-       assert(params != NULL);
+       assert(params);
        params->macc_table = *table;
        params->config_changed[IA_CSS_MACC_ID] = true;
 
@@ -1874,12 +1878,12 @@ static void
 sh_css_get_macc_table(const struct ia_css_isp_parameters *params,
                        struct ia_css_macc_table *table)
 {
-       if (table == NULL)
+       if (!table)
                return;
 
        IA_CSS_ENTER_PRIVATE("table=%p", table);
 
-       assert(params != NULL);
+       assert(params);
        *table = params->macc_table;
 
        IA_CSS_LEAVE_PRIVATE("void");
@@ -1888,16 +1892,13 @@ sh_css_get_macc_table(const struct ia_css_isp_parameters *params,
 void ia_css_morph_table_free(
        struct ia_css_morph_table *me)
 {
-
        unsigned int i;
 
-       if (me == NULL)
+       if (!me)
                return;
 
        IA_CSS_ENTER("");
 
-
-
        for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
                if (me->coordinates_x[i]) {
                        sh_css_free(me->coordinates_x[i]);
@@ -1911,22 +1912,19 @@ void ia_css_morph_table_free(
 
        sh_css_free(me);
        IA_CSS_LEAVE("void");
-
 }
 
-
 struct ia_css_morph_table *ia_css_morph_table_allocate(
        unsigned int width,
        unsigned int height)
 {
-
        unsigned int i;
        struct ia_css_morph_table *me;
 
        IA_CSS_ENTER("");
 
        me = sh_css_malloc(sizeof(*me));
-       if (me == NULL) {
+       if (!me) {
                IA_CSS_ERROR("out of memory");
                return me;
        }
@@ -1944,8 +1942,8 @@ struct ia_css_morph_table *ia_css_morph_table_allocate(
                    sh_css_malloc(height * width *
                                  sizeof(*me->coordinates_y[i]));
 
-               if ((me->coordinates_x[i] == NULL) ||
-                       (me->coordinates_y[i] == NULL)) {
+               if ((!me->coordinates_x[i]) ||
+                       (!me->coordinates_y[i])) {
                        ia_css_morph_table_free(me);
                        me = NULL;
                        return me;
@@ -1955,10 +1953,8 @@ struct ia_css_morph_table *ia_css_morph_table_allocate(
        me->height = height;
        IA_CSS_LEAVE("");
        return me;
-
 }
 
-
 static enum ia_css_err sh_css_params_default_morph_table(
        struct ia_css_morph_table **table,
        const struct ia_css_binary *binary)
@@ -1969,8 +1965,8 @@ static enum ia_css_err sh_css_params_default_morph_table(
              start_y[IA_CSS_MORPH_TABLE_NUM_PLANES] = { 0, 0, -8, -8, -8, 0 };
        struct ia_css_morph_table *tab;
 
-       assert(table != NULL);
-       assert(binary != NULL);
+       assert(table);
+       assert(binary);
 
        IA_CSS_ENTER_PRIVATE("");
 
@@ -1979,11 +1975,12 @@ static enum ia_css_err sh_css_params_default_morph_table(
        height = binary->morph_tbl_height;
 
        tab = ia_css_morph_table_allocate(width, height);
-       if (tab == NULL)
+       if (!tab)
                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 
        for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
                short val_y = start_y[i];
+
                for (j = 0; j < height; j++) {
                        short val_x = start_x[i];
                        unsigned short *x_ptr, *y_ptr;
@@ -2017,12 +2014,12 @@ static void
 sh_css_set_morph_table(struct ia_css_isp_parameters *params,
                        const struct ia_css_morph_table *table)
 {
-       if (table == NULL)
+       if (!table)
                return;
 
        IA_CSS_ENTER_PRIVATE("table=%p", table);
 
-       assert(params != NULL);
+       assert(params);
        if (table->enable == false)
                table = NULL;
        params->morph_table = table;
@@ -2082,7 +2079,7 @@ ia_css_isp_3a_statistics_map_allocate(
        }
 
        me->data_ptr = data_ptr;
-       me->data_allocated = data_ptr == NULL;
+       me->data_allocated = !data_ptr;
        if (!data_ptr) {
                me->data_ptr = sh_css_malloc(isp_stats->size);
                if (!me->data_ptr) {
@@ -2109,7 +2106,6 @@ err:
        if (me)
                sh_css_free(me);
        return NULL;
-
 }
 
 enum ia_css_err
@@ -2121,8 +2117,8 @@ ia_css_get_3a_statistics(struct ia_css_3a_statistics           *host_stats,
 
        IA_CSS_ENTER("host_stats=%p, isp_stats=%p", host_stats, isp_stats);
 
-       assert(host_stats != NULL);
-       assert(isp_stats != NULL);
+       assert(host_stats);
+       assert(isp_stats);
 
        map = ia_css_isp_3a_statistics_map_allocate(isp_stats, NULL);
        if (map) {
@@ -2145,7 +2141,7 @@ static void
 ia_css_set_param_exceptions(const struct ia_css_pipe *pipe,
                                struct ia_css_isp_parameters *params)
 {
-       assert(params != NULL);
+       assert(params);
 
        /* Copy also to DP. Should be done by the driver. */
        params->dp_config.gr = params->wb_config.gr;
@@ -2153,7 +2149,7 @@ ia_css_set_param_exceptions(const struct ia_css_pipe *pipe,
        params->dp_config.b  = params->wb_config.b;
        params->dp_config.gb = params->wb_config.gb;
 #ifdef ISP2401
-       assert(pipe != NULL);
+       assert(pipe);
        assert(pipe->mode < IA_CSS_PIPE_ID_NUM);
 
        if (pipe->mode < IA_CSS_PIPE_ID_NUM) {
@@ -2171,11 +2167,11 @@ sh_css_set_dp_config(const struct ia_css_pipe *pipe,
                        struct ia_css_isp_parameters *params,
                        const struct ia_css_dp_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       assert(pipe != NULL);
+       assert(params);
+       assert(pipe);
        assert(pipe->mode < IA_CSS_PIPE_ID_NUM);
 
        IA_CSS_ENTER_PRIVATE("config=%p", config);
@@ -2193,11 +2189,11 @@ sh_css_get_dp_config(const struct ia_css_pipe *pipe,
                        const struct ia_css_isp_parameters *params,
                        struct ia_css_dp_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
-       assert(params != NULL);
-       assert(pipe != NULL);
+       assert(params);
+       assert(pipe);
        IA_CSS_ENTER_PRIVATE("config=%p", config);
 
        *config = params->pipe_dp_config[pipe->mode];
@@ -2209,9 +2205,9 @@ static void
 sh_css_set_nr_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_nr_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
-       assert(params != NULL);
+       assert(params);
 
        IA_CSS_ENTER_PRIVATE("config=%p", config);
 
@@ -2229,9 +2225,9 @@ static void
 sh_css_set_ee_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_ee_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
-       assert(params != NULL);
+       assert(params);
 
        IA_CSS_ENTER_PRIVATE("config=%p", config);
        ia_css_ee_debug_dtrace(config, IA_CSS_DEBUG_TRACE_PRIVATE);
@@ -2247,12 +2243,12 @@ static void
 sh_css_get_ee_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_ee_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
 
        IA_CSS_ENTER_PRIVATE("config=%p", config);
 
-       assert(params != NULL);
+       assert(params);
        *config = params->ee_config;
 
        ia_css_ee_debug_dtrace(config, IA_CSS_DEBUG_TRACE_PRIVATE);
@@ -2264,10 +2260,10 @@ 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)
 {
-       if (dvs_config == NULL)
+       if (!dvs_config)
                return;
-       assert(params != NULL);
-       assert(pipe != NULL);
+       assert(params);
+       assert(pipe);
        assert(dvs_config->height_y == dvs_config->height_uv);
        assert((dvs_config->width_y - 1) == 2 * (dvs_config->width_uv - 1));
        assert(pipe->mode < IA_CSS_PIPE_ID_NUM);
@@ -2288,10 +2284,10 @@ 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)
 {
-       if (dvs_config == NULL)
+       if (!dvs_config)
                return;
-       assert(params != NULL);
-       assert(pipe != NULL);
+       assert(params);
+       assert(pipe);
        assert(dvs_config->height_y == dvs_config->height_uv);
        assert((dvs_config->width_y - 1) == 2 * dvs_config->width_uv - 1);
 
@@ -2317,9 +2313,9 @@ static void
 sh_css_set_baa_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_aa_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
-       assert(params != NULL);
+       assert(params);
 
        IA_CSS_ENTER_PRIVATE("config=%p", config);
 
@@ -2333,9 +2329,9 @@ static void
 sh_css_get_baa_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_aa_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
-       assert(params != NULL);
+       assert(params);
 
        IA_CSS_ENTER_PRIVATE("config=%p", config);
 
@@ -2348,9 +2344,9 @@ static void
 sh_css_set_dz_config(struct ia_css_isp_parameters *params,
                        const struct ia_css_dz_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
-       assert(params != NULL);
+       assert(params);
 
        IA_CSS_ENTER_PRIVATE("dx=%d, dy=%d", config->dx, config->dy);
 
@@ -2369,9 +2365,9 @@ static void
 sh_css_get_dz_config(const struct ia_css_isp_parameters *params,
                        struct ia_css_dz_config *config)
 {
-       if (config == NULL)
+       if (!config)
                return;
-       assert(params != NULL);
+       assert(params);
 
        IA_CSS_ENTER_PRIVATE("config=%p", config);
 
@@ -2384,9 +2380,9 @@ static void
 sh_css_set_motion_vector(struct ia_css_isp_parameters *params,
                        const struct ia_css_vector *motion)
 {
-       if (motion == NULL)
+       if (!motion)
                return;
-       assert(params != NULL);
+       assert(params);
 
        IA_CSS_ENTER_PRIVATE("x=%d, y=%d", motion->x, motion->y);
 
@@ -2402,9 +2398,9 @@ static void
 sh_css_get_motion_vector(const struct ia_css_isp_parameters *params,
                        struct ia_css_vector *motion)
 {
-       if (motion == NULL)
+       if (!motion)
                return;
-       assert(params != NULL);
+       assert(params);
 
        IA_CSS_ENTER_PRIVATE("motion=%p", motion);
 
@@ -2416,7 +2412,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 == NULL)
+       if (!pipe)
        {
                IA_CSS_ERROR("pipe=%p", NULL);
                return NULL;
@@ -2440,7 +2436,7 @@ ia_css_stream_set_isp_config_on_pipe(
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       if ((stream == NULL) || (config == NULL))
+       if ((!stream) || (!config))
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        IA_CSS_ENTER("stream=%p, config=%p, pipe=%p", stream, config, pipe);
@@ -2465,7 +2461,7 @@ ia_css_pipe_set_isp_config(struct ia_css_pipe *pipe,
 
        IA_CSS_ENTER("pipe=%p", pipe);
 
-       if ((pipe == NULL) || (pipe->stream == NULL))
+       if ((!pipe) || (!pipe->stream))
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "config=%p\n", config);
@@ -2503,7 +2499,7 @@ sh_css_set_global_isp_config_on_pipe(
         * 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 : err);
+       err = (err1 != IA_CSS_SUCCESS) ? err1 : ((err2 != IA_CSS_SUCCESS) ? err2 : err);
 
        IA_CSS_LEAVE_ERR_PRIVATE(err);
        return err;
@@ -2516,7 +2512,7 @@ sh_css_set_per_frame_isp_config_on_pipe(
        const struct ia_css_isp_config *config,
        struct ia_css_pipe *pipe)
 {
-       unsigned i;
+       unsigned int i;
        bool per_frame_config_created = false;
        enum ia_css_err err = IA_CSS_SUCCESS;
        enum ia_css_err err1 = IA_CSS_SUCCESS;
@@ -2541,7 +2537,7 @@ sh_css_set_per_frame_isp_config_on_pipe(
        {
                err = sh_css_create_isp_params(stream,
                                               &stream->per_frame_isp_params_configs);
-               if(err != IA_CSS_SUCCESS)
+               if (err != IA_CSS_SUCCESS)
                        goto exit;
                per_frame_config_created = true;
        }
@@ -2591,13 +2587,13 @@ sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
        bool is_dp_10bpp = true;
-       assert(pipe != NULL);
+
+       assert(pipe);
 
        IA_CSS_ENTER_PRIVATE("pipe=%p, config=%p, params=%p", pipe, config, params);
 
        ia_css_set_configs(params, config);
 
-
        sh_css_set_nr_config(params, config->nr_config);
        sh_css_set_ee_config(params, config->ee_config);
        sh_css_set_baa_config(params, config->baa_config);
@@ -2616,8 +2612,8 @@ sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
        sh_css_set_shading_settings(params, config->shading_settings);
 /* ------ deprecated(bz675) : to ------ */
 
-       params->dis_coef_table_changed = (config->dvs_coefs != NULL);
-       params->dvs2_coef_table_changed = (config->dvs2_coefs != NULL);
+       params->dis_coef_table_changed = (config->dvs_coefs);
+       params->dvs2_coef_table_changed = (config->dvs2_coefs);
 
        params->output_frame = config->output_frame;
        params->isp_parameters_id = config->isp_config_id;
@@ -2637,7 +2633,7 @@ sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
                 * user. */
                /* we do not exit from this point immediately to allow internal
                 * firmware feature testing. */
-               if(is_dp_10bpp) {
+               if (is_dp_10bpp) {
                        err = IA_CSS_ERR_INVALID_ARGUMENTS;
                }
        } else {
@@ -2669,12 +2665,12 @@ ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
 {
        struct ia_css_isp_parameters *params = NULL;
 
-       assert(config != NULL);
+       assert(config);
 
        IA_CSS_ENTER("config=%p", config);
 
        params = pipe->stream->isp_params_configs;
-       assert(params != NULL);
+       assert(params);
 
        ia_css_get_configs(params, config);
 
@@ -2711,7 +2707,7 @@ static bool realloc_isp_css_mm_buf(
        enum ia_css_err *err,
        uint16_t mmgr_attribute)
 {
-       int32_t id;
+       s32 id;
 
        *err = IA_CSS_SUCCESS;
        /* Possible optimization: add a function sh_css_isp_css_mm_realloc()
@@ -2752,7 +2748,7 @@ static bool reallocate_buffer(
        enum ia_css_err *err)
 {
        bool ret;
-       uint16_t        mmgr_attribute = MMGR_ATTRIBUTE_DEFAULT;
+       u16     mmgr_attribute = MMGR_ATTRIBUTE_DEFAULT;
 
        IA_CSS_ENTER_PRIVATE("void");
 
@@ -2772,7 +2768,7 @@ ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
 
        IA_CSS_ENTER("grid=%p", grid);
 
-       assert(grid != NULL);
+       assert(grid);
 
        /* MW: Does "grid->enable" also control the histogram output ?? */
        if (!grid->enable)
@@ -2815,7 +2811,6 @@ ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
        if (me->hmem_size)
                me->data_hmem.rgby_tbl = me->data_ptr + me->dmem_size + 2 * me->vmem_size;
 
-
 err:
        IA_CSS_LEAVE("return=%p", me);
        return me;
@@ -2824,7 +2819,7 @@ err:
 void
 ia_css_isp_3a_statistics_free(struct ia_css_isp_3a_statistics *me)
 {
-       if (me != NULL) {
+       if (me) {
                hmm_free(me->data_ptr);
                sh_css_free(me);
        }
@@ -2846,7 +2841,7 @@ ia_css_metadata_allocate(const struct ia_css_metadata_info *metadata_info)
                return NULL;
 
        md = sh_css_malloc(sizeof(*md));
-       if (md == NULL)
+       if (!md)
                goto error;
 
        md->info = *metadata_info;
@@ -2867,7 +2862,7 @@ error:
 void
 ia_css_metadata_free(struct ia_css_metadata *me)
 {
-       if (me != NULL) {
+       if (me) {
                /* The enter and leave macros are placed inside
                 * the condition to avoid false logging of metadata
                 * free events when metadata is disabled.
@@ -2885,28 +2880,28 @@ ia_css_metadata_free_multiple(unsigned int num_bufs, struct ia_css_metadata **bu
 {
        unsigned int i;
 
-       if (bufs != NULL) {
+       if (bufs) {
                for (i = 0; i < num_bufs; i++)
                        ia_css_metadata_free(bufs[i]);
        }
 }
 
-static unsigned g_param_buffer_dequeue_count = 0;
-static unsigned g_param_buffer_enqueue_count = 0;
+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)
 {
        enum ia_css_err err = IA_CSS_SUCCESS;
-       unsigned i;
+       unsigned int i;
        struct sh_css_ddr_address_map *ddr_ptrs;
        struct sh_css_ddr_address_map_size *ddr_ptrs_size;
        struct ia_css_isp_parameters *params;
 
-       assert(stream != NULL);
+       assert(stream);
        IA_CSS_ENTER_PRIVATE("void");
 
-       if (stream == NULL) {
+       if (!stream) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
                return IA_CSS_ERR_INVALID_ARGUMENTS;
        }
@@ -2917,8 +2912,8 @@ ia_css_stream_isp_parameters_init(struct ia_css_stream *stream)
        stream->per_frame_isp_params_configs = NULL;
        err = sh_css_create_isp_params(stream,
                                       &stream->isp_params_configs);
-       if(err != IA_CSS_SUCCESS)
-                goto ERR;
+       if (err != IA_CSS_SUCCESS)
+               goto ERR;
 
        params = stream->isp_params_configs;
        if (!sh_css_init_isp_params_from_global(stream, params, true, NULL)) {
@@ -2968,7 +2963,7 @@ sh_css_create_isp_params(struct ia_css_stream *stream,
                         struct ia_css_isp_parameters **isp_params_out)
 {
        bool succ = true;
-       unsigned i;
+       unsigned int i;
        struct sh_css_ddr_address_map *ddr_ptrs;
        struct sh_css_ddr_address_map_size *ddr_ptrs_size;
        enum ia_css_err err = IA_CSS_SUCCESS;
@@ -3026,7 +3021,7 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
        bool retval = true;
        int i = 0;
        bool is_dp_10bpp = true;
-       unsigned 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) {
@@ -3066,12 +3061,12 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
 #else
 
                for (i = 0; i < stream->num_pipes; i++) {
-                       if (IA_CSS_SUCCESS == sh_css_select_dp_10bpp_config(stream->pipes[i], &is_dp_10bpp)) {
+                       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
                                 * feature testing. */
-                               if(is_dp_10bpp) {
+                               if (is_dp_10bpp) {
                                        sh_css_set_dp_config(stream->pipes[i], params, &default_dp_10bpp_config);
                                } else {
                                        sh_css_set_dp_config(stream->pipes[i], params, &default_dp_config);
@@ -3131,8 +3126,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);
 
@@ -3219,8 +3213,7 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
                if (stream_params->sc_table) {
                        sh_css_update_shading_table_status(pipe_in, params);
                        sh_css_set_shading_table(stream, params, stream_params->sc_table);
-               }
-               else {
+               } else {
                        params->sc_table = NULL;
                        params->sc_table_changed = true;
                        params->sc_table_dirty = false;
@@ -3305,7 +3298,7 @@ sh_css_params_init(void)
 
 static void host_lut_store(const void *lut)
 {
-       unsigned i;
+       unsigned int i;
 
        for (i = 0; i < N_GDC_ID; i++)
                gdc_lut_store((gdc_ID_t)i, (const int (*)[HRT_GDC_N]) lut);
@@ -3334,7 +3327,7 @@ enum ia_css_err ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe,
 #endif
        IA_CSS_ENTER("pipe=%p lut=%p", pipe, lut);
 
-       if (lut == NULL || pipe == NULL) {
+       if (!lut || !pipe) {
                err = IA_CSS_ERR_INVALID_ARGUMENTS;
                IA_CSS_LEAVE("err=%d", err);
                return err;
@@ -3397,7 +3390,7 @@ enum ia_css_err ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe,
 /* if pipe is NULL, returns default lut addr. */
 hrt_vaddress sh_css_pipe_get_pp_gdc_lut(const struct ia_css_pipe *pipe)
 {
-       assert(pipe != NULL);
+       assert(pipe);
 
        if (pipe->scaler_pp_lut != mmgr_NULL)
                return pipe->scaler_pp_lut;
@@ -3442,7 +3435,6 @@ void sh_css_params_free_default_gdc_lut(void)
        default_gdc_lut = mmgr_NULL;
 
        IA_CSS_LEAVE_PRIVATE("void");
-
 }
 
 hrt_vaddress sh_css_params_get_default_gdc_lut(void)
@@ -3488,7 +3480,7 @@ sh_css_param_clear_param_sets(void)
        do {                  \
                ia_css_refcount_decrement(id, x);     \
                (x) = mmgr_NULL;  \
-       } while(0)
+       } while (0)
 
 static void free_map(struct sh_css_ddr_address_map *map)
 {
@@ -3499,7 +3491,7 @@ static void free_map(struct sh_css_ddr_address_map *map)
        IA_CSS_ENTER_PRIVATE("void");
 
        /* free buffers */
-       for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size)/
+       for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size) /
                                                sizeof(size_t)); i++) {
                if (addrs[i] == mmgr_NULL)
                        continue;
@@ -3518,7 +3510,7 @@ ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream)
                                                stream->per_frame_isp_params_configs;
 
        IA_CSS_ENTER_PRIVATE("void");
-       if (params == NULL) {
+       if (!params) {
                IA_CSS_LEAVE_PRIVATE("isp_param_configs is NULL");
                return;
        }
@@ -3531,9 +3523,9 @@ ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream)
                        free_map(&per_frame_params->pipe_ddr_ptrs[i]);
                /* Free up theDVS table memory blocks before recomputing new table */
                if (params->pipe_dvs_6axis_config[i])
-                       free_dvs_6axis_table(&(params->pipe_dvs_6axis_config[i]));
+                       free_dvs_6axis_table(&params->pipe_dvs_6axis_config[i]);
                if (per_frame_params && per_frame_params->pipe_dvs_6axis_config[i])
-                       free_dvs_6axis_table(&(per_frame_params->pipe_dvs_6axis_config[i]));
+                       free_dvs_6axis_table(&per_frame_params->pipe_dvs_6axis_config[i]);
        }
        free_map(&params->ddr_ptrs);
        if (per_frame_params)
@@ -3568,7 +3560,7 @@ ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream)
 void
 sh_css_params_uninit(void)
 {
-       unsigned p, i;
+       unsigned int p, i;
 
        IA_CSS_ENTER_PRIVATE("void");
 
@@ -3603,7 +3595,7 @@ convert_allocate_morph_plane(
        unsigned int i, j, padding, w;
        struct ia_css_host_data *me;
        unsigned int isp_data_size;
-       uint16_t *isp_data_ptr;
+       u16 *isp_data_ptr;
 
        IA_CSS_ENTER_PRIVATE("void");
 
@@ -3619,7 +3611,7 @@ convert_allocate_morph_plane(
        }
        isp_data_size = height * (w + padding) * sizeof(uint16_t);
 
-       me = ia_css_host_data_allocate((size_t) isp_data_size);
+       me = ia_css_host_data_allocate((size_t)isp_data_size);
 
        if (!me) {
                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
@@ -3672,9 +3664,9 @@ static void sh_css_update_isp_params_to_ddr(
 
        IA_CSS_ENTER_PRIVATE("void");
 
-       assert(params != NULL);
+       assert(params);
 
-       mmgr_store(ddr_ptr, &(params->uds), size);
+       mmgr_store(ddr_ptr, &params->uds, size);
        IA_CSS_LEAVE_PRIVATE("void");
 }
 
@@ -3713,7 +3705,7 @@ 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_SUCCESS == ia_css_bufq_dequeue_buffer(param_queue_ids[i], (uint32_t *)&cpy)) {
+               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++;
@@ -3739,7 +3731,7 @@ process_kernel_parameters(unsigned int pipe_id,
                          unsigned int isp_pipe_version,
                          unsigned int raw_bit_depth)
 {
-       unsigned param_id;
+       unsigned int param_id;
 
        (void)isp_pipe_version;
        (void)raw_bit_depth;
@@ -3783,7 +3775,7 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
 
        (void)acc_cluster_params_changed;
 
-       assert(curr_pipe != NULL);
+       assert(curr_pipe);
 
        IA_CSS_ENTER_PRIVATE("pipe=%p, isp_parameters_id=%d", pipe_in, params->isp_parameters_id);
        raw_bit_depth = ia_css_stream_input_format_bits_per_pixel(curr_pipe->stream);
@@ -3838,7 +3830,7 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
                        err = ia_css_process_zoom_and_motion(params,
                                        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
@@ -3851,7 +3843,7 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
                /* BZ 125915, should be moved till after "update other buff" */
                /* update the other buffers to the pipe specific copies */
                for (stage = pipeline->stages; stage; stage = stage->next) {
-                       unsigned mem;
+                       unsigned int mem;
 
                        if (!stage || !stage->binary)
                                continue;
@@ -3912,7 +3904,7 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
                IA_CSS_LOG("queue param set %x to %d", cpy, thread_id);
 
                err = ia_css_bufq_enqueue_buffer(thread_id, queue_id, (uint32_t)cpy);
-               if (IA_CSS_SUCCESS != err) {
+               if (err != IA_CSS_SUCCESS) {
                        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",
@@ -3921,13 +3913,12 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
                                queue_id, thread_id);
 #endif
                        break;
-               }
-               else {
+               } else {
                        /* TMP: check discrepancy between nr of enqueued
                         * parameter sets and dequeued sets
                         */
                        g_param_buffer_enqueue_count++;
-                       assert(g_param_buffer_enqueue_count < g_param_buffer_dequeue_count+50);
+                       assert(g_param_buffer_enqueue_count < g_param_buffer_dequeue_count + 50);
 #ifdef ISP2401
                        ia_css_save_latest_paramset_ptr(pipe, cpy);
 #endif
@@ -3978,7 +3969,7 @@ 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 pipe_id,
+       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,
@@ -3987,22 +3978,21 @@ sh_css_params_write_to_ddr_internal(
        enum ia_css_err err;
        const struct ia_css_binary *binary;
 
-       unsigned stage_num;
-       unsigned mem;
+       unsigned int stage_num;
+       unsigned int mem;
        bool buff_realloced;
 
        /* struct is > 128 bytes so it should not be on stack (see checkpatch) */
        static struct ia_css_macc_table converted_macc_table;
 
        IA_CSS_ENTER_PRIVATE("void");
-       assert(params != NULL);
-       assert(ddr_map != NULL);
-       assert(ddr_map_size != NULL);
-       assert(stage != NULL);
+       assert(params);
+       assert(ddr_map);
+       assert(ddr_map_size);
+       assert(stage);
 
        binary = stage->binary;
-       assert(binary != NULL);
-
+       assert(binary);
 
        stage_num = stage->stage_num;
 
@@ -4028,7 +4018,7 @@ sh_css_params_write_to_ddr_internal(
        }
 
        if (binary->info->sp.enable.sc) {
-               uint32_t enable_conv = params->
+               u32 enable_conv = params->
                        shading_settings.enable_shading_table_conversion;
 
                buff_realloced = reallocate_buffer(&ddr_map->sc_tbl,
@@ -4067,7 +4057,7 @@ sh_css_params_write_to_ddr_internal(
                                        sh_css_params_shading_id_table_generate(&params->sc_config,
                                                binary->sctbl_width_per_color, binary->sctbl_height);
 #endif
-                                       if (params->sc_config == NULL) {
+                                       if (!params->sc_config) {
                                                IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
                                                return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                                        }
@@ -4098,7 +4088,7 @@ sh_css_params_write_to_ddr_internal(
                                        params->sensor_binning,
                                        &params->sc_config,
                                        binary, pipe->required_bds_factor);
-                               if (params->sc_config == NULL) {
+                               if (!params->sc_config) {
                                        IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
                                        return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
                                }
@@ -4125,9 +4115,10 @@ sh_css_params_write_to_ddr_internal(
         * 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 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 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],
@@ -4146,31 +4137,31 @@ sh_css_params_write_to_ddr_internal(
                        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];
-                       j   = 4*i;
+                       idx = 4 * idx_map[i];
+                       j   = 4 * i;
 
                        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);
-                               converted_macc_table.data[idx+1] =
-                                 (int16_t)sDIGIT_FITTING(params->macc_table.data[j+1],
+                               converted_macc_table.data[idx + 1] =
+                                 (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],
+                               converted_macc_table.data[idx + 2] =
+                                 (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],
+                               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) {
                                converted_macc_table.data[idx] =
                                        params->macc_table.data[j];
-                               converted_macc_table.data[idx+1] =
-                                       params->macc_table.data[j+1];
-                               converted_macc_table.data[idx+2] =
-                                       params->macc_table.data[j+2];
-                               converted_macc_table.data[idx+3] =
-                                       params->macc_table.data[j+3];
+                               converted_macc_table.data[idx + 1] =
+                                       params->macc_table.data[j + 1];
+                               converted_macc_table.data[idx + 2] =
+                                       params->macc_table.data[j + 2];
+                               converted_macc_table.data[idx + 3] =
+                                       params->macc_table.data[j + 3];
                        }
                }
                reallocate_buffer(&ddr_map->macc_tbl,
@@ -4206,7 +4197,7 @@ sh_css_params_write_to_ddr_internal(
                if (params->pipe_dvs_6axis_config_changed[pipe_id] || buff_realloced) {
                        const struct ia_css_frame_info *dvs_in_frame_info;
 
-                       if ( stage->args.delay_frames[0] ) {
+                       if (stage->args.delay_frames[0]) {
                                /*When delay frames are present(as in case of video),
                                they are used for dvs. Configure DVS using those params*/
                                dvs_in_frame_info = &stage->args.delay_frames[0]->info;
@@ -4216,13 +4207,14 @@ sh_css_params_write_to_ddr_internal(
                        }
 
                        /* Generate default DVS unity table on start up*/
-                       if (params->pipe_dvs_6axis_config[pipe_id] == NULL) {
-
+                       if (!params->pipe_dvs_6axis_config[pipe_id]) {
 #ifndef ISP2401
                                struct ia_css_resolution dvs_offset;
+
                                dvs_offset.width  =
 #else
                                struct ia_css_resolution dvs_offset = {0, 0};
+
                                if (binary->dvs_envelope.width || binary->dvs_envelope.height) {
                                        dvs_offset.width  =
 #endif
@@ -4239,7 +4231,7 @@ sh_css_params_write_to_ddr_internal(
 
                                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] == NULL) {
+                               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;
                                }
@@ -4322,12 +4314,12 @@ sh_css_params_write_to_ddr_internal(
                        const struct ia_css_morph_table *table = params->morph_table;
                        struct ia_css_morph_table *id_table = NULL;
 
-                       if ((table != NULL) &&
+                       if ((table) &&
                            (table->width < binary->morph_tbl_width ||
                             table->height < binary->morph_tbl_height)) {
                                table = NULL;
                        }
-                       if (table == NULL) {
+                       if (!table) {
                                err = sh_css_params_default_morph_table(&id_table,
                                                                  binary);
                                if (err != IA_CSS_SUCCESS) {
@@ -4349,7 +4341,7 @@ sh_css_params_write_to_ddr_internal(
                                        *virt_addr_tetra_y[i],
                                        binary->morph_tbl_aligned_width);
                        }
-                       if (id_table != NULL)
+                       if (id_table)
                                ia_css_morph_table_free(id_table);
                }
        }
@@ -4359,6 +4351,7 @@ sh_css_params_write_to_ddr_internal(
                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],
@@ -4385,11 +4378,11 @@ const struct ia_css_fpn_table *ia_css_get_fpn_table(struct ia_css_stream *stream
        struct ia_css_isp_parameters *params;
 
        IA_CSS_ENTER_LEAVE("void");
-       assert(stream != NULL);
+       assert(stream);
 
        params = stream->isp_params_configs;
 
-       return &(params->fpn_config);
+       return &params->fpn_config;
 }
 
 struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream *stream)
@@ -4399,7 +4392,7 @@ struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream *stre
 
        IA_CSS_ENTER("void");
 
-       assert(stream != NULL);
+       assert(stream);
 
        params = stream->isp_params_configs;
        if (!params)
@@ -4441,7 +4434,7 @@ struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream *stre
                pipe = stream->pipes[0];
 
                if (stream->num_pipes == 2) {
-                       assert(stream->pipes[1] != NULL);
+                       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];
@@ -4470,7 +4463,6 @@ struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream *stre
        return table;
 }
 
-
 hrt_vaddress sh_css_store_sp_group_to_ddr(void)
 {
        IA_CSS_ENTER_LEAVE_PRIVATE("void");
@@ -4481,8 +4473,8 @@ hrt_vaddress sh_css_store_sp_group_to_ddr(void)
 }
 
 hrt_vaddress sh_css_store_sp_stage_to_ddr(
-       unsigned pipe,
-       unsigned stage)
+       unsigned int pipe,
+       unsigned int stage)
 {
        IA_CSS_ENTER_LEAVE_PRIVATE("void");
        mmgr_store(xmem_sp_stage_ptrs[pipe][stage],
@@ -4492,8 +4484,8 @@ hrt_vaddress sh_css_store_sp_stage_to_ddr(
 }
 
 hrt_vaddress sh_css_store_isp_stage_to_ddr(
-       unsigned pipe,
-       unsigned stage)
+       unsigned int pipe,
+       unsigned int stage)
 {
        IA_CSS_ENTER_LEAVE_PRIVATE("void");
        mmgr_store(xmem_isp_stage_ptrs[pipe][stage],
@@ -4519,17 +4511,17 @@ static enum ia_css_err ref_sh_css_ddr_address_map(
        } in_addrs, to_addrs;
 
        IA_CSS_ENTER_PRIVATE("void");
-       assert(map != NULL);
-       assert(out != NULL);
+       assert(map);
+       assert(out);
 
        in_addrs.map = map;
        to_addrs.map = out;
 
-       assert(sizeof(struct sh_css_ddr_address_map_size)/sizeof(size_t) ==
-              sizeof(struct sh_css_ddr_address_map)/sizeof(hrt_vaddress));
+       assert(sizeof(struct sh_css_ddr_address_map_size) / sizeof(size_t) ==
+              sizeof(struct sh_css_ddr_address_map) / sizeof(hrt_vaddress));
 
        /* copy map using size info */
-       for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size)/
+       for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size) /
                                                sizeof(size_t)); i++) {
                if (in_addrs.addrs[i] == mmgr_NULL)
                        to_addrs.addrs[i] = mmgr_NULL;
@@ -4550,8 +4542,8 @@ static enum ia_css_err write_ia_css_isp_parameter_set_info_to_ddr(
 
        IA_CSS_ENTER_PRIVATE("void");
 
-       assert(me != NULL);
-       assert(out != NULL);
+       assert(me);
+       assert(out);
 
        *out = ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_SET_POOL, mmgr_malloc(
                                sizeof(struct ia_css_isp_parameter_set_info)));
@@ -4587,7 +4579,7 @@ 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)/
+       for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size) /
                                                sizeof(size_t)); i++) {
                if (addrs[i] == mmgr_NULL)
                        continue;
@@ -4620,10 +4612,10 @@ void
 sh_css_invalidate_params(struct ia_css_stream *stream)
 {
        struct  ia_css_isp_parameters *params;
-       unsigned i, j, mem;
+       unsigned int i, j, mem;
 
        IA_CSS_ENTER_PRIVATE("void");
-       assert(stream != NULL);
+       assert(stream);
 
        params = stream->isp_params_configs;
        params->isp_params_changed = true;
@@ -4646,7 +4638,7 @@ sh_css_invalidate_params(struct ia_css_stream *stream)
        /*Free up theDVS table memory blocks before recomputing new table  */
        for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++) {
                if (params->pipe_dvs_6axis_config[i]) {
-                       free_dvs_6axis_table(&(params->pipe_dvs_6axis_config[i]));
+                       free_dvs_6axis_table(&params->pipe_dvs_6axis_config[i]);
                        params->pipe_dvs_6axis_config_changed[i] = true;
                }
        }
@@ -4664,18 +4656,19 @@ sh_css_update_uds_and_crop_info(
        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");
 
-       assert(info != NULL);
-       assert(in_frame_info != NULL);
-       assert(out_frame_info != NULL);
-       assert(dvs_env != NULL);
-       assert(zoom != NULL);
-       assert(motion_vector != NULL);
-       assert(uds != NULL);
-       assert(sp_out_crop_pos != NULL);
+       assert(info);
+       assert(in_frame_info);
+       assert(out_frame_info);
+       assert(dvs_env);
+       assert(zoom);
+       assert(motion_vector);
+       assert(uds);
+       assert(sp_out_crop_pos);
 
        uds->curr_dx   = enable_zoom ? (uint16_t)zoom->dx : HRT_GDC_N;
        uds->curr_dy   = enable_zoom ? (uint16_t)zoom->dy : HRT_GDC_N;
@@ -4744,8 +4737,8 @@ sh_css_update_uds_and_crop_info(
                        motion_y = clamp(motion_y, -half_env_y, half_env_y);
                        /* for video with downscaling, the envelope is included
                            in the input resolution. */
-                       uds_xc = in_frame_info->res.width/2 + motion_x;
-                       uds_yc = in_frame_info->res.height/2 + motion_y;
+                       uds_xc = in_frame_info->res.width / 2 + motion_x;
+                       uds_yc = in_frame_info->res.height / 2 + motion_y;
                        crop_x = info->pipeline.left_cropping;
                        /* ds == 2 (yuv_ds) can be pipelined, remove top
                           lines */
@@ -4780,8 +4773,7 @@ sh_css_update_uds_and_crop_info(
                uds->yc = (uint16_t)uds_yc;
                sp_out_crop_pos->x = (uint16_t)crop_x;
                sp_out_crop_pos->y = (uint16_t)crop_y;
-       }
-       else {
+       } else {
                /* for down scaling, we always use the center of the image */
                uds->xc = (uint16_t)in_frame_info->res.width / 2;
                uds->yc = (uint16_t)in_frame_info->res.height / 2;
@@ -4815,23 +4807,24 @@ sh_css_update_uds_and_crop_info_based_on_zoom_region(
        * Ideally, That should be done on host side not on sp side.
        */
        unsigned int filter_envelope = 0;
+
        IA_CSS_ENTER_PRIVATE("void");
 
-       assert(info != NULL);
-       assert(in_frame_info != NULL);
-       assert(out_frame_info != NULL);
-       assert(dvs_env != NULL);
-       assert(zoom != NULL);
-       assert(motion_vector != NULL);
-       assert(uds != NULL);
-       assert(sp_out_crop_pos != NULL);
+       assert(info);
+       assert(in_frame_info);
+       assert(out_frame_info);
+       assert(dvs_env);
+       assert(zoom);
+       assert(motion_vector);
+       assert(uds);
+       assert(sp_out_crop_pos);
        x0 = zoom->zoom_region.origin.x;
        y0 = zoom->zoom_region.origin.y;
        x1 = zoom->zoom_region.resolution.width + x0;
        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;
@@ -4861,8 +4854,8 @@ sh_css_update_uds_and_crop_info_based_on_zoom_region(
                                ((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);
-                       uds->yc = (uint16_t) y0 + (((y1)-(y0)) / 2);
+                       uds->xc = (uint16_t)x0 + (((x1) - (x0)) / 2);
+                       uds->yc = (uint16_t)y0 + (((y1) - (y0)) / 2);
                } else {
                        uds->xc = (uint16_t)in_frame_info->res.width / 2;
                        uds->yc = (uint16_t)in_frame_info->res.height / 2;
@@ -4887,7 +4880,7 @@ ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
 
        IA_CSS_ENTER("grid=%p", grid);
 
-       assert(grid != NULL);
+       assert(grid);
 
        me = sh_css_calloc(1, sizeof(*me));
        if (!me)
@@ -4930,7 +4923,7 @@ ia_css_dvs_statistics_allocate(const struct ia_css_dvs_grid_info *grid)
 {
        struct ia_css_dvs_statistics *me;
 
-       assert(grid != NULL);
+       assert(grid);
 
        me = sh_css_calloc(1, sizeof(*me));
        if (!me)
@@ -4951,7 +4944,6 @@ ia_css_dvs_statistics_allocate(const struct ia_css_dvs_grid_info *grid)
 err:
        ia_css_dvs_statistics_free(me);
        return NULL;
-
 }
 
 void
@@ -4970,7 +4962,7 @@ ia_css_dvs_coefficients_allocate(const struct ia_css_dvs_grid_info *grid)
 {
        struct ia_css_dvs_coefficients *me;
 
-       assert(grid != NULL);
+       assert(grid);
 
        me = sh_css_calloc(1, sizeof(*me));
        if (!me)
@@ -5012,7 +5004,7 @@ ia_css_dvs2_statistics_allocate(const struct ia_css_dvs_grid_info *grid)
 {
        struct ia_css_dvs2_statistics *me;
 
-       assert(grid != NULL);
+       assert(grid);
 
        me = sh_css_calloc(1, sizeof(*me));
        if (!me)
@@ -5064,7 +5056,6 @@ ia_css_dvs2_statistics_allocate(const struct ia_css_dvs_grid_info *grid)
 err:
        ia_css_dvs2_statistics_free(me);
        return NULL;
-
 }
 
 void
@@ -5084,13 +5075,12 @@ ia_css_dvs2_statistics_free(struct ia_css_dvs2_statistics *me)
        }
 }
 
-
 struct ia_css_dvs2_coefficients *
 ia_css_dvs2_coefficients_allocate(const struct ia_css_dvs_grid_info *grid)
 {
        struct ia_css_dvs2_coefficients *me;
 
-       assert(grid != NULL);
+       assert(grid);
 
        me = sh_css_calloc(1, sizeof(*me));
        if (!me)
@@ -5171,7 +5161,7 @@ ia_css_dvs2_6axis_config_allocate(const struct ia_css_stream *stream)
        unsigned int width_uv;
        unsigned int height_uv;
 
-       assert(stream != NULL);
+       assert(stream);
        params = stream->isp_params_configs;
 
        /* Backward compatibility by default consider pipe as Video*/
@@ -5234,7 +5224,7 @@ ia_css_en_dz_capt_pipe(struct ia_css_stream *stream, bool enable)
        enum ia_css_err err;
        int i;
 
-       if (stream == NULL)
+       if (!stream)
                return;
 
        for (i = 0; i < stream->num_pipes; i++) {
@@ -5250,4 +5240,3 @@ ia_css_en_dz_capt_pipe(struct ia_css_stream *stream, bool enable)
                }
        }
 }
-
index 270ec2b60a3ed365d5d8042adf53f59570e0e12b..7a37d728563656a1974bfa6d34c51dee63232724 100644 (file)
@@ -31,7 +31,6 @@ struct ia_css_isp_parameters;
 #include "uds/uds_1.0/ia_css_uds_param.h"
 #include "crop/crop_1.0/ia_css_crop_types.h"
 
-
 #define PIX_SHIFT_FILTER_RUN_IN_X 12
 #define PIX_SHIFT_FILTER_RUN_IN_Y 12
 
@@ -42,7 +41,6 @@ struct sh_css_isp_param_configs {
        struct sh_css_isp_ob_stream_config ob;
 };
 
-
 /* Isp parameters per stream */
 struct ia_css_isp_parameters {
        /* UDS */
@@ -113,6 +111,7 @@ struct ia_css_isp_parameters {
        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];
        bool dz_config_changed;
@@ -145,7 +144,7 @@ struct ia_css_isp_parameters {
        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) */
-       uint32_t isp_parameters_id; /** Unique ID to track which config was actually applied to a particular frame */
+       u32 isp_parameters_id; /** Unique ID to track which config was actually applied to a particular frame */
 };
 
 void
index ad46996cfbd34afc9349755fbbb7ff72658e58f8..2f19ee14d6e84872ad14372104be66a88e736bda 100644 (file)
 void
 ia_css_get_properties(struct ia_css_properties *properties)
 {
-       assert(properties != NULL);
+       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
  */
-       properties->gdc_coord_one = gdc_get_unity(GDC0_ID)/HRT_GDC_COORD_SCALE;
+       properties->gdc_coord_one = gdc_get_unity(GDC0_ID) / HRT_GDC_COORD_SCALE;
 #else
 #error "Unknown GDC version"
 #endif
index 254d5797d8f88d1ca0b180131909631ae463f18c..d603f6aee4fc1a657a0816d3b09bd377403bd055 100644 (file)
@@ -54,7 +54,7 @@
 #include "ia_css_spctrl.h"
 
 #ifndef offsetof
-#define offsetof(T, x) ((unsigned)&(((T *)0)->x))
+#define offsetof(T, x) ((unsigned int)&(((T *)0)->x))
 #endif
 
 #define IA_CSS_INCLUDE_CONFIGURATIONS
@@ -81,7 +81,7 @@ static bool sp_running;
 
 static enum ia_css_err
 set_output_frame_buffer(const struct ia_css_frame *frame,
-                       unsigned idx);
+                       unsigned int idx);
 
 static void
 sh_css_copy_buffer_attr_to_spbuffer(struct ia_css_buffer_sp *dest_buf,
@@ -106,10 +106,10 @@ 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 ||
@@ -123,9 +123,10 @@ copy_isp_stage_to_sp_stage(void)
 }
 
 void
-store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num, unsigned stage)
+store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num, unsigned int stage)
 {
        unsigned int thread_id;
+
        ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
        copy_isp_stage_to_sp_stage();
        if (id != IA_CSS_PIPE_ID_COPY)
@@ -143,7 +144,7 @@ store_sp_per_frame_data(const struct ia_css_fw_info *fw)
 {
        unsigned int HIVE_ADDR_sp_per_frame_data = 0;
 
-       assert(fw != NULL);
+       assert(fw);
 
        switch (fw->type) {
        case ia_css_sp_firmware:
@@ -182,28 +183,28 @@ 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 i;
-       unsigned offset = (unsigned int)offsetof(struct sh_css_sp_output, debug)/sizeof(int);
+       unsigned int i;
+       unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output, debug) / sizeof(int);
 
-       assert(state != NULL);
+       assert(state);
 
        (void)HIVE_ADDR_sp_output; /* To get rid of warning in CRUN */
-       for (i = 0; i < sizeof(*state)/sizeof(int); i++)
-               ((unsigned *)state)[i] = load_sp_array_uint(sp_output, i+offset);
+       for (i = 0; i < sizeof(*state) / sizeof(int); i++)
+               ((unsigned *)state)[i] = load_sp_array_uint(sp_output, i + offset);
 }
 
 #endif
 
 void
 sh_css_sp_start_binary_copy(unsigned int pipe_num, struct ia_css_frame *out_frame,
-                           unsigned two_ppc)
+                           unsigned int two_ppc)
 {
        enum ia_css_pipe_id pipe_id;
        unsigned int thread_id;
        struct sh_css_sp_pipeline *pipe;
-       uint8_t stage_num = 0;
+       u8 stage_num = 0;
 
-       assert(out_frame != NULL);
+       assert(out_frame);
        pipe_id = IA_CSS_PIPE_ID_CAPTURE;
        ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
        pipe = &sh_css_sp_group.pipe[thread_id];
@@ -247,18 +248,18 @@ sh_css_sp_start_binary_copy(unsigned int pipe_num, struct ia_css_frame *out_fram
 
 static void
 sh_css_sp_start_raw_copy(struct ia_css_frame *out_frame,
-                        unsigned pipe_num,
-                        unsigned two_ppc,
-                        unsigned max_input_width,
+                        unsigned int pipe_num,
+                        unsigned int two_ppc,
+                        unsigned int max_input_width,
                         enum sh_css_pipe_config_override pipe_conf_override,
                         unsigned int if_config_index)
 {
        enum ia_css_pipe_id pipe_id;
        unsigned int thread_id;
-       uint8_t stage_num = 0;
+       u8 stage_num = 0;
        struct sh_css_sp_pipeline *pipe;
 
-       assert(out_frame != NULL);
+       assert(out_frame);
 
        {
                /*
@@ -266,7 +267,8 @@ sh_css_sp_start_raw_copy(struct ia_css_frame *out_frame,
                 * program_input_circuit must be saved as it is set outside
                 * this function.
                 */
-               uint8_t program_input_circuit;
+               u8 program_input_circuit;
+
                program_input_circuit = sh_css_sp_stage.program_input_circuit;
                memset(&sh_css_sp_stage, 0, sizeof(sh_css_sp_stage));
                sh_css_sp_stage.program_input_circuit = program_input_circuit;
@@ -314,7 +316,7 @@ sh_css_sp_start_raw_copy(struct ia_css_frame *out_frame,
        sh_css_sp_stage.xmem_bin_addr = 0x0;
        sh_css_sp_stage.stage_type = SH_CSS_SP_STAGE_TYPE;
        sh_css_sp_stage.func = (unsigned int)IA_CSS_PIPELINE_RAW_COPY;
-       sh_css_sp_stage.if_config_index = (uint8_t) if_config_index;
+       sh_css_sp_stage.if_config_index = (uint8_t)if_config_index;
        set_output_frame_buffer(out_frame, 0);
 
        ia_css_debug_pipe_graph_dump_sp_raw_copy(out_frame);
@@ -322,17 +324,17 @@ 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 pipe_num, unsigned 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;
-       uint8_t stage_num = 0;
+       u8 stage_num = 0;
        struct sh_css_sp_pipeline *pipe;
 #if defined SH_CSS_ENABLE_METADATA
        enum sh_css_queue_id queue_id;
 #endif
 
-       assert(out_frame != NULL);
+       assert(out_frame);
 
        {
                /*
@@ -340,7 +342,8 @@ sh_css_sp_start_isys_copy(struct ia_css_frame *out_frame,
                 * program_input_circuit must be saved as it is set outside
                 * this function.
                 */
-               uint8_t program_input_circuit;
+               u8 program_input_circuit;
+
                program_input_circuit = sh_css_sp_stage.program_input_circuit;
                memset(&sh_css_sp_stage, 0, sizeof(sh_css_sp_stage));
                sh_css_sp_stage.program_input_circuit = program_input_circuit;
@@ -365,7 +368,7 @@ sh_css_sp_start_isys_copy(struct ia_css_frame *out_frame,
        sh_css_sp_stage.xmem_bin_addr = 0x0;
        sh_css_sp_stage.stage_type = SH_CSS_SP_STAGE_TYPE;
        sh_css_sp_stage.func = (unsigned int)IA_CSS_PIPELINE_ISYS_COPY;
-       sh_css_sp_stage.if_config_index = (uint8_t) if_config_index;
+       sh_css_sp_stage.if_config_index = (uint8_t)if_config_index;
 
        set_output_frame_buffer(out_frame, 0);
 
@@ -398,7 +401,7 @@ sh_css_sp_get_sw_interrupt_value(unsigned int irq)
        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);
+       return load_sp_array_uint(sp_output, offset + irq);
 }
 
 static void
@@ -439,12 +442,11 @@ static void
 sh_css_copy_frame_to_spframe(struct ia_css_frame_sp *sp_frame_out,
                                const struct ia_css_frame *frame_in)
 {
-       assert(frame_in != NULL);
+       assert(frame_in);
 
        ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
                "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,
@@ -527,13 +529,12 @@ sh_css_copy_frame_to_spframe(struct ia_css_frame_sp *sp_frame_out,
                memset(&sp_frame_out->planes, 0, sizeof(sp_frame_out->planes));
                break;
        }
-
 }
 
 static enum ia_css_err
 set_input_frame_buffer(const struct ia_css_frame *frame)
 {
-       if (frame == NULL)
+       if (!frame)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        switch (frame->info.format) {
@@ -562,9 +563,9 @@ 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 idx)
+                       unsigned int idx)
 {
-       if (frame == NULL)
+       if (!frame)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        switch (frame->info.format) {
@@ -605,7 +606,7 @@ 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)
 {
-       if (frame == NULL)
+       if (!frame)
                return IA_CSS_ERR_INVALID_ARGUMENTS;
 
        switch (frame->info.format) {
@@ -640,12 +641,12 @@ void sh_css_sp_set_if_configs(
        )
 {
        assert(if_config_index < SH_CSS_MAX_IF_CONFIGS);
-       assert(config_a != NULL);
+       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.a_changed = true;
 
-       if (config_b != NULL) {
+       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.b_changed = true;
        }
@@ -735,7 +736,7 @@ sh_css_sp_write_frame_pointers(const struct sh_css_binary_args *args)
        enum ia_css_err err = IA_CSS_SUCCESS;
        int i;
 
-       assert(args != NULL);
+       assert(args);
 
        if (args->in_frame)
                err = set_input_frame_buffer(args->in_frame);
@@ -778,7 +779,7 @@ sh_css_sp_init_group(bool two_ppc,
 void
 sh_css_stage_write_binary_info(struct ia_css_binary_info *info)
 {
-       assert(info != NULL);
+       assert(info);
        sh_css_isp_stage.binary_info = *info;
 }
 
@@ -805,7 +806,7 @@ copy_isp_mem_if_to_ddr(struct ia_css_binary *binary)
 static bool
 is_sp_stage(struct ia_css_pipeline_stage *stage)
 {
-       assert(stage != NULL);
+       assert(stage);
        return stage->sp_func != IA_CSS_PIPELINE_NO_FUNC;
 }
 
@@ -885,7 +886,7 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
                    const struct ia_css_blob_info *blob_info,
                    const struct sh_css_binary_args *args,
                    unsigned int pipe_num,
-                   unsigned stage,
+                   unsigned int stage,
                    bool xnr,
                    const struct ia_css_isp_param_css_segments *isp_mem_if,
                    unsigned int if_config_index,
@@ -900,10 +901,10 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
        enum sh_css_queue_id queue_id;
        bool continuous = sh_css_continuous_is_enabled((uint8_t)pipe_num);
 
-       assert(binary != NULL);
-       assert(blob_info != NULL);
-       assert(args != NULL);
-       assert(isp_mem_if != NULL);
+       assert(binary);
+       assert(blob_info);
+       assert(args);
+       assert(isp_mem_if);
 
        xinfo = binary->info;
        info  = &xinfo->sp;
@@ -913,7 +914,8 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
                 * program_input_circuit must be saved as it is set outside
                 * this function.
                 */
-               uint8_t program_input_circuit;
+               u8 program_input_circuit;
+
                program_input_circuit = sh_css_sp_stage.program_input_circuit;
                memset(&sh_css_sp_stage, 0, sizeof(sh_css_sp_stage));
                sh_css_sp_stage.program_input_circuit = (uint8_t)program_input_circuit;
@@ -921,7 +923,7 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
 
        ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
 
-       if (info == NULL) {
+       if (!info) {
                sh_css_sp_group.pipe[thread_id].sp_stage_addr[stage] = mmgr_NULL;
                return IA_CSS_SUCCESS;
        }
@@ -965,7 +967,7 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
        sh_css_sp_stage.isp_deci_log_factor   = (uint8_t)binary->deci_factor_log2;
        sh_css_sp_stage.isp_vf_downscale_bits = (uint8_t)binary->vf_downscale_log2;
 
-       sh_css_sp_stage.if_config_index = (uint8_t) if_config_index;
+       sh_css_sp_stage.if_config_index = (uint8_t)if_config_index;
 
        sh_css_sp_stage.sp_enable_xnr = (uint8_t)xnr;
        sh_css_sp_stage.xmem_bin_addr = xinfo->xmem_addr;
@@ -974,8 +976,8 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
        sh_css_stage_write_binary_info((struct ia_css_binary_info *)info);
 
        /* Make sure binary name is smaller than allowed string size */
-       assert(strlen(binary_name) < SH_CSS_MAX_BINARY_NAME-1);
-       strncpy(sh_css_isp_stage.binary_name, binary_name, SH_CSS_MAX_BINARY_NAME-1);
+       assert(strlen(binary_name) < SH_CSS_MAX_BINARY_NAME - 1);
+       strncpy(sh_css_isp_stage.binary_name, binary_name, SH_CSS_MAX_BINARY_NAME - 1);
        sh_css_isp_stage.binary_name[SH_CSS_MAX_BINARY_NAME - 1] = 0;
        sh_css_isp_stage.mem_initializers = *isp_mem_if;
 
@@ -1007,24 +1009,24 @@ sh_css_sp_init_stage(struct ia_css_binary *binary,
 #ifndef ISP2401
        if (args->in_frame) {
                pipe = find_pipe_by_num(sh_css_sp_group.pipe[thread_id].pipe_num);
-               if (pipe == NULL)
+               if (!pipe)
                        return IA_CSS_ERR_INTERNAL_ERROR;
                ia_css_get_crop_offsets(pipe, &args->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 == NULL)
+               if (!pipe)
                        return IA_CSS_ERR_INTERNAL_ERROR;
                ia_css_get_crop_offsets(pipe, &binary->in_frame_info);
 #else
        if (stage == 0) {
                if (args->in_frame) {
                        pipe = find_pipe_by_num(sh_css_sp_group.pipe[thread_id].pipe_num);
-                       if (pipe == NULL)
+                       if (!pipe)
                                return IA_CSS_ERR_INTERNAL_ERROR;
                        ia_css_get_crop_offsets(pipe, &args->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 == NULL)
+                       if (!pipe)
                                return IA_CSS_ERR_INTERNAL_ERROR;
                        ia_css_get_crop_offsets(pipe, &binary->in_frame_info);
                }
@@ -1073,7 +1075,7 @@ sp_init_stage(struct ia_css_pipeline_stage *stage,
        struct ia_css_binary *binary;
        const struct ia_css_fw_info *firmware;
        const struct sh_css_binary_args *args;
-       unsigned stage_num;
+       unsigned int stage_num;
 /*
  * Initialiser required because of the "else" path below.
  * Is this a valid path ?
@@ -1098,14 +1100,13 @@ sp_init_stage(struct ia_css_pipeline_stage *stage,
 
        enum ia_css_err err = IA_CSS_SUCCESS;
 
-       assert(stage != NULL);
+       assert(stage);
 
        binary = stage->binary;
        firmware = stage->firmware;
        args = &stage->args;
        stage_num = stage->stage_num;
 
-
        if (binary) {
                info = binary->info;
                binary_name = (const char *)(info->blob->name);
@@ -1113,6 +1114,7 @@ sp_init_stage(struct ia_css_pipeline_stage *stage,
                ia_css_init_memory_interface(mem_if, &binary->mem_params, &binary->css_params);
        } 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;
@@ -1156,14 +1158,14 @@ sp_init_stage(struct ia_css_pipeline_stage *stage,
 
 static void
 sp_init_sp_stage(struct ia_css_pipeline_stage *stage,
-                unsigned pipe_num,
+                unsigned int pipe_num,
                 bool two_ppc,
                 enum sh_css_pipe_config_override copy_ovrd,
                 unsigned int if_config_index)
 {
        const struct sh_css_binary_args *args = &stage->args;
 
-       assert(stage != NULL);
+       assert(stage);
        switch (stage->sp_func) {
        case IA_CSS_PIPELINE_RAW_COPY:
                sh_css_sp_start_raw_copy(args->out_frame[0],
@@ -1185,7 +1187,7 @@ sp_init_sp_stage(struct ia_css_pipeline_stage *stage,
 void
 sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
                        enum ia_css_pipe_id id,
-                       uint8_t pipe_num,
+                       u8 pipe_num,
                        bool xnr,
                        bool two_ppc,
                        bool continuous,
@@ -1210,16 +1212,16 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
        struct ia_css_pipeline_stage *stage        = NULL;
        struct ia_css_binary         *first_binary = NULL;
        struct ia_css_pipe *pipe = NULL;
-       unsigned num;
+       unsigned int num;
 
        enum ia_css_pipe_id pipe_id = id;
        unsigned int thread_id;
-       uint8_t if_config_index, tmp_if_config_index;
+       u8 if_config_index, tmp_if_config_index;
 
-       assert(me != NULL);
+       assert(me);
 
 #if !defined(HAS_NO_INPUT_SYSTEM)
-       assert(me->stages != NULL);
+       assert(me->stages);
 
        first_binary = me->stages->binary;
 
@@ -1228,7 +1230,7 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
                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);
+               if_config_index  = (uint8_t)(port_id - MIPI_PORT0_ID);
        } else if (input_mode == IA_CSS_INPUT_MODE_MEMORY) {
                if_config_index = SH_CSS_IF_CONFIG_NOT_NEEDED;
        } else {
@@ -1249,7 +1251,7 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
        }
        me->num_stages = num;
 
-       if (first_binary != NULL) {
+       if (first_binary) {
                /* Init pipeline data */
                sh_css_sp_init_group(two_ppc, first_binary->input_format,
                                     offline, if_config_index);
@@ -1294,14 +1296,14 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
        sh_css_sp_group.pipe[thread_id].inout_port_config = me->inout_port_config;
 
        pipe = find_pipe_by_num(pipe_num);
-       assert(pipe != NULL);
-       if (pipe == NULL) {
+       assert(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 != NULL && 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;
@@ -1317,7 +1319,7 @@ 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 (IA_CSS_PIPE_ID_COPY != pipe_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
@@ -1326,8 +1328,8 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
        /* For the shading correction type 1 (the legacy shading table conversion in css is not used),
         * the parameters are passed to the isp for the shading table centering.
         */
-       if (internal_frame_origin_bqs_on_sctbl != NULL &&
-                       params != NULL && params->shading_settings.enable_shading_table_conversion == 0) {
+       if (internal_frame_origin_bqs_on_sctbl &&
+                       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;
                sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_y_bqs_on_sctbl
@@ -1360,13 +1362,13 @@ sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
        sh_css_sp_group.pipe[thread_id].pipe_config |= (uint32_t)
                (me->acquire_isp_each_stage << IA_CSS_ACQUIRE_ISP_POS);
        store_sp_group_data();
-
 }
 
 void
 sh_css_sp_uninit_pipeline(unsigned int pipe_num)
 {
        unsigned int thread_id;
+
        ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
        /*memset(&sh_css_sp_group.pipe[thread_id], 0, sizeof(struct sh_css_sp_pipeline));*/
        sh_css_sp_group.pipe[thread_id].num_stages = 0;
@@ -1400,7 +1402,6 @@ sh_css_read_host2sp_command(void)
        return (enum host2sp_commands)load_sp_array_uint(host_sp_com, offset);
 }
 
-
 /*
  * Frame data is no longer part of the sp_stage structure but part of a
  * separate structure. The aim is to make the sp_data struct static
@@ -1427,14 +1428,13 @@ sh_css_init_host2sp_frame_data(void)
         */
 }
 
-
 /*
  * @brief Update the offline frame information in host_sp_communication.
  * Refer to "sh_css_sp.h" for more details.
  */
 void
 sh_css_update_host2sp_offline_frame(
-                               unsigned frame_num,
+                               unsigned int frame_num,
                                struct ia_css_frame *frame,
                                struct ia_css_metadata *metadata)
 {
@@ -1464,7 +1464,7 @@ sh_css_update_host2sp_offline_frame(
  */
 void
 sh_css_update_host2sp_mipi_frame(
-                               unsigned frame_num,
+                               unsigned int frame_num,
                                struct ia_css_frame *frame)
 {
        unsigned int HIVE_ADDR_host_sp_com;
@@ -1489,7 +1489,7 @@ sh_css_update_host2sp_mipi_frame(
  */
 void
 sh_css_update_host2sp_mipi_metadata(
-                               unsigned frame_num,
+                               unsigned int frame_num,
                                struct ia_css_metadata *metadata)
 {
        unsigned int HIVE_ADDR_host_sp_com;
@@ -1508,7 +1508,7 @@ sh_css_update_host2sp_mipi_metadata(
 }
 
 void
-sh_css_update_host2sp_num_mipi_frames(unsigned num_frames)
+sh_css_update_host2sp_num_mipi_frames(unsigned int num_frames)
 {
        unsigned int HIVE_ADDR_host_sp_com;
        unsigned int offset;
@@ -1523,7 +1523,7 @@ sh_css_update_host2sp_num_mipi_frames(unsigned num_frames)
 #endif
 
 void
-sh_css_update_host2sp_cont_num_raw_frames(unsigned 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;
@@ -1569,7 +1569,6 @@ sh_css_event_init_irq_mask(void)
                        (unsigned int)sp_address_of(host_sp_com) + offset,
                        &event_irq_mask_init, sizeof(event_irq_mask_init));
        }
-
 }
 
 enum ia_css_err
@@ -1582,7 +1581,7 @@ ia_css_pipe_set_irq_mask(struct ia_css_pipe *pipe,
        struct sh_css_event_irq_mask event_irq_mask;
        unsigned int pipe_num;
 
-       assert(pipe != NULL);
+       assert(pipe);
 
        assert(IA_CSS_PIPE_ID_NUM == NR_OF_PIPELINES);
        /* Linux kernel does not have UINT16_MAX
@@ -1626,7 +1625,7 @@ ia_css_event_get_irq_mask(const struct ia_css_pipe *pipe,
 
        IA_CSS_ENTER_LEAVE("");
 
-       assert(pipe != NULL);
+       assert(pipe);
        assert(IA_CSS_PIPE_ID_NUM == NR_OF_PIPELINES);
 
        pipe_num = ia_css_pipe_get_pipe_num(pipe);
@@ -1669,7 +1668,6 @@ sh_css_sp_start_isp(void)
        fw = &sh_css_sp_fw;
        HIVE_ADDR_sp_sw_state = fw->info.sp.sw_state;
 
-
        if (sp_running)
                return;
 
@@ -1685,7 +1683,6 @@ sh_css_sp_start_isp(void)
                (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.
         * Note 2: Not all SP binaries supports host2sp_commands.
@@ -1706,7 +1703,6 @@ sh_css_sp_start_isp(void)
        mmu_invalidate_cache_all();
 
        ia_css_spctrl_start(SP0_ID);
-
 }
 
 bool
@@ -1719,7 +1715,6 @@ ia_css_isp_has_started(void)
        return (bool)load_sp_uint(ia_css_ispctrl_sp_isp_started);
 }
 
-
 /*
  * @brief Initialize the DMA software-mask in the debug mode.
  * Refer to "sh_css_sp.h" for more details.
@@ -1756,10 +1751,10 @@ sh_css_sp_set_dma_sw_reg(int dma_id,
                int request_type,
                bool enable)
 {
-       uint32_t sw_reg;
-       uint32_t bit_val;
-       uint32_t bit_offset;
-       uint32_t bit_mask;
+       u32 sw_reg;
+       u32 bit_val;
+       u32 bit_offset;
+       u32 bit_mask;
 
        (void)dma_id;
 
index 3c41e997de7918edd2338058d12377134a80d550..d2e8dcb00c0ee32061d0a1af432b15fd3668541c 100644 (file)
@@ -30,7 +30,7 @@ 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 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);
@@ -41,7 +41,7 @@ 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,
-                           unsigned two_ppc);
+                           unsigned int two_ppc);
 
 unsigned int
 sh_css_sp_get_binary_copy_size(void);
@@ -53,7 +53,7 @@ sh_css_sp_get_sw_interrupt_value(unsigned int irq);
 void
 sh_css_sp_init_pipeline(struct ia_css_pipeline *me,
                        enum ia_css_pipe_id id,
-                       uint8_t pipe_num,
+                       u8 pipe_num,
                        bool xnr,
                        bool two_ppc,
                        bool continuous,
@@ -93,7 +93,7 @@ sh_css_init_host2sp_frame_data(void);
  */
 void
 sh_css_update_host2sp_offline_frame(
-                               unsigned frame_num,
+                               unsigned int frame_num,
                                struct ia_css_frame *frame,
                                struct ia_css_metadata *metadata);
 
@@ -106,7 +106,7 @@ sh_css_update_host2sp_offline_frame(
  */
 void
 sh_css_update_host2sp_mipi_frame(
-                               unsigned frame_num,
+                               unsigned int frame_num,
                                struct ia_css_frame *frame);
 
 /**
@@ -117,7 +117,7 @@ sh_css_update_host2sp_mipi_frame(
  */
 void
 sh_css_update_host2sp_mipi_metadata(
-                               unsigned frame_num,
+                               unsigned int frame_num,
                                struct ia_css_metadata *metadata);
 
 /**
@@ -126,7 +126,7 @@ sh_css_update_host2sp_mipi_metadata(
  * @param[in] num_frames The number of mipi frames to use.
  */
 void
-sh_css_update_host2sp_num_mipi_frames(unsigned num_frames);
+sh_css_update_host2sp_num_mipi_frames(unsigned int num_frames);
 #endif
 
 /**
@@ -135,7 +135,7 @@ sh_css_update_host2sp_num_mipi_frames(unsigned num_frames);
  * @param[in] num_frames The number of raw frames to use.
  */
 void
-sh_css_update_host2sp_cont_num_raw_frames(unsigned 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);
@@ -240,7 +240,6 @@ sh_css_sp_set_dma_sw_reg(int dma_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;
 extern struct sh_css_isp_stage sh_css_isp_stage;
index 0b8e3d8720691b5db6a0365cff74a254250aedb9..cfca3520e8ccd2169ea6239b2a8f1035ac0f67ff 100644 (file)
@@ -64,7 +64,7 @@ struct sh_css {
        unsigned int                   size_mem_words; /* \deprecated{Use ia_css_mipi_buffer_config instead.}*/
        enum ia_css_irq_type           irq_type;
        unsigned int                   pipe_counter;
-       
+
        unsigned int            type;   /* 2400 or 2401 for now */
 };
 
@@ -77,4 +77,3 @@ struct sh_css {
 extern struct sh_css my_css;
 
 #endif /* __SH_CSS_STRUCT_H */
-
index 5ded3a1437bf7bb53e85e8d09484cb7889bed115..d9bcae6007bfa7b9b656596db0c6ed3789582651 100644 (file)
 /* Uds types, used in pipeline_global.h and sh_css_internal.h */
 
 struct sh_css_uds_info {
-       uint16_t curr_dx;
-       uint16_t curr_dy;
-       uint16_t xc;
-       uint16_t yc;
+       u16 curr_dx;
+       u16 curr_dy;
+       u16 xc;
+       u16 yc;
 };
 
 struct sh_css_crop_pos {
-       uint16_t x;
-       uint16_t y;
+       u16 x;
+       u16 y;
 };
 
 #endif /* _SH_CSS_UDS_H_ */
index 15bc10b5e9b1b7fa80aadc06bc68278c81021ce6..0ff81ea06241fed894513389950b259a8031ec14 100644 (file)
@@ -708,7 +708,7 @@ void hmm_init_mem_stat(int res_pgnr, int dyc_en, int dyc_pgnr)
 {
        hmm_mem_stat.res_size = res_pgnr;
        /* If reserved mem pool is not enabled, set its "mem stat" values as -1. */
-       if (0 == hmm_mem_stat.res_size) {
+       if (hmm_mem_stat.res_size == 0) {
                hmm_mem_stat.res_size = -1;
                hmm_mem_stat.res_cnt = -1;
        }
index ef35ac0b3a27c845750d86a7c44bc0ac588bce6d..d9c7d8012b897d20eefc10c1a75a70dc364c73ce 100644 (file)
@@ -102,7 +102,7 @@ static struct hmm_buffer_object *__bo_search_and_remove_from_free_rbtree(
 
        this = rb_entry(node, struct hmm_buffer_object, node);
        if (this->pgnr == pgnr ||
-               (this->pgnr > pgnr && this->node.rb_left == NULL)) {
+               (this->pgnr > pgnr && !this->node.rb_left)) {
                goto remove_bo_and_return;
        } else {
                if (this->pgnr < pgnr) {
@@ -128,7 +128,7 @@ remove_bo_and_return:
         * 1. check if 'this->next' is NULL:
         *      yes: erase 'this' node and rebalance rbtree, return 'this'.
         */
-       if (this->next == NULL) {
+       if (!this->next) {
                rb_erase(&this->node, &this->bdev->free_rbtree);
                return this;
        }
@@ -156,11 +156,11 @@ static struct hmm_buffer_object *__bo_search_by_addr(struct rb_root *root,
                bo = rb_entry(n, struct hmm_buffer_object, node);
 
                if (bo->start > start) {
-                       if (n->rb_left == NULL)
+                       if (!n->rb_left)
                                return NULL;
                        n = n->rb_left;
                } else if (bo->start < start) {
-                       if (n->rb_right == NULL)
+                       if (!n->rb_right)
                                return NULL;
                        n = n->rb_right;
                } else {
@@ -181,13 +181,13 @@ static struct hmm_buffer_object *__bo_search_by_addr_in_range(
                bo = rb_entry(n, struct hmm_buffer_object, node);
 
                if (bo->start > start) {
-                       if (n->rb_left == NULL)
+                       if (!n->rb_left)
                                return NULL;
                        n = n->rb_left;
                } else {
                        if (bo->end > start)
                                return bo;
-                       if (n->rb_right == NULL)
+                       if (!n->rb_right)
                                return NULL;
                        n = n->rb_right;
                }
@@ -199,7 +199,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 rb_node **new = &(root->rb_node);
+       struct rb_node **new = &root->rb_node;
        struct rb_node *parent = NULL;
        struct hmm_buffer_object *this;
        unsigned int pgnr = bo->pgnr;
@@ -232,7 +232,7 @@ static void __bo_insert_to_free_rbtree(struct rb_root *root,
 static void __bo_insert_to_alloc_rbtree(struct rb_root *root,
                                        struct hmm_buffer_object *bo)
 {
-       struct rb_node **new = &(root->rb_node);
+       struct rb_node **new = &root->rb_node;
        struct rb_node *parent = NULL;
        struct hmm_buffer_object *this;
        unsigned int start = bo->start;
@@ -294,14 +294,14 @@ static void __bo_take_off_handling(struct hmm_buffer_object *bo)
         *      and does not have a linked list after bo, to take off this bo,
         *      we just need erase bo directly and rebalance the free rbtree
         */
-       if (bo->prev == NULL && bo->next == NULL) {
+       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
         */
-       } else if (bo->prev == NULL && bo->next != NULL) {
+       } 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);
@@ -311,7 +311,7 @@ static void __bo_take_off_handling(struct hmm_buffer_object *bo)
         *      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 != NULL && bo->next == NULL) {
+       } 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
@@ -319,7 +319,7 @@ static void __bo_take_off_handling(struct hmm_buffer_object *bo)
         *      to take off this bo, we just set take the "prev/next" pointers
         *      to NULL, the free rbtree stays unchaged
         */
-       } else if (bo->prev != NULL && bo->next != NULL) {
+       } else if (bo->prev && bo->next) {
                bo->next->prev = bo->prev;
                bo->prev->next = bo->next;
                bo->next = NULL;
@@ -634,10 +634,8 @@ struct hmm_buffer_object *hmm_bo_device_search_vmap_start(
 found:
        spin_unlock_irqrestore(&bdev->list_lock, flags);
        return bo;
-
 }
 
-
 static void free_private_bo_pages(struct hmm_buffer_object *bo,
                                struct hmm_pool *dypool,
                                struct hmm_pool *repool,
@@ -821,8 +819,7 @@ retry:
                                ret = set_pages_uc(pages, blk_pgnr);
                                if (ret) {
                                        dev_err(atomisp_dev,
-                                                    "set page uncacheable"
-                                                       "failed.\n");
+                                                    "set page uncacheablefailed.\n");
 
                                        __free_pages(pages, order);
 
@@ -999,7 +996,7 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,
        down_read(&current->mm->mmap_sem);
        vma = find_vma(current->mm, (unsigned long)userptr);
        up_read(&current->mm->mmap_sem);
-       if (vma == NULL) {
+       if (!vma) {
                dev_err(atomisp_dev, "find_vma failed\n");
                kfree(bo->page_obj);
                kfree(pages);
@@ -1029,8 +1026,7 @@ 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",
+                               "get_user_pages err: bo->pgnr = %d, pgnr actually pinned = %d.\n",
                                bo->pgnr, page_nr);
                goto out_of_mem;
        }
@@ -1492,8 +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;
        }
 
@@ -1502,9 +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;
@@ -1513,7 +1507,7 @@ int hmm_bo_mmap(struct vm_area_struct *vma, struct hmm_buffer_object *bo)
        vma->vm_private_data = bo;
 
        vma->vm_ops = &hmm_bo_vm_ops;
-       vma->vm_flags |= VM_IO|VM_DONTEXPAND|VM_DONTDUMP;
+       vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;
 
        /*
         * call hmm_bo_vm_open explicitly.
index f300e75479979ef38b78ad93930abec0023a04c8..12d3839149c9413317252ccb1422d28e3ab51bc9 100644 (file)
@@ -48,7 +48,7 @@ static unsigned int get_pages_from_reserved_pool(void *pool,
        if (repool_info->initialized) {
                repool_pgnr = repool_info->index;
 
-               for (j = repool_pgnr-1; j >= 0; j--) {
+               for (j = repool_pgnr - 1; j >= 0; j--) {
                        page_obj[i].page = repool_info->pages[j];
                        page_obj[i].type = HMM_PAGE_TYPE_RESERVED;
                        i++;
@@ -119,6 +119,7 @@ static int hmm_reserved_pool_init(void **pool, unsigned int pool_size)
        struct page *pages;
        int j;
        struct hmm_reserved_pool_info *repool_info;
+
        if (pool_size == 0)
                return 0;
 
@@ -184,8 +185,7 @@ end:
        *pool = repool_info;
 
        dev_info(atomisp_dev,
-                       "hmm_reserved_pool init successfully,"
-                       "hmm_reserved_pool is with %d pages.\n",
+                       "hmm_reserved_pool init successfully,hmm_reserved_pool is with %d pages.\n",
                        repool_info->pgnr);
        return 0;
 }
index 0df96e661983590d32cc74dd126d0572216f3be4..8885d52166f3bfae24a38aeab1b012f6f0cabc3d 100644 (file)
@@ -56,7 +56,7 @@ int hmm_vm_init(struct hmm_vm *vm, unsigned int start,
        vm->cache = kmem_cache_create("atomisp_vm", sizeof(struct hmm_vm_node),
                                      0, 0, NULL);
 
-       return vm->cache != NULL ? 0 : -ENOMEM;
+       return vm->cache ? 0 : -ENOMEM;
 }
 
 void hmm_vm_clean(struct hmm_vm *vm)
index fb38fc540b8123d69677c0f767151d3aebeb3c5d..c6893d712d61954b9846df38013d9594b5cdf69c 100644 (file)
@@ -71,30 +71,33 @@ static inline void hrt_sleep(void)
        udelay(1);
 }
 
-static inline uint32_t _hrt_mem_store(uint32_t to, const void *from, size_t n)
+static inline u32 _hrt_mem_store(u32 to, const void *from, size_t n)
 {
-       unsigned i;
-       uint32_t _to = to;
+       unsigned int i;
+       u32 _to = to;
        const char *_from = (const char *)from;
+
        for (i = 0; i < n; i++, _to++, _from++)
                _hrt_master_port_store_8(_to, *_from);
        return _to;
 }
 
-static inline void *_hrt_mem_load(uint32_t from, void *to, size_t n)
+static inline void *_hrt_mem_load(u32 from, void *to, size_t n)
 {
-       unsigned i;
+       unsigned int i;
        char *_to = (char *)to;
-       uint32_t _from = from;
+       u32 _from = from;
+
        for (i = 0; i < n; i++, _to++, _from++)
                *_to = _hrt_master_port_load_8(_from);
        return _to;
 }
 
-static inline uint32_t _hrt_mem_set(uint32_t to, int c, size_t n)
+static inline u32 _hrt_mem_set(u32 to, int c, size_t n)
 {
-       unsigned i;
-       uint32_t _to = to;
+       unsigned int i;
+       u32 _to = to;
+
        for (i = 0; i < n; i++, _to++)
                _hrt_master_port_store_8(_to, c);
        return _to;
index 9b186517f20a63bbe4c07eaa0945be8cffb9c862..a1861410bf75e9fef6e3a150337bacbc8421c40d 100644 (file)
 #include "hive_isp_css_mm_hrt.h"
 #include "hmm/hmm.h"
 
-#define __page_align(size)     (((size) + (PAGE_SIZE-1)) & (~(PAGE_SIZE-1)))
+#define __page_align(size)     (((size) + (PAGE_SIZE - 1)) & (~(PAGE_SIZE - 1)))
 
 static void __user *my_userptr;
-static unsigned my_num_pages;
+static unsigned int my_num_pages;
 static enum hrt_userptr_type my_usr_type;
 
 void hrt_isp_css_mm_set_user_ptr(void __user *userptr,
@@ -50,19 +50,17 @@ static ia_css_ptr __hrt_isp_css_mm_alloc(size_t bytes,
 
 #endif
        if (type == HRT_USR_PTR) {
-               if (userptr == NULL)
+               if (!userptr)
                        return hmm_alloc(bytes, HMM_BO_PRIVATE, 0,
                                                 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);
@@ -91,18 +89,16 @@ ia_css_ptr hrt_isp_css_mm_alloc_user_ptr(size_t bytes,
 
 ia_css_ptr hrt_isp_css_mm_alloc_cached(size_t bytes)
 {
-       if (my_userptr == NULL)
+       if (!my_userptr)
                return hmm_alloc(bytes, HMM_BO_PRIVATE, 0, NULL,
                                                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);
@@ -112,6 +108,7 @@ ia_css_ptr hrt_isp_css_mm_alloc_cached(size_t bytes)
 ia_css_ptr hrt_isp_css_mm_calloc(size_t bytes)
 {
        ia_css_ptr ptr = hrt_isp_css_mm_alloc(bytes);
+
        if (ptr)
                hmm_set(ptr, 0, bytes);
        return ptr;
@@ -120,8 +117,8 @@ ia_css_ptr hrt_isp_css_mm_calloc(size_t bytes)
 ia_css_ptr hrt_isp_css_mm_calloc_cached(size_t bytes)
 {
        ia_css_ptr ptr = hrt_isp_css_mm_alloc_cached(bytes);
+
        if (ptr)
                hmm_set(ptr, 0, bytes);
        return ptr;
 }
-
index 93762e71b4cab5098ab36f5075bae6ef7c100a42..a7a2775aa6f51cf4757ce27098a5820252158120 100644 (file)
@@ -23,7 +23,7 @@
 #include <hmm/hmm.h>
 #include <hrt/hive_isp_css_custom_host_hrt.h>
 
-#define HRT_BUF_FLAG_CACHED (1 << 0)
+#define HRT_BUF_FLAG_CACHED BIT(0)
 
 enum hrt_userptr_type {
        HRT_USR_PTR = 0,
index 508d6fd68f93b7853ad8d905c3583940fe2b8f85..3e7b1ed4ef5ba45e7f45443e1ce37583e9c62690 100644 (file)
@@ -224,7 +224,6 @@ void hmm_bo_ref(struct hmm_buffer_object *bo);
  */
 void hmm_bo_unref(struct hmm_buffer_object *bo);
 
-
 /*
  * allocate/free physical pages for the bo. will try to alloc mem
  * from highmem if from_highmem is set, and type indicate that the
@@ -232,10 +231,8 @@ void hmm_bo_unref(struct hmm_buffer_object *bo);
  * or by ISP driver itself.
  */
 
-
 int hmm_bo_allocated(struct hmm_buffer_object *bo);
 
-
 /*
  * allocate/free physical pages for the bo. will try to alloc mem
  * from highmem if from_highmem is set, and type indicate that the
@@ -315,5 +312,4 @@ 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);
 
-
 #endif
index 52098161082d495beabe21c9685dfac5d68bc8e0..816a61a190678fdc73ce9d271e2cac1ee817665d 100644 (file)
@@ -41,6 +41,7 @@ struct hmm_vm_node {
        unsigned int size;
        struct hmm_vm *vm;
 };
+
 #define        ISP_VM_START    0x0
 #define        ISP_VM_SIZE     (0x7FFFFFFF)    /* 2G address space */
 #define        ISP_PTR_NULL    NULL
index 0fa8e02a8655f118806678771d95a73cac321842..e52a3ed5992b5ce7976f4e2cd5e7a13c1c483c28 100644 (file)
  * same as kernel's page size.
  */
 #define        ISP_PAGE_OFFSET         12
-#define        ISP_PAGE_SIZE           (1U << ISP_PAGE_OFFSET)
+#define        ISP_PAGE_SIZE           BIT(ISP_PAGE_OFFSET)
 #define        ISP_PAGE_MASK           (~(phys_addr_t)(ISP_PAGE_SIZE - 1))
 
 #define        ISP_L1PT_OFFSET         22
 #define        ISP_L1PT_MASK           (~((1U << ISP_L1PT_OFFSET) - 1))
 
 #define        ISP_L2PT_OFFSET         12
-#define        ISP_L2PT_MASK           (~(ISP_L1PT_MASK|(~(ISP_PAGE_MASK))))
+#define        ISP_L2PT_MASK           (~(ISP_L1PT_MASK | (~(ISP_PAGE_MASK))))
 
 #define        ISP_L1PT_PTES           1024
 #define        ISP_L2PT_PTES           1024
@@ -49,7 +49,7 @@
 #define        ISP_PTR_TO_L2_IDX(x)    ((((x) & ISP_L2PT_MASK)) \
                                        >> ISP_L2PT_OFFSET)
 
-#define        ISP_PAGE_ALIGN(x)       (((x) + (ISP_PAGE_SIZE-1)) \
+#define        ISP_PAGE_ALIGN(x)       (((x) + (ISP_PAGE_SIZE - 1)) \
                                        & ISP_PAGE_MASK)
 
 #define        ISP_PT_TO_VIRT(l1_idx, l2_idx, offset) do {\
@@ -84,7 +84,7 @@ struct isp_mmu_client {
         *
         * must be provided.
         */
-       unsigned int (*get_pd_base) (struct isp_mmu *mmu, phys_addr_t pd_base);
+       unsigned int (*get_pd_base)(struct isp_mmu *mmu, phys_addr_t pd_base);
        /*
         * callback to flush tlb.
         *
@@ -96,12 +96,12 @@ struct isp_mmu_client {
         * tlb_flush_all is must be provided. if tlb_flush_range is
         * not valid, it will set to tlb_flush_all by default.
         */
-       void (*tlb_flush_range) (struct isp_mmu *mmu,
+       void (*tlb_flush_range)(struct isp_mmu *mmu,
                                 unsigned int addr, unsigned int size);
-       void (*tlb_flush_all) (struct isp_mmu *mmu);
-       unsigned int (*phys_to_pte) (struct isp_mmu *mmu,
+       void (*tlb_flush_all)(struct isp_mmu *mmu);
+       unsigned int (*phys_to_pte)(struct isp_mmu *mmu,
                                     phys_addr_t phys);
-       phys_addr_t (*pte_to_phys) (struct isp_mmu *mmu,
+       phys_addr_t (*pte_to_phys)(struct isp_mmu *mmu,
                                    unsigned int pte);
 
 };
index d7f25fe890aeb090d823b68b7d1f6b3eb5c7bb4a..775f446bbf6f982f05100f3da9789d4d15178609 100644 (file)
@@ -59,6 +59,7 @@ static void free_mmu_map(struct isp_mmu *mmu, unsigned int start_isp_virt,
 static unsigned int atomisp_get_pte(phys_addr_t pt, unsigned int idx)
 {
        unsigned int *pt_virt = phys_to_virt(pt);
+
        return *(pt_virt + idx);
 }
 
@@ -84,7 +85,8 @@ static unsigned int isp_pgaddr_to_pte_valid(struct isp_mmu *mmu,
                                            phys_addr_t phys)
 {
        unsigned int pte = mmu->driver->phys_to_pte(mmu, phys);
-       return (unsigned int) (pte | ISP_PTE_VALID_MASK(mmu));
+
+       return (unsigned int)(pte | ISP_PTE_VALID_MASK(mmu));
 }
 
 /*
@@ -129,6 +131,7 @@ static phys_addr_t alloc_page_table(struct isp_mmu *mmu)
 static void free_page_table(struct isp_mmu *mmu, phys_addr_t page)
 {
        void *virt;
+
        page &= ISP_PAGE_MASK;
        /*
         * reset the page to write back before free
@@ -149,10 +152,8 @@ 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"
+                    "\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),
@@ -169,10 +170,8 @@ 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"
+                    "\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,
@@ -186,8 +185,7 @@ 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"
+                    "\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,
@@ -372,7 +370,6 @@ 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 ptr;
        unsigned int idx;
        unsigned int pte;
index c0212564b7c8295db9e0a3066179b0095f31784b..031d7fa00510503d1a390515cd51bc8afa18b3e4 100644 (file)
@@ -38,6 +38,7 @@ static phys_addr_t sh_pte_to_phys(struct isp_mmu *mmu,
                                  unsigned int pte)
 {
        unsigned int mask = mmu->driver->pte_valid_mask;
+
        return (phys_addr_t)((pte & ~mask) << ISP_PAGE_OFFSET);
 }
 
@@ -45,6 +46,7 @@ static unsigned int sh_get_pd_base(struct isp_mmu *mmu,
                                   phys_addr_t phys)
 {
        unsigned int pte = sh_phys_to_pte(mmu, phys);
+
        return HOST_ADDRESS(pte);
 }
 
index 70c34de9870793b69ee9011d9c51298b0f392e01..d0b427539b6d3df9d5f61439281f88e52547f958 100644 (file)
@@ -575,7 +575,7 @@ static struct camera_vcm_control *gmin_get_vcm_ctrl(struct v4l2_subdev *subdev,
        struct gmin_subdev *gs = find_gmin_subdev(subdev);
        struct camera_vcm_control *vcm;
 
-       if (client == NULL || gs == NULL)
+       if (!client || !gs)
                return NULL;
 
        if (!camera_module)