[PATCH 0/8] acquire ctx for everyone!

Daniel Vetter daniel.vetter at ffwll.ch
Tue Jul 25 08:01:14 UTC 2017


Hi all,

This is the final bits of my cleanup work to get rid of the implicit acquire
context for atomic drivers. This handles the property stuff by essentially just
ripping it all out, after 20+ drivers I don't see any need for a driver to
overwrite anything here. Except omapdrm, and that is handled within the existing
framework already.

Besides removing a pile of code another upshot of this work is that a
set_property call for atomic driver now only takes the locks it needs, the same
way like the atomic ioctl.

Leftover bits (I should probably put them into a todo.rst entry):
- Convert vmwgfx over to the fbdev helpers since their current hand-rolled ones
  get this all wrong.

- Add an explicit acquire_ctx to drm_modeset_(un)lock_all and nuke the
  GFP_ATOMIC allocation.

- Also clean up the get_property paths a bit more, would be nice if we wouldn't
  need to have to take all the locks for atomic drivers.

But already with this we're guaranteed that all core and helper paths pass
around the acquire_ctx correctly, which means drivers can now start to use their
own internal drm_modeset_locks for private data structures.

Cheers, Daniel

Daniel Vetter (8):
  drm/omap: Simplify the rotation-on-crtc hack
  drm: Don't update property values for atomic drivers
  drm: Handle properties in the core for atomic drivers
  drm: Nuke drm_atomic_helper_crtc_set_property
  drm: Nuke drm_atomic_helper_plane_set_property
  drm: Nuke drm_atomic_helper_connector_set_property
  drm: Nuke drm_atomic_helper_connector_dpms
  drm: Nuke drm_atomic_legacy_backoff

 drivers/gpu/drm/arm/malidp_planes.c                |   1 -
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c     |   1 -
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c    |   1 -
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c       |   1 -
 drivers/gpu/drm/bridge/analogix-anx78xx.c          |   1 -
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c |   1 -
 drivers/gpu/drm/bridge/dumb-vga-dac.c              |   1 -
 .../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c   |   1 -
 drivers/gpu/drm/bridge/nxp-ptn3460.c               |   1 -
 drivers/gpu/drm/bridge/panel.c                     |   1 -
 drivers/gpu/drm/bridge/parade-ps8622.c             |   1 -
 drivers/gpu/drm/bridge/sii902x.c                   |   1 -
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c          |   1 -
 drivers/gpu/drm/bridge/tc358767.c                  |   1 -
 drivers/gpu/drm/bridge/ti-tfp410.c                 |   1 -
 drivers/gpu/drm/drm_atomic.c                       |  98 ++++----
 drivers/gpu/drm/drm_atomic_helper.c                | 248 ---------------------
 drivers/gpu/drm/drm_connector.c                    |   9 +-
 drivers/gpu/drm/drm_crtc.c                         |   2 +-
 drivers/gpu/drm/drm_crtc_helper.c                  |   3 +-
 drivers/gpu/drm/drm_crtc_internal.h                |   7 +
 drivers/gpu/drm/drm_mode_object.c                  | 159 +++++++++----
 drivers/gpu/drm/drm_plane.c                        |   2 +-
 drivers/gpu/drm/exynos/exynos_drm_dpi.c            |   1 -
 drivers/gpu/drm/exynos/exynos_drm_dsi.c            |   1 -
 drivers/gpu/drm/exynos/exynos_drm_plane.c          |   1 -
 drivers/gpu/drm/exynos/exynos_drm_vidi.c           |   1 -
 drivers/gpu/drm/exynos/exynos_hdmi.c               |   1 -
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c          |   1 -
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c     |   1 -
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c   |   1 -
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c    |   2 -
 drivers/gpu/drm/i2c/tda998x_drv.c                  |  10 +-
 drivers/gpu/drm/i915/intel_crt.c                   |   2 -
 drivers/gpu/drm/i915/intel_display.c               |   3 -
 drivers/gpu/drm/i915/intel_dp.c                    |   2 -
 drivers/gpu/drm/i915/intel_dp_mst.c                |   2 -
 drivers/gpu/drm/i915/intel_dsi.c                   |   2 -
 drivers/gpu/drm/i915/intel_dvo.c                   |   2 -
 drivers/gpu/drm/i915/intel_hdmi.c                  |   2 -
 drivers/gpu/drm/i915/intel_lvds.c                  |   2 -
 drivers/gpu/drm/i915/intel_sdvo.c                  |   2 -
 drivers/gpu/drm/i915/intel_tv.c                    |   2 -
 drivers/gpu/drm/imx/imx-ldb.c                      |   1 -
 drivers/gpu/drm/imx/imx-tve.c                      |   1 -
 drivers/gpu/drm/imx/parallel-display.c             |   1 -
 drivers/gpu/drm/mediatek/mtk_dsi.c                 |   1 -
 drivers/gpu/drm/mediatek/mtk_hdmi.c                |   1 -
 drivers/gpu/drm/meson/meson_venc_cvbs.c            |   1 -
 drivers/gpu/drm/msm/dsi/dsi_manager.c              |   1 -
 drivers/gpu/drm/msm/edp/edp_connector.c            |   1 -
 drivers/gpu/drm/msm/hdmi/hdmi_connector.c          |   1 -
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c           |   1 -
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c |   1 -
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c           |   2 -
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c          |   2 -
 drivers/gpu/drm/mxsfb/mxsfb_out.c                  |   1 -
 drivers/gpu/drm/nouveau/nouveau_connector.c        |  15 +-
 drivers/gpu/drm/nouveau/nv50_display.c             |   4 -
 drivers/gpu/drm/omapdrm/omap_connector.c           |   1 -
 drivers/gpu/drm/omapdrm/omap_crtc.c                |  65 +++---
 drivers/gpu/drm/omapdrm/omap_plane.c               |   1 -
 drivers/gpu/drm/pl111/pl111_connector.c            |   1 -
 drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c          |   1 -
 drivers/gpu/drm/rcar-du/rcar_du_plane.c            |   1 -
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c              |   1 -
 drivers/gpu/drm/rockchip/cdn-dp-core.c             |   1 -
 drivers/gpu/drm/rockchip/dw-mipi-dsi.c             |   1 -
 drivers/gpu/drm/rockchip/inno_hdmi.c               |   1 -
 drivers/gpu/drm/sti/sti_cursor.c                   |   1 -
 drivers/gpu/drm/sti/sti_dvo.c                      |   1 -
 drivers/gpu/drm/sti/sti_gdp.c                      |   1 -
 drivers/gpu/drm/sti/sti_hda.c                      |   1 -
 drivers/gpu/drm/sti/sti_hdmi.c                     |   2 -
 drivers/gpu/drm/sti/sti_hqvdp.c                    |   1 -
 drivers/gpu/drm/stm/ltdc.c                         |   1 -
 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c             |   1 -
 drivers/gpu/drm/sun4i/sun4i_rgb.c                  |   1 -
 drivers/gpu/drm/sun4i/sun4i_tv.c                   |   1 -
 drivers/gpu/drm/tegra/dsi.c                        |   1 -
 drivers/gpu/drm/tegra/hdmi.c                       |   1 -
 drivers/gpu/drm/tegra/rgb.c                        |   1 -
 drivers/gpu/drm/tegra/sor.c                        |   1 -
 drivers/gpu/drm/tilcdc/tilcdc_panel.c              |   1 -
 drivers/gpu/drm/tilcdc/tilcdc_plane.c              |   1 -
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c             |   1 -
 drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c        |   1 -
 drivers/gpu/drm/vc4/vc4_hdmi.c                     |   1 -
 drivers/gpu/drm/vc4/vc4_vec.c                      |   2 -
 drivers/gpu/drm/virtio/virtgpu_display.c           |   1 -
 drivers/gpu/drm/zte/zx_hdmi.c                      |   1 -
 drivers/gpu/drm/zte/zx_tvenc.c                     |   1 -
 drivers/gpu/drm/zte/zx_vga.c                       |   1 -
 include/drm/drm_atomic.h                           |   8 -
 include/drm/drm_atomic_helper.h                    |  11 -
 include/drm/drm_connector.h                        |  10 +-
 include/drm/drm_crtc.h                             |   6 +-
 include/drm/drm_plane.h                            |   6 +-
 98 files changed, 224 insertions(+), 536 deletions(-)

-- 
2.13.3



More information about the dri-devel mailing list