drm/panel-edp: Add STA 116QHD024002
[drm/drm-misc.git] / include / linux / page_reporting.h
blobfe648dfa3a7caef9ab262ad52d321362f4312ff4
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_PAGE_REPORTING_H
3 #define _LINUX_PAGE_REPORTING_H
5 #include <linux/mmzone.h>
6 #include <linux/scatterlist.h>
8 /* This value should always be a power of 2, see page_reporting_cycle() */
9 #define PAGE_REPORTING_CAPACITY 32
11 struct page_reporting_dev_info {
12 /* function that alters pages to make them "reported" */
13 int (*report)(struct page_reporting_dev_info *prdev,
14 struct scatterlist *sg, unsigned int nents);
16 /* work struct for processing reports */
17 struct delayed_work work;
19 /* Current state of page reporting */
20 atomic_t state;
22 /* Minimal order of page reporting */
23 unsigned int order;
26 /* Tear-down and bring-up for page reporting devices */
27 void page_reporting_unregister(struct page_reporting_dev_info *prdev);
28 int page_reporting_register(struct page_reporting_dev_info *prdev);
29 #endif /*_LINUX_PAGE_REPORTING_H */