From: Thomas Zimmermann <tzimmermann@suse.de>
To: Javier Martinez Canillas <javierm@redhat.com>,
robh+dt@kernel.org, frowand.list@gmail.com, daniel@ffwll.ch,
deller@gmx.de, sam@ravnborg.org, linux@roeck-us.net,
mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org
Cc: devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] of: Create platform devices for OF framebuffers
Date: Wed, 13 Apr 2022 12:49:02 +0200 [thread overview]
Message-ID: <b7b5f75c-bf04-8bb6-9628-2790adfe61fc@suse.de> (raw)
In-Reply-To: <23060462-5700-e17a-0abe-a4c5123abe29@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 2582 bytes --]
Hi
Am 13.04.22 um 12:45 schrieb Javier Martinez Canillas:
> Hello Thomas,
>
> Thanks for working on this.
>
> On 4/13/22 11:24, Thomas Zimmermann wrote:
>> Create a platform device for each OF-declared framebuffer and have
>> offb bind to these devices. Allows for real hot-unplugging and other
>> drivers besides offb.
>>
>> Originally, offb created framebuffer devices while initializing its
>> module by parsing the OF device tree. No actual Linux device was set
>> up. This tied OF framebuffers to offb and makes writing other drivers
>> for the OF framebuffers complicated. The absence of a Linux device
>> prevented real hot-unplugging. Adding a distinct platform device for
>> each OF framebuffer solves both problems. Specifically, a DRM drivers
>> can now provide graphics output with modern userspace.
>>
>> Some of the offb init code is now located in the OF initialization.
>> There's now also an implementation of of_platform_default_populate_init(),
>> which was missing before. The OF side creates different devices for
>> either OF display nodes or bootx displays as they require different
>> handling by the driver. The offb drivers picks up each type of device
>> and runs the appropriate fbdev initialization.
>>
>> Tested with OF display nodes on qemu's ppc64le target.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>
> [snip]
>
>> + for_each_node_by_type(node, "display") {
>> + if (!of_get_property(node, "linux,opened", NULL) ||
>> + !of_get_property(node, "linux,boot-display", NULL))
>> + continue;
>> + dev = of_platform_device_create(node, "of-display", NULL);
>> + if (WARN_ON(!dev))
>> + return -ENOMEM;
>> + boot_display = node;
>> + break;
>> + }
>> + for_each_node_by_type(node, "display") {
>> + if (!of_get_property(node, "linux,opened", NULL) || node == boot_display)
>> + continue;
>> + of_platform_device_create(node, "of-display", NULL);
>
> Shouldn't check for the return value here too ?
Failing is probably not useful, as it's not the main FB used for
booting. Printing an error message wouldn't hurt, I guess. I'll also
update the new driver registration in offb with an error message.
>
> Other than this small nit, it looks good to me.
>
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
>
Thanks.
Best regards
Thomas
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2022-04-13 10:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 9:24 [PATCH 0/2] of: Register platform device for each framebuffer Thomas Zimmermann
2022-04-13 9:24 ` [PATCH 1/2] of: Create platform devices for OF framebuffers Thomas Zimmermann
2022-04-13 10:45 ` Javier Martinez Canillas
2022-04-13 10:49 ` Thomas Zimmermann [this message]
2022-04-13 12:51 ` Rob Herring
2022-04-13 17:58 ` Thomas Zimmermann
2022-04-13 18:02 ` Javier Martinez Canillas
2022-04-13 18:46 ` Rob Herring
2022-04-13 18:53 ` Rob Herring
2022-04-18 18:09 ` Thomas Zimmermann
2022-04-13 9:24 ` [PATCH 2/2] fbdev: Remove hot-unplug workaround for framebuffers without device Thomas Zimmermann
2022-04-13 10:50 ` Javier Martinez Canillas
2022-04-13 16:05 ` Daniel Vetter
2022-04-13 18:09 ` Thomas Zimmermann
2022-04-19 7:22 ` Javier Martinez Canillas
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=b7b5f75c-bf04-8bb6-9628-2790adfe61fc@suse.de \
--to=tzimmermann@suse.de \
--cc=benh@kernel.crashing.org \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=frowand.list@gmail.com \
--cc=javierm@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=robh+dt@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).