Skip to content

Commit c5741c5

Browse files
committed
drm/i915/display: Do not use stolen on MTL
Use smem on MTL due to a HW bug in MTL that prevents reading from stolen memory using LMEM BAR. v2 and v3: improve stolen skip detection(Andrzej) Cc: Oak Zeng <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Andi Shyti <[email protected]> Cc: Andrzej Hajda <[email protected]> Signed-off-by: Nirmoy Das <[email protected]> Reviewed-by: Oak Zeng <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 290d161 commit c5741c5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

drivers/gpu/drm/i915/display/intel_fbdev.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
182182
* If the FB is too big, just don't use it since fbdev is not very
183183
* important and we should probably use that space with FBC or other
184184
* features.
185+
*
186+
* Also skip stolen on MTL as Wa_22018444074 mitigation.
185187
*/
186-
if (size * 2 < dev_priv->dsm.usable_size)
188+
if (!(IS_METEORLAKE(dev_priv)) && size * 2 < dev_priv->dsm.usable_size)
187189
obj = i915_gem_object_create_stolen(dev_priv, size);
188190
if (IS_ERR(obj))
189191
obj = i915_gem_object_create_shmem(dev_priv, size);

drivers/gpu/drm/i915/display/intel_overlay.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,11 +1348,12 @@ int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data,
13481348
static int get_registers(struct intel_overlay *overlay, bool use_phys)
13491349
{
13501350
struct drm_i915_private *i915 = overlay->i915;
1351-
struct drm_i915_gem_object *obj;
1351+
struct drm_i915_gem_object *obj = ERR_PTR(-ENODEV);
13521352
struct i915_vma *vma;
13531353
int err;
13541354

1355-
obj = i915_gem_object_create_stolen(i915, PAGE_SIZE);
1355+
if (!IS_METEORLAKE(i915)) /* Wa_22018444074 */
1356+
obj = i915_gem_object_create_stolen(i915, PAGE_SIZE);
13561357
if (IS_ERR(obj))
13571358
obj = i915_gem_object_create_internal(i915, PAGE_SIZE);
13581359
if (IS_ERR(obj))

0 commit comments

Comments
 (0)