From: Jani Nikula <jani.nikula@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org,
Matt Roper <matthew.d.roper@intel.com>,
Gustavo Sousa <gustavo.sousa@intel.com>,
Shekhar Chauhan <shekhar.chauhan@intel.com>
Subject: Re: [PATCH i-g-t v2 1/1] lib/pciids: Add NVL-S and split out BMG-G21
Date: Tue, 28 Oct 2025 16:35:45 +0200 [thread overview]
Message-ID: <e50339ef85b308fb2b6fd8d88f3acf4fc5bd0057@intel.com> (raw)
In-Reply-To: <4uubshfhdvnc2nxat3mwjoc5x3ayubtitzk534ks2ysb4mlrkd@gfzff2dbt43g>
On Tue, 28 Oct 2025, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> I don't like the commit message, but I don't care enough about it right
> now neither.
>
> I think it would be much better if going forward we'd adopt a template
> and maybe even automate it. Something like this:
>
>
> Subject: lib/pciids: sync with kernel commit {kernel_head}
>
> Synchronize PCI IDs with kernel up to {kernel_head}, which
> includes the following changes:
>
> {kernel_log}
>
> Which could basically be generated by a (to be added) script:
>
> tools/sync-intel-pciids [--head <commit>] [--base <commit>][--no-commit] <kernel-checkout>
>
> What it does:
> a) inspect the last commit in igt that touched the header and
> find the kernel_base. --base can override that.
> b) git -C /path/to/kernel/checkout show $KERNEL_HEAD:include/drm/intel/pciids.h
> > lib/pciids.h
>
> which basically copies the heade from whatever state of the
> kernel checkout we want - some times we may want it from a
> kernel release, some times from a particular branch, as long
> as it keeps moving forward.
>
> --head can force a specific commit from kernel, otherwise it
> uses a default (drm/drm-next may be a good default).
>
> c) Commit the results with the template above.
>
>
> This would avoid having commits to fix things up like because it went
> astray. was done in commit
> 3896691534ef ("lib/pciids: lib/pciids: Add Wildcat Lake"). Same script
> can be easily adapted to help updating the include/uapi
> headers.
>
> This should get us back to having the updates like we had in the past:
>
> 2042426168cf lib: sync i915_pciids.h with kernel commit cfa7772880f8
> 440669b77f16 lib: sync i915_pciids.h with kernel commit d2c4b1db1c4f
> 9702d87169f7 lib: sync i915_pciids.h with kernel commit 7858cc0b55e3
> ea767a50aa93 lib: sync i915_pciids.h with kernel commit bfbda4722767
> 940399b2f807 lib: sync i915_pciids.h with kernel commit aa3d586e1624
> 1dda137aea8b lib: sync i915_pciids.h with kernel commit 5c8c22adc802
> 167ffe4acb08 lib: sync i915_pciids.h with kernel commit 7b43a37348b7
> 2763d0874328 lib: sync i915_pciids.h with kernel commit 41c0f8a36f15
> 00dcfce5cb2b lib: sync i915_pciids.h with kernel commit 432ed92bfb55
>
> Thoughts?
This is the script I've used, but never bothered to upstream to igt. It
does create separate commits for each kernel change, which was useful in
catching up with a lot of kernel changes while remaining bisectable in
igt.
BR,
Jani.
#!/bin/bash
TIP=drm-tip/drm-tip
SINCE=f719c2a2d1e7fb891d45998f241ff4273d7ae7e6
INFILE=include/drm/intel/pciids.h
OUTFILE=lib/pciids.h
KERNEL=$HOME/src/linux
IGT=$HOME/src/intel-gpu-tools
LAST=
cd $KERNEL
for commit in $(git log --reverse --pretty=%h $SINCE..$TIP -- $INFILE); do
echo $commit
if git show $commit:$INFILE | diff -q $IGT/$OUTFILE - >/dev/null; then
LAST=$commit
break
fi
done
if [[ -z "$LAST" ]]; then
echo "last update not found"
exit 1
fi
for commit in $(git log --no-merges --reverse --pretty=%h $LAST..$TIP -- $INFILE); do
ref=$(git cite $commit)
git show $commit:$INFILE > $IGT/$OUTFILE
cd $IGT
git commit -as \
-m "lib: sync i915_pciids.h with kernel commit $commit" \
-m "Synchronize i915_pciids.h with kernel commit:" \
-m "$ref"
cd -
done
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-10-28 14:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 10:42 [PATCH i-g-t v2 0/1] Sync PCI ids with kernel: split BMG to BMG-G21 and add NVL-S Kamil Konieczny
2025-10-28 10:42 ` [PATCH i-g-t v2 1/1] lib/pciids: Add NVL-S and split out BMG-G21 Kamil Konieczny
2025-10-28 12:04 ` Shekhar Chauhan
2025-10-28 13:26 ` Lucas De Marchi
2025-10-28 13:53 ` Lucas De Marchi
2025-10-28 14:35 ` Jani Nikula [this message]
2025-10-28 14:36 ` Jani Nikula
2025-10-28 14:41 ` Jani Nikula
2025-10-28 16:59 ` Kamil Konieczny
2025-10-28 20:19 ` Jani Nikula
2025-10-28 16:35 ` Kamil Konieczny
2025-10-28 11:56 ` ✓ Xe.CI.BAT: success for Sync PCI ids with kernel: split BMG to BMG-G21 and add NVL-S (rev2) Patchwork
2025-10-28 12:14 ` ✓ i915.CI.BAT: " Patchwork
2025-10-28 16:42 ` ✗ Xe.CI.Full: failure " Patchwork
2025-10-28 17:55 ` Kamil Konieczny
2025-10-28 20:27 ` ✗ i915.CI.Full: " Patchwork
2025-10-29 17:17 ` Kamil Konieczny
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=e50339ef85b308fb2b6fd8d88f3acf4fc5bd0057@intel.com \
--to=jani.nikula@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=lucas.demarchi@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=shekhar.chauhan@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