Ok, will test  Ondřej and your branch. This can take some time, I think 
this weekend I can build and test both.

But this raised some questions:
a) How is this going to help you guys fix the stable 4.15.y ?
b) I applied the significant changes on DRM and sun4i (that i think would 
fix) on my 4.15 based on Ondřej 4.16 branch without much help, still same 
problem.
clk.c (4.16) has received some changes and I have not touched it.

[   58.647727] ------------[ cut here ]------------
>
> [   58.647802] WARNING: CPU: 1 PID: 72 at 
>> drivers/gpu/drm/sun4i/sun4i_crtc.c:57 sun4i_crtc_atomic_begin+0x6c/0x70
>
> [   58.647814] Modules linked in: ir_lirc_codec lirc_dev sunxi_cir 
>> brcmfmac brcmutil g_serial ipv6
>
> [   58.647909] CPU: 1 PID: 72 Comm: irq/46-1ee0000. Not tainted 
>> 4.15.7-h2-2 #10
>
> [   58.647920] Hardware name: Allwinner sun8i Family
>
> [   58.647999] [<c010e99c>] (unwind_backtrace) from [<c010b5d8>] 
>> (show_stack+0x10/0x14)
>
> [   58.648050] [<c010b5d8>] (show_stack) from [<c07cfd98>] 
>> (dump_stack+0x88/0x9c)
>
> [   58.648092] [<c07cfd98>] (dump_stack) from [<c011bafc>] 
>> (__warn+0xdc/0xf4)
>
> [   58.648128] [<c011bafc>] (__warn) from [<c011bbe4>] 
>> (warn_slowpath_null+0x40/0x48)
>
> [   58.648164] [<c011bbe4>] (warn_slowpath_null) from [<c049bb50>] 
>> (sun4i_crtc_atomic_begin+0x6c/0x70)
>
> [   58.648215] [<c049bb50>] (sun4i_crtc_atomic_begin) from [<c046b528>] 
>> (drm_atomic_helper_commit_planes+0x74/0x2ac)
>
> [   58.648264] [<c046b528>] (drm_atomic_helper_commit_planes) from 
>> [<c046f6a4>] (drm_atomic_helper_commit_tail+0x28/0x64)
>
> [   58.648311] [<c046f6a4>] (drm_atomic_helper_commit_tail) from 
>> [<c046f760>] (commit_tail+0x80/0x84)
>
> [   58.648355] [<c046f760>] (commit_tail) from [<c046f88c>] 
>> (drm_atomic_helper_commit+0x120/0x124)
>
> [   58.648399] [<c046f88c>] (drm_atomic_helper_commit) from [<c0471d2c>] 
>> (restore_fbdev_mode_atomic+0x178/0x1d4)
>
> [   58.648442] [<c0471d2c>] (restore_fbdev_mode_atomic) from [<c047490c>] 
>> (drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xa0)
>
> [   58.648482] [<c047490c>] (drm_fb_helper_restore_fbdev_mode_unlocked) 
>> from [<c0474988>] (drm_fb_helper_set_par+0x30/0x60)
>
> [   58.648521] [<c0474988>] (drm_fb_helper_set_par) from [<c0474884>] 
>> (drm_fb_helper_hotplug_event.part.11+0xa8/0xb0)
>
> [   58.648562] [<c0474884>] (drm_fb_helper_hotplug_event.part.11) from 
>> [<c0465dc4>] (drm_helper_hpd_irq_event+0xf0/0xfc)
>
> [   58.648609] [<c0465dc4>] (drm_helper_hpd_irq_event) from [<c04a7b30>] 
>> (dw_hdmi_irq+0xfc/0x184)
>
> [   58.648655] [<c04a7b30>] (dw_hdmi_irq) from [<c01643b0>] 
>> (irq_thread_fn+0x1c/0x54)
>
> [   58.648692] [<c01643b0>] (irq_thread_fn) from [<c0164684>] 
>> (irq_thread+0x138/0x1f8)
>
> [   58.648732] [<c0164684>] (irq_thread) from [<c013768c>] 
>> (kthread+0x148/0x150)
>
> [   58.648777] [<c013768c>] (kthread) from [<c0107908>] 
>> (ret_from_fork+0x14/0x2c)
>
> [   58.648794] ---[ end trace db8b21de0cfe2bd6 ]---
>
> [   58.904890] ------------[ cut here ]------------
>
> [   58.905010] WARNING: CPU: 1 PID: 72 at 
>> drivers/gpu/drm/drm_vblank.c:1015 
>> drm_atomic_helper_wait_for_vblanks.part.1+0x10c/0x290
>
> [   58.905030] Modules linked in: ir_lirc_codec lirc_dev sunxi_cir 
>> brcmfmac brcmutil g_serial ipv6
>
> [   58.905207] CPU: 1 PID: 72 Comm: irq/46-1ee0000. Tainted: G        W    
>>     4.15.7-h2-2 #10
>
> [   58.905229] Hardware name: Allwinner sun8i Family
>
> [   58.905346] [<c010e99c>] (unwind_backtrace) from [<c010b5d8>] 
>> (show_stack+0x10/0x14)
>
> [   58.905439] [<c010b5d8>] (show_stack) from [<c07cfd98>] 
>> (dump_stack+0x88/0x9c)
>
> [   58.905515] [<c07cfd98>] (dump_stack) from [<c011bafc>] 
>> (__warn+0xdc/0xf4)
>
> [   58.905583] [<c011bafc>] (__warn) from [<c011bbe4>] 
>> (warn_slowpath_null+0x40/0x48)
>
> [   58.905668] [<c011bbe4>] (warn_slowpath_null) from [<c046e104>] 
>> (drm_atomic_helper_wait_for_vblanks.part.1+0x10c/0x290)
>
> [   58.905770] [<c046e104>] (drm_atomic_helper_wait_for_vblanks.part.1) 
>> from [<c046f6d0>] (drm_atomic_helper_commit_tail+0x54/0x64)
>
> [   58.905860] [<c046f6d0>] (drm_atomic_helper_commit_tail) from 
>> [<c046f760>] (commit_tail+0x80/0x84)
>
> [   58.905950] [<c046f760>] (commit_tail) from [<c046f88c>] 
>> (drm_atomic_helper_commit+0x120/0x124)
>
> [   58.906034] [<c046f88c>] (drm_atomic_helper_commit) from [<c0471d2c>] 
>> (restore_fbdev_mode_atomic+0x178/0x1d4)
>
> [   58.906116] [<c0471d2c>] (restore_fbdev_mode_atomic) from [<c047490c>] 
>> (drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xa0)
>
> [   58.906195] [<c047490c>] (drm_fb_helper_restore_fbdev_mode_unlocked) 
>> from [<c0474988>] (drm_fb_helper_set_par+0x30/0x60)
>
> [   58.906273] [<c0474988>] (drm_fb_helper_set_par) from [<c0474884>] 
>> (drm_fb_helper_hotplug_event.part.11+0xa8/0xb0)
>
> [   58.906353] [<c0474884>] (drm_fb_helper_hotplug_event.part.11) from 
>> [<c0465dc4>] (drm_helper_hpd_irq_event+0xf0/0xfc)
>
> [   58.906445] [<c0465dc4>] (drm_helper_hpd_irq_event) from [<c04a7b30>] 
>> (dw_hdmi_irq+0xfc/0x184)
>
> [   58.906530] [<c04a7b30>] (dw_hdmi_irq) from [<c01643b0>] 
>> (irq_thread_fn+0x1c/0x54)
>
> [   58.906601] [<c01643b0>] (irq_thread_fn) from [<c0164684>] 
>> (irq_thread+0x138/0x1f8)
>
> [   58.906674] [<c0164684>] (irq_thread) from [<c013768c>] 
>> (kthread+0x148/0x150)
>
> [   58.906756] [<c013768c>] (kthread) from [<c0107908>] 
>> (ret_from_fork+0x14/0x2c)
>
> [   58.906789] ---[ end trace db8b21de0cfe2bd7 ]---
>
>
>
c) No one experienced this?

