From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
airlied@linux.ie, daniel@ffwll.ch, deller@gmx.de,
maxime@cerno.tech, sam@ravnborg.org, msuchanek@suse.de,
mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org,
geert@linux-m68k.org, mark.cave-ayland@ilande.co.uk
Cc: linux-fbdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 06/10] drm/simpledrm: Move some functionality into fwfb helper library
Date: Wed, 27 Jul 2022 11:39:31 +0200 [thread overview]
Message-ID: <b3392ac8-0e21-d429-489f-b12a562dcb7c@redhat.com> (raw)
In-Reply-To: <623cde06-62ec-c8be-0f0e-2fd900c2359a@suse.de>
On 7/27/22 10:24, Thomas Zimmermann wrote:
> Hi
>
> Am 25.07.22 um 18:23 schrieb Javier Martinez Canillas:
>> On 7/20/22 16:27, Thomas Zimmermann wrote:
>>> Move some of simpledrm's functionality into a helper library. Other
>>> drivers for firmware-provided framebuffers will also need functions
>>> to handle fixed modes and color formats, or update the back buffer.
>>>
>>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>>> ---
>>
>> Nice patch!
>
> TBH it took me 3 tries to get something done for this library and I'm
> still not happy with the result. I want to share code between simpledrm
> and ofdrm, but that turns out to be harder then expected. A good part of
> this code appears to belong into other libraries (you also mentioned
> this below).
>
> I don't want to duplicated code between simpledrm and ofdrm without
> reason, but I expect that this library will somewhen be refactored and
> dissolved into existing libraries.
>
Yes, I think is a step in the right direction and guess it would be even
more useful once/if a 3rd firmware-provided framebuffer driver is added.
>
>>
>> [...]
>>
>>> +
>>> +/**
>>> + * DOC: overview
>>> + *
>>> + * The Firmware Framebuffer library FWFB provides helpers for devices with
>>> + * fixed-mode backing storage. It helps drivers to export a display mode of
>>> + * te correct size and copy updates to the backing storage.
>>
>> the
>>
>> it is "backing storage" or "backing store" ? I always thought that storage was
>> used for non-volatile media while "store" could be volatile and non-volatile.
>
> Why store? Isn't that a little shop for fashion or groceries? I'm no
> native speaker; I can't tell if either implies that we're sending
> pictures to a warehouse or bakery. :)
>
LOL.
> Would 'back buffer' (in contrast to 'shadow buffer') be clear?
>
Back buffer is more clear indeed.
[...]
>> It seems a little bit arbitrary to me that format is the only field that's
>> a pointer and the other ones are embedded into the struct drm_fwfb. Any
>> reason for that or is just a consequence of how types were used by the
>> simpledrm_device_create() function before that code moved into helpers ?
>
> Format is constant and comes from statically initialized memory in
> drm_fourcc.c. I'd expect to be able to compare formats by comparing the
> pointers. Copying the format here would break the assumption.
>
I see. Makes sense.
>>
>> [...]
>>
>>> +static bool is_listed_fourcc(const uint32_t *fourccs, size_t nfourccs, uint32_t fourcc)
>>> +{
>>> + const uint32_t *fourccs_end = fourccs + nfourccs;
>>> +
>>> + while (fourccs < fourccs_end) {
>>> + if (*fourccs == fourcc)
>>> + return true;
>>> + ++fourccs;
>>> + }
>>> + return false;
>>> +}
>>
>> This seems a helper that could be useful besides the drm_fwfb_helper.c file.
>>
>> I believe patches 1-6 shouldn't wait for the others in this series and could
>> just be merged when ready. Patches 7-10 can follow later.
>
> Yeah, I'd like to move patches 1 to 5 into a new series for merging.
> Patch 6 is only useful for ofdrm and as I said, maybe there's a better
> solution then this library. I'd rather keep it here for now.
>
OK.
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
next prev parent reply other threads:[~2022-07-27 9:39 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 14:27 [PATCH v2 00/10] drm: Add driver for PowerPC OF displays Thomas Zimmermann
2022-07-20 14:27 ` [PATCH v2 01/10] drm/simpledrm: Remove mem field from device structure Thomas Zimmermann
2022-07-25 14:48 ` Javier Martinez Canillas
2022-07-20 14:27 ` [PATCH v2 02/10] drm/simpledrm: Inline device-init helpers Thomas Zimmermann
2022-07-25 15:01 ` Javier Martinez Canillas
2022-07-27 7:50 ` Thomas Zimmermann
2022-07-27 9:30 ` Javier Martinez Canillas
2022-07-20 14:27 ` [PATCH v2 03/10] drm/simpledrm: Remove pdev field from device structure Thomas Zimmermann
2022-07-25 15:02 ` Javier Martinez Canillas
2022-07-20 14:27 ` [PATCH v2 04/10] drm/simpledrm: Compute framebuffer stride if not set Thomas Zimmermann
2022-07-21 14:46 ` Geert Uytterhoeven
2022-07-25 15:13 ` Javier Martinez Canillas
2022-07-27 7:53 ` Thomas Zimmermann
2022-08-11 17:23 ` Daniel Vetter
2022-08-11 18:26 ` Thomas Zimmermann
2022-08-11 18:27 ` Thomas Zimmermann
2022-09-06 19:16 ` Daniel Vetter
2022-07-20 14:27 ` [PATCH v2 05/10] drm/simpledrm: Convert to atomic helpers Thomas Zimmermann
2022-07-25 15:46 ` Javier Martinez Canillas
2022-07-27 7:58 ` Thomas Zimmermann
2022-07-20 14:27 ` [PATCH v2 06/10] drm/simpledrm: Move some functionality into fwfb helper library Thomas Zimmermann
2022-07-25 16:23 ` Javier Martinez Canillas
2022-07-27 8:24 ` Thomas Zimmermann
2022-07-27 9:39 ` Javier Martinez Canillas [this message]
2022-07-20 14:27 ` [PATCH v2 07/10] drm/ofdrm: Add ofdrm for Open Firmware framebuffers Thomas Zimmermann
2022-07-26 13:17 ` Javier Martinez Canillas
2022-09-21 11:41 ` Thomas Zimmermann
2022-07-20 14:27 ` [PATCH v2 08/10] drm/ofdrm: Add CRTC state Thomas Zimmermann
2022-07-26 13:36 ` Javier Martinez Canillas
2022-09-21 11:45 ` Thomas Zimmermann
2022-07-20 14:27 ` [PATCH v2 09/10] drm/ofdrm: Add per-model device function Thomas Zimmermann
2022-07-26 13:38 ` Javier Martinez Canillas
2022-07-26 14:40 ` Michal Suchánek
2022-07-26 19:22 ` Javier Martinez Canillas
2022-07-27 8:33 ` Thomas Zimmermann
2022-08-05 0:22 ` Benjamin Herrenschmidt
2022-09-21 12:37 ` Thomas Zimmermann
2022-07-20 14:27 ` [PATCH v2 10/10] drm/ofdrm: Support color management Thomas Zimmermann
2022-07-26 13:49 ` Javier Martinez Canillas
2022-07-27 8:41 ` Thomas Zimmermann
2022-07-27 9:45 ` Javier Martinez Canillas
2022-08-05 0:29 ` Benjamin Herrenschmidt
2022-08-05 0:19 ` Benjamin Herrenschmidt
2022-09-21 12:55 ` Thomas Zimmermann
2022-09-21 16:48 ` Geert Uytterhoeven
2022-09-22 6:42 ` Thomas Zimmermann
2022-09-22 7:28 ` Maxime Ripard
2022-09-22 8:06 ` Thomas Zimmermann
2022-07-28 11:13 ` [PATCH v2 00/10] drm: Add driver for PowerPC OF displays Michael Ellerman
2022-07-28 11:31 ` Michal Suchánek
2022-07-28 11:42 ` 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=b3392ac8-0e21-d429-489f-b12a562dcb7c@redhat.com \
--to=javierm@redhat.com \
--cc=airlied@linux.ie \
--cc=benh@kernel.crashing.org \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert@linux-m68k.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=maxime@cerno.tech \
--cc=mpe@ellerman.id.au \
--cc=msuchanek@suse.de \
--cc=paulus@samba.org \
--cc=sam@ravnborg.org \
--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).