Commit 8612f91e authored by Radhakrishna Sripada's avatar Radhakrishna Sripada Committed by Jani Nikula

drm/i915: Pass size to spi_oprom_get_vbt

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: default avatarRadhakrishna Sripada <radhakrishna.sripada@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240228213235.2495611-3-radhakrishna.sripada@intel.com
parent b4c9ee84
......@@ -3007,7 +3007,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;
......@@ -3050,6 +3051,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:
......@@ -3155,7 +3159,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment