Re: [PATCH v4 8/8] drm/i915/display/icl: In port sync mode disable slaves first then masters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Op 28-06-2019 om 00:57 schreef Manasi Navare:
> In the transcoder port sync mode, the slave transcoders mask their vblanks
> until master transcoder's vblank so while disabling them, make
> sure slaves are disabled first and then the masters.
>
> v2:
> * Use the intel_old_crtc_state_disables() helper

Not convinced that splitting up icl_commit and skl_commit is required. You could do this in skl_update_crtcs. Only is_trans_port_sync_slave would never evaluate to true. :)


I would probably also add integrate the bumping crtc limits series, and reject the raw 8k width in DDI encoder check.


> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> Cc: Matt Roper <matthew.d.roper@xxxxxxxxx>
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> Signed-off-by: Manasi Navare <manasi.d.navare@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 68 ++++++++++++++++++--
>  1 file changed, 62 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 3ccba539cce0..e244d9cb4e33 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -13912,6 +13912,57 @@ static void intel_commit_modeset_disables(struct drm_atomic_state *state)
>  	}
>  }
>  
> +static void icl_commit_modeset_disables(struct drm_atomic_state *state)
> +{
> +	struct drm_crtc_state *old_crtc_state, *new_crtc_state;
> +	struct intel_crtc_state *new_intel_crtc_state, *old_intel_crtc_state;
> +	struct drm_crtc *crtc;
> +	struct intel_crtc *intel_crtc;
> +	int i;
> +
> +	/*
> +	 * Disable all the Port Sync Slaves first
> +	 */
> +	for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
> +		old_intel_crtc_state = to_intel_crtc_state(old_crtc_state);
> +		new_intel_crtc_state = to_intel_crtc_state(new_crtc_state);
> +		intel_crtc = to_intel_crtc(crtc);
> +
> +		if (!needs_modeset(new_crtc_state) ||
> +		    !is_trans_port_sync_slave(old_intel_crtc_state))
> +			continue;
> +
> +		intel_pre_plane_update(old_intel_crtc_state, new_intel_crtc_state);
> +
> +		if (old_crtc_state->active)
> +			intel_old_crtc_state_disables(state,
> +						      old_intel_crtc_state,
> +						      new_intel_crtc_state,
> +						      intel_crtc);
> +	}
> +
> +	/*
> +	 * Disable rest of the CRTCs other than slaves
> +	 */
> +	for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
> +		old_intel_crtc_state = to_intel_crtc_state(old_crtc_state);
> +		new_intel_crtc_state = to_intel_crtc_state(new_crtc_state);
> +		intel_crtc = to_intel_crtc(crtc);
> +
> +		if (!needs_modeset(new_crtc_state) ||
> +		    is_trans_port_sync_slave(old_intel_crtc_state))
> +			continue;
> +
> +		intel_pre_plane_update(old_intel_crtc_state, new_intel_crtc_state);
> +
> +		if (old_crtc_state->active)
> +			intel_old_crtc_state_disables(state,
> +						      old_intel_crtc_state,
> +						      new_intel_crtc_state,
> +						      intel_crtc);
> +	}
> +}
> +
>  static void intel_commit_modeset_enables(struct drm_atomic_state *state)
>  {
>  	struct drm_crtc *crtc;
> @@ -14268,6 +14319,11 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
>  
>  	intel_atomic_commit_fence_wait(intel_state);
>  
> +	drm_atomic_helper_wait_for_dependencies(state);
> +
> +	if (intel_state->modeset)
> +		wakeref = intel_display_power_get(dev_priv, POWER_DOMAIN_MODESET);
> +
>  	for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
>  		new_intel_crtc_state = to_intel_crtc_state(new_crtc_state);
>  		intel_crtc = to_intel_crtc(crtc);
> @@ -14280,11 +14336,6 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
>  		}
>  	}
>  
> -	drm_atomic_helper_wait_for_dependencies(state);
> -
> -	if (intel_state->modeset)
> -		wakeref = intel_display_power_get(dev_priv, POWER_DOMAIN_MODESET);
> -
>  	dev_priv->display.commit_modeset_disables(state);
>  
>  	/* FIXME: Eventually get rid of our intel_crtc->config pointer */
> @@ -16181,7 +16232,12 @@ void intel_init_display_hooks(struct drm_i915_private *dev_priv)
>  	else
>  		dev_priv->display.commit_modeset_enables = intel_commit_modeset_enables;
>  
> -	dev_priv->display.commit_modeset_disables = intel_commit_modeset_disables;
> +	if (INTEL_GEN(dev_priv) >= 11)
> +		dev_priv->display.commit_modeset_disables =
> +			icl_commit_modeset_disables;
> +	else
> +		dev_priv->display.commit_modeset_disables =
> +			intel_commit_modeset_disables;
>  
>  }
>  


_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux