Files
linux-stable-mirror/drivers/gpu/drm/xe/xe_vram.h
T
Tejas Upadhyay 764c0e2abf Use xe_map_resource_to_region helper instead of direct access
Renaming:
The helper function res_to_mem_region is now xe_map_resource_to_region.

Abstraction:
The patch removes instances where block->private was accessed directly
to obtain VRAM region data allowing VRAM manager to own block->private
for future use cases.

V2(MattB): Add more detail about patch also adjust variable placement

Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260407055107.2782450-2-tejas.upadhyay@intel.com
Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
2026-04-08 21:34:00 +05:30

27 lines
822 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;
struct ttm_resource;
struct xe_vram_region *xe_map_resource_to_region(struct ttm_resource *res);
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