Will you support DRM driver for Odroid n2?

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Tue Jun 04, 2019 11:31 am

Hi
Do you have the plan to support DRM for 4.9 kernel? or DRM for a newer kernel?
The 4.9 kernel has the DRM implementation but is disabled, and I have tried to enable it, but get garbage on display.

User avatar
odroid
Site Admin
Posts: 32137
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 293 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by odroid » Tue Jun 04, 2019 11:49 am

We've been working on DRM and Wayland/Weston stuff on Kernel 4.9.
Here is an evidence. ;) Yes, glmark2-es2-wayland works on our Ubuntu minimal image.
Image

I think we can release a Kernel update with a quick guide by early next week after some more tests.
These users thanked the author odroid for the post:
XOR (Tue Jun 04, 2019 8:33 pm)

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Tue Jun 04, 2019 1:12 pm

odroid wrote:
Tue Jun 04, 2019 11:49 am
I think we can release a Kernel update with a quick guide by early next week after some more tests.
Can we get a mali-gbm (not mali-wayland) driver to go with it? I plan to adapt it for X11 use.

User avatar
tobetter
Posts: 3903
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by tobetter » Tue Jun 04, 2019 2:02 pm

crashoverride wrote:
Tue Jun 04, 2019 1:12 pm
odroid wrote:
Tue Jun 04, 2019 11:49 am
I think we can release a Kernel update with a quick guide by early next week after some more tests.
Can we get a mali-gbm (not mali-wayland) driver to go with it? I plan to adapt it for X11 use.
Maybe the driver for G31 won't work on ODROID-N2? :lol:

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Tue Jun 04, 2019 3:07 pm

odroid wrote:
Tue Jun 04, 2019 11:49 am
We've been working on DRM and Wayland/Weston stuff on Kernel 4.9.
Here is an evidence. ;) Yes, glmark2-es2-wayland works on our Ubuntu minimal image.
I think we can release a Kernel update with a quick guide by early next week after some more tests.
Excellent, looking forward to see your guide

User avatar
tobetter
Posts: 3903
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by tobetter » Wed Jun 05, 2019 12:34 pm

crashoverride wrote:
Tue Jun 04, 2019 1:12 pm
odroid wrote:
Tue Jun 04, 2019 11:49 am
I think we can release a Kernel update with a quick guide by early next week after some more tests.
Can we get a mali-gbm (not mali-wayland) driver to go with it? I plan to adapt it for X11 use.
Can look into this which is based on Mali r16p0?
https://github.com/hardkernel/buildroot ... ayland/drm
Every single GPU prebuilt libraries are linked to single binary 'libMali.so'.
https://github.com/hardkernel/buildroot ... master/lib

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Thu Jun 06, 2019 9:40 am

@tobetter,
I am looking for a libMali.so binary that is built with GBM as the platform interface. Examples can be found here:
https://github.com/rockchip-linux/libma ... -linux-gnu
libmali-bifrost-g31-rxp0-gbm.so
libmali-bifrost-g31-rxp0-wayland-gbm.so
This file appears to be a GBM build of libMali:
https://github.com/hardkernel/buildroot ... /r16p0/gbm

I will not know for certain whether its actually GBM (not Wayland-GBM) until I try it (after DRM driver is released). The distinction affects the native types used by EGL:
https://github.com/rockchip-linux/libma ... .h#L73-L80

Code: Select all

typedef struct gbm_device * EGLNativeDisplayType;
typedef struct gbm_surface * EGLNativeWindowType;
typedef void * EGLNativePixmapType;

/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
typedef EGLNativeDisplayType NativeDisplayType;
typedef EGLNativePixmapType  NativePixmapType;
typedef EGLNativeWindowType NativeWindowType;

User avatar
tobetter
Posts: 3903
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by tobetter » Thu Jun 06, 2019 7:50 pm

The Linux kernel is finally updated with Mali kernel driver (r16p0).
https://github.com/hardkernel/linux/com ... idn2-4.9.y

And we've tested the kernel to run Wayland, specifically have tested to run weston, opengl-es2-wayland as well as Chromium (prebuilt version by Amlogic). Here is the link how you can run on Ubuntu minimal image, the instruction introduce you to compile the Linux kernel and run on the Ubuntu minimal image, not your workstation. The current problem when weston is launched is that the mouse cursor is not visible and this is not fixed at the moment, hope someone else helps me out. :)
https://wiki.odroid.com/odroid-n2/appli ... _drm_build

In addition, if you are facing a problem that the screen is covered with unexpected color or not able to see anything after doing all the step in the Wiki, please confirm if the boot logo file boot-logo.bmp.gz is copied into the boot partition along with boot.ini.

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Fri Jun 07, 2019 12:56 pm

I compiled and installed the kernel and the Mali drivers form the .deb as instructed. I was able to run kmscube which is a good sign. However, I had to use an old version since some GBM symbols are not defined in libmali.so:

Code: Select all

kmscube/cube-tex.c:267: undefined reference to `gbm_bo_map'
kmscube/cube-tex.c:273: undefined reference to `gbm_bo_unmap'
This older version is the one that works because it does not use the above functions:
https://github.com/robclark/kmscube/tre ... 8a3f7e4285

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Fri Jun 07, 2019 3:36 pm

I finally managed to get armsoc brought up. It requires a kernel patch to prevent panics:

Code: Select all

diff --git a/drivers/amlogic/media/vout/vout_serve/vout_serve.c b/drivers/amlogic/media/vout/vout_serve/vout_serve.c
index dc897893..293cbdcb 100644
--- a/drivers/amlogic/media/vout/vout_serve/vout_serve.c
+++ b/drivers/amlogic/media/vout/vout_serve/vout_serve.c
@@ -151,6 +151,12 @@ static enum vmode_e nulldisp_validate_vmode(char *name)
        enum vmode_e vmode = VMODE_MAX;
        int i;
 
+       if(!name)
+       {
+               printk(KERN_ALERT "nulldisp_validate_vmode: name=NULL\n");
+               return VMODE_HDMI;
+       }
+
        for (i = 0; i < ARRAY_SIZE(nulldisp_vinfo); i++) {
                if (strcmp(nulldisp_vinfo[i].name, name) == 0) {
                        vmode = nulldisp_vinfo[i].mode;

User avatar
tobetter
Posts: 3903
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by tobetter » Fri Jun 07, 2019 3:48 pm

crashoverride wrote:
Fri Jun 07, 2019 3:36 pm
I finally managed to get armsoc brought up. It requires a kernel patch to prevent panics:

Code: Select all

diff --git a/drivers/amlogic/media/vout/vout_serve/vout_serve.c b/drivers/amlogic/media/vout/vout_serve/vout_serve.c
index dc897893..293cbdcb 100644
--- a/drivers/amlogic/media/vout/vout_serve/vout_serve.c
+++ b/drivers/amlogic/media/vout/vout_serve/vout_serve.c
@@ -151,6 +151,12 @@ static enum vmode_e nulldisp_validate_vmode(char *name)
        enum vmode_e vmode = VMODE_MAX;
        int i;
 
+       if(!name)
+       {
+               printk(KERN_ALERT "nulldisp_validate_vmode: name=NULL\n");
+               return VMODE_HDMI;
+       }
+
        for (i = 0; i < ARRAY_SIZE(nulldisp_vinfo); i++) {
                if (strcmp(nulldisp_vinfo[i].name, name) == 0) {
                        vmode = nulldisp_vinfo[i].mode;
Great, will you send PR or shall I merge them to the branch? :)

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Fri Jun 07, 2019 4:10 pm

tobetter wrote:
Fri Jun 07, 2019 3:48 pm
will you send PR or shall I merge them to the branch?
Its easiest if you (or someone else) creates the patch and merges it. I have to pull the entire tree and then push it to my github before I can submit a PR.

Also, I have published the N2 version of armsoc here:
https://github.com/OtherCrashOverride/x ... oc/tree/n2

[edit]
Sample xorg.conf provided goes in /etc/X11/xorg.conf.
For unknown reason(s), X11 session startup takes longer time than for fbdev.

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Fri Jun 07, 2019 5:58 pm

tobetter wrote:
Thu Jun 06, 2019 7:50 pm
The Linux kernel is finally updated with Mali kernel driver (r16p0).
https://github.com/hardkernel/linux/com ... idn2-4.9.y

And we've tested the kernel to run Wayland, specifically have tested to run weston, opengl-es2-wayland as well as Chromium (prebuilt version by Amlogic). Here is the link how you can run on Ubuntu minimal image, the instruction introduce you to compile the Linux kernel and run on the Ubuntu minimal image, not your workstation. The current problem when weston is launched is that the mouse cursor is not visible and this is not fixed at the moment, hope someone else helps me out. :)
https://wiki.odroid.com/odroid-n2/appli ... _drm_build

In addition, if you are facing a problem that the screen is covered with unexpected color or not able to see anything after doing all the step in the Wiki, please confirm if the boot logo file boot-logo.bmp.gz is copied into the boot partition along with boot.ini.
Do you know why meson_fb is disabled with the drm kernel? and are you still going to fix the display issue (I can see nothing on the screen after reboot)

User avatar
tobetter
Posts: 3903
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by tobetter » Fri Jun 07, 2019 6:18 pm

sjwlaoda wrote:
Fri Jun 07, 2019 5:58 pm
tobetter wrote:
Thu Jun 06, 2019 7:50 pm
The Linux kernel is finally updated with Mali kernel driver (r16p0).
https://github.com/hardkernel/linux/com ... idn2-4.9.y

And we've tested the kernel to run Wayland, specifically have tested to run weston, opengl-es2-wayland as well as Chromium (prebuilt version by Amlogic). Here is the link how you can run on Ubuntu minimal image, the instruction introduce you to compile the Linux kernel and run on the Ubuntu minimal image, not your workstation. The current problem when weston is launched is that the mouse cursor is not visible and this is not fixed at the moment, hope someone else helps me out. :)
https://wiki.odroid.com/odroid-n2/appli ... _drm_build

In addition, if you are facing a problem that the screen is covered with unexpected color or not able to see anything after doing all the step in the Wiki, please confirm if the boot logo file boot-logo.bmp.gz is copied into the boot partition along with boot.ini.
Do you know why meson_fb is disabled with the drm kernel? and are you still going to fix the display issue (I can see nothing on the screen after reboot)
I have no idea why meson_fb is disabled by Amlogic, that has been enabled for testing but had a kernel panic. Also, we have the fix but not tested recently. The display issue which does not show anything or ridiculous color will be looked into a bit later.

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Fri Jun 07, 2019 6:50 pm

sjwlaoda wrote:
Fri Jun 07, 2019 5:58 pm
Do you know why meson_fb is disabled with the drm kernel?
It breaks the compile when enabled:
https://github.com/hardkernel/linux/blo ... dev.c#L198

I fixed that issue, but there are still other issues preventing a console display.

User avatar
tobetter
Posts: 3903
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by tobetter » Fri Jun 07, 2019 6:55 pm

crashoverride wrote:
Fri Jun 07, 2019 6:50 pm
sjwlaoda wrote:
Fri Jun 07, 2019 5:58 pm
Do you know why meson_fb is disabled with the drm kernel?
It breaks the compile when enabled:
https://github.com/hardkernel/linux/blo ... dev.c#L198

I fixed that issue, but there are still other issues preventing a console display.
Your fix is like this?

Code: Select all

diff --git a/drivers/amlogic/drm/am_meson_fbdev.c b/drivers/amlogic/drm/am_meson_fbdev.c
index 610f3ca7f3df..915d7b742623 100644
--- a/drivers/amlogic/drm/am_meson_fbdev.c
+++ b/drivers/amlogic/drm/am_meson_fbdev.c
@@ -195,7 +195,7 @@ int am_meson_drm_fbdev_init(struct drm_device *dev)
 err_drm_fb_helper_fini:
 	drm_fb_helper_fini(helper);
 err_free:
-	kfree(fbdev_cma);
+	kfree(helper);
 	return ret;
 }
 

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Fri Jun 07, 2019 7:22 pm

tobetter wrote:
Fri Jun 07, 2019 6:55 pm
Your fix is like this?
Yes, that fixes the compile issue. I also had to set the fb->depth and fb->bits_per_pixel. However, when the FB gets used, it generates a virtual memory fault and the kernel just reboots in a cycle.

[edit]

Code: Select all

[    6.650955@0] am_meson_drm_fbdev_create: surface_bpp=32, surface_width=1920, 
surface_height=1080, surface_depth=24                                           
[    6.658596@0] FB [1920x1080]-24 offset=0 size=8294400                        
[    6.661138@0] [drm] content_protection:0                                     
[    6.661152@0] [drm] mode : 1920x1080, adjusted_mode : 1920x1080              
[    6.661155@0] [drm] the hdmi mode vic : 16                                   
[    6.661237@0] [drm] am_meson_crtc_enable                                     
[    6.661238@0] [drm] am_meson_crtc_enable: 1920x1080                          
[    6.661325@0] [drm] am_hdmi_encoder_enable                                   
[    6.661329@0] hdmitx: hdmitx_set_current_vmode[3455]                         
[    6.661331@0] hdmitx: system: recalc before 1080p60hz 60 1                   
[    6.661333@0] hdmitx: system: recalc after 1080p60hz 2997 50                 
[    6.661337@0] hdmitx: system: get current mode: 1080p60hz                    
[    6.661339@0] hdmitx: system: update rx hdr info 0                           
[    6.661340@0] hdmitx: system: update physcial size: 16 9                     
[    6.661368@0] hdmitx: video: already init VIC = 0  Now VIC = 16              
[    6.661369@0] hdmitx: video: rx edid only support RGB format                 
[    6.661371@0] hdmitx: hw: div40: 0                                           
[    6.688744@0] hdmitx: ddc w1b error 0x54 0x20 0x00                           
[    6.688749@0] hdmitx: frac_rate = 1                                          
[    6.688753@0] hdmitx: config HPLL = 5940000 frac_rate = 1                    
[    6.688807@0] hdmitx: HPLLv1: 0xdb3a04f7                                     
[    6.688808@0] hdmitx: config HPLL done                                       
[    6.688813@0] hdmitx: set_hpll_od3_clk_div[604] div = 6                      
[    6.688817@0] hdmitx: j = 4  vid_clk_div = 1                                 
[    6.688821@0] hdmitx: set enc for VIC: 16                                    
[    6.691833@0] hdmitx: hw:  config hdmitx IP vic = 16 cd:4 cs: 0              
[    6.822742@0] hdmitx: video: Sink is HDMI device                             
[    6.822761@0] hdmitx: hw: set audio                                          
[    6.822765@0] hdmitx: hw: hdmitx tx_aud_src = 0                              
[    6.822776@0] hdmitx: fs = 0, cd = 4, tmds_clk = 148352                      
[    6.822777@0] hdmitx: hw: aud_n_para = 5824                                  
[    6.822784@0] hdmitx: hw: set channel status                                 
[    7.836484@2] Unable to handle kernel paging request at virtual address 007da
000                                                                             
[    7.836486@2] [00000000007da000] user address but active_mm is swapper       
[    7.836489@2] Internal error: Oops: 96000045 [#1] PREEMPT SMP                
[    7.836491@2] Modules linked in:                                             
[    7.836495@2] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.9.177+ #9          
[    7.836496@2] Hardware name: Hardkernel ODROID-N2 (DT)                       
[    7.836497@2] task: ffffffc0ca998000 task.stack: ffffffc0ca994000            
[    7.836505@2] PC is at bitfill_aligned+0xb0/0x170                            
[    7.836507@2] LR is at cfb_fillrect+0x124/0x2f8                              
[    7.836508@2] pc : [<ffffff8009573a10>] lr : [<ffffff800957378c>] pstate: 200
00045                                                                           
[    7.836509@2] sp : ffffffc0ca997520                                          
[    7.836511@2] x29: ffffffc0ca997520 x28: 0000000000000000                    
[    7.836513@2] x27: 0000000000000020 x26: 00000000007da000                    
[    7.836515@2] x25: ffffffc0cab2d000 x24: 0000000000000008                    
[    7.836516@2] x23: 0000000000000000 x22: 0000000000000040                    
[    7.836518@2] x21: 00000000000003c0 x20: 0000000000000000                    
[    7.836519@2] x19: 00000000007da000 x18: ffffffffffffffff                    
[    7.836521@2] x17: 000000000000000e x16: 0000000000000007                    
[    7.836522@2] x15: ffffff800a737e90 x14: 00000000fa83b2da                    
[    7.836524@2] x13: 0000000000000000 x12: 0000000000000000                    
[    7.836525@2] x11: 00000000efe4b99a x10: 0000000000000a20                    
[    7.836527@2] x9 : ffffffc0ca9973b0 x8 : 0000000000000000                    
[    7.836528@2] x7 : 0000000000000000 x6 : 0000000000000000                    
[    7.836529@2] x5 : 0000000000000040 x4 : 000000000000f000                    
[    7.836531@2] x3 : 0000000000000000 x2 : ffffffffffffffff                    
[    7.836532@2] x1 : 00000000007dbe00 x0 : ffffffffffffffff                    
[    7.836534@2]                                                                
[    7.836534@2] SP: 0xffffffc0ca9974a0:                                        
[    7.836540@2] 74a0  00000040 00000000 00000000 00000000 00000008 00000000 cab
2d000 ffffffc0                                                                  
[    7.836545@2] 74c0  007da000 00000000 00000020 00000000 00000000 00000000 ca9
97520 ffffffc0                                                                  
[    7.836550@2] 74e0  0957378c ffffff80 ca997520 ffffffc0 09573a10 ffffff80 200
00045 00000000                                                                  
[    7.836554@2] 7500  ca997540 ffffffc0 095d3c40 ffffff80 ffffffff ffffffff 802
0001f 00000001                                                                  
[    7.836558@2] 7520  ca997560 ffffffc0 0957378c ffffff80 00000000 00000000 000
00000 00000000                                                                  
[    7.836563@2] 7540  00000007 00000000 0000f000 00000000 09573960 ffffff80 095
73734 ffffff80                                                                  
[    7.836567@2] 7560  ca9975d0 ffffffc0 095d7c80 ffffff80 ca997630 ffffffc0 cab
2d000 ffffffc0                                                                  
[    7.836572@2] 7580  0a737000 ffffff80 00000008 00000000 00000430 00000000 000
00000 00000000                                                                  
[    7.836574@2]                                                                
[    7.836574@2] X9: 0xffffffc0ca997330:                                        
[    7.836579@2] 7330  007da000 00000000 ffffffff 0000007f ca997520 ffffffc0 095
73a10 ffffff80                                                                  
[    7.836583@2] 7350  20000045 00000000 cf419ff3 00000001 ca997390 ffffffc0 09c
c8eb8 ffffff80                                                                  
[    7.836587@2] 7370  ca997390 ffffffc0 090d9258 ffffff80 cf3467c0 ffffffc0 0a3
09c00 ffffff80                                                                  
[    7.836592@2] 7390  ca9973b0 ffffffc0 09127530 ffffff80 ca9973e0 ffffffc0 09c
c92f8 ffffff80                                                                  
[    7.836596@2] 73b0  00000040 00000000 09128d1c ffffff80 0a737000 ffffff80 ca9
974d0 ffffffc0                                                                  
[    7.836601@2] 73d0  ca997400 ffffffc0 09cc8eb8 ffffff80 ca997400 ffffffc0 000
409b1 00000000                                                                  
[    7.836605@2] 73f0  ffffffff ffffffff 007dbe00 00000000 ffffffff ffffffff 000
00000 00000000                                                                  
[    7.836609@2] 7410  0000f000 00000000 00000040 00000000 00000000 00000000 000
00000 00000000                                                                  
[    7.836613@2]                                                                
[    7.836613@2] X25: 0xffffffc0cab2cf80:                                       
[    7.836617@2] cf80  00000000 00000000 00000000 00000000 00000000 00000000 000
00000 00000000                                                                  
[    7.836621@2] cfa0  00000000 00000000 00000000 00000000 00000000 00000000 000
00000 00000000                                                                  
[    7.836626@2] cfc0  00000000 00000000 00000000 00000000 00000000 00000000 000
00000 00000000                                                                  
[    7.836630@2] cfe0  00000000 00000000 00000000 00000000 00000000 00000000 000
00000 00000000                                                                  
[    7.836634@2] d000  00000001 00000000 00000000 00000000 00000000 00000000 cab
2d018 ffffffc0                                                                  
[    7.836639@2] d020  cab2d018 ffffffc0 ca998000 ffffffc0 00000000 00000000 000
00001 00000000                                                                  
[    7.836643@2] d040  cab2d040 ffffffc0 cab2d040 ffffffc0 00000000 00000000 000
00000 00000000                                                                  
[    7.836647@2] d060  00000780 00000438 00000780 00000438 00000000 00000000 000
00020 00000000                                                                  
[    7.836649@2]                                                                
[    7.836649@2] X29: 0xffffffc0ca9974a0:                                       
[    7.836653@2] 74a0  00000040 00000000 00000000 00000000 00000008 00000000 cab
2d000 ffffffc0                                                                  
[    7.836658@2] 74c0  007da000 00000000 00000020 00000000 00000000 00000000 ca9
97520 ffffffc0                                                                  
[    7.836662@2] 74e0  0957378c ffffff80 ca997520 ffffffc0 09573a10 ffffff80 200
00045 00000000                                                                  
[    7.836666@2] 7500  ca997540 ffffffc0 095d3c40 ffffff80 ffffffff ffffffff 802
0001f 00000001                                                                  
[    7.836671@2] 7520  ca997560 ffffffc0 0957378c ffffff80 00000000 00000000 000
00000 00000000                                                                  
[    7.836675@2] 7540  00000007 00000000 0000f000 00000000 09573960 ffffff80 095
73734 ffffff80                                                                  
[    7.836680@2] 7560  ca9975d0 ffffffc0 095d7c80 ffffff80 ca997630 ffffffc0 cab
2d000 ffffffc0                                                                  
[    7.836684@2] 7580  0a737000 ffffff80 00000008 00000000 00000430 00000000 000
00000 00000000                                                                  
[    7.836685@2]                                                                
[    7.836686@2] Process swapper/0 (pid: 1, stack limit = 0xffffffc0ca994000)   
[    7.836688@2] Stack: (0xffffffc0ca997520 to 0xffffffc0ca998000)              
[    7.836690@2] 7520: ffffffc0ca997560 ffffff800957378c 0000000000000000 000000
0000000000                                                                      
[    7.836692@2] 7540: 0000000000000007 000000000000f000 ffffff8009573960 ffffff
8009573734                                                                      
[    7.836694@2] 7560: ffffffc0ca9975d0 ffffff80095d7c80 ffffffc0ca997630 ffffff
c0cab2d000                                                                      
[    7.836696@2] 7580: ffffff800a737000 0000000000000008 0000000000000430 000000
0000000000                                                                      
[    7.836698@2] 75a0: 0000000000000043 ffffffc0c9dafda0 0000000000000720 ffffff
c0ca2c5b80                                                                      
[    7.836699@2] 75c0: ffffffc0ca9975f0 ffffff8009cc6514 ffffffc0ca9975f0 ffffff
800956aa14                                                                      
[    7.836701@2] 75e0: ffffffc0cab2d000 0000000000000780 ffffffc0ca997650 ffffff
8009563cc4                                                                      
[    7.836703@2] 7600: ffffffc0ca88c000 0000000000000000 ffffff800a9c7000 000000
00000000f0                                                                      
[    7.836705@2] 7620: ffffffc0ca88c000 fffffffffffffe20 0000043000000000 000000
0800000780                                                                      
[    7.836706@2] 7640: 0000000000000000 00000000000409b1 ffffffc0ca997670 ffffff
8009565410                                                                      
[    7.836708@2] 7660: ffffffc0c9dafda0 0000000000000043 ffffffc0ca9976f0 ffffff
8009565830                                                                      
[    7.836710@2] 7680: ffffff800a9c8020 ffffff800a9c8000 ffffff800a9c7000 ffffff
800a7ce000                                                                      
[    7.836712@2] 76a0: ffffffc0ca203400 ffffffc0ca88c000 0000000000000000 ffffff
c0cab2d000                                                                      
[    7.836713@2] 76c0: 0000000000000000 ffffffc0ca88c000 ffffff800a9c8020 ffffff
800a9c8000                                                                      
[    7.836715@2] 76e0: ffffff800a9c7000 ffffff8000000000 ffffffc0ca997770 ffffff
80095acf8c                                                                      
[    7.836717@2] 7700: ffffffc0ca88c000 ffffff800a9cb400 0000000000000000 000000
0000000000                                                                      
[    7.836719@2] 7720: ffffffc0ca88c000 0000000000000001 0000000000000000 ffffff
8009d33fb8                                                                      
[    7.836720@2] 7740: ffffff800a9ca000 ffffff800a049d88 ffffffc0ca997770 000000
f000000043                                                                      
[    7.836722@2] 7760: ffffffc0000000f0 0000000100000043 ffffffc0ca9977a0 ffffff
80095aebbc                                                                      
[    7.836724@2] 7780: 0000000000000000 0000000000000000 0000000000000000 000000
000000003e                                                                      
[    7.836725@2] 77a0: ffffffc0ca997820 ffffff80095af0f8 ffffff800a9cb430 000000
0000000000                                                                      
[    7.836727@2] 77c0: 0000000000000000 000000000000003e 0000000000000001 ffffff
8009d33fb8                                                                      
[    7.836729@2] 77e0: ffffff800a9cb430 ffffffc0cab2d010 ffffffc0cab2d298 ffffff
800a9ca030                                                                      
[    7.836731@2] 7800: 0000000000000001 ffffff800a9caa10 ffffff800a9ca800 000000
000a9cb408                                                                      
[    7.836732@2] 7820: ffffffc0ca997870 ffffff8009565aac ffffff800a9c7000 ffffff
800a7ce000                                                                      
[    7.836734@2] 7840: ffffff800a7ce548 ffffffc0cab2d000 ffffff800a7ce548 ffffff
800a7ce000                                                                      
[    7.836736@2] 7860: ffffff800a73aea8 ffffff8009d086b0 ffffffc0ca9978a0 ffffff
8009569638                                                                      
[    7.836738@2] 7880: ffffff800a9c7f48 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836739@2] 78a0: ffffffc0ca997910 ffffff80090cf364 00000000fffffffe 000000
0000000000                                                                      
[    7.836741@2] 78c0: 0000000000000000 ffffffc0ca997a08 0000000000000005 ffffff
80090d9bd0                                                                      
[    7.836743@2] 78e0: ffffff800a00de78 0000000000000015 0000000000000000 ffffff
800921fb98                                                                      
[    7.836745@2] 7900: ffffffc0ca997930 ffffff8009cc6a7c ffffffc0ca997950 ffffff
80090cfe04                                                                      
[    7.836746@2] 7920: ffffff800a7ce798 0000000000000005 ffffffc0ca997a08 000000
0000000000                                                                      
[    7.836748@2] 7940: ffffff800a9ca028 ffffff800910794c ffffffc0ca997980 ffffff
800956ca98                                                                      
[    7.836750@2] 7960: 0000000000000005 ffffffc0ca997a08 ffffff800a737000 000000
0000000000                                                                      
[    7.836751@2] 7980: ffffffc0ca9979a0 ffffff800956f440 ffffffc0cab2d000 000000
0000000000                                                                      
[    7.836753@2] 79a0: ffffffc0ca997a60 ffffff80095d9aa8 ffffffc0ca121818 ffffff
800a737000                                                                      
[    7.836755@2] 79c0: ffffff800a7d7000 ffffffc0cab2d000 ffffff8009dda5b8 000000
0000002000                                                                      
[    7.836757@2] 79e0: 0000000000002000 0000000000000020 ffffffc03d20aa38 ffffff
800a303c88                                                                      
[    7.836759@2] 7a00: 0000000000000000 ffffffc0cab2d000 00001e0000000000 000000
0000000000                                                                      
[    7.836760@2] 7a20: 0000078000000000 0000000000000438 0000000000000000 000000
0000000000                                                                      
[    7.836762@2] 7a40: 0000000000000000 0000000000000000 0000000000000020 000000
00000409b1                                                                      
[    7.836764@2] 7a60: ffffffc0ca997ae0 ffffff8009a78e24 ffffffc03d20a800 ffffff
c0ca121818                                                                      
[    7.836765@2] 7a80: 0000000000000000 ffffffc0ca237418 ffffff8009dda5b8 ffffff
800a2304b4                                                                      
[    7.836767@2] 7aa0: ffffffc0ca39ce98 ffffff800a29f3c8 ffffffc0ca39c700 ffffff
c0ca121818                                                                      
[    7.836769@2] 7ac0: 0000043800000780 0000043800000780 0000001800000020 000000
00000409b1                                                                      
[    7.836771@2] 7ae0: ffffffc0ca997b10 ffffff8009a776f8 ffffffc03d20a800 ffffff
c0ca30fc10                                                                      
[    7.836772@2] 7b00: 0000000000000000 0000000000000001 ffffffc0ca997b40 ffffff
8009642070                                                                      
[    7.836774@2] 7b20: ffffffc0ca39c700 ffffff800a7d87c8 ffffffc0ca39c080 ffffff
800a7d8000                                                                      
[    7.836776@2] 7b40: ffffffc0ca997ba0 ffffff8009642174 ffffffc0ca39c080 ffffff
800a7d87c8                                                                      
[    7.836778@2] 7b60: ffffffc0ca39c700 ffffff800a7d8000 ffffff8009dda5b8 ffffff
800a2304b4                                                                      
[    7.836779@2] 7b80: ffffff800a8fe000 ffffff800a29f3c8 0000000000000007 ffffff
800a303c88                                                                      
[    7.836781@2] 7ba0: ffffffc0ca997be0 ffffff8009a7a570 ffffffc0ca30f400 ffffff
c0ca30f410                                                                      
[    7.836783@2] 7bc0: ffffff800a8945d0 ffffff800a8945f8 0000000000000000 000000
00000409b1                                                                      
[    7.836785@2] 7be0: ffffffc0ca997c00 ffffff800964ab50 00000000fffffffe 000000
00000409b1                                                                      
[    7.836787@2] 7c00: ffffffc0ca997c30 ffffff80096487c4 ffffffc0ca30f410 ffffff
800a9cc000                                                                      
[    7.836788@2] 7c20: 0000000000000000 ffffff800a8945f8 ffffffc0ca997c70 ffffff
80096489e8                                                                      
[    7.836790@2] 7c40: ffffffc0ca30f410 ffffff800a8945f8 ffffffc0ca30f470 ffffff
800a737000                                                                      
[    7.836792@2] 7c60: 0000000000000000 ffffff8009646334 ffffffc0ca997ca0 ffffff
8009646328                                                                      
[    7.836793@2] 7c80: 0000000000000000 ffffff800a8945f8 ffffff8009648920 ffffff
800a2304b4                                                                      
[    7.836795@2] 7ca0: ffffffc0ca997d00 ffffff8009647fa8 ffffff800a8945f8 ffffff
c03d190d80                                                                      
[    7.836797@2] 7cc0: ffffff800a7d8da0 0000000000000000 ffffff800a7d8000 ffffff
c0ca997d20                                                                      
[    7.836799@2] 7ce0: ffffffc0ca997d00 ffffffc0cab1caa8 ffffffc0ca2f9728 000000
00000409b1                                                                      
[    7.836800@2] 7d00: ffffffc0ca997d20 ffffff8009647ae4 ffffff800a8945f8 ffffff
c03d190d80                                                                      
[    7.836802@2] 7d20: ffffffc0ca997d60 ffffff800964955c ffffff800a8945f8 000000
0000000000                                                                      
[    7.836804@2] 7d40: 0000000000000000 ffffffc0ca998000 ffffff800a21ebe8 000000
0000000000                                                                      
[    7.836806@2] 7d60: ffffffc0ca997d80 ffffff800964aa8c ffffff800a8945d0 000000
0000000000                                                                      
[    7.836807@2] 7d80: ffffffc0ca997da0 ffffff800a282edc ffffff800a737000 ffffff
800a282ec4                                                                      
[    7.836809@2] 7da0: ffffffc0ca997db0 ffffff8009083c08 ffffffc0ca997e40 ffffff
800a230db8                                                                      
[    7.836811@2] 7dc0: 00000000000003a6 ffffff800a8fe000 0000000000000006 ffffff
800a29f3d8                                                                      
[    7.836813@2] 7de0: ffffff800a21ebe8 ffffff800a2304b4 ffffff800a8fe000 ffffff
800a29f300                                                                      
[    7.836814@2] 7e00: 0000000000000007 ffffff800a302f68 ffffff800a750d68 000000
0000000000                                                                      
[    7.836816@2] 7e20: 0000000600000006 ffffff800a00a060 0000000000000000 000000
00000409b1                                                                      
[    7.836818@2] 7e40: ffffffc0ca997ea0 ffffff8009cc26d8 ffffff8009cc26c0 000000
0000000000                                                                      
[    7.836819@2] 7e60: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836821@2] 7e80: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836823@2] 7ea0: 0000000000000000 ffffff8009083950 ffffff8009cc26c0 000000
0000000000                                                                      
[    7.836824@2] 7ec0: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836826@2] 7ee0: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836827@2] 7f00: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836829@2] 7f20: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836830@2] 7f40: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836832@2] 7f60: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836833@2] 7f80: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836835@2] 7fa0: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836836@2] 7fc0: 0000000000000000 0000000000000005 0000000000000000 000000
0000000000                                                                      
[    7.836838@2] 7fe0: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836839@2] Call trace:                                                    
[    7.836841@2] Exception stack(0xffffffc0ca997330 to 0xffffffc0ca997460)      
[    7.836842@2] 7320:                                   00000000007da000 000000
7fffffffff                                                                      
[    7.836844@2] 7340: ffffffc0ca997520 ffffff8009573a10 0000000020000045 000000
01cf419ff3                                                                      
[    7.836846@2] 7360: ffffffc0ca997390 ffffff8009cc8eb8 ffffffc0ca997390 ffffff
80090d9258                                                                      
[    7.836848@2] 7380: ffffffc0cf3467c0 ffffff800a309c00 ffffffc0ca9973b0 ffffff
8009127530                                                                      
[    7.836850@2] 73a0: ffffffc0ca9973e0 ffffff8009cc92f8 0000000000000040 ffffff
8009128d1c                                                                      
[    7.836851@2] 73c0: ffffff800a737000 ffffffc0ca9974d0 ffffffc0ca997400 ffffff
8009cc8eb8                                                                      
[    7.836853@2] 73e0: ffffffc0ca997400 00000000000409b1 ffffffffffffffff 000000
00007dbe00                                                                      
[    7.836855@2] 7400: ffffffffffffffff 0000000000000000 000000000000f000 000000
0000000040                                                                      
[    7.836856@2] 7420: 0000000000000000 0000000000000000 0000000000000000 ffffff
c0ca9973b0                                                                      
[    7.836858@2] 7440: 0000000000000a20 00000000efe4b99a 0000000000000000 000000
0000000000                                                                      
[    7.836861@2] [<ffffff8009573a10>] bitfill_aligned+0xb0/0x170                
[    7.836864@2] [<ffffff800957378c>] cfb_fillrect+0x124/0x2f8                  
[    7.836867@2] [<ffffff80095d7c80>] drm_fb_helper_cfb_fillrect+0x28/0x48      
[    7.836869@2] [<ffffff800956aa14>] bit_clear_margins+0xbc/0xe8               
[    7.836871@2] [<ffffff8009563cc4>] fbcon_clear_margins+0x7c/0xa0             
[    7.836873@2] [<ffffff8009565410>] fbcon_prepare_logo+0x3a0/0x458            
[    7.836874@2] [<ffffff8009565830>] fbcon_init+0x368/0x568                    
[    7.836876@2] [<ffffff80095acf8c>] visual_init+0xbc/0x110                    
[    7.836878@2] [<ffffff80095aebbc>] do_bind_con_driver+0x1c4/0x3c8            
[    7.836879@2] [<ffffff80095af0f8>] do_take_over_console+0xa8/0x208           
[    7.836881@2] [<ffffff8009565aac>] do_fbcon_takeover+0x7c/0xf8               
[    7.836882@2] [<ffffff8009569638>] fbcon_event_notify+0x978/0x9e0            
[    7.836886@2] [<ffffff80090cf364>] notifier_call_chain+0x5c/0xa0             
[    7.836888@2] [<ffffff80090cfe04>] blocking_notifier_call_chain+0x64/0x88    
[    7.836890@2] [<ffffff800956ca98>] fb_notifier_call_chain+0x30/0x40          
[    7.836892@2] [<ffffff800956f440>] register_framebuffer+0x230/0x338          
[    7.836894@2] [<ffffff80095d9aa8>] drm_fb_helper_initial_config+0x2a8/0x478  
[    7.836897@2] [<ffffff8009a78e24>] am_meson_drm_fbdev_init+0x9c/0x148        
[    7.836899@2] [<ffffff8009a776f8>] am_meson_drm_bind+0x138/0x190             
[    7.836902@2] [<ffffff8009642070>] try_to_bring_up_master+0x180/0x1e0        
[    7.836904@2] [<ffffff8009642174>] component_add+0xa4/0x170                  
[    7.836906@2] [<ffffff8009a7a570>] am_meson_hdmi_probe+0x28/0x38             
[    7.836909@2] [<ffffff800964ab50>] platform_drv_probe+0x60/0xc0              
[    7.836912@2] [<ffffff80096487c4>] driver_probe_device+0x154/0x2b0           
[    7.836913@2] [<ffffff80096489e8>] __driver_attach+0xc8/0xd0                 
[    7.836915@2] [<ffffff8009646328>] bus_for_each_dev+0x78/0xd8                
[    7.836917@2] [<ffffff8009647fa8>] driver_attach+0x30/0x40                   
[    7.836919@2] [<ffffff8009647ae4>] bus_add_driver+0x1c4/0x230                
[    7.836921@2] [<ffffff800964955c>] driver_register+0x6c/0x110                
[    7.836923@2] [<ffffff800964aa8c>] __platform_driver_register+0x54/0x60      
[    7.836927@2] [<ffffff800a282edc>] am_meson_hdmi_pltfm_driver_init+0x18/0x20 
[    7.836930@2] [<ffffff8009083c08>] do_one_initcall+0x58/0x168                
[    7.836934@2] [<ffffff800a230db8>] kernel_init_freeable+0x1a4/0x248          
[    7.836937@2] [<ffffff8009cc26d8>] kernel_init+0x18/0x108                    
[    7.836939@2] [<ffffff8009083950>] ret_from_fork+0x10/0x40                   
[    7.836941@2] Code: 53037c21 91000421 8b011a61 d503201f (f9000274)           
[    7.836946@2] ---[ end trace dde193d9a7b24d0b ]---                           
[    7.841224@2] Kernel panic - not syncing: Attempted to kill init! exitcode=0x
0000000b                                                                        
[    7.841224@2]                                                                
[    7.841407@2] SMP: stopping secondary CPUs                                   
[    7.841414@2] Kernel Offset: disabled                                        
[    7.841415@2] Memory Limit: none                                             
[    9.447799@2] Rebooting in 5 seconds..                                       


User avatar
tobetter
Posts: 3903
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 38 times
Been thanked: 154 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by tobetter » Fri Jun 07, 2019 7:46 pm

@crashoverride, I think I had the same issue at the very early stage to merge the DRM patches, I know it's not correct but just disabled the CONFIG_FRAMEBUFFER_CONSOLE. :lol:

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Fri Jun 07, 2019 8:56 pm

Thank you for your help.
it seems to me that the drm kernel is too problematic, probably I have to wait for a while

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Sat Jun 08, 2019 12:26 am

crashoverride wrote:
Fri Jun 07, 2019 7:22 pm
tobetter wrote:
Fri Jun 07, 2019 6:55 pm
Your fix is like this?
Yes, that fixes the compile issue. I also had to set the fb->depth and fb->bits_per_pixel. However, when the FB gets used, it generates a virtual memory fault and the kernel just reboots in a cycle.

[edit]

Code: Select all

[    6.650955@0] am_meson_drm_fbdev_create: surface_bpp=32, surface_width=1920, 
surface_height=1080, surface_depth=24                                           
[    6.658596@0] FB [1920x1080]-24 offset=0 size=8294400                        
[    6.661138@0] [drm] content_protection:0                                     
[    6.661152@0] [drm] mode : 1920x1080, adjusted_mode : 1920x1080              
[    6.661155@0] [drm] the hdmi mode vic : 16                                   
[    6.661237@0] [drm] am_meson_crtc_enable                                     
[    6.661238@0] [drm] am_meson_crtc_enable: 1920x1080                          
[    6.661325@0] [drm] am_hdmi_encoder_enable                                   
[    6.661329@0] hdmitx: hdmitx_set_current_vmode[3455]                         
[    6.661331@0] hdmitx: system: recalc before 1080p60hz 60 1                   
[    6.661333@0] hdmitx: system: recalc after 1080p60hz 2997 50                 
[    6.661337@0] hdmitx: system: get current mode: 1080p60hz                    
[    6.661339@0] hdmitx: system: update rx hdr info 0                           
[    6.661340@0] hdmitx: system: update physcial size: 16 9                     
[    6.661368@0] hdmitx: video: already init VIC = 0  Now VIC = 16              
[    6.661369@0] hdmitx: video: rx edid only support RGB format                 
[    6.661371@0] hdmitx: hw: div40: 0                                           
[    6.688744@0] hdmitx: ddc w1b error 0x54 0x20 0x00                           
[    6.688749@0] hdmitx: frac_rate = 1                                          
[    6.688753@0] hdmitx: config HPLL = 5940000 frac_rate = 1                    
[    6.688807@0] hdmitx: HPLLv1: 0xdb3a04f7                                     
[    6.688808@0] hdmitx: config HPLL done                                       
[    6.688813@0] hdmitx: set_hpll_od3_clk_div[604] div = 6                      
[    6.688817@0] hdmitx: j = 4  vid_clk_div = 1                                 
[    6.688821@0] hdmitx: set enc for VIC: 16                                    
[    6.691833@0] hdmitx: hw:  config hdmitx IP vic = 16 cd:4 cs: 0              
[    6.822742@0] hdmitx: video: Sink is HDMI device                             
[    6.822761@0] hdmitx: hw: set audio                                          
[    6.822765@0] hdmitx: hw: hdmitx tx_aud_src = 0                              
[    6.822776@0] hdmitx: fs = 0, cd = 4, tmds_clk = 148352                      
[    6.822777@0] hdmitx: hw: aud_n_para = 5824                                  
[    6.822784@0] hdmitx: hw: set channel status                                 
[    7.836484@2] Unable to handle kernel paging request at virtual address 007da
000                                                                             
[    7.836486@2] [00000000007da000] user address but active_mm is swapper       
[    7.836489@2] Internal error: Oops: 96000045 [#1] PREEMPT SMP                
[    7.836491@2] Modules linked in:                                             
[    7.836495@2] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.9.177+ #9          
[    7.836496@2] Hardware name: Hardkernel ODROID-N2 (DT)                       
[    7.836497@2] task: ffffffc0ca998000 task.stack: ffffffc0ca994000            
[    7.836505@2] PC is at bitfill_aligned+0xb0/0x170                            
[    7.836507@2] LR is at cfb_fillrect+0x124/0x2f8                              
[    7.836508@2] pc : [<ffffff8009573a10>] lr : [<ffffff800957378c>] pstate: 200
00045                                                                           
[    7.836509@2] sp : ffffffc0ca997520                                          
[    7.836511@2] x29: ffffffc0ca997520 x28: 0000000000000000                    
[    7.836513@2] x27: 0000000000000020 x26: 00000000007da000                    
[    7.836515@2] x25: ffffffc0cab2d000 x24: 0000000000000008                    
[    7.836516@2] x23: 0000000000000000 x22: 0000000000000040                    
[    7.836518@2] x21: 00000000000003c0 x20: 0000000000000000                    
[    7.836519@2] x19: 00000000007da000 x18: ffffffffffffffff                    
[    7.836521@2] x17: 000000000000000e x16: 0000000000000007                    
[    7.836522@2] x15: ffffff800a737e90 x14: 00000000fa83b2da                    
[    7.836524@2] x13: 0000000000000000 x12: 0000000000000000                    
[    7.836525@2] x11: 00000000efe4b99a x10: 0000000000000a20                    
[    7.836527@2] x9 : ffffffc0ca9973b0 x8 : 0000000000000000                    
[    7.836528@2] x7 : 0000000000000000 x6 : 0000000000000000                    
[    7.836529@2] x5 : 0000000000000040 x4 : 000000000000f000                    
[    7.836531@2] x3 : 0000000000000000 x2 : ffffffffffffffff                    
[    7.836532@2] x1 : 00000000007dbe00 x0 : ffffffffffffffff                    
[    7.836534@2]                                                                
[    7.836534@2] SP: 0xffffffc0ca9974a0:                                        
[    7.836540@2] 74a0  00000040 00000000 00000000 00000000 00000008 00000000 cab
2d000 ffffffc0                                                                  
[    7.836545@2] 74c0  007da000 00000000 00000020 00000000 00000000 00000000 ca9
97520 ffffffc0                                                                  
[    7.836550@2] 74e0  0957378c ffffff80 ca997520 ffffffc0 09573a10 ffffff80 200
00045 00000000                                                                  
[    7.836554@2] 7500  ca997540 ffffffc0 095d3c40 ffffff80 ffffffff ffffffff 802
0001f 00000001                                                                  
[    7.836558@2] 7520  ca997560 ffffffc0 0957378c ffffff80 00000000 00000000 000
00000 00000000                                                                  
[    7.836563@2] 7540  00000007 00000000 0000f000 00000000 09573960 ffffff80 095
73734 ffffff80                                                                  
[    7.836567@2] 7560  ca9975d0 ffffffc0 095d7c80 ffffff80 ca997630 ffffffc0 cab
2d000 ffffffc0                                                                  
[    7.836572@2] 7580  0a737000 ffffff80 00000008 00000000 00000430 00000000 000
00000 00000000                                                                  
[    7.836574@2]                                                                
[    7.836574@2] X9: 0xffffffc0ca997330:                                        
[    7.836579@2] 7330  007da000 00000000 ffffffff 0000007f ca997520 ffffffc0 095
73a10 ffffff80                                                                  
[    7.836583@2] 7350  20000045 00000000 cf419ff3 00000001 ca997390 ffffffc0 09c
c8eb8 ffffff80                                                                  
[    7.836587@2] 7370  ca997390 ffffffc0 090d9258 ffffff80 cf3467c0 ffffffc0 0a3
09c00 ffffff80                                                                  
[    7.836592@2] 7390  ca9973b0 ffffffc0 09127530 ffffff80 ca9973e0 ffffffc0 09c
c92f8 ffffff80                                                                  
[    7.836596@2] 73b0  00000040 00000000 09128d1c ffffff80 0a737000 ffffff80 ca9
974d0 ffffffc0                                                                  
[    7.836601@2] 73d0  ca997400 ffffffc0 09cc8eb8 ffffff80 ca997400 ffffffc0 000
409b1 00000000                                                                  
[    7.836605@2] 73f0  ffffffff ffffffff 007dbe00 00000000 ffffffff ffffffff 000
00000 00000000                                                                  
[    7.836609@2] 7410  0000f000 00000000 00000040 00000000 00000000 00000000 000
00000 00000000                                                                  
[    7.836613@2]                                                                
[    7.836613@2] X25: 0xffffffc0cab2cf80:                                       
[    7.836617@2] cf80  00000000 00000000 00000000 00000000 00000000 00000000 000
00000 00000000                                                                  
[    7.836621@2] cfa0  00000000 00000000 00000000 00000000 00000000 00000000 000
00000 00000000                                                                  
[    7.836626@2] cfc0  00000000 00000000 00000000 00000000 00000000 00000000 000
00000 00000000                                                                  
[    7.836630@2] cfe0  00000000 00000000 00000000 00000000 00000000 00000000 000
00000 00000000                                                                  
[    7.836634@2] d000  00000001 00000000 00000000 00000000 00000000 00000000 cab
2d018 ffffffc0                                                                  
[    7.836639@2] d020  cab2d018 ffffffc0 ca998000 ffffffc0 00000000 00000000 000
00001 00000000                                                                  
[    7.836643@2] d040  cab2d040 ffffffc0 cab2d040 ffffffc0 00000000 00000000 000
00000 00000000                                                                  
[    7.836647@2] d060  00000780 00000438 00000780 00000438 00000000 00000000 000
00020 00000000                                                                  
[    7.836649@2]                                                                
[    7.836649@2] X29: 0xffffffc0ca9974a0:                                       
[    7.836653@2] 74a0  00000040 00000000 00000000 00000000 00000008 00000000 cab
2d000 ffffffc0                                                                  
[    7.836658@2] 74c0  007da000 00000000 00000020 00000000 00000000 00000000 ca9
97520 ffffffc0                                                                  
[    7.836662@2] 74e0  0957378c ffffff80 ca997520 ffffffc0 09573a10 ffffff80 200
00045 00000000                                                                  
[    7.836666@2] 7500  ca997540 ffffffc0 095d3c40 ffffff80 ffffffff ffffffff 802
0001f 00000001                                                                  
[    7.836671@2] 7520  ca997560 ffffffc0 0957378c ffffff80 00000000 00000000 000
00000 00000000                                                                  
[    7.836675@2] 7540  00000007 00000000 0000f000 00000000 09573960 ffffff80 095
73734 ffffff80                                                                  
[    7.836680@2] 7560  ca9975d0 ffffffc0 095d7c80 ffffff80 ca997630 ffffffc0 cab
2d000 ffffffc0                                                                  
[    7.836684@2] 7580  0a737000 ffffff80 00000008 00000000 00000430 00000000 000
00000 00000000                                                                  
[    7.836685@2]                                                                
[    7.836686@2] Process swapper/0 (pid: 1, stack limit = 0xffffffc0ca994000)   
[    7.836688@2] Stack: (0xffffffc0ca997520 to 0xffffffc0ca998000)              
[    7.836690@2] 7520: ffffffc0ca997560 ffffff800957378c 0000000000000000 000000
0000000000                                                                      
[    7.836692@2] 7540: 0000000000000007 000000000000f000 ffffff8009573960 ffffff
8009573734                                                                      
[    7.836694@2] 7560: ffffffc0ca9975d0 ffffff80095d7c80 ffffffc0ca997630 ffffff
c0cab2d000                                                                      
[    7.836696@2] 7580: ffffff800a737000 0000000000000008 0000000000000430 000000
0000000000                                                                      
[    7.836698@2] 75a0: 0000000000000043 ffffffc0c9dafda0 0000000000000720 ffffff
c0ca2c5b80                                                                      
[    7.836699@2] 75c0: ffffffc0ca9975f0 ffffff8009cc6514 ffffffc0ca9975f0 ffffff
800956aa14                                                                      
[    7.836701@2] 75e0: ffffffc0cab2d000 0000000000000780 ffffffc0ca997650 ffffff
8009563cc4                                                                      
[    7.836703@2] 7600: ffffffc0ca88c000 0000000000000000 ffffff800a9c7000 000000
00000000f0                                                                      
[    7.836705@2] 7620: ffffffc0ca88c000 fffffffffffffe20 0000043000000000 000000
0800000780                                                                      
[    7.836706@2] 7640: 0000000000000000 00000000000409b1 ffffffc0ca997670 ffffff
8009565410                                                                      
[    7.836708@2] 7660: ffffffc0c9dafda0 0000000000000043 ffffffc0ca9976f0 ffffff
8009565830                                                                      
[    7.836710@2] 7680: ffffff800a9c8020 ffffff800a9c8000 ffffff800a9c7000 ffffff
800a7ce000                                                                      
[    7.836712@2] 76a0: ffffffc0ca203400 ffffffc0ca88c000 0000000000000000 ffffff
c0cab2d000                                                                      
[    7.836713@2] 76c0: 0000000000000000 ffffffc0ca88c000 ffffff800a9c8020 ffffff
800a9c8000                                                                      
[    7.836715@2] 76e0: ffffff800a9c7000 ffffff8000000000 ffffffc0ca997770 ffffff
80095acf8c                                                                      
[    7.836717@2] 7700: ffffffc0ca88c000 ffffff800a9cb400 0000000000000000 000000
0000000000                                                                      
[    7.836719@2] 7720: ffffffc0ca88c000 0000000000000001 0000000000000000 ffffff
8009d33fb8                                                                      
[    7.836720@2] 7740: ffffff800a9ca000 ffffff800a049d88 ffffffc0ca997770 000000
f000000043                                                                      
[    7.836722@2] 7760: ffffffc0000000f0 0000000100000043 ffffffc0ca9977a0 ffffff
80095aebbc                                                                      
[    7.836724@2] 7780: 0000000000000000 0000000000000000 0000000000000000 000000
000000003e                                                                      
[    7.836725@2] 77a0: ffffffc0ca997820 ffffff80095af0f8 ffffff800a9cb430 000000
0000000000                                                                      
[    7.836727@2] 77c0: 0000000000000000 000000000000003e 0000000000000001 ffffff
8009d33fb8                                                                      
[    7.836729@2] 77e0: ffffff800a9cb430 ffffffc0cab2d010 ffffffc0cab2d298 ffffff
800a9ca030                                                                      
[    7.836731@2] 7800: 0000000000000001 ffffff800a9caa10 ffffff800a9ca800 000000
000a9cb408                                                                      
[    7.836732@2] 7820: ffffffc0ca997870 ffffff8009565aac ffffff800a9c7000 ffffff
800a7ce000                                                                      
[    7.836734@2] 7840: ffffff800a7ce548 ffffffc0cab2d000 ffffff800a7ce548 ffffff
800a7ce000                                                                      
[    7.836736@2] 7860: ffffff800a73aea8 ffffff8009d086b0 ffffffc0ca9978a0 ffffff
8009569638                                                                      
[    7.836738@2] 7880: ffffff800a9c7f48 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836739@2] 78a0: ffffffc0ca997910 ffffff80090cf364 00000000fffffffe 000000
0000000000                                                                      
[    7.836741@2] 78c0: 0000000000000000 ffffffc0ca997a08 0000000000000005 ffffff
80090d9bd0                                                                      
[    7.836743@2] 78e0: ffffff800a00de78 0000000000000015 0000000000000000 ffffff
800921fb98                                                                      
[    7.836745@2] 7900: ffffffc0ca997930 ffffff8009cc6a7c ffffffc0ca997950 ffffff
80090cfe04                                                                      
[    7.836746@2] 7920: ffffff800a7ce798 0000000000000005 ffffffc0ca997a08 000000
0000000000                                                                      
[    7.836748@2] 7940: ffffff800a9ca028 ffffff800910794c ffffffc0ca997980 ffffff
800956ca98                                                                      
[    7.836750@2] 7960: 0000000000000005 ffffffc0ca997a08 ffffff800a737000 000000
0000000000                                                                      
[    7.836751@2] 7980: ffffffc0ca9979a0 ffffff800956f440 ffffffc0cab2d000 000000
0000000000                                                                      
[    7.836753@2] 79a0: ffffffc0ca997a60 ffffff80095d9aa8 ffffffc0ca121818 ffffff
800a737000                                                                      
[    7.836755@2] 79c0: ffffff800a7d7000 ffffffc0cab2d000 ffffff8009dda5b8 000000
0000002000                                                                      
[    7.836757@2] 79e0: 0000000000002000 0000000000000020 ffffffc03d20aa38 ffffff
800a303c88                                                                      
[    7.836759@2] 7a00: 0000000000000000 ffffffc0cab2d000 00001e0000000000 000000
0000000000                                                                      
[    7.836760@2] 7a20: 0000078000000000 0000000000000438 0000000000000000 000000
0000000000                                                                      
[    7.836762@2] 7a40: 0000000000000000 0000000000000000 0000000000000020 000000
00000409b1                                                                      
[    7.836764@2] 7a60: ffffffc0ca997ae0 ffffff8009a78e24 ffffffc03d20a800 ffffff
c0ca121818                                                                      
[    7.836765@2] 7a80: 0000000000000000 ffffffc0ca237418 ffffff8009dda5b8 ffffff
800a2304b4                                                                      
[    7.836767@2] 7aa0: ffffffc0ca39ce98 ffffff800a29f3c8 ffffffc0ca39c700 ffffff
c0ca121818                                                                      
[    7.836769@2] 7ac0: 0000043800000780 0000043800000780 0000001800000020 000000
00000409b1                                                                      
[    7.836771@2] 7ae0: ffffffc0ca997b10 ffffff8009a776f8 ffffffc03d20a800 ffffff
c0ca30fc10                                                                      
[    7.836772@2] 7b00: 0000000000000000 0000000000000001 ffffffc0ca997b40 ffffff
8009642070                                                                      
[    7.836774@2] 7b20: ffffffc0ca39c700 ffffff800a7d87c8 ffffffc0ca39c080 ffffff
800a7d8000                                                                      
[    7.836776@2] 7b40: ffffffc0ca997ba0 ffffff8009642174 ffffffc0ca39c080 ffffff
800a7d87c8                                                                      
[    7.836778@2] 7b60: ffffffc0ca39c700 ffffff800a7d8000 ffffff8009dda5b8 ffffff
800a2304b4                                                                      
[    7.836779@2] 7b80: ffffff800a8fe000 ffffff800a29f3c8 0000000000000007 ffffff
800a303c88                                                                      
[    7.836781@2] 7ba0: ffffffc0ca997be0 ffffff8009a7a570 ffffffc0ca30f400 ffffff
c0ca30f410                                                                      
[    7.836783@2] 7bc0: ffffff800a8945d0 ffffff800a8945f8 0000000000000000 000000
00000409b1                                                                      
[    7.836785@2] 7be0: ffffffc0ca997c00 ffffff800964ab50 00000000fffffffe 000000
00000409b1                                                                      
[    7.836787@2] 7c00: ffffffc0ca997c30 ffffff80096487c4 ffffffc0ca30f410 ffffff
800a9cc000                                                                      
[    7.836788@2] 7c20: 0000000000000000 ffffff800a8945f8 ffffffc0ca997c70 ffffff
80096489e8                                                                      
[    7.836790@2] 7c40: ffffffc0ca30f410 ffffff800a8945f8 ffffffc0ca30f470 ffffff
800a737000                                                                      
[    7.836792@2] 7c60: 0000000000000000 ffffff8009646334 ffffffc0ca997ca0 ffffff
8009646328                                                                      
[    7.836793@2] 7c80: 0000000000000000 ffffff800a8945f8 ffffff8009648920 ffffff
800a2304b4                                                                      
[    7.836795@2] 7ca0: ffffffc0ca997d00 ffffff8009647fa8 ffffff800a8945f8 ffffff
c03d190d80                                                                      
[    7.836797@2] 7cc0: ffffff800a7d8da0 0000000000000000 ffffff800a7d8000 ffffff
c0ca997d20                                                                      
[    7.836799@2] 7ce0: ffffffc0ca997d00 ffffffc0cab1caa8 ffffffc0ca2f9728 000000
00000409b1                                                                      
[    7.836800@2] 7d00: ffffffc0ca997d20 ffffff8009647ae4 ffffff800a8945f8 ffffff
c03d190d80                                                                      
[    7.836802@2] 7d20: ffffffc0ca997d60 ffffff800964955c ffffff800a8945f8 000000
0000000000                                                                      
[    7.836804@2] 7d40: 0000000000000000 ffffffc0ca998000 ffffff800a21ebe8 000000
0000000000                                                                      
[    7.836806@2] 7d60: ffffffc0ca997d80 ffffff800964aa8c ffffff800a8945d0 000000
0000000000                                                                      
[    7.836807@2] 7d80: ffffffc0ca997da0 ffffff800a282edc ffffff800a737000 ffffff
800a282ec4                                                                      
[    7.836809@2] 7da0: ffffffc0ca997db0 ffffff8009083c08 ffffffc0ca997e40 ffffff
800a230db8                                                                      
[    7.836811@2] 7dc0: 00000000000003a6 ffffff800a8fe000 0000000000000006 ffffff
800a29f3d8                                                                      
[    7.836813@2] 7de0: ffffff800a21ebe8 ffffff800a2304b4 ffffff800a8fe000 ffffff
800a29f300                                                                      
[    7.836814@2] 7e00: 0000000000000007 ffffff800a302f68 ffffff800a750d68 000000
0000000000                                                                      
[    7.836816@2] 7e20: 0000000600000006 ffffff800a00a060 0000000000000000 000000
00000409b1                                                                      
[    7.836818@2] 7e40: ffffffc0ca997ea0 ffffff8009cc26d8 ffffff8009cc26c0 000000
0000000000                                                                      
[    7.836819@2] 7e60: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836821@2] 7e80: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836823@2] 7ea0: 0000000000000000 ffffff8009083950 ffffff8009cc26c0 000000
0000000000                                                                      
[    7.836824@2] 7ec0: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836826@2] 7ee0: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836827@2] 7f00: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836829@2] 7f20: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836830@2] 7f40: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836832@2] 7f60: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836833@2] 7f80: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836835@2] 7fa0: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836836@2] 7fc0: 0000000000000000 0000000000000005 0000000000000000 000000
0000000000                                                                      
[    7.836838@2] 7fe0: 0000000000000000 0000000000000000 0000000000000000 000000
0000000000                                                                      
[    7.836839@2] Call trace:                                                    
[    7.836841@2] Exception stack(0xffffffc0ca997330 to 0xffffffc0ca997460)      
[    7.836842@2] 7320:                                   00000000007da000 000000
7fffffffff                                                                      
[    7.836844@2] 7340: ffffffc0ca997520 ffffff8009573a10 0000000020000045 000000
01cf419ff3                                                                      
[    7.836846@2] 7360: ffffffc0ca997390 ffffff8009cc8eb8 ffffffc0ca997390 ffffff
80090d9258                                                                      
[    7.836848@2] 7380: ffffffc0cf3467c0 ffffff800a309c00 ffffffc0ca9973b0 ffffff
8009127530                                                                      
[    7.836850@2] 73a0: ffffffc0ca9973e0 ffffff8009cc92f8 0000000000000040 ffffff
8009128d1c                                                                      
[    7.836851@2] 73c0: ffffff800a737000 ffffffc0ca9974d0 ffffffc0ca997400 ffffff
8009cc8eb8                                                                      
[    7.836853@2] 73e0: ffffffc0ca997400 00000000000409b1 ffffffffffffffff 000000
00007dbe00                                                                      
[    7.836855@2] 7400: ffffffffffffffff 0000000000000000 000000000000f000 000000
0000000040                                                                      
[    7.836856@2] 7420: 0000000000000000 0000000000000000 0000000000000000 ffffff
c0ca9973b0                                                                      
[    7.836858@2] 7440: 0000000000000a20 00000000efe4b99a 0000000000000000 000000
0000000000                                                                      
[    7.836861@2] [<ffffff8009573a10>] bitfill_aligned+0xb0/0x170                
[    7.836864@2] [<ffffff800957378c>] cfb_fillrect+0x124/0x2f8                  
[    7.836867@2] [<ffffff80095d7c80>] drm_fb_helper_cfb_fillrect+0x28/0x48      
[    7.836869@2] [<ffffff800956aa14>] bit_clear_margins+0xbc/0xe8               
[    7.836871@2] [<ffffff8009563cc4>] fbcon_clear_margins+0x7c/0xa0             
[    7.836873@2] [<ffffff8009565410>] fbcon_prepare_logo+0x3a0/0x458            
[    7.836874@2] [<ffffff8009565830>] fbcon_init+0x368/0x568                    
[    7.836876@2] [<ffffff80095acf8c>] visual_init+0xbc/0x110                    
[    7.836878@2] [<ffffff80095aebbc>] do_bind_con_driver+0x1c4/0x3c8            
[    7.836879@2] [<ffffff80095af0f8>] do_take_over_console+0xa8/0x208           
[    7.836881@2] [<ffffff8009565aac>] do_fbcon_takeover+0x7c/0xf8               
[    7.836882@2] [<ffffff8009569638>] fbcon_event_notify+0x978/0x9e0            
[    7.836886@2] [<ffffff80090cf364>] notifier_call_chain+0x5c/0xa0             
[    7.836888@2] [<ffffff80090cfe04>] blocking_notifier_call_chain+0x64/0x88    
[    7.836890@2] [<ffffff800956ca98>] fb_notifier_call_chain+0x30/0x40          
[    7.836892@2] [<ffffff800956f440>] register_framebuffer+0x230/0x338          
[    7.836894@2] [<ffffff80095d9aa8>] drm_fb_helper_initial_config+0x2a8/0x478  
[    7.836897@2] [<ffffff8009a78e24>] am_meson_drm_fbdev_init+0x9c/0x148        
[    7.836899@2] [<ffffff8009a776f8>] am_meson_drm_bind+0x138/0x190             
[    7.836902@2] [<ffffff8009642070>] try_to_bring_up_master+0x180/0x1e0        
[    7.836904@2] [<ffffff8009642174>] component_add+0xa4/0x170                  
[    7.836906@2] [<ffffff8009a7a570>] am_meson_hdmi_probe+0x28/0x38             
[    7.836909@2] [<ffffff800964ab50>] platform_drv_probe+0x60/0xc0              
[    7.836912@2] [<ffffff80096487c4>] driver_probe_device+0x154/0x2b0           
[    7.836913@2] [<ffffff80096489e8>] __driver_attach+0xc8/0xd0                 
[    7.836915@2] [<ffffff8009646328>] bus_for_each_dev+0x78/0xd8                
[    7.836917@2] [<ffffff8009647fa8>] driver_attach+0x30/0x40                   
[    7.836919@2] [<ffffff8009647ae4>] bus_add_driver+0x1c4/0x230                
[    7.836921@2] [<ffffff800964955c>] driver_register+0x6c/0x110                
[    7.836923@2] [<ffffff800964aa8c>] __platform_driver_register+0x54/0x60      
[    7.836927@2] [<ffffff800a282edc>] am_meson_hdmi_pltfm_driver_init+0x18/0x20 
[    7.836930@2] [<ffffff8009083c08>] do_one_initcall+0x58/0x168                
[    7.836934@2] [<ffffff800a230db8>] kernel_init_freeable+0x1a4/0x248          
[    7.836937@2] [<ffffff8009cc26d8>] kernel_init+0x18/0x108                    
[    7.836939@2] [<ffffff8009083950>] ret_from_fork+0x10/0x40                   
[    7.836941@2] Code: 53037c21 91000421 8b011a61 d503201f (f9000274)           
[    7.836946@2] ---[ end trace dde193d9a7b24d0b ]---                           
[    7.841224@2] Kernel panic - not syncing: Attempted to kill init! exitcode=0x
0000000b                                                                        
[    7.841224@2]                                                                
[    7.841407@2] SMP: stopping secondary CPUs                                   
[    7.841414@2] Kernel Offset: disabled                                        
[    7.841415@2] Memory Limit: none                                             
[    9.447799@2] Rebooting in 5 seconds..                                       

Is it possible that the kernel panic is caused by your fb->bits_per_pixel change?

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sat Jun 08, 2019 11:32 am

sjwlaoda wrote:
Sat Jun 08, 2019 12:26 am
Is it possible that the kernel panic is caused by your fb->bits_per_pixel change?
The correlation is not causative. The backtrace remains the same with or without the change. The only difference is that with 0 bpp and 0 depth, there is nothing to do so the memory is never accessed to cause a page fault.

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sat Jun 08, 2019 11:37 am

crashoverride wrote:
Sat Jun 08, 2019 11:32 am
sjwlaoda wrote:
Sat Jun 08, 2019 12:26 am
Is it possible that the kernel panic is caused by your fb->bits_per_pixel change?
The correlation is not causative. The backtrace remains the same with or without the change. The only difference is that with 0 bpp and 0 depth, there is nothing to do so the memory is never accessed to cause a page fault.
[edit]
I should add that investigating the 'blame' log for the compile error indicates the problem is not due to a change. It was committed as-is. This implies it never worked (was never enabled) and therefore has never been tested by Amlogic.

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Sat Jun 08, 2019 12:08 pm

I see, this is really a bad news

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Sat Jun 08, 2019 2:55 pm

crashoverride wrote:
Sat Jun 08, 2019 11:37 am
crashoverride wrote:
Sat Jun 08, 2019 11:32 am
sjwlaoda wrote:
Sat Jun 08, 2019 12:26 am
Is it possible that the kernel panic is caused by your fb->bits_per_pixel change?
The correlation is not causative. The backtrace remains the same with or without the change. The only difference is that with 0 bpp and 0 depth, there is nothing to do so the memory is never accessed to cause a page fault.
[edit]
I should add that investigating the 'blame' log for the compile error indicates the problem is not due to a change. It was committed as-is. This implies it never worked (was never enabled) and therefore has never been tested by Amlogic.
Is it because that am_meson_gem_alloc_ion_buff only calls ion_alloc, but doesn't call ion_map_kernel to set (struct fb_info)->screen_base?

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sat Jun 08, 2019 3:03 pm

