]> Git Repo - linux.git/commitdiff
Revert "drm/i915: Use crtc_state->active in primary check_plane func"
authorLinus Torvalds <[email protected]>
Sun, 12 Jul 2015 22:00:20 +0000 (15:00 -0700)
committerLinus Torvalds <[email protected]>
Sun, 12 Jul 2015 22:00:20 +0000 (15:00 -0700)
This reverts commit dec4f799d0a4c9edae20512fa60b0a36f3299ca2.

Jörg Otte reports a NULL pointder dereference due to this commit, as
'crtc_state' very much can be NULL:

        crtc_state = state->base.state ?
                intel_atomic_get_crtc_state(state->base.state, intel_crtc) : NULL;

So the change to test 'crtc_state->base.active' cannot possibly be
correct as-is.

There may be some other minimal fix (like just checking crtc_state for
NULL), but I'm just reverting it now for the rc2 release, and people
like Daniel Vetter who actually know this code will figure out what the
right solution is in the longer term.

Reported-and-bisected-by: Jörg Otte <[email protected]>
Cc: Ander Conselvan de Oliveira <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Daniel Vetter <[email protected]>
CC: Maarten Lankhorst <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/gpu/drm/i915/intel_display.c

index ba9321998a41b3fb646cc7883b8c4c6cb9e9c08f..647b1404c441374beba20b32be37192d0b0ace95 100644 (file)
@@ -13276,7 +13276,7 @@ intel_check_primary_plane(struct drm_plane *plane,
        if (ret)
                return ret;
 
-       if (crtc_state->base.active) {
+       if (intel_crtc->active) {
                struct intel_plane_state *old_state =
                        to_intel_plane_state(plane->state);
 
This page took 0.084964 seconds and 4 git commands to generate.