Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e28661bd authored by Maarten Lankhorst's avatar Maarten Lankhorst
Browse files

drm/i915: Use atomic state in intel_fb_initial_config.

parent 7bb4afb4
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -406,8 +406,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
			continue;
		}

		encoder = connector->encoder;
		if (!encoder || WARN_ON(!encoder->crtc)) {
		encoder = connector->state->best_encoder;
		if (!encoder || WARN_ON(!connector->state->crtc)) {
			if (connector->force > DRM_FORCE_OFF)
				goto bail;

@@ -420,7 +420,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,

		num_connectors_enabled++;

		new_crtc = intel_fb_helper_crtc(fb_helper, encoder->crtc);
		new_crtc = intel_fb_helper_crtc(fb_helper, connector->state->crtc);

		/*
		 * Make sure we're not trying to drive multiple connectors
@@ -466,17 +466,22 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
			 * usually contains. But since our current
			 * code puts a mode derived from the post-pfit timings
			 * into crtc->mode this works out correctly.
			 *
			 * This is crtc->mode and not crtc->state->mode for the
			 * fastboot check to work correctly. crtc_state->mode has
			 * I915_MODE_FLAG_INHERITED, which we clear to force check
			 * state.
			 */
			DRM_DEBUG_KMS("looking for current mode on connector %s\n",
				      connector->name);
			modes[i] = &encoder->crtc->mode;
			modes[i] = &connector->state->crtc->mode;
		}
		crtcs[i] = new_crtc;

		DRM_DEBUG_KMS("connector %s on pipe %c [CRTC:%d]: %dx%d%s\n",
			      connector->name,
			      pipe_name(to_intel_crtc(encoder->crtc)->pipe),
			      encoder->crtc->base.id,
			      pipe_name(to_intel_crtc(connector->state->crtc)->pipe),
			      connector->state->crtc->base.id,
			      modes[i]->hdisplay, modes[i]->vdisplay,
			      modes[i]->flags & DRM_MODE_FLAG_INTERLACE ? "i" :"");