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

Commit ff6d9f55 authored by Jesse Barnes's avatar Jesse Barnes Committed by Daniel Vetter
Browse files

drm/i915/bxt: fix panel fitter setup in crtc disable/enable



Broxton has the same panel fitter registers as Skylake.

v2:
- add MISSING_CASE for future platforms (daniel)

Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarSagar Kamble <sagar.a.kamble@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 1ab23380
Loading
Loading
Loading
Loading
+13 −6
Original line number Original line Diff line number Diff line
@@ -4881,10 +4881,12 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)


	intel_ddi_enable_pipe_clock(intel_crtc);
	intel_ddi_enable_pipe_clock(intel_crtc);


	if (IS_SKYLAKE(dev))
	if (INTEL_INFO(dev)->gen == 9)
		skylake_pfit_update(intel_crtc, 1);
		skylake_pfit_update(intel_crtc, 1);
	else
	else if (INTEL_INFO(dev)->gen < 9)
		ironlake_pfit_enable(intel_crtc);
		ironlake_pfit_enable(intel_crtc);
	else
		MISSING_CASE(INTEL_INFO(dev)->gen);


	/*
	/*
	 * On ILK+ LUT must be loaded before the pipe is running but with
	 * On ILK+ LUT must be loaded before the pipe is running but with
@@ -5029,10 +5031,12 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)


	intel_ddi_disable_transcoder_func(dev_priv, cpu_transcoder);
	intel_ddi_disable_transcoder_func(dev_priv, cpu_transcoder);


	if (IS_SKYLAKE(dev))
	if (INTEL_INFO(dev)->gen == 9)
		skylake_pfit_update(intel_crtc, 0);
		skylake_pfit_update(intel_crtc, 0);
	else
	else if (INTEL_INFO(dev)->gen < 9)
		ironlake_pfit_disable(intel_crtc);
		ironlake_pfit_disable(intel_crtc);
	else
		MISSING_CASE(INTEL_INFO(dev)->gen);


	intel_ddi_disable_pipe_clock(intel_crtc);
	intel_ddi_disable_pipe_clock(intel_crtc);


@@ -9191,10 +9195,13 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,


	pfit_domain = POWER_DOMAIN_PIPE_PANEL_FITTER(crtc->pipe);
	pfit_domain = POWER_DOMAIN_PIPE_PANEL_FITTER(crtc->pipe);
	if (intel_display_power_is_enabled(dev_priv, pfit_domain)) {
	if (intel_display_power_is_enabled(dev_priv, pfit_domain)) {
		if (IS_SKYLAKE(dev))
		if (INTEL_INFO(dev)->gen == 9)
			skylake_get_pfit_config(crtc, pipe_config);
			skylake_get_pfit_config(crtc, pipe_config);
		else
		else if (INTEL_INFO(dev)->gen < 9)
			ironlake_get_pfit_config(crtc, pipe_config);
			ironlake_get_pfit_config(crtc, pipe_config);
		else
			MISSING_CASE(INTEL_INFO(dev)->gen);

	} else {
	} else {
		pipe_config->scaler_state.scaler_id = -1;
		pipe_config->scaler_state.scaler_id = -1;
		pipe_config->scaler_state.scaler_users &= ~(1 << SKL_CRTC_INDEX);
		pipe_config->scaler_state.scaler_users &= ~(1 << SKL_CRTC_INDEX);