All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Larumbe <adrian.larumbe@collabora.com>
To: daniel@ffwll.ch, thomas.hellstrom@linux.intel.com,
	intel-gfx@lists.freedesktop.org
Cc: adrian.larumbe@collabora.com
Subject: [Intel-gfx] [PATCH 2/7] drm/i915: limit ttm to dma32 for i965G[M]
Date: Tue,  2 Aug 2022 17:51:50 +0100	[thread overview]
Message-ID: <20220802165155.165576-3-adrian.larumbe@collabora.com> (raw)
In-Reply-To: <20220802165155.165576-1-adrian.larumbe@collabora.com>

From: Robert Beckett <bob.beckett@collabora.com>

i965G[M] cannot relocate objects above 4GiB.
Ensure ttm uses dma32 on these systems.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_region_ttm.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_region_ttm.c b/drivers/gpu/drm/i915/intel_region_ttm.c
index 575d67bc6ffe..88b525f9bb2d 100644
--- a/drivers/gpu/drm/i915/intel_region_ttm.c
+++ b/drivers/gpu/drm/i915/intel_region_ttm.c
@@ -32,10 +32,15 @@
 int intel_region_ttm_device_init(struct drm_i915_private *dev_priv)
 {
 	struct drm_device *drm = &dev_priv->drm;
+	bool use_dma32 = false;
+
+	/* i965g[m] cannot relocate objects above 4GiB. */
+	if (IS_I965GM(dev_priv) || IS_I965G(dev_priv))
+		use_dma32 = true;
 
 	return ttm_device_init(&dev_priv->bdev, i915_ttm_driver(),
 			       drm->dev, drm->anon_inode->i_mapping,
-			       drm->vma_offset_manager, false, false);
+			       drm->vma_offset_manager, false, use_dma32);
 }
 
 /**
-- 
2.37.0


  parent reply	other threads:[~2022-08-02 16:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 16:51 [Intel-gfx] [PATCH 0/6] Enable TTM for integrated GFX objects in sysmem Adrian Larumbe
2022-08-02 16:51 ` [Intel-gfx] [PATCH 1/7] drm/i915/ttm: dont trample cache_level overrides during ttm move Adrian Larumbe
2022-08-02 16:51 ` Adrian Larumbe [this message]
2022-08-02 16:51 ` [Intel-gfx] [PATCH 3/7] drm/i915/ttm: only trust snooping for dgfx when deciding default cache_level Adrian Larumbe
2022-08-02 16:51 ` [Intel-gfx] [PATCH 4/7] drm/i915/ttm: don't overwrite cache_dirty after setting coherency Adrian Larumbe
2022-08-02 16:51 ` [Intel-gfx] [PATCH 5/7] drm/i915: Pick the right memory allocation flags for older devices Adrian Larumbe
2022-08-02 16:51 ` [Intel-gfx] [PATCH 6/7] drm/i915: Add module param for enabling TTM in sysmem region Adrian Larumbe
2022-08-03 14:22   ` Jani Nikula
2022-08-09 15:50     ` Adrian Larumbe
2022-08-09 16:50       ` Jani Nikula
2022-08-02 16:51 ` [Intel-gfx] [PATCH 7/7] drm/i915: Optionally manage system memory with TTM and poolalloc Adrian Larumbe
2022-08-02 17:27 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Enable TTM for integrated GFX objects in sysmem Patchwork
2022-08-02 17:27 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-08-02 17:49 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " 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=20220802165155.165576-3-adrian.larumbe@collabora.com \
    --to=adrian.larumbe@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.hellstrom@linux.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.