mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 11:02:31 -04:00
Allow the driver to expose hardware register spaces to userspace
through GEM objects with fake mmap offsets. This can be useful
for userspace-firmware communication, debugging, etc.
v2: Minor doc fix (CI)
v3: Enforce MAP_SHARED (Tejas)
Add fault handler with dummy page (Tejas, Matt Auld)
Store physical address instead of xe_mmio in the GEM object (MattB)
v4: Separate xe_mmio_gem from xe_mmio and make it private (MattB)
Signed-off-by: Ilia Levi <ilia.levi@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Link: https://lore.kernel.org/r/20250714122658.1803-1-ilia.levi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
21 lines
480 B
C
21 lines
480 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2025 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_MMIO_GEM_H_
|
|
#define _XE_MMIO_GEM_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct drm_file;
|
|
struct xe_device;
|
|
struct xe_mmio_gem;
|
|
|
|
struct xe_mmio_gem *xe_mmio_gem_create(struct xe_device *xe, struct drm_file *file,
|
|
phys_addr_t phys_addr, size_t size);
|
|
u64 xe_mmio_gem_mmap_offset(struct xe_mmio_gem *gem);
|
|
void xe_mmio_gem_destroy(struct xe_mmio_gem *gem);
|
|
|
|
#endif /* _XE_MMIO_GEM_H_ */
|