Commit b9c93f4e authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/fbdev-generic: Rename symbols

Rename symbols to match the style of other fbdev-emulation source
code. No functional changes.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Acked-by: default avatarZack Rusin <zackr@vmware.com>
Tested-by: default avatarSui Jingfeng <suijingfeng@loongson.cn>
Link: https://patchwork.freedesktop.org/patch/msgid/20230320150751.20399-9-tzimmermann@suse.de
parent a51c7663
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <drm/drm_fbdev_generic.h> #include <drm/drm_fbdev_generic.h>
/* @user: 1=userspace, 0=fbcon */ /* @user: 1=userspace, 0=fbcon */
static int drm_fbdev_fb_open(struct fb_info *info, int user) static int drm_fbdev_generic_fb_open(struct fb_info *info, int user)
{ {
struct drm_fb_helper *fb_helper = info->par; struct drm_fb_helper *fb_helper = info->par;
...@@ -24,7 +24,7 @@ static int drm_fbdev_fb_open(struct fb_info *info, int user) ...@@ -24,7 +24,7 @@ static int drm_fbdev_fb_open(struct fb_info *info, int user)
return 0; return 0;
} }
static int drm_fbdev_fb_release(struct fb_info *info, int user) static int drm_fbdev_generic_fb_release(struct fb_info *info, int user)
{ {
struct drm_fb_helper *fb_helper = info->par; struct drm_fb_helper *fb_helper = info->par;
...@@ -34,7 +34,7 @@ static int drm_fbdev_fb_release(struct fb_info *info, int user) ...@@ -34,7 +34,7 @@ static int drm_fbdev_fb_release(struct fb_info *info, int user)
return 0; return 0;
} }
static void drm_fbdev_fb_destroy(struct fb_info *info) static void drm_fbdev_generic_fb_destroy(struct fb_info *info)
{ {
struct drm_fb_helper *fb_helper = info->par; struct drm_fb_helper *fb_helper = info->par;
void *shadow = info->screen_buffer; void *shadow = info->screen_buffer;
...@@ -52,10 +52,10 @@ static void drm_fbdev_fb_destroy(struct fb_info *info) ...@@ -52,10 +52,10 @@ static void drm_fbdev_fb_destroy(struct fb_info *info)
kfree(fb_helper); kfree(fb_helper);
} }
static const struct fb_ops drm_fbdev_fb_ops = { static const struct fb_ops drm_fbdev_generic_fb_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.fb_open = drm_fbdev_fb_open, .fb_open = drm_fbdev_generic_fb_open,
.fb_release = drm_fbdev_fb_release, .fb_release = drm_fbdev_generic_fb_release,
.fb_read = drm_fb_helper_sys_read, .fb_read = drm_fb_helper_sys_read,
.fb_write = drm_fb_helper_sys_write, .fb_write = drm_fb_helper_sys_write,
DRM_FB_HELPER_DEFAULT_OPS, DRM_FB_HELPER_DEFAULT_OPS,
...@@ -63,13 +63,13 @@ static const struct fb_ops drm_fbdev_fb_ops = { ...@@ -63,13 +63,13 @@ static const struct fb_ops drm_fbdev_fb_ops = {
.fb_copyarea = drm_fb_helper_sys_copyarea, .fb_copyarea = drm_fb_helper_sys_copyarea,
.fb_imageblit = drm_fb_helper_sys_imageblit, .fb_imageblit = drm_fb_helper_sys_imageblit,
.fb_mmap = fb_deferred_io_mmap, .fb_mmap = fb_deferred_io_mmap,
.fb_destroy = drm_fbdev_fb_destroy, .fb_destroy = drm_fbdev_generic_fb_destroy,
}; };
/* /*
* This function uses the client API to create a framebuffer backed by a dumb buffer. * This function uses the client API to create a framebuffer backed by a dumb buffer.
*/ */
static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper, static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper,
struct drm_fb_helper_surface_size *sizes) struct drm_fb_helper_surface_size *sizes)
{ {
struct drm_client_dev *client = &fb_helper->client; struct drm_client_dev *client = &fb_helper->client;
...@@ -109,7 +109,7 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper, ...@@ -109,7 +109,7 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
drm_fb_helper_fill_info(info, fb_helper, sizes); drm_fb_helper_fill_info(info, fb_helper, sizes);
info->fbops = &drm_fbdev_fb_ops; info->fbops = &drm_fbdev_generic_fb_ops;
info->flags = FBINFO_DEFAULT; info->flags = FBINFO_DEFAULT;
/* screen */ /* screen */
...@@ -140,7 +140,7 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper, ...@@ -140,7 +140,7 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
return ret; return ret;
} }
static void drm_fbdev_damage_blit_real(struct drm_fb_helper *fb_helper, static void drm_fbdev_generic_damage_blit_real(struct drm_fb_helper *fb_helper,
struct drm_clip_rect *clip, struct drm_clip_rect *clip,
struct iosys_map *dst) struct iosys_map *dst)
{ {
...@@ -179,7 +179,7 @@ static void drm_fbdev_damage_blit_real(struct drm_fb_helper *fb_helper, ...@@ -179,7 +179,7 @@ static void drm_fbdev_damage_blit_real(struct drm_fb_helper *fb_helper,
} }
} }
static int drm_fbdev_damage_blit(struct drm_fb_helper *fb_helper, static int drm_fbdev_generic_damage_blit(struct drm_fb_helper *fb_helper,
struct drm_clip_rect *clip) struct drm_clip_rect *clip)
{ {
struct drm_client_buffer *buffer = fb_helper->buffer; struct drm_client_buffer *buffer = fb_helper->buffer;
...@@ -204,7 +204,7 @@ static int drm_fbdev_damage_blit(struct drm_fb_helper *fb_helper, ...@@ -204,7 +204,7 @@ static int drm_fbdev_damage_blit(struct drm_fb_helper *fb_helper,
goto out; goto out;
dst = map; dst = map;
drm_fbdev_damage_blit_real(fb_helper, clip, &dst); drm_fbdev_generic_damage_blit_real(fb_helper, clip, &dst);
drm_client_buffer_vunmap(buffer); drm_client_buffer_vunmap(buffer);
...@@ -214,7 +214,8 @@ static int drm_fbdev_damage_blit(struct drm_fb_helper *fb_helper, ...@@ -214,7 +214,8 @@ static int drm_fbdev_damage_blit(struct drm_fb_helper *fb_helper,
return ret; return ret;
} }
static int drm_fbdev_fb_dirty(struct drm_fb_helper *helper, struct drm_clip_rect *clip) static int drm_fbdev_generic_helper_fb_dirty(struct drm_fb_helper *helper,
struct drm_clip_rect *clip)
{ {
struct drm_device *dev = helper->dev; struct drm_device *dev = helper->dev;
int ret; int ret;
...@@ -223,7 +224,7 @@ static int drm_fbdev_fb_dirty(struct drm_fb_helper *helper, struct drm_clip_rect ...@@ -223,7 +224,7 @@ static int drm_fbdev_fb_dirty(struct drm_fb_helper *helper, struct drm_clip_rect
if (!(clip->x1 < clip->x2 && clip->y1 < clip->y2)) if (!(clip->x1 < clip->x2 && clip->y1 < clip->y2))
return 0; return 0;
ret = drm_fbdev_damage_blit(helper, clip); ret = drm_fbdev_generic_damage_blit(helper, clip);
if (drm_WARN_ONCE(dev, ret, "Damage blitter failed: ret=%d\n", ret)) if (drm_WARN_ONCE(dev, ret, "Damage blitter failed: ret=%d\n", ret))
return ret; return ret;
...@@ -236,12 +237,12 @@ static int drm_fbdev_fb_dirty(struct drm_fb_helper *helper, struct drm_clip_rect ...@@ -236,12 +237,12 @@ static int drm_fbdev_fb_dirty(struct drm_fb_helper *helper, struct drm_clip_rect
return 0; return 0;
} }
static const struct drm_fb_helper_funcs drm_fb_helper_generic_funcs = { static const struct drm_fb_helper_funcs drm_fbdev_generic_helper_funcs = {
.fb_probe = drm_fbdev_fb_probe, .fb_probe = drm_fbdev_generic_helper_fb_probe,
.fb_dirty = drm_fbdev_fb_dirty, .fb_dirty = drm_fbdev_generic_helper_fb_dirty,
}; };
static void drm_fbdev_client_unregister(struct drm_client_dev *client) static void drm_fbdev_generic_client_unregister(struct drm_client_dev *client)
{ {
struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
...@@ -254,14 +255,14 @@ static void drm_fbdev_client_unregister(struct drm_client_dev *client) ...@@ -254,14 +255,14 @@ static void drm_fbdev_client_unregister(struct drm_client_dev *client)
} }
} }
static int drm_fbdev_client_restore(struct drm_client_dev *client) static int drm_fbdev_generic_client_restore(struct drm_client_dev *client)
{ {
drm_fb_helper_lastclose(client->dev); drm_fb_helper_lastclose(client->dev);
return 0; return 0;
} }
static int drm_fbdev_client_hotplug(struct drm_client_dev *client) static int drm_fbdev_generic_client_hotplug(struct drm_client_dev *client)
{ {
struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
struct drm_device *dev = client->dev; struct drm_device *dev = client->dev;
...@@ -290,11 +291,11 @@ static int drm_fbdev_client_hotplug(struct drm_client_dev *client) ...@@ -290,11 +291,11 @@ static int drm_fbdev_client_hotplug(struct drm_client_dev *client)
return ret; return ret;
} }
static const struct drm_client_funcs drm_fbdev_client_funcs = { static const struct drm_client_funcs drm_fbdev_generic_client_funcs = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.unregister = drm_fbdev_client_unregister, .unregister = drm_fbdev_generic_client_unregister,
.restore = drm_fbdev_client_restore, .restore = drm_fbdev_generic_client_restore,
.hotplug = drm_fbdev_client_hotplug, .hotplug = drm_fbdev_generic_client_hotplug,
}; };
/** /**
...@@ -320,8 +321,7 @@ static const struct drm_client_funcs drm_fbdev_client_funcs = { ...@@ -320,8 +321,7 @@ static const struct drm_client_funcs drm_fbdev_client_funcs = {
* *
* The fbdev is destroyed by drm_dev_unregister(). * The fbdev is destroyed by drm_dev_unregister().
*/ */
void drm_fbdev_generic_setup(struct drm_device *dev, void drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)
unsigned int preferred_bpp)
{ {
struct drm_fb_helper *fb_helper; struct drm_fb_helper *fb_helper;
int ret; int ret;
...@@ -332,15 +332,15 @@ void drm_fbdev_generic_setup(struct drm_device *dev, ...@@ -332,15 +332,15 @@ void drm_fbdev_generic_setup(struct drm_device *dev,
fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL); fb_helper = kzalloc(sizeof(*fb_helper), GFP_KERNEL);
if (!fb_helper) if (!fb_helper)
return; return;
drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fb_helper_generic_funcs); drm_fb_helper_prepare(dev, fb_helper, preferred_bpp, &drm_fbdev_generic_helper_funcs);
ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_client_funcs); ret = drm_client_init(dev, &fb_helper->client, "fbdev", &drm_fbdev_generic_client_funcs);
if (ret) { if (ret) {
drm_err(dev, "Failed to register client: %d\n", ret); drm_err(dev, "Failed to register client: %d\n", ret);
goto err_drm_client_init; goto err_drm_client_init;
} }
ret = drm_fbdev_client_hotplug(&fb_helper->client); ret = drm_fbdev_generic_client_hotplug(&fb_helper->client);
if (ret) if (ret)
drm_dbg_kms(dev, "client hotplug ret=%d\n", ret); drm_dbg_kms(dev, "client hotplug ret=%d\n", ret);
......
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