linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] async vs amend - UAPI
@ 2019-04-12 12:58 Helen Koike
  2019-04-12 12:58 ` [PATCH v3 1/4] drm/uapi: add documentation for atomic flags Helen Koike
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Helen Koike @ 2019-04-12 12:58 UTC (permalink / raw)
  To: dri-devel, David Airlie
  Cc: dnicoara, daniels, alexandros.frantzis, daniel.vetter,
	linux-kernel, tomasz Figa, tina.zhang, boris.brezillon,
	Sean Paul, kernel, nicholas.kazlauskas, Stéphane Marchesin,
	Gustavo Padovan, Helen Koike, Sean Paul, Sandy Huang, linux-doc,
	Thomas Zimmermann, Jonathan Corbet, Alex Deucher,
	Bhawanpreet Lakha, David (ChunMing) Zhou, Anthony Koo,
	Russell King, linux-rockchip, Ville Syrjälä,
	Rob Clark, Christian König, Eric Anholt, Leo Li,
	linux-arm-msm, Harry Wentland, Heiko Stübner,
	linux-arm-kernel, David Francis, Mikita Lipski, amd-gfx,
	Maarten Lankhorst, Daniel Vetter, freedreno, Mamta Shukla,
	Maxime Ripard


Hi,

This patch series is an attempt to clarify some concepts and how things
are hooked inside drm.

There are two main concepts that are similar but different and are
causing some confusion:

    - Asynchronous update: is the ability change the hw state at any time, not
    only during vblank.

    - Amend update: is the ability to perform 1000 commits to be applied as soon
    as possible without waiting for 1000 vblanks.

async updates can be seen as amend, but the opposite is not true.
Please see documentation on the commit
	"drm/atomic: rename async_{update,check} to amend_{update,check}"
for a more detailed explanation.

To perform an async update, we already have the DRM_MODE_PAGE_FLIP_ASYNC
flag in the atomic API and it is already being used by amdgpu in the
atomic path.

The first two commits clarifies these differences. The last two are
RFCs that exposes new async and amend features to userspace.

We introduce in this series the flag DRM_MODE_ATOMIC_AMEND to expose
the amend feature to userspace.
The main reasons to expose this through atomic api is to avoid mixing legacy
with modern/atomic API (since their interactions are not well defined)
and to be able to explicitly manage the cursor plane.

And the last commit hooks the current async implementations with the
DRM_MODE_PAGE_FLIP_ASYNC flag.

Please, see the message in each commit and the documentation that was
added for more details and let me know what you think.

Thanks
Helen

Changes in v3:
- rebase tree
- rebase on top of renaming async_update to amend_update
- improve documentation
- don't fall back to a normal commit if amend is not possible when
requested through the atomic api

Changes in v2:
- rebase tree
- do not fall back to a non-async update if if there isn't any
pending commit to amend

Changes in v1:
- https://patchwork.freedesktop.org/patch/243088/
- Only enable it if userspace requests it.
- Only allow async update for cursor type planes.
- Rename ASYNC_UPDATE for ATOMIC_AMEND.

Helen Koike (4):
  drm/uapi: add documentation for atomic flags
  drm/atomic: rename async_{update,check} to amend_{update,check}
  drm/atomic: add ATOMIC_AMEND flag to the Atomic IOCTL.
  drm/atomic: hook atomic_async_{check,update} with PAGE_FLIP_ASYNC flag

 Documentation/gpu/drm-kms-helpers.rst         |   8 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  15 +-
 drivers/gpu/drm/drm_atomic_helper.c           | 157 ++++++++++++++----
 drivers/gpu/drm/drm_atomic_uapi.c             |   9 +
 drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c    |   6 +
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c   |  12 +-
 drivers/gpu/drm/vc4/vc4_kms.c                 |   4 +-
 drivers/gpu/drm/vc4/vc4_plane.c               |   6 +
 include/drm/drm_atomic.h                      |   4 +-
 include/drm/drm_atomic_helper.h               |   9 +-
 include/drm/drm_modeset_helper_vtables.h      |  69 ++++++--
 include/uapi/drm/drm_mode.h                   |  27 ++-
 12 files changed, 264 insertions(+), 62 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-04-12 14:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-12 12:58 [PATCH v3 0/4] async vs amend - UAPI Helen Koike
2019-04-12 12:58 ` [PATCH v3 1/4] drm/uapi: add documentation for atomic flags Helen Koike
2019-04-12 13:31   ` Boris Brezillon
2019-04-12 12:58 ` [PATCH v3 2/4] drm/atomic: rename async_{update,check} to amend_{update,check} Helen Koike
2019-04-12 13:49   ` Boris Brezillon
2019-04-12 14:06     ` Helen Koike
2019-04-12 14:38       ` Boris Brezillon
2019-04-12 12:58 ` [PATCH RFC v3 3/4] drm/atomic: add ATOMIC_AMEND flag to the Atomic IOCTL Helen Koike
2019-04-12 12:58 ` [PATCH RFC v3 4/4] drm/atomic: hook atomic_async_{check,update} with PAGE_FLIP_ASYNC flag Helen Koike
2019-04-12 13:39   ` Helen Koike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).