drm/exynos: fbdev: Inline exynos_drm_fbdev_update()

Inline exynos_drm_fbdev_update() into its only caller. Prepares the
code for using DRM client buffers.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
Thomas Zimmermann 2026-05-11 13:54:32 +02:00 committed by Inki Dae
parent 760bbc58c2
commit b4edfb1b46
No known key found for this signature in database
GPG Key ID: C5601BECE83FF9B6

View File

@ -54,26 +54,6 @@ static const struct fb_ops exynos_drm_fb_ops = {
.fb_destroy = exynos_drm_fb_destroy,
};
static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes,
struct exynos_drm_gem *exynos_gem)
{
struct fb_info *fbi = helper->info;
struct drm_framebuffer *fb = helper->fb;
unsigned int size = fb->width * fb->height * fb->format->cpp[0];
fbi->fbops = &exynos_drm_fb_ops;
drm_fb_helper_fill_info(fbi, helper, sizes);
fbi->flags |= FBINFO_VIRTFB;
fbi->screen_buffer = exynos_gem->kvaddr;
fbi->screen_size = size;
fbi->fix.smem_len = size;
return 0;
}
static const struct drm_fb_helper_funcs exynos_drm_fbdev_helper_funcs = {
};
@ -82,6 +62,7 @@ int exynos_drm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
{
struct exynos_drm_gem *exynos_gem;
struct drm_device *dev = helper->dev;
struct fb_info *info = helper->info;
struct drm_mode_fb_cmd2 mode_cmd = { 0 };
unsigned long size;
int ret;
@ -115,15 +96,17 @@ int exynos_drm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
}
helper->funcs = &exynos_drm_fbdev_helper_funcs;
ret = exynos_drm_fbdev_update(helper, sizes, exynos_gem);
if (ret < 0)
goto err_destroy_framebuffer;
info->fbops = &exynos_drm_fb_ops;
drm_fb_helper_fill_info(info, helper, sizes);
info->flags |= FBINFO_VIRTFB;
info->screen_buffer = exynos_gem->kvaddr;
info->screen_size = size;
info->fix.smem_len = size;
return 0;
err_destroy_framebuffer:
drm_framebuffer_cleanup(helper->fb);
helper->fb = NULL;
err_destroy_gem:
exynos_drm_gem_destroy(exynos_gem);
return ret;