* [PATCH] drm/i915: Don't dereference NULL plane while setting up scalers
@ 2015-07-06 16:19 Matt Roper
2015-07-06 19:25 ` Daniel Vetter
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Matt Roper @ 2015-07-06 16:19 UTC (permalink / raw)
To: intel-gfx
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>
---
drivers/gpu/drm/i915/intel_atomic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index 0aeced8..5c79a31 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)) {
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Don't dereference NULL plane while setting up scalers
2015-07-06 16:19 [PATCH] drm/i915: Don't dereference NULL plane while setting up scalers Matt Roper
@ 2015-07-06 19:25 ` Daniel Vetter
2015-07-07 5:32 ` Maarten Lankhorst
2015-07-07 21:28 ` shuang.he
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2015-07-06 19:25 UTC (permalink / raw)
To: Matt Roper; +Cc: intel-gfx
On Mon, Jul 06, 2015 at 09:19:24AM -0700, Matt Roper wrote:
> 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>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Don't dereference NULL plane while setting up scalers
2015-07-06 16:19 [PATCH] drm/i915: Don't dereference NULL plane while setting up scalers Matt Roper
2015-07-06 19:25 ` Daniel Vetter
@ 2015-07-07 5:32 ` Maarten Lankhorst
2015-07-07 21:28 ` shuang.he
2 siblings, 0 replies; 4+ messages in thread
From: Maarten Lankhorst @ 2015-07-07 5:32 UTC (permalink / raw)
To: Matt Roper, intel-gfx
Op 06-07-15 om 18:19 schreef 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 <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>
> ---
>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Don't dereference NULL plane while setting up scalers
2015-07-06 16:19 [PATCH] drm/i915: Don't dereference NULL plane while setting up scalers Matt Roper
2015-07-06 19:25 ` Daniel Vetter
2015-07-07 5:32 ` Maarten Lankhorst
@ 2015-07-07 21:28 ` shuang.he
2 siblings, 0 replies; 4+ messages in thread
From: shuang.he @ 2015-07-07 21:28 UTC (permalink / raw)
To: shuang.he, lei.a.liu, intel-gfx, matthew.d.roper
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
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
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-07 21:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 16:19 [PATCH] drm/i915: Don't dereference NULL plane while setting up scalers Matt Roper
2015-07-06 19:25 ` Daniel Vetter
2015-07-07 5:32 ` Maarten Lankhorst
2015-07-07 21:28 ` shuang.he
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox