From: Jani Nikula <jani.nikula@intel.com>
To: Xin Wang <x.wang@intel.com>, igt-dev@lists.freedesktop.org
Cc: "Xin Wang" <x.wang@intel.com>,
"Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
"Matt Roper" <matthew.d.roper@intel.com>,
"Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
"Ravi Kumar V" <ravi.kumar.vodapalli@intel.com>
Subject: Re: [PATCH v2 2/3] lib/intel: add fd-based intel_gen/intel_graphics_ver via Xe query
Date: Thu, 05 Feb 2026 11:09:57 +0200 [thread overview]
Message-ID: <e766ce6319b2a59447f4397f1abe3f8e3ce80d00@intel.com> (raw)
In-Reply-To: <20260122071530.1629046-3-x.wang@intel.com>
On Thu, 22 Jan 2026, Xin Wang <x.wang@intel.com> wrote:
> +/**
> + * intel_gen:
> + * @fd: DRM device file descriptor.
> + *
> + * Attempts to determine the graphics "generation" by querying the Xe driver for
> + * the main GT IP version major. If unavailable (e.g., not an Xe device or no IP
> + * version reported), falls back to retrieving the DRM device ID and mapping it
> + * to a legacy graphics version.
> + *
> + * Return: The graphics generation/major IP version for the device.
> + */
> +unsigned intel_gen(int fd)
> +{
> + uint16_t devid;
> + const struct drm_xe_gt* main_gt = xe_get_main_gt(fd);
> +
> + if (main_gt && main_gt->ip_ver_major)
> + return main_gt->ip_ver_major;
> +
> + devid = intel_get_drm_devid(fd);
> + return intel_gen_legacy(devid);
> +}
Why stick with the "gen" naming when the kernel side has completely
moved to "ver" naming?
Also, you won't get build failures if any remaining (or new one, racing
to get merged) call sites pass in devid to this.
BR,
Jani.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-02-05 9:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 7:15 [PATCH v2 0/3] lib/intel: switch graphics/IP version queries to fd-based APIs Xin Wang
2026-01-22 7:15 ` [PATCH v2 1/3] lib/intel: suffix PCI ID based gen/graphics_ver with _legacy Xin Wang
2026-02-04 18:30 ` Matt Roper
2026-01-22 7:15 ` [PATCH v2 2/3] lib/intel: add fd-based intel_gen/intel_graphics_ver via Xe query Xin Wang
2026-02-05 9:09 ` Jani Nikula [this message]
2026-01-22 7:15 ` [PATCH v2 3/3] intel/xe: use fd-based graphics/IP version helpers Xin Wang
2026-02-04 18:56 ` Matt Roper
2026-02-25 8:51 ` Wang, X
2026-02-25 23:18 ` Matt Roper
2026-01-22 8:01 ` ✓ i915.CI.BAT: success for lib/intel: switch graphics/IP version queries to fd-based APIs (rev2) Patchwork
2026-01-22 8:04 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-22 18:13 ` ✗ Xe.CI.Full: 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=e766ce6319b2a59447f4397f1abe3f8e3ce80d00@intel.com \
--to=jani.nikula@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=matthew.d.roper@intel.com \
--cc=ravi.kumar.vodapalli@intel.com \
--cc=x.wang@intel.com \
--cc=zbigniew.kempczynski@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