[PATCH 0/5] omapdrm: fences and zpos

Tomi Valkeinen tomi.valkeinen at ti.com
Tue Jan 3 12:06:45 UTC 2017


On 03/01/17 01:29, Laurent Pinchart wrote:
> Hello,
> 
> This patch series contains two completely unrelated features that just happen
> to have been developed one right after the other.
> 
> Patches 1/5 to 3/5 implement explicit fences support. The first patch fixes
> event handling in the omapdrm driver as required by the atomic commit helper
> (and the DRM atomic update API). The second patch replace the hand-rolled
> atomic commit handler with the DRM core atomic commit helper, bringing fences
> support as a bonus. The third patch then removes the omapdrm custom sync
> support that has no user in the mainline kernel.
> 
> Patches 4/5 and 5/5 clean up zpos handling by switching to the standard zpos
> property implemented in the DRM core. The omapdrm-specific zorder property is
> kept for backward compatibility as an alias and should be removed later after
> a long enough grace period for userspace to be updated.
> 
> As fence support is implemented completely inside the atomic commit helper I
> have only tested it lightly using the sw-sync driver. No issue has been
> noticed.
> 
> The patches are based on top of my previous omapdrm series that has been fully
> acked and should thus be merged in v4.11. It also requires the "drm: Constify
> drm_mode_config atomic helper private pointer" patch that I have sent to the
> dri-devel mailing list today.
> 
> Laurent Pinchart (5):
>   drm: omapdrm: Handle events when enabling/disabling CRTCs
>   drm: omapdrm: Use DRM core's atomic commit helper
>   drm: omapdrm: Remove legacy buffer synchronization support
>   drm: omapdrm: Store the Z order in the plane state zpos field
>   drm: omapdrm: Add zpos property
> 
>  drivers/gpu/drm/omapdrm/omap_crtc.c  |  30 +++--
>  drivers/gpu/drm/omapdrm/omap_drv.c   | 163 ++++----------------------
>  drivers/gpu/drm/omapdrm/omap_drv.h   |  14 +--
>  drivers/gpu/drm/omapdrm/omap_gem.c   | 215 -----------------------------------
>  drivers/gpu/drm/omapdrm/omap_plane.c |  74 ++----------
>  include/uapi/drm/omap_drm.h          |   4 +-
>  6 files changed, 55 insertions(+), 445 deletions(-)
> 

I got this with your series. AM5 EVM, dual display, I run "kmstest --flip" and then
exit by pressing enter, which is when I see the warning. It happens only sometimes,
but having lots of cpu load (I used "stress -c 4") makes the driver spam the warning.

[   67.207223] ------------[ cut here ]------------
[   67.211937] WARNING: CPU: 1 PID: 324 at drivers/gpu/drm/omapdrm/omap_gem.c:1085 omap_gem_free_object+0x270/0x2d4 [omapdrm]
[   67.223138] Modules linked in: omapdrm drm_kms_helper drm panel_dsi_cm panel_dpi connector_analog_tv connector_dvi connector_hdmi encoder_tp
d12s015 encoder_tfp410 omapdss cfbfillrect cfbimgblt cfbcopyarea [last unloaded: omapdss]
[   67.243953] CPU: 1 PID: 324 Comm: kmstest Not tainted 4.9.0-rc8-00163-g55f4a6c2d775 #135
[   67.252084] Hardware name: Generic DRA74X (Flattened Device Tree)
[   67.258207] Backtrace: 
[   67.260691] [<c010d8e0>] (dump_backtrace) from [<c010db8c>] (show_stack+0x18/0x1c)
[   67.268301]  r7:c0d830d8 r6:60070013 r5:00000000 r4:c0d830d8
[   67.273997] [<c010db74>] (show_stack) from [<c04d8668>] (dump_stack+0xa8/0xdc)
[   67.281263] [<c04d85c0>] (dump_stack) from [<c013c660>] (__warn+0xdc/0x108)
[   67.288263]  r9:bf292048 r8:0000043d r7:00000009 r6:bf2972cc r5:00000000 r4:00000000
[   67.296050] [<c013c584>] (__warn) from [<c013c740>] (warn_slowpath_null+0x28/0x30)
[   67.303661]  r9:c00464b4 r8:ed0a4800 r7:00000000 r6:ed0a4838 r5:ee6d179c r4:ed09c700
[   67.311467] [<c013c718>] (warn_slowpath_null) from [<bf292048>] (omap_gem_free_object+0x270/0x2d4 [omapdrm])
[   67.321482] [<bf291dd8>] (omap_gem_free_object [omapdrm]) from [<bf1dd228>] (drm_gem_object_free+0x4c/0x6c [drm])
[   67.331796]  r10:ed0a4800 r9:c00464b4 r8:00000001 r7:00000000 r6:ed0a4838 r5:ed09c700
[   67.339664]  r4:ed0a4800
[   67.342422] [<bf1dd1dc>] (drm_gem_object_free [drm]) from [<bf1dd81c>] (drm_gem_object_unreference_unlocked+0x128/0x13c [drm])
[   67.353867]  r5:00000000 r4:ed09c700
[   67.357671] [<bf1dd6f4>] (drm_gem_object_unreference_unlocked [drm]) from [<bf1dd8a4>] (drm_gem_object_handle_unreference_unlocked+0x74/0xb0
 [drm])
[   67.370949]  r8:ed1d181c r7:ed1d1954 r6:ed0a4e30 r5:00000000 r4:ed09c700
[   67.377892] [<bf1dd830>] (drm_gem_object_handle_unreference_unlocked [drm]) from [<bf1dd938>] (drm_gem_object_release_handle+0x58/0x90 [drm]
)
[   67.390646]  r7:ed1d1954 r6:ed0a4800 r5:ed1d1800 r4:ed09c700
[   67.396543] [<bf1dd8e0>] (drm_gem_object_release_handle [drm]) from [<bf1dd9d0>] (drm_gem_handle_delete+0x60/0x8c [drm])
[   67.407465]  r7:ed09c700 r6:00000002 r5:ed1d1800 r4:ed1d1854
[   67.413361] [<bf1dd970>] (drm_gem_handle_delete [drm]) from [<bf1dda10>] (drm_gem_dumb_destroy+0x14/0x18 [drm])
[   67.423500]  r9:c00464b4 r8:ed1d1800 r7:bf1ff980 r6:00000004 r5:ee7efe50 r4:00000000

[   67.431490] [<bf1dd9fc>] (drm_gem_dumb_destroy [drm]) from [<bf1fb4b4>] (drm_mode_destroy_dumb_ioctl+0x30/0x3c [drm])
[   67.442408] [<bf1fb484>] (drm_mode_destroy_dumb_ioctl [drm]) from [<bf1deb18>] (drm_ioctl+0x210/0x424 [drm])
[   67.452392] [<bf1de908>] (drm_ioctl [drm]) from [<c02d0b94>] (do_vfs_ioctl+0x9c/0xa88)
[   67.460352]  r10:00000000 r9:00000003 r8:00000003 r7:c02d15f4 r6:ed14b180 r5:ed5feac8
[   67.468219]  r4:be95c44c
[   67.470771] [<c02d0af8>] (do_vfs_ioctl) from [<c02d15f4>] (SyS_ioctl+0x74/0x84)
[   67.478120]  r10:00000000 r9:00000003 r8:be95c44c r7:c00464b4 r6:ed14b180 r5:ed14b180
[   67.485987]  r4:00000000
[   67.488541] [<c02d1580>] (SyS_ioctl) from [<c0108a60>] (ret_fast_syscall+0x0/0x1c)
[   67.496151]  r9:ee7ee000 r8:c0108c04 r7:00000036 r6:c00464b4 r5:be95c44c r4:0005de78
[   67.504143] ---[ end trace 11d19f8e7a3544b1 ]---

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170103/6addf3d0/attachment.sig>


More information about the dri-devel mailing list