From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org, Jani Nikula <jani.nikula@intel.com>
Subject: [PATCH v2 3/6] drm/i915/bios: Round PCI ROM VBT allocation to multiple of 4
Date: Mon, 23 Sep 2024 18:24:50 +0300 [thread overview]
Message-ID: <20240923152453.11230-4-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20240923152453.11230-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
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 <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 37f30bb76e08..d4281234773c 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;
--
2.44.2
next prev parent reply other threads:[~2024-09-23 15:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 15:24 [PATCH v2 0/6] drm/i915/bios: Refactor ROM access Ville Syrjala
2024-09-23 15:24 ` [PATCH v2 1/6] drm/i915/bios: Use drm_dbg_kms() consistently Ville Syrjala
2024-09-24 13:52 ` Jani Nikula
2024-09-23 15:24 ` [PATCH v2 2/6] drm/i915/bios: Add some size checks to SPI VBT read Ville Syrjala
2024-09-23 15:24 ` Ville Syrjala [this message]
2024-09-23 15:24 ` [PATCH v2 4/6] drm/i915/bios: Extract intel_spi_read16() Ville Syrjala
2024-09-23 15:24 ` [PATCH v2 5/6] drm/i915/bios: Extract vbt_signature[] Ville Syrjala
2024-09-23 15:24 ` [PATCH v2 6/6] drm/i915/bios: Extract soc/intel_rom.c Ville Syrjala
2024-09-25 20:57 ` ✓ CI.Patch_applied: success for drm/i915/bios: Refactor ROM access (rev2) Patchwork
2024-09-25 20:58 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-25 20:59 ` ✓ CI.KUnit: success " Patchwork
2024-09-25 21:10 ` ✓ CI.Build: " Patchwork
2024-09-25 21:13 ` ✓ CI.Hooks: " Patchwork
2024-09-25 21:14 ` ✗ CI.checksparse: warning " Patchwork
2024-09-25 21:39 ` ✗ CI.BAT: failure " Patchwork
2024-09-25 23:37 ` ✗ CI.FULL: " Patchwork
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=20240923152453.11230-4-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox