Received: by 10.192.165.156 with SMTP id m28csp275700imm; Tue, 17 Apr 2018 09:58:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx49UWBJWVhAaOt3uwTAALBbJtamiGRv4NwZS32yYHoYdu/nO0pz7srshWJ2NCNnR5rbLBQjd X-Received: by 10.98.53.198 with SMTP id c189mr2674442pfa.243.1523984285001; Tue, 17 Apr 2018 09:58:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523984284; cv=none; d=google.com; s=arc-20160816; b=u7q693NBXJn75WjfwEB8XrWny3xTS6HFYJP2ANhdjKjXGt0TOGUESfdGJkvCKynTiV wilXmpicST8vutGIdPO5bFYyMLxyF7D5eIxFfG+XTzEOz+xyU2LeUrR9bmOUTfghzyCV M0y9goVwmOFukbY88EGg07X9OlGRPVN187WfeXmUXDXpkDkM5ZPglWdUs020gVm6ARhJ lJfK/eb2Da0+tRwZrOj2XQ0m6AfV+NeA0QlPBDtc9smYMwG7BvL3mJotFA/+wYk0WA99 uxIxOz5t1WFOe3zu7DBFbsB1Px4yRau1CDiLKNdF1b7rGj19RtqhjqSGuttsVvft0tf3 DTUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=DG8qGGE/ZC8ITk1346BCRxkWHquc/6xm1qRQeg0DRoE=; b=zS12nYqDJqbxpigaCKSrY1lUtuRH8sOXfIyTbmrAYul/DkvS//6och+aFEPoC4h7ex ooS+J1a5OfHpSZI/mQMn1uQN3S7W9wJ3kOWKvmMTlVLKOjYmnjdiT1+XD3HWY6VbP69y WiihkP3FhfMLTQILlEtty3eSgk1VXmL/CHQe52f+laN+z5wFuimWwsOhFXRqsOdJGiIr wDoUgK8gLrkZwgDdr3EXQWX5qJ0jKWUqoVODPt8tnjDlDSFj8g/Wa6gn8FZZ4FtTkRRk UqsE3SX+vZ+XX20p8fwINCzKyiVZTW2sdEbBa8wQwHPz42h1kxeEkKbGiwwzivSSuh65 Ib+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p15si4215011pgv.393.2018.04.17.09.57.50; Tue, 17 Apr 2018 09:58:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754252AbeDQQDR (ORCPT + 99 others); Tue, 17 Apr 2018 12:03:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:32858 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754230AbeDQQDM (ORCPT ); Tue, 17 Apr 2018 12:03:12 -0400 Received: from localhost (unknown [46.44.180.42]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 18759E43; Tue, 17 Apr 2018 16:03:11 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Clinton Taylor , Jim Bride , Jani Nikula , Ville Syrjala , Dave Airlie , Daniel Vetter , Manasi Navare , Imre Deak , Rodrigo Vivi Subject: [PATCH 4.15 01/53] drm/i915/edp: Do not do link training fallback or prune modes on EDP Date: Tue, 17 Apr 2018 17:58:26 +0200 Message-Id: <20180417155723.147213348@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417155723.091120060@linuxfoundation.org> References: <20180417155723.091120060@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Manasi Navare commit a306343bcd7df89d9d45a601929e26866e7b7a81 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_dp_link_training.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) --- a/drivers/gpu/drm/i915/intel_dp_link_training.c +++ b/drivers/gpu/drm/i915/intel_dp_link_training.c @@ -328,14 +328,22 @@ intel_dp_start_link_train(struct intel_d return; failure_handling: - 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); + /* 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; }