On 2015年03月26日 22:38, dev-request(a)lists.96boards.org wrote:
> Send Dev mailing list submissions to
> dev(a)lists.96boards.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.96boards.org/mailman/listinfo/dev
> or, via email, send a message with subject or body 'help' to
> dev-request(a)lists.96boards.org
>
> You can reach the person managing the list at
> dev-owner(a)lists.96boards.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Dev digest..."
>
>
> Today's Topics:
>
> 1. X fails to load on current alip image.... (Scott Bambrough)
Re : X fails to load on current alip image.... (Scott Bambrough)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 25 Mar 2015 20:12:18 -0400
> From: Scott Bambrough <scott.bambrough(a)linaro.org>
> To: dev(a)lists.96boards.org
> Subject: [Dev] X fails to load on current alip image....
> Message-ID:
> <CACxn-_PcmioU+0ScRp8VHT7VNLfS5tLOMj85r+smL3jhcXF+VQ(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I had a look at this failure, debugged this a bit...
>
> Started with latest snapshot (135), X fails to load.
>
> Rebuild kernel with the latest git, hikey-mali branch
> Rebuild boot and system images using latest kernel, setup networking
> via eth0 by default so I can ssh in.
> Flash boot and system partitions using rebuilt images.
> Reboot (1)
>
> Looking into Xorg.0.log see the following error:
>
> [ 60.310] (==) RandR enabled
> [ 60.333] (II) SELinux: Disabled on system
> [ 60.336] (II) AIGLX: Screen 0 is not DRI2 capable
> [ 60.336] (EE) AIGLX: reverting to software rendering
> [ 60.336] (EE) AIGLX error: dlopen of
> /usr/lib/aarch64-linux-gnu/dri/swrast_dri.so failed
> (/usr/lib/aarch64-linux-gnu/dri/swrast_dri.so: cannot open shared
> object file: No such file or directory)
> [ 60.336] (EE) GLX: could not load software renderer
> [ 60.336] (II) GLX: no usable GL providers found for screen 0
> [ 60.426] (II) config/udev: Adding drm device (/dev/dri/card0)
> [ 60.426] (II) xfree86: Adding drm device (/dev/dri/card0)
> [ 60.429] (EE) /dev/dri/card0: failed to set DRM interface version
> 1.4: Invalid argument
> [ 60.590] (EE) Server terminated successfully (0). Closing log file.
>
> Solve that error by installing the following package:
> # apt-get install libgl1-mesa-dri
>
> Reboot (2)
> Missing shared library is found.
>
> [ 43.500] (==) RandR enabled
> [ 43.523] (II) SELinux: Disabled on system
> [ 43.526] (II) AIGLX: Screen 0 is not DRI2 capable
> [ 43.526] (EE) AIGLX: reverting to software rendering
> [ 44.621] (II) AIGLX: Loaded and initialized swrast
> [ 44.621] (II) GLX: Initialized DRISWRAST GL provider for screen 0
> [ 44.970] (II) config/udev: Adding drm device (/dev/dri/card0)
> [ 44.971] (II) xfree86: Adding drm device (/dev/dri/card0)
> [ 44.973] (EE) /dev/dri/card0: failed to set DRM interface version
> 1.4: Invalid argument
>
> Why the error "/dev/dri/card0: failed to set DRM interface version
> 1.4: Invalid argument"?
> dmesg output has the following error
>
> [ 44.985050] ------------[ cut here ]------------
> [ 44.985082] WARNING: CPU: 1 PID: 1453 at
> /media/scottb/linaro/hikey/source/linux/drivers/gpu/drm/drm_ioctl.c:143
> drm_setversion+0x168/0x16c()
> [ 44.985095] No drm_driver.set_busid() implementation provided by
> hisi_drm_driver. Use drm_dev_set_unique() to set the unique name
> explicitly.
> [ 44.985100] Modules linked in:
> [ 44.985106] btwilink bluetooth st_drv mali wl18xx wlcore mac80211
> cfg80211 rfkill wlcore_sdio
> [ 44.985136] CPU: 1 PID: 1453 Comm: Xorg Tainted: G W
> 3.18.0linaro-hikey+ #3
> [ 44.985141] Call trace:
> [ 44.987598] [<ffffffc000088538>] dump_backtrace+0x0/0x124
> [ 44.987606] [<ffffffc00008866c>] show_stack+0x10/0x1c
> [ 44.987616] [<ffffffc000806bfc>] dump_stack+0x74/0xb8
> [ 44.987625] [<ffffffc0000afdb4>] warn_slowpath_common+0x90/0xb8
> [ 44.987631] [<ffffffc0000afe28>] warn_slowpath_fmt+0x4c/0x58
> [ 44.987639] [<ffffffc0004eaec4>] drm_setversion+0x164/0x16c
> [ 44.987646] [<ffffffc0004eaaa0>] drm_ioctl+0x254/0x4d0
> [ 44.987656] [<ffffffc0001d216c>] do_vfs_ioctl+0x368/0x5b0
> [ 44.987663] [<ffffffc0001d2434>] SyS_ioctl+0x80/0x98
> [ 44.987669] ---[ end trace bf426acc001551e5 ]---
>
> Solve that error by applying the following patch:
>
> diff --git a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
> b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
> index 987c530..b646bab 100644
> --- a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
> @@ -147,6 +147,7 @@ static struct drm_driver hisi_drm_driver = {
> | DRIVER_PRIME,
> .load = hisi_drm_load,
> .unload = hisi_drm_unload,
> + .set_busid = drm_platform_set_busid,
> .fops = &hisi_drm_fops,
> .name = "hisi-drm",
> .desc = "Hisilicon Terminal SoCs DRM Driver",
>
> Rebuild kernel
> Rebuild boot partition image with latest kernel and flash to the boot
> partition of the HiKey
> Reboot (3)
>
> dmesg has the following messages from DRM:
>
> linaro@linaro-alip:~/sdcard/xwork/3$ grep drm dmesg.txt
> [ 2.410636] calling drm_core_init+0x0/0x12c @ 1
> [ 2.410705] [drm] Initialized drm 1.1.0 20060810
> [ 2.410720] initcall drm_core_init+0x0/0x12c returned 0 after 69 usecs
> [ 2.410742] calling hisi_drm_platform_driver_init+0x0/0x20 @ 1
> [ 2.411790] [drm] Initialized hisi-drm 1.0.0 20141224 on minor 0
> [ 2.411893] initcall hisi_drm_platform_driver_init+0x0/0x20
> returned 0 after 1108 usecs
> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
> encoder i2c client
> [ 3.546316] [drm] HDMI: new_status=1,old_status=2,hpd=1,dpms=3
> [ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0 invalid.
> [ 3.602469] [drm] HDMI: mode=0,format_422=0,format_ycbcr=0
> [ 3.603762] [drm] May has one empty edid block!
> [ 3.624268] [drm]
> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
> [ 3.624270] [drm] mipi_init , exit success!
> [ 3.654185] hisi-drm smb:display-subsystem: fb0: frame buffer device
> [ 3.654192] hisi-drm smb:display-subsystem: registered panic notifier
> [ 43.134240] [drm] phystopstateclklane is not ready.
> [ 43.134350] [drm]
> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
> [ 43.134350] [drm] mipi_init , exit success!
>
> Xorg.0.log error setting DRM version is gone.
>
> [ 43.134] (==) RandR enabled
> [ 43.158] (II) SELinux: Disabled on system
> [ 43.161] (II) AIGLX: Screen 0 is not DRI2 capable
> [ 43.161] (EE) AIGLX: reverting to software rendering
> [ 43.173] (II) AIGLX: Loaded and initialized swrast
> [ 43.173] (II) GLX: Initialized DRISWRAST GL provider for screen 0
>
> Why do these errors occur?
> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
> encoder i2c client
> [ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0 invalid.
> [ 43.134240] [drm] phystopstateclklane is not ready.
>
> Out of my depth here, punting to HiSilicon engineers. Guodong can
> you take up these errors with HiSilicon please.
>
> Attached logs (dmesg, Xorg.0.log) from after every reboot. In text
> above you will see:
> Reboot (x) -- logs are in directory x if the tarball
>
> Also attached script (build.sh) I use to rebuild the images for
> flashing. It will need some rework as it is pretty custom to my
> system.
>
> Scott
Hi Scott,
Because i2c drvier don't mainline kernel driver, this driver require to
add some patches. I see you add i2c patch to slove your problem.
Thanks
Xinwei
On 2015年03月27日 11:39, dev-request(a)lists.96boards.org wrote:
> Send Dev mailing list submissions to
> dev(a)lists.96boards.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.96boards.org/mailman/listinfo/dev
> or, via email, send a message with subject or body 'help' to
> dev-request(a)lists.96boards.org
>
> You can reach the person managing the list at
> dev-owner(a)lists.96boards.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Dev digest..."
>
>
> Today's Topics:
>
> 1. Re: X fails to load on current alip image.... (Scott Bambrough)
> 2. Re: Dev Digest, Vol 2, Issue 46 (Xinwei Kong)
> 3. Re: Dev Digest, Vol 2, Issue 46 (Xinwei Kong)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 26 Mar 2015 19:06:38 -0400
> From: Scott Bambrough <scott.bambrough(a)linaro.org>
> To: Benjamin Gaignard <benjamin.gaignard(a)linaro.org>,
> dev(a)lists.96boards.org
> Cc: Dan Zhao <dan.zhao(a)hisilicon.com>, Lars-Peter Clausen
> <lars-peter.clausen(a)analog.com>, Guodong Xu <guodong.xu(a)linaro.com>
> Subject: Re: [Dev] X fails to load on current alip image....
> Message-ID:
> <CACxn-_MnKCB_t82BcAYeYarguKfJpUT-FHCf5D=sCQ8OjVQyiQ(a)mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Thu, Mar 26, 2015 at 3:03 PM, Benjamin Gaignard
> <benjamin.gaignard(a)linaro.org> wrote:
>> It could be simple call to an i2c adapter.
>> For example it is done like this in sti drm/kms driver:
>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drive…
>>
>> Benjamin
>>
>> Le jeudi 26 mars 2015, Scott Bambrough <scott.bambrough(a)linaro.org> a écrit
>> :
>>
>>> We have no hdmi ddc client in the kernel. I suspect this is the
>>> patches that HiSilicon needs to give us Guodong.
>>>
>>> Scott
>>>
>>> On Thu, Mar 26, 2015 at 1:58 PM, Tom Gall <tgall(a)gentoo.org> wrote:
>>>> FYI
>>>>
>>>> Advise from Benjamin.
>>>>
>>>> Begin forwarded message:
>>>>
>>>> Date: March 26, 2015 at 8:57:34 AM PDT
>>>> Subject: Re: [Dev] X fails to load on current alip image....
>>>> From: Benjamin Gaignard <benjamin.gaignard(a)linaro.org>
>>>> To: Tom Gall <tgall(a)gentoo.org>
>>>>
>>>> Hi,
>>>>
>>>> not sound familiar but I think that the hdmi ddc client isn't set on
>>>> the correct i2c bus so EDID can't be retrieved.
>>>>
>>>> I suggest to check if the hdmi ddc is set on the correct i2c bus and
>>>> if the dispaly is well connected.
>>>>
>>>> Regards,
>>>> Benjamin
>>>>
>>>> 2015-03-26 16:12 GMT+01:00 Tom Gall <tgall(a)gentoo.org>:
>>>>
>>>> Hi Benjamin,
>>>>
>>>> Does the drm error below look familiar?
>>>>
>>>> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
>>>> encoder i2c client
>>>>
>>>> Is that a real error or is there something else to look at?
>>>>
>>>> Thanks!
>>>> Tom
>>>>
>>>> Begin forwarded message:
>>>>
>>>> From: Scott Bambrough <scott.bambrough(a)linaro.org>
>>>> Subject: [Dev] X fails to load on current alip image....
>>>> To: <dev(a)lists.96boards.org>
>>>> Date: March 26, 2015 at 7:21:51 AM PDT
>>>>
>>>> I had a look at this failure, debugged this a bit...
>>>>
>>>> Started with latest snapshot (135), X fails to load.
>>>>
>>>> Rebuild kernel with the latest git, hikey-mali branch
>>>> Rebuild boot and system images using latest kernel, setup networking
>>>> via eth0 by default so I can ssh in.
>>>> Flash boot and system partitions using rebuilt images.
>>>> Reboot (1)
>>>>
>>>> Looking into Xorg.0.log see the following error:
>>>>
>>>> [ 60.310] (==) RandR enabled
>>>> [ 60.333] (II) SELinux: Disabled on system
>>>> [ 60.336] (II) AIGLX: Screen 0 is not DRI2 capable
>>>> [ 60.336] (EE) AIGLX: reverting to software rendering
>>>> [ 60.336] (EE) AIGLX error: dlopen of
>>>> /usr/lib/aarch64-linux-gnu/dri/swrast_dri.so failed
>>>> (/usr/lib/aarch64-linux-gnu/dri/swrast_dri.so: cannot open shared
>>>> object file: No such file or directory)
>>>> [ 60.336] (EE) GLX: could not load software renderer
>>>> [ 60.336] (II) GLX: no usable GL providers found for screen 0
>>>> [ 60.426] (II) config/udev: Adding drm device (/dev/dri/card0)
>>>> [ 60.426] (II) xfree86: Adding drm device (/dev/dri/card0)
>>>> [ 60.429] (EE) /dev/dri/card0: failed to set DRM interface version
>>>> 1.4: Invalid argument
>>>> [ 60.590] (EE) Server terminated successfully (0). Closing log file.
>>>>
>>>> Solve that error by installing the following package:
>>>> # apt-get install libgl1-mesa-dri
>>>>
>>>> Reboot (2)
>>>> Missing shared library is found.
>>>>
>>>> [ 43.500] (==) RandR enabled
>>>> [ 43.523] (II) SELinux: Disabled on system
>>>> [ 43.526] (II) AIGLX: Screen 0 is not DRI2 capable
>>>> [ 43.526] (EE) AIGLX: reverting to software rendering
>>>> [ 44.621] (II) AIGLX: Loaded and initialized swrast
>>>> [ 44.621] (II) GLX: Initialized DRISWRAST GL provider for screen 0
>>>> [ 44.970] (II) config/udev: Adding drm device (/dev/dri/card0)
>>>> [ 44.971] (II) xfree86: Adding drm device (/dev/dri/card0)
>>>> [ 44.973] (EE) /dev/dri/card0: failed to set DRM interface version
>>>> 1.4: Invalid argument
>>>>
>>>> Why the error "/dev/dri/card0: failed to set DRM interface version
>>>> 1.4: Invalid argument"?
>>>> dmesg output has the following error
>>>>
>>>> [ 44.985050] ------------[ cut here ]------------
>>>> [ 44.985082] WARNING: CPU: 1 PID: 1453 at
>>>> /media/scottb/linaro/hikey/source/linux/drivers/gpu/drm/drm_ioctl.c:143
>>>> drm_setversion+0x168/0x16c()
>>>> [ 44.985095] No drm_driver.set_busid() implementation provided by
>>>> hisi_drm_driver. Use drm_dev_set_unique() to set the unique name
>>>> explicitly.
>>>> [ 44.985100] Modules linked in:
>>>> [ 44.985106] btwilink bluetooth st_drv mali wl18xx wlcore mac80211
>>>> cfg80211 rfkill wlcore_sdio
>>>> [ 44.985136] CPU: 1 PID: 1453 Comm: Xorg Tainted: G W
>>>> 3.18.0linaro-hikey+ #3
>>>> [ 44.985141] Call trace:
>>>> [ 44.987598] [<ffffffc000088538>] dump_backtrace+0x0/0x124
>>>> [ 44.987606] [<ffffffc00008866c>] show_stack+0x10/0x1c
>>>> [ 44.987616] [<ffffffc000806bfc>] dump_stack+0x74/0xb8
>>>> [ 44.987625] [<ffffffc0000afdb4>] warn_slowpath_common+0x90/0xb8
>>>> [ 44.987631] [<ffffffc0000afe28>] warn_slowpath_fmt+0x4c/0x58
>>>> [ 44.987639] [<ffffffc0004eaec4>] drm_setversion+0x164/0x16c
>>>> [ 44.987646] [<ffffffc0004eaaa0>] drm_ioctl+0x254/0x4d0
>>>> [ 44.987656] [<ffffffc0001d216c>] do_vfs_ioctl+0x368/0x5b0
>>>> [ 44.987663] [<ffffffc0001d2434>] SyS_ioctl+0x80/0x98
>>>> [ 44.987669] ---[ end trace bf426acc001551e5 ]---
>>>>
>>>> Solve that error by applying the following patch:
>>>>
>>>> diff --git a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>>>> b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>>>> index 987c530..b646bab 100644
>>>> --- a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>>>> +++ b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>>>> @@ -147,6 +147,7 @@ static struct drm_driver hisi_drm_driver = {
>>>> | DRIVER_PRIME,
>>>> .load = hisi_drm_load,
>>>> .unload = hisi_drm_unload,
>>>> + .set_busid = drm_platform_set_busid,
>>>> .fops = &hisi_drm_fops,
>>>> .name = "hisi-drm",
>>>> .desc = "Hisilicon Terminal SoCs DRM Driver",
>>>>
>>>> Rebuild kernel
>>>> Rebuild boot partition image with latest kernel and flash to the boot
>>>> partition of the HiKey
>>>> Reboot (3)
>>>>
>>>> dmesg has the following messages from DRM:
>>>>
>>>> linaro@linaro-alip:~/sdcard/xwork/3$ grep drm dmesg.txt
>>>> [ 2.410636] calling drm_core_init+0x0/0x12c @ 1
>>>> [ 2.410705] [drm] Initialized drm 1.1.0 20060810
>>>> [ 2.410720] initcall drm_core_init+0x0/0x12c returned 0 after 69
>>>> usecs
>>>> [ 2.410742] calling hisi_drm_platform_driver_init+0x0/0x20 @ 1
>>>> [ 2.411790] [drm] Initialized hisi-drm 1.0.0 20141224 on minor 0
>>>> [ 2.411893] initcall hisi_drm_platform_driver_init+0x0/0x20
>>>> returned 0 after 1108 usecs
>>>> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
>>>> encoder i2c client
>>>> [ 3.546316] [drm] HDMI: new_status=1,old_status=2,hpd=1,dpms=3
>>>> [ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0
>>>> invalid.
>>>> [ 3.602469] [drm] HDMI: mode=0,format_422=0,format_ycbcr=0
>>>> [ 3.603762] [drm] May has one empty edid block!
>>>> [ 3.624268] [drm]
>>>> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
>>>> [ 3.624270] [drm] mipi_init , exit success!
>>>> [ 3.654185] hisi-drm smb:display-subsystem: fb0: frame buffer device
>>>> [ 3.654192] hisi-drm smb:display-subsystem: registered panic notifier
>>>> [ 43.134240] [drm] phystopstateclklane is not ready.
>>>> [ 43.134350] [drm]
>>>> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
>>>> [ 43.134350] [drm] mipi_init , exit success!
>>>>
>>>> Xorg.0.log error setting DRM version is gone.
>>>>
>>>> [ 43.134] (==) RandR enabled
>>>> [ 43.158] (II) SELinux: Disabled on system
>>>> [ 43.161] (II) AIGLX: Screen 0 is not DRI2 capable
>>>> [ 43.161] (EE) AIGLX: reverting to software rendering
>>>> [ 43.173] (II) AIGLX: Loaded and initialized swrast
>>>> [ 43.173] (II) GLX: Initialized DRISWRAST GL provider for screen 0
>>>>
>>>> Why do these errors occur?
>>>> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
>>>> encoder i2c client
>>>> [ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0
>>>> invalid.
>>>> [ 43.134240] [drm] phystopstateclklane is not ready.
>>>>
>>>> Out of my depth here, punting to HiSilicon engineers. Guodong can
>>>> you take up these errors with HiSilicon please.
>>>>
>>>> Attached logs (dmesg, Xorg.0.log) from after every reboot. In text
>>>> above you will see:
>>>> Reboot (x) -- logs are in directory x if the tarball
>>>>
>>>> Also attached script (build.sh) I use to rebuild the images for
>>>> flashing. It will need some rework as it is pretty custom to my
>>>> system.
>>>>
>>>> Scott
>>>>
>>>> --
>>>> Scott Bambrough
>>>> Technical Director, Member Services
>>>> Linaro
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Benjamin Gaignard
>>>>
>>>> Graphic Working Group
>>>>
>>>> Linaro.org │ Open source software for ARM SoCs
>>>>
>>>> Follow Linaro: Facebook | Twitter | Blog
>>>>
>>>>
>>>
>>>
>>> --
>>> Scott Bambrough
>>> Technical Director, Member Services
>>> Linaro
>>
>>
>> --
>>
>> Benjamin Gaignard
>>
>> Graphic Working Group
>>
>> Linaro.org │ Open source software for ARM SoCs
>>
>> Follow Linaro: Facebook | Twitter | Blog
>>
>>
> Yeah, I realized that afterwards. Seems like the Analog Device code
> in drivers/gpu/drm/i2c/adv7533.c drivers/media/i2c/adv7533.c registers
> one.
>
> See: static int adv7533_probe(struct i2c_client *i2c, const struct
> i2c_device_id *id)
> adv7533->i2c_main = i2c;
> adv7533->i2c_edid = i2c_new_dummy(i2c->adapter, edid_i2c_addr >> 1);
> if (!adv7533->i2c_edid)
> return -ENOMEM;
>
> If I grep through the dmesg output:
>
> scottb@eagle:~/tmp/logs/3$ grep "adv7533\|drm" dmesg.txt
> [ 2.410636] calling drm_core_init+0x0/0x12c @ 1
> [ 2.410705] [drm] Initialized drm 1.1.0 20060810
> [ 2.410720] initcall drm_core_init+0x0/0x12c returned 0 after 69 usecs
> [ 2.410742] calling hisi_drm_platform_driver_init+0x0/0x20 @ 1
> [ 2.411790] [drm] Initialized hisi-drm 1.0.0 20141224 on minor 0
> [ 2.411893] initcall hisi_drm_platform_driver_init+0x0/0x20
> returned 0 after 1108 usecs
> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
> encoder i2c client
> [ 2.420194] calling adv7533_init+0x0/0x24 @ 1
> [ 2.420254] initcall adv7533_init+0x0/0x24 returned 0 after 44 usecs
> [ 3.546316] [drm] HDMI: new_status=1,old_status=2,hpd=1,dpms=3
> [ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0 invalid.
> [ 3.602469] [drm] HDMI: mode=0,format_422=0,format_ycbcr=0
> [ 3.603762] [drm] May has one empty edid block!
> [ 3.624268] [drm]
> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
> [ 3.624270] [drm] mipi_init , exit success!
> [ 3.654185] hisi-drm smb:display-subsystem: fb0: frame buffer device
> [ 3.654192] hisi-drm smb:display-subsystem: registered panic notifier
> [ 43.134240] [drm] phystopstateclklane is not ready.
> [ 43.134350] [drm]
> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
> [ 43.134350] [drm] mipi_init , exit success!
>
> It appears the HiSilicon DRM driver is initialized, then the ADV7533.
> Could it just be the init order is wrong?
>
> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
> encoder i2c client
> The above error occurs before the ADV7533 driver is initialized.
>
> [ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0 invalid.
> [ 3.602469] [drm] HDMI: mode=0,format_422=0,format_ycbcr=0
> [ 3.603762] [drm] May has one empty edid block!
>
> The above errors stem from a call to:
> static int adv7533_get_modes(struct drm_encoder *encoder, struct
> drm_connector *connector)
>
> [ 3.654185] hisi-drm smb:display-subsystem: fb0: frame buffer device
> [ 3.654192] hisi-drm smb:display-subsystem: registered panic notifier
>
> These indicate the framebuffer is being created. These stem from a call to:
> static int drm_fb_helper_single_fb_probe(struct drm_fb_helper
> *fb_helper, int preferred_bpp)
>
> which is called from:
> bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel)
>
> which is called from:
> static struct hisi_drm_fbdev *hisi_drm_fbdev_create(struct drm_device *dev,
> unsigned int preferred_bpp, unsigned int num_crtc,
> unsigned int max_conn_count)
>
> Another thing I found odd is mipi_init seems to be called twice: Why?
>
> [ 3.624268] [drm]
> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
> [ 3.624270] [drm] mipi_init , exit success!
>
> [ 43.134350] [drm]
> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
> [ 43.134350] [drm] mipi_init , exit success!
>
> mipi_init is called from:
> static int hisi_dsi_init(struct hisi_dsi *dsi)
>
> which is called from:
> static int hisi_dsi_enable(struct hisi_dsi *dsi)
>
> which is called from:
> static void hisi_drm_encoder_dpms(struct drm_encoder *encoder, int mode)
> when mode = DRM_MODE_DPMS_ON
>
> There is a corresponding
> static int hisi_dsi_disable(struct hisi_dsi *dsi)
> called when mode is one of DRM_MODE_DPMS_STANDBY,
> DRM_MODE_DPMS_SUSPEND, DRM_MODE_DPMS_OFF
>
> It does nothing however:
>
> static int hisi_dsi_disable(struct hisi_dsi *dsi)
> {
> DRM_DEBUG_DRIVER("enter.\n");
> DRM_DEBUG_DRIVER("exit success.\n");
> return 0;
> }
>
> [ 43.134240] [drm] phystopstateclklane is not ready.
> This error is from mipi_init. The first time through mipi_init it
> doesn't occur, it does on the second time though.
> Seems to indicate a problem with the clocks for the mipi dsi data lanes.
>
> I really think we need to sort this out.
>
> Scott
>
Hi Benjamin,Scott,
This problem about "*ERROR* failed to find slave encoder i2c client" have no
effects on drm drive and other display function. Because the kernel hold probe
defer mechanism for module_init. We encounter this error but i2c driver will
find slave encoder i2c clientnot long after.You can research thisprobe
defer mechanism
thanks
Xinwei
On 2015年03月27日 11:08, Xinwei Kong wrote:
>
>
> On 2015年03月26日 22:38, dev-request(a)lists.96boards.org wrote:
>> Send Dev mailing list submissions to
>> dev(a)lists.96boards.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://lists.96boards.org/mailman/listinfo/dev
>> or, via email, send a message with subject or body 'help' to
>> dev-request(a)lists.96boards.org
>>
>> You can reach the person managing the list at
>> dev-owner(a)lists.96boards.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Dev digest..."
>>
>>
>> Today's Topics:
>>
>> 1. X fails to load on current alip image.... (Scott Bambrough)
>
> Re : X fails to load on current alip image.... (Scott Bambrough)
>
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Wed, 25 Mar 2015 20:12:18 -0400
>> From: Scott Bambrough <scott.bambrough(a)linaro.org>
>> To: dev(a)lists.96boards.org
>> Subject: [Dev] X fails to load on current alip image....
>> Message-ID:
>> <CACxn-_PcmioU+0ScRp8VHT7VNLfS5tLOMj85r+smL3jhcXF+VQ(a)mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> I had a look at this failure, debugged this a bit...
>>
>> Started with latest snapshot (135), X fails to load.
>>
>> Rebuild kernel with the latest git, hikey-mali branch
>> Rebuild boot and system images using latest kernel, setup networking
>> via eth0 by default so I can ssh in.
>> Flash boot and system partitions using rebuilt images.
>> Reboot (1)
>>
>> Looking into Xorg.0.log see the following error:
>>
>> [ 60.310] (==) RandR enabled
>> [ 60.333] (II) SELinux: Disabled on system
>> [ 60.336] (II) AIGLX: Screen 0 is not DRI2 capable
>> [ 60.336] (EE) AIGLX: reverting to software rendering
>> [ 60.336] (EE) AIGLX error: dlopen of
>> /usr/lib/aarch64-linux-gnu/dri/swrast_dri.so failed
>> (/usr/lib/aarch64-linux-gnu/dri/swrast_dri.so: cannot open shared
>> object file: No such file or directory)
>> [ 60.336] (EE) GLX: could not load software renderer
>> [ 60.336] (II) GLX: no usable GL providers found for screen 0
>> [ 60.426] (II) config/udev: Adding drm device (/dev/dri/card0)
>> [ 60.426] (II) xfree86: Adding drm device (/dev/dri/card0)
>> [ 60.429] (EE) /dev/dri/card0: failed to set DRM interface version
>> 1.4: Invalid argument
>> [ 60.590] (EE) Server terminated successfully (0). Closing log file.
>>
>> Solve that error by installing the following package:
>> # apt-get install libgl1-mesa-dri
>>
>> Reboot (2)
>> Missing shared library is found.
>>
>> [ 43.500] (==) RandR enabled
>> [ 43.523] (II) SELinux: Disabled on system
>> [ 43.526] (II) AIGLX: Screen 0 is not DRI2 capable
>> [ 43.526] (EE) AIGLX: reverting to software rendering
>> [ 44.621] (II) AIGLX: Loaded and initialized swrast
>> [ 44.621] (II) GLX: Initialized DRISWRAST GL provider for screen 0
>> [ 44.970] (II) config/udev: Adding drm device (/dev/dri/card0)
>> [ 44.971] (II) xfree86: Adding drm device (/dev/dri/card0)
>> [ 44.973] (EE) /dev/dri/card0: failed to set DRM interface version
>> 1.4: Invalid argument
>>
>> Why the error "/dev/dri/card0: failed to set DRM interface version
>> 1.4: Invalid argument"?
>> dmesg output has the following error
>>
>> [ 44.985050] ------------[ cut here ]------------
>> [ 44.985082] WARNING: CPU: 1 PID: 1453 at
>> /media/scottb/linaro/hikey/source/linux/drivers/gpu/drm/drm_ioctl.c:143
>> drm_setversion+0x168/0x16c()
>> [ 44.985095] No drm_driver.set_busid() implementation provided by
>> hisi_drm_driver. Use drm_dev_set_unique() to set the unique name
>> explicitly.
>> [ 44.985100] Modules linked in:
>> [ 44.985106] btwilink bluetooth st_drv mali wl18xx wlcore mac80211
>> cfg80211 rfkill wlcore_sdio
>> [ 44.985136] CPU: 1 PID: 1453 Comm: Xorg Tainted: G W
>> 3.18.0linaro-hikey+ #3
>> [ 44.985141] Call trace:
>> [ 44.987598] [<ffffffc000088538>] dump_backtrace+0x0/0x124
>> [ 44.987606] [<ffffffc00008866c>] show_stack+0x10/0x1c
>> [ 44.987616] [<ffffffc000806bfc>] dump_stack+0x74/0xb8
>> [ 44.987625] [<ffffffc0000afdb4>] warn_slowpath_common+0x90/0xb8
>> [ 44.987631] [<ffffffc0000afe28>] warn_slowpath_fmt+0x4c/0x58
>> [ 44.987639] [<ffffffc0004eaec4>] drm_setversion+0x164/0x16c
>> [ 44.987646] [<ffffffc0004eaaa0>] drm_ioctl+0x254/0x4d0
>> [ 44.987656] [<ffffffc0001d216c>] do_vfs_ioctl+0x368/0x5b0
>> [ 44.987663] [<ffffffc0001d2434>] SyS_ioctl+0x80/0x98
>> [ 44.987669] ---[ end trace bf426acc001551e5 ]---
>>
>> Solve that error by applying the following patch:
>>
>> diff --git a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>> b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>> index 987c530..b646bab 100644
>> --- a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>> +++ b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>> @@ -147,6 +147,7 @@ static struct drm_driver hisi_drm_driver = {
>> | DRIVER_PRIME,
>> .load = hisi_drm_load,
>> .unload = hisi_drm_unload,
>> + .set_busid = drm_platform_set_busid,
>> .fops = &hisi_drm_fops,
>> .name = "hisi-drm",
>> .desc = "Hisilicon Terminal SoCs DRM Driver",
>>
>> Rebuild kernel
>> Rebuild boot partition image with latest kernel and flash to the boot
>> partition of the HiKey
>> Reboot (3)
>>
>> dmesg has the following messages from DRM:
>>
>> linaro@linaro-alip:~/sdcard/xwork/3$ grep drm dmesg.txt
>> [ 2.410636] calling drm_core_init+0x0/0x12c @ 1
>> [ 2.410705] [drm] Initialized drm 1.1.0 20060810
>> [ 2.410720] initcall drm_core_init+0x0/0x12c returned 0 after 69
>> usecs
>> [ 2.410742] calling hisi_drm_platform_driver_init+0x0/0x20 @ 1
>> [ 2.411790] [drm] Initialized hisi-drm 1.0.0 20141224 on minor 0
>> [ 2.411893] initcall hisi_drm_platform_driver_init+0x0/0x20
>> returned 0 after 1108 usecs
>> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
>> encoder i2c client
>> [ 3.546316] [drm] HDMI: new_status=1,old_status=2,hpd=1,dpms=3
>> [ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0
>> invalid.
>> [ 3.602469] [drm] HDMI: mode=0,format_422=0,format_ycbcr=0
>> [ 3.603762] [drm] May has one empty edid block!
>> [ 3.624268] [drm]
>> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
>> [ 3.624270] [drm] mipi_init , exit success!
>> [ 3.654185] hisi-drm smb:display-subsystem: fb0: frame buffer device
>> [ 3.654192] hisi-drm smb:display-subsystem: registered panic notifier
>> [ 43.134240] [drm] phystopstateclklane is not ready.
>> [ 43.134350] [drm]
>> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
>> [ 43.134350] [drm] mipi_init , exit success!
>>
>> Xorg.0.log error setting DRM version is gone.
>>
>> [ 43.134] (==) RandR enabled
>> [ 43.158] (II) SELinux: Disabled on system
>> [ 43.161] (II) AIGLX: Screen 0 is not DRI2 capable
>> [ 43.161] (EE) AIGLX: reverting to software rendering
>> [ 43.173] (II) AIGLX: Loaded and initialized swrast
>> [ 43.173] (II) GLX: Initialized DRISWRAST GL provider for screen 0
>>
>> Why do these errors occur?
>> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
>> encoder i2c client
>> [ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0
>> invalid.
>> [ 43.134240] [drm] phystopstateclklane is not ready.
>>
>> Out of my depth here, punting to HiSilicon engineers. Guodong can
>> you take up these errors with HiSilicon please.
>>
>> Attached logs (dmesg, Xorg.0.log) from after every reboot. In text
>> above you will see:
>> Reboot (x) -- logs are in directory x if the tarball
>>
>> Also attached script (build.sh) I use to rebuild the images for
>> flashing. It will need some rework as it is pretty custom to my
>> system.
>>
>> Scott
>
> Hi Scott,
> Because i2c drvier don't mainline kernel driver, this driver
> require to
> add some patches. I see you add i2c patch to slove your problem.
you can patch this patch, you try it.
diff --git a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
index 987c530..a317baf 100644
--- a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
@@ -148,6 +148,7 @@ static struct drm_driver hisi_drm_driver = {
.load = hisi_drm_load,
.unload = hisi_drm_unload,
.fops = &hisi_drm_fops,
+ .set_busid = drm_platform_set_busid,
.name = "hisi-drm",
.desc = "Hisilicon Terminal SoCs DRM Driver",
.date = "20141224",
>
> Thanks
> Xinwei
>
>
On 2015年03月27日 11:08, Xinwei Kong wrote:
>
>
> On 2015年03月26日 22:38, dev-request(a)lists.96boards.org wrote:
>> Send Dev mailing list submissions to
>> dev(a)lists.96boards.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://lists.96boards.org/mailman/listinfo/dev
>> or, via email, send a message with subject or body 'help' to
>> dev-request(a)lists.96boards.org
>>
>> You can reach the person managing the list at
>> dev-owner(a)lists.96boards.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Dev digest..."
>>
>>
>> Today's Topics:
>>
>> 1. X fails to load on current alip image.... (Scott Bambrough)
>
> Re : X fails to load on current alip image.... (Scott Bambrough)
>
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Wed, 25 Mar 2015 20:12:18 -0400
>> From: Scott Bambrough <scott.bambrough(a)linaro.org>
>> To: dev(a)lists.96boards.org
>> Subject: [Dev] X fails to load on current alip image....
>> Message-ID:
>> <CACxn-_PcmioU+0ScRp8VHT7VNLfS5tLOMj85r+smL3jhcXF+VQ(a)mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> I had a look at this failure, debugged this a bit...
>>
>> Started with latest snapshot (135), X fails to load.
>>
>> Rebuild kernel with the latest git, hikey-mali branch
>> Rebuild boot and system images using latest kernel, setup networking
>> via eth0 by default so I can ssh in.
>> Flash boot and system partitions using rebuilt images.
>> Reboot (1)
>>
>> Looking into Xorg.0.log see the following error:
>>
>> [ 60.310] (==) RandR enabled
>> [ 60.333] (II) SELinux: Disabled on system
>> [ 60.336] (II) AIGLX: Screen 0 is not DRI2 capable
>> [ 60.336] (EE) AIGLX: reverting to software rendering
>> [ 60.336] (EE) AIGLX error: dlopen of
>> /usr/lib/aarch64-linux-gnu/dri/swrast_dri.so failed
>> (/usr/lib/aarch64-linux-gnu/dri/swrast_dri.so: cannot open shared
>> object file: No such file or directory)
>> [ 60.336] (EE) GLX: could not load software renderer
>> [ 60.336] (II) GLX: no usable GL providers found for screen 0
>> [ 60.426] (II) config/udev: Adding drm device (/dev/dri/card0)
>> [ 60.426] (II) xfree86: Adding drm device (/dev/dri/card0)
>> [ 60.429] (EE) /dev/dri/card0: failed to set DRM interface version
>> 1.4: Invalid argument
>> [ 60.590] (EE) Server terminated successfully (0). Closing log file.
>>
>> Solve that error by installing the following package:
>> # apt-get install libgl1-mesa-dri
>>
>> Reboot (2)
>> Missing shared library is found.
>>
>> [ 43.500] (==) RandR enabled
>> [ 43.523] (II) SELinux: Disabled on system
>> [ 43.526] (II) AIGLX: Screen 0 is not DRI2 capable
>> [ 43.526] (EE) AIGLX: reverting to software rendering
>> [ 44.621] (II) AIGLX: Loaded and initialized swrast
>> [ 44.621] (II) GLX: Initialized DRISWRAST GL provider for screen 0
>> [ 44.970] (II) config/udev: Adding drm device (/dev/dri/card0)
>> [ 44.971] (II) xfree86: Adding drm device (/dev/dri/card0)
>> [ 44.973] (EE) /dev/dri/card0: failed to set DRM interface version
>> 1.4: Invalid argument
>>
>> Why the error "/dev/dri/card0: failed to set DRM interface version
>> 1.4: Invalid argument"?
>> dmesg output has the following error
>>
>> [ 44.985050] ------------[ cut here ]------------
>> [ 44.985082] WARNING: CPU: 1 PID: 1453 at
>> /media/scottb/linaro/hikey/source/linux/drivers/gpu/drm/drm_ioctl.c:143
>> drm_setversion+0x168/0x16c()
>> [ 44.985095] No drm_driver.set_busid() implementation provided by
>> hisi_drm_driver. Use drm_dev_set_unique() to set the unique name
>> explicitly.
>> [ 44.985100] Modules linked in:
>> [ 44.985106] btwilink bluetooth st_drv mali wl18xx wlcore mac80211
>> cfg80211 rfkill wlcore_sdio
>> [ 44.985136] CPU: 1 PID: 1453 Comm: Xorg Tainted: G W
>> 3.18.0linaro-hikey+ #3
>> [ 44.985141] Call trace:
>> [ 44.987598] [<ffffffc000088538>] dump_backtrace+0x0/0x124
>> [ 44.987606] [<ffffffc00008866c>] show_stack+0x10/0x1c
>> [ 44.987616] [<ffffffc000806bfc>] dump_stack+0x74/0xb8
>> [ 44.987625] [<ffffffc0000afdb4>] warn_slowpath_common+0x90/0xb8
>> [ 44.987631] [<ffffffc0000afe28>] warn_slowpath_fmt+0x4c/0x58
>> [ 44.987639] [<ffffffc0004eaec4>] drm_setversion+0x164/0x16c
>> [ 44.987646] [<ffffffc0004eaaa0>] drm_ioctl+0x254/0x4d0
>> [ 44.987656] [<ffffffc0001d216c>] do_vfs_ioctl+0x368/0x5b0
>> [ 44.987663] [<ffffffc0001d2434>] SyS_ioctl+0x80/0x98
>> [ 44.987669] ---[ end trace bf426acc001551e5 ]---
>>
>> Solve that error by applying the following patch:
>>
>> diff --git a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>> b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>> index 987c530..b646bab 100644
>> --- a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>> +++ b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
>> @@ -147,6 +147,7 @@ static struct drm_driver hisi_drm_driver = {
>> | DRIVER_PRIME,
>> .load = hisi_drm_load,
>> .unload = hisi_drm_unload,
>> + .set_busid = drm_platform_set_busid,
>> .fops = &hisi_drm_fops,
>> .name = "hisi-drm",
>> .desc = "Hisilicon Terminal SoCs DRM Driver",
>>
>> Rebuild kernel
>> Rebuild boot partition image with latest kernel and flash to the boot
>> partition of the HiKey
>> Reboot (3)
>>
>> dmesg has the following messages from DRM:
>>
>> linaro@linaro-alip:~/sdcard/xwork/3$ grep drm dmesg.txt
>> [ 2.410636] calling drm_core_init+0x0/0x12c @ 1
>> [ 2.410705] [drm] Initialized drm 1.1.0 20060810
>> [ 2.410720] initcall drm_core_init+0x0/0x12c returned 0 after 69
>> usecs
>> [ 2.410742] calling hisi_drm_platform_driver_init+0x0/0x20 @ 1
>> [ 2.411790] [drm] Initialized hisi-drm 1.0.0 20141224 on minor 0
>> [ 2.411893] initcall hisi_drm_platform_driver_init+0x0/0x20
>> returned 0 after 1108 usecs
>> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
>> encoder i2c client
>> [ 3.546316] [drm] HDMI: new_status=1,old_status=2,hpd=1,dpms=3
>> [ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0
>> invalid.
>> [ 3.602469] [drm] HDMI: mode=0,format_422=0,format_ycbcr=0
>> [ 3.603762] [drm] May has one empty edid block!
>> [ 3.624268] [drm]
>> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
>> [ 3.624270] [drm] mipi_init , exit success!
>> [ 3.654185] hisi-drm smb:display-subsystem: fb0: frame buffer device
>> [ 3.654192] hisi-drm smb:display-subsystem: registered panic notifier
>> [ 43.134240] [drm] phystopstateclklane is not ready.
>> [ 43.134350] [drm]
>> mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
>> [ 43.134350] [drm] mipi_init , exit success!
>>
>> Xorg.0.log error setting DRM version is gone.
>>
>> [ 43.134] (==) RandR enabled
>> [ 43.158] (II) SELinux: Disabled on system
>> [ 43.161] (II) AIGLX: Screen 0 is not DRI2 capable
>> [ 43.161] (EE) AIGLX: reverting to software rendering
>> [ 43.173] (II) AIGLX: Loaded and initialized swrast
>> [ 43.173] (II) GLX: Initialized DRISWRAST GL provider for screen 0
>>
>> Why do these errors occur?
>> [ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
>> encoder i2c client
>> [ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0
>> invalid.
>> [ 43.134240] [drm] phystopstateclklane is not ready.
>>
>> Out of my depth here, punting to HiSilicon engineers. Guodong can
>> you take up these errors with HiSilicon please.
>>
>> Attached logs (dmesg, Xorg.0.log) from after every reboot. In text
>> above you will see:
>> Reboot (x) -- logs are in directory x if the tarball
>>
>> Also attached script (build.sh) I use to rebuild the images for
>> flashing. It will need some rework as it is pretty custom to my
>> system.
>>
>> Scott
>
> Hi Scott,
> Because i2c drvier don't mainline kernel driver, this driver
> require to
> add some patches. I see you add i2c patch to slove your problem.
I am sorry that this problem require a interface .set_busid =
drm_platform_set_busid,
this drm driver have not this interface.
>
> Thanks
> Xinwei
>
>
I had a look at this failure, debugged this a bit...
Started with latest snapshot (135), X fails to load.
Rebuild kernel with the latest git, hikey-mali branch
Rebuild boot and system images using latest kernel, setup networking
via eth0 by default so I can ssh in.
Flash boot and system partitions using rebuilt images.
Reboot (1)
Looking into Xorg.0.log see the following error:
[ 60.310] (==) RandR enabled
[ 60.333] (II) SELinux: Disabled on system
[ 60.336] (II) AIGLX: Screen 0 is not DRI2 capable
[ 60.336] (EE) AIGLX: reverting to software rendering
[ 60.336] (EE) AIGLX error: dlopen of
/usr/lib/aarch64-linux-gnu/dri/swrast_dri.so failed
(/usr/lib/aarch64-linux-gnu/dri/swrast_dri.so: cannot open shared
object file: No such file or directory)
[ 60.336] (EE) GLX: could not load software renderer
[ 60.336] (II) GLX: no usable GL providers found for screen 0
[ 60.426] (II) config/udev: Adding drm device (/dev/dri/card0)
[ 60.426] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 60.429] (EE) /dev/dri/card0: failed to set DRM interface version
1.4: Invalid argument
[ 60.590] (EE) Server terminated successfully (0). Closing log file.
Solve that error by installing the following package:
# apt-get install libgl1-mesa-dri
Reboot (2)
Missing shared library is found.
[ 43.500] (==) RandR enabled
[ 43.523] (II) SELinux: Disabled on system
[ 43.526] (II) AIGLX: Screen 0 is not DRI2 capable
[ 43.526] (EE) AIGLX: reverting to software rendering
[ 44.621] (II) AIGLX: Loaded and initialized swrast
[ 44.621] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[ 44.970] (II) config/udev: Adding drm device (/dev/dri/card0)
[ 44.971] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 44.973] (EE) /dev/dri/card0: failed to set DRM interface version
1.4: Invalid argument
Why the error "/dev/dri/card0: failed to set DRM interface version
1.4: Invalid argument"?
dmesg output has the following error
[ 44.985050] ------------[ cut here ]------------
[ 44.985082] WARNING: CPU: 1 PID: 1453 at
/media/scottb/linaro/hikey/source/linux/drivers/gpu/drm/drm_ioctl.c:143
drm_setversion+0x168/0x16c()
[ 44.985095] No drm_driver.set_busid() implementation provided by
hisi_drm_driver. Use drm_dev_set_unique() to set the unique name
explicitly.
[ 44.985100] Modules linked in:
[ 44.985106] btwilink bluetooth st_drv mali wl18xx wlcore mac80211
cfg80211 rfkill wlcore_sdio
[ 44.985136] CPU: 1 PID: 1453 Comm: Xorg Tainted: G W
3.18.0linaro-hikey+ #3
[ 44.985141] Call trace:
[ 44.987598] [<ffffffc000088538>] dump_backtrace+0x0/0x124
[ 44.987606] [<ffffffc00008866c>] show_stack+0x10/0x1c
[ 44.987616] [<ffffffc000806bfc>] dump_stack+0x74/0xb8
[ 44.987625] [<ffffffc0000afdb4>] warn_slowpath_common+0x90/0xb8
[ 44.987631] [<ffffffc0000afe28>] warn_slowpath_fmt+0x4c/0x58
[ 44.987639] [<ffffffc0004eaec4>] drm_setversion+0x164/0x16c
[ 44.987646] [<ffffffc0004eaaa0>] drm_ioctl+0x254/0x4d0
[ 44.987656] [<ffffffc0001d216c>] do_vfs_ioctl+0x368/0x5b0
[ 44.987663] [<ffffffc0001d2434>] SyS_ioctl+0x80/0x98
[ 44.987669] ---[ end trace bf426acc001551e5 ]---
Solve that error by applying the following patch:
diff --git a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
index 987c530..b646bab 100644
--- a/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hisi_drm_drv.c
@@ -147,6 +147,7 @@ static struct drm_driver hisi_drm_driver = {
| DRIVER_PRIME,
.load = hisi_drm_load,
.unload = hisi_drm_unload,
+ .set_busid = drm_platform_set_busid,
.fops = &hisi_drm_fops,
.name = "hisi-drm",
.desc = "Hisilicon Terminal SoCs DRM Driver",
Rebuild kernel
Rebuild boot partition image with latest kernel and flash to the boot
partition of the HiKey
Reboot (3)
dmesg has the following messages from DRM:
linaro@linaro-alip:~/sdcard/xwork/3$ grep drm dmesg.txt
[ 2.410636] calling drm_core_init+0x0/0x12c @ 1
[ 2.410705] [drm] Initialized drm 1.1.0 20060810
[ 2.410720] initcall drm_core_init+0x0/0x12c returned 0 after 69 usecs
[ 2.410742] calling hisi_drm_platform_driver_init+0x0/0x20 @ 1
[ 2.411790] [drm] Initialized hisi-drm 1.0.0 20141224 on minor 0
[ 2.411893] initcall hisi_drm_platform_driver_init+0x0/0x20
returned 0 after 1108 usecs
[ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
encoder i2c client
[ 3.546316] [drm] HDMI: new_status=1,old_status=2,hpd=1,dpms=3
[ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0 invalid.
[ 3.602469] [drm] HDMI: mode=0,format_422=0,format_ycbcr=0
[ 3.603762] [drm] May has one empty edid block!
[ 3.624268] [drm]
mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
[ 3.624270] [drm] mipi_init , exit success!
[ 3.654185] hisi-drm smb:display-subsystem: fb0: frame buffer device
[ 3.654192] hisi-drm smb:display-subsystem: registered panic notifier
[ 43.134240] [drm] phystopstateclklane is not ready.
[ 43.134350] [drm]
mipi_init,pixcel_clk=75,dphy_freq=641,hsa=42,hbp=117,hline=1760
[ 43.134350] [drm] mipi_init , exit success!
Xorg.0.log error setting DRM version is gone.
[ 43.134] (==) RandR enabled
[ 43.158] (II) SELinux: Disabled on system
[ 43.161] (II) AIGLX: Screen 0 is not DRI2 capable
[ 43.161] (EE) AIGLX: reverting to software rendering
[ 43.173] (II) AIGLX: Loaded and initialized swrast
[ 43.173] (II) GLX: Initialized DRISWRAST GL provider for screen 0
Why do these errors occur?
[ 2.412661] [drm:hisi_dsi_probe] *ERROR* failed to find slave
encoder i2c client
[ 3.602363] hisi-drm smb:display-subsystem: DSI-1: EDID block 0 invalid.
[ 43.134240] [drm] phystopstateclklane is not ready.
Out of my depth here, punting to HiSilicon engineers. Guodong can
you take up these errors with HiSilicon please.
Attached logs (dmesg, Xorg.0.log) from after every reboot. In text
above you will see:
Reboot (x) -- logs are in directory x if the tarball
Also attached script (build.sh) I use to rebuild the images for
flashing. It will need some rework as it is pretty custom to my
system.
Scott
--
Scott Bambrough
Technical Director, Member Services
Linaro
The patch series also have been send pull request at git-hub:
https://github.com/96boards/arm-trusted-firmware/pull/6
Also send to mailing list to get more feedback and review.
On hi6220, the mcu firmware image will be loaded so that later kernel
can use cpufreq successfully. So below patches are trying to enable
this feature.
During the debugging, found it's very fragile for the registers' order,
so add memory barrier for mmio register accessing; this is fixed by
patch 1;
The mcu image loading are mainly finished by patch 3/6; But the mcu will
not work well until init the paramters within sram and enable some clocks
before enable mcu, so other dvfs/hkadc related patches are trying to
enable this part.
Leo Yan (11):
Add memory barrier for mmio accessing
hikey: re-work for register files
hikey: add mcu image loading driver
hikey: add hkadc driver support
hikey: add header file for sram
hikey: load mcu binary in BL2
Load BL30 after io storage has been initialized
hikey: BL1: polish register definition
hikey: add support for dvfs driver
hikey: add building for adc/mcu/acpu drivers
hikey: support dvfs in pll main flow
bl2/bl2_main.c | 6 +-
include/lib/mmio.h | 22 +-
plat/hikey/aarch64/hikey_common.c | 6 +
plat/hikey/bl1_plat_setup.c | 10 +-
plat/hikey/bl2_plat_setup.c | 40 ++
plat/hikey/drivers/hisi_adc.c | 218 +++++++++
plat/hikey/drivers/hisi_dvfs.c | 775 ++++++++++++++++++++++++++++++++
plat/hikey/drivers/hisi_mcu.c | 247 ++++++++++
plat/hikey/hikey_def.h | 3 +
plat/hikey/include/hi6220.h | 308 +------------
plat/hikey/include/hi6220_regs_acpu.h | 321 +++++++++++++
plat/hikey/include/hi6220_regs_ao.h | 357 +++++++++++++++
plat/hikey/include/hi6220_regs_peri.h | 404 +++++++++++++++++
plat/hikey/include/hi6220_regs_pmctrl.h | 126 ++++++
plat/hikey/include/hi6553.h | 4 +
plat/hikey/include/hisi_hkadc.h | 152 +++++++
plat/hikey/include/hisi_mcu.h | 41 ++
plat/hikey/include/hisi_sram_map.h | 307 +++++++++++++
plat/hikey/include/platform_def.h | 8 +-
plat/hikey/plat_io_storage.c | 10 +
plat/hikey/platform.mk | 3 +
plat/hikey/pll.c | 15 +-
plat/hikey/usb.c | 22 +-
23 files changed, 3079 insertions(+), 326 deletions(-)
create mode 100644 plat/hikey/drivers/hisi_adc.c
create mode 100644 plat/hikey/drivers/hisi_dvfs.c
create mode 100644 plat/hikey/drivers/hisi_mcu.c
create mode 100644 plat/hikey/include/hi6220_regs_acpu.h
create mode 100644 plat/hikey/include/hi6220_regs_ao.h
create mode 100644 plat/hikey/include/hi6220_regs_peri.h
create mode 100644 plat/hikey/include/hi6220_regs_pmctrl.h
create mode 100644 plat/hikey/include/hisi_hkadc.h
create mode 100644 plat/hikey/include/hisi_mcu.h
create mode 100644 plat/hikey/include/hisi_sram_map.h
--
1.9.1
Hi all,
I am running the ARM Trusted Firmware on my HiKey board. I found that BL1
hangs if I build it with the version of GCC that comes with my Ubuntu 14.10
distribution [1] or with another 4.9 build from Linaro [2]. However, it
works as expected if I use the 4.8 Linaro build [3] as recommended on the
HiKey UEFI wiki [4].
Basically I found two separate issues, and I'm not sure if they are bugs in
GCC or HiKey ATF. Here is the story...
With GCC 4.9 [1], the boot hangs, LED#2 blinks and "00000000f20003e8" is
printed on UART0 about every second. Let's call this bug #1. The hang
occurs in hi6220_pll_init() [5], execution never gets passed this line:
mmio_write_32(0x0, 0xa5a55a5a);
So I checked the objdump outputs (bl1.dump).
- Working compiler [3] gives:
f98041f0: d2800000 mov x0, #0x0 //
#0
f98041f4: 528b4b41 mov w1, #0x5a5a //
#23130
f98041f8: 72b4b4a1 movk w1, #0xa5a5, lsl #16
f98041fc: b9000001 str w1, [x0]
- Bad compiler [1] produces:
f9804184: d2800000 mov x0, #0x0 //
#0
f9804188: b900001f str wzr, [x0]
f980418c: d4207d00 brk #0x3e8
What?! Is there some kind of smart detection in the compiler assuming that
one shouldn't write to address zero?
If I change address to 0x4, the code goes past this location but later
hangs with the same LED status as above (b0100) and code "0000000096000021"
on the console. This is bug #2.
I tracked it down to the initialization of some structures on the stack
when entering usb_handle_control_request() [6]. Looks like an alignment
issue, since removing the packed attribute on struct
usb_endpoint_descriptor [7] fixes the bug.
So... What kind of bugs do you guys think we have here, and who should I
report them to?
[1] aarch64-linux-gnu-gcc (Ubuntu/Linaro 4.9.1-16ubuntu6) 4.9.1
[2] aarch64-linux-gnu-gcc (Linaro GCC 2014.11) 4.9.3 20141031 (prerelease)
[3] aarch64-linux-gnu-gcc (crosstool-NG linaro-1.13.1-4.8-2014.04 - Linaro
GCC 4.8-2014.04) 4.8.3 20140401 (prerelease)
[4] https://github.com/96boards/documentation/wiki/UEFI
[5]
https://github.com/96boards/arm-trusted-firmware/blob/bbd623798cb775c4c0445…
[6]
https://github.com/96boards/arm-trusted-firmware/blob/bbd623798cb775c4c0445…
[7]
https://github.com/96boards/arm-trusted-firmware/blob/bbd623798cb775c4c0445…
Thanks,
--
Jerome
Hi,
Just for anyone interested, I bought an FTDI Chip
TTL-232RG-VREG1V8-WE (1.8 volt) USB to TTL serial cable
and soldered the wire leads the the Hikey J16 as so:
ftdi orange (TX) - Hikey pin2 (RX)
ftdi yellow (RX) - Hikey pin4 (TX)
ftdi black (GND) - Hikey pin3 (GND)
ftdi red (VCC) - open
ftdi green (RTS) - open
ftdi brown (CTS) - open
Seems to be working fine.
[1] http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232RG_CA…
-Geoff
Hi,
Further to Jeromes email about hangs / compiler flags for BL1.
I find on my hikey board with software which usually boot OK, around 1 in 5
cold boots I can provoke another hang in BL1.
Switch to aarch64 mode. CPU0 executes at 0xf9801000!
NOTICE: Booting Trusted Firmware
NOTICE: BL1: v1.1(release):9a97502
NOTICE: BL1: Built : 08:13:36, Mar 10 2015
0000000002000000000000000200000000000000020000000000000002000000
(repeating at 1Hz)
Has anyone else experienced this?
regards,
Peter.
I've been playing with Bluetooth and have had some success.
I started with Debian snapshot 132. If flashed the boot partition
with boot-fat.img and the system partition with
hikey-jessie_developer_20150319-132.img. This gave me a Debian Jessie
console image. The Debian Jessie image uses BlueZ 5.23 on the HiKey,
and there are not a lot of instructions on the internet for using
BlueZ5. BlueZ4 and BlueZ5 are quite different, many of the utilities
in BlueZ4 no longer exist.
Snapshot 132 allows you to power on the BT radio and discover devices.
You can also pair the HiKey with most devices. However the kernel in
snapshot 132 does not support BT HID devices. We need to alter the
kernel configuration to build BT HID support as a module, and install
it on the images (see the attached patch). I rebuilt the kernel, and
the boot-fat.image with it and flashed. I also had to rebuild the
system partition with modules to match my kernel and flash it into the
system partition.
Once I did that the following works:
Setup Bluetooth Keyboard
------------------------------------------
$ sudo su
# bluetoothctl -a
[bluetooth]# power on
[bluetooth]# agent KeyboardOnly
[bluetooth]# default-agent
[bluetooth]# pairable on
[bluetooth]# scan on
[bluetooth]# pair 01:02:03:04:05:06
[bluetooth]# trust 01:02:03:04:05:06
[bluetooth]# connect 01:02:03:04:05:06
[bluetooth]# quit
After this I can type and see characters on the HDMI console. If the
keyboard disconnects due to power off I had to run bluetoothctl and
connect again. To fix this:
Create file: /etc/bluetooth-keyboard.conf with the following contents
# Config file for bluetooth-keyboard.service
# Set BTKBDMAC to the Bluetooth address of your keyboard.
# Using built in TI WiLink Bluetooth, device is hci0
BTKBDMAC = 00:1F:20:24:B2:EF
HCIDEVICE = hci0
Create file: /etc/systemd/system/bluetooth-keyboard.service with the
following contents
[Unit]
Description=Automatically connect to a Bluetooth keyboard
Documentation=https://wiki.archlinux.org/index.php/Bluetooth_Keyboard
Requires=dbus-org.bluez.service
After=dbus-bluez.org.service
ConditionPathExists=/etc/bluetooth-keyboard.conf
ConditionPathExists=/usr/bin/hcitool
ConditionPathExists=/usr/bin/hciconfig
[Service]
Type=oneshot
EnvironmentFile=/etc/bluetooth-keyboard.conf
ExecStart=
ExecStart=/usr/bin/hciconfig ${HCIDEVICE} up
# Ignore errors on connect, spurious problems seem to occur with
Bluetooth? Start next command with - to ignore the errors.
ExecStart=-/usr/bin/hcitool cc ${BTKBDMAC}
After this I did the following:
# systemctl daemon-reload
# systemctl start pulseaudio.service
Now the keyboard connects when disconnected and a key is pressed
reliably. After a reboot, I can login on the HDMI console using the
Bluetooth keyboard.
References:
https://wiki.archlinux.org/index.php/bluetooth_keyboard
Setup Bluetooth Audio
--------------------------------------------------
As I said before Debian Jessie uses BlueZ 5.23. Unfortunately BlueZ5
dropped support for ALSA. This means we have to use PulseAudio for
Bluetooth audio support. Debian Jessie uses PulseAudio 5 on the
HiKey. At present, PulseAudio 5 only supports the A2DP Bluetooth
profile and not the HSP/HFP Bluetooth profiles (at least according to
the reference). The latter profiles are apparently under development.
To get Bluetooth audio working on my HiKey I did the following:
$ sudo su
# apt-get install --no-install-recommends pulseaudio pulseaudio-module-bluetooth
Create file: /etc/systemd/system/pulseaudio.service with the following contents
[Unit]
Description=Pulse Audio
[Service]
Type=simple
ExecStart=/usr/bin/pulseaudio --system --disallow-exit --disable-shm
[Install]
WantedBy=multi-user.target
Create file: /etc/dbus-1/system.d/pulseaudio-bluetooth.conf with the
following contents
<busconfig>
<policy user="pulse">
<allow send_destination="org.bluez"/>
</policy>
</busconfig>
Append to file: /etc/pulse/system.pa
### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif
Add user linaro to pulse-access group
#id linaro
uid=1000(linaro) gid=1000(linaro)
groups=1000(linaro),4(adm),20(dialout),24(cdrom),29(audio),30(dip),44(video),46(plugdev),1001(admin)
# usermod -a -G pulse-access
# id linaro
uid=1000(linaro) gid=1000(linaro)
groups=1000(linaro),4(adm),20(dialout),24(cdrom),29(audio),30(dip),44(video),46(plugdev),1001(admin),115(pulse-access)
Now need to start up PulseAudio
# systemctl daemon-reload
# systemctl start pulseaudio.service
Now need to pair and connect to the Bluetooth speaker. Pairing only
needs to be done once.
# bluetoothctl
[bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# scan on
[bluetooth]# pair A0:E9:DB:5C:FA:67
[bluetooth]# trust A0:E9:DB:5C:FA:67
[bluetooth]# connect A0:E9:DB:5C:FA:67
[bluetooth]# quit
# exit
Now connected to Bluetooth speaker, and user linaro should be able to
use PulseAudio. Now list devices in PulseAudio.
$ pactl list
The output for me near the end looks like this.
Card #0
Name: bluez_card.A0_E9_DB_5C_FA_67
Driver: module-bluez5-device.c
Owner Module: 14
Properties:
device.description = "Nude Super-M"
device.string = "A0:E9:DB:5C:FA:67"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_A0_E9_DB_5C_FA_67"
bluez.class = "0x240404"
bluez.alias = "Nude Super-M"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
Profiles:
a2dp: High Fidelity Playback (A2DP Sink) (sinks: 1, sources:
0, priority: 10, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: a2dp
Ports:
headset-output: Headset (priority: 0, latency offset: 0 usec)
Part of profile(s): a2dp
headset-input: Headset (priority: 0, latency offset: 0 usec,
not available)
If the active profile isn't A2DP, then set it
$ pactl set-card-profile 0 a2dp
Should now be able to play a sound and hear it on speaker.
$ paplay -d bluez_sink.A0_E9_DB_5C_FA_67 /usr/share/sounds/alsa/Front_Center.wav
References:
https://github.com/ev3dev/ev3dev/issues/198
--
Scott Bambrough
Technical Director, Member Services
Linaro