Tiger example over DSI

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

Tiger example over DSI

16,506 Views
khaledbalbaa
Contributor I

The Tiger example is running by default over LVDS, but I want to run it over DSI as my PCB support only DSI

I have searched any configurations to do this in the example but it seems that the GAL library is using the frame buffer internally with LVDS and I don't know how to changes it

 

Please respond ASAP as this issue is blocking and really urgent for us

@mohamed_saeed-h 

@joanxie @fausto_chiatante @Aubineau_FAE 

0 Kudos
Reply
11 Replies

16,443 Views
khaledbalbaa
Contributor I

Hello @zdenek_zadera ,

Please find below the log:

WithDisplayMacroDsi.txt ==> this run was using the FB library with the default display macro defined as below in the frame buffer library gpj (attached also as libVideoDisplay.txt file)

-DDEFAULT_DISPLAY="imx8_mipi_dsi0_dpu0"

We can see the resource not available error with 138 code, but I don't know why it is failing as we are using the DSI on other examples without issues

Also we can see that the DSI node is booting successfully from the kernel header, which means that the device tree is well configured

mipi_dsi@56228000 : Driver: i.MX8 MIPI-DSI OK

Waiting for your response

Thanks in advance,

Khaled

0 Kudos
Reply

16,431 Views
zdenek_zadera
NXP Employee
NXP Employee

Hello @khaledbalbaa 

unfortunatelly from the log we just see that GPU cannot allocate resource, but nothing more specific. For deeper analyze we would need part of your application where we would see how you call FB and GPU functions.

Would you also know at what point (which API call from your application) this error happens?

Thank you.

Regards

Zdenek

0 Kudos
Reply

16,426 Views
khaledbalbaa
Contributor I

Hello @zdenek_zadera ,

Actually as I said before, I am trying to run the simple Tiger example from the BSP without any changes in the example source code

I attached the example source code also, you can see it is the same as the one existing in the BSP examples

Concerning your questions, I only see API calling from EGL library, ex fbGetDisplay, fbCreateWindow, etc but no frame buffer APIs are called directly from the example

0 Kudos
Reply

16,452 Views
zdenek_zadera
NXP Employee
NXP Employee

Hello @mohamed_saeed-h,

ok, so then, could you share with me what FB functions (and parameters) you are using in you application and which function fails? In the shared screenshot I cannot see anything, it is too small.

Regards,

Zdenek

0 Kudos
Reply

16,458 Views
mohamed_saeed-h
Contributor IV

Hello Zdenek,

we tried both proposals are doesn't work even 

0 Kudos
Reply

16,465 Views
zdenek_zadera
NXP Employee
NXP Employee

Hello @khaledbalbaa ,

for changing LVDS output to DSI output there are needed two changes:

  1. update DTS - you already done this
  2. change display name when calling FB API from your application

As you already done change in DTS, we can check it if you share the change.

Regarding FB API (used in FrameBuffer example). If you use the following API, you can do the highlighted change:

#define DISPLAY "imx8_mipi_dsi0_dpu0"          // imx8_mipi_dsi1_dpu0, imx8_mipi_dsi1_dpu1 - depends on your case
...
gh_FB_get_driver_by_name(DISPLAY, &fbdrv);
...
gh_FB_check_info(fbdrv, &fbinfo_screen);
...
gh_FB_open(fbdrv, &fbinfo_screen, &fbhandle_screen);
...

 

Best Regards,

Zdenek

0 Kudos
Reply

16,478 Views
mohamed_saeed-h
Contributor IV

@zdenek_zadera  from Integrity team,

Hello Vincent,

As far as i know that the graphics patches are deliverables from NXP to GHS and GHS only package and deliver them to VALEO.

we need to get where is the source code responsible for configuring the FB through DSI or LVDS , device tree seems not working for us i'm afraid it's hardcoded inside some of the kernels and delivered precompiled!

because when we configured it as LVDS it works. and with DSI > glGetDisplay() fails from openVG

 

0 Kudos
Reply

16,492 Views
khaledbalbaa
Contributor I

Hello @Aubineau_FAE 

Thanks for the fast response, you are right it is integrity and integrity is based on dts but I don't think the problem is in the DTS as I already changed it, and I had an issue that the LVDSDev0 device not found (please check the attachment)

I disabled the LVDS node and enabled the DSI node in the DTS so that the example should run on the DSI, hence I got the error shown

I don't know if there is configurations fixed inside the EGL library so that we can only display on the LVDS?

0 Kudos
Reply

16,377 Views
zdenek_zadera
NXP Employee
NXP Employee

Hello @khaledbalbaa , @mohamed_saeed-h,

are you still facing this issue? I have played little with the example and I see that the GPU example (tiger and others...) are using output settings from FB setting - for us is mportant the default output as you want to use DSI instead of LVDS. You probably noticed this.

So first I have got to run fbdemoMonolith to output image on DSI output. Have you get the DSI output from fbdemoMonolith? Then also tiger should use the same output.

For enabling default display to DSI in fbdemoMonolith (generaly in FB driver - so should be then used by tiger example) you need to do yet this:

1. Update in DeviceTree - you already done some change - so FYI whether you done the same.

For DX: update file \imx8-extended-bsp\devtree\src\integrity-overlay\fsl-imx8dx-mek-overlay.dts

comment out this line
//#include "fsl-imx8x-lvds0-it6263-overlay.dtsi"

and uncomment this line
#include "fsl-imx8x-dsi0-adv7535-overlay.dtsi

2. redefine gh_FB_default_driver_name 

in FB driver source there is this symbol, which can be overloaded:
#pragma weak gh_FB_default_driver_name=fbdriver_imx8lvds0dpu0_name

so in file imx8-extended-bsp/examples/FrameBuffer/fbdemo.c
after these lines:
/* Uncomment next line if you want to overrule the FB Default Display driver */
/* char gh_FB_default_driver_name[] = "imx8_lvds0_dual_dpu0"; */

just add this line:
char gh_FB_default_driver_name[] = "imx8_mipi_dsi0_dpu0";

 

These changes helped me to get output on DSI port when running fbdemoMonolith. Could you check whether this will work also on your HW?

Thanks.

 

Regards,

Zdenek

16,487 Views
Aubineau_FAE
NXP Employee
NXP Employee

Hi,

The picture is too small to be read.

Did you contact Greenhills?

You can also compare if the SCFW's init is similar to the one done in the SDK (dpu_board.c file in dpu examples).

regards,

Vincent

 

0 Kudos
Reply

16,500 Views
Aubineau_FAE
NXP Employee
NXP Employee

Hi,

What is the OS? Greenhills Intregrity? if so, you have to contact Greenhills, NXP cannot support third parties OS.

If Linux, you just have to change the dts file (Integrity may be based on dts files).

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale?h=imx_5.4.70...

regards,

Vincent

0 Kudos
Reply