From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH v4 0/5] drm/atomic: Add accessor macros for all atomic state.
Date: Thu, 16 Feb 2017 15:47:05 +0100 [thread overview]
Message-ID: <1487256430-7625-1-git-send-email-maarten.lankhorst@linux.intel.com> (raw)
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(-)
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2017-02-16 14:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 14:47 Maarten Lankhorst [this message]
2017-02-16 14:47 ` [PATCH v4 1/5] drm/atomic: Fix atomic helpers to use the new iterator macros, v2 Maarten Lankhorst
2017-03-01 0:49 ` Laurent Pinchart
2017-03-01 9:09 ` Maarten Lankhorst
2017-03-01 9:21 ` [PATCH v4.1 1/5] drm/atomic: Fix atomic helpers to use the new iterator macros, v3 Maarten Lankhorst
2017-03-01 10:06 ` Laurent Pinchart
2017-02-16 14:47 ` [PATCH v4 2/5] drm/atomic: Make drm_atomic_plane_disabling easier to understand Maarten Lankhorst
2017-03-01 0:53 ` Laurent Pinchart
2017-02-16 14:47 ` [PATCH v4 3/5] drm/atomic: Add macros to access existing old/new state, v2 Maarten Lankhorst
2017-03-01 0:56 ` Laurent Pinchart
2017-02-16 14:47 ` [PATCH v4 4/5] drm/atomic: Convert get_existing_state callers to get_old/new_state, v3 Maarten Lankhorst
2017-03-01 1:04 ` Laurent Pinchart
2017-03-01 9:22 ` [PATCH v4.1 4/5] drm/atomic: Convert get_existing_state callers to get_old/new_state, v4 Maarten Lankhorst
2017-02-16 14:47 ` [PATCH v4 5/5] drm/blend: Use new atomic iterator macros Maarten Lankhorst
2017-03-01 0:58 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487256430-7625-1-git-send-email-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).