From patchwork Sun Mar 12 13:54:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9619405 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 0BBD260414 for ; Sun, 12 Mar 2017 13:54:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1E94284A7 for ; Sun, 12 Mar 2017 13:54:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4206284CF; Sun, 12 Mar 2017 13:54:32 +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 596CC284A7 for ; Sun, 12 Mar 2017 13:54:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1ECB46E34B; Sun, 12 Mar 2017 13:54:31 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id E79966E34B for ; Sun, 12 Mar 2017 13:54:29 +0000 (UTC) Received: by mail-wr0-x244.google.com with SMTP id l37so16955969wrc.3 for ; Sun, 12 Mar 2017 06:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=gG/l7aMTit7phNs6Tcf1fapOcPZ9VhmyB6im6iTVx0o=; b=lEzNcLF8e4abT8vixsJUgdg6VKjmjd0lDYt/zmTLu2O7wNUMYBLP1kRbWIjQSBjU+L KMADlDGL71RA21Fm0Q6ZHBRPp3VzQ/NlNMO/OM7ta1FcI3e1rWUliW6Th6RynzgNRjrY vNIXJ+rsWWDAbB8OSIclH2l6uxYfy1INqDYul4IkPdRI+4vD2Cep9UVPGy0RUn3HZXSO o3wOTyRIswNB2rd+jFirJNdoFm05r8AZo757EuvkucoUD3bLk3QUeF22IxLyvAUZ6kJ1 03pOfpddEsjgHi6vYJF3NxZ+5+TkSDEQX+vmlCnaoYXhS5sa0BBGuFtt3bTwCv9StlyN Udnw== 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; bh=gG/l7aMTit7phNs6Tcf1fapOcPZ9VhmyB6im6iTVx0o=; b=P0au9zZE9OFVJcwVdg3fyLcIhNGEW9BKv7PghyWM0pr7H39sfTmX+tHAavsDNsgETC beOQnqROh9WzSVv4jtA+YE5sBNqWicXIV0gkIDNvs6EsAoTJBpK9o+UL6bhgNEcg24DU 6N625aLj72oNLDQxpbdWnyCiRf+U9YEYCW7Zv86Wu+bF1lUGgluibPxoTnE541GlgdW6 UpkdJrMk3WVoB+AY40D9eutT5seFMk6HQQKVnhLUZbLoEnfWfGLIM2fkBPfezi0syMB2 0fXQDcByURLh+TAfyj5Uu/JCfrzVlu7sM1bsi+CmAKrbmbnODs2Qj12WlEuHjoE4RCKj sh4g== X-Gm-Message-State: AMke39lAwGnznPkTs2UbzPh9T3tves4o7OwEZGFG8+V6dNLrd5dwByzS/s1rr1C3Wt1Y2Q== X-Received: by 10.223.161.213 with SMTP id v21mr22232118wrv.144.1489326868602; Sun, 12 Mar 2017 06:54:28 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id q75sm7507722wmd.27.2017.03.12.06.54.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Mar 2017 06:54:27 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Sun, 12 Mar 2017 13:54:26 +0000 Message-Id: <20170312135426.2216-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.11.0 Subject: [Intel-gfx] [PATCH] drm/i915: Inline gen6_sanitize_rps_pm_mask() 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 gen6_sanitize_rps_pm_mask() is small enough that inlining it shrinks the object code. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_irq.c | 5 ----- drivers/gpu/drm/i915/intel_drv.h | 8 +++++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 89ccf3e1fda5..b8a0afdc26a2 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -389,11 +389,6 @@ void gen6_enable_rps_interrupts(struct drm_i915_private *dev_priv) spin_unlock_irq(&dev_priv->irq_lock); } -u32 gen6_sanitize_rps_pm_mask(struct drm_i915_private *dev_priv, u32 mask) -{ - return (mask & ~dev_priv->rps.pm_intrmsk_mbz); -} - void gen6_disable_rps_interrupts(struct drm_i915_private *dev_priv) { if (!READ_ONCE(dev_priv->rps.interrupts_enabled)) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 578f7d20501f..4e38682d22b5 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1188,7 +1188,13 @@ void gen6_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask); void gen6_reset_rps_interrupts(struct drm_i915_private *dev_priv); void gen6_enable_rps_interrupts(struct drm_i915_private *dev_priv); void gen6_disable_rps_interrupts(struct drm_i915_private *dev_priv); -u32 gen6_sanitize_rps_pm_mask(struct drm_i915_private *dev_priv, u32 mask); + +static inline u32 gen6_sanitize_rps_pm_mask(struct drm_i915_private *i915, + u32 mask) +{ + return mask & ~i915->rps.pm_intrmsk_mbz; +} + void intel_runtime_pm_disable_interrupts(struct drm_i915_private *dev_priv); void intel_runtime_pm_enable_interrupts(struct drm_i915_private *dev_priv); static inline bool intel_irqs_enabled(struct drm_i915_private *dev_priv)