* [PATCH v1 1/1] drm/fb: remove unused function: drm_gem_fbdev_fb_create()
@ 2019-07-21 14:06 Sam Ravnborg
2019-07-21 16:48 ` Noralf Trønnes
0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2019-07-21 14:06 UTC (permalink / raw)
To: dri-devel; +Cc: Daniel Vetter, Gerd Hoffmann
After migrating several drivers to the generic fbdev there are
no users left. Delete the function.
Noticed that there was no callers while browsing
around in the drm_fb* code.
Last user was removed with:
commit 13aff184ed9f ("drm/qxl: remove dead qxl fbdev emulation code")
commit 26d4707d445d ("drm/qxl: use generic fbdev emulation")
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Noralf Trønnes <noralf@tronnes.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
git grep showed no users, and drm was build
tested after removal for good measure.
Sam
drivers/gpu/drm/drm_gem_framebuffer_helper.c | 43 --------------------
include/drm/drm_gem_framebuffer_helper.h | 7 ----
2 files changed, 50 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
index a6426c95b383..f61304054786 100644
--- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c
+++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c
@@ -322,46 +322,3 @@ int drm_gem_fb_simple_display_pipe_prepare_fb(struct drm_simple_display_pipe *pi
return drm_gem_fb_prepare_fb(&pipe->plane, plane_state);
}
EXPORT_SYMBOL(drm_gem_fb_simple_display_pipe_prepare_fb);
-
-/**
- * drm_gem_fbdev_fb_create - Create a GEM backed &drm_framebuffer for fbdev
- * emulation
- * @dev: DRM device
- * @sizes: fbdev size description
- * @pitch_align: Optional pitch alignment
- * @obj: GEM object backing the framebuffer
- * @funcs: Optional vtable to be used for the new framebuffer object when the
- * dirty callback is needed.
- *
- * This function creates a framebuffer from a &drm_fb_helper_surface_size
- * description for use in the &drm_fb_helper_funcs.fb_probe callback.
- *
- * Returns:
- * Pointer to a &drm_framebuffer on success or an error pointer on failure.
- */
-struct drm_framebuffer *
-drm_gem_fbdev_fb_create(struct drm_device *dev,
- struct drm_fb_helper_surface_size *sizes,
- unsigned int pitch_align, struct drm_gem_object *obj,
- const struct drm_framebuffer_funcs *funcs)
-{
- struct drm_mode_fb_cmd2 mode_cmd = { 0 };
-
- mode_cmd.width = sizes->surface_width;
- mode_cmd.height = sizes->surface_height;
- mode_cmd.pitches[0] = sizes->surface_width *
- DIV_ROUND_UP(sizes->surface_bpp, 8);
- if (pitch_align)
- mode_cmd.pitches[0] = roundup(mode_cmd.pitches[0],
- pitch_align);
- mode_cmd.pixel_format = drm_driver_legacy_fb_format(dev, sizes->surface_bpp,
- sizes->surface_depth);
- if (obj->size < mode_cmd.pitches[0] * mode_cmd.height)
- return ERR_PTR(-EINVAL);
-
- if (!funcs)
- funcs = &drm_gem_fb_funcs;
-
- return drm_gem_fb_alloc(dev, &mode_cmd, &obj, 1, funcs);
-}
-EXPORT_SYMBOL(drm_gem_fbdev_fb_create);
diff --git a/include/drm/drm_gem_framebuffer_helper.h b/include/drm/drm_gem_framebuffer_helper.h
index 7f307e834eef..d9f13fd25b0a 100644
--- a/include/drm/drm_gem_framebuffer_helper.h
+++ b/include/drm/drm_gem_framebuffer_helper.h
@@ -33,11 +33,4 @@ int drm_gem_fb_prepare_fb(struct drm_plane *plane,
struct drm_plane_state *state);
int drm_gem_fb_simple_display_pipe_prepare_fb(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *plane_state);
-
-struct drm_framebuffer *
-drm_gem_fbdev_fb_create(struct drm_device *dev,
- struct drm_fb_helper_surface_size *sizes,
- unsigned int pitch_align, struct drm_gem_object *obj,
- const struct drm_framebuffer_funcs *funcs);
-
#endif
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] drm/fb: remove unused function: drm_gem_fbdev_fb_create()
2019-07-21 14:06 [PATCH v1 1/1] drm/fb: remove unused function: drm_gem_fbdev_fb_create() Sam Ravnborg
@ 2019-07-21 16:48 ` Noralf Trønnes
2019-07-21 17:36 ` Sam Ravnborg
0 siblings, 1 reply; 3+ messages in thread
From: Noralf Trønnes @ 2019-07-21 16:48 UTC (permalink / raw)
To: Sam Ravnborg, dri-devel; +Cc: Daniel Vetter, Gerd Hoffmann
Den 21.07.2019 16.06, skrev Sam Ravnborg:
> After migrating several drivers to the generic fbdev there are
> no users left. Delete the function.
>
> Noticed that there was no callers while browsing
> around in the drm_fb* code.
>
> Last user was removed with:
> commit 13aff184ed9f ("drm/qxl: remove dead qxl fbdev emulation code")
> commit 26d4707d445d ("drm/qxl: use generic fbdev emulation")
Listing 2 commits for the same driver was confusing. I think you can
drop the second one since it's the first that contained the function call.
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
Thanks for cleaning up.
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] drm/fb: remove unused function: drm_gem_fbdev_fb_create()
2019-07-21 16:48 ` Noralf Trønnes
@ 2019-07-21 17:36 ` Sam Ravnborg
0 siblings, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2019-07-21 17:36 UTC (permalink / raw)
To: Noralf Trønnes; +Cc: Daniel Vetter, Gerd Hoffmann, dri-devel
Hi Noralf.
On Sun, Jul 21, 2019 at 06:48:46PM +0200, Noralf Trønnes wrote:
>
>
> Den 21.07.2019 16.06, skrev Sam Ravnborg:
> > After migrating several drivers to the generic fbdev there are
> > no users left. Delete the function.
> >
> > Noticed that there was no callers while browsing
> > around in the drm_fb* code.
> >
> > Last user was removed with:
> > commit 13aff184ed9f ("drm/qxl: remove dead qxl fbdev emulation code")
> > commit 26d4707d445d ("drm/qxl: use generic fbdev emulation")
>
> Listing 2 commits for the same driver was confusing. I think you can
> drop the second one since it's the first that contained the function call.
I updated the changelog like this and applied and pushed out.
Thanks,
Sam
Changelog:
After migrating several drivers to the generic fbdev
emulation there are no users left of drm_gem_fbdev_fb_create.
Delete the function.
Noticed that there was no callers while browsing
around in the drm_fb* code.
The code that referenced the function was removed by:
commit 13aff184ed9f ("drm/qxl: remove dead qxl fbdev emulation code")
The actual use was removed by:
commit 26d4707d445d ("drm/qxl: use generic fbdev emulation")
v2:
- Updated changelog based on feedback from Noralf
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190721140610.GA20842@ravnborg.org
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-21 17:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-21 14:06 [PATCH v1 1/1] drm/fb: remove unused function: drm_gem_fbdev_fb_create() Sam Ravnborg
2019-07-21 16:48 ` Noralf Trønnes
2019-07-21 17:36 ` Sam Ravnborg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.