From patchwork Wed Oct 30 21:40:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 3117061 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 941F1BF924 for ; Wed, 30 Oct 2013 21:41:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2898C2015D for ; Wed, 30 Oct 2013 21:41:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 929FF20434 for ; Wed, 30 Oct 2013 21:41:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 951B9EF02C; Wed, 30 Oct 2013 14:41:01 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by gabe.freedesktop.org (Postfix) with ESMTP id A1B34EF02A for ; Wed, 30 Oct 2013 14:40:48 -0700 (PDT) Received: by mail-vb0-f51.google.com with SMTP id w5so859737vbf.10 for ; Wed, 30 Oct 2013 14:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rEJB+VmVDqijxSIDHG/qCmZPp+NVlA0qufqN5+VWxgQ=; b=ElS7gXZmESs67JWozKAtiYLIsAb4/X0Ao8XVub0CsXMz6DUVA8TfWjGxDqaArjoKoI KPx6vI23UAPi/DHGJfNOwkmGlrhXeP67e9mVgfhznQ3RTJFlh0pAIwdhcqFPSGeQsmR1 JQYGRgIhn9oq0+GMwaQ9J3vI1W+g9AZwJmUeZ3pbQkDB5enixmAv0jiU/qC+nAovhj+0 wjmtR7o5eT7zLY9BDKLgp1kPX0bgpWw0vV5SXeXlHk+9VGBUAxsIhLmV9z4wfxyUxKZL 96idR0ya/7HUN2tx+rY3QctfbiVPVqcwmwDGm/+dLkk2PYOy4nrMF63IhC9mv2G4hm3U p+HQ== X-Received: by 10.220.58.1 with SMTP id e1mr4608097vch.0.1383169248198; Wed, 30 Oct 2013 14:40:48 -0700 (PDT) Received: from localhost.localdomain ([177.133.211.156]) by mx.google.com with ESMTPSA id tn2sm95219vdc.2.2013.10.30.14.40.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2013 14:40:47 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Wed, 30 Oct 2013 19:40:24 -0200 Message-Id: <1383169226-16707-3-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1383169226-16707-1-git-send-email-przanoni@gmail.com> References: <1383169226-16707-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 2/4] drm/i915: WARN if !HAS_PC8 when enabling/disabling PC8 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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Paulo Zanoni We already have some checks and shouldn't be reaching these places on !HAS_PC8 platforms, but add a WARN, just in case. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 14327ff..c226f4d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6402,6 +6402,8 @@ void hsw_enable_pc8_work(struct work_struct *__work) struct drm_device *dev = dev_priv->dev; uint32_t val; + WARN_ON(!HAS_PC8(dev)); + if (dev_priv->pc8.enabled) return; @@ -6447,6 +6449,8 @@ static void __hsw_disable_package_c8(struct drm_i915_private *dev_priv) if (dev_priv->pc8.disable_count != 1) return; + WARN_ON(!HAS_PC8(dev)); + cancel_delayed_work_sync(&dev_priv->pc8.enable_work); if (!dev_priv->pc8.enabled) return;