From patchwork Sun Feb 12 13:32:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9568371 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 6CC85601E7 for ; Sun, 12 Feb 2017 13:33:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50F0B28441 for ; Sun, 12 Feb 2017 13:33:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4344C28448; Sun, 12 Feb 2017 13:33:02 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 D2BBB28441 for ; Sun, 12 Feb 2017 13:33:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C5CFB6E066; Sun, 12 Feb 2017 13:33:00 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 031DD6E066 for ; Sun, 12 Feb 2017 13:33:00 +0000 (UTC) Received: by mail-pg0-x244.google.com with SMTP id 204so7166902pge.2 for ; Sun, 12 Feb 2017 05:32:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QBQn5piyRyWQiEb9nBm0XFfRZE1NcDBt3Hy0IqFBQpI=; b=t/iCk4wZ1IdwPRD1BIzy/rIk8wzv+qsm+fMabcAcn1IEHPfQCsfsnj4ytnW65YDBzJ G2128Pj5Vwe8uLjKRmJbqKhk3TKn/j+qx+VujGYzNKp7oFvVdDRwbJmPMBHWwitGokTL 9n7wjfUZ2UuWYo8sPcqemspgCmIWiWk+ZhGbdMMkUCSCZy5dCWHks4OuRrxv3Q9LIiAP 45+WrcriNgUdL82shLnHurvhUm3dtoPgCk8r7uzzsA4AiFBHeLav/zm3el2UjD3qkd12 fBL4H0F8xLVT9syu1BKylRs5eXAmmAG0GzJ/ILE/yA4jpDPvFz7UMcFPpBc3CIIuZdd9 Yx3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=QBQn5piyRyWQiEb9nBm0XFfRZE1NcDBt3Hy0IqFBQpI=; b=ckCYaLS4/Dgf2FKS6dihqhgse1PrskeKQtRzbmwnNZY95C9MOPkpbtViX/fPwnliPr go9Yt02OIxrwR5w5Ono/dAR0XsDc3JRNRbR2/TLZAwEcSn28bQtdkCqPV3ERYNhk8RAx 0mw+K7l+YIBkhBJqEjYZ2U3hY/hKK8EutlTA1PIve9emretIC0hW7Mx/374wLtmzPxjO j1z9jITbEVPhHshAm5MBSPR2A2YWEfyA2MM0G/6UhahWt/PShIZNjmUVpAYP6wPM1aZg V2u7ws72cL98b9kL07mst8cokGZmdH8ZqP2n6ohw0iPoKW0tL7DBXALKslKr1O6bApAZ yLkA== X-Gm-Message-State: AMke39mwE7tGIH+aSjvdhv4OS+ijlAElbeKbp9Xq+5UrnkW9nqCU6UDp9FiwUWceBgVSwQ== X-Received: by 10.99.228.69 with SMTP id i5mr21500281pgk.63.1486906379570; Sun, 12 Feb 2017 05:32:59 -0800 (PST) Received: from sixbynine.org ([192.55.54.44]) by smtp.gmail.com with ESMTPSA id r78sm15360751pfl.63.2017.02.12.05.32.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Feb 2017 05:32:59 -0800 (PST) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Sun, 12 Feb 2017 13:32:52 +0000 Message-Id: <20170212133252.20990-1-robert@sixbynine.org> X-Mailer: git-send-email 2.11.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v2] drm/i915: fix for WaDisableDopClockGating:bdw 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This workaround for BDW was incomplete as it also requires EUTC clock gating to be disabled via UCGCTL1. v2: read modify write UCGTL1 in broadwell_init_clock_gating (Ville) Signed-off-by: Robert Bragg Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_pm.c | 8 ++++++++ drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index c0b0f5a4b9f1..3c13be8985f1 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -7229,6 +7229,14 @@ static void broadwell_init_clock_gating(struct drm_i915_private *dev_priv) | KVM_CONFIG_CHANGE_NOTIFICATION_SELECT); lpt_init_clock_gating(dev_priv); + + /* WaDisableDopClockGating:bdw + * + * Also see the CHICKEN2 write in bdw_init_workarounds() to disable DOP + * clock gating. + */ + I915_WRITE(GEN6_UCGCTL1, + I915_READ(GEN6_UCGCTL1) | GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE); } static void haswell_init_clock_gating(struct drm_i915_private *dev_priv) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index d3d1e64f2498..d93d5f8f02d8 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -825,7 +825,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *engine) /* WaDisableThreadStallDopClockGating:bdw (pre-production) */ WA_SET_BIT_MASKED(GEN8_ROW_CHICKEN, STALL_DOP_GATING_DISABLE); - /* WaDisableDopClockGating:bdw */ + /* WaDisableDopClockGating:bdw + * + * Also see the related UCGTCL1 write in broadwell_init_clock_gating() + * to disable EUTC clock gating. + */ WA_SET_BIT_MASKED(GEN7_ROW_CHICKEN2, DOP_CLOCK_GATING_DISABLE);