diff mbox series

drm/i915/dp: Reset intel_dp->link_trained in init_connector

Message ID 20200109062745.9831-1-manasi.d.navare@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/dp: Reset intel_dp->link_trained in init_connector | expand

Commit Message

Navare, Manasi Jan. 9, 2020, 6:27 a.m. UTC
Link has not been trained during connector initialization
hence reset the variable intel_dp->link_trained. This
avoids accidently calling link training routine before the pipe
is set up.

Issue: https://gitlab.freedesktop.org/drm/intel/issues/585
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jani Nikula Jan. 9, 2020, 9:32 a.m. UTC | #1
On Wed, 08 Jan 2020, Manasi Navare <manasi.d.navare@intel.com> wrote:
> Link has not been trained during connector initialization
> hence reset the variable intel_dp->link_trained. This
> avoids accidently calling link training routine before the pipe
> is set up.
>
> Issue: https://gitlab.freedesktop.org/drm/intel/issues/585

s/Issue/Closes/

> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index d299cee175e7..f45533af7524 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -7471,6 +7471,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
>  	intel_dp_set_source_rates(intel_dp);
>  
>  	intel_dp->reset_link_params = true;
> +	intel_dp->link_trained =  false;
>  	intel_dp->pps_pipe = INVALID_PIPE;
>  	intel_dp->active_pipe = INVALID_PIPE;
Jani Nikula Jan. 9, 2020, 11:41 a.m. UTC | #2
On Wed, 08 Jan 2020, Manasi Navare <manasi.d.navare@intel.com> wrote:
> Link has not been trained during connector initialization
> hence reset the variable intel_dp->link_trained. This
> avoids accidently calling link training routine before the pipe
> is set up.
>
> Issue: https://gitlab.freedesktop.org/drm/intel/issues/585
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index d299cee175e7..f45533af7524 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -7471,6 +7471,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
>  	intel_dp_set_source_rates(intel_dp);
>  
>  	intel_dp->reset_link_params = true;
> +	intel_dp->link_trained =  false;

intel_dig_port and thus intel_dp are kzalloc'ed, making ->link_trained
false to begin with. I can't see any way ->link_training could be true
at this point.

BR,
Jani.



>  	intel_dp->pps_pipe = INVALID_PIPE;
>  	intel_dp->active_pipe = INVALID_PIPE;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index d299cee175e7..f45533af7524 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -7471,6 +7471,7 @@  intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 	intel_dp_set_source_rates(intel_dp);
 
 	intel_dp->reset_link_params = true;
+	intel_dp->link_trained =  false;
 	intel_dp->pps_pipe = INVALID_PIPE;
 	intel_dp->active_pipe = INVALID_PIPE;