All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Grzelak" <michal.grzelak@linux.intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: "Jani Nikula" <jani.nikula@intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Michał Grzelak" <michal.grzelak@intel.com>,
	"Michał Grzelak" <michal.grzelak@linux.intel.com>
Subject: [PATCH v1 1/2] drm/i915/bios: include whitespace into VBT signature
Date: Thu, 26 Nov 2026 18:50:32 +0100	[thread overview]
Message-ID: <20261126175033.181407-2-michal.grzelak@linux.intel.com> (raw)
In-Reply-To: <20261126175033.181407-1-michal.grzelak@linux.intel.com>

From: Michał Grzelak <michal.grzelak@intel.com>

Product name always starts after whitespace which is part of VBT
signature as per spec. Extend VBT signature to contain whitespace.

Bspec: 20119
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Michał Grzelak <michal.grzelak@linux.intel.com>
---
This probably should see a Fixes: trailer but I can't find any suitable
commit to blame since this existed for quite some time already.
---
 drivers/gpu/drm/i915/display/intel_bios.c     | 8 ++++----
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index b77d1599482a7..f20cda5ad1a33 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -60,7 +60,7 @@
  * The VBT consists of a VBT Header (defined as &struct vbt_header), a BDB
  * Header (&struct bdb_header), and a number of BIOS Data Blocks (BDB) that
  * contain the actual configuration information. The VBT Header, and thus the
- * VBT, begins with "$VBT" signature. The VBT Header contains the offset of the
+ * VBT, begins with "$VBT " signature. The VBT Header contains the offset of the
  * BDB Header. The data blocks are concatenated after the BDB Header. The data
  * blocks have a 1-byte Block ID, 2-byte Block Size, and Block Size bytes of
  * data. (Block 53, the MIPI Sequence Block is an exception.)
@@ -3131,8 +3131,8 @@ static const struct bdb_header *get_bdb_header(const struct vbt_header *vbt)
 	return _vbt + vbt->bdb_offset;
 }
 
-static const char vbt_signature[] = "$VBT";
-static const int vbt_signature_len = 4;
+static const char vbt_signature[] = "$VBT ";
+static const int vbt_signature_len = 5;
 
 /**
  * intel_bios_is_valid_vbt - does the given buffer contain a valid VBT
@@ -3235,7 +3235,7 @@ static struct vbt_header *oprom_get_vbt(struct intel_display *display,
 		return NULL;
 
 	BUILD_BUG_ON(vbt_signature_len != sizeof(vbt_signature) - 1);
-	BUILD_BUG_ON(vbt_signature_len != sizeof(u32));
+	BUILD_BUG_ON(vbt_signature_len != sizeof(u32) + 1);
 
 	offset = intel_rom_find(rom, *(const u32 *)vbt_signature);
 	if (offset < 0)
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 0dc13d080e8aa..1a393528ced91 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -85,7 +85,7 @@ struct bdb_edid_dtd {
 
 /**
  * struct vbt_header - VBT Header structure
- * @signature:		VBT signature, always starts with "$VBT"
+ * @signature:		VBT signature, always starts with "$VBT "
  * @version:		Version of this structure
  * @header_size:	Size of this structure
  * @vbt_size:		Size of VBT (VBT Header, BDB Header and data blocks)
-- 
2.45.2


  reply	other threads:[~2026-11-26 17:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 17:50 [PATCH v1 0/2] drm/i915/bios: vbt-related fixes Michał Grzelak
2026-11-26 17:50 ` Michał Grzelak [this message]
2026-11-26 18:01   ` [PATCH v1 1/2] drm/i915/bios: include whitespace into VBT signature sashiko-bot
2026-11-26 17:50 ` [PATCH v1 2/2] drm/i915/bios: check if VBT#57's tables are zeroed Michał Grzelak
2026-11-26 18:04   ` sashiko-bot
2026-11-26 21:03 ` ✓ i915.CI.BAT: success for drm/i915/bios: vbt-related fixes Patchwork
2026-11-26 21:42 ` ✗ CI.checkpatch: warning " Patchwork
2026-11-26 21:45 ` ✓ CI.KUnit: success " Patchwork
2026-11-26 22:22 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-27  9:31 ` ✓ Xe.CI.FULL: " Patchwork
2026-11-28  1:00 ` ✓ i915.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=20261126175033.181407-2-michal.grzelak@linux.intel.com \
    --to=michal.grzelak@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=michal.grzelak@intel.com \
    --cc=ville.syrjala@linux.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.