About glTexDirectVIVMap on 5.4.70.2.3.0 in imx8qxp

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

About glTexDirectVIVMap on 5.4.70.2.3.0 in imx8qxp

1,945 Views
yibhan
Contributor III

Hi guys,

I have some trouble to develop mipi camera app in imx8qxp.

I have used glTexDirectVIVMap when draw camera buffer to gpu directly in kernel 4.14.98-2.3.0 and it worked correctly.

but, after upgrade to kernel 5.4.70, the camera app crashed on GPU, so when I use glTexDirectVIV instead of glTexDirecVIVMap, camera app doesn't crash.

I have to use glTexDirectVIVMap gl extension due to camera performance.

Is there any guide to adapt camera app to kernel 5.4.70.2.3.0 ? 

Please help me fix camera issue.

 

0 Kudos
11 Replies

1,937 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello yibhan,

Please share your code to evaluate this issue.Which camera are you using?.

 

Regards

 

0 Kudos

1,907 Views
yibhan
Contributor III

Hi Bio_TICFSL,

Do you have any update for the issue?

I checked gl extention api with the latest kernel version 5.10.9.1.0.0, but the latest kernel version also crashed in GPU.

 

0 Kudos

1,898 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Don´t know what is the issue? the camara should works even in yuv. please download the yocto again trying to avoid this problem, it looks like you have not installed the gpu.

 

Regards

0 Kudos

1,873 Views
yibhan
Contributor III

Hi BIO_TICFSL,

Do you mean I should add gpu package for using full of gpu function?

Do you mean L5.4.70-2.3.0_images_MX8QXPC0MEK doesn't support full of gpu extension funcs?

If so, could you please let me know what of packages of gpu is needed?

 

0 Kudos

1,886 Views
yibhan
Contributor III

Hi Bio_TICFSL,

I am using imx8qxpc0-mek evaluation board, and I have downloaded firmware image(L5.4.70-2.3.0_images_MX8QXPC0MEK) which is not my custom build but from nxp website.

and I have checked camera preview in yuv and it worked and I also checked /unitest/V4L2/mx8_v4l2_cap_drm and worked.

but when i used opengl extension for camera preview, GPU crashed.

 

0 Kudos

1,838 Views
yibhan
Contributor III

Hi guys,

I have fixed my issue for GPU crash when glTexDirectVIVMap used.

I am not sure, but I have changed buffer->paddr = mem_offset to g2buf->buf_paddr and it worked.

0 Kudos

1,934 Views
yibhan
Contributor III

Hi Bio_TICFSL,

Thank you for answering,

I am using imx8qxp-mek board and ov5640 mipi(minisastocsi).

below is draw part in gl when using glTexDirectVIVMap, it is not full part.

=========================

glBindTexture (GL_TEXTURE_2D, tex); 

glTexDirectVIVMap(GL_TEXTURE_2D, buf->width, buf->height, buf->pixfmt, &buf->vaddr, &buf->paddr);

glTexDirectInvalidateVIV(GL_TEXTURE_2D);

 

and when glTextDirectVIV, 

glBindTexture (GL_TEXTURE_2D, tex); 

glTexDirectVIV(GL_TEXTURE_2D, buf->width, buf->height, buf->pixfmt, &texel);

memcpy (texel, buf->vaddr, buf->size)

glTexDirectInvalidateVIV(GL_TEXTURE_2D);

==================================

the difference of glTexDirectVIV and glTexDirectVIVMap is using offset or not, but I am not sure.

when upgrade to kernel 5.4.70. should i review camera streaming code part? 

 

 

 

 

 

 

0 Kudos

1,931 Views
yibhan
Contributor III

Hi Bio_TICFSL,

For your information, I am using camera module is ov5640 now, but I will change camera module to other camera sensor.

0 Kudos

1,927 Views
yibhan
Contributor III

Hi Bio_TICFSL

for your information, pixel format is YUYV and width is 1920 and height is 1080.

0 Kudos

1,811 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

The YUYV 1980x1080 works nicely, I guess it should be a problem with your application, it works in the EVK.

 

Regards

 

0 Kudos

1,805 Views
yibhan
Contributor III

Hi,

Thank you for feedback, 

I have fixed my issue for gpu crash.