[Letux-kernel] Debugging 4.11-rc6 on GTA04
Andreas Kemnade
andreas at kemnade.info
Wed Apr 12 07:07:53 CEST 2017
Hi,
On Tue, 11 Apr 2017 22:00:18 +0200
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>
> > Am 11.04.2017 um 21:42 schrieb Andreas Kemnade <andreas at kemnade.info>:
> >
> > On Tue, 11 Apr 2017 20:28:11 +0200
> > "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> >
> >>
> >>> Am 11.04.2017 um 20:22 schrieb Andreas Kemnade <andreas at kemnade.info>:
> >>>
> >>> On Tue, 11 Apr 2017 20:10:52 +0200
> >>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> >>>
> >>>>
> >>>>> Am 11.04.2017 um 19:49 schrieb Andreas Kemnade <andreas at kemnade.info>:
> >>>>>
> >>>>> On Tue, 11 Apr 2017 15:36:32 +0200
> >>>>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> >>>>>
> >>>>>> Hi Andreas,
> >>>>>>
> >>>>>>> Am 11.04.2017 um 12:43 schrieb Andreas Kemnade <andreas at kemnade.info>:
> >>>>>>>
> >>>>>>> On Mon, 10 Apr 2017 22:01:28 +0200
> >>>>>>> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> >>>>>>>
> >>>>>>>>
> >>>>>>>>> Am 10.04.2017 um 20:13 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> >>>>>>>>>
> >>>>>>>>> Hi,
> >>>>>>>>> I have found a little time to upgrade our tree to 4.11-rc6
> >>>>>>>>> and for the first time there were no kernel oops on the GTA04(A5)
> >>>>>>>>> until login.
> >>>>>>>>>
> >>>>>>>>> Only the LCD is broken :(
> >>>>>>>>>
> >>>>>>>>> On the Pyra the same kernel works well. So it seems to be
> >>>>>>>>> OMAP3 specific (maybe again some interference of the TILER
> >>>>>>>>> addition, but I can easily check by merging my 4.11-rc6
> >>>>>>>>> without TILER).
> >>>>>>>>
> >>>>>>>> I have now built w/o TILER and for the first two boot attempts I had the
> >>>>>>>> same error. But the third one succeeded. This time I got
> >>>>>>> [...]
> >>>>>>>>
> >>>>>>>> And the ethernet gadget was not loaded (initially). No VBUS event reported. But charger started charging.
> >>>>>>>>
> >>>>>>>> After unplugging the USB cable I got:
> >>>>>>>>
> >>>>>>>> root at letux:~# [ 230.016326] musb-hdrc musb-hdrc.0.auto: VBUS_ERROR in b_idle (90, <VBusValid), retry #0, port1 00000100
> >>>>>>>>
> >>>>>>>> And then:
> >>>>>>>>
> >>>>>>>> [ 237.857330] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
> >>>>>>>> [ 238.624481] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
> >>>>>>>>
> >>>>>>>> Otherwise I didn't see any significant issue.
> >>>>>>>>
> >>>>>>>> So it looks as if we still have two bugs: one in musb and another one in TILER/crtc.
> >>>>>>>>
> >>>>>>> Sounds like problems which can be bisected on mainline. I think I will
> >>>>>>> bisect this evening a bit. With musb, there is probably just another
> >>>>>>> enable/disable balancing problem which must be somehow worked around in
> >>>>>>> the glue layer or phy.
> >>>>>>
> >>>>>> Good ideas!
> >>>>>>
> >>>>>> But this gave me another idea... I have added a command line option to my
> >>>>>> merge script so that it ignores the mergefile. Then I can add a handful
> >>>>>> of our feature branches to be merged on top of letux-base.
> >>>>>>
> >>>>>> With these ones, I could get it compiled and run on the GTA04A5 (of course missing sound,
> >>>>>> inverted touch etc.):
> >>>>>>
> >>>>>> ./merge -p -nmf -- work/hns/letux/rootfs work/hns/dt/gta04 work/hns/dt/gta04a5 work/hns/mtd/onenand work/marek/generic-adc-battery work/hns/misc/w2sg-serdev
> >>>>>>
> >>>>>> Result is at:
> >>>>>>
> >>>>>> http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/letux-4.11-rc6%2Brootfs%2Bgta04%2Bgta04a5%2Bonenand%2Bgeneric-adc-battery%2Bw2sg-serdev
> >>>>>>
> >>>>>> Interestingly our feature branches are not as independent as they should
> >>>>>> be... The generic adc battery is needed for some #include in the GTA04DT and
> >>>>>> GTA04A5 wants to modify a bluetooth node that comes through the w2sg-serdev
> >>>>>> branch.
> >>>>>>
> >>>>>> Anyways, the important information is: with this minimum set of feature branches
> >>>>>> I have neither problems with musb nor display. So the issue is not coming from
> >>>>>> mainline...
> >>>>>>
> >>>>> Well, I have just a white screen here with that. So, there is more...
> >>>>
> >>>> Hm. That is unexpected... I am not 100% sure if I did a clean build.
> >>>>
> >>>>>
> >>>>> AFAICR, the most important this
> >>>>> missing in twl4030_charger are the things to have detection working when
> >>>>> the stuff is loaded. So for mainline experiments, the idea would be to
> >>>>> build musb/twl stuff not as modules. And keep our device tree.
> >>>>
> >>>> Well, the strangest thing is that I have merged all the listed branches on
> >>>> top of letux-base and all of them work.
> >>>>
> >>>> So I am either making a systematic mistake or the real bug is outside of the
> >>>> musb/twl4030 subsystem.
> >>>>
> >>> I checked 4.10.0 mainline + letux-4.11-rc6 feature branch -> working
> >>> display (besides of non-calibrated touchscreen, could log in via usb
> >
> > oops, incorrect information here:
> > 4.10.0 mainline combined with dtb from letux-4.11-rc6 works.
>
> Ah, I see. There were not many changes in dtb but most in infrastructure
> so that result seems to be quite likely.
>
> >
> >>>
> >>> mainline 4.11-rc6 funny moving stripes on the display, no usb.
> >>
> >> Ah, you mean mainline. I haven't tested that but letux-base which has some
> >> old (but probably important) patches we have not yet extracted into separate
> >> feature branches. Recently I worked out a strategy but it is still a lot
> >> of manual work (resolve rebase conflicts).
> >>
> >>>
> >>>> I think I will have to bisect the mergefile until I find the problematic
> >>>> feature branch...
> >>>
> >>> I still blame mainline. But I do not like these bugs which happen only
> >>> sometimes.
> >>
> >> letux-base plus some minimal feature branches for the GTA04A5 work,
> >> but the full set doesn't. So it is something in the set of our feature branches.
> >>
> > I have tested your last branch and it has still display problems here!
> > And there should be no reason why 4.11-rc6 mainline should work less
> > than 4.10.0 mainline.
> > At the moment I am bisecting mainline, 9 steps to go.
>
> Ok!
>
> Maybe mainline has another bug. Or our latest patches trigger that in 4.11
> but not in 4.10.
>
Display problems seem to start with this patch:
897145d0c7010b4e07fa9bc674b1dfb9a2c6fff9 is the first bad commit
commit 897145d0c7010b4e07fa9bc674b1dfb9a2c6fff9
Author: Jyri Sarha <jsarha at ti.com>
Date: Fri Jan 27 12:04:55 2017 +0200
drm/omapdrm: Move commit_modeset_enables() before commit_planes()
Move drm_atomic_helper_commit_modeset_enables() call to before
drm_atomic_helper_commit_planes() call and have a
omap_atomic_wait_for_completion() call after both.
With the current dss dispc implementation we have to enable the new
modeset before we can commit planes. The dispc ovl configuration
relies on the video mode configuration been written into the HW when
the ovl configuration is calculated.
This approach is not ideal because after a mode change the plane
update is executed only after the first vblank interrupt. The dispc
implementation should be fixed so that it is able use uncommitted drm
state information. information.
Signed-off-by: Jyri Sarha <jsarha at ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
git bisect log output:
git bisect start
# bad: [39da7c509acff13fc8cb12ec1bb20337c988ed36] Linux 4.11-rc6
git bisect bad 39da7c509acff13fc8cb12ec1bb20337c988ed36
# good: [c470abd4fde40ea6a0846a2beab642a578c0b8cd] Linux 4.10
git bisect good c470abd4fde40ea6a0846a2beab642a578c0b8cd
# good: [d5dee39b27201f9f5460eca55efcc91a663b738c] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
git bisect good d5dee39b27201f9f5460eca55efcc91a663b738c
# bad: [5d8a00eee2ed2e548a5d21b0edf495f3f7bf8bb4] Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
git bisect bad 5d8a00eee2ed2e548a5d21b0edf495f3f7bf8bb4
# good: [d5500a074741b78b7f778b4ab3415d5ecdcda0a7] Merge tag 'usercopy-v4.11-rc1.fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
git bisect good d5500a074741b78b7f778b4ab3415d5ecdcda0a7
# good: [29a73d906bd386839015602c4bd35ef2e3531abc] Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-next
git bisect good 29a73d906bd386839015602c4bd35ef2e3531abc
# bad: [699fa216808fff47efc9743f92f1b8a9f9bf5321] mm: fix handling PTE-mapped THPs in page_idle_clear_pte_refs()
git bisect bad 699fa216808fff47efc9743f92f1b8a9f9bf5321
# bad: [9b071c7935f053bf05ab4d0b2f4a8ae4069b4b89] drm/nouveau/pmu/gk20a: use falcon library functions
git bisect bad 9b071c7935f053bf05ab4d0b2f4a8ae4069b4b89
# good: [26d7f34cae7aad9600cd40ce07ec3fbe8606a567] Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next
git bisect good 26d7f34cae7aad9600cd40ce07ec3fbe8606a567
# good: [13f62f54d174d3417c3caaafedf5e22a0a03e442] Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-next
git bisect good 13f62f54d174d3417c3caaafedf5e22a0a03e442
# good: [be3c9f5eed3be89d17b5dcffc38412932214fbae] Merge branch 'drm-rockchip-next-2017-02-16' of https://github.com/markyzq/kernel-drm-rockchip into drm-next
git bisect good be3c9f5eed3be89d17b5dcffc38412932214fbae
# good: [dec13c8ba2f5be8839ba5505b57b22ab0d2a287e] Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-next
git bisect good dec13c8ba2f5be8839ba5505b57b22ab0d2a287e
# bad: [c1fcb14879e87c837c360c2ec9f32d19f62faf89] drm/nouveau/core: constify nv*_printk macros
git bisect bad c1fcb14879e87c837c360c2ec9f32d19f62faf89
# bad: [1b30ab0c40a99da347c1ab83c30b485e03fe9f64] drm/omapdrm: dispc: Refuse x-decimation above 4 for all but 8-bit formats
git bisect bad 1b30ab0c40a99da347c1ab83c30b485e03fe9f64
# bad: [897145d0c7010b4e07fa9bc674b1dfb9a2c6fff9] drm/omapdrm: Move commit_modeset_enables() before commit_planes()
git bisect bad 897145d0c7010b4e07fa9bc674b1dfb9a2c6fff9
# good: [e025d3860bd9f718d4d8ce251e6a823dd8293b51] Revert "drm: omapdrm: Let the DRM core skip plane commit on inactive CRTCs"
git bisect good e025d3860bd9f718d4d8ce251e6a823dd8293b51
# first bad commit: [897145d0c7010b4e07fa9bc674b1dfb9a2c6fff9] drm/omapdrm: Move commit_modeset_enables() before commit_planes()
kernel commandline used:
root at letux:~# cat /proc/cmdline
console=tty0 mtdoops.mtddev=omap2.nand ubi.mtd=4 root=/dev/mmcblk0p3 rw rootfstype=ext4,ext3 rootwait vram=12M omapfb.vram=0:8M,1:4M omapfb.rotate_type=0 omapdss.def_disp=lcd rootwait twl4030_charger.allow_usb=1 musb_hdrc.preserve_vbus=1 log_buf_len=8M
kernel config used is attached. I have compiled statically most of the
twl4030 / usb stuff because we have patches in our feature branches to
make that work as modules.
Regards
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kernel-config
Type: application/octet-stream
Size: 127487 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20170412/8465383a/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20170412/8465383a/attachment-0001.asc>
More information about the Letux-kernel
mailing list