drm/i915/dpt: Use shmem for dpt objects
authorjsg <jsg@openbsd.org>
Fri, 4 Aug 2023 09:18:11 +0000 (09:18 +0000)
committerjsg <jsg@openbsd.org>
Fri, 4 Aug 2023 09:18:11 +0000 (09:18 +0000)
From Radhakrishna Sripada
507f70c06aa99d05fbb0f36de2be31ef1cf88497 in linux-6.1.y/6.1.43
3844ed5e78823eebb5f0f1edefc403310693d402 in mainline linux

sys/dev/pci/drm/i915/display/intel_dpt.c

index a3893af..ea8a08b 100644 (file)
@@ -163,6 +163,8 @@ struct i915_vma *intel_dpt_pin(struct i915_address_space *vm)
                i915_vma_get(vma);
        }
 
+       dpt->obj->mm.dirty = true;
+
        atomic_dec(&i915->gpu_error.pending_fb_pin);
        intel_runtime_pm_put(&i915->runtime_pm, wakeref);
 
@@ -258,7 +260,7 @@ intel_dpt_create(struct intel_framebuffer *fb)
                dpt_obj = i915_gem_object_create_stolen(i915, size);
        if (IS_ERR(dpt_obj) && !HAS_LMEM(i915)) {
                drm_dbg_kms(&i915->drm, "Allocating dpt from smem\n");
-               dpt_obj = i915_gem_object_create_internal(i915, size);
+               dpt_obj = i915_gem_object_create_shmem(i915, size);
        }
        if (IS_ERR(dpt_obj))
                return ERR_CAST(dpt_obj);