summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_atomic.c
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2015-07-06 19:19:24 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-07-06 22:23:36 +0300
commitc07a2d1194fc694785771643c413c44adf7635d3 (patch)
tree65f6be5dfe8f08a0ddef23a5016cd9a324ccfe0a /drivers/gpu/drm/i915/intel_atomic.c
parent1cff8cc35bd310419cd2545ddcb65b329bdc1053 (diff)
downloadlinux-c07a2d1194fc694785771643c413c44adf7635d3.tar.xz
drm/i915: Don't dereference NULL plane while setting up scalers
intel_atomic_setup_scalers() dereferences 'plane' before the plane has been assigned. The plane ID assignment doing this dereference is only needed for debugging messages later in the function, so just move the assignment farther down the function to a point where plane will no longer be NULL. This was introduced in: commit 133b0d128be39e308ccd3b3d765c31ebdbf5380e Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Date: Mon Jun 15 12:33:39 2015 +0200 drm/i915: Clean up intel_atomic_setup_scalers slightly. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Bob Paauwe <bob.j.paauwe@intel.com> Reported-by: Bob Paauwe <bob.j.paauwe@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index 0aeced82201e..5c79a31603af 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -325,7 +325,6 @@ int intel_atomic_setup_scalers(struct drm_device *dev,
scaler_id = &scaler_state->scaler_id;
} else {
name = "PLANE";
- idx = plane->base.id;
if (!drm_state)
continue;
@@ -359,6 +358,7 @@ int intel_atomic_setup_scalers(struct drm_device *dev,
}
intel_plane = to_intel_plane(plane);
+ idx = plane->base.id;
/* plane on different crtc cannot be a scaler user of this crtc */
if (WARN_ON(intel_plane->pipe != intel_crtc->pipe)) {