drm/i915/execlists: Onion unwind for logical_ring_init() failure
Subsystems (2)
Fix up the error unwind for logical_ring_init() failing by moving the cleanup into the callers who own the various bits of state during initialisation, so we don't forget to free the state allocated by the caller.
--- drivers/gpu/drm/i915/intel_lrc.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +11 -7
@@ -2396,7 +2396,7 @@ static int logical_ring_init(struct intel_engine_cs *engine) ret =intel_engine_init_common (engine);if (ret) - goto error; +return ret;if (HAS_LOGICAL_RING_ELSQ (i915)) { execlists->submit_reg = i915->regs +
@@ -2438,10 +2438,6 @@ static int logical_ring_init(struct intel_engine_cs *engine)reset_csb_pointers (execlists);return 0 ; - -error: -intel_logical_ring_cleanup (engine); -return ret; }int logical_render_ring_init (struct intel_engine_cs *engine)
@@ -2464,10 +2460,14 @@ int logical_render_ring_init(struct intel_engine_cs *engine) engine->emit_breadcrumb = gen8_emit_breadcrumb_rcs; engine->emit_breadcrumb_sz = gen8_emit_breadcrumb_rcs_sz; - ret =intel_engine_create_scratch (engine,PAGE_SIZE ); + ret =logical_ring_init (engine);if (ret)return ret; + ret =intel_engine_create_scratch (engine,PAGE_SIZE ); +if (ret) + goto err_cleanup_common; + ret =intel_init_workaround_bb (engine);if (ret) {/*
@@ -2479,7 +2479,11 @@ int logical_render_ring_init(struct intel_engine_cs *engine) ret); } -return logical_ring_init (engine); +return 0 ; + +err_cleanup_common: +intel_engine_cleanup_common (engine); +return ret; }int logical_xcs_ring_init (struct intel_engine_cs *engine)
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/execlists: Onion unwind for logical_ring_init() failure
== Series Details ==
== Series Details ==
Series: drm/i915/execlists: Onion unwind for logical_ring_init() failure
URL : https://patchwork.freedesktop.org/series/49986/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4853 -> Patchwork_10244 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/49986/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_10244 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drm_mm@insert:
{fi-skl-caroline}: NOTRUN -> INCOMPLETE (fdo#108003)
igt@drv_selftest@live_coherency:
fi-gdg-551: PASS -> DMESG-FAIL (fdo#107164)
igt@kms_flip@basic-flip-vs-modeset:
fi-skl-6700hq: PASS -> DMESG-WARN (fdo#105998)
igt@kms_psr@primary_page_flip:
fi-kbl-7560u: PASS -> FAIL (fdo#107336)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s3:
fi-blb-e6850: INCOMPLETE (fdo#107718) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-WARN (fdo#102614) -> PASS
fi-byt-clapper: FAIL (fdo#103167) -> PASS
igt@kms_psr@primary_page_flip:
fi-cfl-s3: FAIL (fdo#107336) -> PASS
fi-cnl-u: FAIL (fdo#107336) -> PASS
fi-kbl-r: FAIL (fdo#107336) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#108003 https://bugs.freedesktop.org/show_bug.cgi?id=108003
== Participating hosts (51 -> 48) ==
Additional (1): fi-skl-caroline
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4853 -> Patchwork_10244
CI_DRM_4853: 4393e65dc7ab572d1d711b30e1e3bb8bfbe072c1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4647: ae8187922d8de2bc739519da3bd40cf5f03f5e4f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10244: 3be159f44994f541d9c8304bc285888bc52371ee @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
3be159f44994 drm/i915/execlists: Onion unwind for logical_ring_init() failure
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10244/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/execlists: Onion unwind for logical_ring_init() failure
In reply to Chris Wilson== Series Details ==
== Series Details ==
Series: drm/i915/execlists: Onion unwind for logical_ring_init() failure
URL : https://patchwork.freedesktop.org/series/49986/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4853_full -> Patchwork_10244_full =
== Summary - SUCCESS ==
No regressions found.
== Known issues ==
Here are the changes found in Patchwork_10244_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_big:
shard-hsw: PASS -> TIMEOUT (fdo#107937)
igt@kms_busy@extended-modeset-hang-newfb-render-b:
shard-snb: NOTRUN -> DMESG-WARN (fdo#107956) +1
igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
shard-kbl: PASS -> DMESG-WARN (fdo#107956)
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#102887, fdo#105363)
==== Possible fixes ====
igt@gem_exec_await@wide-contexts:
shard-apl: FAIL (fdo#106680) -> PASS
igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
shard-hsw: DMESG-WARN (fdo#107956) -> PASS fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#106680 https://bugs.freedesktop.org/show_bug.cgi?id=106680
fdo#107937 https://bugs.freedesktop.org/show_bug.cgi?id=107937
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4853 -> Patchwork_10244
CI_DRM_4853: 4393e65dc7ab572d1d711b30e1e3bb8bfbe072c1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4647: ae8187922d8de2bc739519da3bd40cf5f03f5e4f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10244: 3be159f44994f541d9c8304bc285888bc52371ee @ 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_10244/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx