diff mbox series

[09/32] auxdisplay/ht16k33: Set FBINFO_VIRTFB flag

Message ID 20231115102954.7102-10-tzimmermann@suse.de (mailing list archive)
State Handled Elsewhere
Headers show
Series fbdev: Modularize helpers for struct fb_ops | expand

Commit Message

Thomas Zimmermann Nov. 15, 2023, 10:19 a.m. UTC
The ht16k33 driver operates on system memory. Mark the framebuffer
accordingly. Helpers operating on the framebuffer memory will test
for the presence of this flag.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Robin van der Gracht <robin@protonic.nl>
---
 drivers/auxdisplay/ht16k33.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Javier Martinez Canillas Nov. 16, 2023, 10:23 a.m. UTC | #1
Thomas Zimmermann <tzimmermann@suse.de> writes:

> The ht16k33 driver operates on system memory. Mark the framebuffer
> accordingly. Helpers operating on the framebuffer memory will test
> for the presence of this flag.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Miguel Ojeda <ojeda@kernel.org>
> Cc: Robin van der Gracht <robin@protonic.nl>
> ---
>  drivers/auxdisplay/ht16k33.c | 1 +
>  1 file changed, 1 insertion(+)
>

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Miguel Ojeda Nov. 21, 2023, 11:50 p.m. UTC | #2
On Wed, Nov 15, 2023 at 11:30 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> +       fbdev->info->flags |= FBINFO_VIRTFB;

Is the `|=` (instead of just `=`) used in case someone adds something
to the flags before (e.g. `fb_bl_default_curve`) or due to some other
reason? (One of the other patches uses `=`).

In any case, if that is intended:

Acked-by: Miguel Ojeda <ojeda@kernel.org>

Cheers,
Miguel
Robin van der Gracht Nov. 22, 2023, 7:42 a.m. UTC | #3
On 2023-11-15 11:19, Thomas Zimmermann wrote:
> The ht16k33 driver operates on system memory. Mark the framebuffer
> accordingly. Helpers operating on the framebuffer memory will test
> for the presence of this flag.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Miguel Ojeda <ojeda@kernel.org>
> Cc: Robin van der Gracht <robin@protonic.nl>
> ---
>  drivers/auxdisplay/ht16k33.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/auxdisplay/ht16k33.c 
> b/drivers/auxdisplay/ht16k33.c
> index 3a2d883872249..f1716e3ce6a92 100644
> --- a/drivers/auxdisplay/ht16k33.c
> +++ b/drivers/auxdisplay/ht16k33.c
> @@ -640,6 +640,7 @@ static int ht16k33_fbdev_probe(struct device *dev,
> struct ht16k33_priv *priv,
> 
>  	INIT_DELAYED_WORK(&priv->work, ht16k33_fb_update);
>  	fbdev->info->fbops = &ht16k33_fb_ops;
> +	fbdev->info->flags |= FBINFO_VIRTFB;
>  	fbdev->info->screen_buffer = fbdev->buffer;
>  	fbdev->info->screen_size = HT16K33_FB_SIZE;
>  	fbdev->info->fix = ht16k33_fb_fix;

Acked-by: Robin van der Gracht <robin@protonic.nl>
Thomas Zimmermann Nov. 22, 2023, 9:03 a.m. UTC | #4
Hi

Am 22.11.23 um 00:50 schrieb Miguel Ojeda:
> On Wed, Nov 15, 2023 at 11:30 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>>
>> +       fbdev->info->flags |= FBINFO_VIRTFB;
> 
> Is the `|=` (instead of just `=`) used in case someone adds something
> to the flags before (e.g. `fb_bl_default_curve`) or due to some other
> reason? (One of the other patches uses `=`).

Yes, it's intentionally.

> 
> In any case, if that is intended:
> 
> Acked-by: Miguel Ojeda <ojeda@kernel.org>

Thanks.

> 
> Cheers,
> Miguel
diff mbox series

Patch

diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index 3a2d883872249..f1716e3ce6a92 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -640,6 +640,7 @@  static int ht16k33_fbdev_probe(struct device *dev, struct ht16k33_priv *priv,
 
 	INIT_DELAYED_WORK(&priv->work, ht16k33_fb_update);
 	fbdev->info->fbops = &ht16k33_fb_ops;
+	fbdev->info->flags |= FBINFO_VIRTFB;
 	fbdev->info->screen_buffer = fbdev->buffer;
 	fbdev->info->screen_size = HT16K33_FB_SIZE;
 	fbdev->info->fix = ht16k33_fb_fix;