From patchwork Fri Nov 17 15:37:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 10062915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 03A5B60352 for ; Fri, 17 Nov 2017 15:38:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8E492ACE1 for ; Fri, 17 Nov 2017 15:38:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDCE52ACEF; Fri, 17 Nov 2017 15:38:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 959B52ACE1 for ; Fri, 17 Nov 2017 15:38:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E76DA6E3A5; Fri, 17 Nov 2017 15:38:02 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mblankhorst.nl (mblankhorst.nl [IPv6:2a02:2308::216:3eff:fe92:dfa3]) by gabe.freedesktop.org (Postfix) with ESMTPS id E3A4B6E3BD for ; Fri, 17 Nov 2017 15:38:01 +0000 (UTC) From: Maarten Lankhorst To: intel-gfx@lists.freedesktop.org Date: Fri, 17 Nov 2017 16:37:55 +0100 Message-Id: <20171117153756.33558-3-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171117153756.33558-1-maarten.lankhorst@linux.intel.com> References: <20171117153756.33558-1-maarten.lankhorst@linux.intel.com> Subject: [Intel-gfx] [PATCH 2/3] drm/i915: Enable IPS for sprite plane X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/intel_display.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 8283e80597bd..38a1cdb3dbb2 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5044,7 +5044,7 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state) intel_fbc_post_update(crtc); if (primary_state->base.visible && - (needs_modeset(&pipe_config->base) || + (pipe_config->disable_cxsr || !old_primary_state->base.visible)) intel_post_enable_primary(&crtc->base, pipe_config); } @@ -5064,7 +5064,7 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state, struct intel_atomic_state *old_intel_state = to_intel_atomic_state(old_state); - if (needs_modeset(&pipe_config->base) || !pipe_config->ips_enabled) + if (pipe_config->disable_cxsr || !pipe_config->ips_enabled) hsw_disable_ips(old_crtc_state); if (old_pri_state) { @@ -6224,12 +6224,11 @@ static bool pipe_config_supports_ips(struct drm_i915_private *dev_priv, visible_planes = pipe_config->active_planes & ~BIT(PLANE_CURSOR); /* - * FIXME IPS should be fine as long as one plane is - * enabled, but in practice it seems to have problems - * when going from primary only to sprite only and vice - * versa. + * IPS should be fine as long as one plane is enabled, but + * temporarily disable it when when going from primary only + * to sprite only and vice versa. */ - if (visible_planes != BIT(PLANE_PRIMARY)) + if (hweight32(visible_planes) != 1) return false; /* HSW can handle pixel rate up to cdclk? */