From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Alexander Usyskin <alexander.usyskin@intel.com>
Cc: "Matthew Brost" <matthew.brost@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] drm/xe/nvm: fix writable override for CRI
Date: Wed, 8 Jul 2026 15:53:08 -0400 [thread overview]
Message-ID: <ak6qpHnzj7I9fLiz@intel.com> (raw)
In-Reply-To: <20260708-cri_nvm_fdo_flip-v1-1-792373667334@intel.com>
On Wed, Jul 08, 2026 at 06:00:17PM +0300, Alexander Usyskin wrote:
> The witable override should be set when FDO_MODE bit is enabled.
> Fix the comparison to distingush this case from legacy systems
> where bit should be disabled to have override.
>
> Cc: stable@vger.kernel.org
> Fixes: 9dde74fd9e65 ("drm/xe/nvm: enable cri platform")
> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
> ---
> drivers/gpu/drm/xe/xe_nvm.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_nvm.c b/drivers/gpu/drm/xe/xe_nvm.c
> index 33487e91f366..d50ee414e83e 100644
> --- a/drivers/gpu/drm/xe/xe_nvm.c
> +++ b/drivers/gpu/drm/xe/xe_nvm.c
> @@ -60,35 +60,39 @@ static bool xe_nvm_writable_override(struct xe_device *xe)
> struct xe_mmio *mmio = xe_root_tile_mmio(xe);
> bool writable_override;
> struct xe_reg reg;
> - u32 test_bit;
> + u32 test_bit, test_val;
>
> switch (xe->info.platform) {
> case XE_CRESCENTISLAND:
> reg = PCODE_SCRATCH(0);
> - test_bit = FDO_MODE;
> + test_val = test_bit = FDO_MODE;
-:31: CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#31: FILE: drivers/gpu/drm/xe/xe_nvm.c:68:
+ test_val = test_bit = FDO_MODE;
total: 0 errors, 0 warnings, 1 checks, 42 lines checked
> break;
> case XE_BATTLEMAGE:
> reg = HECI_FWSTS2(DG2_GSC_HECI2_BASE);
> test_bit = HECI_FW_STATUS_2_NVM_ACCESS_MODE;
> + test_val = 0;
> break;
> case XE_PVC:
> reg = HECI_FWSTS2(PVC_GSC_HECI2_BASE);
> test_bit = HECI_FW_STATUS_2_NVM_ACCESS_MODE;
> + test_val = 0;
> break;
> case XE_DG2:
> reg = HECI_FWSTS2(DG2_GSC_HECI2_BASE);
> test_bit = HECI_FW_STATUS_2_NVM_ACCESS_MODE;
> + test_val = 0;
> break;
> case XE_DG1:
> reg = HECI_FWSTS2(DG1_GSC_HECI2_BASE);
> test_bit = HECI_FW_STATUS_2_NVM_ACCESS_MODE;
> + test_val = 0;
> break;
> default:
> drm_err(&xe->drm, "Unknown platform\n");
> return true;
> }
>
> - writable_override = !(xe_mmio_read32(mmio, reg) & test_bit);
> + writable_override = (xe_mmio_read32(mmio, reg) & test_bit) == test_val;
> if (writable_override)
> drm_info(&xe->drm, "NVM access overridden by jumper\n");
> return writable_override;
>
> ---
> base-commit: 8cdeaa50eae8dad34885515f62559ee83e7e8dda
> change-id: 20260708-cri_nvm_fdo_flip-333b545e1dd8
>
> Best regards,
> --
> Alexander Usyskin <alexander.usyskin@intel.com>
>
prev parent reply other threads:[~2026-07-08 19:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 15:00 [PATCH] drm/xe/nvm: fix writable override for CRI Alexander Usyskin
2026-07-08 15:29 ` ✗ CI.checkpatch: warning for " Patchwork
2026-07-08 15:30 ` ✓ CI.KUnit: success " Patchwork
2026-07-08 16:31 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-08 18:59 ` ✓ Xe.CI.FULL: " Patchwork
2026-07-08 19:53 ` Rodrigo Vivi [this message]
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=ak6qpHnzj7I9fLiz@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=airlied@gmail.com \
--cc=alexander.usyskin@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.brost@intel.com \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=thomas.hellstrom@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox