From: Jani Nikula <jani.nikula@linux.intel.com>
To: yaolu@kylinos.cn, rodrigo.vivi@intel.com,
joonas.lahtinen@linux.intel.com, tursulin@ursulin.net
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, Lu Yao <yaolu@kylinos.cn>
Subject: Re: [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq
Date: Tue, 30 Jun 2026 13:12:59 +0300 [thread overview]
Message-ID: <677fb92771df1f9f491226bf006c157a007c16dc@intel.com> (raw)
In-Reply-To: <20260630031652.67747-1-yaolu@kylinos.cn>
On Tue, 30 Jun 2026, yaolu@kylinos.cn wrote:
> From: Lu Yao <yaolu@kylinos.cn>
>
> Fix two bugs in the probe error path:
>
> 1. intel_dmc_fini() was called on workqueue alloc failed paths but
> intel_dmc_init() had been invoked. Move the dmc init call advance.
You can't move intel_dmc_init() before the wq allocation.
BR,
Jani.
>
> 2. If intel_mode_config_init() succeeded, after intel_xxx_init()
> failed leaked the resources allocated by drm_mode_config_init().
> Add a cleanup_mode_config label.
>
> Signed-off-by: Lu Yao <yaolu@kylinos.cn>
> ---
> .../drm/i915/display/intel_display_driver.c | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index d0729936f681..d69bdfb19efe 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -223,6 +223,8 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
> if (!HAS_DISPLAY(display))
> return 0;
>
> + intel_dmc_init(display);
> +
> display->hotplug.dp_wq = alloc_ordered_workqueue("intel-dp", 0);
> if (!display->hotplug.dp_wq) {
> ret = -ENOMEM;
> @@ -254,33 +256,31 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
> goto cleanup_wq_cleanup;
> }
>
> - intel_dmc_init(display);
> -
> intel_mode_config_init(display);
>
> ret = intel_cdclk_init(display);
> if (ret)
> - goto cleanup_wq_unordered;
> + goto cleanup_mode_config;
>
> ret = intel_color_init(display);
> if (ret)
> - goto cleanup_wq_unordered;
> + goto cleanup_mode_config;
>
> ret = intel_dbuf_init(display);
> if (ret)
> - goto cleanup_wq_unordered;
> + goto cleanup_mode_config;
>
> ret = intel_dbuf_bw_init(display);
> if (ret)
> - goto cleanup_wq_unordered;
> + goto cleanup_mode_config;
>
> ret = intel_bw_init(display);
> if (ret)
> - goto cleanup_wq_unordered;
> + goto cleanup_mode_config;
>
> ret = intel_pmdemand_init(display);
> if (ret)
> - goto cleanup_wq_unordered;
> + goto cleanup_mode_config;
>
> intel_init_quirks(display);
>
> @@ -288,6 +288,8 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
>
> return 0;
>
> +cleanup_mode_config:
> + intel_mode_config_cleanup(display);
> cleanup_wq_unordered:
> destroy_workqueue(display->wq.unordered);
> cleanup_wq_cleanup:
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-06-30 10:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 3:16 yaolu
2026-06-30 10:12 ` Jani Nikula [this message]
2026-07-01 1:15 ` [PATCH v2] " yaolu
2026-07-02 1:12 ` [PATCH v3] " yaolu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=677fb92771df1f9f491226bf006c157a007c16dc@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=tursulin@ursulin.net \
--cc=yaolu@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome