drm: Consolidate connector arrays in drm_atomic_state

It's kinda pointless to have 2 separate mallocs for these. And when we
add more per-connector state in the future it's even more pointless.

Right now there's no such thing planned, but both Gustavo's per-crtc
fence patches, and some nonblocking commit helpers I'm playing around
with will add more per-crtc stuff. It makes sense to also consolidate
connectors, just for consistency.

In the future we can use this to store a pointer to the preceeding
state, making an atomic update entirely free-standing. This will be
needed to be able to queue them up with a depth > 1.

Cc: Gustavo Padovan <gustavo@padovan.org>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1464818821-5736-10-git-send-email-daniel.vetter@ffwll.ch
This commit is contained in:
Daniel Vetter
2016-06-02 00:06:32 +02:00
parent 2f196b7c4b
commit 63e83c1dba
4 changed files with 22 additions and 28 deletions

View File

@@ -1572,7 +1572,7 @@ void drm_atomic_helper_swap_state(struct drm_device *dev,
for_each_connector_in_state(state, connector, conn_state, i) {
connector->state->state = state;
swap(state->connector_states[i], connector->state);
swap(state->connectors[i].state, connector->state);
connector->state->state = NULL;
}