From: Jani Nikula <jani.nikula@linux.intel.com>
To: Radhakrishna Sripada <radhakrishna.sripada@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 0/4] VBT read cleanup
Date: Tue, 27 Feb 2024 14:33:49 +0200 [thread overview]
Message-ID: <878r36jdci.fsf@intel.com> (raw)
In-Reply-To: <20240220223129.3822480-1-radhakrishna.sripada@intel.com>
On Tue, 20 Feb 2024, Radhakrishna Sripada <radhakrishna.sripada@intel.com> wrote:
> This series is originally based out of [1], and built on top of [2].
>
> The primary departure from [1] was that vbt is no longer cached. During vbt
> show, based on the source of vbt, it would simply be re-read reducing the
> read/cleanup complexity. With this series debugfs dump of vbt should work on
> all the platforms that support display.
I think I'd structure this series differently. Please consider something
like this:
1) Add intel_opregion_vbt_present() to check if the VBT is there. Use it
in intel_bios_is_lvds_present().
2) Always kmemdup and return an allocated buffer from
intel_opregion_get_vbt(). Always kfree() it. See how that plays with
the above, and helps clean up the paths and remove the oprom_vbt
variable in intel_bios_init(). The extra allocation is a bummer, but
otherwise the cleanup paths will be messy.
3) Add a static function in intel_bios.c to abstract the ways to get the
VBT. Use it in both intel_bios_init() and intel_bios_vbt_show().
4) Add the size return parameters. This could perhaps be done
earlier. *shrug*
5) Move firmware VBT to the above function.
BR,
Jani.
>
> 1. https://patchwork.freedesktop.org/series/128341/
> 2. https://patchwork.freedesktop.org/series/128683/
>
> Radhakrishna Sripada (4):
> drm/i915: Pass size to oprom_get_vbt
> drm/i915: Pass size to spi_oprom_get_vbt
> drm/i915: Move vbt read from firmware to intel_bios.c
> drm/i915: Show bios vbt when read from firmware/spi/oprom
>
> drivers/gpu/drm/i915/display/intel_bios.c | 104 +++++++++++++++---
> drivers/gpu/drm/i915/display/intel_opregion.c | 46 --------
> 2 files changed, 86 insertions(+), 64 deletions(-)
--
Jani Nikula, Intel
prev parent reply other threads:[~2024-02-27 12:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 22:31 [PATCH v2 0/4] VBT read cleanup Radhakrishna Sripada
2024-02-20 22:31 ` [PATCH v2 1/4] drm/i915: Pass size to oprom_get_vbt Radhakrishna Sripada
2024-02-27 12:37 ` Jani Nikula
2024-02-20 22:31 ` [PATCH v2 2/4] drm/i915: Pass size to spi_oprom_get_vbt Radhakrishna Sripada
2024-02-27 12:38 ` Jani Nikula
2024-02-20 22:31 ` [PATCH v2 3/4] drm/i915: Move vbt read from firmware to intel_bios.c Radhakrishna Sripada
2024-02-27 12:42 ` Jani Nikula
2024-02-20 22:31 ` [PATCH v2 4/4] drm/i915: Show bios vbt when read from firmware/spi/oprom Radhakrishna Sripada
2024-02-27 12:43 ` Jani Nikula
2024-02-21 2:51 ` ✗ Fi.CI.SPARSE: warning for VBT read cleanup Patchwork
2024-02-21 3:08 ` ✓ Fi.CI.BAT: success " Patchwork
2024-02-21 6:15 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-02-27 12:33 ` Jani Nikula [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=878r36jdci.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=radhakrishna.sripada@intel.com \
/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.