From patchwork Thu Nov 17 13:13:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9434221 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 9108F6047D for ; Thu, 17 Nov 2016 13:14:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7393F29210 for ; Thu, 17 Nov 2016 13:14:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64CDD29271; Thu, 17 Nov 2016 13:14:07 +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 0E89329210 for ; Thu, 17 Nov 2016 13:14:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 946A06E7E6; Thu, 17 Nov 2016 13:14:05 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id C63896E7E6 for ; Thu, 17 Nov 2016 13:14:03 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id u144so21144011wmu.0 for ; Thu, 17 Nov 2016 05:14:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=Effn919AG65hG8oQpkDyE1hJKgT2ju0reY/eRpFbR98=; b=ukvDJTnEGL/E9VCDpG2Igmox3y4nadeZd0cqhHii0HaqnUQuHmy8kcfbJ+1UP+/m4E E6BhgbS2yZLc5Ji4RilU80IlavEdVPxqBwIaBT95zVJI/v2q2q2l+qZvZVgbzmMeYOu5 s+8ycQL4ilhN2pYtidHaGWMcevjQYlql1kh6cXE5WaeF4FWzGOZlAgOZWuVip+MLu4Sn SJFp71c8Txpwt0PO/z6J6HuJRP6tKQDNfzCdZwkGvuswCtqiiYd/DQ9gp5BjuRu8iC+L UX9wTdyI71lWDNXl0Ugb5ddDc15SGq046IEs9Uv+ODH7gQqOw5zGojH//uWdp2Zv2iha Iarg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Effn919AG65hG8oQpkDyE1hJKgT2ju0reY/eRpFbR98=; b=OApS7KiX/4i8dEFaq5RP0fvOJuEYr5oCs0DgLB1Th0SAw9c9pJeNj9LGFNfRSjZz/q 0TzXk2FsZ3nipklek/0zqtx3CKD1khDaT5BpweTqio203VmiJBQFHS34fMqR7+3rpX3F 1iJm699sFlgbQ/3awXX+YG99s4dSXt38v6b6LBH5l3/sSqgFjP5xWknaj0cRhK+dFsBT HTN/mnI+SeRrUTyxjM+zXFbg+BNmNb29o6VgLVOEvCGvQVwZ92zsg8/FeDQ9fVLKavmM Lo6cPbK0YU70uL2mdI1+JbAFvHciIXN59ec1UL1ROfuS49tNEO7baQwlcDT1M3oudDWR B1Sg== X-Gm-Message-State: AKaTC02viqaOmqUgVVilbEIg//8bLXCjpSieHDilyccpO0HKV74T2+Qdydwpi4AXzoD/tg== X-Received: by 10.194.115.226 with SMTP id jr2mr2011065wjb.75.1479388442079; Thu, 17 Nov 2016 05:14:02 -0800 (PST) Received: from t460p.intel ([2a02:c7d:9bd6:b000:f37e:1e07:a7d8:46cd]) by smtp.gmail.com with ESMTPSA id gk6sm3223899wjc.21.2016.11.17.05.14.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Nov 2016 05:14:01 -0800 (PST) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Thu, 17 Nov 2016 13:13:55 +0000 Message-Id: <1479388435-12062-1-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.7.4 Subject: [Intel-gfx] [PATCH] drm/i915: Waterproof verification of gen9 forcewake table ranges 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 From: Tvrtko Ursulin We have to make sure there are no holes in the table in Gen9. Signed-off-by: Tvrtko Ursulin Suggested-by: Chris Wilson Cc: Chris Wilson Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/intel_uncore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index a0944dde7c41..deb8e9e6f9ea 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -647,6 +647,8 @@ intel_fw_table_check(struct drm_i915_private *dev_priv) num_ranges = dev_priv->uncore.fw_domains_table_entries; for (i = 0, prev = -1; i < num_ranges; i++, ranges++) { + WARN_ON_ONCE(IS_GEN9(dev_priv) && + (prev + 1) != (s32)ranges->start); WARN_ON_ONCE(prev >= (s32)ranges->start); prev = ranges->start; WARN_ON_ONCE(prev >= (s32)ranges->end);