diff mbox series

drm/i915/mst: Set intel_dp_set_m_n() for MST slaves

Message ID 20200210184057.296698-1-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/mst: Set intel_dp_set_m_n() for MST slaves | expand

Commit Message

Souza, Jose Feb. 10, 2020, 6:40 p.m. UTC
Commit 1c9d2eb24153 ("drm/i915: move intel_dp_set_m_n() to encoder for
DDI platforms") moved the intel_dp_set_m_n() from hsw_crtc_enable()
to intel_ddi_pre_enable_dp() but it missed add it to
intel_mst_pre_enable_dp() causing MST slaves to not work.

Fixes: 1c9d2eb24153 ("drm/i915: move intel_dp_set_m_n() to encoder for DDI platforms")
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jani Nikula Feb. 10, 2020, 8:47 p.m. UTC | #1
On Mon, 10 Feb 2020, José Roberto de Souza <jose.souza@intel.com> wrote:
> Commit 1c9d2eb24153 ("drm/i915: move intel_dp_set_m_n() to encoder for
> DDI platforms") moved the intel_dp_set_m_n() from hsw_crtc_enable()
> to intel_ddi_pre_enable_dp() but it missed add it to
> intel_mst_pre_enable_dp() causing MST slaves to not work.
>
> Fixes: 1c9d2eb24153 ("drm/i915: move intel_dp_set_m_n() to encoder for DDI platforms")
> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>

Damn it, this is the second DP MST thing I missed in the same
series. *facepalm*. The first goof-up was fixed in commit 274959622017
("drm/i915/mst: fix pipe and vblank enable"). We really need more MST in
CI.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 9cd59141953d..d7bfa7c350e9 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -480,6 +480,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
>  		intel_ddi_enable_pipe_clock(pipe_config);
>  
>  	intel_ddi_set_dp_msa(pipe_config, conn_state);
> +
> +	intel_dp_set_m_n(pipe_config, M1_N1);
>  }
>  
>  static void intel_mst_enable_dp(struct intel_encoder *encoder,
Jani Nikula Feb. 11, 2020, 4:12 p.m. UTC | #2
On Mon, 10 Feb 2020, Jani Nikula <jani.nikula@intel.com> wrote:
> On Mon, 10 Feb 2020, José Roberto de Souza <jose.souza@intel.com> wrote:
>> Commit 1c9d2eb24153 ("drm/i915: move intel_dp_set_m_n() to encoder for
>> DDI platforms") moved the intel_dp_set_m_n() from hsw_crtc_enable()
>> to intel_ddi_pre_enable_dp() but it missed add it to
>> intel_mst_pre_enable_dp() causing MST slaves to not work.
>>
>> Fixes: 1c9d2eb24153 ("drm/i915: move intel_dp_set_m_n() to encoder for DDI platforms")
>> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
>> Cc: Jani Nikula <jani.nikula@intel.com>
>> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
>
> Damn it, this is the second DP MST thing I missed in the same
> series. *facepalm*. The first goof-up was fixed in commit 274959622017
> ("drm/i915/mst: fix pipe and vblank enable"). We really need more MST in
> CI.

Actually, wondering if the intel_dp_set_m_n() call in
intel_ddi_pre_enable_dp() now needs to be wrapped in

	if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST))

Similar to intel_ddi_set_dp_msa().

BR,
Jani.


>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
>> ---
>>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
>> index 9cd59141953d..d7bfa7c350e9 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
>> @@ -480,6 +480,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
>>  		intel_ddi_enable_pipe_clock(pipe_config);
>>  
>>  	intel_ddi_set_dp_msa(pipe_config, conn_state);
>> +
>> +	intel_dp_set_m_n(pipe_config, M1_N1);
>>  }
>>  
>>  static void intel_mst_enable_dp(struct intel_encoder *encoder,
Souza, Jose Feb. 11, 2020, 6:11 p.m. UTC | #3
On Tue, 2020-02-11 at 18:12 +0200, Jani Nikula wrote:
> On Mon, 10 Feb 2020, Jani Nikula <jani.nikula@intel.com> wrote:
> > On Mon, 10 Feb 2020, José Roberto de Souza <jose.souza@intel.com>
> > wrote:
> > > Commit 1c9d2eb24153 ("drm/i915: move intel_dp_set_m_n() to
> > > encoder for
> > > DDI platforms") moved the intel_dp_set_m_n() from
> > > hsw_crtc_enable()
> > > to intel_ddi_pre_enable_dp() but it missed add it to
> > > intel_mst_pre_enable_dp() causing MST slaves to not work.
> > > 
> > > Fixes: 1c9d2eb24153 ("drm/i915: move intel_dp_set_m_n() to
> > > encoder for DDI platforms")
> > > Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> > > Cc: Jani Nikula <jani.nikula@intel.com>
> > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > 
> > Damn it, this is the second DP MST thing I missed in the same
> > series. *facepalm*. The first goof-up was fixed in commit
> > 274959622017
> > ("drm/i915/mst: fix pipe and vblank enable"). We really need more
> > MST in
> > CI.
> 
> Actually, wondering if the intel_dp_set_m_n() call in
> intel_ddi_pre_enable_dp() now needs to be wrapped in
> 
> 	if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST))
> 
> Similar to intel_ddi_set_dp_msa().

Indeed thanks for catching, will send the fixed version in a bit.

> 
> BR,
> Jani.
> 
> 
> > Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> > 
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > > b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > > index 9cd59141953d..d7bfa7c350e9 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > > @@ -480,6 +480,8 @@ static void intel_mst_pre_enable_dp(struct
> > > intel_encoder *encoder,
> > >  		intel_ddi_enable_pipe_clock(pipe_config);
> > >  
> > >  	intel_ddi_set_dp_msa(pipe_config, conn_state);
> > > +
> > > +	intel_dp_set_m_n(pipe_config, M1_N1);
> > >  }
> > >  
> > >  static void intel_mst_enable_dp(struct intel_encoder *encoder,
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 9cd59141953d..d7bfa7c350e9 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -480,6 +480,8 @@  static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
 		intel_ddi_enable_pipe_clock(pipe_config);
 
 	intel_ddi_set_dp_msa(pipe_config, conn_state);
+
+	intel_dp_set_m_n(pipe_config, M1_N1);
 }
 
 static void intel_mst_enable_dp(struct intel_encoder *encoder,