From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/5] drm/i915: Convert i915_drv.c to INTEL_GEN
Date: Fri, 4 Nov 2016 14:42:48 +0000 [thread overview]
Message-ID: <1478270568-7902-6-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1478270568-7902-1-git-send-email-tvrtko.ursulin@linux.intel.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
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);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-11-04 14:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 14:42 [PATCH 0/5] dev_priv cleanup continuation Tvrtko Ursulin
2016-11-04 14:42 ` [PATCH 1/5] drm/i915: Assorted dev_priv cleanups Tvrtko Ursulin
2016-11-09 10:37 ` David Weinehall
2016-11-04 14:42 ` [PATCH 2/5] drm/i915: More assorted " Tvrtko Ursulin
2016-11-04 15:32 ` Ville Syrjälä
2016-11-04 16:03 ` Tvrtko Ursulin
2016-11-04 16:29 ` Ville Syrjälä
2016-11-07 9:29 ` [PATCH v2 " Tvrtko Ursulin
2016-11-09 10:38 ` David Weinehall
2016-11-04 14:42 ` [PATCH 3/5] drm/i915: Further " Tvrtko Ursulin
2016-11-09 10:38 ` David Weinehall
2016-11-04 14:42 ` [PATCH 4/5] drm/i915: Pass dev_priv to INTEL_INFO everywhere apart from the gen use Tvrtko Ursulin
2016-11-09 10:38 ` David Weinehall
2016-11-09 11:30 ` [PATCH v2 " Tvrtko Ursulin
2016-11-09 11:42 ` David Weinehall
2016-11-04 14:42 ` Tvrtko Ursulin [this message]
2016-11-09 10:39 ` [PATCH 5/5] drm/i915: Convert i915_drv.c to INTEL_GEN David Weinehall
2016-11-04 15:23 ` ✗ Fi.CI.BAT: failure for dev_priv cleanup continuation Patchwork
2016-11-07 10:45 ` ✓ Fi.CI.BAT: success for dev_priv cleanup continuation (rev2) Patchwork
2016-11-09 12:45 ` ✓ Fi.CI.BAT: success for dev_priv cleanup continuation (rev3) Patchwork
2016-11-10 9:42 ` Tvrtko Ursulin
2016-11-10 12:00 ` Joonas Lahtinen
2016-11-11 15:01 ` Tvrtko Ursulin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478270568-7902-6-git-send-email-tvrtko.ursulin@linux.intel.com \
--to=tursulin@ursulin.net \
--cc=Intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).