From patchwork Fri Aug 14 06:57:25 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: 1344671 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 4BSZ6G4jQhz9sTH; Fri, 14 Aug 2020 16:58:46 +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 1k6Tfl-00086o-DJ; Fri, 14 Aug 2020 06:58:41 +0000 Received: from mail-pl1-f195.google.com ([209.85.214.195]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k6Tfe-0007ug-C0 for kernel-team@lists.ubuntu.com; Fri, 14 Aug 2020 06:58:34 +0000 Received: by mail-pl1-f195.google.com with SMTP id y10so2193886plr.11 for ; Thu, 13 Aug 2020 23:58:27 -0700 (PDT) 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=9Tlt8mXMDeiPzbe8pfQmLDLOPLfxcaDzot7OS0/fnWM=; b=oL2DZWaPGB1WG2Fwf6l6MSXlr8r1Upv70V9ltCXzri4OeOnsR3RQs03SVUy7W9UpBG Cxa1+oOpdwnTv1JE4/byCBE19XhvpTCF11JxrJW/IxYeLjnN2QmCHuoA/7ind7+MgIqt J0Xj+cdSPmoyw4RSGbCaURSAOGlvXFOdzfQHKTjmfbQfThT1VbgxcZaGlwpxg3FkF4qw E13mLXlvmBBzW6h1Satn4zm/dfKoMfBwZ3uGuy3QpMj1Lh6QHOu0PPHvNJXfCNCe6hBq 9MMkVYbFZa4AbwQzgCgmSiGgmZJxV5IGM6jO4ZmyprFIGwURoNwuGZAL9Y1wBuUc1BiG uVBA== X-Gm-Message-State: AOAM53055g358LzV+utU7duGpB5zZujjhH4Kajz8+mUibvnusmcXOh3x jWqRzztNWnqVZVJXmUIV/MHs8L3MShA9hg== X-Google-Smtp-Source: ABdhPJxITGbydCLGDax4+FH9MGmDv/2HsmsODifYGRxPlYE/n29y2yHaUHQmOs+jvXlWFqkTkl9fNA== X-Received: by 2002:a17:90a:db18:: with SMTP id g24mr1119900pjv.14.1597388305896; Thu, 13 Aug 2020 23:58:25 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id o63sm4115534pfb.190.2020.08.13.23.58.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2020 23:58:25 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 16/31][SRU][OEM-5.6] drm/i915: Implement display w/a 1140 for glk/cnl Date: Fri, 14 Aug 2020 14:57:25 +0800 Message-Id: <20200814065740.276039-17-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200814065740.276039-1-vicamo.yang@canonical.com> References: <20200814065740.276039-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.195; envelope-from=vicamo@gmail.com; helo=mail-pl1-f195.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: Ville Syrjälä BugLink: https://bugs.launchpad.net/bugs/1891451 Display w/a #1140 tells us we have to program the transition watermark to the minimum value on glk/cnl. Let's do that. Signed-off-by: Ville Syrjälä Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20200228203552.30273-4-ville.syrjala@linux.intel.com (cherry picked from commit c834d03cca61bf88aa8c2f9524360cce484686ac) Signed-off-by: You-Sheng Yang --- drivers/gpu/drm/i915/intel_pm.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 29137201e20a..9b9e0780d411 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5124,8 +5124,7 @@ static void skl_compute_transition_wm(const struct intel_crtc_state *crtc_state, { struct drm_device *dev = crtc_state->uapi.crtc->dev; const struct drm_i915_private *dev_priv = to_i915(dev); - u16 trans_min, trans_y_tile_min; - const u16 trans_amount = 10; /* This is configurable amount */ + u16 trans_min, trans_amount, trans_y_tile_min; u16 wm0_sel_res_b, trans_offset_b, res_blocks; /* Transition WM don't make any sense if ipc is disabled */ @@ -5139,9 +5138,16 @@ static void skl_compute_transition_wm(const struct intel_crtc_state *crtc_state, if (IS_GEN9_BC(dev_priv) || IS_BROXTON(dev_priv)) return; - trans_min = 14; if (INTEL_GEN(dev_priv) >= 11) trans_min = 4; + else + trans_min = 14; + + /* Display WA #1140: glk,cnl */ + if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) + trans_amount = 0; + else + trans_amount = 10; /* This is configurable amount */ trans_offset_b = trans_min + trans_amount; @@ -5168,7 +5174,6 @@ static void skl_compute_transition_wm(const struct intel_crtc_state *crtc_state, /* WA BUG:1938466 add one block for non y-tile planes */ if (IS_CNL_REVID(dev_priv, CNL_REVID_A0, CNL_REVID_A0)) res_blocks += 1; - } /*