
This patch implements a vendor hook that changes d3hot_delay to use usleep_range() instead of msleep() to reduce the resume time from 20ms to 10ms. The call sequence is as follows: pci_pm_resume_noirq() pci_pm_default_resume_early() pci_power_up() pci_raw_set_power_state() --> msleep(10) The default d3hot_delay is 10ms. Using msleep for delays less than 20ms could result in delays up to 20ms. Reference: Documentation/timers/timers-howto.rst Using usleep_range() results in the delay being closer to 10ms and this reduces the resume time. Bug: 194231641 Change-Id: If3e4dcfb99edad302371273933fa6784854cf892 Signed-off-by: Sajid Dalvi <sdalvi@google.com>
23 lines
701 B
C
23 lines
701 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM pci
|
|
#define TRACE_INCLUDE_PATH trace/hooks
|
|
|
|
#if !defined(_TRACE_HOOK_PCI_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_HOOK_PCI_H
|
|
#include <linux/tracepoint.h>
|
|
#include <trace/hooks/vendor_hooks.h>
|
|
/*
|
|
* Following tracepoints are not exported in tracefs and provide a
|
|
* mechanism for vendor modules to hook and extend functionality
|
|
*/
|
|
|
|
DECLARE_RESTRICTED_HOOK(android_rvh_pci_d3_sleep,
|
|
TP_PROTO(struct pci_dev *dev, unsigned int delay, int *err),
|
|
TP_ARGS(dev, delay, err), 1);
|
|
|
|
#endif /* _TRACE_HOOK_PCI_H */
|
|
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|