All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/33] fbcon notifier begone!
@ 2019-05-24  8:53 ` Daniel Vetter
  0 siblings, 0 replies; 103+ messages in thread
From: Daniel Vetter @ 2019-05-24  8:53 UTC (permalink / raw)
  To: LKML; +Cc: Intel Graphics Development, DRI Development, Daniel Vetter

Hi all,

I fixed the fbcon_exited mess that CI spotted (hopefully it works now, the
code is still rather brittle imo). Plus all the little nits 0day and
people found.

Maarten slapped an rb onto the entire pile, but I feel like enough has
changed that a 2nd look from him is warranted.

I also added a backlight patch on top, I think that nicely highlights how
the fb notifier is now only used for backlight notifications. Maybe we
could rename it as a follow-up to make that clear.

Oh and one rather badly looking thing: am200epd is abusing the notifier in
very interesting ways. I guess a proper fix would be to figure out where
the display boot memory reservation is some more direct way, instead of
listening to the fw fb driver. But that's definitely outside of my
knowledge, so I left it at a bunch of #ifdef and comments.

I think we also still need an ack from Greg KH for the vt and staging
bits.

As usual, comments, review and testing very much welcome.

btw for future plans: I think this is tricky enough (it's old code and all
that) that we should let this soak for 2-3 kernel releases. I think the
following would be nice subsequent cleanup/fixes:

- push the console lock completely from fbmem.c to fbcon.c. I think we're
  mostly there with prep, but needs to pondering of corner cases.

- move fbcon.c from using indices for tracking fb_info (and accessing
  registered_fbs without proper locking all the time) to real fb_info
  pointers with the right amount of refcounting. Mostly motivated by the
  fun I had trying to simplify fbcon_exit().

- make sure that fbcon call lock/unlock_fb when it calls fbmem.c
  functions, and sprinkle assert_lockdep_held around in fbmem.c. This
  needs the console_lock cleanups first.

But I think that's material for maybe next year or so.

Cheers, Daniel

Daniel Vetter (33):
  dummycon: Sprinkle locking checks
  fbdev: locking check for fb_set_suspend
  vt: might_sleep() annotation for do_blank_screen
  vt: More locking checks
  fbdev/sa1100fb: Remove dead code
  fbdev/cyber2000: Remove struct display
  fbdev/aty128fb: Remove dead code
  fbcon: s/struct display/struct fbcon_display/
  fbcon: Remove fbcon_has_exited
  fbcon: call fbcon_fb_(un)registered directly
  fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify
  fbdev/omap: sysfs files can't disappear before the device is gone
  fbdev: sysfs files can't disappear before the device is gone
  staging/olpc: lock_fb_info can't fail
  fbdev/atyfb: lock_fb_info can't fail
  fbdev: lock_fb_info cannot fail
  fbcon: call fbcon_fb_bind directly
  fbdev: make unregister/unlink functions not fail
  fbdev: unify unlink_framebuffer paths
  fbdev/sh_mob: Remove fb notifier callback
  fbdev: directly call fbcon_suspended/resumed
  fbcon: Call fbcon_mode_deleted/new_modelist directly
  fbdev: Call fbcon_get_requirement directly
  Revert "backlight/fbcon: Add FB_EVENT_CONBLANK"
  fbmem: pull fbcon_fb_blanked out of fb_blank
  fbdev: remove FBINFO_MISC_USEREVENT around fb_blank
  fb: Flatten control flow in fb_set_var
  fbcon: replace FB_EVENT_MODE_CHANGE/_ALL with direct calls
  vgaswitcheroo: call fbcon_remap_all directly
  fbcon: Call con2fb_map functions directly
  fbcon: Document what I learned about fbcon locking
  staging/olpc_dcon: Add drm conversion to TODO
  backlight: simplify lcd notifier

 arch/arm/mach-pxa/am200epd.c                  |  13 +-
 drivers/gpu/vga/vga_switcheroo.c              |  11 +-
 drivers/media/pci/ivtv/ivtvfb.c               |   6 +-
 drivers/staging/fbtft/fbtft-core.c            |   4 +-
 drivers/staging/olpc_dcon/TODO                |   7 +
 drivers/staging/olpc_dcon/olpc_dcon.c         |   6 +-
 drivers/tty/vt/vt.c                           |  18 +
 drivers/video/backlight/backlight.c           |   2 +-
 drivers/video/backlight/lcd.c                 |  12 -
 drivers/video/console/dummycon.c              |   6 +
 drivers/video/fbdev/aty/aty128fb.c            |  64 ---
 drivers/video/fbdev/aty/atyfb_base.c          |   3 +-
 drivers/video/fbdev/core/fbcmap.c             |   6 +-
 drivers/video/fbdev/core/fbcon.c              | 311 ++++++--------
 drivers/video/fbdev/core/fbcon.h              |   6 +-
 drivers/video/fbdev/core/fbmem.c              | 399 +++++++-----------
 drivers/video/fbdev/core/fbsysfs.c            |  20 +-
 drivers/video/fbdev/cyber2000fb.c             |   1 -
 drivers/video/fbdev/neofb.c                   |   9 +-
 .../video/fbdev/omap2/omapfb/omapfb-sysfs.c   |  21 +-
 drivers/video/fbdev/sa1100fb.c                |  25 --
 drivers/video/fbdev/savage/savagefb_driver.c  |   9 +-
 drivers/video/fbdev/sh_mobile_lcdcfb.c        | 112 +----
 drivers/video/fbdev/sh_mobile_lcdcfb.h        |   5 -
 include/linux/console_struct.h                |   5 +-
 include/linux/fb.h                            |  45 +-
 include/linux/fbcon.h                         |  30 ++
 27 files changed, 394 insertions(+), 762 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 103+ messages in thread
* [PATCH 00/33] fbcon notifier begone v3!
@ 2019-05-28  9:02 Daniel Vetter
  2019-05-28  9:02   ` Daniel Vetter
  0 siblings, 1 reply; 103+ messages in thread
