rockchip-linux / mpp

Media Process Platform (MPP) module
523 stars 161 forks source link

RGA_BLIT fail: Invalid argument #431

Closed yrik closed 10 months ago

yrik commented 1 year ago

I've built the linux with https://github.com/radxa/meta-rockchip/ and trying to run a simple gstreamer pipeline with hardware acceleration.

It always fails with RGA_BLIT fail: Invalid argument - what can be a reason for that?

And how to properly enable hardware acceleration for video resizing?

My device: rock 5b.

root@rockchip-rk3588-rock-5b:~# GST_VIDEO_CONVERT_USE_RGA=1 GST_DEBUG=2 gst-launch-1.0 v4l2src device=/dev/video0 ! videoscale ! video/x-raw,width=640,height=360 ! fpsdisplaysink video-sink="kmssink plane-id=68"
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
0:00:00.446022545 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3133:gst_v4l2_object_get_nearest_size:<v4l2src0:src> Unable to try format: Invalid argument
0:00:00.446071837 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3005:gst_v4l2_object_probe_caps_for_format:<v4l2src0:src> Could not probe minimum capture size for pixelformat NV12
0:00:00.446109462 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3133:gst_v4l2_object_get_nearest_size:<v4l2src0:src> Unable to try format: Invalid argument
0:00:00.446143587 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3011:gst_v4l2_object_probe_caps_for_format:<v4l2src0:src> Could not probe maximum capture size for pixelformat NV12
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.446488337 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3133:gst_v4l2_object_get_nearest_size:<v4l2src0:src> Unable to try format: Invalid argument
0:00:00.446528587 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3005:gst_v4l2_object_probe_caps_for_format:<v4l2src0:src> Could not probe minimum capture size for pixelformat NV16
0:00:00.446625420 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3133:gst_v4l2_object_get_nearest_size:<v4l2src0:src> Unable to try format: Invalid argument
New clock: GstSystemClock
0:00:00.446661295 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3011:gst_v4l2_object_probe_caps_for_format:<v4l2src0:src> Could not probe maximum capture size for pixelformat NV16
0:00:00.446911837 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3133:gst_v4l2_object_get_nearest_size:<v4l2src0:src> Unable to try format: Invalid argument
0:00:00.447032587 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3005:gst_v4l2_object_probe_caps_for_format:<v4l2src0:src> Could not probe minimum capture size for pixelformat NV24
0:00:00.447102295 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3133:gst_v4l2_object_get_nearest_size:<v4l2src0:src> Unable to try format: Invalid argument
0:00:00.447186587 10998   0x55c443a460 WARN                    v4l2 gstv4l2object.c:3011:gst_v4l2_object_probe_caps_for_format:<v4l2src0:src> Could not probe maximum capture size for pixelformat NV24
0:00:00.571896558 10998   0x55c443a460 WARN          v4l2bufferpool gstv4l2bufferpool.c:1397:gst_v4l2_buffer_pool_dqbuf:<v4l2src0:pool0:src> Driver should never set v4l2_buffer.field to ANY
rga_api version 1.3.2_[0] (RGA is compiling with meson base: $PRODUCT_BASE)
 RgaBlit(1356) RGA_BLIT fail: Invalid argument RgaBlit(1357) RGA_BLIT fail: Invalid argument
fd-vir-phy-hnd-format[0, 0x7f8e8f1000, (nil), (nil), 0]
rect[0, 0, 1920, 1080, 1920, 1080, 1792, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
fd-vir-phy-hnd-format[0, 0x7f8e848000, (nil), (nil), 0]
rect[0, 0, 640, 360, 640, 360, 1792, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
This output the user patamaters when rga call blit fail
 RgaBlit(1356) RGA_BLIT fail: Invalid argument RgaBlit(1357) RGA_BLIT fail: Invalid argument
fd-vir-phy-hnd-format[0, 0x7f8e8f1000, (nil), (nil), 0]
rect[0, 0, 1920, 1080, 1920, 1080, 1792, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
fd-vir-phy-hnd-format[0, 0x7f8e848000, (nil), (nil), 0]
rect[0, 0, 640, 360, 640, 360, 1792, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
This output the user patamaters when rga call blit fail
Redistribute latency...
 RgaBlit(1356) RGA_BLIT fail: Invalid argument RgaBlit(1357) RGA_BLIT fail: Invalid argument
fd-vir-phy-hnd-format[0, 0x7f8e0e1000, (nil), (nil), 0]
rect[0, 0, 1920, 1080, 1920, 1080, 1792, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
fd-vir-phy-hnd-format[0, 0x7f8e038000, (nil), (nil), 0]
rect[0, 0, 640, 360, 640, 360, 1792, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
This output the user patamaters when rga call blit fail
HermanChen commented 11 months ago

@JeffyCN

JeffyCN commented 11 months ago

looks like something wrong with rga, please contact rga maintainer(or committer). the 3588 might need special librga and rga driver for legacy rga api.