Skip to content

drm, coreboot: Add DRM coreboot driver

Thomas Zimmermann chrome-platform dri-devel linux-fbdev stable 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest12 patches 0 repliesNew
  2. v312 patches 7 repliesSuperseded
  3. v212 patches 24 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches16 repliesSuperseded

Changes in v4 from the cover letter

- sort include statements
- remove changelog from commit description in coreboot patch #9 v3:
- avoid packed types for coreboot headers
- comment in various places
- fix typos

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12firmware: google: framebuffer: Do not unregister platform devicedrivers/firmware/google/framebuffer-coreboot.c+0 -100 replies
2/12firmware: google: framebuffer: Do not mark framebuffer as busydrivers/firmware/google/framebuffer-coreboot.c+1 -10 replies
3/12firmware: google: framebuffer: Init memory resource with helper macrodrivers/firmware/google/framebuffer-coreboot.c+5 -100 replies
4/12firmware: google: framebuffer: Tie platform device to PCI hardwaredrivers/firmware/google/framebuffer-coreboot.c+77 -50 replies
5/12firmware: google: framebuffer: Fix dependenciesdrivers/firmware/google/Kconfig+2 -20 replies
6/12firmware: google: Init coreboot bus with subsys_initcall()drivers/firmware/google/coreboot_table.c+1 -10 replies
7/12firmware: google: Clean up include statements in coreboot_table.hdrivers/firmware/google/cbmem.c drivers/firmware/google/coreboot_table.c drivers/firmware/google/coreboot_table.h +3 more+7 -10 replies
8/12firmware: google: Export coreboot table entriesMAINTAINERS drivers/firmware/google/coreboot_table.c drivers/firmware/google/coreboot_table.h +2 more+78 -610 replies
9/12firmware: google: Pack structures for coreboot table entriesinclude/linux/coreboot.h+6 -30 replies
10/12drm/sysfb: Generalize pixel-format matchingdrivers/gpu/drm/sysfb/drm_sysfb.c drivers/gpu/drm/sysfb/drm_sysfb_helper.h drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c +2 more+42 -360 replies
11/12drm/sysfb: corebootdrm: Add DRM driver for coreboot framebuffersdrivers/firmware/google/Kconfig drivers/firmware/google/framebuffer-coreboot.c drivers/gpu/drm/sysfb/Kconfig +3 more+458 -40 replies
12/12drm/sysfb: corebootdrm: Support panel orientationdrivers/gpu/drm/sysfb/corebootdrm.c include/linux/coreboot.h+39 -40 replies

Reviews trailers per patch

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

PatchTzung-Bi ShihJulius WernerJavier Martinez Canillas
1/12A-b A-b
2/12A-b A-b
3/12A-b A-b
4/12A-b A-b
5/12A-b A-b
6/12A-b A-b R-b
7/12A-b A-b R-b
8/12A-b A-b
9/12A-b A-b
10/12A-b R-b
11/12A-b A-b R-b
12/12A-b A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 00/12] drm, coreboot: Add DRM coreboot driver

Coreboot implements framebuffer support via simple-framebuffer. Provide a dedicated DRM driver. Keep the simple-framebuffer code for now.

For each firmware's provided framebuffer, we prefer a dedicated DRM driver tailored towards the platform's feature set. The coreboot framebuffer device currently creates a simple-framebuffer device for the provided framebuffer aperture. But simple-framebuffer is for DeviceTree nodes; not for coreboot. The simple-framebuffer infrastructure should be phased out for non-DT use cases. Coreboot is one of the final users of the code (besides n64).

Patches 1 to 5 start by fixing problems in the coreboot framebuffer implementation. There is a possible dangling pointer, the memory is marked as busy, the device hierarchy is incorrect, and a few minor things.

Patches 6 to 9 prepare the coreboot support for use by external drivers. Specifically, structures for the entries os the coreboot payload table have to be exported.

Patches 10 to 12 add corebootdrm, a DRM driver for the new coreboot-framebuffer platform device. Corebootdrm follows the pattern established by similar drivers. It also uses the same sysfb helpers. It is therefore fairly small. With patch 11, it has feature parity with simpledrm on the old simple-framebuffer. Patch 12 adds support for panel- orientation flags that coreboot makes available.

Tested on an HP Chromebook with MrChromebox 4.16. Runs with Weston and fbcon. Xorg requires an additional patch available at [1].

v4:
- sort include statements
- remove changelog from commit description in coreboot patch #9 v3:
- avoid packed types for coreboot headers
- comment in various places
- fix typos
v2:
- keep design of coreboot framebuffer code intact
- fix bugs in the coreboot framebuffer code
- rewrite corebootdrm as platform device
- support panel orientation

[1] https://gitlab.freedesktop.org/tzimmermann/xserver/-/commit/0b326aad28549762ed2b0e2bedf8f8a42f1f6b3b

Thomas Zimmermann (12):
firmware: google: framebuffer: Do not unregister platform device
firmware: google: framebuffer: Do not mark framebuffer as busy
firmware: google: framebuffer: Init memory resource with helper macro
firmware: google: framebuffer: Tie platform device to PCI hardware
firmware: google: framebuffer: Fix dependencies
firmware: google: Init coreboot bus with subsys_initcall()
firmware: google: Clean up include statements in coreboot_table.h
firmware: google: Export coreboot table entries
firmware: google: Pack structures for coreboot table entries drm/sysfb: Generalize pixel-format matching
drm/sysfb: corebootdrm: Add DRM driver for coreboot framebuffers drm/sysfb: corebootdrm: Support panel orientation

 MAINTAINERS                                   |   1 +
 drivers/firmware/google/Kconfig               |   5 +-
 drivers/firmware/google/cbmem.c               |   1 +
 drivers/firmware/google/coreboot_table.c      |  13 +-
 drivers/firmware/google/coreboot_table.h      |  59 +--
 .../firmware/google/framebuffer-coreboot.c    | 126 +++--
 drivers/firmware/google/memconsole-coreboot.c |   1 +
 drivers/firmware/google/vpd.c                 |   1 +
 drivers/gpu/drm/sysfb/Kconfig                 |  16 +
 drivers/gpu/drm/sysfb/Makefile                |   1 +
 drivers/gpu/drm/sysfb/corebootdrm.c           | 434 ++++++++++++++++++
 drivers/gpu/drm/sysfb/drm_sysfb.c             |  24 +
 drivers/gpu/drm/sysfb/drm_sysfb_helper.h      |   8 +-
 drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c |  30 --
 drivers/gpu/drm/sysfb/efidrm.c                |   8 +-
 drivers/gpu/drm/sysfb/vesadrm.c               |   8 +-
 include/linux/coreboot.h                      |  90 ++++
 17 files changed, 702 insertions(+), 124 deletions(-)
 create mode 100644 drivers/gpu/drm/sysfb/corebootdrm.c
 create mode 100644 include/linux/coreboot.h

base-commit: 0082025812a31eda451fb14f13f52683ed375c49

Signature · 1 line
2.52.0