From: Thomas Zimmermann <tzimmermann@suse.de>
To: Javier Martinez Canillas <javierm@redhat.com>,
deller@gmx.de, daniel@ffwll.ch, sam@ravnborg.org
Cc: Steve Glendinning <steve.glendinning@shawell.net>,
linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-input@vger.kernel.org
Subject: Re: [PATCH 1/8] fbdev/smscufx: Use fb_ops helpers for deferred I/O
Date: Mon, 4 Sep 2023 16:39:47 +0200 [thread overview]
Message-ID: <b9b985e7-4f60-7c59-3121-b26b07b13b03@suse.de> (raw)
In-Reply-To: <877cp66qmp.fsf@minerva.mail-host-address-is-not-set>
[-- Attachment #1.1: Type: text/plain, Size: 2600 bytes --]
Hi Javier
Am 04.09.23 um 14:59 schrieb Javier Martinez Canillas:
> Thomas Zimmermann <tzimmermann@suse.de> writes:
>
> Hello Thomas,
>
>> Generate callback functions for struct fb_ops with the fbdev macro
>> FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(). Initialize struct fb_ops to
>> the generated functions with fbdev initializer macros.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: Steve Glendinning <steve.glendinning@shawell.net>
>> ---
>
> The patch looks good to me, but I've a question below.
>
> Acked-by: Javier Martinez Canillas <javierm@redhat.com>
>
>> drivers/video/fbdev/smscufx.c | 85 +++++++++--------------------------
>> 1 file changed, 22 insertions(+), 63 deletions(-)
>>
>> diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c
>
> [...]
>
>> static const struct fb_ops ufx_ops = {
>> .owner = THIS_MODULE,
>> - .fb_read = fb_sys_read,
>> - .fb_write = ufx_ops_write,
>> + __FB_DEFAULT_DEFERRED_OPS_RDWR(ufx_ops),
>> .fb_setcolreg = ufx_ops_setcolreg,
>> - .fb_fillrect = ufx_ops_fillrect,
>> - .fb_copyarea = ufx_ops_copyarea,
>> - .fb_imageblit = ufx_ops_imageblit,
>> + __FB_DEFAULT_DEFERRED_OPS_DRAW(ufx_ops),
>> .fb_mmap = ufx_ops_mmap,
>
> There are no generated functions for .fb_mmap, I wonder what's the value
> of __FB_DEFAULT_DEFERRED_OPS_MMAP() ? Maybe just removing that macro and
> setting .fb_mmap = fb_deferred_io_mmap instead if there's no custom mmap
> handler would be easier to read ?
At least two drivers could use __FB_DEFAULT_DEFERRED_OPS_MMAP:
picolcd-fb and hyperv_fb. At some point, we might want to set/clear
fb_mmap depending on some Kconfig value. Having
__FB_DEFAULT_DEFERRED_OPS_MMAP might be helpful then.
>
> Alternatively, __FB_DEFAULT_DEFERRED_OPS_MMAP() could still be left but
> not taking a __prefix argument since that is not used anyways ?
The driver optionally provides mmap without deferred I/O, hence the mmap
function. That makes no sense, as these writes to the buffer would never
make it to the device memory. But I didn't want to remove the code
either. So I just left the existing function as-is. Usually, the
deferred-I/O mmap is called immediately. [1]
Best regards
Thomas
[1]
https://elixir.bootlin.com/linux/v6.5.1/source/drivers/video/fbdev/smscufx.c#L784
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2023-09-04 14:39 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 13:14 [PATCH 0/8] fbdev: Use helpers for deferred I/O Thomas Zimmermann
2023-08-28 13:14 ` Thomas Zimmermann
2023-08-28 13:14 ` [PATCH 1/8] fbdev/smscufx: Use fb_ops " Thomas Zimmermann
2023-08-28 13:14 ` Thomas Zimmermann
2023-09-04 12:59 ` Javier Martinez Canillas
2023-09-04 12:59 ` Javier Martinez Canillas
2023-09-04 14:39 ` Thomas Zimmermann [this message]
2023-09-04 14:45 ` Thomas Zimmermann
2023-09-04 15:26 ` Javier Martinez Canillas
2023-08-28 13:14 ` [PATCH 2/8] fbdev/udlfb: " Thomas Zimmermann
2023-08-28 13:14 ` Thomas Zimmermann
2023-09-04 13:05 ` Javier Martinez Canillas
2023-09-04 13:05 ` Javier Martinez Canillas
2023-09-04 14:43 ` Thomas Zimmermann
2023-09-04 15:28 ` Javier Martinez Canillas
2023-08-28 13:14 ` [PATCH 3/8] fbdev: Add Kconfig macro FB_IOMEM_HELPERS_DEFERRED Thomas Zimmermann
2023-08-28 13:14 ` Thomas Zimmermann
2023-09-04 13:10 ` Javier Martinez Canillas
2023-09-04 13:10 ` Javier Martinez Canillas
2023-08-28 13:14 ` [PATCH 4/8] fbdev/hyperv_fb: Use fb_ops helpers for deferred I/O Thomas Zimmermann
2023-08-28 13:14 ` Thomas Zimmermann
2023-09-04 13:18 ` Javier Martinez Canillas
2023-09-04 13:18 ` Javier Martinez Canillas
2023-08-28 13:14 ` [PATCH 5/8] hid: Remove trailing whitespace Thomas Zimmermann
2023-08-28 13:14 ` Thomas Zimmermann
2023-09-04 13:24 ` Javier Martinez Canillas
2023-09-04 13:24 ` Javier Martinez Canillas
2023-08-28 13:14 ` [PATCH 6/8] hid/picolcd: Use fb_ops helpers for deferred I/O Thomas Zimmermann
2023-08-28 13:14 ` Thomas Zimmermann
2023-09-04 13:27 ` Javier Martinez Canillas
2023-09-04 13:27 ` Javier Martinez Canillas
2023-08-28 13:14 ` [PATCH 7/8] staging/fbtft: Initialize fb_op struct as static const Thomas Zimmermann
2023-08-28 13:14 ` Thomas Zimmermann
2023-08-28 14:51 ` Greg KH
2023-08-28 14:51 ` Greg KH
2023-09-04 13:28 ` Javier Martinez Canillas
2023-09-04 13:28 ` Javier Martinez Canillas
2023-08-28 13:14 ` [PATCH 8/8] staging/fbtft: Use fb_ops helpers for deferred I/O Thomas Zimmermann
2023-08-28 13:14 ` Thomas Zimmermann
2023-08-28 14:51 ` Greg KH
2023-08-28 14:51 ` Greg KH
2023-09-04 13:28 ` Javier Martinez Canillas
2023-09-04 13:28 ` Javier Martinez Canillas
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=b9b985e7-4f60-7c59-3121-b26b07b13b03@suse.de \
--to=tzimmermann@suse.de \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=sam@ravnborg.org \
--cc=steve.glendinning@shawell.net \
/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 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.