Commit a9f88c68 authored by Umesh Nerlige Ramappa's avatar Umesh Nerlige Ramappa
Browse files

drm/xe/soc_remapper: Initialize SoC remapper during Xe probe



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: default avatarUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: default avatarBadal Nilawar <badal.nilawar@intel.com>
Link: https://patch.msgid.link/20251223183943.3175941-6-umesh.nerlige.ramappa@intel.com
parent e6787032
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -116,6 +116,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 \
+5 −0
Original line number Diff line number Diff line
@@ -62,6 +62,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_svm.h"
@@ -989,6 +990,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;
+6 −0
Original line number Diff line number Diff line
@@ -578,6 +578,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.
+21 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: MIT
/*
 * Copyright © 2025 Intel Corporation
 */

#include "xe_soc_remapper.h"

/**
 * xe_soc_remapper_init() - Initialize SoC remapper
 * @xe: Pointer to xe device.
 *
 * Initialize SoC remapper.
 *
 * Return: 0 on success, error code on failure
 */
int xe_soc_remapper_init(struct xe_device *xe)
{
	spin_lock_init(&xe->soc_remapper.lock);

	return 0;
}
+13 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2025 Intel Corporation
 */

#ifndef _XE_SOC_REMAPPER_H_
#define _XE_SOC_REMAPPER_H_

#include "xe_device_types.h"

int xe_soc_remapper_init(struct xe_device *xe);

#endif