diff mbox series

[1/2] drm/i915: add back GEN12_BDSM_MASK

Message ID 20221005153148.758822-1-matthew.auld@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915: add back GEN12_BDSM_MASK | expand

Commit Message

Matthew Auld Oct. 5, 2022, 3:31 p.m. UTC
The mask was added in commit e5f415bfc5c2 ("drm/i915: Add missing mask
when reading GEN12_DSMBASE"), but then looks to be dropped in some
unrelated code movement in commit dbb2ffbfd708 ("drm/i915/mtl: enable
local stolen memory") without explanation. Add it back.

Fixes: dbb2ffbfd708 ("drm/i915/mtl: enable local stolen memory")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lucas De Marchi Oct. 5, 2022, 4:22 p.m. UTC | #1
On Wed, Oct 05, 2022 at 04:31:47PM +0100, Matthew Auld wrote:
>The mask was added in commit e5f415bfc5c2 ("drm/i915: Add missing mask
>when reading GEN12_DSMBASE"), but then looks to be dropped in some
>unrelated code movement in commit dbb2ffbfd708 ("drm/i915/mtl: enable
>local stolen memory") without explanation. Add it back.
>
>Fixes: dbb2ffbfd708 ("drm/i915/mtl: enable local stolen memory")
>Signed-off-by: Matthew Auld <matthew.auld@intel.com>
>Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
>Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>Cc: Matt Roper <matthew.d.roper@intel.com>


Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

Lucas De Marchi

>---
> drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
>index 910086974454..2c4922961f33 100644
>--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
>+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
>@@ -910,7 +910,7 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, u16 type,
> 		GEM_BUG_ON((dsm_size + SZ_8M) > lmem_size);
> 	} else {
> 		/* Use DSM base address instead for stolen memory */
>-		dsm_base = intel_uncore_read64(uncore, GEN12_DSMBASE);
>+		dsm_base = intel_uncore_read64(uncore, GEN12_DSMBASE) & GEN12_BDSM_MASK;
> 		if (WARN_ON(lmem_size < dsm_base))
> 			return ERR_PTR(-ENODEV);
> 		dsm_size = lmem_size - dsm_base;
>-- 
>2.37.3
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index 910086974454..2c4922961f33 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -910,7 +910,7 @@  i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, u16 type,
 		GEM_BUG_ON((dsm_size + SZ_8M) > lmem_size);
 	} else {
 		/* Use DSM base address instead for stolen memory */
-		dsm_base = intel_uncore_read64(uncore, GEN12_DSMBASE);
+		dsm_base = intel_uncore_read64(uncore, GEN12_DSMBASE) & GEN12_BDSM_MASK;
 		if (WARN_ON(lmem_size < dsm_base))
 			return ERR_PTR(-ENODEV);
 		dsm_size = lmem_size - dsm_base;