drm/i915: fix wrong error number report
Subsystems (2)
PATCH 1/1 drm/i915: fix wrong error number report
During driver load it's considered that the i915_driver_create() function fails only in case of insufficient memory. Indeed, in case of failure of i915_driver_create(), the load function returns indiscriminately -ENOMEM ignoring the real cause of failure.
In i915_driver_create() get the consistent error value from drm_dev_init() and embed it in the pointer return value.
--- drivers/gpu/drm/i915/i915_drv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +6 -4
@@ -1627,14 +1627,16 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent) (struct intel_device_info *)ent->driver_data;struct intel_device_info *device_info;struct drm_i915_private *i915; +int err; i915 =kzalloc (sizeof (*i915),GFP_KERNEL );if (!i915)return NULL ; -if (drm_dev_init (&i915->drm, &driver, &pdev->dev)) { + err =drm_dev_init (&i915->drm, &driver, &pdev->dev); +if (err) {kfree (i915); -return NULL ; +return ERR_PTR (err); } i915->drm.pdev = pdev;
@@ -1683,8 +1685,8 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)int ret; dev_priv =i915_driver_create (pdev, ent); -if (!dev_priv) -return -ENOMEM ; +if (IS_ERR (dev_priv)) +return PTR_ERR (dev_priv);/* Disable nuclear pageflip by default on pre-ILK */ if (!i915_modparams.nuclear_pageflip && match_info->gen <5 )
Signature · 6 lines
2.19.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: fix wrong error number report
== Series Details ==
== Series Details ==
Series: drm/i915: fix wrong error number report
URL : https://patchwork.freedesktop.org/series/50406/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4908 -> Patchwork_10311 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50406/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_10311 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_suspend@basic-s3:
fi-blb-e6850: PASS -> INCOMPLETE (fdo#107718)
igt@kms_frontbuffer_tracking@basic:
fi-byt-clapper: PASS -> FAIL (fdo#103167)
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
fi-byt-clapper: PASS -> FAIL (fdo#107362, fdo#103191)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s3:
fi-cfl-8109u: DMESG-WARN (fdo#107345) -> PASS +3
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
fi-byt-clapper: FAIL (fdo#107362) -> PASS fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#107345 https://bugs.freedesktop.org/show_bug.cgi?id=107345
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
== Participating hosts (53 -> 45) ==
Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 fi-pnv-d510
== Build changes ==
* Linux: CI_DRM_4908 -> Patchwork_10311
CI_DRM_4908: d287e1ba5382518eb1ce7cac144f428c1522b8a1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4658: cab89ce2c5da684d01deff402d4e8e11441beadb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10311: 67933e3071d5718711b8188ca94a0120652955bb @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
67933e3071d5 drm/i915: fix wrong error number report
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10311/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Andi Shyti (2018-10-01 17:54:18)
Quoted 19 lines
During driver load it's considered that the
i915_driver_create()function fails only in case of insufficient memory. Indeed, in case of failure ofi915_driver_create(), the load function returns indiscriminately-ENOMEMignoring the real cause of failure.In
i915_driver_create()get the consistent error value fromdrm_dev_init()and embed it in the pointer return value.Signed-off-by Andi Shyti <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_drv.c +0
-0
drivers/gpu/drm/i915/i915_drv.c i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent) · line 1634
Quoted 8 lines
drivers/gpu/drm/i915/i915_drv.c +1
-0@@ -1627,14 +1627,16 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent) (struct intel_device_info *)ent->driver_data;struct intel_device_info *device_info;struct drm_i915_private *i915; +int err; i915 =kzalloc (sizeof (*i915),GFP_KERNEL );if (!i915)return NULL ;
Ahem.
drivers/gpu/drm/i915/i915_drv.c int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent) · line 1689
Quoted 8 lines
drivers/gpu/drm/i915/i915_drv.c +2
-2@@ -1683,8 +1685,8 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)int ret; dev_priv =i915_driver_create (pdev, ent); -if (!dev_priv) -return -ENOMEM ; +if (IS_ERR (dev_priv)) +return PTR_ERR (dev_priv);
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines
Quoted 7 lines
struct intel_device_info *device_info; struct drm_i915_private *i915;+ int err;
i915 = kzalloc(sizeof(*i915), GFP_KERNEL); if (!i915) return NULL;Ahem.
oh yes :)
Thanks,
Andi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for drm/i915: fix wrong error number report
In reply to Andi Shyti== Series Details ==
== Series Details ==
Series: drm/i915: fix wrong error number report
URL : https://patchwork.freedesktop.org/series/50406/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_4908_full -> Patchwork_10311_full =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10311_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10311_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10311_full:
=== IGT changes ===
==== Possible regressions ====
igt@prime_busy@wait-hang-render:
shard-glk: PASS -> FAIL
==== Warnings ====
igt@drm_read@empty-block:
shard-snb: SKIP -> PASS +1== Known issues ==
Here are the changes found in Patchwork_10311_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-kbl: INCOMPLETE (fdo#106023, fdo#103665) -> PASS
igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
shard-glk: DMESG-WARN (fdo#106538, fdo#105763) -> PASS
igt@kms_setmode@basic:
shard-hsw: FAIL (fdo#99912) -> PASS fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (6 -> 5) ==
Missing (1): shard-skl
== Build changes ==
* Linux: CI_DRM_4908 -> Patchwork_10311
CI_DRM_4908: d287e1ba5382518eb1ce7cac144f428c1522b8a1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4658: cab89ce2c5da684d01deff402d4e8e11441beadb @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10311: 67933e3071d5718711b8188ca94a0120652955bb @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10311/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx