示例#1
0
void intel_shared_dpll_commit(struct drm_atomic_state *state)
{
	struct drm_i915_private *dev_priv = to_i915(state->dev);
	struct intel_shared_dpll_config *shared_dpll;
	struct intel_shared_dpll *pll;
	enum intel_dpll_id i;

	if (!to_intel_atomic_state(state)->dpll_set)
		return;

	shared_dpll = to_intel_atomic_state(state)->shared_dpll;
	for (i = 0; i < dev_priv->num_shared_dpll; i++) {
		pll = &dev_priv->shared_dplls[i];
		pll->config = shared_dpll[i];
	}
}
示例#2
0
static void intel_plane_atomic_update(struct drm_plane *plane,
				      struct drm_plane_state *old_state)
{
	struct intel_atomic_state *state = to_intel_atomic_state(old_state->state);
	struct intel_plane *intel_plane = to_intel_plane(plane);
	const struct intel_plane_state *new_plane_state =
		intel_atomic_get_new_plane_state(state, intel_plane);
	struct drm_crtc *crtc = new_plane_state->base.crtc ?: old_state->crtc;

	if (new_plane_state->base.visible) {
		const struct intel_crtc_state *new_crtc_state =
			intel_atomic_get_new_crtc_state(state, to_intel_crtc(crtc));

		trace_intel_update_plane(plane,
					 to_intel_crtc(crtc));

		intel_plane->update_plane(intel_plane,
					  new_crtc_state, new_plane_state);
	} else {
		trace_intel_disable_plane(plane,
					  to_intel_crtc(crtc));

		intel_plane->disable_plane(intel_plane, to_intel_crtc(crtc));
	}
}
示例#3
0
struct intel_shared_dpll_config *
intel_atomic_get_shared_dpll_state(struct drm_atomic_state *s)
{
	struct intel_atomic_state *state = to_intel_atomic_state(s);

	WARN_ON(!drm_modeset_is_locked(&s->dev->mode_config.connection_mutex));

	if (!state->dpll_set) {
		state->dpll_set = true;

		intel_atomic_duplicate_dpll_state(to_i915(s->dev),
						  state->shared_dpll);
	}

	return state->shared_dpll;
}
示例#4
0
void intel_atomic_state_clear(struct drm_atomic_state *s)
{
	struct intel_atomic_state *state = to_intel_atomic_state(s);
	drm_atomic_state_default_clear(&state->base);
	state->dpll_set = false;
}