From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: <ashutosh.dixit@intel.com>, <anoop.c.vijay@intel.com>
Subject: Re: [PATCH v3 1/3] drm/xe/soc_remapper: Initialize SoC remapper during Xe probe
Date: Thu, 4 Dec 2025 21:19:03 +0530 [thread overview]
Message-ID: <5835e6ab-95c6-467e-a8b7-ac62610af093@intel.com> (raw)
In-Reply-To: <aTBuKPcPgZdkCPWO@soc-5CG1426VCC.clients.intel.com>
[-- Attachment #1: Type: text/plain, Size: 4744 bytes --]
On 03-12-2025 22:36, Umesh Nerlige Ramappa wrote:
> On Tue, Dec 02, 2025 at 04:48:02PM -0800, Umesh Nerlige Ramappa wrote:
>> SoC remapper is used to map different HW functions in the SoC to their
>> respective drivers. Initialize SoC remapper during driver load.
>>
>> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>> ---
>> v2: (Ashutosh/Lucas)
>> - s/remapper/soc_remapper/
>> - return status from init during probe
>> - reorder patches 1 and 2 from earlier series
>> - fix copyright year
>>
>> v3: (Michal, Badal)
>> - Kernel doc fixes
>> - Alphabetical order for headers/objects
>> - Add has_soc_remapper
>> - Drop unnecessary headers
>> ---
>> drivers/gpu/drm/xe/Makefile | 1 +
>> drivers/gpu/drm/xe/xe_device.c | 5 +++++
>> drivers/gpu/drm/xe/xe_device_types.h | 8 ++++++++
>> drivers/gpu/drm/xe/xe_pci.c | 2 ++
>> drivers/gpu/drm/xe/xe_pci_types.h | 2 ++
>> drivers/gpu/drm/xe/xe_soc_remapper.c | 24 ++++++++++++++++++++++++
>> drivers/gpu/drm/xe/xe_soc_remapper.h | 13 +++++++++++++
>> 7 files changed, 55 insertions(+)
>> create mode 100644 drivers/gpu/drm/xe/xe_soc_remapper.c
>> create mode 100644 drivers/gpu/drm/xe/xe_soc_remapper.h
>>
>> diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
>> index 0eadfeda67d9..06c3987afd4c 100644
>> --- a/drivers/gpu/drm/xe/Makefile
>> +++ b/drivers/gpu/drm/xe/Makefile
>> @@ -115,6 +115,7 @@ xe-y += xe_bb.o \
>> xe_sa.o \
>> xe_sched_job.o \
>> xe_shrinker.o \
>> + xe_soc_remapper.o \
>> xe_step.o \
>> xe_survivability_mode.o \
>> xe_sync.o \
>> diff --git a/drivers/gpu/drm/xe/xe_device.c
>> b/drivers/gpu/drm/xe/xe_device.c
>> index 92f883dd8877..b54fc5852fef 100644
>> --- a/drivers/gpu/drm/xe/xe_device.c
>> +++ b/drivers/gpu/drm/xe/xe_device.c
>> @@ -61,6 +61,7 @@
>> #include "xe_pxp.h"
>> #include "xe_query.h"
>> #include "xe_shrinker.h"
>> +#include "xe_soc_remapper.h"
>> #include "xe_survivability_mode.h"
>> #include "xe_sriov.h"
>> #include "xe_tile.h"
>> @@ -906,6 +907,10 @@ int xe_device_probe(struct xe_device *xe)
>>
>> xe_nvm_init(xe);
>>
>> + err = xe_soc_remapper_init(xe);
>> + if (err)
>> + return err;
>> +
>> err = xe_heci_gsc_init(xe);
>> if (err)
>> return err;
>> diff --git a/drivers/gpu/drm/xe/xe_device_types.h
>> b/drivers/gpu/drm/xe/xe_device_types.h
>> index 9a9a8eb84a78..450fe703a3b9 100644
>> --- a/drivers/gpu/drm/xe/xe_device_types.h
>> +++ b/drivers/gpu/drm/xe/xe_device_types.h
>> @@ -315,6 +315,8 @@ struct xe_device {
>> u8 has_pxp:1;
>> /** @info.has_range_tlb_inval: Has range based TLB
>> invalidations */
>> u8 has_range_tlb_inval:1;
>> + /** @info.has_soc_remapper: Has SoC remapper support */
>> + u8 has_soc_remapper:1;
>> /** @info.has_sriov: Supports SR-IOV */
>> u8 has_sriov:1;
>> /** @info.has_usm: Device has unified shared memory support */
>> @@ -555,6 +557,12 @@ struct xe_device {
>> struct mutex lock;
>> } pmt;
>>
>> + /** @soc_remapper: SoC remapper object */
>> + struct {
>> + /** @soc_remapper.lock: Serialize access to SoC Remapper's
>> index registers */
>> + spinlock_t lock;
>> + } soc_remapper;
>> +
>> /**
>> * @pm_callback_task: Track the active task that is running in
>> either
>> * the runtime_suspend or runtime_resume callbacks.
>> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>> index 75e3588242c7..ec0fed691fa0 100644
>> --- a/drivers/gpu/drm/xe/xe_pci.c
>> +++ b/drivers/gpu/drm/xe/xe_pci.c
>> @@ -413,6 +413,7 @@ static const struct xe_device_desc cri_desc = {
>> .has_flat_ccs = false,
>> .has_mbx_power_limits = true,
>> .has_mert = true,
>> + .has_soc_remapper = true,
>
> Needs to be enabled for BMG also, hence the BAT failure.
We should use has_soc_remapper not just for protecting spinlock
initialization, but also for guarding soc remapper accesses.
Since there are two soc remappers—SC and Telemetry—we could update
has_soc_remapper to use 2 bits (u8 has_soc_remapper:2), and set only the
relevant bits in the platform descriptor. For example:
static const struct xe_device_desc bmg_desc = {
.has_soc_remapper = SOC_REMAP_TELEM
static const struct xe_device_desc cri_desc = {
.has_soc_remapper = SOC_REMAP_TELEM | SOC_REMAP_SC
If we prefer a true/false approach, we should use two separate flags:
has_soc_telem_remapper and has_soc_sc_remapper.
Thanks,
Badal
> Umesh
[-- Attachment #2: Type: text/html, Size: 8749 bytes --]
next prev parent reply other threads:[~2025-12-04 15:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 0:48 [PATCH v3 0/3] Add SoC remapper support for system controller Umesh Nerlige Ramappa
2025-12-03 0:48 ` [PATCH v3 1/3] drm/xe/soc_remapper: Initialize SoC remapper during Xe probe Umesh Nerlige Ramappa
2025-12-03 17:06 ` Umesh Nerlige Ramappa
2025-12-04 15:49 ` Nilawar, Badal [this message]
2025-12-03 0:48 ` [PATCH v3 2/3] drm/xe/soc_remapper: Use SoC remapper herlper from VSEC code Umesh Nerlige Ramappa
2025-12-04 15:51 ` Nilawar, Badal
2025-12-03 0:48 ` [PATCH v3 3/3] drm/xe/soc_remapper: Add system controller config for SoC remapper Umesh Nerlige Ramappa
2025-12-04 15:52 ` Nilawar, Badal
2025-12-03 0:54 ` ✗ CI.checkpatch: warning for Add SoC remapper support for system controller (rev3) Patchwork
2025-12-03 0:55 ` ✓ CI.KUnit: success " Patchwork
2025-12-03 1:56 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-12-03 7:55 ` ✗ Xe.CI.Full: " 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=5835e6ab-95c6-467e-a8b7-ac62610af093@intel.com \
--to=badal.nilawar@intel.com \
--cc=anoop.c.vijay@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=umesh.nerlige.ramappa@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