Re: [PATCH] drm/i915: avoid flush_scheduled_work() usage

2023-03-06 Thread Tetsuo Handa
On 2023/03/06 20:05, Jani Nikula wrote: > On Fri, 03 Mar 2023, Tetsuo Handa wrote: >> On 2023/03/03 19:11, Tetsuo Handa wrote: >>> @@ -79,6 +81,7 @@ static int __init i915_init(void) >>> { >>> int err, i; >>> >>> + i915_wq = alloc_workqueue("i915", 0, 0); >> >> Oops. I forgot to add >> >>

Re: [PATCH] drm/i915: avoid flush_scheduled_work() usage

2023-03-06 Thread Jani Nikula
On Fri, 03 Mar 2023, Tetsuo Handa wrote: > On 2023/03/03 19:11, Tetsuo Handa wrote: >> @@ -79,6 +81,7 @@ static int __init i915_init(void) >> { >> int err, i; >> >> +i915_wq = alloc_workqueue("i915", 0, 0); > > Oops. I forgot to add > > if (!i915_wq) > return -ENOME

Re: [PATCH] drm/i915: avoid flush_scheduled_work() usage

2023-03-03 Thread Tetsuo Handa
On 2023/03/03 19:11, Tetsuo Handa wrote: > @@ -79,6 +81,7 @@ static int __init i915_init(void) > { > int err, i; > > + i915_wq = alloc_workqueue("i915", 0, 0); Oops. I forgot to add if (!i915_wq) return -ENOMEM; here. But I'd like to wait for your response fo

[PATCH] drm/i915: avoid flush_scheduled_work() usage

2023-03-03 Thread Tetsuo Handa
Like commit c4f135d643823a86 ("workqueue: Wrap flush_workqueue() using a macro") says, flush_scheduled_work() is dangerous and will be forbidden. There was an attempt to remove flush_scheduled_work() from intel_modeset_driver_remove_noirq(), but it went to backlog [1]. Now that i915 is about to b