Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3054670imu; Mon, 19 Nov 2018 09:57:38 -0800 (PST) X-Google-Smtp-Source: AJdET5cdFDfG9mHtb8FqVhD4YgBzajvvpvCgtMXuhKi+gDSQ9aXxq0nWngVWiEHLUAqbThUTLFtw X-Received: by 2002:a62:e201:: with SMTP id a1mr11238789pfi.75.1542650258824; Mon, 19 Nov 2018 09:57:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542650258; cv=none; d=google.com; s=arc-20160816; b=D9po+2BbywSDPhvkxdfuAApwUhHi4/aexkWAFKODbcJBveTEMLZUNm5fCobJ/S6WyA /wZKI5qQQpFYQt9mMs508WjpnBZitWvPUYx9arjijyLn1Ezf++VkCTqv6HBdNvD4ajg6 2Acx2evN9vKGn+82FhUHdHgYsjRUAtiRIUnKxVcP9VC3P6aBs2K9lFQEQKJTdKC4sG36 8LTxFsRBtctpGz4hBOCjuRlGG8874TvpqP1XDRXKvk5ZfqOVwzvPKVpMQvrEdcc6pGzm lNJvBsVEWrd0oSbTtxm/NcXggNi7MO0sRSIAzvyqcOl6D+R9fDCIz83cF8tXaD23x8GT mV3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=if0cWvO6yYeaVxvjUARu+r07v8ouktjR+xmL9irOdEs=; b=Z0BDSDnBr2zGTpN7azNPVb/lAAzvPEMioCu/muW9pjcrB2OV05WUHSQMeSK/CZlTfO zWoDEDzjh+a5+jyBoMP9NNUYx+3EhG1l+a6jhS8isbj7R4PxDbdDO9Cy4AWDlKtyk99n pMNXmypYV4Cb6bRuDnlA7px8cl5ANbeviAK7VbJxh+3fxB4ahd9WuIhzJBO54X/2NQLh zjhpefZtyPEAYlc/tSuctSjKQYKGqy6KXFJf8tmQc9K4a73A8LgPO3b6hBwuBCwvbxDf HrgB4SvQecPBPeMSV/kfGt2Yrg+Jq7aLebaCaVV9SfpYdNp49Cr91eS1rMGRqlAEK/k9 r7Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wDkm+jDS; 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 t69si39386902pgb.365.2018.11.19.09.57.24; Mon, 19 Nov 2018 09:57:38 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=wDkm+jDS; 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 S1732557AbeKTDCz (ORCPT + 99 others); Mon, 19 Nov 2018 22:02:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:35342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731835AbeKTDCy (ORCPT ); Mon, 19 Nov 2018 22:02:54 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 724F620831; Mon, 19 Nov 2018 16:38:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645525; bh=ir29uXV09u5Le8WcRpcdB1HxoQeAW2fReO25BlXHUGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wDkm+jDSsgtBYZ2x9YqXXvNpU1bOsbh25tsfpzsCwyz5RvbjEdcOyzsvXCf/wOozZ w70Xn7RYAjA6KlUYVljxErh75Dvx+l5LfOue5LoWYAHUXAtrHTKZ8s6SPN9GqZysPW 1BE+kup5htfOErIUqWJbRan80D5Ka22fZu1siHdQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matt Roper , Maarten Lankhorst , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Joonas Lahtinen Subject: [PATCH 4.19 196/205] drm/i915: Fix ilk+ watermarks when disabling pipes Date: Mon, 19 Nov 2018 17:28:23 +0100 Message-Id: <20181119162642.361701597@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ville Syrjälä commit df5e31c204b34e8d9e5ec33f5b28e960c4f25e14 upstream. We're no longer programming any watermarks when we're disabling a pipe. That means ilk_wm_merge() & co. will keep considering the any pipe that is getting disabled as still enabled. Thus we either get no LP1+ watermakrs (ilk-ivb), or we get suboptimal ones (hsw-bdw). This seems to have been broken by commit b6b178a77210 ("drm/i915: Calculate ironlake intermediate watermarks correctly, v2."). Before that we apparently had some difference between the intermediate and optimal watermarks and so we would program the optiomal ones. Now intermediate and optimal are identical for disabled pipes and so we don't program either. Fix this by programming the intermediate watermarks even for disabled pipes. We were already doing that for skl+. We'll leave out gmch platforms for now since those do the merging in a different manner and should work as is. We'll want to unify this eventually, but play it safe for now and just put in a FIXME. Cc: stable@vger.kernel.org Cc: Matt Roper Cc: Maarten Lankhorst Fixes: b6b178a77210 ("drm/i915: Calculate ironlake intermediate watermarks correctly, v2.") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181025130536.29024-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst #irc (cherry picked from commit a748faea3bfd7fd1d1485bc1c426c7d460cc6503) Signed-off-by: Joonas Lahtinen Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_display.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -12639,17 +12639,12 @@ static void intel_atomic_commit_tail(str intel_check_cpu_fifo_underruns(dev_priv); intel_check_pch_fifo_underruns(dev_priv); - if (!new_crtc_state->active) { - /* - * Make sure we don't call initial_watermarks - * for ILK-style watermark updates. - * - * No clue what this is supposed to achieve. - */ - if (INTEL_GEN(dev_priv) >= 9) - dev_priv->display.initial_watermarks(intel_state, - to_intel_crtc_state(new_crtc_state)); - } + /* FIXME unify this for all platforms */ + if (!new_crtc_state->active && + !HAS_GMCH_DISPLAY(dev_priv) && + dev_priv->display.initial_watermarks) + dev_priv->display.initial_watermarks(intel_state, + to_intel_crtc_state(new_crtc_state)); } }