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 2/2] drm/i915/bios: check if VBT#57's tables are zeroed
Date: Thu, 26 Nov 2026 18:50:33 +0100 [thread overview]
Message-ID: <20261126175033.181407-3-michal.grzelak@linux.intel.com> (raw)
In-Reply-To: <20261126175033.181407-1-michal.grzelak@linux.intel.com>
Turns out there are VBTs which have use_vbt_vswing enabled while
their vswing/pre-emphasis override tables contain only zeroes instead of
register values.
Return from parsing of Vswing/Pre-emphasis Override if tables are empty.
By doing so do not update metadata stored in vspeo substructure.
Return from buffers' allocation if vspeo metadata is missing. Use
default vswing/pre-emphasis then because of allocation failure.
Fixes: a138a81d7805 ("drm/i915/bios: de/allocate VS/PE-O buffers for each port")
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/9602
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Suggested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Michał Grzelak <michal.grzelak@linux.intel.com>
---
Somewhat uglier hack would be to simply reset use_vbt_vswing after
confirming that tables are empty. However that is more tricky because
it would require finding devdata that requests Vswing/Pre-emphasis
Override during parse_vswing_preemphasis_override(); which sounds like
both wrong abstraction layer and also more lines of code.
---
drivers/gpu/drm/i915/display/intel_bios.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index f20cda5ad1a33..04d07ee05e76d 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -2232,6 +2232,12 @@ parse_vswing_preemph_override(struct intel_display *display)
if (!block)
return;
+ /* adjust size for num_tables and num_columns fields */
+ if (mem_is_zero(block->tables, get_blocksize(block) - 2)) {
+ drm_dbg_kms(display->drm, "VBT#57 tables are zeroed\n");
+ return;
+ }
+
display->vbt.vspeo.tables = block->tables;
display->vbt.vspeo.num_tables = block->num_tables;
display->vbt.vspeo.num_columns = block->num_columns;
@@ -2665,6 +2671,9 @@ static void allocate_vswing_preemph_override(struct intel_bios_encoder_data *dev
if (!intel_bios_encoder_requests_vspeo(devdata))
return;
+ if (!devdata->display->vbt.vspeo.tables)
+ return;
+
vspeo = kzalloc_obj(*vspeo);
if (!vspeo)
return;
--
2.45.2
next prev parent 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 ` [PATCH v1 1/2] drm/i915/bios: include whitespace into VBT signature Michał Grzelak
2026-11-26 18:01 ` sashiko-bot
2026-11-26 17:50 ` Michał Grzelak [this message]
2026-11-26 18:04 ` [PATCH v1 2/2] drm/i915/bios: check if VBT#57's tables are zeroed 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-3-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.