From patchwork Mon Jan 27 22:20:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Graunke X-Patchwork-Id: 3544151 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A22269F2E9 for ; Mon, 27 Jan 2014 22:17:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9EB6E20108 for ; Mon, 27 Jan 2014 22:16:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AF58A20103 for ; Mon, 27 Jan 2014 22:16:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7670E10629D; Mon, 27 Jan 2014 14:16:57 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from homiemail-a9.g.dreamhost.com (caiajhbdcaid.dreamhost.com [208.97.132.83]) by gabe.freedesktop.org (Postfix) with ESMTP id BF682106281 for ; Mon, 27 Jan 2014 14:16:55 -0800 (PST) Received: from homiemail-a9.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a9.g.dreamhost.com (Postfix) with ESMTP id 89C2B62606D; Mon, 27 Jan 2014 14:16:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=whitecape.org; h=from:to :cc:subject:date:message-id; s=whitecape.org; bh=i8HdNB/GYew0l5B Y4j/SKo2iwYU=; b=lbgPO2qErPn/tlWBTqy45FiPh15UWvMj7NhFiUCxLiH5l1r DE8pcv5WWZYeJup6cE5a0igRw1CNCIwlUWzRlnXjwuoJBmKQhA9HDs4W6foAZFL3 TNaNBRJeLBEY6npuUev0HLtHbWm+JnOe5Zq0bsBXCkOC+8QINtJm0ug1JMTg= Received: from vakarian.ak.intel.com (fruit.freedesktop.org [131.252.210.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: kenneth@whitecape.org) by homiemail-a9.g.dreamhost.com (Postfix) with ESMTPSA id 259C362606A; Mon, 27 Jan 2014 14:16:54 -0800 (PST) From: Kenneth Graunke To: intel-gfx@lists.freedesktop.org Date: Mon, 27 Jan 2014 14:20:14 -0800 Message-Id: <1390861218-11616-1-git-send-email-kenneth@whitecape.org> X-Mailer: git-send-email 1.8.5.2 Subject: [Intel-gfx] [PATCH 1/5] drm/i915: Implement CS stall workaround on Broadwell. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According to the latest documentation, any PIPE_CONTROL with the "Command Streamer Stall" bit set must also have another bit set, with five different options. I chose "Stall at Pixel Scoreboard" since we've used it effectively in the past, but the choice is fairly arbitrary. Signed-off-by: Kenneth Graunke Reviewed-by: Ben Widawsky --- drivers/gpu/drm/i915/intel_ringbuffer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index e75d8b3..313b1bd 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -370,7 +370,14 @@ gen8_render_ring_flush(struct intel_ring_buffer *ring, u32 scratch_addr = ring->scratch.gtt_offset + 128; int ret; - flags |= PIPE_CONTROL_CS_STALL; + /* For CS stalls, one of the following must also be set: + * - Render Target Cache Flush + * - Depth Cache Flush + * - Stall at Pixel Scoreboard + * - Post-Sync Operation + * We arbitrarily choose "Stall at Scoreboard". + */ + flags |= PIPE_CONTROL_CS_STALL | PIPE_CONTROL_STALL_AT_SCOREBOARD; if (flush_domains) { flags |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;