cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bioak
Observer
Observer
1,116 Views
Registered: ‎07-29-2014

Petalinux use MIPI DSI Subsystem

Hi everyone:

Since  designed the hardware to use MIPI screens,

I use MIPI DSI2 TX SUBSYSTEM on the PL side.

I refer to Xilinx DRM KMS MIPI DSI2-Tx Driver for the KERNEL configuration,

and then refer to xlnx,dsi.txt for the device tree to do the setup.

But dmessage can only see the displayport message, not any mipi-dsi message.

Then I see panel-simple-dsi & panel-ronbo-rb070d30 in /sys/bus/mipi-dsi/drivers/ folder,

but there is nothing in /sys/bus/mipi-dsi/ folder.

bioak_1-1624873311926.png

 

Is there anything else I should check or get wrong?

 

0 Kudos
13 Replies
watari
Professor
Professor
1,103 Views
Registered: ‎06-16-2013

Hi @bioak 

 

Would you share the result by "modetest -M xlnx"  to investigate the route cause ?

 

At least, it seems that there aren't any proper DRM graph from boot log.

 

Best regards,

0 Kudos
bioak
Observer
Observer
1,076 Views
Registered: ‎07-29-2014

HI Watari:


Thank you very much for your reply.
Running modetest looks like it only has DP in it.
I have recorded it in modetest.txt.

Also I forgot to show my petalinux version.
My petalinux version is 2020.1.

 



0 Kudos
watari
Professor
Professor
1,031 Views
Registered: ‎06-16-2013

Hi @bioak 

 

Would you share your block design as pdf to investigate the route cause, if possible ?

 

Best regards,

0 Kudos
bioak
Observer
Observer
988 Views
Registered: ‎07-29-2014

Hi Watari:

Thank you for your reply, attached is my block design.

Best regards,

0 Kudos
watari
Professor
Professor
964 Views
Registered: ‎06-16-2013

Hi @bioak 

 

Who control "v_frmbuf_rd_rst" signal ?

I guess it seems reset tree issue.

 

Best regards,

0 Kudos
bioak
Observer
Observer
941 Views
Registered: ‎07-29-2014

Hi Watari:

I have already added reset through emio in the block design.

bioak_5-1624939332357.png

Also I have already added the reset-gpios setting to pl_custom.dtsi.

bioak_6-1624939346106.png

Best regards,

 

0 Kudos
watari
Professor
Professor
927 Views
Registered: ‎06-16-2013

Hi @bioak 

 

I see.

However, there are some wrong reset trees in your design. Therefore you can't find any proper crtc in drm.

So, I strongly suggest you to consider proper reset trees.

Also I suggest you to refer ex. VCU TRD to understand reset tree architecture, too.

 

Best regards,

bioak
Observer
Observer
882 Views
Registered: ‎07-29-2014

Hi Watari:

Thanks for your help, I will refer to VCU's RESET section first.

Best regards,

0 Kudos
hokim
Scholar
Scholar
830 Views
Registered: ‎10-21-2015

Hi

xlnx,dsi.txt is not complete to configure xilinx drm pipeline

It should be connected to drm crtc component through endpoint

https://github.com/Xilinx/linux-xlnx/blob/xlnx_rebase_v5.4_2020.1/Documentation/devicetree/bindings/display/xlnx/xlnx,pl-disp.txt

And panel should be customized according to your display panel spec

https://github.com/Xilinx/linux-xlnx/blob/xlnx_rebase_v5.4_2020.1/drivers/gpu/drm/panel/

 

bioak
Observer
Observer
741 Views
Registered: ‎07-29-2014

Hi Hokim:

You are right, I added pl-disp in devicetree , and now I can see the device in /sys/bus/mipi-dsi/devices/.

bioak_1-1625466943170.png

But I type " modetest -M xlnx ",
I see that the fb, pos, and size in CRTCs are all displayed as 0.

bioak_2-1625467146167.png

If I type "modetest -M xlnx command -s 35:1024x600@BG24 " ,
the system will crash and display "[CRTC:33:crtc-0] vblank wait timed out
"like this.

bioak_3-1625482959487.png

Is there anything else I should be aware of?

Best regards,

0 Kudos
hokim
Scholar
Scholar
720 Views
Registered: ‎10-21-2015

Hi

[CRTC:33:crtc-0] vblank wait timed out

The above message means vblank handler is not called, which is triggered by the interrupt from the framebuffer reader 

You need to check why the framebuffer reader doesn't complete transfer of frame data

0 Kudos
bioak
Observer
Observer
599 Views
Registered: ‎07-29-2014

Hi Hokim:
Thank you for your advice!

It looks like V_FRMBUF_RD is not working properly.
-> The interrupt is always 0.

bioak_0-1626062383321.png

So I went and traced xilinx_frmbuf.c,
and found that "[CRTC:33:crtc-0] vblank wait timed out"
all happened after execution.
  "->xilinx_frmbuf_dma_prep_interleaved()"
  "->dma_cookie_t xilinx_frmbuf_tx_submit()"

bioak_1-1626063315269.png

 

I would like to ask if this is because there is no data inside the frmabuf,
so that the timeout is generated?
If so, what setting does KERNEL need to do in order to fill the screen data
into the frambuf inside for the V_FRMBUF_RD ip to read?

 

Best regards,

0 Kudos
hokim
Scholar
Scholar
540 Views
Registered: ‎10-21-2015

Hi

Your mipi dsi subsystem seems not to receive streaming data from  V_FRMBUF_RD.

Could you check the ready signal of mipi dsi subsystem using ILA?

DCS command mode won't work  properly because your devicetree doesn't have "xlnx,dsi-cmd-mode" property

https://github.com/Xilinx/linux-xlnx/blob/xlnx_rebase_v5.4_2020.1/drivers/gpu/drm/xlnx/xlnx_dsi.c#L849

DTG seems to generates wrong property for DCS command mode; xlnx,include-dcs-cmd-mode = "true"

You can fix it as follows

 

 

&dsi_ss_mipi_dsi_tx_subsystem_1{
    xlnx,dsi-cmd-mode;
}

 

 

  

0 Kudos