From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 01/11] drm/i915/bios: Extract struct lvds_lfp_data_ptr_table
Date: Thu, 17 Mar 2022 20:33:37 +0200 [thread overview]
Message-ID: <87k0csmnsu.fsf@intel.com> (raw)
In-Reply-To: <20220317171948.10400-2-ville.syrjala@linux.intel.com>
On Thu, 17 Mar 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> All the LFP data table pointers have uniform layout. Turn
> that into a struct.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_bios.c | 10 +++++-----
> drivers/gpu/drm/i915/display/intel_vbt_defs.h | 13 +++++++------
> 2 files changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index c7afe19dd44a..31fce7c92a28 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -180,11 +180,11 @@ get_lvds_dvo_timing(const struct bdb_lvds_lfp_data *lvds_lfp_data,
> */
>
> int lfp_data_size =
> - lvds_lfp_data_ptrs->ptr[1].dvo_timing_offset -
> - lvds_lfp_data_ptrs->ptr[0].dvo_timing_offset;
> + lvds_lfp_data_ptrs->ptr[1].dvo_timing.offset -
> + lvds_lfp_data_ptrs->ptr[0].dvo_timing.offset;
> int dvo_timing_offset =
> - lvds_lfp_data_ptrs->ptr[0].dvo_timing_offset -
> - lvds_lfp_data_ptrs->ptr[0].fp_timing_offset;
> + lvds_lfp_data_ptrs->ptr[0].dvo_timing.offset -
> + lvds_lfp_data_ptrs->ptr[0].fp_timing.offset;
> char *entry = (char *)lvds_lfp_data->data + lfp_data_size * index;
>
> return (struct lvds_dvo_timing *)(entry + dvo_timing_offset);
> @@ -205,7 +205,7 @@ get_lvds_fp_timing(const struct bdb_header *bdb,
>
> if (index >= ARRAY_SIZE(ptrs->ptr))
> return NULL;
> - ofs = ptrs->ptr[index].fp_timing_offset;
> + ofs = ptrs->ptr[index].fp_timing.offset;
> if (ofs < data_ofs ||
> ofs + sizeof(struct lvds_fp_timing) > data_ofs + data_size)
> return NULL;
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index e0508990df48..d727fcd6cdab 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -722,15 +722,16 @@ struct bdb_lvds_options {
> /*
> * Block 41 - LFP Data Table Pointers
> */
> +struct lvds_lfp_data_ptr_table {
> + u16 offset; /* offsets are from start of bdb */
> + u8 table_size;
> +} __packed;
>
> /* LFP pointer table contains entries to the struct below */
> struct lvds_lfp_data_ptr {
> - u16 fp_timing_offset; /* offsets are from start of bdb */
> - u8 fp_table_size;
> - u16 dvo_timing_offset;
> - u8 dvo_table_size;
> - u16 panel_pnp_id_offset;
> - u8 pnp_table_size;
> + struct lvds_lfp_data_ptr_table fp_timing;
> + struct lvds_lfp_data_ptr_table dvo_timing;
> + struct lvds_lfp_data_ptr_table panel_pnp_id;
> } __packed;
>
> struct bdb_lvds_lfp_data_ptrs {
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-03-17 18:33 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 17:19 [Intel-gfx] [PATCH 00/11] drm/i915/bios: Rework BDB block handling Ville Syrjala
2022-03-17 17:19 ` [Intel-gfx] [PATCH 01/11] drm/i915/bios: Extract struct lvds_lfp_data_ptr_table Ville Syrjala
2022-03-17 18:33 ` Jani Nikula [this message]
2022-03-17 17:19 ` [Intel-gfx] [PATCH 02/11] drm/i915/bios: Make copies of VBT data blocks Ville Syrjala
2022-03-17 19:02 ` Jani Nikula
2022-03-17 22:18 ` Ville Syrjälä
2022-03-18 9:44 ` Jani Nikula
2022-03-17 20:21 ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2022-03-17 17:19 ` [Intel-gfx] [PATCH 03/11] drm/i915/bios: Use the copy of the LFP data table always Ville Syrjala
2022-03-17 19:10 ` Jani Nikula
2022-03-17 20:04 ` Ville Syrjälä
2022-03-17 20:08 ` Ville Syrjälä
2022-03-17 20:21 ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2022-03-17 17:19 ` [Intel-gfx] [PATCH 04/11] drm/i915/bios: Validate LFP data table pointers Ville Syrjala
2022-03-17 17:19 ` [Intel-gfx] [PATCH 05/11] drm/i915/bios: Trust the LFP data pointers Ville Syrjala
2022-03-17 17:19 ` [Intel-gfx] [PATCH 06/11] drm/i915/bios: Validate the panel_name table Ville Syrjala
2022-03-17 17:19 ` [Intel-gfx] [PATCH 07/11] drm/i915/bios: Reorder panel DTD parsing Ville Syrjala
2022-03-17 17:19 ` [Intel-gfx] [PATCH 08/11] drm/i915/bios: Generate LFP data table pointers if the VBT lacks them Ville Syrjala
2022-03-17 23:41 ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2022-03-17 17:19 ` [Intel-gfx] [PATCH 09/11] drm/i915/bios: Get access to the tail end of the LFP data block Ville Syrjala
2022-03-17 17:19 ` [Intel-gfx] [PATCH 10/11] drm/i915/bios: Parse the seamless DRRS min refresh rate Ville Syrjala
2022-03-17 17:19 ` [Intel-gfx] [PATCH 11/11] drm/i915: Respect VBT " Ville Syrjala
2022-03-17 17:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/bios: Rework BDB block handling Patchwork
2022-03-17 17:46 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-03-17 18:17 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-17 20:20 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-03-17 22:16 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/bios: Rework BDB block handling (rev3) Patchwork
2022-03-17 22:18 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-03-17 22:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-18 0:04 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/bios: Rework BDB block handling (rev4) Patchwork
2022-03-18 0:05 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-03-18 0:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-18 2:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=87k0csmnsu.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.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 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.