Commit 6ca80b9e authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/fbdev-generic: Rename struct fb_info 'fbi' to 'info'

The generic fbdev emulation names variables of type struct fb_info
both 'fbi' and 'info'. The latter seems to be more common in fbdev
code, so name fbi accordingly.

Also replace the duplicate variable in drm_fbdev_fb_destroy().
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-11-tzimmermann@suse.de
parent 7f5fe873
...@@ -46,16 +46,15 @@ static int drm_fbdev_fb_release(struct fb_info *info, int user) ...@@ -46,16 +46,15 @@ static int drm_fbdev_fb_release(struct fb_info *info, int user)
static void drm_fbdev_fb_destroy(struct fb_info *info) static void drm_fbdev_fb_destroy(struct fb_info *info)
{ {
struct drm_fb_helper *fb_helper = info->par; struct drm_fb_helper *fb_helper = info->par;
struct fb_info *fbi = fb_helper->info;
void *shadow = NULL; void *shadow = NULL;
if (!fb_helper->dev) if (!fb_helper->dev)
return; return;
if (fbi->fbdefio) if (info->fbdefio)
fb_deferred_io_cleanup(fbi); fb_deferred_io_cleanup(info);
if (drm_fbdev_use_shadow_fb(fb_helper)) if (drm_fbdev_use_shadow_fb(fb_helper))
shadow = fbi->screen_buffer; shadow = info->screen_buffer;
drm_fb_helper_fini(fb_helper); drm_fb_helper_fini(fb_helper);
...@@ -171,7 +170,7 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper, ...@@ -171,7 +170,7 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
struct drm_device *dev = fb_helper->dev; struct drm_device *dev = fb_helper->dev;
struct drm_client_buffer *buffer; struct drm_client_buffer *buffer;
struct drm_framebuffer *fb; struct drm_framebuffer *fb;
struct fb_info *fbi; struct fb_info *info;
u32 format; u32 format;
struct iosys_map map; struct iosys_map map;
int ret; int ret;
...@@ -190,35 +189,35 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper, ...@@ -190,35 +189,35 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
fb_helper->fb = buffer->fb; fb_helper->fb = buffer->fb;
fb = buffer->fb; fb = buffer->fb;
fbi = drm_fb_helper_alloc_info(fb_helper); info = drm_fb_helper_alloc_info(fb_helper);
if (IS_ERR(fbi)) if (IS_ERR(info))
return PTR_ERR(fbi); return PTR_ERR(info);
fbi->fbops = &drm_fbdev_fb_ops; info->fbops = &drm_fbdev_fb_ops;
fbi->screen_size = sizes->surface_height * fb->pitches[0]; info->screen_size = sizes->surface_height * fb->pitches[0];
fbi->fix.smem_len = fbi->screen_size; info->fix.smem_len = info->screen_size;
fbi->flags = FBINFO_DEFAULT; info->flags = FBINFO_DEFAULT;
drm_fb_helper_fill_info(fbi, fb_helper, sizes); drm_fb_helper_fill_info(info, fb_helper, sizes);
if (drm_fbdev_use_shadow_fb(fb_helper)) { if (drm_fbdev_use_shadow_fb(fb_helper)) {
fbi->screen_buffer = vzalloc(fbi->screen_size); info->screen_buffer = vzalloc(info->screen_size);
if (!fbi->screen_buffer) if (!info->screen_buffer)
return -ENOMEM; return -ENOMEM;
fbi->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST; info->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST;
fbi->fbdefio = &drm_fbdev_defio; info->fbdefio = &drm_fbdev_defio;
fb_deferred_io_init(fbi); fb_deferred_io_init(info);
} else { } else {
/* buffer is mapped for HW framebuffer */ /* buffer is mapped for HW framebuffer */
ret = drm_client_buffer_vmap(fb_helper->buffer, &map); ret = drm_client_buffer_vmap(fb_helper->buffer, &map);
if (ret) if (ret)
return ret; return ret;
if (map.is_iomem) { if (map.is_iomem) {
fbi->screen_base = map.vaddr_iomem; info->screen_base = map.vaddr_iomem;
} else { } else {
fbi->screen_buffer = map.vaddr; info->screen_buffer = map.vaddr;
fbi->flags |= FBINFO_VIRTFB; info->flags |= FBINFO_VIRTFB;
} }
/* /*
...@@ -227,10 +226,10 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper, ...@@ -227,10 +226,10 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
* case. * case.
*/ */
#if IS_ENABLED(CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM) #if IS_ENABLED(CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM)
if (fb_helper->hint_leak_smem_start && fbi->fix.smem_start == 0 && if (fb_helper->hint_leak_smem_start && info->fix.smem_start == 0 &&
!drm_WARN_ON_ONCE(dev, map.is_iomem)) !drm_WARN_ON_ONCE(dev, map.is_iomem))
fbi->fix.smem_start = info->fix.smem_start =
page_to_phys(virt_to_page(fbi->screen_buffer)); page_to_phys(virt_to_page(info->screen_buffer));
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment