diff options
author | Mahesh Kumar <mahesh1.kumar@intel.com> | 2016-12-01 21:19:38 +0530 |
---|---|---|
committer | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2016-12-07 16:30:34 -0200 |
commit | ccc24b39a6fa3b0ba6b4310c10d7e0288ec8db10 (patch) | |
tree | 3bf376c4e46907506e46138370298284818e6f0f /drivers/gpu/drm/i915 | |
parent | b95320bdf2d891011da9c5ec85dcb114483856a6 (diff) | |
download | blackbird-op-linux-ccc24b39a6fa3b0ba6b4310c10d7e0288ec8db10.tar.gz blackbird-op-linux-ccc24b39a6fa3b0ba6b4310c10d7e0288ec8db10.zip |
drm/i915: Add intel_atomic_get_existing_crtc_state function
This patch Adds a function to extract intel_crtc_state from the
atomic_state, if not available it returns NULL.
v2 (from Paulo):
- Fix white space problem detected by checkpatch.
Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161201154940.24446-7-mahesh1.kumar@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index fd77a3ba857b..8f4ddca0f521 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1809,6 +1809,20 @@ intel_atomic_get_crtc_state(struct drm_atomic_state *state, return to_intel_crtc_state(crtc_state); } +static inline struct intel_crtc_state * +intel_atomic_get_existing_crtc_state(struct drm_atomic_state *state, + struct intel_crtc *crtc) +{ + struct drm_crtc_state *crtc_state; + + crtc_state = drm_atomic_get_existing_crtc_state(state, &crtc->base); + + if (crtc_state) + return to_intel_crtc_state(crtc_state); + else + return NULL; +} + static inline struct intel_plane_state * intel_atomic_get_existing_plane_state(struct drm_atomic_state *state, struct intel_plane *plane) |