Message ID | 20191115152549.23047-4-animesh.manna@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | DP Phy compliace auto test | expand |
On Fri, Nov 15, 2019 at 08:55:45PM +0530, Animesh Manna wrote: > During DP phy compliance auto test mode, sink will request > combination of different test pattern with differnt level of > vswing, pre-emphasis. Function added to prepare for it. > > Signed-off-by: Animesh Manna <animesh.manna@intel.com> This looks good to me, Reviewed-by: Manasi Navare <manasi.d.navare@intel.com> Manasi > --- > .../drm/i915/display/intel_display_types.h | 1 + > drivers/gpu/drm/i915/display/intel_dp.c | 24 +++++++++++++++++++ > 2 files changed, 25 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h > index 83ea04149b77..c17866f126c9 100644 > --- a/drivers/gpu/drm/i915/display/intel_display_types.h > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h > @@ -1205,6 +1205,7 @@ struct intel_dp_compliance_data { > u8 video_pattern; > u16 hdisplay, vdisplay; > u8 bpc; > + struct drm_dp_phy_test_params phytest; > }; > > struct intel_dp_compliance { > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c > index cc8e0d1a73af..338d3744c5d5 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -4936,9 +4936,33 @@ static u8 intel_dp_autotest_edid(struct intel_dp *intel_dp) > return test_result; > } > > +static u8 intel_dp_prepare_phytest(struct intel_dp *intel_dp) > +{ > + struct drm_dp_phy_test_params *data = > + &intel_dp->compliance.test_data.phytest; > + > + if (!drm_dp_get_phy_test_pattern(&intel_dp->aux, data)) { > + DRM_DEBUG_KMS("DP Phy Test pattern AUX read failure\n"); > + return DP_TEST_NAK; > + } > + > + /* > + * link_mst is set to false to avoid executing mst related code > + * during compliance testing. > + */ > + intel_dp->link_mst = false; > + > + return DP_TEST_ACK; > +} > + > static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp) > { > u8 test_result = DP_TEST_NAK; > + > + test_result = intel_dp_prepare_phytest(intel_dp); > + if (test_result != DP_TEST_ACK) > + DRM_ERROR("Phy test preparation failed\n"); > + > return test_result; > } > > -- > 2.22.0 >
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 83ea04149b77..c17866f126c9 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1205,6 +1205,7 @@ struct intel_dp_compliance_data { u8 video_pattern; u16 hdisplay, vdisplay; u8 bpc; + struct drm_dp_phy_test_params phytest; }; struct intel_dp_compliance { diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index cc8e0d1a73af..338d3744c5d5 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -4936,9 +4936,33 @@ static u8 intel_dp_autotest_edid(struct intel_dp *intel_dp) return test_result; } +static u8 intel_dp_prepare_phytest(struct intel_dp *intel_dp) +{ + struct drm_dp_phy_test_params *data = + &intel_dp->compliance.test_data.phytest; + + if (!drm_dp_get_phy_test_pattern(&intel_dp->aux, data)) { + DRM_DEBUG_KMS("DP Phy Test pattern AUX read failure\n"); + return DP_TEST_NAK; + } + + /* + * link_mst is set to false to avoid executing mst related code + * during compliance testing. + */ + intel_dp->link_mst = false; + + return DP_TEST_ACK; +} + static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp) { u8 test_result = DP_TEST_NAK; + + test_result = intel_dp_prepare_phytest(intel_dp); + if (test_result != DP_TEST_ACK) + DRM_ERROR("Phy test preparation failed\n"); + return test_result; }
During DP phy compliance auto test mode, sink will request combination of different test pattern with differnt level of vswing, pre-emphasis. Function added to prepare for it. Signed-off-by: Animesh Manna <animesh.manna@intel.com> --- .../drm/i915/display/intel_display_types.h | 1 + drivers/gpu/drm/i915/display/intel_dp.c | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+)