Skip to content

drm/atomic: Add accessor macros for all atomic state.

Maarten Lankhorst dri-devel intel-gfx 5 versions – In review

Get series with b4
b4 am 1487256430-7625-1-git-send-email-maarten.lankhorst@linux.intel.com

Versions newest first · linked by author and title

  1. v4 Latest5 patches 7 repliesIn review
  2. v37 patches 23 repliesSuperseded
  3. v2 posting 2/27 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/24 patches17 repliesSuperseded
v119 patches24 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drm/atomic: Fix atomic helpers to use the new iterator macros, v2.drivers/gpu/drm/drm_atomic_helper.c+222 -2092 replies
1/5drm/atomic: Fix atomic helpers to use the new iterator macros, v3.drivers/gpu/drm/drm_atomic_helper.c+230 -2161 reply
2/5drm/atomic: Make drm_atomic_plane_disabling easier to understand.drivers/gpu/drm/drm_atomic_helper.c drivers/gpu/drm/drm_plane_helper.c include/drm/drm_atomic_helper.h+13 -221 reply
3/5drm/atomic: Add macros to access existing old/new state, v2.include/drm/drm_atomic.h+108 -01 reply
4/5drm/atomic: Convert get_existing_state callers to get_old/new_state, v3.drivers/gpu/drm/drm_atomic.c drivers/gpu/drm/drm_atomic_helper.c drivers/gpu/drm/drm_blend.c +1 more+28 -281 reply
4/5drm/atomic: Convert get_existing_state callers to get_old/new_state, v4.drivers/gpu/drm/drm_atomic.c drivers/gpu/drm/drm_atomic_helper.c drivers/gpu/drm/drm_blend.c +1 more+30 -300 replies
5/5drm/blend: Use new atomic iterator macros.drivers/gpu/drm/drm_blend.c+11 -111 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchLaurent Pinchart
1/5R-b R-b T-b
1/5R-b R-b T-b
2/5R-b
3/5R-b
4/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/5] drm/atomic: Add accessor macros for all atomic state.

Fifth iteration. Instead of trying to convert all drivers straight away, implement all macros that are required to get state working.

Old situation:
Use obj->state, which can refer to old or new state.
Use drm_atomic_get_(existing_)obj_state, which can refer to new or old state. Use for_each_obj_in_state, which refers to new or old state.

New situation:

During atomic check:
- Use drm_atomic_get_obj_state to add a object to the atomic state, or get the new state.
- Use drm_atomic_get_(old/new)_obj_state to peek at the new/old state, without adding the object. This will return NULL if the object is not part of the state. For planes and connectors the relevant crtc_state is added, so this will work to get the crtc_state from obj_state->crtc too, this means not having to write some error handling.

During atomic commit:
- Do not use drm_atomic_get_obj_state, obj->state or drm_atomic_get_(existing_)obj_state any more, replace with drm_atomic_get_old/new_obj_state calls as required.

During both:
- Use for_each_(new,old,oldnew)_obj_in_state to get the old or new state as needed. oldnew will be renamed to for_each_obj_in_state after all callers are converted to the new api.

When not doing atomic updates:
Look at obj->state for now. I have some patches to fix this but I was asked to make it return a const state. This breaks a lot of users though so I skipped that patch in this iteration.

This series will return the correct state regardless of swapping.

Maarten Lankhorst (5):
drm/atomic: Fix atomic helpers to use the new iterator macros, v2. drm/atomic: Make drm_atomic_plane_disabling easier to understand. drm/atomic: Add macros to access existing old/new state, v2. drm/atomic: Convert get_existing_state callers to get_old/new_state,

    v3.

drm/blend: Use new atomic iterator macros.

 drivers/gpu/drm/drm_atomic.c            |   6 +-
 drivers/gpu/drm/drm_atomic_helper.c     | 469 ++++++++++++++++----------------
 drivers/gpu/drm/drm_blend.c             |  23 +-
 drivers/gpu/drm/drm_plane_helper.c      |   2 +-
 drivers/gpu/drm/drm_simple_kms_helper.c |   4 +-
 include/drm/drm_atomic.h                | 108 ++++++++
 include/drm/drm_atomic_helper.h         |  26 +-
 7 files changed, 375 insertions(+), 263 deletions(-)
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel