From: Andi Shyti <andi.shyti@intel.com>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Joonas Lahtinen <joonas.lahtinen@intel.com>
Subject: [Intel-gfx] [PATCH] drm/i915/gt: Replace I915_READ with intel_uncore_read
Date: Thu, 5 Dec 2019 18:24:28 +0200 [thread overview]
Message-ID: <20191205162428.1503-1-andi.shyti@intel.com> (raw)
Get rid of the last remaining I915_READ in gt/ and make gt-land
the first I915_READ-free happy island.
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Andi Shyti <andi.shyti@intel.com>
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index df3369c3f330..4da53aa3d8e2 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -155,6 +155,7 @@ static const struct engine_info intel_engines[] = {
*/
u32 intel_engine_context_size(struct drm_i915_private *dev_priv, u8 class)
{
+ struct intel_uncore *uncore = &dev_priv->uncore;
u32 cxt_size;
BUILD_BUG_ON(I915_GTT_PAGE_SIZE != PAGE_SIZE);
@@ -178,11 +179,11 @@ u32 intel_engine_context_size(struct drm_i915_private *dev_priv, u8 class)
if (IS_HASWELL(dev_priv))
return HSW_CXT_TOTAL_SIZE;
- cxt_size = I915_READ(GEN7_CXT_SIZE);
+ ctx_size = intel_uncore_read(uncore, GEN7_CXT_SIZE);
return round_up(GEN7_CXT_TOTAL_SIZE(cxt_size) * 64,
PAGE_SIZE);
case 6:
- cxt_size = I915_READ(CXT_SIZE);
+ ctx_size = intel_uncore_read(uncore, CXT_SIZE);
return round_up(GEN6_CXT_TOTAL_SIZE(cxt_size) * 64,
PAGE_SIZE);
case 5:
@@ -197,7 +198,7 @@ u32 intel_engine_context_size(struct drm_i915_private *dev_priv, u8 class)
* minimum allocation anyway so it should all come
* out in the wash.
*/
- cxt_size = I915_READ(CXT_SIZE) + 1;
+ ctx_size = intel_uncore_read(uncore, CXT_SIZE) + 1;
DRM_DEBUG_DRIVER("gen%d CXT_SIZE = %d bytes [0x%08x]\n",
INTEL_GEN(dev_priv),
cxt_size * 64,
--
2.24.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2019-12-05 16:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 16:24 Andi Shyti [this message]
2019-12-05 16:44 ` [Intel-gfx] [PATCH] drm/i915/gt: Replace I915_READ with intel_uncore_read Chris Wilson
2019-12-05 18:33 ` Chris Wilson
2019-12-05 18:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Replace I915_READ with intel_uncore_read (rev2) Patchwork
2019-12-06 0:05 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2019-12-07 13:23 ` [Intel-gfx] [PATCH] drm/i915/gt: Replace I915_READ with intel_uncore_read kbuild test robot
2019-12-07 22:53 ` kbuild test robot
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=20191205162428.1503-1-andi.shyti@intel.com \
--to=andi.shyti@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@intel.com \
/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 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.