From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: <himanshu.girotra@intel.com>
Cc: <igt-dev@lists.freedesktop.org>, <matthew.d.roper@intel.com>,
<francois.dugast@intel.com>, <matthew.auld@intel.com>
Subject: Re: [PATCH i-g-t] lib/intel_pat: add hardcoded PAT fallback for older kernels
Date: Tue, 31 Mar 2026 16:06:40 -0700 [thread overview]
Message-ID: <87qzozy4xr.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <87se9fy5dy.wl-ashutosh.dixit@intel.com>
On Tue, 31 Mar 2026 15:56:57 -0700, Dixit, Ashutosh wrote:
>
> > @@ -105,14 +161,26 @@ static void intel_get_pat_idx(int fd, struct intel_pat_cache *pat)
> > * For Xe, use the PAT cache stored in struct xe_device.
> > * xe_device_get() populates the cache while still root; forked
> > * children that inherit the xe_device can use it post-drop_root().
> > + *
> > + * Fall back to hardcoded values when the kernel lacks the
> > + * pat_sw_config debugfs. Platforms newer than Crescent Island
> > + * must have the debugfs available.
> > */
> > if (is_xe_device(fd)) {
> > struct xe_device *xe_dev = xe_device_get(fd);
> >
> > - igt_assert_f(xe_dev->pat_cache,
> > - "PAT sw_config not available -- "
> > - "debugfs not accessible (missing root or not mounted?)\n");
> > - *pat = *xe_dev->pat_cache;
> > + if (xe_dev->pat_cache) {
> > + *pat = *xe_dev->pat_cache;
> > + } else if (xe_pat_fallback(fd, pat)) {
>
> Shouldn't this be "else if (!xe_pat_fallback(fd, pat)"? Or return 0 from
> xe_pat_fallback() on success?
Sorry, misread the code, please ignore, code is correct!
next prev parent reply other threads:[~2026-03-31 23:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 5:22 [PATCH i-g-t] lib/intel_pat: add hardcoded PAT fallback for older kernels himanshu.girotra
2026-03-27 6:28 ` ✓ i915.CI.BAT: success for " Patchwork
2026-03-27 6:32 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-27 10:35 ` [PATCH i-g-t] " Matthew Auld
2026-03-27 22:07 ` ✓ Xe.CI.FULL: success for " Patchwork
2026-03-28 7:31 ` ✗ i915.CI.Full: failure " Patchwork
2026-03-31 22:56 ` [PATCH i-g-t] " Dixit, Ashutosh
2026-03-31 23:06 ` Dixit, Ashutosh [this message]
2026-04-01 0:10 ` Wang, X
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=87qzozy4xr.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=francois.dugast@intel.com \
--cc=himanshu.girotra@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=matthew.d.roper@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