imxvideoconvert_g2d CMA issue when cropping

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imxvideoconvert_g2d CMA issue when cropping

394 Views
malik_cisse
Senior Contributor I

Hi,

I am using this Gstreamer pipeline in QT5. EGLFS platform plugin is used (no Wayland/weston):
descr = g_strdup_printf ("v4l2src name=video_source device=/dev/v4l/by-path/platform-vvcam-video.0-video-index0 ! video/x-raw, width=3840,height=2160 ! "
"videocrop name=video_crop ! imxvideoconvert_g2d ! interpipesink name=src_1 sync=false ");
I am dynamically zooming by setting videocrop parameters (left_crop, right_crop etc.) 

I eventually get this type of CMA related error and video stops playing:

[10337.440327] alloc_contig_range: [6d900, 6da77) PFNs busy

When searching for "alloc_contig_range:  PFNs busy" issue, one finds it is related to CMA. here we find some more details about CMA:

https://developer.toradex.com/linux-bsp/how-to/linux-features/contiguous-memory-allocator-cma-linux/

Further investigation show the actual issue seems to be located in imxvideoconvert_g2d (G2D GPU Accelerator) element.

When I check this command, videocrop plug-in doesn't crop image buffer itself. It's just set crop metadata and pass this information to imxvideoconvert_g2d. And imxvideoconvert_g2d plug-in check crop metadata about input image buffer and if it's not null, it crop image buffer.

The reason why videocrop plug-in doesn't crop image itself, it's running as in-place mode.

Thus, something must still be buggy in imxvideoconvert_g2d but I could not figure out what it is. Checking source code and fixes did not help either:
https://source.codeaurora.org/external/imx/imx-gst1.0-plugin/tree/plugins/videoconvert/gstimxvideoco...

Thx,

Labels (1)
0 Kudos
2 Replies

382 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Which processor are you working on?

 

Regards

0 Kudos

379 Views
malik_cisse
Senior Contributor I

Sorry, I am on imx8m-plus platform using Kernel 5.4.70

0 Kudos