From: Daniel Vetter @ 2019-05-28  9:02 UTC (permalink / raw)
  To: LKML
  Cc: DRI Development, Intel Graphics Development, linux-fbdev,
	Daniel Thompson, Bartlomiej Zolnierkiewicz, Daniel Vetter

Hi all,

I think we're slowly getting there. Previous cover letters with more
context:

https://lists.freedesktop.org/archives/dri-devel/2019-May/218362.html

tldr; I have a multi-year plan to improve fbcon locking, because the
current thing is a bit a mess.

Cover letter of this version, where I detail a bit more the details
fixed in this one here:

https://lists.freedesktop.org/archives/dri-devel/2019-May/218984.html

Note that the locking plan in this one is already outdated, I overlooked a
few fun issues around any printk() going back to console_lock.

I think remaining bits:

- Ack from Daniel Thompson for the backlight bits, he wanted to check the
  big picture.

- Hash out actual merge plan.

I'm also cc'ing the entire pile to a lot more people on request.

Thanks, Daniel

Daniel Vetter (33):
  dummycon: Sprinkle locking checks
  fbdev: locking check for fb_set_suspend
  vt: might_sleep() annotation for do_blank_screen
  vt: More locking checks
  fbdev/sa1100fb: Remove dead code
  fbdev/cyber2000: Remove struct display
  fbdev/aty128fb: Remove dead code
  fbcon: s/struct display/struct fbcon_display/
  fbcon: Remove fbcon_has_exited
  fbcon: call fbcon_fb_(un)registered directly
  fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify
  fbdev/omap: sysfs files can't disappear before the device is gone
  fbdev: sysfs files can't disappear before the device is gone
  staging/olpc: lock_fb_info can't fail
  fbdev/atyfb: lock_fb_info can't fail
  fbdev: lock_fb_info cannot fail
  fbcon: call fbcon_fb_bind directly
  fbdev: make unregister/unlink functions not fail
  fbdev: unify unlink_framebuffer paths
  fbdev/sh_mob: Remove fb notifier callback
  fbdev: directly call fbcon_suspended/resumed
  fbcon: Call fbcon_mode_deleted/new_modelist directly
  fbdev: Call fbcon_get_requirement directly
  Revert "backlight/fbcon: Add FB_EVENT_CONBLANK"
  fbmem: pull fbcon_fb_blanked out of fb_blank
  fbdev: remove FBINFO_MISC_USEREVENT around fb_blank
  fb: Flatten control flow in fb_set_var
  fbcon: replace FB_EVENT_MODE_CHANGE/_ALL with direct calls
  vgaswitcheroo: call fbcon_remap_all directly
  fbcon: Call con2fb_map functions directly
  fbcon: Document what I learned about fbcon locking
  staging/olpc_dcon: Add drm conversion to TODO
  backlight: simplify lcd notifier

 arch/arm/mach-pxa/am200epd.c                  |  13 +-
 drivers/gpu/vga/vga_switcheroo.c              |  11 +-
 drivers/media/pci/ivtv/ivtvfb.c               |   6 +-
 drivers/staging/fbtft/fbtft-core.c            |   4 +-
 drivers/staging/olpc_dcon/TODO                |   7 +
 drivers/staging/olpc_dcon/olpc_dcon.c         |   6 +-
 drivers/tty/vt/vt.c                           |  18 +
 drivers/video/backlight/backlight.c           |   2 +-
 drivers/video/backlight/lcd.c                 |  12 -
 drivers/video/console/dummycon.c              |   6 +
 drivers/video/fbdev/aty/aty128fb.c            |  64 ---
 drivers/video/fbdev/aty/atyfb_base.c          |   3 +-
 drivers/video/fbdev/core/fbcmap.c             |   6 +-
 drivers/video/fbdev/core/fbcon.c              | 313 ++++++--------
 drivers/video/fbdev/core/fbcon.h              |   6 +-
 drivers/video/fbdev/core/fbmem.c              | 399 +++++++-----------
 drivers/video/fbdev/core/fbsysfs.c            |  20 +-
 drivers/video/fbdev/cyber2000fb.c             |   1 -
 drivers/video/fbdev/neofb.c                   |   9 +-
 .../video/fbdev/omap2/omapfb/omapfb-sysfs.c   |  21 +-
 drivers/video/fbdev/sa1100fb.c                |  25 --
 drivers/video/fbdev/savage/savagefb_driver.c  |   9 +-
 drivers/video/fbdev/sh_mobile_lcdcfb.c        | 132 +-----
 drivers/video/fbdev/sh_mobile_lcdcfb.h        |   5 -
 include/linux/console_struct.h                |   5 +-
 include/linux/fb.h                            |  45 +-
 include/linux/fbcon.h                         |  30 ++
 27 files changed, 396 insertions(+), 782 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2019-05-28  9:03 UTC | newest]

Thread overview: 103+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24  8:53 [PATCH 00/33] fbcon notifier begone! Daniel Vetter
2019-05-24  8:53 ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 01/33] dummycon: Sprinkle locking checks Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 02/33] fbdev: locking check for fb_set_suspend Daniel Vetter
2019-05-24  8:53 ` [PATCH 03/33] vt: might_sleep() annotation for do_blank_screen Daniel Vetter
2019-05-24  8:53 ` [PATCH 04/33] vt: More locking checks Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-27  7:08   ` Daniel Vetter
2019-05-27  7:08     ` Daniel Vetter
2019-05-27  7:22     ` Greg Kroah-Hartman
2019-05-24  8:53 ` [PATCH 05/33] fbdev/sa1100fb: Remove dead code Daniel Vetter
2019-05-24  8:53 ` [PATCH 06/33] fbdev/cyber2000: Remove struct display Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 07/33] fbdev/aty128fb: Remove dead code Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 08/33] fbcon: s/struct display/struct fbcon_display/ Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 09/33] fbcon: Remove fbcon_has_exited Daniel Vetter
2019-05-25 15:38   ` Sam Ravnborg
2019-05-25 15:38     ` Sam Ravnborg
2019-05-27  6:10     ` Daniel Vetter
2019-05-27  6:10       ` Daniel Vetter
2019-05-27  6:51       ` Sam Ravnborg
2019-05-27  6:51         ` Sam Ravnborg
2019-05-24  8:53 ` [PATCH 10/33] fbcon: call fbcon_fb_(un)registered directly Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 11/33] fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-25 15:01   ` Sam Ravnborg
2019-05-25 15:01     ` Sam Ravnborg
2019-05-27  6:13     ` Daniel Vetter
2019-05-27  6:52       ` Sam Ravnborg
2019-05-24  8:53 ` [PATCH 12/33] fbdev/omap: sysfs files can't disappear before the device is gone Daniel Vetter
2019-05-24  8:53 ` [PATCH 13/33] fbdev: " Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 14/33] staging/olpc: lock_fb_info can't fail Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-27  7:10   ` Daniel Vetter
2019-05-27  7:22     ` Greg KH
2019-05-27  7:22       ` Greg KH
2019-05-24  8:53 ` [PATCH 15/33] fbdev/atyfb: " Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 16/33] fbdev: lock_fb_info cannot fail Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 17/33] fbcon: call fbcon_fb_bind directly Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 18/33] fbdev: make unregister/unlink functions not fail Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 19/33] fbdev: unify unlink_framebuffer paths Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 20/33] fbdev/sh_mob: Remove fb notifier callback Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 21/33] fbdev: directly call fbcon_suspended/resumed Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 22/33] fbcon: Call fbcon_mode_deleted/new_modelist directly Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 23/33] fbdev: Call fbcon_get_requirement directly Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 24/33] Revert "backlight/fbcon: Add FB_EVENT_CONBLANK" Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24 13:14   ` Daniel Thompson
2019-05-24 13:14     ` Daniel Thompson
2019-05-24 13:14     ` Daniel Thompson
2019-05-24 15:28     ` Daniel Vetter
2019-05-24 15:28       ` Daniel Vetter
2019-05-27 10:59       ` Bartlomiej Zolnierkiewicz
2019-05-27 10:59         ` Bartlomiej Zolnierkiewicz
2019-05-24  8:53 ` [PATCH 25/33] fbmem: pull fbcon_fb_blanked out of fb_blank Daniel Vetter
2019-05-25 17:00   ` Sam Ravnborg
2019-05-25 17:00     ` Sam Ravnborg
2019-05-24  8:53 ` [PATCH 26/33] fbdev: remove FBINFO_MISC_USEREVENT around fb_blank Daniel Vetter
2019-05-24  8:53 ` [PATCH 27/33] fb: Flatten control flow in fb_set_var Daniel Vetter
2019-05-24  8:53 ` [PATCH 28/33] fbcon: replace FB_EVENT_MODE_CHANGE/_ALL with direct calls Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 29/33] vgaswitcheroo: call fbcon_remap_all directly Daniel Vetter
2019-05-24  8:53   ` Daniel Vetter
2019-05-24  8:53 ` [PATCH 30/33] fbcon: Call con2fb_map functions directly Daniel Vetter
2019-05-24  8:53 ` [PATCH 31/33] fbcon: Document what I learned about fbcon locking Daniel Vetter
2019-05-24  8:53 ` [PATCH 32/33] staging/olpc_dcon: Add drm conversion to TODO Daniel Vetter
2019-05-27  7:11   ` Daniel Vetter
2019-05-27  7:11     ` Daniel Vetter
2019-05-27  7:22     ` Greg KH
2019-05-24  8:53 ` [PATCH 33/33] backlight: simplify lcd notifier Daniel Vetter
2019-05-24 11:03 ` ✗ Fi.CI.CHECKPATCH: warning for fbcon notifier begone! (rev3) Patchwork
2019-05-24 11:18 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-24 11:23 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-25 17:19 ` [PATCH 00/33] fbcon notifier begone! Sam Ravnborg
2019-05-27  7:17   ` Daniel Vetter
2019-05-27 11:56     ` Daniel Vetter
2019-05-25 17:24 ` ✗ Fi.CI.IGT: failure for fbcon notifier begone! (rev3) Patchwork
2019-05-26 15:34 ` ✗ Fi.CI.CHECKPATCH: warning for fbcon notifier begone! (rev4) Patchwork
2019-05-26 15:49 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-26 15:53 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-27 11:02 ` ✓ Fi.CI.IGT: " Patchwork
2019-05-28  9:02 [PATCH 00/33] fbcon notifier begone v3! Daniel Vetter
2019-05-28  9:02 ` [PATCH 26/33] fbdev: remove FBINFO_MISC_USEREVENT around fb_blank Daniel Vetter
2019-05-28  9:02   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.