From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 0/4] drm/atomic: Add accessor macros for all atomic state.
Date: Thu, 15 Dec 2016 10:19:55 +0100 [thread overview]
Message-ID: <f212cd8e-d044-850e-4228-02e0e74e4170@linux.intel.com> (raw)
In-Reply-To: <20161214131748.uimc7lfix727ojxv@phenom.ffwll.local>
Op 14-12-16 om 14:17 schreef Daniel Vetter:
> On Wed, Nov 16, 2016 at 02:58:04PM +0100, Maarten Lankhorst wrote:
>> Second approach. Instead of trying to convert all drivers straight away,
>> implement all macros that are required to get state working.
>>
>> Current 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:
>> When doing some dereferencing outside atomic_state, use
>> drm_atomic_get_current_obj_state which has locking checks, instead of
>> obj->state.
>>
>> 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 if it's 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 foo_state->crtc too, saves 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.
>>
>> This will give the correct state regardless of swapping.
> So this is all nice, but fundamentally it's pile of new code with 0 users.
> Where are those patches? I think at least converting all the core+helpers
> to use it consistently would be needed to justify this.
I deliberately didn't send those patches this time because the drivers and atomic core change all the time. I would have had to respin this whole series at least 4 times. :)
I have the patches for conversion in my tree based on -tip.
https://cgit.freedesktop.org/~mlankhorst/linux/log/?h=nightly
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2016-12-15 9:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 13:58 [PATCH v2 0/4] drm/atomic: Add accessor macros for all atomic state Maarten Lankhorst
2016-11-16 13:58 ` [PATCH v2 1/4] drm/atomic: Add new iterators over all state, v2 Maarten Lankhorst
2016-11-16 13:58 ` [PATCH v2 2/4] drm/atomic: Add accessor macros for the current state Maarten Lankhorst
2016-11-16 14:35 ` Ville Syrjälä
2016-11-16 15:04 ` Daniel Vetter
2016-11-16 16:11 ` Maarten Lankhorst
2016-11-16 16:26 ` Daniel Vetter
2016-11-16 16:32 ` Ville Syrjälä
2016-11-17 11:58 ` Maarten Lankhorst
2016-11-17 12:26 ` Ville Syrjälä
2016-11-17 12:42 ` Maarten Lankhorst
2016-11-17 12:50 ` Ville Syrjälä
2016-11-17 13:20 ` [PATCH v2.1 2/4] drm/atomic: Add accessor macros for the current state, v2 Maarten Lankhorst
2016-12-09 22:27 ` Daniel Vetter
2016-12-14 13:15 ` Daniel Vetter
2016-12-15 10:24 ` [PATCH v2.2 2/4] drm/atomic: Add accessor macros for the current state, v3 Maarten Lankhorst
2016-11-16 13:58 ` [PATCH v2 3/4] drm/atomic: Add macros to access existing old/new state Maarten Lankhorst
2016-12-28 14:25 ` Daniel Vetter
2016-11-16 13:58 ` [PATCH v2 4/4] drm/atomic: Add checks to ensure get_state is not called after swapping Maarten Lankhorst
2016-11-16 14:18 ` [PATCH v2 0/4] drm/atomic: Add accessor macros for all atomic state Daniel Vetter
2016-11-16 16:11 ` Maarten Lankhorst
2016-11-16 16:27 ` Daniel Vetter
2016-12-14 13:17 ` Daniel Vetter
2016-12-15 9:19 ` Maarten Lankhorst [this message]
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=f212cd8e-d044-850e-4228-02e0e74e4170@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@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).