[PATCH 3/7] drm/i915/dp: Preparation for DP phy compliance auto test

Manasi Navare manasi.d.navare at intel.com
Wed Dec 11 23:55:01 UTC 2019


This patch looks good to me except adding the part from patch 7/7:
> > +   /* Set test active flag here so userspace doesn't interrupt things */
> > +   intel_dp->compliance.test_active = 1;
> > +   dev_priv->dp_phy_comp = true;
> > +

This part should also be set in this prep patch.

After adding that:

Reviewed-by: Manasi Navare <manasi.d.navare at intel.com>

Manasi


On Mon, Dec 02, 2019 at 09:51:22PM +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.
> 
> To align with link compliance design existing intel_dp_compliance
> tool will be used to get the phy request in userspace through uevent.
> 
> Reviewed-by: Manasi Navare <manasi.d.navare at intel.com>
> Signed-off-by: Animesh Manna <animesh.manna at intel.com>
> ---
>  .../drm/i915/display/intel_display_types.h    |  1 +
>  drivers/gpu/drm/i915/display/intel_dp.c       | 31 +++++++++++++++++--
>  2 files changed, 30 insertions(+), 2 deletions(-)
> 
> 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 638fa35c44bb..9a0d84fee6bc 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -4947,9 +4947,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;
>  }
>  
> @@ -5275,8 +5299,11 @@ intel_dp_short_pulse(struct intel_dp *intel_dp)
>  
>  	intel_psr_short_pulse(intel_dp);
>  
> -	if (intel_dp->compliance.test_type == DP_TEST_LINK_TRAINING) {
> -		DRM_DEBUG_KMS("Link Training Compliance Test requested\n");
> +	if (intel_dp->compliance.test_type == DP_TEST_LINK_TRAINING ||
> +	    intel_dp->compliance.test_type ==
> +	    DP_TEST_LINK_PHY_TEST_PATTERN) {
> +		DRM_DEBUG_KMS("Compliance Test requested, test-type = 0x%lx\n",
> +			      intel_dp->compliance.test_type);
>  		/* Send a Hotplug Uevent to userspace to start modeset */
>  		drm_kms_helper_hotplug_event(&dev_priv->drm);
>  	}
> -- 
> 2.22.0
> 


More information about the Intel-gfx-trybot mailing list