[PATCH 5/5] drm/omapdrm: Switch to gem_free_object_unlocked

Tomi Valkeinen tomi.valkeinen at ti.com
Wed Mar 28 11:13:46 UTC 2018


On 28/03/18 13:12, Daniel Vetter wrote:

>> This triggers WARN_ON(!mutex_is_locked(&dev->struct_mutex)), we have a
>> few of those. I need to reverse engineer the omap_gem locking a bit to
>> understand what's needed. And I need to figure out what exactly does
>> struct_mutext protect =).
> 
> Oops, I thought I read the code carefully and audited for that. Can
> you pls attach some example backtraces?

Here's one I get easily.

[   22.204433] ------------[ cut here ]------------
[   22.209135] WARNING: CPU: 1 PID: 368 at drivers/gpu/drm/omapdrm/omap_gem.c:1089 omap_gem_free_object+0x2a4/0x2f8 [omapdrm]
[   22.220611] Modules linked in: omapdrm drm_kms_helper drm drm_panel_orientation_quirks cfbfillrect cfbimgblt cfbcopyarea connector_dvi panel_dsi_cm panel_dpi connector_ana
log_tv connector_hdmi encoder_tpd12s015 encoder_tfp410 omapdss omapdss_base cec snd_soc_omap_hdmi_audio
[   22.245266] CPU: 1 PID: 368 Comm: kmstest Not tainted 4.16.0-rc7-01687-gcbc98ccce117 #10
[   22.253406] Hardware name: Generic DRA74X (Flattened Device Tree)
[   22.259539] Backtrace: 
[   22.262029] [<c010ec28>] (dump_backtrace) from [<c010eef8>] (show_stack+0x18/0x1c)
[   22.269646]  r7:00000000 r6:600d0013 r5:00000000 r4:c0fbf8f0
[   22.275349] [<c010eee0>] (show_stack) from [<c09b9960>] (dump_stack+0xac/0xe0)
[   22.282620] [<c09b98b4>] (dump_stack) from [<c013dff8>] (__warn+0xd4/0x100)
[   22.289625]  r7:00000009 r6:bf193728 r5:00000000 r4:00000000
[   22.295324] [<c013df24>] (__warn) from [<c013e140>] (warn_slowpath_null+0x44/0x50)
[   22.302941]  r9:ed435e34 r8:ed36241c r7:ed3b7300 r6:bf18d4a4 r5:00000441 r4:bf193728
[   22.310759] [<c013e0fc>] (warn_slowpath_null) from [<bf18d4a4>] (omap_gem_free_object+0x2a4/0x2f8 [omapdrm])
[   22.320645]  r6:ed14a000 r5:ed259200 r4:ed3b7300
[   22.325450] [<bf18d200>] (omap_gem_free_object [omapdrm]) from [<bf0c9324>] (drm_gem_object_free+0x28/0x6c [drm])
[   22.335774]  r10:000000b4 r9:ed435e34 r8:ed36241c r7:ed3b7300 r6:ed3b7300 r5:ed3b7300
[   22.343649]  r4:ed14a000
[   22.346427] [<bf0c92fc>] (drm_gem_object_free [drm]) from [<bf0c9934>] (drm_gem_object_put_unlocked+0xb4/0xc4 [drm])
[   22.357008]  r5:ed14a5b8 r4:bf18d200
[   22.360833] [<bf0c9880>] (drm_gem_object_put_unlocked [drm]) from [<bf0c99bc>] (drm_gem_object_handle_put_unlocked+0x78/0xc0 [drm])
[   22.372724]  r7:ed3b7300 r6:00000000 r5:ed14a5b8 r4:ed3b7300
[   22.378642] [<bf0c9944>] (drm_gem_object_handle_put_unlocked [drm]) from [<bf0c9a5c>] (drm_gem_object_release_handle+0x58/0x90 [drm])
[   22.390707]  r7:ed3b7300 r6:ed362558 r5:ed362400 r4:ed3b7300
[   22.396625] [<bf0c9a04>] (drm_gem_object_release_handle [drm]) from [<bf0c9af4>] (drm_gem_handle_delete+0x60/0x8c [drm])
[   22.407555]  r7:ed3b7300 r6:00000001 r5:ed362400 r4:ed36242c
[   22.413472] [<bf0c9a94>] (drm_gem_handle_delete [drm]) from [<bf0c9b34>] (drm_gem_dumb_destroy+0x14/0x18 [drm])
[   22.423620]  r9:ed435e34 r8:bf0e7970 r7:00000018 r6:00000000 r5:ed14a000 r4:ed362400
[   22.431630] [<bf0c9b20>] (drm_gem_dumb_destroy [drm]) from [<bf0e79b4>] (drm_mode_destroy_dumb_ioctl+0x44/0x50 [drm])
[   22.442518] [<bf0e7970>] (drm_mode_destroy_dumb_ioctl [drm]) from [<bf0ca8c0>] (drm_ioctl_kernel+0x6c/0xb8 [drm])
[   22.453059] [<bf0ca854>] (drm_ioctl_kernel [drm]) from [<bf0cad78>] (drm_ioctl+0x2b4/0x3e4 [drm])
[   22.461985]  r9:ed435e34 r8:c00464b4 r7:ed362400 r6:00000004 r5:00000004 r4:bf0f2f40
[   22.469889] [<bf0caac4>] (drm_ioctl [drm]) from [<c030b324>] (do_vfs_ioctl+0xa8/0xa24)
[   22.477856]  r10:00000000 r9:c030bd0c r8:ed420068 r7:00000003 r6:ed2f1e40 r5:bebb487c
[   22.485732]  r4:c0f08948
[   22.488291] [<c030b27c>] (do_vfs_ioctl) from [<c030bd0c>] (SyS_ioctl+0x6c/0x7c)
[   22.495648]  r10:00000000 r9:00000003 r8:bebb487c r7:c00464b4 r6:00000000 r5:ed2f1e40
[   22.503523]  r4:ed2f1e40
[   22.506084] [<c030bca0>] (SyS_ioctl) from [<c0101000>] (ret_fast_syscall+0x0/0x28)
[   22.513698] Exception stack(0xed435fa8 to 0xed435ff0)
[   22.518788] 5fa0:                   00061780 bebb487c 00000003 c00464b4 bebb487c 00000001
[   22.527018] 5fc0: 00061780 bebb487c c00464b4 00000036 bebb487c 00062e58 0005dfdc 00000001
[   22.535245] 5fe0: b6f52090 bebb485c b6f3a500 b6cb7c6c
[   22.540334]  r9:ed434000 r8:c01011c4 r7:00000036 r6:c00464b4 r5:bebb487c r4:00061780
[   22.548236] ---[ end trace 653a10f34c5fdc64 ]---

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


More information about the dri-devel mailing list