Skip to contentSkip to conversation

drm/i915: Print return value on error

PATCH Superseded Nirmoy Das 3 participants 4 messages Oct 14, 2022

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 drm/i915: Print return value on error

Print returned error code for better debuggability.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/7211

---
 drivers/gpu/drm/i915/display/intel_fbdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_fbdev.c +3 -3
index 112aa0447a0d..015a854d9bec 100644
@@ -175,7 +175,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
 	}
 
 	if (IS_ERR(obj)) {
-		drm_err(&dev_priv->drm, "failed to allocate framebuffer\n");
+		drm_err(&dev_priv->drm, "failed to allocate framebuffer(err = %pe)\n", obj);
 		return PTR_ERR(obj);
 	}
 
@@ -256,7 +256,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
 
 	info = drm_fb_helper_alloc_fbi(helper);
 	if (IS_ERR(info)) {
-		drm_err(&dev_priv->drm, "Failed to allocate fb_info\n");
+		drm_err(&dev_priv->drm, "Failed to allocate fb_info(err = %pe)\n", info);
 		ret = PTR_ERR(info);
 		goto out_unpin;
 	}
@@ -291,7 +291,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
 	vaddr = i915_vma_pin_iomap(vma);
 	if (IS_ERR(vaddr)) {
 		drm_err(&dev_priv->drm,
-			"Failed to remap framebuffer into virtual memory\n");
+			"Failed to remap framebuffer into virtual memory (err = %pe)\n", vaddr);
 		ret = PTR_ERR(vaddr);
 		goto out_unpin;
 	}
Signature · 1 line
2.37.3
maintainer
#1 lore raw
Quoted 13 lines · Nirmoy Das

Print returned error code for better debuggability.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/7211

---
 drivers/gpu/drm/i915/display/intel_fbdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_fbdev.c +0 -0
index 112aa0447a0d..015a854d9bec 100644

drivers/gpu/drm/i915/display/intel_fbdev.c static int intelfb_alloc(struct drm_fb_helper *helper, · line 178

Quoted 5 lines
drivers/gpu/drm/i915/display/intel_fbdev.c +1 -1
@@ -175,7 +175,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
 	}
 
 	if (IS_ERR(obj)) {
-		drm_err(&dev_priv->drm, "failed to allocate framebuffer\n");
+		drm_err(&dev_priv->drm, "failed to allocate framebuffer(err = %pe)\n", obj);

Nitpick, space before (. With %pe, not sure if the "err =" part is necessary either.

failed to allocate framebuffer (err = -ENOMEM)

vs.

failed to allocate framebuffer (-ENOMEM)

Ditto below.

BR,
Jani.

Quoted 21 lines
drivers/gpu/drm/i915/display/intel_fbdev.c +2 -2
 		return PTR_ERR(obj);
 	}
 
@@ -256,7 +256,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
 
 	info = drm_fb_helper_alloc_fbi(helper);
 	if (IS_ERR(info)) {
-		drm_err(&dev_priv->drm, "Failed to allocate fb_info\n");
+		drm_err(&dev_priv->drm, "Failed to allocate fb_info(err = %pe)\n", info);
 		ret = PTR_ERR(info);
 		goto out_unpin;
 	}
@@ -291,7 +291,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
 	vaddr = i915_vma_pin_iomap(vma);
 	if (IS_ERR(vaddr)) {
 		drm_err(&dev_priv->drm,
-			"Failed to remap framebuffer into virtual memory\n");
+			"Failed to remap framebuffer into virtual memory (err = %pe)\n", vaddr);
 		ret = PTR_ERR(vaddr);
 		goto out_unpin;
 	}
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#2 lore raw
Quoted 22 lines · Jani Nikula
Quoted 13 lines · Nirmoy Das

Print returned error code for better debuggability.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/7211

---
  drivers/gpu/drm/i915/display/intel_fbdev.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_fbdev.c +0 -0
index 112aa0447a0d..015a854d9bec 100644

