DMA这块的内存不是很清楚哦
如果方便,可以加我的QQ吗,我问下您相关的经验,现在这个问题有点棘手,谢谢啦,qq:1033632450
16001+0 records in
16000+0 records out
hanshow_player# ERROR : awplayer <PlayerStop:855>: invalid stop operation, player already in stopped status.
debug : cedarc <LogVersionInfo:40>:
>>>>>>>>>>>>>>>>>>>>>>>>>>[ 83.498385] sid_get_vir_base()215 - Failed to find "allwinner,sunxi-chipid" in dts.
>>> Cedar Codec [ 83.508479] sid_get_vir_base()215 - Failed to find "allwinner,sunxi-chipid" in dts.
<<<<<<<<<<<<<<<<[ 83.518184] sid_get_vir_base()215 - Failed to find "allwinner,sunxi-chipid" in dts.
<<<<<<<<<<<<
ta[ 83.528033] sid_get_vir_base()215 - Failed to find "allwinner,sunxi-chipid" in dts.
g : CedarC-v1.[ 83.538017] sid_get_vir_base()215 - Failed to find "allwinner,sunxi-chipid" in dts.
1.9
branch: master
commit: 1951abe1456450ea48bfd446e801861a1354e93c
date : Wed May 30 18:59:36 2018 +0800
author: jenkins8080
patch :
----------------------------------------------------------------------
debug : cedarc <CreateVideoDecoder:215>:CreateVideoDecoder ****
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : cedarc <InitializeVideoDecoder:344>:*** pVconfig->nVeFreq = 0
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 300 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : ionAlloc <ion_alloc_open:175>:** phy offset = 40000000
debug : cedarc <VeRelease:1253>: ve release ok
debug : cedarc <DecideStreamBufferSize:1897>:nBufferSize=1048576
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 300 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : cedarc <VideoEngineCreate:388>: *** pEngine->nIcVeVersion = 1663, decIpVersion = 0
debug : cedarc <VeGetChipId:1385>: 00000000
debug : cedarc <CreateSpecificDecoder:1209>: Create decoder '115:h264'
debug : cedarc <VideoEngineCreate:481>: **************eCtlAfcbMode = 0
debug : cedarc <GetSbmInterface:1705>:*********GetSbmInterface, nType=4
debug : cedarc <GetSbmInterfaceFrame:1663>:******* sbm-type: Frame*******
debug : cedarc <SbmFrameInit:178>:************pSbm->sbmInterface.bUseNewVeMemoryProgram=0
debug : cedarc <CdcMessageQueueCreate:47>:nMessageSize = 20
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
DEBUG : tplayer <CallbackFromXPlayer:83>: video width = 1280,height = 720
*****tplayer:video width = 1280,height = 720
debug : cedarc <SbmFrameReset:588>:** wait for reset sem
debug : cedarc <ProcessThread:1591>:*** post reset sem
debug : cedarc <SbmFrameReset:590>:** wait for reset sem ok
debug : cedarc <SbmFrameReset:595>:SbmFrameReset finish
(Allwinner Audio Middle Layer),line(958) : Create Decoder!!=====
(Allwinner Audio Middle Layer),line(592) : AudioDec_Installaudiolib ok
(Allwinner Audio Middle Layer),line(595) : audio decoder init start ...
(AllwinnerAlibs),line(50) :
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Audio <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
tag : audiocodec-v1.2
branch: new
commit: 3ba65962c01cbf1280ddda19d843009b6ef8ce85
date : Tue Jan 8 16:25:27 2019 +0800
----------------------------------------------------------------------
(AllwinnerAlibs),line(679) : ----Loading so success!
(AllwinnerAlibs),line(877) : *************pAudioStreamInfo start******************
(AllwinnerAlibs),line(878) : eCodecFormat :id(4), name(aac low-complexy)
(AllwinnerAlibs),line(879) : eSubCodecFormat :0
(AllwinnerAlibs),line(880) : nChannelNum :2
(AllwinnerAlibs),line(881) : nBitsPerSample :16
(AllwinnerAlibs),line(882) : nSampleRate :48000
(AllwinnerAlibs),line(883) : nAvgBitrate :40565
(AllwinnerAlibs),line(884) : nMaxBitRate :40565
(AllwinnerAlibs),line(885) : nFileSize :0
(AllwinnerAlibs),line(886) : eAudioBitstreamSource:0
(AllwinnerAlibs),line(887) : eDataEncodeType :0
(AllwinnerAlibs),line(888) : nCodecSpecificDataLen:5
(AllwinnerAlibs),line(889) : pCodecSpecificData :0x19f1ce0
(AllwinnerAlibs),line(890) : nFlags :0
(AllwinnerAlibs),line(891) : nBlockAlign :0
(AllwinnerAlibs),line(892) : *************pAudioStreamInfo end ******************
(AAC Decoder),line(36) : init successs...
(Allwinner Audio Middle Layer),line(603) : AUDIO DECODE INIT OK...0
debug : subInternal <SubInternalInit:129>: ***internal sub_type = 0x201, nCodecSpecificDataLen = 35
DEBUG : tsoundcontrol <TSoundDeviceSetFormat:197>: TinaSoundDeviceSetFormat(),sc->sound_status == 2
DEBUG : tsoundcontrol <TSoundDeviceSetFormat:199>: TinaSoundDeviceSetFormat()
DEBUG : tsoundcontrol <TSoundDeviceSetFormat:205>: TinaSoundDeviceSetFormat()>>>sample_rate:48000,channel_num:2,sc->bytes_per_sample:4
debug : cedarc <H264ProcessExtraData2:579>: H264ProcessNaluUnit, bNeedFindSPS = 0, bNeedFindPPS = 0
debug : cedarc <AvcSbmFrameCheckBitStreamType:320>:result: bStreamWithStartCode[0], with[0], whitout[1]
debug : cedarc <H264DecodePictureScanType:2688>: here3:hCtx->bProgressice=1
debug : fbm.c <FbmCreateBuffer:133>:FbmCreate, total fbm number: 9, decoder needed: 3, nWidth=1280, nHeight=720 nAlignStride = 32
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:379>:*** finish fbmCreateBuffer
[ 84.421012] sunxi-ion ion.6: Fail to allocate buffer
ION_IOC_ALLOC er[ 84.442594] sunxi-ion ion.6: Fail to allocate buffer
ror
ION_IOC_ALLOC error
ERROR : awplayer <__LayerQueueBuffer:765>: *** picNode is full when queue buffer
ERROR : awplayer <__LayerQueueBuffer:765>: *** picNode is full when queue buffer
板主您好,我现在也出现了和您上边一样的问题,我用的平台是F1C200S,上电logo正常显示,log也没有打印sunxi-ion ion.6: Fail to allocate buffer。由于我们有一个播放视频的需求,在播放视频过程中出现了sunxi-ion ion.6: Fail to allocate buffer报错。
16001+0 records in
16000+0 records out
hanshow_player# ERROR : awplayer <PlayerStop:855>: invalid stop operation, player already in stopped status.
debug : cedarc <LogVersionInfo:40>:
>>>>>>>>>>>>>>>>>>>>>>>>>>[ 83.498385] sid_get_vir_base()215 - Failed to find "allwinner,sunxi-chipid" in dts.
>>> Cedar Codec [ 83.508479] sid_get_vir_base()215 - Failed to find "allwinner,sunxi-chipid" in dts.
<<<<<<<<<<<<<<<<[ 83.518184] sid_get_vir_base()215 - Failed to find "allwinner,sunxi-chipid" in dts.
<<<<<<<<<<<<
ta[ 83.528033] sid_get_vir_base()215 - Failed to find "allwinner,sunxi-chipid" in dts.
g : CedarC-v1.[ 83.538017] sid_get_vir_base()215 - Failed to find "allwinner,sunxi-chipid" in dts.
1.9
branch: master
commit: 1951abe1456450ea48bfd446e801861a1354e93c
date : Wed May 30 18:59:36 2018 +0800
author: jenkins8080
patch :
----------------------------------------------------------------------
debug : cedarc <CreateVideoDecoder:215>:CreateVideoDecoder ****
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : cedarc <InitializeVideoDecoder:344>:*** pVconfig->nVeFreq = 0
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 300 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : ionAlloc <ion_alloc_open:175>:** phy offset = 40000000
debug : cedarc <VeRelease:1253>: ve release ok
debug : cedarc <DecideStreamBufferSize:1897>:nBufferSize=1048576
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 300 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : cedarc <VideoEngineCreate:388>: *** pEngine->nIcVeVersion = 1663, decIpVersion = 0
debug : cedarc <VeGetChipId:1385>: 00000000
debug : cedarc <CreateSpecificDecoder:1209>: Create decoder '115:h264'
debug : cedarc <VideoEngineCreate:481>: **************eCtlAfcbMode = 0
debug : cedarc <GetSbmInterface:1705>:*********GetSbmInterface, nType=4
debug : cedarc <GetSbmInterfaceFrame:1663>:******* sbm-type: Frame*******
debug : cedarc <SbmFrameInit:178>:************pSbm->sbmInterface.bUseNewVeMemoryProgram=0
debug : cedarc <CdcMessageQueueCreate:47>:nMessageSize = 20
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
DEBUG : tplayer <CallbackFromXPlayer:83>: video width = 1280,height = 720
*****tplayer:video width = 1280,height = 720
debug : cedarc <SbmFrameReset:588>:** wait for reset sem
debug : cedarc <ProcessThread:1591>:*** post reset sem
debug : cedarc <SbmFrameReset:590>:** wait for reset sem ok
debug : cedarc <SbmFrameReset:595>:SbmFrameReset finish
(Allwinner Audio Middle Layer),line(958) : Create Decoder!!=====
(Allwinner Audio Middle Layer),line(592) : AudioDec_Installaudiolib ok
(Allwinner Audio Middle Layer),line(595) : audio decoder init start ...
(AllwinnerAlibs),line(50) :
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Audio <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
tag : audiocodec-v1.2
branch: new
commit: 3ba65962c01cbf1280ddda19d843009b6ef8ce85
date : Tue Jan 8 16:25:27 2019 +0800
----------------------------------------------------------------------
(AllwinnerAlibs),line(679) : ----Loading so success!
(AllwinnerAlibs),line(877) : *************pAudioStreamInfo start******************
(AllwinnerAlibs),line(878) : eCodecFormat :id(4), name(aac low-complexy)
(AllwinnerAlibs),line(879) : eSubCodecFormat :0
(AllwinnerAlibs),line(880) : nChannelNum :2
(AllwinnerAlibs),line(881) : nBitsPerSample :16
(AllwinnerAlibs),line(882) : nSampleRate :48000
(AllwinnerAlibs),line(883) : nAvgBitrate :40565
(AllwinnerAlibs),line(884) : nMaxBitRate :40565
(AllwinnerAlibs),line(885) : nFileSize :0
(AllwinnerAlibs),line(886) : eAudioBitstreamSource:0
(AllwinnerAlibs),line(887) : eDataEncodeType :0
(AllwinnerAlibs),line(888) : nCodecSpecificDataLen:5
(AllwinnerAlibs),line(889) : pCodecSpecificData :0x19f1ce0
(AllwinnerAlibs),line(890) : nFlags :0
(AllwinnerAlibs),line(891) : nBlockAlign :0
(AllwinnerAlibs),line(892) : *************pAudioStreamInfo end ******************
(AAC Decoder),line(36) : init successs...
(Allwinner Audio Middle Layer),line(603) : AUDIO DECODE INIT OK...0
debug : subInternal <SubInternalInit:129>: ***internal sub_type = 0x201, nCodecSpecificDataLen = 35
DEBUG : tsoundcontrol <TSoundDeviceSetFormat:197>: TinaSoundDeviceSetFormat(),sc->sound_status == 2
DEBUG : tsoundcontrol <TSoundDeviceSetFormat:199>: TinaSoundDeviceSetFormat()
DEBUG : tsoundcontrol <TSoundDeviceSetFormat:205>: TinaSoundDeviceSetFormat()>>>sample_rate:48000,channel_num:2,sc->bytes_per_sample:4
debug : cedarc <H264ProcessExtraData2:579>: H264ProcessNaluUnit, bNeedFindSPS = 0, bNeedFindPPS = 0
debug : cedarc <AvcSbmFrameCheckBitStreamType:320>:result: bStreamWithStartCode[0], with[0], whitout[1]
debug : cedarc <H264DecodePictureScanType:2688>: here3:hCtx->bProgressice=1
debug : fbm.c <FbmCreateBuffer:133>:FbmCreate, total fbm number: 9, decoder needed: 3, nWidth=1280, nHeight=720 nAlignStride = 32
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:280>:*** calcute nLower2BitBufOffset = 0(0.00), stride = 0
debug : fbm.c <FbmCreateBuffer:379>:*** finish fbmCreateBuffer
[ 84.421012] sunxi-ion ion.6: Fail to allocate buffer
ION_IOC_ALLOC er[ 84.442594] sunxi-ion ion.6: Fail to allocate buffer
ror
ION_IOC_ALLOC error
ERROR : awplayer <__LayerQueueBuffer:765>: *** picNode is full when queue buffer
ERROR : awplayer <__LayerQueueBuffer:765>: *** picNode is full when queue buffer
之后板子就死机,按照您上面的修改方式,我找到了设备树的设置:
ion {
compatible = "allwinner,sunxi-ion";
/*types is list here:
ION_HEAP_TYPE_SYSTEM = 0,
ION_HEAP_TYPE_SYSTEM_CONTIG = 1,
ION_HEAP_TYPE_CARVEOUT = 2,
ION_HEAP_TYPE_CHUNK = 3,
ION_HEAP_TYPE_DMA = 4
*/
system{
type = <0>;
name = "system";
};
cma{
type = <4>;
name = "cma";
};
system_contig{
type = <1>;
name = "system_contig";
};
};
同时也看了内核的获取方式:
int sunxi_ion_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
struct ion_platform_heap heaps_desc;
struct device_node *heap_node = NULL;
ion_device = ion_device_create(sunxi_ion_ioctl);
if (IS_ERR_OR_NULL(ion_device))
return PTR_ERR(ion_device);
do{
u32 type = -1;
struct ion_heap *pheap = NULL;
/*loop all the child node */
heap_node = of_get_next_child(np , heap_node);
if (!heap_node)
break;
memset( &heaps_desc , 0 , sizeof(heaps_desc) );
/* get the properties "name","type" for common ion heap */
if (of_property_read_u32(heap_node , "type" , &type)) {
pr_err("You need config the heap node 'type'\n");
continue;
}
heaps_desc.type = type;
heaps_desc.id = type;
if (of_property_read_string(heap_node , "name" ,
&heaps_desc.name)) {
pr_err("You need config the heap node 'name'\n");
continue;
}
/*for specail heaps , need extra argument to config */
if (ION_HEAP_TYPE_CARVEOUT == heaps_desc.type) {
u32 base = 0 , size = 0;
if (of_property_read_u32(heap_node , "base" , &base))
pr_err("You need config the carvout 'base'\n");
heaps_desc.base = base;
if (of_property_read_u32(heap_node , "size" , &size))
pr_err("You need config the carvout 'size'\n");
heaps_desc.size = size;
} else if (ION_HEAP_TYPE_DMA == heaps_desc.type)
heaps_desc.priv = &(pdev->dev);
#ifdef CONFIG_TEE_SUPPORT
else if (ION_HEAP_TYPE_SECURE == heaps_desc.type) {
ulong tee_base;
probe_drm_configure(&heaps_desc.base,
&heaps_desc.size, &tee_base);
ion_sunxi_drm_phy_addr = heaps_desc.base;
ion_sunxi_drm_tee_addr = tee_base;
}
#endif
/* now we can create a heap & add it to the ion device*/
pheap = ion_heap_create(&heaps_desc);
if (IS_ERR_OR_NULL(pheap)) {
pr_err("ion_heap_create '%s' failured!\n" , heaps_desc.name );
continue;
}
ion_device_add_heap(ion_device , pheap);
}while(1);
return 0;
}
按照您的描述我们现在设置的应该是dma方式,我不太确定该怎么改,希望得到您的指导,谢谢!