diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-06-18 09:58:55 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-06-19 17:25:01 +0200 |
commit | 2465ff6217f1b63e194cfd57018fa42abe7fcdf0 (patch) | |
tree | 713019f70c7a0cb333f1223beb36a156650296f3 /include/drm | |
parent | drm/cma: Fix 64-bit size_t build warnings (diff) | |
download | linux-2465ff6217f1b63e194cfd57018fa42abe7fcdf0.tar.xz linux-2465ff6217f1b63e194cfd57018fa42abe7fcdf0.zip |
drm/atomic: Extract needs_modeset function
We use the same check already in the atomic core, so might as well
make this official. And it's also reused in e.g. i915.
Motivated by Maarten's idea to extract a connector_changed state out
of mode_changed.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-By: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_atomic.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 1bbfedf466b9..8a3a913320eb 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -163,5 +163,11 @@ int __must_check drm_atomic_async_commit(struct drm_atomic_state *state); (plane_state) = (state)->plane_states[__i], 1); \ (__i)++) \ if (plane_state) +static inline bool +drm_atomic_crtc_needs_modeset(struct drm_crtc_state *state) +{ + return state->mode_changed || state->active_changed; +} + #endif /* DRM_ATOMIC_H_ */ |