I finally got glmark2-es2-drm to work on the DRM driver. I am posting this info to save others the time of investigating the issue.

The first issue is that the version in the Ubuntu repo will not work. It has a hard coded list of DRM drivers that it checks for. Since the Amlogic DRM driver (meson) did not exist at the time, it is not in the list that glmark2 checks for.

Newer versions of glmark2 on github correct the above issue by probing form "/dev/dri/card0". This allows the DRM driver to be used. However, the GBM buffer format is hard coded and this causes eglCreateWindowSurface to fail with EGL_BAD_MATCH error.

The relevant specification for using GBM is here:
https://www.khronos.org/registry/EGL/ex ... rm_gbm.txt

The portion related to the issue is as follows:
For each EGLConfig that belongs to the GBM platform, the
EGL_NATIVE_VISUAL_ID attribute is a GBM color format, such as
GBM_FORMAT_XRGB8888.
When glmark2 runs, the EGLConfig it uses specifies an EGL_NATIVE_VISUAL_ID of GBM_FORMAT_ARGB8888. However, the buffer glmark2 creates is hard coded as GBM_FORMAT_XRGB8888. This correctly causes a EGL_BAD_MATCH error. This issue will continue to exist until glmark2 corrects their GBM buffer creation to use the EGL_NATIVE_VISUAL_ID of the selected EGLConfig. A workaround is to change the hard coded value to one that works:
https://github.com/glmark2/glmark2/blob ... m.cpp#L436

Code: Select all

- GBM_FORMAT_XRGB8888,
+  GBM_FORMAT_ARGB8888,
The results produced by the program are not meaningful since they are locked to vsync:

Code: Select all

=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR:     ARM
    GL_RENDERER:   Mali-G52
    GL_VERSION:    OpenGL ES 3.2 v1.r16p0-01rel0.2943fc4ef9657d91ee32c9a58dec6cd2
=======================================================
[build] use-vbo=false: FPS: 53 FrameTime: 18.868 ms
[build] use-vbo=true: FPS: 60 FrameTime: 16.667 ms
[texture] texture-filter=nearest: FPS: 60 FrameTime: 16.667 ms
[texture] texture-filter=linear: FPS: 60 FrameTime: 16.667 ms
[texture] texture-filter=mipmap: FPS: 60 FrameTime: 16.667 ms
[shading] shading=gouraud: FPS: 60 FrameTime: 16.667 ms
[shading] shading=blinn-phong-inf: FPS: 60 FrameTime: 16.667 ms
[shading] shading=phong: FPS: 60 FrameTime: 16.667 ms
[shading] shading=cel: FPS: 60 FrameTime: 16.667 ms
[bump] bump-render=high-poly: FPS: 60 FrameTime: 16.667 ms
[bump] bump-render=normals: FPS: 60 FrameTime: 16.667 ms
[bump] bump-render=height: FPS: 60 FrameTime: 16.667 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 60 FrameTime: 16.667 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 59 FrameTime: 16.949 ms
[pulsar] light=false:quads=5:texture=false: FPS: 60 FrameTime: 16.667 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 40 FrameTime: 25.000 ms
[desktop] effect=shadow:windows=4: FPS: 59 FrameTime: 16.949 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 20 FrameTime: 50.000 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 21 FrameTime: 47.619 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 30 FrameTime: 33.333 ms
[ideas] speed=duration: FPS: 59 FrameTime: 16.949 ms
[jellyfish] <default>: FPS: 60 FrameTime: 16.667 ms
[terrain] <default>: FPS: 19 FrameTime: 52.632 ms
[shadow] <default>: FPS: 59 FrameTime: 16.949 ms
[refract] <default>: FPS: 30 FrameTime: 33.333 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 60 FrameTime: 16.667 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 60 FrameTime: 16.667 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 60 FrameTime: 16.667 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 59 FrameTime: 16.949 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 60 FrameTime: 16.667 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 60 FrameTime: 16.667 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 60 FrameTime: 16.667 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 60 FrameTime: 16.667 ms
=======================================================
                                  glmark2 Score: 53 
