From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
Julius Werner <jwerner@chromium.org>
Cc: Brian Norris <briannorris@chromium.org>,
Borislav Petkov <bp@alien8.de>,
Hugues Bruant <hugues.bruant@gmail.com>,
stable@vger.kernel.org, regressions@lists.linux.dev,
linux-kernel@vger.kernel.org, Fenghua Yu <fenghua.yu@intel.com>,
Reinette Chatre <reinette.chatre@intel.com>,
Tony Luck <tony.luck@intel.com>,
Tzung-Bi Shih <tzungbi@kernel.org>,
chrome-platform@lists.linux.dev,
Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [NOT A REGRESSION] firmware: framebuffer-coreboot: duplicate device name "simple-framebuffer.0"
Date: Fri, 13 Sep 2024 09:05:50 +0200 [thread overview]
Message-ID: <87jzfgyqwh.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <6bf656e0-e0b6-4b97-b7a2-ff0bdc86b098@suse.de>
Thomas Zimmermann <tzimmermann@suse.de> writes:
Hello Thomas,
> Hi Javier,
>
> thanks for the patch.
>
Thanks for your feedback.
> Am 12.09.24 um 18:33 schrieb Javier Martinez Canillas:
>> Julius Werner <jwerner@chromium.org> writes:
[...]
>> ---
>> drivers/firmware/google/framebuffer-coreboot.c | 16 ++++++++++++++++
>> 1 file changed, 16 insertions(+)
>>
>> diff --git a/drivers/firmware/google/framebuffer-coreboot.c b/drivers/firmware/google/framebuffer-coreboot.c
>> index daadd71d8ddd..4e50da17cd7e 100644
>> --- a/drivers/firmware/google/framebuffer-coreboot.c
>> +++ b/drivers/firmware/google/framebuffer-coreboot.c
>> @@ -15,6 +15,7 @@
>> #include <linux/module.h>
>> #include <linux/platform_data/simplefb.h>
>> #include <linux/platform_device.h>
>> +#include <linux/screen_info.h>
>>
>> #include "coreboot_table.h"
>>
>> @@ -27,6 +28,7 @@ static int framebuffer_probe(struct coreboot_device *dev)
>> int i;
>> u32 length;
>> struct lb_framebuffer *fb = &dev->framebuffer;
>> + struct screen_info *si = &screen_info;
>
> Probably 'const'.
>
Ok.
>> struct platform_device *pdev;
>> struct resource res;
>> struct simplefb_platform_data pdata = {
>> @@ -36,6 +38,20 @@ static int framebuffer_probe(struct coreboot_device *dev)
>> .format = NULL,
>> };
>>
>> + /*
>> + * If the global screen_info data has been filled, the Generic
>> + * System Framebuffers (sysfb) will already register a platform
>> + * and pass the screen_info as platform_data to a driver that
>> + * could scan-out using the system provided framebuffer.
>> + *
>> + * On Coreboot systems, the advertise LB_TAG_FRAMEBUFFER entry
>> + * in the Coreboot table should only be used if the payload did
>> + * not set video mode info and passed it to the Linux kernel.
>> + */
>> + if (si->orig_video_isVGA == VIDEO_TYPE_VLFB ||
>> + si->orig_video_isVGA == VIDEO_TYPE_EFI)
>
> Rather call screen_info_video_type(si) [1] to get the type. If it
Indeed. I missed that helper, I'll change it.
> returns 0, the screen_info is unset and the corebios code can handle the
> framebuffer. In any other case, the framebuffer went through a
> bootloader, which might have modified it. This also handles awkward
> cases, such as if the bootloader programs a VGA text mode.
>
> [1]
> https://elixir.bootlin.com/linux/v6.10.10/source/include/linux/screen_info.h#L92
>
> With these changes:
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
Thanks. I'll wait for others in this thread to comment and if all agree
with the solution, I'll post a proper patch (addressing your comments).
> Best regards
> Thomas
>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2024-09-13 7:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 6:53 [REGRESSION] soft lockup on boot starting with kernel 6.10 / commit 5186ba33234c9a90833f7c93ce7de80e25fac6f5 Hugues Bruant
2024-09-09 8:02 ` Borislav Petkov
2024-09-09 9:49 ` Thomas Zimmermann
2024-09-10 19:04 ` Hugues Bruant
2024-09-09 16:08 ` Luck, Tony
2024-09-10 18:48 ` Hugues Bruant
2024-09-10 17:49 ` [NOT A REGRESSION] firmware: framebuffer-coreboot: duplicate device name "simple-framebuffer.0" Brian Norris
2024-09-10 17:50 ` kernel test robot
2024-09-12 11:35 ` Javier Martinez Canillas
2024-09-12 16:03 ` Julius Werner
2024-09-12 16:33 ` Javier Martinez Canillas
2024-09-13 6:53 ` Thomas Zimmermann
2024-09-13 7:05 ` Javier Martinez Canillas [this message]
2024-09-13 17:47 ` Brian Norris
2024-09-13 19:03 ` Javier Martinez Canillas
2024-09-10 19:53 ` [REGRESSION] soft lockup on boot starting with kernel 6.10 / commit 5186ba33234c9a90833f7c93ce7de80e25fac6f5 Hugues Bruant
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=87jzfgyqwh.fsf@minerva.mail-host-address-is-not-set \
--to=javierm@redhat.com \
--cc=bp@alien8.de \
--cc=briannorris@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dri-devel@lists.freedesktop.org \
--cc=fenghua.yu@intel.com \
--cc=hugues.bruant@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=reinette.chatre@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=stable@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=tursulin@ursulin.net \
--cc=tzimmermann@suse.de \
--cc=tzungbi@kernel.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