Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2352877pxb; Mon, 20 Sep 2021 19:50:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyg9P4tDNwX/Eb7wbRkC0aKE4exGA/BA8brwCC+AFqslBKaNuuBLen8mDPVpLjRoFBm8jLE X-Received: by 2002:a17:906:2f10:: with SMTP id v16mr10451940eji.434.1632192627149; Mon, 20 Sep 2021 19:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192627; cv=none; d=google.com; s=arc-20160816; b=NjbVOtAjKSDhdsUr5FwDyh4mqttWLB1EgrybjheyxKZ+Tn2+h5Uz44orez2u7o4mhL I2uClHcupUQm0EZduPaFUXTJmfIGG84scjHbgRDjm2aYg7q9xlBadp55q90wvY4C9mAU Nk4vQ63W4cG69a858rJxx/hUOWDA+LwBSqWDG5vaU3BOPXn0TYyaNaAKc364fsEsgQ3V ug7TqS/GB4mIuEQMLspXPeCcMqu9841yHHHc4Ns2jRx4HT+ZlvFe8ufDGjXF6GQHfZd5 avNjzOEuHjPwk2clZ3vAkuId/CuQuDZka/qw3qTmb2CVKLQsiIWUtgASZHkpgtUMR57/ 23Cw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=f3AvVjrRlhXq5CYCtpDVUbFt/QvO/UO/3L+fKTF8q80=; b=TSxk/IbzWiF4cDdWRDQUp+ulVDObRgYMhW1GdDZZuIKz7VtfWjLlLL+zcy3EqADBnC qhWVJO3C5zl8vuhmlQvLkoyOFzgwNL4CTtsYVqeUazO4QyxtiPe5YwyNu2Ys1UlTqlZW D4ygUXaSLNqWRtWOb3+IU1F4Jnl8FNx74mMz+853jN/eaI4H/qHf4cIbq+h5tX2wnJk7 QQ1qw618i/rydWcCs790Jmbxm0ntzEAu4cQtRL9zxcwkanD/Q+SELjyarqfzewcu4P2q DHR5MEvZ26REuNH4YY8O5PzdvcBo00LR/3kkjwOVILOJRm35mFgv0ByFIS4W1lOLVq05 tF0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s6GHbgcC; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si18491670edx.536.2021.09.20.19.50.04; Mon, 20 Sep 2021 19:50:27 -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=@linuxfoundation.org header.s=korg header.b=s6GHbgcC; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353039AbhITSmN (ORCPT + 99 others); Mon, 20 Sep 2021 14:42:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:52526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346748AbhITShT (ORCPT ); Mon, 20 Sep 2021 14:37:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0EE376141B; Mon, 20 Sep 2021 17:29:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158985; bh=Dl4mxtMwzlTqQKa07pgktE0TjFGpjOgMFhdd7xXD0VQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s6GHbgcCgQPd2i55wPC1LwXHqYyZOYc7AUpWJEGJ+x1leMDvzRjOQkujUMmE/djoe 9yMOl/C5Ia1/CYYMGwAK+9QRuinrZd2yKIaQb16ThJMjo9ynsupsbPDOEXH5+OycJV T6iR5oi6+Sb0BzQ+NAIy8jHv0WBe53XSYHiwe6CY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Kai-Heng Feng , Jani Nikula Subject: [PATCH 5.14 023/168] drm/i915/dp: Use max params for panels < eDP 1.4 Date: Mon, 20 Sep 2021 18:42:41 +0200 Message-Id: <20210920163922.409845362@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Kai-Heng Feng commit c8dead5751b81dfa6b10449b740ed1062ff670c5 upstream. 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 Cc: stable@vger.kernel.org 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 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210820075301.693099-1-kai.heng.feng@canonical.com (cherry picked from commit d7f213c131adf0bec8b731553eb82990cdac265d) Signed-off-by: Jani Nikula Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/display/intel_dp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2453,11 +2453,14 @@ intel_edp_init_dpcd(struct intel_dp *int */ 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]