OSDN Git Service

fbcon: Use delayed work for cursor
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 5 Apr 2022 21:03:24 +0000 (23:03 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 7 Apr 2022 14:52:13 +0000 (16:52 +0200)
commit3b0fb6ab25dda03f6077bf8fce9407bb0d4db6ea
treed86c57c5462ef7bb7394be39f6e634b43fe30904
parent9ad5cc9bcfd62b0f39e7f85992d2a371ff369324
fbcon: Use delayed work for cursor

Allows us to delete a bunch of hand-rolled stuff using a timer plus a
separate work). Also to simplify the code we initialize the
cursor_work completely when we allocate the fbcon_ops structure,
instead of trying to cope with console re-initialization.

The motiviation here is that fbcon code stops using the fb_info.queue,
which helps with locking issues around cleanup and all that in a later
patch.

Also note that this allows us to ditch the hand-rolled work cleanup in
fbcon_exit - we already call fbcon_del_cursor_timer, which takes care
of everything. Plus this was racy anyway.

v2:
- Only INIT_DELAYED_WORK when kzalloc succeeded (Tetsuo)
- Explain that we replace both the timer and a work with the combined
  delayed_work (Javier)

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Claudio Suarez <cssk@net-c.es>
Cc: Du Cheng <ducheng2@gmail.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Link: https://patchwork.freedesktop.org/patch/msgid/20220405210335.3434130-7-daniel.vetter@ffwll.ch
drivers/video/fbdev/core/fbcon.c
drivers/video/fbdev/core/fbcon.h