intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 0/3] drm/i915: use INTEL_GEN(dev_priv) wherever possible
Date: Mon, 12 Sep 2016 20:20:00 +0100	[thread overview]
Message-ID: <1473708003-17327-1-git-send-email-david.s.gordon@intel.com> (raw)

Wherever we find "INTEL_INFO(dev)->gen", and have a suitable
"dev_priv" in scope, replace it with "INTEL_GEN(dev_priv)",
which is the preferred wasy to access this device property.

This is mostly achieved automatically by the following Coccinelle
script, with a little manual postprocessing of a few files.

@dev_priv_param@
function FUNC;
idexpression struct drm_device *DEV;
identifier DEV_PRIV;
@@
FUNC(..., struct drm_i915_private *DEV_PRIV, ...)
{
    <...
-   INTEL_INFO(DEV)->gen
+   INTEL_GEN(DEV_PRIV)
    ...>
}

@dev_priv_local@
idexpression struct drm_device *DEV;
identifier DEV_PRIV;
expression E;
@@
{
    ...
(
    struct drm_i915_private *DEV_PRIV;
|
    struct drm_i915_private *DEV_PRIV = E;
)
    <...
-   INTEL_INFO(DEV)->gen
+   INTEL_GEN(DEV_PRIV)
    ...>
}

Patch 1 covers those that were purely autoconverted, patch 2
deals with those that needed a little manual tweaking, and
patch 3 is just intel_display.c separated out 'cos it's huge.

Dave Gordon (3):
  drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen
  drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen (part 2)
  drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen (part 3)

 drivers/gpu/drm/i915/i915_gem.c            |   4 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |   6 +-
 drivers/gpu/drm/i915/i915_gem_fence.c      |   9 ++-
 drivers/gpu/drm/i915/i915_gem_gtt.c        |   4 +-
 drivers/gpu/drm/i915/i915_gem_stolen.c     |   6 +-
 drivers/gpu/drm/i915/i915_gpu_error.c      |  14 ++--
 drivers/gpu/drm/i915/i915_irq.c            |  12 ++--
 drivers/gpu/drm/i915/i915_suspend.c        |  12 ++--
 drivers/gpu/drm/i915/intel_color.c         |   2 +-
 drivers/gpu/drm/i915/intel_crt.c           |   6 +-
 drivers/gpu/drm/i915/intel_ddi.c           |   4 +-
 drivers/gpu/drm/i915/intel_display.c       | 107 ++++++++++++++---------------
 drivers/gpu/drm/i915/intel_dp.c            |  14 ++--
 drivers/gpu/drm/i915/intel_dpll_mgr.c      |   2 +-
 drivers/gpu/drm/i915/intel_lvds.c          |   4 +-
 drivers/gpu/drm/i915/intel_pm.c            |  18 ++---
 drivers/gpu/drm/i915/intel_psr.c           |   4 +-
 drivers/gpu/drm/i915/intel_sdvo.c          |   8 +--
 drivers/gpu/drm/i915/intel_tv.c            |   2 +-
 19 files changed, 118 insertions(+), 120 deletions(-)

-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2016-09-12 19:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 19:20 Dave Gordon [this message]
2016-09-12 19:20 ` [PATCH 1/3] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen Dave Gordon
2016-09-12 19:20 ` [PATCH 2/3] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen (part 2) Dave Gordon
2016-09-12 19:20 ` [PATCH 3/3] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen (part 3) Dave Gordon
2016-09-12 19:50 ` ✓ Fi.CI.BAT: success for drm/i915: use INTEL_GEN(dev_priv) wherever possible Patchwork

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=1473708003-17327-1-git-send-email-david.s.gordon@intel.com \
    --to=david.s.gordon@intel.com \
    --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).