summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2015-06-06 01:08:24 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-06-17 14:42:08 +0300
commitce52299ca6ac23222e040284913d1271edc96459 (patch)
tree10c59098eae9395b5894f8e8fcd9e8f778bc05db
parente7d66d89bc8bb44f9aab2f4749246214d15a159f (diff)
downloadlinux-ce52299ca6ac23222e040284913d1271edc96459.tar.xz
drm/i915: Use helper to set CRTC state's mode
We need to call drm_atomic_set_mode_for_crtc() rather than copying the mode in manually. As of commit commit 99cf4a29fa24461bbfe22125967188a18383eb5c Author: Daniel Stone <daniels@collabora.com> Date: Mon May 25 19:11:51 2015 +0100 drm/atomic: Add current-mode blob to CRTC state the helper now also takes care of setting up the mode property blob for us; if we don't use the helper and never setup the mode blob, this will also trigger a failure in drm_atomic_crtc_check() when we have the DRIVER_ATOMIC flag set (i.e., when using the nuclear pageflip support via i915.nuclear_pageflip kernel command line parameter). Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3f4891782cf6..98bb15ac4c66 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13264,8 +13264,9 @@ intel_modeset_stage_output_state(struct drm_device *dev,
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
- if (set->mode)
- drm_mode_copy(&crtc_state->mode, set->mode);
+ ret = drm_atomic_set_mode_for_crtc(crtc_state, set->mode);
+ if (ret)
+ return ret;
if (set->num_connectors)
crtc_state->active = true;