Camera Buffer overflow in SD660

Hi,

I am trying to get the preview from the sensor in SD660. The sensor outputs Bayer format. I could see from the logs there is a buffer overflow. I get the distorted frames at the beggining and the Snapdragon camera application closes with Media server crash.(logs-1)

When i open the application again, it shows blank screen (logs-2)

Could someone suggest me how to overcome the buffer overflow.

I have enabled CSID and ispif logs.

logs-1:with distorted preview

685.355569] msm_csiphy_irq CSIPHY1_IRQ_STATUS_ADDR1 = 0x0
[ 685.363363] msm_csiphy_irq CSIPHY1_IRQ_STATUS_ADDR2 = 0x80
[ 685.368747] msm_csiphy_irq CSIPHY1_IRQ_STATUS_ADDR3 = 0x0
[ 685.374129] msm_csiphy_irq CSIPHY1_IRQ_STATUS_ADDR4 = 0x0
[ 685.379595] msm_csiphy_irq CSIPHY1_IRQ_STATUS_ADDR5 = 0x0
[ 685.384979] msm_csiphy_irq CSIPHY1_IRQ_STATUS_ADDR6 = 0x0
[ 685.390359] msm_csiphy_irq CSIPHY1_IRQ_STATUS_ADDR7 = 0x0
[ 685.395744] msm_csiphy_irq CSIPHY1_IRQ_STATUS_ADDR8 = 0x0
[ 685.401129] msm_csiphy_irq CSIPHY1_IRQ_STATUS_ADDR9 = 0x0
[ 687.102389] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 687.102457] CSID:: msm_csid_irq:464 core 0 dt: 0x0, count: 1
[ 687.102822] ispif_process_irq: PIX0 frame id: 0
[ 687.102827] ispif_process_irq: RDI0 frame id: 0
[ 687.103034] msm_vfe47_process_error_status: camif error status: 0x500
[ 687.103055] 0x0000: 00000001 00000040 00000000 0437077f
[ 687.103071] 0x0010: 0000077f 00000437 00000000 00001f1f
[ 687.103087] 0x0020: ffffffff ffffffff 00140405 00000500
[ 687.103099] 0x0030: 00000000 00000002 00000002
[ 687.107337] msm_sensor_config32:452 skip WRITE_I2C_ARRAY
[ 687.119536] ispif_process_irq: PIX0 frame id: 1
[ 687.119542] ispif_process_irq: RDI0 frame id: 1
[ 687.135913] ispif_process_irq: PIX0 frame id: 2
[ 687.135918] ispif_process_irq: RDI0 frame id: 2
[ 687.143326] msm_private_ioctl:Notifying subdevs about sof recover
[ 687.143349] msm_ispif_subdev_ioctl_unlocked: invalid cmd 0xc00856df received
[ 687.143426] MSM-SENSOR-INIT msm_sensor_init_subdev_ioctl:119 default
[ 687.143426]
[ 687.152994] ispif_process_irq: PIX0 frame id: 3
[ 687.153000] ispif_process_irq: RDI0 frame id: 3
[ 687.169654] ispif_process_irq: PIX0 frame id: 4
[ 687.169661] ispif_process_irq: RDI0 frame id: 4
[ 687.186377] ispif_process_irq: PIX0 frame id: 5
[ 687.186383] ispif_process_irq: RDI0 frame id: 5
[ 687.202758] ispif_process_irq: PIX0 frame id: 6
[ 687.202762] ispif_process_irq: RDI0 frame id: 6
[ 687.219801] ispif_process_irq: PIX0 frame id: 7
[ 687.219806] ispif_process_irq: RDI0 frame id: 7
[ 687.236211] ispif_process_irq: PIX0 frame id: 8
[ 687.237264] ispif_process_irq: RDI0 frame id: 8
[ 687.252902] ispif_process_irq: PIX0 frame id: 9
[ 687.252937] ispif_process_irq: RDI0 frame id: 9
[ 688.336087] CAM-SMMU cam_smmu_check_vaddr_in_range:349 Cannot find vaddr:0000000000000000 in SMMU.
[ 688.336087] vfe uses invalid virtual address
[ 688.336162] msm_vfe_iommu_fault_handler: fault address is 10052000
[ 688.355581] msm_isp_process_iommu_page_fault:1832] VFE1 Handle Page fault! vfe_dev 0000000000000000
[ 688.355722] msm_isp_halt_send_error: vfe1 fatal error!
[ 688.373157] msm_isp_buf_mgr_debug: ==== SMMU page fault addr 10052000 ====
[ 688.374119] msm_isp_buf_mgr_debug: nearby stream id 8001000c, frame_id 0
[ 688.382048] msm_isp_buf_mgr_debug: nearby buf index 0, plane 0, state 4
[ 688.387286] msm_isp_buf_mgr_debug: buf address 0000000000000000 – 0000000000000000
[ 688.396323] msm_isp_print_ping_pong_address: stream 0 ping bit 0 uses buffer 0000000000000000-0000000000000000, num_isp 1
[ 688.402207] msm_isp_print_ping_pong_address: stream 0 ping bit 1 uses buffer 0000000000000000-0000000000000000, num_isp 1
[ 688.414044] msm_isp_print_ping_pong_address: buf NULL for stream 1 num_isp 1
[ 688.428856] msm_isp_print_ping_pong_address: stream 1 ping bit 1 uses buffer 0000000000000000-0000000000000000, num_isp 1
[ 688.429982] msm_isp_print_ping_pong_address: stream 2 ping bit 0 uses buffer 0000000000000000-0000000000000000, num_isp 1
[ 688.445921] msm_isp_print_ping_pong_address: stream 2 ping bit 1 uses buffer 0000000000000000-0000000000000000, num_isp 1
[ 688.453874] msm_isp_print_ping_pong_address: stream 5 ping bit 0 uses buffer 0000000000000000-0000000000000000, num_isp 1
[ 688.463550] msm_isp_print_ping_pong_address: stream 5 ping bit 1 uses buffer 0000000000000000-0000000000000000, num_isp 1
[ 688.478103] 0x0000: 00000000 00020000 00020000 11600000
[ 688.485950] 0x0010: 117fe000 0000000c 0240016f 003b0437
[ 688.489926] 0x0020: 007810df 00000001 ffffffff 00000000
[ 688.498905] perf interrupt took too long (2823 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
[ 688.500041] 0x0030: 00020000 00020000 117fe000 118fd000
[ 688.500304] 0x0040: 0000000c 03b000e7 003b021b 0078086f
[ 688.500378] 0x0050: 00000001 ffffffff 00000000 10600000
[ 688.500461] 0x0060: 107fe000 11200000 113fe000 00000000
[ 688.500532] 0x0070: 0498016f 003b0437 007810df 00000001
[ 688.500619] 0x0080: ffffffff 00000000 107fe000 108fd000
[ 688.500690] 0x0090: 113fe000 114fd000 00000000 060800e7
[ 688.501041] 0x00A0: 003b021b 0078086f 00000001 ffffffff
[ 688.501125] 0x00B0: 00000000 10540000 1057c000 10500000
[ 688.501246] 0x00C0: 1053c000 00000000 06f0007d 00130167
[ 688.501313] 0x00D0: 0028059f 00000001 ffffffff 00000000
[ 688.501388] 0x00E0: 10030000 10031fc0 10034000 10035fc0
[ 688.501487] 0x00F0: 00000002 000000bf 00000000 00000002
[ 688.501595] 0x0100: 00000001 ffffffff 00000000 00000000
[ 688.501678] 0x0110: 00000000 00000000 00000000 00000000
[ 688.501790] 0x0120: 00000000 00000000 00000000 00000000
[ 688.511784] 0x0130: 00000000 10040000 10052000 10060000
[ 688.513224] 0x0140: 10072000 00000000 c7f0000f 00000001
[ 688.513312] 0x0150: ffffffff 1002c000 1002d000 1002d000
[ 688.513457] 0x0160: 1002e000 00000000 c7c0000f 00000001
[ 688.513532] 0x0170: ffffffff 10000000 10002000 10002000
[ 688.513655] 0x0180: 10004000 00000000 c7d0000f 00000001
[ 688.513715] 0x0190: ffffffff 10280000 102d5000 10300000
[ 688.513774] 0x01A0: 10355000 00000000 c770000f 00000001
[ 688.513847] 0x01B0: ffffffff 10080000 100d5000 10100000
[ 688.513959] 0x01C0: 10155000 00000000 c7e0000f 00000001
[ 688.514579] 0x01D0: ffffffff 10028000 10029000 10029000
[ 688.514663] 0x01E0: 1002a000 00000000 c780000f 00000001
[ 688.514715] 0x01F0: ffffffff 10008000 10010000 10010000
[ 688.518204] CAM-SMMU cam_smmu_check_vaddr_in_range:349 Cannot find vaddr:0000000000000000 in SMMU.
[ 688.518204] vfe uses invalid virtual address
[ 688.518379] msm_vfe_iommu_fault_handler: fault address is 10052100
[ 688.518571] msm_isp_process_iommu_page_fault: overflow detected during IOMMU
[ 688.690842] CAM-SMMU cam_smmu_check_vaddr_in_range:349 Cannot find vaddr:0000000000000000 in SMMU.
[ 688.690842] vfe uses invalid virtual address
[ 688.692830] msm_vfe_iommu_fault_handler: fault address is 10052100
[ 688.710600] msm_isp_process_iommu_page_fault: overflow detected during IOMMU
[ 689.826348] mdss_dsi_panel_bl_ctrl: Unknown bl_ctrl configuration
[ 689.827934] msm_sensor_config32:452 skip WRITE_I2C_ARRAY

Logs- 2: Blank screen

msm_csiphy_irq CSIPHY1_IRQ_STATUS_ADDR0 = 0x0
[ 711.643147] ispif_process_irq: PIX0 frame id: 0
[ 711.643153] ispif_process_irq: RDI0 frame id: 0
[ 711.643225] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 711.643235] CSID:: msm_csid_irq:464 core 0 dt: 0x0, count: 1
[ 711.643256] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x800
[ 711.643850] msm_vfe47_process_error_status: camif error status: 0x500
[ 711.643867] 0x0000: 00000001 00000040 00000000 0437077f
[ 711.643881] 0x0010: 0000077f 00000437 00000000 00001f1f
[ 711.643894] 0x0020: ffffffff ffffffff 00140405 00000500
[ 711.643905] 0x0030: 00000000 00000002 00000002
[ 711.659844] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 711.659852] CSID:: msm_csid_irq:464 core 0 dt: 0x1, count: 1
[ 711.659924] ispif_process_irq: PIX0 frame id: 1
[ 711.659928] ispif_process_irq: RDI0 frame id: 1
[ 711.659947] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x800
[ 711.676563] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 711.676571] CSID:: msm_csid_irq:464 core 0 dt: 0x1, count: 2
[ 711.676641] ispif_process_irq: PIX0 frame id: 2
[ 711.676644] ispif_process_irq: RDI0 frame id: 2
[ 711.676663] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x800
[ 711.693283] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 711.693290] CSID:: msm_csid_irq:464 core 0 dt: 0x1, count: 1
[ 711.693360] ispif_process_irq: PIX0 frame id: 3
[ 711.693364] ispif_process_irq: RDI0 frame id: 3
[ 711.693382] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x800
[ 711.702222] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x1000033
[ 711.704396] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x1000033
[ 711.710001] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 711.710008] CSID:: msm_csid_irq:464 core 0 dt: 0x1, count: 2
[ 711.710077] ispif_process_irq: PIX0 frame id: 4
[ 711.710081] ispif_process_irq: RDI0 frame id: 4
[ 711.710100] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x800
[ 711.719091] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x1000033
[ 711.726722] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 711.726730] CSID:: msm_csid_irq:464 core 0 dt: 0x1, count: 1
[ 711.726799] ispif_process_irq: PIX0 frame id: 5
[ 711.726803] ispif_process_irq: RDI0 frame id: 5
[ 711.726821] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x800
[ 711.743442] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 711.743450] CSID:: msm_csid_irq:464 core 0 dt: 0x1, count: 2
[ 711.743519] ispif_process_irq: PIX0 frame id: 6
[ 711.743523] ispif_process_irq: RDI0 frame id: 6
[ 711.743542] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x800
[ 711.760162] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 711.760169] CSID:: msm_csid_irq:464 core 0 dt: 0x1, count: 1
[ 711.760238] ispif_process_irq: PIX0 frame id: 7
[ 711.760242] ispif_process_irq: RDI0 frame id: 7
[ 711.760260] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x800
[ 711.776882] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 711.776890] CSID:: msm_csid_irq:464 core 0 dt: 0x1, count: 2
[ 711.776959] ispif_process_irq: PIX0 frame id: 8
[ 711.776963] ispif_process_irq: RDI0 frame id: 8
[ 711.776985] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x800
[ 711.793602] msm_csid_irq CSID0_IRQ_STATUS_ADDR = 0x233
[ 711.793610] CSID:: msm_csid_irq:464 core 0 dt: 0x1, count: 1
[ 711.793678] ispif_process_irq: PIX0 frame id: 9
[ 711.793682] ispif_process_irq: RDI0 frame id: 9

I don’t think any 96Boards product exists with this processor which means I doubt you will get much response on the forum (I’ve also updated the title because I don’t think a there has ever been a Dragonboard 660 product).

Thank you Daniel for changing the title…I am not using Dragon board or any of 96boards products,I am using a custom Board with sd660.