From patchwork Thu Apr 12 07:28:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 897510 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Daj+BKCC"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 40MCFr2M3zz9s1R; Thu, 12 Apr 2018 17:29:04 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1f6WfE-0004Er-9y; Thu, 12 Apr 2018 07:29:00 +0000 Received: from mail-pf0-f194.google.com ([209.85.192.194]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1f6WfC-0004D5-ED for kernel-team@lists.ubuntu.com; Thu, 12 Apr 2018 07:28:58 +0000 Received: by mail-pf0-f194.google.com with SMTP id y66so2916081pfi.7 for ; Thu, 12 Apr 2018 00:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=ivo/D7515gIPCkaH1zUtiZP1N9UxXHsGicOYeeQLsjI=; b=Daj+BKCC5KSnkYLIZ2eUAotZYLwXLpMORN7wq7D40xB54/grMQ0/x3eObrBWCE/wm3 FAHcTYf4Cm5NVxWfpsVYJXzYd6QXQYtExDxPw26UXtrIp/NfPALpjfq+Z8vhfFiC/AAN ctEtPHQXZ0ovXqqLfFHcnnV6ZEKIPYdMpObc/iCb6+v1hyB6Bq3GKhPW/XQC1m4rk2dV HSGk/081rcPdNiON80rCG6YwQnaQ8E1t9524u5fX0soPF9w8mG4RzWjGUgCH9oxbu+fT kZKYr6AXiSrwsB1en3tN0/pWRnHjItjx/DIEF6ED7yZKLeT0nhDy/KWWi1eFDQufkQDn PFKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=ivo/D7515gIPCkaH1zUtiZP1N9UxXHsGicOYeeQLsjI=; b=tWnbTOI5RWIOQOKh2snHQA5ToYzO4omB1e4B4WUkw1kwPhcuFaTrX1q0gq2n+PVzNW uLk4irb9UwESNoKQQCMX5r3Nit5lHy2qg1/E8g3+5BXOIxWf+WBLQp9lwa9aifDEnnNe f1fkDg8o01lNmgn5fplG3kMKVUxh8smXNpr2woPb7nJ5nFNXSzf/CE2VTrWqZSjp7IgK jcxydC9o2xsBgd2h2uqQWJZ3w6O24aamYKjbtLbaQJs0FndIxB/sGK5f7l8UGi0o/uZd Y5AOlq3R3rudx0YJ+mEmOgQCWkFlQPccO4PHQaG/sZajz2uScpkvI/SJI/x1FknX8qzG omNg== X-Gm-Message-State: ALQs6tDrzocDKQsVf/ucWgZcBXGz8m60jyxbjf1Lbx0vbkVCeFFjQ3nQ 90EBNQvRR1xuUH3RaGT49H8MS5X9 X-Google-Smtp-Source: AIpwx49BEO5wPXsn1aCCThdQCONSZ4EbHj28984HzILCVyFKVSG5jc8ey79sH0Szy3rDAboKS6XSBw== X-Received: by 10.98.87.193 with SMTP id i62mr6693632pfj.219.1523518136703; Thu, 12 Apr 2018 00:28:56 -0700 (PDT) Received: from localhost ([175.41.48.77]) by smtp.gmail.com with ESMTPSA id c62sm8051037pfk.179.2018.04.12.00.28.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Apr 2018 00:28:55 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/4][Artful][linux-oem] drm/i915/edp: Do not do link training fallback or prune modes on EDP Date: Thu, 12 Apr 2018 15:28:41 +0800 Message-Id: <1523518121-28375-5-git-send-email-acelan.kao@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523518121-28375-1-git-send-email-acelan.kao@canonical.com> References: <1523518121-28375-1-git-send-email-acelan.kao@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Manasi Navare BugLink: https://bugs.launchpad.net/bugs/1763271 In case of eDP because the panel has a fixed mode, the link rate and lane count at which it is trained corresponds to the link BW required to support the native resolution of the panel. In case of panles with lower resolutions where fewer lanes are hooked up internally, that number is reflected in the MAX_LANE_COUNT DPCD register of the panel. So it is pointless to fallback to lower link rate/lane count in case of link training failure on eDP connector since the lower link BW will not support the native resolution of the panel and we cannot prune the preferred mode on the eDP connector. In case of Link training failure on the eDP panel, something is wrong in the HW internally and hence driver errors out with a loud and clear DRM_ERROR message. v2: * Fix the DEBUG_ERROR and add {} in else (Ville Syrjala) Cc: Clinton Taylor Cc: Jim Bride Cc: Jani Nikula Cc: Ville Syrjala Cc: Dave Airlie Cc: Daniel Vetter Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjala Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103369 Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/1507835618-23051-1-git-send-email-manasi.d.navare@intel.com (cherry picked from commit c0cfb10d9e1de490e36d3b9d4228c0ea0ca30677) Signed-off-by: Rodrigo Vivi (backported from commit a306343bcd7df89d9d45a601929e26866e7b7a81) Signed-off-by: AceLan Kao --- drivers/gpu/drm/i915/intel_dp_link_training.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp_link_training.c b/drivers/gpu/drm/i915/intel_dp_link_training.c index b79c1c0..4b1d012 100644 --- a/drivers/gpu/drm/i915/intel_dp_link_training.c +++ b/drivers/gpu/drm/i915/intel_dp_link_training.c @@ -326,12 +326,22 @@ intel_dp_start_link_train(struct intel_dp *intel_dp) return; failure_handling: - DRM_DEBUG_KMS("Link Training failed at link rate = %d, lane count = %d", - intel_dp->link_rate, intel_dp->lane_count); - if (!intel_dp_get_link_train_fallback_values(intel_dp, - intel_dp->link_rate, - intel_dp->lane_count)) - /* Schedule a Hotplug Uevent to userspace to start modeset */ - schedule_work(&intel_connector->modeset_retry_work); + /* Dont fallback and prune modes if its eDP */ + if (!intel_dp_is_edp(intel_dp)) { + DRM_DEBUG_KMS("[CONNECTOR:%d:%s] Link Training failed at link rate = %d, lane count = %d", + intel_connector->base.base.id, + intel_connector->base.name, + intel_dp->link_rate, intel_dp->lane_count); + if (!intel_dp_get_link_train_fallback_values(intel_dp, + intel_dp->link_rate, + intel_dp->lane_count)) + /* Schedule a Hotplug Uevent to userspace to start modeset */ + schedule_work(&intel_connector->modeset_retry_work); + } else { + DRM_ERROR("[CONNECTOR:%d:%s] Link Training failed at link rate = %d, lane count = %d", + intel_connector->base.base.id, + intel_connector->base.name, + intel_dp->link_rate, intel_dp->lane_count); + } return; }