=======================================================
[edit]
I should also note that I discovered that libmali.so does not provide a "eglCreatePlatformWindowSurface" entry point as required by the extension specification.
These users thanked the author crashoverride for the post (total 3):
back2future (Sat Jun 08, 2019 4:22 pm) • tobetter (Sat Jun 08, 2019 8:06 pm) • odroid (Sat Jun 08, 2019 8:38 pm)

back2future
Posts: 237
Joined: Sun Jul 23, 2017 3:19 pm
languages_spoken: english
Has thanked: 9 times
Been thanked: 2 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by back2future » Sat Jun 08, 2019 3:56 pm

[ --off-screen option might provide results that are comparable to
https://dn.odroid.com/S922X/ODROID-N2/P ... gure-5.png ?
(vsync can be a means for power/energy/heat saving) ]

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sat Jun 08, 2019 7:37 pm

I added DRM/GBM support to one of the emulators (snes9x) that I use for testing. Of interest is that with the zero-copy display, its very important to use the "performance" governor since CPU utilization (and therefore clock rate) is significantly reduced. Also noteworthy is that vsync timing appears to be extremely stable and accurate (near perfect).
These users thanked the author crashoverride for the post:
AreaScout (Sun Jun 09, 2019 5:19 am)

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sat Jun 08, 2019 10:53 pm

sjwlaoda wrote:
Sat Jun 08, 2019 2:55 pm
Is it because that am_meson_gem_alloc_ion_buff only calls ion_alloc, but doesn't call ion_map_kernel to set (struct fb_info)->screen_base?
Yes, that was also an issue. A generic function was introduced in kernel 4.19. I created a patch based on that code substituting the ion call for the gem call. The console is now fully functional including VT switching with armsoc.

The patch needs to be cleaned up before merge.

Code: Select all

diff --git a/drivers/amlogic/drm/am_meson_fbdev.c b/drivers/amlogic/drm/am_meson_fbdev.c
index 610f3ca7..73faa587 100644
--- a/drivers/amlogic/drm/am_meson_fbdev.c
+++ b/drivers/amlogic/drm/am_meson_fbdev.c
@@ -83,6 +83,10 @@ static int am_meson_drm_fbdev_create(struct drm_fb_helper *helper,
        struct fb_info *fbi;
        size_t size;
        int ret;
+       void* vaddr;
+
+       printk("am_meson_drm_fbdev_create: surface_bpp=%d, surface_width=%d, surface_height=%d, surface_depth=%d\n",
+               sizes->surface_bpp, sizes->surface_width, sizes->surface_height, sizes->surface_depth);
 
        bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8);
 
