From patchwork Fri Nov 4 14:42:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9412681 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 4F02E60722 for ; Fri, 4 Nov 2016 14:43:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4262F2B187 for ; Fri, 4 Nov 2016 14:43:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3746F2B18F; Fri, 4 Nov 2016 14:43:08 +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 E3F942B187 for ; Fri, 4 Nov 2016 14:43:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 097996E9B6; Fri, 4 Nov 2016 14:43:07 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FAFC6E9AE for ; Fri, 4 Nov 2016 14:43:05 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id u144so4248254wmu.0 for ; Fri, 04 Nov 2016 07:43:05 -0700 (PDT) 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:in-reply-to:references; bh=BNu/nXSSt67THa3dwl1g77nwtycM49LAAQEiC33QbiA=; b=ZXzJ2wPfrXPvjfwqwJ4VrdIO232jT3Pe7bBW1I6fao/JhCBGQrzjbENogTjogtP4Lp Y1AU6Zb8CJnT0m+UC9dgwZXaXWE6JAaWdsv2Is6iDbMGTK2kppxk8nLzDRPKxtABrywN 5b1y+eU3mq1l2cCdf8o6eFepVixzVeAPc5TSZt2aXdM8gIkcgtZH0SObdKWwIOfD/NyH UcLvLvI8BaTr1qYP+FTfrvaI2+emLAYN198HViuPFu3SJIKJCeLnFnbsszQWD9950LIM P6pzt/wdGE86Sg59az8I1s6to8vx50Btw9wzaZuUhR3PeZtVfN5ZybKTz4Zu5GkGa2+v RrKA== 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:in-reply-to :references; bh=BNu/nXSSt67THa3dwl1g77nwtycM49LAAQEiC33QbiA=; b=G0nRWrErdEby9indpvqg+vdFpITQvvFDKw/Kw7KW8bvueFnsdE1KTin2iUonzeuDGf KyingTHbDuH8wy5qRCc9ZcwDVKW2iqP8NSR70EBUi6db+Xvvj5CzFvrTBXl0dyJcaVua 3pSzaDhgtH7BNkS80LS5Wk5cqqsL6/vHXS1DQUryiNA73L+qhgHQ3F+cQ884YfAx3nuz 1duV5ZI1DkTIRRTnh92S2/j2ilkPkBh1UGVL3yTm5av0ZW3MmntKQCINTOONB9RxYDd2 tGxLGDGCEDnWPSY+fGAlaokPMos9mcqqqweDTfvmsW7h0zIh+INgl0tn/q5c8GSbFFq1 AilA== X-Gm-Message-State: ABUngvcAafyMdz3hxgoVf4Xd0G7Kwk8/1R6Ap7CfqSZN/yuYLt5f5CI6hC6kOuAVKylhyg== X-Received: by 10.28.46.202 with SMTP id u193mr3649691wmu.53.1478270583726; Fri, 04 Nov 2016 07:43:03 -0700 (PDT) Received: from t460p.Home ([2a02:c7d:9bd6:b000:f37e:1e07:a7d8:46cd]) by smtp.gmail.com with ESMTPSA id hb5sm14618791wjc.5.2016.11.04.07.43.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Nov 2016 07:43:03 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Fri, 4 Nov 2016 14:42:48 +0000 Message-Id: <1478270568-7902-6-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1478270568-7902-1-git-send-email-tvrtko.ursulin@linux.intel.com> References: <1478270568-7902-1-git-send-email-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH 5/5] drm/i915: Convert i915_drv.c to INTEL_GEN 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 Signed-off-by: Tvrtko Ursulin Reviewed-by: David Weinehall --- drivers/gpu/drm/i915/i915_drv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 35940192e569..096c368bda0b 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -374,12 +374,12 @@ static int intel_alloc_mchbar_resource(struct drm_device *dev) { struct drm_i915_private *dev_priv = to_i915(dev); - int reg = INTEL_INFO(dev)->gen >= 4 ? MCHBAR_I965 : MCHBAR_I915; + int reg = INTEL_GEN(dev_priv) >= 4 ? MCHBAR_I965 : MCHBAR_I915; u32 temp_lo, temp_hi = 0; u64 mchbar_addr; int ret; - if (INTEL_INFO(dev)->gen >= 4) + if (INTEL_GEN(dev_priv) >= 4) pci_read_config_dword(dev_priv->bridge_dev, reg + 4, &temp_hi); pci_read_config_dword(dev_priv->bridge_dev, reg, &temp_lo); mchbar_addr = ((u64)temp_hi << 32) | temp_lo; @@ -406,7 +406,7 @@ intel_alloc_mchbar_resource(struct drm_device *dev) return ret; } - if (INTEL_INFO(dev)->gen >= 4) + if (INTEL_GEN(dev_priv) >= 4) pci_write_config_dword(dev_priv->bridge_dev, reg + 4, upper_32_bits(dev_priv->mch_res.start)); @@ -420,7 +420,7 @@ static void intel_setup_mchbar(struct drm_device *dev) { struct drm_i915_private *dev_priv = to_i915(dev); - int mchbar_reg = INTEL_INFO(dev)->gen >= 4 ? MCHBAR_I965 : MCHBAR_I915; + int mchbar_reg = INTEL_GEN(dev_priv) >= 4 ? MCHBAR_I965 : MCHBAR_I915; u32 temp; bool enabled; @@ -460,7 +460,7 @@ static void intel_teardown_mchbar(struct drm_device *dev) { struct drm_i915_private *dev_priv = to_i915(dev); - int mchbar_reg = INTEL_INFO(dev)->gen >= 4 ? MCHBAR_I965 : MCHBAR_I915; + int mchbar_reg = INTEL_GEN(dev_priv) >= 4 ? MCHBAR_I965 : MCHBAR_I915; if (dev_priv->mchbar_need_disable) { if (IS_I915G(dev_priv) || IS_I915GM(dev_priv)) { @@ -879,7 +879,7 @@ static int i915_mmio_setup(struct drm_device *dev) * the register BAR remains the same size for all the earlier * generations up to Ironlake. */ - if (INTEL_INFO(dev)->gen < 5) + if (INTEL_GEN(dev_priv) < 5) mmio_size = 512 * 1024; else mmio_size = 2 * 1024 * 1024; @@ -1512,7 +1512,7 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation) * Fujitsu FSC S7110 * Acer Aspire 1830T */ - if (!(hibernation && INTEL_INFO(dev_priv)->gen < 6)) + if (!(hibernation && INTEL_GEN(dev_priv) < 6)) pci_set_power_state(pdev, PCI_D3hot); dev_priv->suspended_to_idle = suspend_to_idle(dev_priv);