How to include GPU code or enable GPU-VPU interaction in IMX-VPU-HANTRO for i.MX8M Plus

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

How to include GPU code or enable GPU-VPU interaction in IMX-VPU-HANTRO for i.MX8M Plus

Jump to solution
469 Views
Hariharan1
Contributor III

Hello everyone,

I am currently working on the i.MX8M Plus platform, using the IMX-VPU-HANTRO driver for video encoding and decoding.

I would like to understand how to include or enable GPU-related code with this driver. My goal is to allow the GPU (vivante GC7000) and VPU to work together — for example, to VPU Generated  frame buffers parse into GPU.

I have gone through the source for `drivers/media/platform/imx-vpu-hantro`, but I am not sure where or how GPU-related integration is expected to happen.

Could you please guide me on:
1. Whether there is an existing interface between the GPU and VPU for buffer sharing (dma-buf or EGLImage)?
2. If I need to modify or extend the IMX-VPU-HANTRO driver, where should I start?
3. Are there any example patches or references for i.MX8M Plus?

Any documentation or pointers would be very helpful.

Thank you for your time and support.

Best regards,
Hariharan M



Labels (1)
0 Kudos
Reply
1 Solution
439 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @Hariharan1 

you can use the dma-buf feature to complete your request. .Please refer the below link:

https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-mi...

But we do not have such patches or references.

B.R

View solution in original post

0 Kudos
Reply
1 Reply
440 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @Hariharan1 

you can use the dma-buf feature to complete your request. .Please refer the below link:

https://community.nxp.com/t5/i-MX-Graphics/IMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-mi...

But we do not have such patches or references.

B.R

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2193963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20to%20include%20GPU%20code%20or%20enable%20GPU-VPU%20interaction%20in%20IMX-VPU-HANTRO%20for%20i.MX8M%20Plus%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2193963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20everyone%2C%3C%2FP%3E%3CP%3EI%20am%20currently%20working%20on%20the%20i.MX8M%20Plus%20platform%2C%20using%20the%20IMX-VPU-HANTRO%20driver%20for%20video%20encoding%20and%20decoding.%3C%2FP%3E%3CP%3EI%20would%20like%20to%20understand%20how%20to%20include%20or%20enable%20GPU-related%20code%20with%20this%20driver.%20My%20goal%20is%20to%20allow%20the%20GPU%20(vivante%20GC7000)%20and%20VPU%20to%20work%20together%20%E2%80%94%20for%20example%2C%20to%20VPU%20Generated%26nbsp%3B%20frame%20buffers%20parse%20into%20GPU.%3C%2FP%3E%3CP%3EI%20have%20gone%20through%20the%20source%20for%20%60drivers%2Fmedia%2Fplatform%2Fimx-vpu-hantro%60%2C%20but%20I%20am%20not%20sure%20where%20or%20how%20GPU-related%20integration%20is%20expected%20to%20happen.%3C%2FP%3E%3CP%3ECould%20you%20please%20guide%20me%20on%3A%3CBR%20%2F%3E1.%20Whether%20there%20is%20an%20existing%20interface%20between%20the%20GPU%20and%20VPU%20for%20buffer%20sharing%20(dma-buf%20or%20EGLImage)%3F%3CBR%20%2F%3E2.%20If%20I%20need%20to%20modify%20or%20extend%20the%20IMX-VPU-HANTRO%20driver%2C%20where%20should%20I%20start%3F%3CBR%20%2F%3E3.%20Are%20there%20any%20example%20patches%20or%20references%20for%20i.MX8M%20Plus%3F%3C%2FP%3E%3CP%3EAny%20documentation%20or%20pointers%20would%20be%20very%20helpful.%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20time%20and%20support.%3C%2FP%3E%3CP%3EBest%20regards%2C%3CBR%20%2F%3EHariharan%20M%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2193963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2194104%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20include%20GPU%20code%20or%20enable%20GPU-VPU%20interaction%20in%20IMX-VPU-HANTRO%20for%20i.MX8M%20Plus%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2194104%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F224949%22%20target%3D%22_blank%22%3E%40Hariharan1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20can%20use%20the%20dma-buf%20feature%20to%20complete%20your%20request.%20.Please%20refer%20the%20below%20link%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Graphics%2FIMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing%2Fm-p%2F2147914%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Graphics%2FIMX8MP-OpenCL-extension-cl-khr-external-memory-dma-buf-missing%2Fm-p%2F2147914%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EBut%20we%20do%20not%20have%20such%20%3CSPAN%3Epatches%20or%20references.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EB.R%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E