[PATCH] drm/i915/mtl: Add debug prints for Display page fault issue
Radhakrishna Sripada
radhakrishna.sripada at intel.com
Wed May 3 23:33:53 UTC 2023
FOR CI purposes only.
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada at intel.com>
---
drivers/gpu/drm/i915/display/intel_dpt.c | 8 ++++++++
drivers/gpu/drm/i915/gem/i915_gem_pages.c | 11 +++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c b/drivers/gpu/drm/i915/display/intel_dpt.c
index c5eacfdba1a5..fb152ab8eafb 100644
--- a/drivers/gpu/drm/i915/display/intel_dpt.c
+++ b/drivers/gpu/drm/i915/display/intel_dpt.c
@@ -86,11 +86,19 @@ static void dpt_bind_vma(struct i915_address_space *vm,
enum i915_cache_level cache_level,
u32 flags)
{
+ struct i915_dpt *dpt = i915_vm_to_dpt(vm);
u32 pte_flags;
+ struct page *page;
+ struct sgt_iter iter;
+ int i = 0;
if (vma_res->bound_flags)
return;
+ for_each_sgt_page(page, iter, dpt->obj->mm.pages)
+ drm_err(&vm->i915->drm, "dpt %p [%d] physical address 0x%llx\n",
+ dpt, i++, page_to_phys(page));
+
/* Applicable to VLV (gen8+ do not support RO in the GGTT) */
pte_flags = 0;
if (vm->has_read_only && vma_res->bi.readonly)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
index 89fc8ea6bcfc..9a70cbe58dd3 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
@@ -417,6 +417,8 @@ void *i915_gem_object_pin_map(struct drm_i915_gem_object *obj,
ptr = page_unpack_bits(obj->mm.mapping, &has_type);
if (ptr && has_type != type) {
+ pr_info("%s:unpack obj=%p has_type=%u type=%u\n",
+ __func__, obj, has_type, type);
if (pinned) {
ptr = ERR_PTR(-EBUSY);
goto err_unpin;
@@ -436,10 +438,15 @@ void *i915_gem_object_pin_map(struct drm_i915_gem_object *obj,
if (GEM_WARN_ON(type == I915_MAP_WC && !pat_enabled()))
ptr = ERR_PTR(-ENODEV);
- else if (i915_gem_object_has_struct_page(obj))
+ else if (i915_gem_object_has_struct_page(obj)) {
+ pr_info("%s:map page obj=%p type=%u cache_level=%u\n",
+ __func__, obj, type, obj->cache_level);
ptr = i915_gem_object_map_page(obj, type);
- else
+ } else {
+ pr_info("%s:map pfn obj=%p type=%u cache_level=%u\n",
+ __func__, obj, type, obj->cache_level);
ptr = i915_gem_object_map_pfn(obj, type);
+ }
if (IS_ERR(ptr))
goto err_unpin;
--
2.34.1
More information about the Intel-gfx-trybot
mailing list