@@ -101,6 +105,12 @@ static int am_meson_drm_fbdev_create(struct drm_fb_helper *helper,
 
        private->fbdev_bo = &meson_obj->base;
 
+       vaddr = ion_map_kernel(client, meson_obj->handle);
+       if (!vaddr) {
+               return -ENOMEM;
+       }
+       
+
        fbi = drm_fb_helper_alloc_fbi(helper);
        if (IS_ERR(fbi)) {
                dev_err(dev->dev, "Failed to create framebuffer info.\n");
@@ -119,8 +129,21 @@ static int am_meson_drm_fbdev_create(struct drm_fb_helper *helper,
        fbi->par = helper;
        fbi->flags = FBINFO_FLAG_DEFAULT;
        fbi->fbops = &meson_drm_fbdev_ops;
+//
+       fbi->screen_size = size;
+       fbi->fix.smem_len = fbi->screen_size;
+       fbi->screen_buffer = vaddr;
+       
+       /* Shamelessly leak the physical address to user-space */
+       fbi->fix.smem_start =
+               page_to_phys(virt_to_page(fbi->screen_buffer));
+
+//
 
        fb = helper->fb;
+       fb->bits_per_pixel = sizes->surface_bpp;
+       fb->depth = sizes->surface_depth;
+
        drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth);
        drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);
 
@@ -131,7 +154,7 @@ static int am_meson_drm_fbdev_create(struct drm_fb_helper *helper,
        fbi->screen_size = size;
        fbi->fix.smem_len = size;
 
-       DRM_DEBUG_KMS("FB [%dx%d]-%d offset=%ld size=%zu\n",
+       printk("FB [%dx%d]-%d offset=%ld size=%zu\n",
                      fb->width, fb->height, fb->depth, offset, size);
 
        fbi->skip_vt_switch = true;
@@ -195,7 +218,7 @@ int am_meson_drm_fbdev_init(struct drm_device *dev)
 err_drm_fb_helper_fini:
        drm_fb_helper_fini(helper);
 err_free:
-       kfree(fbdev_cma);
+       kfree(helper);
        return ret;
 }
These users thanked the author crashoverride for the post:
mad_ady (Sat Jun 08, 2019 11:26 pm)

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Sat Jun 08, 2019 10:59 pm

crashoverride wrote:
Sat Jun 08, 2019 10:53 pm
sjwlaoda wrote:
Sat Jun 08, 2019 2:55 pm
Is it because that am_meson_gem_alloc_ion_buff only calls ion_alloc, but doesn't call ion_map_kernel to set (struct fb_info)->screen_base?
Yes, that was also an issue. A generic function was introduced in kernel 4.19. I created a patch based on that code substituting the ion call for the gem call. The console is now fully functional including VT switching with armsoc.

The patch needs to be cleaned up before merge.
I haven't had time to check, do you mean that the both of the drm and fb driver can work together now?

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sat Jun 08, 2019 11:05 pm

sjwlaoda wrote:
Sat Jun 08, 2019 10:59 pm
do you mean that the both of the drm and fb driver can work together now?
Yes. The kernel emulates a fb driver using the drm driver. This provides an on-screen console.

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sat Jun 08, 2019 11:08 pm

back2future wrote:
Sat Jun 08, 2019 3:56 pm
--off-screen option might provide results that are comparable to
The off-screen results should be similar. I will leave it to HardKernel to provide benchmarks.

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Sat Jun 08, 2019 11:12 pm

crashoverride wrote:
Sat Jun 08, 2019 11:05 pm
sjwlaoda wrote:
Sat Jun 08, 2019 10:59 pm
do you mean that the both of the drm and fb driver can work together now?
Yes. The kernel emulates a fb driver using the drm driver. This provides an on-screen console.
Thank you very much, I will have a try next Monday

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sun Jun 09, 2019 12:29 am

Summary of issues remaining:
* GBM needs to be updated in libmali.so. It lacks functions such as 'gbm_bo_map', 'gbm_bo_unmap', and 'gbm_bo_create_with_modifiers'. The last one means that AFBC can not currently be used.
* Vulkan is **STILL** missing!!!11!1!!1!!!!!!1!!. With Wayland support, there is no longer a technical reason for its absence.
These users thanked the author crashoverride for the post:
rooted (Sun Jun 09, 2019 7:28 am)

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sun Jun 09, 2019 1:47 pm

I created a pull request here:
https://github.com/hardkernel/linux/pull/376

The FBDEV patch error behavior was changed to cleanup the buffer object. Note that the patches do not include a modification to enable FBDEV emulation in defconfig. Someone else will need to submit that change after testing.

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sun Jun 09, 2019 9:09 pm

I tracked down what is preventing the cursor plane from displaying:
https://github.com/hardkernel/linux/blo ... 9875-L9881

Code: Select all

	if (!osd_hw.hwc_enable) {
		if (index >= OSD2)
			return;
	} else {
		if (index > OSD3)
			return;
        }
With those lines commented out, the cursor plane (OSD2) shows up. However, it does not render properly and obscures the layer below it. The result I observed (with armsoc) is a grey block on a black background that moves with the mouse. Someone with more knowledge than me of the video mixer hardware will need to investigate further.

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sun Jun 09, 2019 9:29 pm

Additions to the above list of issues remaining:
* No video plane support
* No YUV color space support.

miskol
Posts: 228
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 0
Been thanked: 6 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by miskol » Mon Jun 10, 2019 4:14 pm

How Can I try this ?
I would like to know if amlogic fixed v-sync

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Mon Jun 10, 2019 7:08 pm

crashoverride wrote:
Sun Jun 09, 2019 9:29 pm
Additions to the above list of issues remaining:
* No video plane support
* No YUV color space support.
The current faked FB (via drm) only support one framebuffer, so I doubled the size to call am_meson_gem_object_create in am_meson_drm_fbdev_create.
But I can only get one frame correct and the next frame is garbage. Do you know the reason? (the similar change as https://lists.freedesktop.org/archives/ ... 13031.html)

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Mon Jun 10, 2019 7:24 pm

sjwlaoda wrote:
Mon Jun 10, 2019 7:08 pm
crashoverride wrote:
Sun Jun 09, 2019 9:29 pm
Additions to the above list of issues remaining:
* No video plane support
* No YUV color space support.
The current faked FB (via drm) only support one framebuffer, so I doubled the size to call am_meson_gem_object_create in am_meson_drm_fbdev_create.
But I can only get one frame correct and the next frame is garbage. Do you know the reason? (the similar change as https://lists.freedesktop.org/archives/ ... 13031.html)
The follow change can fix this issue

Code: Select all

diff --git a/drivers/amlogic/drm/am_meson_vpu.c b/drivers/amlogic/drm/am_meson_vpu.c
index fccfdc2..0e10829 100644
--- a/drivers/amlogic/drm/am_meson_vpu.c
+++ b/drivers/amlogic/drm/am_meson_vpu.c
@@ -371,8 +371,8 @@ void am_osd_do_display(
        plane_map.format = format;
        plane_map.byte_stride = fb->pitches[0];

-       plane_map.src_x = state->src_x;
-       plane_map.src_y = state->src_y;
+       plane_map.src_x = (state->src_x >> 16) & 0xffff;
+       plane_map.src_y = (state->src_y >> 16) & 0xffff;
        plane_map.src_w = (state->src_w >> 16) & 0xffff;
        plane_map.src_h = (state->src_h >> 16) & 0xffff;

User avatar
odroid
Site Admin
Posts: 32137
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 119 times
Been thanked: 293 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by odroid » Tue Jun 11, 2019 9:22 am

@sjwlaoda,
Thank you for sharing the change.
Do you have no issue with double-buffered FB-drm now after applying that patch?

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Tue Jun 11, 2019 9:58 am

odroid wrote:
Tue Jun 11, 2019 9:22 am
@sjwlaoda,
Thank you for sharing the change.
Do you have no issue with double-buffered FB-drm now after applying that patch?
I enabled tripple buffering, and there is no issue currently on my board

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Tue Jun 11, 2019 10:02 am

miskol wrote:
Mon Jun 10, 2019 4:14 pm
How Can I try this ?
I would like to know if amlogic fixed v-sync
Following this page:
https://wiki.odroid.com/odroid-n2/appli ... _drm_build
but before you execute "make odroidn2_drm_defconfig", please apply the pathces first (if they are not merged)
1. Add CONFIG_DRM_MESON_EMULATE_FBDEV=y to arch/arm64/configs/odroidn2_drm_defconfig
2. https://github.com/hardkernel/linux/pull/376
3.

Code: Select all

diff --git a/drivers/amlogic/drm/am_meson_vpu.c b/drivers/amlogic/drm/am_meson_vpu.c
index fccfdc2..0e10829 100644
--- a/drivers/amlogic/drm/am_meson_vpu.c
+++ b/drivers/amlogic/drm/am_meson_vpu.c
@@ -371,8 +371,8 @@ void am_osd_do_display(
        plane_map.format = format;
        plane_map.byte_stride = fb->pitches[0];

-       plane_map.src_x = state->src_x;
-       plane_map.src_y = state->src_y;
+       plane_map.src_x = (state->src_x >> 16) & 0xffff;
+       plane_map.src_y = (state->src_y >> 16) & 0xffff;
        plane_map.src_w = (state->src_w >> 16) & 0xffff;
        plane_map.src_h = (state->src_h >> 16) & 0xffff;
vsync seems to work, because I can only get ~60 fps

sjwlaoda
Posts: 26
Joined: Tue Jun 04, 2019 10:44 am
languages_spoken: english
ODROIDs: n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by sjwlaoda » Tue Jun 11, 2019 2:23 pm

sjwlaoda wrote:
Tue Jun 11, 2019 9:58 am
odroid wrote:
Tue Jun 11, 2019 9:22 am
@sjwlaoda,
Thank you for sharing the change.
Do you have no issue with double-buffered FB-drm now after applying that patch?
I enabled tripple buffering, and there is no issue currently on my board
I am sorry, there is still rendering issues, that only one frame is correct (the one with offset=0), and the other two frames are black.
do you know if there are any display output scanning issues? it seems to me that for the second and third buffer display, it always copies the first line data into other lines

Update: it seems to me that osd_direct_render doesn't handle such case correctly, for the second and third buffer, the plane_map->src_y will be 1080, 2160 accordingly,
but osd_direct_render uses plane_map->src_y to adjust the pysical address, and then it is used again to calculate y offset.

Code: Select all

diff --git a/drivers/amlogic/media/osd/osd_hw.c b/drivers/amlogic/media/osd/osd_hw.c
index 4448206..1cb50eb 100644
--- a/drivers/amlogic/media/osd/osd_hw.c
+++ b/drivers/amlogic/media/osd/osd_hw.c
@@ -9468,6 +9468,7 @@ static bool osd_direct_render(struct osd_plane_map_s *plane_map)
        struct pandata_s freescale_dst[HW_OSD_COUNT];

        phy_addr = phy_addr + plane_map->byte_stride * plane_map->src_y;
+       plane_map->src_y = 0;
        osd_hw.screen_base[index] = phy_addr;
        osd_hw.screen_size[index] =
                plane_map->byte_stride * plane_map->src_h;

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Fri Jun 14, 2019 8:04 pm

I managed to port my X11 EGL driver from JEM to GEM for use on the DRM driver. However, it has revealed some issues in the driver.

The read performance of GEM buffers is terrible. The performance of the X11 driver was only able to achieve 15 FPS! There is no cache control implemented in the custom Meson IOCTL for buffer allocation. It uses the ION driver with the CMA heap which is explicitly coherent memory (no caching) for buffers with no flags, scan out flag, or rendering flag. Anything else allocates from the System heap but can not be marked as cachable. Further confusing the issue is that write performance is significantly faster than read performance. This implies there is write-combined caching enabled somewhere despite it not being valid for coherent memory. After obtaining an ION buffer, the dma_ops get overwritten which causes ION to no longer perform functions on the buffer for cache maintenance.

As a workaround for buffer performance, I implemented GE2D acceleration in the armsoc X11 driver. GE2D talks directly to the buffer memory bypassing any processor caching. However, mostly garbage is displayed. This is presumable due to the forbidden use of write-combining on coherent memory. Without ION's dma_ops, cache maintenance can not be performed. Even with GE2D acceleration in both the armsoc driver and the EGL driver, performance (glmark2-es2) is less than half of what the the previous JEM version provides on fbdev. I theorize this is because Mali can not obtain a cache enabled buffer from the Meson DRM GEM provider.

The current status is similar to that with the fbdev effort, I am now investigating workarounds for the workaround. :shock:
These users thanked the author crashoverride for the post:
mad_ady (Fri Jun 14, 2019 8:38 pm)

back2future
Posts: 237
Joined: Sun Jul 23, 2017 3:19 pm
languages_spoken: english
Has thanked: 9 times
Been thanked: 2 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by back2future » Fri Jun 14, 2019 8:16 pm

[Seems your interested in hardware accelerated tasks/visualization: Therefore, a request for a short guess, if You would recommend virtualization of arm software or programs for Xu4 (arm) on N2 (aarch64)? My knowledge (not direct experience) so far (with todays software level) would recommend an H2 therefore more likely than a todays N2 for avoiding disappointment? Fair seeing it that way? Thanks for thinking about.]

miskol
Posts: 228
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 0
Been thanked: 6 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by miskol » Sat Jun 15, 2019 5:44 am

crashoverride wrote:
Fri Jun 14, 2019 8:04 pm
I managed to port my X11 EGL driver from JEM to GEM for use on the DRM driver. However, it has revealed some issues in the driver.

The read performance of GEM buffers is terrible. The performance of the X11 driver was only able to achieve 15 FPS! There is no cache control implemented in the custom Meson IOCTL for buffer allocation. It uses the ION driver with the CMA heap which is explicitly coherent memory (no caching) for buffers with no flags, scan out flag, or rendering flag. Anything else allocates from the System heap but can not be marked as cachable. Further confusing the issue is that write performance is significantly faster than read performance. This implies there is write-combined caching enabled somewhere despite it not being valid for coherent memory. After obtaining an ION buffer, the dma_ops get overwritten which causes ION to no longer perform functions on the buffer for cache maintenance.

As a workaround for buffer performance, I implemented GE2D acceleration in the armsoc X11 driver. GE2D talks directly to the buffer memory bypassing any processor caching. However, mostly garbage is displayed. This is presumable due to the forbidden use of write-combining on coherent memory. Without ION's dma_ops, cache maintenance can not be performed. Even with GE2D acceleration in both the armsoc driver and the EGL driver, performance (glmark2-es2) is less than half of what the the previous JEM version provides on fbdev. I theorize this is because Mali can not obtain a cache enabled buffer from the Meson DRM GEM provider.

The current status is similar to that with the fbdev effort, I am now investigating workarounds for the workaround. :shock:
Are you unhappy with wayland or why do you still play with X11 ?

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sat Jun 15, 2019 6:03 am

back2future wrote:
Fri Jun 14, 2019 8:16 pm
if You would recommend virtualization of arm software or programs for Xu4 (arm) on N2 (aarch64)?
I have no recommendation as I could not get virtualization working on N2.
miskol wrote:
Sat Jun 15, 2019 5:44 am
Are you unhappy with wayland or why do you still play with X11 ?
I posted the rational on IRC because I knew this question was going to come up. The short answer is the timeline for Wayland on Ubuntu is several years out and the N2 will be replaced by something else in that time. The timeline for Panfrost on bi-frost is 7 years or more. I have X11 working today.

The question is ultimately rhetorical since both X11 and Wayland will use the exact same GEM buffers. This means that its currently impossible to run Wayland 'full speed' as the same issue applies to it as X11 armsoc: the fbdev driver is approximately twice as fast as the DRM driver based on informal testing. X11 works on fbdev. Wayland does not.

miskol
Posts: 228
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 0
Been thanked: 6 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by miskol » Sat Jun 15, 2019 6:08 am

crashoverride wrote:
Sat Jun 15, 2019 6:03 am
miskol wrote:
Sat Jun 15, 2019 5:44 am
Are you unhappy with wayland or why do you still play with X11 ?
I posted the rational on IRC because I knew this question was going to come up. The short answer is the timeline for Wayland on Ubuntu is several years out and the N2 will be replaced by something else in that time. The timeline for Panfrost on bi-frost is 7 years or more. I have X11 working today.

The question is ultimately rhetorical since both X11 and Wayland will use the exact same GEM buffers. This means that its currently impossible to run Wayland 'full speed' as the same issue applies to it as X11 armsoc: the fbdev driver is approximately twice as fast as the DRM driver based on informal testing. X11 works on fbdev. Wayland does not.
I secretly hope that devs from arm dump whole x11 driver and wayland driver is brand new code without all useless copies :)
btw Qt apps are able to run directly on DRM without wayland but with wayland drivers on N2
And you think that drm drivers are slower then fbdev ?
why ?

crashoverride
Posts: 4519
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 67 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by crashoverride » Sat Jun 15, 2019 6:43 am

miskol wrote:
Sat Jun 15, 2019 6:08 am
I secretly hope that devs from arm dump whole x11 driver and wayland driver is brand new code without all useless copies
That's actually ironic. ARM has already dropped X11 support which is the reason I am writing my own EGL driver. The reason for the 'useless copy' is not due to X11. It is due to BOTH Wayland and GBM explicitly excluding pixmap support in their extension specifications. There simply is no method to render right side up without an extra buffer copy. An ARM provided X11 EGL driver would not have this issue. Wayland will always have a 'useless copy' since its required to render to a back buffer. X11 is more efficient than Wayland in that it renders directly to the front buffer while still supporting a back buffer. This also impacts the memory requirements and bandwidth. Since X11 can directly render, it can require far less memory than Wayland does in mandating client buffers (retained) for all compositing. Wayland is currently ill suited for SBCs in the class that N2 is: it either requires lots of memory or a 'single application' (non-desktop) configuration.
miskol wrote:
Sat Jun 15, 2019 6:08 am
btw Qt apps are able to run directly on DRM without wayland but with wayland drivers on N2
X11 can also run a single app instead of a desktop.
miskol wrote:
Sat Jun 15, 2019 6:08 am
And you think that drm drivers are slower then fbdev ?
why ?
The test measurement result indicate that as I noted in my previous post. Its not a subjective observation. The main factor is that with fbdev, ION buffer heap and cache settings are controlled by the application. With the DRM driver, no ION cache control is currently possible as stated in my previous post.

miskol
Posts: 228
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 0
Been thanked: 6 times
Contact:

Re: Will you support DRM driver for Odroid n2?

Unread post by miskol » Sat Jun 15, 2019 6:56 am

crashoverride wrote:
Sat Jun 15, 2019 6:43 am
miskol wrote:
Sat Jun 15, 2019 6:08 am
I secretly hope that devs from arm dump whole x11 driver and wayland driver is brand new code without all useless copies
That's actually ironic. ARM has already dropped X11 support which is the reason I am writing my own EGL driver. The reason for the 'useless copy' is not due to X11. It is due to BOTH Wayland and GBM explicitly excluding pixmap support in their extension specifications. There simply is no method to render right side up without an extra buffer copy. An ARM provided X11 EGL driver would not have this issue. Wayland will always have a 'useless copy' since its required to render to a back buffer. X11 is more efficient than Wayland in that it renders directly to the front buffer while still supporting a back buffer. This also impacts the memory requirements and bandwidth. Since X11 can directly render, it can require far less memory than Wayland does in mandating client buffers (retained) for all compositing. Wayland is currently ill suited for SBCs in the class that N2 is: it either requires lots of memory or a 'single application' (non-desktop) configuration.
miskol wrote:
Sat Jun 15, 2019 6:08 am
btw Qt apps are able to run directly on DRM without wayland but with wayland drivers on N2
X11 can also run a single app instead of a desktop.
miskol wrote:
Sat Jun 15, 2019 6:08 am
And you think that drm drivers are slower then fbdev ?
why ?
The test measurement result indicate that as I noted in my previous post. Its not a subjective observation. The main factor is that with fbdev, ION buffer heap and cache settings are controlled by the application. With the DRM driver, no ION cache control is currently possible as stated in my previous post.
I am living in world where application generate output as DMA buf that is imported to weston in form of texture(DMA buf) then weston(as window compositor) in opengl generate output as dma buf that will pass to DRM that will switch it with v-sync :)
I don't know how bad or good it is implemented as we still needed some form of security and abstraction :)

But I was really happy with cpu load on weston on odroid C2, but still I would like to see some profiling data.
I am not really happy with v-sync on amlogic as it sync with display output, but it is skipping incomplete frames in sync.
So if you know about some good set of tests for drm vsync with high cpu/memmory load.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 0 guests