All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Gupta <anshuman.gupta@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Andi Shyti <andi.shyti@intel.com>,
	jani.nikula@intel.com, rodrigo.vivi@intel.com
Subject: [Intel-gfx] [PATCH v3 8/9] drm/i915/xehpsdv: Store lmem region in gt
Date: Fri, 24 Jun 2022 21:29:21 +0530	[thread overview]
Message-ID: <20220624155922.7435-9-anshuman.gupta@intel.com> (raw)
In-Reply-To: <20220624155922.7435-1-anshuman.gupta@intel.com>

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Store a pointer to respective local memory region in intel_gt so it can be
used when memory local to a GT needs to be allocated.

v2:
- Use forward decalaration instead of heder file. [Jani]

Cc: Andi Shyti <andi.shyti@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt.c       | 1 +
 drivers/gpu/drm/i915/gt/intel_gt_types.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
index 8da3314bb6bf..48f509810f66 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -93,6 +93,7 @@ static int intel_gt_probe_lmem(struct intel_gt *gt)
 	GEM_BUG_ON(!HAS_REGION(i915, id));
 	GEM_BUG_ON(i915->mm.regions[id]);
 	i915->mm.regions[id] = mem;
+	gt->lmem = mem;
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h b/drivers/gpu/drm/i915/gt/intel_gt_types.h
index df708802889d..37e7716a76ca 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h
@@ -34,6 +34,7 @@ struct drm_i915_private;
 struct i915_ggtt;
 struct intel_engine_cs;
 struct intel_uncore;
+struct intel_memory_region;
 
 struct intel_mmio_range {
 	u32 start;
@@ -202,6 +203,8 @@ struct intel_gt {
 	 */
 	phys_addr_t phys_addr;
 
+	struct intel_memory_region *lmem;
+
 	struct intel_gt_info {
 		unsigned int id;
 
-- 
2.26.2


  parent reply	other threads:[~2022-06-24 16:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 15:59 [Intel-gfx] [PATCH v3 0/9] DG2 VRAM_SR Support Anshuman Gupta
2022-06-24 15:59 ` [Intel-gfx] [PATCH v3 1/9] drm/i915/dgfx: OpRegion VRAM Self Refresh Support Anshuman Gupta
2022-06-24 15:59 ` [Intel-gfx] [PATCH v3 2/9] drm/i915/dg1: OpRegion PCON DG1 MBD config support Anshuman Gupta
2022-06-24 15:59 ` [Intel-gfx] [PATCH v3 3/9] drm/i915/dg2: Add DG2_NB_MBD subplatform Anshuman Gupta
2022-06-24 15:59 ` [Intel-gfx] [PATCH v3 4/9] drm/i915/dg2: DG2 MBD config Anshuman Gupta
2022-06-24 15:59 ` [Intel-gfx] [PATCH v3 5/9] drm/i915/dgfx: Add has_lmem_sr Anshuman Gupta
2022-06-24 15:59 ` [Intel-gfx] [PATCH v3 6/9] drm/i915/dgfx: Setup VRAM SR with D3COLD Anshuman Gupta
2022-06-24 15:59 ` [Intel-gfx] [PATCH v3 7/9] Drm/i915/rpm: Enable D3Cold VRAM SR Support Anshuman Gupta
2022-06-24 15:59 ` Anshuman Gupta [this message]
2022-06-24 15:59 ` [Intel-gfx] [PATCH v3 9/9] drm/i915/rpm: d3cold Policy Anshuman Gupta
2022-06-24 16:28 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for DG2 VRAM_SR Support (rev4) 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=20220624155922.7435-9-anshuman.gupta@intel.com \
    --to=anshuman.gupta@intel.com \
    --cc=andi.shyti@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=rodrigo.vivi@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.