Skip to content

Commit 507f70c

Browse files
Radhakrishna Sripadagregkh
authored andcommitted
drm/i915/dpt: Use shmem for dpt objects
commit 3844ed5 upstream. Dpt objects that are created from internal get evicted when there is memory pressure and do not get restored when pinned during scanout. The pinned page table entries look corrupted and programming the display engine with the incorrect pte's result in DE throwing pipe faults. Create DPT objects from shmem and mark the object as dirty when pinning so that the object is restored when shrinker evicts an unpinned buffer object. v2: Unconditionally mark the dpt objects dirty during pinning(Chris). Fixes: 0dc987b ("drm/i915/display: Add smem fallback allocation for dpt") Cc: <[email protected]> # v6.0+ Cc: Ville Syrjälä <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Suggested-by: Chris Wilson <[email protected]> Signed-off-by: Fei Yang <[email protected]> Signed-off-by: Radhakrishna Sripada <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit e91a777) Signed-off-by: Tvrtko Ursulin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e046aec commit 507f70c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ struct i915_vma *intel_dpt_pin(struct i915_address_space *vm)
163163
i915_vma_get(vma);
164164
}
165165

166+
dpt->obj->mm.dirty = true;
167+
166168
atomic_dec(&i915->gpu_error.pending_fb_pin);
167169
intel_runtime_pm_put(&i915->runtime_pm, wakeref);
168170

@@ -258,7 +260,7 @@ intel_dpt_create(struct intel_framebuffer *fb)
258260
dpt_obj = i915_gem_object_create_stolen(i915, size);
259261
if (IS_ERR(dpt_obj) && !HAS_LMEM(i915)) {
260262
drm_dbg_kms(&i915->drm, "Allocating dpt from smem\n");
261-
dpt_obj = i915_gem_object_create_internal(i915, size);
263+
dpt_obj = i915_gem_object_create_shmem(i915, size);
262264
}
263265
if (IS_ERR(dpt_obj))
264266
return ERR_CAST(dpt_obj);

0 commit comments

Comments
 (0)