The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq
@ 2026-06-30  3:16 yaolu
  2026-06-30 10:12 ` Jani Nikula
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: yaolu @ 2026-06-30  3:16 UTC (permalink / raw)
  To: jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin
  Cc: intel-gfx, dri-devel, linux-kernel, Lu Yao

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.

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:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq
  2026-06-30  3:16 [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq yaolu
@ 2026-06-30 10:12 ` Jani Nikula
  2026-07-01  1:15 ` [PATCH v2] " yaolu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Jani Nikula @ 2026-06-30 10:12 UTC (permalink / raw)
  To: yaolu, rodrigo.vivi, joonas.lahtinen, tursulin
  Cc: intel-gfx, dri-devel, linux-kernel, Lu Yao

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] drm/i915/display: fix error handling in intel_display_driver_probe_noirq
  2026-06-30  3:16 [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq yaolu
  2026-06-30 10:12 ` Jani Nikula
@ 2026-07-01  1:15 ` yaolu
  2026-07-02  1:12   ` [PATCH v3] " yaolu
  2026-08-04 13:50 ` [PATCH] " kernel test robot
  2026-08-04 15:14 ` kernel test robot
  3 siblings, 1 reply; 6+ messages in thread
From: yaolu @ 2026-07-01  1:15 UTC (permalink / raw)
  To: yaolu
  Cc: dri-devel, intel-gfx, jani.nikula, joonas.lahtinen, linux-kernel,
	rodrigo.vivi, tursulin

From: Lu Yao <yaolu@kylinos.cn>

Fix two bugs in the probe error path:

1. 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.

2. intel_dmc_fini() was called on workqueue alloc failed paths but
   intel_dmc_init() don't been invoked.  Move the dmc fini call in
   cleanup_mode_config label.

Signed-off-by: Lu Yao <yaolu@kylinos.cn>
---
v1->v2: don't move intel_dmc_init() advance
  chencked by Sashiko AI and Jani
  Link: https://lore.kernel.org/all/20260630032254.05B511F000E9@smtp.kernel.org/
  Link: https://lore.kernel.org/all/677fb92771df1f9f491226bf006c157a007c16dc@intel.com/

 .../drm/i915/display/intel_display_driver.c   | 20 ++++++++++---------
 1 file changed, 11 insertions(+), 9 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..01770847fbdf 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -226,7 +226,7 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
 	display->hotplug.dp_wq = alloc_ordered_workqueue("intel-dp", 0);
 	if (!display->hotplug.dp_wq) {
 		ret = -ENOMEM;
-		goto cleanup_pw_domain_dmc;
+		goto cleanup_pw_domain;
 	}
 
 	display->wq.modeset = alloc_ordered_workqueue("i915_modeset", 0);
@@ -260,27 +260,27 @@ int intel_display_driver_probe_noirq(struct intel_display *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,9 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
 
 	return 0;
 
+cleanup_mode_config:
+	intel_mode_config_cleanup(display);
+	intel_dmc_fini(display);
 cleanup_wq_unordered:
 	destroy_workqueue(display->wq.unordered);
 cleanup_wq_cleanup:
@@ -298,8 +301,7 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
 	destroy_workqueue(display->wq.modeset);
 cleanup_wq_dp:
 	destroy_workqueue(display->hotplug.dp_wq);
-cleanup_pw_domain_dmc:
-	intel_dmc_fini(display);
+cleanup_pw_domain:
 	intel_display_power_driver_remove(display);
 cleanup_bios:
 	intel_bios_driver_remove(display);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3] drm/i915/display: fix error handling in intel_display_driver_probe_noirq
  2026-07-01  1:15 ` [PATCH v2] " yaolu
@ 2026-07-02  1:12   ` yaolu
  0 siblings, 0 replies; 6+ messages in thread
From: yaolu @ 2026-07-02  1:12 UTC (permalink / raw)
  To: yaolu
  Cc: dri-devel, intel-gfx, jani.nikula, joonas.lahtinen, linux-kernel,
	rodrigo.vivi, tursulin

From: Lu Yao <yaolu@kylinos.cn>

Fix two bugs in the probe error path:

1. 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.

2. intel_dmc_fini() was called on workqueue alloc failed paths but
   intel_dmc_init() don't been invoked.  Move the dmc fini call in
   cleanup_mode_config label.

Signed-off-by: Lu Yao <yaolu@kylinos.cn>
---
v2->v3: rm unused label checked by CI
  Link: https://lore.kernel.org/all/178294904225.140838.18311548714090230092@6beec6c84f66/

v1->v2: don't move intel_dmc_init() advance chencked by Sashiko AI and Jani
  Link: https://lore.kernel.org/all/20260630032254.05B511F000E9@smtp.kernel.org/
  Link: https://lore.kernel.org/all/677fb92771df1f9f491226bf006c157a007c16dc@intel.com/

 .../drm/i915/display/intel_display_driver.c   | 21 ++++++++++---------
 1 file changed, 11 insertions(+), 10 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..4af2324f5252 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -226,7 +226,7 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
 	display->hotplug.dp_wq = alloc_ordered_workqueue("intel-dp", 0);
 	if (!display->hotplug.dp_wq) {
 		ret = -ENOMEM;
-		goto cleanup_pw_domain_dmc;
+		goto cleanup_pw_domain;
 	}
 
 	display->wq.modeset = alloc_ordered_workqueue("i915_modeset", 0);
@@ -260,27 +260,27 @@ int intel_display_driver_probe_noirq(struct intel_display *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,7 +288,9 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
 
 	return 0;
 
-cleanup_wq_unordered:
+cleanup_mode_config:
+	intel_mode_config_cleanup(display);
+	intel_dmc_fini(display);
 	destroy_workqueue(display->wq.unordered);
 cleanup_wq_cleanup:
 	destroy_workqueue(display->wq.cleanup);
@@ -298,8 +300,7 @@ int intel_display_driver_probe_noirq(struct intel_display *display)
 	destroy_workqueue(display->wq.modeset);
 cleanup_wq_dp:
 	destroy_workqueue(display->hotplug.dp_wq);
-cleanup_pw_domain_dmc:
-	intel_dmc_fini(display);
+cleanup_pw_domain:
 	intel_display_power_driver_remove(display);
 cleanup_bios:
 	intel_bios_driver_remove(display);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq
  2026-06-30  3:16 [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq yaolu
  2026-06-30 10:12 ` Jani Nikula
  2026-07-01  1:15 ` [PATCH v2] " yaolu
@ 2026-08-04 13:50 ` kernel test robot
  2026-08-04 15:14 ` kernel test robot
  3 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-08-04 13:50 UTC (permalink / raw)
  To: yaolu, jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin
  Cc: oe-kbuild-all, intel-gfx, dri-devel, linux-kernel, Lu Yao

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-i915/for-linux-next]
[also build test WARNING on drm-i915/for-linux-next-fixes linus/master v7.2-rc6 next-20260803]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/yaolu-kylinos-cn/drm-i915-display-fix-error-handling-in-intel_display_driver_probe_noirq/20260804-144429
base:   https://gitlab.freedesktop.org/drm/i915/kernel.git for-linux-next
patch link:    https://lore.kernel.org/r/20260630031652.67747-1-yaolu%40kylinos.cn
patch subject: [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq
config: parisc-allmodconfig (https://download.01.org/0day-ci/archive/20260804/202608042133.a0zParAB-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260804/202608042133.a0zParAB-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608042133.a0zParAB-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/i915/display/intel_display_driver.c: In function 'intel_display_driver_probe_noirq':
>> drivers/gpu/drm/i915/display/intel_display_driver.c:309:1: warning: label 'cleanup_wq_unordered' defined but not used [-Wunused-label]
     309 | cleanup_wq_unordered:
         | ^~~~~~~~~~~~~~~~~~~~


vim +/cleanup_wq_unordered +309 drivers/gpu/drm/i915/display/intel_display_driver.c

62bb6b4920ce9d Jani Nikula         2023-04-14  201  
40053823baadce Jani Nikula         2023-04-14  202  /* part #1: call before irq install */
f5d38d4fa88441 Jani Nikula         2024-12-04  203  int intel_display_driver_probe_noirq(struct intel_display *display)
40053823baadce Jani Nikula         2023-04-14  204  {
40053823baadce Jani Nikula         2023-04-14  205  	int ret;
40053823baadce Jani Nikula         2023-04-14  206  
ff8c73b7bfb547 Jani Nikula         2026-06-15  207  	intel_opregion_setup(display);
ff8c73b7bfb547 Jani Nikula         2026-06-15  208  
ff8c73b7bfb547 Jani Nikula         2026-06-15  209  	/*
ff8c73b7bfb547 Jani Nikula         2026-06-15  210  	 * Fill the dram structure to get the system dram info. This will be
ff8c73b7bfb547 Jani Nikula         2026-06-15  211  	 * used for memory latency calculation.
ff8c73b7bfb547 Jani Nikula         2026-06-15  212  	 */
ff8c73b7bfb547 Jani Nikula         2026-06-15  213  	ret = intel_dram_detect(display);
ff8c73b7bfb547 Jani Nikula         2026-06-15  214  	if (ret)
ff8c73b7bfb547 Jani Nikula         2026-06-15  215  		goto cleanup_opregion;
ff8c73b7bfb547 Jani Nikula         2026-06-15  216  
ff8c73b7bfb547 Jani Nikula         2026-06-15  217  	intel_bw_init_hw(display);
ff8c73b7bfb547 Jani Nikula         2026-06-15  218  
f5d38d4fa88441 Jani Nikula         2024-12-04  219  	if (HAS_DISPLAY(display)) {
f5d38d4fa88441 Jani Nikula         2024-12-04  220  		ret = drm_vblank_init(display->drm,
f5d38d4fa88441 Jani Nikula         2024-12-04  221  				      INTEL_NUM_PIPES(display));
40053823baadce Jani Nikula         2023-04-14  222  		if (ret)
ff8c73b7bfb547 Jani Nikula         2026-06-15  223  			goto cleanup_opregion;
40053823baadce Jani Nikula         2023-04-14  224  	}
40053823baadce Jani Nikula         2023-04-14  225  
9aec6f76a28cd6 Jani Nikula         2024-08-09  226  	intel_bios_init(display);
40053823baadce Jani Nikula         2023-04-14  227  
39e4d3c2f89ab8 Jouni Högander      2025-04-14  228  	intel_psr_dc5_dc6_wa_init(display);
39e4d3c2f89ab8 Jouni Högander      2025-04-14  229  
40053823baadce Jani Nikula         2023-04-14  230  	/* FIXME: completely on the wrong abstraction layer */
ad5190d6f35db6 Jani Nikula         2026-05-26  231  	ret = intel_display_power_init(display);
40053823baadce Jani Nikula         2023-04-14  232  	if (ret < 0)
70ea362b84449b Ville Syrjälä       2025-12-08  233  		goto cleanup_bios;
40053823baadce Jani Nikula         2023-04-14  234  
445fc685498bbb Jani Nikula         2024-12-31  235  	intel_pmdemand_init_early(display);
4c4cc7ac207f56 Mika Kahola         2023-06-06  236  
771394b4fb6d7d Jani Nikula         2026-05-26  237  	intel_display_power_init_hw(display);
40053823baadce Jani Nikula         2023-04-14  238  
f5d38d4fa88441 Jani Nikula         2024-12-04  239  	if (!HAS_DISPLAY(display))
40053823baadce Jani Nikula         2023-04-14  240  		return 0;
40053823baadce Jani Nikula         2023-04-14  241  
41837232b83874 Lu Yao              2026-06-30  242  	intel_dmc_init(display);
41837232b83874 Lu Yao              2026-06-30  243  
ed23224b3f5e5e Jani Nikula         2025-05-16  244  	display->hotplug.dp_wq = alloc_ordered_workqueue("intel-dp", 0);
ed23224b3f5e5e Jani Nikula         2025-05-16  245  	if (!display->hotplug.dp_wq) {
ed23224b3f5e5e Jani Nikula         2025-05-16  246  		ret = -ENOMEM;
70ea362b84449b Ville Syrjälä       2025-12-08  247  		goto cleanup_pw_domain_dmc;
ed23224b3f5e5e Jani Nikula         2025-05-16  248  	}
ed23224b3f5e5e Jani Nikula         2025-05-16  249  
f5d38d4fa88441 Jani Nikula         2024-12-04  250  	display->wq.modeset = alloc_ordered_workqueue("i915_modeset", 0);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  251  	if (!display->wq.modeset) {
dcab7a228f4ea9 Haoxiang Li         2025-05-16  252  		ret = -ENOMEM;
ed23224b3f5e5e Jani Nikula         2025-05-16  253  		goto cleanup_wq_dp;
dcab7a228f4ea9 Haoxiang Li         2025-05-16  254  	}
dcab7a228f4ea9 Haoxiang Li         2025-05-16  255  
f5d38d4fa88441 Jani Nikula         2024-12-04  256  	display->wq.flip = alloc_workqueue("i915_flip", WQ_HIGHPRI |
40053823baadce Jani Nikula         2023-04-14  257  						WQ_UNBOUND, WQ_UNBOUND_MAX_ACTIVE);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  258  	if (!display->wq.flip) {
dcab7a228f4ea9 Haoxiang Li         2025-05-16  259  		ret = -ENOMEM;
dcab7a228f4ea9 Haoxiang Li         2025-05-16  260  		goto cleanup_wq_modeset;
dcab7a228f4ea9 Haoxiang Li         2025-05-16  261  	}
dcab7a228f4ea9 Haoxiang Li         2025-05-16  262  
c15d0056fb74d6 Marco Crivellari    2025-11-04  263  	display->wq.cleanup = alloc_workqueue("i915_cleanup", WQ_HIGHPRI | WQ_PERCPU, 0);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  264  	if (!display->wq.cleanup) {
dcab7a228f4ea9 Haoxiang Li         2025-05-16  265  		ret = -ENOMEM;
dcab7a228f4ea9 Haoxiang Li         2025-05-16  266  		goto cleanup_wq_flip;
dcab7a228f4ea9 Haoxiang Li         2025-05-16  267  	}
40053823baadce Jani Nikula         2023-04-14  268  
c15d0056fb74d6 Marco Crivellari    2025-11-04  269  	display->wq.unordered = alloc_workqueue("display_unordered", WQ_PERCPU, 0);
7c377900772d8f Luca Coelho         2025-06-20  270  	if (!display->wq.unordered) {
7c377900772d8f Luca Coelho         2025-06-20  271  		ret = -ENOMEM;
7c377900772d8f Luca Coelho         2025-06-20  272  		goto cleanup_wq_cleanup;
7c377900772d8f Luca Coelho         2025-06-20  273  	}
7c377900772d8f Luca Coelho         2025-06-20  274  
f5d38d4fa88441 Jani Nikula         2024-12-04  275  	intel_mode_config_init(display);
40053823baadce Jani Nikula         2023-04-14  276  
d34927acff9150 Ville Syrjälä       2024-09-06  277  	ret = intel_cdclk_init(display);
40053823baadce Jani Nikula         2023-04-14  278  	if (ret)
41837232b83874 Lu Yao              2026-06-30  279  		goto cleanup_mode_config;
40053823baadce Jani Nikula         2023-04-14  280  
9d476ce24f72fc Ville Syrjälä       2024-10-24  281  	ret = intel_color_init(display);
40053823baadce Jani Nikula         2023-04-14  282  	if (ret)
41837232b83874 Lu Yao              2026-06-30  283  		goto cleanup_mode_config;
40053823baadce Jani Nikula         2023-04-14  284  
6fe8f9c1388b53 Jani Nikula         2025-04-08  285  	ret = intel_dbuf_init(display);
40053823baadce Jani Nikula         2023-04-14  286  	if (ret)
41837232b83874 Lu Yao              2026-06-30  287  		goto cleanup_mode_config;
40053823baadce Jani Nikula         2023-04-14  288  
ac930bab1c8985 Ville Syrjälä       2025-10-13  289  	ret = intel_dbuf_bw_init(display);
ac930bab1c8985 Ville Syrjälä       2025-10-13  290  	if (ret)
41837232b83874 Lu Yao              2026-06-30  291  		goto cleanup_mode_config;
ac930bab1c8985 Ville Syrjälä       2025-10-13  292  
d706998b6da687 Gustavo Sousa       2025-03-11  293  	ret = intel_bw_init(display);
40053823baadce Jani Nikula         2023-04-14  294  	if (ret)
41837232b83874 Lu Yao              2026-06-30  295  		goto cleanup_mode_config;
40053823baadce Jani Nikula         2023-04-14  296  
445fc685498bbb Jani Nikula         2024-12-31  297  	ret = intel_pmdemand_init(display);
4c4cc7ac207f56 Mika Kahola         2023-06-06  298  	if (ret)
41837232b83874 Lu Yao              2026-06-30  299  		goto cleanup_mode_config;
4c4cc7ac207f56 Mika Kahola         2023-06-06  300  
409c23ae6735cf Jani Nikula         2024-04-17  301  	intel_init_quirks(display);
40053823baadce Jani Nikula         2023-04-14  302  
fd5a9b950ea8ba Ville Syrjälä       2024-07-05  303  	intel_fbc_init(display);
40053823baadce Jani Nikula         2023-04-14  304  
40053823baadce Jani Nikula         2023-04-14  305  	return 0;
40053823baadce Jani Nikula         2023-04-14  306  
41837232b83874 Lu Yao              2026-06-30  307  cleanup_mode_config:
41837232b83874 Lu Yao              2026-06-30  308  	intel_mode_config_cleanup(display);
7c377900772d8f Luca Coelho         2025-06-20 @309  cleanup_wq_unordered:
7c377900772d8f Luca Coelho         2025-06-20  310  	destroy_workqueue(display->wq.unordered);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  311  cleanup_wq_cleanup:
dcab7a228f4ea9 Haoxiang Li         2025-05-16  312  	destroy_workqueue(display->wq.cleanup);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  313  cleanup_wq_flip:
dcab7a228f4ea9 Haoxiang Li         2025-05-16  314  	destroy_workqueue(display->wq.flip);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  315  cleanup_wq_modeset:
dcab7a228f4ea9 Haoxiang Li         2025-05-16  316  	destroy_workqueue(display->wq.modeset);
ed23224b3f5e5e Jani Nikula         2025-05-16  317  cleanup_wq_dp:
ed23224b3f5e5e Jani Nikula         2025-05-16  318  	destroy_workqueue(display->hotplug.dp_wq);
70ea362b84449b Ville Syrjälä       2025-12-08  319  cleanup_pw_domain_dmc:
5c30cfa295ccbf Ville Syrjälä       2024-09-06  320  	intel_dmc_fini(display);
ad5190d6f35db6 Jani Nikula         2026-05-26  321  	intel_display_power_driver_remove(display);
40053823baadce Jani Nikula         2023-04-14  322  cleanup_bios:
9aec6f76a28cd6 Jani Nikula         2024-08-09  323  	intel_bios_driver_remove(display);
ff8c73b7bfb547 Jani Nikula         2026-06-15  324  cleanup_opregion:
ff8c73b7bfb547 Jani Nikula         2026-06-15  325  	intel_opregion_cleanup(display);
40053823baadce Jani Nikula         2023-04-14  326  
40053823baadce Jani Nikula         2023-04-14  327  	return ret;
40053823baadce Jani Nikula         2023-04-14  328  }
5e2e6b595d9d4c Juha-Pekka Heikkila 2025-12-16  329  ALLOW_ERROR_INJECTION(intel_display_driver_probe_noirq, ERRNO);
40053823baadce Jani Nikula         2023-04-14  330  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq
  2026-06-30  3:16 [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq yaolu
                   ` (2 preceding siblings ...)
  2026-08-04 13:50 ` [PATCH] " kernel test robot
@ 2026-08-04 15:14 ` kernel test robot
  3 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-08-04 15:14 UTC (permalink / raw)
  To: yaolu, jani.nikula, rodrigo.vivi, joonas.lahtinen, tursulin
  Cc: llvm, oe-kbuild-all, intel-gfx, dri-devel, linux-kernel, Lu Yao

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-i915/for-linux-next]
[also build test WARNING on drm-i915/for-linux-next-fixes linus/master v7.2-rc6 next-20260803]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/yaolu-kylinos-cn/drm-i915-display-fix-error-handling-in-intel_display_driver_probe_noirq/20260804-144429
base:   https://gitlab.freedesktop.org/drm/i915/kernel.git for-linux-next
patch link:    https://lore.kernel.org/r/20260630031652.67747-1-yaolu%40kylinos.cn
patch subject: [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq
config: i386-randconfig-006-20260804 (https://download.01.org/0day-ci/archive/20260804/202608042218.AEuG8i7A-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260804/202608042218.AEuG8i7A-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608042218.AEuG8i7A-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_display_driver.c:309:1: warning: unused label 'cleanup_wq_unordered' [-Wunused-label]
     309 | cleanup_wq_unordered:
         | ^~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +/cleanup_wq_unordered +309 drivers/gpu/drm/i915/display/intel_display_driver.c

62bb6b4920ce9d Jani Nikula         2023-04-14  201  
40053823baadce Jani Nikula         2023-04-14  202  /* part #1: call before irq install */
f5d38d4fa88441 Jani Nikula         2024-12-04  203  int intel_display_driver_probe_noirq(struct intel_display *display)
40053823baadce Jani Nikula         2023-04-14  204  {
40053823baadce Jani Nikula         2023-04-14  205  	int ret;
40053823baadce Jani Nikula         2023-04-14  206  
ff8c73b7bfb547 Jani Nikula         2026-06-15  207  	intel_opregion_setup(display);
ff8c73b7bfb547 Jani Nikula         2026-06-15  208  
ff8c73b7bfb547 Jani Nikula         2026-06-15  209  	/*
ff8c73b7bfb547 Jani Nikula         2026-06-15  210  	 * Fill the dram structure to get the system dram info. This will be
ff8c73b7bfb547 Jani Nikula         2026-06-15  211  	 * used for memory latency calculation.
ff8c73b7bfb547 Jani Nikula         2026-06-15  212  	 */
ff8c73b7bfb547 Jani Nikula         2026-06-15  213  	ret = intel_dram_detect(display);
ff8c73b7bfb547 Jani Nikula         2026-06-15  214  	if (ret)
ff8c73b7bfb547 Jani Nikula         2026-06-15  215  		goto cleanup_opregion;
ff8c73b7bfb547 Jani Nikula         2026-06-15  216  
ff8c73b7bfb547 Jani Nikula         2026-06-15  217  	intel_bw_init_hw(display);
ff8c73b7bfb547 Jani Nikula         2026-06-15  218  
f5d38d4fa88441 Jani Nikula         2024-12-04  219  	if (HAS_DISPLAY(display)) {
f5d38d4fa88441 Jani Nikula         2024-12-04  220  		ret = drm_vblank_init(display->drm,
f5d38d4fa88441 Jani Nikula         2024-12-04  221  				      INTEL_NUM_PIPES(display));
40053823baadce Jani Nikula         2023-04-14  222  		if (ret)
ff8c73b7bfb547 Jani Nikula         2026-06-15  223  			goto cleanup_opregion;
40053823baadce Jani Nikula         2023-04-14  224  	}
40053823baadce Jani Nikula         2023-04-14  225  
9aec6f76a28cd6 Jani Nikula         2024-08-09  226  	intel_bios_init(display);
40053823baadce Jani Nikula         2023-04-14  227  
39e4d3c2f89ab8 Jouni Högander      2025-04-14  228  	intel_psr_dc5_dc6_wa_init(display);
39e4d3c2f89ab8 Jouni Högander      2025-04-14  229  
40053823baadce Jani Nikula         2023-04-14  230  	/* FIXME: completely on the wrong abstraction layer */
ad5190d6f35db6 Jani Nikula         2026-05-26  231  	ret = intel_display_power_init(display);
40053823baadce Jani Nikula         2023-04-14  232  	if (ret < 0)
70ea362b84449b Ville Syrjälä       2025-12-08  233  		goto cleanup_bios;
40053823baadce Jani Nikula         2023-04-14  234  
445fc685498bbb Jani Nikula         2024-12-31  235  	intel_pmdemand_init_early(display);
4c4cc7ac207f56 Mika Kahola         2023-06-06  236  
771394b4fb6d7d Jani Nikula         2026-05-26  237  	intel_display_power_init_hw(display);
40053823baadce Jani Nikula         2023-04-14  238  
f5d38d4fa88441 Jani Nikula         2024-12-04  239  	if (!HAS_DISPLAY(display))
40053823baadce Jani Nikula         2023-04-14  240  		return 0;
40053823baadce Jani Nikula         2023-04-14  241  
41837232b83874 Lu Yao              2026-06-30  242  	intel_dmc_init(display);
41837232b83874 Lu Yao              2026-06-30  243  
ed23224b3f5e5e Jani Nikula         2025-05-16  244  	display->hotplug.dp_wq = alloc_ordered_workqueue("intel-dp", 0);
ed23224b3f5e5e Jani Nikula         2025-05-16  245  	if (!display->hotplug.dp_wq) {
ed23224b3f5e5e Jani Nikula         2025-05-16  246  		ret = -ENOMEM;
70ea362b84449b Ville Syrjälä       2025-12-08  247  		goto cleanup_pw_domain_dmc;
ed23224b3f5e5e Jani Nikula         2025-05-16  248  	}
ed23224b3f5e5e Jani Nikula         2025-05-16  249  
f5d38d4fa88441 Jani Nikula         2024-12-04  250  	display->wq.modeset = alloc_ordered_workqueue("i915_modeset", 0);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  251  	if (!display->wq.modeset) {
dcab7a228f4ea9 Haoxiang Li         2025-05-16  252  		ret = -ENOMEM;
ed23224b3f5e5e Jani Nikula         2025-05-16  253  		goto cleanup_wq_dp;
dcab7a228f4ea9 Haoxiang Li         2025-05-16  254  	}
dcab7a228f4ea9 Haoxiang Li         2025-05-16  255  
f5d38d4fa88441 Jani Nikula         2024-12-04  256  	display->wq.flip = alloc_workqueue("i915_flip", WQ_HIGHPRI |
40053823baadce Jani Nikula         2023-04-14  257  						WQ_UNBOUND, WQ_UNBOUND_MAX_ACTIVE);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  258  	if (!display->wq.flip) {
dcab7a228f4ea9 Haoxiang Li         2025-05-16  259  		ret = -ENOMEM;
dcab7a228f4ea9 Haoxiang Li         2025-05-16  260  		goto cleanup_wq_modeset;
dcab7a228f4ea9 Haoxiang Li         2025-05-16  261  	}
dcab7a228f4ea9 Haoxiang Li         2025-05-16  262  
c15d0056fb74d6 Marco Crivellari    2025-11-04  263  	display->wq.cleanup = alloc_workqueue("i915_cleanup", WQ_HIGHPRI | WQ_PERCPU, 0);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  264  	if (!display->wq.cleanup) {
dcab7a228f4ea9 Haoxiang Li         2025-05-16  265  		ret = -ENOMEM;
dcab7a228f4ea9 Haoxiang Li         2025-05-16  266  		goto cleanup_wq_flip;
dcab7a228f4ea9 Haoxiang Li         2025-05-16  267  	}
40053823baadce Jani Nikula         2023-04-14  268  
c15d0056fb74d6 Marco Crivellari    2025-11-04  269  	display->wq.unordered = alloc_workqueue("display_unordered", WQ_PERCPU, 0);
7c377900772d8f Luca Coelho         2025-06-20  270  	if (!display->wq.unordered) {
7c377900772d8f Luca Coelho         2025-06-20  271  		ret = -ENOMEM;
7c377900772d8f Luca Coelho         2025-06-20  272  		goto cleanup_wq_cleanup;
7c377900772d8f Luca Coelho         2025-06-20  273  	}
7c377900772d8f Luca Coelho         2025-06-20  274  
f5d38d4fa88441 Jani Nikula         2024-12-04  275  	intel_mode_config_init(display);
40053823baadce Jani Nikula         2023-04-14  276  
d34927acff9150 Ville Syrjälä       2024-09-06  277  	ret = intel_cdclk_init(display);
40053823baadce Jani Nikula         2023-04-14  278  	if (ret)
41837232b83874 Lu Yao              2026-06-30  279  		goto cleanup_mode_config;
40053823baadce Jani Nikula         2023-04-14  280  
9d476ce24f72fc Ville Syrjälä       2024-10-24  281  	ret = intel_color_init(display);
40053823baadce Jani Nikula         2023-04-14  282  	if (ret)
41837232b83874 Lu Yao              2026-06-30  283  		goto cleanup_mode_config;
40053823baadce Jani Nikula         2023-04-14  284  
6fe8f9c1388b53 Jani Nikula         2025-04-08  285  	ret = intel_dbuf_init(display);
40053823baadce Jani Nikula         2023-04-14  286  	if (ret)
41837232b83874 Lu Yao              2026-06-30  287  		goto cleanup_mode_config;
40053823baadce Jani Nikula         2023-04-14  288  
ac930bab1c8985 Ville Syrjälä       2025-10-13  289  	ret = intel_dbuf_bw_init(display);
ac930bab1c8985 Ville Syrjälä       2025-10-13  290  	if (ret)
41837232b83874 Lu Yao              2026-06-30  291  		goto cleanup_mode_config;
ac930bab1c8985 Ville Syrjälä       2025-10-13  292  
d706998b6da687 Gustavo Sousa       2025-03-11  293  	ret = intel_bw_init(display);
40053823baadce Jani Nikula         2023-04-14  294  	if (ret)
41837232b83874 Lu Yao              2026-06-30  295  		goto cleanup_mode_config;
40053823baadce Jani Nikula         2023-04-14  296  
445fc685498bbb Jani Nikula         2024-12-31  297  	ret = intel_pmdemand_init(display);
4c4cc7ac207f56 Mika Kahola         2023-06-06  298  	if (ret)
41837232b83874 Lu Yao              2026-06-30  299  		goto cleanup_mode_config;
4c4cc7ac207f56 Mika Kahola         2023-06-06  300  
409c23ae6735cf Jani Nikula         2024-04-17  301  	intel_init_quirks(display);
40053823baadce Jani Nikula         2023-04-14  302  
fd5a9b950ea8ba Ville Syrjälä       2024-07-05  303  	intel_fbc_init(display);
40053823baadce Jani Nikula         2023-04-14  304  
40053823baadce Jani Nikula         2023-04-14  305  	return 0;
40053823baadce Jani Nikula         2023-04-14  306  
41837232b83874 Lu Yao              2026-06-30  307  cleanup_mode_config:
41837232b83874 Lu Yao              2026-06-30  308  	intel_mode_config_cleanup(display);
7c377900772d8f Luca Coelho         2025-06-20 @309  cleanup_wq_unordered:
7c377900772d8f Luca Coelho         2025-06-20  310  	destroy_workqueue(display->wq.unordered);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  311  cleanup_wq_cleanup:
dcab7a228f4ea9 Haoxiang Li         2025-05-16  312  	destroy_workqueue(display->wq.cleanup);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  313  cleanup_wq_flip:
dcab7a228f4ea9 Haoxiang Li         2025-05-16  314  	destroy_workqueue(display->wq.flip);
dcab7a228f4ea9 Haoxiang Li         2025-05-16  315  cleanup_wq_modeset:
dcab7a228f4ea9 Haoxiang Li         2025-05-16  316  	destroy_workqueue(display->wq.modeset);
ed23224b3f5e5e Jani Nikula         2025-05-16  317  cleanup_wq_dp:
ed23224b3f5e5e Jani Nikula         2025-05-16  318  	destroy_workqueue(display->hotplug.dp_wq);
70ea362b84449b Ville Syrjälä       2025-12-08  319  cleanup_pw_domain_dmc:
5c30cfa295ccbf Ville Syrjälä       2024-09-06  320  	intel_dmc_fini(display);
ad5190d6f35db6 Jani Nikula         2026-05-26  321  	intel_display_power_driver_remove(display);
40053823baadce Jani Nikula         2023-04-14  322  cleanup_bios:
9aec6f76a28cd6 Jani Nikula         2024-08-09  323  	intel_bios_driver_remove(display);
ff8c73b7bfb547 Jani Nikula         2026-06-15  324  cleanup_opregion:
ff8c73b7bfb547 Jani Nikula         2026-06-15  325  	intel_opregion_cleanup(display);
40053823baadce Jani Nikula         2023-04-14  326  
40053823baadce Jani Nikula         2023-04-14  327  	return ret;
40053823baadce Jani Nikula         2023-04-14  328  }
5e2e6b595d9d4c Juha-Pekka Heikkila 2025-12-16  329  ALLOW_ERROR_INJECTION(intel_display_driver_probe_noirq, ERRNO);
40053823baadce Jani Nikula         2023-04-14  330  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-08-04 15:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-30  3:16 [PATCH] drm/i915/display: fix error handling in intel_display_driver_probe_noirq yaolu
2026-06-30 10:12 ` Jani Nikula
2026-07-01  1:15 ` [PATCH v2] " yaolu
2026-07-02  1:12   ` [PATCH v3] " yaolu
2026-08-04 13:50 ` [PATCH] " kernel test robot
2026-08-04 15:14 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox