From: Jani Nikula <jani.nikula@linux.intel.com>
To: Radhakrishna Sripada <radhakrishna.sripada@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 2/4] drm/i915: Pass size to spi_oprom_get_vbt
Date: Tue, 27 Feb 2024 14:38:32 +0200 [thread overview]
Message-ID: <8734tejd4n.fsf@intel.com> (raw)
In-Reply-To: <20240220223129.3822480-3-radhakrishna.sripada@intel.com>
On Tue, 20 Feb 2024, Radhakrishna Sripada <radhakrishna.sripada@intel.com> wrote:
> spi_oprom_get_vbt will later be used to show the contents of vbt for
> which the size of vbt is needed.
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Yeah, do the same thing in oprom_get_vbt().
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_bios.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index ceb6e4145c62..2624a4528b21 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -2957,7 +2957,8 @@ static u32 intel_spi_read(struct intel_uncore *uncore, u32 offset)
> return intel_uncore_read(uncore, PRIMARY_SPI_TRIGGER);
> }
>
> -static struct vbt_header *spi_oprom_get_vbt(struct drm_i915_private *i915)
> +static struct vbt_header *spi_oprom_get_vbt(struct drm_i915_private *i915,
> + size_t *size)
> {
> u32 count, data, found, store = 0;
> u32 static_region, oprom_offset;
> @@ -3000,6 +3001,9 @@ static struct vbt_header *spi_oprom_get_vbt(struct drm_i915_private *i915)
>
> drm_dbg_kms(&i915->drm, "Found valid VBT in SPI flash\n");
>
> + if (size)
> + *size = vbt_size;
> +
> return (struct vbt_header *)vbt;
>
> err_free_vbt:
> @@ -3103,7 +3107,7 @@ void intel_bios_init(struct drm_i915_private *i915)
> * PCI mapping
> */
> if (!vbt && IS_DGFX(i915)) {
> - oprom_vbt = spi_oprom_get_vbt(i915);
> + oprom_vbt = spi_oprom_get_vbt(i915, NULL);
> vbt = oprom_vbt;
> }
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-02-27 12:38 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 [this message]
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 ` [PATCH v2 0/4] " Jani Nikula
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=8734tejd4n.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.