]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
drm/sysfb: Fix efidrm error handling and memory type mismatch
authorChen Ni <nichen@iscas.ac.cn>
Wed, 11 Mar 2026 06:46:52 +0000 (14:46 +0800)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 31 Mar 2026 11:04:51 +0000 (13:04 +0200)
commit5e77923a3eb39cce91bf08ed7670f816bf86d4af
tree22173db4fb373021d554bbef3c44e2777df8f547
parent2f42c1a6161646cbd29b443459fd635d29eda634
drm/sysfb: Fix efidrm error handling and memory type mismatch

Fix incorrect error checking and memory type confusion in
efidrm_device_create(). devm_memremap() returns error pointers, not
NULL, and returns system memory while devm_ioremap() returns I/O memory.
The code incorrectly passes system memory to iosys_map_set_vaddr_iomem().

Restructure to handle each memory type separately. Use devm_ioremap*()
with ERR_PTR(-ENXIO) for WC/UC, and devm_memremap() with ERR_CAST() for
WT/WB.

Fixes: 32ae90c66fb6 ("drm/sysfb: Add efidrm for EFI displays")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260311064652.2903449-1-nichen@iscas.ac.cn
drivers/gpu/drm/sysfb/efidrm.c