summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_atomic.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-02 00:06:32 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-02 17:20:03 +0200
commit63e83c1dba5490de84c2d558a2425730db7fb134 (patch)
tree7e982556c4196a16b80b6f9290ccc06f02df334f /include/drm/drm_atomic.h
parent2f196b7c4b82eeff3574eb2999e78add33ef4361 (diff)
downloadop-kernel-dev-63e83c1dba5490de84c2d558a2425730db7fb134.zip
op-kernel-dev-63e83c1dba5490de84c2d558a2425730db7fb134.tar.gz
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
Diffstat (limited to 'include/drm/drm_atomic.h')
-rw-r--r--include/drm/drm_atomic.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 4e97186..37478ad 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -106,7 +106,7 @@ drm_atomic_get_existing_connector_state(struct drm_atomic_state *state,
if (index >= state->num_connector)
return NULL;
- return state->connector_states[index];
+ return state->connectors[index].state;
}
/**
@@ -175,11 +175,11 @@ int __must_check drm_atomic_check_only(struct drm_atomic_state *state);
int __must_check drm_atomic_commit(struct drm_atomic_state *state);
int __must_check drm_atomic_nonblocking_commit(struct drm_atomic_state *state);
-#define for_each_connector_in_state(state, connector, connector_state, __i) \
+#define for_each_connector_in_state(__state, connector, connector_state, __i) \
for ((__i) = 0; \
- (__i) < (state)->num_connector && \
- ((connector) = (state)->connectors[__i], \
- (connector_state) = (state)->connector_states[__i], 1); \
+ (__i) < (__state)->num_connector && \
+ ((connector) = (__state)->connectors[__i].ptr, \
+ (connector_state) = (__state)->connectors[__i].state, 1); \
(__i)++) \
for_each_if (connector)
OpenPOWER on IntegriCloud