Skip to content

Commit

Permalink
drm/i915: update plane state during init
Browse files Browse the repository at this point in the history
Atomic planes updates rely on having a accurate plane_mask.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
  • Loading branch information
Maarten Lankhorst authored and Jani Nikula committed Jun 12, 2015
1 parent 85a96e7 commit 36750f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -2632,9 +2632,9 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
dev_priv->preserve_bios_swizzle = true;

primary->fb = fb;
primary->state->crtc = &intel_crtc->base;
primary->crtc = &intel_crtc->base;
primary->crtc = primary->state->crtc = &intel_crtc->base;
update_state_fb(primary);
intel_crtc->base.state->plane_mask |= (1 << drm_plane_index(primary));
obj->frontbuffer_bits |= INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe);
}

Expand Down Expand Up @@ -15563,7 +15563,9 @@ void intel_modeset_gem_init(struct drm_device *dev)
to_intel_crtc(c)->pipe);
drm_framebuffer_unreference(c->primary->fb);
c->primary->fb = NULL;
c->primary->crtc = c->primary->state->crtc = NULL;
update_state_fb(c->primary);
c->state->plane_mask &= ~(1 << drm_plane_index(c->primary));
}
}

Expand Down

0 comments on commit 36750f2

Please sign in to comment.