Skip to content

drm,fbdev: Move video= option to drivers/video

Thomas Zimmermann dri-devel linux-fbdev linuxppc-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11fbdev: Fix contact info in fb_cmdline.cdrivers/video/fbdev/core/fb_cmdline.c+1 -11 reply
2/11fbdev: Transfer video= option strings to caller; clarify ownershipdrivers/video/fbdev/core/fb_cmdline.c+12 -43 replies
3/11fbdev: Support NULL for name in option-string lookupdrivers/video/fbdev/core/fb_cmdline.c+6 -11 reply
4/11drivers/ps3: Read video= option with fb_get_option()drivers/ps3/ps3av.c+9 -24 replies
5/11fbdev: Read video= option with fb_get_option() in modedbdrivers/video/fbdev/core/modedb.c+6 -21 reply
6/11fbdev: Unexport fb_mode_optiondrivers/video/fbdev/core/fb_cmdline.c include/linux/fb.h+1 -41 reply
7/11fbdev: Move option-string lookup into helperdrivers/video/fbdev/core/fb_cmdline.c+36 -241 reply
8/11fbdev: Handle video= parameter in video/cmdline.cdrivers/gpu/drm/Kconfig drivers/video/Kconfig drivers/video/Makefile +5 more+172 -881 reply
9/11driver/ps3: Include <video/cmdline.h> for mode parsingdrivers/ps3/ps3av.c+6 -121 reply
10/11drm: Include <video/cmdline.h> for mode parsingdrivers/gpu/drm/drm_connector.c+6 -31 reply
11/11drm: Fix comment on mode parsingdrivers/gpu/drm/drm_modes.c+1 -21 reply

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchGeoff LevandJavier Martinez Canillas
1/11R-b
2/11R-b
3/11R-b
4/11T-b R-b
5/11R-b
6/11R-b
7/11R-b
8/11R-b
9/11R-b
10/11R-b
11/11R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/11] drm,fbdev: Move video= option to drivers/video

The kernel's video= option sets the initial video mode. It is shared by fbdev and DRM, but located within the fbdev code. Move it to drivers/video/ and adapt callers. Allows DRM (and others) to use the option without depending on fbdev.

While at it, fix the interface of the lookup functions. This requires a number of changes. First clarify the ownership of the option string in patch 2. The helper fb_get_options() returns the video= parameter's value. It's sometimes a copy and sometimes the original string. Hence callers, mostly fbdev drivers, have just leaked the returned string. Change this to always duplicate the option string in fb_get_options() and transfer ownership of the copy to the caller. We can then start to fix the memory leaks in the fbdev drivers.

There's a global video= setting and a number of per-output settings. In patches 3 to 5, support explicit lookup of the global video option and lookup the string in fbdev's modedb and in a PS3 driver. Then avoid exporting the global setting's internal state variable in patch 6.

Finally, in patches 7 to 11, move the video= option to drivers/video. It can be used directly in DRM and a PS3 driver. This fixes any memory leaks from the returned option string. For fbdev drivers, the helper fb_get_options() remains as an adapter aroudn the new interface.

Tested with DRM and fbdev and built for the PS3.

Thomas Zimmermann (11):
fbdev: Fix contact info in fb_cmdline.c
fbdev: Transfer video= option strings to caller; clarify ownership
fbdev: Support NULL for name in option-string lookup drivers/ps3: Read video= option with fb_get_option()
fbdev: Read video= option with fb_get_option() in modedb
fbdev: Unexport fb_mode_option
fbdev: Move option-string lookup into helper
fbdev: Handle video= parameter in video/cmdline.c driver/ps3: Include <video/cmdline.h> for mode parsing
drm: Include <video/cmdline.h> for mode parsing
drm: Fix comment on mode parsing

 drivers/gpu/drm/Kconfig               |   2 +-
 drivers/gpu/drm/drm_connector.c       |   9 +-
 drivers/gpu/drm/drm_modes.c           |   3 +-
 drivers/ps3/ps3av.c                   |   9 +-
 drivers/video/Kconfig                 |   3 +
 drivers/video/Makefile                |   1 +
 drivers/video/cmdline.c               | 133 ++++++++++++++++++++++++++
 drivers/video/fbdev/Kconfig           |   5 +-
 drivers/video/fbdev/core/Makefile     |   3 +-
 drivers/video/fbdev/core/fb_cmdline.c |  94 +++++-------------
 drivers/video/fbdev/core/modedb.c     |   8 +-
 include/linux/fb.h                    |   1 -
 include/video/cmdline.h               |  20 ++++
 13 files changed, 202 insertions(+), 89 deletions(-)
 create mode 100644 drivers/video/cmdline.c
 create mode 100644 include/video/cmdline.h

base-commit: 1a019dd7a5d25f7c1c9b77931138290e28947e6a

Signature · 1 line
2.39.1