mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-04 20:32:27 -04:00
drm/xe/mert: Always refer to MERT using xe_device
There is only one MERT instance and while it is located on the root tile, it is safer to refer to it using xe_device rather than xe_tile. This will also allow to align signature with other MERT function. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Lukasz Laguna <lukasz.laguna@intel.com> Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://patch.msgid.link/20260111213847.27869-1-michal.wajdeczko@intel.com
This commit is contained in:
@@ -289,7 +289,7 @@ void xe_lmtt_invalidate_hw(struct xe_lmtt *lmtt)
|
||||
ERR_PTR(err));
|
||||
|
||||
if (xe_device_has_mert(xe) && xe_tile_is_root(tile)) {
|
||||
err = xe_mert_invalidate_lmtt(tile);
|
||||
err = xe_mert_invalidate_lmtt(xe);
|
||||
if (err)
|
||||
xe_tile_sriov_err(tile, "MERT LMTT invalidation failed (%pe)",
|
||||
ERR_PTR(err));
|
||||
|
||||
@@ -12,22 +12,21 @@
|
||||
#include "xe_tile.h"
|
||||
|
||||
/**
|
||||
* xe_mert_invalidate_lmtt - Invalidate MERT LMTT
|
||||
* @tile: the &xe_tile
|
||||
* xe_mert_invalidate_lmtt() - Invalidate MERT LMTT
|
||||
* @xe: the &xe_device with MERT
|
||||
*
|
||||
* Trigger invalidation of the MERT LMTT and wait for completion.
|
||||
*
|
||||
* Return: 0 on success or -ETIMEDOUT in case of a timeout.
|
||||
*/
|
||||
int xe_mert_invalidate_lmtt(struct xe_tile *tile)
|
||||
int xe_mert_invalidate_lmtt(struct xe_device *xe)
|
||||
{
|
||||
struct xe_device *xe = tile_to_xe(tile);
|
||||
struct xe_tile *tile = xe_device_get_root_tile(xe);
|
||||
struct xe_mert *mert = &tile->mert;
|
||||
const long timeout = HZ / 4;
|
||||
unsigned long flags;
|
||||
|
||||
xe_assert(xe, xe_device_has_mert(xe));
|
||||
xe_assert(xe, xe_tile_is_root(tile));
|
||||
|
||||
spin_lock_irqsave(&mert->lock, flags);
|
||||
if (!mert->tlb_inv_triggered) {
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
struct xe_device;
|
||||
struct xe_tile;
|
||||
|
||||
/**
|
||||
* struct xe_mert - MERT related data
|
||||
@@ -26,7 +25,7 @@ struct xe_mert {
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PCI_IOV
|
||||
int xe_mert_invalidate_lmtt(struct xe_tile *tile);
|
||||
int xe_mert_invalidate_lmtt(struct xe_device *xe);
|
||||
void xe_mert_irq_handler(struct xe_device *xe, u32 master_ctl);
|
||||
#else
|
||||
static inline void xe_mert_irq_handler(struct xe_device *xe, u32 master_ctl) { }
|
||||
|
||||
Reference in New Issue
Block a user