Hi Tomi, > Am 20.04.2017 um 08:27 schrieb Tomi Valkeinen <tomi.valkeinen@xxxxxx>: > > On 19/04/17 18:49, Jyri Sarha wrote: >> On 04/19/17 16:35, Tomi Valkeinen wrote: >>> I was able to reproduce on my very old omap3 beagleboard. Looks very >>> much like a omap3 DSS HW bug to me. The unfortunate thing is that even >>> reverting the patch won't remove the issue, if the userspace happens to >>> configure things in certain order. >>> >>> It looks to me that if the DSS output is enabled without an overlay (the >>> primary plane, normally), DSS gets stuck into a bad state, and only >>> reboot helps (because we can't reset, there's no omap hwmod reset >>> framework). >>> >>> But there should be nothing wrong with that setup, and if there's first >>> been a successful display enable, then later we can enable the DSS >>> without any planes. >> >> If that is the case, then maybe we could just enable errata i734 (the >> gamma bug) work a round for omap3 too. The work a round makes an >> artificial minimal display setup with GFX plane for one frame, with >> outputs masked, so it could be exactly what we need. > > Yep, that did come to my mind and I tested it yesterday. However, I > failed to realize there's the WA init part, and I only made sure the > dispc_errata_i734_wa() is called. > > Now that I set the bit in the dispc features, it indeed seems to fix the > issue. > > Below is a hack patch for people to try out. It's based on today's > linux-next, but should apply to more or less any semi-recent kernel. If > it works for others, I'll create a proper patch, which drops the > has_gamma_i734_bug flag and always does the WA. > > Tomi > > From 657694ed06ab57b61a5523954d15147e73a1e226 Mon Sep 17 00:00:00 2001 > From: Tomi Valkeinen <tomi.valkeinen@xxxxxx> > Date: Thu, 20 Apr 2017 09:25:04 +0300 > Subject: [PATCH] dispc hackfix > > > diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c > b/drivers/gpu/drm/omapdrm/dss/dispc.c > index 5ac0145fbae6..6daf23f1ce3d 100644 > --- a/drivers/gpu/drm/omapdrm/dss/dispc.c > +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c > @@ -4004,6 +4004,7 @@ static const struct dispc_features > omap24xx_dispc_feats = { > .no_framedone_tv = true, > .set_max_preload = false, > .last_pixel_inc_missing = true, > + .has_gamma_i734_bug = true, > }; > > static const struct dispc_features omap34xx_rev1_0_dispc_feats = { > @@ -4025,6 +4026,7 @@ static const struct dispc_features > omap34xx_rev1_0_dispc_feats = { > .no_framedone_tv = true, > .set_max_preload = false, > .last_pixel_inc_missing = true, > + .has_gamma_i734_bug = true, > }; > > static const struct dispc_features omap34xx_rev3_0_dispc_feats = { > @@ -4046,6 +4048,7 @@ static const struct dispc_features > omap34xx_rev3_0_dispc_feats = { > .no_framedone_tv = true, > .set_max_preload = false, > .last_pixel_inc_missing = true, > + .has_gamma_i734_bug = true, > }; > > static const struct dispc_features omap44xx_dispc_feats = { This fixes the issue equally well as reverting the offending patch on my GTA04A4 board with 4.11-rc7. But I still have some debugging messages when Xorg starts (omap-drm driver), that were not in kernels up to 4.10. I am not sure if they are related or something else: [ 52.767211] ------------[ cut here ]------------ [ 52.772521] WARNING: CPU: 0 PID: 2260 at drivers/gpu/drm/omapdrm/omap_gem.c:938 omap_gem_put_paddr+0x30/0x60 [omapdrm] [ 52.805419] Modules linked in: bnep bluetooth usb_f_ecm g_ether usb_f_rndis u_ether libcomposite configfs ipv6 hso bq27xxx_battery omapdrm panel_tpo_td028ttec1 drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea drm snd_soc_simple_card snd_soc_simple_card_utils snd_soc_omap_twl4030 encoder_opa362 twl4030_madc_hwmon snd_soc_gtm601 pwm_omap_dmtimer connector_analog_tv generic_adc_battery pwm_bl extcon_gpio omap3_isp videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 ov9650 w1_bq27000 videobuf2_core v4l2_common omap_hdq omap2430 bmp280_i2c at24 bmp280 itg3200 phy_twl4030_usb nvmem_core videodev hmc5843_i2c lis3lv02d_i2c bma180 snd_soc_omap_mcbsp hmc5843_core industrialio_triggered_buffer lis3lv02d snd_soc_omap tsc2007 media leds_tca6507 input_polldev kfifo_buf [ 52.881042] snd_pcm_dmaengine musb_hdrc gpio_twl4030 snd_soc_twl4030 twl4030_madc twl4030_pwrbutton twl4030_vibra twl4030_charger industrialio w2sg0004 ehci_omap omapdss [ 52.995513] CPU: 0 PID: 2260 Comm: Xorg Not tainted 4.11.0-rc7-letux+ #1000 [ 53.002838] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 53.009429] [<c010f378>] (unwind_backtrace) from [<c010b8fc>] (show_stack+0x10/0x14) [ 53.017578] [<c010b8fc>] (show_stack) from [<c043e180>] (dump_stack+0x98/0xd0) [ 53.025146] [<c043e180>] (dump_stack) from [<c012f4b8>] (__warn+0xd0/0x100) [ 53.032470] [<c012f4b8>] (__warn) from [<c012f58c>] (warn_slowpath_null+0x1c/0x24) [ 53.040496] [<c012f58c>] (warn_slowpath_null) from [<bf3b90e8>] (omap_gem_put_paddr+0x30/0x60 [omapdrm]) [ 53.050659] [<bf3b90e8>] (omap_gem_put_paddr [omapdrm]) from [<bf3b80c4>] (omap_framebuffer_unpin+0x58/0x6c [omapdrm]) [ 53.062103] [<bf3b80c4>] (omap_framebuffer_unpin [omapdrm]) from [<bf384468>] (drm_atomic_helper_cleanup_planes+0x48/0x50 [drm_kms_helper]) [ 53.075378] [<bf384468>] (drm_atomic_helper_cleanup_planes [drm_kms_helper]) from [<bf3b5498>] (omap_atomic_complete+0x64/0xc4 [omapdrm]) [ 53.088409] [<bf3b5498>] (omap_atomic_complete [omapdrm]) from [<bf3b5ea8>] (omap_atomic_commit+0x1bc/0x1e0 [omapdrm]) [ 53.099731] [<bf3b5ea8>] (omap_atomic_commit [omapdrm]) from [<bf387c1c>] (drm_atomic_helper_set_config+0x50/0xa0 [drm_kms_helper]) [ 53.112609] [<bf387c1c>] (drm_atomic_helper_set_config [drm_kms_helper]) from [<bf2ee1c0>] (drm_mode_set_config_internal+0x4c/0xcc [drm]) [ 53.125976] [<bf2ee1c0>] (drm_mode_set_config_internal [drm]) from [<bf2ee928>] (drm_mode_setcrtc+0x354/0x430 [drm]) [ 53.137359] [<bf2ee928>] (drm_mode_setcrtc [drm]) from [<bf2e7dfc>] (drm_ioctl+0x2f8/0x3c4 [drm]) [ 53.146850] [<bf2e7dfc>] (drm_ioctl [drm]) from [<c0282e50>] (vfs_ioctl+0x20/0x34) [ 53.154785] [<c0282e50>] (vfs_ioctl) from [<c0283814>] (do_vfs_ioctl+0x82c/0x93c) [ 53.162597] [<c0283814>] (do_vfs_ioctl) from [<c0283970>] (SyS_ioctl+0x4c/0x74) [ 53.170288] [<c0283970>] (SyS_ioctl) from [<c0107040>] (ret_fast_syscall+0x0/0x1c) [ 53.375488] ---[ end trace b701f3dfb02e416c ]--- ... [ 64.759094] ------------[ cut here ]------------ [ 64.764801] WARNING: CPU: 0 PID: 1083 at drivers/gpu/drm/omapdrm/omap_gem.c:938 omap_gem_put_paddr+0x30/0x60 [omapdrm] [ 64.779266] Modules linked in: bnep bluetooth usb_f_ecm g_ether usb_f_rndis u_ether libcomposite configfs ipv6 hso bq27xxx_battery omapdrm panel_tpo_td028ttec1 drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea drm snd_soc_simple_card snd_soc_simple_card_utils snd_soc_omap_twl4030 encoder_opa362 twl4030_madc_hwmon snd_soc_gtm601 pwm_omap_dmtimer connector_analog_tv generic_adc_battery pwm_bl extcon_gpio omap3_isp videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 ov9650 w1_bq27000 videobuf2_core v4l2_common omap_hdq omap2430 bmp280_i2c at24 bmp280 itg3200 phy_twl4030_usb nvmem_core videodev hmc5843_i2c lis3lv02d_i2c bma180 snd_soc_omap_mcbsp hmc5843_core industrialio_triggered_buffer lis3lv02d snd_soc_omap tsc2007 media leds_tca6507 input_polldev kfifo_buf [ 64.857452] snd_pcm_dmaengine musb_hdrc gpio_twl4030 snd_soc_twl4030 twl4030_madc twl4030_pwrbutton twl4030_vibra twl4030_charger industrialio w2sg0004 ehci_omap omapdss [ 64.887237] CPU: 0 PID: 1083 Comm: kworker/0:4 Tainted: G W 4.11.0-rc7-letux+ #1000 [ 64.896575] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 64.904052] Workqueue: events drm_mode_rmfb_work_fn [drm] [ 64.909881] [<c010f378>] (unwind_backtrace) from [<c010b8fc>] (show_stack+0x10/0x14) [ 64.918182] [<c010b8fc>] (show_stack) from [<c043e180>] (dump_stack+0x98/0xd0) [ 64.925872] [<c043e180>] (dump_stack) from [<c012f4b8>] (__warn+0xd0/0x100) [ 64.933288] [<c012f4b8>] (__warn) from [<c012f58c>] (warn_slowpath_null+0x1c/0x24) [ 64.941528] [<c012f58c>] (warn_slowpath_null) from [<bf3b90e8>] (omap_gem_put_paddr+0x30/0x60 [omapdrm]) [ 64.951965] [<bf3b90e8>] (omap_gem_put_paddr [omapdrm]) from [<bf3b80c4>] (omap_framebuffer_unpin+0x58/0x6c [omapdrm]) [ 64.963775] [<bf3b80c4>] (omap_framebuffer_unpin [omapdrm]) from [<bf384468>] (drm_atomic_helper_cleanup_planes+0x48/0x50 [drm_kms_helper]) [ 64.977386] [<bf384468>] (drm_atomic_helper_cleanup_planes [drm_kms_helper]) from [<bf3b5498>] (omap_atomic_complete+0x64/0xc4 [omapdrm]) [ 64.990722] [<bf3b5498>] (omap_atomic_complete [omapdrm]) from [<bf3b5ea8>] (omap_atomic_commit+0x1bc/0x1e0 [omapdrm]) [ 65.002380] [<bf3b5ea8>] (omap_atomic_commit [omapdrm]) from [<bf387c1c>] (drm_atomic_helper_set_config+0x50/0xa0 [drm_kms_helper]) [ 65.015777] [<bf387c1c>] (drm_atomic_helper_set_config [drm_kms_helper]) from [<bf2ee1c0>] (drm_mode_set_config_internal+0x4c/0xcc [drm]) [ 65.029876] [<bf2ee1c0>] (drm_mode_set_config_internal [drm]) from [<bf2ee268>] (drm_crtc_force_disable+0x28/0x30 [drm]) [ 65.042388] [<bf2ee268>] (drm_crtc_force_disable [drm]) from [<bf2fa484>] (drm_framebuffer_remove+0x74/0xec [drm]) [ 65.054351] [<bf2fa484>] (drm_framebuffer_remove [drm]) from [<bf2fa534>] (drm_mode_rmfb_work_fn+0x38/0x40 [drm]) [ 65.065765] [<bf2fa534>] (drm_mode_rmfb_work_fn [drm]) from [<c014c650>] (process_one_work+0x384/0x764) [ 65.075775] [<c014c650>] (process_one_work) from [<c014ca58>] (process_scheduled_works+0x28/0x30) [ 65.085205] [<c014ca58>] (process_scheduled_works) from [<c014da68>] (worker_thread+0x2d4/0x3d4) [ 65.094543] [<c014da68>] (worker_thread) from [<c0152a38>] (kthread+0x138/0x154) [ 65.102447] [<c0152a38>] (kthread) from [<c01070d0>] (ret_from_fork+0x14/0x24) [ 65.115814] ---[ end trace b701f3dfb02e416d ]--- [ 65.543090] ------------[ cut here ]------------ [ 65.548614] WARNING: CPU: 0 PID: 2445 at drivers/gpu/drm/omapdrm/omap_gem.c:938 omap_gem_put_paddr+0x30/0x60 [omapdrm] [ 65.561370] Modules linked in: bnep bluetooth usb_f_ecm g_ether usb_f_rndis u_ether libcomposite configfs ipv6 hso bq27xxx_battery omapdrm panel_tpo_td028ttec1 drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea drm snd_soc_simple_card snd_soc_simple_card_utils snd_soc_omap_twl4030 encoder_opa362 twl4030_madc_hwmon snd_soc_gtm601 pwm_omap_dmtimer connector_analog_tv generic_adc_battery pwm_bl extcon_gpio omap3_isp videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 ov9650 w1_bq27000 videobuf2_core v4l2_common omap_hdq omap2430 bmp280_i2c at24 bmp280 itg3200 phy_twl4030_usb nvmem_core videodev hmc5843_i2c lis3lv02d_i2c bma180 snd_soc_omap_mcbsp hmc5843_core industrialio_triggered_buffer lis3lv02d snd_soc_omap tsc2007 media leds_tca6507 input_polldev kfifo_buf [ 65.637451] snd_pcm_dmaengine musb_hdrc gpio_twl4030 snd_soc_twl4030 twl4030_madc twl4030_pwrbutton twl4030_vibra twl4030_charger industrialio w2sg0004 ehci_omap omapdss [ 65.654876] CPU: 0 PID: 2445 Comm: Xorg Tainted: G W 4.11.0-rc7-letux+ #1000 [ 65.663513] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 65.670135] [<c010f378>] (unwind_backtrace) from [<c010b8fc>] (show_stack+0x10/0x14) [ 65.678314] [<c010b8fc>] (show_stack) from [<c043e180>] (dump_stack+0x98/0xd0) [ 65.685943] [<c043e180>] (dump_stack) from [<c012f4b8>] (__warn+0xd0/0x100) [ 65.693298] [<c012f4b8>] (__warn) from [<c012f58c>] (warn_slowpath_null+0x1c/0x24) [ 65.701385] [<c012f58c>] (warn_slowpath_null) from [<bf3b90e8>] (omap_gem_put_paddr+0x30/0x60 [omapdrm]) [ 65.711486] [<bf3b90e8>] (omap_gem_put_paddr [omapdrm]) from [<bf3b80c4>] (omap_framebuffer_unpin+0x58/0x6c [omapdrm]) [ 65.723022] [<bf3b80c4>] (omap_framebuffer_unpin [omapdrm]) from [<bf384468>] (drm_atomic_helper_cleanup_planes+0x48/0x50 [drm_kms_helper]) [ 65.736389] [<bf384468>] (drm_atomic_helper_cleanup_planes [drm_kms_helper]) from [<bf3b5498>] (omap_atomic_complete+0x64/0xc4 [omapdrm]) [ 65.749511] [<bf3b5498>] (omap_atomic_complete [omapdrm]) from [<bf3b5ea8>] (omap_atomic_commit+0x1bc/0x1e0 [omapdrm]) [ 65.760925] [<bf3b5ea8>] (omap_atomic_commit [omapdrm]) from [<bf387c1c>] (drm_atomic_helper_set_config+0x50/0xa0 [drm_kms_helper]) [ 65.773986] [<bf387c1c>] (drm_atomic_helper_set_config [drm_kms_helper]) from [<bf2ee1c0>] (drm_mode_set_config_internal+0x4c/0xcc [drm]) [ 65.787506] [<bf2ee1c0>] (drm_mode_set_config_internal [drm]) from [<bf2ee928>] (drm_mode_setcrtc+0x354/0x430 [drm]) [ 65.799102] [<bf2ee928>] (drm_mode_setcrtc [drm]) from [<bf2e7dfc>] (drm_ioctl+0x2f8/0x3c4 [drm]) [ 65.808685] [<bf2e7dfc>] (drm_ioctl [drm]) from [<c0282e50>] (vfs_ioctl+0x20/0x34) [ 65.816680] [<c0282e50>] (vfs_ioctl) from [<c0283814>] (do_vfs_ioctl+0x82c/0x93c) [ 65.824584] [<c0283814>] (do_vfs_ioctl) from [<c0283970>] (SyS_ioctl+0x4c/0x74) [ 65.832305] [<c0283970>] (SyS_ioctl) from [<c0107040>] (ret_fast_syscall+0x0/0x1c) [ 65.850463] ---[ end trace b701f3dfb02e416e ]--- BR, Nikolaus
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail