From patchwork Tue Nov 24 10:42:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1405444 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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 Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CgLHK3zbHz9sT6; Tue, 24 Nov 2020 21:44:13 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1khVnu-0003Qj-HS; Tue, 24 Nov 2020 10:44:10 +0000 Received: from mail-pf1-f194.google.com ([209.85.210.194]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1khVnp-0003J9-JS for kernel-team@lists.ubuntu.com; Tue, 24 Nov 2020 10:44:05 +0000 Received: by mail-pf1-f194.google.com with SMTP id w187so3600101pfd.5 for ; Tue, 24 Nov 2020 02:43:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SZpLDA1itxbesdsbC9yrzibvaUsoJueDVqngcH9mxuI=; b=NmzIvCGBbV8iR2Il1VbTdZhCWqZQAoNO2ERFXWOAqdxgXKHEKAKwoD+EY9cMsT0QG6 hsxWXC/KFIqpATDx5SfUD6cQ70CDL46jeC/7/lq1+yFUcGwENAkbazpUnYu8CsQNLVo9 KrVu792xHTI7qaWxJDzKwEbgFJ94USn16DsRwW8eU9fXCE6eOy7L2RNWCxRXBfuld7C2 wzYQpBgJdXAML1SoP9dkXaDsygvnBbv2+CGjU+dATCmZMTicHdVdSl0cxtRuDkvnL4Vk kgDN5pyafhIZDXsS6jDR2QqMEq17vg2VO1mYxAnvFtPNSs9dAfnVQ0sFqUibrEBhAI9w THiw== X-Gm-Message-State: AOAM533yhgDLBTvSu90xOpUpwOXsLatTCBbHHdUscjEctbX4O9fEoX43 r1B5HjR8Uldi7xixiStx8K1FZShVHfieNw== X-Google-Smtp-Source: ABdhPJxgbENAA/BE4U8Tw3IPxOQXsyqF34Jk74LKv4iqJx+EoRONpUZK3YzP1dDKszGLYQkDd3poLA== X-Received: by 2002:a17:90b:8d8:: with SMTP id ds24mr4068496pjb.5.1606214636995; Tue, 24 Nov 2020 02:43:56 -0800 (PST) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id l20sm2521459pjq.33.2020.11.24.02.43.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 02:43:56 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 16/38][SRU][G/H] drm/i915/ddi: Don't rewrite DDI_BUF_CTL reg during DP link training Date: Tue, 24 Nov 2020 18:42:51 +0800 Message-Id: <20201124104313.421860-17-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201124104313.421860-1-vicamo.yang@canonical.com> References: <20201124104313.421860-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.194; envelope-from=vicamo@gmail.com; helo=mail-pf1-f194.google.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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Imre Deak BugLink: https://bugs.launchpad.net/bugs/1903969 The value we program to DDI_BUF_CTL changes at the following places: - At enabling/disabling the output to configure the port width etc, and to enable/disable the DDI BUF function. - At the beginning/end of link re-training to disable/re-enable the DDI BUF function. - On HSW/BDW/SKL to change the voltage swing/pre-emph levels. Except of the above the value we program to the DDI_BUF_CTL register (intel_dp->DP) doesn't change, so no need to reprogram the register when changing the link training patterns (which is programmed via the DP_TP_CTL register on DDI platforms). v2: - Fix the commit message wrt. voltage/pre-emph level values in intel_dp->DP. (Ville) Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200714153141.10280-2-imre.deak@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit a5bcf8dde63142f36ae8ce720265d4c41a634d5c) Signed-off-by: You-Sheng Yang --- drivers/gpu/drm/i915/display/intel_ddi.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index 3211fa6acf8c..94d91ff766b5 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -4035,7 +4035,6 @@ static void intel_ddi_set_link_train(struct intel_dp *intel_dp, { struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); u8 train_pat_mask = drm_dp_training_pattern_mask(intel_dp->dpcd); - enum port port = dp_to_dig_port(intel_dp)->base.port; u32 temp; temp = intel_de_read(dev_priv, intel_dp->regs.dp_tp_ctl); @@ -4060,9 +4059,6 @@ static void intel_ddi_set_link_train(struct intel_dp *intel_dp, } intel_de_write(dev_priv, intel_dp->regs.dp_tp_ctl, temp); - - intel_de_write(dev_priv, DDI_BUF_CTL(port), intel_dp->DP); - intel_de_posting_read(dev_priv, DDI_BUF_CTL(port)); } static void intel_ddi_set_idle_link_train(struct intel_dp *intel_dp)