From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Julius Werner <jwerner@chromium.org>,
Hugues Bruant <hugues.bruant@gmail.com>,
intel-gfx@lists.freedesktop.org,
Brian Norris <briannorris@chromium.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org, Borislav Petkov <bp@alien8.de>,
chrome-platform@lists.linux.dev
Subject: Re: [PATCH v3] firmware: coreboot: Don't register a pdev if screen_info data is present
Date: Sun, 15 Sep 2024 12:53:48 +0000 [thread overview]
Message-ID: <ZubY3NtRJWWTS1ON@google.com> (raw)
In-Reply-To: <20240913213246.1549213-1-javierm@redhat.com>
On Fri, Sep 13, 2024 at 11:32:29PM +0200, Javier Martinez Canillas wrote:
> @@ -27,8 +28,10 @@ static int framebuffer_probe(struct coreboot_device *dev)
> int i;
> u32 length;
> struct lb_framebuffer *fb = &dev->framebuffer;
> + const struct screen_info *si = &screen_info;
> struct platform_device *pdev;
> struct resource res;
> + unsigned int type;
> struct simplefb_platform_data pdata = {
> .width = fb->x_resolution,
> .height = fb->y_resolution,
> @@ -36,6 +39,20 @@ static int framebuffer_probe(struct coreboot_device *dev)
> .format = NULL,
> };
>
> + /*
> + * On coreboot systems, the advertised LB_TAG_FRAMEBUFFER entry
> + * in the coreboot table should only be used if the payload did
> + * not pass a framebuffer information to the Linux kernel.
> + *
> + * If the global screen_info data has been filled, the Generic
> + * System Framebuffers (sysfb) will already register a platform
> + * device and pass that screen_info as platform_data to a driver
> + * that can scan-out using the system provided framebuffer.
> + */
> + type = screen_info_video_type(si);
> + if (type)
> + return -ENODEV;
Given that `type` and `si` aren't used in otherwhere, the local variables can
be dropped.
I haven't had chance to see how to fix the 0-day build errors properly. If you
have chance to send the next versions, please drop the local variables.
prev parent reply other threads:[~2024-09-15 12:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 21:32 [PATCH v3] firmware: coreboot: Don't register a pdev if screen_info data is present Javier Martinez Canillas
2024-09-13 23:45 ` ✗ Fi.CI.CHECKPATCH: warning for firmware: coreboot: Don't register a pdev if screen_info data is present (rev2) Patchwork
2024-09-13 23:45 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-09-15 2:06 ` [PATCH v3] firmware: coreboot: Don't register a pdev if screen_info data is present kernel test robot
2024-09-15 7:44 ` kernel test robot
2024-09-16 6:24 ` Thomas Zimmermann
2024-09-16 8:36 ` Javier Martinez Canillas
2024-09-16 8:59 ` Thomas Zimmermann
2024-09-16 9:17 ` Javier Martinez Canillas
2024-09-15 12:53 ` Tzung-Bi Shih [this message]
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=ZubY3NtRJWWTS1ON@google.com \
--to=tzungbi@kernel.org \
--cc=bp@alien8.de \
--cc=briannorris@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dri-devel@lists.freedesktop.org \
--cc=hugues.bruant@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=jwerner@chromium.org \
--cc=linux-kernel@vger.kernel.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 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.