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
This commit is contained in:
parent
867187821e
commit
bdb616479e
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user