Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1244588pxb; Fri, 20 Aug 2021 00:59:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjbV99s2pfu85/Ve5gKQMedqLEK7BUb4R+pVwSCRKbroOQsgMbSWFQYeFtILL9PN6PALVS X-Received: by 2002:a05:6402:3485:: with SMTP id v5mr20497252edc.205.1629446352605; Fri, 20 Aug 2021 00:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629446352; cv=none; d=google.com; s=arc-20160816; b=L2dG5pItcwZZZmtHOCZ8IIurL0GiYs67BqxXHfRhtbwaKLNfuBtMvyB2fIAKiCNeLW zFFEEy0j3F2S3DzcgPnXfEmHv1nCuOinvphnfWIyosoMEoqsvX5fkdRcuAwtL4Xf8zWm UyvA1KKxmtMQX3MpDOyIPo/Hco+CGnelf97oxve/tZ6cgcgJ74WLqA2wUx6rOiNgQJZ3 /KHh2nVS4f2saO6AwWtaYMpx6FNCDK5rKUNLv3jHvmAV27lYKcwd9rolZmTkkQlWUGWH qB1I5vmpwWl9UGM1mm3N2vrlRRvqseELD1Rw5KczUnTrxugg2IPan6+YJXGxFq+Q1mXT PfDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ywi09jLJioHV77jNrsti8DgLUfgW57ub1lXIO6DgnXE=; b=soS66wmOKiAcFmFICF8Uw0Xbumuu90QjOQVEvWPQgymsSw8iL9EX0jSH8XQXetN7Xt F3B7QhoqHud90/J6yLct1o1m4vi34RfMqi+2PEl3JU3XrRBjze5csNctP/8RJrfws5jw Mlv5SElPNAxHse5E+QhIWrIburA1tJDaZId5Vmhw0A2N/hKGueLvd5Za0ylVScu64maZ DdA5FdweqmCZN7JRKfER4UeBfeGmGEe4tBwx9OgxOt5NcWRoN1qOjiXG9bfTnGbBMZd5 scmXZkmzWO8dP6rQeuERAcsJnbokgp0oeAbfhAbOKZvbKMwXWCkPY2m3TerhIkc0SLcm V0Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=uqV5aOG2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w19si5342705edc.537.2021.08.20.00.58.49; Fri, 20 Aug 2021 00:59:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=uqV5aOG2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236378AbhHTHyx (ORCPT + 99 others); Fri, 20 Aug 2021 03:54:53 -0400 Received: from smtp-relay-canonical-0.canonical.com ([185.125.188.120]:60156 "EHLO smtp-relay-canonical-0.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238991AbhHTHyx (ORCPT ); Fri, 20 Aug 2021 03:54:53 -0400 Received: from localhost.localdomain (1.general.khfeng.us.vpn [10.172.68.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 47A893F043; Fri, 20 Aug 2021 07:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1629446049; bh=ywi09jLJioHV77jNrsti8DgLUfgW57ub1lXIO6DgnXE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=uqV5aOG2xgqbTjj2P+I0fnBSCRlwHzf6pdJ9jmvbO2naQtjMxX5E+X8R3J96oKVOq TM5WL3mkXHKfJZ12J4oR35UXfpN942KnL19Lt8Zh3LzLL5ErytLv1LxSwCkRUmloDj 1fmYVmTHMQ+CGM6eU21V50hrnoirR0h4ZJLlXkCuknUig/rficalZ7tgE4jgDwfLAX UV0+XlxxZznOT38DPK2phgMA00N99ASE9CEZ8GGiaXWADS2iqAxwjAuvnR5kAmG1b0 1tu2AsgjaORkqJA/nc8HyBDzQBTQyuISBKENxnmQ927CUYfYqsiBuqve+5y2VLvPV4 x3IsY/qBJawHg== From: Kai-Heng Feng To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com Cc: Kai-Heng Feng , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , David Airlie , Daniel Vetter , Imre Deak , Uma Shankar , Manasi Navare , Ankit Nautiyal , =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= , Sean Paul , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] drm/i915/dp: Use max params for panels < eDP 1.4 Date: Fri, 20 Aug 2021 15:52:59 +0800 Message-Id: <20210820075301.693099-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Users reported that after commit 2bbd6dba84d4 ("drm/i915: Try to use fast+narrow link on eDP again and fall back to the old max strategy on failure"), the screen starts to have wobbly effect. Commit a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for everything") doesn't help either, that means the affected eDP 1.2 panels only work with max params. So use max params for panels < eDP 1.4 as Windows does to solve the issue. v3: - Do the eDP rev check in intel_edp_init_dpcd() v2: - Check eDP 1.4 instead of DPCD 1.1 to apply max params Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3714 Fixes: 2bbd6dba84d4 ("drm/i915: Try to use fast+narrow link on eDP again and fall back to the old max strategy on failure") Fixes: a5c936add6a2 ("drm/i915/dp: Use slow and wide link training for everything") Suggested-by: Ville Syrjälä Signed-off-by: Kai-Heng Feng --- drivers/gpu/drm/i915/display/intel_dp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 75d4ebc669411..e0dbd35ae7bc0 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2445,11 +2445,14 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp) */ if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV, intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) == - sizeof(intel_dp->edp_dpcd)) + sizeof(intel_dp->edp_dpcd)) { drm_dbg_kms(&dev_priv->drm, "eDP DPCD: %*ph\n", (int)sizeof(intel_dp->edp_dpcd), intel_dp->edp_dpcd); + intel_dp->use_max_params = intel_dp->edp_dpcd[0] < DP_EDP_14; + } + /* * This has to be called after intel_dp->edp_dpcd is filled, PSR checks * for SET_POWER_CAPABLE bit in intel_dp->edp_dpcd[1] -- 2.32.0