BR,
@lex



On Thursday, March 8, 2018 at 3:31:59 AM UTC-3, Jernej Škrabec wrote:
>
> Hi, 
>
> Dne sreda, 07. marec 2018 ob 23:48:30 CET je 'Ondřej Jirman' via 
> linux-sunxi 
> napisal(a): 
> > Hi, 
> > 
> > On Wed, Mar 07, 2018 at 02:17:42PM -0800, @lex wrote: 
> > > Hi Jernej, 
> > > 
> > > Unfortunately, this patch did not fix the issue, unless I did 
> something 
> > > silly 
>
> Actually it did, just another issue poped out. I had similar problems when 
> I 
> was developing mainline driver. 
>
> > > Here is the complete 
> > > bootlog: 
> > > https://gist.github.com/avafinger/ac6b5e73da87797c6ff32d6746e5fac5 
> > > 
>
> This looks like clock issue. I don't have any suggestion for out of tree 
> driver since mainlined driver has this part completely reworked in a 
> proper 
> way. Old driver has a lot of hacks here. 
>
> > > *code excerpt:* 
> > > 
> > > static void sun4i_crtc_atomic_disable(struct drm_crtc *crtc, 
> > > 
> > >       struct drm_crtc_state *old_state) 
> > > 
> > > { 
> > > struct drm_encoder *encoder = sun4i_crtc_get_encoder(crtc); 
> > > struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); 
> > > 
> > > DRM_DEBUG_DRIVER("Disabling the CRTC\n"); 
> > > 
> > >     drm_crtc_vblank_off(crtc); 
> > > 
> > > sun4i_tcon_set_status(scrtc->tcon, encoder, false); 
> > > 
> > > if (crtc->state->event && !crtc->state->active) { 
> > > spin_lock_irq(&crtc->dev->event_lock); 
> > > drm_crtc_send_vblank_event(crtc, crtc->state->event); 
> > > spin_unlock_irq(&crtc->dev->event_lock); 
> > > 
> > > crtc->state->event = NULL; 
> > > } 
> > > } 
> > > 
> > > static void sun4i_crtc_atomic_enable(struct drm_crtc *crtc, 
> > > 
> > >      struct drm_crtc_state *old_state) 
> > > 
> > > { 
> > > struct drm_encoder *encoder = sun4i_crtc_get_encoder(crtc); 
> > > struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc); 
> > > 
> > > DRM_DEBUG_DRIVER("Enabling the CRTC\n"); 
> > > 
> > > sun4i_tcon_set_status(scrtc->tcon, encoder, true); 
> > > 
> > >     drm_crtc_vblank_on(crtc); 
> > > 
> > > } 
> > > 
> > > 
> > > The issue can be reproducible by just turning on the display in the 
> > > middle of the boot or after a complete boot. 
> > > Boot  log shows the warning and message after I logged in via TTL 
> debug 
> > > and 
> > > then turned on the display. 
> > > 
> > > 
> > > The second issue is still not fixed also, the display goes blank right 
> > > after the login prompt is displayed, a few seconds later. If i press 
> enter 
> > > then the monitor goes on and don't go blank again. 
> > > I used *consoleblank=0* just in case but did not help. 
> > > 
> > > Kernel is based on megous's work a few days ago, maybe i missed some 
> other 
> > > patch? 
> > 
> > My 4.15 branch has the old HDMI patches. Try with 4.16 branch, wich has 
> a 
> > fairly recent version of the patches including this fix. 
>
> Yeah, I would also suggest that. If it still doesn't work, try https:// 
> github.com/jernejsk/linux-1/commits/h3_hdmi_v3 which is what it will 
> eventually be 4.17. Just don't forget to disable SUN4I_CODEC driver since 
> it 
> causes boot crash atm. 
>
> Best regards, 
> Jernej 
>
> > 
> > regards, 
> >   o. 
> > 
> > > On Wednesday, March 7, 2018 at 5:39:10 PM UTC-3, Jernej Škrabec wrote: 
> > > > Hi, 
> > > > 
> > > > Dne sreda, 07. marec 2018 ob 21:30:42 CET je @lex napisal(a): 
> > > > > ops, i mean turning ON. 
> > > > > 
> > > > > On Wednesday, March 7, 2018 at 5:26:59 PM UTC-3, @lex wrote: 
> > > > > > Hi, 
> > > > > > 
> > > > > > Turning HDMI monitor during boot or after complete boot kernel 
> shows 
> > > > 
> > > > the 
> > > > 
> > > > > > following error: 
> > > > > > 
> > > > > > [   14.842605] [<c010e99c>] (unwind_backtrace) from [<c010b5d8>] 
> > > > > > (show_stack+0x10/0x14) 
> > > > > > [   14.842698] [<c010b5d8>] (show_stack) from [<c07c4398>] 
> > > > > > (dump_stack+0x88/0x9c) 
> > > > > > [   14.842774] [<c07c4398>] (dump_stack) from [<c011bafc>] 
> > > > > > (__warn+0xdc/0xf4) 
> > > > > > [   14.842840] [<c011bafc>] (__warn) from [<c011bb4c>] 
> > > > > > (warn_slowpath_fmt+0x38/0x48) 
> > > > > > [   14.842931] [<c011bb4c>] (warn_slowpath_fmt) from 
> [<c0470ab8>] 
> > > > > > (drm_atomic_helper_commit_modeset_disables+0x468/0x46c) 
> > > > > > [   14.843034] [<c0470ab8>] 
> > > > 
> > > > (drm_atomic_helper_commit_modeset_disables) 
> > > > 
> > > > > > from [<c0470ad4>] (drm_atomic_helper_commit_tail+0x18/0x64) 
> > > > > > [   14.843125] [<c0470ad4>] (drm_atomic_helper_commit_tail) from 
> > > > > > [<c0470ba0>] (commit_tail+0x80/0x84) 
> > > > > > [   14.843213] [<c0470ba0>] (commit_tail) from [<c0470ccc>] 
> > > > > > (drm_atomic_helper_commit+0x120/0x124) 
> > > > > > [   14.843298] [<c0470ccc>] (drm_atomic_helper_commit) from 
> > > > 
> > > > [<c047325c>] 
> > > > 
> > > > > > (restore_fbdev_mode_atomic+0x178/0x1d4) 
> > > > > > [   14.843385] [<c047325c>] (restore_fbdev_mode_atomic) from 
> > > > 
> > > > [<c0475ce4>] 
> > > > 
> > > > > > (drm_fb_helper_restore_fbdev_mode_unlocked.part.9+0x1c/0x78) 
> > > > > > [   14.843466] [<c0475ce4>] 
> > > > > > (drm_fb_helper_restore_fbdev_mode_unlocked.part.9) from 
> [<c0475dc8>] 
> > > > > > (drm_fb_helper_set_par+0x54/0x84) 
> > > > > > [   14.843543] [<c0475dc8>] (drm_fb_helper_set_par) from 
> > > > > > [<c0475ca0>] 
> > > > > > (drm_fb_helper_hotplug_event.part.8+0xa8/0xb0) 
> > > > > > [   14.843624] [<c0475ca0>] (drm_fb_helper_hotplug_event.part.8) 
> > > > > > from 
> > > > > > [<c0467208>] (drm_helper_hpd_irq_event+0xf0/0xfc) 
> > > > > > [   14.843703] [<c0467208>] (drm_helper_hpd_irq_event) from 
> > > > 
> > > > [<c04a8f0c>] 
> > > > 
> > > > > > (dw_hdmi_irq+0xfc/0x184) 
> > > > > > [   14.843775] [<c04a8f0c>] (dw_hdmi_irq) from [<c01643b0>] 
> > > > > > (irq_thread_fn+0x1c/0x54) 
> > > > > > [   14.843846] [<c01643b0>] (irq_thread_fn) from [<c0164684>] 
> > > > > > (irq_thread+0x138/0x1f8) 
> > > > > > [   14.843920] [<c0164684>] (irq_thread) from [<c013768c>] 
> > > > > > (kthread+0x148/0x150) 
> > > > > > [   14.844001] [<c013768c>] (kthread) from [<c0107908>] 
> > > > > > (ret_from_fork+0x14/0x2c) 
> > > > > > [   14.844317] ---[ end trace 98bf403d753cfda9 ]--- 
> > > > > > 
> > > > > > 
> > > > > > I am using framebuffer with 1920x1080 (hdmi) and kernel 4.15.7 
> on 
> > > > > > h2+ 
> > > > > > HDMI display still works after this. 
> > > > 
> > > > You didn't copy the most useful part of that message - the actual 
> > > > warning. 
> > > > Fortunately, this issue is know and fix commited today to drm-misc: 
> > > > 
> > > > 
> https://cgit.freedesktop.org/drm/drm-misc/commit/?h=drm-misc-fixes&id=fd 
> > > > 00c4ee76f0b509ce79ffbc1f5a682fbdd84efd 
> > > > 
> > > > However, you are forgetting that this driver is only a week in 
> drm-misc 
> > > > repository. You are probably using Armbian with my older, out of 
> tree 
> > > > driver. 
> > > > 
> > > > Best regards, 
> > > > Jernej 
> > > 
> > > -- 
> > > You received this message because you are subscribed to the Google 
> Groups 
> > > "linux-sunxi" group. To unsubscribe from this group and stop receiving 
> > > emails from it, send an email to 
> > > [email protected] <javascript:>. For more options, 
> visit 
> > > https://groups.google.com/d/optout. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "linux-sunxi" group. To unsubscribe from this group and stop receiving 
> > emails from it, send an email to [email protected] 
> <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to