drivers/gpu/drm/i915/display/intel_fbdev.c static int intelfb_alloc(struct drm_fb_helper *helper, · line 178

Quoted 5 lines
drivers/gpu/drm/i915/display/intel_fbdev.c +1 -1
@@ -175,7 +175,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
  	}
 
  	if (IS_ERR(obj)) {
-		drm_err(&dev_priv->drm, "failed to allocate framebuffer\n");
+		drm_err(&dev_priv->drm, "failed to allocate framebuffer(err = %pe)\n", obj);

Nitpick, space before (. With %pe, not sure if the "err =" part is necessary either.

Quoted 5 lines

failed to allocate framebuffer (err = -ENOMEM)

vs.

failed to allocate framebuffer (-ENOMEM)

This seems better. Thanks for the quick review, I will resend.

Nirmoy

Quoted 27 lines

Ditto below.

BR,
Jani.

Quoted 21 lines
drivers/gpu/drm/i915/display/intel_fbdev.c +2 -2
  		return PTR_ERR(obj);
  	}
 
@@ -256,7 +256,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
 
  	info = drm_fb_helper_alloc_fbi(helper);
  	if (IS_ERR(info)) {
-		drm_err(&dev_priv->drm, "Failed to allocate fb_info\n");
+		drm_err(&dev_priv->drm, "Failed to allocate fb_info(err = %pe)\n", info);
  		ret = PTR_ERR(info);
  		goto out_unpin;
  	}
@@ -291,7 +291,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
  	vaddr = i915_vma_pin_iomap(vma);
  	if (IS_ERR(vaddr)) {
  		drm_err(&dev_priv->drm,
-			"Failed to remap framebuffer into virtual memory\n");
+			"Failed to remap framebuffer into virtual memory (err = %pe)\n", vaddr);
  		ret = PTR_ERR(vaddr);
  		goto out_unpin;
  	}
#3 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Print return value on error

In reply to Nirmoy Das
== Series Details ==

== Series Details ==

Series: drm/i915: Print return value on error
URL : https://patchwork.freedesktop.org/series/109722/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12242 -> Patchwork_109722v1
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/index.html

Participating hosts (45 -> 45)
------------------------------

Additional (4): fi-tgl-u2 fi-icl-u2 bat-atsm-1 fi-pnv-d510
Missing (4): fi-ilk-m540 fi-kbl-x1275 bat-jsl-1 fi-hsw-4200u

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_109722v1:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-d-dp-3:
- {bat-dg2-11}: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12242/bat-dg2-11/igt@kms_pipe_crc_basic@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/bat-dg2-11/igt@kms_pipe_crc_basic@[email protected]

Known issues
------------

Here are the changes found in Patchwork_109722v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_huc_copy@huc-copy:
- fi-icl-u2: NOTRUN -> [SKIP][3] ([i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-icl-u2/igt@[email protected]
- fi-tgl-u2: NOTRUN -> [SKIP][4] ([i915#2190])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-tgl-u2/igt@[email protected]

* igt@gem_lmem_swapping@random-engines:
- fi-icl-u2: NOTRUN -> [SKIP][5] ([i915#4613]) +3 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-icl-u2/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [PASS][6] -> [INCOMPLETE][7] ([i915#4785])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12242/fi-hsw-4770/igt@i915_selftest@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-hsw-4770/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@requests:
- fi-icl-u2: NOTRUN -> [INCOMPLETE][8] ([i915#7057])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-icl-u2/igt@i915_selftest@[email protected]

* igt@kms_chamelium@hdmi-edid-read:
- fi-tgl-u2: NOTRUN -> [SKIP][9] ([fdo#109284] / [fdo#111827]) +7 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-tgl-u2/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: NOTRUN -> [SKIP][10] ([fdo#111827]) +7 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-icl-u2/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-tgl-u2: NOTRUN -> [SKIP][11] ([i915#4103])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-tgl-u2/igt@[email protected]
- fi-icl-u2: NOTRUN -> [SKIP][12] ([i915#4103])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-icl-u2/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- fi-tgl-u2: NOTRUN -> [SKIP][13] ([fdo#109285])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-tgl-u2/igt@[email protected]
- fi-icl-u2: NOTRUN -> [SKIP][14] ([fdo#109285])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-icl-u2/igt@[email protected]

* igt@kms_psr@primary_page_flip:
- fi-pnv-d510: NOTRUN -> [SKIP][15] ([fdo#109271]) +43 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-pnv-d510/igt@kms_psr@primary_page_flip.html

* igt@kms_setmode@basic-clone-single-crtc:
- fi-icl-u2: NOTRUN -> [SKIP][16] ([i915#3555])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-icl-u2/igt@[email protected]
- fi-tgl-u2: NOTRUN -> [SKIP][17] ([i915#3555])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-tgl-u2/igt@[email protected]

* igt@prime_vgem@basic-userptr:
- fi-icl-u2: NOTRUN -> [SKIP][18] ([fdo#109295] / [i915#3301])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-icl-u2/igt@[email protected]

* igt@runner@aborted:
- fi-hsw-4770: NOTRUN -> [FAIL][19] ([fdo#109271] / [i915#4312] / [i915#5594])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-hsw-4770/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s0@lmem0:
- {bat-dg2-11}: [DMESG-WARN][20] ([i915#6816]) -> [PASS][21] +1 similar issue
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12242/bat-dg2-11/igt@gem_exec_suspend@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/bat-dg2-11/igt@gem_exec_suspend@[email protected]

* igt@i915_module_load@reload:
- {bat-rpls-2}: [DMESG-WARN][22] ([i915#5537]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12242/bat-rpls-2/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/bat-rpls-2/igt@[email protected]

* igt@i915_pm_rpm@basic-rte:
- {bat-rplp-1}: [DMESG-WARN][24] ([i915#7077]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12242/bat-rplp-1/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/bat-rplp-1/igt@[email protected]

* igt@i915_pm_rpm@module-reload:
- {fi-tgl-mst}: [DMESG-WARN][26] ([i915#5537]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12242/fi-tgl-mst/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/fi-tgl-mst/igt@[email protected]

* igt@i915_selftest@live@reset:
- {bat-rpls-1}: [DMESG-FAIL][28] ([i915#4983]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12242/bat-rpls-1/igt@i915_selftest@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/bat-rpls-1/igt@i915_selftest@[email protected]
- {bat-rpls-2}: [DMESG-FAIL][30] ([i915#4983]) -> [PASS][31]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12242/bat-rpls-2/igt@i915_selftest@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/bat-rpls-2/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-d-dp-3:
- {bat-dg2-11}: [FAIL][32] ([i915#6818]) -> [PASS][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12242/bat-dg2-11/igt@kms_pipe_crc_basic@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/bat-dg2-11/igt@kms_pipe_crc_basic@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5122]: https://gitlab.freedesktop.org/drm/intel/issues/5122
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5537]: https://gitlab.freedesktop.org/drm/intel/issues/5537
[i915#5594]: https://gitlab.freedesktop.org/drm/intel/issues/5594
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6471]: https://gitlab.freedesktop.org/drm/intel/issues/6471
[i915#6559]: https://gitlab.freedesktop.org/drm/intel/issues/6559
[i915#6596]: https://gitlab.freedesktop.org/drm/intel/issues/6596
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#6816]: https://gitlab.freedesktop.org/drm/intel/issues/6816
[i915#6818]: https://gitlab.freedesktop.org/drm/intel/issues/6818
[i915#7029]: https://gitlab.freedesktop.org/drm/intel/issues/7029
[i915#7030]: https://gitlab.freedesktop.org/drm/intel/issues/7030
[i915#7031]: https://gitlab.freedesktop.org/drm/intel/issues/7031
[i915#7057]: https://gitlab.freedesktop.org/drm/intel/issues/7057
[i915#7077]: https://gitlab.freedesktop.org/drm/intel/issues/7077

Build changes
-------------

* Linux: CI_DRM_12242 -> Patchwork_109722v1

CI-20190529: 20190529
CI_DRM_12242: 075a81b1efd29300194bdf7877e08b6dbe3079d9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7012: ca6f5bdd537d26692c4b1ca011b8c4f227d95703 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109722v1: 075a81b1efd29300194bdf7877e08b6dbe3079d9 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

2ee69d883da1 drm/i915: Print return value on error

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109722v1/index.html