mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-08-21 16:31:14 +02:00

It's not always safe to call XE_WA() in the driver initialization. Add a xe_gt_assert() so this doesn't go unnoticed. While at it, fix typo in kernel-doc about OOB workarounds. Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240722160815.4085605-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
36 lines
924 B
C
36 lines
924 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2022 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_WA_
|
|
#define _XE_WA_
|
|
|
|
#include "xe_assert.h"
|
|
|
|
struct drm_printer;
|
|
struct xe_gt;
|
|
struct xe_hw_engine;
|
|
struct xe_tile;
|
|
|
|
int xe_wa_init(struct xe_gt *gt);
|
|
void xe_wa_process_oob(struct xe_gt *gt);
|
|
void xe_wa_process_gt(struct xe_gt *gt);
|
|
void xe_wa_process_engine(struct xe_hw_engine *hwe);
|
|
void xe_wa_process_lrc(struct xe_hw_engine *hwe);
|
|
void xe_wa_apply_tile_workarounds(struct xe_tile *tile);
|
|
void xe_wa_dump(struct xe_gt *gt, struct drm_printer *p);
|
|
|
|
/**
|
|
* XE_WA - Out-of-band workarounds, that don't fit the lifecycle any
|
|
* other more specific type
|
|
* @gt__: gt instance
|
|
* @id__: XE_OOB_<id__>, as generated by build system in generated/xe_wa_oob.h
|
|
*/
|
|
#define XE_WA(gt__, id__) ({ \
|
|
xe_gt_assert(gt__, (gt__)->wa_active.oob_initialized); \
|
|
test_bit(XE_WA_OOB_ ## id__, (gt__)->wa_active.oob); \
|
|
})
|
|
|
|
#endif
|