FILE
xe_mmio.h
File preview with syntax highlighting.
linux-6.19.14/drivers/gpu/drm/xe/xe_mmio.h
1/* SPDX-License-Identifier: MIT */ 2/* 3 * Copyright © 2021-2023 Intel Corporation 4 */ 5 6#ifndef _XE_MMIO_H_ 7#define _XE_MMIO_H_ 8 9#include "xe_gt_types.h" 10 11struct xe_device; 12struct xe_reg; 13 14int xe_mmio_probe_early(struct xe_device *xe); 15int xe_mmio_probe_tiles(struct xe_device *xe); 16 17void xe_mmio_init(struct xe_mmio *mmio, struct xe_tile *tile, void __iomem *ptr, u32 size); 18 19u8 xe_mmio_read8(struct xe_mmio *mmio, struct xe_reg reg); 20u16 xe_mmio_read16(struct xe_mmio *mmio, struct xe_reg reg); 21void xe_mmio_write32(struct xe_mmio *mmio, struct xe_reg reg, u32 val); 22u32 xe_mmio_read32(struct xe_mmio *mmio, struct xe_reg reg); 23u32 xe_mmio_rmw32(struct xe_mmio *mmio, struct xe_reg reg, u32 clr, u32 set); 24int xe_mmio_write32_and_verify(struct xe_mmio *mmio, struct xe_reg reg, u32 val, u32 mask, u32 eval); 25bool xe_mmio_in_range(const struct xe_mmio *mmio, const struct xe_mmio_range *range, struct xe_reg reg); 26 27u64 xe_mmio_read64_2x32(struct xe_mmio *mmio, struct xe_reg reg); 28int xe_mmio_wait32(struct xe_mmio *mmio, struct xe_reg reg, u32 mask, u32 val, 29 u32 timeout_us, u32 *out_val, bool atomic); 30int xe_mmio_wait32_not(struct xe_mmio *mmio, struct xe_reg reg, u32 mask, 31 u32 val, u32 timeout_us, u32 *out_val, bool atomic); 32 33static inline u32 xe_mmio_adjusted_addr(const struct xe_mmio *mmio, u32 addr) 34{ 35 if (addr < mmio->adj_limit) 36 addr += mmio->adj_offset; 37 return addr; 38} 39 40static inline struct xe_mmio *xe_root_tile_mmio(struct xe_device *xe) 41{ 42 return &xe->tiles[0].mmio; 43} 44 45#ifdef CONFIG_PCI_IOV 46void xe_mmio_init_vf_view(struct xe_mmio *mmio, const struct xe_mmio *base, unsigned int vfid); 47#endif 48 49#endif
~/
Read-only file preview.