cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,281 Views
Registered: ‎04-11-2017

drm error with 2018.3 version

Hello,

we have upgraded project for zynq-7000 (Xilinx Zynq XC7Z030-2FFG676I SoC) from version 2015.4 to version 2018.3 in vivado and prepared appropriate devicetree and kernel in version 2018.3.
When kernel is booting there is a problem related to the drm (log in attachment).
I have checked files (BOOT.bin, devicetree.dtb) in version 2018.3 with kernel in version 2015.4 and there is no problem with drm, hdmi-out works correctly, so I assume that the hw part is correct.
Could you please help to resolve this issue or share an example project with hdmi-out and adv7511 working with linux in version 2018.3 (based on Xilinx ip cores) ?

Note: We had to modify xilinx_drm_drv.c file as the following:

git diff drivers/gpu/drm/xilinx/xilinx_drm_drv.c
diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_drv.c b/drivers/gpu/drm/xilinx/xilinx_drm_drv.c
index c6d4993736bc..a5058d053b66 100644
--- a/drivers/gpu/drm/xilinx/xilinx_drm_drv.c
+++ b/drivers/gpu/drm/xilinx/xilinx_drm_drv.c
@@ -77,8 +77,8 @@ struct xilinx_video_format_desc {
 static const struct xilinx_video_format_desc xilinx_video_formats[] = {
        { "yuv420", 16, 16, XILINX_VIDEO_FORMAT_YUV420, DRM_FORMAT_YUV420 },
        { "uvy422", 16, 16, XILINX_VIDEO_FORMAT_NONE, DRM_FORMAT_UYVY },
-       { "vuy422", 16, 16, XILINX_VIDEO_FORMAT_YUV422, DRM_FORMAT_VYUY },
        { "yuv422", 16, 16, XILINX_VIDEO_FORMAT_YUV422, DRM_FORMAT_YUYV },
+       { "vuy422", 16, 16, XILINX_VIDEO_FORMAT_YUV422, DRM_FORMAT_VYUY },
        { "yvu422", 16, 16, XILINX_VIDEO_FORMAT_NONE, DRM_FORMAT_YVYU },
        { "yuv444", 24, 24, XILINX_VIDEO_FORMAT_YUV444, DRM_FORMAT_YUV444 },
        { "nv12", 16, 16, XILINX_VIDEO_FORMAT_NONE, DRM_FORMAT_NV12 },

Without this modification DRM does not initialize.

Best Regards,

Piotr

Tags (1)
0 Kudos
13 Replies
Highlighted
Observer
Observer
1,206 Views
Registered: ‎04-11-2017

Hello,

 

Here is a log from booting:

hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=18 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac:     DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xilinx-vdma 43000000.dma: Xilinx AXI VDMA Engine Driver Probed!!
Unhandled fault: imprecise external abort (0x1406) at 0x00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops - BUG: 1406 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx-sdx2018.3 #89
Hardware name: Xilinx Zynq Platform
task: ef03f840 task.stack: ef040000
PC is at xilinx_vtc_probe+0xa8/0x144
LR is at devm_ioremap+0x54/0x70
pc : [<c03adc28>]    lr : [<c02f90d4>]    psr: 80000013
sp : ef041de0  ip : 00000000  fp : 00000000
r10: ef16dc00  r9 : ef7f73d0  r8 : 00000000
r7 : 00000000  r6 : ef320c50  r5 : ef16dc10  r4 : f0970000
r3 : 00000000  r2 : 00000000  r1 : a0000013  r0 : f0970000
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 0000404a  DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0xef040210)
Stack: (0xef041de0 to 0xef042000)
1de0: ef7f73d0 00000000 00000000 c034130c 43c30000 43c3ffff ef7f7428 00000200
1e00: 00000000 00000000 00000000 00000000 ef3daf80 ee8cec10 00000000 ef7f73d0
1e20: ee82f6d0 ee8c5400 ee8ce810 c03aa260 ee8c5400 c0817d9e ee8c5400 ef16dc10
1e40: 00000000 ee82f6d0 c0a18714 ef16dc10 ef16dc00 c03aa930 ef16e9a0 c082bb1b
1e60: ee8cd580 00000000 00000000 c03aa8d4 ef16dc10 c0a18714 00000000 c0a18714
1e80: 00000000 00000000 00000000 c03baa44 ef16dc10 c0a56890 c0a56894 c03b958c
1ea0: ef16dc10 ef16dc44 c0a18714 c0a190c8 00000000 c093cd40 c093383c c03b96cc
1ec0: 00000000 c0a18714 c03b9650 c03b7ddc ef076f58 ef1590b4 c0a18714 ef1f2f80
1ee0: 00000000 c03b8c04 c081897b c081897c 00000000 c0a18714 c0a3c480 c0933834
1f00: c0918f34 c03b9e50 ffffe000 c0a3c480 c0933834 c01019ac c08962b4 00000000
1f20: 00000000 c0132bd0 00000000 c0895238 000000d4 00000006 00000006 c08962c8
1f40: 000000d3 c08962c8 efffed73 00000000 00000000 00000007 c0a3c480 c0933830
1f60: 00000007 c0a3c480 c0933834 000000d4 c0a3c480 c0900da4 00000006 00000006
1f80: 00000000 c090059c 00000000 c06514dc 00000000 00000000 00000000 00000000
1fa0: 00000000 c06514e4 00000000 c0106fb0 00000000 00000000 00000000 00000000
1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 28201040 805c0400
[<c03adc28>] (xilinx_vtc_probe) from [<c03aa260>] (xilinx_drm_crtc_create+0x1e0/0x36c)
[<c03aa260>] (xilinx_drm_crtc_create) from [<c03aa930>] (xilinx_drm_platform_probe+0x5c/0x3bc)
[<c03aa930>] (xilinx_drm_platform_probe) from [<c03baa44>] (platform_drv_probe+0x50/0x9c)
[<c03baa44>] (platform_drv_probe) from [<c03b958c>] (driver_probe_device+0x1ec/0x2b0)
[<c03b958c>] (driver_probe_device) from [<c03b96cc>] (__driver_attach+0x7c/0xa8)
[<c03b96cc>] (__driver_attach) from [<c03b7ddc>] (bus_for_each_dev+0x7c/0x8c)
[<c03b7ddc>] (bus_for_each_dev) from [<c03b8c04>] (bus_add_driver+0x16c/0x1d4)
[<c03b8c04>] (bus_add_driver) from [<c03b9e50>] (driver_register+0xa0/0xe0)
[<c03b9e50>] (driver_register) from [<c01019ac>] (do_one_initcall+0xf8/0x118)
[<c01019ac>] (do_one_initcall) from [<c0900da4>] (kernel_init_freeable+0x188/0x1c8)
[<c0900da4>] (kernel_init_freeable) from [<c06514e4>] (kernel_init+0x8/0x108)
[<c06514e4>] (kernel_init) from [<c0106fb0>] (ret_from_fork+0x14/0x24)
Code: e5860000 8affffe3 e590800c f57ff04f (e3c88c3f)
---[ end trace 7926ad45da104534 ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D         4.14.0-xilinx-sdx2018.3 #89
Hardware name: Xilinx Zynq Platform
[<c010e764>] (unwind_backtrace) from [<c010a98c>] (show_stack+0x10/0x14)
[<c010a98c>] (show_stack) from [<c06414e8>] (dump_stack+0x80/0xa0)
[<c06414e8>] (dump_stack) from [<c010ceb8>] (ipi_cpu_stop+0x3c/0x70)
[<c010ceb8>] (ipi_cpu_stop) from [<c010d6d8>] (handle_IPI+0x64/0x84)
[<c010d6d8>] (handle_IPI) from [<c0101420>] (gic_handle_irq+0x84/0x90)
[<c0101420>] (gic_handle_irq) from [<c010b3cc>] (__irq_svc+0x6c/0xa8)
Exception stack(0xc0a01f48 to 0xc0a01f90)
1f40:                   00000001 00000000 00000000 c0116640 00000000 00000000
1f60: ffffe000 c0a03c68 c0a03cb4 c0933a30 00000000 00000000 2ee8e000 c0a01f98
1f80: c01079bc c01079ac 60000113 ffffffff
[<c010b3cc>] (__irq_svc) from [<c01079ac>] (arch_cpu_idle+0x1c/0x38)
[<c01079ac>] (arch_cpu_idle) from [<c01494d4>] (do_idle+0xf8/0x1a8)
[<c01494d4>] (do_idle) from [<c01496bc>] (cpu_startup_entry+0x18/0x1c)
[<c01496bc>] (cpu_startup_entry) from [<c0900bbc>] (start_kernel+0x304/0x364)
[<c0900bbc>] (start_kernel) from [<0000807c>] (0x807c)
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

 

Thanks,

Best Regards,

Piotr

0 Kudos
Highlighted
Explorer
Explorer
1,069 Views
Registered: ‎02-15-2019

我也遇到了同样的问题,请问如何修改petalinux的源代码
0 Kudos
Highlighted
Contributor
Contributor
901 Views
Registered: ‎10-20-2014

你好,请问你这个问题解决了吗,我也遇到同样的问题了,希望能交流下,谢谢!

0 Kudos
Highlighted
Moderator
Moderator
548 Views
Registered: ‎04-24-2017

Hi @piotr_czak ,

We need more information (ex, complete dts). I'm not sure how change in format order would fix null pointer. Unfortunately, the driver (xilinx_drm) is legacy and untouched for years in favor of the new one (xlnx_drm). From 2018.1 on wards we moved to newer DRM framework drivers. Refer https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842520/Xilinx+DRM+KMS+driver#XilinxDRMKMSdriver-Changelog

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Observer
Observer
512 Views
Registered: ‎04-11-2017

Hi Sandeep,

I've attached all files which I got from a developer: 

- DT sources,

- kernel configuration file,

- booting log,

- diagram of the system.

Best Regards,

Piotr

0 Kudos
Highlighted
Observer
Observer
509 Views
Registered: ‎04-11-2017

Attachment

Piotr

0 Kudos
Highlighted
Moderator
Moderator
432 Views
Registered: ‎04-24-2017

Hi @piotr_czak ,

From your boot logs you are using mix match version of u-boot, kernel and hw design.

Kernel version you are using is 4.19 which is based on 2019..x release. 2018.x release is base on 4.14 kernel, Can you try with 2018.3 kernel and post the logs. Make sure you use the same version for all the components.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
405 Views
Registered: ‎03-08-2018

The topic is a bit old and the tool versions have changed in the meantime. After upgrading from version 2018.3 to 2019.1 the problem is still present. When drm is enabled, the kernel stops booting.

0 Kudos
Highlighted
Moderator
Moderator
384 Views
Registered: ‎04-24-2017

Hi @zbyszekt ,

When you disable DRM does it work? Can you try enabling drm debug from bootargs and share the logs.

chosen {
	bootargs = "console=ttyPS0,115200 root=/dev/ram0 rw earlyprintk earlycon consoleblank=0 cma=256M" drm.debug=0xff;
	stdout-path = "serial0:115200n8";
};
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
337 Views
Registered: ‎03-08-2018

 

Hi @sandeepg 

I have added logs when drm is disabled, and two different behaviors when drm is enabled.

Best Regards

Zbyszek

 
 
 
0 Kudos
Highlighted
Moderator
Moderator
310 Views
Registered: ‎04-24-2017

Hi @zbyszekt ,

What changes you have made when you see two different behaviors in boot_drm_enabled_1.log and boot_drm_enabled_2.log

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
277 Views
Registered: ‎03-08-2018

Hi @sandeepg 

I didn't change anything between launches.
Sometime is one behavior and sometimes second.
In second behavior (without kernel crash) the debug
message "(none) user.debug kernel: [drm:xilinx_drm_connector_detect] status: 1"
is displayed all the time and boot does not end.

Best Regards

Zbyszek

 

 

0 Kudos
Highlighted
Moderator
Moderator
216 Views
Registered: ‎04-24-2017

Hi @zbyszekt ,

  1. As I mentioned earlier you need to start using DRM_XLNX instead of _DRM_XILINX, refer https://github.com/Xilinx/linux-xlnx/blob/master/arch/arm/configs/xilinx_zynq_defconfig#L154-L155
  2. XILINX_DRM code is deprecated, it's even removed from the tree completely in 2020.1 upcoming releases(5.4 kernel)
  3. From you logs the drm platform driver name is https://github.com/Xilinx/linux-xlnx/blob/xlnx_rebase_v4.19_2019.1/drivers/gpu/drm/xilinx/xilinx_drm_drv.c#L603
    xilinx-drm amba_pl:xilinx_drm: fbdev is not initialized

    Once you move to DRM_XLNX then you should see the drm platform driver name https://github.com/Xilinx/linux-xlnx/blob/xlnx_rebase_v4.19_2019.1/drivers/gpu/drm/xlnx/xlnx_drv.c#L458 as shown in our zynqmp logs.

    [    7.932110] xlnx-drm xlnx-drm.0: bound b00c0000.v_mix (ops 0xffffff8008bcb7e8)
    [    7.942380] xlnx-drm xlnx-drm.0: bound a0080000.v_hdmi_tx_ss (ops xlnx_drm_hdmi_component_ops [xilinx_hdmi_tx])
  4. Another problem is the legacy vtc shares one clock for video and axi lite, so unless video clock is enabled, axi lite access creates an abort. For example, note in the working example, "xilinx-drm amba_pl:xilinx_drm: fbdev is not initialized".  That means whatever change the user made resulted in the fbdev initialization failure (usually from the pixel format incompatible with fbdev. fbdev being legacy only supports handful for rgb formats)).
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos