Commit 7970e04d authored by Michal Wajdeczko's avatar Michal Wajdeczko
Browse files

drm/xe/mert: Move MERT initialization to xe_mert.c



Most of the MERT code is already in dedicated file, no reason to
keep internal MERT data structure initialization elsewhere.

Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Reviewed-by: default avatarLukasz Laguna <lukasz.laguna@intel.com>
Link: https://patch.msgid.link/20260109151219.26206-6-michal.wajdeczko@intel.com
parent 401fabd6
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -11,6 +11,19 @@
#include "xe_mmio.h"
#include "xe_tile.h"

/**
 * xe_mert_init_early() - Initialize MERT data
 * @xe: the &xe_device with MERT to init
 */
void xe_mert_init_early(struct xe_device *xe)
{
	struct xe_tile *tile = xe_device_get_root_tile(xe);
	struct xe_mert *mert = &tile->mert;

	spin_lock_init(&mert->lock);
	init_completion(&mert->tlb_inv_done);
}

/**
 * xe_mert_invalidate_lmtt() - Invalidate MERT LMTT
 * @xe: the &xe_device with MERT
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ struct xe_mert {
};

#ifdef CONFIG_PCI_IOV
void xe_mert_init_early(struct xe_device *xe);
int xe_mert_invalidate_lmtt(struct xe_device *xe);
void xe_mert_irq_handler(struct xe_device *xe, u32 master_ctl);
#else
+1 −3
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@ bool xe_sriov_pf_readiness(struct xe_device *xe)
 */
int xe_sriov_pf_init_early(struct xe_device *xe)
{
	struct xe_mert *mert = &xe_device_get_root_tile(xe)->mert;
	int err;

	xe_assert(xe, IS_SRIOV_PF(xe));
@@ -112,8 +111,7 @@ int xe_sriov_pf_init_early(struct xe_device *xe)

	xe_sriov_pf_service_init(xe);

	spin_lock_init(&mert->lock);
	init_completion(&mert->tlb_inv_done);
	xe_mert_init_early(xe);

	return 0;
}