[PATCH 00/31] Convert omapdrm to the atomic updates API
Hi, On 16/04/15 01:09, Laurent Pinchart wrote: > Hello, > > This patch set converts the omapdrm to the atomic update API in 31 small(ish) > and hopefully reviewable steps. Thanks! I'll start reviewing the patches later this week. > The series is based on the latest drm/next branch and depends on the pending > "drm: omapdrm: Store the rotation property in dev->mode_config" patch by > Daniel Vetter. > > The omapdrm loses support for its custom fences in the process. This isn't > deemed to be an issue, as the custom fences API is used by the SGX driver > only, which requires out-of-tree patches anyway. Fences support will be > reimplemented at a later point on top of the atomic updates conversion using > the mainline fence API. > > One known issue is a race condition between asynchronous commits and > drm_release() which can trigger a warning if a commit is applied between the > drm_events_release() call and the > WARN_ON(!list_empty(_priv->event_list)). > Investigation is ongoing to find out the best way to fix the problem, the > problem seems not to be limited to omapdrm (but can be more or less difficult > to reproduce depending on the driver). Ideas would be welcome, I've CC'ed > maintainers of possibly affected drivers. > > There's not much else to be said, details are explained in individual patches. > > The patches can be found in my git tree at > > git://linuxtv.org/pinchartl/fbdev.git omapdrm/next I ran a few quick tests with your branch, on Pandaboard. Something related to vblanks/timing is broken, and I can only get half the fps. The "db" test app from my omapdrm-tests shows this easily. I also got a few warnings (below), but that was before I applied your "drm: omapdrm: Support unlinking page flip events prematurely" patch. After that I didn't see those anymore. I didn't see any other issues, but my tests were quite quick and simple. Tomi [ 190.434112] [ cut here ] [ 190.439575] WARNING: CPU: 0 PID: 175 at drivers/gpu/drm/omapdrm/omap_gem.c:1292 omap_gem_free_object+0x260/0x278 [omapdrm]() [ 190.451385] Modules linked in: omapdrm drm_kms_helper drm cfbfillrect cfbimgblt cfbcopyarea panel_nec_nl8048hl11 panel_sony_acx565akm panel_lgphilips_lb035q02 panel_dsi_cm pan el_dpi connector_analog_tv connector_hdmi connector_dvi encoder_tpd12s015 encoder_tfp410 omapdss [ 190.475860] CPU: 0 PID: 175 Comm: producer Not tainted 4.0.0-rc7-00759-g7290d47d0475 #4 [ 190.485198] Hardware name: Generic OMAP4 (Flattened Device Tree) [ 190.485626] Backtrace: [ 190.493469] [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [ 190.502075] r6:c0a07598 r5:c0a07598 r4: r3: [ 190.505676] [] (show_stack) from [] (dump_stack+0xa4/0xd4) [ 190.515686] [] (dump_stack) from [] (warn_slowpath_common+0x84/0xc0) [ 190.524230] r6:050c r5:bf145890 r4: r3:ed148b80 [ 190.526794] [] (warn_slowpath_common) from [] (warn_slowpath_null+0x24/0x2c) [ 190.539459] r8:edac6678 r7:edf9eb98 r6:ee6b7800 r5:ed1b689c r4:ee713b80 [ 190.545288] [] (warn_slowpath_null) from [] (omap_gem_free_object+0x260/0x278 [omapdrm]) [ 190.556945] [] (omap_gem_free_object [omapdrm]) from [] (drm_gem_object_free+0x30/0x38 [drm]) [ 190.567993] r9:0010 r8:edac6678 r7:edf9eb98 r6:ee2c2b10 r5:ee6b7834 r4:ee713b80 [ 190.575134] [] (drm_gem_object_free [drm]) from [] (omap_gem_dmabuf_release+0xa8/0xb4 [omapdrm]) [ 190.587432] [] (omap_gem_dmabuf_release [omapdrm]) from [] (dma_buf_release+0x54/0x17c) [ 190.597717] r5: r4:ee60e800 [ 190.601501] [] (dma_buf_release) from [] (__fput+0x9c/0x1ec) [ 190.609283] r9:0010 r8:edac6678 r7:edf9eb98 r6:ee2c2b10 r5:edac6678 r4:ee6fce80 [ 190.614654] [] (__fput) from [] (fput+0x10/0x14) [ 190.619750] r10:ed148b80 r9:0001 r8: r7:ed148b80 r6:c0a53738 r5:ed02ce40 [ 190.632812] r4:ed149084 [ 190.635467] [] (fput) from [] (task_work_run+0xbc/0x100) [ 190.643432] [] (task_work_run) from [] (do_exit+0x390/0xb00) [ 190.651214] r8:ebc16658 r7:ebc16600 r6:b6f75750 r5:c0a402c4 r4:ed14909c r3:003c [ 190.654876] [] (do_exit) from [] (do_group_exit+0x48/0xc4) [ 190.667144] r7:00f8 [ 190.670074] [] (do_group_exit) from [] (__wake_up_parent+0x0/0x28) [ 190.678466] r6:b6f75750 r5: r4:0001 r3: [ 190.684753] [] (SyS_exit_group) from [] (ret_fast_syscall+0x0/0x4c) [ 190.693237] ---[ end trace 0f3a4a8e4c514be3 ]--- [ 226.385437] [ cut here ] [ 226.385437] WARNING: CPU: 0 PID: 185 at drivers/gpu/drm/drm_fops.c:459 drm_release+0x418/0x464 [drm]() [ 226.385437] Modules linked in: omapdrm drm_kms_helper drm cfbfillrect cfbimgblt cfbcopyarea panel_nec_nl8048hl11 panel_sony_acx565akm panel_lgphilips_lb035q02 panel_dsi_cm pan el_dpi connector_analog_tv connector_hdmi connector_dvi encoder_tpd12s015 encoder_tfp410 omapdss [ 226.425781] CPU: 0 PID: 185 Comm: consumer Tainted: GW 4.0.0-rc7-00759-g7290d47d0475 #4 [ 226.435668] Hardware name:
[PATCH 00/31] Convert omapdrm to the atomic updates API
On Thu, Apr 16, 2015 at 01:09:17AM +0300, Laurent Pinchart wrote: > Hello, > > This patch set converts the omapdrm to the atomic update API in 31 small(ish) > and hopefully reviewable steps. > > The series is based on the latest drm/next branch and depends on the pending > "drm: omapdrm: Store the rotation property in dev->mode_config" patch by > Daniel Vetter. > > The omapdrm loses support for its custom fences in the process. This isn't > deemed to be an issue, as the custom fences API is used by the SGX driver > only, which requires out-of-tree patches anyway. Fences support will be > reimplemented at a later point on top of the atomic updates conversion using > the mainline fence API. > > One known issue is a race condition between asynchronous commits and > drm_release() which can trigger a warning if a commit is applied between the > drm_events_release() call and the > WARN_ON(!list_empty(_priv->event_list)). > Investigation is ongoing to find out the best way to fix the problem, the > problem seems not to be limited to omapdrm (but can be more or less difficult > to reproduce depending on the driver). Ideas would be welcome, I've CC'ed > maintainers of possibly affected drivers. Known issue, every driver has to currently hand-roll their pending events code, and many don't :( One of my goals with rewriting drm_irq.c was to make it possible to fix this up, but somehow that gets pushed down the priority list forever ... -Daniel > > There's not much else to be said, details are explained in individual patches. > > The patches can be found in my git tree at > > git://linuxtv.org/pinchartl/fbdev.git omapdrm/next > > Cc: Daniel Vetter > Cc: Rob Clark > Cc: Thierry Reding > Cc: Benjamin Gaignard > > Laurent Pinchart (31): > drm: omapdrm: Store the rotation property in dev->mode_config > drm: omapdrm: Apply settings synchronously > drm: omapdrm: Rename omap_crtc_page_flip_locked to omap_crtc_page_flip > drm: omapdrm: Rename omap_crtc page flip-related fields > drm: omapdrm: Simplify IRQ registration > drm: omapdrm: Cancel pending page flips when closing device > drm: omapdrm: Rework page flip handling > drm: omapdrm: Turn vblank on/off when enabling/disabling CRTC > drm: omapdrm: Fix page flip race with CRTC disable > drm: omapdrm: Clean up #include's > drm: omapdrm: Rename CRTC DSS operations with an omap_crtc_dss_ prefix > drm: omapdrm: Rework CRTC enable/disable for atomic updates > drm: omapdrm: Implement encoder .disable() and .enable() operations > drm: omapdrm: Wire up atomic state object scaffolding > drm: omapdrm: Implement planes atomic operations > drm: omapdrm: Handle primary plane config through atomic plane ops > drm: omapdrm: Switch plane update to atomic helpers > drm: omapdrm: Switch mode config to atomic helpers > drm: omapdrm: Switch connector DPMS to atomic helpers > drm: omapdrm: Replace encoder mode_fixup with atomic_check > drm: omapdrm: Implement asynchronous commit support > drm: omapdrm: Switch page flip to atomic helpers > drm: omapdrm: Drop manual framebuffer pin handling > drm: omapdrm: Switch crtc and plane set_property to atomic helpers > drm: omapdrm: Move plane info and win out of the plane structure > drm: omapdrm: Move crtc info out of the crtc structure > drm: omapdrm: Remove omap_crtc enabled field > drm: omapdrm: Remove omap_plane enabled field > drm: omapdrm: Make the omap_crtc_flush function static > drm: omapdrm: Don't get/put dispc in omap_crtc_flush() > drm: omapdrm: omap_crtc_flush() isn't called with modeset locked > > drivers/gpu/drm/omapdrm/omap_connector.c | 12 +- > drivers/gpu/drm/omapdrm/omap_crtc.c | 580 > +- > drivers/gpu/drm/omapdrm/omap_debugfs.c| 6 +- > drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 19 +- > drivers/gpu/drm/omapdrm/omap_drv.c| 162 - > drivers/gpu/drm/omapdrm/omap_drv.h| 52 +-- > drivers/gpu/drm/omapdrm/omap_encoder.c| 60 ++-- > drivers/gpu/drm/omapdrm/omap_fb.c | 8 +- > drivers/gpu/drm/omapdrm/omap_fbdev.c | 6 +- > drivers/gpu/drm/omapdrm/omap_gem.c| 4 +- > drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 4 +- > drivers/gpu/drm/omapdrm/omap_irq.c| 106 ++ > drivers/gpu/drm/omapdrm/omap_plane.c | 426 +- > 13 files changed, 656 insertions(+), 789 deletions(-) > > -- > Regards, > > Laurent Pinchart > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
[PATCH 00/31] Convert omapdrm to the atomic updates API
Hello, This patch set converts the omapdrm to the atomic update API in 31 small(ish) and hopefully reviewable steps. The series is based on the latest drm/next branch and depends on the pending "drm: omapdrm: Store the rotation property in dev->mode_config" patch by Daniel Vetter. The omapdrm loses support for its custom fences in the process. This isn't deemed to be an issue, as the custom fences API is used by the SGX driver only, which requires out-of-tree patches anyway. Fences support will be reimplemented at a later point on top of the atomic updates conversion using the mainline fence API. One known issue is a race condition between asynchronous commits and drm_release() which can trigger a warning if a commit is applied between the drm_events_release() call and the WARN_ON(!list_empty(_priv->event_list)). Investigation is ongoing to find out the best way to fix the problem, the problem seems not to be limited to omapdrm (but can be more or less difficult to reproduce depending on the driver). Ideas would be welcome, I've CC'ed maintainers of possibly affected drivers. There's not much else to be said, details are explained in individual patches. The patches can be found in my git tree at git://linuxtv.org/pinchartl/fbdev.git omapdrm/next Cc: Daniel Vetter Cc: Rob Clark Cc: Thierry Reding Cc: Benjamin Gaignard Laurent Pinchart (31): drm: omapdrm: Store the rotation property in dev->mode_config drm: omapdrm: Apply settings synchronously drm: omapdrm: Rename omap_crtc_page_flip_locked to omap_crtc_page_flip drm: omapdrm: Rename omap_crtc page flip-related fields drm: omapdrm: Simplify IRQ registration drm: omapdrm: Cancel pending page flips when closing device drm: omapdrm: Rework page flip handling drm: omapdrm: Turn vblank on/off when enabling/disabling CRTC drm: omapdrm: Fix page flip race with CRTC disable drm: omapdrm: Clean up #include's drm: omapdrm: Rename CRTC DSS operations with an omap_crtc_dss_ prefix drm: omapdrm: Rework CRTC enable/disable for atomic updates drm: omapdrm: Implement encoder .disable() and .enable() operations drm: omapdrm: Wire up atomic state object scaffolding drm: omapdrm: Implement planes atomic operations drm: omapdrm: Handle primary plane config through atomic plane ops drm: omapdrm: Switch plane update to atomic helpers drm: omapdrm: Switch mode config to atomic helpers drm: omapdrm: Switch connector DPMS to atomic helpers drm: omapdrm: Replace encoder mode_fixup with atomic_check drm: omapdrm: Implement asynchronous commit support drm: omapdrm: Switch page flip to atomic helpers drm: omapdrm: Drop manual framebuffer pin handling drm: omapdrm: Switch crtc and plane set_property to atomic helpers drm: omapdrm: Move plane info and win out of the plane structure drm: omapdrm: Move crtc info out of the crtc structure drm: omapdrm: Remove omap_crtc enabled field drm: omapdrm: Remove omap_plane enabled field drm: omapdrm: Make the omap_crtc_flush function static drm: omapdrm: Don't get/put dispc in omap_crtc_flush() drm: omapdrm: omap_crtc_flush() isn't called with modeset locked drivers/gpu/drm/omapdrm/omap_connector.c | 12 +- drivers/gpu/drm/omapdrm/omap_crtc.c | 580 +- drivers/gpu/drm/omapdrm/omap_debugfs.c| 6 +- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 19 +- drivers/gpu/drm/omapdrm/omap_drv.c| 162 - drivers/gpu/drm/omapdrm/omap_drv.h| 52 +-- drivers/gpu/drm/omapdrm/omap_encoder.c| 60 ++-- drivers/gpu/drm/omapdrm/omap_fb.c | 8 +- drivers/gpu/drm/omapdrm/omap_fbdev.c | 6 +- drivers/gpu/drm/omapdrm/omap_gem.c| 4 +- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 4 +- drivers/gpu/drm/omapdrm/omap_irq.c| 106 ++ drivers/gpu/drm/omapdrm/omap_plane.c | 426 +- 13 files changed, 656 insertions(+), 789 deletions(-) -- Regards, Laurent Pinchart