* [PATCH 0/5] drm/exynos: fbdev: Use client buffers
@ 2026-04-23 9:37 ` Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 1/5] drm/exynos: fbdev: Remove offset into screen_buffer Thomas Zimmermann
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2026-04-23 9:37 UTC (permalink / raw)
To: inki.dae, sw0312.kim, kyungmin.park, airlied, simona, dri-devel
Cc: linux-samsung-soc, Thomas Zimmermann
A client buffer holds the DRM framebuffer for an in-kernel DRM
client. Until now, exynos created an internal ad-hoc framebuffer for
its fbdev emulation, while by-passing the regular interfaces used by
user-space compositors.
Convert exynos' fbdev emulation to use client buffers. Replacing the
existing code with a client buffer allows for stream-lining exynos code
and later also the fbdev helpers. The new framebuffer will be registered
against the client's file and will support handles for GEM objects. It
is then just another framebuffer within the DRM ecosystem.
If all driver's fbdev-emulation helpers can be converted to use client
buffers, the emulation's framebuffer handling as a whole can possibly be
moved into shared helpers.
Patch 1 first fixes a long-standing bug.
Patches 2 to 4 convert exynos' fbdev emulation to client buffers. It
still allocates a GEM object buffer tailored towards fbdev emulation,
but size calculations now use common DRM helpers.
Patch 5 cleans up symbol visibility in exynos' fb code.
Thomas Zimmermann (5):
drm/exynos: fbdev: Remove offset into screen_buffer
drm/exynos: fbdev: Inline exynos_drm_fbdev_update()
drm/exynos: fbdev: Calculate buffer geometry with format helpers
drm/exynos: fbdev: Use a DRM client buffer
drm/exynos: Make exynos_drm_framebuffer_init() an internal interface
drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +-
drivers/gpu/drm/exynos/exynos_drm_fb.h | 7 --
drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 100 ++++++++++------------
3 files changed, 47 insertions(+), 62 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/5] drm/exynos: fbdev: Remove offset into screen_buffer
2026-04-23 9:37 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Thomas Zimmermann
@ 2026-04-23 9:37 ` Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 2/5] drm/exynos: fbdev: Inline exynos_drm_fbdev_update() Thomas Zimmermann
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2026-04-23 9:37 UTC (permalink / raw)
To: inki.dae, sw0312.kim, kyungmin.park, airlied, simona, dri-devel
Cc: linux-samsung-soc, Thomas Zimmermann, linux-arm-kernel, stable
The screen_buffer field in struct fb_info contains the kernel address
of the first byte of framebuffer memory. Do not add the display offset.
This offset only describes scrolling during scanout.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 19c8b8343d9c ("drm/exynos: fixed overlay data updating.")
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: <stable@vger.kernel.org> # v3.2+
---
drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 637927818dfe..d283ded266d5 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -61,17 +61,13 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
struct fb_info *fbi = helper->info;
struct drm_framebuffer *fb = helper->fb;
unsigned int size = fb->width * fb->height * fb->format->cpp[0];
- unsigned long offset;
fbi->fbops = &exynos_drm_fb_ops;
drm_fb_helper_fill_info(fbi, helper, sizes);
- offset = fbi->var.xoffset * fb->format->cpp[0];
- offset += fbi->var.yoffset * fb->pitches[0];
-
fbi->flags |= FBINFO_VIRTFB;
- fbi->screen_buffer = exynos_gem->kvaddr + offset;
+ fbi->screen_buffer = exynos_gem->kvaddr;
fbi->screen_size = size;
fbi->fix.smem_len = size;
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/5] drm/exynos: fbdev: Inline exynos_drm_fbdev_update()
2026-04-23 9:37 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 1/5] drm/exynos: fbdev: Remove offset into screen_buffer Thomas Zimmermann
@ 2026-04-23 9:37 ` Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 3/5] drm/exynos: fbdev: Calculate buffer geometry with format helpers Thomas Zimmermann
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2026-04-23 9:37 UTC (permalink / raw)
To: inki.dae, sw0312.kim, kyungmin.park, airlied, simona, dri-devel
Cc: linux-samsung-soc, Thomas Zimmermann
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>
---
drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 35 ++++++-----------------
1 file changed, 9 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index d283ded266d5..1c564edd497e 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -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;
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/5] drm/exynos: fbdev: Calculate buffer geometry with format helpers
2026-04-23 9:37 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 1/5] drm/exynos: fbdev: Remove offset into screen_buffer Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 2/5] drm/exynos: fbdev: Inline exynos_drm_fbdev_update() Thomas Zimmermann
@ 2026-04-23 9:37 ` Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 4/5] drm/exynos: fbdev: Use a DRM client buffer Thomas Zimmermann
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2026-04-23 9:37 UTC (permalink / raw)
To: inki.dae, sw0312.kim, kyungmin.park, airlied, simona, dri-devel
Cc: linux-samsung-soc, Thomas Zimmermann
Replace the geometry and size calculation in exynos' fbdev emulation
with DRM format helpers. This consists of a 4CC lookup from the fbdev
parameters, format lookup, pitch calculation and size calculation.
Then allocate the GEM buffer object for the framebuffer memory from
the calculated size. Mmap provides the allocated buffer to user space,
so align the buffer size to PAGE_SIZE.
Initialize the fields screen_size and fix.smem_len in struct fb_info
from the size of the allocated buffer object. This is the real size
and can differ from the requested size.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 35 ++++++++++++-----------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 1c564edd497e..9225cf1a83c8 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -60,11 +60,14 @@ static const struct drm_fb_helper_funcs exynos_drm_fbdev_helper_funcs = {
int exynos_drm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes)
{
- struct exynos_drm_gem *exynos_gem;
struct drm_device *dev = helper->dev;
struct fb_info *info = helper->info;
+ u32 fourcc, pitch;
+ u64 size;
+ const struct drm_format_info *format;
+ struct exynos_drm_gem *exynos_gem;
+ struct drm_gem_object *obj;
struct drm_mode_fb_cmd2 mode_cmd = { 0 };
- unsigned long size;
int ret;
DRM_DEV_DEBUG_KMS(dev->dev,
@@ -72,23 +75,23 @@ int exynos_drm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
sizes->surface_width, sizes->surface_height,
sizes->surface_bpp);
- mode_cmd.width = sizes->surface_width;
- mode_cmd.height = sizes->surface_height;
- mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3);
- mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
- sizes->surface_depth);
-
- size = mode_cmd.pitches[0] * mode_cmd.height;
+ fourcc = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
+ format = drm_get_format_info(dev, fourcc, DRM_FORMAT_MOD_LINEAR);
+ pitch = drm_format_info_min_pitch(format, 0, sizes->surface_width);
+ size = ALIGN(pitch * sizes->surface_height, PAGE_SIZE);
exynos_gem = exynos_drm_gem_create(dev, EXYNOS_BO_WC, size, true);
if (IS_ERR(exynos_gem))
return PTR_ERR(exynos_gem);
+ obj = &exynos_gem->base;
+
+ mode_cmd.width = sizes->surface_width;
+ mode_cmd.height = sizes->surface_height;
+ mode_cmd.pixel_format = fourcc;
+ mode_cmd.pitches[0] = pitch;
+ mode_cmd.modifier[0] = DRM_FORMAT_MOD_LINEAR;
- helper->fb =
- exynos_drm_framebuffer_init(dev,
- drm_get_format_info(dev, mode_cmd.pixel_format,
- mode_cmd.modifier[0]),
- &mode_cmd, &exynos_gem, 1);
+ helper->fb = exynos_drm_framebuffer_init(dev, format, &mode_cmd, &exynos_gem, 1);
if (IS_ERR(helper->fb)) {
DRM_DEV_ERROR(dev->dev, "failed to create drm framebuffer.\n");
ret = PTR_ERR(helper->fb);
@@ -102,8 +105,8 @@ int exynos_drm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
info->flags |= FBINFO_VIRTFB;
info->screen_buffer = exynos_gem->kvaddr;
- info->screen_size = size;
- info->fix.smem_len = size;
+ info->screen_size = obj->size;
+ info->fix.smem_len = obj->size;
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/5] drm/exynos: fbdev: Use a DRM client buffer
2026-04-23 9:37 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Thomas Zimmermann
` (2 preceding siblings ...)
2026-04-23 9:37 ` [PATCH 3/5] drm/exynos: fbdev: Calculate buffer geometry with format helpers Thomas Zimmermann
@ 2026-04-23 9:37 ` Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 5/5] drm/exynos: Make exynos_drm_framebuffer_init() an internal interface Thomas Zimmermann
2026-05-06 6:35 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Marek Szyprowski
5 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2026-04-23 9:37 UTC (permalink / raw)
To: inki.dae, sw0312.kim, kyungmin.park, airlied, simona, dri-devel
Cc: linux-samsung-soc, Thomas Zimmermann
Replace the internal DRM framebuffer with a DRM client buffer. The
client buffer allocates the DRM framebuffer on a file and also uses
GEM object handles via the regular ADDFB2 interfaces.
Using client-buffer interfaces unifies framebuffer allocation for
DRM clients in user space and exynos' internal fbdev emulation. It
also simplifies the clean-up side of the fbdev emulation.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 46 ++++++++++++++---------
1 file changed, 28 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 9225cf1a83c8..f43ce974c952 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -36,12 +36,10 @@ static int exynos_drm_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
static void exynos_drm_fb_destroy(struct fb_info *info)
{
struct drm_fb_helper *fb_helper = info->par;
- struct drm_framebuffer *fb = fb_helper->fb;
drm_fb_helper_fini(fb_helper);
- drm_framebuffer_remove(fb);
-
+ drm_client_buffer_delete(fb_helper->buffer);
drm_client_release(&fb_helper->client);
}
@@ -60,14 +58,17 @@ static const struct drm_fb_helper_funcs exynos_drm_fbdev_helper_funcs = {
int exynos_drm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes)
{
- struct drm_device *dev = helper->dev;
+ struct drm_client_dev *client = &helper->client;
+ struct drm_device *dev = client->dev;
+ struct drm_file *file = client->file;
struct fb_info *info = helper->info;
u32 fourcc, pitch;
u64 size;
const struct drm_format_info *format;
struct exynos_drm_gem *exynos_gem;
struct drm_gem_object *obj;
- struct drm_mode_fb_cmd2 mode_cmd = { 0 };
+ struct drm_client_buffer *buffer;
+ u32 handle;
int ret;
DRM_DEV_DEBUG_KMS(dev->dev,
@@ -85,19 +86,20 @@ int exynos_drm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
return PTR_ERR(exynos_gem);
obj = &exynos_gem->base;
- mode_cmd.width = sizes->surface_width;
- mode_cmd.height = sizes->surface_height;
- mode_cmd.pixel_format = fourcc;
- mode_cmd.pitches[0] = pitch;
- mode_cmd.modifier[0] = DRM_FORMAT_MOD_LINEAR;
-
- helper->fb = exynos_drm_framebuffer_init(dev, format, &mode_cmd, &exynos_gem, 1);
- if (IS_ERR(helper->fb)) {
- DRM_DEV_ERROR(dev->dev, "failed to create drm framebuffer.\n");
- ret = PTR_ERR(helper->fb);
- goto err_destroy_gem;
+ ret = drm_gem_handle_create(file, obj, &handle);
+ if (ret)
+ goto err_drm_gem_object_put;
+
+ buffer = drm_client_buffer_create(client, sizes->surface_width, sizes->surface_height,
+ fourcc, handle, pitch);
+ if (IS_ERR(buffer)) {
+ ret = PTR_ERR(buffer);
+ goto err_drm_gem_handle_delete;
}
+
helper->funcs = &exynos_drm_fbdev_helper_funcs;
+ helper->buffer = buffer;
+ helper->fb = buffer->fb;
info->fbops = &exynos_drm_fb_ops;
@@ -108,9 +110,17 @@ int exynos_drm_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
info->screen_size = obj->size;
info->fix.smem_len = obj->size;
+ /* The handle is only needed for creating the framebuffer. */
+ drm_gem_handle_delete(file, handle);
+
+ /* The framebuffer still holds a reference on the GEM object. */
+ drm_gem_object_put(obj);
+
return 0;
-err_destroy_gem:
- exynos_drm_gem_destroy(exynos_gem);
+err_drm_gem_handle_delete:
+ drm_gem_handle_delete(file, handle);
+err_drm_gem_object_put:
+ drm_gem_object_put(obj);
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 5/5] drm/exynos: Make exynos_drm_framebuffer_init() an internal interface
2026-04-23 9:37 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Thomas Zimmermann
` (3 preceding siblings ...)
2026-04-23 9:37 ` [PATCH 4/5] drm/exynos: fbdev: Use a DRM client buffer Thomas Zimmermann
@ 2026-04-23 9:37 ` Thomas Zimmermann
2026-05-06 6:59 ` Chen-Yu Tsai
2026-05-06 6:35 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Marek Szyprowski
5 siblings, 1 reply; 10+ messages in thread
From: Thomas Zimmermann @ 2026-04-23 9:37 UTC (permalink / raw)
To: inki.dae, sw0312.kim, kyungmin.park, airlied, simona, dri-devel
Cc: linux-samsung-soc, Thomas Zimmermann
The only caller of exynos_drm_framebuffer_init() is the helper
exynos_user_fb_create() from the same source file. Declare the
former as static.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +-
drivers/gpu/drm/exynos/exynos_drm_fb.h | 7 -------
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
index ab0e0c74ec47..66dec2b7a5de 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
@@ -55,7 +55,7 @@ static const struct drm_framebuffer_funcs exynos_drm_fb_funcs = {
.create_handle = drm_gem_fb_create_handle,
};
-struct drm_framebuffer *
+static struct drm_framebuffer *
exynos_drm_framebuffer_init(struct drm_device *dev,
const struct drm_format_info *info,
const struct drm_mode_fb_cmd2 *mode_cmd,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.h b/drivers/gpu/drm/exynos/exynos_drm_fb.h
index fdc6cb40cc9c..aeb6f29eb167 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.h
@@ -12,13 +12,6 @@
#include "exynos_drm_gem.h"
-struct drm_framebuffer *
-exynos_drm_framebuffer_init(struct drm_device *dev,
- const struct drm_format_info *info,
- const struct drm_mode_fb_cmd2 *mode_cmd,
- struct exynos_drm_gem **exynos_gem,
- int count);
-
dma_addr_t exynos_drm_fb_dma_addr(struct drm_framebuffer *fb, int index);
void exynos_drm_mode_config_init(struct drm_device *dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] drm/exynos: fbdev: Use client buffers
2026-04-23 9:37 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Thomas Zimmermann
` (4 preceding siblings ...)
2026-04-23 9:37 ` [PATCH 5/5] drm/exynos: Make exynos_drm_framebuffer_init() an internal interface Thomas Zimmermann
@ 2026-05-06 6:35 ` Marek Szyprowski
2026-05-08 6:34 ` Thomas Zimmermann
5 siblings, 1 reply; 10+ messages in thread
From: Marek Szyprowski @ 2026-05-06 6:35 UTC (permalink / raw)
To: Thomas Zimmermann, inki.dae, sw0312.kim, kyungmin.park, airlied,
simona, dri-devel
Cc: linux-samsung-soc
On 23.04.2026 11:37, Thomas Zimmermann wrote:
> A client buffer holds the DRM framebuffer for an in-kernel DRM
> client. Until now, exynos created an internal ad-hoc framebuffer for
> its fbdev emulation, while by-passing the regular interfaces used by
> user-space compositors.
>
> Convert exynos' fbdev emulation to use client buffers. Replacing the
> existing code with a client buffer allows for stream-lining exynos code
> and later also the fbdev helpers. The new framebuffer will be registered
> against the client's file and will support handles for GEM objects. It
> is then just another framebuffer within the DRM ecosystem.
>
> If all driver's fbdev-emulation helpers can be converted to use client
> buffers, the emulation's framebuffer handling as a whole can possibly be
> moved into shared helpers.
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Patch 1 first fixes a long-standing bug.
>
> Patches 2 to 4 convert exynos' fbdev emulation to client buffers. It
> still allocates a GEM object buffer tailored towards fbdev emulation,
> but size calculations now use common DRM helpers.
>
> Patch 5 cleans up symbol visibility in exynos' fb code.
>
> Thomas Zimmermann (5):
> drm/exynos: fbdev: Remove offset into screen_buffer
> drm/exynos: fbdev: Inline exynos_drm_fbdev_update()
> drm/exynos: fbdev: Calculate buffer geometry with format helpers
> drm/exynos: fbdev: Use a DRM client buffer
> drm/exynos: Make exynos_drm_framebuffer_init() an internal interface
>
> drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +-
> drivers/gpu/drm/exynos/exynos_drm_fb.h | 7 --
> drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 100 ++++++++++------------
> 3 files changed, 47 insertions(+), 62 deletions(-)
>
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 5/5] drm/exynos: Make exynos_drm_framebuffer_init() an internal interface
2026-04-23 9:37 ` [PATCH 5/5] drm/exynos: Make exynos_drm_framebuffer_init() an internal interface Thomas Zimmermann
@ 2026-05-06 6:59 ` Chen-Yu Tsai
2026-05-08 6:41 ` Thomas Zimmermann
0 siblings, 1 reply; 10+ messages in thread
From: Chen-Yu Tsai @ 2026-05-06 6:59 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: inki.dae, sw0312.kim, kyungmin.park, airlied, simona, dri-devel,
linux-samsung-soc
On Thu, Apr 23, 2026 at 5:45 PM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> The only caller of exynos_drm_framebuffer_init() is the helper
> exynos_user_fb_create() from the same source file. Declare the
> former as static.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +-
> drivers/gpu/drm/exynos/exynos_drm_fb.h | 7 -------
> 2 files changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
> index ab0e0c74ec47..66dec2b7a5de 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
> @@ -55,7 +55,7 @@ static const struct drm_framebuffer_funcs exynos_drm_fb_funcs = {
> .create_handle = drm_gem_fb_create_handle,
> };
>
> -struct drm_framebuffer *
> +static struct drm_framebuffer *
> exynos_drm_framebuffer_init(struct drm_device *dev,
> const struct drm_format_info *info,
> const struct drm_mode_fb_cmd2 *mode_cmd,
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.h b/drivers/gpu/drm/exynos/exynos_drm_fb.h
> index fdc6cb40cc9c..aeb6f29eb167 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fb.h
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.h
> @@ -12,13 +12,6 @@
>
> #include "exynos_drm_gem.h"
Nit: you could move the include statement to exynos_drm_fb.c as well.
> -struct drm_framebuffer *
> -exynos_drm_framebuffer_init(struct drm_device *dev,
> - const struct drm_format_info *info,
> - const struct drm_mode_fb_cmd2 *mode_cmd,
> - struct exynos_drm_gem **exynos_gem,
> - int count);
> -
> dma_addr_t exynos_drm_fb_dma_addr(struct drm_framebuffer *fb, int index);
>
> void exynos_drm_mode_config_init(struct drm_device *dev);
> --
> 2.53.0
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] drm/exynos: fbdev: Use client buffers
2026-05-06 6:35 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Marek Szyprowski
@ 2026-05-08 6:34 ` Thomas Zimmermann
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2026-05-08 6:34 UTC (permalink / raw)
To: Marek Szyprowski, inki.dae, sw0312.kim, kyungmin.park, airlied,
simona, dri-devel
Cc: linux-samsung-soc
Hi
Am 06.05.26 um 08:35 schrieb Marek Szyprowski:
> On 23.04.2026 11:37, Thomas Zimmermann wrote:
>> A client buffer holds the DRM framebuffer for an in-kernel DRM
>> client. Until now, exynos created an internal ad-hoc framebuffer for
>> its fbdev emulation, while by-passing the regular interfaces used by
>> user-space compositors.
>>
>> Convert exynos' fbdev emulation to use client buffers. Replacing the
>> existing code with a client buffer allows for stream-lining exynos code
>> and later also the fbdev helpers. The new framebuffer will be registered
>> against the client's file and will support handles for GEM objects. It
>> is then just another framebuffer within the DRM ecosystem.
>>
>> If all driver's fbdev-emulation helpers can be converted to use client
>> buffers, the emulation's framebuffer handling as a whole can possibly be
>> moved into shared helpers.
> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
>
> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Thanks a lot!
>
>
>> Patch 1 first fixes a long-standing bug.
>>
>> Patches 2 to 4 convert exynos' fbdev emulation to client buffers. It
>> still allocates a GEM object buffer tailored towards fbdev emulation,
>> but size calculations now use common DRM helpers.
>>
>> Patch 5 cleans up symbol visibility in exynos' fb code.
>>
>> Thomas Zimmermann (5):
>> drm/exynos: fbdev: Remove offset into screen_buffer
>> drm/exynos: fbdev: Inline exynos_drm_fbdev_update()
>> drm/exynos: fbdev: Calculate buffer geometry with format helpers
>> drm/exynos: fbdev: Use a DRM client buffer
>> drm/exynos: Make exynos_drm_framebuffer_init() an internal interface
>>
>> drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +-
>> drivers/gpu/drm/exynos/exynos_drm_fb.h | 7 --
>> drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 100 ++++++++++------------
>> 3 files changed, 47 insertions(+), 62 deletions(-)
>>
> Best regards
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 5/5] drm/exynos: Make exynos_drm_framebuffer_init() an internal interface
2026-05-06 6:59 ` Chen-Yu Tsai
@ 2026-05-08 6:41 ` Thomas Zimmermann
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2026-05-08 6:41 UTC (permalink / raw)
To: wens
Cc: inki.dae, sw0312.kim, kyungmin.park, airlied, simona, dri-devel,
linux-samsung-soc
Hi
Am 06.05.26 um 08:59 schrieb Chen-Yu Tsai:
[...]
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fb.h
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.h
>> @@ -12,13 +12,6 @@
>>
>> #include "exynos_drm_gem.h"
> Nit: you could move the include statement to exynos_drm_fb.c as well.
Right, good point. I'll send an update in a bit.
Best regards
Thomas
>
>> -struct drm_framebuffer *
>> -exynos_drm_framebuffer_init(struct drm_device *dev,
>> - const struct drm_format_info *info,
>> - const struct drm_mode_fb_cmd2 *mode_cmd,
>> - struct exynos_drm_gem **exynos_gem,
>> - int count);
>> -
>> dma_addr_t exynos_drm_fb_dma_addr(struct drm_framebuffer *fb, int index);
>>
>> void exynos_drm_mode_config_init(struct drm_device *dev);
>> --
>> 2.53.0
>>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-05-08 6:41 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20260423095139eucas1p149a0e97f62e8bf353a65466ca26cbff9@eucas1p1.samsung.com>
2026-04-23 9:37 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 1/5] drm/exynos: fbdev: Remove offset into screen_buffer Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 2/5] drm/exynos: fbdev: Inline exynos_drm_fbdev_update() Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 3/5] drm/exynos: fbdev: Calculate buffer geometry with format helpers Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 4/5] drm/exynos: fbdev: Use a DRM client buffer Thomas Zimmermann
2026-04-23 9:37 ` [PATCH 5/5] drm/exynos: Make exynos_drm_framebuffer_init() an internal interface Thomas Zimmermann
2026-05-06 6:59 ` Chen-Yu Tsai
2026-05-08 6:41 ` Thomas Zimmermann
2026-05-06 6:35 ` [PATCH 0/5] drm/exynos: fbdev: Use client buffers Marek Szyprowski
2026-05-08 6:34 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox