fbdev: fbmem: add a helper to determine if an aperture is used by a fw fb
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 23 Dec 2021 03:41:18 +0000 (22:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jan 2022 14:35:16 +0000 (15:35 +0100)
commitfa3d8456f7cd7d20acaa2223241c4e171dc8b740
treefed17261672fb62e0bc0973ef8dd4876103c2c68
parent9ca97a693aa8b86e8424f0047198ea3ab997d50f
fbdev: fbmem: add a helper to determine if an aperture is used by a fw fb

commit 9a45ac2320d0a6ae01880a30d4b86025fce4061b upstream.

Add a function for drivers to check if the a firmware initialized
fb is corresponds to their aperture.  This allows drivers to check if the
device corresponds to what the firmware set up as the display device.

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=215203
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1840
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/fbdev/core/fbmem.c
include/linux/fb.h