linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Javier Martinez Canillas <javierm@redhat.com>,
	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: Thu, 6 Jul 2023 14:44:20 +0200	[thread overview]
Message-ID: <5555bc4d-14bb-c59b-728f-4e91a24f9a73@suse.de> (raw)
In-Reply-To: <87a5war9b2.fsf@minerva.mail-host-address-is-not-set>


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

Hi

Am 05.07.23 um 11:34 schrieb Javier Martinez Canillas:
> 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.

Yes, we could do that. I want to go through drivers first and fix the 
low-hanging fruits. Some of the old fbdev drivers use either DMA or I/O 
memory. They would only be fix-worthy if someone complains.

Best regards
Thomas

> 
>> Best regards
>> Thomas
>>
> 

-- 
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-07-06 12:45 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
2023-07-06 12:44         ` Thomas Zimmermann [this message]
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=5555bc4d-14bb-c59b-728f-4e91a24f9a73@suse.de \
    --to=tzimmermann@suse.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --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 \
    /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).