public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Cc: Matthew Auld <matthew.auld@intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>
Subject: [Intel-gfx] [PATCH 1/3] drm/i915: Exclude reserved stolen from driver use
Date: Wed,  8 Dec 2021 20:27:58 +0530	[thread overview]
Message-ID: <20211208145800.27246-2-ramalingam.c@intel.com> (raw)
In-Reply-To: <20211208145800.27246-1-ramalingam.c@intel.com>

From: Chris Wilson <chris@chris-wilson.co.uk>

Remove the portion of stolen memory reserved for private use from driver
access.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index bce03d74a0b4..6ea3ca21cdf3 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -488,6 +488,9 @@ static int i915_gem_init_stolen(struct intel_memory_region *mem)
 		return 0;
 	}
 
+	/* Exclude the reserved region from driver use */
+	mem->region.end = reserved_base - 1;
+
 	/* It is possible for the reserved area to end before the end of stolen
 	 * memory, so just consider the start. */
 	reserved_total = stolen_top - reserved_base;
-- 
2.20.1


  reply	other threads:[~2021-12-08 14:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 14:57 [Intel-gfx] [PATCH 0/3] drm/i915: Sanity Check for device memory region Ramalingam C
2021-12-08 14:57 ` Ramalingam C [this message]
2021-12-08 15:18   ` [Intel-gfx] [PATCH 1/3] drm/i915: Exclude reserved stolen from driver use Andi Shyti
2021-12-08 15:20   ` Andi Shyti
2021-12-08 14:57 ` [Intel-gfx] [PATCH 2/3] drm/i915: Sanitycheck device iomem on probe Ramalingam C
2021-12-08 15:23   ` Andi Shyti
2021-12-08 15:39     ` Ramalingam C
2021-12-08 14:58 ` [Intel-gfx] [PATCH 3/3] drm/i915: Test all device memory on probing Ramalingam C
2021-12-08 15:26   ` Andi Shyti
  -- strict thread matches above, loose matches on Subject: below --
2021-12-08 15:34 [Intel-gfx] [PATCH 0/3] drm/i915: Sanity Check for device memory region Ramalingam C
2021-12-08 15:34 ` [Intel-gfx] [PATCH 1/3] drm/i915: Exclude reserved stolen from driver use Ramalingam C

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=20211208145800.27246-2-ramalingam.c@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox