Skip to content

fbdev: Request memory regions in platform drivers

Amit Barzilai dri-devel linux-fbdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3fbdev: cobalt_lcdfb: Request memory regiondrivers/video/fbdev/cobalt_lcdfb.c+3 -93 replies
2/3fbdev: clps711x-fb: Request memory region for MMIOdrivers/video/fbdev/clps711x-fb.c+3 -60 replies
3/3fbdev: goldfishfb: Request memory regiondrivers/video/fbdev/goldfishfb.c+3 -51 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] fbdev: Request memory regions in platform drivers

Several fbdev platform drivers call ioremap() on their hardware MMIO without first claiming the range via request_mem_region(). This leaves the kernel resource tree (/proc/iomem) with no record of the mapping, allowing another driver to silently map the same registers.

This series fixes three platform_device drivers by switching to helpers that combine resource claiming and ioremap in a single managed call. cobalt_lcdfb and clps711x-fb are converted to devm_platform_get_and_ioremap_resource(); goldfishfb is converted to devm_ioremap_resource(), which also lets us drop the manual iounmap() calls from the error path and remove function.

For clps711x-fb, resource 1 (the framebuffer range) already used devm_platform_get_and_ioremap_resource() correctly; this series makes resource 0 (the MMIO control registers) consistent with it.

This is part of the ongoing effort described in Documentation/drm/todo.rst ("Request memory regions in all fbdev drivers").

Amit Barzilai (3):
fbdev: cobalt_lcdfb: Request memory region
fbdev: clps711x-fb: Request memory region for MMIO
fbdev: goldfishfb: Request memory region

 drivers/video/fbdev/clps711x-fb.c  |  9 +++------
 drivers/video/fbdev/cobalt_lcdfb.c | 12 +++---------
 drivers/video/fbdev/goldfishfb.c   |  8 +++-----
 3 files changed, 9 insertions(+), 20 deletions(-)

base-commit: 3f9357c30a44734d45e3093c521d52b2aefb09f5

Signature · 1 line
2.53.0