From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 09/20] tools/intel_vbt_decode: Extract dump_pnp_id()
Date: Wed, 5 Jun 2024 14:41:38 +0300 [thread overview]
Message-ID: <ZmBO8suQoD3RsJ6S@intel.com> (raw)
In-Reply-To: <87jzjadolm.fsf@intel.com>
On Fri, May 31, 2024 at 05:48:21PM +0300, Jani Nikula wrote:
> On Fri, 31 May 2024, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Several different VBT blocks contain PnP IDs. Extract the
> > helper to dump them out.
>
> Just nitpicking inline, can be fixed in follow-up. The patch is an
> improvement as-is.
>
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > tools/intel_vbt_decode.c | 20 +++++++++++++-------
> > 1 file changed, 13 insertions(+), 7 deletions(-)
> >
> > diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> > index 6cf6d471b5e2..2a11490eed22 100644
> > --- a/tools/intel_vbt_decode.c
> > +++ b/tools/intel_vbt_decode.c
> > @@ -1394,6 +1394,18 @@ static char *decode_pnp_id(u16 mfg_name, char str[4])
> > return str;
> > }
> >
> > +static void dump_pnp_id(const struct bdb_edid_pnp_id *pnp_id)
>
> Maybe pass prefix or indent level?
Yeah, thought about doing something like that, but decided
to leave it out for now as the series was ballooning out
of control already.
>
> > +{
> > + char mfg[4];
> > +
> > + printf("\t\t Mfg name: %s (0x%x)\n",
> > + decode_pnp_id(pnp_id->mfg_name, mfg), pnp_id->mfg_name);
> > + printf("\t\t Product code: %u\n", pnp_id->product_code);
> > + printf("\t\t Serial: %u\n", pnp_id->serial);
> > + printf("\t\t Mfg week: %d\n", pnp_id->mfg_week);
> > + printf("\t\t Mfg year: %d\n", 1990 + pnp_id->mfg_year);
>
> These could be improved to match spec (see decode_date() in kernel
> drm_edid.c).
>
> > +}
> > +
> > static void dump_lfp_data(struct context *context,
> > const struct bdb_block *block)
> > {
> > @@ -1419,7 +1431,6 @@ static void dump_lfp_data(struct context *context,
> > block_data(block) + ptrs->ptr[i].panel_pnp_id.offset;
> > const struct bdb_lfp_data_tail *tail =
> > block_data(block) + ptrs->panel_name.offset;
> > - char mfg[4];
> >
> > if (!dump_panel(context, i))
> > continue;
> > @@ -1457,12 +1468,7 @@ static void dump_lfp_data(struct context *context,
> > "BAD!" : "good");
> >
> > printf("\t\tPnP ID:\n");
>
> I'd do this in dump_pnp_id() too.
That's more of a sub-heading for this block type. For other
block types it would probably be a bit redundant.
>
> > - printf("\t\t Mfg name: %s (0x%x)\n",
> > - decode_pnp_id(pnp_id->mfg_name, mfg), pnp_id->mfg_name);
> > - printf("\t\t Product code: %u\n", pnp_id->product_code);
> > - printf("\t\t Serial: %u\n", pnp_id->serial);
> > - printf("\t\t Mfg week: %d\n", pnp_id->mfg_week);
> > - printf("\t\t Mfg year: %d\n", 1990 + pnp_id->mfg_year);
> > + dump_pnp_id(pnp_id);
> >
> > if (!ptrs->panel_name.table_size)
> > continue;
>
> --
> Jani Nikula, Intel
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-06-05 11:41 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 14:23 [PATCH i-g-t 00/20] tools/intel_vbt_decode: Refactoring and prep work for decoding more blocks Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 01/20] tools/intel_vbt_decode: Finish the s/lvds/lfp/ rename Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 02/20] tools/intel_vbt_decode: s/dump_sdvo_panel_dtd()/dump_sdvo_lvds_dtd()/ Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 03/20] lib: Define DIV_ROUND_CLOSEST() Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 04/20] tools/intel_vbt_decode: Fix some tabs Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 05/20] tools/intel_vbt_decode: Add missing newline Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 06/20] tools/intel_vbt_decode: Indent ALS dump Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 07/20] tools/intel_vbt_decode: Use "(LFP<n>)" to indicate LFP panel type Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 08/20] tools/intel_vbt_decode: Decode the "not HDMI" bit right way up Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 09/20] tools/intel_vbt_decode: Extract dump_pnp_id() Ville Syrjala
2024-05-31 14:48 ` Jani Nikula
2024-06-05 11:41 ` Ville Syrjälä [this message]
2024-05-31 14:23 ` [PATCH i-g-t 10/20] tools/intel_vbt_decode: Reuse print_detail_timing_data() Ville Syrjala
2024-05-31 14:50 ` Jani Nikula
2024-05-31 14:23 ` [PATCH i-g-t 11/20] tools/intel_vbt_decode: Dump the new eDP DSC disable bit Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 12/20] tools/intel_vbt_decode: Allow dumpers to delcate min version for the block Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 13/20] tools/intel_vbt_decode: Use .min_bdb_version to filter out PSR block on pre-165 VBTs Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 14/20] tools/intel_vbt_decode: Sort dumper table Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 15/20] tools/intel_vbt_decode: Use struct bdb_sdvo_lvds_dtd Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 16/20] tools/intel_vbt_decode: Track the SDVO panel type Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 17/20] tools/intel_vbt_decode: Use find_raw_section() to determine block presence Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 18/20] tools/intel_vbt_decode: Make device handle names more compact Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 19/20] tools/intel_vbt_decode: Declare min/max version for child dev handles Ville Syrjala
2024-05-31 14:23 ` [PATCH i-g-t 20/20] tools/intel_vbt_decode: Decode device handle as a bitmask Ville Syrjala
2024-05-31 15:10 ` Jani Nikula
2024-05-31 15:11 ` [PATCH i-g-t 00/20] tools/intel_vbt_decode: Refactoring and prep work for decoding more blocks Jani Nikula
2024-05-31 16:53 ` ✗ GitLab.Pipeline: warning for " Patchwork
2024-05-31 17:19 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-05-31 17:24 ` ✓ CI.xeBAT: success " Patchwork
2024-05-31 19:02 ` ✗ CI.xeFULL: 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=ZmBO8suQoD3RsJ6S@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@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 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.