From: Daniel Vetter <daniel@ffwll.ch>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
laurent.pinchart@ideasonboard.com, tomi.valkeinen@ti.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/7] drm/fb-helper: Add fb_deferred_io support
Date: Thu, 28 Apr 2016 09:17:53 +0200 [thread overview]
Message-ID: <20160428071753.GJ2558@phenom.ffwll.local> (raw)
In-Reply-To: <57211204.7080703@tronnes.org>
On Wed, Apr 27, 2016 at 09:24:52PM +0200, Noralf Trønnes wrote:
>
> Den 27.04.2016 21:20, skrev Daniel Vetter:
> >On Wed, Apr 27, 2016 at 08:16:32PM +0200, Noralf Trønnes wrote:
> >>This adds deferred io support to drm_fb_helper.
> >>The fbdev framebuffer changes are flushed using the callback
> >>(struct drm_framebuffer *)->funcs->dirty() by a dedicated worker
> >>ensuring that it always runs in process context.
> >>
> >>Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> >>---
> >>
> >>Changes since v2:
> >>- FB_DEFERRED_IO is now always selected by DRM_KMS_FB_HELPER, ifdef removed
> >>- The drm_clip_rect utility functions are dropped, so open code it
> >>- docs: use & to denote structs
> >>
> >>Changes since v1:
> >>- Use a dedicated worker to run the framebuffer flushing like qxl does
> >>- Add parameter descriptions to drm_fb_helper_deferred_io
> >>
> >> drivers/gpu/drm/Kconfig | 1 +
> >> drivers/gpu/drm/drm_fb_helper.c | 109 +++++++++++++++++++++++++++++++++++++++-
> >> include/drm/drm_fb_helper.h | 15 ++++++
> >> 3 files changed, 124 insertions(+), 1 deletion(-)
> >>
> >>diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> >>index 9e4f2f1..8e6f34b 100644
> >>--- a/drivers/gpu/drm/Kconfig
> >>+++ b/drivers/gpu/drm/Kconfig
> >>@@ -52,6 +52,7 @@ config DRM_KMS_FB_HELPER
> >> select FB_CFB_FILLRECT
> >> select FB_CFB_COPYAREA
> >> select FB_CFB_IMAGEBLIT
> >>+ select FB_DEFERRED_IO
> >> help
> >> FBDEV helpers for KMS drivers.
> >>
> >>diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> >>index 855108e..5112b5d 100644
> >>--- a/drivers/gpu/drm/drm_fb_helper.c
> >>+++ b/drivers/gpu/drm/drm_fb_helper.c
> >>@@ -48,6 +48,8 @@ MODULE_PARM_DESC(fbdev_emulation,
> >>
> >> static LIST_HEAD(kernel_fb_helper_list);
> >>
> >>+static void drm_fb_helper_dirty_init(struct drm_fb_helper *helper);
> >Instead of this forward decl just inline the few setup commands into
> >drm_fb_helper_prepare.
>
> That would mean that I have to forward declare drm_fb_helper_dirty_work()
> instead. Is that better?
> Or should I relocate the functions?
Yeah, just move them all I think. This means that usually the setup
function for a component is at the very bottom, and also that you have the
inverted reading order with first reading leaf/helper functions, then the
bigger ones that assemble things together. Personally I find that
backwards, but otoh consistency is more important. And avoid forward decls
for static functions is standard style in the kernel.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2016-04-28 7:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 18:16 [PATCH v3 0/7] drm: Add fbdev deferred io support to helpers Noralf Trønnes
2016-04-27 18:16 ` [PATCH v3 1/7] drm/udl: Change drm_fb_helper_sys_*() calls to sys_*() Noralf Trønnes
2016-04-27 18:16 ` [PATCH v3 2/7] drm/qxl: " Noralf Trønnes
2016-04-27 18:16 ` [PATCH v3 3/7] drm/fb-helper: Add fb_deferred_io support Noralf Trønnes
2016-04-27 19:20 ` Daniel Vetter
2016-04-27 19:24 ` Noralf Trønnes
2016-04-28 7:17 ` Daniel Vetter [this message]
2016-04-27 18:16 ` [PATCH v3 4/7] fbdev: fb_defio: Export fb_deferred_io_mmap Noralf Trønnes
2016-04-27 18:16 ` [PATCH v3 5/7] drm/fb-cma-helper: Add fb_deferred_io support Noralf Trønnes
2016-04-27 18:16 ` [PATCH v3 6/7] drm/qxl: Use drm_fb_helper deferred_io support Noralf Trønnes
2016-04-27 19:22 ` Daniel Vetter
2016-04-27 18:16 ` [PATCH v3 7/7] drm/udl: " Noralf Trønnes
2016-04-27 19:24 ` [PATCH v3 0/7] drm: Add fbdev deferred io support to helpers Daniel Vetter
2016-04-27 19:49 ` Noralf Trønnes
2016-04-28 7:20 ` Daniel Vetter
2016-04-29 8:02 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160428071753.GJ2558@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noralf@tronnes.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome