diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-04-19 10:28:57 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2024-05-02 11:33:13 +0200 |
commit | abc79a0e0a3e8e900db76e0f7b1c34c6f6c4c282 (patch) | |
tree | 214c5a78f1524f02b32b929389d5793365eb24d6 /drivers/video | |
parent | fbdev/deferred-io: Clean up pageref on lastclose (diff) | |
download | linux-abc79a0e0a3e8e900db76e0f7b1c34c6f6c4c282.tar.xz linux-abc79a0e0a3e8e900db76e0f7b1c34c6f6c4c282.zip |
fbdev/deferred-io: Test screen_buffer for vmalloc'ed memory
Framebuffers in virtual memory are available via screen_buffer. Use
it instead of screen_base and avoid the type casting.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240419083331.7761-5-tzimmermann@suse.de
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/core/fb_defio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c index a10ba09639ad..45e8708eb223 100644 --- a/drivers/video/fbdev/core/fb_defio.c +++ b/drivers/video/fbdev/core/fb_defio.c @@ -25,11 +25,11 @@ static struct page *fb_deferred_io_page(struct fb_info *info, unsigned long offs) { - void *screen_base = (void __force *) info->screen_base; + const void *screen_buffer = info->screen_buffer; struct page *page; - if (is_vmalloc_addr(screen_base + offs)) - page = vmalloc_to_page(screen_base + offs); + if (is_vmalloc_addr(screen_buffer + offs)) + page = vmalloc_to_page(screen_buffer + offs); else page = pfn_to_page((info->fix.smem_start + offs) >> PAGE_SHIFT); |