]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/sysfb: Share helpers for screen_info validation
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 10 Apr 2025 08:37:25 +0000 (10:37 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 14 Apr 2025 08:16:14 +0000 (10:16 +0200)
commite8c086880b2bac0ebc931b635b3b10bdc5ec6496
tree0de330e6b6ea0e2ac204ccaca68b1919aa9ca6be
parent6046b49bafff47726a377ef05dc55ef7dec01cbd
drm/sysfb: Share helpers for screen_info validation

Share efidrm's and vesadrm's validation of struct screen_info in
shared helpers. Update the drivers.

Most validation helpers test individual values against limits and
can be shared as they are. For color formats, a common helper looks
up the correct DRM format info from a driver-provided list of color
formats.

These screen_info helpers are only available if CONFIG_SCREEN_INFO
has been selected, as done by efidrm and vesadrm.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250410083834.10810-4-tzimmermann@suse.de
drivers/gpu/drm/sysfb/Makefile
drivers/gpu/drm/sysfb/drm_sysfb_helper.h
drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c [new file with mode: 0644]
drivers/gpu/drm/sysfb/efidrm.c
drivers/gpu/drm/sysfb/vesadrm.c