mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-05-05 09:57:21 +02:00
4b0a5f5ce7
Currently in the drivers we have defined VRAM regions per device and per tile. Initialization of these regions is done in two completely different ways. To simplify the logic of the code and make it easier to add new regions in the future, let's unify the way we initialize VRAM regions. v2: - fix doc comments in struct xe_vram_region - remove unnecessary includes (Jani) v3: - move code from xe_vram_init_regions_managers to xe_tile_init_noalloc (Matthew) - replace ioremap_wc to devm_ioremap_wc for mapping VRAM BAR (Matthew) - Replace the tile id parameter with vram region in the xe_pf_begin function. v4: - remove tile back pointer from struct xe_vram_region - add new back pointers: xe and migarte to xe_vram_region Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Cc: Stuart Summers <stuart.summers@intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> # rev3 Acked-by: Matthew Brost <matthew.brost@intel.com> Link: https://lore.kernel.org/r/20250714184818.89201-6-piotr.piorkowski@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
25 lines
725 B
C
25 lines
725 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2024 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_VRAM_H_
|
|
#define _XE_VRAM_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct xe_device;
|
|
struct xe_vram_region;
|
|
|
|
int xe_vram_probe(struct xe_device *xe);
|
|
|
|
struct xe_vram_region *xe_vram_region_alloc(struct xe_device *xe, u8 id, u32 placement);
|
|
|
|
resource_size_t xe_vram_region_io_start(const struct xe_vram_region *vram);
|
|
resource_size_t xe_vram_region_io_size(const struct xe_vram_region *vram);
|
|
resource_size_t xe_vram_region_dpa_base(const struct xe_vram_region *vram);
|
|
resource_size_t xe_vram_region_usable_size(const struct xe_vram_region *vram);
|
|
resource_size_t xe_vram_region_actual_physical_size(const struct xe_vram_region *vram);
|
|
|
|
#endif
|