linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	deller@gmx.de, javierm@redhat.com, sam@ravnborg.org
Cc: linux-media@vger.kernel.org, linux-fbdev@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-geode@lists.infradead.org, linux-omap@vger.kernel.org,
	kvm@vger.kernel.org, Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH v2 01/47] media/vivid: Use fbdev I/O helpers
Date: Tue, 1 Aug 2023 18:54:45 +0200	[thread overview]
Message-ID: <0f2521b6-3d72-923c-df89-d94ca7f2fe52@suse.de> (raw)
In-Reply-To: <ee03c6c9-4e6a-2732-0416-43fd5418c950@xs4all.nl>


[-- Attachment #1.1: Type: text/plain, Size: 3664 bytes --]

Hi

Am 01.08.23 um 13:22 schrieb Hans Verkuil:
> On 01/08/2023 12:13, Thomas Zimmermann wrote:
>> Set struct fb_ops and with FB_DEFAULT_IO_OPS, fbdev's initializer
>> for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
>> Select the correct modules with Kconfig's FB_IO_HELPERS token.
>>
>> The macro and token set the currently selected values, so there is
>> no functional change.
>>
>> v2:
>> 	* updated to use _IOMEM_ tokens
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
>> Acked-by: Helge Deller <deller@gmx.de>
>> Cc: Hans Verkuil <hverkuil@xs4all.nl>
>> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
>> ---
>>   drivers/media/test-drivers/vivid/Kconfig     | 4 +---
>>   drivers/media/test-drivers/vivid/vivid-osd.c | 4 +---
>>   2 files changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/media/test-drivers/vivid/Kconfig b/drivers/media/test-drivers/vivid/Kconfig
>> index 318799d317ba..5b08a5ad291e 100644
>> --- a/drivers/media/test-drivers/vivid/Kconfig
>> +++ b/drivers/media/test-drivers/vivid/Kconfig
>> @@ -3,11 +3,9 @@ config VIDEO_VIVID
>>   	tristate "Virtual Video Test Driver"
>>   	depends on VIDEO_DEV && !SPARC32 && !SPARC64 && FB
>>   	depends on HAS_DMA
>> +	select FB_IOMEM_HELPERS
>>   	select FONT_SUPPORT
>>   	select FONT_8x16
>> -	select FB_CFB_FILLRECT
>> -	select FB_CFB_COPYAREA
>> -	select FB_CFB_IMAGEBLIT
>>   	select VIDEOBUF2_VMALLOC
>>   	select VIDEOBUF2_DMA_CONTIG
>>   	select VIDEO_V4L2_TPG
>> diff --git a/drivers/media/test-drivers/vivid/vivid-osd.c b/drivers/media/test-drivers/vivid/vivid-osd.c
>> index 051f1805a16d..5c931b94a7b5 100644
>> --- a/drivers/media/test-drivers/vivid/vivid-osd.c
>> +++ b/drivers/media/test-drivers/vivid/vivid-osd.c
>> @@ -246,12 +246,10 @@ static int vivid_fb_blank(int blank_mode, struct fb_info *info)
>>   
>>   static const struct fb_ops vivid_fb_ops = {
>>   	.owner = THIS_MODULE,
>> +	FB_DEFAULT_IOMEM_OPS,
> 
> This macro also sets fb_read and fb_write ops here, in addition to the
> cfb_* ops, based on this patch:
> 
> https://lore.kernel.org/all/20230729193157.15446-2-tzimmermann@suse.de/#Z2e.:20230729193157.15446-2-tzimmermann::40suse.de:1include:linux:fb.h
> 
> But those two ops were never set in this driver before.
> 
> It's been ages since I last worked with this, so I can't tell whether that's
> good or bad, all I know is that it makes what appears to be a functional change.
> 
> Can you explain a bit more? Am I missing something?

That change is intentional and welcome. If no fb_read/fb_write pointers 
are given fbdev uses them as their default. See

 
https://elixir.bootlin.com/linux/v6.5-rc1/source/drivers/video/fbdev/core/fbmem.c#L773

and below. Once all drivers set these pointers explicitly, we can drop 
the default and make the helpers optional and modular. For the drivers 
in this patchset there's no functional change.

Best regards
Thomas

> 
> Regards,
> 
> 	Hans
> 
>>   	.fb_check_var   = vivid_fb_check_var,
>>   	.fb_set_par     = vivid_fb_set_par,
>>   	.fb_setcolreg   = vivid_fb_setcolreg,
>> -	.fb_fillrect    = cfb_fillrect,
>> -	.fb_copyarea    = cfb_copyarea,
>> -	.fb_imageblit   = cfb_imageblit,
>>   	.fb_cursor      = NULL,
>>   	.fb_ioctl       = vivid_fb_ioctl,
>>   	.fb_pan_display = vivid_fb_pan_display,
> 

-- 
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 --]

  reply	other threads:[~2023-08-01 16:54 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 10:13 [PATCH v2 00/47] fbdev: Use I/O helpers Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 01/47] media/vivid: Use fbdev " Thomas Zimmermann
2023-08-01 11:22   ` Hans Verkuil
2023-08-01 16:54     ` Thomas Zimmermann [this message]
2023-08-02  7:34       ` Hans Verkuil
2023-08-01 10:13 ` [PATCH v2 02/47] fbdev/acornfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 03/47] fbdev/asiliantfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 04/47] fbdev/atmel_lcdfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 05/47] fbdev/aty128fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 06/47] fbdev/carminefb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 07/47] fbdev/chipsfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 08/47] fbdev/da8xx-fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 09/47] fbdev/efifb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 10/47] fbdev/fm2fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 11/47] fbdev/fsl-diu-fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 12/47] fbdev/g364fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 13/47] fbdev/geode/gx1fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 14/47] fbdev/geode/gxfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 15/47] fbdev/geode/lxfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 16/47] fbdev/goldfishfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 17/47] fbdev/grvga: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 18/47] fbdev/gxt4500: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 19/47] fbdev/i740fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 20/47] fbdev/imxfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 21/47] fbdev/kyro: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 22/47] fbdev/macfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 23/47] fbdev/maxinefb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 24/47] fbdev/mb862xxfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 25/47] fbdev/mmpfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 26/47] fbdev/mx3fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 27/47] fbdev/ocfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 28/47] fbdev/offb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 29/47] fbdev/omapfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 30/47] fbdev/platinumfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 31/47] fbdev/pmag-aa-fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 32/47] fbdev/pmag-ba-fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 33/47] fbdev/pmagb-b-fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 34/47] fbdev/pxa168fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 35/47] fbdev/pxafb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 36/47] fbdev/q40fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 37/47] fbdev/s3cfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 38/47] fbdev/sh7760fb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 39/47] fbdev/simplefb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 40/47] fbdev/sstfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 41/47] fbdev/sunxvr1000: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 42/47] fbdev/sunxvr2500: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 43/47] fbdev/uvesafb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 44/47] fbdev/valkyriefb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 45/47] fbdev/vesafb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 46/47] fbdev/xilinxfb: " Thomas Zimmermann
2023-08-01 10:13 ` [PATCH v2 47/47] vfio-dev/mdpy-fb: " Thomas Zimmermann

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=0f2521b6-3d72-923c-df89-d94ca7f2fe52@suse.de \
    --to=tzimmermann@suse.de \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    --cc=javierm@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-geode@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sam@ravnborg.org \
    /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;
as well as URLs for NNTP newsgroup(s).