All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Make GEN macros more similar
@ 2018-11-01  8:35 Lucas De Marchi
  2018-11-01  8:35 ` [PATCH 1/5] drm/i915: let IS_GEN receive 1 or 2 arguments Lucas De Marchi
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Lucas De Marchi @ 2018-11-01  8:35 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rodrigo Vivi

Jani, Rodrigo, Tvrtko (an whoever jumps in): continuing our conversation
here with the real patches so we can debate what's better looking to
the implementation.

I generated these patches with the following options:

- Let IS_GEN() receive 1 or 2 args (besides dev_priv)
  and use that to compare a single gen in the first case
  or a range. The idea is that IS_GEN(dev_priv, 4) can be
  seen as a shortcut to IS_GEN(dev_priv, 4, 4)
- Replace IS_GEN<n> with the new macro
- Check some cases in which we could be checking a range
  rather than manual comparisons

Last 2 patches is an attempt to convert cases in which we
can't use IS_GEN and we resort to INTEL_GEN(dev_priv) to
know if it's equal, greater than (gt), greater or equal (ge),
less than (lt) or less or equal (le).  Actually I have mixed feelings
on converting them and maybe we should just let them as is.

Let me know what you think.

thanks
Lucas De Marchi

Lucas De Marchi (5):
  drm/i915: let IS_GEN receive 1 or 2 arguments
  drm/i915: replace IS_GEN<N> with IS_GEN(..., N)
  drm/i915: merge gen checks to use range
  drm/i915: add helper IS_GEN_* macros
  RFC: drm/i915: convert a few cases to the helper IS_GEN_* macros

 drivers/gpu/drm/i915/gvt/vgpu.c            |   4 +-
 drivers/gpu/drm/i915/i915_cmd_parser.c     |   2 +-
 drivers/gpu/drm/i915/i915_debugfs.c        |  42 ++++----
 drivers/gpu/drm/i915/i915_drv.c            |  18 ++--
 drivers/gpu/drm/i915/i915_drv.h            |  23 ++--
 drivers/gpu/drm/i915/i915_gem.c            |  12 +--
 drivers/gpu/drm/i915/i915_gem_context.c    |   2 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |   4 +-
 drivers/gpu/drm/i915/i915_gem_fence_reg.c  |  10 +-
 drivers/gpu/drm/i915/i915_gem_gtt.c        |   8 +-
 drivers/gpu/drm/i915/i915_gem_stolen.c     |   7 +-
 drivers/gpu/drm/i915/i915_gem_tiling.c     |   4 +-
 drivers/gpu/drm/i915/i915_gpu_error.c      |  18 ++--
 drivers/gpu/drm/i915/i915_irq.c            |  30 +++---
 drivers/gpu/drm/i915/i915_perf.c           |   4 +-
 drivers/gpu/drm/i915/i915_reg.h            |   4 +-
 drivers/gpu/drm/i915/i915_suspend.c        |  12 +--
 drivers/gpu/drm/i915/intel_atomic.c        |   2 +-
 drivers/gpu/drm/i915/intel_audio.c         |   2 +-
 drivers/gpu/drm/i915/intel_cdclk.c         |  12 +--
 drivers/gpu/drm/i915/intel_crt.c           |   6 +-
 drivers/gpu/drm/i915/intel_ddi.c           |   2 +-
 drivers/gpu/drm/i915/intel_device_info.c   |  16 +--
 drivers/gpu/drm/i915/intel_display.c       | 116 ++++++++++-----------
 drivers/gpu/drm/i915/intel_dp.c            |  32 +++---
 drivers/gpu/drm/i915/intel_engine_cs.c     |   4 +-
 drivers/gpu/drm/i915/intel_fbc.c           |  24 ++---
 drivers/gpu/drm/i915/intel_fifo_underrun.c |   6 +-
 drivers/gpu/drm/i915/intel_guc_fw.c        |   2 +-
 drivers/gpu/drm/i915/intel_hangcheck.c     |   2 +-
 drivers/gpu/drm/i915/intel_i2c.c           |   2 +-
 drivers/gpu/drm/i915/intel_lrc.c           |   6 +-
 drivers/gpu/drm/i915/intel_lvds.c          |   4 +-
 drivers/gpu/drm/i915/intel_mocs.c          |   4 +-
 drivers/gpu/drm/i915/intel_overlay.c       |  10 +-
 drivers/gpu/drm/i915/intel_panel.c         |   8 +-
 drivers/gpu/drm/i915/intel_pipe_crc.c      |   8 +-
 drivers/gpu/drm/i915/intel_pm.c            |  86 +++++++--------
 drivers/gpu/drm/i915/intel_psr.c           |  10 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c    |  28 ++---
 drivers/gpu/drm/i915/intel_ringbuffer.h    |   4 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c    |   2 +-
 drivers/gpu/drm/i915/intel_sprite.c        |  14 +--
 drivers/gpu/drm/i915/intel_uc.c            |   2 +-
 drivers/gpu/drm/i915/intel_uncore.c        |  22 ++--
 drivers/gpu/drm/i915/intel_wopcm.c         |   4 +-
 46 files changed, 328 insertions(+), 316 deletions(-)

--
2.19.1.1.g56c4683e68

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2018-11-02 22:47 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-01  8:35 [PATCH 0/5] Make GEN macros more similar Lucas De Marchi
2018-11-01  8:35 ` [PATCH 1/5] drm/i915: let IS_GEN receive 1 or 2 arguments Lucas De Marchi
2018-11-01  8:35 ` [PATCH 2/5] drm/i915: replace IS_GEN<N> with IS_GEN(..., N) Lucas De Marchi
2018-11-01 11:17   ` Jani Nikula
2018-11-01 13:27     ` Ville Syrjälä
2018-11-01 11:35   ` Tvrtko Ursulin
2018-11-01 17:00     ` Lucas De Marchi
2018-11-01  8:35 ` [PATCH 3/5] drm/i915: merge gen checks to use range Lucas De Marchi
2018-11-01 11:18   ` Jani Nikula
2018-11-01 11:31   ` Tvrtko Ursulin
2018-11-02 18:10     ` Lucas De Marchi
2018-11-02 19:19       ` Rodrigo Vivi
2018-11-02 19:47         ` Lucas De Marchi
2018-11-02 22:12           ` Rodrigo Vivi
2018-11-02 22:28             ` Lucas De Marchi
2018-11-02 22:47               ` Rodrigo Vivi
2018-11-01  8:35 ` [PATCH 4/5] drm/i915: add helper IS_GEN_* macros Lucas De Marchi
2018-11-01 11:04   ` Tvrtko Ursulin
2018-11-01 11:29     ` Jani Nikula
2018-11-01  8:35 ` [PATCH 5/5] RFC: drm/i915: convert a few cases to the " Lucas De Marchi
2018-11-01  9:30 ` ✗ Fi.CI.CHECKPATCH: warning for Make GEN macros more similar Patchwork
2018-11-01  9:32 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-01  9:57 ` ✗ Fi.CI.BAT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.