mirror of
https://github.com/torvalds/linux.git
synced 2026-04-25 01:52:32 -04:00
Now that we eliminated all the mem_access get/put with its locking issues from the inner calls of migration, we can allow D3Cold. Enable it when VRAM utilization is lower then 300Mb. On higher utilization we only allow D3hot so we don't increase so much the latency on runtime resume due to the memory restoration. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240522170105.327472-7-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2022 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_PM_H_
|
|
#define _XE_PM_H_
|
|
|
|
#include <linux/pm_runtime.h>
|
|
|
|
#define DEFAULT_VRAM_THRESHOLD 300 /* in MB */
|
|
|
|
struct xe_device;
|
|
|
|
int xe_pm_suspend(struct xe_device *xe);
|
|
int xe_pm_resume(struct xe_device *xe);
|
|
|
|
int xe_pm_init_early(struct xe_device *xe);
|
|
int xe_pm_init(struct xe_device *xe);
|
|
void xe_pm_runtime_fini(struct xe_device *xe);
|
|
bool xe_pm_runtime_suspended(struct xe_device *xe);
|
|
int xe_pm_runtime_suspend(struct xe_device *xe);
|
|
int xe_pm_runtime_resume(struct xe_device *xe);
|
|
void xe_pm_runtime_get(struct xe_device *xe);
|
|
int xe_pm_runtime_get_ioctl(struct xe_device *xe);
|
|
void xe_pm_runtime_put(struct xe_device *xe);
|
|
bool xe_pm_runtime_get_if_active(struct xe_device *xe);
|
|
bool xe_pm_runtime_get_if_in_use(struct xe_device *xe);
|
|
void xe_pm_runtime_get_noresume(struct xe_device *xe);
|
|
bool xe_pm_runtime_resume_and_get(struct xe_device *xe);
|
|
void xe_pm_assert_unbounded_bridge(struct xe_device *xe);
|
|
int xe_pm_set_vram_threshold(struct xe_device *xe, u32 threshold);
|
|
void xe_pm_d3cold_allowed_toggle(struct xe_device *xe);
|
|
struct task_struct *xe_pm_read_callback_task(struct xe_device *xe);
|
|
|
|
#endif
|