Send uevent to testapp and set test_active flag. To align with link
compliance design existing intel_dp_compliance tool will be used to
get the phy request in userspace through uevent.

Signed-off-by: Animesh Manna <animesh.ma...@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index fa67b8f88e65..cbefda9b6204 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5013,6 +5013,9 @@ static u8 intel_dp_autotest_phy_pattern(struct intel_dp 
*intel_dp)
        if (test_result != DP_TEST_ACK)
                DRM_ERROR("Phy test preparation failed\n");
 
+       /* Set test active flag here so userspace doesn't interrupt things */
+       intel_dp->compliance.test_active = 1;
+
        return test_result;
 }
 
@@ -5338,8 +5341,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.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to