Toybrick

./rgaImDemo 报错

MWM

注册会员

积分
168
发表于 6 天前    查看: 84|回复: 4 | [复制链接]    打印 | 显示全部楼层
麻烦大神指导下


运行./rgaImDemo  --fill=red

输出如下:
Start selecting mode 0
im2d fill ..
fill red ...
MODE = 9
open file
open file
rga_api version 1.8.1_[0]
RgaCollorFill(1717) RGA_COLORFILL fail: Invalid argument
RgaCollorFill(1718) RGA_COLORFILL fail: Invalid argument
srect[x,y,w,h] = [0, 0, 0, 0] src[w,h,ws,hs] = [0, 0, 0, 0]

drect[x,y,w,h] = [100, 100, 300, 300] dst[w,h,ws,hs] = [300, 300, 1280, 720]

usage[0x280000]
filling .... cost time 160 us, Fatal error: Failed to call RockChipRga interface, query log to find the cause of failure.
open /usr/data/out0w1280-h720-rgba8888.bin and write ok



------------------------------------------------
journalctl  日志
-----------------------------------------------
Sep 21 16:04:48 toybrick kernel: [dhd][wlan0] wl_run_escan : LEGACY_SCAN sync ID: 13, bssidx: 0
Sep 21 16:04:51 toybrick kernel: rga_policy: invalid function policy
Sep 21 16:04:51 toybrick kernel: rga_job: job assign failed
Sep 21 16:04:51 toybrick kernel: rga_job: failed to get scheduler, rga_job_commit(661)
Sep 21 16:04:51 toybrick kernel: rga_job: failed to commit job!
Sep 21 16:04:51 toybrick kernel: rga: rga_request_commit failed





回复

使用道具 举报

jefferyzhang

论坛元老

积分
10605
发表于 4 天前 | 显示全部楼层
他的这个demo只能当api参考,代码需要自己根据实际情况写的
回复

使用道具 举报

guyanxiao

注册会员

积分
142
发表于 昨天 16:18 | 显示全部楼层
确认这个问题存在

./rgaImDemo --fill=blue
Start selecting mode 0
im2d fill ..
fill blue ...
MODE = 9
open file
open file
rga_api version 1.8.1_[0]
RgaCollorFill(1717) RGA_COLORFILL fail: Invalid argument
RgaCollorFill(1718) RGA_COLORFILL fail: Invalid argument
srect[x,y,w,h] = [0, 0, 0, 0] src[w,h,ws,hs] = [0, 0, 0, 0]

drect[x,y,w,h] = [100, 100, 320, 320] dst[w,h,ws,hs] = [320, 320, 1280, 720]

usage[0x280000]
filling .... cost time 326 us, Fatal error: Failed to call RockChipRga interface, query log to find the cause of failure.
open /usr/data/out0w1280-h720-rgba8888.bin and write ok

cat driver_version
RGA multicore Device Driver: v1.2.10

rga debug信息如下:

[178426.366860] rga: import buffer info:
[178426.366871] rga_debugger: external: memory = 0x7fbeabd010, type = virt_addr
[178426.366876] rga_debugger: param: w = 1280, h = 720, f = RGBA8888, size = 0
[178426.367165] rga_dma_buf: iova_align size = 3690496
[178426.367584] rga_dma_buf: iova_align size = 3690496
[178426.367963] rga_mm: import buffer:
[178426.367967] rga_mm: handle = 1 refcount = 1 mm_flag = 0x2
[178426.367973] rga_mm: virtual address: va = 0x7fbeabd010, pages = 000000007d1e0919, size = 3690496
[178426.367977] rga_mm: core 1: iova = 0xffc00000, sgt = 0000000048e4cdc5, size = 3690496
[178426.367980] rga_mm: core 2: iova = 0xffc00000, sgt = 0000000050e818fa, size = 3690496
[178426.367984] rga_mm: core 0: iova = 0x0, sgt = 0000000000000000, size = 0
[178426.368099] rga: import buffer info:
[178426.368103] rga_debugger: external: memory = 0x7fbe738010, type = virt_addr
[178426.368107] rga_debugger: param: w = 1280, h = 720, f = RGBA8888, size = 0
[178426.368366] rga_dma_buf: iova_align size = 3690496
[178426.369040] rga_dma_buf: iova_align size = 3690496
[178426.369691] rga_mm: import buffer:
[178426.369695] rga_mm: handle = 2 refcount = 1 mm_flag = 0x2
[178426.369699] rga_mm: virtual address: va = 0x7fbe738010, pages = 00000000715b1646, size = 3690496
[178426.369702] rga_mm: core 1: iova = 0xff800000, sgt = 000000007aedbec8, size = 3690496
[178426.369706] rga_mm: core 2: iova = 0xff800000, sgt = 00000000fb5e207e, size = 3690496
[178426.369709] rga_mm: core 0: iova = 0x0, sgt = 0000000000000000, size = 0
[178426.369951] rga_debugger: render_mode = 2, bitblit_mode=0, rotate_mode = 0
[178426.369961] rga_debugger: src: y = 0 uv = 0 v = 0 aw = 0 ah = 0 vw = 0 vh = 0
[178426.369964] rga_debugger: src: xoff = 0, yoff = 0, format = 0x0, rd_mode = 0
[178426.369970] rga_debugger: dst: y=2 uv=0 v=e1000 aw=320 ah=320 vw=1280 vh=720
[178426.369974] rga_debugger: dst: xoff = 100, yoff = 100, format = 0x0, rd_mode = 1
[178426.369977] rga_debugger: mmu: mmu_flag=0 en=0
[178426.369979] rga_debugger: alpha: rop_mode = 0
[178426.369982] rga_debugger: yuv2rgb mode is 0
[178426.369984] rga_debugger: set core = 0, priority = 0, in_fence_fd = -1
[178426.370019] rga_policy: start policy on core = 1
[178426.370022] rga_policy: core = 1, break on feature
[178426.370025] rga_policy: start policy on core = 2
[178426.370027] rga_policy: core = 2, break on feature
[178426.370029] rga_policy: start policy on core = 4
[178426.370031] rga_policy: RGA2 only support under 4G memory!
[178426.370034] rga_policy: optional_cores = 0
[178426.370037] rga_policy: invalid function policy
[178426.370059] rga_policy: assign core: -1
[178426.370063] rga_job: job assign failed
[178426.370068] rga_job: failed to get scheduler, rga_job_commit(661)
[178426.370076] rga_job: failed to commit job!
[178426.370081] rga: rga_request_commit failed
[178426.370261] rga: release buffer handle[1]
[178426.370264] rga_mm: release buffer:
[178426.370268] rga_mm: handle = 1 refcount = 1 mm_flag = 0x2
[178426.370274] rga_mm: virtual address: va = 0x7fbeabd010, pages = 000000007d1e0919, size = 3690496
[178426.370278] rga_mm: core 1: iova = 0xffc00000, sgt = 0000000048e4cdc5, size = 3690496
[178426.370281] rga_mm: core 2: iova = 0xffc00000, sgt = 0000000050e818fa, size = 3690496
[178426.370284] rga_mm: core 0: iova = 0x0, sgt = 0000000000000000, size = 0
[178426.370778] rga: release buffer handle[2]
[178426.370783] rga_mm: release buffer:
[178426.370786] rga_mm: handle = 2 refcount = 1 mm_flag = 0x2
[178426.370789] rga_mm: virtual address: va = 0x7fbe738010, pages = 00000000715b1646, size = 3690496
[178426.370793] rga_mm: core 1: iova = 0xff800000, sgt = 000000007aedbec8, size = 3690496
[178426.370796] rga_mm: core 2: iova = 0xff800000, sgt = 00000000fb5e207e, size = 3690496
[178426.370799] rga_mm: core 0: iova = 0x0, sgt = 0000000000000000, size = 0


debug信息里面有一个 rga_policy: RGA2 only support under 4G memory! 看上去比较可疑
demo里面其它的命令都可以正常执行
是否是因为rga不能在超过4G的内存上使用color fill
需求是算法执行后在视频上画框,如果rga color fill有限制,该如何实现?
能否给个示例代码?
回复

使用道具 举报

jefferyzhang

论坛元老

积分
10605
发表于 昨天 17:44 | 显示全部楼层
这个log说明你没用3588的api写代码,3588上有多颗rga,rga2是旧的rga,只能寻址32bit空间,rga3无限制。
如果你用malloc分配空间,那大概率分配到是32bit以外的地址
回复

使用道具 举报

guyanxiao

注册会员

积分
142
发表于 13 小时前 | 显示全部楼层
谢谢Jeffery的信息,问题是没看到哪里有rga3的文档,现在找到的都是老的信息
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表