From: Ville Syrjälä Date: Mon, 23 Sep 2024 15:24:50 +0000 (+0300) Subject: drm/i915/bios: Round PCI ROM VBT allocation to multiple of 4 X-Git-Tag: v6.13-rc1~122^2~19^2~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3823683a0f170c45b84e8a32a3c282f783f9620a;p=thirdparty%2Fkernel%2Flinux.git drm/i915/bios: Round PCI ROM VBT allocation to multiple of 4 The SPI code rounds the VBT allocation to a multiple of four bytes (presumably because it reads the VBT 4 bytes at a time). Do the same for the PCI ROM side to eliminate pointless differences between the two codepaths. This will make no functional difference. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240923152453.11230-4-ville.syrjala@linux.intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index 37f30bb76e081..d4281234773ca 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -3166,7 +3166,7 @@ static struct vbt_header *oprom_get_vbt(struct intel_display *display, } /* The rest will be validated by intel_bios_is_valid_vbt() */ - vbt = kmalloc(vbt_size, GFP_KERNEL); + vbt = kmalloc(round_up(vbt_size, 4), GFP_KERNEL); if (!vbt) goto err_unmap_oprom;