• Matt Roper's avatar
    drm/i915: Make use of intel_fb_obj() (v2) · 2ff8fde1
    Matt Roper authored
    This should hopefully simplify the display code slightly and also
    solves at least one mistake in intel_pipe_set_base() where
    to_intel_framebuffer(fb)->obj is referenced during local variable
    initialization, before 'if (!fb)' gets checked.
    
    Potential uses of this macro were identified via the following
    Coccinelle patch:
    
            @@
            expression E;
            @@
            * to_intel_framebuffer(E)->obj
    
            @@
            expression E;
            identifier I;
            @@
              I = to_intel_framebuffer(E);
              ...
            * I->obj
    
    v2: Rewrite some NULL tests in terms of the obj rather than the fb.
        Also add a WARN() if trying to pageflip with a disabled primary
        plane.  [Suggested by Chris Wilson]
    Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
    Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    2ff8fde1
intel_pm.c 194 KB