Hi
Scott,
Sorry for late
replying. I just come back from a travel.
On Friday,
March 27, 2015 03:58 PM, Dan zhao wrote:
-----邮件原件-----
发件人: Scott Bambrough [mailto:scott.bambrough@linaro.org]
发送时间: 2015年3月27日 7:07
收件人: Benjamin Gaignard; dev@lists.96boards.org
抄送: Tom Gall; Guodong Xu; Lars-Peter Clausen; George
Grey; Dan zhao
主题: Re: [Dev] X fails to load on current alip image....
On Thu, Mar 26, 2015 at 3:03 PM, Benjamin Gaignard
<benjamin.gaignard@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/
drivers/gpu/drm/sti/sti_hdmi.c?id=refs/tags/next-20150326#n695
Benjamin
Le jeudi 26 mars 2015, Scott Bambrough
<scott.bambrough@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@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@linaro.org>
To: Tom Gall <tgall@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@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@linaro.org>
Subject: [Dev] X fails to load on current alip
image....
To: <dev@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
This is not a
problem, the dsi module is waiting for HDMI module. When
dsi module can't find HDMI slave encoder module it will
return -EPROBE_DEFER to deffer probe.
After the HDMI
module has been initialized. This error msg would not come
again.
[ 3.602363]
hisi-drm smb:display-subsystem: DSI-1: EDID block
0
invalid.
EDID error
doesn't matter now. Due to the unfixed signal issue, now
we explicitly set the 720P timing parameters. So the
timing parameters doesn't come from EDID.
Hello - this is in fact a major problem for us. We want to make
the HDMI work “properly” with all monitors. We also need to
investigate the possible SoC clock timing issue identified by
Lars at Analog Devices. Therefore we want to enable the EDID
data so that we can then test different display timings and
configurations.
To do testing, characterization and validation of different
monitor timings we also need a command line tool for debugging
to enable us to change the DSI timings and clock set ups on the
SoC (see Lars emails) for different displays. Here is the use
case:
1. Read EDID information on boot
2. Boot up in known working 720p configuration (this is what
happens today)
3. User reads the EDID data using dmesg
4. Users logs in from remote PC using ssh
5. Using the EDID information and a debug tool which can
adjust clock settings and DSI output configuration the user sets
the monitor timings for different supported frequency, no of
pixels, lines etc. The debug tool makes the appropriate changes
in the SoC and the ADV7533.
6. User records whether the monitor is working correctly
7. If the monitor fails the user can go back to the known
working 720p setup using the debug tool.
This will help us to characterize which timing setups work
and which fail so that we can find the root cause of HDMI not
working at different frequencies/configurations.
Can you help on this?
Yes, I can read EDID properly with my local patch, i'll push this
patch to 96boards' Github kernel as soon as possible.