diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2015-04-21 17:12:58 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-05-08 13:03:58 +0200 |
commit | f0c60574eb1216b0904c0d696c64d5096d6e4913 (patch) | |
tree | 1cf0dffc58e84e528fc62a4826350ce38ee6a73d /drivers/gpu/drm/i915/intel_atomic.c | |
parent | e5d958ef42ff99ab2cf7980f4b7317d3bbd8793f (diff) | |
download | op-kernel-dev-f0c60574eb1216b0904c0d696c64d5096d6e4913.zip op-kernel-dev-f0c60574eb1216b0904c0d696c64d5096d6e4913.tar.gz |
drm/i915: Call drm helpers when duplicating crtc and plane states
Use the helpers introduced by the commit below to properly initialize
the duplicated states.
commit f5e7840b0c4368f8cdbb055188c2a0eef50c3052
Author: Thierry Reding <treding@nvidia.com>
Date: Wed Jan 28 14:54:32 2015 +0100
drm/atomic: Add helpers for state-subclassing drivers
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_atomic.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_atomic.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index cb6d5f2..7ed8033 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -250,8 +250,12 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc) crtc_state = kmemdup(intel_crtc->config, sizeof(*intel_crtc->config), GFP_KERNEL); - if (crtc_state) - crtc_state->base.crtc = crtc; + if (!crtc_state) + return NULL; + + __drm_atomic_helper_crtc_duplicate_state(crtc, &crtc_state->base); + + crtc_state->base.crtc = crtc; return &crtc_state->base; } |