drm/i915: Don't dereference NULL plane while setting up scalers
Subsystems (2)
PATCH 1/1 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 <[email protected]>
Date: Mon Jun 15 12:33:39 2015 +0200
drm/i915: Clean up intel_atomic_setup_scalers slightly.
--- drivers/gpu/drm/i915/intel_atomic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_atomic.c +1 -1
@@ -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)) {
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 12 lines · Matt Roper
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 <[email protected]>
Date: Mon Jun 15 12:33:39 2015 +0200
Quoted 6 lines
drm/i915: Clean up
intel_atomic_setup_scalersslightly.Cc Maarten Lankhorst <[email protected]>Cc Bob Paauwe <[email protected]>Reported-by Bob Paauwe <[email protected]>Signed-off-by Matt Roper <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Op 06-07-15 om 18:19 schreef Matt Roper:
Quoted 12 lines
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 <[email protected]>
Date: Mon Jun 15 12:33:39 2015 +0200
Quoted 8 lines
drm/i915: Clean up
intel_atomic_setup_scalersslightly.Cc Maarten Lankhorst <[email protected]>Cc Bob Paauwe <[email protected]>Reported-by Bob Paauwe <[email protected]>Signed-off-by Matt Roper <[email protected]>---
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Task id: 6734 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK 302/302 302/302 SNB 312/316 312/316 IVB 345/345 345/345
BYT -1 289/289 288/289
HSW 382/382 382/382
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*BYT igt@gem_partial_pwrite_pread@reads PASS(1) FAIL(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx