Kernel 4.14 debugging party

Test and fix the Kernel 4.14 features

Moderators: mdrjr, odroid

Kernel 4.14 debugging party

Unread postby memeka » Thu Oct 12, 2017 8:39 pm

Let's start the 4.14 debugging party for Odroid XU3 & Odroid XU4!

*** UPDATE *** 18 Oct 2017:

I declare the party over for me. All components seem to work now.
It was mostly a week-long one-man party, with some input from @tobetter and @moon.linux, for which they have my thanks.
Location of the party: https://github.com/mihailescu2m/linux/t ... xu4-4.14.y

As of 4.14-rc5, I have added the 4.14 kernel on par with the 4.9: USB3, GB-ETH, GPU, HMP, MFC, G2D, GSC, sound, HYP, CEC (using the new kernel framework), etc all working.
Config used: https://transfer.sh/qTnxH/config-4.14.0-rc5-05
Boot log: http://paste.debian.net/991368/

I will now sit back and wait for the 4.14 release for a final rebase.
I have arranged the commits neatly in my tree, based on functionality: GPU first, HMP, ..., thermals.
There are a few minor things left out to do, which I won't since I don't find them important :D

*** BONUS: ***

Kodi Krypton 17.4, with:
* MFC support
* fixes for slowness
* GBM support (-DENABLE_GBM=ON -DENABLE_X11=OFF)
* Wayland support (-DENABLE_WAYLAND=ON -DENABLE_X11=OFF)

Get it at: https://github.com/mihailescu2m/xbmc/tree/Krypton-mfc

Remaining work on 4.14 kernel:

+ ODROID-XU4: Never blend the base layer
https://github.com/hardkernel/linux/com ... 5175c572d4
- no idea why it's necessary

+ hwmon: pwm-fan: add sys attribute to control active cooling
https://github.com/hardkernel/linux/com ... 8567e699d2
- @tobetter: this patch is to control the FAN SPEED in userspace instead of using the fixed table in kernel
- I don't use this :)

+ odroid-xu3/4: Using gpio-i2c on hdmi-edid
https://github.com/hardkernel/linux/com ... b26539e71a
- @tobetter: change I2C method for EDID from H/W I2C to GPIO bitbang due to the failure of EDID access for some display devices
- @moon.linux: this could be possible modified node in dts viewtopic.php?f=146&t=28692&p=204398#p204377
- so please find the best solution :)

+ wifi/bt drivers
- to each their own :)


Enjoy mainline 4.14!
--memeka

12 Oct 2017:
I have forked kernel 4.14 rc4 and added mali drivers r20p0.
Integrated and confirmed working.
Using mali devicetree for configuration, but enabled devfreq with a fix to set correct clock frequency.
Git repository: https://github.com/mihailescu2m/linux/t ... xu4-4.14.y
Boot log: http://paste.debian.net/990397/

[fixed @ viewtopic.php?f=93&t=28692&p=204105#p204137] Issue 1:
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747
when the gpu devfreq code calls dev_pm_opp_get_opp_count -> _find_opp_table
Code: Select all
[    4.486461] mali 11800000.mali: Continuing without Mali regulator control
[    4.497065] mali 11800000.mali: GPU identified as 0x0620 r0p1 status 0
[    4.504981] mali 11800000.mali: Protected mode not available
[    4.511546] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747
[    4.519107] in_atomic(): 0, irqs_disabled(): 0, pid: 1, name: swapper/0
[    4.525249] 3 locks held by swapper/0/1:
[    4.529270]  #0:  (&dev->mutex){....}, at: [<c04b6a2c>] __driver_attach+0x78/0x120
[    4.536700]  #1:  (&dev->mutex){....}, at: [<c04b6a3c>] __driver_attach+0x88/0x120
[    4.544393]  #2:  (rcu_read_lock){....}, at: [<c04af8dc>] kbase_devfreq_init+0x18/0x6e0
[    4.552372] Preemption disabled at:
[    4.552442] [<c0122e58>] irq_enter+0x44/0x88
[    4.560092] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.14.0-rc4-02 #4
[    4.566405] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[    4.572478] [<c01102c8>] (unwind_backtrace) from [<c010cabc>] (show_stack+0x10/0x14)
[    4.580215] [<c010cabc>] (show_stack) from [<c08214c4>] (dump_stack+0x98/0xc4)
[    4.587401] [<c08214c4>] (dump_stack) from [<c0144bcc>] (___might_sleep+0x264/0x2cc)
[    4.595123] [<c0144bcc>] (___might_sleep) from [<c0837240>] (__mutex_lock+0x2c/0xa38)
[    4.602918] [<c0837240>] (__mutex_lock) from [<c0837c68>] (mutex_lock_nested+0x1c/0x24)
[    4.610891] [<c0837c68>] (mutex_lock_nested) from [<c04c6ab8>] (_find_opp_table+0x20/0x5c)
[    4.619125] [<c04c6ab8>] (_find_opp_table) from [<c04c6cdc>] (dev_pm_opp_get_opp_count+0xc/0x90)
[    4.627884] [<c04c6cdc>] (dev_pm_opp_get_opp_count) from [<c04af968>] (kbase_devfreq_init+0xa4/0x6e0)
[    4.637081] [<c04af968>] (kbase_devfreq_init) from [<c049b00c>] (kbase_platform_device_probe+0x5f0/0xc9c)
[    4.646615] [<c049b00c>] (kbase_platform_device_probe) from [<c04b8428>] (platform_drv_probe+0x4c/0xb0)
[    4.655970] [<c04b8428>] (platform_drv_probe) from [<c04b680c>] (driver_probe_device+0x2d0/0x478)
[    4.664803] [<c04b680c>] (driver_probe_device) from [<c04b6ab8>] (__driver_attach+0x104/0x120)
[    4.673378] [<c04b6ab8>] (__driver_attach) from [<c04b48d8>] (bus_for_each_dev+0x68/0x9c)
[    4.681517] [<c04b48d8>] (bus_for_each_dev) from [<c04b5ab8>] (bus_add_driver+0x1cc/0x264)
[    4.689749] [<c04b5ab8>] (bus_add_driver) from [<c04b7434>] (driver_register+0x78/0xf8)
[    4.697717] [<c04b7434>] (driver_register) from [<c0101b64>] (do_one_initcall+0x44/0x170)
[    4.705869] [<c0101b64>] (do_one_initcall) from [<c0c00df4>] (kernel_init_freeable+0x144/0x1d0)
[    4.714539] [<c0c00df4>] (kernel_init_freeable) from [<c0834e10>] (kernel_init+0x8/0x110)
[    4.722682] [<c0834e10>] (kernel_init) from [<c01088c8>] (ret_from_fork+0x14/0x2c)
[    4.733015] mali 11800000.mali: kbase_devfreq_target: target_freq = 4294967295, freq = 600000000, opp_voltage = 1150000, opp_rate = 600000000
[    4.745104] devfreq devfreq0: Couldn't update frequency transition information.
[    4.757548] mali 11800000.mali: Probed as mali0

Changing governor to simple_ondemand will result in this issue every second, when the governor tries to find the next target_frequency.

[fixed @ viewtopic.php?f=93&t=28692&p=204224#p204224] Issue 2:
First time using MFC, there is a circular lock dependency detected:
Code: Select all
[  201.454832] ======================================================
[  201.460973] WARNING: possible circular locking dependency detected
[  201.467128] 4.14.0-rc4-02 #4 Tainted: G        W     
[  201.472231] ------------------------------------------------------
[  201.478389] ffmpeg/930 is trying to acquire lock:
[  201.483058]  (&dev->mfc_mutex){+.+.}, at: [<c05f0b24>] s5p_mfc_mmap+0x28/0xd4
[  201.490181]
               but task is already holding lock:
[  201.495976]  (&mm->mmap_sem){++++}, at: [<c01df504>] vm_mmap_pgoff+0x44/0xb8
[  201.503005]
               which lock already depends on the new lock.

[  201.511158]
               the existing dependency chain (in reverse order) is:
[  201.518606]
               -> #2 (&mm->mmap_sem){++++}:
[  201.523970]        __might_fault+0x80/0xb0
[  201.528032]        filldir64+0xc0/0x2f8
[  201.531842]        call_filldir+0xb0/0x14c
[  201.535914]        ext4_readdir+0x768/0x90c
[  201.540075]        iterate_dir+0x74/0x168
[  201.544059]        SyS_getdents64+0x7c/0x1a0
[  201.548309]        ret_fast_syscall+0x0/0x28
[  201.552551]
               -> #1 (&type->i_mutex_dir_key#2){++++}:
[  201.558893]        down_read+0x48/0x90
[  201.562602]        lookup_slow+0x74/0x178
[  201.566588]        walk_component+0x1a4/0x2e4
[  201.570925]        link_path_walk+0x174/0x4a0
[  201.575256]        path_openat+0x68/0x944
[  201.579242]        do_filp_open+0x60/0xc4
[  201.583227]        file_open_name+0xe4/0x114
[  201.587473]        filp_open+0x28/0x48
[  201.591197]        kernel_read_file_from_path+0x30/0x78
[  201.596409]        _request_firmware+0x3ec/0x78c
[  201.600996]        request_firmware+0x3c/0x54
[  201.605327]        s5p_mfc_load_firmware+0x44/0x140
[  201.610183]        s5p_mfc_open+0x2d4/0x4e0
[  201.614338]        v4l2_open+0xa0/0x104
[  201.618148]        chrdev_open+0xa4/0x18c
[  201.622135]        do_dentry_open+0x208/0x310
[  201.626471]        path_openat+0x28c/0x944
[  201.630541]        do_filp_open+0x60/0xc4
[  201.634526]        do_sys_open+0x118/0x1c8
[  201.638600]        ret_fast_syscall+0x0/0x28
[  201.642846]
               -> #0 (&dev->mfc_mutex){+.+.}:
[  201.648404]        lock_acquire+0x6c/0x88
[  201.652380]        __mutex_lock+0x68/0xa38
[  201.656450]        mutex_lock_interruptible_nested+0x1c/0x24
[  201.662096]        s5p_mfc_mmap+0x28/0xd4
[  201.666067]        v4l2_mmap+0x54/0x88
[  201.669795]        mmap_region+0x3a8/0x638
[  201.673867]        do_mmap+0x330/0x3a4
[  201.677593]        vm_mmap_pgoff+0x90/0xb8
[  201.681667]        SyS_mmap_pgoff+0x90/0xc0
[  201.685827]        ret_fast_syscall+0x0/0x28
[  201.690071]
               other info that might help us debug this:

[  201.698069] Chain exists of:
                 &dev->mfc_mutex --> &type->i_mutex_dir_key#2 --> &mm->mmap_sem

[  201.714266]  Possible unsafe locking scenario:

[  201.721904]        CPU0                    CPU1
[  201.726505]        ----                    ----
[  201.731081]   lock(&mm->mmap_sem);
[  201.734516]                                lock(&type->i_mutex_dir_key#2);
[  201.741443]                                lock(&mm->mmap_sem);
[  201.747413]   lock(&dev->mfc_mutex);
[  201.751020]
                *** DEADLOCK ***

[  201.759812] 1 lock held by ffmpeg/930:
[  201.763504]  #0:  (&mm->mmap_sem){++++}, at: [<c01df504>] vm_mmap_pgoff+0x44/0xb8
[  201.770992]
               stack backtrace:
[  201.776726] CPU: 5 PID: 930 Comm: ffmpeg Tainted: G        W       4.14.0-rc4-02 #4
[  201.784381] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[  201.790483] [<c01102c8>] (unwind_backtrace) from [<c010cabc>] (show_stack+0x10/0x14)
[  201.798258] [<c010cabc>] (show_stack) from [<c08214c4>] (dump_stack+0x98/0xc4)
[  201.805537] [<c08214c4>] (dump_stack) from [<c016b5dc>] (print_circular_bug+0x254/0x410)
[  201.813711] [<c016b5dc>] (print_circular_bug) from [<c016c860>] (check_prev_add+0x468/0x938)
[  201.822261] [<c016c860>] (check_prev_add) from [<c016f7bc>] (__lock_acquire+0x1314/0x14fc)
[  201.830646] [<c016f7bc>] (__lock_acquire) from [<c01701dc>] (lock_acquire+0x6c/0x88)
[  201.838522] [<c01701dc>] (lock_acquire) from [<c083727c>] (__mutex_lock+0x68/0xa38)
[  201.846345] [<c083727c>] (__mutex_lock) from [<c0837cd4>] (mutex_lock_interruptible_nested+0x1c/0x24)
[  201.855760] [<c0837cd4>] (mutex_lock_interruptible_nested) from [<c05f0b24>] (s5p_mfc_mmap+0x28/0xd4)
[  201.865152] [<c05f0b24>] (s5p_mfc_mmap) from [<c05c9714>] (v4l2_mmap+0x54/0x88)
[  201.872655] [<c05c9714>] (v4l2_mmap) from [<c01f49a0>] (mmap_region+0x3a8/0x638)
[  201.880309] [<c01f49a0>] (mmap_region) from [<c01f4f60>] (do_mmap+0x330/0x3a4)
[  201.887804] [<c01f4f60>] (do_mmap) from [<c01df550>] (vm_mmap_pgoff+0x90/0xb8)
[  201.895296] [<c01df550>] (vm_mmap_pgoff) from [<c01f2ad4>] (SyS_mmap_pgoff+0x90/0xc0)
[  201.903423] [<c01f2ad4>] (SyS_mmap_pgoff) from [<c0108820>] (ret_fast_syscall+0x0/0x28)


Issue 3: [patches @ viewtopic.php?f=93&t=28692&p=204224#p204201]
USB/Ethernet over USB issues:
Code: Select all
[   19.008674] usb usb4-port1: Cannot enable. Maybe the USB cable is bad?
[   19.020533] xhci-hcd xhci-hcd.2.auto: Cannot set link state.
[   19.033399] usb usb4-port1: cannot disable (err = -32)
...
[   27.975838] xhci-hcd xhci-hcd.2.auto: ERROR unknown event type 37
[   27.983705] xhci-hcd xhci-hcd.2.auto: ERROR unknown event type 37
[   27.994026] xhci-hcd xhci-hcd.2.auto: ERROR unknown event type 37
...


lsusb output:
Code: Select all
# lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
        |__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 480M
        |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 3: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M


Other things tested:
new from 4.9: DRM/KMS properly supports dmabuf-import for zero-copy buffers from MFC decoder.
tested with gstreamer:
Code: Select all
gst-launch-1.0 filesrc location=bunny_trailer_1080p.mov ! parsebin ! v4l2video4dec capture-io-mode=dmabuf ! v4l2video6convert output-io-mode=dmabuf-import capture-io-mode=dmabuf !kmssink sync=false

DRM/KMS on exynos does not support NV12/NV21, so this pipeline will do zero-copy from MFC decoder to GScaler converter, and then another zero-copy from GScaler to DRM.
Last edited by memeka on Sat Oct 21, 2017 5:20 pm, edited 11 times in total.
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby memeka » Fri Oct 13, 2017 9:18 am

12 Oct 2017:

Fixed Issue 1 above.
Mali drivers now are fully functional and show good performance.
Code: Select all
# glmark2-es2-wayland
=======================================================
    glmark2 2014.03+git20150611.fa71af2d
=======================================================
    OpenGL Information
    GL_VENDOR:     ARM
    GL_RENDERER:   Mali-T628
    GL_VERSION:    OpenGL ES 3.1 v1.r12p0-04rel0.f9ea82e6bf7f0bb7544260636f375425
=======================================================
[build] use-vbo=false: FPS: 60 FrameTime: 16.667 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: 60 FrameTime: 16.667 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: 60 FrameTime: 16.667 ms
[desktop] effect=shadow:windows=4: FPS: 60 FrameTime: 16.667 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 60 FrameTime: 16.667 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 60 FrameTime: 16.667 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 60 FrameTime: 16.667 ms
[ideas] speed=duration: FPS: 60 FrameTime: 16.667 ms
[jellyfish] <default>: FPS: 60 FrameTime: 16.667 ms
[terrain] <default>: FPS: 45 FrameTime: 22.222 ms
[shadow] <default>: FPS: 60 FrameTime: 16.667 ms
[refract] <default>: FPS: 60 FrameTime: 16.667 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: 60 FrameTime: 16.667 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: 59
=======================================================

# glmark2-es2-wayland --offscreen
=======================================================
    glmark2 2014.03+git20150611.fa71af2d
=======================================================
    OpenGL Information
    GL_VENDOR:     ARM
    GL_RENDERER:   Mali-T628
    GL_VERSION:    OpenGL ES 3.1 v1.r12p0-04rel0.f9ea82e6bf7f0bb7544260636f375425
=======================================================
[build] use-vbo=false: FPS: 678 FrameTime: 1.475 ms
[build] use-vbo=true: FPS: 1065 FrameTime: 0.939 ms
[texture] texture-filter=nearest: FPS: 1190 FrameTime: 0.840 ms
[texture] texture-filter=linear: FPS: 1178 FrameTime: 0.849 ms
[texture] texture-filter=mipmap: FPS: 1216 FrameTime: 0.822 ms
[shading] shading=gouraud: FPS: 835 FrameTime: 1.198 ms
[shading] shading=blinn-phong-inf: FPS: 835 FrameTime: 1.198 ms
[shading] shading=phong: FPS: 762 FrameTime: 1.312 ms
[shading] shading=cel: FPS: 739 FrameTime: 1.353 ms
[bump] bump-render=high-poly: FPS: 441 FrameTime: 2.268 ms
[bump] bump-render=normals: FPS: 1250 FrameTime: 0.800 ms
[bump] bump-render=height: FPS: 1147 FrameTime: 0.872 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 813 FrameTime: 1.230 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 363 FrameTime: 2.755 ms
[pulsar] light=false:quads=5:texture=false: FPS: 1136 FrameTime: 0.880 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 238 FrameTime: 4.202 ms
[desktop] effect=shadow:windows=4: FPS: 551 FrameTime: 1.815 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 146 FrameTime: 6.849 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 147 FrameTime: 6.803 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 158 FrameTime: 6.329 ms
[ideas] speed=duration: FPS: 201 FrameTime: 4.975 ms
[jellyfish] <default>: FPS: 551 FrameTime: 1.815 ms
[terrain] <default>: FPS: 48 FrameTime: 20.833 ms
[shadow] <default>: FPS: 419 FrameTime: 2.387 ms
[refract] <default>: FPS: 99 FrameTime: 10.101 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 1107 FrameTime: 0.903 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 786 FrameTime: 1.272 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 1068 FrameTime: 0.936 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 987 FrameTime: 1.013 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 718 FrameTime: 1.393 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 984 FrameTime: 1.016 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 997 FrameTime: 1.003 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 771 FrameTime: 1.297 ms
=======================================================
                                  glmark2 Score: 715
=======================================================


Added HMP scheduler.
Had to adapt existing code to kernel 4.14 (manually done in existing patches), and then add further fixes for the new structure and APIs in kernel 4.14.
With HMP enabled, GPU processes (and I think MFC too) are assigned to big cores, and GPU/VPU performance is greatly improved vs. the default scheduler.
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby Snk » Fri Oct 13, 2017 9:40 am

Good job, memeka!
User avatar
Snk
 
Posts: 220
Joined: Sun Jul 31, 2016 6:43 am
languages_spoken: Portuguese
ODROIDs: XU4 + eMMC 32GB + UART

Re: Kernel 4.14 debugging party

Unread postby phaseshifter » Fri Oct 13, 2017 10:17 am

when will h-k release a image to flash

i cannot build from the git hub ..as i have no idea how to do it...never built an image or a kernel...???
4.9.xx.xx odroids
phaseshifter
 
Posts: 2455
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Kernel 4.14 debugging party

Unread postby crashoverride » Fri Oct 13, 2017 10:24 am

memeka wrote:new from 4.9: DRM/KMS properly supports dmabuf-import for zero-copy buffers from MFC decoder.

memeka wrote:DRM/KMS on exynos does not support NV12/NV21

I successfully used both dmabuf and NV12 in projects targeting XU4 kernel 4.9
https://github.com/OtherCrashOverride/XU4VideoCube/tree/kernel4.9
https://github.com/OtherCrashOverride/moonlight-embedded-crashoverride/tree/xu4
crashoverride
 
Posts: 3079
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Kernel 4.14 debugging party

Unread postby memeka » Fri Oct 13, 2017 11:05 am

crashoverride wrote:
memeka wrote:new from 4.9: DRM/KMS properly supports dmabuf-import for zero-copy buffers from MFC decoder.

memeka wrote:DRM/KMS on exynos does not support NV12/NV21

I successfully used both dmabuf and NV12 in projects targeting XU4 kernel 4.9
https://github.com/OtherCrashOverride/XU4VideoCube/tree/kernel4.9
https://github.com/OtherCrashOverride/moonlight-embedded-crashoverride/tree/xu4


I see there X11 and OpenGL.
I was talking about DRM/KMS - no openGL (to convert to NV12/NV21), directly from console (no X11).
I can play now directly from console 1080p videos with a total of 4% CPU load, no mali/OpenGL-ES used.
Similarly, you use mali dmabuf import, I was talking about drm dmabuf import.
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby MastaG » Fri Oct 13, 2017 4:13 pm

Great job memeka !
MastaG
 
Posts: 160
Joined: Mon Aug 26, 2013 6:05 pm
languages_spoken: english

Re: Kernel 4.14 debugging party

Unread postby elatllat » Fri Oct 13, 2017 9:40 pm

phaseshifter wrote:...build from the github..?

Code: Select all
OLD=$(uname -r)
if [ ! -d /boot/$OLD ] ; then
   mkdir /boot/$OLD
   cp /media/boot/* /boot/$OLD/
fi
cd /opt
if [ ! -d linux ] ; then
   apt install -y build-essential git
   apt-mark hold bootini linux-image*
   git clone --depth 1 --branch odroidxu4-4.14.y https://github.com/mihailescu2m/linux/tree/odroidxu4-4.14.y
   cd linux
else
   cd linux
   git pull
   make clean
fi
make odroidxu3_defconfig
make -j7
cp arch/arm/boot/zImage arch/arm/boot/dts/exynos5422-odroidxu4.dtb /media/boot/
make modules_install
R=$(make kernelrelease)
cp arch/arm/boot/zImage /boot/zImage-$R
update-initramfs -c -k $R
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/initrd.img-$R /boot/uInitrd-$R
cp /boot/uInitrd-$R /media/boot/uInitrd
sync

Then reboot to use it
Code: Select all
shutdown -r now


Every time you do this an extra ~43MB of backup is made so be sure to trim that if you are low on space
Code: Select all
rm -r /lib/modules/4.9.4*
rm -r /boot/4.9.4*

but it's there so if you break things you can easily revert
Code: Select all
cp /boot/$(ls -1 /boot/ | tail -n 1)  /media/boot/
sync
shutdown -r now
Last edited by elatllat on Sat Oct 14, 2017 3:21 am, edited 2 times in total.
elatllat
 
Posts: 591
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4

Re: Kernel 4.14 debugging party

Unread postby phaseshifter » Sat Oct 14, 2017 12:06 am

@ elatllat coud you be more user freindly thanks those "if and fi commands "..i sort of get .i`ll rip a fresh emmc to try and do it but i am not shure how to implement this if-fi codes do i just do them from the command line

that is i need the command line exact commands for me to be successful in doing this..sorry for my lack of coding here ...!!!
4.9.xx.xx odroids
phaseshifter
 
Posts: 2455
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Kernel 4.14 debugging party

Unread postby mad_ady » Sat Oct 14, 2017 12:11 am

@phaseshifter: you can copy-paste the commands directly, or you can place them in a bash script. Run the script and it should do everything. I usually use this guide: https://github.com/umiddelb/armhf/wiki/ ... ARM-device, but you will need to exchange HardKernel's repo for memeka's repo.
User avatar
mad_ady
 
Posts: 2603
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Kernel 4.14 debugging party

Unread postby elatllat » Sat Oct 14, 2017 12:14 am

phaseshifter wrote:...exact commands...

is what the first block of code is.
You can copy paste it into a terminal (without the tab indenting)
or put it in a text file and run it;
Code: Select all
bash new_kernel.sh

If you go the script route you should start the file off with
Code: Select all
#!/bin/bash

#
# new_kernel.sh
#

set -e
trap 'echo "ERROR: $BASH_SOURCE:$LINENO $BASH_COMMAND" >&2' ERR

so it will stop if anything goes wrong and let you know about it.

mad_ady wrote:...this guide...

sucks :)
Last edited by elatllat on Sat Oct 14, 2017 12:25 am, edited 1 time in total.
elatllat
 
Posts: 591
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4

Re: Kernel 4.14 debugging party

Unread postby mad_ady » Sat Oct 14, 2017 12:34 am

@phaseshifter. There are no blanks to fill in. Just copy/paste elatllat's code in a terminal
User avatar
mad_ady
 
Posts: 2603
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Kernel 4.14 debugging party

Unread postby moon.linux » Sat Oct 14, 2017 2:08 am

Actually you need to use following command to checkout to source code.

Code: Select all
git clone https://github.com/mihailescu2m/linux.git -b odroidxu4-4.14.y


Opps sorry man !!!
Last edited by moon.linux on Sat Oct 14, 2017 4:26 am, edited 1 time in total.
moon.linux
 
Posts: 888
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Kernel 4.14 debugging party

Unread postby memeka » Sat Oct 14, 2017 4:08 am

I meant this to be a thread for 4.14 development not for 10 messages on how to do a git clone :)

@phaseshifter: kernel 4.14 is not out yet, this is a pre-release version, and there are many things not working yet.
Just booting the kernel you get kernel crash messages :roll:
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby memeka » Sat Oct 14, 2017 4:49 am

14 Oct 2017

fixeing Issue 3
USB3 ports appear functional, but needs more testing.

Code: Select all
root@odroid:~# uname -a
Linux odroid 4.14.0-rc4-03 #10 SMP PREEMPT Sat Oct 14 01:05:57 ACDT 2017 armv7l armv7l armv7l GNU/Linux
root@odroid:~# lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 480M
        |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 3: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
Last edited by memeka on Sat Oct 14, 2017 5:34 am, edited 1 time in total.
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby moon.linux » Sat Oct 14, 2017 5:08 am

Can you share this usb fix I would like to test this out.
moon.linux
 
Posts: 888
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Kernel 4.14 debugging party

Unread postby memeka » Sat Oct 14, 2017 5:21 am

moon.linux wrote:Can you share this usb fix I would like to test this out.


I just ported the usb3 patches from kernel 4.9 and just testing now.

With USB3 drive, a apple keyboard + mouse on the second USB3 port, and a usb wifi adapter on USB2 port, I get this:
Code: Select all
root@odroid:~# lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
        |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M
            |__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
            |__ Port 2: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
            |__ Port 3: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M


But when actually trying to access the drive (or if it's connected at boot), then I get a kernel crash :(
If I remove the second device from USB3 port, and leave only USB3 hdd, then I can use HDD on USB3 correctly. So it crashed only when there are multiple USB devices on the hub.
So it needs more investigating :?

EDIT:

patch 1: http://paste.debian.net/990653/
patch 2: http://paste.debian.net/990654/
patch 3: http://paste.debian.net/990655/
patch 4: http://paste.debian.net/990656/
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby memeka » Sat Oct 14, 2017 9:57 am

User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby odroid » Sat Oct 14, 2017 10:10 am

Great! This thread is "STICKY" now.
User avatar
odroid
Site Admin
 
Posts: 24662
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Kernel 4.14 debugging party

Unread postby memeka » Sat Oct 14, 2017 11:52 am

14 Oct 2017

UPDATE: I have managed to get all USB3 ports working correctly (at least with 1 USB3 device and 1 USB2 device at the same time).
I still need to do more testing, but I think the issue is fixed.

EDIT: I have pushed the patches on github. I can use USB3 HDD but only after inserting it after boot. If it's connected at boot I still get kernel error :(
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby marlonbrando » Sat Oct 14, 2017 3:28 pm

Thanks so much for doing this.

I've built the kernel but it isn't finding the ethernet device (a common problem). From the git logs, it seems like this should be fixed so I wonder if my configuration is off. I adapted it from a 4.13 version of the kernel that I was using more-or-less successfully.

I get an error trying to use the default configuration you mentioned:

% make odroidxu3_defconfig
***
*** Can't find default configuration "arch/arm/configs/odroidxu3_defconfig"!
***

I don't see a odroidxu*_defconfig in arch/arm/config but I do see a exynos_defconfig. Is that what we should be using?
marlonbrando
 
Posts: 7
Joined: Wed Aug 30, 2017 3:25 am
languages_spoken: english
ODROIDs: XU4

Re: Kernel 4.14 debugging party

Unread postby phaseshifter » Sat Oct 14, 2017 4:03 pm

how in the ulla do iget this thing to download all the 6million patches in one straight run without it hanging up on me..really...phase..and no i am not giving up..bloddy....
4.9.xx.xx odroids
phaseshifter
 
Posts: 2455
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Kernel 4.14 debugging party

Unread postby moon.linux » Sat Oct 14, 2017 5:35 pm

First I would like to go ahead in fixing the usbdrd phy to support better tuning of phy and bus.
so I am attaching few patches to support the phy tuning. some more change might be needed to get Ethernet to work on Usb 3.0 bus.
I will be working on this hope it work good. Attach are my config file https://pastebin.com/XfqApeyP

Code: Select all
root@odroid:~# lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
        |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
root@odroid:~#


Please ignore this post sorry for noise
Code: Select all
[   20.539982] xhci-hcd xhci-hcd.5.auto: Timeout while waiting for setup device command
[   20.776165] usb 6-1: device not accepting address 2, error -62
[   26.082961] xhci-hcd xhci-hcd.5.auto: Timeout while waiting for setup device command
[   31.416313] xhci-hcd xhci-hcd.5.auto: Timeout while waiting for setup device command
[   31.629454] usb 6-1: device not accepting address 3, error -62
[   36.962999] xhci-hcd xhci-hcd.5.auto: Timeout while waiting for setup device command
[   42.296303] xhci-hcd xhci-hcd.5.auto: Timeout while waiting for setup device command
[   42.509507] usb 6-1: device not accepting address 4, error -62
[   47.842953] xhci-hcd xhci-hcd.5.auto: Timeout while waiting for setup device command
[   53.176260] xhci-hcd xhci-hcd.5.auto: Timeout while waiting for setup device command
[   53.389486] usb 6-1: device not accepting address 5, error -62
[   53.426886] usb usb6-port1: unable to enumerate USB device
Attachments
usbphy.tar.gz
usbphy drd pathes
(8.74 KiB) Downloaded 6 times
Last edited by moon.linux on Sun Oct 15, 2017 12:33 am, edited 2 times in total.
moon.linux
 
Posts: 888
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Kernel 4.14 debugging party

Unread postby memeka » Sat Oct 14, 2017 6:59 pm

@moon.linux, have you read this: https://patchwork.kernel.org/patch/9525355/
https://github.com/mihailescu2m/linux/c ... abce83188f is scheduled for kernel 4.15, and deals with this issue.
also make sure to remove HDMI and power cable to do a hard reset after installing new kernel and/or dtb :)
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby phaseshifter » Sat Oct 14, 2017 7:09 pm

i tried after 3 3 gig downloads i have given up soz guys,...atm i dont have the dwnload capeabilty`s

i await the h-k image..phase...
4.9.xx.xx odroids
phaseshifter
 
Posts: 2455
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Kernel 4.14 debugging party

Unread postby memeka » Sat Oct 14, 2017 10:10 pm

I have updated my github repository with a more streamlined version of the patches.
I only tested with USB3 HDD:

* booting with no device attached to USB3 ports => OK
* booting with USB2 device attached to USB3 ports => OK (tried with wifi dongle, hub w/ keyboard & mouse)
* booting with USB3 HDD attached to USB3 port => kernel panic

* attaching USB3 HDD after boot => OK

So after these patches, the problem seems to remain initialization of UBS3 ports.
Attached is the panic when booting with USB3.0 HDD attached:
Code: Select all
[   18.437918] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[   18.453426] pgd = ec8cc000
[   18.457189] [00000004] *pgd=00000000
[   18.466365] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[   18.466370] Modules linked in: uas
[   18.466386] CPU: 7 PID: 452 Comm: ata_id Not tainted 4.14.0-rc4-03 #20
[   18.466392] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[   18.466397] task: c212b100 task.stack: ed526000
[   18.466407] PC is at bio_uncopy_user+0xbc/0x130
[   18.466412] LR is at 0x4
[   18.466416] pc : [<c03689d4>]    lr : [<00000004>]    psr: 60070013
[   18.466420] sp : ed527d68  ip : ed527d68  fp : ecae68c0
[   18.466424] r10: bef35c00  r9 : ffff9202  r8 : 00000000
[   18.466428] r7 : 00000000  r6 : ed767900  r5 : 00000000  r4 : 00000000
[   18.466432] r3 : ed53e880  r2 : 00000000  r1 : 00000001  r0 : ed767900
[   18.466438] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[   18.466442] Control: 10c5387d  Table: 6c8cc06a  DAC: 00000051
[   18.466448] Process ata_id (pid: 452, stack limit = 0xed526210)
[   18.466452] Stack: (0xed527d68 to 0xed528000)
[   18.466458] 7d60:                   ecae68c0 c020cd34 00000001 c03750fc ed767d80 00000000
[   18.466465] 7d80: ed767900 00000000 ed767900 c0d04d00 ed767d80 c03750d8 ed527e30 ecae6800
[   18.466471] 7da0: 00000000 c038a598 00000200 014000c0 00000000 c236d400 00000000 600f0013
[   18.466477] 7dc0: c212b100 c01ed5d4 c1480f4c 00000001 bef35610 c017157c 0000e000 0802005d
[   18.466483] 7de0: c2170730 c236d400 ed527e30 ffffe000 00000051 00000000 bef35610 c038b260
[   18.466489] 7e00: c0d5f90b 00000000 00000000 600f0013 c212b100 c0239d88 c1480f4c 00000001
[   18.466495] 7e20: 00000000 c017157c 00000000 00000000 00000053 fffffffd 0000200c 00000200
[   18.466501] 7e40: bef35a00 bef35c00 bef35c10 00007530 00000000 00000000 00000000 00000000
[   18.466507] 7e60: 00000000 00000000 0000000a 00000000 c2301800 00002285 bef355d0 0802005d
[   18.466513] 7e80: ee428340 c2301800 ed526000 c038b478 bef355d0 00000002 c212b640 00002285
[   18.466519] 7ea0: ee428340 bef355d0 0802005d c04fc920 ee428340 c04fc8ac 00002285 bef355d0
[   18.466525] 7ec0: 0802005d c03814c4 004c298c c0225898 ee9e1a10 ffffe000 00000000 00000000
[   18.466531] 7ee0: 00000000 600f0013 c212b100 c0237288 c1480f4c 00000001 004c298c c017157c
[   18.466536] 7f00: c0d5f8f7 bef355d0 ed4955f0 ed579040 00000003 c02293d8 ed526000 00000000
[   18.466542] 7f20: bef35610 c0228a2c ed60f000 ed60f000 200f0013 ed60f000 ed60f000 c020cbf8
[   18.466548] 7f40: ed60f000 00000003 00000003 ed579040 ed60f000 00000020 ed579048 ed4955f0
[   18.466554] 7f60: 00000000 c02132f0 00000000 ed579040 00000003 ed579040 00002285 bef355d0
[   18.466559] 7f80: ed526000 00000000 bef35610 c02293d8 00000003 00000001 00007530 00000036
[   18.466565] 7fa0: c01089e4 c0108820 00000003 00000001 00000003 00002285 bef355d0 fffffffd
[   18.466571] 7fc0: 00000003 00000001 00007530 00000036 bef35ee2 bef355d0 00000020 bef35610
[   18.466576] 7fe0: 004c4f58 bef3558c 004bfde7 b6e38da6 000f0030 00000003 00000000 00000002
[   18.466586] [<c03689d4>] (bio_uncopy_user) from [<c03750d8>] (blk_rq_unmap_user+0x24/0x64)
[   18.466597] [<c03750d8>] (blk_rq_unmap_user) from [<c038a598>] (sg_io+0x2b0/0x420)
[   18.466604] [<c038a598>] (sg_io) from [<c038b260>] (scsi_cmd_ioctl+0x4cc/0x6a4)
[   18.466611] [<c038b260>] (scsi_cmd_ioctl) from [<c038b478>] (scsi_cmd_blk_ioctl+0x40/0x48)
[   18.466621] [<c038b478>] (scsi_cmd_blk_ioctl) from [<c04fc920>] (sd_ioctl+0x74/0x90)
[   18.466631] [<c04fc920>] (sd_ioctl) from [<c03814c4>] (blkdev_ioctl+0x684/0xe34)
[   18.466642] [<c03814c4>] (blkdev_ioctl) from [<c0228a2c>] (do_vfs_ioctl+0xa0/0xa18)
[   18.466650] [<c0228a2c>] (do_vfs_ioctl) from [<c02293d8>] (SyS_ioctl+0x34/0x5c)
[   18.466660] [<c02293d8>] (SyS_ioctl) from [<c0108820>] (ret_fast_syscall+0x0/0x28)
[   18.466667] Code: e287e004 e1d084b8 e1a0c00d e5964050 (e8be000f)
[   18.466674] ---[ end trace 08d49f5187dafda7 ]---

Code: Select all
[   18.467757] Unable to handle kernel NULL pointer dereference at virtual address 00000014
[   18.467762] pgd = ed30c000
[   18.467766] [00000014] *pgd=00000000
[   18.467774] Internal error: Oops: 5 [#2] PREEMPT SMP ARM
[   18.467778] Modules linked in: uas
[   18.467790] CPU: 6 PID: 282 Comm: systemd-udevd Tainted: G      D         4.14.0-rc4-03 #20
[   18.467794] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[   18.467797] task: c22e9880 task.stack: ed7ca000
[   18.467808] PC is at copy_page_to_iter+0x8/0x524
[   18.467815] LR is at skb_copy_datagram_iter+0xe4/0x1d8
[   18.467820] pc : [<c039c634>]    lr : [<c06d270c>]    psr: 200f0013
[   18.467824] sp : ed7cbd80  ip : 00000000  fp : ed767b40
[   18.467828] r10: ed7cbf70  r9 : 00000002  r8 : 00000000
[   18.467831] r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : 0000ffff
[   18.467835] r3 : ed7cbf70  r2 : 00000000  r1 : 0000ffff  r0 : 00000000
[   18.467840] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[   18.467844] Control: 10c5387d  Table: 6d30c06a  DAC: 00000051
[   18.467848] Process systemd-udevd (pid: 282, stack limit = 0xed7ca210)
[   18.467853] Stack: (0xed7cbd80 to 0xed7cc000)
[   18.467860] bd80: c2310ddc c2310dd0 200f0013 c2310ddc ed7ca000 c083d1bc c2310cc0 0000ffff
[   18.467866] bda0: 00000000 00000000 00000000 00000000 00000002 ed7cbf70 ed767b40 c06d270c
[   18.467872] bdc0: 00000000 c0b74ebc ed7cbe1c c2310cc0 c2310fa4 00000000 00000000 00000040
[   18.467878] bde0: ed767b40 00000000 ed7cbe14 c0792fac ed7cbe24 ed7cbe1c ed7cbe14 edd8aa80
[   18.467883] be00: 00000000 ed7cbf68 00000000 edd8aa80 beb666d0 c23d33c0 00000000 ffffffa1
[   18.467889] be20: 00000000 00000000 00000051 c06c1ce0 ed7cbe70 ed7cbf70 ffffe000 00000000
[   18.467895] be40: 00000000 beb666c8 00000001 00000040 ed7cbf68 ed7cbeb8 beb666d0 beb666ec
[   18.467901] be60: edd8aa80 00000000 00472064 c06c1ffc 00000000 00000000 beb666c4 00000000
[   18.467907] be80: ee1116c8 c01717c8 ee111624 ee111600 00000f4c ed7cbea8 ed7cbee8 00000001
[   18.467913] bea0: 00000000 c0838318 00000001 ed7cbea8 ed7cbf58 00000000 ee111600 ffffe000
[   18.467919] bec0: 00000000 600f0093 00000001 00000001 c14a43e0 600f0013 0000000a c01717c8
[   18.467924] bee0: 00000001 00000080 00000000 c019cb3c c14a4300 c14a4344 c019cb3c 00000001
[   18.467930] bf00: 00000000 ffffe000 00000000 600f0013 00000001 00000001 ed7ca000 00000000
[   18.467936] bf20: 0000000a c01717c8 00000001 00000000 00000000 c01ed5d4 beb666d0 00000040
[   18.467942] bf40: edd8aa80 00000129 c01089e4 ed7ca000 00000000 c06c2ebc 00000000 00000107
[   18.467948] bf60: 00000000 fffffff7 00000000 00000000 00000000 00000000 00000000 ed7cbe78
[   18.467954] bf80: 00000001 beb662e4 beb666ec 00000018 00000000 00000000 beb666ec beb666d0
[   18.467960] bfa0: 00000001 c0108820 beb666ec beb666d0 00000007 beb666d0 00000040 00000000
[   18.467966] bfc0: beb666ec beb666d0 00000001 00000129 beb666c8 beb666c4 00473008 00472064
[   18.467971] bfe0: 00000000 beb6669c 004349df b6e3d9d8 600f0030 00000007 a599780c 44d6701e
[   18.467982] [<c039c634>] (copy_page_to_iter) from [<c06d270c>] (skb_copy_datagram_iter+0xe4/0x1d8)
[   18.467992] [<c06d270c>] (skb_copy_datagram_iter) from [<c0792fac>] (unix_dgram_recvmsg+0x164/0x3d8)
[   18.467999] [<c0792fac>] (unix_dgram_recvmsg) from [<c06c1ffc>] (___sys_recvmsg+0x90/0x178)
[   18.468006] [<c06c1ffc>] (___sys_recvmsg) from [<c06c2ebc>] (__sys_recvmsg+0x3c/0x68)
[   18.468013] [<c06c2ebc>] (__sys_recvmsg) from [<c0108820>] (ret_fast_syscall+0x0/0x28)
[   18.468020] Code: e59d800c eaffff7c e92d4ff0 e24dd01c (e5908014)
[   18.468026] ---[ end trace 08d49f5187dafda8 ]---
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby moon.linux » Sat Oct 14, 2017 11:10 pm

Thanks for your testing.
sorry are you using exynos_defconfig, yep I seen this on but not with my odroidxu3_defconfig.
Edited: If possible could you test my patches on plain kernel

Its trigger by the systemd
Code: Select all
 Process systemd-udevd (pid: 282, stack limit = 0xed7ca210)

Their is some internal issue while testing with usb hdd which hampers the transfer of data from ethernet to hdd
which can be triggerd by below command.

echo 'module xhci_hcd +p' > /sys/kernel/debug/dynamic_debug/control
Code: Select all
[  185.159410] xhci-hcd xhci-hcd.5.auto: ep 0x81 - asked for 16384 bytes, 16296 bytes untransferred
[  185.160540] xhci-hcd xhci-hcd.5.auto: ep 0x81 - asked for 16384 bytes, 16208 bytes untransferred
[  185.163958] xhci-hcd xhci-hcd.5.auto: ep 0x81 - asked for 16384 bytes, 16120 bytes untransferred
[  185.165686] xhci-hcd xhci-hcd.5.auto: ep 0x81 - asked for 16384 bytes, 16296 bytes untransferred
[  185.167253] xhci-hcd xhci-hcd.5.auto: ep 0x81 - asked for 16384 bytes, 15784 bytes untransferred
[  185.170087] xhci-hcd xhci-hcd.5.auto: ep 0x81 - asked for 16384 bytes, 15960 bytes untransferred
moon.linux
 
Posts: 888
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Kernel 4.14 debugging party

Unread postby marlonbrando » Sun Oct 15, 2017 12:13 am

memeka wrote:also make sure to remove HDMI and power cable to do a hard reset after installing new kernel and/or dtb :)


Hah! I never knew that I had to remove the HDMI cable. I was unplugging power but not the hdmi cable. Doing that gets ethernet working for me.
marlonbrando
 
Posts: 7
Joined: Wed Aug 30, 2017 3:25 am
languages_spoken: english
ODROIDs: XU4

Re: Kernel 4.14 debugging party

Unread postby marlonbrando » Sun Oct 15, 2017 12:33 am

marlonbrando wrote:
memeka wrote:also make sure to remove HDMI and power cable to do a hard reset after installing new kernel and/or dtb :)


Hah! I never knew that I had to remove the HDMI cable. I was unplugging power but not the hdmi cable. Doing that gets ethernet working for me.

I should mention that I am building this for a Fedora Rawhide image and, so far, it's working fine. I'm booting the kernel via a u-boot compiled with extlinux support so that I can select different kernels.
marlonbrando
 
Posts: 7
Joined: Wed Aug 30, 2017 3:25 am
languages_spoken: english
ODROIDs: XU4

Re: Kernel 4.14 debugging party

Unread postby marlonbrando » Sun Oct 15, 2017 1:25 am

moon.linux wrote:sorry are you using exynos_defconfig, yep I seen this on but not with my odroidxu3_defconfig.

I'm still looking for the odroidxu3_defconfig . Not seeing it in the source, although my .config does seem to be ok.
marlonbrando
 
Posts: 7
Joined: Wed Aug 30, 2017 3:25 am
languages_spoken: english
ODROIDs: XU4

Re: Kernel 4.14 debugging party

Unread postby memeka » Sun Oct 15, 2017 7:31 am

@marlonbrando: i started with exynos_defconfig and customized it. here's what i got: https://transfer.sh/A0Vks/config-4.14-odroid-xu4

15 Oct 2017

* added s2mps11 regulator fixes
* added UHS support
* added frequencies 1.8 -> 2.0 GHz
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby tobetter » Sun Oct 15, 2017 10:50 am

@memeka, first of all, appreciate your hard work. :D
For the issue, the kernel panic when USB3 storage is attached, this problem is not observed with Debian Jessie with your kernel branch. I've observed the same error on Ubuntu 16.04 as well, therefore I suspect the compatibility with 4.14 kernel.
tobetter
 
Posts: 2060
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Kernel 4.14 debugging party

Unread postby memeka » Sun Oct 15, 2017 11:22 am

tobetter wrote:@memeka, first of all, appreciate your hard work. :D
For the issue, the kernel panic when USB3 storage is attached, this problem is not observed with Debian Jessie with your kernel branch. I've observed the same error on Ubuntu 16.04 as well, therefore I suspect the compatibility with 4.14 kernel.


so you can boot with USB3 HDD attached on debian w/o error, but in ubuntu you have error?
what version of udev you installed on debian?

also, have you tested the gbit network? i don't connect my odroids with ethernet, so i cannot test :D
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby memeka » Sun Oct 15, 2017 12:11 pm

15 Oct 2017

* fixed frequencies and cooling (needs review from HK)
* cloudshell LCD & IR via pull request from @tobetter
Last edited by memeka on Sun Oct 15, 2017 12:41 pm, edited 1 time in total.
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby tobetter » Sun Oct 15, 2017 12:17 pm

memeka wrote:
tobetter wrote:@memeka, first of all, appreciate your hard work. :D
For the issue, the kernel panic when USB3 storage is attached, this problem is not observed with Debian Jessie with your kernel branch. I've observed the same error on Ubuntu 16.04 as well, therefore I suspect the compatibility with 4.14 kernel.


so you can boot with USB3 HDD attached on debian w/o error, but in ubuntu you have error?
what version of udev you installed on debian?

also, have you tested the gbit network? i don't connect my odroids with ethernet, so i cannot test :D

Sorry, I need a small correction that I've success with Ubuntu 14.04 server.
My boot log is, https://pastebin.com/rLE630b9

Here is the log of iperf from XU4 to my desktop through gbit hub and the bandwidth seems to be decent.
Code: Select all
odroid@odroid-server:~$ iperf -c 192.168.0.11 -P 10 -w 32k                                                                 
------------------------------------------------------------
Client connecting to 192.168.0.11, TCP port 5001
TCP window size: 64.0 KByte (WARNING: requested 32.0 KByte)
------------------------------------------------------------
[ 12] local 192.168.0.20 port 49188 connected with 192.168.0.11 port 5001
[  3] local 192.168.0.20 port 49172 connected with 192.168.0.11 port 5001
[  5] local 192.168.0.20 port 49174 connected with 192.168.0.11 port 5001
[  4] local 192.168.0.20 port 49176 connected with 192.168.0.11 port 5001
[  6] local 192.168.0.20 port 49178 connected with 192.168.0.11 port 5001
[  7] local 192.168.0.20 port 49180 connected with 192.168.0.11 port 5001
[  8] local 192.168.0.20 port 49182 connected with 192.168.0.11 port 5001
[  9] local 192.168.0.20 port 49184 connected with 192.168.0.11 port 5001
[ 10] local 192.168.0.20 port 49186 connected with 192.168.0.11 port 5001
[ 11] local 192.168.0.20 port 49190 connected with 192.168.0.11 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  57.1 MBytes  47.9 Mbits/sec
[  4]  0.0-10.0 sec   107 MBytes  89.5 Mbits/sec
[  6]  0.0-10.0 sec   106 MBytes  89.2 Mbits/sec
[  7]  0.0-10.0 sec  58.2 MBytes  48.8 Mbits/sec
[  8]  0.0-10.0 sec   101 MBytes  84.9 Mbits/sec
[  9]  0.0-10.0 sec   107 MBytes  89.5 Mbits/sec
[ 11]  0.0-10.0 sec   132 MBytes   111 Mbits/sec
[ 12]  0.0-10.0 sec  90.0 MBytes  75.4 Mbits/sec
[  5]  0.0-10.0 sec  96.1 MBytes  80.5 Mbits/sec
[ 10]  0.0-10.0 sec  64.1 MBytes  53.7 Mbits/sec
[SUM]  0.0-10.0 sec   919 MBytes   769 Mbits/sec
tobetter
 
Posts: 2060
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Kernel 4.14 debugging party

Unread postby memeka » Sun Oct 15, 2017 12:48 pm

so maybe newer udev or systemd?
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby tobetter » Sun Oct 15, 2017 12:52 pm

memeka wrote:so maybe newer udev or systemd?

This is what I have now.
Code: Select all
root@odroid-server:/media# dpkg -l | grep udev
ii  libudev1:armhf                  204-5ubuntu20                 armhf        libudev shared library
ii  udev                            204-5ubuntu20                 armhf        /dev/ and hotplug management daemon
root@odroid-server:/media# dpkg -l | grep systemd
ii  libpam-systemd:armhf            204-5ubuntu20                 armhf        system and service manager - PAM module
ii  libsystemd-daemon0:armhf        204-5ubuntu20                 armhf        systemd utility library
ii  libsystemd-login0:armhf         204-5ubuntu20                 armhf        systemd login utility library
ii  systemd-services                204-5ubuntu20                 armhf        systemd runtime services
ii  systemd-shim                    6-2bzr1                       armhf        shim for systemd
tobetter
 
Posts: 2060
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Kernel 4.14 debugging party

Unread postby memeka » Mon Oct 16, 2017 9:42 am

15 Oct 2017

I've added a lot of patches from HK's 4.9 repository:

* added SPI devices & spidev
* added ADC
* added /dev/gpiomem for rootless user GPIO access
* added INA231 driver + page fault fix
* added G2D dts entry
* added 'HPD' and 'vout' bootparamters + pre-build EDIDs
* smsc95xx can set mac address + ndo_poll_controller stub for netconsole support
* added Exynos5422 TMU, thermal fuse min max value
* sdmmc DDR50/SDR50 mode patch, modified HS400 Timing stability
* s2mps11 manual reset for hardware watchdog, system power on with alarm events
(this is also for watchdog, right?), activate watchdog reboot
* restore HYP mode configuration in cpu_resume"
(is there any other requirement for virtualization, except the timer and relevent configs?)

I've also added a few patches I am not sure why they are useful.
Can someone please explain what they are for:

* ARM: dts: exynos5422-odroidxu3: set adc ldo to always on
* ARM: EXYNOS: Change the default DMA coherent pool size -- can this be linked to the problem in ubuntu 16.04 udev - when booting with USB3 HDD connected, there's a kernel error?

There are also a few more patches I am thinking of adding, but again I need some explanation if and why they are useful:

* ODROID-XU3/4:Support for I2S master mode on soc. & HDMI audio output https://github.com/mihailescu2m/linux/c ... f5091d691f -- isn't the odroid audio support from https://git.kernel.org/pub/scm/linux/ke ... g/odroid.c working?
* ODROID-XU4: Never blend the base layer https://github.com/hardkernel/linux/com ... 5175c572d4 -- why?
* hwmon: pwm-fan: add sys attribute to control active cooling https://github.com/hardkernel/linux/com ... 8567e699d2 -- why is this necessary?
* owersun backport from 3.10 FBIOGET_DMABUF https://github.com/hardkernel/linux/com ... 6ff5735396 -- where is this used?
* ODROID-XU4 : Implement ASV table for cpu core (ARM/KFC) https://github.com/hardkernel/linux/com ... 0167f116aa -- i've seen the ASV tables for INT added, then reverted; is this implementation for CPU working fine, and useful?
* odroid-xu3/4: Using gpio-i2c on hdmi-edid https://github.com/hardkernel/linux/com ... b26539e71a -- what is this for?
* odroid-xu3/xu4:I2S DRV_SR(drive strength)=4x,for audio device https://github.com/hardkernel/linux/com ... 573a049c1e -- why?

There are also some patches I stayed away from:

* wifi/bt drivers - there are drivers, and updates, etc. Current version of drivers can be added later in one single commit
* cooling - there are a ton of commits fine-tuning cooling, one setting the temps higher, then lower, then higher again, it's like nobody can decide :)
These commits are NOT included in my branch:
- ARM: dts: odroidxu3: adjust thermal trip points https://github.com/mihailescu2m/linux/c ... 484d693118
- arm: dts: odroidxu3: Enable per cpu thermal trips (I think a version of this patch made it in 4.14 already, so this needs to be revisited) https://github.com/mihailescu2m/linux/c ... 707149883b
- ARM: dts: exynos5422-odroidxu3: update cooling-levels for pwm-fan https://github.com/hardkernel/linux/com ... ada98da9b8
- ARM: dts: Odroidxu4: update thermal cooling policy https://github.com/hardkernel/linux/com ... 0fd000005a
I would appreciate a pull request with the "final" version people have decided on (everything in 1 commit if possible).
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby tobetter » Mon Oct 16, 2017 10:34 am

You are doing a lot of work...

odroid-xu3/xu4:I2S DRV_SR(drive strength)=4x,for audio device,
https://github.com/hardkernel/linux/commit/5e59b01769e9fd9eb68055a3a577db573a049c1e
Short comment for this commit is to increase the drive strength of I2S bus and no conflict with your branch, it seems to be ok to go. :)

odroid-xu3/4: Using gpio-i2c on hdmi-edid
https://github.com/hardkernel/linux/commit/31e5c73e39de401ef611994276f945b26539e71a
This commit is to change I2C method for EDID from H/W I2C to GPIO bitbang due to the failure of EDID access for some display devices. It makes some conflict and needs to fix little bit with a test.

owersun backport from 3.10 FBIOGET_DMABUF
https://github.com/hardkernel/linux/commit/d790f2f76577cb8110719ebe317d6c6ff5735396
I remember this patch is to support Mali using fbdev rather than X11, oversun or mdrjr have better idea.

hwmon: pwm-fan: add sys attribute to control active cooling
https://github.com/hardkernel/linux/commit/c2e92581daeaa811ceec4f301d85688567e699d2
This patch is to control the FAN SPEED in userspace instead of using the fixed table in kernel, maybe you can refer the link this.
https://imgur.com/gallery/T2Noi

ODROID-XU3/4:Support for I2S master mode on soc. & HDMI audio output
I understand the patches what you are thinking to work is about the code to run I2S core, but another patch in 4.9 tree is about to support MAX98090 codec on XU3 and arbitrate with SPDIF for certain O/S platform such as OMV. Probably odroid can explain more better, I guess. :lol:
tobetter
 
Posts: 2060
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Kernel 4.14 debugging party

Unread postby odroid » Mon Oct 16, 2017 10:43 am

tobetter wrote:ODROID-XU3/4:Support for I2S master mode on soc. & HDMI audio output
I understand the patches what you are thinking to work is about the code to run I2S core, but another patch in 4.9 tree is about to support MAX98090 codec on XU3 and arbitrate with SPDIF for certain O/S platform such as OMV. Probably odroid can explain more better, I guess. :lol:


I think this patch must be applied to enable the HDMI sound output since the I2S core is a source of the HDMI sound generator.
Can you hear any sound from HDMI monitor without this patch?
User avatar
odroid
Site Admin
 
Posts: 24662
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Kernel 4.14 debugging party

Unread postby mdrjr » Mon Oct 16, 2017 10:44 am

owersun backport from 3.10 FBIOGET_DMABUF
Mali FB-Dev version needs it.

ODROID-XU3/4:Support for I2S master mode on soc. & HDMI audio output
Target to properly support ODROID-XU3 MAX98090 DAC.

ARM: EXYNOS: Change the default DMA coherent pool size
Some UAS and wifi drivers are too big and need it to be increased.
mdrjr
Site Admin
 
Posts: 11635
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Kernel 4.14 debugging party

Unread postby tobetter » Mon Oct 16, 2017 10:58 am

odroid wrote:
tobetter wrote:ODROID-XU3/4:Support for I2S master mode on soc. & HDMI audio output
I understand the patches what you are thinking to work is about the code to run I2S core, but another patch in 4.9 tree is about to support MAX98090 codec on XU3 and arbitrate with SPDIF for certain O/S platform such as OMV. Probably odroid can explain more better, I guess. :lol:


I think this patch must be applied to enable the HDMI sound output since the I2S core is a source of the HDMI sound generator.
Can you hear any sound from HDMI monitor without this patch?

I've cherry-picked the patch to 4.14 and seeing many conflicts in a code which set CLK sources, seems need to be fixed carefully.
tobetter
 
Posts: 2060
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Kernel 4.14 debugging party

Unread postby memeka » Mon Oct 16, 2017 11:03 am

thanks for all the replies.
I can't test some stuff, that's why I need some other testers :)
e.g. I can't test ethernet, but thanks @tobetter for checking gbit eth works :)
also i can't test sound :) maybe later i'll move the odroid to a TV, now i'm using a monitor with no sound :D

but it seems ok then to port:
* ODROID-XU3/4:Support for I2S master mode on soc. & HDMI audio output
* hwmon: pwm-fan: add sys attribute to control active cooling
* odroid-xu3/4: Using gpio-i2c on hdmi-edid
* odroid-xu3/xu4:I2S DRV_SR(drive strength)=4x,for audio device

I'll try to port ASV-cpu as well. I hope it's actually being used.

* owersun backport from 3.10 FBIOGET_DMABUF - but is it being used? I thought fbdev on 4.9 is slow (and it will be slow on 4.14 too?) this is why all emulators use kernel 3.10?
Maybe is better to move from fbdev to gbm?

The only remaining diff from 4.9 will then remain:
* ODROID-XU4: Never blend the base layer - easy to port, but no idea why is necessary
* thermals / cooling levels - no idea what are the "good values" and why, will go with whatever is in mainline atm
* bt/wifi - don't have the sources; maybe they should actually be moved off-tree and be used with DKMS?
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby tobetter » Mon Oct 16, 2017 11:26 am

memeka wrote:thanks for all the replies.
I can't test some stuff, that's why I need some other testers :)
e.g. I can't test ethernet, but thanks @tobetter for checking gbit eth works :)
also i can't test sound :) maybe later i'll move the odroid to a TV, now i'm using a monitor with no sound :D

but it seems ok then to port:
* ODROID-XU3/4:Support for I2S master mode on soc. & HDMI audio output
* hwmon: pwm-fan: add sys attribute to control active cooling
* odroid-xu3/4: Using gpio-i2c on hdmi-edid
* odroid-xu3/xu4:I2S DRV_SR(drive strength)=4x,for audio device

I'll try to port ASV-cpu as well. I hope it's actually being used.

* owersun backport from 3.10 FBIOGET_DMABUF - but is it being used? I thought fbdev on 4.9 is slow (and it will be slow on 4.14 too?) this is why all emulators use kernel 3.10?
Maybe is better to move from fbdev to gbm?

The only remaining diff from 4.9 will then remain:
* ODROID-XU4: Never blend the base layer - easy to port, but no idea why is necessary
* thermals / cooling levels - no idea what are the "good values" and why, will go with whatever is in mainline atm
* bt/wifi - don't have the sources; maybe they should actually be moved off-tree and be used with DKMS?

I've sent Pull-Request you for two patches which are simply updated. Other patches, for GPIO-I2C needs test and I2S patch needs to be fixed to code conflict. I've resolved the conflict for I2S patches but needs to test, the problem is that I also don't have the display with HDMI audio. Will see if the patch can work logically first and share it to be tested by someone else. FYI, I am building v4.14-rc5 which are just released a few minutes ago and rebasing with your branch doesn't have any conflict, will let you know if it boots.
tobetter
 
Posts: 2060
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Kernel 4.14 debugging party

Unread postby moon.linux » Mon Oct 16, 2017 12:13 pm

tobetter wrote:You are doing a lot of work...

odroid-xu3/4: Using gpio-i2c on hdmi-edid
https://github.com/hardkernel/linux/commit/31e5c73e39de401ef611994276f945b26539e71a
This commit is to change I2C method for EDID from H/W I2C to GPIO bitbang due to the failure of EDID access for some display devices. It makes some conflict and needs to fix little bit with a test.


i2c hdmi have following reg value. I2C_HDMI 0x12CE_0000.

This could be possible modified node in dts.
Code: Select all
       i2c: i2c@12CE0000 {
                #address-cells = <1>;
                #size-cells = <0>;
                compatible = "samsung,s3c2440-hdmiphy-i2c";
                reg = <0x12CE0000 0x100>;
                interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clock CLK_I2C_HDMI>;
                clock-names = "i2c";
                status = "disabled";

                hdmi_i2c_phy: hdmiphy@38 {
                        compatible = "exynos4210-hdmiphy";
                        reg = <0x38>;
                };
        };


tobetter wrote:hwmon: pwm-fan: add sys attribute to control active cooling
https://github.com/hardkernel/linux/commit/c2e92581daeaa811ceec4f301d85688567e699d2
This patch is to control the FAN SPEED in userspace instead of using the fixed table in kernel, maybe you can refer the link this.
https://imgur.com/gallery/T2Noi


We should probably handle this via user space fan control demon it will be much efficient.
moon.linux
 
Posts: 888
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Kernel 4.14 debugging party

Unread postby tobetter » Mon Oct 16, 2017 12:50 pm

I've rebased the branch of memeka with the tag v4.14-rc5 of mainline and it can boot up. The thing is that I am running Ubuntu 14.04 server instead of 16.04 as I mentioned in the previous post and not having kernel panic when USB3 storage is attached. Also, I fixed 3 commits which make compile error and squshed into previous commits for future maintenance. My branch based on v4.14-rc5 is uploaded into my github.
[1] https://github.com/tobetter/linux/commi ... febba2a769
[2] https://github.com/tobetter/linux/commi ... ad4195b9c9
[3] https://github.com/tobetter/linux/commi ... 6be2691d2b

I am working on this kernel config
[4] https://review.gerrithub.io/#/c/382617/

For HDMI&I2S, I've uploaded to GerritHub as well after fixing code conflict but not tested yet.
[5] https://review.gerrithub.io/#/c/382621/
tobetter
 
Posts: 2060
Joined: Mon Feb 25, 2013 10:55 am
Location: Kitchener, ON, Canada
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Kernel 4.14 debugging party

Unread postby memeka » Mon Oct 16, 2017 5:43 pm

one of the patches i added in the last series breaks DRM/KMS or dmabuf import in DRM/KMS (either that, or my latest .config)
this is interesting, because it means that possible it was working on 4.9 kernel, too.
i will have to investigate further the last patches before moving on to this new batch.

EDIT: it was some .config option.

I am also having issues running X11. When starting x11, I get this:
Code: Select all
[   528.356] (II) ARMSOC(0): Output HDMI-1 connected
[   528.356] (II) ARMSOC(0): Using exact sizes for initial modes
[   528.356] (II) ARMSOC(0): Output HDMI-1 using initial mode 1920x1080 +0+0
[   528.356] (II) ARMSOC(0): Got KMS resources
[   528.356] (**) ARMSOC(0): Display dimensions: (510, 290) mm
[   528.356] (**) ARMSOC(0): DPI set to (95, 94)
[   528.356] (II) Loading sub module "dri2"
[   528.356] (II) LoadModule: "dri2"
[   528.356] (II) Module "dri2" already built-in
[   528.356] (II) Loading sub module "exa"
[   528.356] (II) LoadModule: "exa"
[   528.357] (II) Loading /usr/lib/xorg/modules/libexa.so
[   528.358] (II) Module exa: vendor="X.Org Foundation"
[   528.358]    compiled for 1.18.4, module version = 2.6.0
[   528.358]    ABI class: X.Org Video Driver, version 20.0
[   528.358] (II) Loading sub module "fb"
[   528.358] (II) LoadModule: "fb"
[   528.358] (II) Loading /usr/lib/xorg/modules/libfb.so
[   528.359] (II) Module fb: vendor="X.Org Foundation"
[   528.359]    compiled for 1.18.4, module version = 1.0.0
[   528.359]    ABI class: X.Org ANSI C Emulation, version 0.4
[   528.359] (--) Depth 24 pixmap format is 32 bpp
[   528.367] (II) ARMSOC(0): Soft EXA mode
[   528.368] (II) EXA(0): Driver allocated offscreen pixmaps
[   528.368] (II) EXA(0): Driver registered support for the following operations:
[   528.368] (II)         Solid
[   528.368] (II)         Copy
[   528.368] (II)         Composite (RENDER acceleration)
[   528.368] (II) ARMSOC(0): G2D Initialized.
[   528.368] (II) ARMSOC(0): Setting swap chain size: 2
[   528.368] (II) ARMSOC(0): [DRI2] Setup complete
[   528.368] (II) ARMSOC(0): [DRI2]   DRI driver: armsoc
[   528.368] (==) ARMSOC(0): Backing store enabled
[   528.368] (==) ARMSOC(0): Silken mouse enabled
[   528.368] (II) ARMSOC(0): HW cursor init()
[   528.376] (EE) ARMSOC(0): ERROR: HW cursor: drmModeAddFB2 failed: Invalid argument
[   528.385] (WW) depth 32 FB unsupported : falling back to depth 24
[   528.394] (EE) ARMSOC(0): ERROR: Failed to add framebuffer to the scanout buffer
[   528.418] (EE) ARMSOC(0): ERROR: xf86SetDesiredModes() failed!
[   528.418] (EE) ARMSOC(0): ERROR: ARMSOCEnterVT() failed!
[   528.419] (EE)
[   528.419] (EE) Backtrace:
[   528.420] (EE)
[   528.420] (EE) Segmentation fault at address 0x200
[   528.420] (EE)
Fatal server error:
[   528.420] (EE) Caught signal 11 (Segmentation fault). Server aborting
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby elatllat » Tue Oct 17, 2017 9:28 am

memeka wrote:...X11...

can be forgotten because of your Wayland work?
elatllat
 
Posts: 591
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4

Re: Kernel 4.14 debugging party

Unread postby memeka » Tue Oct 17, 2017 10:17 am

17 Oct 2017

Updates:

* rebased on 4.14-rc5
* some dts regulator fixes
* added cpu ASV tables
* added owersun backport from 3.10 FBIOGET_DMABUF -- NOTE: fbdrivers changed a lot, it's unclear if this will still work -- needs TESTING!
* odroid-xu3/xu4:I2S DRV_SR(drive strength)=4x,for audio device
* odroid xu4 hdmi audio patch updated and applied

Remaining work:

+ ODROID-XU4: Never blend the base layer
https://github.com/hardkernel/linux/com ... 5175c572d4
- no idea why it's necessary

+ hwmon: pwm-fan: add sys attribute to control active cooling
https://github.com/hardkernel/linux/com ... 8567e699d2
- @tobetter: this patch is to control the FAN SPEED in userspace instead of using the fixed table in kernel, but:
- @moon.linux: we should probably handle this via user space fan control demon it will be much efficient -- i agree -- MEDIUM PRIORITY

+ odroid-xu3/4: Using gpio-i2c on hdmi-edid
https://github.com/hardkernel/linux/com ... b26539e71a
- @tobetter: change I2C method for EDID from H/W I2C to GPIO bitbang due to the failure of EDID access for some display devices
- @moon.linux: this could be possible modified node in dts viewtopic.php?f=146&t=28692&p=204398#p204377 -- we should test this first LOW PRIORITY

+ wifi/bt drivers
- to each their own :) LOW PRIORITY

+ cooling, including:
https://github.com/mihailescu2m/linux/c ... 484d693118
https://github.com/mihailescu2m/linux/c ... 707149883b (partially implemented upstream already)
https://github.com/hardkernel/linux/com ... ada98da9b8
https://github.com/hardkernel/linux/com ... 0fd000005a
- this should be revisited and re-implemented after it's agreed the correct values for trip points, temps, etc... HIGH PRIORITY
[/color]
Important to test:

+ drm/kms/x11/mali performance
+ mali fbdev dmabuf


Example .config: https://transfer.sh/pPVak/config-4.14-odroid-xu4
Last edited by memeka on Tue Oct 17, 2017 9:10 pm, edited 4 times in total.
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Kernel 4.14 debugging party

Unread postby memeka » Tue Oct 17, 2017 10:34 am

elatllat wrote:
memeka wrote:...X11...

can be forgotten because of your Wayland work?


Yeah :)

I can say Wayland is ready from my part, everything is usable.
The problem is that Mali drivers lack 2 things:
- dmabuf import
- nested compositor support

Because of this, browser support is poor (gnome-web needs nested compositor for acceleration, chrome and FF are still x11 apps running in xwayland, and there is no Mali in xwayland).
Also without dmabuf import, it’s more efficient to use software decoding. But mpv with software decoding is quite efficient, 150-160% cpu on 1080p video.

It’s more than 12 months I’ve asked arm for updated drivers (I have multiple threads open on their forum), but I don’t even get a reply :(
User avatar
memeka
 
Posts: 3654
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Next

Return to Linux Kernel 4.14 Debugging Party

Who is online

Users browsing this forum: No registered users and 0 guests