📄 pxa27x_camera.cod
字号:
00000 |CameraSubmitBuffer| PROC
; 639 : {
00000 |$L38874|
00000 e92d4ff0 stmdb sp!, {r4 - r11, lr}
00004 e24dd00c sub sp, sp, #0xC
00008 |$M38872|
00008 e3500000 cmp r0, #0
; 640 : DESCRIPTOR_INFO_T *pDescriptorInfo;
; 641 : XLLP_DMAC_DESCRIPTOR_T *pXPn_CH0;
; 642 : XLLP_DMAC_DESCRIPTOR_T *pXPn_CH1;
; 643 : XLLP_DMAC_DESCRIPTOR_T *pXPn_CH2;
; 644 :
; 645 : XLLP_DMAC_DESCRIPTOR_T *pXn_CH0;
; 646 : XLLP_DMAC_DESCRIPTOR_T *pXn_CH1;
; 647 : XLLP_DMAC_DESCRIPTOR_T *pXn_CH2;
; 648 :
; 649 : XLLP_DMAC_DESCRIPTOR_T *pLast_Pn_CH0;
; 650 : XLLP_DMAC_DESCRIPTOR_T *pLast_Pn_CH1;
; 651 : XLLP_DMAC_DESCRIPTOR_T *pLast_Pn_CH2;
; 652 :
; 653 : XLLP_DMAC_DESCRIPTOR_T *pLast_n_CH0;
; 654 : XLLP_DMAC_DESCRIPTOR_T *pLast_n_CH1;
; 655 : XLLP_DMAC_DESCRIPTOR_T *pLast_n_CH2;
; 656 :
; 657 : BOOL isYUV_PLANAR;
; 658 :
; 659 : pDescriptorInfo = NULL;
; 660 : if (pBufInfo)
0000c 0a000080 beq |$L38384|
; 661 : {
; 662 : if (pBufInfo->BufferID < MAX_CAMERA_DMA_BUFFERS)
00010 e5902008 ldr r2, [r0, #8]
00014 e3520020 cmp r2, #0x20
00018 aa00007d bge |$L38384|
; 663 : {
; 664 : pDescriptorInfo = MasterBufferList[pBufInfo->BufferID];
0001c e59f3228 ldr r3, [pc, #0x228]
00020 e7933102 ldr r3, [r3, +r2, lsl #2]
00024 e1b0e003 movs lr, r3
; 665 : }
; 666 : }
; 667 : if (pDescriptorInfo)
00028 0a000079 beq |$L38384|
; 668 : {
; 669 : isYUV_PLANAR = (3 == pDescriptorInfo->dwPlanesNumber ? TRUE : FALSE);
0002c e59e3038 ldr r3, [lr, #0x38]
00030 e3530003 cmp r3, #3
00034 03a04001 moveq r4, #1
00038 13a04000 movne r4, #0
; 670 :
; 671 : // If this is the first buffer being submitted, then we want to store the physical address of the descriptor chain
; 672 : // so that when we start DMA's later on, we start with _this_ buffer. All buffers submitted after this first buffer
; 673 : // are chained behind this one. Therefore, this buffer is the logical choice to start with.
; 674 : if (BufferType == VIDEO_CAPTURE_BUFFER)
0003c e3510001 cmp r1, #1
00040 1a00004c bne |$L38385|
; 675 : {
; 676 : if (bFirstVideoCaptureBufferSubmitted == FALSE)
00044 e59f01f0 ldr r0, [pc, #0x1F0]
00048 e5903004 ldr r3, [r0, #4]
0004c e3530000 cmp r3, #0
00050 1a00000a bne |$L38386|
; 677 : {
; 678 : VideoCaptureDescriptorPhysicalStartAddress_CH0 = pDescriptorInfo->pPhysAddr_X1_CH0;
00054 e59e2004 ldr r2, [lr, #4]
00058 e59f31e8 ldr r3, [pc, #0x1E8]
; 679 : VideoCaptureDescriptorPhysicalStartAddress_CH1 = pDescriptorInfo->pPhysAddr_X1_CH1;
0005c e59f11e0 ldr r1, [pc, #0x1E0]
00060 e5832000 str r2, [r3]
00064 e59e3014 ldr r3, [lr, #0x14]
; 680 : VideoCaptureDescriptorPhysicalStartAddress_CH2 = pDescriptorInfo->pPhysAddr_X1_CH2;
00068 e59f21d0 ldr r2, [pc, #0x1D0]
0006c e5813000 str r3, [r1]
00070 e59e3024 ldr r3, [lr, #0x24]
; 681 : bFirstVideoCaptureBufferSubmitted = TRUE;
00074 e3a01001 mov r1, #1
00078 e5801004 str r1, [r0, #4]
0007c e5823000 str r3, [r2]
00080 |$L38386|
; 682 : }
; 683 :
; 684 : pXPn_CH0 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_XPn_CH0;
00080 e59e2008 ldr r2, [lr, #8]
; 685 : pXPn_CH1 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_XPn_CH1;
00084 e59e5018 ldr r5, [lr, #0x18]
; 686 : pXPn_CH2 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_XPn_CH2;
00088 e59e6028 ldr r6, [lr, #0x28]
; 687 :
; 688 : pXn_CH0 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_Xn_CH0;
0008c e59e100c ldr r1, [lr, #0xC]
; 689 : pXn_CH1 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_Xn_CH1;
00090 e59e701c ldr r7, [lr, #0x1C]
; 690 : pXn_CH2 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_Xn_CH2;
00094 e59e802c ldr r8, [lr, #0x2C]
; 691 :
; 692 : pLast_Pn_CH0 = (XLLP_DMAC_DESCRIPTOR_T *)VirtAddr_Last_Pn_CH0;
00098 e5909028 ldr r9, [r0, #0x28]
; 693 : pLast_Pn_CH1 = (XLLP_DMAC_DESCRIPTOR_T *)VirtAddr_Last_Pn_CH1;
0009c e5903024 ldr r3, [r0, #0x24]
; 694 : pLast_Pn_CH2 = (XLLP_DMAC_DESCRIPTOR_T *)VirtAddr_Last_Pn_CH2;
; 695 :
; 696 : pLast_n_CH0 = (XLLP_DMAC_DESCRIPTOR_T *)VirtAddr_Last_n_CH0;
; 697 : pLast_n_CH1 = (XLLP_DMAC_DESCRIPTOR_T *)VirtAddr_Last_n_CH1;
; 698 : pLast_n_CH2 = (XLLP_DMAC_DESCRIPTOR_T *)VirtAddr_Last_n_CH2;
; 699 :
; 700 : // Chain last phantom descriptor XPn to the first phantom descriptor XP1. This loops the phantom descriptor back to itself.
; 701 : pXPn_CH0->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH0;
; 702 : if (isYUV_PLANAR) pXPn_CH1->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH1;
000a0 e3540000 cmp r4, #0
000a4 e58d3000 str r3, [sp]
000a8 e5903020 ldr r3, [r0, #0x20]
000ac e590a01c ldr r10, [r0, #0x1C]
000b0 e590b018 ldr r11, [r0, #0x18]
000b4 e58d3004 str r3, [sp, #4]
000b8 e5903014 ldr r3, [r0, #0x14]
000bc e58d3008 str r3, [sp, #8]
000c0 e59e3000 ldr r3, [lr]
000c4 e5823000 str r3, [r2]
000c8 159e3010 ldrne r3, [lr, #0x10]
; 703 : if (isYUV_PLANAR) pXPn_CH2->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH2;
000cc 15853000 strne r3, [r5]
000d0 159e3020 ldrne r3, [lr, #0x20]
000d4 15863000 strne r3, [r6]
; 704 :
; 705 : // Chain the last real descriptor to the start of the phantom descriptor chain
; 706 : pXn_CH0->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH0;
000d8 e59e3000 ldr r3, [lr]
; 707 : if (isYUV_PLANAR) pXn_CH1->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH1;
000dc e3540000 cmp r4, #0
000e0 e5813000 str r3, [r1]
000e4 159e3010 ldrne r3, [lr, #0x10]
; 708 : if (isYUV_PLANAR) pXn_CH2->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH2;
000e8 15873000 strne r3, [r7]
000ec 159e3020 ldrne r3, [lr, #0x20]
000f0 15883000 strne r3, [r8]
; 709 :
; 710 : // Chain the last descriptor to this new descriptor by adding this new descriptor to the end of the chain.
; 711 : // We either are already looping on the phantom descriptor by the time this frame buffer is submitted, or
; 712 : // we have yet to begin looping on the phantom descriptor. Therefore, we must program the end of the phantom descriptor
; 713 : // to branch to the beginning of the new descriptor. And, if we were not already looping on the phantom descriptor, then we want
; 714 : // to program the last real descriptor so that it branches to the beginning of the new descriptor.
; 715 : if (VirtAddr_Last_Pn_CH0)
000f4 e5903028 ldr r3, [r0, #0x28]
000f8 e3530000 cmp r3, #0
000fc 0a000010 beq |$L38407|
; 716 : {
; 717 : pLast_Pn_CH0->DDADR = pDescriptorInfo->pPhysAddr_X1_CH0;
00100 e59e3004 ldr r3, [lr, #4]
; 718 : if (isYUV_PLANAR) pLast_Pn_CH1->DDADR = pDescriptorInfo->pPhysAddr_X1_CH1;
00104 e3540000 cmp r4, #0
; 719 : if (isYUV_PLANAR) pLast_Pn_CH2->DDADR = pDescriptorInfo->pPhysAddr_X1_CH2;
00108 159d2000 ldrne r2, [sp]
0010c e5893000 str r3, [r9]
00110 159e3014 ldrne r3, [lr, #0x14]
00114 15823000 strne r3, [r2]
00118 159e3024 ldrne r3, [lr, #0x24]
0011c 159d2004 ldrne r2, [sp, #4]
00120 15823000 strne r3, [r2]
; 720 :
; 721 :
; 722 : pLast_n_CH0->DDADR = pDescriptorInfo->pPhysAddr_X1_CH0;
00124 e59e3004 ldr r3, [lr, #4]
; 723 : if (isYUV_PLANAR) pLast_n_CH1->DDADR = pDescriptorInfo->pPhysAddr_X1_CH1;
00128 e3540000 cmp r4, #0
; 724 : if (isYUV_PLANAR) pLast_n_CH2->DDADR = pDescriptorInfo->pPhysAddr_X1_CH2;
0012c 159d2008 ldrne r2, [sp, #8]
00130 e58a3000 str r3, [r10]
00134 159e3014 ldrne r3, [lr, #0x14]
00138 158b3000 strne r3, [r11]
0013c 159e3024 ldrne r3, [lr, #0x24]
00140 15823000 strne r3, [r2]
00144 |$L38407|
; 725 :
; 726 : }
; 727 :
; 728 : // Update pVirtAddr_Last_Pn and pVirtAddr_Last_n so they point to this new buffer
; 729 : VirtAddr_Last_Pn_CH0 = pDescriptorInfo->pVirtAddr_XPn_CH0;
00144 e59e3008 ldr r3, [lr, #8]
; 730 : VirtAddr_Last_Pn_CH1 = pDescriptorInfo->pVirtAddr_XPn_CH1;
00148 e5803028 str r3, [r0, #0x28]
0014c e59e3018 ldr r3, [lr, #0x18]
; 731 : VirtAddr_Last_Pn_CH2 = pDescriptorInfo->pVirtAddr_XPn_CH2;
; 732 :
; 733 : VirtAddr_Last_n_CH0 = pDescriptorInfo->pVirtAddr_Xn_CH0;
00150 e5803024 str r3, [r0, #0x24]
00154 e59e3028 ldr r3, [lr, #0x28]
; 734 : VirtAddr_Last_n_CH1 = pDescriptorInfo->pVirtAddr_Xn_CH1;
; 735 : VirtAddr_Last_n_CH2 = pDescriptorInfo->pVirtAddr_Xn_CH2;
00158 e5803020 str r3, [r0, #0x20]
0015c e59e300c ldr r3, [lr, #0xC]
00160 e580301c str r3, [r0, #0x1C]
00164 e59e301c ldr r3, [lr, #0x1C]
00168 e5803018 str r3, [r0, #0x18]
0016c e59e302c ldr r3, [lr, #0x2C]
00170 e5803014 str r3, [r0, #0x14]
; 736 :
; 737 : } else if (BufferType == STILL_CAPTURE_BUFFER)
00174 ea000029 b |$L38421|
00178 |$L38385|
00178 e3510002 cmp r1, #2
0017c 1a000027 bne |$L38421|
; 738 : {
; 739 : if (bFirstStillBufferSubmitted == FALSE)
00180 e59f00b4 ldr r0, [pc, #0xB4]
00184 e5903000 ldr r3, [r0]
00188 e3530000 cmp r3, #0
0018c 1a000023 bne |$L38421|
; 740 : {
; 741 : StillCaptureDescriptorPhysicalStartAddress_CH0 = pDescriptorInfo->pPhysAddr_X1_CH0;
00190 e59e2004 ldr r2, [lr, #4]
00194 e59f309c ldr r3, [pc, #0x9C]
; 742 : StillCaptureDescriptorPhysicalStartAddress_CH1 = pDescriptorInfo->pPhysAddr_X1_CH1;
00198 e59f1094 ldr r1, [pc, #0x94]
; 743 : StillCaptureDescriptorPhysicalStartAddress_CH2 = pDescriptorInfo->pPhysAddr_X1_CH2;
; 744 : bFirstStillBufferSubmitted = TRUE;
; 745 :
; 746 : pXPn_CH0 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_XPn_CH0;
; 747 : pXPn_CH1 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_XPn_CH1;
; 748 : pXPn_CH2 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_XPn_CH2;
; 749 :
; 750 : pXn_CH0 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_Xn_CH0;
; 751 : pXn_CH1 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_Xn_CH1;
; 752 : pXn_CH2 = (XLLP_DMAC_DESCRIPTOR_T *)pDescriptorInfo->pVirtAddr_Xn_CH2;
; 753 :
; 754 : // Chain last phantom descriptor XPn to the first phantom descriptor XP1. This loops the phantom descriptor back to itself.
; 755 : pXPn_CH0->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH0;
; 756 : if (isYUV_PLANAR) pXPn_CH1->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH1;
0019c e3540000 cmp r4, #0
001a0 e5832000 str r2, [r3]
001a4 e59e3014 ldr r3, [lr, #0x14]
001a8 e59f2080 ldr r2, [pc, #0x80]
001ac e5813000 str r3, [r1]
001b0 e59e3024 ldr r3, [lr, #0x24]
001b4 e3a01001 mov r1, #1
001b8 e5801000 str r1, [r0]
001bc e5823000 str r3, [r2]
001c0 e59e2008 ldr r2, [lr, #8]
001c4 e59e6018 ldr r6, [lr, #0x18]
001c8 e59e7028 ldr r7, [lr, #0x28]
001cc e59e100c ldr r1, [lr, #0xC]
001d0 e59e001c ldr r0, [lr, #0x1C]
001d4 e59e502c ldr r5, [lr, #0x2C]
001d8 e59e3000 ldr r3, [lr]
001dc e5823000 str r3, [r2]
001e0 159e3010 ldrne r3, [lr, #0x10]
; 757 : if (isYUV_PLANAR) pXPn_CH2->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH2;
001e4 15863000 strne r3, [r6]
001e8 159e3020 ldrne r3, [lr, #0x20]
001ec 15873000 strne r3, [r7]
; 758 :
; 759 : // Chain the last real descriptor to the start of the phantom descriptor chain
; 760 : pXn_CH0->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH0;
001f0 e59e3000 ldr r3, [lr]
; 761 : if (isYUV_PLANAR) pXn_CH1->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH1;
001f4 e3540000 cmp r4, #0
001f8 e5813000 str r3, [r1]
001fc 0a000007 beq |$L38421|
00200 e59e3010 ldr r3, [lr, #0x10]
; 762 : if (isYUV_PLANAR) pXn_CH2->DDADR = pDescriptorInfo->pPhysAddr_XP1_CH2;
00204 e5803000 str r3, [r0]
00208 e59e3020 ldr r3, [lr, #0x20]
0020c e5853000 str r3, [r5]
; 763 : }
; 764 : }
; 765 : } else
00210 ea000002 b |$L38421|
00214 |$L38384|
; 766 : {
; 767 : NKDbgPrintfW(TEXT("Buffer list had null entry.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -