diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-04-28 14:24:42 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-05-08 15:28:33 +0200 |
commit | bdb616479eff419d5f881efbf1485ed098cbdbce (patch) | |
tree | e0bc81b7fa17cadd00e531b435d2afc7066d1949 /drivers/video/fbdev/ps3fb.c | |
parent | 867187821e5eb02f37e03d98d5f3c9cb65faaa11 (diff) | |
download | linux-stable-bdb616479eff419d5f881efbf1485ed098cbdbce.tar.gz linux-stable-bdb616479eff419d5f881efbf1485ed098cbdbce.tar.bz2 linux-stable-bdb616479eff419d5f881efbf1485ed098cbdbce.zip |
fbdev/ps3fb: Use struct fb_info.screen_buffer
Use info->screen_buffer when reading and writing framebuffers in
system memory. It's the correct pointer for this address space.
The struct fb_info has a union to store the framebuffer memory. This can
either be info->screen_base if the framebuffer is stored in I/O memory,
or info->screen_buffer if the framebuffer is stored in system memory.
As the driver operates on the latter address space, it is wrong to use
.screen_base and .screen_buffer must be used instead. This also gets
rid of casting needed due to not using the correct data type.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230428122452.4856-10-tzimmermann@suse.de
Diffstat (limited to 'drivers/video/fbdev/ps3fb.c')
-rw-r--r-- | drivers/video/fbdev/ps3fb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/ps3fb.c b/drivers/video/fbdev/ps3fb.c index 2fe08b67eda7..8dfa9f404816 100644 --- a/drivers/video/fbdev/ps3fb.c +++ b/drivers/video/fbdev/ps3fb.c @@ -650,7 +650,7 @@ static int ps3fb_set_par(struct fb_info *info) } /* Clear XDR frame buffer memory */ - memset((void __force *)info->screen_base, 0, info->fix.smem_len); + memset(info->screen_buffer, 0, info->fix.smem_len); /* Clear DDR frame buffer memory */ lines = vmode->yres * par->num_frames; @@ -1139,7 +1139,7 @@ static int ps3fb_probe(struct ps3_system_bus_device *dev) * memory */ fb_start = ps3fb_videomemory.address + GPU_FB_START; - info->screen_base = (char __force __iomem *)fb_start; + info->screen_buffer = fb_start; info->fix.smem_start = __pa(fb_start); info->fix.smem_len = ps3fb_videomemory.size - GPU_FB_START; |