Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v4 2/4] drm/i915: Add _TRANS2()
Date: Wed, 17 Apr 2019 15:37:40 -0700	[thread overview]
Message-ID: <20190417223742.28246-2-jose.souza@intel.com> (raw)
In-Reply-To: <20190417223742.28246-1-jose.souza@intel.com>

A new macro that is going to be added in a further patch will need to
adjust the offset returned by _MMIO_TRANS2(), so here adding
_TRANS2() and moving most of the implementation of _MMIO_TRANS2() to
it and while at it taking the opportunity to rename pipe to trans.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index b74824f0b5b1..9ef306b79e0d 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -250,9 +250,10 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
 #define _MMIO_PIPE2(pipe, reg)		_MMIO(INTEL_INFO(dev_priv)->pipe_offsets[pipe] - \
 					      INTEL_INFO(dev_priv)->pipe_offsets[PIPE_A] + (reg) + \
 					      DISPLAY_MMIO_BASE(dev_priv))
-#define _MMIO_TRANS2(pipe, reg)		_MMIO(INTEL_INFO(dev_priv)->trans_offsets[(pipe)] - \
-					      INTEL_INFO(dev_priv)->trans_offsets[TRANSCODER_A] + (reg) + \
-					      DISPLAY_MMIO_BASE(dev_priv))
+#define _TRANS2(trans, reg)		(INTEL_INFO(dev_priv)->trans_offsets[(trans)] - \
+					 INTEL_INFO(dev_priv)->trans_offsets[TRANSCODER_A] + (reg) + \
+					 DISPLAY_MMIO_BASE(dev_priv))
+#define _MMIO_TRANS2(trans, reg)	_MMIO(_TRANS2(trans, reg))
 #define _CURSOR2(pipe, reg)		_MMIO(INTEL_INFO(dev_priv)->cursor_offsets[(pipe)] - \
 					      INTEL_INFO(dev_priv)->cursor_offsets[PIPE_A] + (reg) + \
 					      DISPLAY_MMIO_BASE(dev_priv))
-- 
2.21.0

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

  reply	other threads:[~2019-04-17 22:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17 22:37 [PATCH v4 1/4] drm/i915/bdw+: Move misc display IRQ handling to it own function José Roberto de Souza
2019-04-17 22:37 ` José Roberto de Souza [this message]
2019-04-18  4:09   ` [PATCH v4 2/4] drm/i915: Add _TRANS2() Dhinakaran Pandiyan
2019-04-22 22:05     ` Lucas De Marchi
2019-04-21  4:10   ` Pandiyan, Dhinakaran
2019-04-17 22:37 ` [PATCH v4 3/4] drm/i915: Make PSR registers relative to transcoders José Roberto de Souza
2019-04-19  2:04   ` Dhinakaran Pandiyan
2019-04-17 22:37 ` [PATCH v4 4/4] drm/i915: Add transcoder parameter to PSR registers macros José Roberto de Souza
2019-04-17 22:48 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v4,1/4] drm/i915/bdw+: Move misc display IRQ handling to it own function Patchwork
2019-04-17 22:51 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-04-17 23:10 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-18  3:50 ` [PATCH v4 1/4] " Dhinakaran Pandiyan
2019-04-18 12:16   ` Ville Syrjälä
2019-04-18  5:37 ` ✓ Fi.CI.IGT: success for series starting with [v4,1/4] " 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=20190417223742.28246-2-jose.souza@intel.com \
    --to=jose.souza@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