* [PATCH] drm/i915: fix wrong error number report
@ 2018-10-01 16:54 Andi Shyti
2018-10-01 17:30 ` ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Andi Shyti @ 2018-10-01 16:54 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi; +Cc: intel-gfx
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.
Signed-off-by: Andi Shyti <andi.shyti@intel.com>
---
drivers/gpu/drm/i915/i915_drv.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 1b028f429e92..d1f65d57f4df 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -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)
--
2.19.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: fix wrong error number report
2018-10-01 16:54 [PATCH] drm/i915: fix wrong error number report Andi Shyti
@ 2018-10-01 17:30 ` Patchwork
2018-10-01 19:33 ` [PATCH] " Chris Wilson
2018-10-01 19:39 ` ✗ Fi.CI.IGT: failure for " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-01 17:30 UTC (permalink / raw)
To: Andi Shyti; +Cc: intel-gfx
== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: fix wrong error number report
2018-10-01 16:54 [PATCH] drm/i915: fix wrong error number report Andi Shyti
2018-10-01 17:30 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-10-01 19:33 ` Chris Wilson
2018-10-02 8:50 ` Andi Shyti
2018-10-01 19:39 ` ✗ Fi.CI.IGT: failure for " Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2018-10-01 19:33 UTC (permalink / raw)
To: Andi Shyti, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi; +Cc: intel-gfx
Quoting Andi Shyti (2018-10-01 17:54:18)
> 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.
>
> Signed-off-by: Andi Shyti <andi.shyti@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 1b028f429e92..d1f65d57f4df 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -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.
> @@ -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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.IGT: failure for drm/i915: fix wrong error number report
2018-10-01 16:54 [PATCH] drm/i915: fix wrong error number report Andi Shyti
2018-10-01 17:30 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-10-01 19:33 ` [PATCH] " Chris Wilson
@ 2018-10-01 19:39 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-01 19:39 UTC (permalink / raw)
To: Andi Shyti; +Cc: intel-gfx
== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: fix wrong error number report
2018-10-01 19:33 ` [PATCH] " Chris Wilson
@ 2018-10-02 8:50 ` Andi Shyti
0 siblings, 0 replies; 5+ messages in thread
From: Andi Shyti @ 2018-10-02 8:50 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, Rodrigo Vivi
> > 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-02 8:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01 16:54 [PATCH] drm/i915: fix wrong error number report Andi Shyti
2018-10-01 17:30 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-10-01 19:33 ` [PATCH] " Chris Wilson
2018-10-02 8:50 ` Andi Shyti
2018-10-01 19:39 ` ✗ Fi.CI.IGT: failure for " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.