public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915: Replace "INTEL_INFO->gen == x" checks with IS_GENx
Date: Mon, 9 May 2016 15:18:07 +0100	[thread overview]
Message-ID: <57309C1F.7000404@intel.com> (raw)
In-Reply-To: <1462542231-7321-3-git-send-email-tvrtko.ursulin@linux.intel.com>

On 06/05/16 14:43, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> This way optimization from a previous patch works even better.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_debugfs.c     | 4 ++--
>   drivers/gpu/drm/i915/i915_dma.c         | 4 ++--
>   drivers/gpu/drm/i915/i915_drv.c         | 2 +-
>   drivers/gpu/drm/i915/i915_drv.h         | 2 +-
>   drivers/gpu/drm/i915/i915_gem.c         | 2 +-
>   drivers/gpu/drm/i915/i915_gem_gtt.c     | 2 +-
>   drivers/gpu/drm/i915/i915_gem_stolen.c  | 2 +-
>   drivers/gpu/drm/i915/i915_gem_tiling.c  | 2 +-
>   drivers/gpu/drm/i915/i915_gpu_error.c   | 2 +-
>   drivers/gpu/drm/i915/i915_irq.c         | 4 ++--
>   drivers/gpu/drm/i915/intel_display.c    | 2 +-
>   drivers/gpu/drm/i915/intel_lrc.c        | 4 ++--
>   drivers/gpu/drm/i915/intel_lvds.c       | 2 +-
>   drivers/gpu/drm/i915/intel_pm.c         | 4 ++--
>   drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++---
>   15 files changed, 22 insertions(+), 22 deletions(-)

This looked a very small list, I thought, and then realised you've only 
changed tests-for-equality. There are a *far* greater number of tests 
for inequality!

These are the numbers I got for converting *all* instances of 
INTEL_INFO()->gen ...

  i915/i915_debugfs.c          |  68 ++++++-------
  i915/i915_dma.c              |  20 ++--
  i915/i915_drv.c              |   8 +-
  i915/i915_drv.h              |  42 ++++----
  i915/i915_gem.c              |  18 ++--
  i915/i915_gem_context.c      |  14 +--
  i915/i915_gem_execbuffer.c   |  18 ++--
  i915/i915_gem_fence.c        |   8 +-
  i915/i915_gem_gtt.c          |  36 +++----
  i915/i915_gem_render_state.c |   2 +-
  i915/i915_gem_stolen.c       |  10 +-
  i915/i915_gem_tiling.c       |  10 +-
  i915/i915_gpu_error.c        |  38 ++++----
  i915/i915_irq.c              |  72 +++++++-------
  i915/i915_suspend.c          |  20 ++--
  i915/i915_sysfs.c            |   2 +-
  i915/intel_audio.c           |   2 +-
  i915/intel_bios.c            |   2 +-
  i915/intel_color.c           |   2 +-
  i915/intel_crt.c             |   6 +-
  i915/intel_ddi.c             |  10 +-
  i915/intel_display.c         | 182 +++++++++++++++++------------------
  i915/intel_dp.c              |  30 +++---
  i915/intel_dpll_mgr.c        |   2 +-
  i915/intel_fbc.c             |  30 +++---
  i915/intel_guc_loader.c      |   2 +-
  i915/intel_hdmi.c            |   4 +-
  i915/intel_lrc.c             |  22 ++---
  i915/intel_lvds.c            |  14 +--
  i915/intel_mocs.c            |   2 +-
  i915/intel_overlay.c         |   4 +-
  i915/intel_panel.c           |  10 +-
  i915/intel_pm.c              |  68 ++++++-------
  i915/intel_psr.c             |  10 +-
  i915/intel_ringbuffer.c      |  50 +++++-----
  i915/intel_sdvo.c            |  10 +-
  i915/intel_sprite.c          |  12 +--
  i915/intel_tv.c              |   2 +-
  i915/intel_uncore.c          |  20 ++--

So if you want to convert the GEN info to a new representation, it 
should ideally be one that efficiently handles "up to N" and "from N 
onwards" as well as exact matches.

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

  parent reply	other threads:[~2016-05-09 14:20 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 13:43 [PATCH 1/3] drm/i915: Make IS_GENx macros work on a mask Tvrtko Ursulin
2016-05-06 13:43 ` [PATCH 2/3] drm/i915: Promote IS_BROADWELL to a simple macro Tvrtko Ursulin
2016-05-06 14:00   ` Ville Syrjälä
2016-05-06 14:18     ` Tvrtko Ursulin
2016-05-06 14:29       ` Ville Syrjälä
2016-05-06 14:44         ` Tvrtko Ursulin
2016-05-06 14:51           ` Chris Wilson
2016-05-06 14:58           ` Ville Syrjälä
2016-05-06 13:43 ` [PATCH 3/3] drm/i915: Replace "INTEL_INFO->gen == x" checks with IS_GENx Tvrtko Ursulin
2016-05-06 13:59   ` Chris Wilson
2016-05-06 14:16     ` Tvrtko Ursulin
2016-05-06 14:20       ` Tvrtko Ursulin
2016-05-09 14:18   ` Dave Gordon [this message]
2016-05-10  7:47   ` Jani Nikula
2016-05-06 14:16 ` [PATCH 1/2] drm/i915: Introduce INTEL_GEN_RANGE macro Tvrtko Ursulin
2016-05-06 14:16   ` [PATCH 2/2] drm/i915: Do not use a bitfield for INTEL_INFO->num_pipes Tvrtko Ursulin
2016-05-06 19:21     ` Dave Gordon
2016-05-06 14:33   ` [PATCH 1/2] drm/i915: Introduce INTEL_GEN_RANGE macro Chris Wilson
2016-05-06 19:11     ` Dave Gordon
2016-05-09 12:32       ` Jani Nikula
2016-05-09 14:26         ` Dave Gordon
2016-05-09 14:40           ` Jani Nikula
2016-05-09 15:23             ` Chris Wilson
2016-05-10  7:54               ` Jani Nikula
2016-05-06 14:28 ` [PATCH 1/3] drm/i915: Make IS_GENx macros work on a mask Chris Wilson
2016-05-06 14:36   ` Tvrtko Ursulin
2016-05-06 14:43     ` Chris Wilson

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=57309C1F.7000404@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