firmware/sysfb: Set firmware-framebuffer parent device
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 12 Feb 2024 09:06:11 +0000 (10:06 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 14 Feb 2024 09:09:17 +0000 (10:09 +0100)
commit9eac534db0013aff9b9124985dab114600df9081
tree021ca3f4fcfe89d2881a3ae1c323bc0fc740bd5e
parent036105e3a776b6fc2fe0d262896a23ff2cc2e6b1
firmware/sysfb: Set firmware-framebuffer parent device

Set the firmware framebuffer's parent device, which usually is the
graphics hardware's physical device. Integrates the framebuffer in
the Linux device hierarchy and lets Linux handle dependencies among
devices. For example, the graphics hardware won't be suspended while
the firmware device is still active.

v4:
* fix build for CONFIG_SYSFB_SIMPLEFB=n, again
v3:
* fix build for CONFIG_SYSFB_SIMPLEFB=n (Sui)
* test result of screen_info_pci_dev() for errors (Sui)
v2:
* detect parent device in sysfb_parent_dev()

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240212090736.11464-4-tzimmermann@suse.de
drivers/firmware/sysfb.c
drivers/firmware/sysfb_simplefb.c
include/linux/sysfb.h