linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org
Cc: dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-fbdev@vger.kernel.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Mikko Perttunen <mperttunen@nvidia.com>
Subject: Re: [PATCH 04/10] drm/tegra: Set fbdev flags
Date: Wed, 05 Jul 2023 11:34:25 +0200	[thread overview]
Message-ID: <87a5war9b2.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <f82635d8-4500-d420-f6ba-65aa515017e4@suse.de>

Thomas Zimmermann <tzimmermann@suse.de> writes:

[...]
   
>>> +	info->flags |= FBINFO_VIRTFB;
>> 
>> I see that all fbdev drivers just do: info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB
>> 
>> Guess you are doing in two assignments to be consistent with drm_fbdev_dma.c ?
>> I was just curious about the rationale for setting the flags in two steps.
>
> The _DEFAULT flag is really just a zero. And the other flags describe 
> different aspects of the framebuffer.  I think it makes sense to set the 
> flags together with the respective state. For example, _VIRTFB is set 
> next to ->screen_buffer, because they belong together.
>

Yes, that makes sense.

> _VIRTFB is currently only used in defio code at
>
> https://elixir.bootlin.com/linux/latest/source/drivers/video/fbdev/core/fb_defio.c#L232
>
> I think the fbdev I/O helpers should also test this flag after all 
> drivers have been annotated correctly. For example, fb_io_read() would 
> WARN_ONCE if the _VIRTFB flag has been set; and fb_sys_read() would warn 
> if it hasn't been set.  For the read helpers, it also makes sense to 
> WARN_ONCE if the _READS_FAST flag has not been set.
>

Agreed. Maybe you could add those warn (or at least info or debug?) even
if not all drivers have been annotated correctly. That way people can be
aware that is missing and fix if there are remaining drivers.

> Best regards
> Thomas
>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


  reply	other threads:[~2023-07-05  9:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04 15:49 [PATCH 00/10] drm: Improve fbdev emulation for DMA-able framebuffers Thomas Zimmermann
2023-07-04 15:49 ` [PATCH 01/10] fbdev: Add fb_ops init macros for framebuffers in DMA-able memory Thomas Zimmermann
2023-07-05  8:23   ` Javier Martinez Canillas
2023-07-05  9:08     ` Thomas Zimmermann
2023-07-05  9:13       ` Javier Martinez Canillas
2023-07-04 15:49 ` [PATCH 02/10] drm/fbdev-dma: Use fbdev DMA helpers Thomas Zimmermann
2023-07-05  8:24   ` Javier Martinez Canillas
2023-07-04 15:50 ` [PATCH 03/10] drm/tegra: " Thomas Zimmermann
2023-07-05  8:24   ` Javier Martinez Canillas
2023-07-04 15:50 ` [PATCH 04/10] drm/tegra: Set fbdev flags Thomas Zimmermann
2023-07-05  8:34   ` Javier Martinez Canillas
2023-07-05  9:19     ` Thomas Zimmermann
2023-07-05  9:34       ` Javier Martinez Canillas [this message]
2023-07-06 12:44         ` Thomas Zimmermann
2023-07-04 15:50 ` [PATCH 05/10] drm/exynos: Use fbdev DMA helpers Thomas Zimmermann
2023-07-05  2:10   ` 대인기/Tizen Platform Lab(SR)/삼성전자
2023-07-05  8:38   ` Javier Martinez Canillas
2023-07-04 15:50 ` [PATCH 06/10] drm/exynos: Set fbdev flags Thomas Zimmermann
2023-07-05  8:49   ` Javier Martinez Canillas
2023-07-05  9:31     ` Thomas Zimmermann
2023-07-05  9:53       ` Javier Martinez Canillas
2023-07-04 15:50 ` [PATCH 07/10] drm/omapdrm: Set VM flags in GEM-object mmap function Thomas Zimmermann
2023-07-05  9:03   ` Javier Martinez Canillas
2023-07-04 15:50 ` [PATCH 08/10] drm/omapdrm: Use GEM mmap for fbdev emulation Thomas Zimmermann
2023-07-05  9:05   ` Javier Martinez Canillas
2023-07-04 15:50 ` [PATCH 09/10] drm/omapdrm: Set fbdev flags Thomas Zimmermann
2023-07-05  9:07   ` Javier Martinez Canillas
2023-07-04 15:50 ` [PATCH 10/10] fbdev: Remove FB_DEFAULT_SYS_OPS Thomas Zimmermann
2023-07-05  9:07   ` Javier Martinez Canillas
2023-07-05  8:30 ` [PATCH 00/10] drm: Improve fbdev emulation for DMA-able framebuffers Maxime Ripard

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=87a5war9b2.fsf@minerva.mail-host-address-is-not-set \
    --to=javierm@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mperttunen@nvidia.com \
    --cc=mripard@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=tzimmermann@suse.de \
    /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).