Re: [PATCH 29/29] drm/i915: Pass a crtc state to ddi post_disable from MST code

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

 



On Mon, 18 Sep 2017, Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>
> Pass an old crtc state to intel_ddi_post_disable() from the MST code.
>
> Note that this crtc state won't necessaitly match the one that was
> passed to intel_ddi_pre_enable() if the first stream to be enabled isn't
> the last stream to be disabled. But this is fine since the states should
> be identical in every important way. This does mean people frobbing
> the DDI pre_enable/post_disable hooks have to pay attention in what
> parts of the state they consult.

I wouldn't mind having some comments about this sprinkled here and
there, independent of this patch...

BR,
Jani.



>
> The alternative would be to inline the relevant code into the MST code.
> That is actually what we used to do for pre_enable before
> commit e081c8463ac9 ("drm/i915: Remove duplicate DDI enabling logic
> from MST path"). For post_disable we've always called the DDI hook.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c    | 4 +---
>  drivers/gpu/drm/i915/intel_dp_mst.c | 2 +-
>  2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 672ce1356545..5d043a320f99 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -2290,9 +2290,7 @@ static void intel_ddi_post_disable(struct intel_encoder *encoder,
>  				   const struct intel_crtc_state *old_crtc_state,
>  				   const struct drm_connector_state *old_conn_state)
>  {
> -	/* old_crtc_state and old_conn_state are NULL when called from DP_MST */
> -	if (old_crtc_state &&
> -	    intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI))
> +	if (intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI))
>  		intel_ddi_post_disable_hdmi(encoder,
>  					    old_crtc_state, old_conn_state);
>  	else
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index 8e3aad0ea60b..cb01d0dc46cd 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -169,7 +169,7 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
>  	intel_mst->connector = NULL;
>  	if (intel_dp->active_mst_links == 0) {
>  		intel_dig_port->base.post_disable(&intel_dig_port->base,
> -						  NULL, NULL);
> +						  old_crtc_state, NULL);
>  
>  		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
>  	}

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux