Message ID | 20200310153745.22814-4-animesh.manna@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | DP Phy compliance auto test | expand |
On Tue, Mar 10, 2020 at 09:07:41PM +0530, Animesh Manna wrote: > vswing/pre-emphasis adjustment calculation is needed in processing > of auto phy compliance request other than link training, so have > made non-static function. > > No functional change. > > v1: initial patch. > v2: > - used "intel_dp" prefix in function name. (Jani) > - used array notation instead pointer for link_status. (Ville) > v3: Scrapped the initial patch, modified commit description accordingly. > - made non-static function and used intel_dp prefix. (Jani, Manasi) > > Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com> Manasi > --- > drivers/gpu/drm/i915/display/intel_dp_link_training.c | 9 ++++----- > drivers/gpu/drm/i915/display/intel_dp_link_training.h | 4 ++++ > 2 files changed, 8 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c > index a7defb37ab00..e4f1843170b7 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c > +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c > @@ -34,9 +34,8 @@ intel_dp_dump_link_status(const u8 link_status[DP_LINK_STATUS_SIZE]) > link_status[3], link_status[4], link_status[5]); > } > > -static void > -intel_get_adjust_train(struct intel_dp *intel_dp, > - const u8 link_status[DP_LINK_STATUS_SIZE]) > +void intel_dp_get_adjust_train(struct intel_dp *intel_dp, > + const u8 link_status[DP_LINK_STATUS_SIZE]) > { > u8 v = 0; > u8 p = 0; > @@ -219,7 +218,7 @@ intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp) > voltage = intel_dp->train_set[0] & DP_TRAIN_VOLTAGE_SWING_MASK; > > /* Update training set as requested by target */ > - intel_get_adjust_train(intel_dp, link_status); > + intel_dp_get_adjust_train(intel_dp, link_status); > if (!intel_dp_update_link_train(intel_dp)) { > drm_err(&i915->drm, > "failed to update link training\n"); > @@ -338,7 +337,7 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp) > } > > /* Update training set as requested by target */ > - intel_get_adjust_train(intel_dp, link_status); > + intel_dp_get_adjust_train(intel_dp, link_status); > if (!intel_dp_update_link_train(intel_dp)) { > drm_err(&i915->drm, > "failed to update link training\n"); > diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.h b/drivers/gpu/drm/i915/display/intel_dp_link_training.h > index 174566adcc92..01f1dabbb060 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.h > +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.h > @@ -6,8 +6,12 @@ > #ifndef __INTEL_DP_LINK_TRAINING_H__ > #define __INTEL_DP_LINK_TRAINING_H__ > > +#include <drm/drm_dp_helper.h> > + > struct intel_dp; > > +void intel_dp_get_adjust_train(struct intel_dp *intel_dp, > + const u8 link_status[DP_LINK_STATUS_SIZE]); > void intel_dp_start_link_train(struct intel_dp *intel_dp); > void intel_dp_stop_link_train(struct intel_dp *intel_dp); > > -- > 2.24.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c index a7defb37ab00..e4f1843170b7 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c @@ -34,9 +34,8 @@ intel_dp_dump_link_status(const u8 link_status[DP_LINK_STATUS_SIZE]) link_status[3], link_status[4], link_status[5]); } -static void -intel_get_adjust_train(struct intel_dp *intel_dp, - const u8 link_status[DP_LINK_STATUS_SIZE]) +void intel_dp_get_adjust_train(struct intel_dp *intel_dp, + const u8 link_status[DP_LINK_STATUS_SIZE]) { u8 v = 0; u8 p = 0; @@ -219,7 +218,7 @@ intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp) voltage = intel_dp->train_set[0] & DP_TRAIN_VOLTAGE_SWING_MASK; /* Update training set as requested by target */ - intel_get_adjust_train(intel_dp, link_status); + intel_dp_get_adjust_train(intel_dp, link_status); if (!intel_dp_update_link_train(intel_dp)) { drm_err(&i915->drm, "failed to update link training\n"); @@ -338,7 +337,7 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp) } /* Update training set as requested by target */ - intel_get_adjust_train(intel_dp, link_status); + intel_dp_get_adjust_train(intel_dp, link_status); if (!intel_dp_update_link_train(intel_dp)) { drm_err(&i915->drm, "failed to update link training\n"); diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.h b/drivers/gpu/drm/i915/display/intel_dp_link_training.h index 174566adcc92..01f1dabbb060 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.h +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.h @@ -6,8 +6,12 @@ #ifndef __INTEL_DP_LINK_TRAINING_H__ #define __INTEL_DP_LINK_TRAINING_H__ +#include <drm/drm_dp_helper.h> + struct intel_dp; +void intel_dp_get_adjust_train(struct intel_dp *intel_dp, + const u8 link_status[DP_LINK_STATUS_SIZE]); void intel_dp_start_link_train(struct intel_dp *intel_dp); void intel_dp_stop_link_train(struct intel_dp *intel_dp);
vswing/pre-emphasis adjustment calculation is needed in processing of auto phy compliance request other than link training, so have made non-static function. No functional change. v1: initial patch. v2: - used "intel_dp" prefix in function name. (Jani) - used array notation instead pointer for link_status. (Ville) v3: Scrapped the initial patch, modified commit description accordingly. - made non-static function and used intel_dp prefix. (Jani, Manasi) Signed-off-by: Animesh Manna <animesh.manna@intel.com> --- drivers/gpu/drm/i915/display/intel_dp_link_training.c | 9 ++++----- drivers/gpu/drm/i915/display/intel_dp_link_training.h | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-)