From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/bios: Copy the whole MIPI sequence block
Date: Tue, 30 Aug 2022 11:27:27 +0300 [thread overview]
Message-ID: <87o7w2dtlc.fsf@intel.com> (raw)
In-Reply-To: <20220829135834.8585-1-ville.syrjala@linux.intel.com>
On Mon, 29 Aug 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Turns out the MIPI sequence block version number and
> new block size fields are considered part of the block
> header and are not included in the reported new block size
> field itself. Bump up the block size appropriately so that
> we'll copy over the last five bytes of the block as well.
>
> For this particular machine those last five bytes included
> parts of the GPIO op for the backlight on sequence, causing
> the backlight no longer to turn back on:
>
> Sequence 6 - MIPI_SEQ_BACKLIGHT_ON
> Delay: 20000 us
> - GPIO index 0, number 0, set 0 (0x00)
> + GPIO index 1, number 70, set 1 (0x01)
>
> Cc: stable@vger.kernel.org
> Fixes: e163cfb4c96d ("drm/i915/bios: Make copies of VBT data blocks")
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6652
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_bios.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 81d6cfbd2615..d493d04f4049 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -479,6 +479,13 @@ init_bdb_block(struct drm_i915_private *i915,
>
> block_size = get_blocksize(block);
>
> + /*
> + * Version number and new block size are considered
> + * part of the header for MIPI sequenece block v3+.
> + */
Quoth Bspec, "This field specifies the size of this entire data
structure excluding this header." Okay.
> + if (section_id == BDB_MIPI_SEQUENCE && *(const u8 *)block >= 3)
> + block_size += 5;
> +
Since we need to look at the header later, we can't just use data +
5. Okay.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
I just don't get the whole sequence block u32 size thing, because the
vbt header and bdb header still have u16, and they're supposed to cover
the entire vbt and all bdb data blocks. And this is what we check
anyway.
> entry = kzalloc(struct_size(entry, data, max(min_size, block_size) + 3),
> GFP_KERNEL);
> if (!entry) {
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-08-30 8:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 13:58 [Intel-gfx] [PATCH] drm/i915/bios: Copy the whole MIPI sequence block Ville Syrjala
2022-08-29 19:54 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2022-08-29 23:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/bios: Copy the whole MIPI sequence block (rev2) Patchwork
2022-08-30 8:27 ` Jani Nikula [this message]
2022-08-30 8:59 ` [Intel-gfx] [PATCH] drm/i915/bios: Copy the whole MIPI sequence block Ville Syrjälä
2022-08-31 11:43 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/bios: Copy the whole MIPI sequence block (rev2) 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=87o7w2dtlc.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=stable@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox