Skip to content

Commit

Permalink
drm/i915: Ensure crtc_state backpointer is always initialized
Browse files Browse the repository at this point in the history
As we transition to full atomic modesetting, we want to be able to pass
intel_crtc_state around in various places that we pass intel_crtc
directly today.  Ensure that the ->crtc backpointer is properly
initialized in case we need to get back to the associated CRTC.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Matt Roper authored and Daniel Vetter committed Feb 25, 2015
1 parent 83d6573 commit 0787824
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -10225,6 +10225,7 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,
if (!pipe_config)
return ERR_PTR(-ENOMEM);

pipe_config->base.crtc = crtc;
drm_mode_copy(&pipe_config->base.adjusted_mode, mode);
drm_mode_copy(&pipe_config->base.mode, mode);

Expand Down Expand Up @@ -12315,6 +12316,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
if (!crtc_state)
goto fail;
intel_crtc_set_state(intel_crtc, crtc_state);
crtc_state->base.crtc = &intel_crtc->base;

primary = intel_primary_plane_create(dev, pipe);
if (!primary)
Expand Down

0 comments on commit 0787824

Please sign in to comment.