Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 /*
0003  * Interface for Surface ACPI Notify (SAN) driver.
0004  *
0005  * Provides access to discrete GPU notifications sent from ACPI via the SAN
0006  * driver, which are not handled by this driver directly.
0007  *
0008  * Copyright (C) 2019-2020 Maximilian Luz <luzmaximilian@gmail.com>
0009  */
0010 
0011 #ifndef _LINUX_SURFACE_ACPI_NOTIFY_H
0012 #define _LINUX_SURFACE_ACPI_NOTIFY_H
0013 
0014 #include <linux/notifier.h>
0015 #include <linux/types.h>
0016 
0017 /**
0018  * struct san_dgpu_event - Discrete GPU ACPI event.
0019  * @category: Category of the event.
0020  * @target:   Target ID of the event source.
0021  * @command:  Command ID of the event.
0022  * @instance: Instance ID of the event source.
0023  * @length:   Length of the event's payload data (in bytes).
0024  * @payload:  Pointer to the event's payload data.
0025  */
0026 struct san_dgpu_event {
0027     u8 category;
0028     u8 target;
0029     u8 command;
0030     u8 instance;
0031     u16 length;
0032     u8 *payload;
0033 };
0034 
0035 int san_client_link(struct device *client);
0036 int san_dgpu_notifier_register(struct notifier_block *nb);
0037 int san_dgpu_notifier_unregister(struct notifier_block *nb);
0038 
0039 #endif /* _LINUX_SURFACE_ACPI_NOTIFY_H */