From: Thomas Zimmermann <tzimmermann@suse.de> To: 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, javierm@redhat.com Cc: devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linuxppc-dev@lists.ozlabs.org, Thomas Zimmermann <tzimmermann@suse.de> Subject: [PATCH v2 2/2] fbdev: Warn in hot-unplug workaround for framebuffers without device Date: Tue, 19 Apr 2022 12:04:05 +0200 [thread overview] Message-ID: <20220419100405.12600-3-tzimmermann@suse.de> (raw) In-Reply-To: <20220419100405.12600-1-tzimmermann@suse.de> A workaround makes fbdev hot-unplugging work for framebuffers without device. The only user for this feature was offb. As each OF framebuffer now has an associated platform device, the workaround hould no longer be triggered. Update it with a warning and rewrite the comment. Fbdev drivers that trigger the hot-unplug workaround really need to be fixed. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Suggested-by: Javier Martinez Canillas <javierm@redhat.com> --- drivers/video/fbdev/core/fbmem.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index bc6ed750e915..84427470367b 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -1577,14 +1577,12 @@ static void do_remove_conflicting_framebuffers(struct apertures_struct *a, * allocate the memory range. * * If it's not a platform device, at least print a warning. A - * fix would add code to remove the device from the system. + * fix would add code to remove the device from the system. For + * framebuffers without any Linux device, print a warning as + * well. */ if (!device) { - /* TODO: Represent each OF framebuffer as its own - * device in the device hierarchy. For now, offb - * doesn't have such a device, so unregister the - * framebuffer as before without warning. - */ + pr_warn("fb%d: no device set\n", i); do_unregister_framebuffer(registered_fb[i]); } else if (dev_is_platform(device)) { registered_fb[i]->forced_out = true; -- 2.35.1
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de> To: 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, javierm@redhat.com Cc: devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org Subject: [PATCH v2 2/2] fbdev: Warn in hot-unplug workaround for framebuffers without device Date: Tue, 19 Apr 2022 12:04:05 +0200 [thread overview] Message-ID: <20220419100405.12600-3-tzimmermann@suse.de> (raw) In-Reply-To: <20220419100405.12600-1-tzimmermann@suse.de> A workaround makes fbdev hot-unplugging work for framebuffers without device. The only user for this feature was offb. As each OF framebuffer now has an associated platform device, the workaround hould no longer be triggered. Update it with a warning and rewrite the comment. Fbdev drivers that trigger the hot-unplug workaround really need to be fixed. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Suggested-by: Javier Martinez Canillas <javierm@redhat.com> --- drivers/video/fbdev/core/fbmem.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index bc6ed750e915..84427470367b 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -1577,14 +1577,12 @@ static void do_remove_conflicting_framebuffers(struct apertures_struct *a, * allocate the memory range. * * If it's not a platform device, at least print a warning. A - * fix would add code to remove the device from the system. + * fix would add code to remove the device from the system. For + * framebuffers without any Linux device, print a warning as + * well. */ if (!device) { - /* TODO: Represent each OF framebuffer as its own - * device in the device hierarchy. For now, offb - * doesn't have such a device, so unregister the - * framebuffer as before without warning. - */ + pr_warn("fb%d: no device set\n", i); do_unregister_framebuffer(registered_fb[i]); } else if (dev_is_platform(device)) { registered_fb[i]->forced_out = true; -- 2.35.1
next prev parent reply other threads:[~2022-04-19 10:04 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-19 10:04 [PATCH v2 0/2] of: Register platform device for each framebuffer Thomas Zimmermann 2022-04-19 10:04 ` Thomas Zimmermann 2022-04-19 10:04 ` [PATCH v2 1/2] of: Create platform devices for OF framebuffers Thomas Zimmermann 2022-04-19 10:04 ` Thomas Zimmermann 2022-04-19 13:30 ` Rob Herring 2022-04-19 13:30 ` Rob Herring 2022-04-19 13:30 ` Rob Herring 2022-04-19 13:41 ` Thomas Zimmermann 2022-04-19 13:41 ` Thomas Zimmermann 2022-04-19 13:41 ` Thomas Zimmermann 2022-04-19 10:04 ` Thomas Zimmermann [this message] 2022-04-19 10:04 ` [PATCH v2 2/2] fbdev: Warn in hot-unplug workaround for framebuffers without device Thomas Zimmermann 2022-04-20 7:35 ` Javier Martinez Canillas 2022-04-20 7:35 ` 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=20220419100405.12600-3-tzimmermann@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.